From dc37f76faf1a48f3ff974f6b877571cf4d4782d9 Mon Sep 17 00:00:00 2001 From: jtsmedley <38006759+jtsmedley@users.noreply.github.com> Date: Fri, 5 Jan 2024 08:49:45 -0600 Subject: [PATCH] ESM Updates * Add support for IPNS names on Filebase * Updates to ESM --- .eslintrc | 4 +- .github/workflows/test.yml | 3 +- README.md | 3 +- action.yaml | 2 +- dist/LICENSE | 5325 +- dist/index.js | 295889 ++++++++++++++++++++++++---------- dist/package.json | 3 + index.js | 4 +- package-lock.json | 26627 ++- package.json | 25 +- pinners/filebase.js | 76 +- pinners/index.js | 17 +- pinners/infura.js | 8 +- pinners/ipfs.js | 10 +- pinners/maker.js | 6 +- pinners/pinata.js | 4 +- runner.js | 14 +- runner.test.js | 3 +- uploader.js | 4 +- uploader.test.js | 3 +- 20 files changed, 227702 insertions(+), 100328 deletions(-) create mode 100644 dist/package.json diff --git a/.eslintrc b/.eslintrc index 486594f54..2e72e5c3d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,5 @@ { "env": { - "commonjs": true, "es6": true, "node": true }, @@ -10,7 +9,8 @@ "SharedArrayBuffer": "readonly" }, "parserOptions": { - "ecmaVersion": 2018 + "ecmaVersion": 2018, + "sourceType": "module" }, "rules": {} } \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb8e557b6..439ed539a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Publish Test [Pinata] env: @@ -33,6 +33,7 @@ jobs: filebaseBucket: ${{ secrets.FILEBASE_BUCKET }} filebaseKey: ${{ secrets.FILEBASE_KEY }} filebaseSecret: ${{ secrets.FILEBASE_SECRET }} + key: ${{ vars.FILEBASE_NAME }} - name: Publish Test [Infura] env: diff --git a/README.md b/README.md index f674ea0af..7b9fc04ac 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ with: ### Filebase starter ``` -uses: aquiladev/ipfs-action@v1 +uses: aquiladev/ipfs-action@master with: path: ./build service: filebase @@ -91,4 +91,5 @@ with: filebaseBucket: ${{ secrets.FILEBASE_BUCKET }} filebaseKey: ${{ secrets.FILEBASE_KEY }} filebaseSecret: ${{ secrets.FILEBASE_SECRET }} + key: ${{ vars.FILEBASE_NAME }} ``` diff --git a/action.yaml b/action.yaml index 7f2263a91..2136f0bff 100644 --- a/action.yaml +++ b/action.yaml @@ -79,5 +79,5 @@ outputs: ipns: description: 'IPNS CID if applicable' runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' diff --git a/dist/LICENSE b/dist/LICENSE index 39badfcbd..62c0727ef 100644 --- a/dist/LICENSE +++ b/dist/LICENSE @@ -665,9 +665,9 @@ Apache-2.0 limitations under the License. -@aws-sdk/abort-controller +@aws-sdk/client-s3 Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -869,7 +869,8 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/client-s3 + +@aws-sdk/client-sso Apache-2.0 Apache License Version 2.0, January 2004 @@ -1074,7 +1075,7 @@ Apache-2.0 limitations under the License. -@aws-sdk/client-sso +@aws-sdk/client-sts Apache-2.0 Apache License Version 2.0, January 2004 @@ -1279,9 +1280,12 @@ Apache-2.0 limitations under the License. -@aws-sdk/client-sts +@aws-sdk/core Apache-2.0 - Apache License + +@aws-sdk/credential-provider-env +Apache-2.0 +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -1483,8 +1487,7 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/config-resolver +@aws-sdk/credential-provider-ini Apache-2.0 Apache License Version 2.0, January 2004 @@ -1688,7 +1691,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/credential-provider-env +@aws-sdk/credential-provider-node Apache-2.0 Apache License Version 2.0, January 2004 @@ -1892,7 +1895,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/credential-provider-imds +@aws-sdk/credential-provider-process Apache-2.0 Apache License Version 2.0, January 2004 @@ -2082,7 +2085,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2096,7 +2099,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/credential-provider-ini +@aws-sdk/credential-provider-sso Apache-2.0 Apache License Version 2.0, January 2004 @@ -2286,7 +2289,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2300,7 +2303,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/credential-provider-node +@aws-sdk/credential-provider-web-identity Apache-2.0 Apache License Version 2.0, January 2004 @@ -2490,7 +2493,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2504,7 +2507,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/credential-provider-process +@aws-sdk/lib-storage Apache-2.0 Apache License Version 2.0, January 2004 @@ -2694,7 +2697,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2708,9 +2711,9 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/credential-provider-sso +@aws-sdk/middleware-bucket-endpoint Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -2898,7 +2901,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -2912,9 +2915,10 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/credential-provider-web-identity + +@aws-sdk/middleware-expect-continue Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -3102,7 +3106,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -3116,7 +3120,8 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/eventstream-codec + +@aws-sdk/middleware-flexible-checksums Apache-2.0 Apache License Version 2.0, January 2004 @@ -3306,7 +3311,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -3321,7 +3326,7 @@ Apache-2.0 limitations under the License. -@aws-sdk/eventstream-serde-config-resolver +@aws-sdk/middleware-host-header Apache-2.0 Apache License Version 2.0, January 2004 @@ -3526,7 +3531,7 @@ Apache-2.0 limitations under the License. -@aws-sdk/eventstream-serde-node +@aws-sdk/middleware-location-constraint Apache-2.0 Apache License Version 2.0, January 2004 @@ -3716,7 +3721,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -3731,9 +3736,9 @@ Apache-2.0 limitations under the License. -@aws-sdk/eventstream-serde-universal +@aws-sdk/middleware-logger Apache-2.0 - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -3921,7 +3926,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -3935,10 +3940,9 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/hash-node +@aws-sdk/middleware-recursion-detection Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -4126,7 +4130,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -4140,9 +4144,10 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/hash-stream-node + +@aws-sdk/middleware-sdk-s3 Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -4330,7 +4335,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -4344,7 +4349,8 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/is-array-buffer + +@aws-sdk/middleware-signing Apache-2.0 Apache License Version 2.0, January 2004 @@ -4548,9 +4554,9 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/lib-storage +@aws-sdk/middleware-ssec Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -4752,7 +4758,8 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/middleware-bucket-endpoint + +@aws-sdk/middleware-user-agent Apache-2.0 Apache License Version 2.0, January 2004 @@ -4942,7 +4949,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -4957,7 +4964,7 @@ Apache-2.0 limitations under the License. -@aws-sdk/middleware-content-length +@aws-sdk/region-config-resolver Apache-2.0 Apache License Version 2.0, January 2004 @@ -5161,7 +5168,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/middleware-expect-continue +@aws-sdk/signature-v4-multi-region Apache-2.0 Apache License Version 2.0, January 2004 @@ -5351,7 +5358,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -5366,9 +5373,9 @@ Apache-2.0 limitations under the License. -@aws-sdk/middleware-flexible-checksums +@aws-sdk/token-providers Apache-2.0 - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -5556,7 +5563,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -5570,10 +5577,9 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/middleware-host-header +@aws-sdk/util-arn-parser Apache-2.0 - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -5761,7 +5767,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -5775,10 +5781,9 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/middleware-location-constraint +@aws-sdk/util-endpoints Apache-2.0 - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -5980,10 +5985,9 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/middleware-logger +@aws-sdk/util-user-agent-node Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -6171,7 +6175,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -6185,9 +6189,10 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/middleware-recursion-detection + +@aws-sdk/util-utf8-browser Apache-2.0 - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -6375,7 +6380,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -6389,10 +6394,9 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/middleware-retry +@aws-sdk/xml-builder Apache-2.0 - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -6594,896 +6598,725 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. +@chainsafe/is-ip +MIT +Copyright © 2022 ChainSafe Systems -@aws-sdk/middleware-sdk-s3 -Apache-2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +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: - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - 1. Definitions. +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. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +@chainsafe/netmask +MIT +Copyright (c) 2023 Chainsafe Systems Inc. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +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: - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. +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. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +@fastify/busboy +MIT +Copyright Brian White. All rights reserved. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +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: - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +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. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +@filebase/sdk +MIT +MIT License - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. +Copyright (c) 2023 Filebase, Inc. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +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: - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +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. - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +@helia/car +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +@helia/unixfs +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +@ipld/car +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - END OF TERMS AND CONDITIONS - APPENDIX: How to apply the Apache License to your work. +@ipld/dag-cbor +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +@ipld/dag-json +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - http://www.apache.org/licenses/LICENSE-2.0 +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +@ipld/dag-pb +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -@aws-sdk/middleware-sdk-sts -Apache-2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. +@libp2p/interface +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +@libp2p/interface-peer-id +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +@libp2p/interfaces +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +@libp2p/logger +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +@libp2p/peer-id +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +@multiformats/multiaddr +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +@multiformats/multiaddr-to-uri +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +@multiformats/murmur3 +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS +@noble/ed25519 +MIT +The MIT License (MIT) - APPENDIX: How to apply the Apache License to your work. +Copyright (c) 2019 Paul Miller (https://paulmillr.com) - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +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: - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +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. - http://www.apache.org/licenses/LICENSE-2.0 +@noble/secp256k1 +MIT +The MIT License (MIT) - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Copyright (c) 2019 Paul Miller (https://paulmillr.com) +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: -@aws-sdk/middleware-serde -Apache-2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +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. - 1. Definitions. +@octokit/auth-token +MIT +The MIT License - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +Copyright (c) 2019 Octokit contributors - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +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: - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +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. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +@octokit/core +MIT +The MIT License - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +Copyright (c) 2019 Octokit contributors - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +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: - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +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. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +@octokit/endpoint +MIT +The MIT License - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +Copyright (c) 2018 Octokit contributors - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +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: - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +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. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. +@octokit/graphql +MIT +The MIT License - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +Copyright (c) 2018 Octokit contributors - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +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: - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +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. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS +@octokit/plugin-paginate-rest +MIT +MIT License Copyright (c) 2019 Octokit contributors - APPENDIX: How to apply the Apache License to your work. +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: - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +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. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 +@octokit/plugin-rest-endpoint-methods +MIT +MIT License Copyright (c) 2019 Octokit contributors - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +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 (including the next paragraph) shall be included in all copies or substantial portions of the Software. -@aws-sdk/middleware-signing -Apache-2.0 -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +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. - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. +@octokit/request +MIT +The MIT License - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +Copyright (c) 2018 Octokit contributors - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +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: - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +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. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +@octokit/request-error +MIT +The MIT License - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +Copyright (c) 2019 Octokit contributors - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +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: - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. +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. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. +@pinata/sdk +MIT +The MIT License (MIT) - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: +Copyright (c) 2015 Krasimir Tsonev - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and +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: - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and +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. - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. +@protobufjs/aspromise +BSD-3-Clause +Copyright (c) 2016, Daniel Wirtz All rights reserved. - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - END OF TERMS AND CONDITIONS +@protobufjs/base64 +BSD-3-Clause +Copyright (c) 2016, Daniel Wirtz All rights reserved. - APPENDIX: How to apply the Apache License to your work. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 +@protobufjs/eventemitter +BSD-3-Clause +Copyright (c) 2016, Daniel Wirtz All rights reserved. - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: -@aws-sdk/middleware-ssec -Apache-2.0 - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - 1. Definitions. - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. +@protobufjs/float +BSD-3-Clause +Copyright (c) 2016, Daniel Wirtz All rights reserved. - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. +@protobufjs/inquire +BSD-3-Clause +Copyright (c) 2016, Daniel Wirtz All rights reserved. - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable +@protobufjs/pool +BSD-3-Clause +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +@protobufjs/utf8 +BSD-3-Clause +Copyright (c) 2016, Daniel Wirtz All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of its author, nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +@smithy/abort-controller +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. @@ -7618,8 +7451,7 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/middleware-stack +@smithy/config-resolver Apache-2.0 Apache License Version 2.0, January 2004 @@ -7823,7 +7655,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/middleware-user-agent +@smithy/core Apache-2.0 Apache License Version 2.0, January 2004 @@ -8028,7 +7860,7 @@ Apache-2.0 limitations under the License. -@aws-sdk/node-config-provider +@smithy/credential-provider-imds Apache-2.0 Apache License Version 2.0, January 2004 @@ -8218,7 +8050,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -8232,9 +8064,9 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/node-http-handler +@smithy/eventstream-codec Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -8436,9 +8268,10 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/property-provider + +@smithy/eventstream-serde-config-resolver Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -8626,7 +8459,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -8640,7 +8473,8 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/protocol-http + +@smithy/eventstream-serde-node Apache-2.0 Apache License Version 2.0, January 2004 @@ -8845,7 +8679,7 @@ Apache-2.0 limitations under the License. -@aws-sdk/querystring-builder +@smithy/eventstream-serde-universal Apache-2.0 Apache License Version 2.0, January 2004 @@ -9035,7 +8869,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -9050,9 +8884,9 @@ Apache-2.0 limitations under the License. -@aws-sdk/querystring-parser +@smithy/hash-node Apache-2.0 - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -9254,10 +9088,9 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/service-error-classification +@smithy/hash-stream-node Apache-2.0 - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -9459,8 +9292,7 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/shared-ini-file-loader +@smithy/is-array-buffer Apache-2.0 Apache License Version 2.0, January 2004 @@ -9664,7 +9496,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/signature-v4 +@smithy/middleware-content-length Apache-2.0 Apache License Version 2.0, January 2004 @@ -9868,9 +9700,9 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/signature-v4-multi-region +@smithy/middleware-endpoint Apache-2.0 - Apache License +Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -10058,7 +9890,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -10072,8 +9904,7 @@ Apache-2.0 See the License for the specific language governing permissions and limitations under the License. - -@aws-sdk/smithy-client +@smithy/middleware-retry Apache-2.0 Apache License Version 2.0, January 2004 @@ -10263,7 +10094,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -10278,7 +10109,7 @@ Apache-2.0 limitations under the License. -@aws-sdk/url-parser +@smithy/middleware-serde Apache-2.0 Apache License Version 2.0, January 2004 @@ -10468,7 +10299,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -10483,7 +10314,7 @@ Apache-2.0 limitations under the License. -@aws-sdk/util-arn-parser +@smithy/middleware-stack Apache-2.0 Apache License Version 2.0, January 2004 @@ -10687,7 +10518,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-base64-node +@smithy/node-config-provider Apache-2.0 Apache License Version 2.0, January 2004 @@ -10877,7 +10708,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -10891,7 +10722,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-body-length-node +@smithy/node-http-handler Apache-2.0 Apache License Version 2.0, January 2004 @@ -11095,7 +10926,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-buffer-from +@smithy/property-provider Apache-2.0 Apache License Version 2.0, January 2004 @@ -11299,9 +11130,9 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-config-provider +@smithy/protocol-http Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -11489,7 +11320,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -11503,7 +11334,8 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-defaults-mode-node + +@smithy/querystring-builder Apache-2.0 Apache License Version 2.0, January 2004 @@ -11708,9 +11540,9 @@ Apache-2.0 limitations under the License. -@aws-sdk/util-hex-encoding +@smithy/querystring-parser Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -11912,9 +11744,10 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-middleware + +@smithy/service-error-classification Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -12102,7 +11935,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12116,7 +11949,8 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-stream-node + +@smithy/shared-ini-file-loader Apache-2.0 Apache License Version 2.0, January 2004 @@ -12320,7 +12154,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-uri-escape +@smithy/signature-v4 Apache-2.0 Apache License Version 2.0, January 2004 @@ -12524,7 +12358,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-user-agent-node +@smithy/smithy-client Apache-2.0 Apache License Version 2.0, January 2004 @@ -12714,7 +12548,7 @@ Apache-2.0 same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12729,9 +12563,9 @@ Apache-2.0 limitations under the License. -@aws-sdk/util-utf8-browser +@smithy/types Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -12919,7 +12753,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -12933,9 +12767,10 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-utf8-node + +@smithy/url-parser Apache-2.0 -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -13137,7 +12972,8 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/util-waiter + +@smithy/util-base64 Apache-2.0 Apache License Version 2.0, January 2004 @@ -13341,7 +13177,7 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@aws-sdk/xml-builder +@smithy/util-body-length-node Apache-2.0 Apache License Version 2.0, January 2004 @@ -13545,658 +13381,2266 @@ Apache License See the License for the specific language governing permissions and limitations under the License. -@filebase/client -(Apache-2.0 OR MIT) - -@ipld/car -(Apache-2.0 AND MIT) -Copyright 2020 Protocol Labs - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. +@smithy/util-buffer-from +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -@ipld/dag-cbor -(Apache-2.0 AND MIT) -The MIT License (MIT) + 1. Definitions. -Copyright (c) 2015 David Dias + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -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: + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -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. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -@ipld/dag-json -(Apache-2.0 AND MIT) -Copyright 2016-2020 Protocol Labs + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. - http://www.apache.org/licenses/LICENSE-2.0 + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -@ipld/dag-pb -(Apache-2.0 AND MIT) -Copyright 2016-2020 Protocol Labs + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: - http://www.apache.org/licenses/LICENSE-2.0 + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -@multiformats/murmur3 -(Apache-2.0 AND MIT) + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -@noble/ed25519 -MIT -The MIT License (MIT) + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -Copyright (c) 2019 Paul Miller (https://paulmillr.com) + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -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: + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -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. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -@noble/secp256k1 -MIT -The MIT License (MIT) + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -Copyright (c) 2019 Paul Miller (https://paulmillr.com) + END OF TERMS AND CONDITIONS -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: + APPENDIX: How to apply the Apache License to your work. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -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. + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. -@octokit/auth-token -MIT -The MIT License + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -Copyright (c) 2019 Octokit contributors + http://www.apache.org/licenses/LICENSE-2.0 -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: + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +@smithy/util-config-provider +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -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. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + 1. Definitions. -@octokit/core -MIT -The MIT License + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -Copyright (c) 2019 Octokit contributors + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -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: + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -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. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. -@octokit/endpoint -MIT -The MIT License + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -Copyright (c) 2018 Octokit contributors + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -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: + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -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. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -@octokit/graphql -MIT -The MIT License + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -Copyright (c) 2018 Octokit contributors + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -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: + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -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. + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -@octokit/plugin-paginate-rest -MIT -MIT License Copyright (c) 2019 Octokit contributors + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -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: + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -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. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -@octokit/plugin-rest-endpoint-methods -MIT -MIT License Copyright (c) 2019 Octokit contributors + END OF TERMS AND CONDITIONS -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: + APPENDIX: How to apply the Apache License to your work. -The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -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. + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -@octokit/request -MIT -The MIT License + http://www.apache.org/licenses/LICENSE-2.0 -Copyright (c) 2018 Octokit contributors + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -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: +@smithy/util-defaults-mode-node +Apache-2.0 + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -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. + 1. Definitions. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -@octokit/request-error -MIT -The MIT License + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -Copyright (c) 2019 Octokit contributors + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -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: + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -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. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +@smithy/util-endpoints +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +@smithy/util-hex-encoding +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +@smithy/util-middleware +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +@smithy/util-retry +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +@smithy/util-stream +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +@smithy/util-uri-escape +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -@pinata/sdk -MIT -The MIT License (MIT) + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -Copyright (c) 2015 Krasimir Tsonev + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -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: + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -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. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -@protobufjs/aspromise -BSD-3-Clause -Copyright (c) 2016, Daniel Wirtz All rights reserved. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +@smithy/util-utf8 +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -@protobufjs/base64 -BSD-3-Clause -Copyright (c) 2016, Daniel Wirtz All rights reserved. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -@protobufjs/eventemitter -BSD-3-Clause -Copyright (c) 2016, Daniel Wirtz All rights reserved. + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -@protobufjs/float -BSD-3-Clause -Copyright (c) 2016, Daniel Wirtz All rights reserved. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + END OF TERMS AND CONDITIONS + APPENDIX: How to apply the Apache License to your work. -@protobufjs/inquire -BSD-3-Clause -Copyright (c) 2016, Daniel Wirtz All rights reserved. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -@protobufjs/pool -BSD-3-Clause -Copyright (c) 2016, Daniel Wirtz All rights reserved. +@smithy/util-waiter +Apache-2.0 +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. + 1. Definitions. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. -@protobufjs/utf8 -BSD-3-Clause -Copyright (c) 2016, Daniel Wirtz All rights reserved. + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -* Neither the name of its author, nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). -@vercel/ncc -MIT -Copyright 2018 ZEIT, Inc. + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -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: + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -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. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -@web-std/blob -MIT -Copyright 2019 Irakli Gozalishvili. All rights reserved. -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: + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -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. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and -@web-std/fetch -MIT -The MIT License (MIT) + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -Copyright (c) 2016 - 2020 Node Fetch Team + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -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: + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -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. + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. -@web-std/file -MIT -Copyright 2019 Irakli Gozalishvili. All rights reserved. -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: + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + END OF TERMS AND CONDITIONS -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. + APPENDIX: How to apply the Apache License to your work. + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. -@web-std/form-data -MIT -Copyright 2019 Irakli Gozalishvili. All rights reserved. -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: + Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at -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. + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. -@web-std/stream +@vercel/ncc MIT +Copyright 2018 ZEIT, Inc. -@web3-storage/multipart-parser -(Apache-2.0 AND MIT) +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. -abort-controller +any-signal MIT MIT License -Copyright (c) 2017 Toru Nagashima +Copyright (c) 2019 Jacob Heun Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -14217,11 +15661,11 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -any-signal +asynckit MIT -MIT License +The MIT License (MIT) -Copyright (c) 2019 Jacob Heun +Copyright (c) 2016 Alex Indigo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -14242,6 +15686,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +axios +MIT +# Copyright (c) 2014-present Matt Zabriskie & Collaborators + +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. + + balanced-match MIT (MIT) @@ -14472,31 +15927,30 @@ Apache-2.0 limitations under the License. -bl -MIT -The MIT License (MIT) -===================== - -Copyright (c) 2013-2019 bl contributors ----------------------------------- +blob-to-it +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -*bl contributors listed at * +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 -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. +blockstore-core +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -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. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 -blob-to-it -ISC +blockstore-fs +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -blockstore-core -(Apache-2.0 OR MIT) MIT: https://www.opensource.org/licenses/mit Apache-2.0: https://www.apache.org/licenses/license-2.0 + brace-expansion MIT MIT License @@ -14567,6 +16021,29 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +combined-stream +MIT +Copyright (c) 2011 Debuggable Limited + +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. + + concat-map MIT This software is released under the MIT license: @@ -14589,8 +16066,8 @@ 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. -data-uri-to-buffer -MIT +dag-jose +(Apache-2.0 OR MIT) debug MIT @@ -14616,6 +16093,29 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +delayed-stream +MIT +Copyright (c) 2011 Debuggable Limited + +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. + + deprecation ISC The ISC License @@ -14689,72 +16189,339 @@ encoding MIT Copyright (c) 2012-2014 Andris Reinman -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: +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 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. + + +err-code +MIT + +eventemitter3 +MIT +The MIT License (MIT) + +Copyright (c) 2014 Arnout Kazemier + +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. + + +fast-fifo +MIT +The MIT License (MIT) + +Copyright (c) 2019 Mathias Buus + +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. + + +fast-write-atomic +MIT +MIT License + +Copyright (c) 2018 Matteo Collina + +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. + + +fast-xml-parser +MIT +MIT License + +Copyright (c) 2017 Amit Kumar Gupta + +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. + + +files-from-path +Apache-2.0 OR MIT +The contents of this repository are Copyright (c) corresponding authors and +contributors, licensed under the `Permissive License Stack` meaning either of: + +- Apache-2.0 Software License: https://www.apache.org/licenses/LICENSE-2.0 + ([...4tr2kfsq](https://dweb.link/ipfs/bafkreiankqxazcae4onkp436wag2lj3ccso4nawxqkkfckd6cg4tr2kfsq)) + +- MIT Software License: https://opensource.org/licenses/MIT + ([...vljevcba](https://dweb.link/ipfs/bafkreiepofszg4gfe2gzuhojmksgemsub2h4uy2gewdnr35kswvljevcba)) + +You may not use the contents of this repository except in compliance +with one of the listed Licenses. For an extended clarification of the +intent behind the choice of Licensing please refer to +https://protocol.ai/blog/announcing-the-permissive-license-stack/ + +Unless required by applicable law or agreed to in writing, software +distributed under the terms listed in this notice is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, +either express or implied. See each License for the specific language +governing permissions and limitations under that License. + + + +`SPDX-License-Identifier: Apache-2.0 OR MIT` + +Verbatim copies of both licenses are included below: + +
Apache-2.0 Software License + +``` + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. -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. + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. -entities -BSD-2-Clause -Copyright (c) Felix Böhm -All rights reserved. + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: -Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and -THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and -err-code -MIT + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. -event-target-shim -MIT -The MIT License (MIT) + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. -Copyright (c) 2015 Toru Nagashima + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. -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: + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. -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. + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + END OF TERMS AND CONDITIONS +``` -fast-fifo -MIT -The MIT License (MIT) +
-Copyright (c) 2019 Mathias Buus +
MIT Software License +``` 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 @@ -14772,20 +16539,21 @@ 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. +``` +
-fast-xml-parser -MIT -MIT License -Copyright (c) 2017 Amit Kumar Gupta +follow-redirects +MIT +Copyright 2014–present Olivier Lalonde , James Talmage , Ruben Verborgh -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: +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. @@ -14793,14 +16561,33 @@ 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. +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. -files-from-path -(Apache-2.0 AND MIT) +form-data +MIT +Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors + + 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. + get-iterator MIT @@ -14847,29 +16634,11 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. hamt-sharding -MIT -The MIT License (MIT) - -Copyright (c) 2016 David Dias - -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. +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 has-flag @@ -14885,105 +16654,53 @@ The above copyright notice and this permission notice shall be included in all c 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. -iconv-lite -MIT -Copyright (c) 2011 Alexander Shtuchkin - -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. - - - -ip-regex -MIT -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - -ipfs-car -(Apache-2.0 AND MIT) - -ipfs-core-utils -MIT -The MIT License (MIT) - -Copyright (c) IPFS - -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: +iconv-lite +MIT +Copyright (c) 2011 Alexander Shtuchkin -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +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 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. +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. -ipfs-http-client -(Apache-2.0 OR MIT) -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.apache.org/licenses/LICENSE-2.0 +ipfs-core-utils +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 ipfs-unixfs -MIT -The MIT License (MIT) +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -Copyright (c) 2016 David Dias +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 -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. +ipfs-unixfs-exporter +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -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. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 ipfs-unixfs-importer @@ -14995,29 +16712,11 @@ Apache-2.0: https://www.apache.org/licenses/license-2.0 ipfs-utils -MIT -The MIT License (MIT) - -Copyright (c) IPFS - -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. +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 is-electron @@ -15045,19 +16744,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -is-ip -MIT -MIT License - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -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. - - is-plain-obj MIT MIT License @@ -15071,31 +16757,6 @@ The above copyright notice and this permission notice shall be included in all c 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. -is-plain-object -MIT -The MIT License (MIT) - -Copyright (c) 2014-2017, Jon Schlinkert. - -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. - - iso-random-stream MIT MIT License @@ -15126,59 +16787,103 @@ it-all ISC it-batch -ISC +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + it-drain -ISC +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + it-filter -ISC +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + it-first -ISC +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + it-glob ISC it-last -ISC +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + it-map -ISC +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + + +it-merge +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + + +it-parallel +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + it-parallel-batch -ISC +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + it-peekable -ISC +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -it-pipe -MIT -MIT License +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 -Copyright (c) 2019 Alan Shaw -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: +it-pipe +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 -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. +it-pushable +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 -it-take -ISC it-to-stream MIT @@ -15205,36 +16910,19 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -libp2p-crypto -MIT -The MIT License (MIT) - -Copyright (c) 2016 Friedel Ziegelmayer - -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. +kubo-rpc-client +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -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. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 -merge-options +libp2p-crypto MIT The MIT License (MIT) -Copyright (c) Michael Mayer +Copyright (c) 2016 Friedel Ziegelmayer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -15243,42 +16931,23 @@ 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 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. - - -minimatch -ISC -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -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. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. -ms +merge-options MIT The MIT License (MIT) -Copyright (c) 2016 Zeit, Inc. +Copyright (c) Michael Mayer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -15299,11 +16968,12 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -multiaddr +mime-db MIT + The MIT License (MIT) -Copyright (c) 2016 Protocol Labs Inc. +Copyright (c) 2014 Jonathan Ong me@jongleberry.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -15324,11 +16994,57 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -multiaddr-to-uri +mime-types MIT -MIT License +(The MIT License) -Copyright (c) 2018 Alan Shaw +Copyright (c) 2014 Jonathan Ong +Copyright (c) 2015 Douglas Christopher Wilson + +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. + + +minimatch +ISC +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +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. + + +ms +MIT +The MIT License (MIT) + +Copyright (c) 2016 Zeit, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -15415,38 +17131,6 @@ 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. -native-abort-controller -MIT - -native-fetch -MIT - -node-fetch -MIT -The MIT License (MIT) - -Copyright (c) 2016 David Frank - -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. - - - node-forge (BSD-3-Clause OR GPL-2.0) You may use the Forge project under the terms of either the BSD License or the @@ -15839,6 +17523,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +p-queue +MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +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. + + +p-timeout +MIT +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +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. + + parse-duration MIT @@ -15892,6 +17602,14 @@ SOFTWARE. +progress-events +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + + protobufjs BSD-3-Clause This license applies to all parts of protobuf.js except those files @@ -15935,6 +17653,38 @@ standalone and requires a support library to be linked with it. This support library is itself covered by the above license. +protons-runtime +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. + +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 + + +proxy-from-env +MIT +The MIT License + +Copyright (C) 2016-2018 Rob Wu + +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. + + rabin-wasm MIT @@ -15991,6 +17741,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +strnum +MIT +MIT License + +Copyright (c) 2021 Natural Intelligence + +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. + + supports-color MIT MIT License @@ -16004,9 +17779,6 @@ The above copyright notice and this permission notice shall be included in all c 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. -tr46 -MIT - tslib 0BSD Copyright (c) Microsoft Corporation. @@ -16047,45 +17819,30 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -uint8arrays -MIT - -universal-user-agent -ISC -# [ISC License](https://spdx.org/licenses/ISC) - -Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) - -Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. - -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. - - -uuid -MIT -The MIT License (MIT) - -Copyright (c) 2010-2020 Robert Kieffer and other contributors +uint8-varint +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. -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: +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 -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. +uint8arraylist +Apache-2.0 OR MIT +This project is dual licensed under MIT and Apache-2.0. +MIT: https://www.opensource.org/licenses/mit +Apache-2.0: https://www.apache.org/licenses/license-2.0 -varint -MIT -web-encoding +uint8arrays MIT -web-streams-polyfill +undici MIT -The MIT License (MIT) +MIT License -Copyright (c) 2020 Mattias Buelens -Copyright (c) 2016 Diwank Singh Tomer +Copyright (c) Matteo Collina and Undici contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -16106,46 +17863,32 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -webidl-conversions -BSD-2-Clause -# The BSD 2-Clause License - -Copyright (c) 2014, Domenic Denicola -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +universal-user-agent +ISC +# [ISC License](https://spdx.org/licenses/ISC) -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +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. -whatwg-url +uuid MIT The MIT License (MIT) -Copyright (c) 2015–2016 Sebastian Mayr +Copyright (c) 2010-2020 Robert Kieffer and other contributors -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: +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 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. -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. +varint +MIT wrappy ISC diff --git a/dist/index.js b/dist/index.js index 6cf40e5d3..dff2cde07 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,10 +1,13 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ +import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module"; +/******/ var __webpack_modules__ = ({ +<<<<<<< HEAD +/***/ 4941: +======= /***/ 33529: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; @@ -28,7 +31,11 @@ var __importStar = (this && this.__importStar) || function (mod) { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.issue = exports.issueCommand = void 0; const os = __importStar(__nccwpck_require__(22037)); +<<<<<<< HEAD +const utils_1 = __nccwpck_require__(19847); +======= const utils_1 = __nccwpck_require__(38445); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /** * Commands * @@ -100,10 +107,13 @@ function escapeProperty(s) { /***/ }), +<<<<<<< HEAD +/***/ 47514: +======= /***/ 69902: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; @@ -135,12 +145,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); 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; +<<<<<<< HEAD +const command_1 = __nccwpck_require__(4941); +const file_command_1 = __nccwpck_require__(32109); +const utils_1 = __nccwpck_require__(19847); +const os = __importStar(__nccwpck_require__(22037)); +const path = __importStar(__nccwpck_require__(71017)); +const oidc_utils_1 = __nccwpck_require__(80466); +======= const command_1 = __nccwpck_require__(33529); const file_command_1 = __nccwpck_require__(49582); const utils_1 = __nccwpck_require__(38445); const os = __importStar(__nccwpck_require__(22037)); const path = __importStar(__nccwpck_require__(71017)); const oidc_utils_1 = __nccwpck_require__(20663); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /** * The code to exit an action */ @@ -425,17 +444,29 @@ exports.getIDToken = getIDToken; /** * Summary exports */ +<<<<<<< HEAD +var summary_1 = __nccwpck_require__(82505); +======= var summary_1 = __nccwpck_require__(52184); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "summary", ({ enumerable: true, get: function () { return summary_1.summary; } })); /** * @deprecated use core.summary */ +<<<<<<< HEAD +var summary_2 = __nccwpck_require__(82505); +======= var summary_2 = __nccwpck_require__(52184); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "markdownSummary", ({ enumerable: true, get: function () { return summary_2.markdownSummary; } })); /** * Path exports */ +<<<<<<< HEAD +var path_utils_1 = __nccwpck_require__(32599); +======= var path_utils_1 = __nccwpck_require__(2531); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 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; } })); @@ -443,10 +474,13 @@ Object.defineProperty(exports, "toPlatformPath", ({ enumerable: true, get: funct /***/ }), +<<<<<<< HEAD +/***/ 32109: +======= /***/ 49582: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"use strict"; // For internal use, subject to change. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { @@ -474,8 +508,13 @@ exports.prepareKeyValueMessage = exports.issueFileCommand = void 0; /* eslint-disable @typescript-eslint/no-explicit-any */ const fs = __importStar(__nccwpck_require__(57147)); const os = __importStar(__nccwpck_require__(22037)); +<<<<<<< HEAD +const uuid_1 = __nccwpck_require__(13472); +const utils_1 = __nccwpck_require__(19847); +======= const uuid_1 = __nccwpck_require__(49360); const utils_1 = __nccwpck_require__(38445); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { @@ -508,10 +547,16 @@ exports.prepareKeyValueMessage = prepareKeyValueMessage; /***/ }), +<<<<<<< HEAD +/***/ 80466: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +======= /***/ 20663: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -524,9 +569,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OidcClient = void 0; +<<<<<<< HEAD +const http_client_1 = __nccwpck_require__(15477); +const auth_1 = __nccwpck_require__(13735); +const core_1 = __nccwpck_require__(47514); +======= const http_client_1 = __nccwpck_require__(9915); const auth_1 = __nccwpck_require__(81339); const core_1 = __nccwpck_require__(69902); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class OidcClient { static createHttpClient(allowRetry = true, maxRetry = 10) { const requestOptions = { @@ -558,7 +609,11 @@ class OidcClient { .catch(error => { throw new Error(`Failed to get ID Token. \n Error Code : ${error.statusCode}\n +<<<<<<< HEAD + Error Message: ${error.message}`); +======= Error Message: ${error.result.message}`); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; if (!id_token) { @@ -592,10 +647,16 @@ exports.OidcClient = OidcClient; /***/ }), +<<<<<<< HEAD +/***/ 32599: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +======= /***/ 2531: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; @@ -657,10 +718,16 @@ exports.toPlatformPath = toPlatformPath; /***/ }), +<<<<<<< HEAD +/***/ 82505: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +======= /***/ 52184: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } @@ -947,10 +1014,13 @@ exports.summary = _summary; /***/ }), +<<<<<<< HEAD +/***/ 19847: +======= /***/ 38445: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; // We use any as a valid input type /* eslint-disable @typescript-eslint/no-explicit-any */ @@ -994,10 +1064,13 @@ exports.toCommandProperties = toCommandProperties; /***/ }), +<<<<<<< HEAD +/***/ 8725: +======= /***/ 65174: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.Context = void 0; @@ -1011,8 +1084,8 @@ class Context { var _a, _b, _c; this.payload = {}; if (process.env.GITHUB_EVENT_PATH) { - if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { - this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); + if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { + this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' })); } else { const path = process.env.GITHUB_EVENT_PATH; @@ -1030,7 +1103,8 @@ class Context { this.runId = parseInt(process.env.GITHUB_RUN_ID, 10); this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`; this.serverUrl = (_b = process.env.GITHUB_SERVER_URL) !== null && _b !== void 0 ? _b : `https://github.com`; - this.graphqlUrl = (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; + this.graphqlUrl = + (_c = process.env.GITHUB_GRAPHQL_URL) !== null && _c !== void 0 ? _c : `https://api.github.com/graphql`; } get issue() { const payload = this.payload; @@ -1055,14 +1129,21 @@ exports.Context = Context; /***/ }), +<<<<<<< HEAD +/***/ 29592: +======= /***/ 91890: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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 === undefined) k2 = k; o[k2] = m[k]; @@ -1075,14 +1156,19 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__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(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getOctokit = exports.context = void 0; +<<<<<<< HEAD +const Context = __importStar(__nccwpck_require__(8725)); +const utils_1 = __nccwpck_require__(8037); +======= const Context = __importStar(__nccwpck_require__(65174)); const utils_1 = __nccwpck_require__(56260); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.context = new Context.Context(); /** * Returns a hydrated octokit ready to use for GitHub Actions @@ -1092,21 +1178,32 @@ exports.context = new Context.Context(); */ function getOctokit(token, options, ...additionalPlugins) { const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); +<<<<<<< HEAD + return new GitHubWithPlugins((0, utils_1.getOctokitOptions)(token, options)); +======= return new GitHubWithPlugins(utils_1.getOctokitOptions(token, options)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } exports.getOctokit = getOctokit; //# sourceMappingURL=github.js.map /***/ }), +<<<<<<< HEAD +/***/ 31161: +======= /***/ 54357: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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 === undefined) k2 = k; o[k2] = m[k]; @@ -1119,13 +1216,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__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(result, mod, k); + 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 = (this && this.__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 })); +<<<<<<< HEAD +exports.getApiBaseUrl = exports.getProxyFetch = exports.getProxyAgentDispatcher = exports.getProxyAgent = exports.getAuthString = void 0; +const httpClient = __importStar(__nccwpck_require__(15477)); +const undici_1 = __nccwpck_require__(40992); +======= exports.getApiBaseUrl = exports.getProxyAgent = exports.getAuthString = void 0; const httpClient = __importStar(__nccwpck_require__(9915)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 function getAuthString(token, options) { if (!token && !options.auth) { throw new Error('Parameter token or opts.auth is required'); @@ -1141,6 +1253,19 @@ function getProxyAgent(destinationUrl) { return hc.getAgent(destinationUrl); } exports.getProxyAgent = getProxyAgent; +function getProxyAgentDispatcher(destinationUrl) { + const hc = new httpClient.HttpClient(); + return hc.getAgentDispatcher(destinationUrl); +} +exports.getProxyAgentDispatcher = getProxyAgentDispatcher; +function getProxyFetch(destinationUrl) { + const httpDispatcher = getProxyAgentDispatcher(destinationUrl); + const proxyFetch = (url, opts) => __awaiter(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + }); + return proxyFetch; +} +exports.getProxyFetch = getProxyFetch; function getApiBaseUrl() { return process.env['GITHUB_API_URL'] || 'https://api.github.com'; } @@ -1149,14 +1274,21 @@ exports.getApiBaseUrl = getApiBaseUrl; /***/ }), +<<<<<<< HEAD +/***/ 8037: +======= /***/ 56260: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { -"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[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 === undefined) k2 = k; o[k2] = m[k]; @@ -1169,24 +1301,34 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__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(result, mod, k); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0; +<<<<<<< HEAD +const Context = __importStar(__nccwpck_require__(8725)); +const Utils = __importStar(__nccwpck_require__(31161)); +// octokit + plugins +const core_1 = __nccwpck_require__(62556); +const plugin_rest_endpoint_methods_1 = __nccwpck_require__(56855); +const plugin_paginate_rest_1 = __nccwpck_require__(47383); +======= const Context = __importStar(__nccwpck_require__(65174)); const Utils = __importStar(__nccwpck_require__(54357)); // octokit + plugins const core_1 = __nccwpck_require__(85354); const plugin_rest_endpoint_methods_1 = __nccwpck_require__(94335); const plugin_paginate_rest_1 = __nccwpck_require__(58601); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.context = new Context.Context(); const baseUrl = Utils.getApiBaseUrl(); exports.defaults = { baseUrl, request: { - agent: Utils.getProxyAgent(baseUrl) + agent: Utils.getProxyAgent(baseUrl), + fetch: Utils.getProxyFetch(baseUrl) } }; exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults); @@ -1210,91 +1352,1245 @@ exports.getOctokitOptions = getOctokitOptions; /***/ }), +<<<<<<< HEAD +/***/ 80157: +/***/ ((module) => { +======= /***/ 94335: /***/ ((__unused_webpack_module, exports) => { "use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -Object.defineProperty(exports, "__esModule", ({ value: true })); +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -function ownKeys(object, enumerableOnly) { - var keys = Object.keys(object); +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + createTokenAuth: () => createTokenAuth +}); +module.exports = __toCommonJS(dist_src_exports); - if (Object.getOwnPropertySymbols) { - var symbols = Object.getOwnPropertySymbols(object); +// pkg/dist-src/auth.js +var REGEX_IS_INSTALLATION_LEGACY = /^v1\./; +var REGEX_IS_INSTALLATION = /^ghs_/; +var REGEX_IS_USER_TO_SERVER = /^ghu_/; +async function auth(token) { + const isApp = token.split(/\./).length === 3; + const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token); + const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token); + const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth"; + return { + type: "token", + token, + tokenType + }; +} - if (enumerableOnly) { - symbols = symbols.filter(function (sym) { - return Object.getOwnPropertyDescriptor(object, sym).enumerable; - }); +// pkg/dist-src/with-authorization-prefix.js +function withAuthorizationPrefix(token) { + if (token.split(/\./).length === 3) { + return `bearer ${token}`; + } + return `token ${token}`; +} + +// pkg/dist-src/hook.js +async function hook(token, request, route, parameters) { + const endpoint = request.endpoint.merge( + route, + parameters + ); + endpoint.headers.authorization = withAuthorizationPrefix(token); + return request(endpoint); +} + +// pkg/dist-src/index.js +var createTokenAuth = function createTokenAuth2(token) { + if (!token) { + throw new Error("[@octokit/auth-token] No token passed to createTokenAuth"); + } + if (typeof token !== "string") { + throw new Error( + "[@octokit/auth-token] Token passed to createTokenAuth is not a string" + ); + } + token = token.replace(/^(token|bearer) +/i, ""); + return Object.assign(auth.bind(null, token), { + hook: hook.bind(null, token) + }); +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 62556: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + Octokit: () => Octokit +}); +module.exports = __toCommonJS(dist_src_exports); +var import_universal_user_agent = __nccwpck_require__(60031); +var import_before_after_hook = __nccwpck_require__(65997); +var import_request = __nccwpck_require__(90468); +var import_graphql = __nccwpck_require__(12510); +var import_auth_token = __nccwpck_require__(80157); + +// pkg/dist-src/version.js +var VERSION = "5.0.2"; + +// pkg/dist-src/index.js +var noop = () => { +}; +var consoleWarn = console.warn.bind(console); +var consoleError = console.error.bind(console); +var userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var Octokit = class { + static { + this.VERSION = VERSION; + } + static defaults(defaults) { + const OctokitWithDefaults = class extends this { + constructor(...args) { + const options = args[0] || {}; + if (typeof defaults === "function") { + super(defaults(options)); + return; + } + super( + Object.assign( + {}, + defaults, + options, + options.userAgent && defaults.userAgent ? { + userAgent: `${options.userAgent} ${defaults.userAgent}` + } : null + ) + ); + } + }; + return OctokitWithDefaults; + } + static { + this.plugins = []; + } + /** + * Attach a plugin (or many) to your Octokit instance. + * + * @example + * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) + */ + static plugin(...newPlugins) { + const currentPlugins = this.plugins; + const NewOctokit = class extends this { + static { + this.plugins = currentPlugins.concat( + newPlugins.filter((plugin) => !currentPlugins.includes(plugin)) + ); + } + }; + return NewOctokit; + } + constructor(options = {}) { + const hook = new import_before_after_hook.Collection(); + const requestDefaults = { + baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl, + headers: {}, + request: Object.assign({}, options.request, { + // @ts-ignore internal usage only, no need to type + hook: hook.bind(null, "request") + }), + mediaType: { + previews: [], + format: "" + } + }; + requestDefaults.headers["user-agent"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail; + if (options.baseUrl) { + requestDefaults.baseUrl = options.baseUrl; } + if (options.previews) { + requestDefaults.mediaType.previews = options.previews; + } + if (options.timeZone) { + requestDefaults.headers["time-zone"] = options.timeZone; + } + this.request = import_request.request.defaults(requestDefaults); + this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); + this.log = Object.assign( + { + debug: noop, + info: noop, + warn: consoleWarn, + error: consoleError + }, + options.log + ); + this.hook = hook; + if (!options.authStrategy) { + if (!options.auth) { + this.auth = async () => ({ + type: "unauthenticated" + }); + } else { + const auth = (0, import_auth_token.createTokenAuth)(options.auth); + hook.wrap("request", auth.hook); + this.auth = auth; + } + } else { + const { authStrategy, ...otherOptions } = options; + const auth = authStrategy( + Object.assign( + { + request: this.request, + log: this.log, + // we pass the current octokit instance as well as its constructor options + // to allow for authentication strategies that return a new octokit instance + // that shares the same internal state as the current one. The original + // requirement for this was the "event-octokit" authentication strategy + // of https://github.com/probot/octokit-auth-probot. + octokit: this, + octokitOptions: otherOptions + }, + options.auth + ) + ); + hook.wrap("request", auth.hook); + this.auth = auth; + } + const classConstructor = this.constructor; + for (let i = 0; i < classConstructor.plugins.length; ++i) { + Object.assign(this, classConstructor.plugins[i](this, options)); + } + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 13223: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + - keys.push.apply(keys, symbols); +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - return keys; +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + endpoint: () => endpoint +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/defaults.js +var import_universal_user_agent = __nccwpck_require__(60031); + +// pkg/dist-src/version.js +var VERSION = "9.0.4"; + +// pkg/dist-src/defaults.js +var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; + +// pkg/dist-src/util/lowercase-keys.js +function lowercaseKeys(object) { + if (!object) { + return {}; + } + return Object.keys(object).reduce((newObj, key) => { + newObj[key.toLowerCase()] = object[key]; + return newObj; + }, {}); } -function _objectSpread2(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i] != null ? arguments[i] : {}; +// pkg/dist-src/util/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} - if (i % 2) { - ownKeys(Object(source), true).forEach(function (key) { - _defineProperty(target, key, source[key]); - }); - } else if (Object.getOwnPropertyDescriptors) { - Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); +// pkg/dist-src/util/merge-deep.js +function mergeDeep(defaults, options) { + const result = Object.assign({}, defaults); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); } else { - ownKeys(Object(source)).forEach(function (key) { - Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); - }); + Object.assign(result, { [key]: options[key] }); + } + }); + return result; +} + +// pkg/dist-src/util/remove-undefined-properties.js +function removeUndefinedProperties(obj) { + for (const key in obj) { + if (obj[key] === void 0) { + delete obj[key]; } } + return obj; +} - return target; +// pkg/dist-src/merge.js +function merge(defaults, route, options) { + if (typeof route === "string") { + let [method, url] = route.split(" "); + options = Object.assign(url ? { method, url } : { url: method }, options); + } else { + options = Object.assign({}, route); + } + options.headers = lowercaseKeys(options.headers); + removeUndefinedProperties(options); + removeUndefinedProperties(options.headers); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); + } + return mergedOptions; } -function _defineProperty(obj, key, value) { - if (key in obj) { - Object.defineProperty(obj, key, { - value: value, - enumerable: true, - configurable: true, - writable: true - }); +// pkg/dist-src/util/add-query-parameters.js +function addQueryParameters(url, parameters) { + const separator = /\?/.test(url) ? "&" : "?"; + const names = Object.keys(parameters); + if (names.length === 0) { + return url; + } + return url + separator + names.map((name) => { + if (name === "q") { + return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); + } + return `${name}=${encodeURIComponent(parameters[name])}`; + }).join("&"); +} + +// pkg/dist-src/util/extract-url-variable-names.js +var urlVariableRegex = /\{[^}]+\}/g; +function removeNonChars(variableName) { + return variableName.replace(/^\W+|\W+$/g, "").split(/,/); +} +function extractUrlVariableNames(url) { + const matches = url.match(urlVariableRegex); + if (!matches) { + return []; + } + return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); +} + +// pkg/dist-src/util/omit.js +function omit(object, keysToOmit) { + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; + } + } + return result; +} + +// pkg/dist-src/util/url-template.js +function encodeReserved(str) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { + if (!/%[0-9A-Fa-f]/.test(part)) { + part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); + } + return part; + }).join(""); +} +function encodeUnreserved(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); +} +function encodeValue(operator, value, key) { + value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); + if (key) { + return encodeUnreserved(key) + "=" + value; } else { - obj[key] = value; + return value; + } +} +function isDefined(value) { + return value !== void 0 && value !== null; +} +function isKeyOperator(operator) { + return operator === ";" || operator === "&" || operator === "?"; +} +function getValues(context, operator, key, modifier) { + var value = context[key], result = []; + if (isDefined(value) && value !== "") { + if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { + value = value.toString(); + if (modifier && modifier !== "*") { + value = value.substring(0, parseInt(modifier, 10)); + } + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); + } else { + if (modifier === "*") { + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + result.push(encodeValue(operator, value[k], k)); + } + }); + } + } else { + const tmp = []; + if (Array.isArray(value)) { + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); + }); + } else { + Object.keys(value).forEach(function(k) { + if (isDefined(value[k])) { + tmp.push(encodeUnreserved(k)); + tmp.push(encodeValue(operator, value[k].toString())); + } + }); + } + if (isKeyOperator(operator)) { + result.push(encodeUnreserved(key) + "=" + tmp.join(",")); + } else if (tmp.length !== 0) { + result.push(tmp.join(",")); + } + } + } + } else { + if (operator === ";") { + if (isDefined(value)) { + result.push(encodeUnreserved(key)); + } + } else if (value === "" && (operator === "&" || operator === "?")) { + result.push(encodeUnreserved(key) + "="); + } else if (value === "") { + result.push(""); + } + } + return result; +} +function parseUrl(template) { + return { + expand: expand.bind(null, template) + }; +} +function expand(template, context) { + var operators = ["+", "#", ".", "/", ";", "?", "&"]; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); + } + } else { + return encodeReserved(literal); + } + } + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); } +} - return obj; +// pkg/dist-src/parse.js +function parse(options) { + let method = options.method.toUpperCase(); + let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let headers = Object.assign({}, options.headers); + let body; + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); + const urlVariableNames = extractUrlVariableNames(url); + url = parseUrl(url).expand(parameters); + if (!/^http/.test(url)) { + url = options.baseUrl + url; + } + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); + const remainingParameters = omit(parameters, omittedParameters); + const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); + if (!isBinaryRequest) { + if (options.mediaType.format) { + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); + } + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } + } + } + if (["GET", "HEAD"].includes(method)) { + url = addQueryParameters(url, remainingParameters); + } else { + if ("data" in remainingParameters) { + body = remainingParameters.data; + } else { + if (Object.keys(remainingParameters).length) { + body = remainingParameters; + } + } + } + if (!headers["content-type"] && typeof body !== "undefined") { + headers["content-type"] = "application/json; charset=utf-8"; + } + if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { + body = ""; + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); } -const Endpoints = { +// pkg/dist-src/endpoint-with-defaults.js +function endpointWithDefaults(defaults, route, options) { + return parse(merge(defaults, route, options)); +} + +// pkg/dist-src/with-defaults.js +function withDefaults(oldDefaults, newDefaults) { + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), + parse + }); +} + +// pkg/dist-src/index.js +var endpoint = withDefaults(null, DEFAULTS); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 47383: +/***/ ((module) => { + + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + composePaginateRest: () => composePaginateRest, + isPaginatingEndpoint: () => isPaginatingEndpoint, + paginateRest: () => paginateRest, + paginatingEndpoints: () => paginatingEndpoints +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/version.js +var VERSION = "9.1.5"; + +// pkg/dist-src/normalize-paginated-list-response.js +function normalizePaginatedListResponse(response) { + if (!response.data) { + return { + ...response, + data: [] + }; + } + const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data); + if (!responseNeedsNormalization) + return response; + const incompleteResults = response.data.incomplete_results; + const repositorySelection = response.data.repository_selection; + const totalCount = response.data.total_count; + delete response.data.incomplete_results; + delete response.data.repository_selection; + delete response.data.total_count; + const namespaceKey = Object.keys(response.data)[0]; + const data = response.data[namespaceKey]; + response.data = data; + if (typeof incompleteResults !== "undefined") { + response.data.incomplete_results = incompleteResults; + } + if (typeof repositorySelection !== "undefined") { + response.data.repository_selection = repositorySelection; + } + response.data.total_count = totalCount; + return response; +} + +// pkg/dist-src/iterator.js +function iterator(octokit, route, parameters) { + const options = typeof route === "function" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters); + const requestMethod = typeof route === "function" ? route : octokit.request; + const method = options.method; + const headers = options.headers; + let url = options.url; + return { + [Symbol.asyncIterator]: () => ({ + async next() { + if (!url) + return { done: true }; + try { + const response = await requestMethod({ method, url, headers }); + const normalizedResponse = normalizePaginatedListResponse(response); + url = ((normalizedResponse.headers.link || "").match( + /<([^>]+)>;\s*rel="next"/ + ) || [])[1]; + return { value: normalizedResponse }; + } catch (error) { + if (error.status !== 409) + throw error; + url = ""; + return { + value: { + status: 200, + headers: {}, + data: [] + } + }; + } + } + }) + }; +} + +// pkg/dist-src/paginate.js +function paginate(octokit, route, parameters, mapFn) { + if (typeof parameters === "function") { + mapFn = parameters; + parameters = void 0; + } + return gather( + octokit, + [], + iterator(octokit, route, parameters)[Symbol.asyncIterator](), + mapFn + ); +} +function gather(octokit, results, iterator2, mapFn) { + return iterator2.next().then((result) => { + if (result.done) { + return results; + } + let earlyExit = false; + function done() { + earlyExit = true; + } + results = results.concat( + mapFn ? mapFn(result.value, done) : result.value.data + ); + if (earlyExit) { + return results; + } + return gather(octokit, results, iterator2, mapFn); + }); +} + +// pkg/dist-src/compose-paginate.js +var composePaginateRest = Object.assign(paginate, { + iterator +}); + +// pkg/dist-src/generated/paginating-endpoints.js +var paginatingEndpoints = [ + "GET /advisories", + "GET /app/hook/deliveries", + "GET /app/installation-requests", + "GET /app/installations", + "GET /assignments/{assignment_id}/accepted_assignments", + "GET /classrooms", + "GET /classrooms/{classroom_id}/assignments", + "GET /enterprises/{enterprise}/dependabot/alerts", + "GET /enterprises/{enterprise}/secret-scanning/alerts", + "GET /events", + "GET /gists", + "GET /gists/public", + "GET /gists/starred", + "GET /gists/{gist_id}/comments", + "GET /gists/{gist_id}/commits", + "GET /gists/{gist_id}/forks", + "GET /installation/repositories", + "GET /issues", + "GET /licenses", + "GET /marketplace_listing/plans", + "GET /marketplace_listing/plans/{plan_id}/accounts", + "GET /marketplace_listing/stubbed/plans", + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts", + "GET /networks/{owner}/{repo}/events", + "GET /notifications", + "GET /organizations", + "GET /orgs/{org}/actions/cache/usage-by-repository", + "GET /orgs/{org}/actions/permissions/repositories", + "GET /orgs/{org}/actions/runners", + "GET /orgs/{org}/actions/secrets", + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories", + "GET /orgs/{org}/actions/variables", + "GET /orgs/{org}/actions/variables/{name}/repositories", + "GET /orgs/{org}/blocks", + "GET /orgs/{org}/code-scanning/alerts", + "GET /orgs/{org}/codespaces", + "GET /orgs/{org}/codespaces/secrets", + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories", + "GET /orgs/{org}/copilot/billing/seats", + "GET /orgs/{org}/dependabot/alerts", + "GET /orgs/{org}/dependabot/secrets", + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories", + "GET /orgs/{org}/events", + "GET /orgs/{org}/failed_invitations", + "GET /orgs/{org}/hooks", + "GET /orgs/{org}/hooks/{hook_id}/deliveries", + "GET /orgs/{org}/installations", + "GET /orgs/{org}/invitations", + "GET /orgs/{org}/invitations/{invitation_id}/teams", + "GET /orgs/{org}/issues", + "GET /orgs/{org}/members", + "GET /orgs/{org}/members/{username}/codespaces", + "GET /orgs/{org}/migrations", + "GET /orgs/{org}/migrations/{migration_id}/repositories", + "GET /orgs/{org}/outside_collaborators", + "GET /orgs/{org}/packages", + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + "GET /orgs/{org}/personal-access-token-requests", + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories", + "GET /orgs/{org}/personal-access-tokens", + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories", + "GET /orgs/{org}/projects", + "GET /orgs/{org}/properties/values", + "GET /orgs/{org}/public_members", + "GET /orgs/{org}/repos", + "GET /orgs/{org}/rulesets", + "GET /orgs/{org}/rulesets/rule-suites", + "GET /orgs/{org}/secret-scanning/alerts", + "GET /orgs/{org}/security-advisories", + "GET /orgs/{org}/teams", + "GET /orgs/{org}/teams/{team_slug}/discussions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions", + "GET /orgs/{org}/teams/{team_slug}/invitations", + "GET /orgs/{org}/teams/{team_slug}/members", + "GET /orgs/{org}/teams/{team_slug}/projects", + "GET /orgs/{org}/teams/{team_slug}/repos", + "GET /orgs/{org}/teams/{team_slug}/teams", + "GET /projects/columns/{column_id}/cards", + "GET /projects/{project_id}/collaborators", + "GET /projects/{project_id}/columns", + "GET /repos/{owner}/{repo}/actions/artifacts", + "GET /repos/{owner}/{repo}/actions/caches", + "GET /repos/{owner}/{repo}/actions/organization-secrets", + "GET /repos/{owner}/{repo}/actions/organization-variables", + "GET /repos/{owner}/{repo}/actions/runners", + "GET /repos/{owner}/{repo}/actions/runs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs", + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs", + "GET /repos/{owner}/{repo}/actions/secrets", + "GET /repos/{owner}/{repo}/actions/variables", + "GET /repos/{owner}/{repo}/actions/workflows", + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs", + "GET /repos/{owner}/{repo}/activity", + "GET /repos/{owner}/{repo}/assignees", + "GET /repos/{owner}/{repo}/branches", + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations", + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs", + "GET /repos/{owner}/{repo}/code-scanning/alerts", + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + "GET /repos/{owner}/{repo}/code-scanning/analyses", + "GET /repos/{owner}/{repo}/codespaces", + "GET /repos/{owner}/{repo}/codespaces/devcontainers", + "GET /repos/{owner}/{repo}/codespaces/secrets", + "GET /repos/{owner}/{repo}/collaborators", + "GET /repos/{owner}/{repo}/comments", + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/commits", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments", + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls", + "GET /repos/{owner}/{repo}/commits/{ref}/check-runs", + "GET /repos/{owner}/{repo}/commits/{ref}/check-suites", + "GET /repos/{owner}/{repo}/commits/{ref}/status", + "GET /repos/{owner}/{repo}/commits/{ref}/statuses", + "GET /repos/{owner}/{repo}/contributors", + "GET /repos/{owner}/{repo}/dependabot/alerts", + "GET /repos/{owner}/{repo}/dependabot/secrets", + "GET /repos/{owner}/{repo}/deployments", + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses", + "GET /repos/{owner}/{repo}/environments", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies", + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps", + "GET /repos/{owner}/{repo}/events", + "GET /repos/{owner}/{repo}/forks", + "GET /repos/{owner}/{repo}/hooks", + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries", + "GET /repos/{owner}/{repo}/invitations", + "GET /repos/{owner}/{repo}/issues", + "GET /repos/{owner}/{repo}/issues/comments", + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/issues/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/comments", + "GET /repos/{owner}/{repo}/issues/{issue_number}/events", + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels", + "GET /repos/{owner}/{repo}/issues/{issue_number}/reactions", + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline", + "GET /repos/{owner}/{repo}/keys", + "GET /repos/{owner}/{repo}/labels", + "GET /repos/{owner}/{repo}/milestones", + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels", + "GET /repos/{owner}/{repo}/notifications", + "GET /repos/{owner}/{repo}/pages/builds", + "GET /repos/{owner}/{repo}/projects", + "GET /repos/{owner}/{repo}/pulls", + "GET /repos/{owner}/{repo}/pulls/comments", + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/commits", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/files", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews", + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments", + "GET /repos/{owner}/{repo}/releases", + "GET /repos/{owner}/{repo}/releases/{release_id}/assets", + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions", + "GET /repos/{owner}/{repo}/rules/branches/{branch}", + "GET /repos/{owner}/{repo}/rulesets", + "GET /repos/{owner}/{repo}/rulesets/rule-suites", + "GET /repos/{owner}/{repo}/secret-scanning/alerts", + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations", + "GET /repos/{owner}/{repo}/security-advisories", + "GET /repos/{owner}/{repo}/stargazers", + "GET /repos/{owner}/{repo}/subscribers", + "GET /repos/{owner}/{repo}/tags", + "GET /repos/{owner}/{repo}/teams", + "GET /repos/{owner}/{repo}/topics", + "GET /repositories", + "GET /repositories/{repository_id}/environments/{environment_name}/secrets", + "GET /repositories/{repository_id}/environments/{environment_name}/variables", + "GET /search/code", + "GET /search/commits", + "GET /search/issues", + "GET /search/labels", + "GET /search/repositories", + "GET /search/topics", + "GET /search/users", + "GET /teams/{team_id}/discussions", + "GET /teams/{team_id}/discussions/{discussion_number}/comments", + "GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions", + "GET /teams/{team_id}/discussions/{discussion_number}/reactions", + "GET /teams/{team_id}/invitations", + "GET /teams/{team_id}/members", + "GET /teams/{team_id}/projects", + "GET /teams/{team_id}/repos", + "GET /teams/{team_id}/teams", + "GET /user/blocks", + "GET /user/codespaces", + "GET /user/codespaces/secrets", + "GET /user/emails", + "GET /user/followers", + "GET /user/following", + "GET /user/gpg_keys", + "GET /user/installations", + "GET /user/installations/{installation_id}/repositories", + "GET /user/issues", + "GET /user/keys", + "GET /user/marketplace_purchases", + "GET /user/marketplace_purchases/stubbed", + "GET /user/memberships/orgs", + "GET /user/migrations", + "GET /user/migrations/{migration_id}/repositories", + "GET /user/orgs", + "GET /user/packages", + "GET /user/packages/{package_type}/{package_name}/versions", + "GET /user/public_emails", + "GET /user/repos", + "GET /user/repository_invitations", + "GET /user/social_accounts", + "GET /user/ssh_signing_keys", + "GET /user/starred", + "GET /user/subscriptions", + "GET /user/teams", + "GET /users", + "GET /users/{username}/events", + "GET /users/{username}/events/orgs/{org}", + "GET /users/{username}/events/public", + "GET /users/{username}/followers", + "GET /users/{username}/following", + "GET /users/{username}/gists", + "GET /users/{username}/gpg_keys", + "GET /users/{username}/keys", + "GET /users/{username}/orgs", + "GET /users/{username}/packages", + "GET /users/{username}/projects", + "GET /users/{username}/received_events", + "GET /users/{username}/received_events/public", + "GET /users/{username}/repos", + "GET /users/{username}/social_accounts", + "GET /users/{username}/ssh_signing_keys", + "GET /users/{username}/starred", + "GET /users/{username}/subscriptions" +]; + +// pkg/dist-src/paginating-endpoints.js +function isPaginatingEndpoint(arg) { + if (typeof arg === "string") { + return paginatingEndpoints.includes(arg); + } else { + return false; + } +} + +// pkg/dist-src/index.js +function paginateRest(octokit) { + return { + paginate: Object.assign(paginate.bind(null, octokit), { + iterator: iterator.bind(null, octokit) + }) + }; +} +paginateRest.VERSION = VERSION; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 56855: +/***/ ((module) => { + + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + legacyRestEndpointMethods: () => legacyRestEndpointMethods, + restEndpointMethods: () => restEndpointMethods +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/version.js +var VERSION = "10.2.0"; + +// pkg/dist-src/generated/endpoints.js +var Endpoints = { actions: { +<<<<<<< HEAD + addCustomLabelsToSelfHostedRunnerForOrg: [ + "POST /orgs/{org}/actions/runners/{runner_id}/labels" + ], + addCustomLabelsToSelfHostedRunnerForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + approveWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve" + ], + cancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel" + ], + createEnvironmentVariable: [ + "POST /repositories/{repository_id}/environments/{environment_name}/variables" + ], + createOrUpdateEnvironmentSecret: [ + "PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], +======= addCustomLabelsToSelfHostedRunnerForOrg: ["POST /orgs/{org}/actions/runners/{runner_id}/labels"], addCustomLabelsToSelfHostedRunnerForRepo: ["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], addSelectedRepoToOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"], approveWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"], cancelWorkflowRun: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"], createOrUpdateEnvironmentSecret: ["PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 createOrUpdateOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}"], - createOrUpdateRepoSecret: ["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - createRegistrationTokenForOrg: ["POST /orgs/{org}/actions/runners/registration-token"], - createRegistrationTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/registration-token"], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + createOrgVariable: ["POST /orgs/{org}/actions/variables"], + createRegistrationTokenForOrg: [ + "POST /orgs/{org}/actions/runners/registration-token" + ], + createRegistrationTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/registration-token" + ], createRemoveTokenForOrg: ["POST /orgs/{org}/actions/runners/remove-token"], +<<<<<<< HEAD + createRemoveTokenForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/remove-token" + ], + createRepoVariable: ["POST /repos/{owner}/{repo}/actions/variables"], + createWorkflowDispatch: [ + "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches" + ], + deleteActionsCacheById: [ + "DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}" + ], + deleteActionsCacheByKey: [ + "DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}" + ], + deleteArtifact: [ + "DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}" + ], + deleteEnvironmentSecret: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + deleteEnvironmentVariable: [ + "DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], +======= createRemoveTokenForRepo: ["POST /repos/{owner}/{repo}/actions/runners/remove-token"], createWorkflowDispatch: ["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"], deleteActionsCacheById: ["DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}"], deleteActionsCacheByKey: ["DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}"], deleteArtifact: ["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], deleteEnvironmentSecret: ["DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 deleteOrgSecret: ["DELETE /orgs/{org}/actions/secrets/{secret_name}"], - deleteRepoSecret: ["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - deleteSelfHostedRunnerFromOrg: ["DELETE /orgs/{org}/actions/runners/{runner_id}"], - deleteSelfHostedRunnerFromRepo: ["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"], + deleteOrgVariable: ["DELETE /orgs/{org}/actions/variables/{name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}" + ], + deleteRepoVariable: [ + "DELETE /repos/{owner}/{repo}/actions/variables/{name}" + ], + deleteSelfHostedRunnerFromOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}" + ], + deleteSelfHostedRunnerFromRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], deleteWorkflowRun: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"], +<<<<<<< HEAD + deleteWorkflowRunLogs: [ + "DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + disableSelectedRepositoryGithubActionsOrganization: [ + "DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + disableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable" + ], + downloadArtifact: [ + "GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}" + ], + downloadJobLogsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs" + ], + downloadWorkflowRunAttemptLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs" + ], + downloadWorkflowRunLogs: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs" + ], + enableSelectedRepositoryGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories/{repository_id}" + ], + enableWorkflow: [ + "PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable" + ], + forceCancelWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel" + ], + generateRunnerJitconfigForOrg: [ + "POST /orgs/{org}/actions/runners/generate-jitconfig" + ], + generateRunnerJitconfigForRepo: [ + "POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig" + ], + getActionsCacheList: ["GET /repos/{owner}/{repo}/actions/caches"], + getActionsCacheUsage: ["GET /repos/{owner}/{repo}/actions/cache/usage"], + getActionsCacheUsageByRepoForOrg: [ + "GET /orgs/{org}/actions/cache/usage-by-repository" + ], + getActionsCacheUsageForOrg: ["GET /orgs/{org}/actions/cache/usage"], + getAllowedActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/selected-actions" + ], + getAllowedActionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"], + getEnvironmentPublicKey: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key" + ], + getEnvironmentSecret: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}" + ], + getEnvironmentVariable: [ + "GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + getGithubActionsDefaultWorkflowPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions/workflow" + ], + getGithubActionsDefaultWorkflowPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/workflow" + ], + getGithubActionsPermissionsOrganization: [ + "GET /orgs/{org}/actions/permissions" + ], + getGithubActionsPermissionsRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions" + ], +======= deleteWorkflowRunLogs: ["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"], disableSelectedRepositoryGithubActionsOrganization: ["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"], disableWorkflow: ["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"], @@ -1319,19 +2615,64 @@ const Endpoints = { getGithubActionsDefaultWorkflowPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions/workflow"], getGithubActionsPermissionsOrganization: ["GET /orgs/{org}/actions/permissions"], getGithubActionsPermissionsRepository: ["GET /repos/{owner}/{repo}/actions/permissions"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 getJobForWorkflowRun: ["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"], getOrgPublicKey: ["GET /orgs/{org}/actions/secrets/public-key"], getOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}"], - getPendingDeploymentsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments"], - getRepoPermissions: ["GET /repos/{owner}/{repo}/actions/permissions", {}, { - renamed: ["actions", "getGithubActionsPermissionsRepository"] - }], + getOrgVariable: ["GET /orgs/{org}/actions/variables/{name}"], + getPendingDeploymentsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + getRepoPermissions: [ + "GET /repos/{owner}/{repo}/actions/permissions", + {}, + { renamed: ["actions", "getGithubActionsPermissionsRepository"] } + ], getRepoPublicKey: ["GET /repos/{owner}/{repo}/actions/secrets/public-key"], getRepoSecret: ["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"], - getReviewsForRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals"], + getRepoVariable: ["GET /repos/{owner}/{repo}/actions/variables/{name}"], + getReviewsForRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals" + ], getSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}"], - getSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"], + getSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}" + ], getWorkflow: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"], +<<<<<<< HEAD + getWorkflowAccessToRepository: [ + "GET /repos/{owner}/{repo}/actions/permissions/access" + ], + getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], + getWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}" + ], + getWorkflowRunUsage: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing" + ], + getWorkflowUsage: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing" + ], + listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"], + listEnvironmentSecrets: [ + "GET /repositories/{repository_id}/environments/{environment_name}/secrets" + ], + listEnvironmentVariables: [ + "GET /repositories/{repository_id}/environments/{environment_name}/variables" + ], + listJobsForWorkflowRun: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs" + ], + listJobsForWorkflowRunAttempt: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs" + ], + listLabelsForSelfHostedRunnerForOrg: [ + "GET /orgs/{org}/actions/runners/{runner_id}/labels" + ], + listLabelsForSelfHostedRunnerForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], +======= getWorkflowAccessToRepository: ["GET /repos/{owner}/{repo}/actions/permissions/access"], getWorkflowRun: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}"], getWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}"], @@ -1343,18 +2684,116 @@ const Endpoints = { listJobsForWorkflowRunAttempt: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs"], listLabelsForSelfHostedRunnerForOrg: ["GET /orgs/{org}/actions/runners/{runner_id}/labels"], listLabelsForSelfHostedRunnerForRepo: ["GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listOrgSecrets: ["GET /orgs/{org}/actions/secrets"], + listOrgVariables: ["GET /orgs/{org}/actions/variables"], + listRepoOrganizationSecrets: [ + "GET /repos/{owner}/{repo}/actions/organization-secrets" + ], + listRepoOrganizationVariables: [ + "GET /repos/{owner}/{repo}/actions/organization-variables" + ], listRepoSecrets: ["GET /repos/{owner}/{repo}/actions/secrets"], + listRepoVariables: ["GET /repos/{owner}/{repo}/actions/variables"], listRepoWorkflows: ["GET /repos/{owner}/{repo}/actions/workflows"], listRunnerApplicationsForOrg: ["GET /orgs/{org}/actions/runners/downloads"], - listRunnerApplicationsForRepo: ["GET /repos/{owner}/{repo}/actions/runners/downloads"], - listSelectedReposForOrgSecret: ["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"], - listSelectedRepositoriesEnabledGithubActionsOrganization: ["GET /orgs/{org}/actions/permissions/repositories"], + listRunnerApplicationsForRepo: [ + "GET /repos/{owner}/{repo}/actions/runners/downloads" + ], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + listSelectedReposForOrgVariable: [ + "GET /orgs/{org}/actions/variables/{name}/repositories" + ], + listSelectedRepositoriesEnabledGithubActionsOrganization: [ + "GET /orgs/{org}/actions/permissions/repositories" + ], listSelfHostedRunnersForOrg: ["GET /orgs/{org}/actions/runners"], listSelfHostedRunnersForRepo: ["GET /repos/{owner}/{repo}/actions/runners"], - listWorkflowRunArtifacts: ["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"], - listWorkflowRuns: ["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"], + listWorkflowRunArtifacts: [ + "GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts" + ], + listWorkflowRuns: [ + "GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs" + ], listWorkflowRunsForRepo: ["GET /repos/{owner}/{repo}/actions/runs"], +<<<<<<< HEAD + reRunJobForWorkflowRun: [ + "POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun" + ], + reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], + reRunWorkflowFailedJobs: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs" + ], + removeAllCustomLabelsFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels" + ], + removeAllCustomLabelsFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + removeCustomLabelFromSelfHostedRunnerForOrg: [ + "DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}" + ], + removeCustomLabelFromSelfHostedRunnerForRepo: [ + "DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgVariable: [ + "DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}" + ], + reviewCustomGatesForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule" + ], + reviewPendingDeploymentsForRun: [ + "POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments" + ], + setAllowedActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/selected-actions" + ], + setAllowedActionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/selected-actions" + ], + setCustomLabelsForSelfHostedRunnerForOrg: [ + "PUT /orgs/{org}/actions/runners/{runner_id}/labels" + ], + setCustomLabelsForSelfHostedRunnerForRepo: [ + "PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels" + ], + setGithubActionsDefaultWorkflowPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/workflow" + ], + setGithubActionsDefaultWorkflowPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/workflow" + ], + setGithubActionsPermissionsOrganization: [ + "PUT /orgs/{org}/actions/permissions" + ], + setGithubActionsPermissionsRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/actions/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgVariable: [ + "PUT /orgs/{org}/actions/variables/{name}/repositories" + ], + setSelectedRepositoriesEnabledGithubActionsOrganization: [ + "PUT /orgs/{org}/actions/permissions/repositories" + ], + setWorkflowAccessToRepository: [ + "PUT /repos/{owner}/{repo}/actions/permissions/access" + ], + updateEnvironmentVariable: [ + "PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}" + ], + updateOrgVariable: ["PATCH /orgs/{org}/actions/variables/{name}"], + updateRepoVariable: [ + "PATCH /repos/{owner}/{repo}/actions/variables/{name}" + ] +======= reRunJobForWorkflowRun: ["POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun"], reRunWorkflow: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"], reRunWorkflowFailedJobs: ["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs"], @@ -1376,26 +2815,37 @@ const Endpoints = { setSelectedReposForOrgSecret: ["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"], setSelectedRepositoriesEnabledGithubActionsOrganization: ["PUT /orgs/{org}/actions/permissions/repositories"], setWorkflowAccessToRepository: ["PUT /repos/{owner}/{repo}/actions/permissions/access"] +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }, activity: { checkRepoIsStarredByAuthenticatedUser: ["GET /user/starred/{owner}/{repo}"], deleteRepoSubscription: ["DELETE /repos/{owner}/{repo}/subscription"], - deleteThreadSubscription: ["DELETE /notifications/threads/{thread_id}/subscription"], + deleteThreadSubscription: [ + "DELETE /notifications/threads/{thread_id}/subscription" + ], getFeeds: ["GET /feeds"], getRepoSubscription: ["GET /repos/{owner}/{repo}/subscription"], getThread: ["GET /notifications/threads/{thread_id}"], - getThreadSubscriptionForAuthenticatedUser: ["GET /notifications/threads/{thread_id}/subscription"], + getThreadSubscriptionForAuthenticatedUser: [ + "GET /notifications/threads/{thread_id}/subscription" + ], listEventsForAuthenticatedUser: ["GET /users/{username}/events"], listNotificationsForAuthenticatedUser: ["GET /notifications"], - listOrgEventsForAuthenticatedUser: ["GET /users/{username}/events/orgs/{org}"], + listOrgEventsForAuthenticatedUser: [ + "GET /users/{username}/events/orgs/{org}" + ], listPublicEvents: ["GET /events"], listPublicEventsForRepoNetwork: ["GET /networks/{owner}/{repo}/events"], listPublicEventsForUser: ["GET /users/{username}/events/public"], listPublicOrgEvents: ["GET /orgs/{org}/events"], listReceivedEventsForUser: ["GET /users/{username}/received_events"], - listReceivedPublicEventsForUser: ["GET /users/{username}/received_events/public"], + listReceivedPublicEventsForUser: [ + "GET /users/{username}/received_events/public" + ], listRepoEvents: ["GET /repos/{owner}/{repo}/events"], - listRepoNotificationsForAuthenticatedUser: ["GET /repos/{owner}/{repo}/notifications"], + listRepoNotificationsForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/notifications" + ], listReposStarredByAuthenticatedUser: ["GET /user/starred"], listReposStarredByUser: ["GET /users/{username}/starred"], listReposWatchedByUser: ["GET /users/{username}/subscriptions"], @@ -1406,18 +2856,33 @@ const Endpoints = { markRepoNotificationsAsRead: ["PUT /repos/{owner}/{repo}/notifications"], markThreadAsRead: ["PATCH /notifications/threads/{thread_id}"], setRepoSubscription: ["PUT /repos/{owner}/{repo}/subscription"], - setThreadSubscription: ["PUT /notifications/threads/{thread_id}/subscription"], + setThreadSubscription: [ + "PUT /notifications/threads/{thread_id}/subscription" + ], starRepoForAuthenticatedUser: ["PUT /user/starred/{owner}/{repo}"], unstarRepoForAuthenticatedUser: ["DELETE /user/starred/{owner}/{repo}"] }, apps: { +<<<<<<< HEAD + addRepoToInstallation: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] } + ], + addRepoToInstallationForAuthenticatedUser: [ + "PUT /user/installations/{installation_id}/repositories/{repository_id}" + ], +======= addRepoToInstallation: ["PUT /user/installations/{installation_id}/repositories/{repository_id}", {}, { renamed: ["apps", "addRepoToInstallationForAuthenticatedUser"] }], addRepoToInstallationForAuthenticatedUser: ["PUT /user/installations/{installation_id}/repositories/{repository_id}"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 checkToken: ["POST /applications/{client_id}/token"], createFromManifest: ["POST /app-manifests/{code}/conversions"], - createInstallationAccessToken: ["POST /app/installations/{installation_id}/access_tokens"], + createInstallationAccessToken: [ + "POST /app/installations/{installation_id}/access_tokens" + ], deleteAuthorization: ["DELETE /applications/{client_id}/grant"], deleteInstallation: ["DELETE /app/installations/{installation_id}"], deleteToken: ["DELETE /applications/{client_id}/token"], @@ -1426,20 +2891,48 @@ const Endpoints = { getInstallation: ["GET /app/installations/{installation_id}"], getOrgInstallation: ["GET /orgs/{org}/installation"], getRepoInstallation: ["GET /repos/{owner}/{repo}/installation"], - getSubscriptionPlanForAccount: ["GET /marketplace_listing/accounts/{account_id}"], - getSubscriptionPlanForAccountStubbed: ["GET /marketplace_listing/stubbed/accounts/{account_id}"], + getSubscriptionPlanForAccount: [ + "GET /marketplace_listing/accounts/{account_id}" + ], + getSubscriptionPlanForAccountStubbed: [ + "GET /marketplace_listing/stubbed/accounts/{account_id}" + ], getUserInstallation: ["GET /users/{username}/installation"], getWebhookConfigForApp: ["GET /app/hook/config"], getWebhookDelivery: ["GET /app/hook/deliveries/{delivery_id}"], listAccountsForPlan: ["GET /marketplace_listing/plans/{plan_id}/accounts"], - listAccountsForPlanStubbed: ["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"], - listInstallationReposForAuthenticatedUser: ["GET /user/installations/{installation_id}/repositories"], + listAccountsForPlanStubbed: [ + "GET /marketplace_listing/stubbed/plans/{plan_id}/accounts" + ], + listInstallationReposForAuthenticatedUser: [ + "GET /user/installations/{installation_id}/repositories" + ], + listInstallationRequestsForAuthenticatedApp: [ + "GET /app/installation-requests" + ], listInstallations: ["GET /app/installations"], listInstallationsForAuthenticatedUser: ["GET /user/installations"], listPlans: ["GET /marketplace_listing/plans"], listPlansStubbed: ["GET /marketplace_listing/stubbed/plans"], listReposAccessibleToInstallation: ["GET /installation/repositories"], listSubscriptionsForAuthenticatedUser: ["GET /user/marketplace_purchases"], +<<<<<<< HEAD + listSubscriptionsForAuthenticatedUserStubbed: [ + "GET /user/marketplace_purchases/stubbed" + ], + listWebhookDeliveries: ["GET /app/hook/deliveries"], + redeliverWebhookDelivery: [ + "POST /app/hook/deliveries/{delivery_id}/attempts" + ], + removeRepoFromInstallation: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}", + {}, + { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] } + ], + removeRepoFromInstallationForAuthenticatedUser: [ + "DELETE /user/installations/{installation_id}/repositories/{repository_id}" + ], +======= listSubscriptionsForAuthenticatedUserStubbed: ["GET /user/marketplace_purchases/stubbed"], listWebhookDeliveries: ["GET /app/hook/deliveries"], redeliverWebhookDelivery: ["POST /app/hook/deliveries/{delivery_id}/attempts"], @@ -1447,59 +2940,116 @@ const Endpoints = { renamed: ["apps", "removeRepoFromInstallationForAuthenticatedUser"] }], removeRepoFromInstallationForAuthenticatedUser: ["DELETE /user/installations/{installation_id}/repositories/{repository_id}"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 resetToken: ["PATCH /applications/{client_id}/token"], revokeInstallationAccessToken: ["DELETE /installation/token"], scopeToken: ["POST /applications/{client_id}/token/scoped"], suspendInstallation: ["PUT /app/installations/{installation_id}/suspended"], - unsuspendInstallation: ["DELETE /app/installations/{installation_id}/suspended"], + unsuspendInstallation: [ + "DELETE /app/installations/{installation_id}/suspended" + ], updateWebhookConfigForApp: ["PATCH /app/hook/config"] }, billing: { getGithubActionsBillingOrg: ["GET /orgs/{org}/settings/billing/actions"], +<<<<<<< HEAD + getGithubActionsBillingUser: [ + "GET /users/{username}/settings/billing/actions" + ], +======= getGithubActionsBillingUser: ["GET /users/{username}/settings/billing/actions"], getGithubAdvancedSecurityBillingGhe: ["GET /enterprises/{enterprise}/settings/billing/advanced-security"], getGithubAdvancedSecurityBillingOrg: ["GET /orgs/{org}/settings/billing/advanced-security"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 getGithubPackagesBillingOrg: ["GET /orgs/{org}/settings/billing/packages"], - getGithubPackagesBillingUser: ["GET /users/{username}/settings/billing/packages"], - getSharedStorageBillingOrg: ["GET /orgs/{org}/settings/billing/shared-storage"], - getSharedStorageBillingUser: ["GET /users/{username}/settings/billing/shared-storage"] + getGithubPackagesBillingUser: [ + "GET /users/{username}/settings/billing/packages" + ], + getSharedStorageBillingOrg: [ + "GET /orgs/{org}/settings/billing/shared-storage" + ], + getSharedStorageBillingUser: [ + "GET /users/{username}/settings/billing/shared-storage" + ] }, checks: { create: ["POST /repos/{owner}/{repo}/check-runs"], createSuite: ["POST /repos/{owner}/{repo}/check-suites"], get: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"], getSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"], - listAnnotations: ["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"], + listAnnotations: [ + "GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations" + ], listForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"], - listForSuite: ["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"], + listForSuite: [ + "GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs" + ], listSuitesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"], +<<<<<<< HEAD + rerequestRun: [ + "POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest" + ], + rerequestSuite: [ + "POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest" + ], + setSuitesPreferences: [ + "PATCH /repos/{owner}/{repo}/check-suites/preferences" + ], +======= rerequestRun: ["POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest"], rerequestSuite: ["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"], setSuitesPreferences: ["PATCH /repos/{owner}/{repo}/check-suites/preferences"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 update: ["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"] }, codeScanning: { - deleteAnalysis: ["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"], - getAlert: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", {}, { - renamedParameters: { - alert_id: "alert_number" - } - }], - getAnalysis: ["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"], + deleteAnalysis: [ + "DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}" + ], + getAlert: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}", + {}, + { renamedParameters: { alert_id: "alert_number" } } + ], + getAnalysis: [ + "GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}" + ], + getCodeqlDatabase: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}" + ], + getDefaultSetup: ["GET /repos/{owner}/{repo}/code-scanning/default-setup"], getSarif: ["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"], +<<<<<<< HEAD + listAlertInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances" + ], +======= listAlertInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listAlertsForOrg: ["GET /orgs/{org}/code-scanning/alerts"], listAlertsForRepo: ["GET /repos/{owner}/{repo}/code-scanning/alerts"], - listAlertsInstances: ["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", {}, { - renamed: ["codeScanning", "listAlertInstances"] - }], + listAlertsInstances: [ + "GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances", + {}, + { renamed: ["codeScanning", "listAlertInstances"] } + ], + listCodeqlDatabases: [ + "GET /repos/{owner}/{repo}/code-scanning/codeql/databases" + ], listRecentAnalyses: ["GET /repos/{owner}/{repo}/code-scanning/analyses"], - updateAlert: ["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}" + ], + updateDefaultSetup: [ + "PATCH /repos/{owner}/{repo}/code-scanning/default-setup" + ], uploadSarif: ["POST /repos/{owner}/{repo}/code-scanning/sarifs"] }, codesOfConduct: { getAllCodesOfConduct: ["GET /codes_of_conduct"], getConductCode: ["GET /codes_of_conduct/{key}"] +<<<<<<< HEAD +======= }, codespaces: { addRepositoryForSecretForAuthenticatedUser: ["PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}"], @@ -1558,10 +3108,141 @@ const Endpoints = { dependencyGraph: { createRepositorySnapshot: ["POST /repos/{owner}/{repo}/dependency-graph/snapshots"], diffRange: ["GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}"] +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }, - emojis: { - get: ["GET /emojis"] + codespaces: { + addRepositoryForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + checkPermissionsForDevcontainer: [ + "GET /repos/{owner}/{repo}/codespaces/permissions_check" + ], + codespaceMachinesForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/machines" + ], + createForAuthenticatedUser: ["POST /user/codespaces"], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + createOrUpdateSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}" + ], + createWithPrForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces" + ], + createWithRepoForAuthenticatedUser: [ + "POST /repos/{owner}/{repo}/codespaces" + ], + deleteForAuthenticatedUser: ["DELETE /user/codespaces/{codespace_name}"], + deleteFromOrganization: [ + "DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/codespaces/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + deleteSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}" + ], + exportForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/exports" + ], + getCodespacesForUserInOrg: [ + "GET /orgs/{org}/members/{username}/codespaces" + ], + getExportDetailsForAuthenticatedUser: [ + "GET /user/codespaces/{codespace_name}/exports/{export_id}" + ], + getForAuthenticatedUser: ["GET /user/codespaces/{codespace_name}"], + getOrgPublicKey: ["GET /orgs/{org}/codespaces/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/codespaces/secrets/{secret_name}"], + getPublicKeyForAuthenticatedUser: [ + "GET /user/codespaces/secrets/public-key" + ], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}" + ], + getSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}" + ], + listDevcontainersInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/devcontainers" + ], + listForAuthenticatedUser: ["GET /user/codespaces"], + listInOrganization: [ + "GET /orgs/{org}/codespaces", + {}, + { renamedParameters: { org_id: "org" } } + ], + listInRepositoryForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces" + ], + listOrgSecrets: ["GET /orgs/{org}/codespaces/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/codespaces/secrets"], + listRepositoriesForSecretForAuthenticatedUser: [ + "GET /user/codespaces/secrets/{secret_name}/repositories" + ], + listSecretsForAuthenticatedUser: ["GET /user/codespaces/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + preFlightWithRepoForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/new" + ], + publishForAuthenticatedUser: [ + "POST /user/codespaces/{codespace_name}/publish" + ], + removeRepositoryForSecretForAuthenticatedUser: [ + "DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}" + ], + repoMachinesForAuthenticatedUser: [ + "GET /repos/{owner}/{repo}/codespaces/machines" + ], + setRepositoriesForSecretForAuthenticatedUser: [ + "PUT /user/codespaces/secrets/{secret_name}/repositories" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories" + ], + startForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/start"], + stopForAuthenticatedUser: ["POST /user/codespaces/{codespace_name}/stop"], + stopInOrganization: [ + "POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop" + ], + updateForAuthenticatedUser: ["PATCH /user/codespaces/{codespace_name}"] }, +<<<<<<< HEAD + copilot: { + addCopilotForBusinessSeatsForTeams: [ + "POST /orgs/{org}/copilot/billing/selected_teams" + ], + addCopilotForBusinessSeatsForUsers: [ + "POST /orgs/{org}/copilot/billing/selected_users" + ], + cancelCopilotSeatAssignmentForTeams: [ + "DELETE /orgs/{org}/copilot/billing/selected_teams" + ], + cancelCopilotSeatAssignmentForUsers: [ + "DELETE /orgs/{org}/copilot/billing/selected_users" + ], + getCopilotOrganizationDetails: ["GET /orgs/{org}/copilot/billing"], + getCopilotSeatDetailsForUser: [ + "GET /orgs/{org}/members/{username}/copilot" + ], + listCopilotSeats: ["GET /orgs/{org}/copilot/billing/seats"] +======= enterpriseAdmin: { addCustomLabelsToSelfHostedRunnerForEnterprise: ["POST /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], disableSelectedOrganizationGithubActionsEnterprise: ["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"], @@ -1577,7 +3258,61 @@ const Endpoints = { setCustomLabelsForSelfHostedRunnerForEnterprise: ["PUT /enterprises/{enterprise}/actions/runners/{runner_id}/labels"], setGithubActionsPermissionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions"], setSelectedOrganizationsEnabledGithubActionsEnterprise: ["PUT /enterprises/{enterprise}/actions/permissions/organizations"] +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + }, + dependabot: { + addSelectedRepoToOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + createOrUpdateOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}" + ], + createOrUpdateRepoSecret: [ + "PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + deleteOrgSecret: ["DELETE /orgs/{org}/dependabot/secrets/{secret_name}"], + deleteRepoSecret: [ + "DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + getAlert: ["GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}"], + getOrgPublicKey: ["GET /orgs/{org}/dependabot/secrets/public-key"], + getOrgSecret: ["GET /orgs/{org}/dependabot/secrets/{secret_name}"], + getRepoPublicKey: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/public-key" + ], + getRepoSecret: [ + "GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/dependabot/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/dependabot/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/dependabot/alerts"], + listOrgSecrets: ["GET /orgs/{org}/dependabot/secrets"], + listRepoSecrets: ["GET /repos/{owner}/{repo}/dependabot/secrets"], + listSelectedReposForOrgSecret: [ + "GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + removeSelectedRepoFromOrgSecret: [ + "DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}" + ], + setSelectedReposForOrgSecret: [ + "PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}" + ] }, + dependencyGraph: { + createRepositorySnapshot: [ + "POST /repos/{owner}/{repo}/dependency-graph/snapshots" + ], + diffRange: [ + "GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}" + ], + exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"] + }, + emojis: { get: ["GET /emojis"] }, gists: { checkIsStarred: ["GET /gists/{gist_id}/star"], create: ["POST /gists"], @@ -1623,33 +3358,52 @@ const Endpoints = { getRestrictionsForAuthenticatedUser: ["GET /user/interaction-limits"], getRestrictionsForOrg: ["GET /orgs/{org}/interaction-limits"], getRestrictionsForRepo: ["GET /repos/{owner}/{repo}/interaction-limits"], - getRestrictionsForYourPublicRepos: ["GET /user/interaction-limits", {}, { - renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] - }], + getRestrictionsForYourPublicRepos: [ + "GET /user/interaction-limits", + {}, + { renamed: ["interactions", "getRestrictionsForAuthenticatedUser"] } + ], removeRestrictionsForAuthenticatedUser: ["DELETE /user/interaction-limits"], removeRestrictionsForOrg: ["DELETE /orgs/{org}/interaction-limits"], - removeRestrictionsForRepo: ["DELETE /repos/{owner}/{repo}/interaction-limits"], - removeRestrictionsForYourPublicRepos: ["DELETE /user/interaction-limits", {}, { - renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] - }], + removeRestrictionsForRepo: [ + "DELETE /repos/{owner}/{repo}/interaction-limits" + ], + removeRestrictionsForYourPublicRepos: [ + "DELETE /user/interaction-limits", + {}, + { renamed: ["interactions", "removeRestrictionsForAuthenticatedUser"] } + ], setRestrictionsForAuthenticatedUser: ["PUT /user/interaction-limits"], setRestrictionsForOrg: ["PUT /orgs/{org}/interaction-limits"], setRestrictionsForRepo: ["PUT /repos/{owner}/{repo}/interaction-limits"], - setRestrictionsForYourPublicRepos: ["PUT /user/interaction-limits", {}, { - renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] - }] + setRestrictionsForYourPublicRepos: [ + "PUT /user/interaction-limits", + {}, + { renamed: ["interactions", "setRestrictionsForAuthenticatedUser"] } + ] }, issues: { - addAssignees: ["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"], + addAssignees: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], addLabels: ["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"], checkUserCanBeAssigned: ["GET /repos/{owner}/{repo}/assignees/{assignee}"], + checkUserCanBeAssignedToIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}" + ], create: ["POST /repos/{owner}/{repo}/issues"], - createComment: ["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"], + createComment: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/comments" + ], createLabel: ["POST /repos/{owner}/{repo}/labels"], createMilestone: ["POST /repos/{owner}/{repo}/milestones"], - deleteComment: ["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"], + deleteComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}" + ], deleteLabel: ["DELETE /repos/{owner}/{repo}/labels/{name}"], - deleteMilestone: ["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"], + deleteMilestone: [ + "DELETE /repos/{owner}/{repo}/milestones/{milestone_number}" + ], get: ["GET /repos/{owner}/{repo}/issues/{issue_number}"], getComment: ["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"], getEvent: ["GET /repos/{owner}/{repo}/issues/events/{event_id}"], @@ -1661,24 +3415,42 @@ const Endpoints = { listCommentsForRepo: ["GET /repos/{owner}/{repo}/issues/comments"], listEvents: ["GET /repos/{owner}/{repo}/issues/{issue_number}/events"], listEventsForRepo: ["GET /repos/{owner}/{repo}/issues/events"], +<<<<<<< HEAD + listEventsForTimeline: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/timeline" + ], +======= listEventsForTimeline: ["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listForAuthenticatedUser: ["GET /user/issues"], listForOrg: ["GET /orgs/{org}/issues"], listForRepo: ["GET /repos/{owner}/{repo}/issues"], - listLabelsForMilestone: ["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"], + listLabelsForMilestone: [ + "GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels" + ], listLabelsForRepo: ["GET /repos/{owner}/{repo}/labels"], - listLabelsOnIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"], + listLabelsOnIssue: [ + "GET /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], listMilestones: ["GET /repos/{owner}/{repo}/milestones"], lock: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"], - removeAllLabels: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"], - removeAssignees: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"], - removeLabel: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"], + removeAllLabels: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels" + ], + removeAssignees: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees" + ], + removeLabel: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}" + ], setLabels: ["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"], unlock: ["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"], update: ["PATCH /repos/{owner}/{repo}/issues/{issue_number}"], updateComment: ["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"], updateLabel: ["PATCH /repos/{owner}/{repo}/labels/{name}"], - updateMilestone: ["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"] + updateMilestone: [ + "PATCH /repos/{owner}/{repo}/milestones/{milestone_number}" + ] }, licenses: { get: ["GET /licenses/{license}"], @@ -1687,19 +3459,61 @@ const Endpoints = { }, markdown: { render: ["POST /markdown"], - renderRaw: ["POST /markdown/raw", { - headers: { - "content-type": "text/plain; charset=utf-8" - } - }] + renderRaw: [ + "POST /markdown/raw", + { headers: { "content-type": "text/plain; charset=utf-8" } } + ] }, meta: { get: ["GET /meta"], + getAllVersions: ["GET /versions"], getOctocat: ["GET /octocat"], getZen: ["GET /zen"], root: ["GET /"] }, migrations: { +<<<<<<< HEAD + cancelImport: [ + "DELETE /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import" + } + ], + deleteArchiveForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/archive" + ], + deleteArchiveForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/archive" + ], + downloadArchiveForOrg: [ + "GET /orgs/{org}/migrations/{migration_id}/archive" + ], + getArchiveForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/archive" + ], + getCommitAuthors: [ + "GET /repos/{owner}/{repo}/import/authors", + {}, + { + deprecated: "octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors" + } + ], + getImportStatus: [ + "GET /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status" + } + ], + getLargeFiles: [ + "GET /repos/{owner}/{repo}/import/large_files", + {}, + { + deprecated: "octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files" + } + ], +======= cancelImport: ["DELETE /repos/{owner}/{repo}/import"], deleteArchiveForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/archive"], deleteArchiveForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/archive"], @@ -1708,10 +3522,58 @@ const Endpoints = { getCommitAuthors: ["GET /repos/{owner}/{repo}/import/authors"], getImportStatus: ["GET /repos/{owner}/{repo}/import"], getLargeFiles: ["GET /repos/{owner}/{repo}/import/large_files"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 getStatusForAuthenticatedUser: ["GET /user/migrations/{migration_id}"], getStatusForOrg: ["GET /orgs/{org}/migrations/{migration_id}"], listForAuthenticatedUser: ["GET /user/migrations"], listForOrg: ["GET /orgs/{org}/migrations"], +<<<<<<< HEAD + listReposForAuthenticatedUser: [ + "GET /user/migrations/{migration_id}/repositories" + ], + listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], + listReposForUser: [ + "GET /user/migrations/{migration_id}/repositories", + {}, + { renamed: ["migrations", "listReposForAuthenticatedUser"] } + ], + mapCommitAuthor: [ + "PATCH /repos/{owner}/{repo}/import/authors/{author_id}", + {}, + { + deprecated: "octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author" + } + ], + setLfsPreference: [ + "PATCH /repos/{owner}/{repo}/import/lfs", + {}, + { + deprecated: "octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference" + } + ], + startForAuthenticatedUser: ["POST /user/migrations"], + startForOrg: ["POST /orgs/{org}/migrations"], + startImport: [ + "PUT /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import" + } + ], + unlockRepoForAuthenticatedUser: [ + "DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock" + ], + unlockRepoForOrg: [ + "DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock" + ], + updateImport: [ + "PATCH /repos/{owner}/{repo}/import", + {}, + { + deprecated: "octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import" + } + ] +======= listReposForAuthenticatedUser: ["GET /user/migrations/{migration_id}/repositories"], listReposForOrg: ["GET /orgs/{org}/migrations/{migration_id}/repositories"], listReposForUser: ["GET /user/migrations/{migration_id}/repositories", {}, { @@ -1725,27 +3587,58 @@ const Endpoints = { unlockRepoForAuthenticatedUser: ["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock"], unlockRepoForOrg: ["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock"], updateImport: ["PATCH /repos/{owner}/{repo}/import"] +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }, orgs: { + addSecurityManagerTeam: [ + "PUT /orgs/{org}/security-managers/teams/{team_slug}" + ], blockUser: ["PUT /orgs/{org}/blocks/{username}"], cancelInvitation: ["DELETE /orgs/{org}/invitations/{invitation_id}"], checkBlockedUser: ["GET /orgs/{org}/blocks/{username}"], checkMembershipForUser: ["GET /orgs/{org}/members/{username}"], checkPublicMembershipForUser: ["GET /orgs/{org}/public_members/{username}"], - convertMemberToOutsideCollaborator: ["PUT /orgs/{org}/outside_collaborators/{username}"], + convertMemberToOutsideCollaborator: [ + "PUT /orgs/{org}/outside_collaborators/{username}" + ], createInvitation: ["POST /orgs/{org}/invitations"], + createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"], + createOrUpdateCustomPropertiesValuesForRepos: [ + "PATCH /orgs/{org}/properties/values" + ], + createOrUpdateCustomProperty: [ + "PUT /orgs/{org}/properties/schema/{custom_property_name}" + ], createWebhook: ["POST /orgs/{org}/hooks"], + delete: ["DELETE /orgs/{org}"], deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"], + enableOrDisableSecurityProductOnAllOrgRepos: [ + "POST /orgs/{org}/{security_product}/{enablement}" + ], get: ["GET /orgs/{org}"], + getAllCustomProperties: ["GET /orgs/{org}/properties/schema"], + getCustomProperty: [ + "GET /orgs/{org}/properties/schema/{custom_property_name}" + ], getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"], getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"], getWebhook: ["GET /orgs/{org}/hooks/{hook_id}"], getWebhookConfigForOrg: ["GET /orgs/{org}/hooks/{hook_id}/config"], +<<<<<<< HEAD + getWebhookDelivery: [ + "GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + list: ["GET /organizations"], + listAppInstallations: ["GET /orgs/{org}/installations"], + listBlockedUsers: ["GET /orgs/{org}/blocks"], + listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"], +======= getWebhookDelivery: ["GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}"], list: ["GET /organizations"], listAppInstallations: ["GET /orgs/{org}/installations"], listBlockedUsers: ["GET /orgs/{org}/blocks"], listCustomRoles: ["GET /organizations/{organization_id}/custom_roles"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listFailedInvitations: ["GET /orgs/{org}/failed_invitations"], listForAuthenticatedUser: ["GET /user/orgs"], listForUser: ["GET /users/{username}/orgs"], @@ -1753,25 +3646,157 @@ const Endpoints = { listMembers: ["GET /orgs/{org}/members"], listMembershipsForAuthenticatedUser: ["GET /user/memberships/orgs"], listOutsideCollaborators: ["GET /orgs/{org}/outside_collaborators"], + listPatGrantRepositories: [ + "GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories" + ], + listPatGrantRequestRepositories: [ + "GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories" + ], + listPatGrantRequests: ["GET /orgs/{org}/personal-access-token-requests"], + listPatGrants: ["GET /orgs/{org}/personal-access-tokens"], listPendingInvitations: ["GET /orgs/{org}/invitations"], listPublicMembers: ["GET /orgs/{org}/public_members"], +<<<<<<< HEAD + listSecurityManagerTeams: ["GET /orgs/{org}/security-managers"], + listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], + listWebhooks: ["GET /orgs/{org}/hooks"], + pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], + redeliverWebhookDelivery: [ + "POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeCustomProperty: [ + "DELETE /orgs/{org}/properties/schema/{custom_property_name}" + ], +======= listWebhookDeliveries: ["GET /orgs/{org}/hooks/{hook_id}/deliveries"], listWebhooks: ["GET /orgs/{org}/hooks"], pingWebhook: ["POST /orgs/{org}/hooks/{hook_id}/pings"], redeliverWebhookDelivery: ["POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 removeMember: ["DELETE /orgs/{org}/members/{username}"], removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"], - removeOutsideCollaborator: ["DELETE /orgs/{org}/outside_collaborators/{username}"], - removePublicMembershipForAuthenticatedUser: ["DELETE /orgs/{org}/public_members/{username}"], + removeOutsideCollaborator: [ + "DELETE /orgs/{org}/outside_collaborators/{username}" + ], + removePublicMembershipForAuthenticatedUser: [ + "DELETE /orgs/{org}/public_members/{username}" + ], + removeSecurityManagerTeam: [ + "DELETE /orgs/{org}/security-managers/teams/{team_slug}" + ], + reviewPatGrantRequest: [ + "POST /orgs/{org}/personal-access-token-requests/{pat_request_id}" + ], + reviewPatGrantRequestsInBulk: [ + "POST /orgs/{org}/personal-access-token-requests" + ], setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"], - setPublicMembershipForAuthenticatedUser: ["PUT /orgs/{org}/public_members/{username}"], + setPublicMembershipForAuthenticatedUser: [ + "PUT /orgs/{org}/public_members/{username}" + ], unblockUser: ["DELETE /orgs/{org}/blocks/{username}"], update: ["PATCH /orgs/{org}"], - updateMembershipForAuthenticatedUser: ["PATCH /user/memberships/orgs/{org}"], + updateMembershipForAuthenticatedUser: [ + "PATCH /user/memberships/orgs/{org}" + ], + updatePatAccess: ["POST /orgs/{org}/personal-access-tokens/{pat_id}"], + updatePatAccesses: ["POST /orgs/{org}/personal-access-tokens"], updateWebhook: ["PATCH /orgs/{org}/hooks/{hook_id}"], updateWebhookConfigForOrg: ["PATCH /orgs/{org}/hooks/{hook_id}/config"] }, packages: { +<<<<<<< HEAD + deletePackageForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}" + ], + deletePackageForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}" + ], + deletePackageForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}" + ], + deletePackageVersionForAuthenticatedUser: [ + "DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForOrg: [ + "DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + deletePackageVersionForUser: [ + "DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getAllPackageVersionsForAPackageOwnedByAnOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions", + {}, + { renamed: ["packages", "getAllPackageVersionsForPackageOwnedByOrg"] } + ], + getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions", + {}, + { + renamed: [ + "packages", + "getAllPackageVersionsForPackageOwnedByAuthenticatedUser" + ] + } + ], + getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByOrg: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions" + ], + getAllPackageVersionsForPackageOwnedByUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions" + ], + getPackageForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}" + ], + getPackageForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}" + ], + getPackageForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}" + ], + getPackageVersionForAuthenticatedUser: [ + "GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForOrganization: [ + "GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + getPackageVersionForUser: [ + "GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}" + ], + listDockerMigrationConflictingPackagesForAuthenticatedUser: [ + "GET /user/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForOrganization: [ + "GET /orgs/{org}/docker/conflicts" + ], + listDockerMigrationConflictingPackagesForUser: [ + "GET /users/{username}/docker/conflicts" + ], + listPackagesForAuthenticatedUser: ["GET /user/packages"], + listPackagesForOrganization: ["GET /orgs/{org}/packages"], + listPackagesForUser: ["GET /users/{username}/packages"], + restorePackageForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}" + ], + restorePackageVersionForAuthenticatedUser: [ + "POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForOrg: [ + "POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ], + restorePackageVersionForUser: [ + "POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore" + ] +======= deletePackageForAuthenticatedUser: ["DELETE /user/packages/{package_type}/{package_name}"], deletePackageForOrg: ["DELETE /orgs/{org}/packages/{package_type}/{package_name}"], deletePackageForUser: ["DELETE /users/{username}/packages/{package_type}/{package_name}"], @@ -1802,6 +3827,7 @@ const Endpoints = { restorePackageVersionForAuthenticatedUser: ["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], restorePackageVersionForOrg: ["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"], restorePackageVersionForUser: ["POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"] +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }, projects: { addCollaborator: ["PUT /projects/{project_id}/collaborators/{username}"], @@ -1816,7 +3842,13 @@ const Endpoints = { get: ["GET /projects/{project_id}"], getCard: ["GET /projects/columns/cards/{card_id}"], getColumn: ["GET /projects/columns/{column_id}"], +<<<<<<< HEAD + getPermissionForUser: [ + "GET /projects/{project_id}/collaborators/{username}/permission" + ], +======= getPermissionForUser: ["GET /projects/{project_id}/collaborators/{username}/permission"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listCards: ["GET /projects/columns/{column_id}/cards"], listCollaborators: ["GET /projects/{project_id}/collaborators"], listColumns: ["GET /projects/{project_id}/columns"], @@ -1825,7 +3857,13 @@ const Endpoints = { listForUser: ["GET /users/{username}/projects"], moveCard: ["POST /projects/columns/cards/{card_id}/moves"], moveColumn: ["POST /projects/columns/{column_id}/moves"], +<<<<<<< HEAD + removeCollaborator: [ + "DELETE /projects/{project_id}/collaborators/{username}" + ], +======= removeCollaborator: ["DELETE /projects/{project_id}/collaborators/{username}"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 update: ["PATCH /projects/{project_id}"], updateCard: ["PATCH /projects/columns/cards/{card_id}"], updateColumn: ["PATCH /projects/columns/{column_id}"] @@ -1833,36 +3871,151 @@ const Endpoints = { pulls: { checkIfMerged: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"], create: ["POST /repos/{owner}/{repo}/pulls"], - createReplyForReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"], + createReplyForReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies" + ], createReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], - createReviewComment: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"], - deletePendingReview: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], - deleteReviewComment: ["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"], - dismissReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"], + createReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], + deletePendingReview: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + deleteReviewComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ], + dismissReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals" + ], get: ["GET /repos/{owner}/{repo}/pulls/{pull_number}"], - getReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], + getReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], getReviewComment: ["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"], list: ["GET /repos/{owner}/{repo}/pulls"], - listCommentsForReview: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"], + listCommentsForReview: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments" + ], listCommits: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"], listFiles: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"], - listRequestedReviewers: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], - listReviewComments: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"], + listRequestedReviewers: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + listReviewComments: [ + "GET /repos/{owner}/{repo}/pulls/{pull_number}/comments" + ], listReviewCommentsForRepo: ["GET /repos/{owner}/{repo}/pulls/comments"], listReviews: ["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"], merge: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"], - removeRequestedReviewers: ["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], - requestReviewers: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"], - submitReview: ["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"], + removeRequestedReviewers: [ + "DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + requestReviewers: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers" + ], + submitReview: [ + "POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events" + ], update: ["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"], +<<<<<<< HEAD + updateBranch: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch" + ], + updateReview: [ + "PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}" + ], + updateReviewComment: [ + "PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}" + ] +======= updateBranch: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch"], updateReview: ["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"], updateReviewComment: ["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"] }, rateLimit: { get: ["GET /rate_limit"] +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }, + rateLimit: { get: ["GET /rate_limit"] }, reactions: { +<<<<<<< HEAD + createForCommitComment: [ + "POST /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + createForIssue: [ + "POST /repos/{owner}/{repo}/issues/{issue_number}/reactions" + ], + createForIssueComment: [ + "POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + createForPullRequestReviewComment: [ + "POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + createForRelease: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + createForTeamDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + createForTeamDiscussionInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ], + deleteForCommitComment: [ + "DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForIssue: [ + "DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}" + ], + deleteForIssueComment: [ + "DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForPullRequestComment: [ + "DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}" + ], + deleteForRelease: [ + "DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}" + ], + deleteForTeamDiscussion: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}" + ], + deleteForTeamDiscussionComment: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}" + ], + listForCommitComment: [ + "GET /repos/{owner}/{repo}/comments/{comment_id}/reactions" + ], + listForIssue: ["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions"], + listForIssueComment: [ + "GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions" + ], + listForPullRequestReviewComment: [ + "GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions" + ], + listForRelease: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/reactions" + ], + listForTeamDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions" + ], + listForTeamDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions" + ] + }, + repos: { + acceptInvitation: [ + "PATCH /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "acceptInvitationForAuthenticatedUser"] } + ], + acceptInvitationForAuthenticatedUser: [ + "PATCH /user/repository_invitations/{invitation_id}" + ], + addAppAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], +======= createForCommitComment: ["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions"], createForIssue: ["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions"], createForIssueComment: ["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions"], @@ -1893,17 +4046,44 @@ const Endpoints = { addAppAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { mapToData: "apps" }], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 addCollaborator: ["PUT /repos/{owner}/{repo}/collaborators/{username}"], - addStatusCheckContexts: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { - mapToData: "contexts" - }], - addTeamAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { - mapToData: "teams" - }], - addUserAccessRestrictions: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { - mapToData: "users" - }], + addStatusCheckContexts: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + addTeamAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + addUserAccessRestrictions: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], + checkAutomatedSecurityFixes: [ + "GET /repos/{owner}/{repo}/automated-security-fixes" + ], checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"], +<<<<<<< HEAD + checkVulnerabilityAlerts: [ + "GET /repos/{owner}/{repo}/vulnerability-alerts" + ], + codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], + compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], + compareCommitsWithBasehead: [ + "GET /repos/{owner}/{repo}/compare/{basehead}" + ], + createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], + createCommitComment: [ + "POST /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], + createCommitSignatureProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], +======= checkVulnerabilityAlerts: ["GET /repos/{owner}/{repo}/vulnerability-alerts"], codeownersErrors: ["GET /repos/{owner}/{repo}/codeowners/errors"], compareCommits: ["GET /repos/{owner}/{repo}/compare/{base}...{head}"], @@ -1911,16 +4091,65 @@ const Endpoints = { createAutolink: ["POST /repos/{owner}/{repo}/autolinks"], createCommitComment: ["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"], createCommitSignatureProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 createCommitStatus: ["POST /repos/{owner}/{repo}/statuses/{sha}"], createDeployKey: ["POST /repos/{owner}/{repo}/keys"], createDeployment: ["POST /repos/{owner}/{repo}/deployments"], - createDeploymentStatus: ["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], + createDeploymentBranchPolicy: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + createDeploymentProtectionRule: [ + "POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], + createDeploymentStatus: [ + "POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], createDispatchEvent: ["POST /repos/{owner}/{repo}/dispatches"], createForAuthenticatedUser: ["POST /user/repos"], createFork: ["POST /repos/{owner}/{repo}/forks"], createInOrg: ["POST /orgs/{org}/repos"], - createOrUpdateEnvironment: ["PUT /repos/{owner}/{repo}/environments/{environment_name}"], + createOrUpdateEnvironment: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}" + ], createOrUpdateFileContents: ["PUT /repos/{owner}/{repo}/contents/{path}"], +<<<<<<< HEAD + createOrgRuleset: ["POST /orgs/{org}/rulesets"], + createPagesDeployment: ["POST /repos/{owner}/{repo}/pages/deployment"], + createPagesSite: ["POST /repos/{owner}/{repo}/pages"], + createRelease: ["POST /repos/{owner}/{repo}/releases"], + createRepoRuleset: ["POST /repos/{owner}/{repo}/rulesets"], + createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], + createUsingTemplate: [ + "POST /repos/{template_owner}/{template_repo}/generate" + ], + createWebhook: ["POST /repos/{owner}/{repo}/hooks"], + declineInvitation: [ + "DELETE /user/repository_invitations/{invitation_id}", + {}, + { renamed: ["repos", "declineInvitationForAuthenticatedUser"] } + ], + declineInvitationForAuthenticatedUser: [ + "DELETE /user/repository_invitations/{invitation_id}" + ], + delete: ["DELETE /repos/{owner}/{repo}"], + deleteAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + deleteAdminBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + deleteAnEnvironment: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}" + ], + deleteAutolink: ["DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}"], + deleteBranchProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection" + ], + deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], + deleteCommitSignatureProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], +======= createPagesSite: ["POST /repos/{owner}/{repo}/pages"], createRelease: ["POST /repos/{owner}/{repo}/releases"], createTagProtection: ["POST /repos/{owner}/{repo}/tags/protection"], @@ -1938,9 +4167,65 @@ const Endpoints = { deleteBranchProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"], deleteCommitComment: ["DELETE /repos/{owner}/{repo}/comments/{comment_id}"], deleteCommitSignatureProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 deleteDeployKey: ["DELETE /repos/{owner}/{repo}/keys/{key_id}"], - deleteDeployment: ["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"], + deleteDeployment: [ + "DELETE /repos/{owner}/{repo}/deployments/{deployment_id}" + ], + deleteDeploymentBranchPolicy: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], deleteFile: ["DELETE /repos/{owner}/{repo}/contents/{path}"], +<<<<<<< HEAD + deleteInvitation: [ + "DELETE /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + deleteOrgRuleset: ["DELETE /orgs/{org}/rulesets/{ruleset_id}"], + deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], + deletePullRequestReviewProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], + deleteRelease: ["DELETE /repos/{owner}/{repo}/releases/{release_id}"], + deleteReleaseAsset: [ + "DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + deleteRepoRuleset: ["DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + deleteTagProtection: [ + "DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}" + ], + deleteWebhook: ["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"], + disableAutomatedSecurityFixes: [ + "DELETE /repos/{owner}/{repo}/automated-security-fixes" + ], + disableDeploymentProtectionRule: [ + "DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + disablePrivateVulnerabilityReporting: [ + "DELETE /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + disableVulnerabilityAlerts: [ + "DELETE /repos/{owner}/{repo}/vulnerability-alerts" + ], + downloadArchive: [ + "GET /repos/{owner}/{repo}/zipball/{ref}", + {}, + { renamed: ["repos", "downloadZipballArchive"] } + ], + downloadTarballArchive: ["GET /repos/{owner}/{repo}/tarball/{ref}"], + downloadZipballArchive: ["GET /repos/{owner}/{repo}/zipball/{ref}"], + enableAutomatedSecurityFixes: [ + "PUT /repos/{owner}/{repo}/automated-security-fixes" + ], + enablePrivateVulnerabilityReporting: [ + "PUT /repos/{owner}/{repo}/private-vulnerability-reporting" + ], + enableVulnerabilityAlerts: [ + "PUT /repos/{owner}/{repo}/vulnerability-alerts" + ], + generateReleaseNotes: [ + "POST /repos/{owner}/{repo}/releases/generate-notes" + ], +======= deleteInvitation: ["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"], deletePagesSite: ["DELETE /repos/{owner}/{repo}/pages"], deletePullRequestReviewProtection: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], @@ -1960,64 +4245,149 @@ const Endpoints = { enableLfsForRepo: ["PUT /repos/{owner}/{repo}/lfs"], enableVulnerabilityAlerts: ["PUT /repos/{owner}/{repo}/vulnerability-alerts"], generateReleaseNotes: ["POST /repos/{owner}/{repo}/releases/generate-notes"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 get: ["GET /repos/{owner}/{repo}"], - getAccessRestrictions: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"], - getAdminBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], + getAccessRestrictions: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions" + ], + getAdminBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + getAllDeploymentProtectionRules: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules" + ], getAllEnvironments: ["GET /repos/{owner}/{repo}/environments"], +<<<<<<< HEAD + getAllStatusCheckContexts: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts" + ], + getAllTopics: ["GET /repos/{owner}/{repo}/topics"], + getAppsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps" + ], +======= getAllStatusCheckContexts: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"], getAllTopics: ["GET /repos/{owner}/{repo}/topics"], getAppsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 getAutolink: ["GET /repos/{owner}/{repo}/autolinks/{autolink_id}"], getBranch: ["GET /repos/{owner}/{repo}/branches/{branch}"], - getBranchProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection"], + getBranchProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection" + ], + getBranchRules: ["GET /repos/{owner}/{repo}/rules/branches/{branch}"], getClones: ["GET /repos/{owner}/{repo}/traffic/clones"], getCodeFrequencyStats: ["GET /repos/{owner}/{repo}/stats/code_frequency"], - getCollaboratorPermissionLevel: ["GET /repos/{owner}/{repo}/collaborators/{username}/permission"], + getCollaboratorPermissionLevel: [ + "GET /repos/{owner}/{repo}/collaborators/{username}/permission" + ], getCombinedStatusForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/status"], getCommit: ["GET /repos/{owner}/{repo}/commits/{ref}"], getCommitActivityStats: ["GET /repos/{owner}/{repo}/stats/commit_activity"], getCommitComment: ["GET /repos/{owner}/{repo}/comments/{comment_id}"], +<<<<<<< HEAD + getCommitSignatureProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures" + ], +======= getCommitSignatureProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 getCommunityProfileMetrics: ["GET /repos/{owner}/{repo}/community/profile"], getContent: ["GET /repos/{owner}/{repo}/contents/{path}"], getContributorsStats: ["GET /repos/{owner}/{repo}/stats/contributors"], + getCustomDeploymentProtectionRule: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}" + ], + getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"], getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"], getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"], - getDeploymentStatus: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"], - getEnvironment: ["GET /repos/{owner}/{repo}/environments/{environment_name}"], + getDeploymentBranchPolicy: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], + getDeploymentStatus: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}" + ], + getEnvironment: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}" + ], getLatestPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/latest"], getLatestRelease: ["GET /repos/{owner}/{repo}/releases/latest"], + getOrgRuleSuite: ["GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}"], + getOrgRuleSuites: ["GET /orgs/{org}/rulesets/rule-suites"], + getOrgRuleset: ["GET /orgs/{org}/rulesets/{ruleset_id}"], + getOrgRulesets: ["GET /orgs/{org}/rulesets"], getPages: ["GET /repos/{owner}/{repo}/pages"], getPagesBuild: ["GET /repos/{owner}/{repo}/pages/builds/{build_id}"], getPagesHealthCheck: ["GET /repos/{owner}/{repo}/pages/health"], getParticipationStats: ["GET /repos/{owner}/{repo}/stats/participation"], - getPullRequestReviewProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + getPullRequestReviewProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], getPunchCardStats: ["GET /repos/{owner}/{repo}/stats/punch_card"], getReadme: ["GET /repos/{owner}/{repo}/readme"], getReadmeInDirectory: ["GET /repos/{owner}/{repo}/readme/{dir}"], getRelease: ["GET /repos/{owner}/{repo}/releases/{release_id}"], getReleaseAsset: ["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"], getReleaseByTag: ["GET /repos/{owner}/{repo}/releases/tags/{tag}"], - getStatusChecksProtection: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], - getTeamsWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"], + getRepoRuleSuite: [ + "GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}" + ], + getRepoRuleSuites: ["GET /repos/{owner}/{repo}/rulesets/rule-suites"], + getRepoRuleset: ["GET /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + getRepoRulesets: ["GET /repos/{owner}/{repo}/rulesets"], + getStatusChecksProtection: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + getTeamsWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams" + ], getTopPaths: ["GET /repos/{owner}/{repo}/traffic/popular/paths"], getTopReferrers: ["GET /repos/{owner}/{repo}/traffic/popular/referrers"], - getUsersWithAccessToProtectedBranch: ["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"], + getUsersWithAccessToProtectedBranch: [ + "GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users" + ], getViews: ["GET /repos/{owner}/{repo}/traffic/views"], getWebhook: ["GET /repos/{owner}/{repo}/hooks/{hook_id}"], +<<<<<<< HEAD + getWebhookConfigForRepo: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + getWebhookDelivery: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}" + ], + listActivities: ["GET /repos/{owner}/{repo}/activity"], + listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], + listBranches: ["GET /repos/{owner}/{repo}/branches"], + listBranchesForHeadCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head" + ], +======= getWebhookConfigForRepo: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"], getWebhookDelivery: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}"], listAutolinks: ["GET /repos/{owner}/{repo}/autolinks"], listBranches: ["GET /repos/{owner}/{repo}/branches"], listBranchesForHeadCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listCollaborators: ["GET /repos/{owner}/{repo}/collaborators"], - listCommentsForCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"], + listCommentsForCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/comments" + ], listCommitCommentsForRepo: ["GET /repos/{owner}/{repo}/comments"], - listCommitStatusesForRef: ["GET /repos/{owner}/{repo}/commits/{ref}/statuses"], + listCommitStatusesForRef: [ + "GET /repos/{owner}/{repo}/commits/{ref}/statuses" + ], listCommits: ["GET /repos/{owner}/{repo}/commits"], listContributors: ["GET /repos/{owner}/{repo}/contributors"], + listCustomDeploymentRuleIntegrations: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps" + ], listDeployKeys: ["GET /repos/{owner}/{repo}/keys"], - listDeploymentStatuses: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"], + listDeploymentBranchPolicies: [ + "GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies" + ], + listDeploymentStatuses: [ + "GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses" + ], listDeployments: ["GET /repos/{owner}/{repo}/deployments"], listForAuthenticatedUser: ["GET /user/repos"], listForOrg: ["GET /orgs/{org}/repos"], @@ -2028,17 +4398,63 @@ const Endpoints = { listLanguages: ["GET /repos/{owner}/{repo}/languages"], listPagesBuilds: ["GET /repos/{owner}/{repo}/pages/builds"], listPublic: ["GET /repositories"], +<<<<<<< HEAD + listPullRequestsAssociatedWithCommit: [ + "GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls" + ], + listReleaseAssets: [ + "GET /repos/{owner}/{repo}/releases/{release_id}/assets" + ], +======= listPullRequestsAssociatedWithCommit: ["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls"], listReleaseAssets: ["GET /repos/{owner}/{repo}/releases/{release_id}/assets"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listReleases: ["GET /repos/{owner}/{repo}/releases"], listTagProtection: ["GET /repos/{owner}/{repo}/tags/protection"], listTags: ["GET /repos/{owner}/{repo}/tags"], listTeams: ["GET /repos/{owner}/{repo}/teams"], +<<<<<<< HEAD + listWebhookDeliveries: [ + "GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries" + ], +======= listWebhookDeliveries: ["GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listWebhooks: ["GET /repos/{owner}/{repo}/hooks"], merge: ["POST /repos/{owner}/{repo}/merges"], mergeUpstream: ["POST /repos/{owner}/{repo}/merge-upstream"], pingWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"], +<<<<<<< HEAD + redeliverWebhookDelivery: [ + "POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts" + ], + removeAppAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + removeCollaborator: [ + "DELETE /repos/{owner}/{repo}/collaborators/{username}" + ], + removeStatusCheckContexts: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + removeStatusCheckProtection: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], + removeTeamAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + removeUserAccessRestrictions: [ + "DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], +======= redeliverWebhookDelivery: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"], removeAppAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { mapToData: "apps" @@ -2054,41 +4470,72 @@ const Endpoints = { removeUserAccessRestrictions: ["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { mapToData: "users" }], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 renameBranch: ["POST /repos/{owner}/{repo}/branches/{branch}/rename"], replaceAllTopics: ["PUT /repos/{owner}/{repo}/topics"], requestPagesBuild: ["POST /repos/{owner}/{repo}/pages/builds"], - setAdminBranchProtection: ["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"], - setAppAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", {}, { - mapToData: "apps" - }], - setStatusCheckContexts: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", {}, { - mapToData: "contexts" - }], - setTeamAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", {}, { - mapToData: "teams" - }], - setUserAccessRestrictions: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", {}, { - mapToData: "users" - }], + setAdminBranchProtection: [ + "POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins" + ], + setAppAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps", + {}, + { mapToData: "apps" } + ], + setStatusCheckContexts: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts", + {}, + { mapToData: "contexts" } + ], + setTeamAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams", + {}, + { mapToData: "teams" } + ], + setUserAccessRestrictions: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users", + {}, + { mapToData: "users" } + ], testPushWebhook: ["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"], transfer: ["POST /repos/{owner}/{repo}/transfer"], update: ["PATCH /repos/{owner}/{repo}"], - updateBranchProtection: ["PUT /repos/{owner}/{repo}/branches/{branch}/protection"], + updateBranchProtection: [ + "PUT /repos/{owner}/{repo}/branches/{branch}/protection" + ], updateCommitComment: ["PATCH /repos/{owner}/{repo}/comments/{comment_id}"], + updateDeploymentBranchPolicy: [ + "PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}" + ], updateInformationAboutPagesSite: ["PUT /repos/{owner}/{repo}/pages"], - updateInvitation: ["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"], - updatePullRequestReviewProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"], + updateInvitation: [ + "PATCH /repos/{owner}/{repo}/invitations/{invitation_id}" + ], + updateOrgRuleset: ["PUT /orgs/{org}/rulesets/{ruleset_id}"], + updatePullRequestReviewProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews" + ], updateRelease: ["PATCH /repos/{owner}/{repo}/releases/{release_id}"], - updateReleaseAsset: ["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"], - updateStatusCheckPotection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", {}, { - renamed: ["repos", "updateStatusCheckProtection"] - }], - updateStatusCheckProtection: ["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"], + updateReleaseAsset: [ + "PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}" + ], + updateRepoRuleset: ["PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}"], + updateStatusCheckPotection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks", + {}, + { renamed: ["repos", "updateStatusCheckProtection"] } + ], + updateStatusCheckProtection: [ + "PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks" + ], updateWebhook: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"], - updateWebhookConfigForRepo: ["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"], - uploadReleaseAsset: ["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", { - baseUrl: "https://uploads.github.com" - }] + updateWebhookConfigForRepo: [ + "PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config" + ], + uploadReleaseAsset: [ + "POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}", + { baseUrl: "https://uploads.github.com" } + ] }, search: { code: ["GET /search/code"], @@ -2100,6 +4547,60 @@ const Endpoints = { users: ["GET /search/users"] }, secretScanning: { +<<<<<<< HEAD + getAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ], + listAlertsForEnterprise: [ + "GET /enterprises/{enterprise}/secret-scanning/alerts" + ], + listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], + listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"], + listLocationsForAlert: [ + "GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations" + ], + updateAlert: [ + "PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}" + ] + }, + securityAdvisories: { + createPrivateVulnerabilityReport: [ + "POST /repos/{owner}/{repo}/security-advisories/reports" + ], + createRepositoryAdvisory: [ + "POST /repos/{owner}/{repo}/security-advisories" + ], + createRepositoryAdvisoryCveRequest: [ + "POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve" + ], + getGlobalAdvisory: ["GET /advisories/{ghsa_id}"], + getRepositoryAdvisory: [ + "GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ], + listGlobalAdvisories: ["GET /advisories"], + listOrgRepositoryAdvisories: ["GET /orgs/{org}/security-advisories"], + listRepositoryAdvisories: ["GET /repos/{owner}/{repo}/security-advisories"], + updateRepositoryAdvisory: [ + "PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}" + ] + }, + teams: { + addOrUpdateMembershipForUserInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + addOrUpdateProjectPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + addOrUpdateRepoPermissionsInOrg: [ + "PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + checkPermissionsForProjectInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + checkPermissionsForRepoInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], +======= getAlert: ["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"], listAlertsForEnterprise: ["GET /enterprises/{enterprise}/secret-scanning/alerts"], listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"], @@ -2113,41 +4614,119 @@ const Endpoints = { addOrUpdateRepoPermissionsInOrg: ["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], checkPermissionsForProjectInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}"], checkPermissionsForRepoInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 create: ["POST /orgs/{org}/teams"], - createDiscussionCommentInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], + createDiscussionCommentInOrg: [ + "POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], createDiscussionInOrg: ["POST /orgs/{org}/teams/{team_slug}/discussions"], - deleteDiscussionCommentInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], - deleteDiscussionInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + deleteDiscussionCommentInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + deleteDiscussionInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], deleteInOrg: ["DELETE /orgs/{org}/teams/{team_slug}"], getByName: ["GET /orgs/{org}/teams/{team_slug}"], - getDiscussionCommentInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], - getDiscussionInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], - getMembershipForUserInOrg: ["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"], + getDiscussionCommentInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + getDiscussionInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], + getMembershipForUserInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], list: ["GET /orgs/{org}/teams"], listChildInOrg: ["GET /orgs/{org}/teams/{team_slug}/teams"], - listDiscussionCommentsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"], + listDiscussionCommentsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments" + ], listDiscussionsInOrg: ["GET /orgs/{org}/teams/{team_slug}/discussions"], listForAuthenticatedUser: ["GET /user/teams"], listMembersInOrg: ["GET /orgs/{org}/teams/{team_slug}/members"], +<<<<<<< HEAD + listPendingInvitationsInOrg: [ + "GET /orgs/{org}/teams/{team_slug}/invitations" + ], +======= listPendingInvitationsInOrg: ["GET /orgs/{org}/teams/{team_slug}/invitations"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listProjectsInOrg: ["GET /orgs/{org}/teams/{team_slug}/projects"], listReposInOrg: ["GET /orgs/{org}/teams/{team_slug}/repos"], - removeMembershipForUserInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"], - removeProjectInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"], - removeRepoInOrg: ["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"], - updateDiscussionCommentInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"], - updateDiscussionInOrg: ["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"], + removeMembershipForUserInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}" + ], + removeProjectInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}" + ], + removeRepoInOrg: [ + "DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}" + ], + updateDiscussionCommentInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}" + ], + updateDiscussionInOrg: [ + "PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" + ], updateInOrg: ["PATCH /orgs/{org}/teams/{team_slug}"] }, users: { +<<<<<<< HEAD + addEmailForAuthenticated: [ + "POST /user/emails", + {}, + { renamed: ["users", "addEmailForAuthenticatedUser"] } + ], + addEmailForAuthenticatedUser: ["POST /user/emails"], + addSocialAccountForAuthenticatedUser: ["POST /user/social_accounts"], +======= addEmailForAuthenticated: ["POST /user/emails", {}, { renamed: ["users", "addEmailForAuthenticatedUser"] }], addEmailForAuthenticatedUser: ["POST /user/emails"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 block: ["PUT /user/blocks/{username}"], checkBlocked: ["GET /user/blocks/{username}"], checkFollowingForUser: ["GET /users/{username}/following/{target_user}"], checkPersonIsFollowedByAuthenticated: ["GET /user/following/{username}"], +<<<<<<< HEAD + createGpgKeyForAuthenticated: [ + "POST /user/gpg_keys", + {}, + { renamed: ["users", "createGpgKeyForAuthenticatedUser"] } + ], + createGpgKeyForAuthenticatedUser: ["POST /user/gpg_keys"], + createPublicSshKeyForAuthenticated: [ + "POST /user/keys", + {}, + { renamed: ["users", "createPublicSshKeyForAuthenticatedUser"] } + ], + createPublicSshKeyForAuthenticatedUser: ["POST /user/keys"], + createSshSigningKeyForAuthenticatedUser: ["POST /user/ssh_signing_keys"], + deleteEmailForAuthenticated: [ + "DELETE /user/emails", + {}, + { renamed: ["users", "deleteEmailForAuthenticatedUser"] } + ], + deleteEmailForAuthenticatedUser: ["DELETE /user/emails"], + deleteGpgKeyForAuthenticated: [ + "DELETE /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "deleteGpgKeyForAuthenticatedUser"] } + ], + deleteGpgKeyForAuthenticatedUser: ["DELETE /user/gpg_keys/{gpg_key_id}"], + deletePublicSshKeyForAuthenticated: [ + "DELETE /user/keys/{key_id}", + {}, + { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] } + ], + deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], + deleteSocialAccountForAuthenticatedUser: ["DELETE /user/social_accounts"], + deleteSshSigningKeyForAuthenticatedUser: [ + "DELETE /user/ssh_signing_keys/{ssh_signing_key_id}" + ], +======= createGpgKeyForAuthenticated: ["POST /user/gpg_keys", {}, { renamed: ["users", "createGpgKeyForAuthenticatedUser"] }], @@ -2168,10 +4747,46 @@ const Endpoints = { renamed: ["users", "deletePublicSshKeyForAuthenticatedUser"] }], deletePublicSshKeyForAuthenticatedUser: ["DELETE /user/keys/{key_id}"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 follow: ["PUT /user/following/{username}"], getAuthenticated: ["GET /user"], getByUsername: ["GET /users/{username}"], getContextForUser: ["GET /users/{username}/hovercard"], +<<<<<<< HEAD + getGpgKeyForAuthenticated: [ + "GET /user/gpg_keys/{gpg_key_id}", + {}, + { renamed: ["users", "getGpgKeyForAuthenticatedUser"] } + ], + getGpgKeyForAuthenticatedUser: ["GET /user/gpg_keys/{gpg_key_id}"], + getPublicSshKeyForAuthenticated: [ + "GET /user/keys/{key_id}", + {}, + { renamed: ["users", "getPublicSshKeyForAuthenticatedUser"] } + ], + getPublicSshKeyForAuthenticatedUser: ["GET /user/keys/{key_id}"], + getSshSigningKeyForAuthenticatedUser: [ + "GET /user/ssh_signing_keys/{ssh_signing_key_id}" + ], + list: ["GET /users"], + listBlockedByAuthenticated: [ + "GET /user/blocks", + {}, + { renamed: ["users", "listBlockedByAuthenticatedUser"] } + ], + listBlockedByAuthenticatedUser: ["GET /user/blocks"], + listEmailsForAuthenticated: [ + "GET /user/emails", + {}, + { renamed: ["users", "listEmailsForAuthenticatedUser"] } + ], + listEmailsForAuthenticatedUser: ["GET /user/emails"], + listFollowedByAuthenticated: [ + "GET /user/following", + {}, + { renamed: ["users", "listFollowedByAuthenticatedUser"] } + ], +======= getGpgKeyForAuthenticated: ["GET /user/gpg_keys/{gpg_key_id}", {}, { renamed: ["users", "getGpgKeyForAuthenticatedUser"] }], @@ -2192,10 +4807,45 @@ const Endpoints = { listFollowedByAuthenticated: ["GET /user/following", {}, { renamed: ["users", "listFollowedByAuthenticatedUser"] }], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 listFollowedByAuthenticatedUser: ["GET /user/following"], listFollowersForAuthenticatedUser: ["GET /user/followers"], listFollowersForUser: ["GET /users/{username}/followers"], listFollowingForUser: ["GET /users/{username}/following"], +<<<<<<< HEAD + listGpgKeysForAuthenticated: [ + "GET /user/gpg_keys", + {}, + { renamed: ["users", "listGpgKeysForAuthenticatedUser"] } + ], + listGpgKeysForAuthenticatedUser: ["GET /user/gpg_keys"], + listGpgKeysForUser: ["GET /users/{username}/gpg_keys"], + listPublicEmailsForAuthenticated: [ + "GET /user/public_emails", + {}, + { renamed: ["users", "listPublicEmailsForAuthenticatedUser"] } + ], + listPublicEmailsForAuthenticatedUser: ["GET /user/public_emails"], + listPublicKeysForUser: ["GET /users/{username}/keys"], + listPublicSshKeysForAuthenticated: [ + "GET /user/keys", + {}, + { renamed: ["users", "listPublicSshKeysForAuthenticatedUser"] } + ], + listPublicSshKeysForAuthenticatedUser: ["GET /user/keys"], + listSocialAccountsForAuthenticatedUser: ["GET /user/social_accounts"], + listSocialAccountsForUser: ["GET /users/{username}/social_accounts"], + listSshSigningKeysForAuthenticatedUser: ["GET /user/ssh_signing_keys"], + listSshSigningKeysForUser: ["GET /users/{username}/ssh_signing_keys"], + setPrimaryEmailVisibilityForAuthenticated: [ + "PATCH /user/email/visibility", + {}, + { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] } + ], + setPrimaryEmailVisibilityForAuthenticatedUser: [ + "PATCH /user/email/visibility" + ], +======= listGpgKeysForAuthenticated: ["GET /user/gpg_keys", {}, { renamed: ["users", "listGpgKeysForAuthenticatedUser"] }], @@ -2214,12 +4864,24 @@ const Endpoints = { renamed: ["users", "setPrimaryEmailVisibilityForAuthenticatedUser"] }], setPrimaryEmailVisibilityForAuthenticatedUser: ["PATCH /user/email/visibility"], +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 unblock: ["DELETE /user/blocks/{username}"], unfollow: ["DELETE /user/following/{username}"], updateAuthenticated: ["PATCH /user"] } }; +var endpoints_default = Endpoints; +<<<<<<< HEAD +// pkg/dist-src/endpoints-to-methods.js +var endpointMethodsMap = /* @__PURE__ */ new Map(); +for (const [scope, endpoints] of Object.entries(endpoints_default)) { + for (const [methodName, endpoint] of Object.entries(endpoints)) { + const [route, defaults, decorations] = endpoint; + const [method, url] = route.split(/ /); + const endpointDefaults = Object.assign( + { +======= const VERSION = "5.16.2"; function endpointsToMethods(octokit, endpointsMap) { @@ -2230,106 +4892,475 @@ function endpointsToMethods(octokit, endpointsMap) { const [route, defaults, decorations] = endpoint; const [method, url] = route.split(/ /); const endpointDefaults = Object.assign({ +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 method, url - }, defaults); - - if (!newMethods[scope]) { - newMethods[scope] = {}; - } - - const scopeMethods = newMethods[scope]; - - if (decorations) { - scopeMethods[methodName] = decorate(octokit, scope, methodName, endpointDefaults, decorations); - continue; - } - - scopeMethods[methodName] = octokit.request.defaults(endpointDefaults); + }, + defaults + ); + if (!endpointMethodsMap.has(scope)) { + endpointMethodsMap.set(scope, /* @__PURE__ */ new Map()); + } + endpointMethodsMap.get(scope).set(methodName, { + scope, + methodName, + endpointDefaults, + decorations + }); + } +} +var handler = { + has({ scope }, methodName) { + return endpointMethodsMap.get(scope).has(methodName); + }, + getOwnPropertyDescriptor(target, methodName) { + return { + value: this.get(target, methodName), + // ensures method is in the cache + configurable: true, + writable: true, + enumerable: true + }; + }, + defineProperty(target, methodName, descriptor) { + Object.defineProperty(target.cache, methodName, descriptor); + return true; + }, + deleteProperty(target, methodName) { + delete target.cache[methodName]; + return true; + }, + ownKeys({ scope }) { + return [...endpointMethodsMap.get(scope).keys()]; + }, + set(target, methodName, value) { + return target.cache[methodName] = value; + }, + get({ octokit, scope, cache }, methodName) { + if (cache[methodName]) { + return cache[methodName]; + } + const method = endpointMethodsMap.get(scope).get(methodName); + if (!method) { + return void 0; + } + const { endpointDefaults, decorations } = method; + if (decorations) { + cache[methodName] = decorate( + octokit, + scope, + methodName, + endpointDefaults, + decorations + ); + } else { + cache[methodName] = octokit.request.defaults(endpointDefaults); } + return cache[methodName]; + } +}; +function endpointsToMethods(octokit) { + const newMethods = {}; + for (const scope of endpointMethodsMap.keys()) { + newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler); } - return newMethods; } - function decorate(octokit, scope, methodName, defaults, decorations) { const requestWithDefaults = octokit.request.defaults(defaults); - /* istanbul ignore next */ - function withDecorations(...args) { - // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 - let options = requestWithDefaults.endpoint.merge(...args); // There are currently no other decorations than `.mapToData` - + let options = requestWithDefaults.endpoint.merge(...args); if (decorations.mapToData) { options = Object.assign({}, options, { data: options[decorations.mapToData], - [decorations.mapToData]: undefined + [decorations.mapToData]: void 0 }); return requestWithDefaults(options); } - if (decorations.renamed) { const [newScope, newMethodName] = decorations.renamed; - octokit.log.warn(`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`); + octokit.log.warn( + `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()` + ); } - if (decorations.deprecated) { octokit.log.warn(decorations.deprecated); } - if (decorations.renamedParameters) { - // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 - const options = requestWithDefaults.endpoint.merge(...args); - - for (const [name, alias] of Object.entries(decorations.renamedParameters)) { - if (name in options) { - octokit.log.warn(`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`); - - if (!(alias in options)) { - options[alias] = options[name]; + const options2 = requestWithDefaults.endpoint.merge(...args); + for (const [name, alias] of Object.entries( + decorations.renamedParameters + )) { + if (name in options2) { + octokit.log.warn( + `"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead` + ); + if (!(alias in options2)) { + options2[alias] = options2[name]; } - - delete options[name]; + delete options2[name]; } } - - return requestWithDefaults(options); - } // @ts-ignore https://github.com/microsoft/TypeScript/issues/25488 - - + return requestWithDefaults(options2); + } return requestWithDefaults(...args); } - return Object.assign(withDecorations, requestWithDefaults); } +// pkg/dist-src/index.js function restEndpointMethods(octokit) { - const api = endpointsToMethods(octokit, Endpoints); + const api = endpointsToMethods(octokit); return { rest: api }; } restEndpointMethods.VERSION = VERSION; function legacyRestEndpointMethods(octokit) { - const api = endpointsToMethods(octokit, Endpoints); - return _objectSpread2(_objectSpread2({}, api), {}, { + const api = endpointsToMethods(octokit); + return { + ...api, rest: api - }); + }; } legacyRestEndpointMethods.VERSION = VERSION; - -exports.legacyRestEndpointMethods = legacyRestEndpointMethods; -exports.restEndpointMethods = restEndpointMethods; -//# sourceMappingURL=index.js.map +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), +<<<<<<< HEAD +/***/ 63571: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +======= /***/ 81339: /***/ (function(__unused_webpack_module, exports) { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +<<<<<<< HEAD +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + RequestError: () => RequestError +}); +module.exports = __toCommonJS(dist_src_exports); +var import_deprecation = __nccwpck_require__(40454); +var import_once = __toESM(__nccwpck_require__(56939)); +var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var RequestError = class extends Error { + constructor(message, statusCode, options) { + super(message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "HttpError"; + this.status = statusCode; + let headers; + if ("headers" in options && typeof options.headers !== "undefined") { + headers = options.headers; + } + if ("response" in options) { + this.response = options.response; + headers = options.response.headers; + } + const requestCopy = Object.assign({}, options.request); + if (options.request.headers.authorization) { + requestCopy.headers = Object.assign({}, options.request.headers, { + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) + }); + } + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; + Object.defineProperty(this, "code", { + get() { + logOnceCode( + new import_deprecation.Deprecation( + "[@octokit/request-error] `error.code` is deprecated, use `error.status`." + ) + ); + return statusCode; + } + }); + Object.defineProperty(this, "headers", { + get() { + logOnceHeaders( + new import_deprecation.Deprecation( + "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`." + ) + ); + return headers || {}; + } + }); + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 90468: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + request: () => request +}); +module.exports = __toCommonJS(dist_src_exports); +var import_endpoint = __nccwpck_require__(13223); +var import_universal_user_agent = __nccwpck_require__(60031); + +// pkg/dist-src/version.js +var VERSION = "8.1.6"; + +// pkg/dist-src/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/fetch-wrapper.js +var import_request_error = __nccwpck_require__(63571); + +// pkg/dist-src/get-buffer-response.js +function getBufferResponse(response) { + return response.arrayBuffer(); +} + +// pkg/dist-src/fetch-wrapper.js +function fetchWrapper(requestOptions) { + var _a, _b, _c; + const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; + const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; + if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + requestOptions.body = JSON.stringify(requestOptions.body); + } + let headers = {}; + let status; + let url; + let { fetch } = globalThis; + if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { + fetch = requestOptions.request.fetch; + } + if (!fetch) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + return fetch(requestOptions.url, { + method: requestOptions.method, + body: requestOptions.body, + headers: requestOptions.headers, + signal: (_c = requestOptions.request) == null ? void 0 : _c.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }).then(async (response) => { + url = response.url; + status = response.status; + for (const keyAndValue of response.headers) { + headers[keyAndValue[0]] = keyAndValue[1]; + } + if ("deprecation" in headers) { + const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); + const deprecationLink = matches && matches.pop(); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); + } + if (status === 204 || status === 205) { + return; + } + if (requestOptions.method === "HEAD") { + if (status < 400) { + return; + } + throw new import_request_error.RequestError(response.statusText, status, { + response: { + url, + status, + headers, + data: void 0 + }, + request: requestOptions + }); + } + if (status === 304) { + throw new import_request_error.RequestError("Not modified", status, { + response: { + url, + status, + headers, + data: await getResponseData(response) + }, + request: requestOptions + }); + } + if (status >= 400) { + const data = await getResponseData(response); + const error = new import_request_error.RequestError(toErrorMessage(data), status, { + response: { + url, + status, + headers, + data + }, + request: requestOptions + }); + throw error; + } + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { + return { + status, + url, + headers, + data + }; + }).catch((error) => { + if (error instanceof import_request_error.RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + let message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } + } + throw new import_request_error.RequestError(message, 500, { + request: requestOptions + }); + }); +} +async function getResponseData(response) { + const contentType = response.headers.get("content-type"); + if (/application\/json/.test(contentType)) { + return response.json().catch(() => response.text()).catch(() => ""); + } + if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { + return response.text(); + } + return getBufferResponse(response); +} +function toErrorMessage(data) { + if (typeof data === "string") + return data; + if ("message" in data) { + if (Array.isArray(data.errors)) { + return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; + } + return data.message; + } + return `Unknown error: ${JSON.stringify(data)}`; +} + +// pkg/dist-src/with-defaults.js +function withDefaults(oldEndpoint, newDefaults) { + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); + if (!endpointOptions.request || !endpointOptions.request.hook) { + return fetchWrapper(endpoint2.parse(endpointOptions)); + } + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); + }; + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); + return endpointOptions.request.hook(request2, endpointOptions); + }; + return Object.assign(newApi, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) + }); +} + +// pkg/dist-src/index.js +var request = withDefaults(import_endpoint.endpoint, { + headers: { + "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + } +}); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -"use strict"; +/***/ }), + +/***/ 13735: +/***/ (function(__unused_webpack_module, exports) { + + +======= +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 var __awaiter = (this && this.__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) { @@ -2413,15 +5444,29 @@ exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHand /***/ }), +<<<<<<< HEAD +/***/ 15477: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +======= /***/ 9915: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { "use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /* eslint-disable @typescript-eslint/no-explicit-any */ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; +<<<<<<< HEAD + 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); +======= Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; @@ -2434,7 +5479,11 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; +<<<<<<< HEAD + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); +======= if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 __setModuleDefault(result, mod); return result; }; @@ -2451,8 +5500,14 @@ 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(__nccwpck_require__(13685)); const https = __importStar(__nccwpck_require__(95687)); +<<<<<<< HEAD +const pm = __importStar(__nccwpck_require__(39659)); +const tunnel = __importStar(__nccwpck_require__(62098)); +const undici_1 = __nccwpck_require__(40992); +======= const pm = __importStar(__nccwpck_require__(9810)); const tunnel = __importStar(__nccwpck_require__(16563)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 var HttpCodes; (function (HttpCodes) { HttpCodes[HttpCodes["OK"] = 200] = "OK"; @@ -2482,16 +5537,16 @@ var HttpCodes; HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway"; HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable"; HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout"; -})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {})); +})(HttpCodes || (exports.HttpCodes = HttpCodes = {})); var Headers; (function (Headers) { Headers["Accept"] = "accept"; Headers["ContentType"] = "content-type"; -})(Headers = exports.Headers || (exports.Headers = {})); +})(Headers || (exports.Headers = Headers = {})); var MediaTypes; (function (MediaTypes) { MediaTypes["ApplicationJson"] = "application/json"; -})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {})); +})(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 @@ -2540,6 +5595,22 @@ class HttpClientResponse { resolve(output.toString()); }); })); +<<<<<<< HEAD + }); + } + 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)); + }); + })); +======= +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }); } } @@ -2847,6 +5918,15 @@ class HttpClient { 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 = {}; info.parsedUrl = requestUrl; @@ -2946,6 +6026,33 @@ class HttpClient { } return agent; } +<<<<<<< HEAD + _getProxyAgentDispatcher(parsedUrl, proxyUrl) { + let proxyAgent; + if (this._keepAlive) { + proxyAgent = this._proxyAgentDispatcher; + } + // if agent is already assigned use that agent. + 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: `${proxyUrl.username}:${proxyUrl.password}` + }))); + this._proxyAgentDispatcher = proxyAgent; + if (usingSsl && this._ignoreSslError) { + // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process + // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options + // we have to cast it to any and change it directly + proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { + rejectUnauthorized: false + }); + } + return proxyAgent; + } +======= +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 _performExponentialBackoff(retryNumber) { return __awaiter(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); @@ -3025,10 +6132,13 @@ const lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCa /***/ }), +<<<<<<< HEAD +/***/ 39659: +======= /***/ 9810: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.checkBypass = exports.getProxyUrl = void 0; @@ -3046,7 +6156,17 @@ function getProxyUrl(reqUrl) { } })(); if (proxyVar) { +<<<<<<< HEAD + try { + return new URL(proxyVar); + } + catch (_a) { + if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://')) + return new URL(`http://${proxyVar}`); + } +======= return new URL(proxyVar); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } else { return undefined; @@ -3057,6 +6177,13 @@ function checkBypass(reqUrl) { if (!reqUrl.hostname) { return false; } +<<<<<<< HEAD + const reqHost = reqUrl.hostname; + if (isLoopbackAddress(reqHost)) { + return true; + } +======= +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || ''; if (!noProxy) { return false; @@ -3082,21 +6209,38 @@ function checkBypass(reqUrl) { .split(',') .map(x => x.trim().toUpperCase()) .filter(x => x)) { - if (upperReqHosts.some(x => x === upperNoProxyItem)) { + if (upperNoProxyItem === '*' || + upperReqHosts.some(x => x === upperNoProxyItem || + x.endsWith(`.${upperNoProxyItem}`) || + (upperNoProxyItem.startsWith('.') && + x.endsWith(`${upperNoProxyItem}`)))) { return true; } } return false; } exports.checkBypass = checkBypass; +<<<<<<< HEAD +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]')); +} +======= +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 //# sourceMappingURL=proxy.js.map /***/ }), +<<<<<<< HEAD +/***/ 84181: +======= /***/ 63088: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; // Runtime header offsets @@ -3518,18 +6662,27 @@ exports.demangle = demangle; /***/ }), +<<<<<<< HEAD +/***/ 47962: +======= /***/ 18943: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AwsCrc32 = void 0; +<<<<<<< HEAD +var tslib_1 = __nccwpck_require__(30228); +var util_1 = __nccwpck_require__(7919); +var index_1 = __nccwpck_require__(30343); +======= var tslib_1 = __nccwpck_require__(39385); var util_1 = __nccwpck_require__(27211); var index_1 = __nccwpck_require__(51224); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 var AwsCrc32 = /** @class */ (function () { function AwsCrc32() { this.crc32 = new index_1.Crc32(); @@ -3540,28 +6693,39 @@ var AwsCrc32 = /** @class */ (function () { this.crc32.update((0, util_1.convertToBuffer)(toHash)); }; AwsCrc32.prototype.digest = function () { - return (0, tslib_1.__awaiter)(this, void 0, void 0, function () { - return (0, tslib_1.__generator)(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, (0, util_1.numToUint8)(this.crc32.digest())]; }); }); }; + AwsCrc32.prototype.reset = function () { + this.crc32 = new index_1.Crc32(); + }; return AwsCrc32; }()); exports.AwsCrc32 = AwsCrc32; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXdzX2NyYzMyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2F3c19jcmMzMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0VBQW9FO0FBQ3BFLHNDQUFzQzs7OztBQUd0Qyx5Q0FBNEU7QUFDNUUsaUNBQWdDO0FBRWhDO0lBQUE7UUFDbUIsVUFBSyxHQUFHLElBQUksYUFBSyxFQUFFLENBQUM7SUFXdkMsQ0FBQztJQVRDLHlCQUFNLEdBQU4sVUFBTyxNQUFrQjtRQUN2QixJQUFJLElBQUEsa0JBQVcsRUFBQyxNQUFNLENBQUM7WUFBRSxPQUFPO1FBRWhDLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxDQUFDLElBQUEsc0JBQWUsRUFBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO0lBQzdDLENBQUM7SUFFSyx5QkFBTSxHQUFaOzs7Z0JBQ0Usc0JBQU8sSUFBQSxpQkFBVSxFQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBQzs7O0tBQ3hDO0lBQ0gsZUFBQztBQUFELENBQUMsQUFaRCxJQVlDO0FBWlksNEJBQVEiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgQW1hem9uLmNvbSBJbmMuIG9yIGl0cyBhZmZpbGlhdGVzLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuLy8gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEFwYWNoZS0yLjBcblxuaW1wb3J0IHsgSGFzaCwgU291cmNlRGF0YSB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgY29udmVydFRvQnVmZmVyLCBpc0VtcHR5RGF0YSwgbnVtVG9VaW50OCB9IGZyb20gXCJAYXdzLWNyeXB0by91dGlsXCI7XG5pbXBvcnQgeyBDcmMzMiB9IGZyb20gXCIuL2luZGV4XCI7XG5cbmV4cG9ydCBjbGFzcyBBd3NDcmMzMiBpbXBsZW1lbnRzIEhhc2gge1xuICBwcml2YXRlIHJlYWRvbmx5IGNyYzMyID0gbmV3IENyYzMyKCk7XG5cbiAgdXBkYXRlKHRvSGFzaDogU291cmNlRGF0YSkge1xuICAgIGlmIChpc0VtcHR5RGF0YSh0b0hhc2gpKSByZXR1cm47XG5cbiAgICB0aGlzLmNyYzMyLnVwZGF0ZShjb252ZXJ0VG9CdWZmZXIodG9IYXNoKSk7XG4gIH1cblxuICBhc3luYyBkaWdlc3QoKTogUHJvbWlzZTxVaW50OEFycmF5PiB7XG4gICAgcmV0dXJuIG51bVRvVWludDgodGhpcy5jcmMzMi5kaWdlc3QoKSk7XG4gIH1cbn1cbiJdfQ== +//# sourceMappingURL=aws_crc32.js.map /***/ }), +<<<<<<< HEAD +/***/ 30343: +======= /***/ 51224: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AwsCrc32 = exports.Crc32 = exports.crc32 = void 0; +<<<<<<< HEAD +var tslib_1 = __nccwpck_require__(30228); +var util_1 = __nccwpck_require__(7919); +======= var tslib_1 = __nccwpck_require__(39385); var util_1 = __nccwpck_require__(27211); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 function crc32(data) { return new Crc32().update(data).digest(); } @@ -3573,7 +6737,7 @@ var Crc32 = /** @class */ (function () { Crc32.prototype.update = function (data) { var e_1, _a; try { - for (var data_1 = (0, tslib_1.__values)(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { var byte = data_1_1.value; this.checksum = (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff]; @@ -3662,315 +6826,332 @@ var a_lookUpTable = [ 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D, ]; var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookUpTable); +<<<<<<< HEAD +var aws_crc32_1 = __nccwpck_require__(47962); +======= var aws_crc32_1 = __nccwpck_require__(18943); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "AwsCrc32", ({ enumerable: true, get: function () { return aws_crc32_1.AwsCrc32; } })); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLHlDQUFpRDtBQUVqRCxTQUFnQixLQUFLLENBQUMsSUFBZ0I7SUFDcEMsT0FBTyxJQUFJLEtBQUssRUFBRSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQztBQUMzQyxDQUFDO0FBRkQsc0JBRUM7QUFFRDtJQUFBO1FBQ1UsYUFBUSxHQUFHLFVBQVUsQ0FBQztJQWNoQyxDQUFDO0lBWkMsc0JBQU0sR0FBTixVQUFPLElBQWdCOzs7WUFDckIsS0FBbUIsSUFBQSxTQUFBLHNCQUFBLElBQUksQ0FBQSwwQkFBQSw0Q0FBRTtnQkFBcEIsSUFBTSxJQUFJLGlCQUFBO2dCQUNiLElBQUksQ0FBQyxRQUFRO29CQUNYLENBQUMsSUFBSSxDQUFDLFFBQVEsS0FBSyxDQUFDLENBQUMsR0FBRyxXQUFXLENBQUMsQ0FBQyxJQUFJLENBQUMsUUFBUSxHQUFHLElBQUksQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDO2FBQ3RFOzs7Ozs7Ozs7UUFFRCxPQUFPLElBQUksQ0FBQztJQUNkLENBQUM7SUFFRCxzQkFBTSxHQUFOO1FBQ0UsT0FBTyxDQUFDLElBQUksQ0FBQyxRQUFRLEdBQUcsVUFBVSxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQzVDLENBQUM7SUFDSCxZQUFDO0FBQUQsQ0FBQyxBQWZELElBZUM7QUFmWSxzQkFBSztBQWlCbEIsa0JBQWtCO0FBQ2xCLElBQU0sYUFBYSxHQUFHO0lBQ3BCLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUMsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVTtJQUM5QyxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVO0lBQzlDLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7Q0FDL0MsQ0FBQztBQUNGLElBQU0sV0FBVyxHQUFnQixJQUFBLHNCQUFlLEVBQUMsYUFBYSxDQUFDLENBQUE7QUFDL0QseUNBQXVDO0FBQTlCLHFHQUFBLFFBQVEsT0FBQSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7dWludDMyQXJyYXlGcm9tfSBmcm9tIFwiQGF3cy1jcnlwdG8vdXRpbFwiO1xuXG5leHBvcnQgZnVuY3Rpb24gY3JjMzIoZGF0YTogVWludDhBcnJheSk6IG51bWJlciB7XG4gIHJldHVybiBuZXcgQ3JjMzIoKS51cGRhdGUoZGF0YSkuZGlnZXN0KCk7XG59XG5cbmV4cG9ydCBjbGFzcyBDcmMzMiB7XG4gIHByaXZhdGUgY2hlY2tzdW0gPSAweGZmZmZmZmZmO1xuXG4gIHVwZGF0ZShkYXRhOiBVaW50OEFycmF5KTogdGhpcyB7XG4gICAgZm9yIChjb25zdCBieXRlIG9mIGRhdGEpIHtcbiAgICAgIHRoaXMuY2hlY2tzdW0gPVxuICAgICAgICAodGhpcy5jaGVja3N1bSA+Pj4gOCkgXiBsb29rdXBUYWJsZVsodGhpcy5jaGVja3N1bSBeIGJ5dGUpICYgMHhmZl07XG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXM7XG4gIH1cblxuICBkaWdlc3QoKTogbnVtYmVyIHtcbiAgICByZXR1cm4gKHRoaXMuY2hlY2tzdW0gXiAweGZmZmZmZmZmKSA+Pj4gMDtcbiAgfVxufVxuXG4vLyBwcmV0dGllci1pZ25vcmVcbmNvbnN0IGFfbG9va1VwVGFibGUgPSBbXG4gIDB4MDAwMDAwMDAsIDB4NzcwNzMwOTYsIDB4RUUwRTYxMkMsIDB4OTkwOTUxQkEsXG4gIDB4MDc2REM0MTksIDB4NzA2QUY0OEYsIDB4RTk2M0E1MzUsIDB4OUU2NDk1QTMsXG4gIDB4MEVEQjg4MzIsIDB4NzlEQ0I4QTQsIDB4RTBENUU5MUUsIDB4OTdEMkQ5ODgsXG4gIDB4MDlCNjRDMkIsIDB4N0VCMTdDQkQsIDB4RTdCODJEMDcsIDB4OTBCRjFEOTEsXG4gIDB4MURCNzEwNjQsIDB4NkFCMDIwRjIsIDB4RjNCOTcxNDgsIDB4ODRCRTQxREUsXG4gIDB4MUFEQUQ0N0QsIDB4NkREREU0RUIsIDB4RjRENEI1NTEsIDB4ODNEMzg1QzcsXG4gIDB4MTM2Qzk4NTYsIDB4NjQ2QkE4QzAsIDB4RkQ2MkY5N0EsIDB4OEE2NUM5RUMsXG4gIDB4MTQwMTVDNEYsIDB4NjMwNjZDRDksIDB4RkEwRjNENjMsIDB4OEQwODBERjUsXG4gIDB4M0I2RTIwQzgsIDB4NEM2OTEwNUUsIDB4RDU2MDQxRTQsIDB4QTI2NzcxNzIsXG4gIDB4M0MwM0U0RDEsIDB4NEIwNEQ0NDcsIDB4RDIwRDg1RkQsIDB4QTUwQUI1NkIsXG4gIDB4MzVCNUE4RkEsIDB4NDJCMjk4NkMsIDB4REJCQkM5RDYsIDB4QUNCQ0Y5NDAsXG4gIDB4MzJEODZDRTMsIDB4NDVERjVDNzUsIDB4RENENjBEQ0YsIDB4QUJEMTNENTksXG4gIDB4MjZEOTMwQUMsIDB4NTFERTAwM0EsIDB4QzhENzUxODAsIDB4QkZEMDYxMTYsXG4gIDB4MjFCNEY0QjUsIDB4NTZCM0M0MjMsIDB4Q0ZCQTk1OTksIDB4QjhCREE1MEYsXG4gIDB4MjgwMkI4OUUsIDB4NUYwNTg4MDgsIDB4QzYwQ0Q5QjIsIDB4QjEwQkU5MjQsXG4gIDB4MkY2RjdDODcsIDB4NTg2ODRDMTEsIDB4QzE2MTFEQUIsIDB4QjY2NjJEM0QsXG4gIDB4NzZEQzQxOTAsIDB4MDFEQjcxMDYsIDB4OThEMjIwQkMsIDB4RUZENTEwMkEsXG4gIDB4NzFCMTg1ODksIDB4MDZCNkI1MUYsIDB4OUZCRkU0QTUsIDB4RThCOEQ0MzMsXG4gIDB4NzgwN0M5QTIsIDB4MEYwMEY5MzQsIDB4OTYwOUE4OEUsIDB4RTEwRTk4MTgsXG4gIDB4N0Y2QTBEQkIsIDB4MDg2RDNEMkQsIDB4OTE2NDZDOTcsIDB4RTY2MzVDMDEsXG4gIDB4NkI2QjUxRjQsIDB4MUM2QzYxNjIsIDB4ODU2NTMwRDgsIDB4RjI2MjAwNEUsXG4gIDB4NkMwNjk1RUQsIDB4MUIwMUE1N0IsIDB4ODIwOEY0QzEsIDB4RjUwRkM0NTcsXG4gIDB4NjVCMEQ5QzYsIDB4MTJCN0U5NTAsIDB4OEJCRUI4RUEsIDB4RkNCOTg4N0MsXG4gIDB4NjJERDFEREYsIDB4MTVEQTJENDksIDB4OENEMzdDRjMsIDB4RkJENDRDNjUsXG4gIDB4NERCMjYxNTgsIDB4M0FCNTUxQ0UsIDB4QTNCQzAwNzQsIDB4RDRCQjMwRTIsXG4gIDB4NEFERkE1NDEsIDB4M0REODk1RDcsIDB4QTREMUM0NkQsIDB4RDNENkY0RkIsXG4gIDB4NDM2OUU5NkEsIDB4MzQ2RUQ5RkMsIDB4QUQ2Nzg4NDYsIDB4REE2MEI4RDAsXG4gIDB4NDQwNDJENzMsIDB4MzMwMzFERTUsIDB4QUEwQTRDNUYsIDB4REQwRDdDQzksXG4gIDB4NTAwNTcxM0MsIDB4MjcwMjQxQUEsIDB4QkUwQjEwMTAsIDB4QzkwQzIwODYsXG4gIDB4NTc2OEI1MjUsIDB4MjA2Rjg1QjMsIDB4Qjk2NkQ0MDksIDB4Q0U2MUU0OUYsXG4gIDB4NUVERUY5MEUsIDB4MjlEOUM5OTgsIDB4QjBEMDk4MjIsIDB4QzdEN0E4QjQsXG4gIDB4NTlCMzNEMTcsIDB4MkVCNDBEODEsIDB4QjdCRDVDM0IsIDB4QzBCQTZDQUQsXG4gIDB4RURCODgzMjAsIDB4OUFCRkIzQjYsIDB4MDNCNkUyMEMsIDB4NzRCMUQyOUEsXG4gIDB4RUFENTQ3MzksIDB4OUREMjc3QUYsIDB4MDREQjI2MTUsIDB4NzNEQzE2ODMsXG4gIDB4RTM2MzBCMTIsIDB4OTQ2NDNCODQsIDB4MEQ2RDZBM0UsIDB4N0E2QTVBQTgsXG4gIDB4RTQwRUNGMEIsIDB4OTMwOUZGOUQsIDB4MEEwMEFFMjcsIDB4N0QwNzlFQjEsXG4gIDB4RjAwRjkzNDQsIDB4ODcwOEEzRDIsIDB4MUUwMUYyNjgsIDB4NjkwNkMyRkUsXG4gIDB4Rjc2MjU3NUQsIDB4ODA2NTY3Q0IsIDB4MTk2QzM2NzEsIDB4NkU2QjA2RTcsXG4gIDB4RkVENDFCNzYsIDB4ODlEMzJCRTAsIDB4MTBEQTdBNUEsIDB4NjdERDRBQ0MsXG4gIDB4RjlCOURGNkYsIDB4OEVCRUVGRjksIDB4MTdCN0JFNDMsIDB4NjBCMDhFRDUsXG4gIDB4RDZENkEzRTgsIDB4QTFEMTkzN0UsIDB4MzhEOEMyQzQsIDB4NEZERkYyNTIsXG4gIDB4RDFCQjY3RjEsIDB4QTZCQzU3NjcsIDB4M0ZCNTA2REQsIDB4NDhCMjM2NEIsXG4gIDB4RDgwRDJCREEsIDB4QUYwQTFCNEMsIDB4MzYwMzRBRjYsIDB4NDEwNDdBNjAsXG4gIDB4REY2MEVGQzMsIDB4QTg2N0RGNTUsIDB4MzE2RThFRUYsIDB4NDY2OUJFNzksXG4gIDB4Q0I2MUIzOEMsIDB4QkM2NjgzMUEsIDB4MjU2RkQyQTAsIDB4NTI2OEUyMzYsXG4gIDB4Q0MwQzc3OTUsIDB4QkIwQjQ3MDMsIDB4MjIwMjE2QjksIDB4NTUwNTI2MkYsXG4gIDB4QzVCQTNCQkUsIDB4QjJCRDBCMjgsIDB4MkJCNDVBOTIsIDB4NUNCMzZBMDQsXG4gIDB4QzJEN0ZGQTcsIDB4QjVEMENGMzEsIDB4MkNEOTlFOEIsIDB4NUJERUFFMUQsXG4gIDB4OUI2NEMyQjAsIDB4RUM2M0YyMjYsIDB4NzU2QUEzOUMsIDB4MDI2RDkzMEEsXG4gIDB4OUMwOTA2QTksIDB4RUIwRTM2M0YsIDB4NzIwNzY3ODUsIDB4MDUwMDU3MTMsXG4gIDB4OTVCRjRBODIsIDB4RTJCODdBMTQsIDB4N0JCMTJCQUUsIDB4MENCNjFCMzgsXG4gIDB4OTJEMjhFOUIsIDB4RTVENUJFMEQsIDB4N0NEQ0VGQjcsIDB4MEJEQkRGMjEsXG4gIDB4ODZEM0QyRDQsIDB4RjFENEUyNDIsIDB4NjhEREIzRjgsIDB4MUZEQTgzNkUsXG4gIDB4ODFCRTE2Q0QsIDB4RjZCOTI2NUIsIDB4NkZCMDc3RTEsIDB4MThCNzQ3NzcsXG4gIDB4ODgwODVBRTYsIDB4RkYwRjZBNzAsIDB4NjYwNjNCQ0EsIDB4MTEwMTBCNUMsXG4gIDB4OEY2NTlFRkYsIDB4Rjg2MkFFNjksIDB4NjE2QkZGRDMsIDB4MTY2Q0NGNDUsXG4gIDB4QTAwQUUyNzgsIDB4RDcwREQyRUUsIDB4NEUwNDgzNTQsIDB4MzkwM0IzQzIsXG4gIDB4QTc2NzI2NjEsIDB4RDA2MDE2RjcsIDB4NDk2OTQ3NEQsIDB4M0U2RTc3REIsXG4gIDB4QUVEMTZBNEEsIDB4RDlENjVBREMsIDB4NDBERjBCNjYsIDB4MzdEODNCRjAsXG4gIDB4QTlCQ0FFNTMsIDB4REVCQjlFQzUsIDB4NDdCMkNGN0YsIDB4MzBCNUZGRTksXG4gIDB4QkRCREYyMUMsIDB4Q0FCQUMyOEEsIDB4NTNCMzkzMzAsIDB4MjRCNEEzQTYsXG4gIDB4QkFEMDM2MDUsIDB4Q0RENzA2OTMsIDB4NTRERTU3MjksIDB4MjNEOTY3QkYsXG4gIDB4QjM2NjdBMkUsIDB4QzQ2MTRBQjgsIDB4NUQ2ODFCMDIsIDB4MkE2RjJCOTQsXG4gIDB4QjQwQkJFMzcsIDB4QzMwQzhFQTEsIDB4NUEwNURGMUIsIDB4MkQwMkVGOEQsXG5dO1xuY29uc3QgbG9va3VwVGFibGU6IFVpbnQzMkFycmF5ID0gdWludDMyQXJyYXlGcm9tKGFfbG9va1VwVGFibGUpXG5leHBvcnQgeyBBd3NDcmMzMiB9IGZyb20gXCIuL2F3c19jcmMzMlwiO1xuIl19 +//# sourceMappingURL=index.js.map /***/ }), +<<<<<<< HEAD +/***/ 30228: +======= /***/ 39385: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ - -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - - __extends = function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __createBinding = function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }; - - __exportStar = function (m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; - }; - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - __spreadArrays = function () { - 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; - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, privateMap) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to get private field on non-instance"); - } - return privateMap.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, privateMap, value) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to set private field on non-instance"); - } - privateMap.set(receiver, value); - return value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +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. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + 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; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), +<<<<<<< HEAD +/***/ 4353: +======= /***/ 95651: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AwsCrc32c = void 0; +<<<<<<< HEAD +var tslib_1 = __nccwpck_require__(35315); +var util_1 = __nccwpck_require__(7919); +var index_1 = __nccwpck_require__(21256); +======= var tslib_1 = __nccwpck_require__(22850); var util_1 = __nccwpck_require__(27211); var index_1 = __nccwpck_require__(47003); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 var AwsCrc32c = /** @class */ (function () { function AwsCrc32c() { this.crc32c = new index_1.Crc32c(); @@ -3981,30 +7162,41 @@ var AwsCrc32c = /** @class */ (function () { this.crc32c.update((0, util_1.convertToBuffer)(toHash)); }; AwsCrc32c.prototype.digest = function () { - return (0, tslib_1.__awaiter)(this, void 0, void 0, function () { - return (0, tslib_1.__generator)(this, function (_a) { + return tslib_1.__awaiter(this, void 0, void 0, function () { + return tslib_1.__generator(this, function (_a) { return [2 /*return*/, (0, util_1.numToUint8)(this.crc32c.digest())]; }); }); }; + AwsCrc32c.prototype.reset = function () { + this.crc32c = new index_1.Crc32c(); + }; return AwsCrc32c; }()); exports.AwsCrc32c = AwsCrc32c; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXdzX2NyYzMyYy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9hd3NfY3JjMzJjLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxvRUFBb0U7QUFDcEUsc0NBQXNDOzs7O0FBR3RDLHlDQUE0RTtBQUM1RSxpQ0FBaUM7QUFFakM7SUFBQTtRQUNtQixXQUFNLEdBQUcsSUFBSSxjQUFNLEVBQUUsQ0FBQztJQVd6QyxDQUFDO0lBVEMsMEJBQU0sR0FBTixVQUFPLE1BQWtCO1FBQ3ZCLElBQUksSUFBQSxrQkFBVyxFQUFDLE1BQU0sQ0FBQztZQUFFLE9BQU87UUFFaEMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBQSxzQkFBZSxFQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7SUFDOUMsQ0FBQztJQUVLLDBCQUFNLEdBQVo7OztnQkFDRSxzQkFBTyxJQUFBLGlCQUFVLEVBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUUsQ0FBQyxFQUFDOzs7S0FDekM7SUFDSCxnQkFBQztBQUFELENBQUMsQUFaRCxJQVlDO0FBWlksOEJBQVMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgQW1hem9uLmNvbSBJbmMuIG9yIGl0cyBhZmZpbGlhdGVzLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuLy8gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEFwYWNoZS0yLjBcblxuaW1wb3J0IHsgSGFzaCwgU291cmNlRGF0YSB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgY29udmVydFRvQnVmZmVyLCBpc0VtcHR5RGF0YSwgbnVtVG9VaW50OCB9IGZyb20gXCJAYXdzLWNyeXB0by91dGlsXCI7XG5pbXBvcnQgeyBDcmMzMmMgfSBmcm9tIFwiLi9pbmRleFwiO1xuXG5leHBvcnQgY2xhc3MgQXdzQ3JjMzJjIGltcGxlbWVudHMgSGFzaCB7XG4gIHByaXZhdGUgcmVhZG9ubHkgY3JjMzJjID0gbmV3IENyYzMyYygpO1xuXG4gIHVwZGF0ZSh0b0hhc2g6IFNvdXJjZURhdGEpIHtcbiAgICBpZiAoaXNFbXB0eURhdGEodG9IYXNoKSkgcmV0dXJuO1xuXG4gICAgdGhpcy5jcmMzMmMudXBkYXRlKGNvbnZlcnRUb0J1ZmZlcih0b0hhc2gpKTtcbiAgfVxuXG4gIGFzeW5jIGRpZ2VzdCgpOiBQcm9taXNlPFVpbnQ4QXJyYXk+IHtcbiAgICByZXR1cm4gbnVtVG9VaW50OCh0aGlzLmNyYzMyYy5kaWdlc3QoKSk7XG4gIH1cbn1cbiJdfQ== +//# sourceMappingURL=aws_crc32c.js.map /***/ }), +<<<<<<< HEAD +/***/ 21256: +======= /***/ 47003: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AwsCrc32c = exports.Crc32c = exports.crc32c = void 0; +<<<<<<< HEAD +var tslib_1 = __nccwpck_require__(35315); +var util_1 = __nccwpck_require__(7919); +======= var tslib_1 = __nccwpck_require__(22850); var util_1 = __nccwpck_require__(27211); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 function crc32c(data) { return new Crc32c().update(data).digest(); } @@ -4016,7 +7208,7 @@ var Crc32c = /** @class */ (function () { Crc32c.prototype.update = function (data) { var e_1, _a; try { - for (var data_1 = (0, tslib_1.__values)(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { + for (var data_1 = tslib_1.__values(data), data_1_1 = data_1.next(); !data_1_1.done; data_1_1 = data_1.next()) { var byte = data_1_1.value; this.checksum = (this.checksum >>> 8) ^ lookupTable[(this.checksum ^ byte) & 0xff]; @@ -4073,313 +7265,328 @@ var a_lookupTable = [ 0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E, 0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351, ]; var lookupTable = (0, util_1.uint32ArrayFrom)(a_lookupTable); +<<<<<<< HEAD +var aws_crc32c_1 = __nccwpck_require__(4353); +======= var aws_crc32c_1 = __nccwpck_require__(95651); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "AwsCrc32c", ({ enumerable: true, get: function () { return aws_crc32c_1.AwsCrc32c; } })); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9FQUFvRTtBQUNwRSxzQ0FBc0M7Ozs7QUFFdEMseUNBQWlEO0FBRWpELFNBQWdCLE1BQU0sQ0FBQyxJQUFnQjtJQUNyQyxPQUFPLElBQUksTUFBTSxFQUFFLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDO0FBQzVDLENBQUM7QUFGRCx3QkFFQztBQUVEO0lBQUE7UUFDVSxhQUFRLEdBQUcsVUFBVSxDQUFDO0lBY2hDLENBQUM7SUFaQyx1QkFBTSxHQUFOLFVBQU8sSUFBZ0I7OztZQUNyQixLQUFtQixJQUFBLFNBQUEsc0JBQUEsSUFBSSxDQUFBLDBCQUFBLDRDQUFFO2dCQUFwQixJQUFNLElBQUksaUJBQUE7Z0JBQ2IsSUFBSSxDQUFDLFFBQVE7b0JBQ1gsQ0FBQyxJQUFJLENBQUMsUUFBUSxLQUFLLENBQUMsQ0FBQyxHQUFHLFdBQVcsQ0FBQyxDQUFDLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUM7YUFDdEU7Ozs7Ozs7OztRQUVELE9BQU8sSUFBSSxDQUFDO0lBQ2QsQ0FBQztJQUVELHVCQUFNLEdBQU47UUFDRSxPQUFPLENBQUMsSUFBSSxDQUFDLFFBQVEsR0FBRyxVQUFVLENBQUMsS0FBSyxDQUFDLENBQUM7SUFDNUMsQ0FBQztJQUNILGFBQUM7QUFBRCxDQUFDLEFBZkQsSUFlQztBQWZZLHdCQUFNO0FBaUJuQixrQkFBa0I7QUFDbEIsSUFBTSxhQUFhLEdBQUc7SUFDcEIsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7SUFDOUYsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFVBQVU7Q0FDL0YsQ0FBQztBQUVGLElBQU0sV0FBVyxHQUFnQixJQUFBLHNCQUFlLEVBQUMsYUFBYSxDQUFDLENBQUE7QUFDL0QsMkNBQXlDO0FBQWhDLHVHQUFBLFNBQVMsT0FBQSIsInNvdXJjZXNDb250ZW50IjpbIi8vIENvcHlyaWdodCBBbWF6b24uY29tIEluYy4gb3IgaXRzIGFmZmlsaWF0ZXMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuXG4vLyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogQXBhY2hlLTIuMFxuXG5pbXBvcnQge3VpbnQzMkFycmF5RnJvbX0gZnJvbSBcIkBhd3MtY3J5cHRvL3V0aWxcIjtcblxuZXhwb3J0IGZ1bmN0aW9uIGNyYzMyYyhkYXRhOiBVaW50OEFycmF5KTogbnVtYmVyIHtcbiAgcmV0dXJuIG5ldyBDcmMzMmMoKS51cGRhdGUoZGF0YSkuZGlnZXN0KCk7XG59XG5cbmV4cG9ydCBjbGFzcyBDcmMzMmMge1xuICBwcml2YXRlIGNoZWNrc3VtID0gMHhmZmZmZmZmZjtcblxuICB1cGRhdGUoZGF0YTogVWludDhBcnJheSk6IHRoaXMge1xuICAgIGZvciAoY29uc3QgYnl0ZSBvZiBkYXRhKSB7XG4gICAgICB0aGlzLmNoZWNrc3VtID1cbiAgICAgICAgKHRoaXMuY2hlY2tzdW0gPj4+IDgpIF4gbG9va3VwVGFibGVbKHRoaXMuY2hlY2tzdW0gXiBieXRlKSAmIDB4ZmZdO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzO1xuICB9XG5cbiAgZGlnZXN0KCk6IG51bWJlciB7XG4gICAgcmV0dXJuICh0aGlzLmNoZWNrc3VtIF4gMHhmZmZmZmZmZikgPj4+IDA7XG4gIH1cbn1cblxuLy8gcHJldHRpZXItaWdub3JlXG5jb25zdCBhX2xvb2t1cFRhYmxlID0gW1xuICAweDAwMDAwMDAwLCAweEYyNkI4MzAzLCAweEUxM0I3MEY3LCAweDEzNTBGM0Y0LCAweEM3OUE5NzFGLCAweDM1RjExNDFDLCAweDI2QTFFN0U4LCAweEQ0Q0E2NEVCLFxuICAweDhBRDk1OENGLCAweDc4QjJEQkNDLCAweDZCRTIyODM4LCAweDk5ODlBQjNCLCAweDRENDNDRkQwLCAweEJGMjg0Q0QzLCAweEFDNzhCRjI3LCAweDVFMTMzQzI0LFxuICAweDEwNUVDNzZGLCAweEUyMzU0NDZDLCAweEYxNjVCNzk4LCAweDAzMEUzNDlCLCAweEQ3QzQ1MDcwLCAweDI1QUZEMzczLCAweDM2RkYyMDg3LCAweEM0OTRBMzg0LFxuICAweDlBODc5RkEwLCAweDY4RUMxQ0EzLCAweDdCQkNFRjU3LCAweDg5RDc2QzU0LCAweDVEMUQwOEJGLCAweEFGNzY4QkJDLCAweEJDMjY3ODQ4LCAweDRFNERGQjRCLFxuICAweDIwQkQ4RURFLCAweEQyRDYwRERELCAweEMxODZGRTI5LCAweDMzRUQ3RDJBLCAweEU3MjcxOUMxLCAweDE1NEM5QUMyLCAweDA2MUM2OTM2LCAweEY0NzdFQTM1LFxuICAweEFBNjRENjExLCAweDU4MEY1NTEyLCAweDRCNUZBNkU2LCAweEI5MzQyNUU1LCAweDZERkU0MTBFLCAweDlGOTVDMjBELCAweDhDQzUzMUY5LCAweDdFQUVCMkZBLFxuICAweDMwRTM0OUIxLCAweEMyODhDQUIyLCAweEQxRDgzOTQ2LCAweDIzQjNCQTQ1LCAweEY3NzlERUFFLCAweDA1MTI1REFELCAweDE2NDJBRTU5LCAweEU0MjkyRDVBLFxuICAweEJBM0ExMTdFLCAweDQ4NTE5MjdELCAweDVCMDE2MTg5LCAweEE5NkFFMjhBLCAweDdEQTA4NjYxLCAweDhGQ0IwNTYyLCAweDlDOUJGNjk2LCAweDZFRjA3NTk1LFxuICAweDQxN0IxREJDLCAweEIzMTA5RUJGLCAweEEwNDA2RDRCLCAweDUyMkJFRTQ4LCAweDg2RTE4QUEzLCAweDc0OEEwOUEwLCAweDY3REFGQTU0LCAweDk1QjE3OTU3LFxuICAweENCQTI0NTczLCAweDM5QzlDNjcwLCAweDJBOTkzNTg0LCAweEQ4RjJCNjg3LCAweDBDMzhEMjZDLCAweEZFNTM1MTZGLCAweEVEMDNBMjlCLCAweDFGNjgyMTk4LFxuICAweDUxMjVEQUQzLCAweEEzNEU1OUQwLCAweEIwMUVBQTI0LCAweDQyNzUyOTI3LCAweDk2QkY0RENDLCAweDY0RDRDRUNGLCAweDc3ODQzRDNCLCAweDg1RUZCRTM4LFxuICAweERCRkM4MjFDLCAweDI5OTcwMTFGLCAweDNBQzdGMkVCLCAweEM4QUM3MUU4LCAweDFDNjYxNTAzLCAweEVFMEQ5NjAwLCAweEZENUQ2NUY0LCAweDBGMzZFNkY3LFxuICAweDYxQzY5MzYyLCAweDkzQUQxMDYxLCAweDgwRkRFMzk1LCAweDcyOTY2MDk2LCAweEE2NUMwNDdELCAweDU0Mzc4NzdFLCAweDQ3Njc3NDhBLCAweEI1MENGNzg5LFxuICAweEVCMUZDQkFELCAweDE5NzQ0OEFFLCAweDBBMjRCQjVBLCAweEY4NEYzODU5LCAweDJDODU1Q0IyLCAweERFRUVERkIxLCAweENEQkUyQzQ1LCAweDNGRDVBRjQ2LFxuICAweDcxOTg1NDBELCAweDgzRjNENzBFLCAweDkwQTMyNEZBLCAweDYyQzhBN0Y5LCAweEI2MDJDMzEyLCAweDQ0Njk0MDExLCAweDU3MzlCM0U1LCAweEE1NTIzMEU2LFxuICAweEZCNDEwQ0MyLCAweDA5MkE4RkMxLCAweDFBN0E3QzM1LCAweEU4MTFGRjM2LCAweDNDREI5QkRELCAweENFQjAxOERFLCAweERERTBFQjJBLCAweDJGOEI2ODI5LFxuICAweDgyRjYzQjc4LCAweDcwOURCODdCLCAweDYzQ0Q0QjhGLCAweDkxQTZDODhDLCAweDQ1NkNBQzY3LCAweEI3MDcyRjY0LCAweEE0NTdEQzkwLCAweDU2M0M1RjkzLFxuICAweDA4MkY2M0I3LCAweEZBNDRFMEI0LCAweEU5MTQxMzQwLCAweDFCN0Y5MDQzLCAweENGQjVGNEE4LCAweDNEREU3N0FCLCAweDJFOEU4NDVGLCAweERDRTUwNzVDLFxuICAweDkyQThGQzE3LCAweDYwQzM3RjE0LCAweDczOTM4Q0UwLCAweDgxRjgwRkUzLCAweDU1MzI2QjA4LCAweEE3NTlFODBCLCAweEI0MDkxQkZGLCAweDQ2NjI5OEZDLFxuICAweDE4NzFBNEQ4LCAweEVBMUEyN0RCLCAweEY5NEFENDJGLCAweDBCMjE1NzJDLCAweERGRUIzM0M3LCAweDJEODBCMEM0LCAweDNFRDA0MzMwLCAweENDQkJDMDMzLFxuICAweEEyNEJCNUE2LCAweDUwMjAzNkE1LCAweDQzNzBDNTUxLCAweEIxMUI0NjUyLCAweDY1RDEyMkI5LCAweDk3QkFBMUJBLCAweDg0RUE1MjRFLCAweDc2ODFEMTRELFxuICAweDI4OTJFRDY5LCAweERBRjk2RTZBLCAweEM5QTk5RDlFLCAweDNCQzIxRTlELCAweEVGMDg3QTc2LCAweDFENjNGOTc1LCAweDBFMzMwQTgxLCAweEZDNTg4OTgyLFxuICAweEIyMTU3MkM5LCAweDQwN0VGMUNBLCAweDUzMkUwMjNFLCAweEExNDU4MTNELCAweDc1OEZFNUQ2LCAweDg3RTQ2NkQ1LCAweDk0QjQ5NTIxLCAweDY2REYxNjIyLFxuICAweDM4Q0MyQTA2LCAweENBQTdBOTA1LCAweEQ5Rjc1QUYxLCAweDJCOUNEOUYyLCAweEZGNTZCRDE5LCAweDBEM0QzRTFBLCAweDFFNkRDREVFLCAweEVDMDY0RUVELFxuICAweEMzOEQyNkM0LCAweDMxRTZBNUM3LCAweDIyQjY1NjMzLCAweEQwRERENTMwLCAweDA0MTdCMURCLCAweEY2N0MzMkQ4LCAweEU1MkNDMTJDLCAweDE3NDc0MjJGLFxuICAweDQ5NTQ3RTBCLCAweEJCM0ZGRDA4LCAweEE4NkYwRUZDLCAweDVBMDQ4REZGLCAweDhFQ0VFOTE0LCAweDdDQTU2QTE3LCAweDZGRjU5OUUzLCAweDlEOUUxQUUwLFxuICAweEQzRDNFMUFCLCAweDIxQjg2MkE4LCAweDMyRTg5MTVDLCAweEMwODMxMjVGLCAweDE0NDk3NkI0LCAweEU2MjJGNUI3LCAweEY1NzIwNjQzLCAweDA3MTk4NTQwLFxuICAweDU5MEFCOTY0LCAweEFCNjEzQTY3LCAweEI4MzFDOTkzLCAweDRBNUE0QTkwLCAweDlFOTAyRTdCLCAweDZDRkJBRDc4LCAweDdGQUI1RThDLCAweDhEQzBERDhGLFxuICAweEUzMzBBODFBLCAweDExNUIyQjE5LCAweDAyMEJEOEVELCAweEYwNjA1QkVFLCAweDI0QUEzRjA1LCAweEQ2QzFCQzA2LCAweEM1OTE0RkYyLCAweDM3RkFDQ0YxLFxuICAweDY5RTlGMEQ1LCAweDlCODI3M0Q2LCAweDg4RDI4MDIyLCAweDdBQjkwMzIxLCAweEFFNzM2N0NBLCAweDVDMThFNEM5LCAweDRGNDgxNzNELCAweEJEMjM5NDNFLFxuICAweEYzNkU2Rjc1LCAweDAxMDVFQzc2LCAweDEyNTUxRjgyLCAweEUwM0U5QzgxLCAweDM0RjRGODZBLCAweEM2OUY3QjY5LCAweEQ1Q0Y4ODlELCAweDI3QTQwQjlFLFxuICAweDc5QjczN0JBLCAweDhCRENCNEI5LCAweDk4OEM0NzRELCAweDZBRTdDNDRFLCAweEJFMkRBMEE1LCAweDRDNDYyM0E2LCAweDVGMTZEMDUyLCAweEFEN0Q1MzUxLFxuXTtcblxuY29uc3QgbG9va3VwVGFibGU6IFVpbnQzMkFycmF5ID0gdWludDMyQXJyYXlGcm9tKGFfbG9va3VwVGFibGUpXG5leHBvcnQgeyBBd3NDcmMzMmMgfSBmcm9tIFwiLi9hd3NfY3JjMzJjXCI7XG4iXX0= +//# sourceMappingURL=index.js.map /***/ }), +<<<<<<< HEAD +/***/ 35315: +======= /***/ 22850: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ - -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - - __extends = function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __createBinding = function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }; - - __exportStar = function (m, exports) { - for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; - }; - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; - }; - - __spread = function () { - for (var ar = [], i = 0; i < arguments.length; i++) - ar = ar.concat(__read(arguments[i])); - return ar; - }; - - __spreadArrays = function () { - 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; - }; - - __await = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - __importStar = function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; - result["default"] = mod; - return result; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, privateMap) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to get private field on non-instance"); - } - return privateMap.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, privateMap, value) { - if (!privateMap.has(receiver)) { - throw new TypeError("attempted to set private field on non-instance"); - } - privateMap.set(receiver, value); - return value; - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); -}); +/*! ***************************************************************************** +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. +***************************************************************************** */ + +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + + __extends = function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __createBinding = function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }; + + __exportStar = function (m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; + }; + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; + + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; + + __spreadArrays = function () { + 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; + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + __importStar = function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result["default"] = mod; + return result; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); +}); /***/ }), +<<<<<<< HEAD +/***/ 46096: +======= /***/ 41523: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", ({ value: true })); exports.convertToBuffer = void 0; +<<<<<<< HEAD +var util_utf8_browser_1 = __nccwpck_require__(77296); +======= var util_utf8_browser_1 = __nccwpck_require__(83288); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 // Quick polyfill var fromUtf8 = typeof Buffer !== "undefined" && Buffer.from ? function (input) { return Buffer.from(input, "utf8"); } @@ -4397,19 +7604,31 @@ function convertToBuffer(data) { return new Uint8Array(data); } exports.convertToBuffer = convertToBuffer; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udmVydFRvQnVmZmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnZlcnRUb0J1ZmZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0VBQW9FO0FBQ3BFLHNDQUFzQzs7O0FBR3RDLGdFQUF5RTtBQUV6RSxpQkFBaUI7QUFDakIsSUFBTSxRQUFRLEdBQ1osT0FBTyxNQUFNLEtBQUssV0FBVyxJQUFJLE1BQU0sQ0FBQyxJQUFJO0lBQzFDLENBQUMsQ0FBQyxVQUFDLEtBQWEsSUFBSyxPQUFBLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLE1BQU0sQ0FBQyxFQUExQixDQUEwQjtJQUMvQyxDQUFDLENBQUMsNEJBQWUsQ0FBQztBQUV0QixTQUFnQixlQUFlLENBQUMsSUFBZ0I7SUFDOUMsOEJBQThCO0lBQzlCLElBQUksSUFBSSxZQUFZLFVBQVU7UUFBRSxPQUFPLElBQUksQ0FBQztJQUU1QyxJQUFJLE9BQU8sSUFBSSxLQUFLLFFBQVEsRUFBRTtRQUM1QixPQUFPLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN2QjtJQUVELElBQUksV0FBVyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsRUFBRTtRQUM1QixPQUFPLElBQUksVUFBVSxDQUNuQixJQUFJLENBQUMsTUFBTSxFQUNYLElBQUksQ0FBQyxVQUFVLEVBQ2YsSUFBSSxDQUFDLFVBQVUsR0FBRyxVQUFVLENBQUMsaUJBQWlCLENBQy9DLENBQUM7S0FDSDtJQUVELE9BQU8sSUFBSSxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDOUIsQ0FBQztBQWpCRCwwQ0FpQkMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgQW1hem9uLmNvbSBJbmMuIG9yIGl0cyBhZmZpbGlhdGVzLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuLy8gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEFwYWNoZS0yLjBcblxuaW1wb3J0IHsgU291cmNlRGF0YSB9IGZyb20gXCJAYXdzLXNkay90eXBlc1wiO1xuaW1wb3J0IHsgZnJvbVV0ZjggYXMgZnJvbVV0ZjhCcm93c2VyIH0gZnJvbSBcIkBhd3Mtc2RrL3V0aWwtdXRmOC1icm93c2VyXCI7XG5cbi8vIFF1aWNrIHBvbHlmaWxsXG5jb25zdCBmcm9tVXRmOCA9XG4gIHR5cGVvZiBCdWZmZXIgIT09IFwidW5kZWZpbmVkXCIgJiYgQnVmZmVyLmZyb21cbiAgICA/IChpbnB1dDogc3RyaW5nKSA9PiBCdWZmZXIuZnJvbShpbnB1dCwgXCJ1dGY4XCIpXG4gICAgOiBmcm9tVXRmOEJyb3dzZXI7XG5cbmV4cG9ydCBmdW5jdGlvbiBjb252ZXJ0VG9CdWZmZXIoZGF0YTogU291cmNlRGF0YSk6IFVpbnQ4QXJyYXkge1xuICAvLyBBbHJlYWR5IGEgVWludDgsIGRvIG5vdGhpbmdcbiAgaWYgKGRhdGEgaW5zdGFuY2VvZiBVaW50OEFycmF5KSByZXR1cm4gZGF0YTtcblxuICBpZiAodHlwZW9mIGRhdGEgPT09IFwic3RyaW5nXCIpIHtcbiAgICByZXR1cm4gZnJvbVV0ZjgoZGF0YSk7XG4gIH1cblxuICBpZiAoQXJyYXlCdWZmZXIuaXNWaWV3KGRhdGEpKSB7XG4gICAgcmV0dXJuIG5ldyBVaW50OEFycmF5KFxuICAgICAgZGF0YS5idWZmZXIsXG4gICAgICBkYXRhLmJ5dGVPZmZzZXQsXG4gICAgICBkYXRhLmJ5dGVMZW5ndGggLyBVaW50OEFycmF5LkJZVEVTX1BFUl9FTEVNRU5UXG4gICAgKTtcbiAgfVxuXG4gIHJldHVybiBuZXcgVWludDhBcnJheShkYXRhKTtcbn1cbiJdfQ== +//# sourceMappingURL=convertToBuffer.js.map /***/ }), +<<<<<<< HEAD +/***/ 7919: +======= /***/ 27211: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", ({ value: true })); exports.uint32ArrayFrom = exports.numToUint8 = exports.isEmptyData = exports.convertToBuffer = void 0; +<<<<<<< HEAD +var convertToBuffer_1 = __nccwpck_require__(46096); +Object.defineProperty(exports, "convertToBuffer", ({ enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } })); +var isEmptyData_1 = __nccwpck_require__(21970); +Object.defineProperty(exports, "isEmptyData", ({ enumerable: true, get: function () { return isEmptyData_1.isEmptyData; } })); +var numToUint8_1 = __nccwpck_require__(49155); +Object.defineProperty(exports, "numToUint8", ({ enumerable: true, get: function () { return numToUint8_1.numToUint8; } })); +var uint32ArrayFrom_1 = __nccwpck_require__(3166); +======= var convertToBuffer_1 = __nccwpck_require__(41523); Object.defineProperty(exports, "convertToBuffer", ({ enumerable: true, get: function () { return convertToBuffer_1.convertToBuffer; } })); var isEmptyData_1 = __nccwpck_require__(84783); @@ -4417,15 +7636,19 @@ Object.defineProperty(exports, "isEmptyData", ({ enumerable: true, get: function var numToUint8_1 = __nccwpck_require__(71944); Object.defineProperty(exports, "numToUint8", ({ enumerable: true, get: function () { return numToUint8_1.numToUint8; } })); var uint32ArrayFrom_1 = __nccwpck_require__(30129); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "uint32ArrayFrom", ({ enumerable: true, get: function () { return uint32ArrayFrom_1.uint32ArrayFrom; } })); -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9FQUFvRTtBQUNwRSxzQ0FBc0M7OztBQUV0QyxxREFBb0Q7QUFBM0Msa0hBQUEsZUFBZSxPQUFBO0FBQ3hCLDZDQUE0QztBQUFuQywwR0FBQSxXQUFXLE9BQUE7QUFDcEIsMkNBQTBDO0FBQWpDLHdHQUFBLFVBQVUsT0FBQTtBQUNuQixxREFBa0Q7QUFBMUMsa0hBQUEsZUFBZSxPQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IEFtYXpvbi5jb20gSW5jLiBvciBpdHMgYWZmaWxpYXRlcy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wXG5cbmV4cG9ydCB7IGNvbnZlcnRUb0J1ZmZlciB9IGZyb20gXCIuL2NvbnZlcnRUb0J1ZmZlclwiO1xuZXhwb3J0IHsgaXNFbXB0eURhdGEgfSBmcm9tIFwiLi9pc0VtcHR5RGF0YVwiO1xuZXhwb3J0IHsgbnVtVG9VaW50OCB9IGZyb20gXCIuL251bVRvVWludDhcIjtcbmV4cG9ydCB7dWludDMyQXJyYXlGcm9tfSBmcm9tICcuL3VpbnQzMkFycmF5RnJvbSc7XG4iXX0= +//# sourceMappingURL=index.js.map /***/ }), +<<<<<<< HEAD +/***/ 21970: +======= /***/ 84783: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 @@ -4438,14 +7661,17 @@ function isEmptyData(data) { return data.byteLength === 0; } exports.isEmptyData = isEmptyData; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaXNFbXB0eURhdGEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaXNFbXB0eURhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLG9FQUFvRTtBQUNwRSxzQ0FBc0M7OztBQUl0QyxTQUFnQixXQUFXLENBQUMsSUFBZ0I7SUFDMUMsSUFBSSxPQUFPLElBQUksS0FBSyxRQUFRLEVBQUU7UUFDNUIsT0FBTyxJQUFJLENBQUMsTUFBTSxLQUFLLENBQUMsQ0FBQztLQUMxQjtJQUVELE9BQU8sSUFBSSxDQUFDLFVBQVUsS0FBSyxDQUFDLENBQUM7QUFDL0IsQ0FBQztBQU5ELGtDQU1DIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IEFtYXpvbi5jb20gSW5jLiBvciBpdHMgYWZmaWxpYXRlcy4gQWxsIFJpZ2h0cyBSZXNlcnZlZC5cbi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wXG5cbmltcG9ydCB7IFNvdXJjZURhdGEgfSBmcm9tIFwiQGF3cy1zZGsvdHlwZXNcIjtcblxuZXhwb3J0IGZ1bmN0aW9uIGlzRW1wdHlEYXRhKGRhdGE6IFNvdXJjZURhdGEpOiBib29sZWFuIHtcbiAgaWYgKHR5cGVvZiBkYXRhID09PSBcInN0cmluZ1wiKSB7XG4gICAgcmV0dXJuIGRhdGEubGVuZ3RoID09PSAwO1xuICB9XG5cbiAgcmV0dXJuIGRhdGEuYnl0ZUxlbmd0aCA9PT0gMDtcbn1cbiJdfQ== +//# sourceMappingURL=isEmptyData.js.map /***/ }), +<<<<<<< HEAD +/***/ 49155: +======= /***/ 71944: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 @@ -4460,14 +7686,17 @@ function numToUint8(num) { ]); } exports.numToUint8 = numToUint8; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnVtVG9VaW50OC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9udW1Ub1VpbnQ4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxvRUFBb0U7QUFDcEUsc0NBQXNDOzs7QUFFdEMsU0FBZ0IsVUFBVSxDQUFDLEdBQVc7SUFDcEMsT0FBTyxJQUFJLFVBQVUsQ0FBQztRQUNwQixDQUFDLEdBQUcsR0FBRyxVQUFVLENBQUMsSUFBSSxFQUFFO1FBQ3hCLENBQUMsR0FBRyxHQUFHLFVBQVUsQ0FBQyxJQUFJLEVBQUU7UUFDeEIsQ0FBQyxHQUFHLEdBQUcsVUFBVSxDQUFDLElBQUksQ0FBQztRQUN2QixHQUFHLEdBQUcsVUFBVTtLQUNqQixDQUFDLENBQUM7QUFDTCxDQUFDO0FBUEQsZ0NBT0MiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgQW1hem9uLmNvbSBJbmMuIG9yIGl0cyBhZmZpbGlhdGVzLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuLy8gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEFwYWNoZS0yLjBcblxuZXhwb3J0IGZ1bmN0aW9uIG51bVRvVWludDgobnVtOiBudW1iZXIpIHtcbiAgcmV0dXJuIG5ldyBVaW50OEFycmF5KFtcbiAgICAobnVtICYgMHhmZjAwMDAwMCkgPj4gMjQsXG4gICAgKG51bSAmIDB4MDBmZjAwMDApID4+IDE2LFxuICAgIChudW0gJiAweDAwMDBmZjAwKSA+PiA4LFxuICAgIG51bSAmIDB4MDAwMDAwZmYsXG4gIF0pO1xufVxuIl19 +//# sourceMappingURL=numToUint8.js.map /***/ }), +<<<<<<< HEAD +/***/ 3166: +======= /***/ 30129: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 @@ -4487,10 +7716,212 @@ function uint32ArrayFrom(a_lookUpTable) { return Uint32Array.from(a_lookUpTable); } exports.uint32ArrayFrom = uint32ArrayFrom; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidWludDMyQXJyYXlGcm9tLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3VpbnQzMkFycmF5RnJvbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0VBQW9FO0FBQ3BFLHNDQUFzQzs7O0FBRXRDLDBEQUEwRDtBQUMxRCxTQUFnQixlQUFlLENBQUMsYUFBNEI7SUFDMUQsSUFBSSxDQUFDLFdBQVcsQ0FBQyxJQUFJLEVBQUU7UUFDckIsSUFBTSxZQUFZLEdBQUcsSUFBSSxXQUFXLENBQUMsYUFBYSxDQUFDLE1BQU0sQ0FBQyxDQUFBO1FBQzFELElBQUksT0FBTyxHQUFHLENBQUMsQ0FBQTtRQUNmLE9BQU8sT0FBTyxHQUFHLGFBQWEsQ0FBQyxNQUFNLEVBQUU7WUFDckMsWUFBWSxDQUFDLE9BQU8sQ0FBQyxHQUFHLGFBQWEsQ0FBQyxPQUFPLENBQUMsQ0FBQTtZQUM5QyxPQUFPLElBQUksQ0FBQyxDQUFBO1NBQ2I7UUFDRCxPQUFPLFlBQVksQ0FBQTtLQUNwQjtJQUNELE9BQU8sV0FBVyxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsQ0FBQTtBQUN4QyxDQUFDO0FBWEQsMENBV0MiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgQW1hem9uLmNvbSBJbmMuIG9yIGl0cyBhZmZpbGlhdGVzLiBBbGwgUmlnaHRzIFJlc2VydmVkLlxuLy8gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEFwYWNoZS0yLjBcblxuLy8gSUUgMTEgZG9lcyBub3Qgc3VwcG9ydCBBcnJheS5mcm9tLCBzbyB3ZSBkbyBpdCBtYW51YWxseVxuZXhwb3J0IGZ1bmN0aW9uIHVpbnQzMkFycmF5RnJvbShhX2xvb2tVcFRhYmxlOiBBcnJheTxudW1iZXI+KTogVWludDMyQXJyYXkge1xuICBpZiAoIVVpbnQzMkFycmF5LmZyb20pIHtcbiAgICBjb25zdCByZXR1cm5fYXJyYXkgPSBuZXcgVWludDMyQXJyYXkoYV9sb29rVXBUYWJsZS5sZW5ndGgpXG4gICAgbGV0IGFfaW5kZXggPSAwXG4gICAgd2hpbGUgKGFfaW5kZXggPCBhX2xvb2tVcFRhYmxlLmxlbmd0aCkge1xuICAgICAgcmV0dXJuX2FycmF5W2FfaW5kZXhdID0gYV9sb29rVXBUYWJsZVthX2luZGV4XVxuICAgICAgYV9pbmRleCArPSAxXG4gICAgfVxuICAgIHJldHVybiByZXR1cm5fYXJyYXlcbiAgfVxuICByZXR1cm4gVWludDMyQXJyYXkuZnJvbShhX2xvb2tVcFRhYmxlKVxufVxuIl19 +//# sourceMappingURL=uint32ArrayFrom.js.map /***/ }), +<<<<<<< HEAD +/***/ 99700: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.S3 = void 0; +const smithy_client_1 = __nccwpck_require__(33218); +const AbortMultipartUploadCommand_1 = __nccwpck_require__(54745); +const CompleteMultipartUploadCommand_1 = __nccwpck_require__(48394); +const CopyObjectCommand_1 = __nccwpck_require__(47241); +const CreateBucketCommand_1 = __nccwpck_require__(37648); +const CreateMultipartUploadCommand_1 = __nccwpck_require__(51963); +const CreateSessionCommand_1 = __nccwpck_require__(47209); +const DeleteBucketAnalyticsConfigurationCommand_1 = __nccwpck_require__(26373); +const DeleteBucketCommand_1 = __nccwpck_require__(40235); +const DeleteBucketCorsCommand_1 = __nccwpck_require__(12335); +const DeleteBucketEncryptionCommand_1 = __nccwpck_require__(13305); +const DeleteBucketIntelligentTieringConfigurationCommand_1 = __nccwpck_require__(87902); +const DeleteBucketInventoryConfigurationCommand_1 = __nccwpck_require__(4642); +const DeleteBucketLifecycleCommand_1 = __nccwpck_require__(56903); +const DeleteBucketMetricsConfigurationCommand_1 = __nccwpck_require__(70617); +const DeleteBucketOwnershipControlsCommand_1 = __nccwpck_require__(96947); +const DeleteBucketPolicyCommand_1 = __nccwpck_require__(24789); +const DeleteBucketReplicationCommand_1 = __nccwpck_require__(14412); +const DeleteBucketTaggingCommand_1 = __nccwpck_require__(89218); +const DeleteBucketWebsiteCommand_1 = __nccwpck_require__(36069); +const DeleteObjectCommand_1 = __nccwpck_require__(84529); +const DeleteObjectsCommand_1 = __nccwpck_require__(17735); +const DeleteObjectTaggingCommand_1 = __nccwpck_require__(87937); +const DeletePublicAccessBlockCommand_1 = __nccwpck_require__(8063); +const GetBucketAccelerateConfigurationCommand_1 = __nccwpck_require__(95005); +const GetBucketAclCommand_1 = __nccwpck_require__(59650); +const GetBucketAnalyticsConfigurationCommand_1 = __nccwpck_require__(5689); +const GetBucketCorsCommand_1 = __nccwpck_require__(43088); +const GetBucketEncryptionCommand_1 = __nccwpck_require__(53637); +const GetBucketIntelligentTieringConfigurationCommand_1 = __nccwpck_require__(39216); +const GetBucketInventoryConfigurationCommand_1 = __nccwpck_require__(69553); +const GetBucketLifecycleConfigurationCommand_1 = __nccwpck_require__(30426); +const GetBucketLocationCommand_1 = __nccwpck_require__(60074); +const GetBucketLoggingCommand_1 = __nccwpck_require__(5152); +const GetBucketMetricsConfigurationCommand_1 = __nccwpck_require__(97986); +const GetBucketNotificationConfigurationCommand_1 = __nccwpck_require__(31857); +const GetBucketOwnershipControlsCommand_1 = __nccwpck_require__(90940); +const GetBucketPolicyCommand_1 = __nccwpck_require__(46067); +const GetBucketPolicyStatusCommand_1 = __nccwpck_require__(77093); +const GetBucketReplicationCommand_1 = __nccwpck_require__(36675); +const GetBucketRequestPaymentCommand_1 = __nccwpck_require__(98115); +const GetBucketTaggingCommand_1 = __nccwpck_require__(61300); +const GetBucketVersioningCommand_1 = __nccwpck_require__(90894); +const GetBucketWebsiteCommand_1 = __nccwpck_require__(58382); +const GetObjectAclCommand_1 = __nccwpck_require__(8732); +const GetObjectAttributesCommand_1 = __nccwpck_require__(65852); +const GetObjectCommand_1 = __nccwpck_require__(70184); +const GetObjectLegalHoldCommand_1 = __nccwpck_require__(7017); +const GetObjectLockConfigurationCommand_1 = __nccwpck_require__(87797); +const GetObjectRetentionCommand_1 = __nccwpck_require__(18426); +const GetObjectTaggingCommand_1 = __nccwpck_require__(28754); +const GetObjectTorrentCommand_1 = __nccwpck_require__(66888); +const GetPublicAccessBlockCommand_1 = __nccwpck_require__(22223); +const HeadBucketCommand_1 = __nccwpck_require__(93946); +const HeadObjectCommand_1 = __nccwpck_require__(61280); +const ListBucketAnalyticsConfigurationsCommand_1 = __nccwpck_require__(88519); +const ListBucketIntelligentTieringConfigurationsCommand_1 = __nccwpck_require__(34871); +const ListBucketInventoryConfigurationsCommand_1 = __nccwpck_require__(7739); +const ListBucketMetricsConfigurationsCommand_1 = __nccwpck_require__(87086); +const ListBucketsCommand_1 = __nccwpck_require__(23261); +const ListDirectoryBucketsCommand_1 = __nccwpck_require__(38902); +const ListMultipartUploadsCommand_1 = __nccwpck_require__(20678); +const ListObjectsCommand_1 = __nccwpck_require__(30494); +const ListObjectsV2Command_1 = __nccwpck_require__(57262); +const ListObjectVersionsCommand_1 = __nccwpck_require__(95992); +const ListPartsCommand_1 = __nccwpck_require__(68740); +const PutBucketAccelerateConfigurationCommand_1 = __nccwpck_require__(52582); +const PutBucketAclCommand_1 = __nccwpck_require__(18785); +const PutBucketAnalyticsConfigurationCommand_1 = __nccwpck_require__(23562); +const PutBucketCorsCommand_1 = __nccwpck_require__(68524); +const PutBucketEncryptionCommand_1 = __nccwpck_require__(95647); +const PutBucketIntelligentTieringConfigurationCommand_1 = __nccwpck_require__(53359); +const PutBucketInventoryConfigurationCommand_1 = __nccwpck_require__(15119); +const PutBucketLifecycleConfigurationCommand_1 = __nccwpck_require__(37659); +const PutBucketLoggingCommand_1 = __nccwpck_require__(64879); +const PutBucketMetricsConfigurationCommand_1 = __nccwpck_require__(36122); +const PutBucketNotificationConfigurationCommand_1 = __nccwpck_require__(23762); +const PutBucketOwnershipControlsCommand_1 = __nccwpck_require__(27055); +const PutBucketPolicyCommand_1 = __nccwpck_require__(23598); +const PutBucketReplicationCommand_1 = __nccwpck_require__(42596); +const PutBucketRequestPaymentCommand_1 = __nccwpck_require__(12265); +const PutBucketTaggingCommand_1 = __nccwpck_require__(22745); +const PutBucketVersioningCommand_1 = __nccwpck_require__(44671); +const PutBucketWebsiteCommand_1 = __nccwpck_require__(27890); +const PutObjectAclCommand_1 = __nccwpck_require__(83533); +const PutObjectCommand_1 = __nccwpck_require__(84520); +const PutObjectLegalHoldCommand_1 = __nccwpck_require__(57296); +const PutObjectLockConfigurationCommand_1 = __nccwpck_require__(15905); +const PutObjectRetentionCommand_1 = __nccwpck_require__(90936); +const PutObjectTaggingCommand_1 = __nccwpck_require__(13844); +const PutPublicAccessBlockCommand_1 = __nccwpck_require__(52786); +const RestoreObjectCommand_1 = __nccwpck_require__(15426); +const SelectObjectContentCommand_1 = __nccwpck_require__(26808); +const UploadPartCommand_1 = __nccwpck_require__(64325); +const UploadPartCopyCommand_1 = __nccwpck_require__(72251); +const WriteGetObjectResponseCommand_1 = __nccwpck_require__(15173); +const S3Client_1 = __nccwpck_require__(34692); +const commands = { + AbortMultipartUploadCommand: AbortMultipartUploadCommand_1.AbortMultipartUploadCommand, + CompleteMultipartUploadCommand: CompleteMultipartUploadCommand_1.CompleteMultipartUploadCommand, + CopyObjectCommand: CopyObjectCommand_1.CopyObjectCommand, + CreateBucketCommand: CreateBucketCommand_1.CreateBucketCommand, + CreateMultipartUploadCommand: CreateMultipartUploadCommand_1.CreateMultipartUploadCommand, + CreateSessionCommand: CreateSessionCommand_1.CreateSessionCommand, + DeleteBucketCommand: DeleteBucketCommand_1.DeleteBucketCommand, + DeleteBucketAnalyticsConfigurationCommand: DeleteBucketAnalyticsConfigurationCommand_1.DeleteBucketAnalyticsConfigurationCommand, + DeleteBucketCorsCommand: DeleteBucketCorsCommand_1.DeleteBucketCorsCommand, + DeleteBucketEncryptionCommand: DeleteBucketEncryptionCommand_1.DeleteBucketEncryptionCommand, + DeleteBucketIntelligentTieringConfigurationCommand: DeleteBucketIntelligentTieringConfigurationCommand_1.DeleteBucketIntelligentTieringConfigurationCommand, + DeleteBucketInventoryConfigurationCommand: DeleteBucketInventoryConfigurationCommand_1.DeleteBucketInventoryConfigurationCommand, + DeleteBucketLifecycleCommand: DeleteBucketLifecycleCommand_1.DeleteBucketLifecycleCommand, + DeleteBucketMetricsConfigurationCommand: DeleteBucketMetricsConfigurationCommand_1.DeleteBucketMetricsConfigurationCommand, + DeleteBucketOwnershipControlsCommand: DeleteBucketOwnershipControlsCommand_1.DeleteBucketOwnershipControlsCommand, + DeleteBucketPolicyCommand: DeleteBucketPolicyCommand_1.DeleteBucketPolicyCommand, + DeleteBucketReplicationCommand: DeleteBucketReplicationCommand_1.DeleteBucketReplicationCommand, + DeleteBucketTaggingCommand: DeleteBucketTaggingCommand_1.DeleteBucketTaggingCommand, + DeleteBucketWebsiteCommand: DeleteBucketWebsiteCommand_1.DeleteBucketWebsiteCommand, + DeleteObjectCommand: DeleteObjectCommand_1.DeleteObjectCommand, + DeleteObjectsCommand: DeleteObjectsCommand_1.DeleteObjectsCommand, + DeleteObjectTaggingCommand: DeleteObjectTaggingCommand_1.DeleteObjectTaggingCommand, + DeletePublicAccessBlockCommand: DeletePublicAccessBlockCommand_1.DeletePublicAccessBlockCommand, + GetBucketAccelerateConfigurationCommand: GetBucketAccelerateConfigurationCommand_1.GetBucketAccelerateConfigurationCommand, + GetBucketAclCommand: GetBucketAclCommand_1.GetBucketAclCommand, + GetBucketAnalyticsConfigurationCommand: GetBucketAnalyticsConfigurationCommand_1.GetBucketAnalyticsConfigurationCommand, + GetBucketCorsCommand: GetBucketCorsCommand_1.GetBucketCorsCommand, + GetBucketEncryptionCommand: GetBucketEncryptionCommand_1.GetBucketEncryptionCommand, + GetBucketIntelligentTieringConfigurationCommand: GetBucketIntelligentTieringConfigurationCommand_1.GetBucketIntelligentTieringConfigurationCommand, + GetBucketInventoryConfigurationCommand: GetBucketInventoryConfigurationCommand_1.GetBucketInventoryConfigurationCommand, + GetBucketLifecycleConfigurationCommand: GetBucketLifecycleConfigurationCommand_1.GetBucketLifecycleConfigurationCommand, + GetBucketLocationCommand: GetBucketLocationCommand_1.GetBucketLocationCommand, + GetBucketLoggingCommand: GetBucketLoggingCommand_1.GetBucketLoggingCommand, + GetBucketMetricsConfigurationCommand: GetBucketMetricsConfigurationCommand_1.GetBucketMetricsConfigurationCommand, + GetBucketNotificationConfigurationCommand: GetBucketNotificationConfigurationCommand_1.GetBucketNotificationConfigurationCommand, + GetBucketOwnershipControlsCommand: GetBucketOwnershipControlsCommand_1.GetBucketOwnershipControlsCommand, + GetBucketPolicyCommand: GetBucketPolicyCommand_1.GetBucketPolicyCommand, + GetBucketPolicyStatusCommand: GetBucketPolicyStatusCommand_1.GetBucketPolicyStatusCommand, + GetBucketReplicationCommand: GetBucketReplicationCommand_1.GetBucketReplicationCommand, + GetBucketRequestPaymentCommand: GetBucketRequestPaymentCommand_1.GetBucketRequestPaymentCommand, + GetBucketTaggingCommand: GetBucketTaggingCommand_1.GetBucketTaggingCommand, + GetBucketVersioningCommand: GetBucketVersioningCommand_1.GetBucketVersioningCommand, + GetBucketWebsiteCommand: GetBucketWebsiteCommand_1.GetBucketWebsiteCommand, + GetObjectCommand: GetObjectCommand_1.GetObjectCommand, + GetObjectAclCommand: GetObjectAclCommand_1.GetObjectAclCommand, + GetObjectAttributesCommand: GetObjectAttributesCommand_1.GetObjectAttributesCommand, + GetObjectLegalHoldCommand: GetObjectLegalHoldCommand_1.GetObjectLegalHoldCommand, + GetObjectLockConfigurationCommand: GetObjectLockConfigurationCommand_1.GetObjectLockConfigurationCommand, + GetObjectRetentionCommand: GetObjectRetentionCommand_1.GetObjectRetentionCommand, + GetObjectTaggingCommand: GetObjectTaggingCommand_1.GetObjectTaggingCommand, + GetObjectTorrentCommand: GetObjectTorrentCommand_1.GetObjectTorrentCommand, + GetPublicAccessBlockCommand: GetPublicAccessBlockCommand_1.GetPublicAccessBlockCommand, + HeadBucketCommand: HeadBucketCommand_1.HeadBucketCommand, + HeadObjectCommand: HeadObjectCommand_1.HeadObjectCommand, + ListBucketAnalyticsConfigurationsCommand: ListBucketAnalyticsConfigurationsCommand_1.ListBucketAnalyticsConfigurationsCommand, + ListBucketIntelligentTieringConfigurationsCommand: ListBucketIntelligentTieringConfigurationsCommand_1.ListBucketIntelligentTieringConfigurationsCommand, + ListBucketInventoryConfigurationsCommand: ListBucketInventoryConfigurationsCommand_1.ListBucketInventoryConfigurationsCommand, + ListBucketMetricsConfigurationsCommand: ListBucketMetricsConfigurationsCommand_1.ListBucketMetricsConfigurationsCommand, + ListBucketsCommand: ListBucketsCommand_1.ListBucketsCommand, + ListDirectoryBucketsCommand: ListDirectoryBucketsCommand_1.ListDirectoryBucketsCommand, + ListMultipartUploadsCommand: ListMultipartUploadsCommand_1.ListMultipartUploadsCommand, + ListObjectsCommand: ListObjectsCommand_1.ListObjectsCommand, + ListObjectsV2Command: ListObjectsV2Command_1.ListObjectsV2Command, + ListObjectVersionsCommand: ListObjectVersionsCommand_1.ListObjectVersionsCommand, + ListPartsCommand: ListPartsCommand_1.ListPartsCommand, + PutBucketAccelerateConfigurationCommand: PutBucketAccelerateConfigurationCommand_1.PutBucketAccelerateConfigurationCommand, + PutBucketAclCommand: PutBucketAclCommand_1.PutBucketAclCommand, + PutBucketAnalyticsConfigurationCommand: PutBucketAnalyticsConfigurationCommand_1.PutBucketAnalyticsConfigurationCommand, + PutBucketCorsCommand: PutBucketCorsCommand_1.PutBucketCorsCommand, + PutBucketEncryptionCommand: PutBucketEncryptionCommand_1.PutBucketEncryptionCommand, + PutBucketIntelligentTieringConfigurationCommand: PutBucketIntelligentTieringConfigurationCommand_1.PutBucketIntelligentTieringConfigurationCommand, + PutBucketInventoryConfigurationCommand: PutBucketInventoryConfigurationCommand_1.PutBucketInventoryConfigurationCommand, + PutBucketLifecycleConfigurationCommand: PutBucketLifecycleConfigurationCommand_1.PutBucketLifecycleConfigurationCommand, + PutBucketLoggingCommand: PutBucketLoggingCommand_1.PutBucketLoggingCommand, + PutBucketMetricsConfigurationCommand: PutBucketMetricsConfigurationCommand_1.PutBucketMetricsConfigurationCommand, + PutBucketNotificationConfigurationCommand: PutBucketNotificationConfigurationCommand_1.PutBucketNotificationConfigurationCommand, + PutBucketOwnershipControlsCommand: PutBucketOwnershipControlsCommand_1.PutBucketOwnershipControlsCommand, + PutBucketPolicyCommand: PutBucketPolicyCommand_1.PutBucketPolicyCommand, + PutBucketReplicationCommand: PutBucketReplicationCommand_1.PutBucketReplicationCommand, + PutBucketRequestPaymentCommand: PutBucketRequestPaymentCommand_1.PutBucketRequestPaymentCommand, + PutBucketTaggingCommand: PutBucketTaggingCommand_1.PutBucketTaggingCommand, + PutBucketVersioningCommand: PutBucketVersioningCommand_1.PutBucketVersioningCommand, + PutBucketWebsiteCommand: PutBucketWebsiteCommand_1.PutBucketWebsiteCommand, + PutObjectCommand: PutObjectCommand_1.PutObjectCommand, + PutObjectAclCommand: PutObjectAclCommand_1.PutObjectAclCommand, + PutObjectLegalHoldCommand: PutObjectLegalHoldCommand_1.PutObjectLegalHoldCommand, + PutObjectLockConfigurationCommand: PutObjectLockConfigurationCommand_1.PutObjectLockConfigurationCommand, + PutObjectRetentionCommand: PutObjectRetentionCommand_1.PutObjectRetentionCommand, + PutObjectTaggingCommand: PutObjectTaggingCommand_1.PutObjectTaggingCommand, + PutPublicAccessBlockCommand: PutPublicAccessBlockCommand_1.PutPublicAccessBlockCommand, + RestoreObjectCommand: RestoreObjectCommand_1.RestoreObjectCommand, + SelectObjectContentCommand: SelectObjectContentCommand_1.SelectObjectContentCommand, + UploadPartCommand: UploadPartCommand_1.UploadPartCommand, + UploadPartCopyCommand: UploadPartCopyCommand_1.UploadPartCopyCommand, + WriteGetObjectResponseCommand: WriteGetObjectResponseCommand_1.WriteGetObjectResponseCommand, +}; +======= /***/ 3969: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -4560,323 +7991,323 @@ tslib_1.__exportStar(__nccwpck_require__(63589), exports); /***/ 94513: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -4982,1321 +8413,45 @@ const UploadPartCommand_1 = __nccwpck_require__(52667); const UploadPartCopyCommand_1 = __nccwpck_require__(57045); const WriteGetObjectResponseCommand_1 = __nccwpck_require__(63803); const S3Client_1 = __nccwpck_require__(17824); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class S3 extends S3Client_1.S3Client { - abortMultipartUpload(args, optionsOrCb, cb) { - const command = new AbortMultipartUploadCommand_1.AbortMultipartUploadCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - completeMultipartUpload(args, optionsOrCb, cb) { - const command = new CompleteMultipartUploadCommand_1.CompleteMultipartUploadCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - copyObject(args, optionsOrCb, cb) { - const command = new CopyObjectCommand_1.CopyObjectCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - createBucket(args, optionsOrCb, cb) { - const command = new CreateBucketCommand_1.CreateBucketCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - createMultipartUpload(args, optionsOrCb, cb) { - const command = new CreateMultipartUploadCommand_1.CreateMultipartUploadCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucket(args, optionsOrCb, cb) { - const command = new DeleteBucketCommand_1.DeleteBucketCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketAnalyticsConfiguration(args, optionsOrCb, cb) { - const command = new DeleteBucketAnalyticsConfigurationCommand_1.DeleteBucketAnalyticsConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketCors(args, optionsOrCb, cb) { - const command = new DeleteBucketCorsCommand_1.DeleteBucketCorsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketEncryption(args, optionsOrCb, cb) { - const command = new DeleteBucketEncryptionCommand_1.DeleteBucketEncryptionCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketIntelligentTieringConfiguration(args, optionsOrCb, cb) { - const command = new DeleteBucketIntelligentTieringConfigurationCommand_1.DeleteBucketIntelligentTieringConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketInventoryConfiguration(args, optionsOrCb, cb) { - const command = new DeleteBucketInventoryConfigurationCommand_1.DeleteBucketInventoryConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketLifecycle(args, optionsOrCb, cb) { - const command = new DeleteBucketLifecycleCommand_1.DeleteBucketLifecycleCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketMetricsConfiguration(args, optionsOrCb, cb) { - const command = new DeleteBucketMetricsConfigurationCommand_1.DeleteBucketMetricsConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketOwnershipControls(args, optionsOrCb, cb) { - const command = new DeleteBucketOwnershipControlsCommand_1.DeleteBucketOwnershipControlsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketPolicy(args, optionsOrCb, cb) { - const command = new DeleteBucketPolicyCommand_1.DeleteBucketPolicyCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketReplication(args, optionsOrCb, cb) { - const command = new DeleteBucketReplicationCommand_1.DeleteBucketReplicationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketTagging(args, optionsOrCb, cb) { - const command = new DeleteBucketTaggingCommand_1.DeleteBucketTaggingCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteBucketWebsite(args, optionsOrCb, cb) { - const command = new DeleteBucketWebsiteCommand_1.DeleteBucketWebsiteCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteObject(args, optionsOrCb, cb) { - const command = new DeleteObjectCommand_1.DeleteObjectCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteObjects(args, optionsOrCb, cb) { - const command = new DeleteObjectsCommand_1.DeleteObjectsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deleteObjectTagging(args, optionsOrCb, cb) { - const command = new DeleteObjectTaggingCommand_1.DeleteObjectTaggingCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - deletePublicAccessBlock(args, optionsOrCb, cb) { - const command = new DeletePublicAccessBlockCommand_1.DeletePublicAccessBlockCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketAccelerateConfiguration(args, optionsOrCb, cb) { - const command = new GetBucketAccelerateConfigurationCommand_1.GetBucketAccelerateConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketAcl(args, optionsOrCb, cb) { - const command = new GetBucketAclCommand_1.GetBucketAclCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketAnalyticsConfiguration(args, optionsOrCb, cb) { - const command = new GetBucketAnalyticsConfigurationCommand_1.GetBucketAnalyticsConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketCors(args, optionsOrCb, cb) { - const command = new GetBucketCorsCommand_1.GetBucketCorsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketEncryption(args, optionsOrCb, cb) { - const command = new GetBucketEncryptionCommand_1.GetBucketEncryptionCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketIntelligentTieringConfiguration(args, optionsOrCb, cb) { - const command = new GetBucketIntelligentTieringConfigurationCommand_1.GetBucketIntelligentTieringConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketInventoryConfiguration(args, optionsOrCb, cb) { - const command = new GetBucketInventoryConfigurationCommand_1.GetBucketInventoryConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketLifecycleConfiguration(args, optionsOrCb, cb) { - const command = new GetBucketLifecycleConfigurationCommand_1.GetBucketLifecycleConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketLocation(args, optionsOrCb, cb) { - const command = new GetBucketLocationCommand_1.GetBucketLocationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketLogging(args, optionsOrCb, cb) { - const command = new GetBucketLoggingCommand_1.GetBucketLoggingCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketMetricsConfiguration(args, optionsOrCb, cb) { - const command = new GetBucketMetricsConfigurationCommand_1.GetBucketMetricsConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketNotificationConfiguration(args, optionsOrCb, cb) { - const command = new GetBucketNotificationConfigurationCommand_1.GetBucketNotificationConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketOwnershipControls(args, optionsOrCb, cb) { - const command = new GetBucketOwnershipControlsCommand_1.GetBucketOwnershipControlsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketPolicy(args, optionsOrCb, cb) { - const command = new GetBucketPolicyCommand_1.GetBucketPolicyCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketPolicyStatus(args, optionsOrCb, cb) { - const command = new GetBucketPolicyStatusCommand_1.GetBucketPolicyStatusCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketReplication(args, optionsOrCb, cb) { - const command = new GetBucketReplicationCommand_1.GetBucketReplicationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketRequestPayment(args, optionsOrCb, cb) { - const command = new GetBucketRequestPaymentCommand_1.GetBucketRequestPaymentCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketTagging(args, optionsOrCb, cb) { - const command = new GetBucketTaggingCommand_1.GetBucketTaggingCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketVersioning(args, optionsOrCb, cb) { - const command = new GetBucketVersioningCommand_1.GetBucketVersioningCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getBucketWebsite(args, optionsOrCb, cb) { - const command = new GetBucketWebsiteCommand_1.GetBucketWebsiteCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getObject(args, optionsOrCb, cb) { - const command = new GetObjectCommand_1.GetObjectCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getObjectAcl(args, optionsOrCb, cb) { - const command = new GetObjectAclCommand_1.GetObjectAclCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getObjectAttributes(args, optionsOrCb, cb) { - const command = new GetObjectAttributesCommand_1.GetObjectAttributesCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getObjectLegalHold(args, optionsOrCb, cb) { - const command = new GetObjectLegalHoldCommand_1.GetObjectLegalHoldCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getObjectLockConfiguration(args, optionsOrCb, cb) { - const command = new GetObjectLockConfigurationCommand_1.GetObjectLockConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getObjectRetention(args, optionsOrCb, cb) { - const command = new GetObjectRetentionCommand_1.GetObjectRetentionCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getObjectTagging(args, optionsOrCb, cb) { - const command = new GetObjectTaggingCommand_1.GetObjectTaggingCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getObjectTorrent(args, optionsOrCb, cb) { - const command = new GetObjectTorrentCommand_1.GetObjectTorrentCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - getPublicAccessBlock(args, optionsOrCb, cb) { - const command = new GetPublicAccessBlockCommand_1.GetPublicAccessBlockCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - headBucket(args, optionsOrCb, cb) { - const command = new HeadBucketCommand_1.HeadBucketCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - headObject(args, optionsOrCb, cb) { - const command = new HeadObjectCommand_1.HeadObjectCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listBucketAnalyticsConfigurations(args, optionsOrCb, cb) { - const command = new ListBucketAnalyticsConfigurationsCommand_1.ListBucketAnalyticsConfigurationsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listBucketIntelligentTieringConfigurations(args, optionsOrCb, cb) { - const command = new ListBucketIntelligentTieringConfigurationsCommand_1.ListBucketIntelligentTieringConfigurationsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listBucketInventoryConfigurations(args, optionsOrCb, cb) { - const command = new ListBucketInventoryConfigurationsCommand_1.ListBucketInventoryConfigurationsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listBucketMetricsConfigurations(args, optionsOrCb, cb) { - const command = new ListBucketMetricsConfigurationsCommand_1.ListBucketMetricsConfigurationsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listBuckets(args, optionsOrCb, cb) { - const command = new ListBucketsCommand_1.ListBucketsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listMultipartUploads(args, optionsOrCb, cb) { - const command = new ListMultipartUploadsCommand_1.ListMultipartUploadsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listObjects(args, optionsOrCb, cb) { - const command = new ListObjectsCommand_1.ListObjectsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listObjectsV2(args, optionsOrCb, cb) { - const command = new ListObjectsV2Command_1.ListObjectsV2Command(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listObjectVersions(args, optionsOrCb, cb) { - const command = new ListObjectVersionsCommand_1.ListObjectVersionsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - listParts(args, optionsOrCb, cb) { - const command = new ListPartsCommand_1.ListPartsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketAccelerateConfiguration(args, optionsOrCb, cb) { - const command = new PutBucketAccelerateConfigurationCommand_1.PutBucketAccelerateConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketAcl(args, optionsOrCb, cb) { - const command = new PutBucketAclCommand_1.PutBucketAclCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketAnalyticsConfiguration(args, optionsOrCb, cb) { - const command = new PutBucketAnalyticsConfigurationCommand_1.PutBucketAnalyticsConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketCors(args, optionsOrCb, cb) { - const command = new PutBucketCorsCommand_1.PutBucketCorsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketEncryption(args, optionsOrCb, cb) { - const command = new PutBucketEncryptionCommand_1.PutBucketEncryptionCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketIntelligentTieringConfiguration(args, optionsOrCb, cb) { - const command = new PutBucketIntelligentTieringConfigurationCommand_1.PutBucketIntelligentTieringConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketInventoryConfiguration(args, optionsOrCb, cb) { - const command = new PutBucketInventoryConfigurationCommand_1.PutBucketInventoryConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketLifecycleConfiguration(args, optionsOrCb, cb) { - const command = new PutBucketLifecycleConfigurationCommand_1.PutBucketLifecycleConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketLogging(args, optionsOrCb, cb) { - const command = new PutBucketLoggingCommand_1.PutBucketLoggingCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketMetricsConfiguration(args, optionsOrCb, cb) { - const command = new PutBucketMetricsConfigurationCommand_1.PutBucketMetricsConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketNotificationConfiguration(args, optionsOrCb, cb) { - const command = new PutBucketNotificationConfigurationCommand_1.PutBucketNotificationConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketOwnershipControls(args, optionsOrCb, cb) { - const command = new PutBucketOwnershipControlsCommand_1.PutBucketOwnershipControlsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketPolicy(args, optionsOrCb, cb) { - const command = new PutBucketPolicyCommand_1.PutBucketPolicyCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketReplication(args, optionsOrCb, cb) { - const command = new PutBucketReplicationCommand_1.PutBucketReplicationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketRequestPayment(args, optionsOrCb, cb) { - const command = new PutBucketRequestPaymentCommand_1.PutBucketRequestPaymentCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketTagging(args, optionsOrCb, cb) { - const command = new PutBucketTaggingCommand_1.PutBucketTaggingCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketVersioning(args, optionsOrCb, cb) { - const command = new PutBucketVersioningCommand_1.PutBucketVersioningCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putBucketWebsite(args, optionsOrCb, cb) { - const command = new PutBucketWebsiteCommand_1.PutBucketWebsiteCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putObject(args, optionsOrCb, cb) { - const command = new PutObjectCommand_1.PutObjectCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putObjectAcl(args, optionsOrCb, cb) { - const command = new PutObjectAclCommand_1.PutObjectAclCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putObjectLegalHold(args, optionsOrCb, cb) { - const command = new PutObjectLegalHoldCommand_1.PutObjectLegalHoldCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putObjectLockConfiguration(args, optionsOrCb, cb) { - const command = new PutObjectLockConfigurationCommand_1.PutObjectLockConfigurationCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putObjectRetention(args, optionsOrCb, cb) { - const command = new PutObjectRetentionCommand_1.PutObjectRetentionCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putObjectTagging(args, optionsOrCb, cb) { - const command = new PutObjectTaggingCommand_1.PutObjectTaggingCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - putPublicAccessBlock(args, optionsOrCb, cb) { - const command = new PutPublicAccessBlockCommand_1.PutPublicAccessBlockCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - restoreObject(args, optionsOrCb, cb) { - const command = new RestoreObjectCommand_1.RestoreObjectCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - selectObjectContent(args, optionsOrCb, cb) { - const command = new SelectObjectContentCommand_1.SelectObjectContentCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - uploadPart(args, optionsOrCb, cb) { - const command = new UploadPartCommand_1.UploadPartCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - uploadPartCopy(args, optionsOrCb, cb) { - const command = new UploadPartCopyCommand_1.UploadPartCopyCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - writeGetObjectResponse(args, optionsOrCb, cb) { - const command = new WriteGetObjectResponseCommand_1.WriteGetObjectResponseCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } } exports.S3 = S3; +(0, smithy_client_1.createAggregatedClient)(commands, S3); /***/ }), +<<<<<<< HEAD +/***/ 34692: +======= /***/ 17824: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.S3Client = exports.__Client = void 0; +const middleware_expect_continue_1 = __nccwpck_require__(17335); +const middleware_host_header_1 = __nccwpck_require__(23213); +const middleware_logger_1 = __nccwpck_require__(45288); +const middleware_recursion_detection_1 = __nccwpck_require__(13807); +const middleware_sdk_s3_1 = __nccwpck_require__(52776); +const middleware_signing_1 = __nccwpck_require__(25050); +const middleware_user_agent_1 = __nccwpck_require__(3549); +const config_resolver_1 = __nccwpck_require__(66041); +const eventstream_serde_config_resolver_1 = __nccwpck_require__(33299); +const middleware_content_length_1 = __nccwpck_require__(38959); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_retry_1 = __nccwpck_require__(54801); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "__Client", ({ enumerable: true, get: function () { return smithy_client_1.Client; } })); +const CreateSessionCommand_1 = __nccwpck_require__(47209); +const EndpointParameters_1 = __nccwpck_require__(28409); +const runtimeConfig_1 = __nccwpck_require__(12909); +const runtimeExtensions_1 = __nccwpck_require__(89243); +======= exports.S3Client = void 0; const config_resolver_1 = __nccwpck_require__(95406); const eventstream_serde_config_resolver_1 = __nccwpck_require__(41237); @@ -6312,19 +8467,22 @@ const middleware_signing_1 = __nccwpck_require__(33233); const middleware_user_agent_1 = __nccwpck_require__(54738); const smithy_client_1 = __nccwpck_require__(26351); const runtimeConfig_1 = __nccwpck_require__(94382); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class S3Client extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); - const _config_1 = (0, config_resolver_1.resolveRegionConfig)(_config_0); - const _config_2 = (0, config_resolver_1.resolveEndpointsConfig)(_config_1); - const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2); - const _config_4 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_3); - const _config_5 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_4); - const _config_6 = (0, middleware_bucket_endpoint_1.resolveBucketEndpointConfig)(_config_5); - const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6); - const _config_8 = (0, eventstream_serde_config_resolver_1.resolveEventStreamSerdeConfig)(_config_7); - super(_config_8); - this.config = _config_8; + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); + const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); + const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); + const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); + const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); + const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5); + const _config_7 = (0, middleware_sdk_s3_1.resolveS3Config)(_config_6, { session: [() => this, CreateSessionCommand_1.CreateSessionCommand] }); + const _config_8 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_7); + const _config_9 = (0, eventstream_serde_config_resolver_1.resolveEventStreamSerdeConfig)(_config_8); + const _config_10 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_9, configuration?.extensions || []); + super(_config_10); + this.config = _config_10; this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); @@ -6333,6 +8491,8 @@ class S3Client extends smithy_client_1.Client { this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config)); this.middlewareStack.use((0, middleware_sdk_s3_1.getValidateBucketNamePlugin)(this.config)); this.middlewareStack.use((0, middleware_expect_continue_1.getAddExpectContinuePlugin)(this.config)); + this.middlewareStack.use((0, middleware_sdk_s3_1.getRegionRedirectMiddlewarePlugin)(this.config)); + this.middlewareStack.use((0, middleware_sdk_s3_1.getS3ExpressPlugin)(this.config)); this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); } destroy() { @@ -6344,26 +8504,55 @@ exports.S3Client = S3Client; /***/ }), +<<<<<<< HEAD +/***/ 54745: +======= /***/ 18605: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.AbortMultipartUploadCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.AbortMultipartUploadCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class AbortMultipartUploadCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AbortMultipartUploadCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6372,17 +8561,21 @@ class AbortMultipartUploadCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.AbortMultipartUploadRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.AbortMultipartUploadOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "AbortMultipartUpload", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlAbortMultipartUploadCommand)(input, context); + return (0, Aws_restXml_1.se_AbortMultipartUploadCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlAbortMultipartUploadCommand)(output, context); + return (0, Aws_restXml_1.de_AbortMultipartUploadCommand)(output, context); } } exports.AbortMultipartUploadCommand = AbortMultipartUploadCommand; @@ -6390,12 +8583,27 @@ exports.AbortMultipartUploadCommand = AbortMultipartUploadCommand; /***/ }), +<<<<<<< HEAD +/***/ 48394: +======= /***/ 90130: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.CompleteMultipartUploadCommand = exports.$Command = void 0; +const middleware_sdk_s3_1 = __nccwpck_require__(52776); +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.CompleteMultipartUploadCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_sdk_s3_1 = __nccwpck_require__(60444); @@ -6404,16 +8612,33 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class CompleteMultipartUploadCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CompleteMultipartUploadCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_sdk_s3_1.getThrow200ExceptionsPlugin)(configuration)); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6424,15 +8649,19 @@ class CompleteMultipartUploadCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_0_1.CompleteMultipartUploadRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.CompleteMultipartUploadOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "CompleteMultipartUpload", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlCompleteMultipartUploadCommand)(input, context); + return (0, Aws_restXml_1.se_CompleteMultipartUploadCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlCompleteMultipartUploadCommand)(output, context); + return (0, Aws_restXml_1.de_CompleteMultipartUploadCommand)(output, context); } } exports.CompleteMultipartUploadCommand = CompleteMultipartUploadCommand; @@ -6440,12 +8669,27 @@ exports.CompleteMultipartUploadCommand = CompleteMultipartUploadCommand; /***/ }), +<<<<<<< HEAD +/***/ 47241: +======= /***/ 14578: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.CopyObjectCommand = exports.$Command = void 0; +const middleware_sdk_s3_1 = __nccwpck_require__(52776); +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.CopyObjectCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_sdk_s3_1 = __nccwpck_require__(60444); @@ -6454,16 +8698,32 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class CopyObjectCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CopyObjectCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_sdk_s3_1.getThrow200ExceptionsPlugin)(configuration)); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6474,15 +8734,19 @@ class CopyObjectCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_0_1.CopyObjectRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.CopyObjectOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "CopyObject", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlCopyObjectCommand)(input, context); + return (0, Aws_restXml_1.se_CopyObjectCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlCopyObjectCommand)(output, context); + return (0, Aws_restXml_1.de_CopyObjectCommand)(output, context); } } exports.CopyObjectCommand = CopyObjectCommand; @@ -6490,25 +8754,57 @@ exports.CopyObjectCommand = CopyObjectCommand; /***/ }), +<<<<<<< HEAD +/***/ 37648: +======= /***/ 84579: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.CreateBucketCommand = exports.$Command = void 0; +const middleware_location_constraint_1 = __nccwpck_require__(0); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.CreateBucketCommand = void 0; const middleware_location_constraint_1 = __nccwpck_require__(13882); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class CreateBucketCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + DisableAccessPoints: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateBucketCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_location_constraint_1.getLocationConstraintPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; @@ -6518,17 +8814,21 @@ class CreateBucketCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.CreateBucketRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.CreateBucketOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "CreateBucket", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlCreateBucketCommand)(input, context); + return (0, Aws_restXml_1.se_CreateBucketCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlCreateBucketCommand)(output, context); + return (0, Aws_restXml_1.de_CreateBucketCommand)(output, context); } } exports.CreateBucketCommand = CreateBucketCommand; @@ -6536,12 +8836,26 @@ exports.CreateBucketCommand = CreateBucketCommand; /***/ }), +<<<<<<< HEAD +/***/ 51963: +======= /***/ 80369: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.CreateMultipartUploadCommand = exports.$Command = void 0; +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.CreateMultipartUploadCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); @@ -6549,15 +8863,32 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class CreateMultipartUploadCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateMultipartUploadCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6568,15 +8899,19 @@ class CreateMultipartUploadCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_0_1.CreateMultipartUploadRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.CreateMultipartUploadOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "CreateMultipartUpload", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlCreateMultipartUploadCommand)(input, context); + return (0, Aws_restXml_1.se_CreateMultipartUploadCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlCreateMultipartUploadCommand)(output, context); + return (0, Aws_restXml_1.de_CreateMultipartUploadCommand)(output, context); } } exports.CreateMultipartUploadCommand = CreateMultipartUploadCommand; @@ -6584,12 +8919,41 @@ exports.CreateMultipartUploadCommand = CreateMultipartUploadCommand; /***/ }), +<<<<<<< HEAD +/***/ 47209: +======= /***/ 20325: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.CreateSessionCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +class CreateSessionCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } +======= exports.DeleteBucketAnalyticsConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); @@ -6597,13 +8961,80 @@ const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); class DeleteBucketAnalyticsConfigurationCommand extends smithy_client_1.Command { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, CreateSessionCommand.getEndpointParameterInstructions())); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "S3Client"; + const commandName = "CreateSessionCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: models_0_1.CreateSessionOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "CreateSession", + }, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return (0, Aws_restXml_1.se_CreateSessionCommand)(input, context); + } + deserialize(output, context) { + return (0, Aws_restXml_1.de_CreateSessionCommand)(output, context); + } +} +exports.CreateSessionCommand = CreateSessionCommand; + + +/***/ }), + +/***/ 26373: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DeleteBucketAnalyticsConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +class DeleteBucketAnalyticsConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketAnalyticsConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6612,17 +9043,21 @@ class DeleteBucketAnalyticsConfigurationCommand extends smithy_client_1.Command logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketAnalyticsConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketAnalyticsConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketAnalyticsConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketAnalyticsConfigurationCommand)(output, context); } } exports.DeleteBucketAnalyticsConfigurationCommand = DeleteBucketAnalyticsConfigurationCommand; @@ -6630,24 +9065,54 @@ exports.DeleteBucketAnalyticsConfigurationCommand = DeleteBucketAnalyticsConfigu /***/ }), +<<<<<<< HEAD +/***/ 40235: +======= /***/ 41253: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6656,17 +9121,21 @@ class DeleteBucketCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucket", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketCommand)(output, context); } } exports.DeleteBucketCommand = DeleteBucketCommand; @@ -6674,26 +9143,55 @@ exports.DeleteBucketCommand = DeleteBucketCommand; /***/ }), +<<<<<<< HEAD +/***/ 12335: +======= /***/ 68989: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketCorsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketCorsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketCorsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketCorsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6702,17 +9200,21 @@ class DeleteBucketCorsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketCorsRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketCors", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketCorsCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketCorsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketCorsCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketCorsCommand)(output, context); } } exports.DeleteBucketCorsCommand = DeleteBucketCorsCommand; @@ -6720,26 +9222,55 @@ exports.DeleteBucketCorsCommand = DeleteBucketCorsCommand; /***/ }), +<<<<<<< HEAD +/***/ 13305: +======= /***/ 35734: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketEncryptionCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketEncryptionCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketEncryptionCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketEncryptionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6748,17 +9279,21 @@ class DeleteBucketEncryptionCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketEncryptionRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketEncryption", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketEncryptionCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketEncryptionCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketEncryptionCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketEncryptionCommand)(output, context); } } exports.DeleteBucketEncryptionCommand = DeleteBucketEncryptionCommand; @@ -6766,26 +9301,55 @@ exports.DeleteBucketEncryptionCommand = DeleteBucketEncryptionCommand; /***/ }), +<<<<<<< HEAD +/***/ 87902: +======= /***/ 17837: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketIntelligentTieringConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketIntelligentTieringConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketIntelligentTieringConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketIntelligentTieringConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6794,17 +9358,21 @@ class DeleteBucketIntelligentTieringConfigurationCommand extends smithy_client_1 logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketIntelligentTieringConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketIntelligentTieringConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketIntelligentTieringConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketIntelligentTieringConfigurationCommand)(output, context); } } exports.DeleteBucketIntelligentTieringConfigurationCommand = DeleteBucketIntelligentTieringConfigurationCommand; @@ -6812,26 +9380,55 @@ exports.DeleteBucketIntelligentTieringConfigurationCommand = DeleteBucketIntelli /***/ }), +<<<<<<< HEAD +/***/ 4642: +======= /***/ 27350: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketInventoryConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketInventoryConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketInventoryConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketInventoryConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6840,17 +9437,21 @@ class DeleteBucketInventoryConfigurationCommand extends smithy_client_1.Command logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketInventoryConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketInventoryConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketInventoryConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketInventoryConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketInventoryConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketInventoryConfigurationCommand)(output, context); } } exports.DeleteBucketInventoryConfigurationCommand = DeleteBucketInventoryConfigurationCommand; @@ -6858,26 +9459,55 @@ exports.DeleteBucketInventoryConfigurationCommand = DeleteBucketInventoryConfigu /***/ }), +<<<<<<< HEAD +/***/ 56903: +======= /***/ 93386: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketLifecycleCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketLifecycleCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketLifecycleCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketLifecycleCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6886,17 +9516,21 @@ class DeleteBucketLifecycleCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketLifecycleRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketLifecycle", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketLifecycleCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketLifecycleCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketLifecycleCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketLifecycleCommand)(output, context); } } exports.DeleteBucketLifecycleCommand = DeleteBucketLifecycleCommand; @@ -6904,26 +9538,55 @@ exports.DeleteBucketLifecycleCommand = DeleteBucketLifecycleCommand; /***/ }), +<<<<<<< HEAD +/***/ 70617: +======= /***/ 14002: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketMetricsConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketMetricsConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketMetricsConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketMetricsConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6932,17 +9595,21 @@ class DeleteBucketMetricsConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketMetricsConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketMetricsConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketMetricsConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketMetricsConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketMetricsConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketMetricsConfigurationCommand)(output, context); } } exports.DeleteBucketMetricsConfigurationCommand = DeleteBucketMetricsConfigurationCommand; @@ -6950,26 +9617,55 @@ exports.DeleteBucketMetricsConfigurationCommand = DeleteBucketMetricsConfigurati /***/ }), +<<<<<<< HEAD +/***/ 96947: +======= /***/ 75145: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketOwnershipControlsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketOwnershipControlsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketOwnershipControlsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketOwnershipControlsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -6978,17 +9674,21 @@ class DeleteBucketOwnershipControlsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketOwnershipControlsRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketOwnershipControls", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketOwnershipControlsCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketOwnershipControlsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketOwnershipControlsCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketOwnershipControlsCommand)(output, context); } } exports.DeleteBucketOwnershipControlsCommand = DeleteBucketOwnershipControlsCommand; @@ -6996,26 +9696,55 @@ exports.DeleteBucketOwnershipControlsCommand = DeleteBucketOwnershipControlsComm /***/ }), +<<<<<<< HEAD +/***/ 24789: +======= /***/ 72768: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketPolicyCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketPolicyCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketPolicyCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketPolicyCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7024,17 +9753,21 @@ class DeleteBucketPolicyCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketPolicyRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketPolicy", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketPolicyCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketPolicyCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketPolicyCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketPolicyCommand)(output, context); } } exports.DeleteBucketPolicyCommand = DeleteBucketPolicyCommand; @@ -7042,26 +9775,55 @@ exports.DeleteBucketPolicyCommand = DeleteBucketPolicyCommand; /***/ }), +<<<<<<< HEAD +/***/ 14412: +======= /***/ 59847: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketReplicationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketReplicationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketReplicationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketReplicationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7070,17 +9832,21 @@ class DeleteBucketReplicationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketReplicationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketReplication", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketReplicationCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketReplicationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketReplicationCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketReplicationCommand)(output, context); } } exports.DeleteBucketReplicationCommand = DeleteBucketReplicationCommand; @@ -7088,26 +9854,55 @@ exports.DeleteBucketReplicationCommand = DeleteBucketReplicationCommand; /***/ }), +<<<<<<< HEAD +/***/ 89218: +======= /***/ 54231: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketTaggingCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketTaggingCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketTaggingCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketTaggingCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7116,17 +9911,21 @@ class DeleteBucketTaggingCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketTaggingRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketTagging", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketTaggingCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketTaggingCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketTaggingCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketTaggingCommand)(output, context); } } exports.DeleteBucketTaggingCommand = DeleteBucketTaggingCommand; @@ -7134,26 +9933,55 @@ exports.DeleteBucketTaggingCommand = DeleteBucketTaggingCommand; /***/ }), +<<<<<<< HEAD +/***/ 36069: +======= /***/ 35795: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteBucketWebsiteCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteBucketWebsiteCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteBucketWebsiteCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteBucketWebsiteCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7162,17 +9990,21 @@ class DeleteBucketWebsiteCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteBucketWebsiteRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteBucketWebsite", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteBucketWebsiteCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteBucketWebsiteCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteBucketWebsiteCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteBucketWebsiteCommand)(output, context); } } exports.DeleteBucketWebsiteCommand = DeleteBucketWebsiteCommand; @@ -7180,26 +10012,55 @@ exports.DeleteBucketWebsiteCommand = DeleteBucketWebsiteCommand; /***/ }), +<<<<<<< HEAD +/***/ 84529: +======= /***/ 13135: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteObjectCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteObjectCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteObjectCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteObjectCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7208,17 +10069,21 @@ class DeleteObjectCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteObjectRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.DeleteObjectOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteObject", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteObjectCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteObjectCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteObjectCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteObjectCommand)(output, context); } } exports.DeleteObjectCommand = DeleteObjectCommand; @@ -7226,26 +10091,54 @@ exports.DeleteObjectCommand = DeleteObjectCommand; /***/ }), +<<<<<<< HEAD +/***/ 87937: +======= /***/ 40054: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteObjectTaggingCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteObjectTaggingCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteObjectTaggingCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteObjectTaggingCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7254,17 +10147,21 @@ class DeleteObjectTaggingCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteObjectTaggingRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.DeleteObjectTaggingOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteObjectTagging", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteObjectTaggingCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteObjectTaggingCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteObjectTaggingCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteObjectTaggingCommand)(output, context); } } exports.DeleteObjectTaggingCommand = DeleteObjectTaggingCommand; @@ -7272,12 +10169,25 @@ exports.DeleteObjectTaggingCommand = DeleteObjectTaggingCommand; /***/ }), +<<<<<<< HEAD +/***/ 17735: +======= /***/ 49810: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeleteObjectsCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeleteObjectsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -7285,14 +10195,30 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeleteObjectsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeleteObjectsCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -7306,17 +10232,21 @@ class DeleteObjectsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeleteObjectsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.DeleteObjectsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeleteObjects", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeleteObjectsCommand)(input, context); + return (0, Aws_restXml_1.se_DeleteObjectsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeleteObjectsCommand)(output, context); + return (0, Aws_restXml_1.de_DeleteObjectsCommand)(output, context); } } exports.DeleteObjectsCommand = DeleteObjectsCommand; @@ -7324,26 +10254,55 @@ exports.DeleteObjectsCommand = DeleteObjectsCommand; /***/ }), +<<<<<<< HEAD +/***/ 8063: +======= /***/ 33680: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DeletePublicAccessBlockCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.DeletePublicAccessBlockCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DeletePublicAccessBlockCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DeletePublicAccessBlockCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7352,17 +10311,21 @@ class DeletePublicAccessBlockCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DeletePublicAccessBlockRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "DeletePublicAccessBlock", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlDeletePublicAccessBlockCommand)(input, context); + return (0, Aws_restXml_1.se_DeletePublicAccessBlockCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlDeletePublicAccessBlockCommand)(output, context); + return (0, Aws_restXml_1.de_DeletePublicAccessBlockCommand)(output, context); } } exports.DeletePublicAccessBlockCommand = DeletePublicAccessBlockCommand; @@ -7370,26 +10333,55 @@ exports.DeletePublicAccessBlockCommand = DeletePublicAccessBlockCommand; /***/ }), +<<<<<<< HEAD +/***/ 95005: +======= /***/ 74750: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketAccelerateConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketAccelerateConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketAccelerateConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketAccelerateConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7398,17 +10390,21 @@ class GetBucketAccelerateConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketAccelerateConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketAccelerateConfigurationOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketAccelerateConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketAccelerateConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketAccelerateConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketAccelerateConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketAccelerateConfigurationCommand)(output, context); } } exports.GetBucketAccelerateConfigurationCommand = GetBucketAccelerateConfigurationCommand; @@ -7416,26 +10412,55 @@ exports.GetBucketAccelerateConfigurationCommand = GetBucketAccelerateConfigurati /***/ }), +<<<<<<< HEAD +/***/ 59650: +======= /***/ 44423: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketAclCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketAclCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketAclCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketAclCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7444,17 +10469,21 @@ class GetBucketAclCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketAclRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketAclOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketAcl", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketAclCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketAclCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketAclCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketAclCommand)(output, context); } } exports.GetBucketAclCommand = GetBucketAclCommand; @@ -7462,26 +10491,55 @@ exports.GetBucketAclCommand = GetBucketAclCommand; /***/ }), +<<<<<<< HEAD +/***/ 5689: +======= /***/ 84379: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketAnalyticsConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketAnalyticsConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketAnalyticsConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketAnalyticsConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7490,17 +10548,21 @@ class GetBucketAnalyticsConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketAnalyticsConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketAnalyticsConfigurationOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketAnalyticsConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketAnalyticsConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketAnalyticsConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketAnalyticsConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketAnalyticsConfigurationCommand)(output, context); } } exports.GetBucketAnalyticsConfigurationCommand = GetBucketAnalyticsConfigurationCommand; @@ -7508,26 +10570,55 @@ exports.GetBucketAnalyticsConfigurationCommand = GetBucketAnalyticsConfiguration /***/ }), +<<<<<<< HEAD +/***/ 43088: +======= /***/ 88954: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketCorsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketCorsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketCorsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketCorsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7536,17 +10627,21 @@ class GetBucketCorsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketCorsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketCorsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketCors", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketCorsCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketCorsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketCorsCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketCorsCommand)(output, context); } } exports.GetBucketCorsCommand = GetBucketCorsCommand; @@ -7554,26 +10649,56 @@ exports.GetBucketCorsCommand = GetBucketCorsCommand; /***/ }), +<<<<<<< HEAD +/***/ 53637: +======= /***/ 30882: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketEncryptionCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketEncryptionCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketEncryptionCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketEncryptionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7582,17 +10707,21 @@ class GetBucketEncryptionCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketEncryptionRequestFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, outputFilterSensitiveLog: models_0_1.GetBucketEncryptionOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketEncryption", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketEncryptionCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketEncryptionCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketEncryptionCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketEncryptionCommand)(output, context); } } exports.GetBucketEncryptionCommand = GetBucketEncryptionCommand; @@ -7600,26 +10729,55 @@ exports.GetBucketEncryptionCommand = GetBucketEncryptionCommand; /***/ }), +<<<<<<< HEAD +/***/ 39216: +======= /***/ 5604: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketIntelligentTieringConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketIntelligentTieringConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketIntelligentTieringConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketIntelligentTieringConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7628,17 +10786,21 @@ class GetBucketIntelligentTieringConfigurationCommand extends smithy_client_1.Co logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketIntelligentTieringConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketIntelligentTieringConfigurationOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketIntelligentTieringConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketIntelligentTieringConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketIntelligentTieringConfigurationCommand)(output, context); } } exports.GetBucketIntelligentTieringConfigurationCommand = GetBucketIntelligentTieringConfigurationCommand; @@ -7646,26 +10808,56 @@ exports.GetBucketIntelligentTieringConfigurationCommand = GetBucketIntelligentTi /***/ }), +<<<<<<< HEAD +/***/ 69553: +======= /***/ 90152: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketInventoryConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketInventoryConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketInventoryConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketInventoryConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7674,17 +10866,21 @@ class GetBucketInventoryConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketInventoryConfigurationRequestFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, outputFilterSensitiveLog: models_0_1.GetBucketInventoryConfigurationOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketInventoryConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketInventoryConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketInventoryConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketInventoryConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketInventoryConfigurationCommand)(output, context); } } exports.GetBucketInventoryConfigurationCommand = GetBucketInventoryConfigurationCommand; @@ -7692,26 +10888,55 @@ exports.GetBucketInventoryConfigurationCommand = GetBucketInventoryConfiguration /***/ }), +<<<<<<< HEAD +/***/ 30426: +======= /***/ 51601: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketLifecycleConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketLifecycleConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketLifecycleConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketLifecycleConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7720,17 +10945,21 @@ class GetBucketLifecycleConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketLifecycleConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketLifecycleConfigurationOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketLifecycleConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketLifecycleConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketLifecycleConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketLifecycleConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketLifecycleConfigurationCommand)(output, context); } } exports.GetBucketLifecycleConfigurationCommand = GetBucketLifecycleConfigurationCommand; @@ -7738,26 +10967,55 @@ exports.GetBucketLifecycleConfigurationCommand = GetBucketLifecycleConfiguration /***/ }), +<<<<<<< HEAD +/***/ 60074: +======= /***/ 8212: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketLocationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketLocationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketLocationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketLocationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7766,17 +11024,21 @@ class GetBucketLocationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketLocationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketLocationOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketLocation", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketLocationCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketLocationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketLocationCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketLocationCommand)(output, context); } } exports.GetBucketLocationCommand = GetBucketLocationCommand; @@ -7784,26 +11046,55 @@ exports.GetBucketLocationCommand = GetBucketLocationCommand; /***/ }), +<<<<<<< HEAD +/***/ 5152: +======= /***/ 94953: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketLoggingCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketLoggingCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketLoggingCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketLoggingCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7812,17 +11103,21 @@ class GetBucketLoggingCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketLoggingRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketLoggingOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketLogging", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketLoggingCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketLoggingCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketLoggingCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketLoggingCommand)(output, context); } } exports.GetBucketLoggingCommand = GetBucketLoggingCommand; @@ -7830,26 +11125,55 @@ exports.GetBucketLoggingCommand = GetBucketLoggingCommand; /***/ }), +<<<<<<< HEAD +/***/ 97986: +======= /***/ 86801: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketMetricsConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketMetricsConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketMetricsConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketMetricsConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7858,17 +11182,21 @@ class GetBucketMetricsConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketMetricsConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketMetricsConfigurationOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketMetricsConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketMetricsConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketMetricsConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketMetricsConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketMetricsConfigurationCommand)(output, context); } } exports.GetBucketMetricsConfigurationCommand = GetBucketMetricsConfigurationCommand; @@ -7876,26 +11204,55 @@ exports.GetBucketMetricsConfigurationCommand = GetBucketMetricsConfigurationComm /***/ }), +<<<<<<< HEAD +/***/ 31857: +======= /***/ 96677: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketNotificationConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketNotificationConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketNotificationConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketNotificationConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7904,17 +11261,21 @@ class GetBucketNotificationConfigurationCommand extends smithy_client_1.Command logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketNotificationConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.NotificationConfigurationFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketNotificationConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketNotificationConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketNotificationConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketNotificationConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketNotificationConfigurationCommand)(output, context); } } exports.GetBucketNotificationConfigurationCommand = GetBucketNotificationConfigurationCommand; @@ -7922,26 +11283,55 @@ exports.GetBucketNotificationConfigurationCommand = GetBucketNotificationConfigu /***/ }), +<<<<<<< HEAD +/***/ 90940: +======= /***/ 94801: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketOwnershipControlsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketOwnershipControlsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketOwnershipControlsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketOwnershipControlsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7950,17 +11340,21 @@ class GetBucketOwnershipControlsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketOwnershipControlsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketOwnershipControlsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketOwnershipControls", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketOwnershipControlsCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketOwnershipControlsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketOwnershipControlsCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketOwnershipControlsCommand)(output, context); } } exports.GetBucketOwnershipControlsCommand = GetBucketOwnershipControlsCommand; @@ -7968,26 +11362,55 @@ exports.GetBucketOwnershipControlsCommand = GetBucketOwnershipControlsCommand; /***/ }), +<<<<<<< HEAD +/***/ 46067: +======= /***/ 92799: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketPolicyCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketPolicyCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketPolicyCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketPolicyCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -7996,17 +11419,21 @@ class GetBucketPolicyCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketPolicyRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketPolicyOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketPolicy", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketPolicyCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketPolicyCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketPolicyCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketPolicyCommand)(output, context); } } exports.GetBucketPolicyCommand = GetBucketPolicyCommand; @@ -8014,26 +11441,55 @@ exports.GetBucketPolicyCommand = GetBucketPolicyCommand; /***/ }), +<<<<<<< HEAD +/***/ 77093: +======= /***/ 54619: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketPolicyStatusCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketPolicyStatusCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketPolicyStatusCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketPolicyStatusCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8042,17 +11498,21 @@ class GetBucketPolicyStatusCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketPolicyStatusRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketPolicyStatusOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketPolicyStatus", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketPolicyStatusCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketPolicyStatusCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketPolicyStatusCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketPolicyStatusCommand)(output, context); } } exports.GetBucketPolicyStatusCommand = GetBucketPolicyStatusCommand; @@ -8060,26 +11520,55 @@ exports.GetBucketPolicyStatusCommand = GetBucketPolicyStatusCommand; /***/ }), +<<<<<<< HEAD +/***/ 36675: +======= /***/ 31593: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketReplicationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketReplicationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketReplicationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketReplicationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8088,17 +11577,21 @@ class GetBucketReplicationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketReplicationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketReplicationOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketReplication", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketReplicationCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketReplicationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketReplicationCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketReplicationCommand)(output, context); } } exports.GetBucketReplicationCommand = GetBucketReplicationCommand; @@ -8106,26 +11599,55 @@ exports.GetBucketReplicationCommand = GetBucketReplicationCommand; /***/ }), +<<<<<<< HEAD +/***/ 98115: +======= /***/ 42641: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketRequestPaymentCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketRequestPaymentCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketRequestPaymentCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketRequestPaymentCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8134,17 +11656,21 @@ class GetBucketRequestPaymentCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketRequestPaymentRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketRequestPaymentOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketRequestPayment", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketRequestPaymentCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketRequestPaymentCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketRequestPaymentCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketRequestPaymentCommand)(output, context); } } exports.GetBucketRequestPaymentCommand = GetBucketRequestPaymentCommand; @@ -8152,26 +11678,55 @@ exports.GetBucketRequestPaymentCommand = GetBucketRequestPaymentCommand; /***/ }), +<<<<<<< HEAD +/***/ 61300: +======= /***/ 82404: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketTaggingCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketTaggingCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketTaggingCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketTaggingCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8180,17 +11735,21 @@ class GetBucketTaggingCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketTaggingRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketTaggingOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketTagging", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketTaggingCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketTaggingCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketTaggingCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketTaggingCommand)(output, context); } } exports.GetBucketTaggingCommand = GetBucketTaggingCommand; @@ -8198,26 +11757,55 @@ exports.GetBucketTaggingCommand = GetBucketTaggingCommand; /***/ }), +<<<<<<< HEAD +/***/ 90894: +======= /***/ 37097: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketVersioningCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketVersioningCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketVersioningCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketVersioningCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8226,17 +11814,21 @@ class GetBucketVersioningCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketVersioningRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketVersioningOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketVersioning", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketVersioningCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketVersioningCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketVersioningCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketVersioningCommand)(output, context); } } exports.GetBucketVersioningCommand = GetBucketVersioningCommand; @@ -8244,26 +11836,55 @@ exports.GetBucketVersioningCommand = GetBucketVersioningCommand; /***/ }), +<<<<<<< HEAD +/***/ 58382: +======= /***/ 68163: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetBucketWebsiteCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetBucketWebsiteCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetBucketWebsiteCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetBucketWebsiteCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8272,17 +11893,21 @@ class GetBucketWebsiteCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetBucketWebsiteRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetBucketWebsiteOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetBucketWebsite", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetBucketWebsiteCommand)(input, context); + return (0, Aws_restXml_1.se_GetBucketWebsiteCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetBucketWebsiteCommand)(output, context); + return (0, Aws_restXml_1.de_GetBucketWebsiteCommand)(output, context); } } exports.GetBucketWebsiteCommand = GetBucketWebsiteCommand; @@ -8290,26 +11915,55 @@ exports.GetBucketWebsiteCommand = GetBucketWebsiteCommand; /***/ }), +<<<<<<< HEAD +/***/ 8732: +======= /***/ 24410: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetObjectAclCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetObjectAclCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetObjectAclCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetObjectAclCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8318,17 +11972,21 @@ class GetObjectAclCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetObjectAclRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetObjectAclOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetObjectAcl", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetObjectAclCommand)(input, context); + return (0, Aws_restXml_1.se_GetObjectAclCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetObjectAclCommand)(output, context); + return (0, Aws_restXml_1.de_GetObjectAclCommand)(output, context); } } exports.GetObjectAclCommand = GetObjectAclCommand; @@ -8336,12 +11994,26 @@ exports.GetObjectAclCommand = GetObjectAclCommand; /***/ }), +<<<<<<< HEAD +/***/ 65852: +======= /***/ 61105: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetObjectAttributesCommand = exports.$Command = void 0; +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetObjectAttributesCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); @@ -8349,15 +12021,31 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetObjectAttributesCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetObjectAttributesCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8367,16 +12055,20 @@ class GetObjectAttributesCommand extends smithy_client_1.Command { clientName, commandName, inputFilterSensitiveLog: models_0_1.GetObjectAttributesRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetObjectAttributesOutputFilterSensitiveLog, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetObjectAttributes", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetObjectAttributesCommand)(input, context); + return (0, Aws_restXml_1.se_GetObjectAttributesCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetObjectAttributesCommand)(output, context); + return (0, Aws_restXml_1.de_GetObjectAttributesCommand)(output, context); } } exports.GetObjectAttributesCommand = GetObjectAttributesCommand; @@ -8384,12 +12076,27 @@ exports.GetObjectAttributesCommand = GetObjectAttributesCommand; /***/ }), +<<<<<<< HEAD +/***/ 70184: +======= /***/ 5846: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetObjectCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetObjectCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -8398,15 +12105,32 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetObjectCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetObjectCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestChecksumRequired: false, @@ -8423,15 +12147,19 @@ class GetObjectCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_0_1.GetObjectRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetObjectOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetObject", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetObjectCommand)(input, context); + return (0, Aws_restXml_1.se_GetObjectCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetObjectCommand)(output, context); + return (0, Aws_restXml_1.de_GetObjectCommand)(output, context); } } exports.GetObjectCommand = GetObjectCommand; @@ -8439,26 +12167,54 @@ exports.GetObjectCommand = GetObjectCommand; /***/ }), +<<<<<<< HEAD +/***/ 7017: +======= /***/ 99937: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetObjectLegalHoldCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetObjectLegalHoldCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetObjectLegalHoldCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetObjectLegalHoldCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8467,17 +12223,21 @@ class GetObjectLegalHoldCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetObjectLegalHoldRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetObjectLegalHoldOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetObjectLegalHold", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetObjectLegalHoldCommand)(input, context); + return (0, Aws_restXml_1.se_GetObjectLegalHoldCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetObjectLegalHoldCommand)(output, context); + return (0, Aws_restXml_1.de_GetObjectLegalHoldCommand)(output, context); } } exports.GetObjectLegalHoldCommand = GetObjectLegalHoldCommand; @@ -8485,26 +12245,54 @@ exports.GetObjectLegalHoldCommand = GetObjectLegalHoldCommand; /***/ }), +<<<<<<< HEAD +/***/ 87797: +======= /***/ 67846: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetObjectLockConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetObjectLockConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetObjectLockConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetObjectLockConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8513,17 +12301,21 @@ class GetObjectLockConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetObjectLockConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetObjectLockConfigurationOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetObjectLockConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetObjectLockConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_GetObjectLockConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetObjectLockConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_GetObjectLockConfigurationCommand)(output, context); } } exports.GetObjectLockConfigurationCommand = GetObjectLockConfigurationCommand; @@ -8531,26 +12323,54 @@ exports.GetObjectLockConfigurationCommand = GetObjectLockConfigurationCommand; /***/ }), +<<<<<<< HEAD +/***/ 18426: +======= /***/ 13037: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetObjectRetentionCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetObjectRetentionCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetObjectRetentionCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetObjectRetentionCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8559,17 +12379,21 @@ class GetObjectRetentionCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetObjectRetentionRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetObjectRetentionOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetObjectRetention", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetObjectRetentionCommand)(input, context); + return (0, Aws_restXml_1.se_GetObjectRetentionCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetObjectRetentionCommand)(output, context); + return (0, Aws_restXml_1.de_GetObjectRetentionCommand)(output, context); } } exports.GetObjectRetentionCommand = GetObjectRetentionCommand; @@ -8577,26 +12401,54 @@ exports.GetObjectRetentionCommand = GetObjectRetentionCommand; /***/ }), +<<<<<<< HEAD +/***/ 28754: +======= /***/ 41222: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetObjectTaggingCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetObjectTaggingCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetObjectTaggingCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetObjectTaggingCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8605,17 +12457,21 @@ class GetObjectTaggingCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetObjectTaggingRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetObjectTaggingOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetObjectTagging", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetObjectTaggingCommand)(input, context); + return (0, Aws_restXml_1.se_GetObjectTaggingCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetObjectTaggingCommand)(output, context); + return (0, Aws_restXml_1.de_GetObjectTaggingCommand)(output, context); } } exports.GetObjectTaggingCommand = GetObjectTaggingCommand; @@ -8623,26 +12479,55 @@ exports.GetObjectTaggingCommand = GetObjectTaggingCommand; /***/ }), +<<<<<<< HEAD +/***/ 66888: +======= /***/ 65068: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetObjectTorrentCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetObjectTorrentCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetObjectTorrentCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetObjectTorrentCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8651,17 +12536,21 @@ class GetObjectTorrentCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetObjectTorrentRequestFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, outputFilterSensitiveLog: models_0_1.GetObjectTorrentOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetObjectTorrent", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetObjectTorrentCommand)(input, context); + return (0, Aws_restXml_1.se_GetObjectTorrentCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetObjectTorrentCommand)(output, context); + return (0, Aws_restXml_1.de_GetObjectTorrentCommand)(output, context); } } exports.GetObjectTorrentCommand = GetObjectTorrentCommand; @@ -8669,26 +12558,55 @@ exports.GetObjectTorrentCommand = GetObjectTorrentCommand; /***/ }), +<<<<<<< HEAD +/***/ 22223: +======= /***/ 68639: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetPublicAccessBlockCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.GetPublicAccessBlockCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetPublicAccessBlockCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetPublicAccessBlockCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8697,17 +12615,21 @@ class GetPublicAccessBlockCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetPublicAccessBlockRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetPublicAccessBlockOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "GetPublicAccessBlock", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlGetPublicAccessBlockCommand)(input, context); + return (0, Aws_restXml_1.se_GetPublicAccessBlockCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlGetPublicAccessBlockCommand)(output, context); + return (0, Aws_restXml_1.de_GetPublicAccessBlockCommand)(output, context); } } exports.GetPublicAccessBlockCommand = GetPublicAccessBlockCommand; @@ -8715,26 +12637,54 @@ exports.GetPublicAccessBlockCommand = GetPublicAccessBlockCommand; /***/ }), +<<<<<<< HEAD +/***/ 93946: +======= /***/ 6005: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.HeadBucketCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.HeadBucketCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class HeadBucketCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, HeadBucketCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8743,17 +12693,21 @@ class HeadBucketCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.HeadBucketRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "HeadBucket", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlHeadBucketCommand)(input, context); + return (0, Aws_restXml_1.se_HeadBucketCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlHeadBucketCommand)(output, context); + return (0, Aws_restXml_1.de_HeadBucketCommand)(output, context); } } exports.HeadBucketCommand = HeadBucketCommand; @@ -8761,12 +12715,26 @@ exports.HeadBucketCommand = HeadBucketCommand; /***/ }), +<<<<<<< HEAD +/***/ 61280: +======= /***/ 49553: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.HeadObjectCommand = exports.$Command = void 0; +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.HeadObjectCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); @@ -8774,15 +12742,32 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class HeadObjectCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, HeadObjectCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8793,15 +12778,19 @@ class HeadObjectCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_0_1.HeadObjectRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.HeadObjectOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "HeadObject", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlHeadObjectCommand)(input, context); + return (0, Aws_restXml_1.se_HeadObjectCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlHeadObjectCommand)(output, context); + return (0, Aws_restXml_1.de_HeadObjectCommand)(output, context); } } exports.HeadObjectCommand = HeadObjectCommand; @@ -8809,26 +12798,55 @@ exports.HeadObjectCommand = HeadObjectCommand; /***/ }), +<<<<<<< HEAD +/***/ 88519: +======= /***/ 85121: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListBucketAnalyticsConfigurationsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.ListBucketAnalyticsConfigurationsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListBucketAnalyticsConfigurationsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListBucketAnalyticsConfigurationsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8837,17 +12855,21 @@ class ListBucketAnalyticsConfigurationsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.ListBucketAnalyticsConfigurationsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListBucketAnalyticsConfigurationsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListBucketAnalyticsConfigurations", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListBucketAnalyticsConfigurationsCommand)(input, context); + return (0, Aws_restXml_1.se_ListBucketAnalyticsConfigurationsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListBucketAnalyticsConfigurationsCommand)(output, context); + return (0, Aws_restXml_1.de_ListBucketAnalyticsConfigurationsCommand)(output, context); } } exports.ListBucketAnalyticsConfigurationsCommand = ListBucketAnalyticsConfigurationsCommand; @@ -8855,26 +12877,55 @@ exports.ListBucketAnalyticsConfigurationsCommand = ListBucketAnalyticsConfigurat /***/ }), +<<<<<<< HEAD +/***/ 34871: +======= /***/ 24956: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListBucketIntelligentTieringConfigurationsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.ListBucketIntelligentTieringConfigurationsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListBucketIntelligentTieringConfigurationsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListBucketIntelligentTieringConfigurationsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8883,17 +12934,21 @@ class ListBucketIntelligentTieringConfigurationsCommand extends smithy_client_1. logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.ListBucketIntelligentTieringConfigurationsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListBucketIntelligentTieringConfigurationsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListBucketIntelligentTieringConfigurations", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand)(input, context); + return (0, Aws_restXml_1.se_ListBucketIntelligentTieringConfigurationsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand)(output, context); + return (0, Aws_restXml_1.de_ListBucketIntelligentTieringConfigurationsCommand)(output, context); } } exports.ListBucketIntelligentTieringConfigurationsCommand = ListBucketIntelligentTieringConfigurationsCommand; @@ -8901,26 +12956,56 @@ exports.ListBucketIntelligentTieringConfigurationsCommand = ListBucketIntelligen /***/ }), +<<<<<<< HEAD +/***/ 7739: +======= /***/ 78015: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListBucketInventoryConfigurationsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.ListBucketInventoryConfigurationsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListBucketInventoryConfigurationsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListBucketInventoryConfigurationsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8929,17 +13014,21 @@ class ListBucketInventoryConfigurationsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.ListBucketInventoryConfigurationsRequestFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, outputFilterSensitiveLog: models_0_1.ListBucketInventoryConfigurationsOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListBucketInventoryConfigurations", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListBucketInventoryConfigurationsCommand)(input, context); + return (0, Aws_restXml_1.se_ListBucketInventoryConfigurationsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListBucketInventoryConfigurationsCommand)(output, context); + return (0, Aws_restXml_1.de_ListBucketInventoryConfigurationsCommand)(output, context); } } exports.ListBucketInventoryConfigurationsCommand = ListBucketInventoryConfigurationsCommand; @@ -8947,26 +13036,54 @@ exports.ListBucketInventoryConfigurationsCommand = ListBucketInventoryConfigurat /***/ }), +<<<<<<< HEAD +/***/ 87086: +======= /***/ 73116: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListBucketMetricsConfigurationsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.ListBucketMetricsConfigurationsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListBucketMetricsConfigurationsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListBucketMetricsConfigurationsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -8975,17 +13092,21 @@ class ListBucketMetricsConfigurationsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.ListBucketMetricsConfigurationsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListBucketMetricsConfigurationsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListBucketMetricsConfigurations", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListBucketMetricsConfigurationsCommand)(input, context); + return (0, Aws_restXml_1.se_ListBucketMetricsConfigurationsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListBucketMetricsConfigurationsCommand)(output, context); + return (0, Aws_restXml_1.de_ListBucketMetricsConfigurationsCommand)(output, context); } } exports.ListBucketMetricsConfigurationsCommand = ListBucketMetricsConfigurationsCommand; @@ -8993,24 +13114,52 @@ exports.ListBucketMetricsConfigurationsCommand = ListBucketMetricsConfigurations /***/ }), +<<<<<<< HEAD +/***/ 23261: +======= /***/ 85333: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListBucketsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.ListBucketsCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListBucketsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListBucketsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9019,17 +13168,21 @@ class ListBucketsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: (input) => input, - outputFilterSensitiveLog: models_0_1.ListBucketsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListBuckets", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListBucketsCommand)(input, context); + return (0, Aws_restXml_1.se_ListBucketsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListBucketsCommand)(output, context); + return (0, Aws_restXml_1.de_ListBucketsCommand)(output, context); } } exports.ListBucketsCommand = ListBucketsCommand; @@ -9037,12 +13190,40 @@ exports.ListBucketsCommand = ListBucketsCommand; /***/ }), +<<<<<<< HEAD +/***/ 38902: +======= /***/ 28427: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListDirectoryBucketsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +class ListDirectoryBucketsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } +======= exports.ListMultipartUploadsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); @@ -9050,13 +13231,80 @@ const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); class ListMultipartUploadsCommand extends smithy_client_1.Command { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + constructor(input) { + super(); + this.input = input; + } + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListDirectoryBucketsCommand.getEndpointParameterInstructions())); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "S3Client"; + const commandName = "ListDirectoryBucketsCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListDirectoryBuckets", + }, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + } + serialize(input, context) { + return (0, Aws_restXml_1.se_ListDirectoryBucketsCommand)(input, context); + } + deserialize(output, context) { + return (0, Aws_restXml_1.de_ListDirectoryBucketsCommand)(output, context); + } +} +exports.ListDirectoryBucketsCommand = ListDirectoryBucketsCommand; + + +/***/ }), + +/***/ 20678: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ListMultipartUploadsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +class ListMultipartUploadsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListMultipartUploadsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9065,17 +13313,21 @@ class ListMultipartUploadsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.ListMultipartUploadsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListMultipartUploadsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListMultipartUploads", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListMultipartUploadsCommand)(input, context); + return (0, Aws_restXml_1.se_ListMultipartUploadsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListMultipartUploadsCommand)(output, context); + return (0, Aws_restXml_1.de_ListMultipartUploadsCommand)(output, context); } } exports.ListMultipartUploadsCommand = ListMultipartUploadsCommand; @@ -9083,26 +13335,55 @@ exports.ListMultipartUploadsCommand = ListMultipartUploadsCommand; /***/ }), +<<<<<<< HEAD +/***/ 95992: +======= /***/ 29049: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListObjectVersionsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.ListObjectVersionsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListObjectVersionsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListObjectVersionsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9111,17 +13392,21 @@ class ListObjectVersionsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.ListObjectVersionsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListObjectVersionsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListObjectVersions", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListObjectVersionsCommand)(input, context); + return (0, Aws_restXml_1.se_ListObjectVersionsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListObjectVersionsCommand)(output, context); + return (0, Aws_restXml_1.de_ListObjectVersionsCommand)(output, context); } } exports.ListObjectVersionsCommand = ListObjectVersionsCommand; @@ -9129,26 +13414,55 @@ exports.ListObjectVersionsCommand = ListObjectVersionsCommand; /***/ }), +<<<<<<< HEAD +/***/ 30494: +======= /***/ 1702: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListObjectsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.ListObjectsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListObjectsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListObjectsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9157,17 +13471,21 @@ class ListObjectsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.ListObjectsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListObjectsOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListObjects", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListObjectsCommand)(input, context); + return (0, Aws_restXml_1.se_ListObjectsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListObjectsCommand)(output, context); + return (0, Aws_restXml_1.de_ListObjectsCommand)(output, context); } } exports.ListObjectsCommand = ListObjectsCommand; @@ -9175,26 +13493,55 @@ exports.ListObjectsCommand = ListObjectsCommand; /***/ }), +<<<<<<< HEAD +/***/ 57262: +======= /***/ 33259: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListObjectsV2Command = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.ListObjectsV2Command = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListObjectsV2Command extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Prefix: { type: "contextParams", name: "Prefix" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListObjectsV2Command.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9203,17 +13550,21 @@ class ListObjectsV2Command extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.ListObjectsV2RequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListObjectsV2OutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListObjectsV2", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListObjectsV2Command)(input, context); + return (0, Aws_restXml_1.se_ListObjectsV2Command)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListObjectsV2Command)(output, context); + return (0, Aws_restXml_1.de_ListObjectsV2Command)(output, context); } } exports.ListObjectsV2Command = ListObjectsV2Command; @@ -9221,12 +13572,26 @@ exports.ListObjectsV2Command = ListObjectsV2Command; /***/ }), +<<<<<<< HEAD +/***/ 68740: +======= /***/ 83080: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListPartsCommand = exports.$Command = void 0; +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.ListPartsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); @@ -9234,15 +13599,32 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListPartsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListPartsCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9252,16 +13634,20 @@ class ListPartsCommand extends smithy_client_1.Command { clientName, commandName, inputFilterSensitiveLog: models_0_1.ListPartsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListPartsOutputFilterSensitiveLog, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "ListParts", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlListPartsCommand)(input, context); + return (0, Aws_restXml_1.se_ListPartsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlListPartsCommand)(output, context); + return (0, Aws_restXml_1.de_ListPartsCommand)(output, context); } } exports.ListPartsCommand = ListPartsCommand; @@ -9269,12 +13655,25 @@ exports.ListPartsCommand = ListPartsCommand; /***/ }), +<<<<<<< HEAD +/***/ 52582: +======= /***/ 28257: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketAccelerateConfigurationCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketAccelerateConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9282,14 +13681,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketAccelerateConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketAccelerateConfigurationCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -9303,17 +13719,21 @@ class PutBucketAccelerateConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketAccelerateConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketAccelerateConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketAccelerateConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketAccelerateConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketAccelerateConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketAccelerateConfigurationCommand)(output, context); } } exports.PutBucketAccelerateConfigurationCommand = PutBucketAccelerateConfigurationCommand; @@ -9321,12 +13741,25 @@ exports.PutBucketAccelerateConfigurationCommand = PutBucketAccelerateConfigurati /***/ }), +<<<<<<< HEAD +/***/ 18785: +======= /***/ 90276: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketAclCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketAclCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9334,14 +13767,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketAclCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketAclCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -9355,17 +13805,21 @@ class PutBucketAclCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketAclRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketAcl", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketAclCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketAclCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketAclCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketAclCommand)(output, context); } } exports.PutBucketAclCommand = PutBucketAclCommand; @@ -9373,26 +13827,55 @@ exports.PutBucketAclCommand = PutBucketAclCommand; /***/ }), +<<<<<<< HEAD +/***/ 23562: +======= /***/ 21754: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketAnalyticsConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketAnalyticsConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketAnalyticsConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketAnalyticsConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9401,17 +13884,21 @@ class PutBucketAnalyticsConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketAnalyticsConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketAnalyticsConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketAnalyticsConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketAnalyticsConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketAnalyticsConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketAnalyticsConfigurationCommand)(output, context); } } exports.PutBucketAnalyticsConfigurationCommand = PutBucketAnalyticsConfigurationCommand; @@ -9419,12 +13906,25 @@ exports.PutBucketAnalyticsConfigurationCommand = PutBucketAnalyticsConfiguration /***/ }), +<<<<<<< HEAD +/***/ 68524: +======= /***/ 78085: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketCorsCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketCorsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9432,14 +13932,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketCorsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketCorsCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -9453,17 +13970,21 @@ class PutBucketCorsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketCorsRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketCors", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketCorsCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketCorsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketCorsCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketCorsCommand)(output, context); } } exports.PutBucketCorsCommand = PutBucketCorsCommand; @@ -9471,12 +13992,26 @@ exports.PutBucketCorsCommand = PutBucketCorsCommand; /***/ }), +<<<<<<< HEAD +/***/ 95647: +======= /***/ 12713: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketEncryptionCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketEncryptionCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9484,14 +14019,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketEncryptionCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketEncryptionCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -9506,16 +14058,20 @@ class PutBucketEncryptionCommand extends smithy_client_1.Command { clientName, commandName, inputFilterSensitiveLog: models_0_1.PutBucketEncryptionRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketEncryption", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketEncryptionCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketEncryptionCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketEncryptionCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketEncryptionCommand)(output, context); } } exports.PutBucketEncryptionCommand = PutBucketEncryptionCommand; @@ -9523,26 +14079,55 @@ exports.PutBucketEncryptionCommand = PutBucketEncryptionCommand; /***/ }), +<<<<<<< HEAD +/***/ 53359: +======= /***/ 10561: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketIntelligentTieringConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketIntelligentTieringConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketIntelligentTieringConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketIntelligentTieringConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9551,17 +14136,21 @@ class PutBucketIntelligentTieringConfigurationCommand extends smithy_client_1.Co logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketIntelligentTieringConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketIntelligentTieringConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketIntelligentTieringConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketIntelligentTieringConfigurationCommand)(output, context); } } exports.PutBucketIntelligentTieringConfigurationCommand = PutBucketIntelligentTieringConfigurationCommand; @@ -9569,26 +14158,56 @@ exports.PutBucketIntelligentTieringConfigurationCommand = PutBucketIntelligentTi /***/ }), +<<<<<<< HEAD +/***/ 15119: +======= /***/ 74588: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketInventoryConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(22729); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketInventoryConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketInventoryConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketInventoryConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9598,16 +14217,20 @@ class PutBucketInventoryConfigurationCommand extends smithy_client_1.Command { clientName, commandName, inputFilterSensitiveLog: models_0_1.PutBucketInventoryConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketInventoryConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketInventoryConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketInventoryConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketInventoryConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketInventoryConfigurationCommand)(output, context); } } exports.PutBucketInventoryConfigurationCommand = PutBucketInventoryConfigurationCommand; @@ -9615,12 +14238,25 @@ exports.PutBucketInventoryConfigurationCommand = PutBucketInventoryConfiguration /***/ }), +<<<<<<< HEAD +/***/ 37659: +======= /***/ 99247: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketLifecycleConfigurationCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketLifecycleConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9628,14 +14264,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketLifecycleConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketLifecycleConfigurationCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -9649,17 +14302,21 @@ class PutBucketLifecycleConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketLifecycleConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketLifecycleConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketLifecycleConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketLifecycleConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketLifecycleConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketLifecycleConfigurationCommand)(output, context); } } exports.PutBucketLifecycleConfigurationCommand = PutBucketLifecycleConfigurationCommand; @@ -9667,12 +14324,25 @@ exports.PutBucketLifecycleConfigurationCommand = PutBucketLifecycleConfiguration /***/ }), +<<<<<<< HEAD +/***/ 64879: +======= /***/ 71745: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketLoggingCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketLoggingCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9680,14 +14350,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketLoggingCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketLoggingCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -9701,17 +14388,21 @@ class PutBucketLoggingCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketLoggingRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketLogging", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketLoggingCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketLoggingCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketLoggingCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketLoggingCommand)(output, context); } } exports.PutBucketLoggingCommand = PutBucketLoggingCommand; @@ -9719,26 +14410,55 @@ exports.PutBucketLoggingCommand = PutBucketLoggingCommand; /***/ }), +<<<<<<< HEAD +/***/ 36122: +======= /***/ 62260: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketMetricsConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketMetricsConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketMetricsConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketMetricsConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9747,17 +14467,21 @@ class PutBucketMetricsConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketMetricsConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketMetricsConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketMetricsConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketMetricsConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketMetricsConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketMetricsConfigurationCommand)(output, context); } } exports.PutBucketMetricsConfigurationCommand = PutBucketMetricsConfigurationCommand; @@ -9765,26 +14489,55 @@ exports.PutBucketMetricsConfigurationCommand = PutBucketMetricsConfigurationComm /***/ }), +<<<<<<< HEAD +/***/ 23762: +======= /***/ 19700: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketNotificationConfigurationCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketNotificationConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketNotificationConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketNotificationConfigurationCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -9793,17 +14546,21 @@ class PutBucketNotificationConfigurationCommand extends smithy_client_1.Command logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketNotificationConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketNotificationConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketNotificationConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketNotificationConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketNotificationConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketNotificationConfigurationCommand)(output, context); } } exports.PutBucketNotificationConfigurationCommand = PutBucketNotificationConfigurationCommand; @@ -9811,12 +14568,25 @@ exports.PutBucketNotificationConfigurationCommand = PutBucketNotificationConfigu /***/ }), +<<<<<<< HEAD +/***/ 27055: +======= /***/ 89352: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketOwnershipControlsCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketOwnershipControlsCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9824,14 +14594,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketOwnershipControlsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketOwnershipControlsCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestChecksumRequired: true })); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; @@ -9841,17 +14628,21 @@ class PutBucketOwnershipControlsCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketOwnershipControlsRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketOwnershipControls", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketOwnershipControlsCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketOwnershipControlsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketOwnershipControlsCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketOwnershipControlsCommand)(output, context); } } exports.PutBucketOwnershipControlsCommand = PutBucketOwnershipControlsCommand; @@ -9859,12 +14650,25 @@ exports.PutBucketOwnershipControlsCommand = PutBucketOwnershipControlsCommand; /***/ }), +<<<<<<< HEAD +/***/ 23598: +======= /***/ 22417: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketPolicyCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketPolicyCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9872,14 +14676,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketPolicyCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketPolicyCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -9893,17 +14714,21 @@ class PutBucketPolicyCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketPolicyRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketPolicy", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketPolicyCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketPolicyCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketPolicyCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketPolicyCommand)(output, context); } } exports.PutBucketPolicyCommand = PutBucketPolicyCommand; @@ -9911,12 +14736,25 @@ exports.PutBucketPolicyCommand = PutBucketPolicyCommand; /***/ }), +<<<<<<< HEAD +/***/ 42596: +======= /***/ 94943: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketReplicationCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketReplicationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9924,14 +14762,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketReplicationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketReplicationCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -9945,17 +14800,21 @@ class PutBucketReplicationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketReplicationRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketReplication", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketReplicationCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketReplicationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketReplicationCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketReplicationCommand)(output, context); } } exports.PutBucketReplicationCommand = PutBucketReplicationCommand; @@ -9963,12 +14822,25 @@ exports.PutBucketReplicationCommand = PutBucketReplicationCommand; /***/ }), +<<<<<<< HEAD +/***/ 12265: +======= /***/ 94483: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketRequestPaymentCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketRequestPaymentCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -9976,14 +14848,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketRequestPaymentCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketRequestPaymentCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -9997,17 +14886,21 @@ class PutBucketRequestPaymentCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketRequestPaymentRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketRequestPayment", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketRequestPaymentCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketRequestPaymentCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketRequestPaymentCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketRequestPaymentCommand)(output, context); } } exports.PutBucketRequestPaymentCommand = PutBucketRequestPaymentCommand; @@ -10015,12 +14908,25 @@ exports.PutBucketRequestPaymentCommand = PutBucketRequestPaymentCommand; /***/ }), +<<<<<<< HEAD +/***/ 22745: +======= /***/ 90815: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketTaggingCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketTaggingCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10028,14 +14934,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketTaggingCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketTaggingCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10049,17 +14972,21 @@ class PutBucketTaggingCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketTaggingRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketTagging", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketTaggingCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketTaggingCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketTaggingCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketTaggingCommand)(output, context); } } exports.PutBucketTaggingCommand = PutBucketTaggingCommand; @@ -10067,12 +14994,25 @@ exports.PutBucketTaggingCommand = PutBucketTaggingCommand; /***/ }), +<<<<<<< HEAD +/***/ 44671: +======= /***/ 77437: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketVersioningCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketVersioningCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10080,14 +15020,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketVersioningCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketVersioningCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10101,17 +15058,21 @@ class PutBucketVersioningCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketVersioningRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketVersioning", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketVersioningCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketVersioningCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketVersioningCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketVersioningCommand)(output, context); } } exports.PutBucketVersioningCommand = PutBucketVersioningCommand; @@ -10119,12 +15080,25 @@ exports.PutBucketVersioningCommand = PutBucketVersioningCommand; /***/ }), +<<<<<<< HEAD +/***/ 27890: +======= /***/ 54229: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutBucketWebsiteCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutBucketWebsiteCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10132,14 +15106,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutBucketWebsiteCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutBucketWebsiteCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10153,17 +15144,21 @@ class PutBucketWebsiteCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutBucketWebsiteRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutBucketWebsite", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutBucketWebsiteCommand)(input, context); + return (0, Aws_restXml_1.se_PutBucketWebsiteCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutBucketWebsiteCommand)(output, context); + return (0, Aws_restXml_1.de_PutBucketWebsiteCommand)(output, context); } } exports.PutBucketWebsiteCommand = PutBucketWebsiteCommand; @@ -10171,12 +15166,25 @@ exports.PutBucketWebsiteCommand = PutBucketWebsiteCommand; /***/ }), +<<<<<<< HEAD +/***/ 83533: +======= /***/ 33492: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutObjectAclCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutObjectAclCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10184,14 +15192,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutObjectAclCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutObjectAclCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10205,17 +15230,21 @@ class PutObjectAclCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutObjectAclRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.PutObjectAclOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutObjectAcl", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutObjectAclCommand)(input, context); + return (0, Aws_restXml_1.se_PutObjectAclCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutObjectAclCommand)(output, context); + return (0, Aws_restXml_1.de_PutObjectAclCommand)(output, context); } } exports.PutObjectAclCommand = PutObjectAclCommand; @@ -10223,12 +15252,28 @@ exports.PutObjectAclCommand = PutObjectAclCommand; /***/ }), +<<<<<<< HEAD +/***/ 84520: +======= /***/ 8000: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutObjectCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_sdk_s3_1 = __nccwpck_require__(52776); +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_1_1 = __nccwpck_require__(71767); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutObjectCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10238,16 +15283,33 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutObjectCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutObjectCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_sdk_s3_1.getCheckContentLengthHeaderPlugin)(configuration)); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10261,17 +15323,21 @@ class PutObjectCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutObjectRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.PutObjectOutputFilterSensitiveLog, + inputFilterSensitiveLog: models_1_1.PutObjectRequestFilterSensitiveLog, + outputFilterSensitiveLog: models_1_1.PutObjectOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutObject", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutObjectCommand)(input, context); + return (0, Aws_restXml_1.se_PutObjectCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutObjectCommand)(output, context); + return (0, Aws_restXml_1.de_PutObjectCommand)(output, context); } } exports.PutObjectCommand = PutObjectCommand; @@ -10279,12 +15345,25 @@ exports.PutObjectCommand = PutObjectCommand; /***/ }), +<<<<<<< HEAD +/***/ 57296: +======= /***/ 15: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutObjectLegalHoldCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutObjectLegalHoldCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10292,14 +15371,30 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutObjectLegalHoldCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutObjectLegalHoldCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10313,17 +15408,21 @@ class PutObjectLegalHoldCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutObjectLegalHoldRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.PutObjectLegalHoldOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutObjectLegalHold", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutObjectLegalHoldCommand)(input, context); + return (0, Aws_restXml_1.se_PutObjectLegalHoldCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutObjectLegalHoldCommand)(output, context); + return (0, Aws_restXml_1.de_PutObjectLegalHoldCommand)(output, context); } } exports.PutObjectLegalHoldCommand = PutObjectLegalHoldCommand; @@ -10331,12 +15430,25 @@ exports.PutObjectLegalHoldCommand = PutObjectLegalHoldCommand; /***/ }), +<<<<<<< HEAD +/***/ 15905: +======= /***/ 77692: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutObjectLockConfigurationCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutObjectLockConfigurationCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10344,14 +15456,30 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(30991); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutObjectLockConfigurationCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutObjectLockConfigurationCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10365,17 +15493,21 @@ class PutObjectLockConfigurationCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.PutObjectLockConfigurationRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.PutObjectLockConfigurationOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutObjectLockConfiguration", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutObjectLockConfigurationCommand)(input, context); + return (0, Aws_restXml_1.se_PutObjectLockConfigurationCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutObjectLockConfigurationCommand)(output, context); + return (0, Aws_restXml_1.de_PutObjectLockConfigurationCommand)(output, context); } } exports.PutObjectLockConfigurationCommand = PutObjectLockConfigurationCommand; @@ -10383,12 +15515,25 @@ exports.PutObjectLockConfigurationCommand = PutObjectLockConfigurationCommand; /***/ }), +<<<<<<< HEAD +/***/ 90936: +======= /***/ 33946: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutObjectRetentionCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutObjectRetentionCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10396,14 +15541,30 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_1_1 = __nccwpck_require__(43228); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutObjectRetentionCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutObjectRetentionCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10417,17 +15578,21 @@ class PutObjectRetentionCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_1_1.PutObjectRetentionRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_1_1.PutObjectRetentionOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutObjectRetention", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutObjectRetentionCommand)(input, context); + return (0, Aws_restXml_1.se_PutObjectRetentionCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutObjectRetentionCommand)(output, context); + return (0, Aws_restXml_1.de_PutObjectRetentionCommand)(output, context); } } exports.PutObjectRetentionCommand = PutObjectRetentionCommand; @@ -10435,12 +15600,25 @@ exports.PutObjectRetentionCommand = PutObjectRetentionCommand; /***/ }), +<<<<<<< HEAD +/***/ 13844: +======= /***/ 84707: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutObjectTaggingCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutObjectTaggingCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10448,14 +15626,30 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_1_1 = __nccwpck_require__(43228); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutObjectTaggingCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutObjectTaggingCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10469,17 +15663,21 @@ class PutObjectTaggingCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_1_1.PutObjectTaggingRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_1_1.PutObjectTaggingOutputFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutObjectTagging", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutObjectTaggingCommand)(input, context); + return (0, Aws_restXml_1.se_PutObjectTaggingCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutObjectTaggingCommand)(output, context); + return (0, Aws_restXml_1.de_PutObjectTaggingCommand)(output, context); } } exports.PutObjectTaggingCommand = PutObjectTaggingCommand; @@ -10487,12 +15685,25 @@ exports.PutObjectTaggingCommand = PutObjectTaggingCommand; /***/ }), +<<<<<<< HEAD +/***/ 52786: +======= /***/ 69104: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.PutPublicAccessBlockCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.PutPublicAccessBlockCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10500,14 +15711,31 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_1_1 = __nccwpck_require__(43228); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class PutPublicAccessBlockCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseS3ExpressControlEndpoint: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, PutPublicAccessBlockCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10521,17 +15749,21 @@ class PutPublicAccessBlockCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_1_1.PutPublicAccessBlockRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "PutPublicAccessBlock", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlPutPublicAccessBlockCommand)(input, context); + return (0, Aws_restXml_1.se_PutPublicAccessBlockCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlPutPublicAccessBlockCommand)(output, context); + return (0, Aws_restXml_1.de_PutPublicAccessBlockCommand)(output, context); } } exports.PutPublicAccessBlockCommand = PutPublicAccessBlockCommand; @@ -10539,12 +15771,26 @@ exports.PutPublicAccessBlockCommand = PutPublicAccessBlockCommand; /***/ }), +<<<<<<< HEAD +/***/ 15426: +======= /***/ 43661: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.RestoreObjectCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_1_1 = __nccwpck_require__(71767); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.RestoreObjectCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10552,14 +15798,30 @@ const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_1_1 = __nccwpck_require__(43228); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class RestoreObjectCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, RestoreObjectCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10574,16 +15836,20 @@ class RestoreObjectCommand extends smithy_client_1.Command { clientName, commandName, inputFilterSensitiveLog: models_1_1.RestoreObjectRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_1_1.RestoreObjectOutputFilterSensitiveLog, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "RestoreObject", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlRestoreObjectCommand)(input, context); + return (0, Aws_restXml_1.se_RestoreObjectCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlRestoreObjectCommand)(output, context); + return (0, Aws_restXml_1.de_RestoreObjectCommand)(output, context); } } exports.RestoreObjectCommand = RestoreObjectCommand; @@ -10591,12 +15857,26 @@ exports.RestoreObjectCommand = RestoreObjectCommand; /***/ }), +<<<<<<< HEAD +/***/ 26808: +======= /***/ 84142: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.SelectObjectContentCommand = exports.$Command = void 0; +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_1_1 = __nccwpck_require__(71767); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.SelectObjectContentCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_serde_1 = __nccwpck_require__(44695); @@ -10604,15 +15884,31 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_1_1 = __nccwpck_require__(43228); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class SelectObjectContentCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, SelectObjectContentCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -10623,15 +15919,22 @@ class SelectObjectContentCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_1_1.SelectObjectContentRequestFilterSensitiveLog, outputFilterSensitiveLog: models_1_1.SelectObjectContentOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "SelectObjectContent", + eventStream: { + output: true, + }, + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlSelectObjectContentCommand)(input, context); + return (0, Aws_restXml_1.se_SelectObjectContentCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlSelectObjectContentCommand)(output, context); + return (0, Aws_restXml_1.de_SelectObjectContentCommand)(output, context); } } exports.SelectObjectContentCommand = SelectObjectContentCommand; @@ -10639,12 +15942,27 @@ exports.SelectObjectContentCommand = SelectObjectContentCommand; /***/ }), +<<<<<<< HEAD +/***/ 64325: +======= /***/ 52667: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.UploadPartCommand = exports.$Command = void 0; +const middleware_flexible_checksums_1 = __nccwpck_require__(53106); +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_1_1 = __nccwpck_require__(71767); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.UploadPartCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_flexible_checksums_1 = __nccwpck_require__(77389); @@ -10653,15 +15971,32 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_1_1 = __nccwpck_require__(43228); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class UploadPartCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + Bucket: { type: "contextParams", name: "Bucket" }, + Key: { type: "contextParams", name: "Key" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UploadPartCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); this.middlewareStack.use((0, middleware_flexible_checksums_1.getFlexibleChecksumsPlugin)(configuration, { input: this.input, requestAlgorithmMember: "ChecksumAlgorithm", @@ -10677,15 +16012,19 @@ class UploadPartCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_1_1.UploadPartRequestFilterSensitiveLog, outputFilterSensitiveLog: models_1_1.UploadPartOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "UploadPart", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlUploadPartCommand)(input, context); + return (0, Aws_restXml_1.se_UploadPartCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlUploadPartCommand)(output, context); + return (0, Aws_restXml_1.de_UploadPartCommand)(output, context); } } exports.UploadPartCommand = UploadPartCommand; @@ -10693,12 +16032,27 @@ exports.UploadPartCommand = UploadPartCommand; /***/ }), +<<<<<<< HEAD +/***/ 72251: +======= /***/ 57045: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.UploadPartCopyCommand = exports.$Command = void 0; +const middleware_sdk_s3_1 = __nccwpck_require__(52776); +const middleware_ssec_1 = __nccwpck_require__(33563); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_1_1 = __nccwpck_require__(71767); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.UploadPartCopyCommand = void 0; const middleware_bucket_endpoint_1 = __nccwpck_require__(98228); const middleware_sdk_s3_1 = __nccwpck_require__(60444); @@ -10707,16 +16061,32 @@ const middleware_ssec_1 = __nccwpck_require__(58483); const smithy_client_1 = __nccwpck_require__(26351); const models_1_1 = __nccwpck_require__(43228); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class UploadPartCopyCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + DisableS3ExpressSessionAuth: { type: "staticContextParams", value: true }, + Bucket: { type: "contextParams", name: "Bucket" }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, UploadPartCopyCommand.getEndpointParameterInstructions())); this.middlewareStack.use((0, middleware_sdk_s3_1.getThrow200ExceptionsPlugin)(configuration)); this.middlewareStack.use((0, middleware_ssec_1.getSsecPlugin)(configuration)); - this.middlewareStack.use((0, middleware_bucket_endpoint_1.getBucketEndpointPlugin)(configuration)); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -10727,15 +16097,19 @@ class UploadPartCopyCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_1_1.UploadPartCopyRequestFilterSensitiveLog, outputFilterSensitiveLog: models_1_1.UploadPartCopyOutputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "UploadPartCopy", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlUploadPartCopyCommand)(input, context); + return (0, Aws_restXml_1.se_UploadPartCopyCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlUploadPartCopyCommand)(output, context); + return (0, Aws_restXml_1.de_UploadPartCopyCommand)(output, context); } } exports.UploadPartCopyCommand = UploadPartCopyCommand; @@ -10743,26 +16117,55 @@ exports.UploadPartCopyCommand = UploadPartCopyCommand; /***/ }), +<<<<<<< HEAD +/***/ 15173: +======= /***/ 63803: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.WriteGetObjectResponseCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_1_1 = __nccwpck_require__(71767); +const Aws_restXml_1 = __nccwpck_require__(70395); +======= exports.WriteGetObjectResponseCommand = void 0; const middleware_sdk_s3_1 = __nccwpck_require__(60444); const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_1_1 = __nccwpck_require__(43228); const Aws_restXml_1 = __nccwpck_require__(75255); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class WriteGetObjectResponseCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseObjectLambdaEndpoint: { type: "staticContextParams", value: true }, + ForcePathStyle: { type: "clientContextParams", name: "forcePathStyle" }, + UseArnRegion: { type: "clientContextParams", name: "useArnRegion" }, + DisableMultiRegionAccessPoints: { type: "clientContextParams", name: "disableMultiregionAccessPoints" }, + Accelerate: { type: "clientContextParams", name: "useAccelerateEndpoint" }, + DisableS3ExpressSessionAuth: { type: "clientContextParams", name: "disableS3ExpressSessionAuth" }, + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_sdk_s3_1.getWriteGetObjectResponseEndpointPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, WriteGetObjectResponseCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "S3Client"; @@ -10772,16 +16175,20 @@ class WriteGetObjectResponseCommand extends smithy_client_1.Command { clientName, commandName, inputFilterSensitiveLog: models_1_1.WriteGetObjectResponseRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AmazonS3", + operation: "WriteGetObjectResponse", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restXml_1.serializeAws_restXmlWriteGetObjectResponseCommand)(input, context); + return (0, Aws_restXml_1.se_WriteGetObjectResponseCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restXml_1.deserializeAws_restXmlWriteGetObjectResponseCommand)(output, context); + return (0, Aws_restXml_1.de_WriteGetObjectResponseCommand)(output, context); } } exports.WriteGetObjectResponseCommand = WriteGetObjectResponseCommand; @@ -10789,12 +16196,113 @@ exports.WriteGetObjectResponseCommand = WriteGetObjectResponseCommand; /***/ }), +<<<<<<< HEAD +/***/ 3749: +======= /***/ 96823: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(91685); +tslib_1.__exportStar(__nccwpck_require__(54745), exports); +tslib_1.__exportStar(__nccwpck_require__(48394), exports); +tslib_1.__exportStar(__nccwpck_require__(47241), exports); +tslib_1.__exportStar(__nccwpck_require__(37648), exports); +tslib_1.__exportStar(__nccwpck_require__(51963), exports); +tslib_1.__exportStar(__nccwpck_require__(47209), exports); +tslib_1.__exportStar(__nccwpck_require__(26373), exports); +tslib_1.__exportStar(__nccwpck_require__(40235), exports); +tslib_1.__exportStar(__nccwpck_require__(12335), exports); +tslib_1.__exportStar(__nccwpck_require__(13305), exports); +tslib_1.__exportStar(__nccwpck_require__(87902), exports); +tslib_1.__exportStar(__nccwpck_require__(4642), exports); +tslib_1.__exportStar(__nccwpck_require__(56903), exports); +tslib_1.__exportStar(__nccwpck_require__(70617), exports); +tslib_1.__exportStar(__nccwpck_require__(96947), exports); +tslib_1.__exportStar(__nccwpck_require__(24789), exports); +tslib_1.__exportStar(__nccwpck_require__(14412), exports); +tslib_1.__exportStar(__nccwpck_require__(89218), exports); +tslib_1.__exportStar(__nccwpck_require__(36069), exports); +tslib_1.__exportStar(__nccwpck_require__(84529), exports); +tslib_1.__exportStar(__nccwpck_require__(87937), exports); +tslib_1.__exportStar(__nccwpck_require__(17735), exports); +tslib_1.__exportStar(__nccwpck_require__(8063), exports); +tslib_1.__exportStar(__nccwpck_require__(95005), exports); +tslib_1.__exportStar(__nccwpck_require__(59650), exports); +tslib_1.__exportStar(__nccwpck_require__(5689), exports); +tslib_1.__exportStar(__nccwpck_require__(43088), exports); +tslib_1.__exportStar(__nccwpck_require__(53637), exports); +tslib_1.__exportStar(__nccwpck_require__(39216), exports); +tslib_1.__exportStar(__nccwpck_require__(69553), exports); +tslib_1.__exportStar(__nccwpck_require__(30426), exports); +tslib_1.__exportStar(__nccwpck_require__(60074), exports); +tslib_1.__exportStar(__nccwpck_require__(5152), exports); +tslib_1.__exportStar(__nccwpck_require__(97986), exports); +tslib_1.__exportStar(__nccwpck_require__(31857), exports); +tslib_1.__exportStar(__nccwpck_require__(90940), exports); +tslib_1.__exportStar(__nccwpck_require__(46067), exports); +tslib_1.__exportStar(__nccwpck_require__(77093), exports); +tslib_1.__exportStar(__nccwpck_require__(36675), exports); +tslib_1.__exportStar(__nccwpck_require__(98115), exports); +tslib_1.__exportStar(__nccwpck_require__(61300), exports); +tslib_1.__exportStar(__nccwpck_require__(90894), exports); +tslib_1.__exportStar(__nccwpck_require__(58382), exports); +tslib_1.__exportStar(__nccwpck_require__(8732), exports); +tslib_1.__exportStar(__nccwpck_require__(65852), exports); +tslib_1.__exportStar(__nccwpck_require__(70184), exports); +tslib_1.__exportStar(__nccwpck_require__(7017), exports); +tslib_1.__exportStar(__nccwpck_require__(87797), exports); +tslib_1.__exportStar(__nccwpck_require__(18426), exports); +tslib_1.__exportStar(__nccwpck_require__(28754), exports); +tslib_1.__exportStar(__nccwpck_require__(66888), exports); +tslib_1.__exportStar(__nccwpck_require__(22223), exports); +tslib_1.__exportStar(__nccwpck_require__(93946), exports); +tslib_1.__exportStar(__nccwpck_require__(61280), exports); +tslib_1.__exportStar(__nccwpck_require__(88519), exports); +tslib_1.__exportStar(__nccwpck_require__(34871), exports); +tslib_1.__exportStar(__nccwpck_require__(7739), exports); +tslib_1.__exportStar(__nccwpck_require__(87086), exports); +tslib_1.__exportStar(__nccwpck_require__(23261), exports); +tslib_1.__exportStar(__nccwpck_require__(38902), exports); +tslib_1.__exportStar(__nccwpck_require__(20678), exports); +tslib_1.__exportStar(__nccwpck_require__(95992), exports); +tslib_1.__exportStar(__nccwpck_require__(30494), exports); +tslib_1.__exportStar(__nccwpck_require__(57262), exports); +tslib_1.__exportStar(__nccwpck_require__(68740), exports); +tslib_1.__exportStar(__nccwpck_require__(52582), exports); +tslib_1.__exportStar(__nccwpck_require__(18785), exports); +tslib_1.__exportStar(__nccwpck_require__(23562), exports); +tslib_1.__exportStar(__nccwpck_require__(68524), exports); +tslib_1.__exportStar(__nccwpck_require__(95647), exports); +tslib_1.__exportStar(__nccwpck_require__(53359), exports); +tslib_1.__exportStar(__nccwpck_require__(15119), exports); +tslib_1.__exportStar(__nccwpck_require__(37659), exports); +tslib_1.__exportStar(__nccwpck_require__(64879), exports); +tslib_1.__exportStar(__nccwpck_require__(36122), exports); +tslib_1.__exportStar(__nccwpck_require__(23762), exports); +tslib_1.__exportStar(__nccwpck_require__(27055), exports); +tslib_1.__exportStar(__nccwpck_require__(23598), exports); +tslib_1.__exportStar(__nccwpck_require__(42596), exports); +tslib_1.__exportStar(__nccwpck_require__(12265), exports); +tslib_1.__exportStar(__nccwpck_require__(22745), exports); +tslib_1.__exportStar(__nccwpck_require__(44671), exports); +tslib_1.__exportStar(__nccwpck_require__(27890), exports); +tslib_1.__exportStar(__nccwpck_require__(83533), exports); +tslib_1.__exportStar(__nccwpck_require__(84520), exports); +tslib_1.__exportStar(__nccwpck_require__(57296), exports); +tslib_1.__exportStar(__nccwpck_require__(15905), exports); +tslib_1.__exportStar(__nccwpck_require__(90936), exports); +tslib_1.__exportStar(__nccwpck_require__(13844), exports); +tslib_1.__exportStar(__nccwpck_require__(52786), exports); +tslib_1.__exportStar(__nccwpck_require__(15426), exports); +tslib_1.__exportStar(__nccwpck_require__(26808), exports); +tslib_1.__exportStar(__nccwpck_require__(64325), exports); +tslib_1.__exportStar(__nccwpck_require__(72251), exports); +tslib_1.__exportStar(__nccwpck_require__(15173), exports); +======= const tslib_1 = __nccwpck_require__(73563); tslib_1.__exportStar(__nccwpck_require__(18605), exports); tslib_1.__exportStar(__nccwpck_require__(90130), exports); @@ -10889,16 +16397,35 @@ tslib_1.__exportStar(__nccwpck_require__(84142), exports); tslib_1.__exportStar(__nccwpck_require__(52667), exports); tslib_1.__exportStar(__nccwpck_require__(57045), exports); tslib_1.__exportStar(__nccwpck_require__(63803), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 28409: +/***/ ((__unused_webpack_module, exports) => { +======= /***/ 41178: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.resolveClientEndpointParameters = void 0; +const resolveClientEndpointParameters = (options) => { + return { + ...options, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + forcePathStyle: options.forcePathStyle ?? false, + useAccelerateEndpoint: options.useAccelerateEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + disableMultiregionAccessPoints: options.disableMultiregionAccessPoints ?? false, + defaultSigningName: "s3", + }; +======= exports.defaultRegionInfoProvider = void 0; const config_resolver_1 = __nccwpck_require__(95406); const regionHash = { @@ -11216,151 +16743,67 @@ const regionHash = { }, ], }, +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; -const partitionHash = { - aws: { - regions: [ - "af-south-1", - "ap-east-1", - "ap-northeast-1", - "ap-northeast-2", - "ap-northeast-3", - "ap-south-1", - "ap-southeast-1", - "ap-southeast-2", - "ap-southeast-3", - "aws-global", - "ca-central-1", - "eu-central-1", - "eu-north-1", - "eu-south-1", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "fips-ca-central-1", - "fips-us-east-1", - "fips-us-east-2", - "fips-us-west-1", - "fips-us-west-2", - "me-south-1", - "s3-external-1", - "sa-east-1", - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - ], - regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "s3.{region}.amazonaws.com", - tags: [], - }, - { - hostname: "s3-fips.{region}.amazonaws.com", - tags: ["fips"], - }, - { - hostname: "s3-fips.dualstack.{region}.amazonaws.com", - tags: ["dualstack", "fips"], - }, - { - hostname: "s3.dualstack.{region}.amazonaws.com", - tags: ["dualstack"], - }, - ], - }, - "aws-cn": { - regions: ["cn-north-1", "cn-northwest-1"], - regionRegex: "^cn\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "s3.{region}.amazonaws.com.cn", - tags: [], - }, - { - hostname: "s3-fips.{region}.amazonaws.com.cn", - tags: ["fips"], - }, - { - hostname: "s3-fips.{region}.api.amazonwebservices.com.cn", - tags: ["dualstack", "fips"], - }, - { - hostname: "s3.dualstack.{region}.amazonaws.com.cn", - tags: ["dualstack"], - }, - ], - }, - "aws-iso": { - regions: ["us-iso-east-1", "us-iso-west-1"], - regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "s3.{region}.c2s.ic.gov", - tags: [], - }, - { - hostname: "s3-fips.{region}.c2s.ic.gov", - tags: ["fips"], - }, - ], - }, - "aws-iso-b": { - regions: ["us-isob-east-1"], - regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "s3.{region}.sc2s.sgov.gov", - tags: [], - }, - { - hostname: "s3-fips.{region}.sc2s.sgov.gov", - tags: ["fips"], - }, - ], - }, - "aws-us-gov": { - regions: ["fips-us-gov-east-1", "fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"], - regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "s3.{region}.amazonaws.com", - tags: [], - }, - { - hostname: "s3-fips.{region}.amazonaws.com", - tags: ["fips"], - }, - { - hostname: "s3-fips.dualstack.{region}.amazonaws.com", - tags: ["dualstack", "fips"], - }, - { - hostname: "s3.dualstack.{region}.amazonaws.com", - tags: ["dualstack"], - }, - ], - }, +exports.resolveClientEndpointParameters = resolveClientEndpointParameters; + + +/***/ }), + +<<<<<<< HEAD +/***/ 87873: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = __nccwpck_require__(34548); +const ruleset_1 = __nccwpck_require__(15330); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); }; -const defaultRegionInfoProvider = async (region, options) => (0, config_resolver_1.getRegionInfo)(region, { - ...options, - signingService: "s3", - regionHash, - partitionHash, -}); -exports.defaultRegionInfoProvider = defaultRegionInfoProvider; +exports.defaultEndpointResolver = defaultEndpointResolver; + + +/***/ }), + +/***/ 15330: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ruleSet = void 0; +const cc = "required", cd = "type", ce = "conditions", cf = "fn", cg = "argv", ch = "ref", ci = "assign", cj = "url", ck = "properties", cl = "backend", cm = "authSchemes", cn = "disableDoubleEncoding", co = "signingName", cp = "signingRegion", cq = "headers"; +const a = false, b = true, c = "isSet", d = "booleanEquals", e = "error", f = "aws.partition", g = "stringEquals", h = "getAttr", i = "name", j = "substring", k = "bucketSuffix", l = "parseURL", m = "{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}", n = "endpoint", o = "tree", p = "aws.isVirtualHostableS3Bucket", q = "{url#scheme}://{Bucket}.{url#authority}{url#path}", r = "not", s = "{url#scheme}://{url#authority}{url#path}", t = "hardwareType", u = "regionPrefix", v = "bucketAliasSuffix", w = "outpostId", x = "isValidHostLabel", y = "s3-outposts", z = "s3", A = "{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}", B = "https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}", C = "https://{Bucket}.s3.{partitionResult#dnsSuffix}", D = "aws.parseArn", E = "bucketArn", F = "arnType", G = "", H = "s3-object-lambda", I = "accesspoint", J = "accessPointName", K = "{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}", L = "mrapPartition", M = "outpostType", N = "arnPrefix", O = "{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}", P = "https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", Q = "https://s3.{partitionResult#dnsSuffix}", R = { [cc]: false, [cd]: "String" }, S = { [cc]: true, "default": false, [cd]: "Boolean" }, T = { [cc]: false, [cd]: "Boolean" }, U = { [cf]: d, [cg]: [{ [ch]: "Accelerate" }, true] }, V = { [cf]: d, [cg]: [{ [ch]: "UseFIPS" }, true] }, W = { [cf]: d, [cg]: [{ [ch]: "UseDualStack" }, true] }, X = { [cf]: c, [cg]: [{ [ch]: "Endpoint" }] }, Y = { [cf]: f, [cg]: [{ [ch]: "Region" }], [ci]: "partitionResult" }, Z = { [cf]: g, [cg]: [{ [cf]: h, [cg]: [{ [ch]: "partitionResult" }, i] }, "aws-cn"] }, aa = { [cf]: c, [cg]: [{ [ch]: "Bucket" }] }, ab = { [ch]: "Bucket" }, ac = { [cf]: l, [cg]: [{ [ch]: "Endpoint" }], [ci]: "url" }, ad = { [cf]: d, [cg]: [{ [cf]: h, [cg]: [{ [ch]: "url" }, "isIp"] }, true] }, ae = { [ch]: "url" }, af = { [cf]: "uriEncode", [cg]: [ab], [ci]: "uri_encoded_bucket" }, ag = { [cl]: "S3Express", [cm]: [{ [cn]: true, [i]: "sigv4", [co]: "s3express", [cp]: "{Region}" }] }, ah = {}, ai = { [cf]: p, [cg]: [ab, false] }, aj = { [e]: "S3Express bucket name is not a valid virtual hostable name.", [cd]: e }, ak = { [cl]: "S3Express", [cm]: [{ [cn]: true, [i]: "sigv4-s3express", [co]: "s3express", [cp]: "{Region}" }] }, al = { [cf]: c, [cg]: [{ [ch]: "UseS3ExpressControlEndpoint" }] }, am = { [cf]: d, [cg]: [{ [ch]: "UseS3ExpressControlEndpoint" }, true] }, an = { [cf]: r, [cg]: [X] }, ao = { [e]: "Unrecognized S3Express bucket name format.", [cd]: e }, ap = { [cf]: r, [cg]: [aa] }, aq = { [ch]: t }, ar = { [ce]: [an], [e]: "Expected a endpoint to be specified but no endpoint was found", [cd]: e }, as = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: y, [cp]: "{Region}" }] }, at = { [cf]: d, [cg]: [{ [ch]: "ForcePathStyle" }, false] }, au = { [ch]: "ForcePathStyle" }, av = { [cf]: d, [cg]: [{ [ch]: "Accelerate" }, false] }, aw = { [cf]: g, [cg]: [{ [ch]: "Region" }, "aws-global"] }, ax = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: z, [cp]: "us-east-1" }] }, ay = { [cf]: r, [cg]: [aw] }, az = { [cf]: d, [cg]: [{ [ch]: "UseGlobalEndpoint" }, true] }, aA = { [cj]: "https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [ck]: { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: z, [cp]: "{Region}" }] }, [cq]: {} }, aB = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: z, [cp]: "{Region}" }] }, aC = { [cf]: d, [cg]: [{ [ch]: "UseGlobalEndpoint" }, false] }, aD = { [cf]: d, [cg]: [{ [ch]: "UseDualStack" }, false] }, aE = { [cj]: "https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} }, aF = { [cf]: d, [cg]: [{ [ch]: "UseFIPS" }, false] }, aG = { [cj]: "https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} }, aH = { [cj]: "https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} }, aI = { [cf]: d, [cg]: [{ [cf]: h, [cg]: [ae, "isIp"] }, false] }, aJ = { [cj]: A, [ck]: aB, [cq]: {} }, aK = { [cj]: q, [ck]: aB, [cq]: {} }, aL = { [n]: aK, [cd]: n }, aM = { [cj]: B, [ck]: aB, [cq]: {} }, aN = { [cj]: "https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} }, aO = { [e]: "Invalid region: region was not a valid DNS name.", [cd]: e }, aP = { [ch]: E }, aQ = { [ch]: F }, aR = { [cf]: h, [cg]: [aP, "service"] }, aS = { [ch]: J }, aT = { [ce]: [W], [e]: "S3 Object Lambda does not support Dual-stack", [cd]: e }, aU = { [ce]: [U], [e]: "S3 Object Lambda does not support S3 Accelerate", [cd]: e }, aV = { [ce]: [{ [cf]: c, [cg]: [{ [ch]: "DisableAccessPoints" }] }, { [cf]: d, [cg]: [{ [ch]: "DisableAccessPoints" }, true] }], [e]: "Access points are not supported for this operation", [cd]: e }, aW = { [ce]: [{ [cf]: c, [cg]: [{ [ch]: "UseArnRegion" }] }, { [cf]: d, [cg]: [{ [ch]: "UseArnRegion" }, false] }, { [cf]: r, [cg]: [{ [cf]: g, [cg]: [{ [cf]: h, [cg]: [aP, "region"] }, "{Region}"] }] }], [e]: "Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`", [cd]: e }, aX = { [cf]: h, [cg]: [{ [ch]: "bucketPartition" }, i] }, aY = { [cf]: h, [cg]: [aP, "accountId"] }, aZ = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: H, [cp]: "{bucketArn#region}" }] }, ba = { [e]: "Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`", [cd]: e }, bb = { [e]: "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`", [cd]: e }, bc = { [e]: "Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)", [cd]: e }, bd = { [e]: "Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`", [cd]: e }, be = { [e]: "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.", [cd]: e }, bf = { [e]: "Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided", [cd]: e }, bg = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: z, [cp]: "{bucketArn#region}" }] }, bh = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: y, [cp]: "{bucketArn#region}" }] }, bi = { [cf]: D, [cg]: [ab] }, bj = { [cj]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: aB, [cq]: {} }, bk = { [cj]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: aB, [cq]: {} }, bl = { [cj]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: aB, [cq]: {} }, bm = { [cj]: O, [ck]: aB, [cq]: {} }, bn = { [cj]: "https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: aB, [cq]: {} }, bo = { [ch]: "UseObjectLambdaEndpoint" }, bp = { [cm]: [{ [cn]: true, [i]: "sigv4", [co]: H, [cp]: "{Region}" }] }, bq = { [cj]: "https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} }, br = { [cj]: "https://s3-fips.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} }, bs = { [cj]: "https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} }, bt = { [cj]: s, [ck]: aB, [cq]: {} }, bu = { [cj]: "https://s3.{Region}.{partitionResult#dnsSuffix}", [ck]: aB, [cq]: {} }, bv = [{ [ch]: "Region" }], bw = [{ [ch]: "Endpoint" }], bx = [ab], by = [W], bz = [U], bA = [X, ac], bB = [{ [cf]: c, [cg]: [{ [ch]: "DisableS3ExpressSessionAuth" }] }, { [cf]: d, [cg]: [{ [ch]: "DisableS3ExpressSessionAuth" }, true] }], bC = [ad], bD = [af], bE = [ai], bF = [V], bG = [{ [cf]: j, [cg]: [ab, 6, 14, true], [ci]: "s3expressAvailabilityZoneId" }, { [cf]: j, [cg]: [ab, 14, 16, true], [ci]: "s3expressAvailabilityZoneDelim" }, { [cf]: g, [cg]: [{ [ch]: "s3expressAvailabilityZoneDelim" }, "--"] }], bH = [{ [ce]: [V], [n]: { [cj]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", [ck]: ag, [cq]: {} }, [cd]: n }, { [n]: { [cj]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", [ck]: ag, [cq]: {} }, [cd]: n }], bI = [{ [cf]: j, [cg]: [ab, 6, 15, true], [ci]: "s3expressAvailabilityZoneId" }, { [cf]: j, [cg]: [ab, 15, 17, true], [ci]: "s3expressAvailabilityZoneDelim" }, { [cf]: g, [cg]: [{ [ch]: "s3expressAvailabilityZoneDelim" }, "--"] }], bJ = [{ [ce]: [V], [n]: { [cj]: "https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", [ck]: ak, [cq]: {} }, [cd]: n }, { [n]: { [cj]: "https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com", [ck]: ak, [cq]: {} }, [cd]: n }], bK = [aa], bL = [{ [cf]: x, [cg]: [{ [ch]: w }, false] }], bM = [{ [cf]: g, [cg]: [{ [ch]: u }, "beta"] }], bN = [Y], bO = [{ [cf]: x, [cg]: [{ [ch]: "Region" }, false] }], bP = [{ [cf]: g, [cg]: [{ [ch]: "Region" }, "us-east-1"] }], bQ = [{ [cf]: g, [cg]: [aQ, I] }], bR = [{ [cf]: h, [cg]: [aP, "resourceId[1]"], [ci]: J }, { [cf]: r, [cg]: [{ [cf]: g, [cg]: [aS, G] }] }], bS = [aP, "resourceId[1]"], bT = [{ [cf]: r, [cg]: [{ [cf]: g, [cg]: [{ [cf]: h, [cg]: [aP, "region"] }, G] }] }], bU = [{ [cf]: r, [cg]: [{ [cf]: c, [cg]: [{ [cf]: h, [cg]: [aP, "resourceId[2]"] }] }] }], bV = [aP, "resourceId[2]"], bW = [{ [cf]: f, [cg]: [{ [cf]: h, [cg]: [aP, "region"] }], [ci]: "bucketPartition" }], bX = [{ [cf]: g, [cg]: [aX, { [cf]: h, [cg]: [{ [ch]: "partitionResult" }, i] }] }], bY = [{ [cf]: x, [cg]: [{ [cf]: h, [cg]: [aP, "region"] }, true] }], bZ = [{ [cf]: x, [cg]: [aY, false] }], ca = [{ [cf]: x, [cg]: [aS, false] }], cb = [{ [cf]: x, [cg]: [{ [ch]: "Region" }, true] }]; +const _data = { version: "1.0", parameters: { Bucket: R, Region: R, UseFIPS: S, UseDualStack: S, Endpoint: R, ForcePathStyle: S, Accelerate: S, UseGlobalEndpoint: S, UseObjectLambdaEndpoint: T, Key: R, Prefix: R, DisableAccessPoints: T, DisableMultiRegionAccessPoints: S, UseArnRegion: T, UseS3ExpressControlEndpoint: T, DisableS3ExpressSessionAuth: T }, rules: [{ [ce]: [{ [cf]: c, [cg]: bv }], rules: [{ [ce]: [U, V], error: "Accelerate cannot be used with FIPS", [cd]: e }, { [ce]: [W, X], error: "Cannot set dual-stack in combination with a custom endpoint.", [cd]: e }, { [ce]: [X, V], error: "A custom endpoint cannot be combined with FIPS", [cd]: e }, { [ce]: [X, U], error: "A custom endpoint cannot be combined with S3 Accelerate", [cd]: e }, { [ce]: [V, Y, Z], error: "Partition does not support FIPS", [cd]: e }, { [ce]: [aa, { [cf]: j, [cg]: [ab, 0, 6, b], [ci]: k }, { [cf]: g, [cg]: [{ [ch]: k }, "--x-s3"] }], rules: [{ [ce]: by, error: "S3Express does not support Dual-stack.", [cd]: e }, { [ce]: bz, error: "S3Express does not support S3 Accelerate.", [cd]: e }, { [ce]: bA, rules: [{ [ce]: bB, rules: [{ [ce]: bC, rules: [{ [ce]: bD, rules: [{ endpoint: { [cj]: m, [ck]: ag, [cq]: ah }, [cd]: n }], [cd]: o }], [cd]: o }, { [ce]: bE, rules: [{ endpoint: { [cj]: q, [ck]: ag, [cq]: ah }, [cd]: n }], [cd]: o }, aj], [cd]: o }, { [ce]: bC, rules: [{ [ce]: bD, rules: [{ endpoint: { [cj]: m, [ck]: ak, [cq]: ah }, [cd]: n }], [cd]: o }], [cd]: o }, { [ce]: bE, rules: [{ endpoint: { [cj]: q, [ck]: ak, [cq]: ah }, [cd]: n }], [cd]: o }, aj], [cd]: o }, { [ce]: [al, am], rules: [{ [ce]: [af, an], rules: [{ [ce]: bF, endpoint: { [cj]: "https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}", [ck]: ag, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}", [ck]: ag, [cq]: ah }, [cd]: n }], [cd]: o }], [cd]: o }, { [ce]: bE, rules: [{ [ce]: bB, rules: [{ [ce]: bG, rules: bH, [cd]: o }, { [ce]: bI, rules: bH, [cd]: o }, ao], [cd]: o }, { [ce]: bG, rules: bJ, [cd]: o }, { [ce]: bI, rules: bJ, [cd]: o }, ao], [cd]: o }, aj], [cd]: o }, { [ce]: [ap, al, am], rules: [{ [ce]: bA, endpoint: { [cj]: s, [ck]: ag, [cq]: ah }, [cd]: n }, { [ce]: bF, endpoint: { [cj]: "https://s3express-control-fips.{Region}.amazonaws.com", [ck]: ag, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://s3express-control.{Region}.amazonaws.com", [ck]: ag, [cq]: ah }, [cd]: n }], [cd]: o }, { [ce]: [aa, { [cf]: j, [cg]: [ab, 49, 50, b], [ci]: t }, { [cf]: j, [cg]: [ab, 8, 12, b], [ci]: u }, { [cf]: j, [cg]: [ab, 0, 7, b], [ci]: v }, { [cf]: j, [cg]: [ab, 32, 49, b], [ci]: w }, { [cf]: f, [cg]: bv, [ci]: "regionPartition" }, { [cf]: g, [cg]: [{ [ch]: v }, "--op-s3"] }], rules: [{ [ce]: bL, rules: [{ [ce]: [{ [cf]: g, [cg]: [aq, "e"] }], rules: [{ [ce]: bM, rules: [ar, { [ce]: bA, endpoint: { [cj]: "https://{Bucket}.ec2.{url#authority}", [ck]: as, [cq]: ah }, [cd]: n }], [cd]: o }, { endpoint: { [cj]: "https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [ck]: as, [cq]: ah }, [cd]: n }], [cd]: o }, { [ce]: [{ [cf]: g, [cg]: [aq, "o"] }], rules: [{ [ce]: bM, rules: [ar, { [ce]: bA, endpoint: { [cj]: "https://{Bucket}.op-{outpostId}.{url#authority}", [ck]: as, [cq]: ah }, [cd]: n }], [cd]: o }, { endpoint: { [cj]: "https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}", [ck]: as, [cq]: ah }, [cd]: n }], [cd]: o }, { error: "Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"", [cd]: e }], [cd]: o }, { error: "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.", [cd]: e }], [cd]: o }, { [ce]: bK, rules: [{ [ce]: [X, { [cf]: r, [cg]: [{ [cf]: c, [cg]: [{ [cf]: l, [cg]: bw }] }] }], error: "Custom endpoint `{Endpoint}` was not a valid URI", [cd]: e }, { [ce]: [at, ai], rules: [{ [ce]: bN, rules: [{ [ce]: bO, rules: [{ [ce]: [U, Z], error: "S3 Accelerate cannot be used in this region", [cd]: e }, { [ce]: [W, V, av, an, aw], endpoint: { [cj]: "https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, V, av, an, ay, az], rules: [{ endpoint: aA, [cd]: n }], [cd]: o }, { [ce]: [W, V, av, an, ay, aC], endpoint: aA, [cd]: n }, { [ce]: [aD, V, av, an, aw], endpoint: { [cj]: "https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, V, av, an, ay, az], rules: [{ endpoint: aE, [cd]: n }], [cd]: o }, { [ce]: [aD, V, av, an, ay, aC], endpoint: aE, [cd]: n }, { [ce]: [W, aF, U, an, aw], endpoint: { [cj]: "https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, aF, U, an, ay, az], rules: [{ endpoint: aG, [cd]: n }], [cd]: o }, { [ce]: [W, aF, U, an, ay, aC], endpoint: aG, [cd]: n }, { [ce]: [W, aF, av, an, aw], endpoint: { [cj]: "https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, aF, av, an, ay, az], rules: [{ endpoint: aH, [cd]: n }], [cd]: o }, { [ce]: [W, aF, av, an, ay, aC], endpoint: aH, [cd]: n }, { [ce]: [aD, aF, av, X, ac, ad, aw], endpoint: { [cj]: A, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, aF, av, X, ac, aI, aw], endpoint: { [cj]: q, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, aF, av, X, ac, ad, ay, az], rules: [{ [ce]: bP, endpoint: aJ, [cd]: n }, { endpoint: aJ, [cd]: n }], [cd]: o }, { [ce]: [aD, aF, av, X, ac, aI, ay, az], rules: [{ [ce]: bP, endpoint: aK, [cd]: n }, aL], [cd]: o }, { [ce]: [aD, aF, av, X, ac, ad, ay, aC], endpoint: aJ, [cd]: n }, { [ce]: [aD, aF, av, X, ac, aI, ay, aC], endpoint: aK, [cd]: n }, { [ce]: [aD, aF, U, an, aw], endpoint: { [cj]: B, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, aF, U, an, ay, az], rules: [{ [ce]: bP, endpoint: aM, [cd]: n }, { endpoint: aM, [cd]: n }], [cd]: o }, { [ce]: [aD, aF, U, an, ay, aC], endpoint: aM, [cd]: n }, { [ce]: [aD, aF, av, an, aw], endpoint: { [cj]: C, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, aF, av, an, ay, az], rules: [{ [ce]: bP, endpoint: { [cj]: C, [ck]: aB, [cq]: ah }, [cd]: n }, { endpoint: aN, [cd]: n }], [cd]: o }, { [ce]: [aD, aF, av, an, ay, aC], endpoint: aN, [cd]: n }], [cd]: o }, aO], [cd]: o }], [cd]: o }, { [ce]: [X, ac, { [cf]: g, [cg]: [{ [cf]: h, [cg]: [ae, "scheme"] }, "http"] }, { [cf]: p, [cg]: [ab, b] }, at, aF, aD, av], rules: [{ [ce]: bN, rules: [{ [ce]: bO, rules: [aL], [cd]: o }, aO], [cd]: o }], [cd]: o }, { [ce]: [at, { [cf]: D, [cg]: bx, [ci]: E }], rules: [{ [ce]: [{ [cf]: h, [cg]: [aP, "resourceId[0]"], [ci]: F }, { [cf]: r, [cg]: [{ [cf]: g, [cg]: [aQ, G] }] }], rules: [{ [ce]: [{ [cf]: g, [cg]: [aR, H] }], rules: [{ [ce]: bQ, rules: [{ [ce]: bR, rules: [aT, aU, { [ce]: bT, rules: [aV, { [ce]: bU, rules: [aW, { [ce]: bW, rules: [{ [ce]: bN, rules: [{ [ce]: bX, rules: [{ [ce]: bY, rules: [{ [ce]: [{ [cf]: g, [cg]: [aY, G] }], error: "Invalid ARN: Missing account id", [cd]: e }, { [ce]: bZ, rules: [{ [ce]: ca, rules: [{ [ce]: bA, endpoint: { [cj]: K, [ck]: aZ, [cq]: ah }, [cd]: n }, { [ce]: bF, endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: aZ, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: aZ, [cq]: ah }, [cd]: n }], [cd]: o }, ba], [cd]: o }, bb], [cd]: o }, bc], [cd]: o }, bd], [cd]: o }], [cd]: o }], [cd]: o }, be], [cd]: o }, { error: "Invalid ARN: bucket ARN is missing a region", [cd]: e }], [cd]: o }, bf], [cd]: o }, { error: "Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`", [cd]: e }], [cd]: o }, { [ce]: bQ, rules: [{ [ce]: bR, rules: [{ [ce]: bT, rules: [{ [ce]: bQ, rules: [{ [ce]: bT, rules: [aV, { [ce]: bU, rules: [aW, { [ce]: bW, rules: [{ [ce]: bN, rules: [{ [ce]: [{ [cf]: g, [cg]: [aX, "{partitionResult#name}"] }], rules: [{ [ce]: bY, rules: [{ [ce]: [{ [cf]: g, [cg]: [aR, z] }], rules: [{ [ce]: bZ, rules: [{ [ce]: ca, rules: [{ [ce]: bz, error: "Access Points do not support S3 Accelerate", [cd]: e }, { [ce]: [V, W], endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bg, [cq]: ah }, [cd]: n }, { [ce]: [V, aD], endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bg, [cq]: ah }, [cd]: n }, { [ce]: [aF, W], endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bg, [cq]: ah }, [cd]: n }, { [ce]: [aF, aD, X, ac], endpoint: { [cj]: K, [ck]: bg, [cq]: ah }, [cd]: n }, { [ce]: [aF, aD], endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bg, [cq]: ah }, [cd]: n }], [cd]: o }, ba], [cd]: o }, bb], [cd]: o }, { error: "Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}", [cd]: e }], [cd]: o }, bc], [cd]: o }, bd], [cd]: o }], [cd]: o }], [cd]: o }, be], [cd]: o }], [cd]: o }], [cd]: o }, { [ce]: [{ [cf]: x, [cg]: [aS, b] }], rules: [{ [ce]: by, error: "S3 MRAP does not support dual-stack", [cd]: e }, { [ce]: bF, error: "S3 MRAP does not support FIPS", [cd]: e }, { [ce]: bz, error: "S3 MRAP does not support S3 Accelerate", [cd]: e }, { [ce]: [{ [cf]: d, [cg]: [{ [ch]: "DisableMultiRegionAccessPoints" }, b] }], error: "Invalid configuration: Multi-Region Access Point ARNs are disabled.", [cd]: e }, { [ce]: [{ [cf]: f, [cg]: bv, [ci]: L }], rules: [{ [ce]: [{ [cf]: g, [cg]: [{ [cf]: h, [cg]: [{ [ch]: L }, i] }, { [cf]: h, [cg]: [aP, "partition"] }] }], rules: [{ endpoint: { [cj]: "https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}", [ck]: { [cm]: [{ [cn]: b, name: "sigv4a", [co]: z, signingRegionSet: ["*"] }] }, [cq]: ah }, [cd]: n }], [cd]: o }, { error: "Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`", [cd]: e }], [cd]: o }], [cd]: o }, { error: "Invalid Access Point Name", [cd]: e }], [cd]: o }, bf], [cd]: o }, { [ce]: [{ [cf]: g, [cg]: [aR, y] }], rules: [{ [ce]: by, error: "S3 Outposts does not support Dual-stack", [cd]: e }, { [ce]: bF, error: "S3 Outposts does not support FIPS", [cd]: e }, { [ce]: bz, error: "S3 Outposts does not support S3 Accelerate", [cd]: e }, { [ce]: [{ [cf]: c, [cg]: [{ [cf]: h, [cg]: [aP, "resourceId[4]"] }] }], error: "Invalid Arn: Outpost Access Point ARN contains sub resources", [cd]: e }, { [ce]: [{ [cf]: h, [cg]: bS, [ci]: w }], rules: [{ [ce]: bL, rules: [aW, { [ce]: bW, rules: [{ [ce]: bN, rules: [{ [ce]: bX, rules: [{ [ce]: bY, rules: [{ [ce]: bZ, rules: [{ [ce]: [{ [cf]: h, [cg]: bV, [ci]: M }], rules: [{ [ce]: [{ [cf]: h, [cg]: [aP, "resourceId[3]"], [ci]: J }], rules: [{ [ce]: [{ [cf]: g, [cg]: [{ [ch]: M }, I] }], rules: [{ [ce]: bA, endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}", [ck]: bh, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}", [ck]: bh, [cq]: ah }, [cd]: n }], [cd]: o }, { error: "Expected an outpost type `accesspoint`, found {outpostType}", [cd]: e }], [cd]: o }, { error: "Invalid ARN: expected an access point name", [cd]: e }], [cd]: o }, { error: "Invalid ARN: Expected a 4-component resource", [cd]: e }], [cd]: o }, bb], [cd]: o }, bc], [cd]: o }, bd], [cd]: o }], [cd]: o }], [cd]: o }, { error: "Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`", [cd]: e }], [cd]: o }, { error: "Invalid ARN: The Outpost Id was not set", [cd]: e }], [cd]: o }, { error: "Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})", [cd]: e }], [cd]: o }, { error: "Invalid ARN: No ARN type specified", [cd]: e }], [cd]: o }, { [ce]: [{ [cf]: j, [cg]: [ab, 0, 4, a], [ci]: N }, { [cf]: g, [cg]: [{ [ch]: N }, "arn:"] }, { [cf]: r, [cg]: [{ [cf]: c, [cg]: [bi] }] }], error: "Invalid ARN: `{Bucket}` was not a valid ARN", [cd]: e }, { [ce]: [{ [cf]: d, [cg]: [au, b] }, bi], error: "Path-style addressing cannot be used with ARN buckets", [cd]: e }, { [ce]: bD, rules: [{ [ce]: bN, rules: [{ [ce]: [av], rules: [{ [ce]: [W, an, V, aw], endpoint: { [cj]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, an, V, ay, az], rules: [{ endpoint: bj, [cd]: n }], [cd]: o }, { [ce]: [W, an, V, ay, aC], endpoint: bj, [cd]: n }, { [ce]: [aD, an, V, aw], endpoint: { [cj]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, an, V, ay, az], rules: [{ endpoint: bk, [cd]: n }], [cd]: o }, { [ce]: [aD, an, V, ay, aC], endpoint: bk, [cd]: n }, { [ce]: [W, an, aF, aw], endpoint: { [cj]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [W, an, aF, ay, az], rules: [{ endpoint: bl, [cd]: n }], [cd]: o }, { [ce]: [W, an, aF, ay, aC], endpoint: bl, [cd]: n }, { [ce]: [aD, X, ac, aF, aw], endpoint: { [cj]: O, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, X, ac, aF, ay, az], rules: [{ [ce]: bP, endpoint: bm, [cd]: n }, { endpoint: bm, [cd]: n }], [cd]: o }, { [ce]: [aD, X, ac, aF, ay, aC], endpoint: bm, [cd]: n }, { [ce]: [aD, an, aF, aw], endpoint: { [cj]: P, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aD, an, aF, ay, az], rules: [{ [ce]: bP, endpoint: { [cj]: P, [ck]: aB, [cq]: ah }, [cd]: n }, { endpoint: bn, [cd]: n }], [cd]: o }, { [ce]: [aD, an, aF, ay, aC], endpoint: bn, [cd]: n }], [cd]: o }, { error: "Path-style addressing cannot be used with S3 Accelerate", [cd]: e }], [cd]: o }], [cd]: o }], [cd]: o }, { [ce]: [{ [cf]: c, [cg]: [bo] }, { [cf]: d, [cg]: [bo, b] }], rules: [{ [ce]: bN, rules: [{ [ce]: cb, rules: [aT, aU, { [ce]: bA, endpoint: { [cj]: s, [ck]: bp, [cq]: ah }, [cd]: n }, { [ce]: bF, endpoint: { [cj]: "https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}", [ck]: bp, [cq]: ah }, [cd]: n }, { endpoint: { [cj]: "https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}", [ck]: bp, [cq]: ah }, [cd]: n }], [cd]: o }, aO], [cd]: o }], [cd]: o }, { [ce]: [ap], rules: [{ [ce]: bN, rules: [{ [ce]: cb, rules: [{ [ce]: [V, W, an, aw], endpoint: { [cj]: "https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [V, W, an, ay, az], rules: [{ endpoint: bq, [cd]: n }], [cd]: o }, { [ce]: [V, W, an, ay, aC], endpoint: bq, [cd]: n }, { [ce]: [V, aD, an, aw], endpoint: { [cj]: "https://s3-fips.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [V, aD, an, ay, az], rules: [{ endpoint: br, [cd]: n }], [cd]: o }, { [ce]: [V, aD, an, ay, aC], endpoint: br, [cd]: n }, { [ce]: [aF, W, an, aw], endpoint: { [cj]: "https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}", [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aF, W, an, ay, az], rules: [{ endpoint: bs, [cd]: n }], [cd]: o }, { [ce]: [aF, W, an, ay, aC], endpoint: bs, [cd]: n }, { [ce]: [aF, aD, X, ac, aw], endpoint: { [cj]: s, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aF, aD, X, ac, ay, az], rules: [{ [ce]: bP, endpoint: bt, [cd]: n }, { endpoint: bt, [cd]: n }], [cd]: o }, { [ce]: [aF, aD, X, ac, ay, aC], endpoint: bt, [cd]: n }, { [ce]: [aF, aD, an, aw], endpoint: { [cj]: Q, [ck]: ax, [cq]: ah }, [cd]: n }, { [ce]: [aF, aD, an, ay, az], rules: [{ [ce]: bP, endpoint: { [cj]: Q, [ck]: aB, [cq]: ah }, [cd]: n }, { endpoint: bu, [cd]: n }], [cd]: o }, { [ce]: [aF, aD, an, ay, aC], endpoint: bu, [cd]: n }], [cd]: o }, aO], [cd]: o }], [cd]: o }], [cd]: o }, { error: "A region must be set when sending requests to S3.", [cd]: e }] }; +exports.ruleSet = _data; /***/ }), +/***/ 23371: +======= /***/ 60382: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.S3ServiceException = void 0; +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(91685); +tslib_1.__exportStar(__nccwpck_require__(34692), exports); +tslib_1.__exportStar(__nccwpck_require__(99700), exports); +tslib_1.__exportStar(__nccwpck_require__(3749), exports); +tslib_1.__exportStar(__nccwpck_require__(2714), exports); +tslib_1.__exportStar(__nccwpck_require__(98423), exports); +tslib_1.__exportStar(__nccwpck_require__(56244), exports); +__nccwpck_require__(60698); +var S3ServiceException_1 = __nccwpck_require__(67895); +======= const tslib_1 = __nccwpck_require__(73563); tslib_1.__exportStar(__nccwpck_require__(10223), exports); tslib_1.__exportStar(__nccwpck_require__(17824), exports); @@ -11369,19 +16812,29 @@ tslib_1.__exportStar(__nccwpck_require__(9993), exports); tslib_1.__exportStar(__nccwpck_require__(28743), exports); tslib_1.__exportStar(__nccwpck_require__(40655), exports); var S3ServiceException_1 = __nccwpck_require__(60929); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "S3ServiceException", ({ enumerable: true, get: function () { return S3ServiceException_1.S3ServiceException; } })); /***/ }), +<<<<<<< HEAD +/***/ 67895: +======= /***/ 60929: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.S3ServiceException = exports.__ServiceException = void 0; +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } })); +======= exports.S3ServiceException = void 0; const smithy_client_1 = __nccwpck_require__(26351); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class S3ServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); @@ -11393,25 +16846,49 @@ exports.S3ServiceException = S3ServiceException; /***/ }), +<<<<<<< HEAD +/***/ 56244: +======= /***/ 9993: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(91685); +tslib_1.__exportStar(__nccwpck_require__(22729), exports); +tslib_1.__exportStar(__nccwpck_require__(71767), exports); +======= const tslib_1 = __nccwpck_require__(73563); tslib_1.__exportStar(__nccwpck_require__(30991), exports); tslib_1.__exportStar(__nccwpck_require__(43228), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 22729: +======= /***/ 30991: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.SseKmsEncryptedObjectsStatus = exports.ReplicaModificationsStatus = exports.ReplicationRuleFilter = exports.ExistingObjectReplicationStatus = exports.ReplicationTimeStatus = exports.MetricsStatus = exports.DeleteMarkerReplicationStatus = exports.FilterRuleName = exports.Event = exports.MetricsFilter = exports.PartitionDateSource = exports.BucketLogsPermission = exports.ExpirationStatus = exports.TransitionStorageClass = exports.LifecycleRuleFilter = exports.InventoryFrequency = exports.InventoryOptionalField = exports.InventoryIncludedObjectVersions = exports.InventoryFormat = exports.IntelligentTieringAccessTier = exports.IntelligentTieringStatus = exports.StorageClassAnalysisSchemaVersion = exports.AnalyticsS3ExportFileFormat = exports.AnalyticsFilter = exports.NoSuchBucket = exports.SessionMode = exports.ObjectOwnership = exports.BucketLocationConstraint = exports.LocationType = exports.BucketType = exports.DataRedundancy = exports.BucketCannedACL = exports.BucketAlreadyOwnedByYou = exports.BucketAlreadyExists = exports.ObjectNotInActiveTierError = exports.TaggingDirective = exports.StorageClass = exports.ObjectLockMode = exports.ObjectLockLegalHoldStatus = exports.MetadataDirective = exports.ChecksumAlgorithm = exports.ObjectCannedACL = exports.ServerSideEncryption = exports.OwnerOverride = exports.Permission = exports.Type = exports.BucketAccelerateStatus = exports.NoSuchUpload = exports.RequestPayer = exports.RequestCharged = void 0; +exports.PutBucketInventoryConfigurationRequestFilterSensitiveLog = exports.PutBucketEncryptionRequestFilterSensitiveLog = exports.ListPartsRequestFilterSensitiveLog = exports.ListBucketInventoryConfigurationsOutputFilterSensitiveLog = exports.HeadObjectRequestFilterSensitiveLog = exports.HeadObjectOutputFilterSensitiveLog = exports.GetObjectTorrentOutputFilterSensitiveLog = exports.GetObjectAttributesRequestFilterSensitiveLog = exports.GetObjectRequestFilterSensitiveLog = exports.GetObjectOutputFilterSensitiveLog = exports.GetBucketInventoryConfigurationOutputFilterSensitiveLog = exports.InventoryConfigurationFilterSensitiveLog = exports.InventoryDestinationFilterSensitiveLog = exports.InventoryS3BucketDestinationFilterSensitiveLog = exports.InventoryEncryptionFilterSensitiveLog = exports.SSEKMSFilterSensitiveLog = exports.GetBucketEncryptionOutputFilterSensitiveLog = exports.ServerSideEncryptionConfigurationFilterSensitiveLog = exports.ServerSideEncryptionRuleFilterSensitiveLog = exports.ServerSideEncryptionByDefaultFilterSensitiveLog = exports.CreateSessionOutputFilterSensitiveLog = exports.SessionCredentialsFilterSensitiveLog = exports.CreateMultipartUploadRequestFilterSensitiveLog = exports.CreateMultipartUploadOutputFilterSensitiveLog = exports.CopyObjectRequestFilterSensitiveLog = exports.CopyObjectOutputFilterSensitiveLog = exports.CompleteMultipartUploadRequestFilterSensitiveLog = exports.CompleteMultipartUploadOutputFilterSensitiveLog = exports.ObjectVersionStorageClass = exports.OptionalObjectAttributes = exports.ObjectStorageClass = exports.EncodingType = exports.ArchiveStatus = exports.NotFound = exports.ObjectLockRetentionMode = exports.ObjectLockEnabled = exports.ObjectAttributes = exports.NoSuchKey = exports.InvalidObjectState = exports.ChecksumMode = exports.ReplicationStatus = exports.Protocol = exports.BucketVersioningStatus = exports.MFADeleteStatus = exports.Payer = exports.ReplicationRuleStatus = void 0; +const smithy_client_1 = __nccwpck_require__(33218); +const S3ServiceException_1 = __nccwpck_require__(67895); +exports.RequestCharged = { + requester: "requester", +}; +exports.RequestPayer = { + requester: "requester", +}; +======= exports.DeleteObjectOutputFilterSensitiveLog = exports.DeleteBucketWebsiteRequestFilterSensitiveLog = exports.DeleteBucketTaggingRequestFilterSensitiveLog = exports.DeleteBucketReplicationRequestFilterSensitiveLog = exports.DeleteBucketPolicyRequestFilterSensitiveLog = exports.DeleteBucketOwnershipControlsRequestFilterSensitiveLog = exports.DeleteBucketMetricsConfigurationRequestFilterSensitiveLog = exports.DeleteBucketLifecycleRequestFilterSensitiveLog = exports.DeleteBucketInventoryConfigurationRequestFilterSensitiveLog = exports.DeleteBucketIntelligentTieringConfigurationRequestFilterSensitiveLog = exports.DeleteBucketEncryptionRequestFilterSensitiveLog = exports.DeleteBucketCorsRequestFilterSensitiveLog = exports.DeleteBucketAnalyticsConfigurationRequestFilterSensitiveLog = exports.DeleteBucketRequestFilterSensitiveLog = exports.CreateMultipartUploadRequestFilterSensitiveLog = exports.CreateMultipartUploadOutputFilterSensitiveLog = exports.CreateBucketRequestFilterSensitiveLog = exports.CreateBucketConfigurationFilterSensitiveLog = exports.CreateBucketOutputFilterSensitiveLog = exports.CopyObjectRequestFilterSensitiveLog = exports.CopyObjectOutputFilterSensitiveLog = exports.CopyObjectResultFilterSensitiveLog = exports.CompleteMultipartUploadRequestFilterSensitiveLog = exports.CompletedMultipartUploadFilterSensitiveLog = exports.CompletedPartFilterSensitiveLog = exports.CompleteMultipartUploadOutputFilterSensitiveLog = exports.AccessControlTranslationFilterSensitiveLog = exports.AccessControlPolicyFilterSensitiveLog = exports.OwnerFilterSensitiveLog = exports.GrantFilterSensitiveLog = exports.GranteeFilterSensitiveLog = exports.AccelerateConfigurationFilterSensitiveLog = exports.AbortMultipartUploadRequestFilterSensitiveLog = exports.AbortMultipartUploadOutputFilterSensitiveLog = exports.AbortIncompleteMultipartUploadFilterSensitiveLog = exports.NoSuchBucket = exports.NotFound = exports.ObjectAttributes = exports.NoSuchKey = exports.InvalidObjectState = exports.ChecksumMode = exports.ReplicationRuleFilter = exports.MetricsFilter = exports.LifecycleRuleFilter = exports.AnalyticsFilter = exports.BucketAlreadyOwnedByYou = exports.BucketAlreadyExists = exports.ObjectNotInActiveTierError = exports.ChecksumAlgorithm = exports.NoSuchUpload = void 0; exports.LifecycleRuleAndOperatorFilterSensitiveLog = exports.LifecycleExpirationFilterSensitiveLog = exports.GetBucketInventoryConfigurationRequestFilterSensitiveLog = exports.GetBucketInventoryConfigurationOutputFilterSensitiveLog = exports.InventoryConfigurationFilterSensitiveLog = exports.InventoryScheduleFilterSensitiveLog = exports.InventoryFilterFilterSensitiveLog = exports.InventoryDestinationFilterSensitiveLog = exports.InventoryS3BucketDestinationFilterSensitiveLog = exports.InventoryEncryptionFilterSensitiveLog = exports.SSES3FilterSensitiveLog = exports.SSEKMSFilterSensitiveLog = exports.GetBucketIntelligentTieringConfigurationRequestFilterSensitiveLog = exports.GetBucketIntelligentTieringConfigurationOutputFilterSensitiveLog = exports.IntelligentTieringConfigurationFilterSensitiveLog = exports.TieringFilterSensitiveLog = exports.IntelligentTieringFilterFilterSensitiveLog = exports.IntelligentTieringAndOperatorFilterSensitiveLog = exports.GetBucketEncryptionRequestFilterSensitiveLog = exports.GetBucketEncryptionOutputFilterSensitiveLog = exports.ServerSideEncryptionConfigurationFilterSensitiveLog = exports.ServerSideEncryptionRuleFilterSensitiveLog = exports.ServerSideEncryptionByDefaultFilterSensitiveLog = exports.GetBucketCorsRequestFilterSensitiveLog = exports.GetBucketCorsOutputFilterSensitiveLog = exports.CORSRuleFilterSensitiveLog = exports.GetBucketAnalyticsConfigurationRequestFilterSensitiveLog = exports.GetBucketAnalyticsConfigurationOutputFilterSensitiveLog = exports.AnalyticsConfigurationFilterSensitiveLog = exports.StorageClassAnalysisFilterSensitiveLog = exports.StorageClassAnalysisDataExportFilterSensitiveLog = exports.AnalyticsExportDestinationFilterSensitiveLog = exports.AnalyticsS3BucketDestinationFilterSensitiveLog = exports.AnalyticsFilterFilterSensitiveLog = exports.AnalyticsAndOperatorFilterSensitiveLog = exports.TagFilterSensitiveLog = exports.GetBucketAclRequestFilterSensitiveLog = exports.GetBucketAclOutputFilterSensitiveLog = exports.GetBucketAccelerateConfigurationRequestFilterSensitiveLog = exports.GetBucketAccelerateConfigurationOutputFilterSensitiveLog = exports.DeletePublicAccessBlockRequestFilterSensitiveLog = exports.DeleteObjectTaggingRequestFilterSensitiveLog = exports.DeleteObjectTaggingOutputFilterSensitiveLog = exports.DeleteObjectsRequestFilterSensitiveLog = exports.DeleteFilterSensitiveLog = exports.ObjectIdentifierFilterSensitiveLog = exports.DeleteObjectsOutputFilterSensitiveLog = exports._ErrorFilterSensitiveLog = exports.DeletedObjectFilterSensitiveLog = exports.DeleteObjectRequestFilterSensitiveLog = void 0; exports.ReplicationConfigurationFilterSensitiveLog = exports.ReplicationRuleFilterSensitiveLog = exports.SourceSelectionCriteriaFilterSensitiveLog = exports.SseKmsEncryptedObjectsFilterSensitiveLog = exports.ReplicaModificationsFilterSensitiveLog = exports.ReplicationRuleFilterFilterSensitiveLog = exports.ReplicationRuleAndOperatorFilterSensitiveLog = exports.ExistingObjectReplicationFilterSensitiveLog = exports.DestinationFilterSensitiveLog = exports.ReplicationTimeFilterSensitiveLog = exports.MetricsFilterSensitiveLog = exports.ReplicationTimeValueFilterSensitiveLog = exports.EncryptionConfigurationFilterSensitiveLog = exports.DeleteMarkerReplicationFilterSensitiveLog = exports.GetBucketPolicyStatusRequestFilterSensitiveLog = exports.GetBucketPolicyStatusOutputFilterSensitiveLog = exports.PolicyStatusFilterSensitiveLog = exports.GetBucketPolicyRequestFilterSensitiveLog = exports.GetBucketPolicyOutputFilterSensitiveLog = exports.GetBucketOwnershipControlsRequestFilterSensitiveLog = exports.GetBucketOwnershipControlsOutputFilterSensitiveLog = exports.OwnershipControlsFilterSensitiveLog = exports.OwnershipControlsRuleFilterSensitiveLog = exports.NotificationConfigurationFilterSensitiveLog = exports.TopicConfigurationFilterSensitiveLog = exports.QueueConfigurationFilterSensitiveLog = exports.LambdaFunctionConfigurationFilterSensitiveLog = exports.NotificationConfigurationFilterFilterSensitiveLog = exports.S3KeyFilterFilterSensitiveLog = exports.FilterRuleFilterSensitiveLog = exports.EventBridgeConfigurationFilterSensitiveLog = exports.GetBucketNotificationConfigurationRequestFilterSensitiveLog = exports.GetBucketMetricsConfigurationRequestFilterSensitiveLog = exports.GetBucketMetricsConfigurationOutputFilterSensitiveLog = exports.MetricsConfigurationFilterSensitiveLog = exports.MetricsFilterFilterSensitiveLog = exports.MetricsAndOperatorFilterSensitiveLog = exports.GetBucketLoggingRequestFilterSensitiveLog = exports.GetBucketLoggingOutputFilterSensitiveLog = exports.LoggingEnabledFilterSensitiveLog = exports.TargetGrantFilterSensitiveLog = exports.GetBucketLocationRequestFilterSensitiveLog = exports.GetBucketLocationOutputFilterSensitiveLog = exports.GetBucketLifecycleConfigurationRequestFilterSensitiveLog = exports.GetBucketLifecycleConfigurationOutputFilterSensitiveLog = exports.LifecycleRuleFilterSensitiveLog = exports.TransitionFilterSensitiveLog = exports.NoncurrentVersionTransitionFilterSensitiveLog = exports.NoncurrentVersionExpirationFilterSensitiveLog = exports.LifecycleRuleFilterFilterSensitiveLog = void 0; @@ -11420,6 +16897,7 @@ exports.PutObjectRequestFilterSensitiveLog = exports.PutObjectOutputFilterSensit exports.PutObjectLockConfigurationRequestFilterSensitiveLog = exports.PutObjectLockConfigurationOutputFilterSensitiveLog = exports.PutObjectLegalHoldRequestFilterSensitiveLog = exports.PutObjectLegalHoldOutputFilterSensitiveLog = exports.PutObjectAclRequestFilterSensitiveLog = exports.PutObjectAclOutputFilterSensitiveLog = void 0; const smithy_client_1 = __nccwpck_require__(26351); const S3ServiceException_1 = __nccwpck_require__(60929); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class NoSuchUpload extends S3ServiceException_1.S3ServiceException { constructor(opts) { super({ @@ -11433,13 +16911,74 @@ class NoSuchUpload extends S3ServiceException_1.S3ServiceException { } } exports.NoSuchUpload = NoSuchUpload; -var ChecksumAlgorithm; -(function (ChecksumAlgorithm) { - ChecksumAlgorithm["CRC32"] = "CRC32"; - ChecksumAlgorithm["CRC32C"] = "CRC32C"; - ChecksumAlgorithm["SHA1"] = "SHA1"; - ChecksumAlgorithm["SHA256"] = "SHA256"; -})(ChecksumAlgorithm = exports.ChecksumAlgorithm || (exports.ChecksumAlgorithm = {})); +exports.BucketAccelerateStatus = { + Enabled: "Enabled", + Suspended: "Suspended", +}; +exports.Type = { + AmazonCustomerByEmail: "AmazonCustomerByEmail", + CanonicalUser: "CanonicalUser", + Group: "Group", +}; +exports.Permission = { + FULL_CONTROL: "FULL_CONTROL", + READ: "READ", + READ_ACP: "READ_ACP", + WRITE: "WRITE", + WRITE_ACP: "WRITE_ACP", +}; +exports.OwnerOverride = { + Destination: "Destination", +}; +exports.ServerSideEncryption = { + AES256: "AES256", + aws_kms: "aws:kms", + aws_kms_dsse: "aws:kms:dsse", +}; +exports.ObjectCannedACL = { + authenticated_read: "authenticated-read", + aws_exec_read: "aws-exec-read", + bucket_owner_full_control: "bucket-owner-full-control", + bucket_owner_read: "bucket-owner-read", + private: "private", + public_read: "public-read", + public_read_write: "public-read-write", +}; +exports.ChecksumAlgorithm = { + CRC32: "CRC32", + CRC32C: "CRC32C", + SHA1: "SHA1", + SHA256: "SHA256", +}; +exports.MetadataDirective = { + COPY: "COPY", + REPLACE: "REPLACE", +}; +exports.ObjectLockLegalHoldStatus = { + OFF: "OFF", + ON: "ON", +}; +exports.ObjectLockMode = { + COMPLIANCE: "COMPLIANCE", + GOVERNANCE: "GOVERNANCE", +}; +exports.StorageClass = { + DEEP_ARCHIVE: "DEEP_ARCHIVE", + EXPRESS_ONEZONE: "EXPRESS_ONEZONE", + GLACIER: "GLACIER", + GLACIER_IR: "GLACIER_IR", + INTELLIGENT_TIERING: "INTELLIGENT_TIERING", + ONEZONE_IA: "ONEZONE_IA", + OUTPOSTS: "OUTPOSTS", + REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY", + SNOW: "SNOW", + STANDARD: "STANDARD", + STANDARD_IA: "STANDARD_IA", +}; +exports.TaggingDirective = { + COPY: "COPY", + REPLACE: "REPLACE", +}; class ObjectNotInActiveTierError extends S3ServiceException_1.S3ServiceException { constructor(opts) { super({ @@ -11479,6 +17018,73 @@ class BucketAlreadyOwnedByYou extends S3ServiceException_1.S3ServiceException { } } exports.BucketAlreadyOwnedByYou = BucketAlreadyOwnedByYou; +exports.BucketCannedACL = { + authenticated_read: "authenticated-read", + private: "private", + public_read: "public-read", + public_read_write: "public-read-write", +}; +exports.DataRedundancy = { + SingleAvailabilityZone: "SingleAvailabilityZone", +}; +exports.BucketType = { + Directory: "Directory", +}; +exports.LocationType = { + AvailabilityZone: "AvailabilityZone", +}; +exports.BucketLocationConstraint = { + EU: "EU", + af_south_1: "af-south-1", + ap_east_1: "ap-east-1", + ap_northeast_1: "ap-northeast-1", + ap_northeast_2: "ap-northeast-2", + ap_northeast_3: "ap-northeast-3", + ap_south_1: "ap-south-1", + ap_south_2: "ap-south-2", + ap_southeast_1: "ap-southeast-1", + ap_southeast_2: "ap-southeast-2", + ap_southeast_3: "ap-southeast-3", + ca_central_1: "ca-central-1", + cn_north_1: "cn-north-1", + cn_northwest_1: "cn-northwest-1", + eu_central_1: "eu-central-1", + eu_north_1: "eu-north-1", + eu_south_1: "eu-south-1", + eu_south_2: "eu-south-2", + eu_west_1: "eu-west-1", + eu_west_2: "eu-west-2", + eu_west_3: "eu-west-3", + me_south_1: "me-south-1", + sa_east_1: "sa-east-1", + us_east_2: "us-east-2", + us_gov_east_1: "us-gov-east-1", + us_gov_west_1: "us-gov-west-1", + us_west_1: "us-west-1", + us_west_2: "us-west-2", +}; +exports.ObjectOwnership = { + BucketOwnerEnforced: "BucketOwnerEnforced", + BucketOwnerPreferred: "BucketOwnerPreferred", + ObjectWriter: "ObjectWriter", +}; +exports.SessionMode = { + ReadOnly: "ReadOnly", + ReadWrite: "ReadWrite", +}; +class NoSuchBucket extends S3ServiceException_1.S3ServiceException { + constructor(opts) { + super({ + name: "NoSuchBucket", + $fault: "client", + ...opts, + }); + this.name = "NoSuchBucket"; + this.$fault = "client"; + Object.setPrototypeOf(this, NoSuchBucket.prototype); + } +} +exports.NoSuchBucket = NoSuchBucket; var AnalyticsFilter; (function (AnalyticsFilter) { AnalyticsFilter.visit = (value, visitor) => { @@ -11491,6 +17097,50 @@ var AnalyticsFilter; return visitor._(value.$unknown[0], value.$unknown[1]); }; })(AnalyticsFilter = exports.AnalyticsFilter || (exports.AnalyticsFilter = {})); +exports.AnalyticsS3ExportFileFormat = { + CSV: "CSV", +}; +exports.StorageClassAnalysisSchemaVersion = { + V_1: "V_1", +}; +exports.IntelligentTieringStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +exports.IntelligentTieringAccessTier = { + ARCHIVE_ACCESS: "ARCHIVE_ACCESS", + DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS", +}; +exports.InventoryFormat = { + CSV: "CSV", + ORC: "ORC", + Parquet: "Parquet", +}; +exports.InventoryIncludedObjectVersions = { + All: "All", + Current: "Current", +}; +exports.InventoryOptionalField = { + BucketKeyStatus: "BucketKeyStatus", + ChecksumAlgorithm: "ChecksumAlgorithm", + ETag: "ETag", + EncryptionStatus: "EncryptionStatus", + IntelligentTieringAccessTier: "IntelligentTieringAccessTier", + IsMultipartUploaded: "IsMultipartUploaded", + LastModifiedDate: "LastModifiedDate", + ObjectAccessControlList: "ObjectAccessControlList", + ObjectLockLegalHoldStatus: "ObjectLockLegalHoldStatus", + ObjectLockMode: "ObjectLockMode", + ObjectLockRetainUntilDate: "ObjectLockRetainUntilDate", + ObjectOwner: "ObjectOwner", + ReplicationStatus: "ReplicationStatus", + Size: "Size", + StorageClass: "StorageClass", +}; +exports.InventoryFrequency = { + Daily: "Daily", + Weekly: "Weekly", +}; var LifecycleRuleFilter; (function (LifecycleRuleFilter) { LifecycleRuleFilter.visit = (value, visitor) => { @@ -11507,6 +17157,27 @@ var LifecycleRuleFilter; return visitor._(value.$unknown[0], value.$unknown[1]); }; })(LifecycleRuleFilter = exports.LifecycleRuleFilter || (exports.LifecycleRuleFilter = {})); +exports.TransitionStorageClass = { + DEEP_ARCHIVE: "DEEP_ARCHIVE", + GLACIER: "GLACIER", + GLACIER_IR: "GLACIER_IR", + INTELLIGENT_TIERING: "INTELLIGENT_TIERING", + ONEZONE_IA: "ONEZONE_IA", + STANDARD_IA: "STANDARD_IA", +}; +exports.ExpirationStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +exports.BucketLogsPermission = { + FULL_CONTROL: "FULL_CONTROL", + READ: "READ", + WRITE: "WRITE", +}; +exports.PartitionDateSource = { + DeliveryTime: "DeliveryTime", + EventTime: "EventTime", +}; var MetricsFilter; (function (MetricsFilter) { MetricsFilter.visit = (value, visitor) => { @@ -11521,6 +17192,55 @@ var MetricsFilter; return visitor._(value.$unknown[0], value.$unknown[1]); }; })(MetricsFilter = exports.MetricsFilter || (exports.MetricsFilter = {})); +exports.Event = { + s3_IntelligentTiering: "s3:IntelligentTiering", + s3_LifecycleExpiration_: "s3:LifecycleExpiration:*", + s3_LifecycleExpiration_Delete: "s3:LifecycleExpiration:Delete", + s3_LifecycleExpiration_DeleteMarkerCreated: "s3:LifecycleExpiration:DeleteMarkerCreated", + s3_LifecycleTransition: "s3:LifecycleTransition", + s3_ObjectAcl_Put: "s3:ObjectAcl:Put", + s3_ObjectCreated_: "s3:ObjectCreated:*", + s3_ObjectCreated_CompleteMultipartUpload: "s3:ObjectCreated:CompleteMultipartUpload", + s3_ObjectCreated_Copy: "s3:ObjectCreated:Copy", + s3_ObjectCreated_Post: "s3:ObjectCreated:Post", + s3_ObjectCreated_Put: "s3:ObjectCreated:Put", + s3_ObjectRemoved_: "s3:ObjectRemoved:*", + s3_ObjectRemoved_Delete: "s3:ObjectRemoved:Delete", + s3_ObjectRemoved_DeleteMarkerCreated: "s3:ObjectRemoved:DeleteMarkerCreated", + s3_ObjectRestore_: "s3:ObjectRestore:*", + s3_ObjectRestore_Completed: "s3:ObjectRestore:Completed", + s3_ObjectRestore_Delete: "s3:ObjectRestore:Delete", + s3_ObjectRestore_Post: "s3:ObjectRestore:Post", + s3_ObjectTagging_: "s3:ObjectTagging:*", + s3_ObjectTagging_Delete: "s3:ObjectTagging:Delete", + s3_ObjectTagging_Put: "s3:ObjectTagging:Put", + s3_ReducedRedundancyLostObject: "s3:ReducedRedundancyLostObject", + s3_Replication_: "s3:Replication:*", + s3_Replication_OperationFailedReplication: "s3:Replication:OperationFailedReplication", + s3_Replication_OperationMissedThreshold: "s3:Replication:OperationMissedThreshold", + s3_Replication_OperationNotTracked: "s3:Replication:OperationNotTracked", + s3_Replication_OperationReplicatedAfterThreshold: "s3:Replication:OperationReplicatedAfterThreshold", +}; +exports.FilterRuleName = { + prefix: "prefix", + suffix: "suffix", +}; +exports.DeleteMarkerReplicationStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +exports.MetricsStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +exports.ReplicationTimeStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +exports.ExistingObjectReplicationStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; var ReplicationRuleFilter; (function (ReplicationRuleFilter) { ReplicationRuleFilter.visit = (value, visitor) => { @@ -11533,10 +17253,44 @@ var ReplicationRuleFilter; return visitor._(value.$unknown[0], value.$unknown[1]); }; })(ReplicationRuleFilter = exports.ReplicationRuleFilter || (exports.ReplicationRuleFilter = {})); -var ChecksumMode; -(function (ChecksumMode) { - ChecksumMode["ENABLED"] = "ENABLED"; -})(ChecksumMode = exports.ChecksumMode || (exports.ChecksumMode = {})); +exports.ReplicaModificationsStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +exports.SseKmsEncryptedObjectsStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +exports.ReplicationRuleStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +exports.Payer = { + BucketOwner: "BucketOwner", + Requester: "Requester", +}; +exports.MFADeleteStatus = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +exports.BucketVersioningStatus = { + Enabled: "Enabled", + Suspended: "Suspended", +}; +exports.Protocol = { + http: "http", + https: "https", +}; +exports.ReplicationStatus = { + COMPLETE: "COMPLETE", + COMPLETED: "COMPLETED", + FAILED: "FAILED", + PENDING: "PENDING", + REPLICA: "REPLICA", +}; +exports.ChecksumMode = { + ENABLED: "ENABLED", +}; class InvalidObjectState extends S3ServiceException_1.S3ServiceException { constructor(opts) { super({ @@ -11565,14 +17319,20 @@ class NoSuchKey extends S3ServiceException_1.S3ServiceException { } } exports.NoSuchKey = NoSuchKey; -var ObjectAttributes; -(function (ObjectAttributes) { - ObjectAttributes["CHECKSUM"] = "Checksum"; - ObjectAttributes["ETAG"] = "ETag"; - ObjectAttributes["OBJECT_PARTS"] = "ObjectParts"; - ObjectAttributes["OBJECT_SIZE"] = "ObjectSize"; - ObjectAttributes["STORAGE_CLASS"] = "StorageClass"; -})(ObjectAttributes = exports.ObjectAttributes || (exports.ObjectAttributes = {})); +exports.ObjectAttributes = { + CHECKSUM: "Checksum", + ETAG: "ETag", + OBJECT_PARTS: "ObjectParts", + OBJECT_SIZE: "ObjectSize", + STORAGE_CLASS: "StorageClass", +}; +exports.ObjectLockEnabled = { + Enabled: "Enabled", +}; +exports.ObjectLockRetentionMode = { + COMPLIANCE: "COMPLIANCE", + GOVERNANCE: "GOVERNANCE", +}; class NotFound extends S3ServiceException_1.S3ServiceException { constructor(opts) { super({ @@ -11586,77 +17346,42 @@ class NotFound extends S3ServiceException_1.S3ServiceException { } } exports.NotFound = NotFound; -class NoSuchBucket extends S3ServiceException_1.S3ServiceException { - constructor(opts) { - super({ - name: "NoSuchBucket", - $fault: "client", - ...opts, - }); - this.name = "NoSuchBucket"; - this.$fault = "client"; - Object.setPrototypeOf(this, NoSuchBucket.prototype); - } -} -exports.NoSuchBucket = NoSuchBucket; -const AbortIncompleteMultipartUploadFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AbortIncompleteMultipartUploadFilterSensitiveLog = AbortIncompleteMultipartUploadFilterSensitiveLog; -const AbortMultipartUploadOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AbortMultipartUploadOutputFilterSensitiveLog = AbortMultipartUploadOutputFilterSensitiveLog; -const AbortMultipartUploadRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AbortMultipartUploadRequestFilterSensitiveLog = AbortMultipartUploadRequestFilterSensitiveLog; -const AccelerateConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AccelerateConfigurationFilterSensitiveLog = AccelerateConfigurationFilterSensitiveLog; -const GranteeFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GranteeFilterSensitiveLog = GranteeFilterSensitiveLog; -const GrantFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GrantFilterSensitiveLog = GrantFilterSensitiveLog; -const OwnerFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.OwnerFilterSensitiveLog = OwnerFilterSensitiveLog; -const AccessControlPolicyFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AccessControlPolicyFilterSensitiveLog = AccessControlPolicyFilterSensitiveLog; -const AccessControlTranslationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AccessControlTranslationFilterSensitiveLog = AccessControlTranslationFilterSensitiveLog; +exports.ArchiveStatus = { + ARCHIVE_ACCESS: "ARCHIVE_ACCESS", + DEEP_ARCHIVE_ACCESS: "DEEP_ARCHIVE_ACCESS", +}; +exports.EncodingType = { + url: "url", +}; +exports.ObjectStorageClass = { + DEEP_ARCHIVE: "DEEP_ARCHIVE", + EXPRESS_ONEZONE: "EXPRESS_ONEZONE", + GLACIER: "GLACIER", + GLACIER_IR: "GLACIER_IR", + INTELLIGENT_TIERING: "INTELLIGENT_TIERING", + ONEZONE_IA: "ONEZONE_IA", + OUTPOSTS: "OUTPOSTS", + REDUCED_REDUNDANCY: "REDUCED_REDUNDANCY", + SNOW: "SNOW", + STANDARD: "STANDARD", + STANDARD_IA: "STANDARD_IA", +}; +exports.OptionalObjectAttributes = { + RESTORE_STATUS: "RestoreStatus", +}; +exports.ObjectVersionStorageClass = { + STANDARD: "STANDARD", +}; const CompleteMultipartUploadOutputFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), }); exports.CompleteMultipartUploadOutputFilterSensitiveLog = CompleteMultipartUploadOutputFilterSensitiveLog; -const CompletedPartFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CompletedPartFilterSensitiveLog = CompletedPartFilterSensitiveLog; -const CompletedMultipartUploadFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CompletedMultipartUploadFilterSensitiveLog = CompletedMultipartUploadFilterSensitiveLog; const CompleteMultipartUploadRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSECustomerKey && { SSECustomerKey: smithy_client_1.SENSITIVE_STRING }), }); exports.CompleteMultipartUploadRequestFilterSensitiveLog = CompleteMultipartUploadRequestFilterSensitiveLog; -const CopyObjectResultFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CopyObjectResultFilterSensitiveLog = CopyObjectResultFilterSensitiveLog; const CopyObjectOutputFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), @@ -11671,18 +17396,6 @@ const CopyObjectRequestFilterSensitiveLog = (obj) => ({ ...(obj.CopySourceSSECustomerKey && { CopySourceSSECustomerKey: smithy_client_1.SENSITIVE_STRING }), }); exports.CopyObjectRequestFilterSensitiveLog = CopyObjectRequestFilterSensitiveLog; -const CreateBucketOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CreateBucketOutputFilterSensitiveLog = CreateBucketOutputFilterSensitiveLog; -const CreateBucketConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CreateBucketConfigurationFilterSensitiveLog = CreateBucketConfigurationFilterSensitiveLog; -const CreateBucketRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CreateBucketRequestFilterSensitiveLog = CreateBucketRequestFilterSensitiveLog; const CreateMultipartUploadOutputFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), @@ -11696,181 +17409,17 @@ const CreateMultipartUploadRequestFilterSensitiveLog = (obj) => ({ ...(obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: smithy_client_1.SENSITIVE_STRING }), }); exports.CreateMultipartUploadRequestFilterSensitiveLog = CreateMultipartUploadRequestFilterSensitiveLog; -const DeleteBucketRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketRequestFilterSensitiveLog = DeleteBucketRequestFilterSensitiveLog; -const DeleteBucketAnalyticsConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketAnalyticsConfigurationRequestFilterSensitiveLog = DeleteBucketAnalyticsConfigurationRequestFilterSensitiveLog; -const DeleteBucketCorsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketCorsRequestFilterSensitiveLog = DeleteBucketCorsRequestFilterSensitiveLog; -const DeleteBucketEncryptionRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketEncryptionRequestFilterSensitiveLog = DeleteBucketEncryptionRequestFilterSensitiveLog; -const DeleteBucketIntelligentTieringConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketIntelligentTieringConfigurationRequestFilterSensitiveLog = DeleteBucketIntelligentTieringConfigurationRequestFilterSensitiveLog; -const DeleteBucketInventoryConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketInventoryConfigurationRequestFilterSensitiveLog = DeleteBucketInventoryConfigurationRequestFilterSensitiveLog; -const DeleteBucketLifecycleRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketLifecycleRequestFilterSensitiveLog = DeleteBucketLifecycleRequestFilterSensitiveLog; -const DeleteBucketMetricsConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketMetricsConfigurationRequestFilterSensitiveLog = DeleteBucketMetricsConfigurationRequestFilterSensitiveLog; -const DeleteBucketOwnershipControlsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketOwnershipControlsRequestFilterSensitiveLog = DeleteBucketOwnershipControlsRequestFilterSensitiveLog; -const DeleteBucketPolicyRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketPolicyRequestFilterSensitiveLog = DeleteBucketPolicyRequestFilterSensitiveLog; -const DeleteBucketReplicationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketReplicationRequestFilterSensitiveLog = DeleteBucketReplicationRequestFilterSensitiveLog; -const DeleteBucketTaggingRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketTaggingRequestFilterSensitiveLog = DeleteBucketTaggingRequestFilterSensitiveLog; -const DeleteBucketWebsiteRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteBucketWebsiteRequestFilterSensitiveLog = DeleteBucketWebsiteRequestFilterSensitiveLog; -const DeleteObjectOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteObjectOutputFilterSensitiveLog = DeleteObjectOutputFilterSensitiveLog; -const DeleteObjectRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteObjectRequestFilterSensitiveLog = DeleteObjectRequestFilterSensitiveLog; -const DeletedObjectFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeletedObjectFilterSensitiveLog = DeletedObjectFilterSensitiveLog; -const _ErrorFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports._ErrorFilterSensitiveLog = _ErrorFilterSensitiveLog; -const DeleteObjectsOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteObjectsOutputFilterSensitiveLog = DeleteObjectsOutputFilterSensitiveLog; -const ObjectIdentifierFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ObjectIdentifierFilterSensitiveLog = ObjectIdentifierFilterSensitiveLog; -const DeleteFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteFilterSensitiveLog = DeleteFilterSensitiveLog; -const DeleteObjectsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteObjectsRequestFilterSensitiveLog = DeleteObjectsRequestFilterSensitiveLog; -const DeleteObjectTaggingOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteObjectTaggingOutputFilterSensitiveLog = DeleteObjectTaggingOutputFilterSensitiveLog; -const DeleteObjectTaggingRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteObjectTaggingRequestFilterSensitiveLog = DeleteObjectTaggingRequestFilterSensitiveLog; -const DeletePublicAccessBlockRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeletePublicAccessBlockRequestFilterSensitiveLog = DeletePublicAccessBlockRequestFilterSensitiveLog; -const GetBucketAccelerateConfigurationOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketAccelerateConfigurationOutputFilterSensitiveLog = GetBucketAccelerateConfigurationOutputFilterSensitiveLog; -const GetBucketAccelerateConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketAccelerateConfigurationRequestFilterSensitiveLog = GetBucketAccelerateConfigurationRequestFilterSensitiveLog; -const GetBucketAclOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketAclOutputFilterSensitiveLog = GetBucketAclOutputFilterSensitiveLog; -const GetBucketAclRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketAclRequestFilterSensitiveLog = GetBucketAclRequestFilterSensitiveLog; -const TagFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.TagFilterSensitiveLog = TagFilterSensitiveLog; -const AnalyticsAndOperatorFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AnalyticsAndOperatorFilterSensitiveLog = AnalyticsAndOperatorFilterSensitiveLog; -const AnalyticsFilterFilterSensitiveLog = (obj) => { - if (obj.Prefix !== undefined) - return { Prefix: obj.Prefix }; - if (obj.Tag !== undefined) - return { Tag: (0, exports.TagFilterSensitiveLog)(obj.Tag) }; - if (obj.And !== undefined) - return { And: (0, exports.AnalyticsAndOperatorFilterSensitiveLog)(obj.And) }; - if (obj.$unknown !== undefined) - return { [obj.$unknown[0]]: "UNKNOWN" }; -}; -exports.AnalyticsFilterFilterSensitiveLog = AnalyticsFilterFilterSensitiveLog; -const AnalyticsS3BucketDestinationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AnalyticsS3BucketDestinationFilterSensitiveLog = AnalyticsS3BucketDestinationFilterSensitiveLog; -const AnalyticsExportDestinationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AnalyticsExportDestinationFilterSensitiveLog = AnalyticsExportDestinationFilterSensitiveLog; -const StorageClassAnalysisDataExportFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.StorageClassAnalysisDataExportFilterSensitiveLog = StorageClassAnalysisDataExportFilterSensitiveLog; -const StorageClassAnalysisFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.StorageClassAnalysisFilterSensitiveLog = StorageClassAnalysisFilterSensitiveLog; -const AnalyticsConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.Filter && { Filter: (0, exports.AnalyticsFilterFilterSensitiveLog)(obj.Filter) }), -}); -exports.AnalyticsConfigurationFilterSensitiveLog = AnalyticsConfigurationFilterSensitiveLog; -const GetBucketAnalyticsConfigurationOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.AnalyticsConfiguration && { - AnalyticsConfiguration: (0, exports.AnalyticsConfigurationFilterSensitiveLog)(obj.AnalyticsConfiguration), - }), -}); -exports.GetBucketAnalyticsConfigurationOutputFilterSensitiveLog = GetBucketAnalyticsConfigurationOutputFilterSensitiveLog; -const GetBucketAnalyticsConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketAnalyticsConfigurationRequestFilterSensitiveLog = GetBucketAnalyticsConfigurationRequestFilterSensitiveLog; -const CORSRuleFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CORSRuleFilterSensitiveLog = CORSRuleFilterSensitiveLog; -const GetBucketCorsOutputFilterSensitiveLog = (obj) => ({ +const SessionCredentialsFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.SecretAccessKey && { SecretAccessKey: smithy_client_1.SENSITIVE_STRING }), + ...(obj.SessionToken && { SessionToken: smithy_client_1.SENSITIVE_STRING }), }); -exports.GetBucketCorsOutputFilterSensitiveLog = GetBucketCorsOutputFilterSensitiveLog; -const GetBucketCorsRequestFilterSensitiveLog = (obj) => ({ +exports.SessionCredentialsFilterSensitiveLog = SessionCredentialsFilterSensitiveLog; +const CreateSessionOutputFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.Credentials && { Credentials: (0, exports.SessionCredentialsFilterSensitiveLog)(obj.Credentials) }), }); -exports.GetBucketCorsRequestFilterSensitiveLog = GetBucketCorsRequestFilterSensitiveLog; +exports.CreateSessionOutputFilterSensitiveLog = CreateSessionOutputFilterSensitiveLog; const ServerSideEncryptionByDefaultFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.KMSMasterKeyID && { KMSMasterKeyID: smithy_client_1.SENSITIVE_STRING }), @@ -11895,43 +17444,11 @@ const GetBucketEncryptionOutputFilterSensitiveLog = (obj) => ({ }), }); exports.GetBucketEncryptionOutputFilterSensitiveLog = GetBucketEncryptionOutputFilterSensitiveLog; -const GetBucketEncryptionRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketEncryptionRequestFilterSensitiveLog = GetBucketEncryptionRequestFilterSensitiveLog; -const IntelligentTieringAndOperatorFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.IntelligentTieringAndOperatorFilterSensitiveLog = IntelligentTieringAndOperatorFilterSensitiveLog; -const IntelligentTieringFilterFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.IntelligentTieringFilterFilterSensitiveLog = IntelligentTieringFilterFilterSensitiveLog; -const TieringFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.TieringFilterSensitiveLog = TieringFilterSensitiveLog; -const IntelligentTieringConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.IntelligentTieringConfigurationFilterSensitiveLog = IntelligentTieringConfigurationFilterSensitiveLog; -const GetBucketIntelligentTieringConfigurationOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketIntelligentTieringConfigurationOutputFilterSensitiveLog = GetBucketIntelligentTieringConfigurationOutputFilterSensitiveLog; -const GetBucketIntelligentTieringConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketIntelligentTieringConfigurationRequestFilterSensitiveLog = GetBucketIntelligentTieringConfigurationRequestFilterSensitiveLog; const SSEKMSFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.KeyId && { KeyId: smithy_client_1.SENSITIVE_STRING }), }); exports.SSEKMSFilterSensitiveLog = SSEKMSFilterSensitiveLog; -const SSES3FilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.SSES3FilterSensitiveLog = SSES3FilterSensitiveLog; const InventoryEncryptionFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSEKMS && { SSEKMS: (0, exports.SSEKMSFilterSensitiveLog)(obj.SSEKMS) }), @@ -11949,14 +17466,6 @@ const InventoryDestinationFilterSensitiveLog = (obj) => ({ }), }); exports.InventoryDestinationFilterSensitiveLog = InventoryDestinationFilterSensitiveLog; -const InventoryFilterFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.InventoryFilterFilterSensitiveLog = InventoryFilterFilterSensitiveLog; -const InventoryScheduleFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.InventoryScheduleFilterSensitiveLog = InventoryScheduleFilterSensitiveLog; const InventoryConfigurationFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.Destination && { Destination: (0, exports.InventoryDestinationFilterSensitiveLog)(obj.Destination) }), @@ -11969,320 +17478,6 @@ const GetBucketInventoryConfigurationOutputFilterSensitiveLog = (obj) => ({ }), }); exports.GetBucketInventoryConfigurationOutputFilterSensitiveLog = GetBucketInventoryConfigurationOutputFilterSensitiveLog; -const GetBucketInventoryConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketInventoryConfigurationRequestFilterSensitiveLog = GetBucketInventoryConfigurationRequestFilterSensitiveLog; -const LifecycleExpirationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.LifecycleExpirationFilterSensitiveLog = LifecycleExpirationFilterSensitiveLog; -const LifecycleRuleAndOperatorFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.LifecycleRuleAndOperatorFilterSensitiveLog = LifecycleRuleAndOperatorFilterSensitiveLog; -const LifecycleRuleFilterFilterSensitiveLog = (obj) => { - if (obj.Prefix !== undefined) - return { Prefix: obj.Prefix }; - if (obj.Tag !== undefined) - return { Tag: (0, exports.TagFilterSensitiveLog)(obj.Tag) }; - if (obj.ObjectSizeGreaterThan !== undefined) - return { ObjectSizeGreaterThan: obj.ObjectSizeGreaterThan }; - if (obj.ObjectSizeLessThan !== undefined) - return { ObjectSizeLessThan: obj.ObjectSizeLessThan }; - if (obj.And !== undefined) - return { And: (0, exports.LifecycleRuleAndOperatorFilterSensitiveLog)(obj.And) }; - if (obj.$unknown !== undefined) - return { [obj.$unknown[0]]: "UNKNOWN" }; -}; -exports.LifecycleRuleFilterFilterSensitiveLog = LifecycleRuleFilterFilterSensitiveLog; -const NoncurrentVersionExpirationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.NoncurrentVersionExpirationFilterSensitiveLog = NoncurrentVersionExpirationFilterSensitiveLog; -const NoncurrentVersionTransitionFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.NoncurrentVersionTransitionFilterSensitiveLog = NoncurrentVersionTransitionFilterSensitiveLog; -const TransitionFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.TransitionFilterSensitiveLog = TransitionFilterSensitiveLog; -const LifecycleRuleFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.Filter && { Filter: (0, exports.LifecycleRuleFilterFilterSensitiveLog)(obj.Filter) }), -}); -exports.LifecycleRuleFilterSensitiveLog = LifecycleRuleFilterSensitiveLog; -const GetBucketLifecycleConfigurationOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.Rules && { Rules: obj.Rules.map((item) => (0, exports.LifecycleRuleFilterSensitiveLog)(item)) }), -}); -exports.GetBucketLifecycleConfigurationOutputFilterSensitiveLog = GetBucketLifecycleConfigurationOutputFilterSensitiveLog; -const GetBucketLifecycleConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketLifecycleConfigurationRequestFilterSensitiveLog = GetBucketLifecycleConfigurationRequestFilterSensitiveLog; -const GetBucketLocationOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketLocationOutputFilterSensitiveLog = GetBucketLocationOutputFilterSensitiveLog; -const GetBucketLocationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketLocationRequestFilterSensitiveLog = GetBucketLocationRequestFilterSensitiveLog; -const TargetGrantFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.TargetGrantFilterSensitiveLog = TargetGrantFilterSensitiveLog; -const LoggingEnabledFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.LoggingEnabledFilterSensitiveLog = LoggingEnabledFilterSensitiveLog; -const GetBucketLoggingOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketLoggingOutputFilterSensitiveLog = GetBucketLoggingOutputFilterSensitiveLog; -const GetBucketLoggingRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketLoggingRequestFilterSensitiveLog = GetBucketLoggingRequestFilterSensitiveLog; -const MetricsAndOperatorFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.MetricsAndOperatorFilterSensitiveLog = MetricsAndOperatorFilterSensitiveLog; -const MetricsFilterFilterSensitiveLog = (obj) => { - if (obj.Prefix !== undefined) - return { Prefix: obj.Prefix }; - if (obj.Tag !== undefined) - return { Tag: (0, exports.TagFilterSensitiveLog)(obj.Tag) }; - if (obj.AccessPointArn !== undefined) - return { AccessPointArn: obj.AccessPointArn }; - if (obj.And !== undefined) - return { And: (0, exports.MetricsAndOperatorFilterSensitiveLog)(obj.And) }; - if (obj.$unknown !== undefined) - return { [obj.$unknown[0]]: "UNKNOWN" }; -}; -exports.MetricsFilterFilterSensitiveLog = MetricsFilterFilterSensitiveLog; -const MetricsConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.Filter && { Filter: (0, exports.MetricsFilterFilterSensitiveLog)(obj.Filter) }), -}); -exports.MetricsConfigurationFilterSensitiveLog = MetricsConfigurationFilterSensitiveLog; -const GetBucketMetricsConfigurationOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.MetricsConfiguration && { - MetricsConfiguration: (0, exports.MetricsConfigurationFilterSensitiveLog)(obj.MetricsConfiguration), - }), -}); -exports.GetBucketMetricsConfigurationOutputFilterSensitiveLog = GetBucketMetricsConfigurationOutputFilterSensitiveLog; -const GetBucketMetricsConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketMetricsConfigurationRequestFilterSensitiveLog = GetBucketMetricsConfigurationRequestFilterSensitiveLog; -const GetBucketNotificationConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketNotificationConfigurationRequestFilterSensitiveLog = GetBucketNotificationConfigurationRequestFilterSensitiveLog; -const EventBridgeConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.EventBridgeConfigurationFilterSensitiveLog = EventBridgeConfigurationFilterSensitiveLog; -const FilterRuleFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.FilterRuleFilterSensitiveLog = FilterRuleFilterSensitiveLog; -const S3KeyFilterFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.S3KeyFilterFilterSensitiveLog = S3KeyFilterFilterSensitiveLog; -const NotificationConfigurationFilterFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.NotificationConfigurationFilterFilterSensitiveLog = NotificationConfigurationFilterFilterSensitiveLog; -const LambdaFunctionConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.LambdaFunctionConfigurationFilterSensitiveLog = LambdaFunctionConfigurationFilterSensitiveLog; -const QueueConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.QueueConfigurationFilterSensitiveLog = QueueConfigurationFilterSensitiveLog; -const TopicConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.TopicConfigurationFilterSensitiveLog = TopicConfigurationFilterSensitiveLog; -const NotificationConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.NotificationConfigurationFilterSensitiveLog = NotificationConfigurationFilterSensitiveLog; -const OwnershipControlsRuleFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.OwnershipControlsRuleFilterSensitiveLog = OwnershipControlsRuleFilterSensitiveLog; -const OwnershipControlsFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.OwnershipControlsFilterSensitiveLog = OwnershipControlsFilterSensitiveLog; -const GetBucketOwnershipControlsOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketOwnershipControlsOutputFilterSensitiveLog = GetBucketOwnershipControlsOutputFilterSensitiveLog; -const GetBucketOwnershipControlsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketOwnershipControlsRequestFilterSensitiveLog = GetBucketOwnershipControlsRequestFilterSensitiveLog; -const GetBucketPolicyOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketPolicyOutputFilterSensitiveLog = GetBucketPolicyOutputFilterSensitiveLog; -const GetBucketPolicyRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketPolicyRequestFilterSensitiveLog = GetBucketPolicyRequestFilterSensitiveLog; -const PolicyStatusFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PolicyStatusFilterSensitiveLog = PolicyStatusFilterSensitiveLog; -const GetBucketPolicyStatusOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketPolicyStatusOutputFilterSensitiveLog = GetBucketPolicyStatusOutputFilterSensitiveLog; -const GetBucketPolicyStatusRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketPolicyStatusRequestFilterSensitiveLog = GetBucketPolicyStatusRequestFilterSensitiveLog; -const DeleteMarkerReplicationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteMarkerReplicationFilterSensitiveLog = DeleteMarkerReplicationFilterSensitiveLog; -const EncryptionConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.EncryptionConfigurationFilterSensitiveLog = EncryptionConfigurationFilterSensitiveLog; -const ReplicationTimeValueFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ReplicationTimeValueFilterSensitiveLog = ReplicationTimeValueFilterSensitiveLog; -const MetricsFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.MetricsFilterSensitiveLog = MetricsFilterSensitiveLog; -const ReplicationTimeFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ReplicationTimeFilterSensitiveLog = ReplicationTimeFilterSensitiveLog; -const DestinationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DestinationFilterSensitiveLog = DestinationFilterSensitiveLog; -const ExistingObjectReplicationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ExistingObjectReplicationFilterSensitiveLog = ExistingObjectReplicationFilterSensitiveLog; -const ReplicationRuleAndOperatorFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ReplicationRuleAndOperatorFilterSensitiveLog = ReplicationRuleAndOperatorFilterSensitiveLog; -const ReplicationRuleFilterFilterSensitiveLog = (obj) => { - if (obj.Prefix !== undefined) - return { Prefix: obj.Prefix }; - if (obj.Tag !== undefined) - return { Tag: (0, exports.TagFilterSensitiveLog)(obj.Tag) }; - if (obj.And !== undefined) - return { And: (0, exports.ReplicationRuleAndOperatorFilterSensitiveLog)(obj.And) }; - if (obj.$unknown !== undefined) - return { [obj.$unknown[0]]: "UNKNOWN" }; -}; -exports.ReplicationRuleFilterFilterSensitiveLog = ReplicationRuleFilterFilterSensitiveLog; -const ReplicaModificationsFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ReplicaModificationsFilterSensitiveLog = ReplicaModificationsFilterSensitiveLog; -const SseKmsEncryptedObjectsFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.SseKmsEncryptedObjectsFilterSensitiveLog = SseKmsEncryptedObjectsFilterSensitiveLog; -const SourceSelectionCriteriaFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.SourceSelectionCriteriaFilterSensitiveLog = SourceSelectionCriteriaFilterSensitiveLog; -const ReplicationRuleFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.Filter && { Filter: (0, exports.ReplicationRuleFilterFilterSensitiveLog)(obj.Filter) }), -}); -exports.ReplicationRuleFilterSensitiveLog = ReplicationRuleFilterSensitiveLog; -const ReplicationConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.Rules && { Rules: obj.Rules.map((item) => (0, exports.ReplicationRuleFilterSensitiveLog)(item)) }), -}); -exports.ReplicationConfigurationFilterSensitiveLog = ReplicationConfigurationFilterSensitiveLog; -const GetBucketReplicationOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.ReplicationConfiguration && { - ReplicationConfiguration: (0, exports.ReplicationConfigurationFilterSensitiveLog)(obj.ReplicationConfiguration), - }), -}); -exports.GetBucketReplicationOutputFilterSensitiveLog = GetBucketReplicationOutputFilterSensitiveLog; -const GetBucketReplicationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketReplicationRequestFilterSensitiveLog = GetBucketReplicationRequestFilterSensitiveLog; -const GetBucketRequestPaymentOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketRequestPaymentOutputFilterSensitiveLog = GetBucketRequestPaymentOutputFilterSensitiveLog; -const GetBucketRequestPaymentRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketRequestPaymentRequestFilterSensitiveLog = GetBucketRequestPaymentRequestFilterSensitiveLog; -const GetBucketTaggingOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketTaggingOutputFilterSensitiveLog = GetBucketTaggingOutputFilterSensitiveLog; -const GetBucketTaggingRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketTaggingRequestFilterSensitiveLog = GetBucketTaggingRequestFilterSensitiveLog; -const GetBucketVersioningOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketVersioningOutputFilterSensitiveLog = GetBucketVersioningOutputFilterSensitiveLog; -const GetBucketVersioningRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketVersioningRequestFilterSensitiveLog = GetBucketVersioningRequestFilterSensitiveLog; -const ErrorDocumentFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ErrorDocumentFilterSensitiveLog = ErrorDocumentFilterSensitiveLog; -const IndexDocumentFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.IndexDocumentFilterSensitiveLog = IndexDocumentFilterSensitiveLog; -const RedirectAllRequestsToFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.RedirectAllRequestsToFilterSensitiveLog = RedirectAllRequestsToFilterSensitiveLog; -const ConditionFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ConditionFilterSensitiveLog = ConditionFilterSensitiveLog; -const RedirectFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.RedirectFilterSensitiveLog = RedirectFilterSensitiveLog; -const RoutingRuleFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.RoutingRuleFilterSensitiveLog = RoutingRuleFilterSensitiveLog; -const GetBucketWebsiteOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketWebsiteOutputFilterSensitiveLog = GetBucketWebsiteOutputFilterSensitiveLog; -const GetBucketWebsiteRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetBucketWebsiteRequestFilterSensitiveLog = GetBucketWebsiteRequestFilterSensitiveLog; const GetObjectOutputFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), @@ -12293,111 +17488,15 @@ const GetObjectRequestFilterSensitiveLog = (obj) => ({ ...(obj.SSECustomerKey && { SSECustomerKey: smithy_client_1.SENSITIVE_STRING }), }); exports.GetObjectRequestFilterSensitiveLog = GetObjectRequestFilterSensitiveLog; -const GetObjectAclOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectAclOutputFilterSensitiveLog = GetObjectAclOutputFilterSensitiveLog; -const GetObjectAclRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectAclRequestFilterSensitiveLog = GetObjectAclRequestFilterSensitiveLog; -const ChecksumFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ChecksumFilterSensitiveLog = ChecksumFilterSensitiveLog; -const ObjectPartFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ObjectPartFilterSensitiveLog = ObjectPartFilterSensitiveLog; -const GetObjectAttributesPartsFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectAttributesPartsFilterSensitiveLog = GetObjectAttributesPartsFilterSensitiveLog; -const GetObjectAttributesOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectAttributesOutputFilterSensitiveLog = GetObjectAttributesOutputFilterSensitiveLog; const GetObjectAttributesRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSECustomerKey && { SSECustomerKey: smithy_client_1.SENSITIVE_STRING }), }); exports.GetObjectAttributesRequestFilterSensitiveLog = GetObjectAttributesRequestFilterSensitiveLog; -const ObjectLockLegalHoldFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ObjectLockLegalHoldFilterSensitiveLog = ObjectLockLegalHoldFilterSensitiveLog; -const GetObjectLegalHoldOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectLegalHoldOutputFilterSensitiveLog = GetObjectLegalHoldOutputFilterSensitiveLog; -const GetObjectLegalHoldRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectLegalHoldRequestFilterSensitiveLog = GetObjectLegalHoldRequestFilterSensitiveLog; -const DefaultRetentionFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DefaultRetentionFilterSensitiveLog = DefaultRetentionFilterSensitiveLog; -const ObjectLockRuleFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ObjectLockRuleFilterSensitiveLog = ObjectLockRuleFilterSensitiveLog; -const ObjectLockConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ObjectLockConfigurationFilterSensitiveLog = ObjectLockConfigurationFilterSensitiveLog; -const GetObjectLockConfigurationOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectLockConfigurationOutputFilterSensitiveLog = GetObjectLockConfigurationOutputFilterSensitiveLog; -const GetObjectLockConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectLockConfigurationRequestFilterSensitiveLog = GetObjectLockConfigurationRequestFilterSensitiveLog; -const ObjectLockRetentionFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ObjectLockRetentionFilterSensitiveLog = ObjectLockRetentionFilterSensitiveLog; -const GetObjectRetentionOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectRetentionOutputFilterSensitiveLog = GetObjectRetentionOutputFilterSensitiveLog; -const GetObjectRetentionRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectRetentionRequestFilterSensitiveLog = GetObjectRetentionRequestFilterSensitiveLog; -const GetObjectTaggingOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectTaggingOutputFilterSensitiveLog = GetObjectTaggingOutputFilterSensitiveLog; -const GetObjectTaggingRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectTaggingRequestFilterSensitiveLog = GetObjectTaggingRequestFilterSensitiveLog; const GetObjectTorrentOutputFilterSensitiveLog = (obj) => ({ ...obj, }); exports.GetObjectTorrentOutputFilterSensitiveLog = GetObjectTorrentOutputFilterSensitiveLog; -const GetObjectTorrentRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetObjectTorrentRequestFilterSensitiveLog = GetObjectTorrentRequestFilterSensitiveLog; -const PublicAccessBlockConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PublicAccessBlockConfigurationFilterSensitiveLog = PublicAccessBlockConfigurationFilterSensitiveLog; -const GetPublicAccessBlockOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetPublicAccessBlockOutputFilterSensitiveLog = GetPublicAccessBlockOutputFilterSensitiveLog; -const GetPublicAccessBlockRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetPublicAccessBlockRequestFilterSensitiveLog = GetPublicAccessBlockRequestFilterSensitiveLog; -const HeadBucketRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.HeadBucketRequestFilterSensitiveLog = HeadBucketRequestFilterSensitiveLog; const HeadObjectOutputFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), @@ -12408,25 +17507,6 @@ const HeadObjectRequestFilterSensitiveLog = (obj) => ({ ...(obj.SSECustomerKey && { SSECustomerKey: smithy_client_1.SENSITIVE_STRING }), }); exports.HeadObjectRequestFilterSensitiveLog = HeadObjectRequestFilterSensitiveLog; -const ListBucketAnalyticsConfigurationsOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.AnalyticsConfigurationList && { - AnalyticsConfigurationList: obj.AnalyticsConfigurationList.map((item) => (0, exports.AnalyticsConfigurationFilterSensitiveLog)(item)), - }), -}); -exports.ListBucketAnalyticsConfigurationsOutputFilterSensitiveLog = ListBucketAnalyticsConfigurationsOutputFilterSensitiveLog; -const ListBucketAnalyticsConfigurationsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListBucketAnalyticsConfigurationsRequestFilterSensitiveLog = ListBucketAnalyticsConfigurationsRequestFilterSensitiveLog; -const ListBucketIntelligentTieringConfigurationsOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListBucketIntelligentTieringConfigurationsOutputFilterSensitiveLog = ListBucketIntelligentTieringConfigurationsOutputFilterSensitiveLog; -const ListBucketIntelligentTieringConfigurationsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListBucketIntelligentTieringConfigurationsRequestFilterSensitiveLog = ListBucketIntelligentTieringConfigurationsRequestFilterSensitiveLog; const ListBucketInventoryConfigurationsOutputFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.InventoryConfigurationList && { @@ -12434,121 +17514,11 @@ const ListBucketInventoryConfigurationsOutputFilterSensitiveLog = (obj) => ({ }), }); exports.ListBucketInventoryConfigurationsOutputFilterSensitiveLog = ListBucketInventoryConfigurationsOutputFilterSensitiveLog; -const ListBucketInventoryConfigurationsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListBucketInventoryConfigurationsRequestFilterSensitiveLog = ListBucketInventoryConfigurationsRequestFilterSensitiveLog; -const ListBucketMetricsConfigurationsOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.MetricsConfigurationList && { - MetricsConfigurationList: obj.MetricsConfigurationList.map((item) => (0, exports.MetricsConfigurationFilterSensitiveLog)(item)), - }), -}); -exports.ListBucketMetricsConfigurationsOutputFilterSensitiveLog = ListBucketMetricsConfigurationsOutputFilterSensitiveLog; -const ListBucketMetricsConfigurationsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListBucketMetricsConfigurationsRequestFilterSensitiveLog = ListBucketMetricsConfigurationsRequestFilterSensitiveLog; -const BucketFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.BucketFilterSensitiveLog = BucketFilterSensitiveLog; -const ListBucketsOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListBucketsOutputFilterSensitiveLog = ListBucketsOutputFilterSensitiveLog; -const CommonPrefixFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CommonPrefixFilterSensitiveLog = CommonPrefixFilterSensitiveLog; -const InitiatorFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.InitiatorFilterSensitiveLog = InitiatorFilterSensitiveLog; -const MultipartUploadFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.MultipartUploadFilterSensitiveLog = MultipartUploadFilterSensitiveLog; -const ListMultipartUploadsOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListMultipartUploadsOutputFilterSensitiveLog = ListMultipartUploadsOutputFilterSensitiveLog; -const ListMultipartUploadsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListMultipartUploadsRequestFilterSensitiveLog = ListMultipartUploadsRequestFilterSensitiveLog; -const _ObjectFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports._ObjectFilterSensitiveLog = _ObjectFilterSensitiveLog; -const ListObjectsOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListObjectsOutputFilterSensitiveLog = ListObjectsOutputFilterSensitiveLog; -const ListObjectsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListObjectsRequestFilterSensitiveLog = ListObjectsRequestFilterSensitiveLog; -const ListObjectsV2OutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListObjectsV2OutputFilterSensitiveLog = ListObjectsV2OutputFilterSensitiveLog; -const ListObjectsV2RequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListObjectsV2RequestFilterSensitiveLog = ListObjectsV2RequestFilterSensitiveLog; -const DeleteMarkerEntryFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DeleteMarkerEntryFilterSensitiveLog = DeleteMarkerEntryFilterSensitiveLog; -const ObjectVersionFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ObjectVersionFilterSensitiveLog = ObjectVersionFilterSensitiveLog; -const ListObjectVersionsOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListObjectVersionsOutputFilterSensitiveLog = ListObjectVersionsOutputFilterSensitiveLog; -const ListObjectVersionsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListObjectVersionsRequestFilterSensitiveLog = ListObjectVersionsRequestFilterSensitiveLog; -const PartFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PartFilterSensitiveLog = PartFilterSensitiveLog; -const ListPartsOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListPartsOutputFilterSensitiveLog = ListPartsOutputFilterSensitiveLog; const ListPartsRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSECustomerKey && { SSECustomerKey: smithy_client_1.SENSITIVE_STRING }), }); exports.ListPartsRequestFilterSensitiveLog = ListPartsRequestFilterSensitiveLog; -const PutBucketAccelerateConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketAccelerateConfigurationRequestFilterSensitiveLog = PutBucketAccelerateConfigurationRequestFilterSensitiveLog; -const PutBucketAclRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketAclRequestFilterSensitiveLog = PutBucketAclRequestFilterSensitiveLog; -const PutBucketAnalyticsConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.AnalyticsConfiguration && { - AnalyticsConfiguration: (0, exports.AnalyticsConfigurationFilterSensitiveLog)(obj.AnalyticsConfiguration), - }), -}); -exports.PutBucketAnalyticsConfigurationRequestFilterSensitiveLog = PutBucketAnalyticsConfigurationRequestFilterSensitiveLog; -const CORSConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CORSConfigurationFilterSensitiveLog = CORSConfigurationFilterSensitiveLog; -const PutBucketCorsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketCorsRequestFilterSensitiveLog = PutBucketCorsRequestFilterSensitiveLog; const PutBucketEncryptionRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.ServerSideEncryptionConfiguration && { @@ -12556,10 +17526,6 @@ const PutBucketEncryptionRequestFilterSensitiveLog = (obj) => ({ }), }); exports.PutBucketEncryptionRequestFilterSensitiveLog = PutBucketEncryptionRequestFilterSensitiveLog; -const PutBucketIntelligentTieringConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketIntelligentTieringConfigurationRequestFilterSensitiveLog = PutBucketIntelligentTieringConfigurationRequestFilterSensitiveLog; const PutBucketInventoryConfigurationRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.InventoryConfiguration && { @@ -12567,134 +17533,32 @@ const PutBucketInventoryConfigurationRequestFilterSensitiveLog = (obj) => ({ }), }); exports.PutBucketInventoryConfigurationRequestFilterSensitiveLog = PutBucketInventoryConfigurationRequestFilterSensitiveLog; -const BucketLifecycleConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.Rules && { Rules: obj.Rules.map((item) => (0, exports.LifecycleRuleFilterSensitiveLog)(item)) }), -}); -exports.BucketLifecycleConfigurationFilterSensitiveLog = BucketLifecycleConfigurationFilterSensitiveLog; -const PutBucketLifecycleConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.LifecycleConfiguration && { - LifecycleConfiguration: (0, exports.BucketLifecycleConfigurationFilterSensitiveLog)(obj.LifecycleConfiguration), - }), -}); -exports.PutBucketLifecycleConfigurationRequestFilterSensitiveLog = PutBucketLifecycleConfigurationRequestFilterSensitiveLog; -const BucketLoggingStatusFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.BucketLoggingStatusFilterSensitiveLog = BucketLoggingStatusFilterSensitiveLog; -const PutBucketLoggingRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketLoggingRequestFilterSensitiveLog = PutBucketLoggingRequestFilterSensitiveLog; -const PutBucketMetricsConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.MetricsConfiguration && { - MetricsConfiguration: (0, exports.MetricsConfigurationFilterSensitiveLog)(obj.MetricsConfiguration), - }), -}); -exports.PutBucketMetricsConfigurationRequestFilterSensitiveLog = PutBucketMetricsConfigurationRequestFilterSensitiveLog; -const PutBucketNotificationConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketNotificationConfigurationRequestFilterSensitiveLog = PutBucketNotificationConfigurationRequestFilterSensitiveLog; -const PutBucketOwnershipControlsRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketOwnershipControlsRequestFilterSensitiveLog = PutBucketOwnershipControlsRequestFilterSensitiveLog; -const PutBucketPolicyRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketPolicyRequestFilterSensitiveLog = PutBucketPolicyRequestFilterSensitiveLog; -const PutBucketReplicationRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.ReplicationConfiguration && { - ReplicationConfiguration: (0, exports.ReplicationConfigurationFilterSensitiveLog)(obj.ReplicationConfiguration), - }), -}); -exports.PutBucketReplicationRequestFilterSensitiveLog = PutBucketReplicationRequestFilterSensitiveLog; -const RequestPaymentConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.RequestPaymentConfigurationFilterSensitiveLog = RequestPaymentConfigurationFilterSensitiveLog; -const PutBucketRequestPaymentRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketRequestPaymentRequestFilterSensitiveLog = PutBucketRequestPaymentRequestFilterSensitiveLog; -const TaggingFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.TaggingFilterSensitiveLog = TaggingFilterSensitiveLog; -const PutBucketTaggingRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketTaggingRequestFilterSensitiveLog = PutBucketTaggingRequestFilterSensitiveLog; -const VersioningConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.VersioningConfigurationFilterSensitiveLog = VersioningConfigurationFilterSensitiveLog; -const PutBucketVersioningRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketVersioningRequestFilterSensitiveLog = PutBucketVersioningRequestFilterSensitiveLog; -const WebsiteConfigurationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.WebsiteConfigurationFilterSensitiveLog = WebsiteConfigurationFilterSensitiveLog; -const PutBucketWebsiteRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutBucketWebsiteRequestFilterSensitiveLog = PutBucketWebsiteRequestFilterSensitiveLog; -const PutObjectOutputFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), - ...(obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: smithy_client_1.SENSITIVE_STRING }), -}); -exports.PutObjectOutputFilterSensitiveLog = PutObjectOutputFilterSensitiveLog; -const PutObjectRequestFilterSensitiveLog = (obj) => ({ - ...obj, - ...(obj.SSECustomerKey && { SSECustomerKey: smithy_client_1.SENSITIVE_STRING }), - ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), - ...(obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: smithy_client_1.SENSITIVE_STRING }), -}); -exports.PutObjectRequestFilterSensitiveLog = PutObjectRequestFilterSensitiveLog; -const PutObjectAclOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectAclOutputFilterSensitiveLog = PutObjectAclOutputFilterSensitiveLog; -const PutObjectAclRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectAclRequestFilterSensitiveLog = PutObjectAclRequestFilterSensitiveLog; -const PutObjectLegalHoldOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectLegalHoldOutputFilterSensitiveLog = PutObjectLegalHoldOutputFilterSensitiveLog; -const PutObjectLegalHoldRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectLegalHoldRequestFilterSensitiveLog = PutObjectLegalHoldRequestFilterSensitiveLog; -const PutObjectLockConfigurationOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectLockConfigurationOutputFilterSensitiveLog = PutObjectLockConfigurationOutputFilterSensitiveLog; -const PutObjectLockConfigurationRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectLockConfigurationRequestFilterSensitiveLog = PutObjectLockConfigurationRequestFilterSensitiveLog; /***/ }), +<<<<<<< HEAD +/***/ 71767: +======= /***/ 43228: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.WriteGetObjectResponseRequestFilterSensitiveLog = exports.UploadPartCopyRequestFilterSensitiveLog = exports.UploadPartCopyOutputFilterSensitiveLog = exports.UploadPartRequestFilterSensitiveLog = exports.UploadPartOutputFilterSensitiveLog = exports.SelectObjectContentRequestFilterSensitiveLog = exports.SelectObjectContentOutputFilterSensitiveLog = exports.SelectObjectContentEventStreamFilterSensitiveLog = exports.RestoreObjectRequestFilterSensitiveLog = exports.RestoreRequestFilterSensitiveLog = exports.OutputLocationFilterSensitiveLog = exports.S3LocationFilterSensitiveLog = exports.EncryptionFilterSensitiveLog = exports.PutObjectRequestFilterSensitiveLog = exports.PutObjectOutputFilterSensitiveLog = exports.SelectObjectContentEventStream = exports.RestoreRequestType = exports.QuoteFields = exports.JSONType = exports.FileHeaderInfo = exports.CompressionType = exports.ExpressionType = exports.Tier = exports.ObjectAlreadyInActiveTierError = exports.MFADelete = void 0; +const smithy_client_1 = __nccwpck_require__(33218); +const S3ServiceException_1 = __nccwpck_require__(67895); +exports.MFADelete = { + Disabled: "Disabled", + Enabled: "Enabled", +}; +======= exports.WriteGetObjectResponseRequestFilterSensitiveLog = exports.UploadPartCopyRequestFilterSensitiveLog = exports.UploadPartCopyOutputFilterSensitiveLog = exports.CopyPartResultFilterSensitiveLog = exports.UploadPartRequestFilterSensitiveLog = exports.UploadPartOutputFilterSensitiveLog = exports.SelectObjectContentRequestFilterSensitiveLog = exports.ScanRangeFilterSensitiveLog = exports.RequestProgressFilterSensitiveLog = exports.SelectObjectContentOutputFilterSensitiveLog = exports.SelectObjectContentEventStreamFilterSensitiveLog = exports.StatsEventFilterSensitiveLog = exports.StatsFilterSensitiveLog = exports.RecordsEventFilterSensitiveLog = exports.ProgressEventFilterSensitiveLog = exports.ProgressFilterSensitiveLog = exports.EndEventFilterSensitiveLog = exports.ContinuationEventFilterSensitiveLog = exports.RestoreObjectRequestFilterSensitiveLog = exports.RestoreRequestFilterSensitiveLog = exports.SelectParametersFilterSensitiveLog = exports.OutputSerializationFilterSensitiveLog = exports.JSONOutputFilterSensitiveLog = exports.CSVOutputFilterSensitiveLog = exports.InputSerializationFilterSensitiveLog = exports.ParquetInputFilterSensitiveLog = exports.JSONInputFilterSensitiveLog = exports.CSVInputFilterSensitiveLog = exports.OutputLocationFilterSensitiveLog = exports.S3LocationFilterSensitiveLog = exports.MetadataEntryFilterSensitiveLog = exports.EncryptionFilterSensitiveLog = exports.GlacierJobParametersFilterSensitiveLog = exports.RestoreObjectOutputFilterSensitiveLog = exports.PutPublicAccessBlockRequestFilterSensitiveLog = exports.PutObjectTaggingRequestFilterSensitiveLog = exports.PutObjectTaggingOutputFilterSensitiveLog = exports.PutObjectRetentionRequestFilterSensitiveLog = exports.PutObjectRetentionOutputFilterSensitiveLog = exports.SelectObjectContentEventStream = exports.RestoreRequestType = exports.QuoteFields = exports.JSONType = exports.FileHeaderInfo = exports.ObjectAlreadyInActiveTierError = void 0; const smithy_client_1 = __nccwpck_require__(26351); const S3ServiceException_1 = __nccwpck_require__(60929); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ObjectAlreadyInActiveTierError extends S3ServiceException_1.S3ServiceException { constructor(opts) { super({ @@ -12708,26 +17572,35 @@ class ObjectAlreadyInActiveTierError extends S3ServiceException_1.S3ServiceExcep } } exports.ObjectAlreadyInActiveTierError = ObjectAlreadyInActiveTierError; -var FileHeaderInfo; -(function (FileHeaderInfo) { - FileHeaderInfo["IGNORE"] = "IGNORE"; - FileHeaderInfo["NONE"] = "NONE"; - FileHeaderInfo["USE"] = "USE"; -})(FileHeaderInfo = exports.FileHeaderInfo || (exports.FileHeaderInfo = {})); -var JSONType; -(function (JSONType) { - JSONType["DOCUMENT"] = "DOCUMENT"; - JSONType["LINES"] = "LINES"; -})(JSONType = exports.JSONType || (exports.JSONType = {})); -var QuoteFields; -(function (QuoteFields) { - QuoteFields["ALWAYS"] = "ALWAYS"; - QuoteFields["ASNEEDED"] = "ASNEEDED"; -})(QuoteFields = exports.QuoteFields || (exports.QuoteFields = {})); -var RestoreRequestType; -(function (RestoreRequestType) { - RestoreRequestType["SELECT"] = "SELECT"; -})(RestoreRequestType = exports.RestoreRequestType || (exports.RestoreRequestType = {})); +exports.Tier = { + Bulk: "Bulk", + Expedited: "Expedited", + Standard: "Standard", +}; +exports.ExpressionType = { + SQL: "SQL", +}; +exports.CompressionType = { + BZIP2: "BZIP2", + GZIP: "GZIP", + NONE: "NONE", +}; +exports.FileHeaderInfo = { + IGNORE: "IGNORE", + NONE: "NONE", + USE: "USE", +}; +exports.JSONType = { + DOCUMENT: "DOCUMENT", + LINES: "LINES", +}; +exports.QuoteFields = { + ALWAYS: "ALWAYS", + ASNEEDED: "ASNEEDED", +}; +exports.RestoreRequestType = { + SELECT: "SELECT", +}; var SelectObjectContentEventStream; (function (SelectObjectContentEventStream) { SelectObjectContentEventStream.visit = (value, visitor) => { @@ -12744,43 +17617,24 @@ var SelectObjectContentEventStream; return visitor._(value.$unknown[0], value.$unknown[1]); }; })(SelectObjectContentEventStream = exports.SelectObjectContentEventStream || (exports.SelectObjectContentEventStream = {})); -const PutObjectRetentionOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectRetentionOutputFilterSensitiveLog = PutObjectRetentionOutputFilterSensitiveLog; -const PutObjectRetentionRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectRetentionRequestFilterSensitiveLog = PutObjectRetentionRequestFilterSensitiveLog; -const PutObjectTaggingOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectTaggingOutputFilterSensitiveLog = PutObjectTaggingOutputFilterSensitiveLog; -const PutObjectTaggingRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutObjectTaggingRequestFilterSensitiveLog = PutObjectTaggingRequestFilterSensitiveLog; -const PutPublicAccessBlockRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PutPublicAccessBlockRequestFilterSensitiveLog = PutPublicAccessBlockRequestFilterSensitiveLog; -const RestoreObjectOutputFilterSensitiveLog = (obj) => ({ +const PutObjectOutputFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), + ...(obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: smithy_client_1.SENSITIVE_STRING }), }); -exports.RestoreObjectOutputFilterSensitiveLog = RestoreObjectOutputFilterSensitiveLog; -const GlacierJobParametersFilterSensitiveLog = (obj) => ({ +exports.PutObjectOutputFilterSensitiveLog = PutObjectOutputFilterSensitiveLog; +const PutObjectRequestFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.SSECustomerKey && { SSECustomerKey: smithy_client_1.SENSITIVE_STRING }), + ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), + ...(obj.SSEKMSEncryptionContext && { SSEKMSEncryptionContext: smithy_client_1.SENSITIVE_STRING }), }); -exports.GlacierJobParametersFilterSensitiveLog = GlacierJobParametersFilterSensitiveLog; +exports.PutObjectRequestFilterSensitiveLog = PutObjectRequestFilterSensitiveLog; const EncryptionFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.KMSKeyId && { KMSKeyId: smithy_client_1.SENSITIVE_STRING }), }); exports.EncryptionFilterSensitiveLog = EncryptionFilterSensitiveLog; -const MetadataEntryFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.MetadataEntryFilterSensitiveLog = MetadataEntryFilterSensitiveLog; const S3LocationFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.Encryption && { Encryption: (0, exports.EncryptionFilterSensitiveLog)(obj.Encryption) }), @@ -12791,38 +17645,6 @@ const OutputLocationFilterSensitiveLog = (obj) => ({ ...(obj.S3 && { S3: (0, exports.S3LocationFilterSensitiveLog)(obj.S3) }), }); exports.OutputLocationFilterSensitiveLog = OutputLocationFilterSensitiveLog; -const CSVInputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CSVInputFilterSensitiveLog = CSVInputFilterSensitiveLog; -const JSONInputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.JSONInputFilterSensitiveLog = JSONInputFilterSensitiveLog; -const ParquetInputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ParquetInputFilterSensitiveLog = ParquetInputFilterSensitiveLog; -const InputSerializationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.InputSerializationFilterSensitiveLog = InputSerializationFilterSensitiveLog; -const CSVOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CSVOutputFilterSensitiveLog = CSVOutputFilterSensitiveLog; -const JSONOutputFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.JSONOutputFilterSensitiveLog = JSONOutputFilterSensitiveLog; -const OutputSerializationFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.OutputSerializationFilterSensitiveLog = OutputSerializationFilterSensitiveLog; -const SelectParametersFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.SelectParametersFilterSensitiveLog = SelectParametersFilterSensitiveLog; const RestoreRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.OutputLocation && { OutputLocation: (0, exports.OutputLocationFilterSensitiveLog)(obj.OutputLocation) }), @@ -12833,45 +17655,17 @@ const RestoreObjectRequestFilterSensitiveLog = (obj) => ({ ...(obj.RestoreRequest && { RestoreRequest: (0, exports.RestoreRequestFilterSensitiveLog)(obj.RestoreRequest) }), }); exports.RestoreObjectRequestFilterSensitiveLog = RestoreObjectRequestFilterSensitiveLog; -const ContinuationEventFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ContinuationEventFilterSensitiveLog = ContinuationEventFilterSensitiveLog; -const EndEventFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.EndEventFilterSensitiveLog = EndEventFilterSensitiveLog; -const ProgressFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ProgressFilterSensitiveLog = ProgressFilterSensitiveLog; -const ProgressEventFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ProgressEventFilterSensitiveLog = ProgressEventFilterSensitiveLog; -const RecordsEventFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.RecordsEventFilterSensitiveLog = RecordsEventFilterSensitiveLog; -const StatsFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.StatsFilterSensitiveLog = StatsFilterSensitiveLog; -const StatsEventFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.StatsEventFilterSensitiveLog = StatsEventFilterSensitiveLog; const SelectObjectContentEventStreamFilterSensitiveLog = (obj) => { if (obj.Records !== undefined) - return { Records: (0, exports.RecordsEventFilterSensitiveLog)(obj.Records) }; + return { Records: obj.Records }; if (obj.Stats !== undefined) - return { Stats: (0, exports.StatsEventFilterSensitiveLog)(obj.Stats) }; + return { Stats: obj.Stats }; if (obj.Progress !== undefined) - return { Progress: (0, exports.ProgressEventFilterSensitiveLog)(obj.Progress) }; + return { Progress: obj.Progress }; if (obj.Cont !== undefined) - return { Cont: (0, exports.ContinuationEventFilterSensitiveLog)(obj.Cont) }; + return { Cont: obj.Cont }; if (obj.End !== undefined) - return { End: (0, exports.EndEventFilterSensitiveLog)(obj.End) }; + return { End: obj.End }; if (obj.$unknown !== undefined) return { [obj.$unknown[0]]: "UNKNOWN" }; }; @@ -12881,14 +17675,6 @@ const SelectObjectContentOutputFilterSensitiveLog = (obj) => ({ ...(obj.Payload && { Payload: "STREAMING_CONTENT" }), }); exports.SelectObjectContentOutputFilterSensitiveLog = SelectObjectContentOutputFilterSensitiveLog; -const RequestProgressFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.RequestProgressFilterSensitiveLog = RequestProgressFilterSensitiveLog; -const ScanRangeFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ScanRangeFilterSensitiveLog = ScanRangeFilterSensitiveLog; const SelectObjectContentRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSECustomerKey && { SSECustomerKey: smithy_client_1.SENSITIVE_STRING }), @@ -12904,10 +17690,6 @@ const UploadPartRequestFilterSensitiveLog = (obj) => ({ ...(obj.SSECustomerKey && { SSECustomerKey: smithy_client_1.SENSITIVE_STRING }), }); exports.UploadPartRequestFilterSensitiveLog = UploadPartRequestFilterSensitiveLog; -const CopyPartResultFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.CopyPartResultFilterSensitiveLog = CopyPartResultFilterSensitiveLog; const UploadPartCopyOutputFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.SSEKMSKeyId && { SSEKMSKeyId: smithy_client_1.SENSITIVE_STRING }), @@ -12928,23 +17710,49 @@ exports.WriteGetObjectResponseRequestFilterSensitiveLog = WriteGetObjectResponse /***/ }), +<<<<<<< HEAD +/***/ 56895: +======= /***/ 41811: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), +<<<<<<< HEAD +/***/ 19931: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.paginateListDirectoryBuckets = void 0; +const core_1 = __nccwpck_require__(53938); +const ListDirectoryBucketsCommand_1 = __nccwpck_require__(38902); +const S3Client_1 = __nccwpck_require__(34692); +exports.paginateListDirectoryBuckets = (0, core_1.createPaginator)(S3Client_1.S3Client, ListDirectoryBucketsCommand_1.ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets"); + + +/***/ }), + +/***/ 8142: +======= /***/ 26867: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.paginateListObjectsV2 = void 0; +<<<<<<< HEAD +const core_1 = __nccwpck_require__(53938); +const ListObjectsV2Command_1 = __nccwpck_require__(57262); +const S3Client_1 = __nccwpck_require__(34692); +exports.paginateListObjectsV2 = (0, core_1.createPaginator)(S3Client_1.S3Client, ListObjectsV2Command_1.ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys"); +======= const ListObjectsV2Command_1 = __nccwpck_require__(33259); const S3_1 = __nccwpck_require__(10223); const S3Client_1 = __nccwpck_require__(17824); @@ -12978,17 +17786,27 @@ async function* paginateListObjectsV2(config, input, ...additionalArguments) { return undefined; } exports.paginateListObjectsV2 = paginateListObjectsV2; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 5379: +======= /***/ 94827: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.paginateListParts = void 0; +<<<<<<< HEAD +const core_1 = __nccwpck_require__(53938); +const ListPartsCommand_1 = __nccwpck_require__(68740); +const S3Client_1 = __nccwpck_require__(34692); +exports.paginateListParts = (0, core_1.createPaginator)(S3Client_1.S3Client, ListPartsCommand_1.ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts"); +======= const ListPartsCommand_1 = __nccwpck_require__(83080); const S3_1 = __nccwpck_require__(10223); const S3Client_1 = __nccwpck_require__(17824); @@ -13022,30 +17840,64 @@ async function* paginateListParts(config, input, ...additionalArguments) { return undefined; } exports.paginateListParts = paginateListParts; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 2714: +======= /***/ 28743: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(91685); +tslib_1.__exportStar(__nccwpck_require__(56895), exports); +tslib_1.__exportStar(__nccwpck_require__(19931), exports); +tslib_1.__exportStar(__nccwpck_require__(8142), exports); +tslib_1.__exportStar(__nccwpck_require__(5379), exports); +======= const tslib_1 = __nccwpck_require__(73563); tslib_1.__exportStar(__nccwpck_require__(41811), exports); tslib_1.__exportStar(__nccwpck_require__(26867), exports); tslib_1.__exportStar(__nccwpck_require__(94827), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 70395: +======= /***/ 75255: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.se_GetObjectTaggingCommand = exports.se_GetObjectRetentionCommand = exports.se_GetObjectLockConfigurationCommand = exports.se_GetObjectLegalHoldCommand = exports.se_GetObjectAttributesCommand = exports.se_GetObjectAclCommand = exports.se_GetObjectCommand = exports.se_GetBucketWebsiteCommand = exports.se_GetBucketVersioningCommand = exports.se_GetBucketTaggingCommand = exports.se_GetBucketRequestPaymentCommand = exports.se_GetBucketReplicationCommand = exports.se_GetBucketPolicyStatusCommand = exports.se_GetBucketPolicyCommand = exports.se_GetBucketOwnershipControlsCommand = exports.se_GetBucketNotificationConfigurationCommand = exports.se_GetBucketMetricsConfigurationCommand = exports.se_GetBucketLoggingCommand = exports.se_GetBucketLocationCommand = exports.se_GetBucketLifecycleConfigurationCommand = exports.se_GetBucketInventoryConfigurationCommand = exports.se_GetBucketIntelligentTieringConfigurationCommand = exports.se_GetBucketEncryptionCommand = exports.se_GetBucketCorsCommand = exports.se_GetBucketAnalyticsConfigurationCommand = exports.se_GetBucketAclCommand = exports.se_GetBucketAccelerateConfigurationCommand = exports.se_DeletePublicAccessBlockCommand = exports.se_DeleteObjectTaggingCommand = exports.se_DeleteObjectsCommand = exports.se_DeleteObjectCommand = exports.se_DeleteBucketWebsiteCommand = exports.se_DeleteBucketTaggingCommand = exports.se_DeleteBucketReplicationCommand = exports.se_DeleteBucketPolicyCommand = exports.se_DeleteBucketOwnershipControlsCommand = exports.se_DeleteBucketMetricsConfigurationCommand = exports.se_DeleteBucketLifecycleCommand = exports.se_DeleteBucketInventoryConfigurationCommand = exports.se_DeleteBucketIntelligentTieringConfigurationCommand = exports.se_DeleteBucketEncryptionCommand = exports.se_DeleteBucketCorsCommand = exports.se_DeleteBucketAnalyticsConfigurationCommand = exports.se_DeleteBucketCommand = exports.se_CreateSessionCommand = exports.se_CreateMultipartUploadCommand = exports.se_CreateBucketCommand = exports.se_CopyObjectCommand = exports.se_CompleteMultipartUploadCommand = exports.se_AbortMultipartUploadCommand = void 0; +exports.de_CreateMultipartUploadCommand = exports.de_CreateBucketCommand = exports.de_CopyObjectCommand = exports.de_CompleteMultipartUploadCommand = exports.de_AbortMultipartUploadCommand = exports.se_WriteGetObjectResponseCommand = exports.se_UploadPartCopyCommand = exports.se_UploadPartCommand = exports.se_SelectObjectContentCommand = exports.se_RestoreObjectCommand = exports.se_PutPublicAccessBlockCommand = exports.se_PutObjectTaggingCommand = exports.se_PutObjectRetentionCommand = exports.se_PutObjectLockConfigurationCommand = exports.se_PutObjectLegalHoldCommand = exports.se_PutObjectAclCommand = exports.se_PutObjectCommand = exports.se_PutBucketWebsiteCommand = exports.se_PutBucketVersioningCommand = exports.se_PutBucketTaggingCommand = exports.se_PutBucketRequestPaymentCommand = exports.se_PutBucketReplicationCommand = exports.se_PutBucketPolicyCommand = exports.se_PutBucketOwnershipControlsCommand = exports.se_PutBucketNotificationConfigurationCommand = exports.se_PutBucketMetricsConfigurationCommand = exports.se_PutBucketLoggingCommand = exports.se_PutBucketLifecycleConfigurationCommand = exports.se_PutBucketInventoryConfigurationCommand = exports.se_PutBucketIntelligentTieringConfigurationCommand = exports.se_PutBucketEncryptionCommand = exports.se_PutBucketCorsCommand = exports.se_PutBucketAnalyticsConfigurationCommand = exports.se_PutBucketAclCommand = exports.se_PutBucketAccelerateConfigurationCommand = exports.se_ListPartsCommand = exports.se_ListObjectVersionsCommand = exports.se_ListObjectsV2Command = exports.se_ListObjectsCommand = exports.se_ListMultipartUploadsCommand = exports.se_ListDirectoryBucketsCommand = exports.se_ListBucketsCommand = exports.se_ListBucketMetricsConfigurationsCommand = exports.se_ListBucketInventoryConfigurationsCommand = exports.se_ListBucketIntelligentTieringConfigurationsCommand = exports.se_ListBucketAnalyticsConfigurationsCommand = exports.se_HeadObjectCommand = exports.se_HeadBucketCommand = exports.se_GetPublicAccessBlockCommand = exports.se_GetObjectTorrentCommand = void 0; +exports.de_ListBucketAnalyticsConfigurationsCommand = exports.de_HeadObjectCommand = exports.de_HeadBucketCommand = exports.de_GetPublicAccessBlockCommand = exports.de_GetObjectTorrentCommand = exports.de_GetObjectTaggingCommand = exports.de_GetObjectRetentionCommand = exports.de_GetObjectLockConfigurationCommand = exports.de_GetObjectLegalHoldCommand = exports.de_GetObjectAttributesCommand = exports.de_GetObjectAclCommand = exports.de_GetObjectCommand = exports.de_GetBucketWebsiteCommand = exports.de_GetBucketVersioningCommand = exports.de_GetBucketTaggingCommand = exports.de_GetBucketRequestPaymentCommand = exports.de_GetBucketReplicationCommand = exports.de_GetBucketPolicyStatusCommand = exports.de_GetBucketPolicyCommand = exports.de_GetBucketOwnershipControlsCommand = exports.de_GetBucketNotificationConfigurationCommand = exports.de_GetBucketMetricsConfigurationCommand = exports.de_GetBucketLoggingCommand = exports.de_GetBucketLocationCommand = exports.de_GetBucketLifecycleConfigurationCommand = exports.de_GetBucketInventoryConfigurationCommand = exports.de_GetBucketIntelligentTieringConfigurationCommand = exports.de_GetBucketEncryptionCommand = exports.de_GetBucketCorsCommand = exports.de_GetBucketAnalyticsConfigurationCommand = exports.de_GetBucketAclCommand = exports.de_GetBucketAccelerateConfigurationCommand = exports.de_DeletePublicAccessBlockCommand = exports.de_DeleteObjectTaggingCommand = exports.de_DeleteObjectsCommand = exports.de_DeleteObjectCommand = exports.de_DeleteBucketWebsiteCommand = exports.de_DeleteBucketTaggingCommand = exports.de_DeleteBucketReplicationCommand = exports.de_DeleteBucketPolicyCommand = exports.de_DeleteBucketOwnershipControlsCommand = exports.de_DeleteBucketMetricsConfigurationCommand = exports.de_DeleteBucketLifecycleCommand = exports.de_DeleteBucketInventoryConfigurationCommand = exports.de_DeleteBucketIntelligentTieringConfigurationCommand = exports.de_DeleteBucketEncryptionCommand = exports.de_DeleteBucketCorsCommand = exports.de_DeleteBucketAnalyticsConfigurationCommand = exports.de_DeleteBucketCommand = exports.de_CreateSessionCommand = void 0; +exports.de_WriteGetObjectResponseCommand = exports.de_UploadPartCopyCommand = exports.de_UploadPartCommand = exports.de_SelectObjectContentCommand = exports.de_RestoreObjectCommand = exports.de_PutPublicAccessBlockCommand = exports.de_PutObjectTaggingCommand = exports.de_PutObjectRetentionCommand = exports.de_PutObjectLockConfigurationCommand = exports.de_PutObjectLegalHoldCommand = exports.de_PutObjectAclCommand = exports.de_PutObjectCommand = exports.de_PutBucketWebsiteCommand = exports.de_PutBucketVersioningCommand = exports.de_PutBucketTaggingCommand = exports.de_PutBucketRequestPaymentCommand = exports.de_PutBucketReplicationCommand = exports.de_PutBucketPolicyCommand = exports.de_PutBucketOwnershipControlsCommand = exports.de_PutBucketNotificationConfigurationCommand = exports.de_PutBucketMetricsConfigurationCommand = exports.de_PutBucketLoggingCommand = exports.de_PutBucketLifecycleConfigurationCommand = exports.de_PutBucketInventoryConfigurationCommand = exports.de_PutBucketIntelligentTieringConfigurationCommand = exports.de_PutBucketEncryptionCommand = exports.de_PutBucketCorsCommand = exports.de_PutBucketAnalyticsConfigurationCommand = exports.de_PutBucketAclCommand = exports.de_PutBucketAccelerateConfigurationCommand = exports.de_ListPartsCommand = exports.de_ListObjectVersionsCommand = exports.de_ListObjectsV2Command = exports.de_ListObjectsCommand = exports.de_ListMultipartUploadsCommand = exports.de_ListDirectoryBucketsCommand = exports.de_ListBucketsCommand = exports.de_ListBucketMetricsConfigurationsCommand = exports.de_ListBucketInventoryConfigurationsCommand = exports.de_ListBucketIntelligentTieringConfigurationsCommand = void 0; +const xml_builder_1 = __nccwpck_require__(63131); +const core_1 = __nccwpck_require__(53938); +const protocol_http_1 = __nccwpck_require__(45311); +const smithy_client_1 = __nccwpck_require__(33218); +const fast_xml_parser_1 = __nccwpck_require__(6714); +const models_0_1 = __nccwpck_require__(22729); +const models_1_1 = __nccwpck_require__(71767); +const S3ServiceException_1 = __nccwpck_require__(67895); +const se_AbortMultipartUploadCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], +======= exports.serializeAws_restXmlGetObjectTorrentCommand = exports.serializeAws_restXmlGetObjectTaggingCommand = exports.serializeAws_restXmlGetObjectRetentionCommand = exports.serializeAws_restXmlGetObjectLockConfigurationCommand = exports.serializeAws_restXmlGetObjectLegalHoldCommand = exports.serializeAws_restXmlGetObjectAttributesCommand = exports.serializeAws_restXmlGetObjectAclCommand = exports.serializeAws_restXmlGetObjectCommand = exports.serializeAws_restXmlGetBucketWebsiteCommand = exports.serializeAws_restXmlGetBucketVersioningCommand = exports.serializeAws_restXmlGetBucketTaggingCommand = exports.serializeAws_restXmlGetBucketRequestPaymentCommand = exports.serializeAws_restXmlGetBucketReplicationCommand = exports.serializeAws_restXmlGetBucketPolicyStatusCommand = exports.serializeAws_restXmlGetBucketPolicyCommand = exports.serializeAws_restXmlGetBucketOwnershipControlsCommand = exports.serializeAws_restXmlGetBucketNotificationConfigurationCommand = exports.serializeAws_restXmlGetBucketMetricsConfigurationCommand = exports.serializeAws_restXmlGetBucketLoggingCommand = exports.serializeAws_restXmlGetBucketLocationCommand = exports.serializeAws_restXmlGetBucketLifecycleConfigurationCommand = exports.serializeAws_restXmlGetBucketInventoryConfigurationCommand = exports.serializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand = exports.serializeAws_restXmlGetBucketEncryptionCommand = exports.serializeAws_restXmlGetBucketCorsCommand = exports.serializeAws_restXmlGetBucketAnalyticsConfigurationCommand = exports.serializeAws_restXmlGetBucketAclCommand = exports.serializeAws_restXmlGetBucketAccelerateConfigurationCommand = exports.serializeAws_restXmlDeletePublicAccessBlockCommand = exports.serializeAws_restXmlDeleteObjectTaggingCommand = exports.serializeAws_restXmlDeleteObjectsCommand = exports.serializeAws_restXmlDeleteObjectCommand = exports.serializeAws_restXmlDeleteBucketWebsiteCommand = exports.serializeAws_restXmlDeleteBucketTaggingCommand = exports.serializeAws_restXmlDeleteBucketReplicationCommand = exports.serializeAws_restXmlDeleteBucketPolicyCommand = exports.serializeAws_restXmlDeleteBucketOwnershipControlsCommand = exports.serializeAws_restXmlDeleteBucketMetricsConfigurationCommand = exports.serializeAws_restXmlDeleteBucketLifecycleCommand = exports.serializeAws_restXmlDeleteBucketInventoryConfigurationCommand = exports.serializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand = exports.serializeAws_restXmlDeleteBucketEncryptionCommand = exports.serializeAws_restXmlDeleteBucketCorsCommand = exports.serializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand = exports.serializeAws_restXmlDeleteBucketCommand = exports.serializeAws_restXmlCreateMultipartUploadCommand = exports.serializeAws_restXmlCreateBucketCommand = exports.serializeAws_restXmlCopyObjectCommand = exports.serializeAws_restXmlCompleteMultipartUploadCommand = exports.serializeAws_restXmlAbortMultipartUploadCommand = void 0; exports.deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand = exports.deserializeAws_restXmlDeleteBucketCommand = exports.deserializeAws_restXmlCreateMultipartUploadCommand = exports.deserializeAws_restXmlCreateBucketCommand = exports.deserializeAws_restXmlCopyObjectCommand = exports.deserializeAws_restXmlCompleteMultipartUploadCommand = exports.deserializeAws_restXmlAbortMultipartUploadCommand = exports.serializeAws_restXmlWriteGetObjectResponseCommand = exports.serializeAws_restXmlUploadPartCopyCommand = exports.serializeAws_restXmlUploadPartCommand = exports.serializeAws_restXmlSelectObjectContentCommand = exports.serializeAws_restXmlRestoreObjectCommand = exports.serializeAws_restXmlPutPublicAccessBlockCommand = exports.serializeAws_restXmlPutObjectTaggingCommand = exports.serializeAws_restXmlPutObjectRetentionCommand = exports.serializeAws_restXmlPutObjectLockConfigurationCommand = exports.serializeAws_restXmlPutObjectLegalHoldCommand = exports.serializeAws_restXmlPutObjectAclCommand = exports.serializeAws_restXmlPutObjectCommand = exports.serializeAws_restXmlPutBucketWebsiteCommand = exports.serializeAws_restXmlPutBucketVersioningCommand = exports.serializeAws_restXmlPutBucketTaggingCommand = exports.serializeAws_restXmlPutBucketRequestPaymentCommand = exports.serializeAws_restXmlPutBucketReplicationCommand = exports.serializeAws_restXmlPutBucketPolicyCommand = exports.serializeAws_restXmlPutBucketOwnershipControlsCommand = exports.serializeAws_restXmlPutBucketNotificationConfigurationCommand = exports.serializeAws_restXmlPutBucketMetricsConfigurationCommand = exports.serializeAws_restXmlPutBucketLoggingCommand = exports.serializeAws_restXmlPutBucketLifecycleConfigurationCommand = exports.serializeAws_restXmlPutBucketInventoryConfigurationCommand = exports.serializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand = exports.serializeAws_restXmlPutBucketEncryptionCommand = exports.serializeAws_restXmlPutBucketCorsCommand = exports.serializeAws_restXmlPutBucketAnalyticsConfigurationCommand = exports.serializeAws_restXmlPutBucketAclCommand = exports.serializeAws_restXmlPutBucketAccelerateConfigurationCommand = exports.serializeAws_restXmlListPartsCommand = exports.serializeAws_restXmlListObjectVersionsCommand = exports.serializeAws_restXmlListObjectsV2Command = exports.serializeAws_restXmlListObjectsCommand = exports.serializeAws_restXmlListMultipartUploadsCommand = exports.serializeAws_restXmlListBucketsCommand = exports.serializeAws_restXmlListBucketMetricsConfigurationsCommand = exports.serializeAws_restXmlListBucketInventoryConfigurationsCommand = exports.serializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand = exports.serializeAws_restXmlListBucketAnalyticsConfigurationsCommand = exports.serializeAws_restXmlHeadObjectCommand = exports.serializeAws_restXmlHeadBucketCommand = exports.serializeAws_restXmlGetPublicAccessBlockCommand = void 0; exports.deserializeAws_restXmlListBucketMetricsConfigurationsCommand = exports.deserializeAws_restXmlListBucketInventoryConfigurationsCommand = exports.deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand = exports.deserializeAws_restXmlListBucketAnalyticsConfigurationsCommand = exports.deserializeAws_restXmlHeadObjectCommand = exports.deserializeAws_restXmlHeadBucketCommand = exports.deserializeAws_restXmlGetPublicAccessBlockCommand = exports.deserializeAws_restXmlGetObjectTorrentCommand = exports.deserializeAws_restXmlGetObjectTaggingCommand = exports.deserializeAws_restXmlGetObjectRetentionCommand = exports.deserializeAws_restXmlGetObjectLockConfigurationCommand = exports.deserializeAws_restXmlGetObjectLegalHoldCommand = exports.deserializeAws_restXmlGetObjectAttributesCommand = exports.deserializeAws_restXmlGetObjectAclCommand = exports.deserializeAws_restXmlGetObjectCommand = exports.deserializeAws_restXmlGetBucketWebsiteCommand = exports.deserializeAws_restXmlGetBucketVersioningCommand = exports.deserializeAws_restXmlGetBucketTaggingCommand = exports.deserializeAws_restXmlGetBucketRequestPaymentCommand = exports.deserializeAws_restXmlGetBucketReplicationCommand = exports.deserializeAws_restXmlGetBucketPolicyStatusCommand = exports.deserializeAws_restXmlGetBucketPolicyCommand = exports.deserializeAws_restXmlGetBucketOwnershipControlsCommand = exports.deserializeAws_restXmlGetBucketNotificationConfigurationCommand = exports.deserializeAws_restXmlGetBucketMetricsConfigurationCommand = exports.deserializeAws_restXmlGetBucketLoggingCommand = exports.deserializeAws_restXmlGetBucketLocationCommand = exports.deserializeAws_restXmlGetBucketLifecycleConfigurationCommand = exports.deserializeAws_restXmlGetBucketInventoryConfigurationCommand = exports.deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand = exports.deserializeAws_restXmlGetBucketEncryptionCommand = exports.deserializeAws_restXmlGetBucketCorsCommand = exports.deserializeAws_restXmlGetBucketAnalyticsConfigurationCommand = exports.deserializeAws_restXmlGetBucketAclCommand = exports.deserializeAws_restXmlGetBucketAccelerateConfigurationCommand = exports.deserializeAws_restXmlDeletePublicAccessBlockCommand = exports.deserializeAws_restXmlDeleteObjectTaggingCommand = exports.deserializeAws_restXmlDeleteObjectsCommand = exports.deserializeAws_restXmlDeleteObjectCommand = exports.deserializeAws_restXmlDeleteBucketWebsiteCommand = exports.deserializeAws_restXmlDeleteBucketTaggingCommand = exports.deserializeAws_restXmlDeleteBucketReplicationCommand = exports.deserializeAws_restXmlDeleteBucketPolicyCommand = exports.deserializeAws_restXmlDeleteBucketOwnershipControlsCommand = exports.deserializeAws_restXmlDeleteBucketMetricsConfigurationCommand = exports.deserializeAws_restXmlDeleteBucketLifecycleCommand = exports.deserializeAws_restXmlDeleteBucketInventoryConfigurationCommand = exports.deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand = exports.deserializeAws_restXmlDeleteBucketEncryptionCommand = exports.deserializeAws_restXmlDeleteBucketCorsCommand = void 0; @@ -13063,2962 +17915,2100 @@ const serializeAws_restXmlAbortMultipartUploadCommand = async (input, context) = const headers = map({}, isSerializableHeaderValue, { "x-amz-request-payer": input.RequestPayer, "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "x-id": [, "AbortMultipartUpload"], - uploadId: [, input.UploadId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "AbortMultipartUpload"], + [_uI]: [, (0, smithy_client_1.expectNonNull)(input[_UI], `UploadId`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlAbortMultipartUploadCommand = serializeAws_restXmlAbortMultipartUploadCommand; -const serializeAws_restXmlCompleteMultipartUploadCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_AbortMultipartUploadCommand = se_AbortMultipartUploadCommand; +const se_CompleteMultipartUploadCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-checksum-crc32": input.ChecksumCRC32, - "x-amz-checksum-crc32c": input.ChecksumCRC32C, - "x-amz-checksum-sha1": input.ChecksumSHA1, - "x-amz-checksum-sha256": input.ChecksumSHA256, - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, + [_xacc]: input[_CCRC], + [_xacc_]: input[_CCRCC], + [_xacs]: input[_CSHA], + [_xacs_]: input[_CSHAh], + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "x-id": [, "CompleteMultipartUpload"], - uploadId: [, input.UploadId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "CompleteMultipartUpload"], + [_uI]: [, (0, smithy_client_1.expectNonNull)(input[_UI], `UploadId`)], }); let body; - if (input.MultipartUpload !== undefined) { - body = serializeAws_restXmlCompletedMultipartUpload(input.MultipartUpload, context); - } let contents; if (input.MultipartUpload !== undefined) { - contents = serializeAws_restXmlCompletedMultipartUpload(input.MultipartUpload, context); - contents = contents.withName("CompleteMultipartUpload"); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_CompletedMultipartUpload(input.MultipartUpload, context); + contents = contents.n("CompleteMultipartUpload"); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlCompleteMultipartUploadCommand = serializeAws_restXmlCompleteMultipartUploadCommand; -const serializeAws_restXmlCopyObjectCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-acl": input.ACL, - "cache-control": input.CacheControl, - "x-amz-checksum-algorithm": input.ChecksumAlgorithm, - "content-disposition": input.ContentDisposition, - "content-encoding": input.ContentEncoding, - "content-language": input.ContentLanguage, - "content-type": input.ContentType, - "x-amz-copy-source": input.CopySource, - "x-amz-copy-source-if-match": input.CopySourceIfMatch, - "x-amz-copy-source-if-modified-since": [ - () => isSerializableHeaderValue(input.CopySourceIfModifiedSince), - () => (0, smithy_client_1.dateToUtcString)(input.CopySourceIfModifiedSince).toString(), - ], - "x-amz-copy-source-if-none-match": input.CopySourceIfNoneMatch, - "x-amz-copy-source-if-unmodified-since": [ - () => isSerializableHeaderValue(input.CopySourceIfUnmodifiedSince), - () => (0, smithy_client_1.dateToUtcString)(input.CopySourceIfUnmodifiedSince).toString(), + b.m("POST").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_CompleteMultipartUploadCommand = se_CompleteMultipartUploadCommand; +const se_CopyObjectCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaa]: input[_ACL], + [_cc]: input[_CC], + [_xaca]: input[_CA], + [_cd]: input[_CD], + [_ce]: input[_CE], + [_cl]: input[_CL], + [_ct]: input[_CT], + [_xacs__]: input[_CS], + [_xacsim]: input[_CSIM], + [_xacsims]: [() => isSerializableHeaderValue(input[_CSIMS]), () => (0, smithy_client_1.dateToUtcString)(input[_CSIMS]).toString()], + [_xacsinm]: input[_CSINM], + [_xacsius]: [() => isSerializableHeaderValue(input[_CSIUS]), () => (0, smithy_client_1.dateToUtcString)(input[_CSIUS]).toString()], + [_e]: [() => isSerializableHeaderValue(input[_E]), () => (0, smithy_client_1.dateToUtcString)(input[_E]).toString()], + [_xagfc]: input[_GFC], + [_xagr]: input[_GR], + [_xagra]: input[_GRACP], + [_xagwa]: input[_GWACP], + [_xamd]: input[_MD], + [_xatd]: input[_TD], + [_xasse]: input[_SSE], + [_xasc]: input[_SC], + [_xawrl]: input[_WRL], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], + [_xasseakki]: input[_SSEKMSKI], + [_xassec]: input[_SSEKMSEC], + [_xassebke]: [() => isSerializableHeaderValue(input[_BKE]), () => input[_BKE].toString()], + [_xacssseca]: input[_CSSSECA], + [_xacssseck]: input[_CSSSECK], + [_xacssseckm]: input[_CSSSECKMD], + [_xarp]: input[_RP], + [_xat]: input[_T], + [_xaolm]: input[_OLM], + [_xaolrud]: [ + () => isSerializableHeaderValue(input[_OLRUD]), + () => (input[_OLRUD].toISOString().split(".")[0] + "Z").toString(), ], - expires: [() => isSerializableHeaderValue(input.Expires), () => (0, smithy_client_1.dateToUtcString)(input.Expires).toString()], - "x-amz-grant-full-control": input.GrantFullControl, - "x-amz-grant-read": input.GrantRead, - "x-amz-grant-read-acp": input.GrantReadACP, - "x-amz-grant-write-acp": input.GrantWriteACP, - "x-amz-metadata-directive": input.MetadataDirective, - "x-amz-tagging-directive": input.TaggingDirective, - "x-amz-server-side-encryption": input.ServerSideEncryption, - "x-amz-storage-class": input.StorageClass, - "x-amz-website-redirect-location": input.WebsiteRedirectLocation, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-server-side-encryption-aws-kms-key-id": input.SSEKMSKeyId, - "x-amz-server-side-encryption-context": input.SSEKMSEncryptionContext, - "x-amz-server-side-encryption-bucket-key-enabled": [ - () => isSerializableHeaderValue(input.BucketKeyEnabled), - () => input.BucketKeyEnabled.toString(), - ], - "x-amz-copy-source-server-side-encryption-customer-algorithm": input.CopySourceSSECustomerAlgorithm, - "x-amz-copy-source-server-side-encryption-customer-key": input.CopySourceSSECustomerKey, - "x-amz-copy-source-server-side-encryption-customer-key-md5": input.CopySourceSSECustomerKeyMD5, - "x-amz-request-payer": input.RequestPayer, - "x-amz-tagging": input.Tagging, - "x-amz-object-lock-mode": input.ObjectLockMode, - "x-amz-object-lock-retain-until-date": [ - () => isSerializableHeaderValue(input.ObjectLockRetainUntilDate), - () => (input.ObjectLockRetainUntilDate.toISOString().split(".")[0] + "Z").toString(), - ], - "x-amz-object-lock-legal-hold": input.ObjectLockLegalHoldStatus, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-source-expected-bucket-owner": input.ExpectedSourceBucketOwner, + [_xaollh]: input[_OLLHS], + [_xaebo]: input[_EBO], + [_xasebo]: input[_ESBO], ...(input.Metadata !== undefined && - Object.keys(input.Metadata).reduce((acc, suffix) => ({ - ...acc, - [`x-amz-meta-${suffix.toLowerCase()}`]: input.Metadata[suffix], - }), {})), + Object.keys(input.Metadata).reduce((acc, suffix) => { + acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix]; + return acc; + }, {})), }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "x-id": [, "CopyObject"], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "CopyObject"], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlCopyObjectCommand = serializeAws_restXmlCopyObjectCommand; -const serializeAws_restXmlCreateBucketCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_CopyObjectCommand = se_CopyObjectCommand; +const se_CreateBucketCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-acl": input.ACL, - "x-amz-grant-full-control": input.GrantFullControl, - "x-amz-grant-read": input.GrantRead, - "x-amz-grant-read-acp": input.GrantReadACP, - "x-amz-grant-write": input.GrantWrite, - "x-amz-grant-write-acp": input.GrantWriteACP, - "x-amz-bucket-object-lock-enabled": [ - () => isSerializableHeaderValue(input.ObjectLockEnabledForBucket), - () => input.ObjectLockEnabledForBucket.toString(), - ], - "x-amz-object-ownership": input.ObjectOwnership, + [_xaa]: input[_ACL], + [_xagfc]: input[_GFC], + [_xagr]: input[_GR], + [_xagra]: input[_GRACP], + [_xagw]: input[_GW], + [_xagwa]: input[_GWACP], + [_xabole]: [() => isSerializableHeaderValue(input[_OLEFB]), () => input[_OLEFB].toString()], + [_xaoo]: input[_OO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); let body; - if (input.CreateBucketConfiguration !== undefined) { - body = serializeAws_restXmlCreateBucketConfiguration(input.CreateBucketConfiguration, context); - } let contents; if (input.CreateBucketConfiguration !== undefined) { - contents = serializeAws_restXmlCreateBucketConfiguration(input.CreateBucketConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_CreateBucketConfiguration(input.CreateBucketConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - body, - }); -}; -exports.serializeAws_restXmlCreateBucketCommand = serializeAws_restXmlCreateBucketCommand; -const serializeAws_restXmlCreateMultipartUploadCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-acl": input.ACL, - "cache-control": input.CacheControl, - "content-disposition": input.ContentDisposition, - "content-encoding": input.ContentEncoding, - "content-language": input.ContentLanguage, - "content-type": input.ContentType, - expires: [() => isSerializableHeaderValue(input.Expires), () => (0, smithy_client_1.dateToUtcString)(input.Expires).toString()], - "x-amz-grant-full-control": input.GrantFullControl, - "x-amz-grant-read": input.GrantRead, - "x-amz-grant-read-acp": input.GrantReadACP, - "x-amz-grant-write-acp": input.GrantWriteACP, - "x-amz-server-side-encryption": input.ServerSideEncryption, - "x-amz-storage-class": input.StorageClass, - "x-amz-website-redirect-location": input.WebsiteRedirectLocation, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-server-side-encryption-aws-kms-key-id": input.SSEKMSKeyId, - "x-amz-server-side-encryption-context": input.SSEKMSEncryptionContext, - "x-amz-server-side-encryption-bucket-key-enabled": [ - () => isSerializableHeaderValue(input.BucketKeyEnabled), - () => input.BucketKeyEnabled.toString(), - ], - "x-amz-request-payer": input.RequestPayer, - "x-amz-tagging": input.Tagging, - "x-amz-object-lock-mode": input.ObjectLockMode, - "x-amz-object-lock-retain-until-date": [ - () => isSerializableHeaderValue(input.ObjectLockRetainUntilDate), - () => (input.ObjectLockRetainUntilDate.toISOString().split(".")[0] + "Z").toString(), + b.m("PUT").h(headers).b(body); + return b.build(); +}; +exports.se_CreateBucketCommand = se_CreateBucketCommand; +const se_CreateMultipartUploadCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaa]: input[_ACL], + [_cc]: input[_CC], + [_cd]: input[_CD], + [_ce]: input[_CE], + [_cl]: input[_CL], + [_ct]: input[_CT], + [_e]: [() => isSerializableHeaderValue(input[_E]), () => (0, smithy_client_1.dateToUtcString)(input[_E]).toString()], + [_xagfc]: input[_GFC], + [_xagr]: input[_GR], + [_xagra]: input[_GRACP], + [_xagwa]: input[_GWACP], + [_xasse]: input[_SSE], + [_xasc]: input[_SC], + [_xawrl]: input[_WRL], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], + [_xasseakki]: input[_SSEKMSKI], + [_xassec]: input[_SSEKMSEC], + [_xassebke]: [() => isSerializableHeaderValue(input[_BKE]), () => input[_BKE].toString()], + [_xarp]: input[_RP], + [_xat]: input[_T], + [_xaolm]: input[_OLM], + [_xaolrud]: [ + () => isSerializableHeaderValue(input[_OLRUD]), + () => (input[_OLRUD].toISOString().split(".")[0] + "Z").toString(), ], - "x-amz-object-lock-legal-hold": input.ObjectLockLegalHoldStatus, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-checksum-algorithm": input.ChecksumAlgorithm, + [_xaollh]: input[_OLLHS], + [_xaebo]: input[_EBO], + [_xaca]: input[_CA], ...(input.Metadata !== undefined && - Object.keys(input.Metadata).reduce((acc, suffix) => ({ - ...acc, - [`x-amz-meta-${suffix.toLowerCase()}`]: input.Metadata[suffix], - }), {})), - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - uploads: [, ""], - "x-id": [, "CreateMultipartUpload"], + Object.keys(input.Metadata).reduce((acc, suffix) => { + acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix]; + return acc; + }, {})), + }); + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_u]: [, ""], + [_xi]: [, "CreateMultipartUpload"], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - query, - body, + b.m("POST").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_CreateMultipartUploadCommand = se_CreateMultipartUploadCommand; +const se_CreateSessionCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xacsm]: input[_SM], }); -}; -exports.serializeAws_restXmlCreateMultipartUploadCommand = serializeAws_restXmlCreateMultipartUploadCommand; -const serializeAws_restXmlDeleteBucketCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_s]: [, ""], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_CreateSessionCommand = se_CreateSessionCommand; +const se_DeleteBucketCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlDeleteBucketCommand = serializeAws_restXmlDeleteBucketCommand; -const serializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + let body; + b.m("DELETE").h(headers).b(body); + return b.build(); +}; +exports.se_DeleteBucketCommand = se_DeleteBucketCommand; +const se_DeleteBucketAnalyticsConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - analytics: [, ""], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_a]: [, ""], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand = serializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand; -const serializeAws_restXmlDeleteBucketCorsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketAnalyticsConfigurationCommand = se_DeleteBucketAnalyticsConfigurationCommand; +const se_DeleteBucketCorsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - cors: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_c]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketCorsCommand = serializeAws_restXmlDeleteBucketCorsCommand; -const serializeAws_restXmlDeleteBucketEncryptionCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketCorsCommand = se_DeleteBucketCorsCommand; +const se_DeleteBucketEncryptionCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - encryption: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_en]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlDeleteBucketEncryptionCommand = serializeAws_restXmlDeleteBucketEncryptionCommand; -const serializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); +exports.se_DeleteBucketEncryptionCommand = se_DeleteBucketEncryptionCommand; +const se_DeleteBucketIntelligentTieringConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); const headers = {}; - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - "intelligent-tiering": [, ""], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_it]: [, ""], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand = serializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand; -const serializeAws_restXmlDeleteBucketInventoryConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketIntelligentTieringConfigurationCommand = se_DeleteBucketIntelligentTieringConfigurationCommand; +const se_DeleteBucketInventoryConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - inventory: [, ""], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_in]: [, ""], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketInventoryConfigurationCommand = se_DeleteBucketInventoryConfigurationCommand; +const se_DeleteBucketLifecycleCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlDeleteBucketInventoryConfigurationCommand = serializeAws_restXmlDeleteBucketInventoryConfigurationCommand; -const serializeAws_restXmlDeleteBucketLifecycleCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - lifecycle: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_l]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketLifecycleCommand = serializeAws_restXmlDeleteBucketLifecycleCommand; -const serializeAws_restXmlDeleteBucketMetricsConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketLifecycleCommand = se_DeleteBucketLifecycleCommand; +const se_DeleteBucketMetricsConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - metrics: [, ""], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_m]: [, ""], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketMetricsConfigurationCommand = serializeAws_restXmlDeleteBucketMetricsConfigurationCommand; -const serializeAws_restXmlDeleteBucketOwnershipControlsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketMetricsConfigurationCommand = se_DeleteBucketMetricsConfigurationCommand; +const se_DeleteBucketOwnershipControlsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - ownershipControls: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_oC]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketOwnershipControlsCommand = serializeAws_restXmlDeleteBucketOwnershipControlsCommand; -const serializeAws_restXmlDeleteBucketPolicyCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketOwnershipControlsCommand = se_DeleteBucketOwnershipControlsCommand; +const se_DeleteBucketPolicyCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - policy: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_p]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketPolicyCommand = serializeAws_restXmlDeleteBucketPolicyCommand; -const serializeAws_restXmlDeleteBucketReplicationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketPolicyCommand = se_DeleteBucketPolicyCommand; +const se_DeleteBucketReplicationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - replication: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_r]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketReplicationCommand = serializeAws_restXmlDeleteBucketReplicationCommand; -const serializeAws_restXmlDeleteBucketTaggingCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketReplicationCommand = se_DeleteBucketReplicationCommand; +const se_DeleteBucketTaggingCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - tagging: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_t]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketTaggingCommand = serializeAws_restXmlDeleteBucketTaggingCommand; -const serializeAws_restXmlDeleteBucketWebsiteCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketTaggingCommand = se_DeleteBucketTaggingCommand; +const se_DeleteBucketWebsiteCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - website: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_w]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteBucketWebsiteCommand = serializeAws_restXmlDeleteBucketWebsiteCommand; -const serializeAws_restXmlDeleteObjectCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-mfa": input.MFA, - "x-amz-request-payer": input.RequestPayer, - "x-amz-bypass-governance-retention": [ - () => isSerializableHeaderValue(input.BypassGovernanceRetention), - () => input.BypassGovernanceRetention.toString(), - ], - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteBucketWebsiteCommand = se_DeleteBucketWebsiteCommand; +const se_DeleteObjectCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xam]: input[_MFA], + [_xarp]: input[_RP], + [_xabgr]: [() => isSerializableHeaderValue(input[_BGR]), () => input[_BGR].toString()], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "x-id": [, "DeleteObject"], - versionId: [, input.VersionId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "DeleteObject"], + [_vI]: [, input[_VI]], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlDeleteObjectCommand = serializeAws_restXmlDeleteObjectCommand; -const serializeAws_restXmlDeleteObjectsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_DeleteObjectCommand = se_DeleteObjectCommand; +const se_DeleteObjectsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-mfa": input.MFA, - "x-amz-request-payer": input.RequestPayer, - "x-amz-bypass-governance-retention": [ - () => isSerializableHeaderValue(input.BypassGovernanceRetention), - () => input.BypassGovernanceRetention.toString(), - ], - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, + [_xam]: input[_MFA], + [_xarp]: input[_RP], + [_xabgr]: [() => isSerializableHeaderValue(input[_BGR]), () => input[_BGR].toString()], + [_xaebo]: input[_EBO], + [_xasca]: input[_CA], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - delete: [, ""], - "x-id": [, "DeleteObjects"], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_d]: [, ""], + [_xi]: [, "DeleteObjects"], }); let body; - if (input.Delete !== undefined) { - body = serializeAws_restXmlDelete(input.Delete, context); - } let contents; if (input.Delete !== undefined) { - contents = serializeAws_restXmlDelete(input.Delete, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_Delete(input.Delete, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - query, - body, - }); + b.m("POST").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlDeleteObjectsCommand = serializeAws_restXmlDeleteObjectsCommand; -const serializeAws_restXmlDeleteObjectTaggingCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, +exports.se_DeleteObjectsCommand = se_DeleteObjectsCommand; +const se_DeleteObjectTaggingCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - tagging: [, ""], - versionId: [, input.VersionId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_t]: [, ""], + [_vI]: [, input[_VI]], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeleteObjectTaggingCommand = serializeAws_restXmlDeleteObjectTaggingCommand; -const serializeAws_restXmlDeletePublicAccessBlockCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeleteObjectTaggingCommand = se_DeleteObjectTaggingCommand; +const se_DeletePublicAccessBlockCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - publicAccessBlock: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_pAB]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "DELETE", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlDeletePublicAccessBlockCommand = serializeAws_restXmlDeletePublicAccessBlockCommand; -const serializeAws_restXmlGetBucketAccelerateConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("DELETE").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_DeletePublicAccessBlockCommand = se_DeletePublicAccessBlockCommand; +const se_GetBucketAccelerateConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], + [_xarp]: input[_RP], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - accelerate: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_ac]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketAccelerateConfigurationCommand = se_GetBucketAccelerateConfigurationCommand; +const se_GetBucketAclCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketAccelerateConfigurationCommand = serializeAws_restXmlGetBucketAccelerateConfigurationCommand; -const serializeAws_restXmlGetBucketAclCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - acl: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_acl]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetBucketAclCommand = serializeAws_restXmlGetBucketAclCommand; -const serializeAws_restXmlGetBucketAnalyticsConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketAclCommand = se_GetBucketAclCommand; +const se_GetBucketAnalyticsConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - analytics: [, ""], - "x-id": [, "GetBucketAnalyticsConfiguration"], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_a]: [, ""], + [_xi]: [, "GetBucketAnalyticsConfiguration"], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetBucketAnalyticsConfigurationCommand = serializeAws_restXmlGetBucketAnalyticsConfigurationCommand; -const serializeAws_restXmlGetBucketCorsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketAnalyticsConfigurationCommand = se_GetBucketAnalyticsConfigurationCommand; +const se_GetBucketCorsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - cors: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_c]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetBucketCorsCommand = serializeAws_restXmlGetBucketCorsCommand; -const serializeAws_restXmlGetBucketEncryptionCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketCorsCommand = se_GetBucketCorsCommand; +const se_GetBucketEncryptionCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - encryption: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_en]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); + b.m("GET").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlGetBucketEncryptionCommand = serializeAws_restXmlGetBucketEncryptionCommand; -const serializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); +exports.se_GetBucketEncryptionCommand = se_GetBucketEncryptionCommand; +const se_GetBucketIntelligentTieringConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); const headers = {}; - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - "intelligent-tiering": [, ""], - "x-id": [, "GetBucketIntelligentTieringConfiguration"], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_it]: [, ""], + [_xi]: [, "GetBucketIntelligentTieringConfiguration"], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand = serializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand; -const serializeAws_restXmlGetBucketInventoryConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketIntelligentTieringConfigurationCommand = se_GetBucketIntelligentTieringConfigurationCommand; +const se_GetBucketInventoryConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - inventory: [, ""], - "x-id": [, "GetBucketInventoryConfiguration"], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_in]: [, ""], + [_xi]: [, "GetBucketInventoryConfiguration"], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketInventoryConfigurationCommand = se_GetBucketInventoryConfigurationCommand; +const se_GetBucketLifecycleConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketInventoryConfigurationCommand = serializeAws_restXmlGetBucketInventoryConfigurationCommand; -const serializeAws_restXmlGetBucketLifecycleConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_l]: [, ""], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketLifecycleConfigurationCommand = se_GetBucketLifecycleConfigurationCommand; +const se_GetBucketLocationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - lifecycle: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_lo]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketLocationCommand = se_GetBucketLocationCommand; +const se_GetBucketLoggingCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketLifecycleConfigurationCommand = serializeAws_restXmlGetBucketLifecycleConfigurationCommand; -const serializeAws_restXmlGetBucketLocationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_log]: [, ""], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketLoggingCommand = se_GetBucketLoggingCommand; +const se_GetBucketMetricsConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - location: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_m]: [, ""], + [_xi]: [, "GetBucketMetricsConfiguration"], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketMetricsConfigurationCommand = se_GetBucketMetricsConfigurationCommand; +const se_GetBucketNotificationConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketLocationCommand = serializeAws_restXmlGetBucketLocationCommand; -const serializeAws_restXmlGetBucketLoggingCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_n]: [, ""], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketNotificationConfigurationCommand = se_GetBucketNotificationConfigurationCommand; +const se_GetBucketOwnershipControlsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - logging: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_oC]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketOwnershipControlsCommand = se_GetBucketOwnershipControlsCommand; +const se_GetBucketPolicyCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketLoggingCommand = serializeAws_restXmlGetBucketLoggingCommand; -const serializeAws_restXmlGetBucketMetricsConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_p]: [, ""], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketPolicyCommand = se_GetBucketPolicyCommand; +const se_GetBucketPolicyStatusCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - metrics: [, ""], - "x-id": [, "GetBucketMetricsConfiguration"], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_pS]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketPolicyStatusCommand = se_GetBucketPolicyStatusCommand; +const se_GetBucketReplicationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketMetricsConfigurationCommand = serializeAws_restXmlGetBucketMetricsConfigurationCommand; -const serializeAws_restXmlGetBucketNotificationConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_r]: [, ""], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketReplicationCommand = se_GetBucketReplicationCommand; +const se_GetBucketRequestPaymentCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - notification: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_rP]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketRequestPaymentCommand = se_GetBucketRequestPaymentCommand; +const se_GetBucketTaggingCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketNotificationConfigurationCommand = serializeAws_restXmlGetBucketNotificationConfigurationCommand; -const serializeAws_restXmlGetBucketOwnershipControlsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_t]: [, ""], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketTaggingCommand = se_GetBucketTaggingCommand; +const se_GetBucketVersioningCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - ownershipControls: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_v]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketVersioningCommand = se_GetBucketVersioningCommand; +const se_GetBucketWebsiteCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketOwnershipControlsCommand = serializeAws_restXmlGetBucketOwnershipControlsCommand; -const serializeAws_restXmlGetBucketPolicyCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_w]: [, ""], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetBucketWebsiteCommand = se_GetBucketWebsiteCommand; +const se_GetObjectCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_im]: input[_IM], + [_ims]: [() => isSerializableHeaderValue(input[_IMS]), () => (0, smithy_client_1.dateToUtcString)(input[_IMS]).toString()], + [_inm]: input[_INM], + [_ius]: [() => isSerializableHeaderValue(input[_IUS]), () => (0, smithy_client_1.dateToUtcString)(input[_IUS]).toString()], + [_ra]: input[_R], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], + [_xacm]: input[_CM], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - policy: [, ""], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "GetObject"], + [_rcc]: [, input[_RCC]], + [_rcd]: [, input[_RCD]], + [_rce]: [, input[_RCE]], + [_rcl]: [, input[_RCL]], + [_rct]: [, input[_RCT]], + [_re]: [() => input.ResponseExpires !== void 0, () => (0, smithy_client_1.dateToUtcString)(input[_RE]).toString()], + [_vI]: [, input[_VI]], + [_pN]: [() => input.PartNumber !== void 0, () => input[_PN].toString()], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetObjectCommand = se_GetObjectCommand; +const se_GetObjectAclCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketPolicyCommand = serializeAws_restXmlGetBucketPolicyCommand; -const serializeAws_restXmlGetBucketPolicyStatusCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_acl]: [, ""], + [_vI]: [, input[_VI]], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetObjectAclCommand = se_GetObjectAclCommand; +const se_GetObjectAttributesCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xamp]: [() => isSerializableHeaderValue(input[_MP]), () => input[_MP].toString()], + [_xapnm]: input[_PNM], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], + [_xaoa]: [ + () => isSerializableHeaderValue(input[_OA]), + () => (input[_OA] || []).map((_entry) => _entry).join(", "), + ], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - policyStatus: [, ""], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_at]: [, ""], + [_vI]: [, input[_VI]], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetObjectAttributesCommand = se_GetObjectAttributesCommand; +const se_GetObjectLegalHoldCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketPolicyStatusCommand = serializeAws_restXmlGetBucketPolicyStatusCommand; -const serializeAws_restXmlGetBucketReplicationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_lh]: [, ""], + [_vI]: [, input[_VI]], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - replication: [, ""], + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetObjectLegalHoldCommand = se_GetObjectLegalHoldCommand; +const se_GetObjectLockConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], + }); + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_ol]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetObjectLockConfigurationCommand = se_GetObjectLockConfigurationCommand; +const se_GetObjectRetentionCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketReplicationCommand = serializeAws_restXmlGetBucketReplicationCommand; -const serializeAws_restXmlGetBucketRequestPaymentCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_ret]: [, ""], + [_vI]: [, input[_VI]], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetObjectRetentionCommand = se_GetObjectRetentionCommand; +const se_GetObjectTaggingCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], + [_xarp]: input[_RP], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - requestPayment: [, ""], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_t]: [, ""], + [_vI]: [, input[_VI]], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetObjectTaggingCommand = se_GetObjectTaggingCommand; +const se_GetObjectTorrentCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketRequestPaymentCommand = serializeAws_restXmlGetBucketRequestPaymentCommand; -const serializeAws_restXmlGetBucketTaggingCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_to]: [, ""], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - tagging: [, ""], + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetObjectTorrentCommand = se_GetObjectTorrentCommand; +const se_GetPublicAccessBlockCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], + }); + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_pAB]: [, ""], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetPublicAccessBlockCommand = se_GetPublicAccessBlockCommand; +const se_HeadBucketCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketTaggingCommand = serializeAws_restXmlGetBucketTaggingCommand; -const serializeAws_restXmlGetBucketVersioningCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + let body; + b.m("HEAD").h(headers).b(body); + return b.build(); +}; +exports.se_HeadBucketCommand = se_HeadBucketCommand; +const se_HeadObjectCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_im]: input[_IM], + [_ims]: [() => isSerializableHeaderValue(input[_IMS]), () => (0, smithy_client_1.dateToUtcString)(input[_IMS]).toString()], + [_inm]: input[_INM], + [_ius]: [() => isSerializableHeaderValue(input[_IUS]), () => (0, smithy_client_1.dateToUtcString)(input[_IUS]).toString()], + [_ra]: input[_R], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], + [_xacm]: input[_CM], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - versioning: [, ""], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_vI]: [, input[_VI]], + [_pN]: [() => input.PartNumber !== void 0, () => input[_PN].toString()], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("HEAD").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_HeadObjectCommand = se_HeadObjectCommand; +const se_ListBucketAnalyticsConfigurationsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], + }); + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_a]: [, ""], + [_xi]: [, "ListBucketAnalyticsConfigurations"], + [_ct_]: [, input[_CTo]], }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlGetBucketVersioningCommand = serializeAws_restXmlGetBucketVersioningCommand; -const serializeAws_restXmlGetBucketWebsiteCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, +exports.se_ListBucketAnalyticsConfigurationsCommand = se_ListBucketAnalyticsConfigurationsCommand; +const se_ListBucketIntelligentTieringConfigurationsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = {}; + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_it]: [, ""], + [_xi]: [, "ListBucketIntelligentTieringConfigurations"], + [_ct_]: [, input[_CTo]], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListBucketIntelligentTieringConfigurationsCommand = se_ListBucketIntelligentTieringConfigurationsCommand; +const se_ListBucketInventoryConfigurationsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - website: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_in]: [, ""], + [_xi]: [, "ListBucketInventoryConfigurations"], + [_ct_]: [, input[_CTo]], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListBucketInventoryConfigurationsCommand = se_ListBucketInventoryConfigurationsCommand; +const se_ListBucketMetricsConfigurationsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], }); -}; -exports.serializeAws_restXmlGetBucketWebsiteCommand = serializeAws_restXmlGetBucketWebsiteCommand; -const serializeAws_restXmlGetObjectCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "if-match": input.IfMatch, - "if-modified-since": [ - () => isSerializableHeaderValue(input.IfModifiedSince), - () => (0, smithy_client_1.dateToUtcString)(input.IfModifiedSince).toString(), - ], - "if-none-match": input.IfNoneMatch, - "if-unmodified-since": [ - () => isSerializableHeaderValue(input.IfUnmodifiedSince), - () => (0, smithy_client_1.dateToUtcString)(input.IfUnmodifiedSince).toString(), - ], - range: input.Range, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-checksum-mode": input.ChecksumMode, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "x-id": [, "GetObject"], - "response-cache-control": [, input.ResponseCacheControl], - "response-content-disposition": [, input.ResponseContentDisposition], - "response-content-encoding": [, input.ResponseContentEncoding], - "response-content-language": [, input.ResponseContentLanguage], - "response-content-type": [, input.ResponseContentType], - "response-expires": [ - () => input.ResponseExpires !== void 0, - () => (0, smithy_client_1.dateToUtcString)(input.ResponseExpires).toString(), - ], - versionId: [, input.VersionId], - partNumber: [() => input.PartNumber !== void 0, () => input.PartNumber.toString()], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_m]: [, ""], + [_xi]: [, "ListBucketMetricsConfigurations"], + [_ct_]: [, input[_CTo]], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListBucketMetricsConfigurationsCommand = se_ListBucketMetricsConfigurationsCommand; +const se_ListBucketsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = { + "content-type": "application/xml", + }; + b.bp("/"); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "ListBuckets"], }); + let body; + body = ""; + b.m("GET").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlGetObjectCommand = serializeAws_restXmlGetObjectCommand; -const serializeAws_restXmlGetObjectAclCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, +exports.se_ListBucketsCommand = se_ListBucketsCommand; +const se_ListDirectoryBucketsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = {}; + b.bp("/"); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "ListDirectoryBuckets"], + [_ct_]: [, input[_CTo]], + [_mdb]: [() => input.MaxDirectoryBuckets !== void 0, () => input[_MDB].toString()], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListDirectoryBucketsCommand = se_ListDirectoryBucketsCommand; +const se_ListMultipartUploadsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], + [_xarp]: input[_RP], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - acl: [, ""], - versionId: [, input.VersionId], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_u]: [, ""], + [_de]: [, input[_D]], + [_et]: [, input[_ET]], + [_km]: [, input[_KM]], + [_mu]: [() => input.MaxUploads !== void 0, () => input[_MU].toString()], + [_pr]: [, input[_P]], + [_uim]: [, input[_UIM]], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListMultipartUploadsCommand = se_ListMultipartUploadsCommand; +const se_ListObjectsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], + [_xaooa]: [ + () => isSerializableHeaderValue(input[_OOA]), + () => (input[_OOA] || []).map((_entry) => _entry).join(", "), + ], }); -}; -exports.serializeAws_restXmlGetObjectAclCommand = serializeAws_restXmlGetObjectAclCommand; -const serializeAws_restXmlGetObjectAttributesCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-max-parts": [() => isSerializableHeaderValue(input.MaxParts), () => input.MaxParts.toString()], - "x-amz-part-number-marker": input.PartNumberMarker, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-object-attributes": [ - () => isSerializableHeaderValue(input.ObjectAttributes), - () => (input.ObjectAttributes || []).map((_entry) => _entry).join(", "), + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_de]: [, input[_D]], + [_et]: [, input[_ET]], + [_ma]: [, input[_M]], + [_mk]: [() => input.MaxKeys !== void 0, () => input[_MK].toString()], + [_pr]: [, input[_P]], + }); + let body; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListObjectsCommand = se_ListObjectsCommand; +const se_ListObjectsV2Command = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], + [_xaooa]: [ + () => isSerializableHeaderValue(input[_OOA]), + () => (input[_OOA] || []).map((_entry) => _entry).join(", "), ], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - attributes: [, ""], - versionId: [, input.VersionId], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_lt]: [, "2"], + [_de]: [, input[_D]], + [_et]: [, input[_ET]], + [_mk]: [() => input.MaxKeys !== void 0, () => input[_MK].toString()], + [_pr]: [, input[_P]], + [_ct_]: [, input[_CTo]], + [_fo]: [() => input.FetchOwner !== void 0, () => input[_FO].toString()], + [_sa]: [, input[_SA]], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetObjectAttributesCommand = serializeAws_restXmlGetObjectAttributesCommand; -const serializeAws_restXmlGetObjectLegalHoldCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "legal-hold": [, ""], - versionId: [, input.VersionId], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetObjectLegalHoldCommand = serializeAws_restXmlGetObjectLegalHoldCommand; -const serializeAws_restXmlGetObjectLockConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - "object-lock": [, ""], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetObjectLockConfigurationCommand = serializeAws_restXmlGetObjectLockConfigurationCommand; -const serializeAws_restXmlGetObjectRetentionCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - retention: [, ""], - versionId: [, input.VersionId], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetObjectRetentionCommand = serializeAws_restXmlGetObjectRetentionCommand; -const serializeAws_restXmlGetObjectTaggingCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-request-payer": input.RequestPayer, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - tagging: [, ""], - versionId: [, input.VersionId], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetObjectTaggingCommand = serializeAws_restXmlGetObjectTaggingCommand; -const serializeAws_restXmlGetObjectTorrentCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - torrent: [, ""], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetObjectTorrentCommand = serializeAws_restXmlGetObjectTorrentCommand; -const serializeAws_restXmlGetPublicAccessBlockCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - publicAccessBlock: [, ""], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlGetPublicAccessBlockCommand = serializeAws_restXmlGetPublicAccessBlockCommand; -const serializeAws_restXmlHeadBucketCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "HEAD", - headers, - path: resolvedPath, - body, - }); -}; -exports.serializeAws_restXmlHeadBucketCommand = serializeAws_restXmlHeadBucketCommand; -const serializeAws_restXmlHeadObjectCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "if-match": input.IfMatch, - "if-modified-since": [ - () => isSerializableHeaderValue(input.IfModifiedSince), - () => (0, smithy_client_1.dateToUtcString)(input.IfModifiedSince).toString(), + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListObjectsV2Command = se_ListObjectsV2Command; +const se_ListObjectVersionsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xaebo]: input[_EBO], + [_xarp]: input[_RP], + [_xaooa]: [ + () => isSerializableHeaderValue(input[_OOA]), + () => (input[_OOA] || []).map((_entry) => _entry).join(", "), ], - "if-none-match": input.IfNoneMatch, - "if-unmodified-since": [ - () => isSerializableHeaderValue(input.IfUnmodifiedSince), - () => (0, smithy_client_1.dateToUtcString)(input.IfUnmodifiedSince).toString(), - ], - range: input.Range, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-checksum-mode": input.ChecksumMode, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - versionId: [, input.VersionId], - partNumber: [() => input.PartNumber !== void 0, () => input.PartNumber.toString()], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "HEAD", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlHeadObjectCommand = serializeAws_restXmlHeadObjectCommand; -const serializeAws_restXmlListBucketAnalyticsConfigurationsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - analytics: [, ""], - "x-id": [, "ListBucketAnalyticsConfigurations"], - "continuation-token": [, input.ContinuationToken], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlListBucketAnalyticsConfigurationsCommand = serializeAws_restXmlListBucketAnalyticsConfigurationsCommand; -const serializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = {}; - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - "intelligent-tiering": [, ""], - "x-id": [, "ListBucketIntelligentTieringConfigurations"], - "continuation-token": [, input.ContinuationToken], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand = serializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand; -const serializeAws_restXmlListBucketInventoryConfigurationsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - inventory: [, ""], - "x-id": [, "ListBucketInventoryConfigurations"], - "continuation-token": [, input.ContinuationToken], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlListBucketInventoryConfigurationsCommand = serializeAws_restXmlListBucketInventoryConfigurationsCommand; -const serializeAws_restXmlListBucketMetricsConfigurationsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - metrics: [, ""], - "x-id": [, "ListBucketMetricsConfigurations"], - "continuation-token": [, input.ContinuationToken], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlListBucketMetricsConfigurationsCommand = serializeAws_restXmlListBucketMetricsConfigurationsCommand; -const serializeAws_restXmlListBucketsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = { - "content-type": "application/xml", - }; - const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/"; - let body; - body = ""; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - body, - }); -}; -exports.serializeAws_restXmlListBucketsCommand = serializeAws_restXmlListBucketsCommand; -const serializeAws_restXmlListMultipartUploadsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - uploads: [, ""], - delimiter: [, input.Delimiter], - "encoding-type": [, input.EncodingType], - "key-marker": [, input.KeyMarker], - "max-uploads": [() => input.MaxUploads !== void 0, () => input.MaxUploads.toString()], - prefix: [, input.Prefix], - "upload-id-marker": [, input.UploadIdMarker], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlListMultipartUploadsCommand = serializeAws_restXmlListMultipartUploadsCommand; -const serializeAws_restXmlListObjectsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - delimiter: [, input.Delimiter], - "encoding-type": [, input.EncodingType], - marker: [, input.Marker], - "max-keys": [() => input.MaxKeys !== void 0, () => input.MaxKeys.toString()], - prefix: [, input.Prefix], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlListObjectsCommand = serializeAws_restXmlListObjectsCommand; -const serializeAws_restXmlListObjectsV2Command = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - "list-type": [, "2"], - delimiter: [, input.Delimiter], - "encoding-type": [, input.EncodingType], - "max-keys": [() => input.MaxKeys !== void 0, () => input.MaxKeys.toString()], - prefix: [, input.Prefix], - "continuation-token": [, input.ContinuationToken], - "fetch-owner": [() => input.FetchOwner !== void 0, () => input.FetchOwner.toString()], - "start-after": [, input.StartAfter], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_ver]: [, ""], + [_de]: [, input[_D]], + [_et]: [, input[_ET]], + [_km]: [, input[_KM]], + [_mk]: [() => input.MaxKeys !== void 0, () => input[_MK].toString()], + [_pr]: [, input[_P]], + [_vim]: [, input[_VIM]], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlListObjectsV2Command = serializeAws_restXmlListObjectsV2Command; -const serializeAws_restXmlListObjectVersionsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - versions: [, ""], - delimiter: [, input.Delimiter], - "encoding-type": [, input.EncodingType], - "key-marker": [, input.KeyMarker], - "max-keys": [() => input.MaxKeys !== void 0, () => input.MaxKeys.toString()], - prefix: [, input.Prefix], - "version-id-marker": [, input.VersionIdMarker], - }); - let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListObjectVersionsCommand = se_ListObjectVersionsCommand; +const se_ListPartsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], }); -}; -exports.serializeAws_restXmlListObjectVersionsCommand = serializeAws_restXmlListObjectVersionsCommand; -const serializeAws_restXmlListPartsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "x-id": [, "ListParts"], - "max-parts": [() => input.MaxParts !== void 0, () => input.MaxParts.toString()], - "part-number-marker": [, input.PartNumberMarker], - uploadId: [, input.UploadId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "ListParts"], + [_mp]: [() => input.MaxParts !== void 0, () => input[_MP].toString()], + [_pnm]: [, input[_PNM]], + [_uI]: [, (0, smithy_client_1.expectNonNull)(input[_UI], `UploadId`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); + b.m("GET").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlListPartsCommand = serializeAws_restXmlListPartsCommand; -const serializeAws_restXmlPutBucketAccelerateConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_ListPartsCommand = se_ListPartsCommand; +const se_PutBucketAccelerateConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, + [_xaebo]: input[_EBO], + [_xasca]: input[_CA], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - accelerate: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_ac]: [, ""], }); let body; - if (input.AccelerateConfiguration !== undefined) { - body = serializeAws_restXmlAccelerateConfiguration(input.AccelerateConfiguration, context); - } let contents; if (input.AccelerateConfiguration !== undefined) { - contents = serializeAws_restXmlAccelerateConfiguration(input.AccelerateConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_AccelerateConfiguration(input.AccelerateConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketAccelerateConfigurationCommand = serializeAws_restXmlPutBucketAccelerateConfigurationCommand; -const serializeAws_restXmlPutBucketAclCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketAccelerateConfigurationCommand = se_PutBucketAccelerateConfigurationCommand; +const se_PutBucketAclCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-acl": input.ACL, - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-grant-full-control": input.GrantFullControl, - "x-amz-grant-read": input.GrantRead, - "x-amz-grant-read-acp": input.GrantReadACP, - "x-amz-grant-write": input.GrantWrite, - "x-amz-grant-write-acp": input.GrantWriteACP, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xaa]: input[_ACL], + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xagfc]: input[_GFC], + [_xagr]: input[_GR], + [_xagra]: input[_GRACP], + [_xagw]: input[_GW], + [_xagwa]: input[_GWACP], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - acl: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_acl]: [, ""], }); let body; - if (input.AccessControlPolicy !== undefined) { - body = serializeAws_restXmlAccessControlPolicy(input.AccessControlPolicy, context); - } let contents; if (input.AccessControlPolicy !== undefined) { - contents = serializeAws_restXmlAccessControlPolicy(input.AccessControlPolicy, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_AccessControlPolicy(input.AccessControlPolicy, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketAclCommand = serializeAws_restXmlPutBucketAclCommand; -const serializeAws_restXmlPutBucketAnalyticsConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketAclCommand = se_PutBucketAclCommand; +const se_PutBucketAnalyticsConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - analytics: [, ""], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_a]: [, ""], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - if (input.AnalyticsConfiguration !== undefined) { - body = serializeAws_restXmlAnalyticsConfiguration(input.AnalyticsConfiguration, context); - } let contents; if (input.AnalyticsConfiguration !== undefined) { - contents = serializeAws_restXmlAnalyticsConfiguration(input.AnalyticsConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_AnalyticsConfiguration(input.AnalyticsConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketAnalyticsConfigurationCommand = serializeAws_restXmlPutBucketAnalyticsConfigurationCommand; -const serializeAws_restXmlPutBucketCorsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketAnalyticsConfigurationCommand = se_PutBucketAnalyticsConfigurationCommand; +const se_PutBucketCorsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - cors: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_c]: [, ""], }); let body; - if (input.CORSConfiguration !== undefined) { - body = serializeAws_restXmlCORSConfiguration(input.CORSConfiguration, context); - } let contents; if (input.CORSConfiguration !== undefined) { - contents = serializeAws_restXmlCORSConfiguration(input.CORSConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_CORSConfiguration(input.CORSConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketCorsCommand = serializeAws_restXmlPutBucketCorsCommand; -const serializeAws_restXmlPutBucketEncryptionCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketCorsCommand = se_PutBucketCorsCommand; +const se_PutBucketEncryptionCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - encryption: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_en]: [, ""], }); let body; - if (input.ServerSideEncryptionConfiguration !== undefined) { - body = serializeAws_restXmlServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, context); - } let contents; if (input.ServerSideEncryptionConfiguration !== undefined) { - contents = serializeAws_restXmlServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_ServerSideEncryptionConfiguration(input.ServerSideEncryptionConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketEncryptionCommand = serializeAws_restXmlPutBucketEncryptionCommand; -const serializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); +exports.se_PutBucketEncryptionCommand = se_PutBucketEncryptionCommand; +const se_PutBucketIntelligentTieringConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); const headers = { "content-type": "application/xml", }; - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - "intelligent-tiering": [, ""], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_it]: [, ""], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - if (input.IntelligentTieringConfiguration !== undefined) { - body = serializeAws_restXmlIntelligentTieringConfiguration(input.IntelligentTieringConfiguration, context); - } let contents; if (input.IntelligentTieringConfiguration !== undefined) { - contents = serializeAws_restXmlIntelligentTieringConfiguration(input.IntelligentTieringConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_IntelligentTieringConfiguration(input.IntelligentTieringConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand = serializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand; -const serializeAws_restXmlPutBucketInventoryConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketIntelligentTieringConfigurationCommand = se_PutBucketIntelligentTieringConfigurationCommand; +const se_PutBucketInventoryConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - inventory: [, ""], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_in]: [, ""], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - if (input.InventoryConfiguration !== undefined) { - body = serializeAws_restXmlInventoryConfiguration(input.InventoryConfiguration, context); - } let contents; if (input.InventoryConfiguration !== undefined) { - contents = serializeAws_restXmlInventoryConfiguration(input.InventoryConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_InventoryConfiguration(input.InventoryConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketInventoryConfigurationCommand = serializeAws_restXmlPutBucketInventoryConfigurationCommand; -const serializeAws_restXmlPutBucketLifecycleConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketInventoryConfigurationCommand = se_PutBucketInventoryConfigurationCommand; +const se_PutBucketLifecycleConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - lifecycle: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_l]: [, ""], }); let body; - if (input.LifecycleConfiguration !== undefined) { - body = serializeAws_restXmlBucketLifecycleConfiguration(input.LifecycleConfiguration, context); - } let contents; if (input.LifecycleConfiguration !== undefined) { - contents = serializeAws_restXmlBucketLifecycleConfiguration(input.LifecycleConfiguration, context); - contents = contents.withName("LifecycleConfiguration"); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_BucketLifecycleConfiguration(input.LifecycleConfiguration, context); + contents = contents.n("LifecycleConfiguration"); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketLifecycleConfigurationCommand = serializeAws_restXmlPutBucketLifecycleConfigurationCommand; -const serializeAws_restXmlPutBucketLoggingCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketLifecycleConfigurationCommand = se_PutBucketLifecycleConfigurationCommand; +const se_PutBucketLoggingCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - logging: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_log]: [, ""], }); let body; - if (input.BucketLoggingStatus !== undefined) { - body = serializeAws_restXmlBucketLoggingStatus(input.BucketLoggingStatus, context); - } let contents; if (input.BucketLoggingStatus !== undefined) { - contents = serializeAws_restXmlBucketLoggingStatus(input.BucketLoggingStatus, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_BucketLoggingStatus(input.BucketLoggingStatus, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketLoggingCommand = serializeAws_restXmlPutBucketLoggingCommand; -const serializeAws_restXmlPutBucketMetricsConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketLoggingCommand = se_PutBucketLoggingCommand; +const se_PutBucketMetricsConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - metrics: [, ""], - id: [, input.Id], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_m]: [, ""], + [_i]: [, (0, smithy_client_1.expectNonNull)(input[_I], `Id`)], }); let body; - if (input.MetricsConfiguration !== undefined) { - body = serializeAws_restXmlMetricsConfiguration(input.MetricsConfiguration, context); - } let contents; if (input.MetricsConfiguration !== undefined) { - contents = serializeAws_restXmlMetricsConfiguration(input.MetricsConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_MetricsConfiguration(input.MetricsConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketMetricsConfigurationCommand = serializeAws_restXmlPutBucketMetricsConfigurationCommand; -const serializeAws_restXmlPutBucketNotificationConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketMetricsConfigurationCommand = se_PutBucketMetricsConfigurationCommand; +const se_PutBucketNotificationConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-skip-destination-validation": [ - () => isSerializableHeaderValue(input.SkipDestinationValidation), - () => input.SkipDestinationValidation.toString(), - ], + [_xaebo]: input[_EBO], + [_xasdv]: [() => isSerializableHeaderValue(input[_SDV]), () => input[_SDV].toString()], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - notification: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_n]: [, ""], }); let body; - if (input.NotificationConfiguration !== undefined) { - body = serializeAws_restXmlNotificationConfiguration(input.NotificationConfiguration, context); - } let contents; if (input.NotificationConfiguration !== undefined) { - contents = serializeAws_restXmlNotificationConfiguration(input.NotificationConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_NotificationConfiguration(input.NotificationConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketNotificationConfigurationCommand = serializeAws_restXmlPutBucketNotificationConfigurationCommand; -const serializeAws_restXmlPutBucketOwnershipControlsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketNotificationConfigurationCommand = se_PutBucketNotificationConfigurationCommand; +const se_PutBucketOwnershipControlsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - ownershipControls: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_oC]: [, ""], }); let body; - if (input.OwnershipControls !== undefined) { - body = serializeAws_restXmlOwnershipControls(input.OwnershipControls, context); - } let contents; if (input.OwnershipControls !== undefined) { - contents = serializeAws_restXmlOwnershipControls(input.OwnershipControls, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_OwnershipControls(input.OwnershipControls, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketOwnershipControlsCommand = serializeAws_restXmlPutBucketOwnershipControlsCommand; -const serializeAws_restXmlPutBucketPolicyCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketOwnershipControlsCommand = se_PutBucketOwnershipControlsCommand; +const se_PutBucketPolicyCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "text/plain", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-confirm-remove-self-bucket-access": [ - () => isSerializableHeaderValue(input.ConfirmRemoveSelfBucketAccess), - () => input.ConfirmRemoveSelfBucketAccess.toString(), - ], - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xacrsba]: [() => isSerializableHeaderValue(input[_CRSBA]), () => input[_CRSBA].toString()], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - policy: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_p]: [, ""], }); let body; - if (input.Policy !== undefined) { - body = input.Policy; - } let contents; if (input.Policy !== undefined) { contents = input.Policy; body = contents; } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketPolicyCommand = serializeAws_restXmlPutBucketPolicyCommand; -const serializeAws_restXmlPutBucketReplicationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketPolicyCommand = se_PutBucketPolicyCommand; +const se_PutBucketReplicationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-bucket-object-lock-token": input.Token, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xabolt]: input[_To], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - replication: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_r]: [, ""], }); let body; - if (input.ReplicationConfiguration !== undefined) { - body = serializeAws_restXmlReplicationConfiguration(input.ReplicationConfiguration, context); - } let contents; if (input.ReplicationConfiguration !== undefined) { - contents = serializeAws_restXmlReplicationConfiguration(input.ReplicationConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_ReplicationConfiguration(input.ReplicationConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketReplicationCommand = serializeAws_restXmlPutBucketReplicationCommand; -const serializeAws_restXmlPutBucketRequestPaymentCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketReplicationCommand = se_PutBucketReplicationCommand; +const se_PutBucketRequestPaymentCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - requestPayment: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_rP]: [, ""], }); let body; - if (input.RequestPaymentConfiguration !== undefined) { - body = serializeAws_restXmlRequestPaymentConfiguration(input.RequestPaymentConfiguration, context); - } let contents; if (input.RequestPaymentConfiguration !== undefined) { - contents = serializeAws_restXmlRequestPaymentConfiguration(input.RequestPaymentConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_RequestPaymentConfiguration(input.RequestPaymentConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketRequestPaymentCommand = serializeAws_restXmlPutBucketRequestPaymentCommand; -const serializeAws_restXmlPutBucketTaggingCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketRequestPaymentCommand = se_PutBucketRequestPaymentCommand; +const se_PutBucketTaggingCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - tagging: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_t]: [, ""], }); let body; - if (input.Tagging !== undefined) { - body = serializeAws_restXmlTagging(input.Tagging, context); - } let contents; if (input.Tagging !== undefined) { - contents = serializeAws_restXmlTagging(input.Tagging, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_Tagging(input.Tagging, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketTaggingCommand = serializeAws_restXmlPutBucketTaggingCommand; -const serializeAws_restXmlPutBucketVersioningCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketTaggingCommand = se_PutBucketTaggingCommand; +const se_PutBucketVersioningCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-mfa": input.MFA, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xam]: input[_MFA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - versioning: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_v]: [, ""], }); let body; - if (input.VersioningConfiguration !== undefined) { - body = serializeAws_restXmlVersioningConfiguration(input.VersioningConfiguration, context); - } let contents; if (input.VersioningConfiguration !== undefined) { - contents = serializeAws_restXmlVersioningConfiguration(input.VersioningConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_VersioningConfiguration(input.VersioningConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutBucketVersioningCommand = serializeAws_restXmlPutBucketVersioningCommand; -const serializeAws_restXmlPutBucketWebsiteCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutBucketVersioningCommand = se_PutBucketVersioningCommand; +const se_PutBucketWebsiteCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - website: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_w]: [, ""], }); let body; - if (input.WebsiteConfiguration !== undefined) { - body = serializeAws_restXmlWebsiteConfiguration(input.WebsiteConfiguration, context); - } let contents; if (input.WebsiteConfiguration !== undefined) { - contents = serializeAws_restXmlWebsiteConfiguration(input.WebsiteConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_WebsiteConfiguration(input.WebsiteConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlPutBucketWebsiteCommand = serializeAws_restXmlPutBucketWebsiteCommand; -const serializeAws_restXmlPutObjectCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "content-type": input.ContentType || "application/octet-stream", - "x-amz-acl": input.ACL, - "cache-control": input.CacheControl, - "content-disposition": input.ContentDisposition, - "content-encoding": input.ContentEncoding, - "content-language": input.ContentLanguage, - "content-length": [() => isSerializableHeaderValue(input.ContentLength), () => input.ContentLength.toString()], - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-checksum-crc32": input.ChecksumCRC32, - "x-amz-checksum-crc32c": input.ChecksumCRC32C, - "x-amz-checksum-sha1": input.ChecksumSHA1, - "x-amz-checksum-sha256": input.ChecksumSHA256, - expires: [() => isSerializableHeaderValue(input.Expires), () => (0, smithy_client_1.dateToUtcString)(input.Expires).toString()], - "x-amz-grant-full-control": input.GrantFullControl, - "x-amz-grant-read": input.GrantRead, - "x-amz-grant-read-acp": input.GrantReadACP, - "x-amz-grant-write-acp": input.GrantWriteACP, - "x-amz-server-side-encryption": input.ServerSideEncryption, - "x-amz-storage-class": input.StorageClass, - "x-amz-website-redirect-location": input.WebsiteRedirectLocation, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-server-side-encryption-aws-kms-key-id": input.SSEKMSKeyId, - "x-amz-server-side-encryption-context": input.SSEKMSEncryptionContext, - "x-amz-server-side-encryption-bucket-key-enabled": [ - () => isSerializableHeaderValue(input.BucketKeyEnabled), - () => input.BucketKeyEnabled.toString(), + b.m("PUT").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_PutBucketWebsiteCommand = se_PutBucketWebsiteCommand; +const se_PutObjectCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_ct]: input[_CT] || "application/octet-stream", + [_xaa]: input[_ACL], + [_cc]: input[_CC], + [_cd]: input[_CD], + [_ce]: input[_CE], + [_cl]: input[_CL], + [_cl_]: [() => isSerializableHeaderValue(input[_CLo]), () => input[_CLo].toString()], + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xacc]: input[_CCRC], + [_xacc_]: input[_CCRCC], + [_xacs]: input[_CSHA], + [_xacs_]: input[_CSHAh], + [_e]: [() => isSerializableHeaderValue(input[_E]), () => (0, smithy_client_1.dateToUtcString)(input[_E]).toString()], + [_xagfc]: input[_GFC], + [_xagr]: input[_GR], + [_xagra]: input[_GRACP], + [_xagwa]: input[_GWACP], + [_xasse]: input[_SSE], + [_xasc]: input[_SC], + [_xawrl]: input[_WRL], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], + [_xasseakki]: input[_SSEKMSKI], + [_xassec]: input[_SSEKMSEC], + [_xassebke]: [() => isSerializableHeaderValue(input[_BKE]), () => input[_BKE].toString()], + [_xarp]: input[_RP], + [_xat]: input[_T], + [_xaolm]: input[_OLM], + [_xaolrud]: [ + () => isSerializableHeaderValue(input[_OLRUD]), + () => (input[_OLRUD].toISOString().split(".")[0] + "Z").toString(), ], - "x-amz-request-payer": input.RequestPayer, - "x-amz-tagging": input.Tagging, - "x-amz-object-lock-mode": input.ObjectLockMode, - "x-amz-object-lock-retain-until-date": [ - () => isSerializableHeaderValue(input.ObjectLockRetainUntilDate), - () => (input.ObjectLockRetainUntilDate.toISOString().split(".")[0] + "Z").toString(), - ], - "x-amz-object-lock-legal-hold": input.ObjectLockLegalHoldStatus, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xaollh]: input[_OLLHS], + [_xaebo]: input[_EBO], ...(input.Metadata !== undefined && - Object.keys(input.Metadata).reduce((acc, suffix) => ({ - ...acc, - [`x-amz-meta-${suffix.toLowerCase()}`]: input.Metadata[suffix], - }), {})), + Object.keys(input.Metadata).reduce((acc, suffix) => { + acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix]; + return acc; + }, {})), }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "x-id": [, "PutObject"], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "PutObject"], }); let body; - if (input.Body !== undefined) { - body = input.Body; - } let contents; if (input.Body !== undefined) { contents = input.Body; body = contents; } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutObjectCommand = serializeAws_restXmlPutObjectCommand; -const serializeAws_restXmlPutObjectAclCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutObjectCommand = se_PutObjectCommand; +const se_PutObjectAclCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-acl": input.ACL, - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-grant-full-control": input.GrantFullControl, - "x-amz-grant-read": input.GrantRead, - "x-amz-grant-read-acp": input.GrantReadACP, - "x-amz-grant-write": input.GrantWrite, - "x-amz-grant-write-acp": input.GrantWriteACP, - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xaa]: input[_ACL], + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xagfc]: input[_GFC], + [_xagr]: input[_GR], + [_xagra]: input[_GRACP], + [_xagw]: input[_GW], + [_xagwa]: input[_GWACP], + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - acl: [, ""], - versionId: [, input.VersionId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_acl]: [, ""], + [_vI]: [, input[_VI]], }); let body; - if (input.AccessControlPolicy !== undefined) { - body = serializeAws_restXmlAccessControlPolicy(input.AccessControlPolicy, context); - } let contents; if (input.AccessControlPolicy !== undefined) { - contents = serializeAws_restXmlAccessControlPolicy(input.AccessControlPolicy, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_AccessControlPolicy(input.AccessControlPolicy, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutObjectAclCommand = serializeAws_restXmlPutObjectAclCommand; -const serializeAws_restXmlPutObjectLegalHoldCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutObjectAclCommand = se_PutObjectAclCommand; +const se_PutObjectLegalHoldCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-request-payer": input.RequestPayer, - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xarp]: input[_RP], + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "legal-hold": [, ""], - versionId: [, input.VersionId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_lh]: [, ""], + [_vI]: [, input[_VI]], }); let body; - if (input.LegalHold !== undefined) { - body = serializeAws_restXmlObjectLockLegalHold(input.LegalHold, context); - } let contents; if (input.LegalHold !== undefined) { - contents = serializeAws_restXmlObjectLockLegalHold(input.LegalHold, context); - contents = contents.withName("LegalHold"); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_ObjectLockLegalHold(input.LegalHold, context); + contents = contents.n("LegalHold"); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutObjectLegalHoldCommand = serializeAws_restXmlPutObjectLegalHoldCommand; -const serializeAws_restXmlPutObjectLockConfigurationCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutObjectLegalHoldCommand = se_PutObjectLegalHoldCommand; +const se_PutObjectLockConfigurationCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-request-payer": input.RequestPayer, - "x-amz-bucket-object-lock-token": input.Token, - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xarp]: input[_RP], + [_xabolt]: input[_To], + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - "object-lock": [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_ol]: [, ""], }); let body; - if (input.ObjectLockConfiguration !== undefined) { - body = serializeAws_restXmlObjectLockConfiguration(input.ObjectLockConfiguration, context); - } let contents; if (input.ObjectLockConfiguration !== undefined) { - contents = serializeAws_restXmlObjectLockConfiguration(input.ObjectLockConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_ObjectLockConfiguration(input.ObjectLockConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutObjectLockConfigurationCommand = serializeAws_restXmlPutObjectLockConfigurationCommand; -const serializeAws_restXmlPutObjectRetentionCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutObjectLockConfigurationCommand = se_PutObjectLockConfigurationCommand; +const se_PutObjectRetentionCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-request-payer": input.RequestPayer, - "x-amz-bypass-governance-retention": [ - () => isSerializableHeaderValue(input.BypassGovernanceRetention), - () => input.BypassGovernanceRetention.toString(), - ], - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xarp]: input[_RP], + [_xabgr]: [() => isSerializableHeaderValue(input[_BGR]), () => input[_BGR].toString()], + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - retention: [, ""], - versionId: [, input.VersionId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_ret]: [, ""], + [_vI]: [, input[_VI]], }); let body; - if (input.Retention !== undefined) { - body = serializeAws_restXmlObjectLockRetention(input.Retention, context); - } let contents; if (input.Retention !== undefined) { - contents = serializeAws_restXmlObjectLockRetention(input.Retention, context); - contents = contents.withName("Retention"); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_ObjectLockRetention(input.Retention, context); + contents = contents.n("Retention"); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutObjectRetentionCommand = serializeAws_restXmlPutObjectRetentionCommand; -const serializeAws_restXmlPutObjectTaggingCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutObjectRetentionCommand = se_PutObjectRetentionCommand; +const se_PutObjectTaggingCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-request-payer": input.RequestPayer, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], + [_xarp]: input[_RP], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - tagging: [, ""], - versionId: [, input.VersionId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_t]: [, ""], + [_vI]: [, input[_VI]], }); let body; - if (input.Tagging !== undefined) { - body = serializeAws_restXmlTagging(input.Tagging, context); - } let contents; if (input.Tagging !== undefined) { - contents = serializeAws_restXmlTagging(input.Tagging, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_Tagging(input.Tagging, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutObjectTaggingCommand = serializeAws_restXmlPutObjectTaggingCommand; -const serializeAws_restXmlPutPublicAccessBlockCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutObjectTaggingCommand = se_PutObjectTaggingCommand; +const se_PutPublicAccessBlockCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - const query = map({ - publicAccessBlock: [, ""], + b.bp("/"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + const query = (0, smithy_client_1.map)({ + [_pAB]: [, ""], }); let body; - if (input.PublicAccessBlockConfiguration !== undefined) { - body = serializeAws_restXmlPublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, context); - } let contents; if (input.PublicAccessBlockConfiguration !== undefined) { - contents = serializeAws_restXmlPublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_PublicAccessBlockConfiguration(input.PublicAccessBlockConfiguration, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlPutPublicAccessBlockCommand = serializeAws_restXmlPutPublicAccessBlockCommand; -const serializeAws_restXmlRestoreObjectCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_PutPublicAccessBlockCommand = se_PutPublicAccessBlockCommand; +const se_RestoreObjectCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-request-payer": input.RequestPayer, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xarp]: input[_RP], + [_xasca]: input[_CA], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - restore: [, ""], - "x-id": [, "RestoreObject"], - versionId: [, input.VersionId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_res]: [, ""], + [_xi]: [, "RestoreObject"], + [_vI]: [, input[_VI]], }); let body; - if (input.RestoreRequest !== undefined) { - body = serializeAws_restXmlRestoreRequest(input.RestoreRequest, context); - } let contents; if (input.RestoreRequest !== undefined) { - contents = serializeAws_restXmlRestoreRequest(input.RestoreRequest, context); - body = ''; - contents.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + contents = se_RestoreRequest(input.RestoreRequest, context); + body = _ve; + contents.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); body += contents.toString(); } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - query, - body, - }); + b.m("POST").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlRestoreObjectCommand = serializeAws_restXmlRestoreObjectCommand; -const serializeAws_restXmlSelectObjectContentCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_RestoreObjectCommand = se_RestoreObjectCommand; +const se_SelectObjectContentCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/xml", - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - select: [, ""], - "select-type": [, "2"], - "x-id": [, "SelectObjectContent"], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_se]: [, ""], + [_st]: [, "2"], + [_xi]: [, "SelectObjectContent"], }); let body; - body = ''; - const bodyNode = new xml_builder_1.XmlNode("SelectObjectContentRequest"); - bodyNode.addAttribute("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); - if (input.Expression !== undefined) { - const node = xml_builder_1.XmlNode.of("Expression", input.Expression).withName("Expression"); - bodyNode.addChildNode(node); - } - if (input.ExpressionType !== undefined) { - const node = xml_builder_1.XmlNode.of("ExpressionType", input.ExpressionType).withName("ExpressionType"); - bodyNode.addChildNode(node); - } - if (input.InputSerialization !== undefined) { - const node = serializeAws_restXmlInputSerialization(input.InputSerialization, context).withName("InputSerialization"); - bodyNode.addChildNode(node); - } - if (input.OutputSerialization !== undefined) { - const node = serializeAws_restXmlOutputSerialization(input.OutputSerialization, context).withName("OutputSerialization"); - bodyNode.addChildNode(node); - } - if (input.RequestProgress !== undefined) { - const node = serializeAws_restXmlRequestProgress(input.RequestProgress, context).withName("RequestProgress"); - bodyNode.addChildNode(node); - } - if (input.ScanRange !== undefined) { - const node = serializeAws_restXmlScanRange(input.ScanRange, context).withName("ScanRange"); - bodyNode.addChildNode(node); - } - body += bodyNode.toString(); - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restXmlSelectObjectContentCommand = serializeAws_restXmlSelectObjectContentCommand; -const serializeAws_restXmlUploadPartCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { + body = _ve; + const bn = new xml_builder_1.XmlNode(_SOCR); + bn.a("xmlns", "http://s3.amazonaws.com/doc/2006-03-01/"); + bn.cc(input, _Ex); + bn.cc(input, _ETx); + if (input[_IS] != null) { + bn.c(se_InputSerialization(input[_IS], context).n(_IS)); + } + if (input[_OS] != null) { + bn.c(se_OutputSerialization(input[_OS], context).n(_OS)); + } + if (input[_RPe] != null) { + bn.c(se_RequestProgress(input[_RPe], context).n(_RPe)); + } + if (input[_SR] != null) { + bn.c(se_ScanRange(input[_SR], context).n(_SR)); + } + body += bn.toString(); + b.m("POST").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_SelectObjectContentCommand = se_SelectObjectContentCommand; +const se_UploadPartCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "content-type": "application/octet-stream", - "content-length": [() => isSerializableHeaderValue(input.ContentLength), () => input.ContentLength.toString()], - "content-md5": input.ContentMD5, - "x-amz-sdk-checksum-algorithm": input.ChecksumAlgorithm, - "x-amz-checksum-crc32": input.ChecksumCRC32, - "x-amz-checksum-crc32c": input.ChecksumCRC32C, - "x-amz-checksum-sha1": input.ChecksumSHA1, - "x-amz-checksum-sha256": input.ChecksumSHA256, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, + [_cl_]: [() => isSerializableHeaderValue(input[_CLo]), () => input[_CLo].toString()], + [_cm]: input[_CMD], + [_xasca]: input[_CA], + [_xacc]: input[_CCRC], + [_xacc_]: input[_CCRCC], + [_xacs]: input[_CSHA], + [_xacs_]: input[_CSHAh], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "x-id": [, "UploadPart"], - partNumber: [() => input.PartNumber !== void 0, () => input.PartNumber.toString()], - uploadId: [, input.UploadId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "UploadPart"], + [_pN]: [(0, smithy_client_1.expectNonNull)(input.PartNumber, `PartNumber`) != null, () => input[_PN].toString()], + [_uI]: [, (0, smithy_client_1.expectNonNull)(input[_UI], `UploadId`)], }); let body; - if (input.Body !== undefined) { - body = input.Body; - } let contents; if (input.Body !== undefined) { contents = input.Body; body = contents; } - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, + b.m("PUT").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_UploadPartCommand = se_UploadPartCommand; +const se_UploadPartCopyCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xacs__]: input[_CS], + [_xacsim]: input[_CSIM], + [_xacsims]: [() => isSerializableHeaderValue(input[_CSIMS]), () => (0, smithy_client_1.dateToUtcString)(input[_CSIMS]).toString()], + [_xacsinm]: input[_CSINM], + [_xacsius]: [() => isSerializableHeaderValue(input[_CSIUS]), () => (0, smithy_client_1.dateToUtcString)(input[_CSIUS]).toString()], + [_xacsr]: input[_CSR], + [_xasseca]: input[_SSECA], + [_xasseck]: input[_SSECK], + [_xasseckm]: input[_SSECKMD], + [_xacssseca]: input[_CSSSECA], + [_xacssseck]: input[_CSSSECK], + [_xacssseckm]: input[_CSSSECKMD], + [_xarp]: input[_RP], + [_xaebo]: input[_EBO], + [_xasebo]: input[_ESBO], }); -}; -exports.serializeAws_restXmlUploadPartCommand = serializeAws_restXmlUploadPartCommand; -const serializeAws_restXmlUploadPartCopyCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-copy-source": input.CopySource, - "x-amz-copy-source-if-match": input.CopySourceIfMatch, - "x-amz-copy-source-if-modified-since": [ - () => isSerializableHeaderValue(input.CopySourceIfModifiedSince), - () => (0, smithy_client_1.dateToUtcString)(input.CopySourceIfModifiedSince).toString(), - ], - "x-amz-copy-source-if-none-match": input.CopySourceIfNoneMatch, - "x-amz-copy-source-if-unmodified-since": [ - () => isSerializableHeaderValue(input.CopySourceIfUnmodifiedSince), - () => (0, smithy_client_1.dateToUtcString)(input.CopySourceIfUnmodifiedSince).toString(), - ], - "x-amz-copy-source-range": input.CopySourceRange, - "x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-server-side-encryption-customer-key": input.SSECustomerKey, - "x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-copy-source-server-side-encryption-customer-algorithm": input.CopySourceSSECustomerAlgorithm, - "x-amz-copy-source-server-side-encryption-customer-key": input.CopySourceSSECustomerKey, - "x-amz-copy-source-server-side-encryption-customer-key-md5": input.CopySourceSSECustomerKeyMD5, - "x-amz-request-payer": input.RequestPayer, - "x-amz-expected-bucket-owner": input.ExpectedBucketOwner, - "x-amz-source-expected-bucket-owner": input.ExpectedSourceBucketOwner, - }); - let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/{Bucket}/{Key+}"; - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Bucket", () => input.Bucket, "{Bucket}", false); - resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "Key", () => input.Key, "{Key+}", true); - const query = map({ - "x-id": [, "UploadPartCopy"], - partNumber: [() => input.PartNumber !== void 0, () => input.PartNumber.toString()], - uploadId: [, input.UploadId], + b.bp("/{Key+}"); + b.p("Bucket", () => input.Bucket, "{Bucket}", false); + b.p("Key", () => input.Key, "{Key+}", true); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "UploadPartCopy"], + [_pN]: [(0, smithy_client_1.expectNonNull)(input.PartNumber, `PartNumber`) != null, () => input[_PN].toString()], + [_uI]: [, (0, smithy_client_1.expectNonNull)(input[_UI], `UploadId`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "PUT", - headers, - path: resolvedPath, - query, - body, - }); + b.m("PUT").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlUploadPartCopyCommand = serializeAws_restXmlUploadPartCopyCommand; -const serializeAws_restXmlWriteGetObjectResponseCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { +exports.se_UploadPartCopyCommand = se_UploadPartCopyCommand; +const se_WriteGetObjectResponseCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { "x-amz-content-sha256": "UNSIGNED-PAYLOAD", "content-type": "application/octet-stream", - "x-amz-request-route": input.RequestRoute, - "x-amz-request-token": input.RequestToken, - "x-amz-fwd-status": [() => isSerializableHeaderValue(input.StatusCode), () => input.StatusCode.toString()], - "x-amz-fwd-error-code": input.ErrorCode, - "x-amz-fwd-error-message": input.ErrorMessage, - "x-amz-fwd-header-accept-ranges": input.AcceptRanges, - "x-amz-fwd-header-cache-control": input.CacheControl, - "x-amz-fwd-header-content-disposition": input.ContentDisposition, - "x-amz-fwd-header-content-encoding": input.ContentEncoding, - "x-amz-fwd-header-content-language": input.ContentLanguage, - "content-length": [() => isSerializableHeaderValue(input.ContentLength), () => input.ContentLength.toString()], - "x-amz-fwd-header-content-range": input.ContentRange, - "x-amz-fwd-header-content-type": input.ContentType, - "x-amz-fwd-header-x-amz-checksum-crc32": input.ChecksumCRC32, - "x-amz-fwd-header-x-amz-checksum-crc32c": input.ChecksumCRC32C, - "x-amz-fwd-header-x-amz-checksum-sha1": input.ChecksumSHA1, - "x-amz-fwd-header-x-amz-checksum-sha256": input.ChecksumSHA256, - "x-amz-fwd-header-x-amz-delete-marker": [ - () => isSerializableHeaderValue(input.DeleteMarker), - () => input.DeleteMarker.toString(), - ], - "x-amz-fwd-header-etag": input.ETag, - "x-amz-fwd-header-expires": [ - () => isSerializableHeaderValue(input.Expires), - () => (0, smithy_client_1.dateToUtcString)(input.Expires).toString(), - ], - "x-amz-fwd-header-x-amz-expiration": input.Expiration, - "x-amz-fwd-header-last-modified": [ - () => isSerializableHeaderValue(input.LastModified), - () => (0, smithy_client_1.dateToUtcString)(input.LastModified).toString(), - ], - "x-amz-fwd-header-x-amz-missing-meta": [ - () => isSerializableHeaderValue(input.MissingMeta), - () => input.MissingMeta.toString(), - ], - "x-amz-fwd-header-x-amz-object-lock-mode": input.ObjectLockMode, - "x-amz-fwd-header-x-amz-object-lock-legal-hold": input.ObjectLockLegalHoldStatus, - "x-amz-fwd-header-x-amz-object-lock-retain-until-date": [ - () => isSerializableHeaderValue(input.ObjectLockRetainUntilDate), - () => (input.ObjectLockRetainUntilDate.toISOString().split(".")[0] + "Z").toString(), - ], - "x-amz-fwd-header-x-amz-mp-parts-count": [ - () => isSerializableHeaderValue(input.PartsCount), - () => input.PartsCount.toString(), - ], - "x-amz-fwd-header-x-amz-replication-status": input.ReplicationStatus, - "x-amz-fwd-header-x-amz-request-charged": input.RequestCharged, - "x-amz-fwd-header-x-amz-restore": input.Restore, - "x-amz-fwd-header-x-amz-server-side-encryption": input.ServerSideEncryption, - "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm": input.SSECustomerAlgorithm, - "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id": input.SSEKMSKeyId, - "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5": input.SSECustomerKeyMD5, - "x-amz-fwd-header-x-amz-storage-class": input.StorageClass, - "x-amz-fwd-header-x-amz-tagging-count": [ - () => isSerializableHeaderValue(input.TagCount), - () => input.TagCount.toString(), - ], - "x-amz-fwd-header-x-amz-version-id": input.VersionId, - "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled": [ - () => isSerializableHeaderValue(input.BucketKeyEnabled), - () => input.BucketKeyEnabled.toString(), + [_xarr]: input[_RR], + [_xart]: input[_RT], + [_xafs]: [() => isSerializableHeaderValue(input[_SCt]), () => input[_SCt].toString()], + [_xafec]: input[_EC], + [_xafem]: input[_EM], + [_xafhar]: input[_AR], + [_xafhcc]: input[_CC], + [_xafhcd]: input[_CD], + [_xafhce]: input[_CE], + [_xafhcl]: input[_CL], + [_cl_]: [() => isSerializableHeaderValue(input[_CLo]), () => input[_CLo].toString()], + [_xafhcr]: input[_CR], + [_xafhct]: input[_CT], + [_xafhxacc]: input[_CCRC], + [_xafhxacc_]: input[_CCRCC], + [_xafhxacs]: input[_CSHA], + [_xafhxacs_]: input[_CSHAh], + [_xafhxadm]: [() => isSerializableHeaderValue(input[_DM]), () => input[_DM].toString()], + [_xafhe]: input[_ETa], + [_xafhe_]: [() => isSerializableHeaderValue(input[_E]), () => (0, smithy_client_1.dateToUtcString)(input[_E]).toString()], + [_xafhxae]: input[_Exp], + [_xafhlm]: [() => isSerializableHeaderValue(input[_LM]), () => (0, smithy_client_1.dateToUtcString)(input[_LM]).toString()], + [_xafhxamm]: [() => isSerializableHeaderValue(input[_MM]), () => input[_MM].toString()], + [_xafhxaolm]: input[_OLM], + [_xafhxaollh]: input[_OLLHS], + [_xafhxaolrud]: [ + () => isSerializableHeaderValue(input[_OLRUD]), + () => (input[_OLRUD].toISOString().split(".")[0] + "Z").toString(), ], + [_xafhxampc]: [() => isSerializableHeaderValue(input[_PC]), () => input[_PC].toString()], + [_xafhxars]: input[_RS], + [_xafhxarc]: input[_RC], + [_xafhxar]: input[_Re], + [_xafhxasse]: input[_SSE], + [_xafhxasseca]: input[_SSECA], + [_xafhxasseakki]: input[_SSEKMSKI], + [_xafhxasseckm]: input[_SSECKMD], + [_xafhxasc]: input[_SC], + [_xafhxatc]: [() => isSerializableHeaderValue(input[_TC]), () => input[_TC].toString()], + [_xafhxavi]: input[_VI], + [_xafhxassebke]: [() => isSerializableHeaderValue(input[_BKE]), () => input[_BKE].toString()], ...(input.Metadata !== undefined && - Object.keys(input.Metadata).reduce((acc, suffix) => ({ - ...acc, - [`x-amz-meta-${suffix.toLowerCase()}`]: input.Metadata[suffix], - }), {})), + Object.keys(input.Metadata).reduce((acc, suffix) => { + acc[`x-amz-meta-${suffix.toLowerCase()}`] = input.Metadata[suffix]; + return acc; + }, {})), }); - const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/WriteGetObjectResponse"; - const query = map({ - "x-id": [, "WriteGetObjectResponse"], + b.bp("/WriteGetObjectResponse"); + const query = (0, smithy_client_1.map)({ + [_xi]: [, "WriteGetObjectResponse"], }); let body; - if (input.Body !== undefined) { - body = input.Body; - } let contents; if (input.Body !== undefined) { contents = input.Body; @@ -16035,1340 +20025,1289 @@ const serializeAws_restXmlWriteGetObjectResponseCommand = async (input, context) throw new Error("ValidationError: prefixed hostname must be hostname compatible."); } } - return new protocol_http_1.HttpRequest({ - protocol, - hostname: resolvedHostname, - port, - method: "POST", - headers, - path: resolvedPath, - query, - body, - }); + b.hn(resolvedHostname); + b.m("POST").h(headers).q(query).b(body); + return b.build(); }; -exports.serializeAws_restXmlWriteGetObjectResponseCommand = serializeAws_restXmlWriteGetObjectResponseCommand; -const deserializeAws_restXmlAbortMultipartUploadCommand = async (output, context) => { +exports.se_WriteGetObjectResponseCommand = se_WriteGetObjectResponseCommand; +const de_AbortMultipartUploadCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlAbortMultipartUploadCommandError(output, context); + return de_AbortMultipartUploadCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_RC]: [, output.headers[_xarc]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlAbortMultipartUploadCommand = deserializeAws_restXmlAbortMultipartUploadCommand; -const deserializeAws_restXmlAbortMultipartUploadCommandError = async (output, context) => { +exports.de_AbortMultipartUploadCommand = de_AbortMultipartUploadCommand; +const de_AbortMultipartUploadCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "NoSuchUpload": case "com.amazonaws.s3#NoSuchUpload": - throw await deserializeAws_restXmlNoSuchUploadResponse(parsedOutput, context); + throw await de_NoSuchUploadRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlCompleteMultipartUploadCommand = async (output, context) => { +const de_CompleteMultipartUploadCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlCompleteMultipartUploadCommandError(output, context); + return de_CompleteMultipartUploadCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - Expiration: [, output.headers["x-amz-expiration"]], - ServerSideEncryption: [, output.headers["x-amz-server-side-encryption"]], - VersionId: [, output.headers["x-amz-version-id"]], - SSEKMSKeyId: [, output.headers["x-amz-server-side-encryption-aws-kms-key-id"]], - BucketKeyEnabled: [ - () => void 0 !== output.headers["x-amz-server-side-encryption-bucket-key-enabled"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]), - ], - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_Exp]: [, output.headers[_xae]], + [_SSE]: [, output.headers[_xasse]], + [_VI]: [, output.headers[_xavi]], + [_SSEKMSKI]: [, output.headers[_xasseakki]], + [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, smithy_client_1.parseBoolean)(output.headers[_xassebke])], + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["Bucket"] !== undefined) { - contents.Bucket = (0, smithy_client_1.expectString)(data["Bucket"]); + if (data[_B] != null) { + contents[_B] = (0, smithy_client_1.expectString)(data[_B]); } - if (data["ChecksumCRC32"] !== undefined) { - contents.ChecksumCRC32 = (0, smithy_client_1.expectString)(data["ChecksumCRC32"]); + if (data[_CCRC] != null) { + contents[_CCRC] = (0, smithy_client_1.expectString)(data[_CCRC]); } - if (data["ChecksumCRC32C"] !== undefined) { - contents.ChecksumCRC32C = (0, smithy_client_1.expectString)(data["ChecksumCRC32C"]); + if (data[_CCRCC] != null) { + contents[_CCRCC] = (0, smithy_client_1.expectString)(data[_CCRCC]); } - if (data["ChecksumSHA1"] !== undefined) { - contents.ChecksumSHA1 = (0, smithy_client_1.expectString)(data["ChecksumSHA1"]); + if (data[_CSHA] != null) { + contents[_CSHA] = (0, smithy_client_1.expectString)(data[_CSHA]); } - if (data["ChecksumSHA256"] !== undefined) { - contents.ChecksumSHA256 = (0, smithy_client_1.expectString)(data["ChecksumSHA256"]); + if (data[_CSHAh] != null) { + contents[_CSHAh] = (0, smithy_client_1.expectString)(data[_CSHAh]); } - if (data["ETag"] !== undefined) { - contents.ETag = (0, smithy_client_1.expectString)(data["ETag"]); + if (data[_ETa] != null) { + contents[_ETa] = (0, smithy_client_1.expectString)(data[_ETa]); } - if (data["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(data["Key"]); + if (data[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(data[_K]); } - if (data["Location"] !== undefined) { - contents.Location = (0, smithy_client_1.expectString)(data["Location"]); + if (data[_L] != null) { + contents[_L] = (0, smithy_client_1.expectString)(data[_L]); } return contents; }; -exports.deserializeAws_restXmlCompleteMultipartUploadCommand = deserializeAws_restXmlCompleteMultipartUploadCommand; -const deserializeAws_restXmlCompleteMultipartUploadCommandError = async (output, context) => { +exports.de_CompleteMultipartUploadCommand = de_CompleteMultipartUploadCommand; +const de_CompleteMultipartUploadCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlCopyObjectCommand = async (output, context) => { +const de_CopyObjectCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlCopyObjectCommandError(output, context); + return de_CopyObjectCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - Expiration: [, output.headers["x-amz-expiration"]], - CopySourceVersionId: [, output.headers["x-amz-copy-source-version-id"]], - VersionId: [, output.headers["x-amz-version-id"]], - ServerSideEncryption: [, output.headers["x-amz-server-side-encryption"]], - SSECustomerAlgorithm: [, output.headers["x-amz-server-side-encryption-customer-algorithm"]], - SSECustomerKeyMD5: [, output.headers["x-amz-server-side-encryption-customer-key-md5"]], - SSEKMSKeyId: [, output.headers["x-amz-server-side-encryption-aws-kms-key-id"]], - SSEKMSEncryptionContext: [, output.headers["x-amz-server-side-encryption-context"]], - BucketKeyEnabled: [ - () => void 0 !== output.headers["x-amz-server-side-encryption-bucket-key-enabled"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]), - ], - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_Exp]: [, output.headers[_xae]], + [_CSVI]: [, output.headers[_xacsvi]], + [_VI]: [, output.headers[_xavi]], + [_SSE]: [, output.headers[_xasse]], + [_SSECA]: [, output.headers[_xasseca]], + [_SSECKMD]: [, output.headers[_xasseckm]], + [_SSEKMSKI]: [, output.headers[_xasseakki]], + [_SSEKMSEC]: [, output.headers[_xassec]], + [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, smithy_client_1.parseBoolean)(output.headers[_xassebke])], + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.CopyObjectResult = deserializeAws_restXmlCopyObjectResult(data, context); + contents.CopyObjectResult = de_CopyObjectResult(data, context); return contents; }; -exports.deserializeAws_restXmlCopyObjectCommand = deserializeAws_restXmlCopyObjectCommand; -const deserializeAws_restXmlCopyObjectCommandError = async (output, context) => { +exports.de_CopyObjectCommand = de_CopyObjectCommand; +const de_CopyObjectCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "ObjectNotInActiveTierError": case "com.amazonaws.s3#ObjectNotInActiveTierError": - throw await deserializeAws_restXmlObjectNotInActiveTierErrorResponse(parsedOutput, context); + throw await de_ObjectNotInActiveTierErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlCreateBucketCommand = async (output, context) => { +const de_CreateBucketCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlCreateBucketCommandError(output, context); + return de_CreateBucketCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - Location: [, output.headers["location"]], + [_L]: [, output.headers[_lo]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlCreateBucketCommand = deserializeAws_restXmlCreateBucketCommand; -const deserializeAws_restXmlCreateBucketCommandError = async (output, context) => { +exports.de_CreateBucketCommand = de_CreateBucketCommand; +const de_CreateBucketCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "BucketAlreadyExists": case "com.amazonaws.s3#BucketAlreadyExists": - throw await deserializeAws_restXmlBucketAlreadyExistsResponse(parsedOutput, context); + throw await de_BucketAlreadyExistsRes(parsedOutput, context); case "BucketAlreadyOwnedByYou": case "com.amazonaws.s3#BucketAlreadyOwnedByYou": - throw await deserializeAws_restXmlBucketAlreadyOwnedByYouResponse(parsedOutput, context); + throw await de_BucketAlreadyOwnedByYouRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlCreateMultipartUploadCommand = async (output, context) => { +const de_CreateMultipartUploadCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlCreateMultipartUploadCommandError(output, context); + return de_CreateMultipartUploadCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - AbortDate: [ - () => void 0 !== output.headers["x-amz-abort-date"], - () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["x-amz-abort-date"])), - ], - AbortRuleId: [, output.headers["x-amz-abort-rule-id"]], - ServerSideEncryption: [, output.headers["x-amz-server-side-encryption"]], - SSECustomerAlgorithm: [, output.headers["x-amz-server-side-encryption-customer-algorithm"]], - SSECustomerKeyMD5: [, output.headers["x-amz-server-side-encryption-customer-key-md5"]], - SSEKMSKeyId: [, output.headers["x-amz-server-side-encryption-aws-kms-key-id"]], - SSEKMSEncryptionContext: [, output.headers["x-amz-server-side-encryption-context"]], - BucketKeyEnabled: [ - () => void 0 !== output.headers["x-amz-server-side-encryption-bucket-key-enabled"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]), + [_AD]: [ + () => void 0 !== output.headers[_xaad], + () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers[_xaad])), ], - RequestCharged: [, output.headers["x-amz-request-charged"]], - ChecksumAlgorithm: [, output.headers["x-amz-checksum-algorithm"]], + [_ARI]: [, output.headers[_xaari]], + [_SSE]: [, output.headers[_xasse]], + [_SSECA]: [, output.headers[_xasseca]], + [_SSECKMD]: [, output.headers[_xasseckm]], + [_SSEKMSKI]: [, output.headers[_xasseakki]], + [_SSEKMSEC]: [, output.headers[_xassec]], + [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, smithy_client_1.parseBoolean)(output.headers[_xassebke])], + [_RC]: [, output.headers[_xarc]], + [_CA]: [, output.headers[_xaca]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["Bucket"] !== undefined) { - contents.Bucket = (0, smithy_client_1.expectString)(data["Bucket"]); + if (data[_B] != null) { + contents[_B] = (0, smithy_client_1.expectString)(data[_B]); } - if (data["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(data["Key"]); + if (data[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(data[_K]); } - if (data["UploadId"] !== undefined) { - contents.UploadId = (0, smithy_client_1.expectString)(data["UploadId"]); + if (data[_UI] != null) { + contents[_UI] = (0, smithy_client_1.expectString)(data[_UI]); } return contents; }; -exports.deserializeAws_restXmlCreateMultipartUploadCommand = deserializeAws_restXmlCreateMultipartUploadCommand; -const deserializeAws_restXmlCreateMultipartUploadCommandError = async (output, context) => { +exports.de_CreateMultipartUploadCommand = de_CreateMultipartUploadCommand; +const de_CreateMultipartUploadCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketCommand = async (output, context) => { +const de_CreateSessionCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateSessionCommandError(output, context); + } + const contents = (0, smithy_client_1.map)({ + $metadata: deserializeMetadata(output), + }); + const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); + if (data[_C] != null) { + contents[_C] = de_SessionCredentials(data[_C], context); + } + return contents; +}; +exports.de_CreateSessionCommand = de_CreateSessionCommand; +const de_CreateSessionCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "NoSuchBucket": + case "com.amazonaws.s3#NoSuchBucket": + throw await de_NoSuchBucketRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; +const de_DeleteBucketCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketCommandError(output, context); + return de_DeleteBucketCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketCommand = deserializeAws_restXmlDeleteBucketCommand; -const deserializeAws_restXmlDeleteBucketCommandError = async (output, context) => { +exports.de_DeleteBucketCommand = de_DeleteBucketCommand; +const de_DeleteBucketCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand = async (output, context) => { +const de_DeleteBucketAnalyticsConfigurationCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommandError(output, context); + return de_DeleteBucketAnalyticsConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand = deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommand; -const deserializeAws_restXmlDeleteBucketAnalyticsConfigurationCommandError = async (output, context) => { +exports.de_DeleteBucketAnalyticsConfigurationCommand = de_DeleteBucketAnalyticsConfigurationCommand; +const de_DeleteBucketAnalyticsConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketCorsCommand = async (output, context) => { +const de_DeleteBucketCorsCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketCorsCommandError(output, context); + return de_DeleteBucketCorsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketCorsCommand = deserializeAws_restXmlDeleteBucketCorsCommand; -const deserializeAws_restXmlDeleteBucketCorsCommandError = async (output, context) => { +exports.de_DeleteBucketCorsCommand = de_DeleteBucketCorsCommand; +const de_DeleteBucketCorsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketEncryptionCommand = async (output, context) => { +const de_DeleteBucketEncryptionCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketEncryptionCommandError(output, context); + return de_DeleteBucketEncryptionCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketEncryptionCommand = deserializeAws_restXmlDeleteBucketEncryptionCommand; -const deserializeAws_restXmlDeleteBucketEncryptionCommandError = async (output, context) => { +exports.de_DeleteBucketEncryptionCommand = de_DeleteBucketEncryptionCommand; +const de_DeleteBucketEncryptionCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand = async (output, context) => { +const de_DeleteBucketIntelligentTieringConfigurationCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommandError(output, context); + return de_DeleteBucketIntelligentTieringConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand = deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommand; -const deserializeAws_restXmlDeleteBucketIntelligentTieringConfigurationCommandError = async (output, context) => { +exports.de_DeleteBucketIntelligentTieringConfigurationCommand = de_DeleteBucketIntelligentTieringConfigurationCommand; +const de_DeleteBucketIntelligentTieringConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketInventoryConfigurationCommand = async (output, context) => { +const de_DeleteBucketInventoryConfigurationCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketInventoryConfigurationCommandError(output, context); + return de_DeleteBucketInventoryConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketInventoryConfigurationCommand = deserializeAws_restXmlDeleteBucketInventoryConfigurationCommand; -const deserializeAws_restXmlDeleteBucketInventoryConfigurationCommandError = async (output, context) => { +exports.de_DeleteBucketInventoryConfigurationCommand = de_DeleteBucketInventoryConfigurationCommand; +const de_DeleteBucketInventoryConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketLifecycleCommand = async (output, context) => { +const de_DeleteBucketLifecycleCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketLifecycleCommandError(output, context); + return de_DeleteBucketLifecycleCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketLifecycleCommand = deserializeAws_restXmlDeleteBucketLifecycleCommand; -const deserializeAws_restXmlDeleteBucketLifecycleCommandError = async (output, context) => { +exports.de_DeleteBucketLifecycleCommand = de_DeleteBucketLifecycleCommand; +const de_DeleteBucketLifecycleCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketMetricsConfigurationCommand = async (output, context) => { +const de_DeleteBucketMetricsConfigurationCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketMetricsConfigurationCommandError(output, context); + return de_DeleteBucketMetricsConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketMetricsConfigurationCommand = deserializeAws_restXmlDeleteBucketMetricsConfigurationCommand; -const deserializeAws_restXmlDeleteBucketMetricsConfigurationCommandError = async (output, context) => { +exports.de_DeleteBucketMetricsConfigurationCommand = de_DeleteBucketMetricsConfigurationCommand; +const de_DeleteBucketMetricsConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketOwnershipControlsCommand = async (output, context) => { +const de_DeleteBucketOwnershipControlsCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketOwnershipControlsCommandError(output, context); + return de_DeleteBucketOwnershipControlsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketOwnershipControlsCommand = deserializeAws_restXmlDeleteBucketOwnershipControlsCommand; -const deserializeAws_restXmlDeleteBucketOwnershipControlsCommandError = async (output, context) => { +exports.de_DeleteBucketOwnershipControlsCommand = de_DeleteBucketOwnershipControlsCommand; +const de_DeleteBucketOwnershipControlsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketPolicyCommand = async (output, context) => { +const de_DeleteBucketPolicyCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketPolicyCommandError(output, context); + return de_DeleteBucketPolicyCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketPolicyCommand = deserializeAws_restXmlDeleteBucketPolicyCommand; -const deserializeAws_restXmlDeleteBucketPolicyCommandError = async (output, context) => { +exports.de_DeleteBucketPolicyCommand = de_DeleteBucketPolicyCommand; +const de_DeleteBucketPolicyCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketReplicationCommand = async (output, context) => { +const de_DeleteBucketReplicationCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketReplicationCommandError(output, context); + return de_DeleteBucketReplicationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketReplicationCommand = deserializeAws_restXmlDeleteBucketReplicationCommand; -const deserializeAws_restXmlDeleteBucketReplicationCommandError = async (output, context) => { +exports.de_DeleteBucketReplicationCommand = de_DeleteBucketReplicationCommand; +const de_DeleteBucketReplicationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketTaggingCommand = async (output, context) => { +const de_DeleteBucketTaggingCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketTaggingCommandError(output, context); + return de_DeleteBucketTaggingCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketTaggingCommand = deserializeAws_restXmlDeleteBucketTaggingCommand; -const deserializeAws_restXmlDeleteBucketTaggingCommandError = async (output, context) => { +exports.de_DeleteBucketTaggingCommand = de_DeleteBucketTaggingCommand; +const de_DeleteBucketTaggingCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteBucketWebsiteCommand = async (output, context) => { +const de_DeleteBucketWebsiteCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteBucketWebsiteCommandError(output, context); + return de_DeleteBucketWebsiteCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteBucketWebsiteCommand = deserializeAws_restXmlDeleteBucketWebsiteCommand; -const deserializeAws_restXmlDeleteBucketWebsiteCommandError = async (output, context) => { +exports.de_DeleteBucketWebsiteCommand = de_DeleteBucketWebsiteCommand; +const de_DeleteBucketWebsiteCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteObjectCommand = async (output, context) => { +const de_DeleteObjectCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteObjectCommandError(output, context); + return de_DeleteObjectCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - DeleteMarker: [ - () => void 0 !== output.headers["x-amz-delete-marker"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-delete-marker"]), - ], - VersionId: [, output.headers["x-amz-version-id"]], - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_DM]: [() => void 0 !== output.headers[_xadm], () => (0, smithy_client_1.parseBoolean)(output.headers[_xadm])], + [_VI]: [, output.headers[_xavi]], + [_RC]: [, output.headers[_xarc]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteObjectCommand = deserializeAws_restXmlDeleteObjectCommand; -const deserializeAws_restXmlDeleteObjectCommandError = async (output, context) => { +exports.de_DeleteObjectCommand = de_DeleteObjectCommand; +const de_DeleteObjectCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteObjectsCommand = async (output, context) => { +const de_DeleteObjectsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteObjectsCommandError(output, context); + return de_DeleteObjectsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.Deleted === "") { - contents.Deleted = []; + contents[_De] = []; } - else if (data["Deleted"] !== undefined) { - contents.Deleted = deserializeAws_restXmlDeletedObjects((0, smithy_client_1.getArrayIfSingleItem)(data["Deleted"]), context); + else if (data[_De] != null) { + contents[_De] = de_DeletedObjects((0, smithy_client_1.getArrayIfSingleItem)(data[_De]), context); } if (data.Error === "") { - contents.Errors = []; + contents[_Err] = []; } - else if (data["Error"] !== undefined) { - contents.Errors = deserializeAws_restXmlErrors((0, smithy_client_1.getArrayIfSingleItem)(data["Error"]), context); + else if (data[_Er] != null) { + contents[_Err] = de_Errors((0, smithy_client_1.getArrayIfSingleItem)(data[_Er]), context); } return contents; }; -exports.deserializeAws_restXmlDeleteObjectsCommand = deserializeAws_restXmlDeleteObjectsCommand; -const deserializeAws_restXmlDeleteObjectsCommandError = async (output, context) => { +exports.de_DeleteObjectsCommand = de_DeleteObjectsCommand; +const de_DeleteObjectsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeleteObjectTaggingCommand = async (output, context) => { +const de_DeleteObjectTaggingCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeleteObjectTaggingCommandError(output, context); + return de_DeleteObjectTaggingCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - VersionId: [, output.headers["x-amz-version-id"]], + [_VI]: [, output.headers[_xavi]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeleteObjectTaggingCommand = deserializeAws_restXmlDeleteObjectTaggingCommand; -const deserializeAws_restXmlDeleteObjectTaggingCommandError = async (output, context) => { +exports.de_DeleteObjectTaggingCommand = de_DeleteObjectTaggingCommand; +const de_DeleteObjectTaggingCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlDeletePublicAccessBlockCommand = async (output, context) => { +const de_DeletePublicAccessBlockCommand = async (output, context) => { if (output.statusCode !== 204 && output.statusCode >= 300) { - return deserializeAws_restXmlDeletePublicAccessBlockCommandError(output, context); + return de_DeletePublicAccessBlockCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlDeletePublicAccessBlockCommand = deserializeAws_restXmlDeletePublicAccessBlockCommand; -const deserializeAws_restXmlDeletePublicAccessBlockCommandError = async (output, context) => { +exports.de_DeletePublicAccessBlockCommand = de_DeletePublicAccessBlockCommand; +const de_DeletePublicAccessBlockCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketAccelerateConfigurationCommand = async (output, context) => { +const de_GetBucketAccelerateConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketAccelerateConfigurationCommandError(output, context); + return de_GetBucketAccelerateConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(data["Status"]); + if (data[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(data[_S]); } return contents; }; -exports.deserializeAws_restXmlGetBucketAccelerateConfigurationCommand = deserializeAws_restXmlGetBucketAccelerateConfigurationCommand; -const deserializeAws_restXmlGetBucketAccelerateConfigurationCommandError = async (output, context) => { +exports.de_GetBucketAccelerateConfigurationCommand = de_GetBucketAccelerateConfigurationCommand; +const de_GetBucketAccelerateConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketAclCommand = async (output, context) => { +const de_GetBucketAclCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketAclCommandError(output, context); + return de_GetBucketAclCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.AccessControlList === "") { - contents.Grants = []; + contents[_Gr] = []; } - else if (data["AccessControlList"] !== undefined && data["AccessControlList"]["Grant"] !== undefined) { - contents.Grants = deserializeAws_restXmlGrants((0, smithy_client_1.getArrayIfSingleItem)(data["AccessControlList"]["Grant"]), context); + else if (data[_ACLc] != null && data[_ACLc][_G] != null) { + contents[_Gr] = de_Grants((0, smithy_client_1.getArrayIfSingleItem)(data[_ACLc][_G]), context); } - if (data["Owner"] !== undefined) { - contents.Owner = deserializeAws_restXmlOwner(data["Owner"], context); + if (data[_O] != null) { + contents[_O] = de_Owner(data[_O], context); } return contents; }; -exports.deserializeAws_restXmlGetBucketAclCommand = deserializeAws_restXmlGetBucketAclCommand; -const deserializeAws_restXmlGetBucketAclCommandError = async (output, context) => { +exports.de_GetBucketAclCommand = de_GetBucketAclCommand; +const de_GetBucketAclCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketAnalyticsConfigurationCommand = async (output, context) => { +const de_GetBucketAnalyticsConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketAnalyticsConfigurationCommandError(output, context); + return de_GetBucketAnalyticsConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.AnalyticsConfiguration = deserializeAws_restXmlAnalyticsConfiguration(data, context); + contents.AnalyticsConfiguration = de_AnalyticsConfiguration(data, context); return contents; }; -exports.deserializeAws_restXmlGetBucketAnalyticsConfigurationCommand = deserializeAws_restXmlGetBucketAnalyticsConfigurationCommand; -const deserializeAws_restXmlGetBucketAnalyticsConfigurationCommandError = async (output, context) => { +exports.de_GetBucketAnalyticsConfigurationCommand = de_GetBucketAnalyticsConfigurationCommand; +const de_GetBucketAnalyticsConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketCorsCommand = async (output, context) => { +const de_GetBucketCorsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketCorsCommandError(output, context); + return de_GetBucketCorsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.CORSRule === "") { - contents.CORSRules = []; + contents[_CORSRu] = []; } - else if (data["CORSRule"] !== undefined) { - contents.CORSRules = deserializeAws_restXmlCORSRules((0, smithy_client_1.getArrayIfSingleItem)(data["CORSRule"]), context); + else if (data[_CORSR] != null) { + contents[_CORSRu] = de_CORSRules((0, smithy_client_1.getArrayIfSingleItem)(data[_CORSR]), context); } return contents; }; -exports.deserializeAws_restXmlGetBucketCorsCommand = deserializeAws_restXmlGetBucketCorsCommand; -const deserializeAws_restXmlGetBucketCorsCommandError = async (output, context) => { +exports.de_GetBucketCorsCommand = de_GetBucketCorsCommand; +const de_GetBucketCorsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketEncryptionCommand = async (output, context) => { +const de_GetBucketEncryptionCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketEncryptionCommandError(output, context); + return de_GetBucketEncryptionCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.ServerSideEncryptionConfiguration = deserializeAws_restXmlServerSideEncryptionConfiguration(data, context); + contents.ServerSideEncryptionConfiguration = de_ServerSideEncryptionConfiguration(data, context); return contents; }; -exports.deserializeAws_restXmlGetBucketEncryptionCommand = deserializeAws_restXmlGetBucketEncryptionCommand; -const deserializeAws_restXmlGetBucketEncryptionCommandError = async (output, context) => { +exports.de_GetBucketEncryptionCommand = de_GetBucketEncryptionCommand; +const de_GetBucketEncryptionCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand = async (output, context) => { +const de_GetBucketIntelligentTieringConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommandError(output, context); + return de_GetBucketIntelligentTieringConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.IntelligentTieringConfiguration = deserializeAws_restXmlIntelligentTieringConfiguration(data, context); + contents.IntelligentTieringConfiguration = de_IntelligentTieringConfiguration(data, context); return contents; }; -exports.deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand = deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommand; -const deserializeAws_restXmlGetBucketIntelligentTieringConfigurationCommandError = async (output, context) => { +exports.de_GetBucketIntelligentTieringConfigurationCommand = de_GetBucketIntelligentTieringConfigurationCommand; +const de_GetBucketIntelligentTieringConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketInventoryConfigurationCommand = async (output, context) => { +const de_GetBucketInventoryConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketInventoryConfigurationCommandError(output, context); + return de_GetBucketInventoryConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.InventoryConfiguration = deserializeAws_restXmlInventoryConfiguration(data, context); + contents.InventoryConfiguration = de_InventoryConfiguration(data, context); return contents; }; -exports.deserializeAws_restXmlGetBucketInventoryConfigurationCommand = deserializeAws_restXmlGetBucketInventoryConfigurationCommand; -const deserializeAws_restXmlGetBucketInventoryConfigurationCommandError = async (output, context) => { +exports.de_GetBucketInventoryConfigurationCommand = de_GetBucketInventoryConfigurationCommand; +const de_GetBucketInventoryConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketLifecycleConfigurationCommand = async (output, context) => { +const de_GetBucketLifecycleConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketLifecycleConfigurationCommandError(output, context); + return de_GetBucketLifecycleConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.Rule === "") { - contents.Rules = []; + contents[_Rul] = []; } - else if (data["Rule"] !== undefined) { - contents.Rules = deserializeAws_restXmlLifecycleRules((0, smithy_client_1.getArrayIfSingleItem)(data["Rule"]), context); + else if (data[_Ru] != null) { + contents[_Rul] = de_LifecycleRules((0, smithy_client_1.getArrayIfSingleItem)(data[_Ru]), context); } return contents; }; -exports.deserializeAws_restXmlGetBucketLifecycleConfigurationCommand = deserializeAws_restXmlGetBucketLifecycleConfigurationCommand; -const deserializeAws_restXmlGetBucketLifecycleConfigurationCommandError = async (output, context) => { +exports.de_GetBucketLifecycleConfigurationCommand = de_GetBucketLifecycleConfigurationCommand; +const de_GetBucketLifecycleConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketLocationCommand = async (output, context) => { +const de_GetBucketLocationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketLocationCommandError(output, context); + return de_GetBucketLocationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["LocationConstraint"] !== undefined) { - contents.LocationConstraint = (0, smithy_client_1.expectString)(data["LocationConstraint"]); + if (data[_LC] != null) { + contents[_LC] = (0, smithy_client_1.expectString)(data[_LC]); } return contents; }; -exports.deserializeAws_restXmlGetBucketLocationCommand = deserializeAws_restXmlGetBucketLocationCommand; -const deserializeAws_restXmlGetBucketLocationCommandError = async (output, context) => { +exports.de_GetBucketLocationCommand = de_GetBucketLocationCommand; +const de_GetBucketLocationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketLoggingCommand = async (output, context) => { +const de_GetBucketLoggingCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketLoggingCommandError(output, context); + return de_GetBucketLoggingCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["LoggingEnabled"] !== undefined) { - contents.LoggingEnabled = deserializeAws_restXmlLoggingEnabled(data["LoggingEnabled"], context); + if (data[_LE] != null) { + contents[_LE] = de_LoggingEnabled(data[_LE], context); } return contents; }; -exports.deserializeAws_restXmlGetBucketLoggingCommand = deserializeAws_restXmlGetBucketLoggingCommand; -const deserializeAws_restXmlGetBucketLoggingCommandError = async (output, context) => { +exports.de_GetBucketLoggingCommand = de_GetBucketLoggingCommand; +const de_GetBucketLoggingCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketMetricsConfigurationCommand = async (output, context) => { +const de_GetBucketMetricsConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketMetricsConfigurationCommandError(output, context); + return de_GetBucketMetricsConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.MetricsConfiguration = deserializeAws_restXmlMetricsConfiguration(data, context); + contents.MetricsConfiguration = de_MetricsConfiguration(data, context); return contents; }; -exports.deserializeAws_restXmlGetBucketMetricsConfigurationCommand = deserializeAws_restXmlGetBucketMetricsConfigurationCommand; -const deserializeAws_restXmlGetBucketMetricsConfigurationCommandError = async (output, context) => { +exports.de_GetBucketMetricsConfigurationCommand = de_GetBucketMetricsConfigurationCommand; +const de_GetBucketMetricsConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketNotificationConfigurationCommand = async (output, context) => { +const de_GetBucketNotificationConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketNotificationConfigurationCommandError(output, context); + return de_GetBucketNotificationConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["EventBridgeConfiguration"] !== undefined) { - contents.EventBridgeConfiguration = deserializeAws_restXmlEventBridgeConfiguration(data["EventBridgeConfiguration"], context); + if (data[_EBC] != null) { + contents[_EBC] = de_EventBridgeConfiguration(data[_EBC], context); } if (data.CloudFunctionConfiguration === "") { - contents.LambdaFunctionConfigurations = []; + contents[_LFC] = []; } - else if (data["CloudFunctionConfiguration"] !== undefined) { - contents.LambdaFunctionConfigurations = deserializeAws_restXmlLambdaFunctionConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["CloudFunctionConfiguration"]), context); + else if (data[_CFC] != null) { + contents[_LFC] = de_LambdaFunctionConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data[_CFC]), context); } if (data.QueueConfiguration === "") { - contents.QueueConfigurations = []; + contents[_QCu] = []; } - else if (data["QueueConfiguration"] !== undefined) { - contents.QueueConfigurations = deserializeAws_restXmlQueueConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["QueueConfiguration"]), context); + else if (data[_QC] != null) { + contents[_QCu] = de_QueueConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data[_QC]), context); } if (data.TopicConfiguration === "") { - contents.TopicConfigurations = []; + contents[_TCop] = []; } - else if (data["TopicConfiguration"] !== undefined) { - contents.TopicConfigurations = deserializeAws_restXmlTopicConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["TopicConfiguration"]), context); + else if (data[_TCo] != null) { + contents[_TCop] = de_TopicConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data[_TCo]), context); } return contents; }; -exports.deserializeAws_restXmlGetBucketNotificationConfigurationCommand = deserializeAws_restXmlGetBucketNotificationConfigurationCommand; -const deserializeAws_restXmlGetBucketNotificationConfigurationCommandError = async (output, context) => { +exports.de_GetBucketNotificationConfigurationCommand = de_GetBucketNotificationConfigurationCommand; +const de_GetBucketNotificationConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketOwnershipControlsCommand = async (output, context) => { +const de_GetBucketOwnershipControlsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketOwnershipControlsCommandError(output, context); + return de_GetBucketOwnershipControlsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.OwnershipControls = deserializeAws_restXmlOwnershipControls(data, context); + contents.OwnershipControls = de_OwnershipControls(data, context); return contents; }; -exports.deserializeAws_restXmlGetBucketOwnershipControlsCommand = deserializeAws_restXmlGetBucketOwnershipControlsCommand; -const deserializeAws_restXmlGetBucketOwnershipControlsCommandError = async (output, context) => { +exports.de_GetBucketOwnershipControlsCommand = de_GetBucketOwnershipControlsCommand; +const de_GetBucketOwnershipControlsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketPolicyCommand = async (output, context) => { +const de_GetBucketPolicyCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketPolicyCommandError(output, context); + return de_GetBucketPolicyCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = await collectBodyString(output.body, context); contents.Policy = (0, smithy_client_1.expectString)(data); return contents; }; -exports.deserializeAws_restXmlGetBucketPolicyCommand = deserializeAws_restXmlGetBucketPolicyCommand; -const deserializeAws_restXmlGetBucketPolicyCommandError = async (output, context) => { +exports.de_GetBucketPolicyCommand = de_GetBucketPolicyCommand; +const de_GetBucketPolicyCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketPolicyStatusCommand = async (output, context) => { +const de_GetBucketPolicyStatusCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketPolicyStatusCommandError(output, context); + return de_GetBucketPolicyStatusCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.PolicyStatus = deserializeAws_restXmlPolicyStatus(data, context); + contents.PolicyStatus = de_PolicyStatus(data, context); return contents; }; -exports.deserializeAws_restXmlGetBucketPolicyStatusCommand = deserializeAws_restXmlGetBucketPolicyStatusCommand; -const deserializeAws_restXmlGetBucketPolicyStatusCommandError = async (output, context) => { +exports.de_GetBucketPolicyStatusCommand = de_GetBucketPolicyStatusCommand; +const de_GetBucketPolicyStatusCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketReplicationCommand = async (output, context) => { +const de_GetBucketReplicationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketReplicationCommandError(output, context); + return de_GetBucketReplicationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.ReplicationConfiguration = deserializeAws_restXmlReplicationConfiguration(data, context); + contents.ReplicationConfiguration = de_ReplicationConfiguration(data, context); return contents; }; -exports.deserializeAws_restXmlGetBucketReplicationCommand = deserializeAws_restXmlGetBucketReplicationCommand; -const deserializeAws_restXmlGetBucketReplicationCommandError = async (output, context) => { +exports.de_GetBucketReplicationCommand = de_GetBucketReplicationCommand; +const de_GetBucketReplicationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketRequestPaymentCommand = async (output, context) => { +const de_GetBucketRequestPaymentCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketRequestPaymentCommandError(output, context); + return de_GetBucketRequestPaymentCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["Payer"] !== undefined) { - contents.Payer = (0, smithy_client_1.expectString)(data["Payer"]); + if (data[_Pa] != null) { + contents[_Pa] = (0, smithy_client_1.expectString)(data[_Pa]); } return contents; }; -exports.deserializeAws_restXmlGetBucketRequestPaymentCommand = deserializeAws_restXmlGetBucketRequestPaymentCommand; -const deserializeAws_restXmlGetBucketRequestPaymentCommandError = async (output, context) => { +exports.de_GetBucketRequestPaymentCommand = de_GetBucketRequestPaymentCommand; +const de_GetBucketRequestPaymentCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketTaggingCommand = async (output, context) => { +const de_GetBucketTaggingCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketTaggingCommandError(output, context); + return de_GetBucketTaggingCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.TagSet === "") { - contents.TagSet = []; + contents[_TS] = []; } - else if (data["TagSet"] !== undefined && data["TagSet"]["Tag"] !== undefined) { - contents.TagSet = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(data["TagSet"]["Tag"]), context); + else if (data[_TS] != null && data[_TS][_Ta] != null) { + contents[_TS] = de_TagSet((0, smithy_client_1.getArrayIfSingleItem)(data[_TS][_Ta]), context); } return contents; }; -exports.deserializeAws_restXmlGetBucketTaggingCommand = deserializeAws_restXmlGetBucketTaggingCommand; -const deserializeAws_restXmlGetBucketTaggingCommandError = async (output, context) => { +exports.de_GetBucketTaggingCommand = de_GetBucketTaggingCommand; +const de_GetBucketTaggingCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketVersioningCommand = async (output, context) => { +const de_GetBucketVersioningCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketVersioningCommandError(output, context); + return de_GetBucketVersioningCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["MfaDelete"] !== undefined) { - contents.MFADelete = (0, smithy_client_1.expectString)(data["MfaDelete"]); + if (data[_MDf] != null) { + contents[_MFAD] = (0, smithy_client_1.expectString)(data[_MDf]); } - if (data["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(data["Status"]); + if (data[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(data[_S]); } return contents; }; -exports.deserializeAws_restXmlGetBucketVersioningCommand = deserializeAws_restXmlGetBucketVersioningCommand; -const deserializeAws_restXmlGetBucketVersioningCommandError = async (output, context) => { +exports.de_GetBucketVersioningCommand = de_GetBucketVersioningCommand; +const de_GetBucketVersioningCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetBucketWebsiteCommand = async (output, context) => { +const de_GetBucketWebsiteCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetBucketWebsiteCommandError(output, context); + return de_GetBucketWebsiteCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["ErrorDocument"] !== undefined) { - contents.ErrorDocument = deserializeAws_restXmlErrorDocument(data["ErrorDocument"], context); + if (data[_ED] != null) { + contents[_ED] = de_ErrorDocument(data[_ED], context); } - if (data["IndexDocument"] !== undefined) { - contents.IndexDocument = deserializeAws_restXmlIndexDocument(data["IndexDocument"], context); + if (data[_ID] != null) { + contents[_ID] = de_IndexDocument(data[_ID], context); } - if (data["RedirectAllRequestsTo"] !== undefined) { - contents.RedirectAllRequestsTo = deserializeAws_restXmlRedirectAllRequestsTo(data["RedirectAllRequestsTo"], context); + if (data[_RART] != null) { + contents[_RART] = de_RedirectAllRequestsTo(data[_RART], context); } if (data.RoutingRules === "") { - contents.RoutingRules = []; + contents[_RRo] = []; } - else if (data["RoutingRules"] !== undefined && data["RoutingRules"]["RoutingRule"] !== undefined) { - contents.RoutingRules = deserializeAws_restXmlRoutingRules((0, smithy_client_1.getArrayIfSingleItem)(data["RoutingRules"]["RoutingRule"]), context); + else if (data[_RRo] != null && data[_RRo][_RRou] != null) { + contents[_RRo] = de_RoutingRules((0, smithy_client_1.getArrayIfSingleItem)(data[_RRo][_RRou]), context); } return contents; }; -exports.deserializeAws_restXmlGetBucketWebsiteCommand = deserializeAws_restXmlGetBucketWebsiteCommand; -const deserializeAws_restXmlGetBucketWebsiteCommandError = async (output, context) => { +exports.de_GetBucketWebsiteCommand = de_GetBucketWebsiteCommand; +const de_GetBucketWebsiteCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetObjectCommand = async (output, context) => { +const de_GetObjectCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetObjectCommandError(output, context); + return de_GetObjectCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - DeleteMarker: [ - () => void 0 !== output.headers["x-amz-delete-marker"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-delete-marker"]), - ], - AcceptRanges: [, output.headers["accept-ranges"]], - Expiration: [, output.headers["x-amz-expiration"]], - Restore: [, output.headers["x-amz-restore"]], - LastModified: [ - () => void 0 !== output.headers["last-modified"], - () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["last-modified"])), - ], - ContentLength: [ - () => void 0 !== output.headers["content-length"], - () => (0, smithy_client_1.strictParseLong)(output.headers["content-length"]), + [_DM]: [() => void 0 !== output.headers[_xadm], () => (0, smithy_client_1.parseBoolean)(output.headers[_xadm])], + [_AR]: [, output.headers[_ar]], + [_Exp]: [, output.headers[_xae]], + [_Re]: [, output.headers[_xar]], + [_LM]: [() => void 0 !== output.headers[_lm], () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers[_lm]))], + [_CLo]: [() => void 0 !== output.headers[_cl_], () => (0, smithy_client_1.strictParseLong)(output.headers[_cl_])], + [_ETa]: [, output.headers[_eta]], + [_CCRC]: [, output.headers[_xacc]], + [_CCRCC]: [, output.headers[_xacc_]], + [_CSHA]: [, output.headers[_xacs]], + [_CSHAh]: [, output.headers[_xacs_]], + [_MM]: [() => void 0 !== output.headers[_xamm], () => (0, smithy_client_1.strictParseInt32)(output.headers[_xamm])], + [_VI]: [, output.headers[_xavi]], + [_CC]: [, output.headers[_cc]], + [_CD]: [, output.headers[_cd]], + [_CE]: [, output.headers[_ce]], + [_CL]: [, output.headers[_cl]], + [_CR]: [, output.headers[_cr]], + [_CT]: [, output.headers[_ct]], + [_E]: [() => void 0 !== output.headers[_e], () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers[_e]))], + [_WRL]: [, output.headers[_xawrl]], + [_SSE]: [, output.headers[_xasse]], + [_SSECA]: [, output.headers[_xasseca]], + [_SSECKMD]: [, output.headers[_xasseckm]], + [_SSEKMSKI]: [, output.headers[_xasseakki]], + [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, smithy_client_1.parseBoolean)(output.headers[_xassebke])], + [_SC]: [, output.headers[_xasc]], + [_RC]: [, output.headers[_xarc]], + [_RS]: [, output.headers[_xars]], + [_PC]: [() => void 0 !== output.headers[_xampc], () => (0, smithy_client_1.strictParseInt32)(output.headers[_xampc])], + [_TC]: [() => void 0 !== output.headers[_xatc], () => (0, smithy_client_1.strictParseInt32)(output.headers[_xatc])], + [_OLM]: [, output.headers[_xaolm]], + [_OLRUD]: [ + () => void 0 !== output.headers[_xaolrud], + () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.headers[_xaolrud])), ], - ETag: [, output.headers["etag"]], - ChecksumCRC32: [, output.headers["x-amz-checksum-crc32"]], - ChecksumCRC32C: [, output.headers["x-amz-checksum-crc32c"]], - ChecksumSHA1: [, output.headers["x-amz-checksum-sha1"]], - ChecksumSHA256: [, output.headers["x-amz-checksum-sha256"]], - MissingMeta: [ - () => void 0 !== output.headers["x-amz-missing-meta"], - () => (0, smithy_client_1.strictParseInt32)(output.headers["x-amz-missing-meta"]), - ], - VersionId: [, output.headers["x-amz-version-id"]], - CacheControl: [, output.headers["cache-control"]], - ContentDisposition: [, output.headers["content-disposition"]], - ContentEncoding: [, output.headers["content-encoding"]], - ContentLanguage: [, output.headers["content-language"]], - ContentRange: [, output.headers["content-range"]], - ContentType: [, output.headers["content-type"]], - Expires: [ - () => void 0 !== output.headers["expires"], - () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["expires"])), - ], - WebsiteRedirectLocation: [, output.headers["x-amz-website-redirect-location"]], - ServerSideEncryption: [, output.headers["x-amz-server-side-encryption"]], - SSECustomerAlgorithm: [, output.headers["x-amz-server-side-encryption-customer-algorithm"]], - SSECustomerKeyMD5: [, output.headers["x-amz-server-side-encryption-customer-key-md5"]], - SSEKMSKeyId: [, output.headers["x-amz-server-side-encryption-aws-kms-key-id"]], - BucketKeyEnabled: [ - () => void 0 !== output.headers["x-amz-server-side-encryption-bucket-key-enabled"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]), - ], - StorageClass: [, output.headers["x-amz-storage-class"]], - RequestCharged: [, output.headers["x-amz-request-charged"]], - ReplicationStatus: [, output.headers["x-amz-replication-status"]], - PartsCount: [ - () => void 0 !== output.headers["x-amz-mp-parts-count"], - () => (0, smithy_client_1.strictParseInt32)(output.headers["x-amz-mp-parts-count"]), - ], - TagCount: [ - () => void 0 !== output.headers["x-amz-tagging-count"], - () => (0, smithy_client_1.strictParseInt32)(output.headers["x-amz-tagging-count"]), - ], - ObjectLockMode: [, output.headers["x-amz-object-lock-mode"]], - ObjectLockRetainUntilDate: [ - () => void 0 !== output.headers["x-amz-object-lock-retain-until-date"], - () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.headers["x-amz-object-lock-retain-until-date"])), - ], - ObjectLockLegalHoldStatus: [, output.headers["x-amz-object-lock-legal-hold"]], + [_OLLHS]: [, output.headers[_xaollh]], Metadata: [ , Object.keys(output.headers) @@ -17380,387 +21319,356 @@ const deserializeAws_restXmlGetObjectCommand = async (output, context) => { ], }); const data = output.body; + context.sdkStreamMixin(data); contents.Body = data; return contents; }; -exports.deserializeAws_restXmlGetObjectCommand = deserializeAws_restXmlGetObjectCommand; -const deserializeAws_restXmlGetObjectCommandError = async (output, context) => { +exports.de_GetObjectCommand = de_GetObjectCommand; +const de_GetObjectCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "InvalidObjectState": case "com.amazonaws.s3#InvalidObjectState": - throw await deserializeAws_restXmlInvalidObjectStateResponse(parsedOutput, context); + throw await de_InvalidObjectStateRes(parsedOutput, context); case "NoSuchKey": case "com.amazonaws.s3#NoSuchKey": - throw await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context); + throw await de_NoSuchKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlGetObjectAclCommand = async (output, context) => { +const de_GetObjectAclCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetObjectAclCommandError(output, context); + return de_GetObjectAclCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.AccessControlList === "") { - contents.Grants = []; + contents[_Gr] = []; } - else if (data["AccessControlList"] !== undefined && data["AccessControlList"]["Grant"] !== undefined) { - contents.Grants = deserializeAws_restXmlGrants((0, smithy_client_1.getArrayIfSingleItem)(data["AccessControlList"]["Grant"]), context); + else if (data[_ACLc] != null && data[_ACLc][_G] != null) { + contents[_Gr] = de_Grants((0, smithy_client_1.getArrayIfSingleItem)(data[_ACLc][_G]), context); } - if (data["Owner"] !== undefined) { - contents.Owner = deserializeAws_restXmlOwner(data["Owner"], context); + if (data[_O] != null) { + contents[_O] = de_Owner(data[_O], context); } return contents; }; -exports.deserializeAws_restXmlGetObjectAclCommand = deserializeAws_restXmlGetObjectAclCommand; -const deserializeAws_restXmlGetObjectAclCommandError = async (output, context) => { +exports.de_GetObjectAclCommand = de_GetObjectAclCommand; +const de_GetObjectAclCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "NoSuchKey": case "com.amazonaws.s3#NoSuchKey": - throw await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context); + throw await de_NoSuchKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlGetObjectAttributesCommand = async (output, context) => { +const de_GetObjectAttributesCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetObjectAttributesCommandError(output, context); + return de_GetObjectAttributesCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - DeleteMarker: [ - () => void 0 !== output.headers["x-amz-delete-marker"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-delete-marker"]), - ], - LastModified: [ - () => void 0 !== output.headers["last-modified"], - () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["last-modified"])), - ], - VersionId: [, output.headers["x-amz-version-id"]], - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_DM]: [() => void 0 !== output.headers[_xadm], () => (0, smithy_client_1.parseBoolean)(output.headers[_xadm])], + [_LM]: [() => void 0 !== output.headers[_lm], () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers[_lm]))], + [_VI]: [, output.headers[_xavi]], + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["Checksum"] !== undefined) { - contents.Checksum = deserializeAws_restXmlChecksum(data["Checksum"], context); + if (data[_Ch] != null) { + contents[_Ch] = de_Checksum(data[_Ch], context); } - if (data["ETag"] !== undefined) { - contents.ETag = (0, smithy_client_1.expectString)(data["ETag"]); + if (data[_ETa] != null) { + contents[_ETa] = (0, smithy_client_1.expectString)(data[_ETa]); } - if (data["ObjectParts"] !== undefined) { - contents.ObjectParts = deserializeAws_restXmlGetObjectAttributesParts(data["ObjectParts"], context); + if (data[_OP] != null) { + contents[_OP] = de_GetObjectAttributesParts(data[_OP], context); } - if (data["ObjectSize"] !== undefined) { - contents.ObjectSize = (0, smithy_client_1.strictParseLong)(data["ObjectSize"]); + if (data[_OSb] != null) { + contents[_OSb] = (0, smithy_client_1.strictParseLong)(data[_OSb]); } - if (data["StorageClass"] !== undefined) { - contents.StorageClass = (0, smithy_client_1.expectString)(data["StorageClass"]); + if (data[_SC] != null) { + contents[_SC] = (0, smithy_client_1.expectString)(data[_SC]); } return contents; }; -exports.deserializeAws_restXmlGetObjectAttributesCommand = deserializeAws_restXmlGetObjectAttributesCommand; -const deserializeAws_restXmlGetObjectAttributesCommandError = async (output, context) => { +exports.de_GetObjectAttributesCommand = de_GetObjectAttributesCommand; +const de_GetObjectAttributesCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "NoSuchKey": case "com.amazonaws.s3#NoSuchKey": - throw await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context); + throw await de_NoSuchKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlGetObjectLegalHoldCommand = async (output, context) => { +const de_GetObjectLegalHoldCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetObjectLegalHoldCommandError(output, context); + return de_GetObjectLegalHoldCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.LegalHold = deserializeAws_restXmlObjectLockLegalHold(data, context); + contents.LegalHold = de_ObjectLockLegalHold(data, context); return contents; }; -exports.deserializeAws_restXmlGetObjectLegalHoldCommand = deserializeAws_restXmlGetObjectLegalHoldCommand; -const deserializeAws_restXmlGetObjectLegalHoldCommandError = async (output, context) => { +exports.de_GetObjectLegalHoldCommand = de_GetObjectLegalHoldCommand; +const de_GetObjectLegalHoldCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetObjectLockConfigurationCommand = async (output, context) => { +const de_GetObjectLockConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetObjectLockConfigurationCommandError(output, context); + return de_GetObjectLockConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.ObjectLockConfiguration = deserializeAws_restXmlObjectLockConfiguration(data, context); + contents.ObjectLockConfiguration = de_ObjectLockConfiguration(data, context); return contents; }; -exports.deserializeAws_restXmlGetObjectLockConfigurationCommand = deserializeAws_restXmlGetObjectLockConfigurationCommand; -const deserializeAws_restXmlGetObjectLockConfigurationCommandError = async (output, context) => { +exports.de_GetObjectLockConfigurationCommand = de_GetObjectLockConfigurationCommand; +const de_GetObjectLockConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetObjectRetentionCommand = async (output, context) => { +const de_GetObjectRetentionCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetObjectRetentionCommandError(output, context); + return de_GetObjectRetentionCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.Retention = deserializeAws_restXmlObjectLockRetention(data, context); + contents.Retention = de_ObjectLockRetention(data, context); return contents; }; -exports.deserializeAws_restXmlGetObjectRetentionCommand = deserializeAws_restXmlGetObjectRetentionCommand; -const deserializeAws_restXmlGetObjectRetentionCommandError = async (output, context) => { +exports.de_GetObjectRetentionCommand = de_GetObjectRetentionCommand; +const de_GetObjectRetentionCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetObjectTaggingCommand = async (output, context) => { +const de_GetObjectTaggingCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetObjectTaggingCommandError(output, context); + return de_GetObjectTaggingCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - VersionId: [, output.headers["x-amz-version-id"]], + [_VI]: [, output.headers[_xavi]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.TagSet === "") { - contents.TagSet = []; + contents[_TS] = []; } - else if (data["TagSet"] !== undefined && data["TagSet"]["Tag"] !== undefined) { - contents.TagSet = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(data["TagSet"]["Tag"]), context); + else if (data[_TS] != null && data[_TS][_Ta] != null) { + contents[_TS] = de_TagSet((0, smithy_client_1.getArrayIfSingleItem)(data[_TS][_Ta]), context); } return contents; }; -exports.deserializeAws_restXmlGetObjectTaggingCommand = deserializeAws_restXmlGetObjectTaggingCommand; -const deserializeAws_restXmlGetObjectTaggingCommandError = async (output, context) => { +exports.de_GetObjectTaggingCommand = de_GetObjectTaggingCommand; +const de_GetObjectTaggingCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetObjectTorrentCommand = async (output, context) => { +const de_GetObjectTorrentCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetObjectTorrentCommandError(output, context); + return de_GetObjectTorrentCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_RC]: [, output.headers[_xarc]], }); const data = output.body; + context.sdkStreamMixin(data); contents.Body = data; return contents; }; -exports.deserializeAws_restXmlGetObjectTorrentCommand = deserializeAws_restXmlGetObjectTorrentCommand; -const deserializeAws_restXmlGetObjectTorrentCommandError = async (output, context) => { +exports.de_GetObjectTorrentCommand = de_GetObjectTorrentCommand; +const de_GetObjectTorrentCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlGetPublicAccessBlockCommand = async (output, context) => { +const de_GetPublicAccessBlockCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlGetPublicAccessBlockCommandError(output, context); + return de_GetPublicAccessBlockCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.PublicAccessBlockConfiguration = deserializeAws_restXmlPublicAccessBlockConfiguration(data, context); + contents.PublicAccessBlockConfiguration = de_PublicAccessBlockConfiguration(data, context); return contents; }; -exports.deserializeAws_restXmlGetPublicAccessBlockCommand = deserializeAws_restXmlGetPublicAccessBlockCommand; -const deserializeAws_restXmlGetPublicAccessBlockCommandError = async (output, context) => { +exports.de_GetPublicAccessBlockCommand = de_GetPublicAccessBlockCommand; +const de_GetPublicAccessBlockCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlHeadBucketCommand = async (output, context) => { +const de_HeadBucketCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlHeadBucketCommandError(output, context); + return de_HeadBucketCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), + [_BLT]: [, output.headers[_xablt]], + [_BLN]: [, output.headers[_xabln]], + [_BR]: [, output.headers[_xabr]], + [_APA]: [() => void 0 !== output.headers[_xaapa], () => (0, smithy_client_1.parseBoolean)(output.headers[_xaapa])], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlHeadBucketCommand = deserializeAws_restXmlHeadBucketCommand; -const deserializeAws_restXmlHeadBucketCommandError = async (output, context) => { +exports.de_HeadBucketCommand = de_HeadBucketCommand; +const de_HeadBucketCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "NotFound": case "com.amazonaws.s3#NotFound": - throw await deserializeAws_restXmlNotFoundResponse(parsedOutput, context); + throw await de_NotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlHeadObjectCommand = async (output, context) => { +const de_HeadObjectCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlHeadObjectCommandError(output, context); + return de_HeadObjectCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - DeleteMarker: [ - () => void 0 !== output.headers["x-amz-delete-marker"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-delete-marker"]), - ], - AcceptRanges: [, output.headers["accept-ranges"]], - Expiration: [, output.headers["x-amz-expiration"]], - Restore: [, output.headers["x-amz-restore"]], - ArchiveStatus: [, output.headers["x-amz-archive-status"]], - LastModified: [ - () => void 0 !== output.headers["last-modified"], - () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["last-modified"])), - ], - ContentLength: [ - () => void 0 !== output.headers["content-length"], - () => (0, smithy_client_1.strictParseLong)(output.headers["content-length"]), - ], - ChecksumCRC32: [, output.headers["x-amz-checksum-crc32"]], - ChecksumCRC32C: [, output.headers["x-amz-checksum-crc32c"]], - ChecksumSHA1: [, output.headers["x-amz-checksum-sha1"]], - ChecksumSHA256: [, output.headers["x-amz-checksum-sha256"]], - ETag: [, output.headers["etag"]], - MissingMeta: [ - () => void 0 !== output.headers["x-amz-missing-meta"], - () => (0, smithy_client_1.strictParseInt32)(output.headers["x-amz-missing-meta"]), - ], - VersionId: [, output.headers["x-amz-version-id"]], - CacheControl: [, output.headers["cache-control"]], - ContentDisposition: [, output.headers["content-disposition"]], - ContentEncoding: [, output.headers["content-encoding"]], - ContentLanguage: [, output.headers["content-language"]], - ContentType: [, output.headers["content-type"]], - Expires: [ - () => void 0 !== output.headers["expires"], - () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["expires"])), + [_DM]: [() => void 0 !== output.headers[_xadm], () => (0, smithy_client_1.parseBoolean)(output.headers[_xadm])], + [_AR]: [, output.headers[_ar]], + [_Exp]: [, output.headers[_xae]], + [_Re]: [, output.headers[_xar]], + [_AS]: [, output.headers[_xaas]], + [_LM]: [() => void 0 !== output.headers[_lm], () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers[_lm]))], + [_CLo]: [() => void 0 !== output.headers[_cl_], () => (0, smithy_client_1.strictParseLong)(output.headers[_cl_])], + [_CCRC]: [, output.headers[_xacc]], + [_CCRCC]: [, output.headers[_xacc_]], + [_CSHA]: [, output.headers[_xacs]], + [_CSHAh]: [, output.headers[_xacs_]], + [_ETa]: [, output.headers[_eta]], + [_MM]: [() => void 0 !== output.headers[_xamm], () => (0, smithy_client_1.strictParseInt32)(output.headers[_xamm])], + [_VI]: [, output.headers[_xavi]], + [_CC]: [, output.headers[_cc]], + [_CD]: [, output.headers[_cd]], + [_CE]: [, output.headers[_ce]], + [_CL]: [, output.headers[_cl]], + [_CT]: [, output.headers[_ct]], + [_E]: [() => void 0 !== output.headers[_e], () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers[_e]))], + [_WRL]: [, output.headers[_xawrl]], + [_SSE]: [, output.headers[_xasse]], + [_SSECA]: [, output.headers[_xasseca]], + [_SSECKMD]: [, output.headers[_xasseckm]], + [_SSEKMSKI]: [, output.headers[_xasseakki]], + [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, smithy_client_1.parseBoolean)(output.headers[_xassebke])], + [_SC]: [, output.headers[_xasc]], + [_RC]: [, output.headers[_xarc]], + [_RS]: [, output.headers[_xars]], + [_PC]: [() => void 0 !== output.headers[_xampc], () => (0, smithy_client_1.strictParseInt32)(output.headers[_xampc])], + [_OLM]: [, output.headers[_xaolm]], + [_OLRUD]: [ + () => void 0 !== output.headers[_xaolrud], + () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output.headers[_xaolrud])), ], - WebsiteRedirectLocation: [, output.headers["x-amz-website-redirect-location"]], - ServerSideEncryption: [, output.headers["x-amz-server-side-encryption"]], - SSECustomerAlgorithm: [, output.headers["x-amz-server-side-encryption-customer-algorithm"]], - SSECustomerKeyMD5: [, output.headers["x-amz-server-side-encryption-customer-key-md5"]], - SSEKMSKeyId: [, output.headers["x-amz-server-side-encryption-aws-kms-key-id"]], - BucketKeyEnabled: [ - () => void 0 !== output.headers["x-amz-server-side-encryption-bucket-key-enabled"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]), - ], - StorageClass: [, output.headers["x-amz-storage-class"]], - RequestCharged: [, output.headers["x-amz-request-charged"]], - ReplicationStatus: [, output.headers["x-amz-replication-status"]], - PartsCount: [ - () => void 0 !== output.headers["x-amz-mp-parts-count"], - () => (0, smithy_client_1.strictParseInt32)(output.headers["x-amz-mp-parts-count"]), - ], - ObjectLockMode: [, output.headers["x-amz-object-lock-mode"]], - ObjectLockRetainUntilDate: [ - () => void 0 !== output.headers["x-amz-object-lock-retain-until-date"], - () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output.headers["x-amz-object-lock-retain-until-date"])), - ], - ObjectLockLegalHoldStatus: [, output.headers["x-amz-object-lock-legal-hold"]], + [_OLLHS]: [, output.headers[_xaollh]], Metadata: [ , Object.keys(output.headers) @@ -17771,1389 +21679,1376 @@ const deserializeAws_restXmlHeadObjectCommand = async (output, context) => { }, {}), ], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlHeadObjectCommand = deserializeAws_restXmlHeadObjectCommand; -const deserializeAws_restXmlHeadObjectCommandError = async (output, context) => { +exports.de_HeadObjectCommand = de_HeadObjectCommand; +const de_HeadObjectCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "NotFound": case "com.amazonaws.s3#NotFound": - throw await deserializeAws_restXmlNotFoundResponse(parsedOutput, context); + throw await de_NotFoundRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlListBucketAnalyticsConfigurationsCommand = async (output, context) => { +const de_ListBucketAnalyticsConfigurationsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListBucketAnalyticsConfigurationsCommandError(output, context); + return de_ListBucketAnalyticsConfigurationsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.AnalyticsConfiguration === "") { - contents.AnalyticsConfigurationList = []; + contents[_ACLn] = []; } - else if (data["AnalyticsConfiguration"] !== undefined) { - contents.AnalyticsConfigurationList = deserializeAws_restXmlAnalyticsConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["AnalyticsConfiguration"]), context); + else if (data[_AC] != null) { + contents[_ACLn] = de_AnalyticsConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data[_AC]), context); } - if (data["ContinuationToken"] !== undefined) { - contents.ContinuationToken = (0, smithy_client_1.expectString)(data["ContinuationToken"]); + if (data[_CTo] != null) { + contents[_CTo] = (0, smithy_client_1.expectString)(data[_CTo]); } - if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(data["IsTruncated"]); + if (data[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(data[_IT]); } - if (data["NextContinuationToken"] !== undefined) { - contents.NextContinuationToken = (0, smithy_client_1.expectString)(data["NextContinuationToken"]); + if (data[_NCT] != null) { + contents[_NCT] = (0, smithy_client_1.expectString)(data[_NCT]); } return contents; }; -exports.deserializeAws_restXmlListBucketAnalyticsConfigurationsCommand = deserializeAws_restXmlListBucketAnalyticsConfigurationsCommand; -const deserializeAws_restXmlListBucketAnalyticsConfigurationsCommandError = async (output, context) => { +exports.de_ListBucketAnalyticsConfigurationsCommand = de_ListBucketAnalyticsConfigurationsCommand; +const de_ListBucketAnalyticsConfigurationsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand = async (output, context) => { +const de_ListBucketIntelligentTieringConfigurationsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommandError(output, context); + return de_ListBucketIntelligentTieringConfigurationsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["ContinuationToken"] !== undefined) { - contents.ContinuationToken = (0, smithy_client_1.expectString)(data["ContinuationToken"]); + if (data[_CTo] != null) { + contents[_CTo] = (0, smithy_client_1.expectString)(data[_CTo]); } if (data.IntelligentTieringConfiguration === "") { - contents.IntelligentTieringConfigurationList = []; + contents[_ITCL] = []; } - else if (data["IntelligentTieringConfiguration"] !== undefined) { - contents.IntelligentTieringConfigurationList = deserializeAws_restXmlIntelligentTieringConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["IntelligentTieringConfiguration"]), context); + else if (data[_ITC] != null) { + contents[_ITCL] = de_IntelligentTieringConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data[_ITC]), context); } - if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(data["IsTruncated"]); + if (data[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(data[_IT]); } - if (data["NextContinuationToken"] !== undefined) { - contents.NextContinuationToken = (0, smithy_client_1.expectString)(data["NextContinuationToken"]); + if (data[_NCT] != null) { + contents[_NCT] = (0, smithy_client_1.expectString)(data[_NCT]); } return contents; }; -exports.deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand = deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommand; -const deserializeAws_restXmlListBucketIntelligentTieringConfigurationsCommandError = async (output, context) => { +exports.de_ListBucketIntelligentTieringConfigurationsCommand = de_ListBucketIntelligentTieringConfigurationsCommand; +const de_ListBucketIntelligentTieringConfigurationsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlListBucketInventoryConfigurationsCommand = async (output, context) => { +const de_ListBucketInventoryConfigurationsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListBucketInventoryConfigurationsCommandError(output, context); + return de_ListBucketInventoryConfigurationsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["ContinuationToken"] !== undefined) { - contents.ContinuationToken = (0, smithy_client_1.expectString)(data["ContinuationToken"]); + if (data[_CTo] != null) { + contents[_CTo] = (0, smithy_client_1.expectString)(data[_CTo]); } if (data.InventoryConfiguration === "") { - contents.InventoryConfigurationList = []; + contents[_ICL] = []; } - else if (data["InventoryConfiguration"] !== undefined) { - contents.InventoryConfigurationList = deserializeAws_restXmlInventoryConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["InventoryConfiguration"]), context); + else if (data[_IC] != null) { + contents[_ICL] = de_InventoryConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data[_IC]), context); } - if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(data["IsTruncated"]); + if (data[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(data[_IT]); } - if (data["NextContinuationToken"] !== undefined) { - contents.NextContinuationToken = (0, smithy_client_1.expectString)(data["NextContinuationToken"]); + if (data[_NCT] != null) { + contents[_NCT] = (0, smithy_client_1.expectString)(data[_NCT]); } return contents; }; -exports.deserializeAws_restXmlListBucketInventoryConfigurationsCommand = deserializeAws_restXmlListBucketInventoryConfigurationsCommand; -const deserializeAws_restXmlListBucketInventoryConfigurationsCommandError = async (output, context) => { +exports.de_ListBucketInventoryConfigurationsCommand = de_ListBucketInventoryConfigurationsCommand; +const de_ListBucketInventoryConfigurationsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlListBucketMetricsConfigurationsCommand = async (output, context) => { +const de_ListBucketMetricsConfigurationsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListBucketMetricsConfigurationsCommandError(output, context); + return de_ListBucketMetricsConfigurationsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["ContinuationToken"] !== undefined) { - contents.ContinuationToken = (0, smithy_client_1.expectString)(data["ContinuationToken"]); + if (data[_CTo] != null) { + contents[_CTo] = (0, smithy_client_1.expectString)(data[_CTo]); } - if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(data["IsTruncated"]); + if (data[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(data[_IT]); } if (data.MetricsConfiguration === "") { - contents.MetricsConfigurationList = []; + contents[_MCL] = []; + } + else if (data[_MC] != null) { + contents[_MCL] = de_MetricsConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data[_MC]), context); + } + if (data[_NCT] != null) { + contents[_NCT] = (0, smithy_client_1.expectString)(data[_NCT]); + } + return contents; +}; +exports.de_ListBucketMetricsConfigurationsCommand = de_ListBucketMetricsConfigurationsCommand; +const de_ListBucketMetricsConfigurationsCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); +}; +const de_ListBucketsCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_ListBucketsCommandError(output, context); + } + const contents = (0, smithy_client_1.map)({ + $metadata: deserializeMetadata(output), + }); + const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); + if (data.Buckets === "") { + contents[_Bu] = []; } - else if (data["MetricsConfiguration"] !== undefined) { - contents.MetricsConfigurationList = deserializeAws_restXmlMetricsConfigurationList((0, smithy_client_1.getArrayIfSingleItem)(data["MetricsConfiguration"]), context); + else if (data[_Bu] != null && data[_Bu][_B] != null) { + contents[_Bu] = de_Buckets((0, smithy_client_1.getArrayIfSingleItem)(data[_Bu][_B]), context); } - if (data["NextContinuationToken"] !== undefined) { - contents.NextContinuationToken = (0, smithy_client_1.expectString)(data["NextContinuationToken"]); + if (data[_O] != null) { + contents[_O] = de_Owner(data[_O], context); } return contents; }; -exports.deserializeAws_restXmlListBucketMetricsConfigurationsCommand = deserializeAws_restXmlListBucketMetricsConfigurationsCommand; -const deserializeAws_restXmlListBucketMetricsConfigurationsCommandError = async (output, context) => { +exports.de_ListBucketsCommand = de_ListBucketsCommand; +const de_ListBucketsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlListBucketsCommand = async (output, context) => { +const de_ListDirectoryBucketsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListBucketsCommandError(output, context); + return de_ListDirectoryBucketsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.Buckets === "") { - contents.Buckets = []; + contents[_Bu] = []; } - else if (data["Buckets"] !== undefined && data["Buckets"]["Bucket"] !== undefined) { - contents.Buckets = deserializeAws_restXmlBuckets((0, smithy_client_1.getArrayIfSingleItem)(data["Buckets"]["Bucket"]), context); + else if (data[_Bu] != null && data[_Bu][_B] != null) { + contents[_Bu] = de_Buckets((0, smithy_client_1.getArrayIfSingleItem)(data[_Bu][_B]), context); } - if (data["Owner"] !== undefined) { - contents.Owner = deserializeAws_restXmlOwner(data["Owner"], context); + if (data[_CTo] != null) { + contents[_CTo] = (0, smithy_client_1.expectString)(data[_CTo]); } return contents; }; -exports.deserializeAws_restXmlListBucketsCommand = deserializeAws_restXmlListBucketsCommand; -const deserializeAws_restXmlListBucketsCommandError = async (output, context) => { +exports.de_ListDirectoryBucketsCommand = de_ListDirectoryBucketsCommand; +const de_ListDirectoryBucketsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlListMultipartUploadsCommand = async (output, context) => { +const de_ListMultipartUploadsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListMultipartUploadsCommandError(output, context); + return de_ListMultipartUploadsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["Bucket"] !== undefined) { - contents.Bucket = (0, smithy_client_1.expectString)(data["Bucket"]); + if (data[_B] != null) { + contents[_B] = (0, smithy_client_1.expectString)(data[_B]); } if (data.CommonPrefixes === "") { - contents.CommonPrefixes = []; + contents[_CP] = []; } - else if (data["CommonPrefixes"] !== undefined) { - contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data["CommonPrefixes"]), context); + else if (data[_CP] != null) { + contents[_CP] = de_CommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data[_CP]), context); } - if (data["Delimiter"] !== undefined) { - contents.Delimiter = (0, smithy_client_1.expectString)(data["Delimiter"]); + if (data[_D] != null) { + contents[_D] = (0, smithy_client_1.expectString)(data[_D]); } - if (data["EncodingType"] !== undefined) { - contents.EncodingType = (0, smithy_client_1.expectString)(data["EncodingType"]); + if (data[_ET] != null) { + contents[_ET] = (0, smithy_client_1.expectString)(data[_ET]); } - if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(data["IsTruncated"]); + if (data[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(data[_IT]); } - if (data["KeyMarker"] !== undefined) { - contents.KeyMarker = (0, smithy_client_1.expectString)(data["KeyMarker"]); + if (data[_KM] != null) { + contents[_KM] = (0, smithy_client_1.expectString)(data[_KM]); } - if (data["MaxUploads"] !== undefined) { - contents.MaxUploads = (0, smithy_client_1.strictParseInt32)(data["MaxUploads"]); + if (data[_MU] != null) { + contents[_MU] = (0, smithy_client_1.strictParseInt32)(data[_MU]); } - if (data["NextKeyMarker"] !== undefined) { - contents.NextKeyMarker = (0, smithy_client_1.expectString)(data["NextKeyMarker"]); + if (data[_NKM] != null) { + contents[_NKM] = (0, smithy_client_1.expectString)(data[_NKM]); } - if (data["NextUploadIdMarker"] !== undefined) { - contents.NextUploadIdMarker = (0, smithy_client_1.expectString)(data["NextUploadIdMarker"]); + if (data[_NUIM] != null) { + contents[_NUIM] = (0, smithy_client_1.expectString)(data[_NUIM]); } - if (data["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(data["Prefix"]); + if (data[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(data[_P]); } - if (data["UploadIdMarker"] !== undefined) { - contents.UploadIdMarker = (0, smithy_client_1.expectString)(data["UploadIdMarker"]); + if (data[_UIM] != null) { + contents[_UIM] = (0, smithy_client_1.expectString)(data[_UIM]); } if (data.Upload === "") { - contents.Uploads = []; + contents[_Up] = []; } - else if (data["Upload"] !== undefined) { - contents.Uploads = deserializeAws_restXmlMultipartUploadList((0, smithy_client_1.getArrayIfSingleItem)(data["Upload"]), context); + else if (data[_U] != null) { + contents[_Up] = de_MultipartUploadList((0, smithy_client_1.getArrayIfSingleItem)(data[_U]), context); } return contents; }; -exports.deserializeAws_restXmlListMultipartUploadsCommand = deserializeAws_restXmlListMultipartUploadsCommand; -const deserializeAws_restXmlListMultipartUploadsCommandError = async (output, context) => { +exports.de_ListMultipartUploadsCommand = de_ListMultipartUploadsCommand; +const de_ListMultipartUploadsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlListObjectsCommand = async (output, context) => { +const de_ListObjectsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListObjectsCommandError(output, context); + return de_ListObjectsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.CommonPrefixes === "") { - contents.CommonPrefixes = []; + contents[_CP] = []; } - else if (data["CommonPrefixes"] !== undefined) { - contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data["CommonPrefixes"]), context); + else if (data[_CP] != null) { + contents[_CP] = de_CommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data[_CP]), context); } if (data.Contents === "") { - contents.Contents = []; + contents[_Co] = []; } - else if (data["Contents"] !== undefined) { - contents.Contents = deserializeAws_restXmlObjectList((0, smithy_client_1.getArrayIfSingleItem)(data["Contents"]), context); + else if (data[_Co] != null) { + contents[_Co] = de_ObjectList((0, smithy_client_1.getArrayIfSingleItem)(data[_Co]), context); } - if (data["Delimiter"] !== undefined) { - contents.Delimiter = (0, smithy_client_1.expectString)(data["Delimiter"]); + if (data[_D] != null) { + contents[_D] = (0, smithy_client_1.expectString)(data[_D]); } - if (data["EncodingType"] !== undefined) { - contents.EncodingType = (0, smithy_client_1.expectString)(data["EncodingType"]); + if (data[_ET] != null) { + contents[_ET] = (0, smithy_client_1.expectString)(data[_ET]); } - if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(data["IsTruncated"]); + if (data[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(data[_IT]); } - if (data["Marker"] !== undefined) { - contents.Marker = (0, smithy_client_1.expectString)(data["Marker"]); + if (data[_M] != null) { + contents[_M] = (0, smithy_client_1.expectString)(data[_M]); } - if (data["MaxKeys"] !== undefined) { - contents.MaxKeys = (0, smithy_client_1.strictParseInt32)(data["MaxKeys"]); + if (data[_MK] != null) { + contents[_MK] = (0, smithy_client_1.strictParseInt32)(data[_MK]); } - if (data["Name"] !== undefined) { - contents.Name = (0, smithy_client_1.expectString)(data["Name"]); + if (data[_N] != null) { + contents[_N] = (0, smithy_client_1.expectString)(data[_N]); } - if (data["NextMarker"] !== undefined) { - contents.NextMarker = (0, smithy_client_1.expectString)(data["NextMarker"]); + if (data[_NM] != null) { + contents[_NM] = (0, smithy_client_1.expectString)(data[_NM]); } - if (data["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(data["Prefix"]); + if (data[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(data[_P]); } return contents; }; -exports.deserializeAws_restXmlListObjectsCommand = deserializeAws_restXmlListObjectsCommand; -const deserializeAws_restXmlListObjectsCommandError = async (output, context) => { +exports.de_ListObjectsCommand = de_ListObjectsCommand; +const de_ListObjectsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "NoSuchBucket": case "com.amazonaws.s3#NoSuchBucket": - throw await deserializeAws_restXmlNoSuchBucketResponse(parsedOutput, context); + throw await de_NoSuchBucketRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlListObjectsV2Command = async (output, context) => { +const de_ListObjectsV2Command = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListObjectsV2CommandError(output, context); + return de_ListObjectsV2CommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.CommonPrefixes === "") { - contents.CommonPrefixes = []; + contents[_CP] = []; } - else if (data["CommonPrefixes"] !== undefined) { - contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data["CommonPrefixes"]), context); + else if (data[_CP] != null) { + contents[_CP] = de_CommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data[_CP]), context); } if (data.Contents === "") { - contents.Contents = []; + contents[_Co] = []; } - else if (data["Contents"] !== undefined) { - contents.Contents = deserializeAws_restXmlObjectList((0, smithy_client_1.getArrayIfSingleItem)(data["Contents"]), context); + else if (data[_Co] != null) { + contents[_Co] = de_ObjectList((0, smithy_client_1.getArrayIfSingleItem)(data[_Co]), context); } - if (data["ContinuationToken"] !== undefined) { - contents.ContinuationToken = (0, smithy_client_1.expectString)(data["ContinuationToken"]); + if (data[_CTo] != null) { + contents[_CTo] = (0, smithy_client_1.expectString)(data[_CTo]); } - if (data["Delimiter"] !== undefined) { - contents.Delimiter = (0, smithy_client_1.expectString)(data["Delimiter"]); + if (data[_D] != null) { + contents[_D] = (0, smithy_client_1.expectString)(data[_D]); } - if (data["EncodingType"] !== undefined) { - contents.EncodingType = (0, smithy_client_1.expectString)(data["EncodingType"]); + if (data[_ET] != null) { + contents[_ET] = (0, smithy_client_1.expectString)(data[_ET]); } - if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(data["IsTruncated"]); + if (data[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(data[_IT]); } - if (data["KeyCount"] !== undefined) { - contents.KeyCount = (0, smithy_client_1.strictParseInt32)(data["KeyCount"]); + if (data[_KC] != null) { + contents[_KC] = (0, smithy_client_1.strictParseInt32)(data[_KC]); } - if (data["MaxKeys"] !== undefined) { - contents.MaxKeys = (0, smithy_client_1.strictParseInt32)(data["MaxKeys"]); + if (data[_MK] != null) { + contents[_MK] = (0, smithy_client_1.strictParseInt32)(data[_MK]); } - if (data["Name"] !== undefined) { - contents.Name = (0, smithy_client_1.expectString)(data["Name"]); + if (data[_N] != null) { + contents[_N] = (0, smithy_client_1.expectString)(data[_N]); } - if (data["NextContinuationToken"] !== undefined) { - contents.NextContinuationToken = (0, smithy_client_1.expectString)(data["NextContinuationToken"]); + if (data[_NCT] != null) { + contents[_NCT] = (0, smithy_client_1.expectString)(data[_NCT]); } - if (data["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(data["Prefix"]); + if (data[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(data[_P]); } - if (data["StartAfter"] !== undefined) { - contents.StartAfter = (0, smithy_client_1.expectString)(data["StartAfter"]); + if (data[_SA] != null) { + contents[_SA] = (0, smithy_client_1.expectString)(data[_SA]); } return contents; }; -exports.deserializeAws_restXmlListObjectsV2Command = deserializeAws_restXmlListObjectsV2Command; -const deserializeAws_restXmlListObjectsV2CommandError = async (output, context) => { +exports.de_ListObjectsV2Command = de_ListObjectsV2Command; +const de_ListObjectsV2CommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "NoSuchBucket": case "com.amazonaws.s3#NoSuchBucket": - throw await deserializeAws_restXmlNoSuchBucketResponse(parsedOutput, context); + throw await de_NoSuchBucketRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlListObjectVersionsCommand = async (output, context) => { +const de_ListObjectVersionsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListObjectVersionsCommandError(output, context); + return de_ListObjectVersionsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); if (data.CommonPrefixes === "") { - contents.CommonPrefixes = []; + contents[_CP] = []; } - else if (data["CommonPrefixes"] !== undefined) { - contents.CommonPrefixes = deserializeAws_restXmlCommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data["CommonPrefixes"]), context); + else if (data[_CP] != null) { + contents[_CP] = de_CommonPrefixList((0, smithy_client_1.getArrayIfSingleItem)(data[_CP]), context); } if (data.DeleteMarker === "") { - contents.DeleteMarkers = []; + contents[_DMe] = []; } - else if (data["DeleteMarker"] !== undefined) { - contents.DeleteMarkers = deserializeAws_restXmlDeleteMarkers((0, smithy_client_1.getArrayIfSingleItem)(data["DeleteMarker"]), context); + else if (data[_DM] != null) { + contents[_DMe] = de_DeleteMarkers((0, smithy_client_1.getArrayIfSingleItem)(data[_DM]), context); } - if (data["Delimiter"] !== undefined) { - contents.Delimiter = (0, smithy_client_1.expectString)(data["Delimiter"]); + if (data[_D] != null) { + contents[_D] = (0, smithy_client_1.expectString)(data[_D]); } - if (data["EncodingType"] !== undefined) { - contents.EncodingType = (0, smithy_client_1.expectString)(data["EncodingType"]); + if (data[_ET] != null) { + contents[_ET] = (0, smithy_client_1.expectString)(data[_ET]); } - if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(data["IsTruncated"]); + if (data[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(data[_IT]); } - if (data["KeyMarker"] !== undefined) { - contents.KeyMarker = (0, smithy_client_1.expectString)(data["KeyMarker"]); + if (data[_KM] != null) { + contents[_KM] = (0, smithy_client_1.expectString)(data[_KM]); } - if (data["MaxKeys"] !== undefined) { - contents.MaxKeys = (0, smithy_client_1.strictParseInt32)(data["MaxKeys"]); + if (data[_MK] != null) { + contents[_MK] = (0, smithy_client_1.strictParseInt32)(data[_MK]); } - if (data["Name"] !== undefined) { - contents.Name = (0, smithy_client_1.expectString)(data["Name"]); + if (data[_N] != null) { + contents[_N] = (0, smithy_client_1.expectString)(data[_N]); } - if (data["NextKeyMarker"] !== undefined) { - contents.NextKeyMarker = (0, smithy_client_1.expectString)(data["NextKeyMarker"]); + if (data[_NKM] != null) { + contents[_NKM] = (0, smithy_client_1.expectString)(data[_NKM]); } - if (data["NextVersionIdMarker"] !== undefined) { - contents.NextVersionIdMarker = (0, smithy_client_1.expectString)(data["NextVersionIdMarker"]); + if (data[_NVIM] != null) { + contents[_NVIM] = (0, smithy_client_1.expectString)(data[_NVIM]); } - if (data["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(data["Prefix"]); + if (data[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(data[_P]); } - if (data["VersionIdMarker"] !== undefined) { - contents.VersionIdMarker = (0, smithy_client_1.expectString)(data["VersionIdMarker"]); + if (data[_VIM] != null) { + contents[_VIM] = (0, smithy_client_1.expectString)(data[_VIM]); } if (data.Version === "") { - contents.Versions = []; + contents[_Ve] = []; } - else if (data["Version"] !== undefined) { - contents.Versions = deserializeAws_restXmlObjectVersionList((0, smithy_client_1.getArrayIfSingleItem)(data["Version"]), context); + else if (data[_V] != null) { + contents[_Ve] = de_ObjectVersionList((0, smithy_client_1.getArrayIfSingleItem)(data[_V]), context); } return contents; }; -exports.deserializeAws_restXmlListObjectVersionsCommand = deserializeAws_restXmlListObjectVersionsCommand; -const deserializeAws_restXmlListObjectVersionsCommandError = async (output, context) => { +exports.de_ListObjectVersionsCommand = de_ListObjectVersionsCommand; +const de_ListObjectVersionsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlListPartsCommand = async (output, context) => { +const de_ListPartsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlListPartsCommandError(output, context); + return de_ListPartsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - AbortDate: [ - () => void 0 !== output.headers["x-amz-abort-date"], - () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers["x-amz-abort-date"])), + [_AD]: [ + () => void 0 !== output.headers[_xaad], + () => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc7231DateTime)(output.headers[_xaad])), ], - AbortRuleId: [, output.headers["x-amz-abort-rule-id"]], - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_ARI]: [, output.headers[_xaari]], + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data["Bucket"] !== undefined) { - contents.Bucket = (0, smithy_client_1.expectString)(data["Bucket"]); + if (data[_B] != null) { + contents[_B] = (0, smithy_client_1.expectString)(data[_B]); } - if (data["ChecksumAlgorithm"] !== undefined) { - contents.ChecksumAlgorithm = (0, smithy_client_1.expectString)(data["ChecksumAlgorithm"]); + if (data[_CA] != null) { + contents[_CA] = (0, smithy_client_1.expectString)(data[_CA]); } - if (data["Initiator"] !== undefined) { - contents.Initiator = deserializeAws_restXmlInitiator(data["Initiator"], context); + if (data[_In] != null) { + contents[_In] = de_Initiator(data[_In], context); } - if (data["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(data["IsTruncated"]); + if (data[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(data[_IT]); } - if (data["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(data["Key"]); + if (data[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(data[_K]); } - if (data["MaxParts"] !== undefined) { - contents.MaxParts = (0, smithy_client_1.strictParseInt32)(data["MaxParts"]); + if (data[_MP] != null) { + contents[_MP] = (0, smithy_client_1.strictParseInt32)(data[_MP]); } - if (data["NextPartNumberMarker"] !== undefined) { - contents.NextPartNumberMarker = (0, smithy_client_1.expectString)(data["NextPartNumberMarker"]); + if (data[_NPNM] != null) { + contents[_NPNM] = (0, smithy_client_1.expectString)(data[_NPNM]); } - if (data["Owner"] !== undefined) { - contents.Owner = deserializeAws_restXmlOwner(data["Owner"], context); + if (data[_O] != null) { + contents[_O] = de_Owner(data[_O], context); } - if (data["PartNumberMarker"] !== undefined) { - contents.PartNumberMarker = (0, smithy_client_1.expectString)(data["PartNumberMarker"]); + if (data[_PNM] != null) { + contents[_PNM] = (0, smithy_client_1.expectString)(data[_PNM]); } if (data.Part === "") { - contents.Parts = []; + contents[_Part] = []; } - else if (data["Part"] !== undefined) { - contents.Parts = deserializeAws_restXmlParts((0, smithy_client_1.getArrayIfSingleItem)(data["Part"]), context); + else if (data[_Par] != null) { + contents[_Part] = de_Parts((0, smithy_client_1.getArrayIfSingleItem)(data[_Par]), context); } - if (data["StorageClass"] !== undefined) { - contents.StorageClass = (0, smithy_client_1.expectString)(data["StorageClass"]); + if (data[_SC] != null) { + contents[_SC] = (0, smithy_client_1.expectString)(data[_SC]); } - if (data["UploadId"] !== undefined) { - contents.UploadId = (0, smithy_client_1.expectString)(data["UploadId"]); + if (data[_UI] != null) { + contents[_UI] = (0, smithy_client_1.expectString)(data[_UI]); } return contents; }; -exports.deserializeAws_restXmlListPartsCommand = deserializeAws_restXmlListPartsCommand; -const deserializeAws_restXmlListPartsCommandError = async (output, context) => { +exports.de_ListPartsCommand = de_ListPartsCommand; +const de_ListPartsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketAccelerateConfigurationCommand = async (output, context) => { +const de_PutBucketAccelerateConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketAccelerateConfigurationCommandError(output, context); + return de_PutBucketAccelerateConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketAccelerateConfigurationCommand = deserializeAws_restXmlPutBucketAccelerateConfigurationCommand; -const deserializeAws_restXmlPutBucketAccelerateConfigurationCommandError = async (output, context) => { +exports.de_PutBucketAccelerateConfigurationCommand = de_PutBucketAccelerateConfigurationCommand; +const de_PutBucketAccelerateConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketAclCommand = async (output, context) => { +const de_PutBucketAclCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketAclCommandError(output, context); + return de_PutBucketAclCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketAclCommand = deserializeAws_restXmlPutBucketAclCommand; -const deserializeAws_restXmlPutBucketAclCommandError = async (output, context) => { +exports.de_PutBucketAclCommand = de_PutBucketAclCommand; +const de_PutBucketAclCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketAnalyticsConfigurationCommand = async (output, context) => { +const de_PutBucketAnalyticsConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketAnalyticsConfigurationCommandError(output, context); + return de_PutBucketAnalyticsConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketAnalyticsConfigurationCommand = deserializeAws_restXmlPutBucketAnalyticsConfigurationCommand; -const deserializeAws_restXmlPutBucketAnalyticsConfigurationCommandError = async (output, context) => { +exports.de_PutBucketAnalyticsConfigurationCommand = de_PutBucketAnalyticsConfigurationCommand; +const de_PutBucketAnalyticsConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketCorsCommand = async (output, context) => { +const de_PutBucketCorsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketCorsCommandError(output, context); + return de_PutBucketCorsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketCorsCommand = deserializeAws_restXmlPutBucketCorsCommand; -const deserializeAws_restXmlPutBucketCorsCommandError = async (output, context) => { +exports.de_PutBucketCorsCommand = de_PutBucketCorsCommand; +const de_PutBucketCorsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketEncryptionCommand = async (output, context) => { +const de_PutBucketEncryptionCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketEncryptionCommandError(output, context); + return de_PutBucketEncryptionCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketEncryptionCommand = deserializeAws_restXmlPutBucketEncryptionCommand; -const deserializeAws_restXmlPutBucketEncryptionCommandError = async (output, context) => { +exports.de_PutBucketEncryptionCommand = de_PutBucketEncryptionCommand; +const de_PutBucketEncryptionCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand = async (output, context) => { +const de_PutBucketIntelligentTieringConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommandError(output, context); + return de_PutBucketIntelligentTieringConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand = deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommand; -const deserializeAws_restXmlPutBucketIntelligentTieringConfigurationCommandError = async (output, context) => { +exports.de_PutBucketIntelligentTieringConfigurationCommand = de_PutBucketIntelligentTieringConfigurationCommand; +const de_PutBucketIntelligentTieringConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketInventoryConfigurationCommand = async (output, context) => { +const de_PutBucketInventoryConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketInventoryConfigurationCommandError(output, context); + return de_PutBucketInventoryConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketInventoryConfigurationCommand = deserializeAws_restXmlPutBucketInventoryConfigurationCommand; -const deserializeAws_restXmlPutBucketInventoryConfigurationCommandError = async (output, context) => { +exports.de_PutBucketInventoryConfigurationCommand = de_PutBucketInventoryConfigurationCommand; +const de_PutBucketInventoryConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketLifecycleConfigurationCommand = async (output, context) => { +const de_PutBucketLifecycleConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketLifecycleConfigurationCommandError(output, context); + return de_PutBucketLifecycleConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketLifecycleConfigurationCommand = deserializeAws_restXmlPutBucketLifecycleConfigurationCommand; -const deserializeAws_restXmlPutBucketLifecycleConfigurationCommandError = async (output, context) => { +exports.de_PutBucketLifecycleConfigurationCommand = de_PutBucketLifecycleConfigurationCommand; +const de_PutBucketLifecycleConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketLoggingCommand = async (output, context) => { +const de_PutBucketLoggingCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketLoggingCommandError(output, context); + return de_PutBucketLoggingCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketLoggingCommand = deserializeAws_restXmlPutBucketLoggingCommand; -const deserializeAws_restXmlPutBucketLoggingCommandError = async (output, context) => { +exports.de_PutBucketLoggingCommand = de_PutBucketLoggingCommand; +const de_PutBucketLoggingCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketMetricsConfigurationCommand = async (output, context) => { +const de_PutBucketMetricsConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketMetricsConfigurationCommandError(output, context); + return de_PutBucketMetricsConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketMetricsConfigurationCommand = deserializeAws_restXmlPutBucketMetricsConfigurationCommand; -const deserializeAws_restXmlPutBucketMetricsConfigurationCommandError = async (output, context) => { +exports.de_PutBucketMetricsConfigurationCommand = de_PutBucketMetricsConfigurationCommand; +const de_PutBucketMetricsConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketNotificationConfigurationCommand = async (output, context) => { +const de_PutBucketNotificationConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketNotificationConfigurationCommandError(output, context); + return de_PutBucketNotificationConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketNotificationConfigurationCommand = deserializeAws_restXmlPutBucketNotificationConfigurationCommand; -const deserializeAws_restXmlPutBucketNotificationConfigurationCommandError = async (output, context) => { +exports.de_PutBucketNotificationConfigurationCommand = de_PutBucketNotificationConfigurationCommand; +const de_PutBucketNotificationConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketOwnershipControlsCommand = async (output, context) => { +const de_PutBucketOwnershipControlsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketOwnershipControlsCommandError(output, context); + return de_PutBucketOwnershipControlsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketOwnershipControlsCommand = deserializeAws_restXmlPutBucketOwnershipControlsCommand; -const deserializeAws_restXmlPutBucketOwnershipControlsCommandError = async (output, context) => { +exports.de_PutBucketOwnershipControlsCommand = de_PutBucketOwnershipControlsCommand; +const de_PutBucketOwnershipControlsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketPolicyCommand = async (output, context) => { +const de_PutBucketPolicyCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketPolicyCommandError(output, context); + return de_PutBucketPolicyCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketPolicyCommand = deserializeAws_restXmlPutBucketPolicyCommand; -const deserializeAws_restXmlPutBucketPolicyCommandError = async (output, context) => { +exports.de_PutBucketPolicyCommand = de_PutBucketPolicyCommand; +const de_PutBucketPolicyCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketReplicationCommand = async (output, context) => { +const de_PutBucketReplicationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketReplicationCommandError(output, context); + return de_PutBucketReplicationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketReplicationCommand = deserializeAws_restXmlPutBucketReplicationCommand; -const deserializeAws_restXmlPutBucketReplicationCommandError = async (output, context) => { +exports.de_PutBucketReplicationCommand = de_PutBucketReplicationCommand; +const de_PutBucketReplicationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketRequestPaymentCommand = async (output, context) => { +const de_PutBucketRequestPaymentCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketRequestPaymentCommandError(output, context); + return de_PutBucketRequestPaymentCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketRequestPaymentCommand = deserializeAws_restXmlPutBucketRequestPaymentCommand; -const deserializeAws_restXmlPutBucketRequestPaymentCommandError = async (output, context) => { +exports.de_PutBucketRequestPaymentCommand = de_PutBucketRequestPaymentCommand; +const de_PutBucketRequestPaymentCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketTaggingCommand = async (output, context) => { +const de_PutBucketTaggingCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketTaggingCommandError(output, context); + return de_PutBucketTaggingCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketTaggingCommand = deserializeAws_restXmlPutBucketTaggingCommand; -const deserializeAws_restXmlPutBucketTaggingCommandError = async (output, context) => { +exports.de_PutBucketTaggingCommand = de_PutBucketTaggingCommand; +const de_PutBucketTaggingCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketVersioningCommand = async (output, context) => { +const de_PutBucketVersioningCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketVersioningCommandError(output, context); + return de_PutBucketVersioningCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketVersioningCommand = deserializeAws_restXmlPutBucketVersioningCommand; -const deserializeAws_restXmlPutBucketVersioningCommandError = async (output, context) => { +exports.de_PutBucketVersioningCommand = de_PutBucketVersioningCommand; +const de_PutBucketVersioningCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutBucketWebsiteCommand = async (output, context) => { +const de_PutBucketWebsiteCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutBucketWebsiteCommandError(output, context); + return de_PutBucketWebsiteCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutBucketWebsiteCommand = deserializeAws_restXmlPutBucketWebsiteCommand; -const deserializeAws_restXmlPutBucketWebsiteCommandError = async (output, context) => { +exports.de_PutBucketWebsiteCommand = de_PutBucketWebsiteCommand; +const de_PutBucketWebsiteCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutObjectCommand = async (output, context) => { +const de_PutObjectCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutObjectCommandError(output, context); + return de_PutObjectCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - Expiration: [, output.headers["x-amz-expiration"]], - ETag: [, output.headers["etag"]], - ChecksumCRC32: [, output.headers["x-amz-checksum-crc32"]], - ChecksumCRC32C: [, output.headers["x-amz-checksum-crc32c"]], - ChecksumSHA1: [, output.headers["x-amz-checksum-sha1"]], - ChecksumSHA256: [, output.headers["x-amz-checksum-sha256"]], - ServerSideEncryption: [, output.headers["x-amz-server-side-encryption"]], - VersionId: [, output.headers["x-amz-version-id"]], - SSECustomerAlgorithm: [, output.headers["x-amz-server-side-encryption-customer-algorithm"]], - SSECustomerKeyMD5: [, output.headers["x-amz-server-side-encryption-customer-key-md5"]], - SSEKMSKeyId: [, output.headers["x-amz-server-side-encryption-aws-kms-key-id"]], - SSEKMSEncryptionContext: [, output.headers["x-amz-server-side-encryption-context"]], - BucketKeyEnabled: [ - () => void 0 !== output.headers["x-amz-server-side-encryption-bucket-key-enabled"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]), - ], - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_Exp]: [, output.headers[_xae]], + [_ETa]: [, output.headers[_eta]], + [_CCRC]: [, output.headers[_xacc]], + [_CCRCC]: [, output.headers[_xacc_]], + [_CSHA]: [, output.headers[_xacs]], + [_CSHAh]: [, output.headers[_xacs_]], + [_SSE]: [, output.headers[_xasse]], + [_VI]: [, output.headers[_xavi]], + [_SSECA]: [, output.headers[_xasseca]], + [_SSECKMD]: [, output.headers[_xasseckm]], + [_SSEKMSKI]: [, output.headers[_xasseakki]], + [_SSEKMSEC]: [, output.headers[_xassec]], + [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, smithy_client_1.parseBoolean)(output.headers[_xassebke])], + [_RC]: [, output.headers[_xarc]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutObjectCommand = deserializeAws_restXmlPutObjectCommand; -const deserializeAws_restXmlPutObjectCommandError = async (output, context) => { +exports.de_PutObjectCommand = de_PutObjectCommand; +const de_PutObjectCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutObjectAclCommand = async (output, context) => { +const de_PutObjectAclCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutObjectAclCommandError(output, context); + return de_PutObjectAclCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_RC]: [, output.headers[_xarc]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutObjectAclCommand = deserializeAws_restXmlPutObjectAclCommand; -const deserializeAws_restXmlPutObjectAclCommandError = async (output, context) => { +exports.de_PutObjectAclCommand = de_PutObjectAclCommand; +const de_PutObjectAclCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "NoSuchKey": case "com.amazonaws.s3#NoSuchKey": - throw await deserializeAws_restXmlNoSuchKeyResponse(parsedOutput, context); + throw await de_NoSuchKeyRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlPutObjectLegalHoldCommand = async (output, context) => { +const de_PutObjectLegalHoldCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutObjectLegalHoldCommandError(output, context); + return de_PutObjectLegalHoldCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_RC]: [, output.headers[_xarc]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutObjectLegalHoldCommand = deserializeAws_restXmlPutObjectLegalHoldCommand; -const deserializeAws_restXmlPutObjectLegalHoldCommandError = async (output, context) => { +exports.de_PutObjectLegalHoldCommand = de_PutObjectLegalHoldCommand; +const de_PutObjectLegalHoldCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutObjectLockConfigurationCommand = async (output, context) => { +const de_PutObjectLockConfigurationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutObjectLockConfigurationCommandError(output, context); + return de_PutObjectLockConfigurationCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_RC]: [, output.headers[_xarc]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutObjectLockConfigurationCommand = deserializeAws_restXmlPutObjectLockConfigurationCommand; -const deserializeAws_restXmlPutObjectLockConfigurationCommandError = async (output, context) => { +exports.de_PutObjectLockConfigurationCommand = de_PutObjectLockConfigurationCommand; +const de_PutObjectLockConfigurationCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutObjectRetentionCommand = async (output, context) => { +const de_PutObjectRetentionCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutObjectRetentionCommandError(output, context); + return de_PutObjectRetentionCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_RC]: [, output.headers[_xarc]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutObjectRetentionCommand = deserializeAws_restXmlPutObjectRetentionCommand; -const deserializeAws_restXmlPutObjectRetentionCommandError = async (output, context) => { +exports.de_PutObjectRetentionCommand = de_PutObjectRetentionCommand; +const de_PutObjectRetentionCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutObjectTaggingCommand = async (output, context) => { +const de_PutObjectTaggingCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutObjectTaggingCommandError(output, context); + return de_PutObjectTaggingCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - VersionId: [, output.headers["x-amz-version-id"]], + [_VI]: [, output.headers[_xavi]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutObjectTaggingCommand = deserializeAws_restXmlPutObjectTaggingCommand; -const deserializeAws_restXmlPutObjectTaggingCommandError = async (output, context) => { +exports.de_PutObjectTaggingCommand = de_PutObjectTaggingCommand; +const de_PutObjectTaggingCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlPutPublicAccessBlockCommand = async (output, context) => { +const de_PutPublicAccessBlockCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlPutPublicAccessBlockCommandError(output, context); + return de_PutPublicAccessBlockCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlPutPublicAccessBlockCommand = deserializeAws_restXmlPutPublicAccessBlockCommand; -const deserializeAws_restXmlPutPublicAccessBlockCommandError = async (output, context) => { +exports.de_PutPublicAccessBlockCommand = de_PutPublicAccessBlockCommand; +const de_PutPublicAccessBlockCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlRestoreObjectCommand = async (output, context) => { +const de_RestoreObjectCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlRestoreObjectCommandError(output, context); + return de_RestoreObjectCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - RequestCharged: [, output.headers["x-amz-request-charged"]], - RestoreOutputPath: [, output.headers["x-amz-restore-output-path"]], + [_RC]: [, output.headers[_xarc]], + [_ROP]: [, output.headers[_xarop]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlRestoreObjectCommand = deserializeAws_restXmlRestoreObjectCommand; -const deserializeAws_restXmlRestoreObjectCommandError = async (output, context) => { +exports.de_RestoreObjectCommand = de_RestoreObjectCommand; +const de_RestoreObjectCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); switch (errorCode) { case "ObjectAlreadyInActiveTierError": case "com.amazonaws.s3#ObjectAlreadyInActiveTierError": - throw await deserializeAws_restXmlObjectAlreadyInActiveTierErrorResponse(parsedOutput, context); + throw await de_ObjectAlreadyInActiveTierErrorRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); } }; -const deserializeAws_restXmlSelectObjectContentCommand = async (output, context) => { +const de_SelectObjectContentCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlSelectObjectContentCommandError(output, context); + return de_SelectObjectContentCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = output.body; - contents.Payload = deserializeAws_restXmlSelectObjectContentEventStream(data, context); + contents.Payload = de_SelectObjectContentEventStream(data, context); return contents; }; -exports.deserializeAws_restXmlSelectObjectContentCommand = deserializeAws_restXmlSelectObjectContentCommand; -const deserializeAws_restXmlSelectObjectContentCommandError = async (output, context) => { +exports.de_SelectObjectContentCommand = de_SelectObjectContentCommand; +const de_SelectObjectContentCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlUploadPartCommand = async (output, context) => { +const de_UploadPartCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlUploadPartCommandError(output, context); + return de_UploadPartCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - ServerSideEncryption: [, output.headers["x-amz-server-side-encryption"]], - ETag: [, output.headers["etag"]], - ChecksumCRC32: [, output.headers["x-amz-checksum-crc32"]], - ChecksumCRC32C: [, output.headers["x-amz-checksum-crc32c"]], - ChecksumSHA1: [, output.headers["x-amz-checksum-sha1"]], - ChecksumSHA256: [, output.headers["x-amz-checksum-sha256"]], - SSECustomerAlgorithm: [, output.headers["x-amz-server-side-encryption-customer-algorithm"]], - SSECustomerKeyMD5: [, output.headers["x-amz-server-side-encryption-customer-key-md5"]], - SSEKMSKeyId: [, output.headers["x-amz-server-side-encryption-aws-kms-key-id"]], - BucketKeyEnabled: [ - () => void 0 !== output.headers["x-amz-server-side-encryption-bucket-key-enabled"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]), - ], - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_SSE]: [, output.headers[_xasse]], + [_ETa]: [, output.headers[_eta]], + [_CCRC]: [, output.headers[_xacc]], + [_CCRCC]: [, output.headers[_xacc_]], + [_CSHA]: [, output.headers[_xacs]], + [_CSHAh]: [, output.headers[_xacs_]], + [_SSECA]: [, output.headers[_xasseca]], + [_SSECKMD]: [, output.headers[_xasseckm]], + [_SSEKMSKI]: [, output.headers[_xasseakki]], + [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, smithy_client_1.parseBoolean)(output.headers[_xassebke])], + [_RC]: [, output.headers[_xarc]], }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlUploadPartCommand = deserializeAws_restXmlUploadPartCommand; -const deserializeAws_restXmlUploadPartCommandError = async (output, context) => { +exports.de_UploadPartCommand = de_UploadPartCommand; +const de_UploadPartCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlUploadPartCopyCommand = async (output, context) => { +const de_UploadPartCopyCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlUploadPartCopyCommandError(output, context); + return de_UploadPartCopyCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), - CopySourceVersionId: [, output.headers["x-amz-copy-source-version-id"]], - ServerSideEncryption: [, output.headers["x-amz-server-side-encryption"]], - SSECustomerAlgorithm: [, output.headers["x-amz-server-side-encryption-customer-algorithm"]], - SSECustomerKeyMD5: [, output.headers["x-amz-server-side-encryption-customer-key-md5"]], - SSEKMSKeyId: [, output.headers["x-amz-server-side-encryption-aws-kms-key-id"]], - BucketKeyEnabled: [ - () => void 0 !== output.headers["x-amz-server-side-encryption-bucket-key-enabled"], - () => (0, smithy_client_1.parseBoolean)(output.headers["x-amz-server-side-encryption-bucket-key-enabled"]), - ], - RequestCharged: [, output.headers["x-amz-request-charged"]], + [_CSVI]: [, output.headers[_xacsvi]], + [_SSE]: [, output.headers[_xasse]], + [_SSECA]: [, output.headers[_xasseca]], + [_SSECKMD]: [, output.headers[_xasseckm]], + [_SSEKMSKI]: [, output.headers[_xasseakki]], + [_BKE]: [() => void 0 !== output.headers[_xassebke], () => (0, smithy_client_1.parseBoolean)(output.headers[_xassebke])], + [_RC]: [, output.headers[_xarc]], }); const data = (0, smithy_client_1.expectObject)(await parseBody(output.body, context)); - contents.CopyPartResult = deserializeAws_restXmlCopyPartResult(data, context); + contents.CopyPartResult = de_CopyPartResult(data, context); return contents; }; -exports.deserializeAws_restXmlUploadPartCopyCommand = deserializeAws_restXmlUploadPartCopyCommand; -const deserializeAws_restXmlUploadPartCopyCommandError = async (output, context) => { +exports.de_UploadPartCopyCommand = de_UploadPartCopyCommand; +const de_UploadPartCopyCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const deserializeAws_restXmlWriteGetObjectResponseCommand = async (output, context) => { +const de_WriteGetObjectResponseCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restXmlWriteGetObjectResponseCommandError(output, context); + return de_WriteGetObjectResponseCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restXmlWriteGetObjectResponseCommand = deserializeAws_restXmlWriteGetObjectResponseCommand; -const deserializeAws_restXmlWriteGetObjectResponseCommandError = async (output, context) => { +exports.de_WriteGetObjectResponseCommand = de_WriteGetObjectResponseCommand; +const de_WriteGetObjectResponseCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestXmlErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: S3ServiceException_1.S3ServiceException, errorCode, }); }; -const map = smithy_client_1.map; -const deserializeAws_restXmlBucketAlreadyExistsResponse = async (parsedOutput, context) => { - const contents = map({}); +const throwDefaultError = (0, smithy_client_1.withBaseException)(S3ServiceException_1.S3ServiceException); +const de_BucketAlreadyExistsRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; const exception = new models_0_1.BucketAlreadyExists({ $metadata: deserializeMetadata(parsedOutput), @@ -19161,8 +23056,8 @@ const deserializeAws_restXmlBucketAlreadyExistsResponse = async (parsedOutput, c }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restXmlBucketAlreadyOwnedByYouResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_BucketAlreadyOwnedByYouRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; const exception = new models_0_1.BucketAlreadyOwnedByYou({ $metadata: deserializeMetadata(parsedOutput), @@ -19170,14 +23065,14 @@ const deserializeAws_restXmlBucketAlreadyOwnedByYouResponse = async (parsedOutpu }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restXmlInvalidObjectStateResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_InvalidObjectStateRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; - if (data["AccessTier"] !== undefined) { - contents.AccessTier = (0, smithy_client_1.expectString)(data["AccessTier"]); + if (data[_AT] != null) { + contents[_AT] = (0, smithy_client_1.expectString)(data[_AT]); } - if (data["StorageClass"] !== undefined) { - contents.StorageClass = (0, smithy_client_1.expectString)(data["StorageClass"]); + if (data[_SC] != null) { + contents[_SC] = (0, smithy_client_1.expectString)(data[_SC]); } const exception = new models_0_1.InvalidObjectState({ $metadata: deserializeMetadata(parsedOutput), @@ -19185,8 +23080,8 @@ const deserializeAws_restXmlInvalidObjectStateResponse = async (parsedOutput, co }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restXmlNoSuchBucketResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_NoSuchBucketRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; const exception = new models_0_1.NoSuchBucket({ $metadata: deserializeMetadata(parsedOutput), @@ -19194,8 +23089,8 @@ const deserializeAws_restXmlNoSuchBucketResponse = async (parsedOutput, context) }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restXmlNoSuchKeyResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_NoSuchKeyRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; const exception = new models_0_1.NoSuchKey({ $metadata: deserializeMetadata(parsedOutput), @@ -19203,8 +23098,8 @@ const deserializeAws_restXmlNoSuchKeyResponse = async (parsedOutput, context) => }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restXmlNoSuchUploadResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_NoSuchUploadRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; const exception = new models_0_1.NoSuchUpload({ $metadata: deserializeMetadata(parsedOutput), @@ -19212,8 +23107,8 @@ const deserializeAws_restXmlNoSuchUploadResponse = async (parsedOutput, context) }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restXmlNotFoundResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_NotFoundRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; const exception = new models_0_1.NotFound({ $metadata: deserializeMetadata(parsedOutput), @@ -19221,8 +23116,8 @@ const deserializeAws_restXmlNotFoundResponse = async (parsedOutput, context) => }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restXmlObjectAlreadyInActiveTierErrorResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_ObjectAlreadyInActiveTierErrorRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; const exception = new models_1_1.ObjectAlreadyInActiveTierError({ $metadata: deserializeMetadata(parsedOutput), @@ -19230,8 +23125,8 @@ const deserializeAws_restXmlObjectAlreadyInActiveTierErrorResponse = async (pars }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restXmlObjectNotInActiveTierErrorResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_ObjectNotInActiveTierErrorRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; const exception = new models_0_1.ObjectNotInActiveTierError({ $metadata: deserializeMetadata(parsedOutput), @@ -19239,3884 +23134,3710 @@ const deserializeAws_restXmlObjectNotInActiveTierErrorResponse = async (parsedOu }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restXmlSelectObjectContentEventStream = (output, context) => { +const de_SelectObjectContentEventStream = (output, context) => { return context.eventStreamMarshaller.deserialize(output, async (event) => { if (event["Records"] != null) { return { - Records: await deserializeAws_restXmlRecordsEvent_event(event["Records"], context), + Records: await de_RecordsEvent_event(event["Records"], context), }; } if (event["Stats"] != null) { return { - Stats: await deserializeAws_restXmlStatsEvent_event(event["Stats"], context), + Stats: await de_StatsEvent_event(event["Stats"], context), }; } if (event["Progress"] != null) { return { - Progress: await deserializeAws_restXmlProgressEvent_event(event["Progress"], context), + Progress: await de_ProgressEvent_event(event["Progress"], context), }; } if (event["Cont"] != null) { return { - Cont: await deserializeAws_restXmlContinuationEvent_event(event["Cont"], context), + Cont: await de_ContinuationEvent_event(event["Cont"], context), }; } if (event["End"] != null) { return { - End: await deserializeAws_restXmlEndEvent_event(event["End"], context), + End: await de_EndEvent_event(event["End"], context), }; } return { $unknown: output }; }); }; -const deserializeAws_restXmlContinuationEvent_event = async (output, context) => { +const de_ContinuationEvent_event = async (output, context) => { const contents = {}; const data = await parseBody(output.body, context); - Object.assign(contents, deserializeAws_restXmlContinuationEvent(data, context)); + Object.assign(contents, de_ContinuationEvent(data, context)); return contents; }; -const deserializeAws_restXmlEndEvent_event = async (output, context) => { +const de_EndEvent_event = async (output, context) => { const contents = {}; const data = await parseBody(output.body, context); - Object.assign(contents, deserializeAws_restXmlEndEvent(data, context)); + Object.assign(contents, de_EndEvent(data, context)); return contents; }; -const deserializeAws_restXmlProgressEvent_event = async (output, context) => { +const de_ProgressEvent_event = async (output, context) => { const contents = {}; const data = await parseBody(output.body, context); - contents.Details = deserializeAws_restXmlProgress(data, context); + contents.Details = de_Progress(data, context); return contents; }; -const deserializeAws_restXmlRecordsEvent_event = async (output, context) => { +const de_RecordsEvent_event = async (output, context) => { const contents = {}; contents.Payload = output.body; return contents; }; -const deserializeAws_restXmlStatsEvent_event = async (output, context) => { +const de_StatsEvent_event = async (output, context) => { const contents = {}; const data = await parseBody(output.body, context); - contents.Details = deserializeAws_restXmlStats(data, context); + contents.Details = de_Stats(data, context); return contents; }; -const serializeAws_restXmlAbortIncompleteMultipartUpload = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("AbortIncompleteMultipartUpload"); - if (input.DaysAfterInitiation != null) { - const node = xml_builder_1.XmlNode.of("DaysAfterInitiation", String(input.DaysAfterInitiation)).withName("DaysAfterInitiation"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlAccelerateConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("AccelerateConfiguration"); - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("BucketAccelerateStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlAccessControlPolicy = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("AccessControlPolicy"); - if (input.Grants != null) { - const nodes = serializeAws_restXmlGrants(input.Grants, context); - const containerNode = new xml_builder_1.XmlNode("AccessControlList"); - nodes.map((node) => { - containerNode.addChildNode(node); - }); - bodyNode.addChildNode(containerNode); +const se_AbortIncompleteMultipartUpload = (input, context) => { + const bn = new xml_builder_1.XmlNode(_AIMU); + if (input[_DAI] != null) { + bn.c(xml_builder_1.XmlNode.of(_DAI, String(input[_DAI])).n(_DAI)); + } + return bn; +}; +const se_AccelerateConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ACc); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_BAS, input[_S]).n(_S)); } - if (input.Owner != null) { - const node = serializeAws_restXmlOwner(input.Owner, context).withName("Owner"); - bodyNode.addChildNode(node); + return bn; +}; +const se_AccessControlPolicy = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ACP); + bn.lc(input, "Grants", "AccessControlList", () => se_Grants(input[_Gr], context)); + if (input[_O] != null) { + bn.c(se_Owner(input[_O], context).n(_O)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlAccessControlTranslation = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("AccessControlTranslation"); - if (input.Owner != null) { - const node = xml_builder_1.XmlNode.of("OwnerOverride", input.Owner).withName("Owner"); - bodyNode.addChildNode(node); +const se_AccessControlTranslation = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ACT); + if (input[_O] != null) { + bn.c(xml_builder_1.XmlNode.of(_OOw, input[_O]).n(_O)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlAllowedHeaders = (input, context) => { +const se_AllowedHeaders = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = xml_builder_1.XmlNode.of("AllowedHeader", entry); - return node.withName("member"); + const n = xml_builder_1.XmlNode.of(_AH, entry); + return n.n(_me); }); }; -const serializeAws_restXmlAllowedMethods = (input, context) => { +const se_AllowedMethods = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = xml_builder_1.XmlNode.of("AllowedMethod", entry); - return node.withName("member"); + const n = xml_builder_1.XmlNode.of(_AM, entry); + return n.n(_me); }); }; -const serializeAws_restXmlAllowedOrigins = (input, context) => { +const se_AllowedOrigins = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = xml_builder_1.XmlNode.of("AllowedOrigin", entry); - return node.withName("member"); + const n = xml_builder_1.XmlNode.of(_AO, entry); + return n.n(_me); }); }; -const serializeAws_restXmlAnalyticsAndOperator = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("AnalyticsAndOperator"); - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); - } - if (input.Tags != null) { - const nodes = serializeAws_restXmlTagSet(input.Tags, context); - nodes.map((node) => { - node = node.withName("Tag"); - bodyNode.addChildNode(node); - }); - } - return bodyNode; +const se_AnalyticsAndOperator = (input, context) => { + const bn = new xml_builder_1.XmlNode(_AAO); + bn.cc(input, _P); + bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); + return bn; }; -const serializeAws_restXmlAnalyticsConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("AnalyticsConfiguration"); - if (input.Id != null) { - const node = xml_builder_1.XmlNode.of("AnalyticsId", input.Id).withName("Id"); - bodyNode.addChildNode(node); +const se_AnalyticsConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_AC); + if (input[_I] != null) { + bn.c(xml_builder_1.XmlNode.of(_AI, input[_I]).n(_I)); } - if (input.Filter != null) { - const node = serializeAws_restXmlAnalyticsFilter(input.Filter, context).withName("Filter"); - bodyNode.addChildNode(node); + if (input[_F] != null) { + bn.c(se_AnalyticsFilter(input[_F], context).n(_F)); } - if (input.StorageClassAnalysis != null) { - const node = serializeAws_restXmlStorageClassAnalysis(input.StorageClassAnalysis, context).withName("StorageClassAnalysis"); - bodyNode.addChildNode(node); + if (input[_SCA] != null) { + bn.c(se_StorageClassAnalysis(input[_SCA], context).n(_SCA)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlAnalyticsExportDestination = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("AnalyticsExportDestination"); - if (input.S3BucketDestination != null) { - const node = serializeAws_restXmlAnalyticsS3BucketDestination(input.S3BucketDestination, context).withName("S3BucketDestination"); - bodyNode.addChildNode(node); +const se_AnalyticsExportDestination = (input, context) => { + const bn = new xml_builder_1.XmlNode(_AED); + if (input[_SBD] != null) { + bn.c(se_AnalyticsS3BucketDestination(input[_SBD], context).n(_SBD)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlAnalyticsFilter = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("AnalyticsFilter"); +const se_AnalyticsFilter = (input, context) => { + const bn = new xml_builder_1.XmlNode(_AF); models_0_1.AnalyticsFilter.visit(input, { Prefix: (value) => { - const node = xml_builder_1.XmlNode.of("Prefix", value).withName("Prefix"); - bodyNode.addChildNode(node); + if (input[_P] != null) { + bn.c(xml_builder_1.XmlNode.of(_P, value).n(_P)); + } }, Tag: (value) => { - const node = serializeAws_restXmlTag(value, context).withName("Tag"); - bodyNode.addChildNode(node); + if (input[_Ta] != null) { + bn.c(se_Tag(value, context).n(_Ta)); + } }, And: (value) => { - const node = serializeAws_restXmlAnalyticsAndOperator(value, context).withName("And"); - bodyNode.addChildNode(node); + if (input[_A] != null) { + bn.c(se_AnalyticsAndOperator(value, context).n(_A)); + } }, _: (name, value) => { if (!(value instanceof xml_builder_1.XmlNode || value instanceof xml_builder_1.XmlText)) { throw new Error("Unable to serialize unknown union members in XML."); } - bodyNode.addChildNode(new xml_builder_1.XmlNode(name).addChildNode(value)); + bn.c(new xml_builder_1.XmlNode(name).c(value)); }, }); - return bodyNode; + return bn; }; -const serializeAws_restXmlAnalyticsS3BucketDestination = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("AnalyticsS3BucketDestination"); - if (input.Format != null) { - const node = xml_builder_1.XmlNode.of("AnalyticsS3ExportFileFormat", input.Format).withName("Format"); - bodyNode.addChildNode(node); +const se_AnalyticsS3BucketDestination = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ASBD); + if (input[_Fo] != null) { + bn.c(xml_builder_1.XmlNode.of(_ASEFF, input[_Fo]).n(_Fo)); } - if (input.BucketAccountId != null) { - const node = xml_builder_1.XmlNode.of("AccountId", input.BucketAccountId).withName("BucketAccountId"); - bodyNode.addChildNode(node); + if (input[_BAI] != null) { + bn.c(xml_builder_1.XmlNode.of(_AIc, input[_BAI]).n(_BAI)); } - if (input.Bucket != null) { - const node = xml_builder_1.XmlNode.of("BucketName", input.Bucket).withName("Bucket"); - bodyNode.addChildNode(node); + if (input[_B] != null) { + bn.c(xml_builder_1.XmlNode.of(_BN, input[_B]).n(_B)); } - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); - } - return bodyNode; + bn.cc(input, _P); + return bn; }; -const serializeAws_restXmlBucketLifecycleConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("BucketLifecycleConfiguration"); - if (input.Rules != null) { - const nodes = serializeAws_restXmlLifecycleRules(input.Rules, context); - nodes.map((node) => { - node = node.withName("Rule"); - bodyNode.addChildNode(node); - }); +const se_BucketInfo = (input, context) => { + const bn = new xml_builder_1.XmlNode(_BI); + bn.cc(input, _DR); + if (input[_Ty] != null) { + bn.c(xml_builder_1.XmlNode.of(_BT, input[_Ty]).n(_Ty)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlBucketLoggingStatus = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("BucketLoggingStatus"); - if (input.LoggingEnabled != null) { - const node = serializeAws_restXmlLoggingEnabled(input.LoggingEnabled, context).withName("LoggingEnabled"); - bodyNode.addChildNode(node); - } - return bodyNode; +const se_BucketLifecycleConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_BLC); + bn.l(input, "Rules", "Rule", () => se_LifecycleRules(input[_Rul], context)); + return bn; }; -const serializeAws_restXmlCompletedMultipartUpload = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("CompletedMultipartUpload"); - if (input.Parts != null) { - const nodes = serializeAws_restXmlCompletedPartList(input.Parts, context); - nodes.map((node) => { - node = node.withName("Part"); - bodyNode.addChildNode(node); - }); +const se_BucketLoggingStatus = (input, context) => { + const bn = new xml_builder_1.XmlNode(_BLS); + if (input[_LE] != null) { + bn.c(se_LoggingEnabled(input[_LE], context).n(_LE)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlCompletedPart = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("CompletedPart"); - if (input.ETag != null) { - const node = xml_builder_1.XmlNode.of("ETag", input.ETag).withName("ETag"); - bodyNode.addChildNode(node); - } - if (input.ChecksumCRC32 != null) { - const node = xml_builder_1.XmlNode.of("ChecksumCRC32", input.ChecksumCRC32).withName("ChecksumCRC32"); - bodyNode.addChildNode(node); - } - if (input.ChecksumCRC32C != null) { - const node = xml_builder_1.XmlNode.of("ChecksumCRC32C", input.ChecksumCRC32C).withName("ChecksumCRC32C"); - bodyNode.addChildNode(node); - } - if (input.ChecksumSHA1 != null) { - const node = xml_builder_1.XmlNode.of("ChecksumSHA1", input.ChecksumSHA1).withName("ChecksumSHA1"); - bodyNode.addChildNode(node); - } - if (input.ChecksumSHA256 != null) { - const node = xml_builder_1.XmlNode.of("ChecksumSHA256", input.ChecksumSHA256).withName("ChecksumSHA256"); - bodyNode.addChildNode(node); - } - if (input.PartNumber != null) { - const node = xml_builder_1.XmlNode.of("PartNumber", String(input.PartNumber)).withName("PartNumber"); - bodyNode.addChildNode(node); +const se_CompletedMultipartUpload = (input, context) => { + const bn = new xml_builder_1.XmlNode(_CMU); + bn.l(input, "Parts", "Part", () => se_CompletedPartList(input[_Part], context)); + return bn; +}; +const se_CompletedPart = (input, context) => { + const bn = new xml_builder_1.XmlNode(_CPo); + bn.cc(input, _ETa); + bn.cc(input, _CCRC); + bn.cc(input, _CCRCC); + bn.cc(input, _CSHA); + bn.cc(input, _CSHAh); + if (input[_PN] != null) { + bn.c(xml_builder_1.XmlNode.of(_PN, String(input[_PN])).n(_PN)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlCompletedPartList = (input, context) => { +const se_CompletedPartList = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlCompletedPart(entry, context); - return node.withName("member"); - }); -}; -const serializeAws_restXmlCondition = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Condition"); - if (input.HttpErrorCodeReturnedEquals != null) { - const node = xml_builder_1.XmlNode - .of("HttpErrorCodeReturnedEquals", input.HttpErrorCodeReturnedEquals) - .withName("HttpErrorCodeReturnedEquals"); - bodyNode.addChildNode(node); - } - if (input.KeyPrefixEquals != null) { - const node = xml_builder_1.XmlNode.of("KeyPrefixEquals", input.KeyPrefixEquals).withName("KeyPrefixEquals"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlCORSConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("CORSConfiguration"); - if (input.CORSRules != null) { - const nodes = serializeAws_restXmlCORSRules(input.CORSRules, context); - nodes.map((node) => { - node = node.withName("CORSRule"); - bodyNode.addChildNode(node); - }); - } - return bodyNode; + const n = se_CompletedPart(entry, context); + return n.n(_me); + }); }; -const serializeAws_restXmlCORSRule = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("CORSRule"); - if (input.ID != null) { - const node = xml_builder_1.XmlNode.of("ID", input.ID).withName("ID"); - bodyNode.addChildNode(node); - } - if (input.AllowedHeaders != null) { - const nodes = serializeAws_restXmlAllowedHeaders(input.AllowedHeaders, context); - nodes.map((node) => { - node = node.withName("AllowedHeader"); - bodyNode.addChildNode(node); - }); - } - if (input.AllowedMethods != null) { - const nodes = serializeAws_restXmlAllowedMethods(input.AllowedMethods, context); - nodes.map((node) => { - node = node.withName("AllowedMethod"); - bodyNode.addChildNode(node); - }); +const se_Condition = (input, context) => { + const bn = new xml_builder_1.XmlNode(_Con); + bn.cc(input, _HECRE); + bn.cc(input, _KPE); + return bn; +}; +const se_CORSConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_CORSC); + bn.l(input, "CORSRules", "CORSRule", () => se_CORSRules(input[_CORSRu], context)); + return bn; +}; +const se_CORSRule = (input, context) => { + const bn = new xml_builder_1.XmlNode(_CORSR); + bn.cc(input, _ID_); + bn.l(input, "AllowedHeaders", "AllowedHeader", () => se_AllowedHeaders(input[_AHl], context)); + bn.l(input, "AllowedMethods", "AllowedMethod", () => se_AllowedMethods(input[_AMl], context)); + bn.l(input, "AllowedOrigins", "AllowedOrigin", () => se_AllowedOrigins(input[_AOl], context)); + bn.l(input, "ExposeHeaders", "ExposeHeader", () => se_ExposeHeaders(input[_EH], context)); + if (input[_MAS] != null) { + bn.c(xml_builder_1.XmlNode.of(_MAS, String(input[_MAS])).n(_MAS)); + } + return bn; +}; +const se_CORSRules = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + const n = se_CORSRule(entry, context); + return n.n(_me); + }); +}; +const se_CreateBucketConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_CBC); + if (input[_LC] != null) { + bn.c(xml_builder_1.XmlNode.of(_BLCu, input[_LC]).n(_LC)); } - if (input.AllowedOrigins != null) { - const nodes = serializeAws_restXmlAllowedOrigins(input.AllowedOrigins, context); - nodes.map((node) => { - node = node.withName("AllowedOrigin"); - bodyNode.addChildNode(node); - }); + if (input[_L] != null) { + bn.c(se_LocationInfo(input[_L], context).n(_L)); } - if (input.ExposeHeaders != null) { - const nodes = serializeAws_restXmlExposeHeaders(input.ExposeHeaders, context); - nodes.map((node) => { - node = node.withName("ExposeHeader"); - bodyNode.addChildNode(node); - }); + if (input[_B] != null) { + bn.c(se_BucketInfo(input[_B], context).n(_B)); } - if (input.MaxAgeSeconds != null) { - const node = xml_builder_1.XmlNode.of("MaxAgeSeconds", String(input.MaxAgeSeconds)).withName("MaxAgeSeconds"); - bodyNode.addChildNode(node); + return bn; +}; +const se_CSVInput = (input, context) => { + const bn = new xml_builder_1.XmlNode(_CSVIn); + bn.cc(input, _FHI); + bn.cc(input, _Com); + bn.cc(input, _QEC); + bn.cc(input, _RD); + bn.cc(input, _FD); + bn.cc(input, _QCuo); + if (input[_AQRD] != null) { + bn.c(xml_builder_1.XmlNode.of(_AQRD, String(input[_AQRD])).n(_AQRD)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlCORSRules = (input, context) => { - return input - .filter((e) => e != null) - .map((entry) => { - const node = serializeAws_restXmlCORSRule(entry, context); - return node.withName("member"); - }); -}; -const serializeAws_restXmlCreateBucketConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("CreateBucketConfiguration"); - if (input.LocationConstraint != null) { - const node = xml_builder_1.XmlNode.of("BucketLocationConstraint", input.LocationConstraint).withName("LocationConstraint"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlCSVInput = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("CSVInput"); - if (input.FileHeaderInfo != null) { - const node = xml_builder_1.XmlNode.of("FileHeaderInfo", input.FileHeaderInfo).withName("FileHeaderInfo"); - bodyNode.addChildNode(node); - } - if (input.Comments != null) { - const node = xml_builder_1.XmlNode.of("Comments", input.Comments).withName("Comments"); - bodyNode.addChildNode(node); - } - if (input.QuoteEscapeCharacter != null) { - const node = xml_builder_1.XmlNode.of("QuoteEscapeCharacter", input.QuoteEscapeCharacter).withName("QuoteEscapeCharacter"); - bodyNode.addChildNode(node); - } - if (input.RecordDelimiter != null) { - const node = xml_builder_1.XmlNode.of("RecordDelimiter", input.RecordDelimiter).withName("RecordDelimiter"); - bodyNode.addChildNode(node); - } - if (input.FieldDelimiter != null) { - const node = xml_builder_1.XmlNode.of("FieldDelimiter", input.FieldDelimiter).withName("FieldDelimiter"); - bodyNode.addChildNode(node); - } - if (input.QuoteCharacter != null) { - const node = xml_builder_1.XmlNode.of("QuoteCharacter", input.QuoteCharacter).withName("QuoteCharacter"); - bodyNode.addChildNode(node); - } - if (input.AllowQuotedRecordDelimiter != null) { - const node = xml_builder_1.XmlNode - .of("AllowQuotedRecordDelimiter", String(input.AllowQuotedRecordDelimiter)) - .withName("AllowQuotedRecordDelimiter"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlCSVOutput = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("CSVOutput"); - if (input.QuoteFields != null) { - const node = xml_builder_1.XmlNode.of("QuoteFields", input.QuoteFields).withName("QuoteFields"); - bodyNode.addChildNode(node); - } - if (input.QuoteEscapeCharacter != null) { - const node = xml_builder_1.XmlNode.of("QuoteEscapeCharacter", input.QuoteEscapeCharacter).withName("QuoteEscapeCharacter"); - bodyNode.addChildNode(node); - } - if (input.RecordDelimiter != null) { - const node = xml_builder_1.XmlNode.of("RecordDelimiter", input.RecordDelimiter).withName("RecordDelimiter"); - bodyNode.addChildNode(node); - } - if (input.FieldDelimiter != null) { - const node = xml_builder_1.XmlNode.of("FieldDelimiter", input.FieldDelimiter).withName("FieldDelimiter"); - bodyNode.addChildNode(node); - } - if (input.QuoteCharacter != null) { - const node = xml_builder_1.XmlNode.of("QuoteCharacter", input.QuoteCharacter).withName("QuoteCharacter"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlDefaultRetention = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("DefaultRetention"); - if (input.Mode != null) { - const node = xml_builder_1.XmlNode.of("ObjectLockRetentionMode", input.Mode).withName("Mode"); - bodyNode.addChildNode(node); - } - if (input.Days != null) { - const node = xml_builder_1.XmlNode.of("Days", String(input.Days)).withName("Days"); - bodyNode.addChildNode(node); - } - if (input.Years != null) { - const node = xml_builder_1.XmlNode.of("Years", String(input.Years)).withName("Years"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlDelete = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Delete"); - if (input.Objects != null) { - const nodes = serializeAws_restXmlObjectIdentifierList(input.Objects, context); - nodes.map((node) => { - node = node.withName("Object"); - bodyNode.addChildNode(node); - }); +const se_CSVOutput = (input, context) => { + const bn = new xml_builder_1.XmlNode(_CSVO); + bn.cc(input, _QF); + bn.cc(input, _QEC); + bn.cc(input, _RD); + bn.cc(input, _FD); + bn.cc(input, _QCuo); + return bn; +}; +const se_DefaultRetention = (input, context) => { + const bn = new xml_builder_1.XmlNode(_DRe); + if (input[_Mo] != null) { + bn.c(xml_builder_1.XmlNode.of(_OLRM, input[_Mo]).n(_Mo)); } - if (input.Quiet != null) { - const node = xml_builder_1.XmlNode.of("Quiet", String(input.Quiet)).withName("Quiet"); - bodyNode.addChildNode(node); + if (input[_Da] != null) { + bn.c(xml_builder_1.XmlNode.of(_Da, String(input[_Da])).n(_Da)); } - return bodyNode; + if (input[_Y] != null) { + bn.c(xml_builder_1.XmlNode.of(_Y, String(input[_Y])).n(_Y)); + } + return bn; }; -const serializeAws_restXmlDeleteMarkerReplication = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("DeleteMarkerReplication"); - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("DeleteMarkerReplicationStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); +const se_Delete = (input, context) => { + const bn = new xml_builder_1.XmlNode(_Del); + bn.l(input, "Objects", "Object", () => se_ObjectIdentifierList(input[_Ob], context)); + if (input[_Q] != null) { + bn.c(xml_builder_1.XmlNode.of(_Q, String(input[_Q])).n(_Q)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlDestination = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Destination"); - if (input.Bucket != null) { - const node = xml_builder_1.XmlNode.of("BucketName", input.Bucket).withName("Bucket"); - bodyNode.addChildNode(node); +const se_DeleteMarkerReplication = (input, context) => { + const bn = new xml_builder_1.XmlNode(_DMR); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_DMRS, input[_S]).n(_S)); } - if (input.Account != null) { - const node = xml_builder_1.XmlNode.of("AccountId", input.Account).withName("Account"); - bodyNode.addChildNode(node); + return bn; +}; +const se_Destination = (input, context) => { + const bn = new xml_builder_1.XmlNode(_Des); + if (input[_B] != null) { + bn.c(xml_builder_1.XmlNode.of(_BN, input[_B]).n(_B)); } - if (input.StorageClass != null) { - const node = xml_builder_1.XmlNode.of("StorageClass", input.StorageClass).withName("StorageClass"); - bodyNode.addChildNode(node); + if (input[_Ac] != null) { + bn.c(xml_builder_1.XmlNode.of(_AIc, input[_Ac]).n(_Ac)); } - if (input.AccessControlTranslation != null) { - const node = serializeAws_restXmlAccessControlTranslation(input.AccessControlTranslation, context).withName("AccessControlTranslation"); - bodyNode.addChildNode(node); + bn.cc(input, _SC); + if (input[_ACT] != null) { + bn.c(se_AccessControlTranslation(input[_ACT], context).n(_ACT)); } - if (input.EncryptionConfiguration != null) { - const node = serializeAws_restXmlEncryptionConfiguration(input.EncryptionConfiguration, context).withName("EncryptionConfiguration"); - bodyNode.addChildNode(node); + if (input[_ECn] != null) { + bn.c(se_EncryptionConfiguration(input[_ECn], context).n(_ECn)); } - if (input.ReplicationTime != null) { - const node = serializeAws_restXmlReplicationTime(input.ReplicationTime, context).withName("ReplicationTime"); - bodyNode.addChildNode(node); + if (input[_RTe] != null) { + bn.c(se_ReplicationTime(input[_RTe], context).n(_RTe)); } - if (input.Metrics != null) { - const node = serializeAws_restXmlMetrics(input.Metrics, context).withName("Metrics"); - bodyNode.addChildNode(node); + if (input[_Me] != null) { + bn.c(se_Metrics(input[_Me], context).n(_Me)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlEncryption = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Encryption"); - if (input.EncryptionType != null) { - const node = xml_builder_1.XmlNode.of("ServerSideEncryption", input.EncryptionType).withName("EncryptionType"); - bodyNode.addChildNode(node); - } - if (input.KMSKeyId != null) { - const node = xml_builder_1.XmlNode.of("SSEKMSKeyId", input.KMSKeyId).withName("KMSKeyId"); - bodyNode.addChildNode(node); +const se_Encryption = (input, context) => { + const bn = new xml_builder_1.XmlNode(_En); + if (input[_ETn] != null) { + bn.c(xml_builder_1.XmlNode.of(_SSE, input[_ETn]).n(_ETn)); } - if (input.KMSContext != null) { - const node = xml_builder_1.XmlNode.of("KMSContext", input.KMSContext).withName("KMSContext"); - bodyNode.addChildNode(node); + if (input[_KMSKI] != null) { + bn.c(xml_builder_1.XmlNode.of(_SSEKMSKI, input[_KMSKI]).n(_KMSKI)); } - return bodyNode; + bn.cc(input, _KMSC); + return bn; }; -const serializeAws_restXmlEncryptionConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("EncryptionConfiguration"); - if (input.ReplicaKmsKeyID != null) { - const node = xml_builder_1.XmlNode.of("ReplicaKmsKeyID", input.ReplicaKmsKeyID).withName("ReplicaKmsKeyID"); - bodyNode.addChildNode(node); - } - return bodyNode; +const se_EncryptionConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ECn); + bn.cc(input, _RKKID); + return bn; }; -const serializeAws_restXmlErrorDocument = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ErrorDocument"); - if (input.Key != null) { - const node = xml_builder_1.XmlNode.of("ObjectKey", input.Key).withName("Key"); - bodyNode.addChildNode(node); +const se_ErrorDocument = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ED); + if (input[_K] != null) { + bn.c(xml_builder_1.XmlNode.of(_OK, input[_K]).n(_K)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlEventBridgeConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("EventBridgeConfiguration"); - return bodyNode; +const se_EventBridgeConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_EBC); + return bn; }; -const serializeAws_restXmlEventList = (input, context) => { +const se_EventList = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = xml_builder_1.XmlNode.of("Event", entry); - return node.withName("member"); + const n = xml_builder_1.XmlNode.of(_Ev, entry); + return n.n(_me); }); }; -const serializeAws_restXmlExistingObjectReplication = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ExistingObjectReplication"); - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("ExistingObjectReplicationStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); +const se_ExistingObjectReplication = (input, context) => { + const bn = new xml_builder_1.XmlNode(_EOR); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_EORS, input[_S]).n(_S)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlExposeHeaders = (input, context) => { +const se_ExposeHeaders = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = xml_builder_1.XmlNode.of("ExposeHeader", entry); - return node.withName("member"); + const n = xml_builder_1.XmlNode.of(_EHx, entry); + return n.n(_me); }); }; -const serializeAws_restXmlFilterRule = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("FilterRule"); - if (input.Name != null) { - const node = xml_builder_1.XmlNode.of("FilterRuleName", input.Name).withName("Name"); - bodyNode.addChildNode(node); +const se_FilterRule = (input, context) => { + const bn = new xml_builder_1.XmlNode(_FR); + if (input[_N] != null) { + bn.c(xml_builder_1.XmlNode.of(_FRN, input[_N]).n(_N)); } - if (input.Value != null) { - const node = xml_builder_1.XmlNode.of("FilterRuleValue", input.Value).withName("Value"); - bodyNode.addChildNode(node); + if (input[_Va] != null) { + bn.c(xml_builder_1.XmlNode.of(_FRV, input[_Va]).n(_Va)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlFilterRuleList = (input, context) => { +const se_FilterRuleList = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlFilterRule(entry, context); - return node.withName("member"); + const n = se_FilterRule(entry, context); + return n.n(_me); }); }; -const serializeAws_restXmlGlacierJobParameters = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("GlacierJobParameters"); - if (input.Tier != null) { - const node = xml_builder_1.XmlNode.of("Tier", input.Tier).withName("Tier"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlGrant = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Grant"); - if (input.Grantee != null) { - const node = serializeAws_restXmlGrantee(input.Grantee, context).withName("Grantee"); - node.addAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); - bodyNode.addChildNode(node); - } - if (input.Permission != null) { - const node = xml_builder_1.XmlNode.of("Permission", input.Permission).withName("Permission"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlGrantee = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Grantee"); - if (input.DisplayName != null) { - const node = xml_builder_1.XmlNode.of("DisplayName", input.DisplayName).withName("DisplayName"); - bodyNode.addChildNode(node); - } - if (input.EmailAddress != null) { - const node = xml_builder_1.XmlNode.of("EmailAddress", input.EmailAddress).withName("EmailAddress"); - bodyNode.addChildNode(node); - } - if (input.ID != null) { - const node = xml_builder_1.XmlNode.of("ID", input.ID).withName("ID"); - bodyNode.addChildNode(node); - } - if (input.URI != null) { - const node = xml_builder_1.XmlNode.of("URI", input.URI).withName("URI"); - bodyNode.addChildNode(node); - } - if (input.Type != null) { - bodyNode.addAttribute("xsi:type", input.Type); - } - return bodyNode; -}; -const serializeAws_restXmlGrants = (input, context) => { +const se_GlacierJobParameters = (input, context) => { + const bn = new xml_builder_1.XmlNode(_GJP); + bn.cc(input, _Ti); + return bn; +}; +const se_Grant = (input, context) => { + const bn = new xml_builder_1.XmlNode(_G); + if (input[_Gra] != null) { + const n = se_Grantee(input[_Gra], context).n(_Gra); + n.a("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + bn.c(n); + } + bn.cc(input, _Pe); + return bn; +}; +const se_Grantee = (input, context) => { + const bn = new xml_builder_1.XmlNode(_Gra); + bn.cc(input, _DN); + bn.cc(input, _EA); + bn.cc(input, _ID_); + bn.cc(input, _URI); + bn.a("xsi:type", input[_Ty]); + return bn; +}; +const se_Grants = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlGrant(entry, context); - return node.withName("Grant"); + const n = se_Grant(entry, context); + return n.n(_G); }); }; -const serializeAws_restXmlIndexDocument = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("IndexDocument"); - if (input.Suffix != null) { - const node = xml_builder_1.XmlNode.of("Suffix", input.Suffix).withName("Suffix"); - bodyNode.addChildNode(node); - } - return bodyNode; +const se_IndexDocument = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ID); + bn.cc(input, _Su); + return bn; }; -const serializeAws_restXmlInputSerialization = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("InputSerialization"); - if (input.CSV != null) { - const node = serializeAws_restXmlCSVInput(input.CSV, context).withName("CSV"); - bodyNode.addChildNode(node); +const se_InputSerialization = (input, context) => { + const bn = new xml_builder_1.XmlNode(_IS); + if (input[_CSV] != null) { + bn.c(se_CSVInput(input[_CSV], context).n(_CSV)); + } + bn.cc(input, _CTom); + if (input[_JSON] != null) { + bn.c(se_JSONInput(input[_JSON], context).n(_JSON)); } - if (input.CompressionType != null) { - const node = xml_builder_1.XmlNode.of("CompressionType", input.CompressionType).withName("CompressionType"); - bodyNode.addChildNode(node); + if (input[_Parq] != null) { + bn.c(se_ParquetInput(input[_Parq], context).n(_Parq)); + } + return bn; +}; +const se_IntelligentTieringAndOperator = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ITAO); + bn.cc(input, _P); + bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); + return bn; +}; +const se_IntelligentTieringConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ITC); + if (input[_I] != null) { + bn.c(xml_builder_1.XmlNode.of(_ITI, input[_I]).n(_I)); } - if (input.JSON != null) { - const node = serializeAws_restXmlJSONInput(input.JSON, context).withName("JSON"); - bodyNode.addChildNode(node); + if (input[_F] != null) { + bn.c(se_IntelligentTieringFilter(input[_F], context).n(_F)); } - if (input.Parquet != null) { - const node = serializeAws_restXmlParquetInput(input.Parquet, context).withName("Parquet"); - bodyNode.addChildNode(node); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_ITS, input[_S]).n(_S)); } - return bodyNode; + bn.l(input, "Tierings", "Tiering", () => se_TieringList(input[_Tie], context)); + return bn; }; -const serializeAws_restXmlIntelligentTieringAndOperator = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("IntelligentTieringAndOperator"); - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); +const se_IntelligentTieringFilter = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ITF); + bn.cc(input, _P); + if (input[_Ta] != null) { + bn.c(se_Tag(input[_Ta], context).n(_Ta)); } - if (input.Tags != null) { - const nodes = serializeAws_restXmlTagSet(input.Tags, context); - nodes.map((node) => { - node = node.withName("Tag"); - bodyNode.addChildNode(node); - }); + if (input[_A] != null) { + bn.c(se_IntelligentTieringAndOperator(input[_A], context).n(_A)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlIntelligentTieringConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("IntelligentTieringConfiguration"); - if (input.Id != null) { - const node = xml_builder_1.XmlNode.of("IntelligentTieringId", input.Id).withName("Id"); - bodyNode.addChildNode(node); +const se_InventoryConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_IC); + if (input[_Des] != null) { + bn.c(se_InventoryDestination(input[_Des], context).n(_Des)); } - if (input.Filter != null) { - const node = serializeAws_restXmlIntelligentTieringFilter(input.Filter, context).withName("Filter"); - bodyNode.addChildNode(node); + if (input[_IE] != null) { + bn.c(xml_builder_1.XmlNode.of(_IE, String(input[_IE])).n(_IE)); } - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("IntelligentTieringStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); + if (input[_F] != null) { + bn.c(se_InventoryFilter(input[_F], context).n(_F)); } - if (input.Tierings != null) { - const nodes = serializeAws_restXmlTieringList(input.Tierings, context); - nodes.map((node) => { - node = node.withName("Tiering"); - bodyNode.addChildNode(node); - }); + if (input[_I] != null) { + bn.c(xml_builder_1.XmlNode.of(_II, input[_I]).n(_I)); } - return bodyNode; -}; -const serializeAws_restXmlIntelligentTieringFilter = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("IntelligentTieringFilter"); - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); - } - if (input.Tag != null) { - const node = serializeAws_restXmlTag(input.Tag, context).withName("Tag"); - bodyNode.addChildNode(node); - } - if (input.And != null) { - const node = serializeAws_restXmlIntelligentTieringAndOperator(input.And, context).withName("And"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlInventoryConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("InventoryConfiguration"); - if (input.Destination != null) { - const node = serializeAws_restXmlInventoryDestination(input.Destination, context).withName("Destination"); - bodyNode.addChildNode(node); - } - if (input.IsEnabled != null) { - const node = xml_builder_1.XmlNode.of("IsEnabled", String(input.IsEnabled)).withName("IsEnabled"); - bodyNode.addChildNode(node); - } - if (input.Filter != null) { - const node = serializeAws_restXmlInventoryFilter(input.Filter, context).withName("Filter"); - bodyNode.addChildNode(node); - } - if (input.Id != null) { - const node = xml_builder_1.XmlNode.of("InventoryId", input.Id).withName("Id"); - bodyNode.addChildNode(node); - } - if (input.IncludedObjectVersions != null) { - const node = xml_builder_1.XmlNode - .of("InventoryIncludedObjectVersions", input.IncludedObjectVersions) - .withName("IncludedObjectVersions"); - bodyNode.addChildNode(node); - } - if (input.OptionalFields != null) { - const nodes = serializeAws_restXmlInventoryOptionalFields(input.OptionalFields, context); - const containerNode = new xml_builder_1.XmlNode("OptionalFields"); - nodes.map((node) => { - containerNode.addChildNode(node); - }); - bodyNode.addChildNode(containerNode); + if (input[_IOV] != null) { + bn.c(xml_builder_1.XmlNode.of(_IIOV, input[_IOV]).n(_IOV)); } - if (input.Schedule != null) { - const node = serializeAws_restXmlInventorySchedule(input.Schedule, context).withName("Schedule"); - bodyNode.addChildNode(node); + bn.lc(input, "OptionalFields", "OptionalFields", () => se_InventoryOptionalFields(input[_OF], context)); + if (input[_Sc] != null) { + bn.c(se_InventorySchedule(input[_Sc], context).n(_Sc)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlInventoryDestination = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("InventoryDestination"); - if (input.S3BucketDestination != null) { - const node = serializeAws_restXmlInventoryS3BucketDestination(input.S3BucketDestination, context).withName("S3BucketDestination"); - bodyNode.addChildNode(node); +const se_InventoryDestination = (input, context) => { + const bn = new xml_builder_1.XmlNode(_IDn); + if (input[_SBD] != null) { + bn.c(se_InventoryS3BucketDestination(input[_SBD], context).n(_SBD)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlInventoryEncryption = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("InventoryEncryption"); - if (input.SSES3 != null) { - const node = serializeAws_restXmlSSES3(input.SSES3, context).withName("SSE-S3"); - bodyNode.addChildNode(node); +const se_InventoryEncryption = (input, context) => { + const bn = new xml_builder_1.XmlNode(_IEn); + if (input[_SSES] != null) { + bn.c(se_SSES3(input[_SSES], context).n(_SS)); } - if (input.SSEKMS != null) { - const node = serializeAws_restXmlSSEKMS(input.SSEKMS, context).withName("SSE-KMS"); - bodyNode.addChildNode(node); + if (input[_SSEKMS] != null) { + bn.c(se_SSEKMS(input[_SSEKMS], context).n(_SK)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlInventoryFilter = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("InventoryFilter"); - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); - } - return bodyNode; +const se_InventoryFilter = (input, context) => { + const bn = new xml_builder_1.XmlNode(_IF); + bn.cc(input, _P); + return bn; }; -const serializeAws_restXmlInventoryOptionalFields = (input, context) => { +const se_InventoryOptionalFields = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = xml_builder_1.XmlNode.of("InventoryOptionalField", entry); - return node.withName("Field"); + const n = xml_builder_1.XmlNode.of(_IOF, entry); + return n.n(_Fi); }); }; -const serializeAws_restXmlInventoryS3BucketDestination = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("InventoryS3BucketDestination"); - if (input.AccountId != null) { - const node = xml_builder_1.XmlNode.of("AccountId", input.AccountId).withName("AccountId"); - bodyNode.addChildNode(node); +const se_InventoryS3BucketDestination = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ISBD); + bn.cc(input, _AIc); + if (input[_B] != null) { + bn.c(xml_builder_1.XmlNode.of(_BN, input[_B]).n(_B)); } - if (input.Bucket != null) { - const node = xml_builder_1.XmlNode.of("BucketName", input.Bucket).withName("Bucket"); - bodyNode.addChildNode(node); + if (input[_Fo] != null) { + bn.c(xml_builder_1.XmlNode.of(_IFn, input[_Fo]).n(_Fo)); } - if (input.Format != null) { - const node = xml_builder_1.XmlNode.of("InventoryFormat", input.Format).withName("Format"); - bodyNode.addChildNode(node); + bn.cc(input, _P); + if (input[_En] != null) { + bn.c(se_InventoryEncryption(input[_En], context).n(_En)); } - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); - } - if (input.Encryption != null) { - const node = serializeAws_restXmlInventoryEncryption(input.Encryption, context).withName("Encryption"); - bodyNode.addChildNode(node); - } - return bodyNode; + return bn; }; -const serializeAws_restXmlInventorySchedule = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("InventorySchedule"); - if (input.Frequency != null) { - const node = xml_builder_1.XmlNode.of("InventoryFrequency", input.Frequency).withName("Frequency"); - bodyNode.addChildNode(node); +const se_InventorySchedule = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ISn); + if (input[_Fr] != null) { + bn.c(xml_builder_1.XmlNode.of(_IFnv, input[_Fr]).n(_Fr)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlJSONInput = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("JSONInput"); - if (input.Type != null) { - const node = xml_builder_1.XmlNode.of("JSONType", input.Type).withName("Type"); - bodyNode.addChildNode(node); +const se_JSONInput = (input, context) => { + const bn = new xml_builder_1.XmlNode(_JSONI); + if (input[_Ty] != null) { + bn.c(xml_builder_1.XmlNode.of(_JSONT, input[_Ty]).n(_Ty)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlJSONOutput = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("JSONOutput"); - if (input.RecordDelimiter != null) { - const node = xml_builder_1.XmlNode.of("RecordDelimiter", input.RecordDelimiter).withName("RecordDelimiter"); - bodyNode.addChildNode(node); - } - return bodyNode; +const se_JSONOutput = (input, context) => { + const bn = new xml_builder_1.XmlNode(_JSONO); + bn.cc(input, _RD); + return bn; }; -const serializeAws_restXmlLambdaFunctionConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("LambdaFunctionConfiguration"); - if (input.Id != null) { - const node = xml_builder_1.XmlNode.of("NotificationId", input.Id).withName("Id"); - bodyNode.addChildNode(node); +const se_LambdaFunctionConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_LFCa); + if (input[_I] != null) { + bn.c(xml_builder_1.XmlNode.of(_NI, input[_I]).n(_I)); } - if (input.LambdaFunctionArn != null) { - const node = xml_builder_1.XmlNode.of("LambdaFunctionArn", input.LambdaFunctionArn).withName("CloudFunction"); - bodyNode.addChildNode(node); - } - if (input.Events != null) { - const nodes = serializeAws_restXmlEventList(input.Events, context); - nodes.map((node) => { - node = node.withName("Event"); - bodyNode.addChildNode(node); - }); + if (input[_LFA] != null) { + bn.c(xml_builder_1.XmlNode.of(_LFA, input[_LFA]).n(_CF)); } - if (input.Filter != null) { - const node = serializeAws_restXmlNotificationConfigurationFilter(input.Filter, context).withName("Filter"); - bodyNode.addChildNode(node); + bn.l(input, "Events", "Event", () => se_EventList(input[_Eve], context)); + if (input[_F] != null) { + bn.c(se_NotificationConfigurationFilter(input[_F], context).n(_F)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlLambdaFunctionConfigurationList = (input, context) => { +const se_LambdaFunctionConfigurationList = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlLambdaFunctionConfiguration(entry, context); - return node.withName("member"); - }); -}; -const serializeAws_restXmlLifecycleExpiration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("LifecycleExpiration"); - if (input.Date != null) { - const node = xml_builder_1.XmlNode.of("Date", input.Date.toISOString().split(".")[0] + "Z").withName("Date"); - bodyNode.addChildNode(node); - } - if (input.Days != null) { - const node = xml_builder_1.XmlNode.of("Days", String(input.Days)).withName("Days"); - bodyNode.addChildNode(node); - } - if (input.ExpiredObjectDeleteMarker != null) { - const node = xml_builder_1.XmlNode - .of("ExpiredObjectDeleteMarker", String(input.ExpiredObjectDeleteMarker)) - .withName("ExpiredObjectDeleteMarker"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlLifecycleRule = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("LifecycleRule"); - if (input.Expiration != null) { - const node = serializeAws_restXmlLifecycleExpiration(input.Expiration, context).withName("Expiration"); - bodyNode.addChildNode(node); - } - if (input.ID != null) { - const node = xml_builder_1.XmlNode.of("ID", input.ID).withName("ID"); - bodyNode.addChildNode(node); - } - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); - } - if (input.Filter != null) { - const node = serializeAws_restXmlLifecycleRuleFilter(input.Filter, context).withName("Filter"); - bodyNode.addChildNode(node); - } - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("ExpirationStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); - } - if (input.Transitions != null) { - const nodes = serializeAws_restXmlTransitionList(input.Transitions, context); - nodes.map((node) => { - node = node.withName("Transition"); - bodyNode.addChildNode(node); - }); - } - if (input.NoncurrentVersionTransitions != null) { - const nodes = serializeAws_restXmlNoncurrentVersionTransitionList(input.NoncurrentVersionTransitions, context); - nodes.map((node) => { - node = node.withName("NoncurrentVersionTransition"); - bodyNode.addChildNode(node); - }); + const n = se_LambdaFunctionConfiguration(entry, context); + return n.n(_me); + }); +}; +const se_LifecycleExpiration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_LEi); + if (input[_Dat] != null) { + bn.c(xml_builder_1.XmlNode.of(_Dat, (input[_Dat].toISOString().split(".")[0] + "Z").toString()).n(_Dat)); } - if (input.NoncurrentVersionExpiration != null) { - const node = serializeAws_restXmlNoncurrentVersionExpiration(input.NoncurrentVersionExpiration, context).withName("NoncurrentVersionExpiration"); - bodyNode.addChildNode(node); + if (input[_Da] != null) { + bn.c(xml_builder_1.XmlNode.of(_Da, String(input[_Da])).n(_Da)); } - if (input.AbortIncompleteMultipartUpload != null) { - const node = serializeAws_restXmlAbortIncompleteMultipartUpload(input.AbortIncompleteMultipartUpload, context).withName("AbortIncompleteMultipartUpload"); - bodyNode.addChildNode(node); + if (input[_EODM] != null) { + bn.c(xml_builder_1.XmlNode.of(_EODM, String(input[_EODM])).n(_EODM)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlLifecycleRuleAndOperator = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("LifecycleRuleAndOperator"); - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); +const se_LifecycleRule = (input, context) => { + const bn = new xml_builder_1.XmlNode(_LR); + if (input[_Exp] != null) { + bn.c(se_LifecycleExpiration(input[_Exp], context).n(_Exp)); } - if (input.Tags != null) { - const nodes = serializeAws_restXmlTagSet(input.Tags, context); - nodes.map((node) => { - node = node.withName("Tag"); - bodyNode.addChildNode(node); - }); + bn.cc(input, _ID_); + bn.cc(input, _P); + if (input[_F] != null) { + bn.c(se_LifecycleRuleFilter(input[_F], context).n(_F)); + } + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_ES, input[_S]).n(_S)); + } + bn.l(input, "Transitions", "Transition", () => se_TransitionList(input[_Tr], context)); + bn.l(input, "NoncurrentVersionTransitions", "NoncurrentVersionTransition", () => se_NoncurrentVersionTransitionList(input[_NVT], context)); + if (input[_NVE] != null) { + bn.c(se_NoncurrentVersionExpiration(input[_NVE], context).n(_NVE)); + } + if (input[_AIMU] != null) { + bn.c(se_AbortIncompleteMultipartUpload(input[_AIMU], context).n(_AIMU)); } - if (input.ObjectSizeGreaterThan != null) { - const node = xml_builder_1.XmlNode - .of("ObjectSizeGreaterThanBytes", String(input.ObjectSizeGreaterThan)) - .withName("ObjectSizeGreaterThan"); - bodyNode.addChildNode(node); + return bn; +}; +const se_LifecycleRuleAndOperator = (input, context) => { + const bn = new xml_builder_1.XmlNode(_LRAO); + bn.cc(input, _P); + bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); + if (input[_OSGT] != null) { + bn.c(xml_builder_1.XmlNode.of(_OSGTB, String(input[_OSGT])).n(_OSGT)); } - if (input.ObjectSizeLessThan != null) { - const node = xml_builder_1.XmlNode - .of("ObjectSizeLessThanBytes", String(input.ObjectSizeLessThan)) - .withName("ObjectSizeLessThan"); - bodyNode.addChildNode(node); + if (input[_OSLT] != null) { + bn.c(xml_builder_1.XmlNode.of(_OSLTB, String(input[_OSLT])).n(_OSLT)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlLifecycleRuleFilter = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("LifecycleRuleFilter"); +const se_LifecycleRuleFilter = (input, context) => { + const bn = new xml_builder_1.XmlNode(_LRF); models_0_1.LifecycleRuleFilter.visit(input, { Prefix: (value) => { - const node = xml_builder_1.XmlNode.of("Prefix", value).withName("Prefix"); - bodyNode.addChildNode(node); + if (input[_P] != null) { + bn.c(xml_builder_1.XmlNode.of(_P, value).n(_P)); + } }, Tag: (value) => { - const node = serializeAws_restXmlTag(value, context).withName("Tag"); - bodyNode.addChildNode(node); + if (input[_Ta] != null) { + bn.c(se_Tag(value, context).n(_Ta)); + } }, ObjectSizeGreaterThan: (value) => { - const node = xml_builder_1.XmlNode.of("ObjectSizeGreaterThanBytes", String(value)).withName("ObjectSizeGreaterThan"); - bodyNode.addChildNode(node); + if (input[_OSGT] != null) { + bn.c(xml_builder_1.XmlNode.of(_OSGTB, String(value)).n(_OSGT)); + } }, ObjectSizeLessThan: (value) => { - const node = xml_builder_1.XmlNode.of("ObjectSizeLessThanBytes", String(value)).withName("ObjectSizeLessThan"); - bodyNode.addChildNode(node); + if (input[_OSLT] != null) { + bn.c(xml_builder_1.XmlNode.of(_OSLTB, String(value)).n(_OSLT)); + } }, And: (value) => { - const node = serializeAws_restXmlLifecycleRuleAndOperator(value, context).withName("And"); - bodyNode.addChildNode(node); + if (input[_A] != null) { + bn.c(se_LifecycleRuleAndOperator(value, context).n(_A)); + } }, _: (name, value) => { if (!(value instanceof xml_builder_1.XmlNode || value instanceof xml_builder_1.XmlText)) { throw new Error("Unable to serialize unknown union members in XML."); } - bodyNode.addChildNode(new xml_builder_1.XmlNode(name).addChildNode(value)); + bn.c(new xml_builder_1.XmlNode(name).c(value)); }, }); - return bodyNode; + return bn; }; -const serializeAws_restXmlLifecycleRules = (input, context) => { +const se_LifecycleRules = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlLifecycleRule(entry, context); - return node.withName("member"); + const n = se_LifecycleRule(entry, context); + return n.n(_me); }); }; -const serializeAws_restXmlLoggingEnabled = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("LoggingEnabled"); - if (input.TargetBucket != null) { - const node = xml_builder_1.XmlNode.of("TargetBucket", input.TargetBucket).withName("TargetBucket"); - bodyNode.addChildNode(node); - } - if (input.TargetGrants != null) { - const nodes = serializeAws_restXmlTargetGrants(input.TargetGrants, context); - const containerNode = new xml_builder_1.XmlNode("TargetGrants"); - nodes.map((node) => { - containerNode.addChildNode(node); - }); - bodyNode.addChildNode(containerNode); +const se_LocationInfo = (input, context) => { + const bn = new xml_builder_1.XmlNode(_LI); + if (input[_Ty] != null) { + bn.c(xml_builder_1.XmlNode.of(_LT, input[_Ty]).n(_Ty)); } - if (input.TargetPrefix != null) { - const node = xml_builder_1.XmlNode.of("TargetPrefix", input.TargetPrefix).withName("TargetPrefix"); - bodyNode.addChildNode(node); + if (input[_N] != null) { + bn.c(xml_builder_1.XmlNode.of(_LNAS, input[_N]).n(_N)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlMetadataEntry = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("MetadataEntry"); - if (input.Name != null) { - const node = xml_builder_1.XmlNode.of("MetadataKey", input.Name).withName("Name"); - bodyNode.addChildNode(node); +const se_LoggingEnabled = (input, context) => { + const bn = new xml_builder_1.XmlNode(_LE); + bn.cc(input, _TB); + bn.lc(input, "TargetGrants", "TargetGrants", () => se_TargetGrants(input[_TG], context)); + bn.cc(input, _TP); + if (input[_TOKF] != null) { + bn.c(se_TargetObjectKeyFormat(input[_TOKF], context).n(_TOKF)); } - if (input.Value != null) { - const node = xml_builder_1.XmlNode.of("MetadataValue", input.Value).withName("Value"); - bodyNode.addChildNode(node); - } - return bodyNode; + return bn; }; -const serializeAws_restXmlMetrics = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Metrics"); - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("MetricsStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); +const se_MetadataEntry = (input, context) => { + const bn = new xml_builder_1.XmlNode(_ME); + if (input[_N] != null) { + bn.c(xml_builder_1.XmlNode.of(_MKe, input[_N]).n(_N)); } - if (input.EventThreshold != null) { - const node = serializeAws_restXmlReplicationTimeValue(input.EventThreshold, context).withName("EventThreshold"); - bodyNode.addChildNode(node); + if (input[_Va] != null) { + bn.c(xml_builder_1.XmlNode.of(_MV, input[_Va]).n(_Va)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlMetricsAndOperator = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("MetricsAndOperator"); - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); +const se_Metrics = (input, context) => { + const bn = new xml_builder_1.XmlNode(_Me); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_MS, input[_S]).n(_S)); } - if (input.Tags != null) { - const nodes = serializeAws_restXmlTagSet(input.Tags, context); - nodes.map((node) => { - node = node.withName("Tag"); - bodyNode.addChildNode(node); - }); + if (input[_ETv] != null) { + bn.c(se_ReplicationTimeValue(input[_ETv], context).n(_ETv)); } - if (input.AccessPointArn != null) { - const node = xml_builder_1.XmlNode.of("AccessPointArn", input.AccessPointArn).withName("AccessPointArn"); - bodyNode.addChildNode(node); - } - return bodyNode; + return bn; +}; +const se_MetricsAndOperator = (input, context) => { + const bn = new xml_builder_1.XmlNode(_MAO); + bn.cc(input, _P); + bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); + bn.cc(input, _APAc); + return bn; }; -const serializeAws_restXmlMetricsConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("MetricsConfiguration"); - if (input.Id != null) { - const node = xml_builder_1.XmlNode.of("MetricsId", input.Id).withName("Id"); - bodyNode.addChildNode(node); +const se_MetricsConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_MC); + if (input[_I] != null) { + bn.c(xml_builder_1.XmlNode.of(_MI, input[_I]).n(_I)); } - if (input.Filter != null) { - const node = serializeAws_restXmlMetricsFilter(input.Filter, context).withName("Filter"); - bodyNode.addChildNode(node); + if (input[_F] != null) { + bn.c(se_MetricsFilter(input[_F], context).n(_F)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlMetricsFilter = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("MetricsFilter"); +const se_MetricsFilter = (input, context) => { + const bn = new xml_builder_1.XmlNode(_MF); models_0_1.MetricsFilter.visit(input, { Prefix: (value) => { - const node = xml_builder_1.XmlNode.of("Prefix", value).withName("Prefix"); - bodyNode.addChildNode(node); + if (input[_P] != null) { + bn.c(xml_builder_1.XmlNode.of(_P, value).n(_P)); + } }, Tag: (value) => { - const node = serializeAws_restXmlTag(value, context).withName("Tag"); - bodyNode.addChildNode(node); + if (input[_Ta] != null) { + bn.c(se_Tag(value, context).n(_Ta)); + } }, AccessPointArn: (value) => { - const node = xml_builder_1.XmlNode.of("AccessPointArn", value).withName("AccessPointArn"); - bodyNode.addChildNode(node); + if (input[_APAc] != null) { + bn.c(xml_builder_1.XmlNode.of(_APAc, value).n(_APAc)); + } }, And: (value) => { - const node = serializeAws_restXmlMetricsAndOperator(value, context).withName("And"); - bodyNode.addChildNode(node); + if (input[_A] != null) { + bn.c(se_MetricsAndOperator(value, context).n(_A)); + } }, _: (name, value) => { if (!(value instanceof xml_builder_1.XmlNode || value instanceof xml_builder_1.XmlText)) { throw new Error("Unable to serialize unknown union members in XML."); } - bodyNode.addChildNode(new xml_builder_1.XmlNode(name).addChildNode(value)); + bn.c(new xml_builder_1.XmlNode(name).c(value)); }, }); - return bodyNode; + return bn; }; -const serializeAws_restXmlNoncurrentVersionExpiration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("NoncurrentVersionExpiration"); - if (input.NoncurrentDays != null) { - const node = xml_builder_1.XmlNode.of("Days", String(input.NoncurrentDays)).withName("NoncurrentDays"); - bodyNode.addChildNode(node); +const se_NoncurrentVersionExpiration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_NVE); + if (input[_ND] != null) { + bn.c(xml_builder_1.XmlNode.of(_Da, String(input[_ND])).n(_ND)); } - if (input.NewerNoncurrentVersions != null) { - const node = xml_builder_1.XmlNode - .of("VersionCount", String(input.NewerNoncurrentVersions)) - .withName("NewerNoncurrentVersions"); - bodyNode.addChildNode(node); + if (input[_NNV] != null) { + bn.c(xml_builder_1.XmlNode.of(_VC, String(input[_NNV])).n(_NNV)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlNoncurrentVersionTransition = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("NoncurrentVersionTransition"); - if (input.NoncurrentDays != null) { - const node = xml_builder_1.XmlNode.of("Days", String(input.NoncurrentDays)).withName("NoncurrentDays"); - bodyNode.addChildNode(node); +const se_NoncurrentVersionTransition = (input, context) => { + const bn = new xml_builder_1.XmlNode(_NVTo); + if (input[_ND] != null) { + bn.c(xml_builder_1.XmlNode.of(_Da, String(input[_ND])).n(_ND)); } - if (input.StorageClass != null) { - const node = xml_builder_1.XmlNode.of("TransitionStorageClass", input.StorageClass).withName("StorageClass"); - bodyNode.addChildNode(node); + if (input[_SC] != null) { + bn.c(xml_builder_1.XmlNode.of(_TSC, input[_SC]).n(_SC)); } - if (input.NewerNoncurrentVersions != null) { - const node = xml_builder_1.XmlNode - .of("VersionCount", String(input.NewerNoncurrentVersions)) - .withName("NewerNoncurrentVersions"); - bodyNode.addChildNode(node); + if (input[_NNV] != null) { + bn.c(xml_builder_1.XmlNode.of(_VC, String(input[_NNV])).n(_NNV)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlNoncurrentVersionTransitionList = (input, context) => { +const se_NoncurrentVersionTransitionList = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlNoncurrentVersionTransition(entry, context); - return node.withName("member"); + const n = se_NoncurrentVersionTransition(entry, context); + return n.n(_me); }); }; -const serializeAws_restXmlNotificationConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("NotificationConfiguration"); - if (input.TopicConfigurations != null) { - const nodes = serializeAws_restXmlTopicConfigurationList(input.TopicConfigurations, context); - nodes.map((node) => { - node = node.withName("TopicConfiguration"); - bodyNode.addChildNode(node); - }); - } - if (input.QueueConfigurations != null) { - const nodes = serializeAws_restXmlQueueConfigurationList(input.QueueConfigurations, context); - nodes.map((node) => { - node = node.withName("QueueConfiguration"); - bodyNode.addChildNode(node); - }); +const se_NotificationConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_NC); + bn.l(input, "TopicConfigurations", "TopicConfiguration", () => se_TopicConfigurationList(input[_TCop], context)); + bn.l(input, "QueueConfigurations", "QueueConfiguration", () => se_QueueConfigurationList(input[_QCu], context)); + bn.l(input, "LambdaFunctionConfigurations", "CloudFunctionConfiguration", () => se_LambdaFunctionConfigurationList(input[_LFC], context)); + if (input[_EBC] != null) { + bn.c(se_EventBridgeConfiguration(input[_EBC], context).n(_EBC)); } - if (input.LambdaFunctionConfigurations != null) { - const nodes = serializeAws_restXmlLambdaFunctionConfigurationList(input.LambdaFunctionConfigurations, context); - nodes.map((node) => { - node = node.withName("CloudFunctionConfiguration"); - bodyNode.addChildNode(node); - }); - } - if (input.EventBridgeConfiguration != null) { - const node = serializeAws_restXmlEventBridgeConfiguration(input.EventBridgeConfiguration, context).withName("EventBridgeConfiguration"); - bodyNode.addChildNode(node); - } - return bodyNode; + return bn; }; -const serializeAws_restXmlNotificationConfigurationFilter = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("NotificationConfigurationFilter"); - if (input.Key != null) { - const node = serializeAws_restXmlS3KeyFilter(input.Key, context).withName("S3Key"); - bodyNode.addChildNode(node); +const se_NotificationConfigurationFilter = (input, context) => { + const bn = new xml_builder_1.XmlNode(_NCF); + if (input[_K] != null) { + bn.c(se_S3KeyFilter(input[_K], context).n(_SKe)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlObjectIdentifier = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ObjectIdentifier"); - if (input.Key != null) { - const node = xml_builder_1.XmlNode.of("ObjectKey", input.Key).withName("Key"); - bodyNode.addChildNode(node); +const se_ObjectIdentifier = (input, context) => { + const bn = new xml_builder_1.XmlNode(_OI); + if (input[_K] != null) { + bn.c(xml_builder_1.XmlNode.of(_OK, input[_K]).n(_K)); } - if (input.VersionId != null) { - const node = xml_builder_1.XmlNode.of("ObjectVersionId", input.VersionId).withName("VersionId"); - bodyNode.addChildNode(node); + if (input[_VI] != null) { + bn.c(xml_builder_1.XmlNode.of(_OVI, input[_VI]).n(_VI)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlObjectIdentifierList = (input, context) => { +const se_ObjectIdentifierList = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlObjectIdentifier(entry, context); - return node.withName("member"); - }); -}; -const serializeAws_restXmlObjectLockConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ObjectLockConfiguration"); - if (input.ObjectLockEnabled != null) { - const node = xml_builder_1.XmlNode.of("ObjectLockEnabled", input.ObjectLockEnabled).withName("ObjectLockEnabled"); - bodyNode.addChildNode(node); - } - if (input.Rule != null) { - const node = serializeAws_restXmlObjectLockRule(input.Rule, context).withName("Rule"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlObjectLockLegalHold = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ObjectLockLegalHold"); - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("ObjectLockLegalHoldStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlObjectLockRetention = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ObjectLockRetention"); - if (input.Mode != null) { - const node = xml_builder_1.XmlNode.of("ObjectLockRetentionMode", input.Mode).withName("Mode"); - bodyNode.addChildNode(node); - } - if (input.RetainUntilDate != null) { - const node = xml_builder_1.XmlNode - .of("Date", input.RetainUntilDate.toISOString().split(".")[0] + "Z") - .withName("RetainUntilDate"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlObjectLockRule = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ObjectLockRule"); - if (input.DefaultRetention != null) { - const node = serializeAws_restXmlDefaultRetention(input.DefaultRetention, context).withName("DefaultRetention"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlOutputLocation = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("OutputLocation"); - if (input.S3 != null) { - const node = serializeAws_restXmlS3Location(input.S3, context).withName("S3"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlOutputSerialization = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("OutputSerialization"); - if (input.CSV != null) { - const node = serializeAws_restXmlCSVOutput(input.CSV, context).withName("CSV"); - bodyNode.addChildNode(node); - } - if (input.JSON != null) { - const node = serializeAws_restXmlJSONOutput(input.JSON, context).withName("JSON"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlOwner = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Owner"); - if (input.DisplayName != null) { - const node = xml_builder_1.XmlNode.of("DisplayName", input.DisplayName).withName("DisplayName"); - bodyNode.addChildNode(node); - } - if (input.ID != null) { - const node = xml_builder_1.XmlNode.of("ID", input.ID).withName("ID"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlOwnershipControls = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("OwnershipControls"); - if (input.Rules != null) { - const nodes = serializeAws_restXmlOwnershipControlsRules(input.Rules, context); - nodes.map((node) => { - node = node.withName("Rule"); - bodyNode.addChildNode(node); - }); - } - return bodyNode; -}; -const serializeAws_restXmlOwnershipControlsRule = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("OwnershipControlsRule"); - if (input.ObjectOwnership != null) { - const node = xml_builder_1.XmlNode.of("ObjectOwnership", input.ObjectOwnership).withName("ObjectOwnership"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlOwnershipControlsRules = (input, context) => { - return input - .filter((e) => e != null) - .map((entry) => { - const node = serializeAws_restXmlOwnershipControlsRule(entry, context); - return node.withName("member"); + const n = se_ObjectIdentifier(entry, context); + return n.n(_me); }); }; -const serializeAws_restXmlParquetInput = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ParquetInput"); - return bodyNode; -}; -const serializeAws_restXmlPublicAccessBlockConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("PublicAccessBlockConfiguration"); - if (input.BlockPublicAcls != null) { - const node = xml_builder_1.XmlNode.of("Setting", String(input.BlockPublicAcls)).withName("BlockPublicAcls"); - bodyNode.addChildNode(node); +const se_ObjectLockConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_OLC); + bn.cc(input, _OLE); + if (input[_Ru] != null) { + bn.c(se_ObjectLockRule(input[_Ru], context).n(_Ru)); } - if (input.IgnorePublicAcls != null) { - const node = xml_builder_1.XmlNode.of("Setting", String(input.IgnorePublicAcls)).withName("IgnorePublicAcls"); - bodyNode.addChildNode(node); + return bn; +}; +const se_ObjectLockLegalHold = (input, context) => { + const bn = new xml_builder_1.XmlNode(_OLLH); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_OLLHS, input[_S]).n(_S)); } - if (input.BlockPublicPolicy != null) { - const node = xml_builder_1.XmlNode.of("Setting", String(input.BlockPublicPolicy)).withName("BlockPublicPolicy"); - bodyNode.addChildNode(node); + return bn; +}; +const se_ObjectLockRetention = (input, context) => { + const bn = new xml_builder_1.XmlNode(_OLR); + if (input[_Mo] != null) { + bn.c(xml_builder_1.XmlNode.of(_OLRM, input[_Mo]).n(_Mo)); } - if (input.RestrictPublicBuckets != null) { - const node = xml_builder_1.XmlNode.of("Setting", String(input.RestrictPublicBuckets)).withName("RestrictPublicBuckets"); - bodyNode.addChildNode(node); + if (input[_RUD] != null) { + bn.c(xml_builder_1.XmlNode.of(_Dat, (input[_RUD].toISOString().split(".")[0] + "Z").toString()).n(_RUD)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlQueueConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("QueueConfiguration"); - if (input.Id != null) { - const node = xml_builder_1.XmlNode.of("NotificationId", input.Id).withName("Id"); - bodyNode.addChildNode(node); +const se_ObjectLockRule = (input, context) => { + const bn = new xml_builder_1.XmlNode(_OLRb); + if (input[_DRe] != null) { + bn.c(se_DefaultRetention(input[_DRe], context).n(_DRe)); } - if (input.QueueArn != null) { - const node = xml_builder_1.XmlNode.of("QueueArn", input.QueueArn).withName("Queue"); - bodyNode.addChildNode(node); + return bn; +}; +const se_OutputLocation = (input, context) => { + const bn = new xml_builder_1.XmlNode(_OL); + if (input[_S_] != null) { + bn.c(se_S3Location(input[_S_], context).n(_S_)); } - if (input.Events != null) { - const nodes = serializeAws_restXmlEventList(input.Events, context); - nodes.map((node) => { - node = node.withName("Event"); - bodyNode.addChildNode(node); - }); + return bn; +}; +const se_OutputSerialization = (input, context) => { + const bn = new xml_builder_1.XmlNode(_OS); + if (input[_CSV] != null) { + bn.c(se_CSVOutput(input[_CSV], context).n(_CSV)); } - if (input.Filter != null) { - const node = serializeAws_restXmlNotificationConfigurationFilter(input.Filter, context).withName("Filter"); - bodyNode.addChildNode(node); + if (input[_JSON] != null) { + bn.c(se_JSONOutput(input[_JSON], context).n(_JSON)); } - return bodyNode; + return bn; +}; +const se_Owner = (input, context) => { + const bn = new xml_builder_1.XmlNode(_O); + bn.cc(input, _DN); + bn.cc(input, _ID_); + return bn; +}; +const se_OwnershipControls = (input, context) => { + const bn = new xml_builder_1.XmlNode(_OC); + bn.l(input, "Rules", "Rule", () => se_OwnershipControlsRules(input[_Rul], context)); + return bn; }; -const serializeAws_restXmlQueueConfigurationList = (input, context) => { +const se_OwnershipControlsRule = (input, context) => { + const bn = new xml_builder_1.XmlNode(_OCR); + bn.cc(input, _OO); + return bn; +}; +const se_OwnershipControlsRules = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlQueueConfiguration(entry, context); - return node.withName("member"); + const n = se_OwnershipControlsRule(entry, context); + return n.n(_me); }); }; -const serializeAws_restXmlRedirect = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Redirect"); - if (input.HostName != null) { - const node = xml_builder_1.XmlNode.of("HostName", input.HostName).withName("HostName"); - bodyNode.addChildNode(node); - } - if (input.HttpRedirectCode != null) { - const node = xml_builder_1.XmlNode.of("HttpRedirectCode", input.HttpRedirectCode).withName("HttpRedirectCode"); - bodyNode.addChildNode(node); - } - if (input.Protocol != null) { - const node = xml_builder_1.XmlNode.of("Protocol", input.Protocol).withName("Protocol"); - bodyNode.addChildNode(node); - } - if (input.ReplaceKeyPrefixWith != null) { - const node = xml_builder_1.XmlNode.of("ReplaceKeyPrefixWith", input.ReplaceKeyPrefixWith).withName("ReplaceKeyPrefixWith"); - bodyNode.addChildNode(node); - } - if (input.ReplaceKeyWith != null) { - const node = xml_builder_1.XmlNode.of("ReplaceKeyWith", input.ReplaceKeyWith).withName("ReplaceKeyWith"); - bodyNode.addChildNode(node); - } - return bodyNode; +const se_ParquetInput = (input, context) => { + const bn = new xml_builder_1.XmlNode(_PI); + return bn; }; -const serializeAws_restXmlRedirectAllRequestsTo = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("RedirectAllRequestsTo"); - if (input.HostName != null) { - const node = xml_builder_1.XmlNode.of("HostName", input.HostName).withName("HostName"); - bodyNode.addChildNode(node); - } - if (input.Protocol != null) { - const node = xml_builder_1.XmlNode.of("Protocol", input.Protocol).withName("Protocol"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlReplicaModifications = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ReplicaModifications"); - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("ReplicaModificationsStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlReplicationConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ReplicationConfiguration"); - if (input.Role != null) { - const node = xml_builder_1.XmlNode.of("Role", input.Role).withName("Role"); - bodyNode.addChildNode(node); - } - if (input.Rules != null) { - const nodes = serializeAws_restXmlReplicationRules(input.Rules, context); - nodes.map((node) => { - node = node.withName("Rule"); - bodyNode.addChildNode(node); - }); - } - return bodyNode; +const se_PartitionedPrefix = (input, context) => { + const bn = new xml_builder_1.XmlNode(_PP); + bn.cc(input, _PDS); + return bn; }; -const serializeAws_restXmlReplicationRule = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ReplicationRule"); - if (input.ID != null) { - const node = xml_builder_1.XmlNode.of("ID", input.ID).withName("ID"); - bodyNode.addChildNode(node); +const se_PublicAccessBlockConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_PABC); + if (input[_BPA] != null) { + bn.c(xml_builder_1.XmlNode.of(_Se, String(input[_BPA])).n(_BPA)); } - if (input.Priority != null) { - const node = xml_builder_1.XmlNode.of("Priority", String(input.Priority)).withName("Priority"); - bodyNode.addChildNode(node); + if (input[_IPA] != null) { + bn.c(xml_builder_1.XmlNode.of(_Se, String(input[_IPA])).n(_IPA)); } - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); + if (input[_BPP] != null) { + bn.c(xml_builder_1.XmlNode.of(_Se, String(input[_BPP])).n(_BPP)); } - if (input.Filter != null) { - const node = serializeAws_restXmlReplicationRuleFilter(input.Filter, context).withName("Filter"); - bodyNode.addChildNode(node); + if (input[_RPB] != null) { + bn.c(xml_builder_1.XmlNode.of(_Se, String(input[_RPB])).n(_RPB)); } - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("ReplicationRuleStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); - } - if (input.SourceSelectionCriteria != null) { - const node = serializeAws_restXmlSourceSelectionCriteria(input.SourceSelectionCriteria, context).withName("SourceSelectionCriteria"); - bodyNode.addChildNode(node); - } - if (input.ExistingObjectReplication != null) { - const node = serializeAws_restXmlExistingObjectReplication(input.ExistingObjectReplication, context).withName("ExistingObjectReplication"); - bodyNode.addChildNode(node); + return bn; +}; +const se_QueueConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_QC); + if (input[_I] != null) { + bn.c(xml_builder_1.XmlNode.of(_NI, input[_I]).n(_I)); } - if (input.Destination != null) { - const node = serializeAws_restXmlDestination(input.Destination, context).withName("Destination"); - bodyNode.addChildNode(node); + if (input[_QA] != null) { + bn.c(xml_builder_1.XmlNode.of(_QA, input[_QA]).n(_Qu)); } - if (input.DeleteMarkerReplication != null) { - const node = serializeAws_restXmlDeleteMarkerReplication(input.DeleteMarkerReplication, context).withName("DeleteMarkerReplication"); - bodyNode.addChildNode(node); + bn.l(input, "Events", "Event", () => se_EventList(input[_Eve], context)); + if (input[_F] != null) { + bn.c(se_NotificationConfigurationFilter(input[_F], context).n(_F)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlReplicationRuleAndOperator = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ReplicationRuleAndOperator"); - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("Prefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); - } - if (input.Tags != null) { - const nodes = serializeAws_restXmlTagSet(input.Tags, context); - nodes.map((node) => { - node = node.withName("Tag"); - bodyNode.addChildNode(node); - }); - } - return bodyNode; +const se_QueueConfigurationList = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + const n = se_QueueConfiguration(entry, context); + return n.n(_me); + }); }; -const serializeAws_restXmlReplicationRuleFilter = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ReplicationRuleFilter"); +const se_Redirect = (input, context) => { + const bn = new xml_builder_1.XmlNode(_Red); + bn.cc(input, _HN); + bn.cc(input, _HRC); + bn.cc(input, _Pr); + bn.cc(input, _RKPW); + bn.cc(input, _RKW); + return bn; +}; +const se_RedirectAllRequestsTo = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RART); + bn.cc(input, _HN); + bn.cc(input, _Pr); + return bn; +}; +const se_ReplicaModifications = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RM); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_RMS, input[_S]).n(_S)); + } + return bn; +}; +const se_ReplicationConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RCe); + bn.cc(input, _Ro); + bn.l(input, "Rules", "Rule", () => se_ReplicationRules(input[_Rul], context)); + return bn; +}; +const se_ReplicationRule = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RRe); + bn.cc(input, _ID_); + if (input[_Pri] != null) { + bn.c(xml_builder_1.XmlNode.of(_Pri, String(input[_Pri])).n(_Pri)); + } + bn.cc(input, _P); + if (input[_F] != null) { + bn.c(se_ReplicationRuleFilter(input[_F], context).n(_F)); + } + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_RRS, input[_S]).n(_S)); + } + if (input[_SSC] != null) { + bn.c(se_SourceSelectionCriteria(input[_SSC], context).n(_SSC)); + } + if (input[_EOR] != null) { + bn.c(se_ExistingObjectReplication(input[_EOR], context).n(_EOR)); + } + if (input[_Des] != null) { + bn.c(se_Destination(input[_Des], context).n(_Des)); + } + if (input[_DMR] != null) { + bn.c(se_DeleteMarkerReplication(input[_DMR], context).n(_DMR)); + } + return bn; +}; +const se_ReplicationRuleAndOperator = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RRAO); + bn.cc(input, _P); + bn.l(input, "Tags", "Tag", () => se_TagSet(input[_Tag], context)); + return bn; +}; +const se_ReplicationRuleFilter = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RRF); models_0_1.ReplicationRuleFilter.visit(input, { Prefix: (value) => { - const node = xml_builder_1.XmlNode.of("Prefix", value).withName("Prefix"); - bodyNode.addChildNode(node); + if (input[_P] != null) { + bn.c(xml_builder_1.XmlNode.of(_P, value).n(_P)); + } }, Tag: (value) => { - const node = serializeAws_restXmlTag(value, context).withName("Tag"); - bodyNode.addChildNode(node); + if (input[_Ta] != null) { + bn.c(se_Tag(value, context).n(_Ta)); + } }, And: (value) => { - const node = serializeAws_restXmlReplicationRuleAndOperator(value, context).withName("And"); - bodyNode.addChildNode(node); + if (input[_A] != null) { + bn.c(se_ReplicationRuleAndOperator(value, context).n(_A)); + } }, _: (name, value) => { if (!(value instanceof xml_builder_1.XmlNode || value instanceof xml_builder_1.XmlText)) { throw new Error("Unable to serialize unknown union members in XML."); } - bodyNode.addChildNode(new xml_builder_1.XmlNode(name).addChildNode(value)); + bn.c(new xml_builder_1.XmlNode(name).c(value)); }, }); - return bodyNode; + return bn; }; -const serializeAws_restXmlReplicationRules = (input, context) => { +const se_ReplicationRules = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlReplicationRule(entry, context); - return node.withName("member"); + const n = se_ReplicationRule(entry, context); + return n.n(_me); }); }; -const serializeAws_restXmlReplicationTime = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ReplicationTime"); - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("ReplicationTimeStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); +const se_ReplicationTime = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RTe); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_RTS, input[_S]).n(_S)); } - if (input.Time != null) { - const node = serializeAws_restXmlReplicationTimeValue(input.Time, context).withName("Time"); - bodyNode.addChildNode(node); + if (input[_Tim] != null) { + bn.c(se_ReplicationTimeValue(input[_Tim], context).n(_Tim)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlReplicationTimeValue = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ReplicationTimeValue"); - if (input.Minutes != null) { - const node = xml_builder_1.XmlNode.of("Minutes", String(input.Minutes)).withName("Minutes"); - bodyNode.addChildNode(node); +const se_ReplicationTimeValue = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RTV); + if (input[_Mi] != null) { + bn.c(xml_builder_1.XmlNode.of(_Mi, String(input[_Mi])).n(_Mi)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlRequestPaymentConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("RequestPaymentConfiguration"); - if (input.Payer != null) { - const node = xml_builder_1.XmlNode.of("Payer", input.Payer).withName("Payer"); - bodyNode.addChildNode(node); - } - return bodyNode; +const se_RequestPaymentConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RPC); + bn.cc(input, _Pa); + return bn; }; -const serializeAws_restXmlRequestProgress = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("RequestProgress"); - if (input.Enabled != null) { - const node = xml_builder_1.XmlNode.of("EnableRequestProgress", String(input.Enabled)).withName("Enabled"); - bodyNode.addChildNode(node); +const se_RequestProgress = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RPe); + if (input[_Ena] != null) { + bn.c(xml_builder_1.XmlNode.of(_ERP, String(input[_Ena])).n(_Ena)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlRestoreRequest = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("RestoreRequest"); - if (input.Days != null) { - const node = xml_builder_1.XmlNode.of("Days", String(input.Days)).withName("Days"); - bodyNode.addChildNode(node); +const se_RestoreRequest = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RRes); + if (input[_Da] != null) { + bn.c(xml_builder_1.XmlNode.of(_Da, String(input[_Da])).n(_Da)); } - if (input.GlacierJobParameters != null) { - const node = serializeAws_restXmlGlacierJobParameters(input.GlacierJobParameters, context).withName("GlacierJobParameters"); - bodyNode.addChildNode(node); + if (input[_GJP] != null) { + bn.c(se_GlacierJobParameters(input[_GJP], context).n(_GJP)); } - if (input.Type != null) { - const node = xml_builder_1.XmlNode.of("RestoreRequestType", input.Type).withName("Type"); - bodyNode.addChildNode(node); + if (input[_Ty] != null) { + bn.c(xml_builder_1.XmlNode.of(_RRT, input[_Ty]).n(_Ty)); } - if (input.Tier != null) { - const node = xml_builder_1.XmlNode.of("Tier", input.Tier).withName("Tier"); - bodyNode.addChildNode(node); + bn.cc(input, _Ti); + bn.cc(input, _Desc); + if (input[_SP] != null) { + bn.c(se_SelectParameters(input[_SP], context).n(_SP)); } - if (input.Description != null) { - const node = xml_builder_1.XmlNode.of("Description", input.Description).withName("Description"); - bodyNode.addChildNode(node); + if (input[_OL] != null) { + bn.c(se_OutputLocation(input[_OL], context).n(_OL)); } - if (input.SelectParameters != null) { - const node = serializeAws_restXmlSelectParameters(input.SelectParameters, context).withName("SelectParameters"); - bodyNode.addChildNode(node); - } - if (input.OutputLocation != null) { - const node = serializeAws_restXmlOutputLocation(input.OutputLocation, context).withName("OutputLocation"); - bodyNode.addChildNode(node); - } - return bodyNode; + return bn; }; -const serializeAws_restXmlRoutingRule = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("RoutingRule"); - if (input.Condition != null) { - const node = serializeAws_restXmlCondition(input.Condition, context).withName("Condition"); - bodyNode.addChildNode(node); +const se_RoutingRule = (input, context) => { + const bn = new xml_builder_1.XmlNode(_RRou); + if (input[_Con] != null) { + bn.c(se_Condition(input[_Con], context).n(_Con)); } - if (input.Redirect != null) { - const node = serializeAws_restXmlRedirect(input.Redirect, context).withName("Redirect"); - bodyNode.addChildNode(node); + if (input[_Red] != null) { + bn.c(se_Redirect(input[_Red], context).n(_Red)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlRoutingRules = (input, context) => { +const se_RoutingRules = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlRoutingRule(entry, context); - return node.withName("RoutingRule"); + const n = se_RoutingRule(entry, context); + return n.n(_RRou); }); }; -const serializeAws_restXmlS3KeyFilter = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("S3KeyFilter"); - if (input.FilterRules != null) { - const nodes = serializeAws_restXmlFilterRuleList(input.FilterRules, context); - nodes.map((node) => { - node = node.withName("FilterRule"); - bodyNode.addChildNode(node); - }); - } - return bodyNode; +const se_S3KeyFilter = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SKF); + bn.l(input, "FilterRules", "FilterRule", () => se_FilterRuleList(input[_FRi], context)); + return bn; }; -const serializeAws_restXmlS3Location = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("S3Location"); - if (input.BucketName != null) { - const node = xml_builder_1.XmlNode.of("BucketName", input.BucketName).withName("BucketName"); - bodyNode.addChildNode(node); +const se_S3Location = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SL); + bn.cc(input, _BN); + if (input[_P] != null) { + bn.c(xml_builder_1.XmlNode.of(_LP, input[_P]).n(_P)); } - if (input.Prefix != null) { - const node = xml_builder_1.XmlNode.of("LocationPrefix", input.Prefix).withName("Prefix"); - bodyNode.addChildNode(node); + if (input[_En] != null) { + bn.c(se_Encryption(input[_En], context).n(_En)); } - if (input.Encryption != null) { - const node = serializeAws_restXmlEncryption(input.Encryption, context).withName("Encryption"); - bodyNode.addChildNode(node); + if (input[_CACL] != null) { + bn.c(xml_builder_1.XmlNode.of(_OCACL, input[_CACL]).n(_CACL)); } - if (input.CannedACL != null) { - const node = xml_builder_1.XmlNode.of("ObjectCannedACL", input.CannedACL).withName("CannedACL"); - bodyNode.addChildNode(node); + bn.lc(input, "AccessControlList", "AccessControlList", () => se_Grants(input[_ACLc], context)); + if (input[_T] != null) { + bn.c(se_Tagging(input[_T], context).n(_T)); } - if (input.AccessControlList != null) { - const nodes = serializeAws_restXmlGrants(input.AccessControlList, context); - const containerNode = new xml_builder_1.XmlNode("AccessControlList"); - nodes.map((node) => { - containerNode.addChildNode(node); - }); - bodyNode.addChildNode(containerNode); + bn.lc(input, "UserMetadata", "UserMetadata", () => se_UserMetadata(input[_UM], context)); + bn.cc(input, _SC); + return bn; +}; +const se_ScanRange = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SR); + if (input[_St] != null) { + bn.c(xml_builder_1.XmlNode.of(_St, String(input[_St])).n(_St)); } - if (input.Tagging != null) { - const node = serializeAws_restXmlTagging(input.Tagging, context).withName("Tagging"); - bodyNode.addChildNode(node); + if (input[_End] != null) { + bn.c(xml_builder_1.XmlNode.of(_End, String(input[_End])).n(_End)); } - if (input.UserMetadata != null) { - const nodes = serializeAws_restXmlUserMetadata(input.UserMetadata, context); - const containerNode = new xml_builder_1.XmlNode("UserMetadata"); - nodes.map((node) => { - containerNode.addChildNode(node); - }); - bodyNode.addChildNode(containerNode); + return bn; +}; +const se_SelectParameters = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SP); + if (input[_IS] != null) { + bn.c(se_InputSerialization(input[_IS], context).n(_IS)); } - if (input.StorageClass != null) { - const node = xml_builder_1.XmlNode.of("StorageClass", input.StorageClass).withName("StorageClass"); - bodyNode.addChildNode(node); + bn.cc(input, _ETx); + bn.cc(input, _Ex); + if (input[_OS] != null) { + bn.c(se_OutputSerialization(input[_OS], context).n(_OS)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlScanRange = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ScanRange"); - if (input.Start != null) { - const node = xml_builder_1.XmlNode.of("Start", String(input.Start)).withName("Start"); - bodyNode.addChildNode(node); +const se_ServerSideEncryptionByDefault = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SSEBD); + if (input[_SSEA] != null) { + bn.c(xml_builder_1.XmlNode.of(_SSE, input[_SSEA]).n(_SSEA)); } - if (input.End != null) { - const node = xml_builder_1.XmlNode.of("End", String(input.End)).withName("End"); - bodyNode.addChildNode(node); + if (input[_KMSMKID] != null) { + bn.c(xml_builder_1.XmlNode.of(_SSEKMSKI, input[_KMSMKID]).n(_KMSMKID)); } - return bodyNode; + return bn; +}; +const se_ServerSideEncryptionConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SSEC); + bn.l(input, "Rules", "Rule", () => se_ServerSideEncryptionRules(input[_Rul], context)); + return bn; }; -const serializeAws_restXmlSelectParameters = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("SelectParameters"); - if (input.InputSerialization != null) { - const node = serializeAws_restXmlInputSerialization(input.InputSerialization, context).withName("InputSerialization"); - bodyNode.addChildNode(node); +const se_ServerSideEncryptionRule = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SSER); + if (input[_ASSEBD] != null) { + bn.c(se_ServerSideEncryptionByDefault(input[_ASSEBD], context).n(_ASSEBD)); } - if (input.ExpressionType != null) { - const node = xml_builder_1.XmlNode.of("ExpressionType", input.ExpressionType).withName("ExpressionType"); - bodyNode.addChildNode(node); + if (input[_BKE] != null) { + bn.c(xml_builder_1.XmlNode.of(_BKE, String(input[_BKE])).n(_BKE)); } - if (input.Expression != null) { - const node = xml_builder_1.XmlNode.of("Expression", input.Expression).withName("Expression"); - bodyNode.addChildNode(node); + return bn; +}; +const se_ServerSideEncryptionRules = (input, context) => { + return input + .filter((e) => e != null) + .map((entry) => { + const n = se_ServerSideEncryptionRule(entry, context); + return n.n(_me); + }); +}; +const se_SimplePrefix = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SPi); + return bn; +}; +const se_SourceSelectionCriteria = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SSC); + if (input[_SKEO] != null) { + bn.c(se_SseKmsEncryptedObjects(input[_SKEO], context).n(_SKEO)); } - if (input.OutputSerialization != null) { - const node = serializeAws_restXmlOutputSerialization(input.OutputSerialization, context).withName("OutputSerialization"); - bodyNode.addChildNode(node); + if (input[_RM] != null) { + bn.c(se_ReplicaModifications(input[_RM], context).n(_RM)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlServerSideEncryptionByDefault = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ServerSideEncryptionByDefault"); - if (input.SSEAlgorithm != null) { - const node = xml_builder_1.XmlNode.of("ServerSideEncryption", input.SSEAlgorithm).withName("SSEAlgorithm"); - bodyNode.addChildNode(node); +const se_SSEKMS = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SK); + if (input[_KI] != null) { + bn.c(xml_builder_1.XmlNode.of(_SSEKMSKI, input[_KI]).n(_KI)); } - if (input.KMSMasterKeyID != null) { - const node = xml_builder_1.XmlNode.of("SSEKMSKeyId", input.KMSMasterKeyID).withName("KMSMasterKeyID"); - bodyNode.addChildNode(node); + return bn; +}; +const se_SseKmsEncryptedObjects = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SKEO); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_SKEOS, input[_S]).n(_S)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlServerSideEncryptionConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ServerSideEncryptionConfiguration"); - if (input.Rules != null) { - const nodes = serializeAws_restXmlServerSideEncryptionRules(input.Rules, context); - nodes.map((node) => { - node = node.withName("Rule"); - bodyNode.addChildNode(node); - }); +const se_SSES3 = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SS); + return bn; +}; +const se_StorageClassAnalysis = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SCA); + if (input[_DE] != null) { + bn.c(se_StorageClassAnalysisDataExport(input[_DE], context).n(_DE)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlServerSideEncryptionRule = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("ServerSideEncryptionRule"); - if (input.ApplyServerSideEncryptionByDefault != null) { - const node = serializeAws_restXmlServerSideEncryptionByDefault(input.ApplyServerSideEncryptionByDefault, context).withName("ApplyServerSideEncryptionByDefault"); - bodyNode.addChildNode(node); +const se_StorageClassAnalysisDataExport = (input, context) => { + const bn = new xml_builder_1.XmlNode(_SCADE); + if (input[_OSV] != null) { + bn.c(xml_builder_1.XmlNode.of(_SCASV, input[_OSV]).n(_OSV)); } - if (input.BucketKeyEnabled != null) { - const node = xml_builder_1.XmlNode.of("BucketKeyEnabled", String(input.BucketKeyEnabled)).withName("BucketKeyEnabled"); - bodyNode.addChildNode(node); + if (input[_Des] != null) { + bn.c(se_AnalyticsExportDestination(input[_Des], context).n(_Des)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlServerSideEncryptionRules = (input, context) => { - return input - .filter((e) => e != null) - .map((entry) => { - const node = serializeAws_restXmlServerSideEncryptionRule(entry, context); - return node.withName("member"); - }); -}; -const serializeAws_restXmlSourceSelectionCriteria = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("SourceSelectionCriteria"); - if (input.SseKmsEncryptedObjects != null) { - const node = serializeAws_restXmlSseKmsEncryptedObjects(input.SseKmsEncryptedObjects, context).withName("SseKmsEncryptedObjects"); - bodyNode.addChildNode(node); - } - if (input.ReplicaModifications != null) { - const node = serializeAws_restXmlReplicaModifications(input.ReplicaModifications, context).withName("ReplicaModifications"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlSSEKMS = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("SSE-KMS"); - if (input.KeyId != null) { - const node = xml_builder_1.XmlNode.of("SSEKMSKeyId", input.KeyId).withName("KeyId"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlSseKmsEncryptedObjects = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("SseKmsEncryptedObjects"); - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("SseKmsEncryptedObjectsStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlSSES3 = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("SSE-S3"); - return bodyNode; -}; -const serializeAws_restXmlStorageClassAnalysis = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("StorageClassAnalysis"); - if (input.DataExport != null) { - const node = serializeAws_restXmlStorageClassAnalysisDataExport(input.DataExport, context).withName("DataExport"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlStorageClassAnalysisDataExport = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("StorageClassAnalysisDataExport"); - if (input.OutputSchemaVersion != null) { - const node = xml_builder_1.XmlNode - .of("StorageClassAnalysisSchemaVersion", input.OutputSchemaVersion) - .withName("OutputSchemaVersion"); - bodyNode.addChildNode(node); - } - if (input.Destination != null) { - const node = serializeAws_restXmlAnalyticsExportDestination(input.Destination, context).withName("Destination"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlTag = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Tag"); - if (input.Key != null) { - const node = xml_builder_1.XmlNode.of("ObjectKey", input.Key).withName("Key"); - bodyNode.addChildNode(node); - } - if (input.Value != null) { - const node = xml_builder_1.XmlNode.of("Value", input.Value).withName("Value"); - bodyNode.addChildNode(node); - } - return bodyNode; -}; -const serializeAws_restXmlTagging = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Tagging"); - if (input.TagSet != null) { - const nodes = serializeAws_restXmlTagSet(input.TagSet, context); - const containerNode = new xml_builder_1.XmlNode("TagSet"); - nodes.map((node) => { - containerNode.addChildNode(node); - }); - bodyNode.addChildNode(containerNode); +const se_Tag = (input, context) => { + const bn = new xml_builder_1.XmlNode(_Ta); + if (input[_K] != null) { + bn.c(xml_builder_1.XmlNode.of(_OK, input[_K]).n(_K)); } - return bodyNode; + bn.cc(input, _Va); + return bn; }; -const serializeAws_restXmlTagSet = (input, context) => { +const se_Tagging = (input, context) => { + const bn = new xml_builder_1.XmlNode(_T); + bn.lc(input, "TagSet", "TagSet", () => se_TagSet(input[_TS], context)); + return bn; +}; +const se_TagSet = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlTag(entry, context); - return node.withName("Tag"); + const n = se_Tag(entry, context); + return n.n(_Ta); }); }; -const serializeAws_restXmlTargetGrant = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("TargetGrant"); - if (input.Grantee != null) { - const node = serializeAws_restXmlGrantee(input.Grantee, context).withName("Grantee"); - node.addAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); - bodyNode.addChildNode(node); +const se_TargetGrant = (input, context) => { + const bn = new xml_builder_1.XmlNode(_TGa); + if (input[_Gra] != null) { + const n = se_Grantee(input[_Gra], context).n(_Gra); + n.a("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); + bn.c(n); } - if (input.Permission != null) { - const node = xml_builder_1.XmlNode.of("BucketLogsPermission", input.Permission).withName("Permission"); - bodyNode.addChildNode(node); + if (input[_Pe] != null) { + bn.c(xml_builder_1.XmlNode.of(_BLP, input[_Pe]).n(_Pe)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlTargetGrants = (input, context) => { +const se_TargetGrants = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlTargetGrant(entry, context); - return node.withName("Grant"); + const n = se_TargetGrant(entry, context); + return n.n(_G); }); }; -const serializeAws_restXmlTiering = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Tiering"); - if (input.Days != null) { - const node = xml_builder_1.XmlNode.of("IntelligentTieringDays", String(input.Days)).withName("Days"); - bodyNode.addChildNode(node); +const se_TargetObjectKeyFormat = (input, context) => { + const bn = new xml_builder_1.XmlNode(_TOKF); + if (input[_SPi] != null) { + bn.c(se_SimplePrefix(input[_SPi], context).n(_SPi)); } - if (input.AccessTier != null) { - const node = xml_builder_1.XmlNode.of("IntelligentTieringAccessTier", input.AccessTier).withName("AccessTier"); - bodyNode.addChildNode(node); + if (input[_PP] != null) { + bn.c(se_PartitionedPrefix(input[_PP], context).n(_PP)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlTieringList = (input, context) => { +const se_Tiering = (input, context) => { + const bn = new xml_builder_1.XmlNode(_Tier); + if (input[_Da] != null) { + bn.c(xml_builder_1.XmlNode.of(_ITD, String(input[_Da])).n(_Da)); + } + if (input[_AT] != null) { + bn.c(xml_builder_1.XmlNode.of(_ITAT, input[_AT]).n(_AT)); + } + return bn; +}; +const se_TieringList = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlTiering(entry, context); - return node.withName("member"); + const n = se_Tiering(entry, context); + return n.n(_me); }); }; -const serializeAws_restXmlTopicConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("TopicConfiguration"); - if (input.Id != null) { - const node = xml_builder_1.XmlNode.of("NotificationId", input.Id).withName("Id"); - bodyNode.addChildNode(node); - } - if (input.TopicArn != null) { - const node = xml_builder_1.XmlNode.of("TopicArn", input.TopicArn).withName("Topic"); - bodyNode.addChildNode(node); +const se_TopicConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_TCo); + if (input[_I] != null) { + bn.c(xml_builder_1.XmlNode.of(_NI, input[_I]).n(_I)); } - if (input.Events != null) { - const nodes = serializeAws_restXmlEventList(input.Events, context); - nodes.map((node) => { - node = node.withName("Event"); - bodyNode.addChildNode(node); - }); + if (input[_TA] != null) { + bn.c(xml_builder_1.XmlNode.of(_TA, input[_TA]).n(_Top)); } - if (input.Filter != null) { - const node = serializeAws_restXmlNotificationConfigurationFilter(input.Filter, context).withName("Filter"); - bodyNode.addChildNode(node); + bn.l(input, "Events", "Event", () => se_EventList(input[_Eve], context)); + if (input[_F] != null) { + bn.c(se_NotificationConfigurationFilter(input[_F], context).n(_F)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlTopicConfigurationList = (input, context) => { +const se_TopicConfigurationList = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlTopicConfiguration(entry, context); - return node.withName("member"); + const n = se_TopicConfiguration(entry, context); + return n.n(_me); }); }; -const serializeAws_restXmlTransition = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("Transition"); - if (input.Date != null) { - const node = xml_builder_1.XmlNode.of("Date", input.Date.toISOString().split(".")[0] + "Z").withName("Date"); - bodyNode.addChildNode(node); +const se_Transition = (input, context) => { + const bn = new xml_builder_1.XmlNode(_Tra); + if (input[_Dat] != null) { + bn.c(xml_builder_1.XmlNode.of(_Dat, (input[_Dat].toISOString().split(".")[0] + "Z").toString()).n(_Dat)); } - if (input.Days != null) { - const node = xml_builder_1.XmlNode.of("Days", String(input.Days)).withName("Days"); - bodyNode.addChildNode(node); + if (input[_Da] != null) { + bn.c(xml_builder_1.XmlNode.of(_Da, String(input[_Da])).n(_Da)); } - if (input.StorageClass != null) { - const node = xml_builder_1.XmlNode.of("TransitionStorageClass", input.StorageClass).withName("StorageClass"); - bodyNode.addChildNode(node); + if (input[_SC] != null) { + bn.c(xml_builder_1.XmlNode.of(_TSC, input[_SC]).n(_SC)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlTransitionList = (input, context) => { +const se_TransitionList = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlTransition(entry, context); - return node.withName("member"); + const n = se_Transition(entry, context); + return n.n(_me); }); }; -const serializeAws_restXmlUserMetadata = (input, context) => { +const se_UserMetadata = (input, context) => { return input .filter((e) => e != null) .map((entry) => { - const node = serializeAws_restXmlMetadataEntry(entry, context); - return node.withName("MetadataEntry"); + const n = se_MetadataEntry(entry, context); + return n.n(_ME); }); }; -const serializeAws_restXmlVersioningConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("VersioningConfiguration"); - if (input.MFADelete != null) { - const node = xml_builder_1.XmlNode.of("MFADelete", input.MFADelete).withName("MfaDelete"); - bodyNode.addChildNode(node); +const se_VersioningConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_VCe); + if (input[_MFAD] != null) { + bn.c(xml_builder_1.XmlNode.of(_MFAD, input[_MFAD]).n(_MDf)); } - if (input.Status != null) { - const node = xml_builder_1.XmlNode.of("BucketVersioningStatus", input.Status).withName("Status"); - bodyNode.addChildNode(node); + if (input[_S] != null) { + bn.c(xml_builder_1.XmlNode.of(_BVS, input[_S]).n(_S)); } - return bodyNode; + return bn; }; -const serializeAws_restXmlWebsiteConfiguration = (input, context) => { - const bodyNode = new xml_builder_1.XmlNode("WebsiteConfiguration"); - if (input.ErrorDocument != null) { - const node = serializeAws_restXmlErrorDocument(input.ErrorDocument, context).withName("ErrorDocument"); - bodyNode.addChildNode(node); - } - if (input.IndexDocument != null) { - const node = serializeAws_restXmlIndexDocument(input.IndexDocument, context).withName("IndexDocument"); - bodyNode.addChildNode(node); +const se_WebsiteConfiguration = (input, context) => { + const bn = new xml_builder_1.XmlNode(_WC); + if (input[_ED] != null) { + bn.c(se_ErrorDocument(input[_ED], context).n(_ED)); } - if (input.RedirectAllRequestsTo != null) { - const node = serializeAws_restXmlRedirectAllRequestsTo(input.RedirectAllRequestsTo, context).withName("RedirectAllRequestsTo"); - bodyNode.addChildNode(node); + if (input[_ID] != null) { + bn.c(se_IndexDocument(input[_ID], context).n(_ID)); } - if (input.RoutingRules != null) { - const nodes = serializeAws_restXmlRoutingRules(input.RoutingRules, context); - const containerNode = new xml_builder_1.XmlNode("RoutingRules"); - nodes.map((node) => { - containerNode.addChildNode(node); - }); - bodyNode.addChildNode(containerNode); + if (input[_RART] != null) { + bn.c(se_RedirectAllRequestsTo(input[_RART], context).n(_RART)); } - return bodyNode; + bn.lc(input, "RoutingRules", "RoutingRules", () => se_RoutingRules(input[_RRo], context)); + return bn; }; -const deserializeAws_restXmlAbortIncompleteMultipartUpload = (output, context) => { - const contents = { - DaysAfterInitiation: undefined, - }; - if (output["DaysAfterInitiation"] !== undefined) { - contents.DaysAfterInitiation = (0, smithy_client_1.strictParseInt32)(output["DaysAfterInitiation"]); +const de_AbortIncompleteMultipartUpload = (output, context) => { + const contents = {}; + if (output[_DAI] != null) { + contents[_DAI] = (0, smithy_client_1.strictParseInt32)(output[_DAI]); } return contents; }; -const deserializeAws_restXmlAccessControlTranslation = (output, context) => { - const contents = { - Owner: undefined, - }; - if (output["Owner"] !== undefined) { - contents.Owner = (0, smithy_client_1.expectString)(output["Owner"]); +const de_AccessControlTranslation = (output, context) => { + const contents = {}; + if (output[_O] != null) { + contents[_O] = (0, smithy_client_1.expectString)(output[_O]); } return contents; }; -const deserializeAws_restXmlAllowedHeaders = (output, context) => { +const de_AllowedHeaders = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { return (0, smithy_client_1.expectString)(entry); }); }; -const deserializeAws_restXmlAllowedMethods = (output, context) => { +const de_AllowedMethods = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { return (0, smithy_client_1.expectString)(entry); }); }; -const deserializeAws_restXmlAllowedOrigins = (output, context) => { +const de_AllowedOrigins = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { return (0, smithy_client_1.expectString)(entry); }); }; -const deserializeAws_restXmlAnalyticsAndOperator = (output, context) => { - const contents = { - Prefix: undefined, - Tags: undefined, - }; - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); +const de_AnalyticsAndOperator = (output, context) => { + const contents = {}; + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } if (output.Tag === "") { - contents.Tags = []; + contents[_Tag] = []; } - else if (output["Tag"] !== undefined) { - contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context); + else if (output[_Ta] != null) { + contents[_Tag] = de_TagSet((0, smithy_client_1.getArrayIfSingleItem)(output[_Ta]), context); } return contents; }; -const deserializeAws_restXmlAnalyticsConfiguration = (output, context) => { - const contents = { - Id: undefined, - Filter: undefined, - StorageClassAnalysis: undefined, - }; - if (output["Id"] !== undefined) { - contents.Id = (0, smithy_client_1.expectString)(output["Id"]); +const de_AnalyticsConfiguration = (output, context) => { + const contents = {}; + if (output[_I] != null) { + contents[_I] = (0, smithy_client_1.expectString)(output[_I]); } if (output.Filter === "") { } - else if (output["Filter"] !== undefined) { - contents.Filter = deserializeAws_restXmlAnalyticsFilter((0, smithy_client_1.expectUnion)(output["Filter"]), context); + else if (output[_F] != null) { + contents[_F] = de_AnalyticsFilter((0, smithy_client_1.expectUnion)(output[_F]), context); } - if (output["StorageClassAnalysis"] !== undefined) { - contents.StorageClassAnalysis = deserializeAws_restXmlStorageClassAnalysis(output["StorageClassAnalysis"], context); + if (output[_SCA] != null) { + contents[_SCA] = de_StorageClassAnalysis(output[_SCA], context); } return contents; }; -const deserializeAws_restXmlAnalyticsConfigurationList = (output, context) => { +const de_AnalyticsConfigurationList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlAnalyticsConfiguration(entry, context); + return de_AnalyticsConfiguration(entry, context); }); }; -const deserializeAws_restXmlAnalyticsExportDestination = (output, context) => { - const contents = { - S3BucketDestination: undefined, - }; - if (output["S3BucketDestination"] !== undefined) { - contents.S3BucketDestination = deserializeAws_restXmlAnalyticsS3BucketDestination(output["S3BucketDestination"], context); +const de_AnalyticsExportDestination = (output, context) => { + const contents = {}; + if (output[_SBD] != null) { + contents[_SBD] = de_AnalyticsS3BucketDestination(output[_SBD], context); } return contents; }; -const deserializeAws_restXmlAnalyticsFilter = (output, context) => { - if (output["Prefix"] !== undefined) { +const de_AnalyticsFilter = (output, context) => { + if (output[_P] != null) { return { - Prefix: (0, smithy_client_1.expectString)(output["Prefix"]), + Prefix: (0, smithy_client_1.expectString)(output[_P]), }; } - if (output["Tag"] !== undefined) { + if (output[_Ta] != null) { return { - Tag: deserializeAws_restXmlTag(output["Tag"], context), + Tag: de_Tag(output[_Ta], context), }; } - if (output["And"] !== undefined) { + if (output[_A] != null) { return { - And: deserializeAws_restXmlAnalyticsAndOperator(output["And"], context), + And: de_AnalyticsAndOperator(output[_A], context), }; } return { $unknown: Object.entries(output)[0] }; }; -const deserializeAws_restXmlAnalyticsS3BucketDestination = (output, context) => { - const contents = { - Format: undefined, - BucketAccountId: undefined, - Bucket: undefined, - Prefix: undefined, - }; - if (output["Format"] !== undefined) { - contents.Format = (0, smithy_client_1.expectString)(output["Format"]); +const de_AnalyticsS3BucketDestination = (output, context) => { + const contents = {}; + if (output[_Fo] != null) { + contents[_Fo] = (0, smithy_client_1.expectString)(output[_Fo]); } - if (output["BucketAccountId"] !== undefined) { - contents.BucketAccountId = (0, smithy_client_1.expectString)(output["BucketAccountId"]); + if (output[_BAI] != null) { + contents[_BAI] = (0, smithy_client_1.expectString)(output[_BAI]); } - if (output["Bucket"] !== undefined) { - contents.Bucket = (0, smithy_client_1.expectString)(output["Bucket"]); + if (output[_B] != null) { + contents[_B] = (0, smithy_client_1.expectString)(output[_B]); } - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } return contents; }; -const deserializeAws_restXmlBucket = (output, context) => { - const contents = { - Name: undefined, - CreationDate: undefined, - }; - if (output["Name"] !== undefined) { - contents.Name = (0, smithy_client_1.expectString)(output["Name"]); +const de_Bucket = (output, context) => { + const contents = {}; + if (output[_N] != null) { + contents[_N] = (0, smithy_client_1.expectString)(output[_N]); } - if (output["CreationDate"] !== undefined) { - contents.CreationDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["CreationDate"])); + if (output[_CDr] != null) { + contents[_CDr] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_CDr])); } return contents; }; -const deserializeAws_restXmlBuckets = (output, context) => { +const de_Buckets = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlBucket(entry, context); + return de_Bucket(entry, context); }); }; -const deserializeAws_restXmlChecksum = (output, context) => { - const contents = { - ChecksumCRC32: undefined, - ChecksumCRC32C: undefined, - ChecksumSHA1: undefined, - ChecksumSHA256: undefined, - }; - if (output["ChecksumCRC32"] !== undefined) { - contents.ChecksumCRC32 = (0, smithy_client_1.expectString)(output["ChecksumCRC32"]); +const de_Checksum = (output, context) => { + const contents = {}; + if (output[_CCRC] != null) { + contents[_CCRC] = (0, smithy_client_1.expectString)(output[_CCRC]); } - if (output["ChecksumCRC32C"] !== undefined) { - contents.ChecksumCRC32C = (0, smithy_client_1.expectString)(output["ChecksumCRC32C"]); + if (output[_CCRCC] != null) { + contents[_CCRCC] = (0, smithy_client_1.expectString)(output[_CCRCC]); } - if (output["ChecksumSHA1"] !== undefined) { - contents.ChecksumSHA1 = (0, smithy_client_1.expectString)(output["ChecksumSHA1"]); + if (output[_CSHA] != null) { + contents[_CSHA] = (0, smithy_client_1.expectString)(output[_CSHA]); } - if (output["ChecksumSHA256"] !== undefined) { - contents.ChecksumSHA256 = (0, smithy_client_1.expectString)(output["ChecksumSHA256"]); + if (output[_CSHAh] != null) { + contents[_CSHAh] = (0, smithy_client_1.expectString)(output[_CSHAh]); } return contents; }; -const deserializeAws_restXmlChecksumAlgorithmList = (output, context) => { +const de_ChecksumAlgorithmList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { return (0, smithy_client_1.expectString)(entry); }); }; -const deserializeAws_restXmlCommonPrefix = (output, context) => { - const contents = { - Prefix: undefined, - }; - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); +const de_CommonPrefix = (output, context) => { + const contents = {}; + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } return contents; }; -const deserializeAws_restXmlCommonPrefixList = (output, context) => { +const de_CommonPrefixList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlCommonPrefix(entry, context); + return de_CommonPrefix(entry, context); }); }; -const deserializeAws_restXmlCondition = (output, context) => { - const contents = { - HttpErrorCodeReturnedEquals: undefined, - KeyPrefixEquals: undefined, - }; - if (output["HttpErrorCodeReturnedEquals"] !== undefined) { - contents.HttpErrorCodeReturnedEquals = (0, smithy_client_1.expectString)(output["HttpErrorCodeReturnedEquals"]); +const de_Condition = (output, context) => { + const contents = {}; + if (output[_HECRE] != null) { + contents[_HECRE] = (0, smithy_client_1.expectString)(output[_HECRE]); } - if (output["KeyPrefixEquals"] !== undefined) { - contents.KeyPrefixEquals = (0, smithy_client_1.expectString)(output["KeyPrefixEquals"]); + if (output[_KPE] != null) { + contents[_KPE] = (0, smithy_client_1.expectString)(output[_KPE]); } return contents; }; -const deserializeAws_restXmlContinuationEvent = (output, context) => { +const de_ContinuationEvent = (output, context) => { const contents = {}; return contents; }; -const deserializeAws_restXmlCopyObjectResult = (output, context) => { - const contents = { - ETag: undefined, - LastModified: undefined, - ChecksumCRC32: undefined, - ChecksumCRC32C: undefined, - ChecksumSHA1: undefined, - ChecksumSHA256: undefined, - }; - if (output["ETag"] !== undefined) { - contents.ETag = (0, smithy_client_1.expectString)(output["ETag"]); +const de_CopyObjectResult = (output, context) => { + const contents = {}; + if (output[_ETa] != null) { + contents[_ETa] = (0, smithy_client_1.expectString)(output[_ETa]); } - if (output["LastModified"] !== undefined) { - contents.LastModified = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["LastModified"])); + if (output[_LM] != null) { + contents[_LM] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_LM])); } - if (output["ChecksumCRC32"] !== undefined) { - contents.ChecksumCRC32 = (0, smithy_client_1.expectString)(output["ChecksumCRC32"]); + if (output[_CCRC] != null) { + contents[_CCRC] = (0, smithy_client_1.expectString)(output[_CCRC]); } - if (output["ChecksumCRC32C"] !== undefined) { - contents.ChecksumCRC32C = (0, smithy_client_1.expectString)(output["ChecksumCRC32C"]); + if (output[_CCRCC] != null) { + contents[_CCRCC] = (0, smithy_client_1.expectString)(output[_CCRCC]); } - if (output["ChecksumSHA1"] !== undefined) { - contents.ChecksumSHA1 = (0, smithy_client_1.expectString)(output["ChecksumSHA1"]); + if (output[_CSHA] != null) { + contents[_CSHA] = (0, smithy_client_1.expectString)(output[_CSHA]); } - if (output["ChecksumSHA256"] !== undefined) { - contents.ChecksumSHA256 = (0, smithy_client_1.expectString)(output["ChecksumSHA256"]); + if (output[_CSHAh] != null) { + contents[_CSHAh] = (0, smithy_client_1.expectString)(output[_CSHAh]); } return contents; }; -const deserializeAws_restXmlCopyPartResult = (output, context) => { - const contents = { - ETag: undefined, - LastModified: undefined, - ChecksumCRC32: undefined, - ChecksumCRC32C: undefined, - ChecksumSHA1: undefined, - ChecksumSHA256: undefined, - }; - if (output["ETag"] !== undefined) { - contents.ETag = (0, smithy_client_1.expectString)(output["ETag"]); +const de_CopyPartResult = (output, context) => { + const contents = {}; + if (output[_ETa] != null) { + contents[_ETa] = (0, smithy_client_1.expectString)(output[_ETa]); } - if (output["LastModified"] !== undefined) { - contents.LastModified = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["LastModified"])); + if (output[_LM] != null) { + contents[_LM] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_LM])); } - if (output["ChecksumCRC32"] !== undefined) { - contents.ChecksumCRC32 = (0, smithy_client_1.expectString)(output["ChecksumCRC32"]); + if (output[_CCRC] != null) { + contents[_CCRC] = (0, smithy_client_1.expectString)(output[_CCRC]); } - if (output["ChecksumCRC32C"] !== undefined) { - contents.ChecksumCRC32C = (0, smithy_client_1.expectString)(output["ChecksumCRC32C"]); + if (output[_CCRCC] != null) { + contents[_CCRCC] = (0, smithy_client_1.expectString)(output[_CCRCC]); } - if (output["ChecksumSHA1"] !== undefined) { - contents.ChecksumSHA1 = (0, smithy_client_1.expectString)(output["ChecksumSHA1"]); + if (output[_CSHA] != null) { + contents[_CSHA] = (0, smithy_client_1.expectString)(output[_CSHA]); } - if (output["ChecksumSHA256"] !== undefined) { - contents.ChecksumSHA256 = (0, smithy_client_1.expectString)(output["ChecksumSHA256"]); + if (output[_CSHAh] != null) { + contents[_CSHAh] = (0, smithy_client_1.expectString)(output[_CSHAh]); } return contents; }; -const deserializeAws_restXmlCORSRule = (output, context) => { - const contents = { - ID: undefined, - AllowedHeaders: undefined, - AllowedMethods: undefined, - AllowedOrigins: undefined, - ExposeHeaders: undefined, - MaxAgeSeconds: undefined, - }; - if (output["ID"] !== undefined) { - contents.ID = (0, smithy_client_1.expectString)(output["ID"]); +const de_CORSRule = (output, context) => { + const contents = {}; + if (output[_ID_] != null) { + contents[_ID_] = (0, smithy_client_1.expectString)(output[_ID_]); } if (output.AllowedHeader === "") { - contents.AllowedHeaders = []; + contents[_AHl] = []; } - else if (output["AllowedHeader"] !== undefined) { - contents.AllowedHeaders = deserializeAws_restXmlAllowedHeaders((0, smithy_client_1.getArrayIfSingleItem)(output["AllowedHeader"]), context); + else if (output[_AH] != null) { + contents[_AHl] = de_AllowedHeaders((0, smithy_client_1.getArrayIfSingleItem)(output[_AH]), context); } if (output.AllowedMethod === "") { - contents.AllowedMethods = []; + contents[_AMl] = []; } - else if (output["AllowedMethod"] !== undefined) { - contents.AllowedMethods = deserializeAws_restXmlAllowedMethods((0, smithy_client_1.getArrayIfSingleItem)(output["AllowedMethod"]), context); + else if (output[_AM] != null) { + contents[_AMl] = de_AllowedMethods((0, smithy_client_1.getArrayIfSingleItem)(output[_AM]), context); } if (output.AllowedOrigin === "") { - contents.AllowedOrigins = []; + contents[_AOl] = []; } - else if (output["AllowedOrigin"] !== undefined) { - contents.AllowedOrigins = deserializeAws_restXmlAllowedOrigins((0, smithy_client_1.getArrayIfSingleItem)(output["AllowedOrigin"]), context); + else if (output[_AO] != null) { + contents[_AOl] = de_AllowedOrigins((0, smithy_client_1.getArrayIfSingleItem)(output[_AO]), context); } if (output.ExposeHeader === "") { - contents.ExposeHeaders = []; + contents[_EH] = []; } - else if (output["ExposeHeader"] !== undefined) { - contents.ExposeHeaders = deserializeAws_restXmlExposeHeaders((0, smithy_client_1.getArrayIfSingleItem)(output["ExposeHeader"]), context); + else if (output[_EHx] != null) { + contents[_EH] = de_ExposeHeaders((0, smithy_client_1.getArrayIfSingleItem)(output[_EHx]), context); } - if (output["MaxAgeSeconds"] !== undefined) { - contents.MaxAgeSeconds = (0, smithy_client_1.strictParseInt32)(output["MaxAgeSeconds"]); + if (output[_MAS] != null) { + contents[_MAS] = (0, smithy_client_1.strictParseInt32)(output[_MAS]); } return contents; }; -const deserializeAws_restXmlCORSRules = (output, context) => { +const de_CORSRules = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlCORSRule(entry, context); + return de_CORSRule(entry, context); }); }; -const deserializeAws_restXmlDefaultRetention = (output, context) => { - const contents = { - Mode: undefined, - Days: undefined, - Years: undefined, - }; - if (output["Mode"] !== undefined) { - contents.Mode = (0, smithy_client_1.expectString)(output["Mode"]); +const de_DefaultRetention = (output, context) => { + const contents = {}; + if (output[_Mo] != null) { + contents[_Mo] = (0, smithy_client_1.expectString)(output[_Mo]); } - if (output["Days"] !== undefined) { - contents.Days = (0, smithy_client_1.strictParseInt32)(output["Days"]); + if (output[_Da] != null) { + contents[_Da] = (0, smithy_client_1.strictParseInt32)(output[_Da]); } - if (output["Years"] !== undefined) { - contents.Years = (0, smithy_client_1.strictParseInt32)(output["Years"]); + if (output[_Y] != null) { + contents[_Y] = (0, smithy_client_1.strictParseInt32)(output[_Y]); } return contents; }; -const deserializeAws_restXmlDeletedObject = (output, context) => { - const contents = { - Key: undefined, - VersionId: undefined, - DeleteMarker: undefined, - DeleteMarkerVersionId: undefined, - }; - if (output["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(output["Key"]); +const de_DeletedObject = (output, context) => { + const contents = {}; + if (output[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(output[_K]); } - if (output["VersionId"] !== undefined) { - contents.VersionId = (0, smithy_client_1.expectString)(output["VersionId"]); + if (output[_VI] != null) { + contents[_VI] = (0, smithy_client_1.expectString)(output[_VI]); } - if (output["DeleteMarker"] !== undefined) { - contents.DeleteMarker = (0, smithy_client_1.parseBoolean)(output["DeleteMarker"]); + if (output[_DM] != null) { + contents[_DM] = (0, smithy_client_1.parseBoolean)(output[_DM]); } - if (output["DeleteMarkerVersionId"] !== undefined) { - contents.DeleteMarkerVersionId = (0, smithy_client_1.expectString)(output["DeleteMarkerVersionId"]); + if (output[_DMVI] != null) { + contents[_DMVI] = (0, smithy_client_1.expectString)(output[_DMVI]); } return contents; }; -const deserializeAws_restXmlDeletedObjects = (output, context) => { +const de_DeletedObjects = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlDeletedObject(entry, context); + return de_DeletedObject(entry, context); }); }; -const deserializeAws_restXmlDeleteMarkerEntry = (output, context) => { - const contents = { - Owner: undefined, - Key: undefined, - VersionId: undefined, - IsLatest: undefined, - LastModified: undefined, - }; - if (output["Owner"] !== undefined) { - contents.Owner = deserializeAws_restXmlOwner(output["Owner"], context); +const de_DeleteMarkerEntry = (output, context) => { + const contents = {}; + if (output[_O] != null) { + contents[_O] = de_Owner(output[_O], context); } - if (output["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(output["Key"]); + if (output[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(output[_K]); } - if (output["VersionId"] !== undefined) { - contents.VersionId = (0, smithy_client_1.expectString)(output["VersionId"]); + if (output[_VI] != null) { + contents[_VI] = (0, smithy_client_1.expectString)(output[_VI]); } - if (output["IsLatest"] !== undefined) { - contents.IsLatest = (0, smithy_client_1.parseBoolean)(output["IsLatest"]); + if (output[_IL] != null) { + contents[_IL] = (0, smithy_client_1.parseBoolean)(output[_IL]); } - if (output["LastModified"] !== undefined) { - contents.LastModified = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["LastModified"])); + if (output[_LM] != null) { + contents[_LM] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_LM])); } return contents; }; -const deserializeAws_restXmlDeleteMarkerReplication = (output, context) => { - const contents = { - Status: undefined, - }; - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); +const de_DeleteMarkerReplication = (output, context) => { + const contents = {}; + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } return contents; }; -const deserializeAws_restXmlDeleteMarkers = (output, context) => { +const de_DeleteMarkers = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlDeleteMarkerEntry(entry, context); + return de_DeleteMarkerEntry(entry, context); }); }; -const deserializeAws_restXmlDestination = (output, context) => { - const contents = { - Bucket: undefined, - Account: undefined, - StorageClass: undefined, - AccessControlTranslation: undefined, - EncryptionConfiguration: undefined, - ReplicationTime: undefined, - Metrics: undefined, - }; - if (output["Bucket"] !== undefined) { - contents.Bucket = (0, smithy_client_1.expectString)(output["Bucket"]); +const de_Destination = (output, context) => { + const contents = {}; + if (output[_B] != null) { + contents[_B] = (0, smithy_client_1.expectString)(output[_B]); } - if (output["Account"] !== undefined) { - contents.Account = (0, smithy_client_1.expectString)(output["Account"]); + if (output[_Ac] != null) { + contents[_Ac] = (0, smithy_client_1.expectString)(output[_Ac]); } - if (output["StorageClass"] !== undefined) { - contents.StorageClass = (0, smithy_client_1.expectString)(output["StorageClass"]); + if (output[_SC] != null) { + contents[_SC] = (0, smithy_client_1.expectString)(output[_SC]); } - if (output["AccessControlTranslation"] !== undefined) { - contents.AccessControlTranslation = deserializeAws_restXmlAccessControlTranslation(output["AccessControlTranslation"], context); + if (output[_ACT] != null) { + contents[_ACT] = de_AccessControlTranslation(output[_ACT], context); } - if (output["EncryptionConfiguration"] !== undefined) { - contents.EncryptionConfiguration = deserializeAws_restXmlEncryptionConfiguration(output["EncryptionConfiguration"], context); + if (output[_ECn] != null) { + contents[_ECn] = de_EncryptionConfiguration(output[_ECn], context); } - if (output["ReplicationTime"] !== undefined) { - contents.ReplicationTime = deserializeAws_restXmlReplicationTime(output["ReplicationTime"], context); + if (output[_RTe] != null) { + contents[_RTe] = de_ReplicationTime(output[_RTe], context); } - if (output["Metrics"] !== undefined) { - contents.Metrics = deserializeAws_restXmlMetrics(output["Metrics"], context); + if (output[_Me] != null) { + contents[_Me] = de_Metrics(output[_Me], context); } return contents; }; -const deserializeAws_restXmlEncryptionConfiguration = (output, context) => { - const contents = { - ReplicaKmsKeyID: undefined, - }; - if (output["ReplicaKmsKeyID"] !== undefined) { - contents.ReplicaKmsKeyID = (0, smithy_client_1.expectString)(output["ReplicaKmsKeyID"]); +const de_EncryptionConfiguration = (output, context) => { + const contents = {}; + if (output[_RKKID] != null) { + contents[_RKKID] = (0, smithy_client_1.expectString)(output[_RKKID]); } return contents; }; -const deserializeAws_restXmlEndEvent = (output, context) => { +const de_EndEvent = (output, context) => { const contents = {}; return contents; }; -const deserializeAws_restXml_Error = (output, context) => { - const contents = { - Key: undefined, - VersionId: undefined, - Code: undefined, - Message: undefined, - }; - if (output["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(output["Key"]); +const de__Error = (output, context) => { + const contents = {}; + if (output[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(output[_K]); } - if (output["VersionId"] !== undefined) { - contents.VersionId = (0, smithy_client_1.expectString)(output["VersionId"]); + if (output[_VI] != null) { + contents[_VI] = (0, smithy_client_1.expectString)(output[_VI]); } - if (output["Code"] !== undefined) { - contents.Code = (0, smithy_client_1.expectString)(output["Code"]); + if (output[_Cod] != null) { + contents[_Cod] = (0, smithy_client_1.expectString)(output[_Cod]); } - if (output["Message"] !== undefined) { - contents.Message = (0, smithy_client_1.expectString)(output["Message"]); + if (output[_Mes] != null) { + contents[_Mes] = (0, smithy_client_1.expectString)(output[_Mes]); } return contents; }; -const deserializeAws_restXmlErrorDocument = (output, context) => { - const contents = { - Key: undefined, - }; - if (output["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(output["Key"]); +const de_ErrorDocument = (output, context) => { + const contents = {}; + if (output[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(output[_K]); } return contents; }; -const deserializeAws_restXmlErrors = (output, context) => { +const de_Errors = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXml_Error(entry, context); + return de__Error(entry, context); }); }; -const deserializeAws_restXmlEventBridgeConfiguration = (output, context) => { +const de_EventBridgeConfiguration = (output, context) => { const contents = {}; return contents; }; -const deserializeAws_restXmlEventList = (output, context) => { +const de_EventList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { return (0, smithy_client_1.expectString)(entry); }); }; -const deserializeAws_restXmlExistingObjectReplication = (output, context) => { - const contents = { - Status: undefined, - }; - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); +const de_ExistingObjectReplication = (output, context) => { + const contents = {}; + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } return contents; }; -const deserializeAws_restXmlExposeHeaders = (output, context) => { +const de_ExposeHeaders = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { return (0, smithy_client_1.expectString)(entry); }); }; -const deserializeAws_restXmlFilterRule = (output, context) => { - const contents = { - Name: undefined, - Value: undefined, - }; - if (output["Name"] !== undefined) { - contents.Name = (0, smithy_client_1.expectString)(output["Name"]); +const de_FilterRule = (output, context) => { + const contents = {}; + if (output[_N] != null) { + contents[_N] = (0, smithy_client_1.expectString)(output[_N]); } - if (output["Value"] !== undefined) { - contents.Value = (0, smithy_client_1.expectString)(output["Value"]); + if (output[_Va] != null) { + contents[_Va] = (0, smithy_client_1.expectString)(output[_Va]); } return contents; }; -const deserializeAws_restXmlFilterRuleList = (output, context) => { +const de_FilterRuleList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlFilterRule(entry, context); + return de_FilterRule(entry, context); }); }; -const deserializeAws_restXmlGetObjectAttributesParts = (output, context) => { - const contents = { - TotalPartsCount: undefined, - PartNumberMarker: undefined, - NextPartNumberMarker: undefined, - MaxParts: undefined, - IsTruncated: undefined, - Parts: undefined, - }; - if (output["PartsCount"] !== undefined) { - contents.TotalPartsCount = (0, smithy_client_1.strictParseInt32)(output["PartsCount"]); +const de_GetObjectAttributesParts = (output, context) => { + const contents = {}; + if (output[_PC] != null) { + contents[_TPC] = (0, smithy_client_1.strictParseInt32)(output[_PC]); } - if (output["PartNumberMarker"] !== undefined) { - contents.PartNumberMarker = (0, smithy_client_1.expectString)(output["PartNumberMarker"]); + if (output[_PNM] != null) { + contents[_PNM] = (0, smithy_client_1.expectString)(output[_PNM]); } - if (output["NextPartNumberMarker"] !== undefined) { - contents.NextPartNumberMarker = (0, smithy_client_1.expectString)(output["NextPartNumberMarker"]); + if (output[_NPNM] != null) { + contents[_NPNM] = (0, smithy_client_1.expectString)(output[_NPNM]); } - if (output["MaxParts"] !== undefined) { - contents.MaxParts = (0, smithy_client_1.strictParseInt32)(output["MaxParts"]); + if (output[_MP] != null) { + contents[_MP] = (0, smithy_client_1.strictParseInt32)(output[_MP]); } - if (output["IsTruncated"] !== undefined) { - contents.IsTruncated = (0, smithy_client_1.parseBoolean)(output["IsTruncated"]); + if (output[_IT] != null) { + contents[_IT] = (0, smithy_client_1.parseBoolean)(output[_IT]); } if (output.Part === "") { - contents.Parts = []; + contents[_Part] = []; } - else if (output["Part"] !== undefined) { - contents.Parts = deserializeAws_restXmlPartsList((0, smithy_client_1.getArrayIfSingleItem)(output["Part"]), context); + else if (output[_Par] != null) { + contents[_Part] = de_PartsList((0, smithy_client_1.getArrayIfSingleItem)(output[_Par]), context); } return contents; }; -const deserializeAws_restXmlGrant = (output, context) => { - const contents = { - Grantee: undefined, - Permission: undefined, - }; - if (output["Grantee"] !== undefined) { - contents.Grantee = deserializeAws_restXmlGrantee(output["Grantee"], context); +const de_Grant = (output, context) => { + const contents = {}; + if (output[_Gra] != null) { + contents[_Gra] = de_Grantee(output[_Gra], context); } - if (output["Permission"] !== undefined) { - contents.Permission = (0, smithy_client_1.expectString)(output["Permission"]); + if (output[_Pe] != null) { + contents[_Pe] = (0, smithy_client_1.expectString)(output[_Pe]); } return contents; }; -const deserializeAws_restXmlGrantee = (output, context) => { - const contents = { - DisplayName: undefined, - EmailAddress: undefined, - ID: undefined, - URI: undefined, - Type: undefined, - }; - if (output["DisplayName"] !== undefined) { - contents.DisplayName = (0, smithy_client_1.expectString)(output["DisplayName"]); +const de_Grantee = (output, context) => { + const contents = {}; + if (output[_DN] != null) { + contents[_DN] = (0, smithy_client_1.expectString)(output[_DN]); } - if (output["EmailAddress"] !== undefined) { - contents.EmailAddress = (0, smithy_client_1.expectString)(output["EmailAddress"]); + if (output[_EA] != null) { + contents[_EA] = (0, smithy_client_1.expectString)(output[_EA]); } - if (output["ID"] !== undefined) { - contents.ID = (0, smithy_client_1.expectString)(output["ID"]); + if (output[_ID_] != null) { + contents[_ID_] = (0, smithy_client_1.expectString)(output[_ID_]); } - if (output["URI"] !== undefined) { - contents.URI = (0, smithy_client_1.expectString)(output["URI"]); + if (output[_URI] != null) { + contents[_URI] = (0, smithy_client_1.expectString)(output[_URI]); } - if (output["xsi:type"] !== undefined) { - contents.Type = (0, smithy_client_1.expectString)(output["xsi:type"]); + if (output[_x] != null) { + contents[_Ty] = (0, smithy_client_1.expectString)(output[_x]); } return contents; }; -const deserializeAws_restXmlGrants = (output, context) => { +const de_Grants = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlGrant(entry, context); + return de_Grant(entry, context); }); }; -const deserializeAws_restXmlIndexDocument = (output, context) => { - const contents = { - Suffix: undefined, - }; - if (output["Suffix"] !== undefined) { - contents.Suffix = (0, smithy_client_1.expectString)(output["Suffix"]); +const de_IndexDocument = (output, context) => { + const contents = {}; + if (output[_Su] != null) { + contents[_Su] = (0, smithy_client_1.expectString)(output[_Su]); } return contents; }; -const deserializeAws_restXmlInitiator = (output, context) => { - const contents = { - ID: undefined, - DisplayName: undefined, - }; - if (output["ID"] !== undefined) { - contents.ID = (0, smithy_client_1.expectString)(output["ID"]); +const de_Initiator = (output, context) => { + const contents = {}; + if (output[_ID_] != null) { + contents[_ID_] = (0, smithy_client_1.expectString)(output[_ID_]); } - if (output["DisplayName"] !== undefined) { - contents.DisplayName = (0, smithy_client_1.expectString)(output["DisplayName"]); + if (output[_DN] != null) { + contents[_DN] = (0, smithy_client_1.expectString)(output[_DN]); } return contents; }; -const deserializeAws_restXmlIntelligentTieringAndOperator = (output, context) => { - const contents = { - Prefix: undefined, - Tags: undefined, - }; - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); +const de_IntelligentTieringAndOperator = (output, context) => { + const contents = {}; + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } if (output.Tag === "") { - contents.Tags = []; + contents[_Tag] = []; } - else if (output["Tag"] !== undefined) { - contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context); + else if (output[_Ta] != null) { + contents[_Tag] = de_TagSet((0, smithy_client_1.getArrayIfSingleItem)(output[_Ta]), context); } return contents; }; -const deserializeAws_restXmlIntelligentTieringConfiguration = (output, context) => { - const contents = { - Id: undefined, - Filter: undefined, - Status: undefined, - Tierings: undefined, - }; - if (output["Id"] !== undefined) { - contents.Id = (0, smithy_client_1.expectString)(output["Id"]); +const de_IntelligentTieringConfiguration = (output, context) => { + const contents = {}; + if (output[_I] != null) { + contents[_I] = (0, smithy_client_1.expectString)(output[_I]); } - if (output["Filter"] !== undefined) { - contents.Filter = deserializeAws_restXmlIntelligentTieringFilter(output["Filter"], context); + if (output[_F] != null) { + contents[_F] = de_IntelligentTieringFilter(output[_F], context); } - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } if (output.Tiering === "") { - contents.Tierings = []; + contents[_Tie] = []; } - else if (output["Tiering"] !== undefined) { - contents.Tierings = deserializeAws_restXmlTieringList((0, smithy_client_1.getArrayIfSingleItem)(output["Tiering"]), context); + else if (output[_Tier] != null) { + contents[_Tie] = de_TieringList((0, smithy_client_1.getArrayIfSingleItem)(output[_Tier]), context); } return contents; }; -const deserializeAws_restXmlIntelligentTieringConfigurationList = (output, context) => { +const de_IntelligentTieringConfigurationList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlIntelligentTieringConfiguration(entry, context); + return de_IntelligentTieringConfiguration(entry, context); }); }; -const deserializeAws_restXmlIntelligentTieringFilter = (output, context) => { - const contents = { - Prefix: undefined, - Tag: undefined, - And: undefined, - }; - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); +const de_IntelligentTieringFilter = (output, context) => { + const contents = {}; + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } - if (output["Tag"] !== undefined) { - contents.Tag = deserializeAws_restXmlTag(output["Tag"], context); + if (output[_Ta] != null) { + contents[_Ta] = de_Tag(output[_Ta], context); } - if (output["And"] !== undefined) { - contents.And = deserializeAws_restXmlIntelligentTieringAndOperator(output["And"], context); + if (output[_A] != null) { + contents[_A] = de_IntelligentTieringAndOperator(output[_A], context); } return contents; }; -const deserializeAws_restXmlInventoryConfiguration = (output, context) => { - const contents = { - Destination: undefined, - IsEnabled: undefined, - Filter: undefined, - Id: undefined, - IncludedObjectVersions: undefined, - OptionalFields: undefined, - Schedule: undefined, - }; - if (output["Destination"] !== undefined) { - contents.Destination = deserializeAws_restXmlInventoryDestination(output["Destination"], context); +const de_InventoryConfiguration = (output, context) => { + const contents = {}; + if (output[_Des] != null) { + contents[_Des] = de_InventoryDestination(output[_Des], context); } - if (output["IsEnabled"] !== undefined) { - contents.IsEnabled = (0, smithy_client_1.parseBoolean)(output["IsEnabled"]); + if (output[_IE] != null) { + contents[_IE] = (0, smithy_client_1.parseBoolean)(output[_IE]); } - if (output["Filter"] !== undefined) { - contents.Filter = deserializeAws_restXmlInventoryFilter(output["Filter"], context); + if (output[_F] != null) { + contents[_F] = de_InventoryFilter(output[_F], context); } - if (output["Id"] !== undefined) { - contents.Id = (0, smithy_client_1.expectString)(output["Id"]); + if (output[_I] != null) { + contents[_I] = (0, smithy_client_1.expectString)(output[_I]); } - if (output["IncludedObjectVersions"] !== undefined) { - contents.IncludedObjectVersions = (0, smithy_client_1.expectString)(output["IncludedObjectVersions"]); + if (output[_IOV] != null) { + contents[_IOV] = (0, smithy_client_1.expectString)(output[_IOV]); } if (output.OptionalFields === "") { - contents.OptionalFields = []; + contents[_OF] = []; } - else if (output["OptionalFields"] !== undefined && output["OptionalFields"]["Field"] !== undefined) { - contents.OptionalFields = deserializeAws_restXmlInventoryOptionalFields((0, smithy_client_1.getArrayIfSingleItem)(output["OptionalFields"]["Field"]), context); + else if (output[_OF] != null && output[_OF][_Fi] != null) { + contents[_OF] = de_InventoryOptionalFields((0, smithy_client_1.getArrayIfSingleItem)(output[_OF][_Fi]), context); } - if (output["Schedule"] !== undefined) { - contents.Schedule = deserializeAws_restXmlInventorySchedule(output["Schedule"], context); + if (output[_Sc] != null) { + contents[_Sc] = de_InventorySchedule(output[_Sc], context); } return contents; }; -const deserializeAws_restXmlInventoryConfigurationList = (output, context) => { +const de_InventoryConfigurationList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlInventoryConfiguration(entry, context); + return de_InventoryConfiguration(entry, context); }); }; -const deserializeAws_restXmlInventoryDestination = (output, context) => { - const contents = { - S3BucketDestination: undefined, - }; - if (output["S3BucketDestination"] !== undefined) { - contents.S3BucketDestination = deserializeAws_restXmlInventoryS3BucketDestination(output["S3BucketDestination"], context); +const de_InventoryDestination = (output, context) => { + const contents = {}; + if (output[_SBD] != null) { + contents[_SBD] = de_InventoryS3BucketDestination(output[_SBD], context); } return contents; }; -const deserializeAws_restXmlInventoryEncryption = (output, context) => { - const contents = { - SSES3: undefined, - SSEKMS: undefined, - }; - if (output["SSE-S3"] !== undefined) { - contents.SSES3 = deserializeAws_restXmlSSES3(output["SSE-S3"], context); +const de_InventoryEncryption = (output, context) => { + const contents = {}; + if (output[_SS] != null) { + contents[_SSES] = de_SSES3(output[_SS], context); } - if (output["SSE-KMS"] !== undefined) { - contents.SSEKMS = deserializeAws_restXmlSSEKMS(output["SSE-KMS"], context); + if (output[_SK] != null) { + contents[_SSEKMS] = de_SSEKMS(output[_SK], context); } return contents; }; -const deserializeAws_restXmlInventoryFilter = (output, context) => { - const contents = { - Prefix: undefined, - }; - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); +const de_InventoryFilter = (output, context) => { + const contents = {}; + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } return contents; }; -const deserializeAws_restXmlInventoryOptionalFields = (output, context) => { +const de_InventoryOptionalFields = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { return (0, smithy_client_1.expectString)(entry); }); }; -const deserializeAws_restXmlInventoryS3BucketDestination = (output, context) => { - const contents = { - AccountId: undefined, - Bucket: undefined, - Format: undefined, - Prefix: undefined, - Encryption: undefined, - }; - if (output["AccountId"] !== undefined) { - contents.AccountId = (0, smithy_client_1.expectString)(output["AccountId"]); +const de_InventoryS3BucketDestination = (output, context) => { + const contents = {}; + if (output[_AIc] != null) { + contents[_AIc] = (0, smithy_client_1.expectString)(output[_AIc]); } - if (output["Bucket"] !== undefined) { - contents.Bucket = (0, smithy_client_1.expectString)(output["Bucket"]); + if (output[_B] != null) { + contents[_B] = (0, smithy_client_1.expectString)(output[_B]); } - if (output["Format"] !== undefined) { - contents.Format = (0, smithy_client_1.expectString)(output["Format"]); + if (output[_Fo] != null) { + contents[_Fo] = (0, smithy_client_1.expectString)(output[_Fo]); } - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } - if (output["Encryption"] !== undefined) { - contents.Encryption = deserializeAws_restXmlInventoryEncryption(output["Encryption"], context); + if (output[_En] != null) { + contents[_En] = de_InventoryEncryption(output[_En], context); } return contents; }; -const deserializeAws_restXmlInventorySchedule = (output, context) => { - const contents = { - Frequency: undefined, - }; - if (output["Frequency"] !== undefined) { - contents.Frequency = (0, smithy_client_1.expectString)(output["Frequency"]); +const de_InventorySchedule = (output, context) => { + const contents = {}; + if (output[_Fr] != null) { + contents[_Fr] = (0, smithy_client_1.expectString)(output[_Fr]); } return contents; }; -const deserializeAws_restXmlLambdaFunctionConfiguration = (output, context) => { - const contents = { - Id: undefined, - LambdaFunctionArn: undefined, - Events: undefined, - Filter: undefined, - }; - if (output["Id"] !== undefined) { - contents.Id = (0, smithy_client_1.expectString)(output["Id"]); +const de_LambdaFunctionConfiguration = (output, context) => { + const contents = {}; + if (output[_I] != null) { + contents[_I] = (0, smithy_client_1.expectString)(output[_I]); } - if (output["CloudFunction"] !== undefined) { - contents.LambdaFunctionArn = (0, smithy_client_1.expectString)(output["CloudFunction"]); + if (output[_CF] != null) { + contents[_LFA] = (0, smithy_client_1.expectString)(output[_CF]); } if (output.Event === "") { - contents.Events = []; + contents[_Eve] = []; } - else if (output["Event"] !== undefined) { - contents.Events = deserializeAws_restXmlEventList((0, smithy_client_1.getArrayIfSingleItem)(output["Event"]), context); + else if (output[_Ev] != null) { + contents[_Eve] = de_EventList((0, smithy_client_1.getArrayIfSingleItem)(output[_Ev]), context); } - if (output["Filter"] !== undefined) { - contents.Filter = deserializeAws_restXmlNotificationConfigurationFilter(output["Filter"], context); + if (output[_F] != null) { + contents[_F] = de_NotificationConfigurationFilter(output[_F], context); } return contents; }; -const deserializeAws_restXmlLambdaFunctionConfigurationList = (output, context) => { +const de_LambdaFunctionConfigurationList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlLambdaFunctionConfiguration(entry, context); + return de_LambdaFunctionConfiguration(entry, context); }); }; -const deserializeAws_restXmlLifecycleExpiration = (output, context) => { - const contents = { - Date: undefined, - Days: undefined, - ExpiredObjectDeleteMarker: undefined, - }; - if (output["Date"] !== undefined) { - contents.Date = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["Date"])); +const de_LifecycleExpiration = (output, context) => { + const contents = {}; + if (output[_Dat] != null) { + contents[_Dat] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_Dat])); } - if (output["Days"] !== undefined) { - contents.Days = (0, smithy_client_1.strictParseInt32)(output["Days"]); + if (output[_Da] != null) { + contents[_Da] = (0, smithy_client_1.strictParseInt32)(output[_Da]); } - if (output["ExpiredObjectDeleteMarker"] !== undefined) { - contents.ExpiredObjectDeleteMarker = (0, smithy_client_1.parseBoolean)(output["ExpiredObjectDeleteMarker"]); + if (output[_EODM] != null) { + contents[_EODM] = (0, smithy_client_1.parseBoolean)(output[_EODM]); } return contents; }; -const deserializeAws_restXmlLifecycleRule = (output, context) => { - const contents = { - Expiration: undefined, - ID: undefined, - Prefix: undefined, - Filter: undefined, - Status: undefined, - Transitions: undefined, - NoncurrentVersionTransitions: undefined, - NoncurrentVersionExpiration: undefined, - AbortIncompleteMultipartUpload: undefined, - }; - if (output["Expiration"] !== undefined) { - contents.Expiration = deserializeAws_restXmlLifecycleExpiration(output["Expiration"], context); +const de_LifecycleRule = (output, context) => { + const contents = {}; + if (output[_Exp] != null) { + contents[_Exp] = de_LifecycleExpiration(output[_Exp], context); } - if (output["ID"] !== undefined) { - contents.ID = (0, smithy_client_1.expectString)(output["ID"]); + if (output[_ID_] != null) { + contents[_ID_] = (0, smithy_client_1.expectString)(output[_ID_]); } - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } if (output.Filter === "") { } - else if (output["Filter"] !== undefined) { - contents.Filter = deserializeAws_restXmlLifecycleRuleFilter((0, smithy_client_1.expectUnion)(output["Filter"]), context); + else if (output[_F] != null) { + contents[_F] = de_LifecycleRuleFilter((0, smithy_client_1.expectUnion)(output[_F]), context); } - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } if (output.Transition === "") { - contents.Transitions = []; + contents[_Tr] = []; } - else if (output["Transition"] !== undefined) { - contents.Transitions = deserializeAws_restXmlTransitionList((0, smithy_client_1.getArrayIfSingleItem)(output["Transition"]), context); + else if (output[_Tra] != null) { + contents[_Tr] = de_TransitionList((0, smithy_client_1.getArrayIfSingleItem)(output[_Tra]), context); } if (output.NoncurrentVersionTransition === "") { - contents.NoncurrentVersionTransitions = []; + contents[_NVT] = []; } - else if (output["NoncurrentVersionTransition"] !== undefined) { - contents.NoncurrentVersionTransitions = deserializeAws_restXmlNoncurrentVersionTransitionList((0, smithy_client_1.getArrayIfSingleItem)(output["NoncurrentVersionTransition"]), context); + else if (output[_NVTo] != null) { + contents[_NVT] = de_NoncurrentVersionTransitionList((0, smithy_client_1.getArrayIfSingleItem)(output[_NVTo]), context); } - if (output["NoncurrentVersionExpiration"] !== undefined) { - contents.NoncurrentVersionExpiration = deserializeAws_restXmlNoncurrentVersionExpiration(output["NoncurrentVersionExpiration"], context); + if (output[_NVE] != null) { + contents[_NVE] = de_NoncurrentVersionExpiration(output[_NVE], context); } - if (output["AbortIncompleteMultipartUpload"] !== undefined) { - contents.AbortIncompleteMultipartUpload = deserializeAws_restXmlAbortIncompleteMultipartUpload(output["AbortIncompleteMultipartUpload"], context); + if (output[_AIMU] != null) { + contents[_AIMU] = de_AbortIncompleteMultipartUpload(output[_AIMU], context); } return contents; }; -const deserializeAws_restXmlLifecycleRuleAndOperator = (output, context) => { - const contents = { - Prefix: undefined, - Tags: undefined, - ObjectSizeGreaterThan: undefined, - ObjectSizeLessThan: undefined, - }; - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); +const de_LifecycleRuleAndOperator = (output, context) => { + const contents = {}; + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } if (output.Tag === "") { - contents.Tags = []; + contents[_Tag] = []; } - else if (output["Tag"] !== undefined) { - contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context); + else if (output[_Ta] != null) { + contents[_Tag] = de_TagSet((0, smithy_client_1.getArrayIfSingleItem)(output[_Ta]), context); } - if (output["ObjectSizeGreaterThan"] !== undefined) { - contents.ObjectSizeGreaterThan = (0, smithy_client_1.strictParseLong)(output["ObjectSizeGreaterThan"]); + if (output[_OSGT] != null) { + contents[_OSGT] = (0, smithy_client_1.strictParseLong)(output[_OSGT]); } - if (output["ObjectSizeLessThan"] !== undefined) { - contents.ObjectSizeLessThan = (0, smithy_client_1.strictParseLong)(output["ObjectSizeLessThan"]); + if (output[_OSLT] != null) { + contents[_OSLT] = (0, smithy_client_1.strictParseLong)(output[_OSLT]); } return contents; }; -const deserializeAws_restXmlLifecycleRuleFilter = (output, context) => { - if (output["Prefix"] !== undefined) { +const de_LifecycleRuleFilter = (output, context) => { + if (output[_P] != null) { return { - Prefix: (0, smithy_client_1.expectString)(output["Prefix"]), + Prefix: (0, smithy_client_1.expectString)(output[_P]), }; } - if (output["Tag"] !== undefined) { + if (output[_Ta] != null) { return { - Tag: deserializeAws_restXmlTag(output["Tag"], context), + Tag: de_Tag(output[_Ta], context), }; } - if (output["ObjectSizeGreaterThan"] !== undefined) { + if (output[_OSGT] != null) { return { - ObjectSizeGreaterThan: (0, smithy_client_1.strictParseLong)(output["ObjectSizeGreaterThan"]), + ObjectSizeGreaterThan: (0, smithy_client_1.strictParseLong)(output[_OSGT]), }; } - if (output["ObjectSizeLessThan"] !== undefined) { + if (output[_OSLT] != null) { return { - ObjectSizeLessThan: (0, smithy_client_1.strictParseLong)(output["ObjectSizeLessThan"]), + ObjectSizeLessThan: (0, smithy_client_1.strictParseLong)(output[_OSLT]), }; } - if (output["And"] !== undefined) { + if (output[_A] != null) { return { - And: deserializeAws_restXmlLifecycleRuleAndOperator(output["And"], context), + And: de_LifecycleRuleAndOperator(output[_A], context), }; } return { $unknown: Object.entries(output)[0] }; }; -const deserializeAws_restXmlLifecycleRules = (output, context) => { +const de_LifecycleRules = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlLifecycleRule(entry, context); + return de_LifecycleRule(entry, context); }); }; -const deserializeAws_restXmlLoggingEnabled = (output, context) => { - const contents = { - TargetBucket: undefined, - TargetGrants: undefined, - TargetPrefix: undefined, - }; - if (output["TargetBucket"] !== undefined) { - contents.TargetBucket = (0, smithy_client_1.expectString)(output["TargetBucket"]); +const de_LoggingEnabled = (output, context) => { + const contents = {}; + if (output[_TB] != null) { + contents[_TB] = (0, smithy_client_1.expectString)(output[_TB]); } if (output.TargetGrants === "") { - contents.TargetGrants = []; + contents[_TG] = []; } - else if (output["TargetGrants"] !== undefined && output["TargetGrants"]["Grant"] !== undefined) { - contents.TargetGrants = deserializeAws_restXmlTargetGrants((0, smithy_client_1.getArrayIfSingleItem)(output["TargetGrants"]["Grant"]), context); + else if (output[_TG] != null && output[_TG][_G] != null) { + contents[_TG] = de_TargetGrants((0, smithy_client_1.getArrayIfSingleItem)(output[_TG][_G]), context); } - if (output["TargetPrefix"] !== undefined) { - contents.TargetPrefix = (0, smithy_client_1.expectString)(output["TargetPrefix"]); + if (output[_TP] != null) { + contents[_TP] = (0, smithy_client_1.expectString)(output[_TP]); + } + if (output[_TOKF] != null) { + contents[_TOKF] = de_TargetObjectKeyFormat(output[_TOKF], context); } return contents; }; -const deserializeAws_restXmlMetrics = (output, context) => { - const contents = { - Status: undefined, - EventThreshold: undefined, - }; - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); +const de_Metrics = (output, context) => { + const contents = {}; + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } - if (output["EventThreshold"] !== undefined) { - contents.EventThreshold = deserializeAws_restXmlReplicationTimeValue(output["EventThreshold"], context); + if (output[_ETv] != null) { + contents[_ETv] = de_ReplicationTimeValue(output[_ETv], context); } return contents; }; -const deserializeAws_restXmlMetricsAndOperator = (output, context) => { - const contents = { - Prefix: undefined, - Tags: undefined, - AccessPointArn: undefined, - }; - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); +const de_MetricsAndOperator = (output, context) => { + const contents = {}; + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } if (output.Tag === "") { - contents.Tags = []; + contents[_Tag] = []; } - else if (output["Tag"] !== undefined) { - contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context); + else if (output[_Ta] != null) { + contents[_Tag] = de_TagSet((0, smithy_client_1.getArrayIfSingleItem)(output[_Ta]), context); } - if (output["AccessPointArn"] !== undefined) { - contents.AccessPointArn = (0, smithy_client_1.expectString)(output["AccessPointArn"]); + if (output[_APAc] != null) { + contents[_APAc] = (0, smithy_client_1.expectString)(output[_APAc]); } return contents; }; -const deserializeAws_restXmlMetricsConfiguration = (output, context) => { - const contents = { - Id: undefined, - Filter: undefined, - }; - if (output["Id"] !== undefined) { - contents.Id = (0, smithy_client_1.expectString)(output["Id"]); +const de_MetricsConfiguration = (output, context) => { + const contents = {}; + if (output[_I] != null) { + contents[_I] = (0, smithy_client_1.expectString)(output[_I]); } if (output.Filter === "") { } - else if (output["Filter"] !== undefined) { - contents.Filter = deserializeAws_restXmlMetricsFilter((0, smithy_client_1.expectUnion)(output["Filter"]), context); + else if (output[_F] != null) { + contents[_F] = de_MetricsFilter((0, smithy_client_1.expectUnion)(output[_F]), context); } return contents; }; -const deserializeAws_restXmlMetricsConfigurationList = (output, context) => { +const de_MetricsConfigurationList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlMetricsConfiguration(entry, context); + return de_MetricsConfiguration(entry, context); }); }; -const deserializeAws_restXmlMetricsFilter = (output, context) => { - if (output["Prefix"] !== undefined) { +const de_MetricsFilter = (output, context) => { + if (output[_P] != null) { return { - Prefix: (0, smithy_client_1.expectString)(output["Prefix"]), + Prefix: (0, smithy_client_1.expectString)(output[_P]), }; } - if (output["Tag"] !== undefined) { + if (output[_Ta] != null) { return { - Tag: deserializeAws_restXmlTag(output["Tag"], context), + Tag: de_Tag(output[_Ta], context), }; } - if (output["AccessPointArn"] !== undefined) { + if (output[_APAc] != null) { return { - AccessPointArn: (0, smithy_client_1.expectString)(output["AccessPointArn"]), + AccessPointArn: (0, smithy_client_1.expectString)(output[_APAc]), }; } - if (output["And"] !== undefined) { + if (output[_A] != null) { return { - And: deserializeAws_restXmlMetricsAndOperator(output["And"], context), + And: de_MetricsAndOperator(output[_A], context), }; } return { $unknown: Object.entries(output)[0] }; }; -const deserializeAws_restXmlMultipartUpload = (output, context) => { - const contents = { - UploadId: undefined, - Key: undefined, - Initiated: undefined, - StorageClass: undefined, - Owner: undefined, - Initiator: undefined, - ChecksumAlgorithm: undefined, - }; - if (output["UploadId"] !== undefined) { - contents.UploadId = (0, smithy_client_1.expectString)(output["UploadId"]); +const de_MultipartUpload = (output, context) => { + const contents = {}; + if (output[_UI] != null) { + contents[_UI] = (0, smithy_client_1.expectString)(output[_UI]); } - if (output["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(output["Key"]); + if (output[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(output[_K]); } - if (output["Initiated"] !== undefined) { - contents.Initiated = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["Initiated"])); + if (output[_Ini] != null) { + contents[_Ini] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_Ini])); } - if (output["StorageClass"] !== undefined) { - contents.StorageClass = (0, smithy_client_1.expectString)(output["StorageClass"]); + if (output[_SC] != null) { + contents[_SC] = (0, smithy_client_1.expectString)(output[_SC]); } - if (output["Owner"] !== undefined) { - contents.Owner = deserializeAws_restXmlOwner(output["Owner"], context); + if (output[_O] != null) { + contents[_O] = de_Owner(output[_O], context); } - if (output["Initiator"] !== undefined) { - contents.Initiator = deserializeAws_restXmlInitiator(output["Initiator"], context); + if (output[_In] != null) { + contents[_In] = de_Initiator(output[_In], context); } - if (output["ChecksumAlgorithm"] !== undefined) { - contents.ChecksumAlgorithm = (0, smithy_client_1.expectString)(output["ChecksumAlgorithm"]); + if (output[_CA] != null) { + contents[_CA] = (0, smithy_client_1.expectString)(output[_CA]); } return contents; }; -const deserializeAws_restXmlMultipartUploadList = (output, context) => { +const de_MultipartUploadList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlMultipartUpload(entry, context); + return de_MultipartUpload(entry, context); }); }; -const deserializeAws_restXmlNoncurrentVersionExpiration = (output, context) => { - const contents = { - NoncurrentDays: undefined, - NewerNoncurrentVersions: undefined, - }; - if (output["NoncurrentDays"] !== undefined) { - contents.NoncurrentDays = (0, smithy_client_1.strictParseInt32)(output["NoncurrentDays"]); +const de_NoncurrentVersionExpiration = (output, context) => { + const contents = {}; + if (output[_ND] != null) { + contents[_ND] = (0, smithy_client_1.strictParseInt32)(output[_ND]); } - if (output["NewerNoncurrentVersions"] !== undefined) { - contents.NewerNoncurrentVersions = (0, smithy_client_1.strictParseInt32)(output["NewerNoncurrentVersions"]); + if (output[_NNV] != null) { + contents[_NNV] = (0, smithy_client_1.strictParseInt32)(output[_NNV]); } return contents; }; -const deserializeAws_restXmlNoncurrentVersionTransition = (output, context) => { - const contents = { - NoncurrentDays: undefined, - StorageClass: undefined, - NewerNoncurrentVersions: undefined, - }; - if (output["NoncurrentDays"] !== undefined) { - contents.NoncurrentDays = (0, smithy_client_1.strictParseInt32)(output["NoncurrentDays"]); +const de_NoncurrentVersionTransition = (output, context) => { + const contents = {}; + if (output[_ND] != null) { + contents[_ND] = (0, smithy_client_1.strictParseInt32)(output[_ND]); } - if (output["StorageClass"] !== undefined) { - contents.StorageClass = (0, smithy_client_1.expectString)(output["StorageClass"]); + if (output[_SC] != null) { + contents[_SC] = (0, smithy_client_1.expectString)(output[_SC]); } - if (output["NewerNoncurrentVersions"] !== undefined) { - contents.NewerNoncurrentVersions = (0, smithy_client_1.strictParseInt32)(output["NewerNoncurrentVersions"]); + if (output[_NNV] != null) { + contents[_NNV] = (0, smithy_client_1.strictParseInt32)(output[_NNV]); } return contents; }; -const deserializeAws_restXmlNoncurrentVersionTransitionList = (output, context) => { +const de_NoncurrentVersionTransitionList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlNoncurrentVersionTransition(entry, context); + return de_NoncurrentVersionTransition(entry, context); }); }; -const deserializeAws_restXmlNotificationConfigurationFilter = (output, context) => { - const contents = { - Key: undefined, - }; - if (output["S3Key"] !== undefined) { - contents.Key = deserializeAws_restXmlS3KeyFilter(output["S3Key"], context); +const de_NotificationConfigurationFilter = (output, context) => { + const contents = {}; + if (output[_SKe] != null) { + contents[_K] = de_S3KeyFilter(output[_SKe], context); } return contents; }; -const deserializeAws_restXml_Object = (output, context) => { - const contents = { - Key: undefined, - LastModified: undefined, - ETag: undefined, - ChecksumAlgorithm: undefined, - Size: undefined, - StorageClass: undefined, - Owner: undefined, - }; - if (output["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(output["Key"]); +const de__Object = (output, context) => { + const contents = {}; + if (output[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(output[_K]); } - if (output["LastModified"] !== undefined) { - contents.LastModified = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["LastModified"])); + if (output[_LM] != null) { + contents[_LM] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_LM])); } - if (output["ETag"] !== undefined) { - contents.ETag = (0, smithy_client_1.expectString)(output["ETag"]); + if (output[_ETa] != null) { + contents[_ETa] = (0, smithy_client_1.expectString)(output[_ETa]); } if (output.ChecksumAlgorithm === "") { - contents.ChecksumAlgorithm = []; + contents[_CA] = []; + } + else if (output[_CA] != null) { + contents[_CA] = de_ChecksumAlgorithmList((0, smithy_client_1.getArrayIfSingleItem)(output[_CA]), context); } - else if (output["ChecksumAlgorithm"] !== undefined) { - contents.ChecksumAlgorithm = deserializeAws_restXmlChecksumAlgorithmList((0, smithy_client_1.getArrayIfSingleItem)(output["ChecksumAlgorithm"]), context); + if (output[_Si] != null) { + contents[_Si] = (0, smithy_client_1.strictParseLong)(output[_Si]); } - if (output["Size"] !== undefined) { - contents.Size = (0, smithy_client_1.strictParseLong)(output["Size"]); + if (output[_SC] != null) { + contents[_SC] = (0, smithy_client_1.expectString)(output[_SC]); } - if (output["StorageClass"] !== undefined) { - contents.StorageClass = (0, smithy_client_1.expectString)(output["StorageClass"]); + if (output[_O] != null) { + contents[_O] = de_Owner(output[_O], context); } - if (output["Owner"] !== undefined) { - contents.Owner = deserializeAws_restXmlOwner(output["Owner"], context); + if (output[_RSe] != null) { + contents[_RSe] = de_RestoreStatus(output[_RSe], context); } return contents; }; -const deserializeAws_restXmlObjectList = (output, context) => { +const de_ObjectList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXml_Object(entry, context); + return de__Object(entry, context); }); }; -const deserializeAws_restXmlObjectLockConfiguration = (output, context) => { - const contents = { - ObjectLockEnabled: undefined, - Rule: undefined, - }; - if (output["ObjectLockEnabled"] !== undefined) { - contents.ObjectLockEnabled = (0, smithy_client_1.expectString)(output["ObjectLockEnabled"]); +const de_ObjectLockConfiguration = (output, context) => { + const contents = {}; + if (output[_OLE] != null) { + contents[_OLE] = (0, smithy_client_1.expectString)(output[_OLE]); } - if (output["Rule"] !== undefined) { - contents.Rule = deserializeAws_restXmlObjectLockRule(output["Rule"], context); + if (output[_Ru] != null) { + contents[_Ru] = de_ObjectLockRule(output[_Ru], context); } return contents; }; -const deserializeAws_restXmlObjectLockLegalHold = (output, context) => { - const contents = { - Status: undefined, - }; - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); +const de_ObjectLockLegalHold = (output, context) => { + const contents = {}; + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } return contents; }; -const deserializeAws_restXmlObjectLockRetention = (output, context) => { - const contents = { - Mode: undefined, - RetainUntilDate: undefined, - }; - if (output["Mode"] !== undefined) { - contents.Mode = (0, smithy_client_1.expectString)(output["Mode"]); +const de_ObjectLockRetention = (output, context) => { + const contents = {}; + if (output[_Mo] != null) { + contents[_Mo] = (0, smithy_client_1.expectString)(output[_Mo]); } - if (output["RetainUntilDate"] !== undefined) { - contents.RetainUntilDate = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["RetainUntilDate"])); + if (output[_RUD] != null) { + contents[_RUD] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_RUD])); } return contents; }; -const deserializeAws_restXmlObjectLockRule = (output, context) => { - const contents = { - DefaultRetention: undefined, - }; - if (output["DefaultRetention"] !== undefined) { - contents.DefaultRetention = deserializeAws_restXmlDefaultRetention(output["DefaultRetention"], context); +const de_ObjectLockRule = (output, context) => { + const contents = {}; + if (output[_DRe] != null) { + contents[_DRe] = de_DefaultRetention(output[_DRe], context); } return contents; }; -const deserializeAws_restXmlObjectPart = (output, context) => { - const contents = { - PartNumber: undefined, - Size: undefined, - ChecksumCRC32: undefined, - ChecksumCRC32C: undefined, - ChecksumSHA1: undefined, - ChecksumSHA256: undefined, - }; - if (output["PartNumber"] !== undefined) { - contents.PartNumber = (0, smithy_client_1.strictParseInt32)(output["PartNumber"]); +const de_ObjectPart = (output, context) => { + const contents = {}; + if (output[_PN] != null) { + contents[_PN] = (0, smithy_client_1.strictParseInt32)(output[_PN]); } - if (output["Size"] !== undefined) { - contents.Size = (0, smithy_client_1.strictParseLong)(output["Size"]); + if (output[_Si] != null) { + contents[_Si] = (0, smithy_client_1.strictParseLong)(output[_Si]); } - if (output["ChecksumCRC32"] !== undefined) { - contents.ChecksumCRC32 = (0, smithy_client_1.expectString)(output["ChecksumCRC32"]); + if (output[_CCRC] != null) { + contents[_CCRC] = (0, smithy_client_1.expectString)(output[_CCRC]); } - if (output["ChecksumCRC32C"] !== undefined) { - contents.ChecksumCRC32C = (0, smithy_client_1.expectString)(output["ChecksumCRC32C"]); + if (output[_CCRCC] != null) { + contents[_CCRCC] = (0, smithy_client_1.expectString)(output[_CCRCC]); } - if (output["ChecksumSHA1"] !== undefined) { - contents.ChecksumSHA1 = (0, smithy_client_1.expectString)(output["ChecksumSHA1"]); + if (output[_CSHA] != null) { + contents[_CSHA] = (0, smithy_client_1.expectString)(output[_CSHA]); } - if (output["ChecksumSHA256"] !== undefined) { - contents.ChecksumSHA256 = (0, smithy_client_1.expectString)(output["ChecksumSHA256"]); + if (output[_CSHAh] != null) { + contents[_CSHAh] = (0, smithy_client_1.expectString)(output[_CSHAh]); } return contents; }; -const deserializeAws_restXmlObjectVersion = (output, context) => { - const contents = { - ETag: undefined, - ChecksumAlgorithm: undefined, - Size: undefined, - StorageClass: undefined, - Key: undefined, - VersionId: undefined, - IsLatest: undefined, - LastModified: undefined, - Owner: undefined, - }; - if (output["ETag"] !== undefined) { - contents.ETag = (0, smithy_client_1.expectString)(output["ETag"]); +const de_ObjectVersion = (output, context) => { + const contents = {}; + if (output[_ETa] != null) { + contents[_ETa] = (0, smithy_client_1.expectString)(output[_ETa]); } if (output.ChecksumAlgorithm === "") { - contents.ChecksumAlgorithm = []; + contents[_CA] = []; + } + else if (output[_CA] != null) { + contents[_CA] = de_ChecksumAlgorithmList((0, smithy_client_1.getArrayIfSingleItem)(output[_CA]), context); } - else if (output["ChecksumAlgorithm"] !== undefined) { - contents.ChecksumAlgorithm = deserializeAws_restXmlChecksumAlgorithmList((0, smithy_client_1.getArrayIfSingleItem)(output["ChecksumAlgorithm"]), context); + if (output[_Si] != null) { + contents[_Si] = (0, smithy_client_1.strictParseLong)(output[_Si]); } - if (output["Size"] !== undefined) { - contents.Size = (0, smithy_client_1.strictParseLong)(output["Size"]); + if (output[_SC] != null) { + contents[_SC] = (0, smithy_client_1.expectString)(output[_SC]); } - if (output["StorageClass"] !== undefined) { - contents.StorageClass = (0, smithy_client_1.expectString)(output["StorageClass"]); + if (output[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(output[_K]); } - if (output["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(output["Key"]); + if (output[_VI] != null) { + contents[_VI] = (0, smithy_client_1.expectString)(output[_VI]); } - if (output["VersionId"] !== undefined) { - contents.VersionId = (0, smithy_client_1.expectString)(output["VersionId"]); + if (output[_IL] != null) { + contents[_IL] = (0, smithy_client_1.parseBoolean)(output[_IL]); } - if (output["IsLatest"] !== undefined) { - contents.IsLatest = (0, smithy_client_1.parseBoolean)(output["IsLatest"]); + if (output[_LM] != null) { + contents[_LM] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_LM])); } - if (output["LastModified"] !== undefined) { - contents.LastModified = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["LastModified"])); + if (output[_O] != null) { + contents[_O] = de_Owner(output[_O], context); } - if (output["Owner"] !== undefined) { - contents.Owner = deserializeAws_restXmlOwner(output["Owner"], context); + if (output[_RSe] != null) { + contents[_RSe] = de_RestoreStatus(output[_RSe], context); } return contents; }; -const deserializeAws_restXmlObjectVersionList = (output, context) => { +const de_ObjectVersionList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlObjectVersion(entry, context); + return de_ObjectVersion(entry, context); }); }; -const deserializeAws_restXmlOwner = (output, context) => { - const contents = { - DisplayName: undefined, - ID: undefined, - }; - if (output["DisplayName"] !== undefined) { - contents.DisplayName = (0, smithy_client_1.expectString)(output["DisplayName"]); +const de_Owner = (output, context) => { + const contents = {}; + if (output[_DN] != null) { + contents[_DN] = (0, smithy_client_1.expectString)(output[_DN]); } - if (output["ID"] !== undefined) { - contents.ID = (0, smithy_client_1.expectString)(output["ID"]); + if (output[_ID_] != null) { + contents[_ID_] = (0, smithy_client_1.expectString)(output[_ID_]); } return contents; }; -const deserializeAws_restXmlOwnershipControls = (output, context) => { - const contents = { - Rules: undefined, - }; +const de_OwnershipControls = (output, context) => { + const contents = {}; if (output.Rule === "") { - contents.Rules = []; + contents[_Rul] = []; } - else if (output["Rule"] !== undefined) { - contents.Rules = deserializeAws_restXmlOwnershipControlsRules((0, smithy_client_1.getArrayIfSingleItem)(output["Rule"]), context); + else if (output[_Ru] != null) { + contents[_Rul] = de_OwnershipControlsRules((0, smithy_client_1.getArrayIfSingleItem)(output[_Ru]), context); } return contents; }; -const deserializeAws_restXmlOwnershipControlsRule = (output, context) => { - const contents = { - ObjectOwnership: undefined, - }; - if (output["ObjectOwnership"] !== undefined) { - contents.ObjectOwnership = (0, smithy_client_1.expectString)(output["ObjectOwnership"]); +const de_OwnershipControlsRule = (output, context) => { + const contents = {}; + if (output[_OO] != null) { + contents[_OO] = (0, smithy_client_1.expectString)(output[_OO]); } return contents; }; -const deserializeAws_restXmlOwnershipControlsRules = (output, context) => { +const de_OwnershipControlsRules = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlOwnershipControlsRule(entry, context); + return de_OwnershipControlsRule(entry, context); }); }; -const deserializeAws_restXmlPart = (output, context) => { - const contents = { - PartNumber: undefined, - LastModified: undefined, - ETag: undefined, - Size: undefined, - ChecksumCRC32: undefined, - ChecksumCRC32C: undefined, - ChecksumSHA1: undefined, - ChecksumSHA256: undefined, - }; - if (output["PartNumber"] !== undefined) { - contents.PartNumber = (0, smithy_client_1.strictParseInt32)(output["PartNumber"]); +const de_Part = (output, context) => { + const contents = {}; + if (output[_PN] != null) { + contents[_PN] = (0, smithy_client_1.strictParseInt32)(output[_PN]); } - if (output["LastModified"] !== undefined) { - contents.LastModified = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["LastModified"])); + if (output[_LM] != null) { + contents[_LM] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_LM])); } - if (output["ETag"] !== undefined) { - contents.ETag = (0, smithy_client_1.expectString)(output["ETag"]); + if (output[_ETa] != null) { + contents[_ETa] = (0, smithy_client_1.expectString)(output[_ETa]); } - if (output["Size"] !== undefined) { - contents.Size = (0, smithy_client_1.strictParseLong)(output["Size"]); + if (output[_Si] != null) { + contents[_Si] = (0, smithy_client_1.strictParseLong)(output[_Si]); } - if (output["ChecksumCRC32"] !== undefined) { - contents.ChecksumCRC32 = (0, smithy_client_1.expectString)(output["ChecksumCRC32"]); + if (output[_CCRC] != null) { + contents[_CCRC] = (0, smithy_client_1.expectString)(output[_CCRC]); } - if (output["ChecksumCRC32C"] !== undefined) { - contents.ChecksumCRC32C = (0, smithy_client_1.expectString)(output["ChecksumCRC32C"]); + if (output[_CCRCC] != null) { + contents[_CCRCC] = (0, smithy_client_1.expectString)(output[_CCRCC]); } - if (output["ChecksumSHA1"] !== undefined) { - contents.ChecksumSHA1 = (0, smithy_client_1.expectString)(output["ChecksumSHA1"]); + if (output[_CSHA] != null) { + contents[_CSHA] = (0, smithy_client_1.expectString)(output[_CSHA]); } - if (output["ChecksumSHA256"] !== undefined) { - contents.ChecksumSHA256 = (0, smithy_client_1.expectString)(output["ChecksumSHA256"]); + if (output[_CSHAh] != null) { + contents[_CSHAh] = (0, smithy_client_1.expectString)(output[_CSHAh]); } return contents; }; -const deserializeAws_restXmlParts = (output, context) => { +const de_PartitionedPrefix = (output, context) => { + const contents = {}; + if (output[_PDS] != null) { + contents[_PDS] = (0, smithy_client_1.expectString)(output[_PDS]); + } + return contents; +}; +const de_Parts = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlPart(entry, context); + return de_Part(entry, context); }); }; -const deserializeAws_restXmlPartsList = (output, context) => { +const de_PartsList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlObjectPart(entry, context); + return de_ObjectPart(entry, context); }); }; -const deserializeAws_restXmlPolicyStatus = (output, context) => { - const contents = { - IsPublic: undefined, - }; - if (output["IsPublic"] !== undefined) { - contents.IsPublic = (0, smithy_client_1.parseBoolean)(output["IsPublic"]); +const de_PolicyStatus = (output, context) => { + const contents = {}; + if (output[_IP] != null) { + contents[_IP] = (0, smithy_client_1.parseBoolean)(output[_IP]); } return contents; }; -const deserializeAws_restXmlProgress = (output, context) => { - const contents = { - BytesScanned: undefined, - BytesProcessed: undefined, - BytesReturned: undefined, - }; - if (output["BytesScanned"] !== undefined) { - contents.BytesScanned = (0, smithy_client_1.strictParseLong)(output["BytesScanned"]); +const de_Progress = (output, context) => { + const contents = {}; + if (output[_BS] != null) { + contents[_BS] = (0, smithy_client_1.strictParseLong)(output[_BS]); } - if (output["BytesProcessed"] !== undefined) { - contents.BytesProcessed = (0, smithy_client_1.strictParseLong)(output["BytesProcessed"]); + if (output[_BP] != null) { + contents[_BP] = (0, smithy_client_1.strictParseLong)(output[_BP]); } - if (output["BytesReturned"] !== undefined) { - contents.BytesReturned = (0, smithy_client_1.strictParseLong)(output["BytesReturned"]); + if (output[_BRy] != null) { + contents[_BRy] = (0, smithy_client_1.strictParseLong)(output[_BRy]); } return contents; }; -const deserializeAws_restXmlPublicAccessBlockConfiguration = (output, context) => { - const contents = { - BlockPublicAcls: undefined, - IgnorePublicAcls: undefined, - BlockPublicPolicy: undefined, - RestrictPublicBuckets: undefined, - }; - if (output["BlockPublicAcls"] !== undefined) { - contents.BlockPublicAcls = (0, smithy_client_1.parseBoolean)(output["BlockPublicAcls"]); +const de_PublicAccessBlockConfiguration = (output, context) => { + const contents = {}; + if (output[_BPA] != null) { + contents[_BPA] = (0, smithy_client_1.parseBoolean)(output[_BPA]); } - if (output["IgnorePublicAcls"] !== undefined) { - contents.IgnorePublicAcls = (0, smithy_client_1.parseBoolean)(output["IgnorePublicAcls"]); + if (output[_IPA] != null) { + contents[_IPA] = (0, smithy_client_1.parseBoolean)(output[_IPA]); } - if (output["BlockPublicPolicy"] !== undefined) { - contents.BlockPublicPolicy = (0, smithy_client_1.parseBoolean)(output["BlockPublicPolicy"]); + if (output[_BPP] != null) { + contents[_BPP] = (0, smithy_client_1.parseBoolean)(output[_BPP]); } - if (output["RestrictPublicBuckets"] !== undefined) { - contents.RestrictPublicBuckets = (0, smithy_client_1.parseBoolean)(output["RestrictPublicBuckets"]); + if (output[_RPB] != null) { + contents[_RPB] = (0, smithy_client_1.parseBoolean)(output[_RPB]); } return contents; }; -const deserializeAws_restXmlQueueConfiguration = (output, context) => { - const contents = { - Id: undefined, - QueueArn: undefined, - Events: undefined, - Filter: undefined, - }; - if (output["Id"] !== undefined) { - contents.Id = (0, smithy_client_1.expectString)(output["Id"]); +const de_QueueConfiguration = (output, context) => { + const contents = {}; + if (output[_I] != null) { + contents[_I] = (0, smithy_client_1.expectString)(output[_I]); } - if (output["Queue"] !== undefined) { - contents.QueueArn = (0, smithy_client_1.expectString)(output["Queue"]); + if (output[_Qu] != null) { + contents[_QA] = (0, smithy_client_1.expectString)(output[_Qu]); } if (output.Event === "") { - contents.Events = []; + contents[_Eve] = []; } - else if (output["Event"] !== undefined) { - contents.Events = deserializeAws_restXmlEventList((0, smithy_client_1.getArrayIfSingleItem)(output["Event"]), context); + else if (output[_Ev] != null) { + contents[_Eve] = de_EventList((0, smithy_client_1.getArrayIfSingleItem)(output[_Ev]), context); } - if (output["Filter"] !== undefined) { - contents.Filter = deserializeAws_restXmlNotificationConfigurationFilter(output["Filter"], context); + if (output[_F] != null) { + contents[_F] = de_NotificationConfigurationFilter(output[_F], context); } return contents; }; -const deserializeAws_restXmlQueueConfigurationList = (output, context) => { +const de_QueueConfigurationList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlQueueConfiguration(entry, context); + return de_QueueConfiguration(entry, context); }); }; -const deserializeAws_restXmlRedirect = (output, context) => { - const contents = { - HostName: undefined, - HttpRedirectCode: undefined, - Protocol: undefined, - ReplaceKeyPrefixWith: undefined, - ReplaceKeyWith: undefined, - }; - if (output["HostName"] !== undefined) { - contents.HostName = (0, smithy_client_1.expectString)(output["HostName"]); +const de_Redirect = (output, context) => { + const contents = {}; + if (output[_HN] != null) { + contents[_HN] = (0, smithy_client_1.expectString)(output[_HN]); } - if (output["HttpRedirectCode"] !== undefined) { - contents.HttpRedirectCode = (0, smithy_client_1.expectString)(output["HttpRedirectCode"]); + if (output[_HRC] != null) { + contents[_HRC] = (0, smithy_client_1.expectString)(output[_HRC]); } - if (output["Protocol"] !== undefined) { - contents.Protocol = (0, smithy_client_1.expectString)(output["Protocol"]); + if (output[_Pr] != null) { + contents[_Pr] = (0, smithy_client_1.expectString)(output[_Pr]); } - if (output["ReplaceKeyPrefixWith"] !== undefined) { - contents.ReplaceKeyPrefixWith = (0, smithy_client_1.expectString)(output["ReplaceKeyPrefixWith"]); + if (output[_RKPW] != null) { + contents[_RKPW] = (0, smithy_client_1.expectString)(output[_RKPW]); } - if (output["ReplaceKeyWith"] !== undefined) { - contents.ReplaceKeyWith = (0, smithy_client_1.expectString)(output["ReplaceKeyWith"]); + if (output[_RKW] != null) { + contents[_RKW] = (0, smithy_client_1.expectString)(output[_RKW]); } return contents; }; -const deserializeAws_restXmlRedirectAllRequestsTo = (output, context) => { - const contents = { - HostName: undefined, - Protocol: undefined, - }; - if (output["HostName"] !== undefined) { - contents.HostName = (0, smithy_client_1.expectString)(output["HostName"]); +const de_RedirectAllRequestsTo = (output, context) => { + const contents = {}; + if (output[_HN] != null) { + contents[_HN] = (0, smithy_client_1.expectString)(output[_HN]); } - if (output["Protocol"] !== undefined) { - contents.Protocol = (0, smithy_client_1.expectString)(output["Protocol"]); + if (output[_Pr] != null) { + contents[_Pr] = (0, smithy_client_1.expectString)(output[_Pr]); } return contents; }; -const deserializeAws_restXmlReplicaModifications = (output, context) => { - const contents = { - Status: undefined, - }; - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); +const de_ReplicaModifications = (output, context) => { + const contents = {}; + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } return contents; }; -const deserializeAws_restXmlReplicationConfiguration = (output, context) => { - const contents = { - Role: undefined, - Rules: undefined, - }; - if (output["Role"] !== undefined) { - contents.Role = (0, smithy_client_1.expectString)(output["Role"]); +const de_ReplicationConfiguration = (output, context) => { + const contents = {}; + if (output[_Ro] != null) { + contents[_Ro] = (0, smithy_client_1.expectString)(output[_Ro]); } if (output.Rule === "") { - contents.Rules = []; + contents[_Rul] = []; } - else if (output["Rule"] !== undefined) { - contents.Rules = deserializeAws_restXmlReplicationRules((0, smithy_client_1.getArrayIfSingleItem)(output["Rule"]), context); + else if (output[_Ru] != null) { + contents[_Rul] = de_ReplicationRules((0, smithy_client_1.getArrayIfSingleItem)(output[_Ru]), context); } return contents; }; -const deserializeAws_restXmlReplicationRule = (output, context) => { - const contents = { - ID: undefined, - Priority: undefined, - Prefix: undefined, - Filter: undefined, - Status: undefined, - SourceSelectionCriteria: undefined, - ExistingObjectReplication: undefined, - Destination: undefined, - DeleteMarkerReplication: undefined, - }; - if (output["ID"] !== undefined) { - contents.ID = (0, smithy_client_1.expectString)(output["ID"]); +const de_ReplicationRule = (output, context) => { + const contents = {}; + if (output[_ID_] != null) { + contents[_ID_] = (0, smithy_client_1.expectString)(output[_ID_]); } - if (output["Priority"] !== undefined) { - contents.Priority = (0, smithy_client_1.strictParseInt32)(output["Priority"]); + if (output[_Pri] != null) { + contents[_Pri] = (0, smithy_client_1.strictParseInt32)(output[_Pri]); } - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } if (output.Filter === "") { } - else if (output["Filter"] !== undefined) { - contents.Filter = deserializeAws_restXmlReplicationRuleFilter((0, smithy_client_1.expectUnion)(output["Filter"]), context); + else if (output[_F] != null) { + contents[_F] = de_ReplicationRuleFilter((0, smithy_client_1.expectUnion)(output[_F]), context); } - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } - if (output["SourceSelectionCriteria"] !== undefined) { - contents.SourceSelectionCriteria = deserializeAws_restXmlSourceSelectionCriteria(output["SourceSelectionCriteria"], context); + if (output[_SSC] != null) { + contents[_SSC] = de_SourceSelectionCriteria(output[_SSC], context); } - if (output["ExistingObjectReplication"] !== undefined) { - contents.ExistingObjectReplication = deserializeAws_restXmlExistingObjectReplication(output["ExistingObjectReplication"], context); + if (output[_EOR] != null) { + contents[_EOR] = de_ExistingObjectReplication(output[_EOR], context); } - if (output["Destination"] !== undefined) { - contents.Destination = deserializeAws_restXmlDestination(output["Destination"], context); + if (output[_Des] != null) { + contents[_Des] = de_Destination(output[_Des], context); } - if (output["DeleteMarkerReplication"] !== undefined) { - contents.DeleteMarkerReplication = deserializeAws_restXmlDeleteMarkerReplication(output["DeleteMarkerReplication"], context); + if (output[_DMR] != null) { + contents[_DMR] = de_DeleteMarkerReplication(output[_DMR], context); } return contents; }; -const deserializeAws_restXmlReplicationRuleAndOperator = (output, context) => { - const contents = { - Prefix: undefined, - Tags: undefined, - }; - if (output["Prefix"] !== undefined) { - contents.Prefix = (0, smithy_client_1.expectString)(output["Prefix"]); +const de_ReplicationRuleAndOperator = (output, context) => { + const contents = {}; + if (output[_P] != null) { + contents[_P] = (0, smithy_client_1.expectString)(output[_P]); } if (output.Tag === "") { - contents.Tags = []; + contents[_Tag] = []; } - else if (output["Tag"] !== undefined) { - contents.Tags = deserializeAws_restXmlTagSet((0, smithy_client_1.getArrayIfSingleItem)(output["Tag"]), context); + else if (output[_Ta] != null) { + contents[_Tag] = de_TagSet((0, smithy_client_1.getArrayIfSingleItem)(output[_Ta]), context); } return contents; }; -const deserializeAws_restXmlReplicationRuleFilter = (output, context) => { - if (output["Prefix"] !== undefined) { +const de_ReplicationRuleFilter = (output, context) => { + if (output[_P] != null) { return { - Prefix: (0, smithy_client_1.expectString)(output["Prefix"]), + Prefix: (0, smithy_client_1.expectString)(output[_P]), }; } - if (output["Tag"] !== undefined) { + if (output[_Ta] != null) { return { - Tag: deserializeAws_restXmlTag(output["Tag"], context), + Tag: de_Tag(output[_Ta], context), }; } - if (output["And"] !== undefined) { + if (output[_A] != null) { return { - And: deserializeAws_restXmlReplicationRuleAndOperator(output["And"], context), + And: de_ReplicationRuleAndOperator(output[_A], context), }; } return { $unknown: Object.entries(output)[0] }; }; -const deserializeAws_restXmlReplicationRules = (output, context) => { +const de_ReplicationRules = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlReplicationRule(entry, context); + return de_ReplicationRule(entry, context); }); }; -const deserializeAws_restXmlReplicationTime = (output, context) => { - const contents = { - Status: undefined, - Time: undefined, - }; - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); +const de_ReplicationTime = (output, context) => { + const contents = {}; + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } - if (output["Time"] !== undefined) { - contents.Time = deserializeAws_restXmlReplicationTimeValue(output["Time"], context); + if (output[_Tim] != null) { + contents[_Tim] = de_ReplicationTimeValue(output[_Tim], context); } return contents; }; -const deserializeAws_restXmlReplicationTimeValue = (output, context) => { - const contents = { - Minutes: undefined, - }; - if (output["Minutes"] !== undefined) { - contents.Minutes = (0, smithy_client_1.strictParseInt32)(output["Minutes"]); +const de_ReplicationTimeValue = (output, context) => { + const contents = {}; + if (output[_Mi] != null) { + contents[_Mi] = (0, smithy_client_1.strictParseInt32)(output[_Mi]); } return contents; }; -const deserializeAws_restXmlRoutingRule = (output, context) => { - const contents = { - Condition: undefined, - Redirect: undefined, - }; - if (output["Condition"] !== undefined) { - contents.Condition = deserializeAws_restXmlCondition(output["Condition"], context); +const de_RestoreStatus = (output, context) => { + const contents = {}; + if (output[_IRIP] != null) { + contents[_IRIP] = (0, smithy_client_1.parseBoolean)(output[_IRIP]); } - if (output["Redirect"] !== undefined) { - contents.Redirect = deserializeAws_restXmlRedirect(output["Redirect"], context); + if (output[_RED] != null) { + contents[_RED] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_RED])); } return contents; }; -const deserializeAws_restXmlRoutingRules = (output, context) => { +const de_RoutingRule = (output, context) => { + const contents = {}; + if (output[_Con] != null) { + contents[_Con] = de_Condition(output[_Con], context); + } + if (output[_Red] != null) { + contents[_Red] = de_Redirect(output[_Red], context); + } + return contents; +}; +const de_RoutingRules = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlRoutingRule(entry, context); + return de_RoutingRule(entry, context); }); }; -const deserializeAws_restXmlS3KeyFilter = (output, context) => { - const contents = { - FilterRules: undefined, - }; +const de_S3KeyFilter = (output, context) => { + const contents = {}; if (output.FilterRule === "") { - contents.FilterRules = []; + contents[_FRi] = []; } - else if (output["FilterRule"] !== undefined) { - contents.FilterRules = deserializeAws_restXmlFilterRuleList((0, smithy_client_1.getArrayIfSingleItem)(output["FilterRule"]), context); + else if (output[_FR] != null) { + contents[_FRi] = de_FilterRuleList((0, smithy_client_1.getArrayIfSingleItem)(output[_FR]), context); } return contents; }; -const deserializeAws_restXmlServerSideEncryptionByDefault = (output, context) => { - const contents = { - SSEAlgorithm: undefined, - KMSMasterKeyID: undefined, - }; - if (output["SSEAlgorithm"] !== undefined) { - contents.SSEAlgorithm = (0, smithy_client_1.expectString)(output["SSEAlgorithm"]); +const de_ServerSideEncryptionByDefault = (output, context) => { + const contents = {}; + if (output[_SSEA] != null) { + contents[_SSEA] = (0, smithy_client_1.expectString)(output[_SSEA]); } - if (output["KMSMasterKeyID"] !== undefined) { - contents.KMSMasterKeyID = (0, smithy_client_1.expectString)(output["KMSMasterKeyID"]); + if (output[_KMSMKID] != null) { + contents[_KMSMKID] = (0, smithy_client_1.expectString)(output[_KMSMKID]); } return contents; }; -const deserializeAws_restXmlServerSideEncryptionConfiguration = (output, context) => { - const contents = { - Rules: undefined, - }; +const de_ServerSideEncryptionConfiguration = (output, context) => { + const contents = {}; if (output.Rule === "") { - contents.Rules = []; + contents[_Rul] = []; } - else if (output["Rule"] !== undefined) { - contents.Rules = deserializeAws_restXmlServerSideEncryptionRules((0, smithy_client_1.getArrayIfSingleItem)(output["Rule"]), context); + else if (output[_Ru] != null) { + contents[_Rul] = de_ServerSideEncryptionRules((0, smithy_client_1.getArrayIfSingleItem)(output[_Ru]), context); } return contents; }; -const deserializeAws_restXmlServerSideEncryptionRule = (output, context) => { - const contents = { - ApplyServerSideEncryptionByDefault: undefined, - BucketKeyEnabled: undefined, - }; - if (output["ApplyServerSideEncryptionByDefault"] !== undefined) { - contents.ApplyServerSideEncryptionByDefault = deserializeAws_restXmlServerSideEncryptionByDefault(output["ApplyServerSideEncryptionByDefault"], context); +const de_ServerSideEncryptionRule = (output, context) => { + const contents = {}; + if (output[_ASSEBD] != null) { + contents[_ASSEBD] = de_ServerSideEncryptionByDefault(output[_ASSEBD], context); } - if (output["BucketKeyEnabled"] !== undefined) { - contents.BucketKeyEnabled = (0, smithy_client_1.parseBoolean)(output["BucketKeyEnabled"]); + if (output[_BKE] != null) { + contents[_BKE] = (0, smithy_client_1.parseBoolean)(output[_BKE]); } return contents; }; -const deserializeAws_restXmlServerSideEncryptionRules = (output, context) => { +const de_ServerSideEncryptionRules = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlServerSideEncryptionRule(entry, context); + return de_ServerSideEncryptionRule(entry, context); }); }; -const deserializeAws_restXmlSourceSelectionCriteria = (output, context) => { - const contents = { - SseKmsEncryptedObjects: undefined, - ReplicaModifications: undefined, - }; - if (output["SseKmsEncryptedObjects"] !== undefined) { - contents.SseKmsEncryptedObjects = deserializeAws_restXmlSseKmsEncryptedObjects(output["SseKmsEncryptedObjects"], context); +const de_SessionCredentials = (output, context) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = (0, smithy_client_1.expectString)(output[_AKI]); } - if (output["ReplicaModifications"] !== undefined) { - contents.ReplicaModifications = deserializeAws_restXmlReplicaModifications(output["ReplicaModifications"], context); + if (output[_SAK] != null) { + contents[_SAK] = (0, smithy_client_1.expectString)(output[_SAK]); + } + if (output[_ST] != null) { + contents[_ST] = (0, smithy_client_1.expectString)(output[_ST]); + } + if (output[_Exp] != null) { + contents[_Exp] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_Exp])); } return contents; }; -const deserializeAws_restXmlSSEKMS = (output, context) => { - const contents = { - KeyId: undefined, - }; - if (output["KeyId"] !== undefined) { - contents.KeyId = (0, smithy_client_1.expectString)(output["KeyId"]); +const de_SimplePrefix = (output, context) => { + const contents = {}; + return contents; +}; +const de_SourceSelectionCriteria = (output, context) => { + const contents = {}; + if (output[_SKEO] != null) { + contents[_SKEO] = de_SseKmsEncryptedObjects(output[_SKEO], context); + } + if (output[_RM] != null) { + contents[_RM] = de_ReplicaModifications(output[_RM], context); } return contents; }; -const deserializeAws_restXmlSseKmsEncryptedObjects = (output, context) => { - const contents = { - Status: undefined, - }; - if (output["Status"] !== undefined) { - contents.Status = (0, smithy_client_1.expectString)(output["Status"]); +const de_SSEKMS = (output, context) => { + const contents = {}; + if (output[_KI] != null) { + contents[_KI] = (0, smithy_client_1.expectString)(output[_KI]); } return contents; }; -const deserializeAws_restXmlSSES3 = (output, context) => { +const de_SseKmsEncryptedObjects = (output, context) => { const contents = {}; + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); + } return contents; }; -const deserializeAws_restXmlStats = (output, context) => { - const contents = { - BytesScanned: undefined, - BytesProcessed: undefined, - BytesReturned: undefined, - }; - if (output["BytesScanned"] !== undefined) { - contents.BytesScanned = (0, smithy_client_1.strictParseLong)(output["BytesScanned"]); +const de_SSES3 = (output, context) => { + const contents = {}; + return contents; +}; +const de_Stats = (output, context) => { + const contents = {}; + if (output[_BS] != null) { + contents[_BS] = (0, smithy_client_1.strictParseLong)(output[_BS]); } - if (output["BytesProcessed"] !== undefined) { - contents.BytesProcessed = (0, smithy_client_1.strictParseLong)(output["BytesProcessed"]); + if (output[_BP] != null) { + contents[_BP] = (0, smithy_client_1.strictParseLong)(output[_BP]); } - if (output["BytesReturned"] !== undefined) { - contents.BytesReturned = (0, smithy_client_1.strictParseLong)(output["BytesReturned"]); + if (output[_BRy] != null) { + contents[_BRy] = (0, smithy_client_1.strictParseLong)(output[_BRy]); } return contents; }; -const deserializeAws_restXmlStorageClassAnalysis = (output, context) => { - const contents = { - DataExport: undefined, - }; - if (output["DataExport"] !== undefined) { - contents.DataExport = deserializeAws_restXmlStorageClassAnalysisDataExport(output["DataExport"], context); +const de_StorageClassAnalysis = (output, context) => { + const contents = {}; + if (output[_DE] != null) { + contents[_DE] = de_StorageClassAnalysisDataExport(output[_DE], context); } return contents; }; -const deserializeAws_restXmlStorageClassAnalysisDataExport = (output, context) => { - const contents = { - OutputSchemaVersion: undefined, - Destination: undefined, - }; - if (output["OutputSchemaVersion"] !== undefined) { - contents.OutputSchemaVersion = (0, smithy_client_1.expectString)(output["OutputSchemaVersion"]); +const de_StorageClassAnalysisDataExport = (output, context) => { + const contents = {}; + if (output[_OSV] != null) { + contents[_OSV] = (0, smithy_client_1.expectString)(output[_OSV]); } - if (output["Destination"] !== undefined) { - contents.Destination = deserializeAws_restXmlAnalyticsExportDestination(output["Destination"], context); + if (output[_Des] != null) { + contents[_Des] = de_AnalyticsExportDestination(output[_Des], context); } return contents; }; -const deserializeAws_restXmlTag = (output, context) => { - const contents = { - Key: undefined, - Value: undefined, - }; - if (output["Key"] !== undefined) { - contents.Key = (0, smithy_client_1.expectString)(output["Key"]); +const de_Tag = (output, context) => { + const contents = {}; + if (output[_K] != null) { + contents[_K] = (0, smithy_client_1.expectString)(output[_K]); } - if (output["Value"] !== undefined) { - contents.Value = (0, smithy_client_1.expectString)(output["Value"]); + if (output[_Va] != null) { + contents[_Va] = (0, smithy_client_1.expectString)(output[_Va]); } return contents; }; -const deserializeAws_restXmlTagSet = (output, context) => { +const de_TagSet = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlTag(entry, context); + return de_Tag(entry, context); }); }; -const deserializeAws_restXmlTargetGrant = (output, context) => { - const contents = { - Grantee: undefined, - Permission: undefined, - }; - if (output["Grantee"] !== undefined) { - contents.Grantee = deserializeAws_restXmlGrantee(output["Grantee"], context); +const de_TargetGrant = (output, context) => { + const contents = {}; + if (output[_Gra] != null) { + contents[_Gra] = de_Grantee(output[_Gra], context); } - if (output["Permission"] !== undefined) { - contents.Permission = (0, smithy_client_1.expectString)(output["Permission"]); + if (output[_Pe] != null) { + contents[_Pe] = (0, smithy_client_1.expectString)(output[_Pe]); } return contents; }; -const deserializeAws_restXmlTargetGrants = (output, context) => { +const de_TargetGrants = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlTargetGrant(entry, context); + return de_TargetGrant(entry, context); }); }; -const deserializeAws_restXmlTiering = (output, context) => { - const contents = { - Days: undefined, - AccessTier: undefined, - }; - if (output["Days"] !== undefined) { - contents.Days = (0, smithy_client_1.strictParseInt32)(output["Days"]); +const de_TargetObjectKeyFormat = (output, context) => { + const contents = {}; + if (output[_SPi] != null) { + contents[_SPi] = de_SimplePrefix(output[_SPi], context); } - if (output["AccessTier"] !== undefined) { - contents.AccessTier = (0, smithy_client_1.expectString)(output["AccessTier"]); + if (output[_PP] != null) { + contents[_PP] = de_PartitionedPrefix(output[_PP], context); } return contents; }; -const deserializeAws_restXmlTieringList = (output, context) => { +const de_Tiering = (output, context) => { + const contents = {}; + if (output[_Da] != null) { + contents[_Da] = (0, smithy_client_1.strictParseInt32)(output[_Da]); + } + if (output[_AT] != null) { + contents[_AT] = (0, smithy_client_1.expectString)(output[_AT]); + } + return contents; +}; +const de_TieringList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlTiering(entry, context); + return de_Tiering(entry, context); }); }; -const deserializeAws_restXmlTopicConfiguration = (output, context) => { - const contents = { - Id: undefined, - TopicArn: undefined, - Events: undefined, - Filter: undefined, - }; - if (output["Id"] !== undefined) { - contents.Id = (0, smithy_client_1.expectString)(output["Id"]); +const de_TopicConfiguration = (output, context) => { + const contents = {}; + if (output[_I] != null) { + contents[_I] = (0, smithy_client_1.expectString)(output[_I]); } - if (output["Topic"] !== undefined) { - contents.TopicArn = (0, smithy_client_1.expectString)(output["Topic"]); + if (output[_Top] != null) { + contents[_TA] = (0, smithy_client_1.expectString)(output[_Top]); } if (output.Event === "") { - contents.Events = []; + contents[_Eve] = []; } - else if (output["Event"] !== undefined) { - contents.Events = deserializeAws_restXmlEventList((0, smithy_client_1.getArrayIfSingleItem)(output["Event"]), context); + else if (output[_Ev] != null) { + contents[_Eve] = de_EventList((0, smithy_client_1.getArrayIfSingleItem)(output[_Ev]), context); } - if (output["Filter"] !== undefined) { - contents.Filter = deserializeAws_restXmlNotificationConfigurationFilter(output["Filter"], context); + if (output[_F] != null) { + contents[_F] = de_NotificationConfigurationFilter(output[_F], context); } return contents; }; -const deserializeAws_restXmlTopicConfigurationList = (output, context) => { +const de_TopicConfigurationList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlTopicConfiguration(entry, context); + return de_TopicConfiguration(entry, context); }); }; -const deserializeAws_restXmlTransition = (output, context) => { - const contents = { - Date: undefined, - Days: undefined, - StorageClass: undefined, - }; - if (output["Date"] !== undefined) { - contents.Date = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["Date"])); +const de_Transition = (output, context) => { + const contents = {}; + if (output[_Dat] != null) { + contents[_Dat] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_Dat])); } - if (output["Days"] !== undefined) { - contents.Days = (0, smithy_client_1.strictParseInt32)(output["Days"]); + if (output[_Da] != null) { + contents[_Da] = (0, smithy_client_1.strictParseInt32)(output[_Da]); } - if (output["StorageClass"] !== undefined) { - contents.StorageClass = (0, smithy_client_1.expectString)(output["StorageClass"]); + if (output[_SC] != null) { + contents[_SC] = (0, smithy_client_1.expectString)(output[_SC]); } return contents; }; -const deserializeAws_restXmlTransitionList = (output, context) => { +const de_TransitionList = (output, context) => { return (output || []) .filter((e) => e != null) .map((entry) => { - return deserializeAws_restXmlTransition(entry, context); + return de_Transition(entry, context); }); }; -const deserializeMetadata = (output) => { - var _a; - return ({ - httpStatusCode: output.statusCode, - requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"], - }); -}; -const collectBody = (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return Promise.resolve(streamBody); - } - return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); -}; -const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); +const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); const isSerializableHeaderValue = (value) => value !== undefined && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); +const _A = "And"; +const _AAO = "AnalyticsAndOperator"; +const _AC = "AnalyticsConfiguration"; +const _ACL = "ACL"; +const _ACLc = "AccessControlList"; +const _ACLn = "AnalyticsConfigurationList"; +const _ACP = "AccessControlPolicy"; +const _ACT = "AccessControlTranslation"; +const _ACc = "AccelerateConfiguration"; +const _AD = "AbortDate"; +const _AED = "AnalyticsExportDestination"; +const _AF = "AnalyticsFilter"; +const _AH = "AllowedHeader"; +const _AHl = "AllowedHeaders"; +const _AI = "AnalyticsId"; +const _AIMU = "AbortIncompleteMultipartUpload"; +const _AIc = "AccountId"; +const _AKI = "AccessKeyId"; +const _AM = "AllowedMethod"; +const _AMl = "AllowedMethods"; +const _AO = "AllowedOrigin"; +const _AOl = "AllowedOrigins"; +const _APA = "AccessPointAlias"; +const _APAc = "AccessPointArn"; +const _AQRD = "AllowQuotedRecordDelimiter"; +const _AR = "AcceptRanges"; +const _ARI = "AbortRuleId"; +const _AS = "ArchiveStatus"; +const _ASBD = "AnalyticsS3BucketDestination"; +const _ASEFF = "AnalyticsS3ExportFileFormat"; +const _ASSEBD = "ApplyServerSideEncryptionByDefault"; +const _AT = "AccessTier"; +const _Ac = "Account"; +const _B = "Bucket"; +const _BAI = "BucketAccountId"; +const _BAS = "BucketAccelerateStatus"; +const _BGR = "BypassGovernanceRetention"; +const _BI = "BucketInfo"; +const _BKE = "BucketKeyEnabled"; +const _BLC = "BucketLifecycleConfiguration"; +const _BLCu = "BucketLocationConstraint"; +const _BLN = "BucketLocationName"; +const _BLP = "BucketLogsPermission"; +const _BLS = "BucketLoggingStatus"; +const _BLT = "BucketLocationType"; +const _BN = "BucketName"; +const _BP = "BytesProcessed"; +const _BPA = "BlockPublicAcls"; +const _BPP = "BlockPublicPolicy"; +const _BR = "BucketRegion"; +const _BRy = "BytesReturned"; +const _BS = "BytesScanned"; +const _BT = "BucketType"; +const _BVS = "BucketVersioningStatus"; +const _Bu = "Buckets"; +const _C = "Credentials"; +const _CA = "ChecksumAlgorithm"; +const _CACL = "CannedACL"; +const _CBC = "CreateBucketConfiguration"; +const _CC = "CacheControl"; +const _CCRC = "ChecksumCRC32"; +const _CCRCC = "ChecksumCRC32C"; +const _CD = "ContentDisposition"; +const _CDr = "CreationDate"; +const _CE = "ContentEncoding"; +const _CF = "CloudFunction"; +const _CFC = "CloudFunctionConfiguration"; +const _CL = "ContentLanguage"; +const _CLo = "ContentLength"; +const _CM = "ChecksumMode"; +const _CMD = "ContentMD5"; +const _CMU = "CompletedMultipartUpload"; +const _CORSC = "CORSConfiguration"; +const _CORSR = "CORSRule"; +const _CORSRu = "CORSRules"; +const _CP = "CommonPrefixes"; +const _CPo = "CompletedPart"; +const _CR = "ContentRange"; +const _CRSBA = "ConfirmRemoveSelfBucketAccess"; +const _CS = "CopySource"; +const _CSHA = "ChecksumSHA1"; +const _CSHAh = "ChecksumSHA256"; +const _CSIM = "CopySourceIfMatch"; +const _CSIMS = "CopySourceIfModifiedSince"; +const _CSINM = "CopySourceIfNoneMatch"; +const _CSIUS = "CopySourceIfUnmodifiedSince"; +const _CSR = "CopySourceRange"; +const _CSSSECA = "CopySourceSSECustomerAlgorithm"; +const _CSSSECK = "CopySourceSSECustomerKey"; +const _CSSSECKMD = "CopySourceSSECustomerKeyMD5"; +const _CSV = "CSV"; +const _CSVI = "CopySourceVersionId"; +const _CSVIn = "CSVInput"; +const _CSVO = "CSVOutput"; +const _CT = "ContentType"; +const _CTo = "ContinuationToken"; +const _CTom = "CompressionType"; +const _Ch = "Checksum"; +const _Co = "Contents"; +const _Cod = "Code"; +const _Com = "Comments"; +const _Con = "Condition"; +const _D = "Delimiter"; +const _DAI = "DaysAfterInitiation"; +const _DE = "DataExport"; +const _DM = "DeleteMarker"; +const _DMR = "DeleteMarkerReplication"; +const _DMRS = "DeleteMarkerReplicationStatus"; +const _DMVI = "DeleteMarkerVersionId"; +const _DMe = "DeleteMarkers"; +const _DN = "DisplayName"; +const _DR = "DataRedundancy"; +const _DRe = "DefaultRetention"; +const _Da = "Days"; +const _Dat = "Date"; +const _De = "Deleted"; +const _Del = "Delete"; +const _Des = "Destination"; +const _Desc = "Description"; +const _E = "Expires"; +const _EA = "EmailAddress"; +const _EBC = "EventBridgeConfiguration"; +const _EBO = "ExpectedBucketOwner"; +const _EC = "ErrorCode"; +const _ECn = "EncryptionConfiguration"; +const _ED = "ErrorDocument"; +const _EH = "ExposeHeaders"; +const _EHx = "ExposeHeader"; +const _EM = "ErrorMessage"; +const _EODM = "ExpiredObjectDeleteMarker"; +const _EOR = "ExistingObjectReplication"; +const _EORS = "ExistingObjectReplicationStatus"; +const _ERP = "EnableRequestProgress"; +const _ES = "ExpirationStatus"; +const _ESBO = "ExpectedSourceBucketOwner"; +const _ET = "EncodingType"; +const _ETa = "ETag"; +const _ETn = "EncryptionType"; +const _ETv = "EventThreshold"; +const _ETx = "ExpressionType"; +const _En = "Encryption"; +const _Ena = "Enabled"; +const _End = "End"; +const _Er = "Error"; +const _Err = "Errors"; +const _Ev = "Event"; +const _Eve = "Events"; +const _Ex = "Expression"; +const _Exp = "Expiration"; +const _F = "Filter"; +const _FD = "FieldDelimiter"; +const _FHI = "FileHeaderInfo"; +const _FO = "FetchOwner"; +const _FR = "FilterRule"; +const _FRN = "FilterRuleName"; +const _FRV = "FilterRuleValue"; +const _FRi = "FilterRules"; +const _Fi = "Field"; +const _Fo = "Format"; +const _Fr = "Frequency"; +const _G = "Grant"; +const _GFC = "GrantFullControl"; +const _GJP = "GlacierJobParameters"; +const _GR = "GrantRead"; +const _GRACP = "GrantReadACP"; +const _GW = "GrantWrite"; +const _GWACP = "GrantWriteACP"; +const _Gr = "Grants"; +const _Gra = "Grantee"; +const _HECRE = "HttpErrorCodeReturnedEquals"; +const _HN = "HostName"; +const _HRC = "HttpRedirectCode"; +const _I = "Id"; +const _IC = "InventoryConfiguration"; +const _ICL = "InventoryConfigurationList"; +const _ID = "IndexDocument"; +const _ID_ = "ID"; +const _IDn = "InventoryDestination"; +const _IE = "IsEnabled"; +const _IEn = "InventoryEncryption"; +const _IF = "InventoryFilter"; +const _IFn = "InventoryFormat"; +const _IFnv = "InventoryFrequency"; +const _II = "InventoryId"; +const _IIOV = "InventoryIncludedObjectVersions"; +const _IL = "IsLatest"; +const _IM = "IfMatch"; +const _IMS = "IfModifiedSince"; +const _INM = "IfNoneMatch"; +const _IOF = "InventoryOptionalField"; +const _IOV = "IncludedObjectVersions"; +const _IP = "IsPublic"; +const _IPA = "IgnorePublicAcls"; +const _IRIP = "IsRestoreInProgress"; +const _IS = "InputSerialization"; +const _ISBD = "InventoryS3BucketDestination"; +const _ISn = "InventorySchedule"; +const _IT = "IsTruncated"; +const _ITAO = "IntelligentTieringAndOperator"; +const _ITAT = "IntelligentTieringAccessTier"; +const _ITC = "IntelligentTieringConfiguration"; +const _ITCL = "IntelligentTieringConfigurationList"; +const _ITD = "IntelligentTieringDays"; +const _ITF = "IntelligentTieringFilter"; +const _ITI = "IntelligentTieringId"; +const _ITS = "IntelligentTieringStatus"; +const _IUS = "IfUnmodifiedSince"; +const _In = "Initiator"; +const _Ini = "Initiated"; +const _JSON = "JSON"; +const _JSONI = "JSONInput"; +const _JSONO = "JSONOutput"; +const _JSONT = "JSONType"; +const _K = "Key"; +const _KC = "KeyCount"; +const _KI = "KeyId"; +const _KM = "KeyMarker"; +const _KMSC = "KMSContext"; +const _KMSKI = "KMSKeyId"; +const _KMSMKID = "KMSMasterKeyID"; +const _KPE = "KeyPrefixEquals"; +const _L = "Location"; +const _LC = "LocationConstraint"; +const _LE = "LoggingEnabled"; +const _LEi = "LifecycleExpiration"; +const _LFA = "LambdaFunctionArn"; +const _LFC = "LambdaFunctionConfigurations"; +const _LFCa = "LambdaFunctionConfiguration"; +const _LI = "LocationInfo"; +const _LM = "LastModified"; +const _LNAS = "LocationNameAsString"; +const _LP = "LocationPrefix"; +const _LR = "LifecycleRule"; +const _LRAO = "LifecycleRuleAndOperator"; +const _LRF = "LifecycleRuleFilter"; +const _LT = "LocationType"; +const _M = "Marker"; +const _MAO = "MetricsAndOperator"; +const _MAS = "MaxAgeSeconds"; +const _MC = "MetricsConfiguration"; +const _MCL = "MetricsConfigurationList"; +const _MD = "MetadataDirective"; +const _MDB = "MaxDirectoryBuckets"; +const _MDf = "MfaDelete"; +const _ME = "MetadataEntry"; +const _MF = "MetricsFilter"; +const _MFA = "MFA"; +const _MFAD = "MFADelete"; +const _MI = "MetricsId"; +const _MK = "MaxKeys"; +const _MKe = "MetadataKey"; +const _MM = "MissingMeta"; +const _MP = "MaxParts"; +const _MS = "MetricsStatus"; +const _MU = "MaxUploads"; +const _MV = "MetadataValue"; +const _Me = "Metrics"; +const _Mes = "Message"; +const _Mi = "Minutes"; +const _Mo = "Mode"; +const _N = "Name"; +const _NC = "NotificationConfiguration"; +const _NCF = "NotificationConfigurationFilter"; +const _NCT = "NextContinuationToken"; +const _ND = "NoncurrentDays"; +const _NI = "NotificationId"; +const _NKM = "NextKeyMarker"; +const _NM = "NextMarker"; +const _NNV = "NewerNoncurrentVersions"; +const _NPNM = "NextPartNumberMarker"; +const _NUIM = "NextUploadIdMarker"; +const _NVE = "NoncurrentVersionExpiration"; +const _NVIM = "NextVersionIdMarker"; +const _NVT = "NoncurrentVersionTransitions"; +const _NVTo = "NoncurrentVersionTransition"; +const _O = "Owner"; +const _OA = "ObjectAttributes"; +const _OC = "OwnershipControls"; +const _OCACL = "ObjectCannedACL"; +const _OCR = "OwnershipControlsRule"; +const _OF = "OptionalFields"; +const _OI = "ObjectIdentifier"; +const _OK = "ObjectKey"; +const _OL = "OutputLocation"; +const _OLC = "ObjectLockConfiguration"; +const _OLE = "ObjectLockEnabled"; +const _OLEFB = "ObjectLockEnabledForBucket"; +const _OLLH = "ObjectLockLegalHold"; +const _OLLHS = "ObjectLockLegalHoldStatus"; +const _OLM = "ObjectLockMode"; +const _OLR = "ObjectLockRetention"; +const _OLRM = "ObjectLockRetentionMode"; +const _OLRUD = "ObjectLockRetainUntilDate"; +const _OLRb = "ObjectLockRule"; +const _OO = "ObjectOwnership"; +const _OOA = "OptionalObjectAttributes"; +const _OOw = "OwnerOverride"; +const _OP = "ObjectParts"; +const _OS = "OutputSerialization"; +const _OSGT = "ObjectSizeGreaterThan"; +const _OSGTB = "ObjectSizeGreaterThanBytes"; +const _OSLT = "ObjectSizeLessThan"; +const _OSLTB = "ObjectSizeLessThanBytes"; +const _OSV = "OutputSchemaVersion"; +const _OSb = "ObjectSize"; +const _OVI = "ObjectVersionId"; +const _Ob = "Objects"; +const _P = "Prefix"; +const _PABC = "PublicAccessBlockConfiguration"; +const _PC = "PartsCount"; +const _PDS = "PartitionDateSource"; +const _PI = "ParquetInput"; +const _PN = "PartNumber"; +const _PNM = "PartNumberMarker"; +const _PP = "PartitionedPrefix"; +const _Pa = "Payer"; +const _Par = "Part"; +const _Parq = "Parquet"; +const _Part = "Parts"; +const _Pe = "Permission"; +const _Pr = "Protocol"; +const _Pri = "Priority"; +const _Q = "Quiet"; +const _QA = "QueueArn"; +const _QC = "QueueConfiguration"; +const _QCu = "QueueConfigurations"; +const _QCuo = "QuoteCharacter"; +const _QEC = "QuoteEscapeCharacter"; +const _QF = "QuoteFields"; +const _Qu = "Queue"; +const _R = "Range"; +const _RART = "RedirectAllRequestsTo"; +const _RC = "RequestCharged"; +const _RCC = "ResponseCacheControl"; +const _RCD = "ResponseContentDisposition"; +const _RCE = "ResponseContentEncoding"; +const _RCL = "ResponseContentLanguage"; +const _RCT = "ResponseContentType"; +const _RCe = "ReplicationConfiguration"; +const _RD = "RecordDelimiter"; +const _RE = "ResponseExpires"; +const _RED = "RestoreExpiryDate"; +const _RKKID = "ReplicaKmsKeyID"; +const _RKPW = "ReplaceKeyPrefixWith"; +const _RKW = "ReplaceKeyWith"; +const _RM = "ReplicaModifications"; +const _RMS = "ReplicaModificationsStatus"; +const _ROP = "RestoreOutputPath"; +const _RP = "RequestPayer"; +const _RPB = "RestrictPublicBuckets"; +const _RPC = "RequestPaymentConfiguration"; +const _RPe = "RequestProgress"; +const _RR = "RequestRoute"; +const _RRAO = "ReplicationRuleAndOperator"; +const _RRF = "ReplicationRuleFilter"; +const _RRS = "ReplicationRuleStatus"; +const _RRT = "RestoreRequestType"; +const _RRe = "ReplicationRule"; +const _RRes = "RestoreRequest"; +const _RRo = "RoutingRules"; +const _RRou = "RoutingRule"; +const _RS = "ReplicationStatus"; +const _RSe = "RestoreStatus"; +const _RT = "RequestToken"; +const _RTS = "ReplicationTimeStatus"; +const _RTV = "ReplicationTimeValue"; +const _RTe = "ReplicationTime"; +const _RUD = "RetainUntilDate"; +const _Re = "Restore"; +const _Red = "Redirect"; +const _Ro = "Role"; +const _Ru = "Rule"; +const _Rul = "Rules"; +const _S = "Status"; +const _SA = "StartAfter"; +const _SAK = "SecretAccessKey"; +const _SBD = "S3BucketDestination"; +const _SC = "StorageClass"; +const _SCA = "StorageClassAnalysis"; +const _SCADE = "StorageClassAnalysisDataExport"; +const _SCASV = "StorageClassAnalysisSchemaVersion"; +const _SCt = "StatusCode"; +const _SDV = "SkipDestinationValidation"; +const _SK = "SSE-KMS"; +const _SKEO = "SseKmsEncryptedObjects"; +const _SKEOS = "SseKmsEncryptedObjectsStatus"; +const _SKF = "S3KeyFilter"; +const _SKe = "S3Key"; +const _SL = "S3Location"; +const _SM = "SessionMode"; +const _SOCR = "SelectObjectContentRequest"; +const _SP = "SelectParameters"; +const _SPi = "SimplePrefix"; +const _SR = "ScanRange"; +const _SS = "SSE-S3"; +const _SSC = "SourceSelectionCriteria"; +const _SSE = "ServerSideEncryption"; +const _SSEA = "SSEAlgorithm"; +const _SSEBD = "ServerSideEncryptionByDefault"; +const _SSEC = "ServerSideEncryptionConfiguration"; +const _SSECA = "SSECustomerAlgorithm"; +const _SSECK = "SSECustomerKey"; +const _SSECKMD = "SSECustomerKeyMD5"; +const _SSEKMS = "SSEKMS"; +const _SSEKMSEC = "SSEKMSEncryptionContext"; +const _SSEKMSKI = "SSEKMSKeyId"; +const _SSER = "ServerSideEncryptionRule"; +const _SSES = "SSES3"; +const _ST = "SessionToken"; +const _S_ = "S3"; +const _Sc = "Schedule"; +const _Se = "Setting"; +const _Si = "Size"; +const _St = "Start"; +const _Su = "Suffix"; +const _T = "Tagging"; +const _TA = "TopicArn"; +const _TB = "TargetBucket"; +const _TC = "TagCount"; +const _TCo = "TopicConfiguration"; +const _TCop = "TopicConfigurations"; +const _TD = "TaggingDirective"; +const _TG = "TargetGrants"; +const _TGa = "TargetGrant"; +const _TOKF = "TargetObjectKeyFormat"; +const _TP = "TargetPrefix"; +const _TPC = "TotalPartsCount"; +const _TS = "TagSet"; +const _TSC = "TransitionStorageClass"; +const _Ta = "Tag"; +const _Tag = "Tags"; +const _Ti = "Tier"; +const _Tie = "Tierings"; +const _Tier = "Tiering"; +const _Tim = "Time"; +const _To = "Token"; +const _Top = "Topic"; +const _Tr = "Transitions"; +const _Tra = "Transition"; +const _Ty = "Type"; +const _U = "Upload"; +const _UI = "UploadId"; +const _UIM = "UploadIdMarker"; +const _UM = "UserMetadata"; +const _URI = "URI"; +const _Up = "Uploads"; +const _V = "Version"; +const _VC = "VersionCount"; +const _VCe = "VersioningConfiguration"; +const _VI = "VersionId"; +const _VIM = "VersionIdMarker"; +const _Va = "Value"; +const _Ve = "Versions"; +const _WC = "WebsiteConfiguration"; +const _WRL = "WebsiteRedirectLocation"; +const _Y = "Years"; +const _a = "analytics"; +const _ac = "accelerate"; +const _acl = "acl"; +const _ar = "accept-ranges"; +const _at = "attributes"; +const _c = "cors"; +const _cc = "cache-control"; +const _cd = "content-disposition"; +const _ce = "content-encoding"; +const _cl = "content-language"; +const _cl_ = "content-length"; +const _cm = "content-md5"; +const _cr = "content-range"; +const _ct = "content-type"; +const _ct_ = "continuation-token"; +const _d = "delete"; +const _de = "delimiter"; +const _e = "expires"; +const _en = "encryption"; +const _et = "encoding-type"; +const _eta = "etag"; +const _fo = "fetch-owner"; +const _i = "id"; +const _im = "if-match"; +const _ims = "if-modified-since"; +const _in = "inventory"; +const _inm = "if-none-match"; +const _it = "intelligent-tiering"; +const _ius = "if-unmodified-since"; +const _km = "key-marker"; +const _l = "lifecycle"; +const _lh = "legal-hold"; +const _lm = "last-modified"; +const _lo = "location"; +const _log = "logging"; +const _lt = "list-type"; +const _m = "metrics"; +const _ma = "marker"; +const _mdb = "max-directory-buckets"; +const _me = "member"; +const _mk = "max-keys"; +const _mp = "max-parts"; +const _mu = "max-uploads"; +const _n = "notification"; +const _oC = "ownershipControls"; +const _ol = "object-lock"; +const _p = "policy"; +const _pAB = "publicAccessBlock"; +const _pN = "partNumber"; +const _pS = "policyStatus"; +const _pnm = "part-number-marker"; +const _pr = "prefix"; +const _r = "replication"; +const _rP = "requestPayment"; +const _ra = "range"; +const _rcc = "response-cache-control"; +const _rcd = "response-content-disposition"; +const _rce = "response-content-encoding"; +const _rcl = "response-content-language"; +const _rct = "response-content-type"; +const _re = "response-expires"; +const _res = "restore"; +const _ret = "retention"; +const _s = "session"; +const _sa = "start-after"; +const _se = "select"; +const _st = "select-type"; +const _t = "tagging"; +const _to = "torrent"; +const _u = "uploads"; +const _uI = "uploadId"; +const _uim = "upload-id-marker"; +const _v = "versioning"; +const _vI = "versionId"; +const _ve = ''; +const _ver = "versions"; +const _vim = "version-id-marker"; +const _w = "website"; +const _x = "xsi:type"; +const _xaa = "x-amz-acl"; +const _xaad = "x-amz-abort-date"; +const _xaapa = "x-amz-access-point-alias"; +const _xaari = "x-amz-abort-rule-id"; +const _xaas = "x-amz-archive-status"; +const _xabgr = "x-amz-bypass-governance-retention"; +const _xabln = "x-amz-bucket-location-name"; +const _xablt = "x-amz-bucket-location-type"; +const _xabole = "x-amz-bucket-object-lock-enabled"; +const _xabolt = "x-amz-bucket-object-lock-token"; +const _xabr = "x-amz-bucket-region"; +const _xaca = "x-amz-checksum-algorithm"; +const _xacc = "x-amz-checksum-crc32"; +const _xacc_ = "x-amz-checksum-crc32c"; +const _xacm = "x-amz-checksum-mode"; +const _xacrsba = "x-amz-confirm-remove-self-bucket-access"; +const _xacs = "x-amz-checksum-sha1"; +const _xacs_ = "x-amz-checksum-sha256"; +const _xacs__ = "x-amz-copy-source"; +const _xacsim = "x-amz-copy-source-if-match"; +const _xacsims = "x-amz-copy-source-if-modified-since"; +const _xacsinm = "x-amz-copy-source-if-none-match"; +const _xacsius = "x-amz-copy-source-if-unmodified-since"; +const _xacsm = "x-amz-create-session-mode"; +const _xacsr = "x-amz-copy-source-range"; +const _xacssseca = "x-amz-copy-source-server-side-encryption-customer-algorithm"; +const _xacssseck = "x-amz-copy-source-server-side-encryption-customer-key"; +const _xacssseckm = "x-amz-copy-source-server-side-encryption-customer-key-md5"; +const _xacsvi = "x-amz-copy-source-version-id"; +const _xadm = "x-amz-delete-marker"; +const _xae = "x-amz-expiration"; +const _xaebo = "x-amz-expected-bucket-owner"; +const _xafec = "x-amz-fwd-error-code"; +const _xafem = "x-amz-fwd-error-message"; +const _xafhar = "x-amz-fwd-header-accept-ranges"; +const _xafhcc = "x-amz-fwd-header-cache-control"; +const _xafhcd = "x-amz-fwd-header-content-disposition"; +const _xafhce = "x-amz-fwd-header-content-encoding"; +const _xafhcl = "x-amz-fwd-header-content-language"; +const _xafhcr = "x-amz-fwd-header-content-range"; +const _xafhct = "x-amz-fwd-header-content-type"; +const _xafhe = "x-amz-fwd-header-etag"; +const _xafhe_ = "x-amz-fwd-header-expires"; +const _xafhlm = "x-amz-fwd-header-last-modified"; +const _xafhxacc = "x-amz-fwd-header-x-amz-checksum-crc32"; +const _xafhxacc_ = "x-amz-fwd-header-x-amz-checksum-crc32c"; +const _xafhxacs = "x-amz-fwd-header-x-amz-checksum-sha1"; +const _xafhxacs_ = "x-amz-fwd-header-x-amz-checksum-sha256"; +const _xafhxadm = "x-amz-fwd-header-x-amz-delete-marker"; +const _xafhxae = "x-amz-fwd-header-x-amz-expiration"; +const _xafhxamm = "x-amz-fwd-header-x-amz-missing-meta"; +const _xafhxampc = "x-amz-fwd-header-x-amz-mp-parts-count"; +const _xafhxaollh = "x-amz-fwd-header-x-amz-object-lock-legal-hold"; +const _xafhxaolm = "x-amz-fwd-header-x-amz-object-lock-mode"; +const _xafhxaolrud = "x-amz-fwd-header-x-amz-object-lock-retain-until-date"; +const _xafhxar = "x-amz-fwd-header-x-amz-restore"; +const _xafhxarc = "x-amz-fwd-header-x-amz-request-charged"; +const _xafhxars = "x-amz-fwd-header-x-amz-replication-status"; +const _xafhxasc = "x-amz-fwd-header-x-amz-storage-class"; +const _xafhxasse = "x-amz-fwd-header-x-amz-server-side-encryption"; +const _xafhxasseakki = "x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"; +const _xafhxassebke = "x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled"; +const _xafhxasseca = "x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"; +const _xafhxasseckm = "x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5"; +const _xafhxatc = "x-amz-fwd-header-x-amz-tagging-count"; +const _xafhxavi = "x-amz-fwd-header-x-amz-version-id"; +const _xafs = "x-amz-fwd-status"; +const _xagfc = "x-amz-grant-full-control"; +const _xagr = "x-amz-grant-read"; +const _xagra = "x-amz-grant-read-acp"; +const _xagw = "x-amz-grant-write"; +const _xagwa = "x-amz-grant-write-acp"; +const _xam = "x-amz-mfa"; +const _xamd = "x-amz-metadata-directive"; +const _xamm = "x-amz-missing-meta"; +const _xamp = "x-amz-max-parts"; +const _xampc = "x-amz-mp-parts-count"; +const _xaoa = "x-amz-object-attributes"; +const _xaollh = "x-amz-object-lock-legal-hold"; +const _xaolm = "x-amz-object-lock-mode"; +const _xaolrud = "x-amz-object-lock-retain-until-date"; +const _xaoo = "x-amz-object-ownership"; +const _xaooa = "x-amz-optional-object-attributes"; +const _xapnm = "x-amz-part-number-marker"; +const _xar = "x-amz-restore"; +const _xarc = "x-amz-request-charged"; +const _xarop = "x-amz-restore-output-path"; +const _xarp = "x-amz-request-payer"; +const _xarr = "x-amz-request-route"; +const _xars = "x-amz-replication-status"; +const _xart = "x-amz-request-token"; +const _xasc = "x-amz-storage-class"; +const _xasca = "x-amz-sdk-checksum-algorithm"; +const _xasdv = "x-amz-skip-destination-validation"; +const _xasebo = "x-amz-source-expected-bucket-owner"; +const _xasse = "x-amz-server-side-encryption"; +const _xasseakki = "x-amz-server-side-encryption-aws-kms-key-id"; +const _xassebke = "x-amz-server-side-encryption-bucket-key-enabled"; +const _xassec = "x-amz-server-side-encryption-context"; +const _xasseca = "x-amz-server-side-encryption-customer-algorithm"; +const _xasseck = "x-amz-server-side-encryption-customer-key"; +const _xasseckm = "x-amz-server-side-encryption-customer-key-md5"; +const _xat = "x-amz-tagging"; +const _xatc = "x-amz-tagging-count"; +const _xatd = "x-amz-tagging-directive"; +const _xavi = "x-amz-version-id"; +const _xawrl = "x-amz-website-redirect-location"; +const _xi = "x-id"; const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { if (encoded.length) { - const parsedObj = (0, fast_xml_parser_1.parse)(encoded, { + const parser = new fast_xml_parser_1.XMLParser({ attributeNamePrefix: "", + htmlEntities: true, ignoreAttributes: false, - parseNodeValue: false, + ignoreDeclaration: true, + parseTagValue: false, trimValues: false, - tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : (0, entities_1.decodeHTML)(val)), + tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined), }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + const parsedObj = parser.parse(encoded); const textNodeName = "#text"; const key = Object.keys(parsedObj)[0]; const parsedObjToReturn = parsedObj[key]; @@ -23128,8 +26849,15 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context } return {}; }); +const parseErrorBody = async (errorBody, context) => { + const value = await parseBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } + return value; +}; const loadRestXmlErrorCode = (output, data) => { - if (data.Code !== undefined) { + if (data?.Code !== undefined) { return data.Code; } if (output.statusCode == 404) { @@ -23140,13 +26868,39 @@ const loadRestXmlErrorCode = (output, data) => { /***/ }), +<<<<<<< HEAD +/***/ 12909: +======= /***/ 94382: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(91685); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(50677)); +const client_sts_1 = __nccwpck_require__(89456); +const core_1 = __nccwpck_require__(5236); +const credential_provider_node_1 = __nccwpck_require__(6497); +const middleware_bucket_endpoint_1 = __nccwpck_require__(24602); +const middleware_sdk_s3_1 = __nccwpck_require__(52776); +const util_user_agent_node_1 = __nccwpck_require__(61876); +const config_resolver_1 = __nccwpck_require__(66041); +const eventstream_serde_node_1 = __nccwpck_require__(6293); +const hash_node_1 = __nccwpck_require__(86775); +const hash_stream_node_1 = __nccwpck_require__(70516); +const middleware_retry_1 = __nccwpck_require__(54801); +const node_config_provider_1 = __nccwpck_require__(13079); +const node_http_handler_1 = __nccwpck_require__(54065); +const util_body_length_node_1 = __nccwpck_require__(87693); +const util_retry_1 = __nccwpck_require__(13744); +const runtimeConfig_shared_1 = __nccwpck_require__(39179); +const smithy_client_1 = __nccwpck_require__(33218); +const util_defaults_mode_node_1 = __nccwpck_require__(6061); +const smithy_client_2 = __nccwpck_require__(33218); +======= const tslib_1 = __nccwpck_require__(73563); const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(50677)); const client_sts_1 = __nccwpck_require__(64761); @@ -23168,41 +26922,40 @@ const runtimeConfig_shared_1 = __nccwpck_require__(60976); const smithy_client_1 = __nccwpck_require__(26351); const util_defaults_mode_node_1 = __nccwpck_require__(64664); const smithy_client_2 = __nccwpck_require__(26351); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getRuntimeConfig = (config) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w; (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); return { ...clientSharedValues, ...config, runtime: "node", defaultsMode, - base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64, - base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64, - bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), - defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - eventStreamSerdeProvider: (_f = config === null || config === void 0 ? void 0 : config.eventStreamSerdeProvider) !== null && _f !== void 0 ? _f : eventstream_serde_node_1.eventStreamSerdeProvider, - getAwsChunkedEncodingStream: (_g = config === null || config === void 0 ? void 0 : config.getAwsChunkedEncodingStream) !== null && _g !== void 0 ? _g : util_stream_node_1.getAwsChunkedEncodingStream, - maxAttempts: (_h = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _h !== void 0 ? _h : (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - md5: (_j = config === null || config === void 0 ? void 0 : config.md5) !== null && _j !== void 0 ? _j : hash_node_1.Hash.bind(null, "md5"), - region: (_k = config === null || config === void 0 ? void 0 : config.region) !== null && _k !== void 0 ? _k : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: (_l = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _l !== void 0 ? _l : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: (_m = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _m !== void 0 ? _m : (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE, - }), - sha1: (_o = config === null || config === void 0 ? void 0 : config.sha1) !== null && _o !== void 0 ? _o : hash_node_1.Hash.bind(null, "sha1"), - sha256: (_p = config === null || config === void 0 ? void 0 : config.sha256) !== null && _p !== void 0 ? _p : hash_node_1.Hash.bind(null, "sha256"), - streamCollector: (_q = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _q !== void 0 ? _q : node_http_handler_1.streamCollector, - streamHasher: (_r = config === null || config === void 0 ? void 0 : config.streamHasher) !== null && _r !== void 0 ? _r : hash_stream_node_1.readableStreamHasher, - useArnRegion: (_s = config === null || config === void 0 ? void 0 : config.useArnRegion) !== null && _s !== void 0 ? _s : (0, node_config_provider_1.loadConfig)(middleware_bucket_endpoint_1.NODE_USE_ARN_REGION_CONFIG_OPTIONS), - useDualstackEndpoint: (_t = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _t !== void 0 ? _t : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: (_u = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _u !== void 0 ? _u : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), - utf8Decoder: (_v = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _v !== void 0 ? _v : util_utf8_node_1.fromUtf8, - utf8Encoder: (_w = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _w !== void 0 ? _w : util_utf8_node_1.toUtf8, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, client_sts_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + disableS3ExpressSessionAuth: config?.disableS3ExpressSessionAuth ?? (0, node_config_provider_1.loadConfig)(middleware_sdk_s3_1.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS), + eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventstream_serde_node_1.eventStreamSerdeProvider, + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + md5: config?.md5 ?? hash_node_1.Hash.bind(null, "md5"), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }), + sha1: config?.sha1 ?? hash_node_1.Hash.bind(null, "sha1"), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + streamHasher: config?.streamHasher ?? hash_stream_node_1.readableStreamHasher, + useArnRegion: config?.useArnRegion ?? (0, node_config_provider_1.loadConfig)(middleware_bucket_endpoint_1.NODE_USE_ARN_REGION_CONFIG_OPTIONS), + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), }; }; exports.getRuntimeConfig = getRuntimeConfig; @@ -23210,59 +26963,126 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ }), +<<<<<<< HEAD +/***/ 39179: +======= /***/ 60976: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; +<<<<<<< HEAD +const signature_v4_multi_region_1 = __nccwpck_require__(8149); +const smithy_client_1 = __nccwpck_require__(33218); +const url_parser_1 = __nccwpck_require__(98245); +const util_base64_1 = __nccwpck_require__(14478); +const util_stream_1 = __nccwpck_require__(55844); +const util_utf8_1 = __nccwpck_require__(38134); +const endpointResolver_1 = __nccwpck_require__(87873); +======= const signature_v4_multi_region_1 = __nccwpck_require__(96037); const url_parser_1 = __nccwpck_require__(13797); const endpoints_1 = __nccwpck_require__(41178); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getRuntimeConfig = (config) => { - var _a, _b, _c, _d, _e, _f, _g, _h; - return ({ + return { apiVersion: "2006-03-01", - disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false, - logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {}, - regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider, - serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "S3", - signerConstructor: (_e = config === null || config === void 0 ? void 0 : config.signerConstructor) !== null && _e !== void 0 ? _e : signature_v4_multi_region_1.SignatureV4MultiRegion, - signingEscapePath: (_f = config === null || config === void 0 ? void 0 : config.signingEscapePath) !== null && _f !== void 0 ? _f : false, - urlParser: (_g = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _g !== void 0 ? _g : url_parser_1.parseUrl, - useArnRegion: (_h = config === null || config === void 0 ? void 0 : config.useArnRegion) !== null && _h !== void 0 ? _h : false, - }); + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + getAwsChunkedEncodingStream: config?.getAwsChunkedEncodingStream ?? util_stream_1.getAwsChunkedEncodingStream, + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + sdkStreamMixin: config?.sdkStreamMixin ?? util_stream_1.sdkStreamMixin, + serviceId: config?.serviceId ?? "S3", + signerConstructor: config?.signerConstructor ?? signature_v4_multi_region_1.SignatureV4MultiRegion, + signingEscapePath: config?.signingEscapePath ?? false, + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + useArnRegion: config?.useArnRegion ?? false, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; }; exports.getRuntimeConfig = getRuntimeConfig; /***/ }), +<<<<<<< HEAD +/***/ 89243: +======= /***/ 40655: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.resolveRuntimeExtensions = void 0; +const region_config_resolver_1 = __nccwpck_require__(35657); +const protocol_http_1 = __nccwpck_require__(45311); +const smithy_client_1 = __nccwpck_require__(33218); +const asPartial = (t) => t; +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + }; +}; +exports.resolveRuntimeExtensions = resolveRuntimeExtensions; +======= const tslib_1 = __nccwpck_require__(73563); tslib_1.__exportStar(__nccwpck_require__(50807), exports); tslib_1.__exportStar(__nccwpck_require__(88066), exports); tslib_1.__exportStar(__nccwpck_require__(93117), exports); tslib_1.__exportStar(__nccwpck_require__(14103), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 98423: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(91685); +tslib_1.__exportStar(__nccwpck_require__(37060), exports); +tslib_1.__exportStar(__nccwpck_require__(88578), exports); +tslib_1.__exportStar(__nccwpck_require__(36551), exports); +tslib_1.__exportStar(__nccwpck_require__(29874), exports); + + +/***/ }), + +/***/ 37060: +======= /***/ 50807: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.waitUntilBucketExists = exports.waitForBucketExists = void 0; +<<<<<<< HEAD +const util_waiter_1 = __nccwpck_require__(32406); +const HeadBucketCommand_1 = __nccwpck_require__(93946); +======= const util_waiter_1 = __nccwpck_require__(20327); const HeadBucketCommand_1 = __nccwpck_require__(6005); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const checkState = async (client, input) => { let reason; try { @@ -23293,15 +27113,23 @@ exports.waitUntilBucketExists = waitUntilBucketExists; /***/ }), +<<<<<<< HEAD +/***/ 88578: +======= /***/ 88066: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.waitUntilBucketNotExists = exports.waitForBucketNotExists = void 0; +<<<<<<< HEAD +const util_waiter_1 = __nccwpck_require__(32406); +const HeadBucketCommand_1 = __nccwpck_require__(93946); +======= const util_waiter_1 = __nccwpck_require__(20327); const HeadBucketCommand_1 = __nccwpck_require__(6005); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const checkState = async (client, input) => { let reason; try { @@ -23331,15 +27159,23 @@ exports.waitUntilBucketNotExists = waitUntilBucketNotExists; /***/ }), +<<<<<<< HEAD +/***/ 36551: +======= /***/ 93117: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.waitUntilObjectExists = exports.waitForObjectExists = void 0; +<<<<<<< HEAD +const util_waiter_1 = __nccwpck_require__(32406); +const HeadObjectCommand_1 = __nccwpck_require__(61280); +======= const util_waiter_1 = __nccwpck_require__(20327); const HeadObjectCommand_1 = __nccwpck_require__(49553); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const checkState = async (client, input) => { let reason; try { @@ -23370,15 +27206,23 @@ exports.waitUntilObjectExists = waitUntilObjectExists; /***/ }), +<<<<<<< HEAD +/***/ 29874: +======= /***/ 14103: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.waitUntilObjectNotExists = exports.waitForObjectNotExists = void 0; +<<<<<<< HEAD +const util_waiter_1 = __nccwpck_require__(32406); +const HeadObjectCommand_1 = __nccwpck_require__(61280); +======= const util_waiter_1 = __nccwpck_require__(20327); const HeadObjectCommand_1 = __nccwpck_require__(49553); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const checkState = async (client, input) => { let reason; try { @@ -23408,411 +27252,501 @@ exports.waitUntilObjectNotExists = waitUntilObjectNotExists; /***/ }), +<<<<<<< HEAD +/***/ 91685: +======= /***/ 73563: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + __assign = Object.assign || function (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; + }; -/***/ }), + __rest = function (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; + }; -/***/ 36603: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __decorate = function (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; + }; -"use strict"; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.SSO = void 0; -const GetRoleCredentialsCommand_1 = __nccwpck_require__(34986); -const ListAccountRolesCommand_1 = __nccwpck_require__(46552); -const ListAccountsCommand_1 = __nccwpck_require__(60292); -const LogoutCommand_1 = __nccwpck_require__(78571); -const SSOClient_1 = __nccwpck_require__(58166); -class SSO extends SSOClient_1.SSOClient { - getRoleCredentials(args, optionsOrCb, cb) { - const command = new GetRoleCredentialsCommand_1.GetRoleCredentialsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); + __esDecorate = function (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)); }; + 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] = _; + } } - else { - return this.send(command, optionsOrCb); + 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); } - } - listAccountRoles(args, optionsOrCb, cb) { - const command = new ListAccountRolesCommand_1.ListAccountRolesCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); + return useValue ? value : void 0; + }; + + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + + __setFunctionName = function (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 }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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]; } }; } - else { - return this.send(command, optionsOrCb); + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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); } - } - listAccounts(args, optionsOrCb, cb) { - const command = new ListAccountsCommand_1.ListAccountsCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); + 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 = 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; + }; + + __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]; + } } - else { - return this.send(command, optionsOrCb); + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); } - } - logout(args, optionsOrCb, cb) { - const command = new LogoutCommand_1.LogoutCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); + else if (async) { + env.stack.push({ async: true }); } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); + return value; + }; + + 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; + }; + + __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; } - else { - return this.send(command, optionsOrCb); + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; } - } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); + + +/***/ }), + +<<<<<<< HEAD +/***/ 85368: +======= +/***/ 36603: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SSO = void 0; +<<<<<<< HEAD +const smithy_client_1 = __nccwpck_require__(33218); +const GetRoleCredentialsCommand_1 = __nccwpck_require__(86371); +const ListAccountRolesCommand_1 = __nccwpck_require__(66932); +const ListAccountsCommand_1 = __nccwpck_require__(16772); +const LogoutCommand_1 = __nccwpck_require__(99815); +const SSOClient_1 = __nccwpck_require__(7531); +const commands = { + GetRoleCredentialsCommand: GetRoleCredentialsCommand_1.GetRoleCredentialsCommand, + ListAccountRolesCommand: ListAccountRolesCommand_1.ListAccountRolesCommand, + ListAccountsCommand: ListAccountsCommand_1.ListAccountsCommand, + LogoutCommand: LogoutCommand_1.LogoutCommand, +}; +======= +const GetRoleCredentialsCommand_1 = __nccwpck_require__(34986); +const ListAccountRolesCommand_1 = __nccwpck_require__(46552); +const ListAccountsCommand_1 = __nccwpck_require__(60292); +const LogoutCommand_1 = __nccwpck_require__(78571); +const SSOClient_1 = __nccwpck_require__(58166); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +class SSO extends SSOClient_1.SSOClient { } exports.SSO = SSO; +(0, smithy_client_1.createAggregatedClient)(commands, SSO); /***/ }), +<<<<<<< HEAD +/***/ 7531: +======= /***/ 58166: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.SSOClient = exports.__Client = void 0; +const middleware_host_header_1 = __nccwpck_require__(23213); +const middleware_logger_1 = __nccwpck_require__(45288); +const middleware_recursion_detection_1 = __nccwpck_require__(13807); +const middleware_user_agent_1 = __nccwpck_require__(3549); +const config_resolver_1 = __nccwpck_require__(66041); +const middleware_content_length_1 = __nccwpck_require__(38959); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_retry_1 = __nccwpck_require__(54801); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "__Client", ({ enumerable: true, get: function () { return smithy_client_1.Client; } })); +const EndpointParameters_1 = __nccwpck_require__(3494); +const runtimeConfig_1 = __nccwpck_require__(56587); +const runtimeExtensions_1 = __nccwpck_require__(91833); +======= exports.SSOClient = void 0; const config_resolver_1 = __nccwpck_require__(95406); const middleware_content_length_1 = __nccwpck_require__(96962); @@ -23823,16 +27757,19 @@ const middleware_retry_1 = __nccwpck_require__(9352); const middleware_user_agent_1 = __nccwpck_require__(54738); const smithy_client_1 = __nccwpck_require__(26351); const runtimeConfig_1 = __nccwpck_require__(44325); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class SSOClient extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); - const _config_1 = (0, config_resolver_1.resolveRegionConfig)(_config_0); - const _config_2 = (0, config_resolver_1.resolveEndpointsConfig)(_config_1); - const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2); - const _config_4 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_3); - const _config_5 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_4); - super(_config_5); - this.config = _config_5; + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); + const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); + const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); + const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); + const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); + const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5); + const _config_7 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_6, configuration?.extensions || []); + super(_config_7); + this.config = _config_7; this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); @@ -23849,24 +27786,47 @@ exports.SSOClient = SSOClient; /***/ }), +<<<<<<< HEAD +/***/ 86371: +======= /***/ 34986: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetRoleCredentialsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(78153); +const Aws_restJson1_1 = __nccwpck_require__(5363); +======= exports.GetRoleCredentialsCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(2895); const Aws_restJson1_1 = __nccwpck_require__(25931); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetRoleCredentialsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetRoleCredentialsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; @@ -23877,15 +27837,19 @@ class GetRoleCredentialsCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_0_1.GetRoleCredentialsRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.GetRoleCredentialsResponseFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "SWBPortalService", + operation: "GetRoleCredentials", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.serializeAws_restJson1GetRoleCredentialsCommand)(input, context); + return (0, Aws_restJson1_1.se_GetRoleCredentialsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.deserializeAws_restJson1GetRoleCredentialsCommand)(output, context); + return (0, Aws_restJson1_1.de_GetRoleCredentialsCommand)(output, context); } } exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand; @@ -23893,24 +27857,47 @@ exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand; /***/ }), +<<<<<<< HEAD +/***/ 66932: +======= /***/ 46552: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListAccountRolesCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(78153); +const Aws_restJson1_1 = __nccwpck_require__(5363); +======= exports.ListAccountRolesCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(2895); const Aws_restJson1_1 = __nccwpck_require__(25931); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListAccountRolesCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListAccountRolesCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; @@ -23920,16 +27907,20 @@ class ListAccountRolesCommand extends smithy_client_1.Command { clientName, commandName, inputFilterSensitiveLog: models_0_1.ListAccountRolesRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListAccountRolesResponseFilterSensitiveLog, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "SWBPortalService", + operation: "ListAccountRoles", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.serializeAws_restJson1ListAccountRolesCommand)(input, context); + return (0, Aws_restJson1_1.se_ListAccountRolesCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.deserializeAws_restJson1ListAccountRolesCommand)(output, context); + return (0, Aws_restJson1_1.de_ListAccountRolesCommand)(output, context); } } exports.ListAccountRolesCommand = ListAccountRolesCommand; @@ -23937,24 +27928,47 @@ exports.ListAccountRolesCommand = ListAccountRolesCommand; /***/ }), +<<<<<<< HEAD +/***/ 16772: +======= /***/ 60292: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.ListAccountsCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(78153); +const Aws_restJson1_1 = __nccwpck_require__(5363); +======= exports.ListAccountsCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(2895); const Aws_restJson1_1 = __nccwpck_require__(25931); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ListAccountsCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, ListAccountsCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; @@ -23964,16 +27978,20 @@ class ListAccountsCommand extends smithy_client_1.Command { clientName, commandName, inputFilterSensitiveLog: models_0_1.ListAccountsRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.ListAccountsResponseFilterSensitiveLog, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "SWBPortalService", + operation: "ListAccounts", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.serializeAws_restJson1ListAccountsCommand)(input, context); + return (0, Aws_restJson1_1.se_ListAccountsCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.deserializeAws_restJson1ListAccountsCommand)(output, context); + return (0, Aws_restJson1_1.de_ListAccountsCommand)(output, context); } } exports.ListAccountsCommand = ListAccountsCommand; @@ -23981,24 +27999,47 @@ exports.ListAccountsCommand = ListAccountsCommand; /***/ }), +<<<<<<< HEAD +/***/ 99815: +======= /***/ 78571: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.LogoutCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(78153); +const Aws_restJson1_1 = __nccwpck_require__(5363); +======= exports.LogoutCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(2895); const Aws_restJson1_1 = __nccwpck_require__(25931); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class LogoutCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, LogoutCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "SSOClient"; @@ -24008,16 +28049,20 @@ class LogoutCommand extends smithy_client_1.Command { clientName, commandName, inputFilterSensitiveLog: models_0_1.LogoutRequestFilterSensitiveLog, - outputFilterSensitiveLog: (output) => output, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "SWBPortalService", + operation: "Logout", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_restJson1_1.serializeAws_restJson1LogoutCommand)(input, context); + return (0, Aws_restJson1_1.se_LogoutCommand)(input, context); } deserialize(output, context) { - return (0, Aws_restJson1_1.deserializeAws_restJson1LogoutCommand)(output, context); + return (0, Aws_restJson1_1.de_LogoutCommand)(output, context); } } exports.LogoutCommand = LogoutCommand; @@ -24025,27 +28070,52 @@ exports.LogoutCommand = LogoutCommand; /***/ }), +<<<<<<< HEAD +/***/ 49454: +======= /***/ 23218: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(58896); +tslib_1.__exportStar(__nccwpck_require__(86371), exports); +tslib_1.__exportStar(__nccwpck_require__(66932), exports); +tslib_1.__exportStar(__nccwpck_require__(16772), exports); +tslib_1.__exportStar(__nccwpck_require__(99815), exports); +======= const tslib_1 = __nccwpck_require__(93717); tslib_1.__exportStar(__nccwpck_require__(34986), exports); tslib_1.__exportStar(__nccwpck_require__(46552), exports); tslib_1.__exportStar(__nccwpck_require__(60292), exports); tslib_1.__exportStar(__nccwpck_require__(78571), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 3494: +/***/ ((__unused_webpack_module, exports) => { +======= /***/ 68540: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.resolveClientEndpointParameters = void 0; +const resolveClientEndpointParameters = (options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "awsssoportal", + }; +======= exports.defaultRegionInfoProvider = void 0; const config_resolver_1 = __nccwpck_require__(95406); const regionHash = { @@ -24238,144 +28308,66 @@ const regionHash = { ], signingRegion: "us-west-2", }, +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; -const partitionHash = { - aws: { - regions: [ - "af-south-1", - "ap-east-1", - "ap-northeast-1", - "ap-northeast-2", - "ap-northeast-3", - "ap-south-1", - "ap-southeast-1", - "ap-southeast-2", - "ap-southeast-3", - "ca-central-1", - "eu-central-1", - "eu-north-1", - "eu-south-1", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "me-south-1", - "sa-east-1", - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - ], - regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "portal.sso.{region}.amazonaws.com", - tags: [], - }, - { - hostname: "portal.sso-fips.{region}.amazonaws.com", - tags: ["fips"], - }, - { - hostname: "portal.sso-fips.{region}.api.aws", - tags: ["dualstack", "fips"], - }, - { - hostname: "portal.sso.{region}.api.aws", - tags: ["dualstack"], - }, - ], - }, - "aws-cn": { - regions: ["cn-north-1", "cn-northwest-1"], - regionRegex: "^cn\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "portal.sso.{region}.amazonaws.com.cn", - tags: [], - }, - { - hostname: "portal.sso-fips.{region}.amazonaws.com.cn", - tags: ["fips"], - }, - { - hostname: "portal.sso-fips.{region}.api.amazonwebservices.com.cn", - tags: ["dualstack", "fips"], - }, - { - hostname: "portal.sso.{region}.api.amazonwebservices.com.cn", - tags: ["dualstack"], - }, - ], - }, - "aws-iso": { - regions: ["us-iso-east-1", "us-iso-west-1"], - regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "portal.sso.{region}.c2s.ic.gov", - tags: [], - }, - { - hostname: "portal.sso-fips.{region}.c2s.ic.gov", - tags: ["fips"], - }, - ], - }, - "aws-iso-b": { - regions: ["us-isob-east-1"], - regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "portal.sso.{region}.sc2s.sgov.gov", - tags: [], - }, - { - hostname: "portal.sso-fips.{region}.sc2s.sgov.gov", - tags: ["fips"], - }, - ], - }, - "aws-us-gov": { - regions: ["us-gov-east-1", "us-gov-west-1"], - regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "portal.sso.{region}.amazonaws.com", - tags: [], - }, - { - hostname: "portal.sso-fips.{region}.amazonaws.com", - tags: ["fips"], - }, - { - hostname: "portal.sso-fips.{region}.api.aws", - tags: ["dualstack", "fips"], - }, - { - hostname: "portal.sso.{region}.api.aws", - tags: ["dualstack"], - }, - ], - }, +exports.resolveClientEndpointParameters = resolveClientEndpointParameters; + + +/***/ }), + +<<<<<<< HEAD +/***/ 94655: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = __nccwpck_require__(34548); +const ruleset_1 = __nccwpck_require__(66242); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); }; -const defaultRegionInfoProvider = async (region, options) => (0, config_resolver_1.getRegionInfo)(region, { - ...options, - signingService: "awsssoportal", - regionHash, - partitionHash, -}); -exports.defaultRegionInfoProvider = defaultRegionInfoProvider; +exports.defaultEndpointResolver = defaultEndpointResolver; /***/ }), +/***/ 66242: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ruleSet = void 0; +const u = "required", v = "fn", w = "argv", x = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "String" }, j = { [u]: true, "default": false, "type": "Boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }]; +const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] }; +exports.ruleSet = _data; + + +/***/ }), + +/***/ 62764: +======= /***/ 2394: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SSOServiceException = void 0; +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(58896); +tslib_1.__exportStar(__nccwpck_require__(7531), exports); +tslib_1.__exportStar(__nccwpck_require__(85368), exports); +tslib_1.__exportStar(__nccwpck_require__(49454), exports); +tslib_1.__exportStar(__nccwpck_require__(59289), exports); +tslib_1.__exportStar(__nccwpck_require__(32297), exports); +__nccwpck_require__(60698); +var SSOServiceException_1 = __nccwpck_require__(36989); +======= const tslib_1 = __nccwpck_require__(93717); tslib_1.__exportStar(__nccwpck_require__(36603), exports); tslib_1.__exportStar(__nccwpck_require__(58166), exports); @@ -24383,19 +28375,29 @@ tslib_1.__exportStar(__nccwpck_require__(23218), exports); tslib_1.__exportStar(__nccwpck_require__(72297), exports); tslib_1.__exportStar(__nccwpck_require__(59161), exports); var SSOServiceException_1 = __nccwpck_require__(74691); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "SSOServiceException", ({ enumerable: true, get: function () { return SSOServiceException_1.SSOServiceException; } })); /***/ }), +<<<<<<< HEAD +/***/ 36989: +======= /***/ 74691: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.SSOServiceException = exports.__ServiceException = void 0; +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } })); +======= exports.SSOServiceException = void 0; const smithy_client_1 = __nccwpck_require__(26351); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class SSOServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); @@ -24407,27 +28409,44 @@ exports.SSOServiceException = SSOServiceException; /***/ }), +<<<<<<< HEAD +/***/ 32297: +======= /***/ 72297: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(58896); +tslib_1.__exportStar(__nccwpck_require__(78153), exports); +======= const tslib_1 = __nccwpck_require__(93717); tslib_1.__exportStar(__nccwpck_require__(2895), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 78153: +======= /***/ 2895: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.LogoutRequestFilterSensitiveLog = exports.ListAccountsRequestFilterSensitiveLog = exports.ListAccountRolesRequestFilterSensitiveLog = exports.GetRoleCredentialsResponseFilterSensitiveLog = exports.RoleCredentialsFilterSensitiveLog = exports.GetRoleCredentialsRequestFilterSensitiveLog = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0; +const smithy_client_1 = __nccwpck_require__(33218); +const SSOServiceException_1 = __nccwpck_require__(36989); +======= exports.LogoutRequestFilterSensitiveLog = exports.ListAccountsResponseFilterSensitiveLog = exports.ListAccountsRequestFilterSensitiveLog = exports.ListAccountRolesResponseFilterSensitiveLog = exports.RoleInfoFilterSensitiveLog = exports.ListAccountRolesRequestFilterSensitiveLog = exports.GetRoleCredentialsResponseFilterSensitiveLog = exports.RoleCredentialsFilterSensitiveLog = exports.GetRoleCredentialsRequestFilterSensitiveLog = exports.AccountInfoFilterSensitiveLog = exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0; const smithy_client_1 = __nccwpck_require__(26351); const SSOServiceException_1 = __nccwpck_require__(74691); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class InvalidRequestException extends SSOServiceException_1.SSOServiceException { constructor(opts) { super({ @@ -24480,10 +28499,6 @@ class UnauthorizedException extends SSOServiceException_1.SSOServiceException { } } exports.UnauthorizedException = UnauthorizedException; -const AccountInfoFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AccountInfoFilterSensitiveLog = AccountInfoFilterSensitiveLog; const GetRoleCredentialsRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }), @@ -24505,23 +28520,11 @@ const ListAccountRolesRequestFilterSensitiveLog = (obj) => ({ ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }), }); exports.ListAccountRolesRequestFilterSensitiveLog = ListAccountRolesRequestFilterSensitiveLog; -const RoleInfoFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.RoleInfoFilterSensitiveLog = RoleInfoFilterSensitiveLog; -const ListAccountRolesResponseFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListAccountRolesResponseFilterSensitiveLog = ListAccountRolesResponseFilterSensitiveLog; const ListAccountsRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }), }); exports.ListAccountsRequestFilterSensitiveLog = ListAccountsRequestFilterSensitiveLog; -const ListAccountsResponseFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.ListAccountsResponseFilterSensitiveLog = ListAccountsResponseFilterSensitiveLog; const LogoutRequestFilterSensitiveLog = (obj) => ({ ...obj, ...(obj.accessToken && { accessToken: smithy_client_1.SENSITIVE_STRING }), @@ -24531,23 +28534,35 @@ exports.LogoutRequestFilterSensitiveLog = LogoutRequestFilterSensitiveLog; /***/ }), +<<<<<<< HEAD +/***/ 56658: +======= /***/ 69074: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), +<<<<<<< HEAD +/***/ 95223: +======= /***/ 35597: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.paginateListAccountRoles = void 0; +<<<<<<< HEAD +const core_1 = __nccwpck_require__(53938); +const ListAccountRolesCommand_1 = __nccwpck_require__(66932); +const SSOClient_1 = __nccwpck_require__(7531); +exports.paginateListAccountRoles = (0, core_1.createPaginator)(SSOClient_1.SSOClient, ListAccountRolesCommand_1.ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); +======= const ListAccountRolesCommand_1 = __nccwpck_require__(46552); const SSO_1 = __nccwpck_require__(36603); const SSOClient_1 = __nccwpck_require__(58166); @@ -24581,17 +28596,27 @@ async function* paginateListAccountRoles(config, input, ...additionalArguments) return undefined; } exports.paginateListAccountRoles = paginateListAccountRoles; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 45417: +======= /***/ 25634: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.paginateListAccounts = void 0; +<<<<<<< HEAD +const core_1 = __nccwpck_require__(53938); +const ListAccountsCommand_1 = __nccwpck_require__(16772); +const SSOClient_1 = __nccwpck_require__(7531); +exports.paginateListAccounts = (0, core_1.createPaginator)(SSOClient_1.SSOClient, ListAccountsCommand_1.ListAccountsCommand, "nextToken", "nextToken", "maxResults"); +======= const ListAccountsCommand_1 = __nccwpck_require__(60292); const SSO_1 = __nccwpck_require__(36603); const SSOClient_1 = __nccwpck_require__(58166); @@ -24625,30 +28650,55 @@ async function* paginateListAccounts(config, input, ...additionalArguments) { return undefined; } exports.paginateListAccounts = paginateListAccounts; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 59289: +======= /***/ 59161: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(58896); +tslib_1.__exportStar(__nccwpck_require__(56658), exports); +tslib_1.__exportStar(__nccwpck_require__(95223), exports); +tslib_1.__exportStar(__nccwpck_require__(45417), exports); +======= const tslib_1 = __nccwpck_require__(93717); tslib_1.__exportStar(__nccwpck_require__(69074), exports); tslib_1.__exportStar(__nccwpck_require__(35597), exports); tslib_1.__exportStar(__nccwpck_require__(25634), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 5363: +======= /***/ 25931: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.de_LogoutCommand = exports.de_ListAccountsCommand = exports.de_ListAccountRolesCommand = exports.de_GetRoleCredentialsCommand = exports.se_LogoutCommand = exports.se_ListAccountsCommand = exports.se_ListAccountRolesCommand = exports.se_GetRoleCredentialsCommand = void 0; +const core_1 = __nccwpck_require__(53938); +const smithy_client_1 = __nccwpck_require__(33218); +const models_0_1 = __nccwpck_require__(78153); +const SSOServiceException_1 = __nccwpck_require__(36989); +const se_GetRoleCredentialsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT], +======= exports.deserializeAws_restJson1LogoutCommand = exports.deserializeAws_restJson1ListAccountsCommand = exports.deserializeAws_restJson1ListAccountRolesCommand = exports.deserializeAws_restJson1GetRoleCredentialsCommand = exports.serializeAws_restJson1LogoutCommand = exports.serializeAws_restJson1ListAccountsCommand = exports.serializeAws_restJson1ListAccountRolesCommand = exports.serializeAws_restJson1GetRoleCredentialsCommand = void 0; const protocol_http_1 = __nccwpck_require__(35712); const smithy_client_1 = __nccwpck_require__(26351); @@ -24658,381 +28708,313 @@ const serializeAws_restJson1GetRoleCredentialsCommand = async (input, context) = const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const headers = map({}, isSerializableHeaderValue, { "x-amz-sso_bearer_token": input.accessToken, +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }); - const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/federation/credentials"; - const query = map({ - role_name: [, input.roleName], - account_id: [, input.accountId], + b.bp("/federation/credentials"); + const query = (0, smithy_client_1.map)({ + [_rn]: [, (0, smithy_client_1.expectNonNull)(input[_rN], `roleName`)], + [_ai]: [, (0, smithy_client_1.expectNonNull)(input[_aI], `accountId`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restJson1GetRoleCredentialsCommand = serializeAws_restJson1GetRoleCredentialsCommand; -const serializeAws_restJson1ListAccountRolesCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-sso_bearer_token": input.accessToken, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_GetRoleCredentialsCommand = se_GetRoleCredentialsCommand; +const se_ListAccountRolesCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT], }); - const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/roles"; - const query = map({ - next_token: [, input.nextToken], - max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()], - account_id: [, input.accountId], + b.bp("/assignment/roles"); + const query = (0, smithy_client_1.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], + [_ai]: [, (0, smithy_client_1.expectNonNull)(input[_aI], `accountId`)], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, - }); -}; -exports.serializeAws_restJson1ListAccountRolesCommand = serializeAws_restJson1ListAccountRolesCommand; -const serializeAws_restJson1ListAccountsCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-sso_bearer_token": input.accessToken, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListAccountRolesCommand = se_ListAccountRolesCommand; +const se_ListAccountsCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT], }); - const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/assignment/accounts"; - const query = map({ - next_token: [, input.nextToken], - max_result: [() => input.maxResults !== void 0, () => input.maxResults.toString()], + b.bp("/assignment/accounts"); + const query = (0, smithy_client_1.map)({ + [_nt]: [, input[_nT]], + [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()], }); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "GET", - headers, - path: resolvedPath, - query, - body, + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; +exports.se_ListAccountsCommand = se_ListAccountsCommand; +const se_LogoutCommand = async (input, context) => { + const b = (0, core_1.requestBuilder)(input, context); + const headers = (0, smithy_client_1.map)({}, isSerializableHeaderValue, { + [_xasbt]: input[_aT], }); -}; -exports.serializeAws_restJson1ListAccountsCommand = serializeAws_restJson1ListAccountsCommand; -const serializeAws_restJson1LogoutCommand = async (input, context) => { - const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); - const headers = map({}, isSerializableHeaderValue, { - "x-amz-sso_bearer_token": input.accessToken, - }); - const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/logout"; + b.bp("/logout"); let body; - return new protocol_http_1.HttpRequest({ - protocol, - hostname, - port, - method: "POST", - headers, - path: resolvedPath, - body, - }); + b.m("POST").h(headers).b(body); + return b.build(); }; -exports.serializeAws_restJson1LogoutCommand = serializeAws_restJson1LogoutCommand; -const deserializeAws_restJson1GetRoleCredentialsCommand = async (output, context) => { +exports.se_LogoutCommand = se_LogoutCommand; +const de_GetRoleCredentialsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1GetRoleCredentialsCommandError(output, context); + return de_GetRoleCredentialsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data.roleCredentials != null) { - contents.roleCredentials = deserializeAws_restJson1RoleCredentials(data.roleCredentials, context); - } + const doc = (0, smithy_client_1.take)(data, { + roleCredentials: smithy_client_1._json, + }); + Object.assign(contents, doc); return contents; }; -exports.deserializeAws_restJson1GetRoleCredentialsCommand = deserializeAws_restJson1GetRoleCredentialsCommand; -const deserializeAws_restJson1GetRoleCredentialsCommandError = async (output, context) => { +exports.de_GetRoleCredentialsCommand = de_GetRoleCredentialsCommand; +const de_GetRoleCredentialsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { case "InvalidRequestException": case "com.amazonaws.sso#InvalidRequestException": - throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context); + throw await de_InvalidRequestExceptionRes(parsedOutput, context); case "ResourceNotFoundException": case "com.amazonaws.sso#ResourceNotFoundException": - throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "TooManyRequestsException": case "com.amazonaws.sso#TooManyRequestsException": - throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context); + throw await de_TooManyRequestsExceptionRes(parsedOutput, context); case "UnauthorizedException": case "com.amazonaws.sso#UnauthorizedException": - throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context); + throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: SSOServiceException_1.SSOServiceException, errorCode, }); } }; -const deserializeAws_restJson1ListAccountRolesCommand = async (output, context) => { +const de_ListAccountRolesCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListAccountRolesCommandError(output, context); + return de_ListAccountRolesCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data.nextToken != null) { - contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken); - } - if (data.roleList != null) { - contents.roleList = deserializeAws_restJson1RoleListType(data.roleList, context); - } + const doc = (0, smithy_client_1.take)(data, { + nextToken: smithy_client_1.expectString, + roleList: smithy_client_1._json, + }); + Object.assign(contents, doc); return contents; }; -exports.deserializeAws_restJson1ListAccountRolesCommand = deserializeAws_restJson1ListAccountRolesCommand; -const deserializeAws_restJson1ListAccountRolesCommandError = async (output, context) => { +exports.de_ListAccountRolesCommand = de_ListAccountRolesCommand; +const de_ListAccountRolesCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { case "InvalidRequestException": case "com.amazonaws.sso#InvalidRequestException": - throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context); + throw await de_InvalidRequestExceptionRes(parsedOutput, context); case "ResourceNotFoundException": case "com.amazonaws.sso#ResourceNotFoundException": - throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "TooManyRequestsException": case "com.amazonaws.sso#TooManyRequestsException": - throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context); + throw await de_TooManyRequestsExceptionRes(parsedOutput, context); case "UnauthorizedException": case "com.amazonaws.sso#UnauthorizedException": - throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context); + throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: SSOServiceException_1.SSOServiceException, errorCode, }); } }; -const deserializeAws_restJson1ListAccountsCommand = async (output, context) => { +const de_ListAccountsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1ListAccountsCommandError(output, context); + return de_ListAccountsCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body"); - if (data.accountList != null) { - contents.accountList = deserializeAws_restJson1AccountListType(data.accountList, context); - } - if (data.nextToken != null) { - contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken); - } + const doc = (0, smithy_client_1.take)(data, { + accountList: smithy_client_1._json, + nextToken: smithy_client_1.expectString, + }); + Object.assign(contents, doc); return contents; }; -exports.deserializeAws_restJson1ListAccountsCommand = deserializeAws_restJson1ListAccountsCommand; -const deserializeAws_restJson1ListAccountsCommandError = async (output, context) => { +exports.de_ListAccountsCommand = de_ListAccountsCommand; +const de_ListAccountsCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { case "InvalidRequestException": case "com.amazonaws.sso#InvalidRequestException": - throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context); + throw await de_InvalidRequestExceptionRes(parsedOutput, context); case "ResourceNotFoundException": case "com.amazonaws.sso#ResourceNotFoundException": - throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); case "TooManyRequestsException": case "com.amazonaws.sso#TooManyRequestsException": - throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context); + throw await de_TooManyRequestsExceptionRes(parsedOutput, context); case "UnauthorizedException": case "com.amazonaws.sso#UnauthorizedException": - throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context); + throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: SSOServiceException_1.SSOServiceException, errorCode, }); } }; -const deserializeAws_restJson1LogoutCommand = async (output, context) => { +const de_LogoutCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { - return deserializeAws_restJson1LogoutCommandError(output, context); + return de_LogoutCommandError(output, context); } - const contents = map({ + const contents = (0, smithy_client_1.map)({ $metadata: deserializeMetadata(output), }); - await collectBody(output.body, context); + await (0, smithy_client_1.collectBody)(output.body, context); return contents; }; -exports.deserializeAws_restJson1LogoutCommand = deserializeAws_restJson1LogoutCommand; -const deserializeAws_restJson1LogoutCommandError = async (output, context) => { +exports.de_LogoutCommand = de_LogoutCommand; +const de_LogoutCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { case "InvalidRequestException": case "com.amazonaws.sso#InvalidRequestException": - throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context); + throw await de_InvalidRequestExceptionRes(parsedOutput, context); case "TooManyRequestsException": case "com.amazonaws.sso#TooManyRequestsException": - throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context); + throw await de_TooManyRequestsExceptionRes(parsedOutput, context); case "UnauthorizedException": case "com.amazonaws.sso#UnauthorizedException": - throw await deserializeAws_restJson1UnauthorizedExceptionResponse(parsedOutput, context); + throw await de_UnauthorizedExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody, - exceptionCtor: SSOServiceException_1.SSOServiceException, errorCode, }); } }; -const map = smithy_client_1.map; -const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => { - const contents = map({}); +const throwDefaultError = (0, smithy_client_1.withBaseException)(SSOServiceException_1.SSOServiceException); +const de_InvalidRequestExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; - if (data.message != null) { - contents.message = (0, smithy_client_1.expectString)(data.message); - } + const doc = (0, smithy_client_1.take)(data, { + message: smithy_client_1.expectString, + }); + Object.assign(contents, doc); const exception = new models_0_1.InvalidRequestException({ $metadata: deserializeMetadata(parsedOutput), ...contents, }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; - if (data.message != null) { - contents.message = (0, smithy_client_1.expectString)(data.message); - } + const doc = (0, smithy_client_1.take)(data, { + message: smithy_client_1.expectString, + }); + Object.assign(contents, doc); const exception = new models_0_1.ResourceNotFoundException({ $metadata: deserializeMetadata(parsedOutput), ...contents, }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; - if (data.message != null) { - contents.message = (0, smithy_client_1.expectString)(data.message); - } + const doc = (0, smithy_client_1.take)(data, { + message: smithy_client_1.expectString, + }); + Object.assign(contents, doc); const exception = new models_0_1.TooManyRequestsException({ $metadata: deserializeMetadata(parsedOutput), ...contents, }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restJson1UnauthorizedExceptionResponse = async (parsedOutput, context) => { - const contents = map({}); +const de_UnauthorizedExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_1.map)({}); const data = parsedOutput.body; - if (data.message != null) { - contents.message = (0, smithy_client_1.expectString)(data.message); - } + const doc = (0, smithy_client_1.take)(data, { + message: smithy_client_1.expectString, + }); + Object.assign(contents, doc); const exception = new models_0_1.UnauthorizedException({ $metadata: deserializeMetadata(parsedOutput), ...contents, }); return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body); }; -const deserializeAws_restJson1AccountInfo = (output, context) => { - return { - accountId: (0, smithy_client_1.expectString)(output.accountId), - accountName: (0, smithy_client_1.expectString)(output.accountName), - emailAddress: (0, smithy_client_1.expectString)(output.emailAddress), - }; -}; -const deserializeAws_restJson1AccountListType = (output, context) => { - const retVal = (output || []) - .filter((e) => e != null) - .map((entry) => { - if (entry === null) { - return null; - } - return deserializeAws_restJson1AccountInfo(entry, context); - }); - return retVal; -}; -const deserializeAws_restJson1RoleCredentials = (output, context) => { - return { - accessKeyId: (0, smithy_client_1.expectString)(output.accessKeyId), - expiration: (0, smithy_client_1.expectLong)(output.expiration), - secretAccessKey: (0, smithy_client_1.expectString)(output.secretAccessKey), - sessionToken: (0, smithy_client_1.expectString)(output.sessionToken), - }; -}; -const deserializeAws_restJson1RoleInfo = (output, context) => { - return { - accountId: (0, smithy_client_1.expectString)(output.accountId), - roleName: (0, smithy_client_1.expectString)(output.roleName), - }; -}; -const deserializeAws_restJson1RoleListType = (output, context) => { - const retVal = (output || []) - .filter((e) => e != null) - .map((entry) => { - if (entry === null) { - return null; - } - return deserializeAws_restJson1RoleInfo(entry, context); - }); - return retVal; -}; -const deserializeMetadata = (output) => { - var _a; - return ({ - httpStatusCode: output.statusCode, - requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"], - }); -}; -const collectBody = (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return Promise.resolve(streamBody); - } - return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); -}; -const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); +const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); const isSerializableHeaderValue = (value) => value !== undefined && value !== null && value !== "" && (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) && (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0); +const _aI = "accountId"; +const _aT = "accessToken"; +const _ai = "account_id"; +const _mR = "maxResults"; +const _mr = "max_result"; +const _nT = "nextToken"; +const _nt = "next_token"; +const _rN = "roleName"; +const _rn = "role_name"; +const _xasbt = "x-amz-sso_bearer_token"; const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { if (encoded.length) { return JSON.parse(encoded); } return {}; }); +const parseErrorBody = async (errorBody, context) => { + const value = await parseBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; const loadRestJsonErrorCode = (output, data) => { const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()); const sanitizeErrorCode = (rawValue) => { @@ -25040,6 +29022,9 @@ const loadRestJsonErrorCode = (output, data) => { if (typeof cleanValue === "number") { cleanValue = cleanValue.toString(); } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } if (cleanValue.indexOf(":") >= 0) { cleanValue = cleanValue.split(":")[0]; } @@ -25063,13 +29048,33 @@ const loadRestJsonErrorCode = (output, data) => { /***/ }), +<<<<<<< HEAD +/***/ 56587: +======= /***/ 44325: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(58896); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(91092)); +const core_1 = __nccwpck_require__(5236); +const util_user_agent_node_1 = __nccwpck_require__(61876); +const config_resolver_1 = __nccwpck_require__(66041); +const hash_node_1 = __nccwpck_require__(86775); +const middleware_retry_1 = __nccwpck_require__(54801); +const node_config_provider_1 = __nccwpck_require__(13079); +const node_http_handler_1 = __nccwpck_require__(54065); +const util_body_length_node_1 = __nccwpck_require__(87693); +const util_retry_1 = __nccwpck_require__(13744); +const runtimeConfig_shared_1 = __nccwpck_require__(6536); +const smithy_client_1 = __nccwpck_require__(33218); +const util_defaults_mode_node_1 = __nccwpck_require__(6061); +const smithy_client_2 = __nccwpck_require__(33218); +======= const tslib_1 = __nccwpck_require__(93717); const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(91092)); const config_resolver_1 = __nccwpck_require__(95406); @@ -25085,34 +29090,33 @@ const runtimeConfig_shared_1 = __nccwpck_require__(97570); const smithy_client_1 = __nccwpck_require__(26351); const util_defaults_mode_node_1 = __nccwpck_require__(64664); const smithy_client_2 = __nccwpck_require__(26351); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getRuntimeConfig = (config) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); return { ...clientSharedValues, ...config, runtime: "node", defaultsMode, - base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64, - base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64, - bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: (_d = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _d !== void 0 ? _d : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: (_e = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _e !== void 0 ? _e : (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: (_f = config === null || config === void 0 ? void 0 : config.region) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: (_g = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _g !== void 0 ? _g : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: (_h = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _h !== void 0 ? _h : (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE, - }), - sha256: (_j = config === null || config === void 0 ? void 0 : config.sha256) !== null && _j !== void 0 ? _j : hash_node_1.Hash.bind(null, "sha256"), - streamCollector: (_k = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _k !== void 0 ? _k : node_http_handler_1.streamCollector, - useDualstackEndpoint: (_l = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _l !== void 0 ? _l : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _m !== void 0 ? _m : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), - utf8Decoder: (_o = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _o !== void 0 ? _o : util_utf8_node_1.fromUtf8, - utf8Encoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.toUtf8, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), }; }; exports.getRuntimeConfig = getRuntimeConfig; @@ -25120,496 +29124,585 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ }), +<<<<<<< HEAD +/***/ 6536: +======= /***/ 97570: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; +<<<<<<< HEAD +const smithy_client_1 = __nccwpck_require__(33218); +const url_parser_1 = __nccwpck_require__(98245); +const util_base64_1 = __nccwpck_require__(14478); +const util_utf8_1 = __nccwpck_require__(38134); +const endpointResolver_1 = __nccwpck_require__(94655); +======= const url_parser_1 = __nccwpck_require__(13797); const endpoints_1 = __nccwpck_require__(68540); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getRuntimeConfig = (config) => { - var _a, _b, _c, _d, _e; - return ({ + return { apiVersion: "2019-06-10", - disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false, - logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {}, - regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider, - serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "SSO", - urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl, - }); + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "SSO", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; }; exports.getRuntimeConfig = getRuntimeConfig; /***/ }), +<<<<<<< HEAD +/***/ 91833: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +======= /***/ 93717: /***/ ((module) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -/****************************************************************************** -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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveRuntimeExtensions = void 0; +const region_config_resolver_1 = __nccwpck_require__(35657); +const protocol_http_1 = __nccwpck_require__(45311); +const smithy_client_1 = __nccwpck_require__(33218); +const asPartial = (t) => t; +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + }; +}; +exports.resolveRuntimeExtensions = resolveRuntimeExtensions; -/***/ }), -/***/ 86582: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ }), -"use strict"; +<<<<<<< HEAD +/***/ 58896: +/***/ ((module) => { -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.STS = void 0; -const AssumeRoleCommand_1 = __nccwpck_require__(94561); -const AssumeRoleWithSAMLCommand_1 = __nccwpck_require__(94498); -const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(59354); -const DecodeAuthorizationMessageCommand_1 = __nccwpck_require__(85251); -const GetAccessKeyInfoCommand_1 = __nccwpck_require__(24862); -const GetCallerIdentityCommand_1 = __nccwpck_require__(68498); -const GetFederationTokenCommand_1 = __nccwpck_require__(73985); -const GetSessionTokenCommand_1 = __nccwpck_require__(8424); -const STSClient_1 = __nccwpck_require__(45029); -class STS extends STSClient_1.STSClient { - assumeRole(args, optionsOrCb, cb) { - const command = new AssumeRoleCommand_1.AssumeRoleCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } - } - assumeRoleWithSAML(args, optionsOrCb, cb) { - const command = new AssumeRoleWithSAMLCommand_1.AssumeRoleWithSAMLCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } - assumeRoleWithWebIdentity(args, optionsOrCb, cb) { - const command = new AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); - } + else { + factory(createExporter(root)); } - decodeAuthorizationMessage(args, optionsOrCb, cb) { - const command = new DecodeAuthorizationMessageCommand_1.DecodeAuthorizationMessageCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); - } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); - } - else { - return this.send(command, optionsOrCb); + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } - getAccessKeyInfo(args, optionsOrCb, cb) { - const command = new GetAccessKeyInfoCommand_1.GetAccessKeyInfoCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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]; } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); + return t; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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] = _; + } } - else { - return this.send(command, optionsOrCb); + 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); } - } - getCallerIdentity(args, optionsOrCb, cb) { - const command = new GetCallerIdentityCommand_1.GetCallerIdentityCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); + return useValue ? value : void 0; + }; + + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + + __setFunctionName = function (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 }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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]; } }; } - else { - return this.send(command, optionsOrCb); + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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); } - } - getFederationToken(args, optionsOrCb, cb) { - const command = new GetFederationTokenCommand_1.GetFederationTokenCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); + 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 = 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; + }; + + __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]; + } } - else { - return this.send(command, optionsOrCb); + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); } - } - getSessionToken(args, optionsOrCb, cb) { - const command = new GetSessionTokenCommand_1.GetSessionTokenCommand(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); + else if (async) { + env.stack.push({ async: true }); } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expect http options but get ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); + return value; + }; + + 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; + }; + + __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; } - else { - return this.send(command, optionsOrCb); + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; } - } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); + + +/***/ }), + +/***/ 57038: +======= +/***/ 86582: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.STS = void 0; +<<<<<<< HEAD +const smithy_client_1 = __nccwpck_require__(33218); +const AssumeRoleCommand_1 = __nccwpck_require__(74605); +const AssumeRoleWithSAMLCommand_1 = __nccwpck_require__(96513); +const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(31785); +const DecodeAuthorizationMessageCommand_1 = __nccwpck_require__(31204); +const GetAccessKeyInfoCommand_1 = __nccwpck_require__(89270); +const GetCallerIdentityCommand_1 = __nccwpck_require__(26200); +const GetFederationTokenCommand_1 = __nccwpck_require__(28153); +const GetSessionTokenCommand_1 = __nccwpck_require__(83008); +const STSClient_1 = __nccwpck_require__(4722); +const commands = { + AssumeRoleCommand: AssumeRoleCommand_1.AssumeRoleCommand, + AssumeRoleWithSAMLCommand: AssumeRoleWithSAMLCommand_1.AssumeRoleWithSAMLCommand, + AssumeRoleWithWebIdentityCommand: AssumeRoleWithWebIdentityCommand_1.AssumeRoleWithWebIdentityCommand, + DecodeAuthorizationMessageCommand: DecodeAuthorizationMessageCommand_1.DecodeAuthorizationMessageCommand, + GetAccessKeyInfoCommand: GetAccessKeyInfoCommand_1.GetAccessKeyInfoCommand, + GetCallerIdentityCommand: GetCallerIdentityCommand_1.GetCallerIdentityCommand, + GetFederationTokenCommand: GetFederationTokenCommand_1.GetFederationTokenCommand, + GetSessionTokenCommand: GetSessionTokenCommand_1.GetSessionTokenCommand, +}; +======= +const AssumeRoleCommand_1 = __nccwpck_require__(94561); +const AssumeRoleWithSAMLCommand_1 = __nccwpck_require__(94498); +const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(59354); +const DecodeAuthorizationMessageCommand_1 = __nccwpck_require__(85251); +const GetAccessKeyInfoCommand_1 = __nccwpck_require__(24862); +const GetCallerIdentityCommand_1 = __nccwpck_require__(68498); +const GetFederationTokenCommand_1 = __nccwpck_require__(73985); +const GetSessionTokenCommand_1 = __nccwpck_require__(8424); +const STSClient_1 = __nccwpck_require__(45029); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +class STS extends STSClient_1.STSClient { } exports.STS = STS; +(0, smithy_client_1.createAggregatedClient)(commands, STS); /***/ }), +<<<<<<< HEAD +/***/ 4722: +======= /***/ 45029: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.STSClient = exports.__Client = void 0; +const middleware_host_header_1 = __nccwpck_require__(23213); +const middleware_logger_1 = __nccwpck_require__(45288); +const middleware_recursion_detection_1 = __nccwpck_require__(13807); +const middleware_user_agent_1 = __nccwpck_require__(3549); +const config_resolver_1 = __nccwpck_require__(66041); +const core_1 = __nccwpck_require__(53938); +const middleware_content_length_1 = __nccwpck_require__(38959); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_retry_1 = __nccwpck_require__(54801); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "__Client", ({ enumerable: true, get: function () { return smithy_client_1.Client; } })); +const httpAuthSchemeProvider_1 = __nccwpck_require__(71613); +const EndpointParameters_1 = __nccwpck_require__(96118); +const runtimeConfig_1 = __nccwpck_require__(81144); +const runtimeExtensions_1 = __nccwpck_require__(86860); +======= exports.STSClient = void 0; const config_resolver_1 = __nccwpck_require__(95406); const middleware_content_length_1 = __nccwpck_require__(96962); @@ -25621,23 +29714,39 @@ const middleware_sdk_sts_1 = __nccwpck_require__(42055); const middleware_user_agent_1 = __nccwpck_require__(54738); const smithy_client_1 = __nccwpck_require__(26351); const runtimeConfig_1 = __nccwpck_require__(88739); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class STSClient extends smithy_client_1.Client { - constructor(configuration) { - const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration); - const _config_1 = (0, config_resolver_1.resolveRegionConfig)(_config_0); - const _config_2 = (0, config_resolver_1.resolveEndpointsConfig)(_config_1); - const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2); - const _config_4 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_3); - const _config_5 = (0, middleware_sdk_sts_1.resolveStsAuthConfig)(_config_4, { stsClientCtor: STSClient }); + getDefaultHttpAuthSchemeParametersProvider() { + return httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider; + } + getIdentityProviderConfigProvider() { + return async (config) => new core_1.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }); + } + constructor(...[configuration]) { + const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {}); + const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0); + const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); + const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); + const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); + const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5); - super(_config_6); - this.config = _config_6; + const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6); + const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []); + super(_config_8); + this.config = _config_8; this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); + this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, { + httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(), + identityProviderConfigProvider: this.getIdentityProviderConfigProvider(), + })); + this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config)); } destroy() { super.destroy(); @@ -25648,26 +29757,174 @@ exports.STSClient = STSClient; /***/ }), +<<<<<<< HEAD +/***/ 43037: +/***/ ((__unused_webpack_module, exports) => { +======= /***/ 94561: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0; +const getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } + else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + }, + }; +}; +exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration; +const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; +exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig; + + +/***/ }), + +/***/ 71613: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0; +const core_1 = __nccwpck_require__(5236); +const util_middleware_1 = __nccwpck_require__(81243); +const STSClient_1 = __nccwpck_require__(4722); +const defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "sts", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +const defaultSTSHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "AssumeRoleWithSAML": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + case "AssumeRoleWithWebIdentity": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider; +const resolveStsAuthConfig = (input) => ({ + ...input, + stsClientCtor: STSClient_1.STSClient, +}); +exports.resolveStsAuthConfig = resolveStsAuthConfig; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, exports.resolveStsAuthConfig)(config); + const config_1 = (0, core_1.resolveAWSSDKSigV4Config)(config_0); + return { + ...config_1, + }; +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + + +/***/ }), + +/***/ 74605: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssumeRoleCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(74034); +const Aws_query_1 = __nccwpck_require__(53984); +======= exports.AssumeRoleCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const middleware_signing_1 = __nccwpck_require__(33233); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(65438); const Aws_query_1 = __nccwpck_require__(42924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class AssumeRoleCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -25676,17 +29933,21 @@ class AssumeRoleCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.AssumeRoleRequestFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, outputFilterSensitiveLog: models_0_1.AssumeRoleResponseFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AWSSecurityTokenServiceV20110615", + operation: "AssumeRole", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_query_1.serializeAws_queryAssumeRoleCommand)(input, context); + return (0, Aws_query_1.se_AssumeRoleCommand)(input, context); } deserialize(output, context) { - return (0, Aws_query_1.deserializeAws_queryAssumeRoleCommand)(output, context); + return (0, Aws_query_1.de_AssumeRoleCommand)(output, context); } } exports.AssumeRoleCommand = AssumeRoleCommand; @@ -25694,24 +29955,48 @@ exports.AssumeRoleCommand = AssumeRoleCommand; /***/ }), +<<<<<<< HEAD +/***/ 96513: +======= /***/ 94498: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.AssumeRoleWithSAMLCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(74034); +const Aws_query_1 = __nccwpck_require__(53984); +======= exports.AssumeRoleWithSAMLCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(65438); const Aws_query_1 = __nccwpck_require__(42924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class AssumeRoleWithSAMLCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleWithSAMLCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -25722,15 +30007,19 @@ class AssumeRoleWithSAMLCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.AssumeRoleWithSAMLResponseFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AWSSecurityTokenServiceV20110615", + operation: "AssumeRoleWithSAML", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_query_1.serializeAws_queryAssumeRoleWithSAMLCommand)(input, context); + return (0, Aws_query_1.se_AssumeRoleWithSAMLCommand)(input, context); } deserialize(output, context) { - return (0, Aws_query_1.deserializeAws_queryAssumeRoleWithSAMLCommand)(output, context); + return (0, Aws_query_1.de_AssumeRoleWithSAMLCommand)(output, context); } } exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand; @@ -25738,24 +30027,48 @@ exports.AssumeRoleWithSAMLCommand = AssumeRoleWithSAMLCommand; /***/ }), +<<<<<<< HEAD +/***/ 31785: +======= /***/ 59354: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.AssumeRoleWithWebIdentityCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(74034); +const Aws_query_1 = __nccwpck_require__(53984); +======= exports.AssumeRoleWithWebIdentityCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(65438); const Aws_query_1 = __nccwpck_require__(42924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, AssumeRoleWithWebIdentityCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -25766,15 +30079,19 @@ class AssumeRoleWithWebIdentityCommand extends smithy_client_1.Command { commandName, inputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityRequestFilterSensitiveLog, outputFilterSensitiveLog: models_0_1.AssumeRoleWithWebIdentityResponseFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AWSSecurityTokenServiceV20110615", + operation: "AssumeRoleWithWebIdentity", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_query_1.serializeAws_queryAssumeRoleWithWebIdentityCommand)(input, context); + return (0, Aws_query_1.se_AssumeRoleWithWebIdentityCommand)(input, context); } deserialize(output, context) { - return (0, Aws_query_1.deserializeAws_queryAssumeRoleWithWebIdentityCommand)(output, context); + return (0, Aws_query_1.de_AssumeRoleWithWebIdentityCommand)(output, context); } } exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand; @@ -25782,26 +30099,48 @@ exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand; /***/ }), +<<<<<<< HEAD +/***/ 31204: +======= /***/ 85251: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.DecodeAuthorizationMessageCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_query_1 = __nccwpck_require__(53984); +======= exports.DecodeAuthorizationMessageCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const middleware_signing_1 = __nccwpck_require__(33233); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(65438); const Aws_query_1 = __nccwpck_require__(42924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class DecodeAuthorizationMessageCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, DecodeAuthorizationMessageCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -25810,17 +30149,21 @@ class DecodeAuthorizationMessageCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.DecodeAuthorizationMessageResponseFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AWSSecurityTokenServiceV20110615", + operation: "DecodeAuthorizationMessage", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_query_1.serializeAws_queryDecodeAuthorizationMessageCommand)(input, context); + return (0, Aws_query_1.se_DecodeAuthorizationMessageCommand)(input, context); } deserialize(output, context) { - return (0, Aws_query_1.deserializeAws_queryDecodeAuthorizationMessageCommand)(output, context); + return (0, Aws_query_1.de_DecodeAuthorizationMessageCommand)(output, context); } } exports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand; @@ -25828,26 +30171,48 @@ exports.DecodeAuthorizationMessageCommand = DecodeAuthorizationMessageCommand; /***/ }), +<<<<<<< HEAD +/***/ 89270: +======= /***/ 24862: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetAccessKeyInfoCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_query_1 = __nccwpck_require__(53984); +======= exports.GetAccessKeyInfoCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const middleware_signing_1 = __nccwpck_require__(33233); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(65438); const Aws_query_1 = __nccwpck_require__(42924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetAccessKeyInfoCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetAccessKeyInfoCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -25856,17 +30221,21 @@ class GetAccessKeyInfoCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetAccessKeyInfoRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetAccessKeyInfoResponseFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AWSSecurityTokenServiceV20110615", + operation: "GetAccessKeyInfo", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_query_1.serializeAws_queryGetAccessKeyInfoCommand)(input, context); + return (0, Aws_query_1.se_GetAccessKeyInfoCommand)(input, context); } deserialize(output, context) { - return (0, Aws_query_1.deserializeAws_queryGetAccessKeyInfoCommand)(output, context); + return (0, Aws_query_1.de_GetAccessKeyInfoCommand)(output, context); } } exports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand; @@ -25874,26 +30243,48 @@ exports.GetAccessKeyInfoCommand = GetAccessKeyInfoCommand; /***/ }), +<<<<<<< HEAD +/***/ 26200: +======= /***/ 68498: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetCallerIdentityCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const Aws_query_1 = __nccwpck_require__(53984); +======= exports.GetCallerIdentityCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const middleware_signing_1 = __nccwpck_require__(33233); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(65438); const Aws_query_1 = __nccwpck_require__(42924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetCallerIdentityCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetCallerIdentityCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -25902,17 +30293,21 @@ class GetCallerIdentityCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetCallerIdentityRequestFilterSensitiveLog, - outputFilterSensitiveLog: models_0_1.GetCallerIdentityResponseFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AWSSecurityTokenServiceV20110615", + operation: "GetCallerIdentity", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_query_1.serializeAws_queryGetCallerIdentityCommand)(input, context); + return (0, Aws_query_1.se_GetCallerIdentityCommand)(input, context); } deserialize(output, context) { - return (0, Aws_query_1.deserializeAws_queryGetCallerIdentityCommand)(output, context); + return (0, Aws_query_1.de_GetCallerIdentityCommand)(output, context); } } exports.GetCallerIdentityCommand = GetCallerIdentityCommand; @@ -25920,26 +30315,49 @@ exports.GetCallerIdentityCommand = GetCallerIdentityCommand; /***/ }), +<<<<<<< HEAD +/***/ 28153: +======= /***/ 73985: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetFederationTokenCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(74034); +const Aws_query_1 = __nccwpck_require__(53984); +======= exports.GetFederationTokenCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const middleware_signing_1 = __nccwpck_require__(33233); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(65438); const Aws_query_1 = __nccwpck_require__(42924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetFederationTokenCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetFederationTokenCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -25948,17 +30366,21 @@ class GetFederationTokenCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetFederationTokenRequestFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, outputFilterSensitiveLog: models_0_1.GetFederationTokenResponseFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AWSSecurityTokenServiceV20110615", + operation: "GetFederationToken", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_query_1.serializeAws_queryGetFederationTokenCommand)(input, context); + return (0, Aws_query_1.se_GetFederationTokenCommand)(input, context); } deserialize(output, context) { - return (0, Aws_query_1.deserializeAws_queryGetFederationTokenCommand)(output, context); + return (0, Aws_query_1.de_GetFederationTokenCommand)(output, context); } } exports.GetFederationTokenCommand = GetFederationTokenCommand; @@ -25966,26 +30388,49 @@ exports.GetFederationTokenCommand = GetFederationTokenCommand; /***/ }), +<<<<<<< HEAD +/***/ 83008: +======= /***/ 8424: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetSessionTokenCommand = exports.$Command = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithy_client_1.Command; } })); +const types_1 = __nccwpck_require__(75751); +const models_0_1 = __nccwpck_require__(74034); +const Aws_query_1 = __nccwpck_require__(53984); +======= exports.GetSessionTokenCommand = void 0; const middleware_serde_1 = __nccwpck_require__(44695); const middleware_signing_1 = __nccwpck_require__(33233); const smithy_client_1 = __nccwpck_require__(26351); const models_0_1 = __nccwpck_require__(65438); const Aws_query_1 = __nccwpck_require__(42924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class GetSessionTokenCommand extends smithy_client_1.Command { + static getEndpointParameterInstructions() { + return { + UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" }, + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } constructor(input) { super(); this.input = input; } resolveMiddleware(clientStack, configuration, options) { this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); - this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(configuration)); + this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, GetSessionTokenCommand.getEndpointParameterInstructions())); const stack = clientStack.concat(this.middlewareStack); const { logger } = configuration; const clientName = "STSClient"; @@ -25994,17 +30439,21 @@ class GetSessionTokenCommand extends smithy_client_1.Command { logger, clientName, commandName, - inputFilterSensitiveLog: models_0_1.GetSessionTokenRequestFilterSensitiveLog, + inputFilterSensitiveLog: (_) => _, outputFilterSensitiveLog: models_0_1.GetSessionTokenResponseFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AWSSecurityTokenServiceV20110615", + operation: "GetSessionToken", + }, }; const { requestHandler } = configuration; return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } serialize(input, context) { - return (0, Aws_query_1.serializeAws_queryGetSessionTokenCommand)(input, context); + return (0, Aws_query_1.se_GetSessionTokenCommand)(input, context); } deserialize(output, context) { - return (0, Aws_query_1.deserializeAws_queryGetSessionTokenCommand)(output, context); + return (0, Aws_query_1.de_GetSessionTokenCommand)(output, context); } } exports.GetSessionTokenCommand = GetSessionTokenCommand; @@ -26012,12 +30461,26 @@ exports.GetSessionTokenCommand = GetSessionTokenCommand; /***/ }), +<<<<<<< HEAD +/***/ 45327: +======= /***/ 24553: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(69393); +tslib_1.__exportStar(__nccwpck_require__(74605), exports); +tslib_1.__exportStar(__nccwpck_require__(96513), exports); +tslib_1.__exportStar(__nccwpck_require__(31785), exports); +tslib_1.__exportStar(__nccwpck_require__(31204), exports); +tslib_1.__exportStar(__nccwpck_require__(89270), exports); +tslib_1.__exportStar(__nccwpck_require__(26200), exports); +tslib_1.__exportStar(__nccwpck_require__(28153), exports); +tslib_1.__exportStar(__nccwpck_require__(83008), exports); +======= const tslib_1 = __nccwpck_require__(75706); tslib_1.__exportStar(__nccwpck_require__(94561), exports); tslib_1.__exportStar(__nccwpck_require__(94498), exports); @@ -26027,22 +30490,45 @@ tslib_1.__exportStar(__nccwpck_require__(24862), exports); tslib_1.__exportStar(__nccwpck_require__(68498), exports); tslib_1.__exportStar(__nccwpck_require__(73985), exports); tslib_1.__exportStar(__nccwpck_require__(8424), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 43950: +======= /***/ 80298: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0; +<<<<<<< HEAD +const defaultStsRoleAssumers_1 = __nccwpck_require__(52359); +const STSClient_1 = __nccwpck_require__(4722); +const getCustomizableStsClientCtor = (baseCtor, customizations) => { + if (!customizations) + return baseCtor; + else + return class CustomizableSTSClient extends baseCtor { + constructor(config) { + super(config); + for (const customization of customizations) { + this.middlewareStack.use(customization); + } + } + }; +}; +const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumer)(stsOptions, getCustomizableStsClientCtor(STSClient_1.STSClient, stsPlugins)); +======= const defaultStsRoleAssumers_1 = __nccwpck_require__(17678); const STSClient_1 = __nccwpck_require__(45029); const getDefaultRoleAssumer = (stsOptions = {}) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumer)(stsOptions, STSClient_1.STSClient); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.getDefaultRoleAssumer = getDefaultRoleAssumer; -const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity)(stsOptions, STSClient_1.STSClient); +const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => (0, defaultStsRoleAssumers_1.getDefaultRoleAssumerWithWebIdentity)(stsOptions, getCustomizableStsClientCtor(STSClient_1.STSClient, stsPlugins)); exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity; const decorateDefaultCredentialProvider = (provider) => (input) => provider({ roleAssumer: (0, exports.getDefaultRoleAssumer)(input), @@ -26054,15 +30540,23 @@ exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; /***/ }), +<<<<<<< HEAD +/***/ 52359: +======= /***/ 17678: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.decorateDefaultCredentialProvider = exports.getDefaultRoleAssumerWithWebIdentity = exports.getDefaultRoleAssumer = void 0; +<<<<<<< HEAD +const AssumeRoleCommand_1 = __nccwpck_require__(74605); +const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(31785); +======= const AssumeRoleCommand_1 = __nccwpck_require__(94561); const AssumeRoleWithWebIdentityCommand_1 = __nccwpck_require__(59354); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const ASSUME_ROLE_DEFAULT_REGION = "us-east-1"; const decorateDefaultRegion = (region) => { if (typeof region !== "function") { @@ -26138,12 +30632,27 @@ exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; /***/ }), +<<<<<<< HEAD +/***/ 96118: +/***/ ((__unused_webpack_module, exports) => { +======= /***/ 11006: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.resolveClientEndpointParameters = void 0; +const resolveClientEndpointParameters = (options) => { + return { + ...options, + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + useGlobalEndpoint: options.useGlobalEndpoint ?? false, + defaultSigningName: "sts", + }; +======= exports.defaultRegionInfoProvider = void 0; const config_resolver_1 = __nccwpck_require__(95406); const regionHash = { @@ -26204,149 +30713,66 @@ const regionHash = { }, ], }, +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; -const partitionHash = { - aws: { - regions: [ - "af-south-1", - "ap-east-1", - "ap-northeast-1", - "ap-northeast-2", - "ap-northeast-3", - "ap-south-1", - "ap-southeast-1", - "ap-southeast-2", - "ap-southeast-3", - "aws-global", - "ca-central-1", - "eu-central-1", - "eu-north-1", - "eu-south-1", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "me-south-1", - "sa-east-1", - "us-east-1", - "us-east-1-fips", - "us-east-2", - "us-east-2-fips", - "us-west-1", - "us-west-1-fips", - "us-west-2", - "us-west-2-fips", - ], - regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "sts.{region}.amazonaws.com", - tags: [], - }, - { - hostname: "sts-fips.{region}.amazonaws.com", - tags: ["fips"], - }, - { - hostname: "sts-fips.{region}.api.aws", - tags: ["dualstack", "fips"], - }, - { - hostname: "sts.{region}.api.aws", - tags: ["dualstack"], - }, - ], - }, - "aws-cn": { - regions: ["cn-north-1", "cn-northwest-1"], - regionRegex: "^cn\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "sts.{region}.amazonaws.com.cn", - tags: [], - }, - { - hostname: "sts-fips.{region}.amazonaws.com.cn", - tags: ["fips"], - }, - { - hostname: "sts-fips.{region}.api.amazonwebservices.com.cn", - tags: ["dualstack", "fips"], - }, - { - hostname: "sts.{region}.api.amazonwebservices.com.cn", - tags: ["dualstack"], - }, - ], - }, - "aws-iso": { - regions: ["us-iso-east-1", "us-iso-west-1"], - regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "sts.{region}.c2s.ic.gov", - tags: [], - }, - { - hostname: "sts-fips.{region}.c2s.ic.gov", - tags: ["fips"], - }, - ], - }, - "aws-iso-b": { - regions: ["us-isob-east-1"], - regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "sts.{region}.sc2s.sgov.gov", - tags: [], - }, - { - hostname: "sts-fips.{region}.sc2s.sgov.gov", - tags: ["fips"], - }, - ], - }, - "aws-us-gov": { - regions: ["us-gov-east-1", "us-gov-east-1-fips", "us-gov-west-1", "us-gov-west-1-fips"], - regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - variants: [ - { - hostname: "sts.{region}.amazonaws.com", - tags: [], - }, - { - hostname: "sts.{region}.amazonaws.com", - tags: ["fips"], - }, - { - hostname: "sts-fips.{region}.api.aws", - tags: ["dualstack", "fips"], - }, - { - hostname: "sts.{region}.api.aws", - tags: ["dualstack"], - }, - ], - }, +exports.resolveClientEndpointParameters = resolveClientEndpointParameters; + + +/***/ }), + +<<<<<<< HEAD +/***/ 28878: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = __nccwpck_require__(34548); +const ruleset_1 = __nccwpck_require__(42882); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_1.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + }); }; -const defaultRegionInfoProvider = async (region, options) => (0, config_resolver_1.getRegionInfo)(region, { - ...options, - signingService: "sts", - regionHash, - partitionHash, -}); -exports.defaultRegionInfoProvider = defaultRegionInfoProvider; +exports.defaultEndpointResolver = defaultEndpointResolver; + + +/***/ }), + +/***/ 42882: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ruleSet = void 0; +const F = "required", G = "type", H = "fn", I = "argv", J = "ref"; +const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "String" }, n = { [F]: true, "default": false, [G]: "Boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y]; +const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] }; +exports.ruleSet = _data; /***/ }), +/***/ 89456: +======= /***/ 64761: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.STSServiceException = void 0; +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(69393); +tslib_1.__exportStar(__nccwpck_require__(4722), exports); +tslib_1.__exportStar(__nccwpck_require__(57038), exports); +tslib_1.__exportStar(__nccwpck_require__(45327), exports); +tslib_1.__exportStar(__nccwpck_require__(42272), exports); +__nccwpck_require__(60698); +tslib_1.__exportStar(__nccwpck_require__(43950), exports); +var STSServiceException_1 = __nccwpck_require__(37599); +======= const tslib_1 = __nccwpck_require__(75706); tslib_1.__exportStar(__nccwpck_require__(86582), exports); tslib_1.__exportStar(__nccwpck_require__(45029), exports); @@ -26354,19 +30780,29 @@ tslib_1.__exportStar(__nccwpck_require__(24553), exports); tslib_1.__exportStar(__nccwpck_require__(80298), exports); tslib_1.__exportStar(__nccwpck_require__(68597), exports); var STSServiceException_1 = __nccwpck_require__(1524); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "STSServiceException", ({ enumerable: true, get: function () { return STSServiceException_1.STSServiceException; } })); /***/ }), +<<<<<<< HEAD +/***/ 37599: +======= /***/ 1524: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.STSServiceException = exports.__ServiceException = void 0; +const smithy_client_1 = __nccwpck_require__(33218); +Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } })); +======= exports.STSServiceException = void 0; const smithy_client_1 = __nccwpck_require__(26351); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class STSServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); @@ -26378,26 +30814,43 @@ exports.STSServiceException = STSServiceException; /***/ }), +<<<<<<< HEAD +/***/ 42272: +======= /***/ 68597: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(69393); +tslib_1.__exportStar(__nccwpck_require__(74034), exports); +======= const tslib_1 = __nccwpck_require__(75706); tslib_1.__exportStar(__nccwpck_require__(65438), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 74034: +======= /***/ 65438: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.GetSessionTokenResponseFilterSensitiveLog = exports.GetFederationTokenResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = exports.AssumeRoleResponseFilterSensitiveLog = exports.CredentialsFilterSensitiveLog = exports.InvalidAuthorizationMessageException = exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0; +const smithy_client_1 = __nccwpck_require__(33218); +const STSServiceException_1 = __nccwpck_require__(37599); +======= exports.GetSessionTokenResponseFilterSensitiveLog = exports.GetSessionTokenRequestFilterSensitiveLog = exports.GetFederationTokenResponseFilterSensitiveLog = exports.FederatedUserFilterSensitiveLog = exports.GetFederationTokenRequestFilterSensitiveLog = exports.GetCallerIdentityResponseFilterSensitiveLog = exports.GetCallerIdentityRequestFilterSensitiveLog = exports.GetAccessKeyInfoResponseFilterSensitiveLog = exports.GetAccessKeyInfoRequestFilterSensitiveLog = exports.DecodeAuthorizationMessageResponseFilterSensitiveLog = exports.DecodeAuthorizationMessageRequestFilterSensitiveLog = exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = exports.AssumeRoleResponseFilterSensitiveLog = exports.CredentialsFilterSensitiveLog = exports.AssumeRoleRequestFilterSensitiveLog = exports.TagFilterSensitiveLog = exports.PolicyDescriptorTypeFilterSensitiveLog = exports.AssumedRoleUserFilterSensitiveLog = exports.InvalidAuthorizationMessageException = exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0; const STSServiceException_1 = __nccwpck_require__(1524); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class ExpiredTokenException extends STSServiceException_1.STSServiceException { constructor(opts) { super({ @@ -26502,100 +30955,69 @@ class InvalidAuthorizationMessageException extends STSServiceException_1.STSServ } } exports.InvalidAuthorizationMessageException = InvalidAuthorizationMessageException; -const AssumedRoleUserFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AssumedRoleUserFilterSensitiveLog = AssumedRoleUserFilterSensitiveLog; -const PolicyDescriptorTypeFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.PolicyDescriptorTypeFilterSensitiveLog = PolicyDescriptorTypeFilterSensitiveLog; -const TagFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.TagFilterSensitiveLog = TagFilterSensitiveLog; -const AssumeRoleRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.AssumeRoleRequestFilterSensitiveLog = AssumeRoleRequestFilterSensitiveLog; const CredentialsFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.SecretAccessKey && { SecretAccessKey: smithy_client_1.SENSITIVE_STRING }), }); exports.CredentialsFilterSensitiveLog = CredentialsFilterSensitiveLog; const AssumeRoleResponseFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }), }); exports.AssumeRoleResponseFilterSensitiveLog = AssumeRoleResponseFilterSensitiveLog; const AssumeRoleWithSAMLRequestFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.SAMLAssertion && { SAMLAssertion: smithy_client_1.SENSITIVE_STRING }), }); exports.AssumeRoleWithSAMLRequestFilterSensitiveLog = AssumeRoleWithSAMLRequestFilterSensitiveLog; const AssumeRoleWithSAMLResponseFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }), }); exports.AssumeRoleWithSAMLResponseFilterSensitiveLog = AssumeRoleWithSAMLResponseFilterSensitiveLog; const AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.WebIdentityToken && { WebIdentityToken: smithy_client_1.SENSITIVE_STRING }), }); exports.AssumeRoleWithWebIdentityRequestFilterSensitiveLog = AssumeRoleWithWebIdentityRequestFilterSensitiveLog; const AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }), }); exports.AssumeRoleWithWebIdentityResponseFilterSensitiveLog = AssumeRoleWithWebIdentityResponseFilterSensitiveLog; -const DecodeAuthorizationMessageRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DecodeAuthorizationMessageRequestFilterSensitiveLog = DecodeAuthorizationMessageRequestFilterSensitiveLog; -const DecodeAuthorizationMessageResponseFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.DecodeAuthorizationMessageResponseFilterSensitiveLog = DecodeAuthorizationMessageResponseFilterSensitiveLog; -const GetAccessKeyInfoRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetAccessKeyInfoRequestFilterSensitiveLog = GetAccessKeyInfoRequestFilterSensitiveLog; -const GetAccessKeyInfoResponseFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetAccessKeyInfoResponseFilterSensitiveLog = GetAccessKeyInfoResponseFilterSensitiveLog; -const GetCallerIdentityRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetCallerIdentityRequestFilterSensitiveLog = GetCallerIdentityRequestFilterSensitiveLog; -const GetCallerIdentityResponseFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetCallerIdentityResponseFilterSensitiveLog = GetCallerIdentityResponseFilterSensitiveLog; -const GetFederationTokenRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetFederationTokenRequestFilterSensitiveLog = GetFederationTokenRequestFilterSensitiveLog; -const FederatedUserFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.FederatedUserFilterSensitiveLog = FederatedUserFilterSensitiveLog; const GetFederationTokenResponseFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }), }); exports.GetFederationTokenResponseFilterSensitiveLog = GetFederationTokenResponseFilterSensitiveLog; -const GetSessionTokenRequestFilterSensitiveLog = (obj) => ({ - ...obj, -}); -exports.GetSessionTokenRequestFilterSensitiveLog = GetSessionTokenRequestFilterSensitiveLog; const GetSessionTokenResponseFilterSensitiveLog = (obj) => ({ ...obj, + ...(obj.Credentials && { Credentials: (0, exports.CredentialsFilterSensitiveLog)(obj.Credentials) }), }); exports.GetSessionTokenResponseFilterSensitiveLog = GetSessionTokenResponseFilterSensitiveLog; /***/ }), +<<<<<<< HEAD +/***/ 53984: +======= /***/ 42924: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.de_GetSessionTokenCommand = exports.de_GetFederationTokenCommand = exports.de_GetCallerIdentityCommand = exports.de_GetAccessKeyInfoCommand = exports.de_DecodeAuthorizationMessageCommand = exports.de_AssumeRoleWithWebIdentityCommand = exports.de_AssumeRoleWithSAMLCommand = exports.de_AssumeRoleCommand = exports.se_GetSessionTokenCommand = exports.se_GetFederationTokenCommand = exports.se_GetCallerIdentityCommand = exports.se_GetAccessKeyInfoCommand = exports.se_DecodeAuthorizationMessageCommand = exports.se_AssumeRoleWithWebIdentityCommand = exports.se_AssumeRoleWithSAMLCommand = exports.se_AssumeRoleCommand = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const smithy_client_1 = __nccwpck_require__(33218); +const fast_xml_parser_1 = __nccwpck_require__(6714); +const models_0_1 = __nccwpck_require__(74034); +const STSServiceException_1 = __nccwpck_require__(37599); +const se_AssumeRoleCommand = async (input, context) => { + const headers = SHARED_HEADERS; +======= exports.deserializeAws_queryGetSessionTokenCommand = exports.deserializeAws_queryGetFederationTokenCommand = exports.deserializeAws_queryGetCallerIdentityCommand = exports.deserializeAws_queryGetAccessKeyInfoCommand = exports.deserializeAws_queryDecodeAuthorizationMessageCommand = exports.deserializeAws_queryAssumeRoleWithWebIdentityCommand = exports.deserializeAws_queryAssumeRoleWithSAMLCommand = exports.deserializeAws_queryAssumeRoleCommand = exports.serializeAws_queryGetSessionTokenCommand = exports.serializeAws_queryGetFederationTokenCommand = exports.serializeAws_queryGetCallerIdentityCommand = exports.serializeAws_queryGetAccessKeyInfoCommand = exports.serializeAws_queryDecodeAuthorizationMessageCommand = exports.serializeAws_queryAssumeRoleWithWebIdentityCommand = exports.serializeAws_queryAssumeRoleWithSAMLCommand = exports.serializeAws_queryAssumeRoleCommand = void 0; const protocol_http_1 = __nccwpck_require__(35712); const smithy_client_1 = __nccwpck_require__(26351); @@ -26607,628 +31029,638 @@ const serializeAws_queryAssumeRoleCommand = async (input, context) => { const headers = { "content-type": "application/x-www-form-urlencoded", }; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 let body; body = buildFormUrlencodedString({ - ...serializeAws_queryAssumeRoleRequest(input, context), - Action: "AssumeRole", - Version: "2011-06-15", + ...se_AssumeRoleRequest(input, context), + [_A]: _AR, + [_V]: _, }); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -exports.serializeAws_queryAssumeRoleCommand = serializeAws_queryAssumeRoleCommand; -const serializeAws_queryAssumeRoleWithSAMLCommand = async (input, context) => { - const headers = { - "content-type": "application/x-www-form-urlencoded", - }; +exports.se_AssumeRoleCommand = se_AssumeRoleCommand; +const se_AssumeRoleWithSAMLCommand = async (input, context) => { + const headers = SHARED_HEADERS; let body; body = buildFormUrlencodedString({ - ...serializeAws_queryAssumeRoleWithSAMLRequest(input, context), - Action: "AssumeRoleWithSAML", - Version: "2011-06-15", + ...se_AssumeRoleWithSAMLRequest(input, context), + [_A]: _ARWSAML, + [_V]: _, }); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -exports.serializeAws_queryAssumeRoleWithSAMLCommand = serializeAws_queryAssumeRoleWithSAMLCommand; -const serializeAws_queryAssumeRoleWithWebIdentityCommand = async (input, context) => { - const headers = { - "content-type": "application/x-www-form-urlencoded", - }; +exports.se_AssumeRoleWithSAMLCommand = se_AssumeRoleWithSAMLCommand; +const se_AssumeRoleWithWebIdentityCommand = async (input, context) => { + const headers = SHARED_HEADERS; let body; body = buildFormUrlencodedString({ - ...serializeAws_queryAssumeRoleWithWebIdentityRequest(input, context), - Action: "AssumeRoleWithWebIdentity", - Version: "2011-06-15", + ...se_AssumeRoleWithWebIdentityRequest(input, context), + [_A]: _ARWWI, + [_V]: _, }); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -exports.serializeAws_queryAssumeRoleWithWebIdentityCommand = serializeAws_queryAssumeRoleWithWebIdentityCommand; -const serializeAws_queryDecodeAuthorizationMessageCommand = async (input, context) => { - const headers = { - "content-type": "application/x-www-form-urlencoded", - }; +exports.se_AssumeRoleWithWebIdentityCommand = se_AssumeRoleWithWebIdentityCommand; +const se_DecodeAuthorizationMessageCommand = async (input, context) => { + const headers = SHARED_HEADERS; let body; body = buildFormUrlencodedString({ - ...serializeAws_queryDecodeAuthorizationMessageRequest(input, context), - Action: "DecodeAuthorizationMessage", - Version: "2011-06-15", + ...se_DecodeAuthorizationMessageRequest(input, context), + [_A]: _DAM, + [_V]: _, }); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -exports.serializeAws_queryDecodeAuthorizationMessageCommand = serializeAws_queryDecodeAuthorizationMessageCommand; -const serializeAws_queryGetAccessKeyInfoCommand = async (input, context) => { - const headers = { - "content-type": "application/x-www-form-urlencoded", - }; +exports.se_DecodeAuthorizationMessageCommand = se_DecodeAuthorizationMessageCommand; +const se_GetAccessKeyInfoCommand = async (input, context) => { + const headers = SHARED_HEADERS; let body; body = buildFormUrlencodedString({ - ...serializeAws_queryGetAccessKeyInfoRequest(input, context), - Action: "GetAccessKeyInfo", - Version: "2011-06-15", + ...se_GetAccessKeyInfoRequest(input, context), + [_A]: _GAKI, + [_V]: _, }); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -exports.serializeAws_queryGetAccessKeyInfoCommand = serializeAws_queryGetAccessKeyInfoCommand; -const serializeAws_queryGetCallerIdentityCommand = async (input, context) => { - const headers = { - "content-type": "application/x-www-form-urlencoded", - }; +exports.se_GetAccessKeyInfoCommand = se_GetAccessKeyInfoCommand; +const se_GetCallerIdentityCommand = async (input, context) => { + const headers = SHARED_HEADERS; let body; body = buildFormUrlencodedString({ - ...serializeAws_queryGetCallerIdentityRequest(input, context), - Action: "GetCallerIdentity", - Version: "2011-06-15", + ...se_GetCallerIdentityRequest(input, context), + [_A]: _GCI, + [_V]: _, }); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -exports.serializeAws_queryGetCallerIdentityCommand = serializeAws_queryGetCallerIdentityCommand; -const serializeAws_queryGetFederationTokenCommand = async (input, context) => { - const headers = { - "content-type": "application/x-www-form-urlencoded", - }; +exports.se_GetCallerIdentityCommand = se_GetCallerIdentityCommand; +const se_GetFederationTokenCommand = async (input, context) => { + const headers = SHARED_HEADERS; let body; body = buildFormUrlencodedString({ - ...serializeAws_queryGetFederationTokenRequest(input, context), - Action: "GetFederationToken", - Version: "2011-06-15", + ...se_GetFederationTokenRequest(input, context), + [_A]: _GFT, + [_V]: _, }); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -exports.serializeAws_queryGetFederationTokenCommand = serializeAws_queryGetFederationTokenCommand; -const serializeAws_queryGetSessionTokenCommand = async (input, context) => { - const headers = { - "content-type": "application/x-www-form-urlencoded", - }; +exports.se_GetFederationTokenCommand = se_GetFederationTokenCommand; +const se_GetSessionTokenCommand = async (input, context) => { + const headers = SHARED_HEADERS; let body; body = buildFormUrlencodedString({ - ...serializeAws_queryGetSessionTokenRequest(input, context), - Action: "GetSessionToken", - Version: "2011-06-15", + ...se_GetSessionTokenRequest(input, context), + [_A]: _GST, + [_V]: _, }); return buildHttpRpcRequest(context, headers, "/", undefined, body); }; -exports.serializeAws_queryGetSessionTokenCommand = serializeAws_queryGetSessionTokenCommand; -const deserializeAws_queryAssumeRoleCommand = async (output, context) => { +exports.se_GetSessionTokenCommand = se_GetSessionTokenCommand; +const de_AssumeRoleCommand = async (output, context) => { if (output.statusCode >= 300) { - return deserializeAws_queryAssumeRoleCommandError(output, context); + return de_AssumeRoleCommandError(output, context); } const data = await parseBody(output.body, context); let contents = {}; - contents = deserializeAws_queryAssumeRoleResponse(data.AssumeRoleResult, context); + contents = de_AssumeRoleResponse(data.AssumeRoleResult, context); const response = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; -exports.deserializeAws_queryAssumeRoleCommand = deserializeAws_queryAssumeRoleCommand; -const deserializeAws_queryAssumeRoleCommandError = async (output, context) => { +exports.de_AssumeRoleCommand = de_AssumeRoleCommand; +const de_AssumeRoleCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); switch (errorCode) { case "ExpiredTokenException": case "com.amazonaws.sts#ExpiredTokenException": - throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context); - case "MalformedPolicyDocumentException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "MalformedPolicyDocument": case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context); - case "PackedPolicyTooLargeException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PackedPolicyTooLarge": case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context); + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); case "RegionDisabledException": case "com.amazonaws.sts#RegionDisabledException": - throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context); + throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: STSServiceException_1.STSServiceException, errorCode, }); } }; -const deserializeAws_queryAssumeRoleWithSAMLCommand = async (output, context) => { +const de_AssumeRoleWithSAMLCommand = async (output, context) => { if (output.statusCode >= 300) { - return deserializeAws_queryAssumeRoleWithSAMLCommandError(output, context); + return de_AssumeRoleWithSAMLCommandError(output, context); } const data = await parseBody(output.body, context); let contents = {}; - contents = deserializeAws_queryAssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context); + contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context); const response = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; -exports.deserializeAws_queryAssumeRoleWithSAMLCommand = deserializeAws_queryAssumeRoleWithSAMLCommand; -const deserializeAws_queryAssumeRoleWithSAMLCommandError = async (output, context) => { +exports.de_AssumeRoleWithSAMLCommand = de_AssumeRoleWithSAMLCommand; +const de_AssumeRoleWithSAMLCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); switch (errorCode) { case "ExpiredTokenException": case "com.amazonaws.sts#ExpiredTokenException": - throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context); - case "IDPRejectedClaimException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "IDPRejectedClaim": case "com.amazonaws.sts#IDPRejectedClaimException": - throw await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context); - case "InvalidIdentityTokenException": + throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); + case "InvalidIdentityToken": case "com.amazonaws.sts#InvalidIdentityTokenException": - throw await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context); - case "MalformedPolicyDocumentException": + throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); + case "MalformedPolicyDocument": case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context); - case "PackedPolicyTooLargeException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PackedPolicyTooLarge": case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context); + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); case "RegionDisabledException": case "com.amazonaws.sts#RegionDisabledException": - throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context); + throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: STSServiceException_1.STSServiceException, errorCode, }); } }; -const deserializeAws_queryAssumeRoleWithWebIdentityCommand = async (output, context) => { +const de_AssumeRoleWithWebIdentityCommand = async (output, context) => { if (output.statusCode >= 300) { - return deserializeAws_queryAssumeRoleWithWebIdentityCommandError(output, context); + return de_AssumeRoleWithWebIdentityCommandError(output, context); } const data = await parseBody(output.body, context); let contents = {}; - contents = deserializeAws_queryAssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); + contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context); const response = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; -exports.deserializeAws_queryAssumeRoleWithWebIdentityCommand = deserializeAws_queryAssumeRoleWithWebIdentityCommand; -const deserializeAws_queryAssumeRoleWithWebIdentityCommandError = async (output, context) => { +exports.de_AssumeRoleWithWebIdentityCommand = de_AssumeRoleWithWebIdentityCommand; +const de_AssumeRoleWithWebIdentityCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); switch (errorCode) { case "ExpiredTokenException": case "com.amazonaws.sts#ExpiredTokenException": - throw await deserializeAws_queryExpiredTokenExceptionResponse(parsedOutput, context); - case "IDPCommunicationErrorException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "IDPCommunicationError": case "com.amazonaws.sts#IDPCommunicationErrorException": - throw await deserializeAws_queryIDPCommunicationErrorExceptionResponse(parsedOutput, context); - case "IDPRejectedClaimException": + throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context); + case "IDPRejectedClaim": case "com.amazonaws.sts#IDPRejectedClaimException": - throw await deserializeAws_queryIDPRejectedClaimExceptionResponse(parsedOutput, context); - case "InvalidIdentityTokenException": + throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context); + case "InvalidIdentityToken": case "com.amazonaws.sts#InvalidIdentityTokenException": - throw await deserializeAws_queryInvalidIdentityTokenExceptionResponse(parsedOutput, context); - case "MalformedPolicyDocumentException": + throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context); + case "MalformedPolicyDocument": case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context); - case "PackedPolicyTooLargeException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PackedPolicyTooLarge": case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context); + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); case "RegionDisabledException": case "com.amazonaws.sts#RegionDisabledException": - throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context); + throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: STSServiceException_1.STSServiceException, errorCode, }); } }; -const deserializeAws_queryDecodeAuthorizationMessageCommand = async (output, context) => { +const de_DecodeAuthorizationMessageCommand = async (output, context) => { if (output.statusCode >= 300) { - return deserializeAws_queryDecodeAuthorizationMessageCommandError(output, context); + return de_DecodeAuthorizationMessageCommandError(output, context); } const data = await parseBody(output.body, context); let contents = {}; - contents = deserializeAws_queryDecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context); + contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context); const response = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; -exports.deserializeAws_queryDecodeAuthorizationMessageCommand = deserializeAws_queryDecodeAuthorizationMessageCommand; -const deserializeAws_queryDecodeAuthorizationMessageCommandError = async (output, context) => { +exports.de_DecodeAuthorizationMessageCommand = de_DecodeAuthorizationMessageCommand; +const de_DecodeAuthorizationMessageCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); switch (errorCode) { case "InvalidAuthorizationMessageException": case "com.amazonaws.sts#InvalidAuthorizationMessageException": - throw await deserializeAws_queryInvalidAuthorizationMessageExceptionResponse(parsedOutput, context); + throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: STSServiceException_1.STSServiceException, errorCode, }); } }; -const deserializeAws_queryGetAccessKeyInfoCommand = async (output, context) => { +const de_GetAccessKeyInfoCommand = async (output, context) => { if (output.statusCode >= 300) { - return deserializeAws_queryGetAccessKeyInfoCommandError(output, context); + return de_GetAccessKeyInfoCommandError(output, context); } const data = await parseBody(output.body, context); let contents = {}; - contents = deserializeAws_queryGetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context); + contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context); const response = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; -exports.deserializeAws_queryGetAccessKeyInfoCommand = deserializeAws_queryGetAccessKeyInfoCommand; -const deserializeAws_queryGetAccessKeyInfoCommandError = async (output, context) => { +exports.de_GetAccessKeyInfoCommand = de_GetAccessKeyInfoCommand; +const de_GetAccessKeyInfoCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: STSServiceException_1.STSServiceException, errorCode, }); }; -const deserializeAws_queryGetCallerIdentityCommand = async (output, context) => { +const de_GetCallerIdentityCommand = async (output, context) => { if (output.statusCode >= 300) { - return deserializeAws_queryGetCallerIdentityCommandError(output, context); + return de_GetCallerIdentityCommandError(output, context); } const data = await parseBody(output.body, context); let contents = {}; - contents = deserializeAws_queryGetCallerIdentityResponse(data.GetCallerIdentityResult, context); + contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context); const response = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; -exports.deserializeAws_queryGetCallerIdentityCommand = deserializeAws_queryGetCallerIdentityCommand; -const deserializeAws_queryGetCallerIdentityCommandError = async (output, context) => { +exports.de_GetCallerIdentityCommand = de_GetCallerIdentityCommand; +const de_GetCallerIdentityCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: STSServiceException_1.STSServiceException, errorCode, }); }; -const deserializeAws_queryGetFederationTokenCommand = async (output, context) => { +const de_GetFederationTokenCommand = async (output, context) => { if (output.statusCode >= 300) { - return deserializeAws_queryGetFederationTokenCommandError(output, context); + return de_GetFederationTokenCommandError(output, context); } const data = await parseBody(output.body, context); let contents = {}; - contents = deserializeAws_queryGetFederationTokenResponse(data.GetFederationTokenResult, context); + contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context); const response = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; -exports.deserializeAws_queryGetFederationTokenCommand = deserializeAws_queryGetFederationTokenCommand; -const deserializeAws_queryGetFederationTokenCommandError = async (output, context) => { +exports.de_GetFederationTokenCommand = de_GetFederationTokenCommand; +const de_GetFederationTokenCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); switch (errorCode) { - case "MalformedPolicyDocumentException": + case "MalformedPolicyDocument": case "com.amazonaws.sts#MalformedPolicyDocumentException": - throw await deserializeAws_queryMalformedPolicyDocumentExceptionResponse(parsedOutput, context); - case "PackedPolicyTooLargeException": + throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context); + case "PackedPolicyTooLarge": case "com.amazonaws.sts#PackedPolicyTooLargeException": - throw await deserializeAws_queryPackedPolicyTooLargeExceptionResponse(parsedOutput, context); + throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context); case "RegionDisabledException": case "com.amazonaws.sts#RegionDisabledException": - throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context); + throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: STSServiceException_1.STSServiceException, errorCode, }); } }; -const deserializeAws_queryGetSessionTokenCommand = async (output, context) => { +const de_GetSessionTokenCommand = async (output, context) => { if (output.statusCode >= 300) { - return deserializeAws_queryGetSessionTokenCommandError(output, context); + return de_GetSessionTokenCommandError(output, context); } const data = await parseBody(output.body, context); let contents = {}; - contents = deserializeAws_queryGetSessionTokenResponse(data.GetSessionTokenResult, context); + contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context); const response = { $metadata: deserializeMetadata(output), ...contents, }; - return Promise.resolve(response); + return response; }; -exports.deserializeAws_queryGetSessionTokenCommand = deserializeAws_queryGetSessionTokenCommand; -const deserializeAws_queryGetSessionTokenCommandError = async (output, context) => { +exports.de_GetSessionTokenCommand = de_GetSessionTokenCommand; +const de_GetSessionTokenCommandError = async (output, context) => { const parsedOutput = { ...output, - body: await parseBody(output.body, context), + body: await parseErrorBody(output.body, context), }; const errorCode = loadQueryErrorCode(output, parsedOutput.body); switch (errorCode) { case "RegionDisabledException": case "com.amazonaws.sts#RegionDisabledException": - throw await deserializeAws_queryRegionDisabledExceptionResponse(parsedOutput, context); + throw await de_RegionDisabledExceptionRes(parsedOutput, context); default: const parsedBody = parsedOutput.body; - (0, smithy_client_1.throwDefaultError)({ + return throwDefaultError({ output, parsedBody: parsedBody.Error, - exceptionCtor: STSServiceException_1.STSServiceException, errorCode, }); } }; -const deserializeAws_queryExpiredTokenExceptionResponse = async (parsedOutput, context) => { +const de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { const body = parsedOutput.body; - const deserialized = deserializeAws_queryExpiredTokenException(body.Error, context); + const deserialized = de_ExpiredTokenException(body.Error, context); const exception = new models_0_1.ExpiredTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, }); return (0, smithy_client_1.decorateServiceException)(exception, body); }; -const deserializeAws_queryIDPCommunicationErrorExceptionResponse = async (parsedOutput, context) => { +const de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => { const body = parsedOutput.body; - const deserialized = deserializeAws_queryIDPCommunicationErrorException(body.Error, context); + const deserialized = de_IDPCommunicationErrorException(body.Error, context); const exception = new models_0_1.IDPCommunicationErrorException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, }); return (0, smithy_client_1.decorateServiceException)(exception, body); }; -const deserializeAws_queryIDPRejectedClaimExceptionResponse = async (parsedOutput, context) => { +const de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => { const body = parsedOutput.body; - const deserialized = deserializeAws_queryIDPRejectedClaimException(body.Error, context); + const deserialized = de_IDPRejectedClaimException(body.Error, context); const exception = new models_0_1.IDPRejectedClaimException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, }); return (0, smithy_client_1.decorateServiceException)(exception, body); }; -const deserializeAws_queryInvalidAuthorizationMessageExceptionResponse = async (parsedOutput, context) => { +const de_InvalidAuthorizationMessageExceptionRes = async (parsedOutput, context) => { const body = parsedOutput.body; - const deserialized = deserializeAws_queryInvalidAuthorizationMessageException(body.Error, context); + const deserialized = de_InvalidAuthorizationMessageException(body.Error, context); const exception = new models_0_1.InvalidAuthorizationMessageException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, }); return (0, smithy_client_1.decorateServiceException)(exception, body); }; -const deserializeAws_queryInvalidIdentityTokenExceptionResponse = async (parsedOutput, context) => { +const de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => { const body = parsedOutput.body; - const deserialized = deserializeAws_queryInvalidIdentityTokenException(body.Error, context); + const deserialized = de_InvalidIdentityTokenException(body.Error, context); const exception = new models_0_1.InvalidIdentityTokenException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, }); return (0, smithy_client_1.decorateServiceException)(exception, body); }; -const deserializeAws_queryMalformedPolicyDocumentExceptionResponse = async (parsedOutput, context) => { +const de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => { const body = parsedOutput.body; - const deserialized = deserializeAws_queryMalformedPolicyDocumentException(body.Error, context); + const deserialized = de_MalformedPolicyDocumentException(body.Error, context); const exception = new models_0_1.MalformedPolicyDocumentException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, }); return (0, smithy_client_1.decorateServiceException)(exception, body); }; -const deserializeAws_queryPackedPolicyTooLargeExceptionResponse = async (parsedOutput, context) => { +const de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => { const body = parsedOutput.body; - const deserialized = deserializeAws_queryPackedPolicyTooLargeException(body.Error, context); + const deserialized = de_PackedPolicyTooLargeException(body.Error, context); const exception = new models_0_1.PackedPolicyTooLargeException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, }); return (0, smithy_client_1.decorateServiceException)(exception, body); }; -const deserializeAws_queryRegionDisabledExceptionResponse = async (parsedOutput, context) => { +const de_RegionDisabledExceptionRes = async (parsedOutput, context) => { const body = parsedOutput.body; - const deserialized = deserializeAws_queryRegionDisabledException(body.Error, context); + const deserialized = de_RegionDisabledException(body.Error, context); const exception = new models_0_1.RegionDisabledException({ $metadata: deserializeMetadata(parsedOutput), ...deserialized, }); return (0, smithy_client_1.decorateServiceException)(exception, body); }; -const serializeAws_queryAssumeRoleRequest = (input, context) => { +const se_AssumeRoleRequest = (input, context) => { const entries = {}; - if (input.RoleArn != null) { - entries["RoleArn"] = input.RoleArn; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; } - if (input.RoleSessionName != null) { - entries["RoleSessionName"] = input.RoleSessionName; + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; } - if (input.PolicyArns != null) { - const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context); + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } Object.entries(memberEntries).forEach(([key, value]) => { const loc = `PolicyArns.${key}`; entries[loc] = value; }); } - if (input.Policy != null) { - entries["Policy"] = input.Policy; + if (input[_P] != null) { + entries[_P] = input[_P]; } - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; } - if (input.Tags != null) { - const memberEntries = serializeAws_querytagListType(input.Tags, context); + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (input[_T]?.length === 0) { + entries.Tags = []; + } Object.entries(memberEntries).forEach(([key, value]) => { const loc = `Tags.${key}`; entries[loc] = value; }); } - if (input.TransitiveTagKeys != null) { - const memberEntries = serializeAws_querytagKeyListType(input.TransitiveTagKeys, context); + if (input[_TTK] != null) { + const memberEntries = se_tagKeyListType(input[_TTK], context); + if (input[_TTK]?.length === 0) { + entries.TransitiveTagKeys = []; + } Object.entries(memberEntries).forEach(([key, value]) => { const loc = `TransitiveTagKeys.${key}`; entries[loc] = value; }); } - if (input.ExternalId != null) { - entries["ExternalId"] = input.ExternalId; + if (input[_EI] != null) { + entries[_EI] = input[_EI]; } - if (input.SerialNumber != null) { - entries["SerialNumber"] = input.SerialNumber; + if (input[_SN] != null) { + entries[_SN] = input[_SN]; } - if (input.TokenCode != null) { - entries["TokenCode"] = input.TokenCode; + if (input[_TC] != null) { + entries[_TC] = input[_TC]; } - if (input.SourceIdentity != null) { - entries["SourceIdentity"] = input.SourceIdentity; + if (input[_SI] != null) { + entries[_SI] = input[_SI]; + } + if (input[_PC] != null) { + const memberEntries = se_ProvidedContextsListType(input[_PC], context); + if (input[_PC]?.length === 0) { + entries.ProvidedContexts = []; + } + Object.entries(memberEntries).forEach(([key, value]) => { + const loc = `ProvidedContexts.${key}`; + entries[loc] = value; + }); } return entries; }; -const serializeAws_queryAssumeRoleWithSAMLRequest = (input, context) => { +const se_AssumeRoleWithSAMLRequest = (input, context) => { const entries = {}; - if (input.RoleArn != null) { - entries["RoleArn"] = input.RoleArn; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; } - if (input.PrincipalArn != null) { - entries["PrincipalArn"] = input.PrincipalArn; + if (input[_PAr] != null) { + entries[_PAr] = input[_PAr]; } - if (input.SAMLAssertion != null) { - entries["SAMLAssertion"] = input.SAMLAssertion; + if (input[_SAMLA] != null) { + entries[_SAMLA] = input[_SAMLA]; } - if (input.PolicyArns != null) { - const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context); + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } Object.entries(memberEntries).forEach(([key, value]) => { const loc = `PolicyArns.${key}`; entries[loc] = value; }); } - if (input.Policy != null) { - entries["Policy"] = input.Policy; + if (input[_P] != null) { + entries[_P] = input[_P]; } - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; } return entries; }; -const serializeAws_queryAssumeRoleWithWebIdentityRequest = (input, context) => { +const se_AssumeRoleWithWebIdentityRequest = (input, context) => { const entries = {}; - if (input.RoleArn != null) { - entries["RoleArn"] = input.RoleArn; + if (input[_RA] != null) { + entries[_RA] = input[_RA]; } - if (input.RoleSessionName != null) { - entries["RoleSessionName"] = input.RoleSessionName; + if (input[_RSN] != null) { + entries[_RSN] = input[_RSN]; } - if (input.WebIdentityToken != null) { - entries["WebIdentityToken"] = input.WebIdentityToken; + if (input[_WIT] != null) { + entries[_WIT] = input[_WIT]; } - if (input.ProviderId != null) { - entries["ProviderId"] = input.ProviderId; + if (input[_PI] != null) { + entries[_PI] = input[_PI]; } - if (input.PolicyArns != null) { - const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context); + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } Object.entries(memberEntries).forEach(([key, value]) => { const loc = `PolicyArns.${key}`; entries[loc] = value; }); } - if (input.Policy != null) { - entries["Policy"] = input.Policy; + if (input[_P] != null) { + entries[_P] = input[_P]; } - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; } return entries; }; -const serializeAws_queryDecodeAuthorizationMessageRequest = (input, context) => { +const se_DecodeAuthorizationMessageRequest = (input, context) => { const entries = {}; - if (input.EncodedMessage != null) { - entries["EncodedMessage"] = input.EncodedMessage; + if (input[_EM] != null) { + entries[_EM] = input[_EM]; } return entries; }; -const serializeAws_queryGetAccessKeyInfoRequest = (input, context) => { +const se_GetAccessKeyInfoRequest = (input, context) => { const entries = {}; - if (input.AccessKeyId != null) { - entries["AccessKeyId"] = input.AccessKeyId; + if (input[_AKI] != null) { + entries[_AKI] = input[_AKI]; } return entries; }; -const serializeAws_queryGetCallerIdentityRequest = (input, context) => { +const se_GetCallerIdentityRequest = (input, context) => { const entries = {}; return entries; }; -const serializeAws_queryGetFederationTokenRequest = (input, context) => { +const se_GetFederationTokenRequest = (input, context) => { const entries = {}; - if (input.Name != null) { - entries["Name"] = input.Name; + if (input[_N] != null) { + entries[_N] = input[_N]; } - if (input.Policy != null) { - entries["Policy"] = input.Policy; + if (input[_P] != null) { + entries[_P] = input[_P]; } - if (input.PolicyArns != null) { - const memberEntries = serializeAws_querypolicyDescriptorListType(input.PolicyArns, context); + if (input[_PA] != null) { + const memberEntries = se_policyDescriptorListType(input[_PA], context); + if (input[_PA]?.length === 0) { + entries.PolicyArns = []; + } Object.entries(memberEntries).forEach(([key, value]) => { const loc = `PolicyArns.${key}`; entries[loc] = value; }); } - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; } - if (input.Tags != null) { - const memberEntries = serializeAws_querytagListType(input.Tags, context); + if (input[_T] != null) { + const memberEntries = se_tagListType(input[_T], context); + if (input[_T]?.length === 0) { + entries.Tags = []; + } Object.entries(memberEntries).forEach(([key, value]) => { const loc = `Tags.${key}`; entries[loc] = value; @@ -27236,27 +31668,27 @@ const serializeAws_queryGetFederationTokenRequest = (input, context) => { } return entries; }; -const serializeAws_queryGetSessionTokenRequest = (input, context) => { +const se_GetSessionTokenRequest = (input, context) => { const entries = {}; - if (input.DurationSeconds != null) { - entries["DurationSeconds"] = input.DurationSeconds; + if (input[_DS] != null) { + entries[_DS] = input[_DS]; } - if (input.SerialNumber != null) { - entries["SerialNumber"] = input.SerialNumber; + if (input[_SN] != null) { + entries[_SN] = input[_SN]; } - if (input.TokenCode != null) { - entries["TokenCode"] = input.TokenCode; + if (input[_TC] != null) { + entries[_TC] = input[_TC]; } return entries; }; -const serializeAws_querypolicyDescriptorListType = (input, context) => { +const se_policyDescriptorListType = (input, context) => { const entries = {}; let counter = 1; for (const entry of input) { if (entry === null) { continue; } - const memberEntries = serializeAws_queryPolicyDescriptorType(entry, context); + const memberEntries = se_PolicyDescriptorType(entry, context); Object.entries(memberEntries).forEach(([key, value]) => { entries[`member.${counter}.${key}`] = value; }); @@ -27264,24 +31696,49 @@ const serializeAws_querypolicyDescriptorListType = (input, context) => { } return entries; }; -const serializeAws_queryPolicyDescriptorType = (input, context) => { +const se_PolicyDescriptorType = (input, context) => { + const entries = {}; + if (input[_a] != null) { + entries[_a] = input[_a]; + } + return entries; +}; +const se_ProvidedContext = (input, context) => { const entries = {}; - if (input.arn != null) { - entries["arn"] = input.arn; + if (input[_PAro] != null) { + entries[_PAro] = input[_PAro]; + } + if (input[_CA] != null) { + entries[_CA] = input[_CA]; + } + return entries; +}; +const se_ProvidedContextsListType = (input, context) => { + const entries = {}; + let counter = 1; + for (const entry of input) { + if (entry === null) { + continue; + } + const memberEntries = se_ProvidedContext(entry, context); + Object.entries(memberEntries).forEach(([key, value]) => { + entries[`member.${counter}.${key}`] = value; + }); + counter++; } return entries; }; -const serializeAws_queryTag = (input, context) => { +const se_Tag = (input, context) => { const entries = {}; - if (input.Key != null) { - entries["Key"] = input.Key; + if (input[_K] != null) { + entries[_K] = input[_K]; } - if (input.Value != null) { - entries["Value"] = input.Value; + if (input[_Va] != null) { + entries[_Va] = input[_Va]; } return entries; }; -const serializeAws_querytagKeyListType = (input, context) => { +const se_tagKeyListType = (input, context) => { const entries = {}; let counter = 1; for (const entry of input) { @@ -27293,14 +31750,14 @@ const serializeAws_querytagKeyListType = (input, context) => { } return entries; }; -const serializeAws_querytagListType = (input, context) => { +const se_tagListType = (input, context) => { const entries = {}; let counter = 1; for (const entry of input) { if (entry === null) { continue; } - const memberEntries = serializeAws_queryTag(entry, context); + const memberEntries = se_Tag(entry, context); Object.entries(memberEntries).forEach(([key, value]) => { entries[`member.${counter}.${key}`] = value; }); @@ -27308,297 +31765,225 @@ const serializeAws_querytagListType = (input, context) => { } return entries; }; -const deserializeAws_queryAssumedRoleUser = (output, context) => { - const contents = { - AssumedRoleId: undefined, - Arn: undefined, - }; - if (output["AssumedRoleId"] !== undefined) { - contents.AssumedRoleId = (0, smithy_client_1.expectString)(output["AssumedRoleId"]); +const de_AssumedRoleUser = (output, context) => { + const contents = {}; + if (output[_ARI] != null) { + contents[_ARI] = (0, smithy_client_1.expectString)(output[_ARI]); } - if (output["Arn"] !== undefined) { - contents.Arn = (0, smithy_client_1.expectString)(output["Arn"]); + if (output[_Ar] != null) { + contents[_Ar] = (0, smithy_client_1.expectString)(output[_Ar]); } return contents; }; -const deserializeAws_queryAssumeRoleResponse = (output, context) => { - const contents = { - Credentials: undefined, - AssumedRoleUser: undefined, - PackedPolicySize: undefined, - SourceIdentity: undefined, - }; - if (output["Credentials"] !== undefined) { - contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); +const de_AssumeRoleResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); } - if (output["AssumedRoleUser"] !== undefined) { - contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context); + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); } - if (output["PackedPolicySize"] !== undefined) { - contents.PackedPolicySize = (0, smithy_client_1.strictParseInt32)(output["PackedPolicySize"]); + if (output[_PPS] != null) { + contents[_PPS] = (0, smithy_client_1.strictParseInt32)(output[_PPS]); } - if (output["SourceIdentity"] !== undefined) { - contents.SourceIdentity = (0, smithy_client_1.expectString)(output["SourceIdentity"]); + if (output[_SI] != null) { + contents[_SI] = (0, smithy_client_1.expectString)(output[_SI]); } return contents; }; -const deserializeAws_queryAssumeRoleWithSAMLResponse = (output, context) => { - const contents = { - Credentials: undefined, - AssumedRoleUser: undefined, - PackedPolicySize: undefined, - Subject: undefined, - SubjectType: undefined, - Issuer: undefined, - Audience: undefined, - NameQualifier: undefined, - SourceIdentity: undefined, - }; - if (output["Credentials"] !== undefined) { - contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); +const de_AssumeRoleWithSAMLResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); } - if (output["AssumedRoleUser"] !== undefined) { - contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context); + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); } - if (output["PackedPolicySize"] !== undefined) { - contents.PackedPolicySize = (0, smithy_client_1.strictParseInt32)(output["PackedPolicySize"]); + if (output[_PPS] != null) { + contents[_PPS] = (0, smithy_client_1.strictParseInt32)(output[_PPS]); } - if (output["Subject"] !== undefined) { - contents.Subject = (0, smithy_client_1.expectString)(output["Subject"]); + if (output[_S] != null) { + contents[_S] = (0, smithy_client_1.expectString)(output[_S]); } - if (output["SubjectType"] !== undefined) { - contents.SubjectType = (0, smithy_client_1.expectString)(output["SubjectType"]); + if (output[_ST] != null) { + contents[_ST] = (0, smithy_client_1.expectString)(output[_ST]); } - if (output["Issuer"] !== undefined) { - contents.Issuer = (0, smithy_client_1.expectString)(output["Issuer"]); + if (output[_I] != null) { + contents[_I] = (0, smithy_client_1.expectString)(output[_I]); } - if (output["Audience"] !== undefined) { - contents.Audience = (0, smithy_client_1.expectString)(output["Audience"]); + if (output[_Au] != null) { + contents[_Au] = (0, smithy_client_1.expectString)(output[_Au]); } - if (output["NameQualifier"] !== undefined) { - contents.NameQualifier = (0, smithy_client_1.expectString)(output["NameQualifier"]); + if (output[_NQ] != null) { + contents[_NQ] = (0, smithy_client_1.expectString)(output[_NQ]); } - if (output["SourceIdentity"] !== undefined) { - contents.SourceIdentity = (0, smithy_client_1.expectString)(output["SourceIdentity"]); + if (output[_SI] != null) { + contents[_SI] = (0, smithy_client_1.expectString)(output[_SI]); } return contents; }; -const deserializeAws_queryAssumeRoleWithWebIdentityResponse = (output, context) => { - const contents = { - Credentials: undefined, - SubjectFromWebIdentityToken: undefined, - AssumedRoleUser: undefined, - PackedPolicySize: undefined, - Provider: undefined, - Audience: undefined, - SourceIdentity: undefined, - }; - if (output["Credentials"] !== undefined) { - contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); +const de_AssumeRoleWithWebIdentityResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); } - if (output["SubjectFromWebIdentityToken"] !== undefined) { - contents.SubjectFromWebIdentityToken = (0, smithy_client_1.expectString)(output["SubjectFromWebIdentityToken"]); + if (output[_SFWIT] != null) { + contents[_SFWIT] = (0, smithy_client_1.expectString)(output[_SFWIT]); } - if (output["AssumedRoleUser"] !== undefined) { - contents.AssumedRoleUser = deserializeAws_queryAssumedRoleUser(output["AssumedRoleUser"], context); + if (output[_ARU] != null) { + contents[_ARU] = de_AssumedRoleUser(output[_ARU], context); } - if (output["PackedPolicySize"] !== undefined) { - contents.PackedPolicySize = (0, smithy_client_1.strictParseInt32)(output["PackedPolicySize"]); + if (output[_PPS] != null) { + contents[_PPS] = (0, smithy_client_1.strictParseInt32)(output[_PPS]); } - if (output["Provider"] !== undefined) { - contents.Provider = (0, smithy_client_1.expectString)(output["Provider"]); + if (output[_Pr] != null) { + contents[_Pr] = (0, smithy_client_1.expectString)(output[_Pr]); } - if (output["Audience"] !== undefined) { - contents.Audience = (0, smithy_client_1.expectString)(output["Audience"]); + if (output[_Au] != null) { + contents[_Au] = (0, smithy_client_1.expectString)(output[_Au]); } - if (output["SourceIdentity"] !== undefined) { - contents.SourceIdentity = (0, smithy_client_1.expectString)(output["SourceIdentity"]); + if (output[_SI] != null) { + contents[_SI] = (0, smithy_client_1.expectString)(output[_SI]); } return contents; }; -const deserializeAws_queryCredentials = (output, context) => { - const contents = { - AccessKeyId: undefined, - SecretAccessKey: undefined, - SessionToken: undefined, - Expiration: undefined, - }; - if (output["AccessKeyId"] !== undefined) { - contents.AccessKeyId = (0, smithy_client_1.expectString)(output["AccessKeyId"]); +const de_Credentials = (output, context) => { + const contents = {}; + if (output[_AKI] != null) { + contents[_AKI] = (0, smithy_client_1.expectString)(output[_AKI]); } - if (output["SecretAccessKey"] !== undefined) { - contents.SecretAccessKey = (0, smithy_client_1.expectString)(output["SecretAccessKey"]); + if (output[_SAK] != null) { + contents[_SAK] = (0, smithy_client_1.expectString)(output[_SAK]); } - if (output["SessionToken"] !== undefined) { - contents.SessionToken = (0, smithy_client_1.expectString)(output["SessionToken"]); + if (output[_STe] != null) { + contents[_STe] = (0, smithy_client_1.expectString)(output[_STe]); } - if (output["Expiration"] !== undefined) { - contents.Expiration = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTime)(output["Expiration"])); + if (output[_E] != null) { + contents[_E] = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(output[_E])); } return contents; }; -const deserializeAws_queryDecodeAuthorizationMessageResponse = (output, context) => { - const contents = { - DecodedMessage: undefined, - }; - if (output["DecodedMessage"] !== undefined) { - contents.DecodedMessage = (0, smithy_client_1.expectString)(output["DecodedMessage"]); +const de_DecodeAuthorizationMessageResponse = (output, context) => { + const contents = {}; + if (output[_DM] != null) { + contents[_DM] = (0, smithy_client_1.expectString)(output[_DM]); } return contents; }; -const deserializeAws_queryExpiredTokenException = (output, context) => { - const contents = { - message: undefined, - }; - if (output["message"] !== undefined) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); +const de_ExpiredTokenException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, smithy_client_1.expectString)(output[_m]); } return contents; }; -const deserializeAws_queryFederatedUser = (output, context) => { - const contents = { - FederatedUserId: undefined, - Arn: undefined, - }; - if (output["FederatedUserId"] !== undefined) { - contents.FederatedUserId = (0, smithy_client_1.expectString)(output["FederatedUserId"]); +const de_FederatedUser = (output, context) => { + const contents = {}; + if (output[_FUI] != null) { + contents[_FUI] = (0, smithy_client_1.expectString)(output[_FUI]); } - if (output["Arn"] !== undefined) { - contents.Arn = (0, smithy_client_1.expectString)(output["Arn"]); + if (output[_Ar] != null) { + contents[_Ar] = (0, smithy_client_1.expectString)(output[_Ar]); } return contents; }; -const deserializeAws_queryGetAccessKeyInfoResponse = (output, context) => { - const contents = { - Account: undefined, - }; - if (output["Account"] !== undefined) { - contents.Account = (0, smithy_client_1.expectString)(output["Account"]); +const de_GetAccessKeyInfoResponse = (output, context) => { + const contents = {}; + if (output[_Ac] != null) { + contents[_Ac] = (0, smithy_client_1.expectString)(output[_Ac]); } return contents; }; -const deserializeAws_queryGetCallerIdentityResponse = (output, context) => { - const contents = { - UserId: undefined, - Account: undefined, - Arn: undefined, - }; - if (output["UserId"] !== undefined) { - contents.UserId = (0, smithy_client_1.expectString)(output["UserId"]); +const de_GetCallerIdentityResponse = (output, context) => { + const contents = {}; + if (output[_UI] != null) { + contents[_UI] = (0, smithy_client_1.expectString)(output[_UI]); } - if (output["Account"] !== undefined) { - contents.Account = (0, smithy_client_1.expectString)(output["Account"]); + if (output[_Ac] != null) { + contents[_Ac] = (0, smithy_client_1.expectString)(output[_Ac]); } - if (output["Arn"] !== undefined) { - contents.Arn = (0, smithy_client_1.expectString)(output["Arn"]); + if (output[_Ar] != null) { + contents[_Ar] = (0, smithy_client_1.expectString)(output[_Ar]); } return contents; }; -const deserializeAws_queryGetFederationTokenResponse = (output, context) => { - const contents = { - Credentials: undefined, - FederatedUser: undefined, - PackedPolicySize: undefined, - }; - if (output["Credentials"] !== undefined) { - contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); +const de_GetFederationTokenResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); } - if (output["FederatedUser"] !== undefined) { - contents.FederatedUser = deserializeAws_queryFederatedUser(output["FederatedUser"], context); + if (output[_FU] != null) { + contents[_FU] = de_FederatedUser(output[_FU], context); } - if (output["PackedPolicySize"] !== undefined) { - contents.PackedPolicySize = (0, smithy_client_1.strictParseInt32)(output["PackedPolicySize"]); + if (output[_PPS] != null) { + contents[_PPS] = (0, smithy_client_1.strictParseInt32)(output[_PPS]); } return contents; }; -const deserializeAws_queryGetSessionTokenResponse = (output, context) => { - const contents = { - Credentials: undefined, - }; - if (output["Credentials"] !== undefined) { - contents.Credentials = deserializeAws_queryCredentials(output["Credentials"], context); +const de_GetSessionTokenResponse = (output, context) => { + const contents = {}; + if (output[_C] != null) { + contents[_C] = de_Credentials(output[_C], context); } return contents; }; -const deserializeAws_queryIDPCommunicationErrorException = (output, context) => { - const contents = { - message: undefined, - }; - if (output["message"] !== undefined) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); +const de_IDPCommunicationErrorException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, smithy_client_1.expectString)(output[_m]); } return contents; }; -const deserializeAws_queryIDPRejectedClaimException = (output, context) => { - const contents = { - message: undefined, - }; - if (output["message"] !== undefined) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); +const de_IDPRejectedClaimException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, smithy_client_1.expectString)(output[_m]); } return contents; }; -const deserializeAws_queryInvalidAuthorizationMessageException = (output, context) => { - const contents = { - message: undefined, - }; - if (output["message"] !== undefined) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); +const de_InvalidAuthorizationMessageException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, smithy_client_1.expectString)(output[_m]); } return contents; }; -const deserializeAws_queryInvalidIdentityTokenException = (output, context) => { - const contents = { - message: undefined, - }; - if (output["message"] !== undefined) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); +const de_InvalidIdentityTokenException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, smithy_client_1.expectString)(output[_m]); } return contents; }; -const deserializeAws_queryMalformedPolicyDocumentException = (output, context) => { - const contents = { - message: undefined, - }; - if (output["message"] !== undefined) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); +const de_MalformedPolicyDocumentException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, smithy_client_1.expectString)(output[_m]); } return contents; }; -const deserializeAws_queryPackedPolicyTooLargeException = (output, context) => { - const contents = { - message: undefined, - }; - if (output["message"] !== undefined) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); +const de_PackedPolicyTooLargeException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, smithy_client_1.expectString)(output[_m]); } return contents; }; -const deserializeAws_queryRegionDisabledException = (output, context) => { - const contents = { - message: undefined, - }; - if (output["message"] !== undefined) { - contents.message = (0, smithy_client_1.expectString)(output["message"]); +const de_RegionDisabledException = (output, context) => { + const contents = {}; + if (output[_m] != null) { + contents[_m] = (0, smithy_client_1.expectString)(output[_m]); } return contents; }; -const deserializeMetadata = (output) => { - var _a; - return ({ - httpStatusCode: output.statusCode, - requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"], - }); -}; -const collectBody = (streamBody = new Uint8Array(), context) => { - if (streamBody instanceof Uint8Array) { - return Promise.resolve(streamBody); - } - return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array()); -}; -const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body)); +const deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); +const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); +const throwDefaultError = (0, smithy_client_1.withBaseException)(STSServiceException_1.STSServiceException); const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); const contents = { @@ -27617,15 +32002,79 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod } return new protocol_http_1.HttpRequest(contents); }; +const SHARED_HEADERS = { + "content-type": "application/x-www-form-urlencoded", +}; +const _ = "2011-06-15"; +const _A = "Action"; +const _AKI = "AccessKeyId"; +const _AR = "AssumeRole"; +const _ARI = "AssumedRoleId"; +const _ARU = "AssumedRoleUser"; +const _ARWSAML = "AssumeRoleWithSAML"; +const _ARWWI = "AssumeRoleWithWebIdentity"; +const _Ac = "Account"; +const _Ar = "Arn"; +const _Au = "Audience"; +const _C = "Credentials"; +const _CA = "ContextAssertion"; +const _DAM = "DecodeAuthorizationMessage"; +const _DM = "DecodedMessage"; +const _DS = "DurationSeconds"; +const _E = "Expiration"; +const _EI = "ExternalId"; +const _EM = "EncodedMessage"; +const _FU = "FederatedUser"; +const _FUI = "FederatedUserId"; +const _GAKI = "GetAccessKeyInfo"; +const _GCI = "GetCallerIdentity"; +const _GFT = "GetFederationToken"; +const _GST = "GetSessionToken"; +const _I = "Issuer"; +const _K = "Key"; +const _N = "Name"; +const _NQ = "NameQualifier"; +const _P = "Policy"; +const _PA = "PolicyArns"; +const _PAr = "PrincipalArn"; +const _PAro = "ProviderArn"; +const _PC = "ProvidedContexts"; +const _PI = "ProviderId"; +const _PPS = "PackedPolicySize"; +const _Pr = "Provider"; +const _RA = "RoleArn"; +const _RSN = "RoleSessionName"; +const _S = "Subject"; +const _SAK = "SecretAccessKey"; +const _SAMLA = "SAMLAssertion"; +const _SFWIT = "SubjectFromWebIdentityToken"; +const _SI = "SourceIdentity"; +const _SN = "SerialNumber"; +const _ST = "SubjectType"; +const _STe = "SessionToken"; +const _T = "Tags"; +const _TC = "TokenCode"; +const _TTK = "TransitiveTagKeys"; +const _UI = "UserId"; +const _V = "Version"; +const _Va = "Value"; +const _WIT = "WebIdentityToken"; +const _a = "arn"; +const _m = "message"; const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { if (encoded.length) { - const parsedObj = (0, fast_xml_parser_1.parse)(encoded, { + const parser = new fast_xml_parser_1.XMLParser({ attributeNamePrefix: "", + htmlEntities: true, ignoreAttributes: false, - parseNodeValue: false, + ignoreDeclaration: true, + parseTagValue: false, trimValues: false, - tagValueProcessor: (val) => (val.trim() === "" && val.includes("\n") ? "" : (0, entities_1.decodeHTML)(val)), + tagValueProcessor: (_, val) => (val.trim() === "" && val.includes("\n") ? "" : undefined), }); + parser.addEntity("#xD", "\r"); + parser.addEntity("#10", "\n"); + const parsedObj = parser.parse(encoded); const textNodeName = "#text"; const key = Object.keys(parsedObj)[0]; const parsedObjToReturn = parsedObj[key]; @@ -27637,11 +32086,18 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context } return {}; }); +const parseErrorBody = async (errorBody, context) => { + const value = await parseBody(errorBody, context); + if (value.Error) { + value.Error.message = value.Error.message ?? value.Error.Message; + } + return value; +}; const buildFormUrlencodedString = (formEntries) => Object.entries(formEntries) .map(([key, value]) => (0, smithy_client_1.extendedEncodeURIComponent)(key) + "=" + (0, smithy_client_1.extendedEncodeURIComponent)(value)) .join("&"); const loadQueryErrorCode = (output, data) => { - if (data.Error.Code !== undefined) { + if (data.Error?.Code !== undefined) { return data.Error.Code; } if (output.statusCode == 404) { @@ -27652,13 +32108,36 @@ const loadQueryErrorCode = (output, data) => { /***/ }), +<<<<<<< HEAD +/***/ 81144: +======= /***/ 88739: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(69393); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(7947)); +const defaultStsRoleAssumers_1 = __nccwpck_require__(52359); +const core_1 = __nccwpck_require__(5236); +const credential_provider_node_1 = __nccwpck_require__(6497); +const util_user_agent_node_1 = __nccwpck_require__(61876); +const config_resolver_1 = __nccwpck_require__(66041); +const core_2 = __nccwpck_require__(53938); +const hash_node_1 = __nccwpck_require__(86775); +const middleware_retry_1 = __nccwpck_require__(54801); +const node_config_provider_1 = __nccwpck_require__(13079); +const node_http_handler_1 = __nccwpck_require__(54065); +const util_body_length_node_1 = __nccwpck_require__(87693); +const util_retry_1 = __nccwpck_require__(13744); +const runtimeConfig_shared_1 = __nccwpck_require__(55388); +const smithy_client_1 = __nccwpck_require__(33218); +const util_defaults_mode_node_1 = __nccwpck_require__(6061); +const smithy_client_2 = __nccwpck_require__(33218); +======= const tslib_1 = __nccwpck_require__(75706); const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(7947)); const defaultStsRoleAssumers_1 = __nccwpck_require__(17678); @@ -27676,35 +32155,47 @@ const runtimeConfig_shared_1 = __nccwpck_require__(7180); const smithy_client_1 = __nccwpck_require__(26351); const util_defaults_mode_node_1 = __nccwpck_require__(64664); const smithy_client_2 = __nccwpck_require__(26351); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getRuntimeConfig = (config) => { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); return { ...clientSharedValues, ...config, runtime: "node", defaultsMode, - base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64, - base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64, - bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), - defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), - region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), - requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), - retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE, - }), - sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"), - streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector, - useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), - useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), - utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : util_utf8_node_1.fromUtf8, - utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : util_utf8_node_1.toUtf8, + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider), + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || + (async (idProps) => await (0, defaultStsRoleAssumers_1.decorateDefaultCredentialProvider)(credential_provider_node_1.defaultProvider)(idProps?.__config || {})()), + signer: new core_1.AWSSDKSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: config?.requestHandler ?? new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), }; }; exports.getRuntimeConfig = getRuntimeConfig; @@ -27712,353 +32203,153 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ }), +<<<<<<< HEAD +/***/ 55388: +======= /***/ 7180: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRuntimeConfig = void 0; +<<<<<<< HEAD +const core_1 = __nccwpck_require__(5236); +const core_2 = __nccwpck_require__(53938); +const smithy_client_1 = __nccwpck_require__(33218); +const url_parser_1 = __nccwpck_require__(98245); +const util_base64_1 = __nccwpck_require__(14478); +const util_utf8_1 = __nccwpck_require__(38134); +const httpAuthSchemeProvider_1 = __nccwpck_require__(71613); +const endpointResolver_1 = __nccwpck_require__(28878); +======= const url_parser_1 = __nccwpck_require__(13797); const endpoints_1 = __nccwpck_require__(11006); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getRuntimeConfig = (config) => { - var _a, _b, _c, _d, _e; - return ({ + return { apiVersion: "2011-06-15", - disableHostPrefix: (_a = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _a !== void 0 ? _a : false, - logger: (_b = config === null || config === void 0 ? void 0 : config.logger) !== null && _b !== void 0 ? _b : {}, - regionInfoProvider: (_c = config === null || config === void 0 ? void 0 : config.regionInfoProvider) !== null && _c !== void 0 ? _c : endpoints_1.defaultRegionInfoProvider, - serviceId: (_d = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _d !== void 0 ? _d : "STS", - urlParser: (_e = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _e !== void 0 ? _e : url_parser_1.parseUrl, - }); + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AWSSDKSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + serviceId: config?.serviceId ?? "STS", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; }; exports.getRuntimeConfig = getRuntimeConfig; /***/ }), -/***/ 75706: -/***/ ((module) => { +<<<<<<< HEAD +/***/ 86860: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/****************************************************************************** -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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveRuntimeExtensions = void 0; +const region_config_resolver_1 = __nccwpck_require__(35657); +const protocol_http_1 = __nccwpck_require__(45311); +const smithy_client_1 = __nccwpck_require__(33218); +const httpAuthExtensionConfiguration_1 = __nccwpck_require__(43037); +const asPartial = (t) => t; +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration), + }; +}; +exports.resolveRuntimeExtensions = resolveRuntimeExtensions; + + +/***/ }), + +/***/ 69393: +======= +/***/ 75706: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((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. + +<<<<<<< HEAD +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); +======= /***/ }), /***/ 10547: @@ -28182,13 +32473,15 @@ const getEndpointFromRegion = async (input) => { const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); if (!dnsHostRegex.test(region)) { throw new Error("Invalid region in client config"); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - const useDualstackEndpoint = await input.useDualstackEndpoint(); - const useFipsEndpoint = await input.useFipsEndpoint(); - const { hostname } = (_a = (await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }))) !== null && _a !== void 0 ? _a : {}; - if (!hostname) { - throw new Error("Cannot resolve hostname from client config"); + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } +<<<<<<< HEAD + else { + factory(createExporter(root)); +======= return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); }; exports.getEndpointFromRegion = getEndpointFromRegion; @@ -28290,21 +32583,20 @@ const resolveRegionConfig = (input) => { const { region, useFipsEndpoint } = input; if (!region) { throw new Error("Region is missing"); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - return { - ...input, - region: async () => { - if (typeof region === "string") { - return (0, getRealRegion_1.getRealRegion)(region); + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); } - const providedRegion = await region(); - return (0, getRealRegion_1.getRealRegion)(providedRegion); - }, - useFipsEndpoint: async () => { - const providedRegion = typeof region === "string" ? region : await region(); - if ((0, isFipsRegion_1.isFipsRegion)(providedRegion)) { - return true; + else { + exports.__esModule = true; } +<<<<<<< HEAD + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; +======= return typeof useFipsEndpoint === "boolean" ? Promise.resolve(useFipsEndpoint) : useFipsEndpoint(); }, }; @@ -28371,22 +32663,439 @@ const getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = const hostname = (0, getResolvedHostname_1.getResolvedHostname)(resolvedRegion, { regionHostname, partitionHostname }); if (hostname === undefined) { throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - const signingRegion = (0, getResolvedSigningRegion_1.getResolvedSigningRegion)(hostname, { - signingRegion: (_e = regionHash[resolvedRegion]) === null || _e === void 0 ? void 0 : _e.signingRegion, - regionRegex: partitionHash[partition].regionRegex, - useFipsEndpoint, +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); + + +/***/ }), + +/***/ 6759: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.emitWarningIfUnsupportedVersion = void 0; +let warningEmitted = false; +const emitWarningIfUnsupportedVersion = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will +no longer support Node.js 14.x on May 1, 2024. + +To continue receiving updates to AWS services, bug fixes, and security +updates please upgrade to an active Node.js LTS version. + +More information can be found at: https://a.co/dzr2AJd`); + } +}; +exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; + + +/***/ }), + +/***/ 33326: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(61162); +tslib_1.__exportStar(__nccwpck_require__(6759), exports); + + +/***/ }), + +/***/ 33608: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AWSSDKSigV4Signer = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const utils_1 = __nccwpck_require__(15026); +const throwAWSSDKSigningPropertyError_1 = __nccwpck_require__(20945); +const validateSigningProperties = async (signingProperties) => { + var _a, _b, _c; + const context = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("context", signingProperties.context); + const config = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("config", signingProperties.config); + const authScheme = (_c = (_b = (_a = context.endpointV2) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.authSchemes) === null || _c === void 0 ? void 0 : _c[0]; + const signerFunction = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("signer", config.signer); + const signer = await signerFunction(authScheme); + const signingRegion = signingProperties === null || signingProperties === void 0 ? void 0 : signingProperties.signingRegion; + const signingName = signingProperties === null || signingProperties === void 0 ? void 0 : signingProperties.signingName; return { - partition, - signingService, - hostname, - ...(signingRegion && { signingRegion }), - ...(((_f = regionHash[resolvedRegion]) === null || _f === void 0 ? void 0 : _f.signingService) && { - signingService: regionHash[resolvedRegion].signingService, - }), + config, + signer, + signingRegion, + signingName, }; }; +<<<<<<< HEAD +class AWSSDKSigV4Signer { + async sign(httpRequest, identity, signingProperties) { + if (!protocol_http_1.HttpRequest.isInstance(httpRequest)) { + throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); + } + const { config, signer, signingRegion, signingName } = await validateSigningProperties(signingProperties); + const signedRequest = await signer.sign(httpRequest, { + signingDate: (0, utils_1.getSkewCorrectedDate)(config.systemClockOffset), + signingRegion: signingRegion, + signingService: signingName, + }); + return signedRequest; +======= exports.getRegionInfo = getRegionInfo; @@ -28432,366 +33141,1119 @@ exports.getResolvedSigningRegion = void 0; const getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { if (signingRegion) { return signingRegion; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + } + errorHandler(signingProperties) { + return (error) => { + var _a; + const serverTime = (_a = error.ServerTime) !== null && _a !== void 0 ? _a : (0, utils_1.getDateHeader)(error.$response); + if (serverTime) { + const config = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("config", signingProperties.config); + config.systemClockOffset = (0, utils_1.getUpdatedSystemClockOffset)(serverTime, config.systemClockOffset); + } + throw error; + }; } - else if (useFipsEndpoint) { - const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); - const regionRegexmatchArray = hostname.match(regionRegexJs); - if (regionRegexmatchArray) { - return regionRegexmatchArray[0].slice(1, -1); + successHandler(httpResponse, signingProperties) { + const dateHeader = (0, utils_1.getDateHeader)(httpResponse); + if (dateHeader) { + const config = (0, throwAWSSDKSigningPropertyError_1.throwAWSSDKSigningPropertyError)("config", signingProperties.config); + config.systemClockOffset = (0, utils_1.getUpdatedSystemClockOffset)(dateHeader, config.systemClockOffset); } } -}; -exports.getResolvedSigningRegion = getResolvedSigningRegion; +} +exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer; /***/ }), +<<<<<<< HEAD +/***/ 48173: +======= /***/ 62777: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(61162); +tslib_1.__exportStar(__nccwpck_require__(33608), exports); +tslib_1.__exportStar(__nccwpck_require__(31976), exports); +======= const tslib_1 = __nccwpck_require__(63300); tslib_1.__exportStar(__nccwpck_require__(31411), exports); tslib_1.__exportStar(__nccwpck_require__(6410), exports); tslib_1.__exportStar(__nccwpck_require__(27342), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/***/ }), + +<<<<<<< HEAD +/***/ 31976: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveAWSSDKSigV4Config = void 0; +const core_1 = __nccwpck_require__(53938); +const signature_v4_1 = __nccwpck_require__(91116); +const resolveAWSSDKSigV4Config = (config) => { + let normalizedCreds; + if (config.credentials) { + normalizedCreds = (0, core_1.memoizeIdentityProvider)(config.credentials, core_1.isIdentityExpired, core_1.doesIdentityRequireRefresh); + } + if (!normalizedCreds) { + if (config.credentialDefaultProvider) { + normalizedCreds = (0, core_1.normalizeProvider)(config.credentialDefaultProvider(config)); + } + else { + normalizedCreds = async () => { throw new Error("`credentials` is missing"); }; + } + } + const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256, } = config; + let signer; + if (config.signer) { + signer = (0, core_1.normalizeProvider)(config.signer); + } + else if (config.regionInfoProvider) { + signer = () => (0, core_1.normalizeProvider)(config.region)() + .then(async (region) => [ + (await config.regionInfoProvider(region, { + useFipsEndpoint: await config.useFipsEndpoint(), + useDualstackEndpoint: await config.useDualstackEndpoint(), + })) || {}, + region, + ]) + .then(([regionInfo, region]) => { + const { signingRegion, signingService } = regionInfo; + config.signingRegion = config.signingRegion || signingRegion || region; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath, + }; + const SignerCtor = config.signerConstructor || signature_v4_1.SignatureV4; + return new SignerCtor(params); + }); + } + else { + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: config.signingName || config.defaultSigningName, + signingRegion: await (0, core_1.normalizeProvider)(config.region)(), + properties: {}, + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + config.signingRegion = config.signingRegion || signingRegion; + config.signingName = config.signingName || signingService || config.serviceId; + const params = { + ...config, + credentials: normalizedCreds, + region: config.signingRegion, + service: config.signingName, + sha256, + uriEscapePath: signingEscapePath, + }; + const SignerCtor = config.signerConstructor || signature_v4_1.SignatureV4; + return new SignerCtor(params); + }; + } + return { + ...config, + systemClockOffset, + signingEscapePath, + credentials: normalizedCreds, + signer, + }; +}; +exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config; + + +/***/ }), + +/***/ 20945: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.throwAWSSDKSigningPropertyError = void 0; +const throwAWSSDKSigningPropertyError = (name, property) => { + if (!property) { + throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`); + } + return property; +}; +exports.throwAWSSDKSigningPropertyError = throwAWSSDKSigningPropertyError; + + +/***/ }), + +/***/ 92396: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(61162); +tslib_1.__exportStar(__nccwpck_require__(48173), exports); + + +/***/ }), + +/***/ 48537: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDateHeader = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const getDateHeader = (response) => { var _a, _b, _c; return protocol_http_1.HttpResponse.isInstance(response) ? (_b = (_a = response.headers) === null || _a === void 0 ? void 0 : _a.date) !== null && _b !== void 0 ? _b : (_c = response.headers) === null || _c === void 0 ? void 0 : _c.Date : undefined; }; +exports.getDateHeader = getDateHeader; + + +/***/ }), + +/***/ 26276: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSkewCorrectedDate = void 0; +const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); +exports.getSkewCorrectedDate = getSkewCorrectedDate; + + +/***/ }), + +/***/ 566: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getUpdatedSystemClockOffset = void 0; +const isClockSkewed_1 = __nccwpck_require__(27114); +const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { + const clockTimeInMs = Date.parse(clockTime); + if ((0, isClockSkewed_1.isClockSkewed)(clockTimeInMs, currentSystemClockOffset)) { + return clockTimeInMs - Date.now(); + } + return currentSystemClockOffset; +}; +exports.getUpdatedSystemClockOffset = getUpdatedSystemClockOffset; + + +/***/ }), + +/***/ 15026: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(61162); +tslib_1.__exportStar(__nccwpck_require__(48537), exports); +tslib_1.__exportStar(__nccwpck_require__(26276), exports); +tslib_1.__exportStar(__nccwpck_require__(566), exports); + + +/***/ }), + +/***/ 27114: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isClockSkewed = void 0; +const getSkewCorrectedDate_1 = __nccwpck_require__(26276); +const isClockSkewed = (clockTime, systemClockOffset) => Math.abs((0, getSkewCorrectedDate_1.getSkewCorrectedDate)(systemClockOffset).getTime() - clockTime) >= 300000; +exports.isClockSkewed = isClockSkewed; + + +/***/ }), + +/***/ 5236: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(61162); +tslib_1.__exportStar(__nccwpck_require__(33326), exports); +tslib_1.__exportStar(__nccwpck_require__(92396), exports); +tslib_1.__exportStar(__nccwpck_require__(14956), exports); + + +/***/ }), + +/***/ 28887: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports._toNum = exports._toBool = exports._toStr = void 0; +const _toStr = (val) => { + if (val == null) { + return val; + } + if (typeof val === "number" || typeof val === "bigint") { + const warning = new Error(`Received number ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + if (typeof val === "boolean") { + const warning = new Error(`Received boolean ${val} where a string was expected.`); + warning.name = "Warning"; + console.warn(warning); + return String(val); + } + return val; +}; +exports._toStr = _toStr; +const _toBool = (val) => { + if (val == null) { + return val; + } + if (typeof val === "number") { + } + if (typeof val === "string") { + const lowercase = val.toLowerCase(); + if (val !== "" && lowercase !== "false" && lowercase !== "true") { + const warning = new Error(`Received string "${val}" where a boolean was expected.`); + warning.name = "Warning"; + console.warn(warning); + } + return val !== "" && lowercase !== "false"; + } + return val; +}; +exports._toBool = _toBool; +const _toNum = (val) => { + if (val == null) { + return val; + } + if (typeof val === "boolean") { + } + if (typeof val === "string") { + const num = Number(val); + if (num.toString() !== val) { + const warning = new Error(`Received string "${val}" where a number was expected.`); + warning.name = "Warning"; + console.warn(warning); + return val; + } + return num; + } + return val; +}; +exports._toNum = _toNum; + + +/***/ }), + +/***/ 14956: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(61162); +tslib_1.__exportStar(__nccwpck_require__(28887), exports); +tslib_1.__exportStar(__nccwpck_require__(54564), exports); + + +/***/ }), + +/***/ 54564: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.awsExpectUnion = void 0; +const smithy_client_1 = __nccwpck_require__(33218); +const awsExpectUnion = (value) => { + if (value == null) { + return undefined; + } + if (typeof value === "object" && "__type" in value) { + delete value.__type; + } + return (0, smithy_client_1.expectUnion)(value); +}; +exports.awsExpectUnion = awsExpectUnion; /***/ }), +/***/ 61162: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); +======= /***/ 63300: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 67375: +======= /***/ 69125: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromEnv = exports.ENV_EXPIRATION = exports.ENV_SESSION = exports.ENV_SECRET = exports.ENV_KEY = void 0; +<<<<<<< HEAD +const property_provider_1 = __nccwpck_require__(12955); +======= const property_provider_1 = __nccwpck_require__(68655); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.ENV_KEY = "AWS_ACCESS_KEY_ID"; exports.ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; exports.ENV_SESSION = "AWS_SESSION_TOKEN"; @@ -28816,340 +34278,85 @@ exports.fromEnv = fromEnv; /***/ }), +<<<<<<< HEAD +/***/ 66048: +======= /***/ 40096: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(47449); +tslib_1.__exportStar(__nccwpck_require__(67375), exports); +======= const tslib_1 = __nccwpck_require__(58880); tslib_1.__exportStar(__nccwpck_require__(69125), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 47449: +======= /***/ 58880: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); - - +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +<<<<<<< HEAD +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); +======= /***/ }), /***/ 22794: @@ -29255,42 +34462,20 @@ const requestFromEcsImds = async (timeout, options) => { ...options.headers, Authorization: process.env[exports.ENV_CMDS_AUTH_TOKEN], }; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - const buffer = await (0, httpRequest_1.httpRequest)({ - ...options, - timeout, - }); - return buffer.toString(); -}; -const CMDS_IP = "169.254.170.2"; -const GREENGRASS_HOSTS = { - localhost: true, - "127.0.0.1": true, -}; -const GREENGRASS_PROTOCOLS = { - "http:": true, - "https:": true, -}; -const getCmdsUri = async () => { - if (process.env[exports.ENV_CMDS_RELATIVE_URI]) { - return { - hostname: CMDS_IP, - path: process.env[exports.ENV_CMDS_RELATIVE_URI], - }; - } - if (process.env[exports.ENV_CMDS_FULL_URI]) { - const parsed = (0, url_1.parse)(process.env[exports.ENV_CMDS_FULL_URI]); - if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { - throw new property_provider_1.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, false); - } - if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { - throw new property_provider_1.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, false); - } - return { - ...parsed, - port: parsed.port ? parseInt(parsed.port, 10) : undefined, - }; + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } + else { + factory(createExporter(root)); + } +<<<<<<< HEAD + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); +======= throw new property_provider_1.CredentialsProviderError("The container metadata credential provider cannot be used unless" + ` the ${exports.ENV_CMDS_RELATIVE_URI} or ${exports.ENV_CMDS_FULL_URI} environment` + " variable is set", false); @@ -29624,353 +34809,712 @@ const staticStabilityProvider = (provider, options = {}) => { if (pastCredentials) { logger.warn("Credential renew failed: ", e); credentials = (0, getExtendedInstanceMetadataCredentials_1.getExtendedInstanceMetadataCredentials)(pastCredentials, logger); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } else { - throw e; + exports.__esModule = true; } } - pastCredentials = credentials; - return credentials; + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; }; -}; -exports.staticStabilityProvider = staticStabilityProvider; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 62119: +======= /***/ 95022: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), /***/ 92829: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromIni = void 0; +<<<<<<< HEAD +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +const resolveProfileData_1 = __nccwpck_require__(95090); +======= const shared_ini_file_loader_1 = __nccwpck_require__(93378); const resolveProfileData_1 = __nccwpck_require__(12817); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const fromIni = (init = {}) => async () => { const profiles = await (0, shared_ini_file_loader_1.parseKnownFiles)(init); return (0, resolveProfileData_1.resolveProfileData)((0, shared_ini_file_loader_1.getProfileName)(init), profiles, init); @@ -29980,29 +35524,47 @@ exports.fromIni = fromIni; /***/ }), +<<<<<<< HEAD +/***/ 97228: +======= /***/ 20357: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(4108); +tslib_1.__exportStar(__nccwpck_require__(62119), exports); +======= const tslib_1 = __nccwpck_require__(96181); tslib_1.__exportStar(__nccwpck_require__(92829), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 4738: +======= /***/ 18288: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveAssumeRoleCredentials = exports.isAssumeRoleProfile = void 0; +<<<<<<< HEAD +const property_provider_1 = __nccwpck_require__(12955); +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +const resolveCredentialSource_1 = __nccwpck_require__(66011); +const resolveProfileData_1 = __nccwpck_require__(95090); +======= const property_provider_1 = __nccwpck_require__(68655); const shared_ini_file_loader_1 = __nccwpck_require__(93378); const resolveCredentialSource_1 = __nccwpck_require__(3774); const resolveProfileData_1 = __nccwpck_require__(12817); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const isAssumeRoleProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.role_arn === "string" && @@ -30034,6 +35596,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, visi RoleArn: data.role_arn, RoleSessionName: data.role_session_name || `aws-sdk-js-${Date.now()}`, ExternalId: data.external_id, + DurationSeconds: parseInt(data.duration_seconds || "3600", 10), }; const { mfa_serial } = data; if (mfa_serial) { @@ -30051,16 +35614,25 @@ exports.resolveAssumeRoleCredentials = resolveAssumeRoleCredentials; /***/ }), +<<<<<<< HEAD +/***/ 66011: +======= /***/ 3774: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveCredentialSource = void 0; +<<<<<<< HEAD +const credential_provider_env_1 = __nccwpck_require__(66048); +const credential_provider_imds_1 = __nccwpck_require__(34673); +const property_provider_1 = __nccwpck_require__(12955); +======= const credential_provider_env_1 = __nccwpck_require__(40096); const credential_provider_imds_1 = __nccwpck_require__(56369); const property_provider_1 = __nccwpck_require__(68655); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const resolveCredentialSource = (credentialSource, profileName) => { const sourceProvidersMap = { EcsContainer: credential_provider_imds_1.fromContainerMetadata, @@ -30080,18 +35652,48 @@ exports.resolveCredentialSource = resolveCredentialSource; /***/ }), +<<<<<<< HEAD +/***/ 4834: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveProcessCredentials = exports.isProcessProfile = void 0; +const credential_provider_process_1 = __nccwpck_require__(61695); +const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string"; +exports.isProcessProfile = isProcessProfile; +const resolveProcessCredentials = async (options, profile) => (0, credential_provider_process_1.fromProcess)({ + ...options, + profile, +})(); +exports.resolveProcessCredentials = resolveProcessCredentials; + + +/***/ }), + +/***/ 95090: +======= /***/ 12817: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveProfileData = void 0; +<<<<<<< HEAD +const property_provider_1 = __nccwpck_require__(12955); +const resolveAssumeRoleCredentials_1 = __nccwpck_require__(4738); +const resolveProcessCredentials_1 = __nccwpck_require__(4834); +const resolveSsoCredentials_1 = __nccwpck_require__(3955); +const resolveStaticCredentials_1 = __nccwpck_require__(38232); +const resolveWebIdentityCredentials_1 = __nccwpck_require__(99864); +======= const property_provider_1 = __nccwpck_require__(68655); const resolveAssumeRoleCredentials_1 = __nccwpck_require__(18288); const resolveSsoCredentials_1 = __nccwpck_require__(41772); const resolveStaticCredentials_1 = __nccwpck_require__(63393); const resolveWebIdentityCredentials_1 = __nccwpck_require__(91652); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}) => { const data = profiles[profileName]; if (Object.keys(visitedProfiles).length > 0 && (0, resolveStaticCredentials_1.isStaticCredsProfile)(data)) { @@ -30106,6 +35708,9 @@ const resolveProfileData = async (profileName, profiles, options, visitedProfile if ((0, resolveWebIdentityCredentials_1.isWebIdentityProfile)(data)) { return (0, resolveWebIdentityCredentials_1.resolveWebIdentityCredentials)(data, options); } + if ((0, resolveProcessCredentials_1.isProcessProfile)(data)) { + return (0, resolveProcessCredentials_1.resolveProcessCredentials)(options, profileName); + } if ((0, resolveSsoCredentials_1.isSsoProfile)(data)) { return (0, resolveSsoCredentials_1.resolveSsoCredentials)(data); } @@ -30116,21 +35721,30 @@ exports.resolveProfileData = resolveProfileData; /***/ }), +<<<<<<< HEAD +/***/ 3955: +======= /***/ 41772: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveSsoCredentials = exports.isSsoProfile = void 0; +<<<<<<< HEAD +const credential_provider_sso_1 = __nccwpck_require__(82419); +var credential_provider_sso_2 = __nccwpck_require__(82419); +======= const credential_provider_sso_1 = __nccwpck_require__(23666); var credential_provider_sso_2 = __nccwpck_require__(23666); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "isSsoProfile", ({ enumerable: true, get: function () { return credential_provider_sso_2.isSsoProfile; } })); const resolveSsoCredentials = (data) => { - const { sso_start_url, sso_account_id, sso_region, sso_role_name } = (0, credential_provider_sso_1.validateSsoProfile)(data); + const { sso_start_url, sso_account_id, sso_session, sso_region, sso_role_name } = (0, credential_provider_sso_1.validateSsoProfile)(data); return (0, credential_provider_sso_1.fromSSO)({ ssoStartUrl: sso_start_url, ssoAccountId: sso_account_id, + ssoSession: sso_session, ssoRegion: sso_region, ssoRoleName: sso_role_name, })(); @@ -30140,10 +35754,13 @@ exports.resolveSsoCredentials = resolveSsoCredentials; /***/ }), +<<<<<<< HEAD +/***/ 38232: +======= /***/ 63393: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveStaticCredentials = exports.isStaticCredsProfile = void 0; @@ -30163,14 +35780,21 @@ exports.resolveStaticCredentials = resolveStaticCredentials; /***/ }), +<<<<<<< HEAD +/***/ 99864: +======= /***/ 91652: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveWebIdentityCredentials = exports.isWebIdentityProfile = void 0; +<<<<<<< HEAD +const credential_provider_web_identity_1 = __nccwpck_require__(92087); +======= const credential_provider_web_identity_1 = __nccwpck_require__(62017); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.web_identity_token_file === "string" && @@ -30188,337 +35812,458 @@ exports.resolveWebIdentityCredentials = resolveWebIdentityCredentials; /***/ }), +<<<<<<< HEAD +/***/ 4108: +======= /***/ 96181: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 13378: +======= /***/ 51909: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultProvider = void 0; +<<<<<<< HEAD +const credential_provider_env_1 = __nccwpck_require__(66048); +const credential_provider_ini_1 = __nccwpck_require__(97228); +const credential_provider_process_1 = __nccwpck_require__(61695); +const credential_provider_sso_1 = __nccwpck_require__(82419); +const credential_provider_web_identity_1 = __nccwpck_require__(92087); +const property_provider_1 = __nccwpck_require__(12955); +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +const remoteProvider_1 = __nccwpck_require__(30575); +======= const credential_provider_env_1 = __nccwpck_require__(40096); const credential_provider_ini_1 = __nccwpck_require__(20357); const credential_provider_process_1 = __nccwpck_require__(5758); @@ -30527,6 +36272,7 @@ const credential_provider_web_identity_1 = __nccwpck_require__(62017); const property_provider_1 = __nccwpck_require__(68655); const shared_ini_file_loader_1 = __nccwpck_require__(93378); const remoteProvider_1 = __nccwpck_require__(75786); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const defaultProvider = (init = {}) => (0, property_provider_1.memoize)((0, property_provider_1.chain)(...(init.profile || process.env[shared_ini_file_loader_1.ENV_PROFILE] ? [] : [(0, credential_provider_env_1.fromEnv)()]), (0, credential_provider_sso_1.fromSSO)(init), (0, credential_provider_ini_1.fromIni)(init), (0, credential_provider_process_1.fromProcess)(init), (0, credential_provider_web_identity_1.fromTokenFile)(init), (0, remoteProvider_1.remoteProvider)(init), async () => { throw new property_provider_1.CredentialsProviderError("Could not load credentials from any providers", false); }), (credentials) => credentials.expiration !== undefined && credentials.expiration.getTime() - Date.now() < 300000, (credentials) => credentials.expiration !== undefined); @@ -30535,27 +36281,43 @@ exports.defaultProvider = defaultProvider; /***/ }), +<<<<<<< HEAD +/***/ 6497: +======= /***/ 96911: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(79035); +tslib_1.__exportStar(__nccwpck_require__(13378), exports); +======= const tslib_1 = __nccwpck_require__(17787); tslib_1.__exportStar(__nccwpck_require__(51909), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 30575: +======= /***/ 75786: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.remoteProvider = exports.ENV_IMDS_DISABLED = void 0; +<<<<<<< HEAD +const credential_provider_imds_1 = __nccwpck_require__(34673); +const property_provider_1 = __nccwpck_require__(12955); +======= const credential_provider_imds_1 = __nccwpck_require__(56369); const property_provider_1 = __nccwpck_require__(68655); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; const remoteProvider = (init) => { if (process.env[credential_provider_imds_1.ENV_CMDS_RELATIVE_URI] || process.env[credential_provider_imds_1.ENV_CMDS_FULL_URI]) { @@ -30573,339 +36335,455 @@ exports.remoteProvider = remoteProvider; /***/ }), +<<<<<<< HEAD +/***/ 79035: +======= /***/ 17787: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 67867: +======= /***/ 92941: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromProcess = void 0; +<<<<<<< HEAD +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +const resolveProcessCredentials_1 = __nccwpck_require__(66243); +======= const shared_ini_file_loader_1 = __nccwpck_require__(93378); const resolveProcessCredentials_1 = __nccwpck_require__(85811); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const fromProcess = (init = {}) => async () => { const profiles = await (0, shared_ini_file_loader_1.parseKnownFiles)(init); return (0, resolveProcessCredentials_1.resolveProcessCredentials)((0, shared_ini_file_loader_1.getProfileName)(init), profiles); @@ -30915,10 +36793,13 @@ exports.fromProcess = fromProcess; /***/ }), +<<<<<<< HEAD +/***/ 37841: +======= /***/ 5343: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getValidatedProcessCredentials = void 0; @@ -30948,29 +36829,47 @@ exports.getValidatedProcessCredentials = getValidatedProcessCredentials; /***/ }), +<<<<<<< HEAD +/***/ 61695: +======= /***/ 5758: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(72460); +tslib_1.__exportStar(__nccwpck_require__(67867), exports); +======= const tslib_1 = __nccwpck_require__(91407); tslib_1.__exportStar(__nccwpck_require__(92941), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 66243: +======= /***/ 85811: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveProcessCredentials = void 0; +<<<<<<< HEAD +const property_provider_1 = __nccwpck_require__(12955); +const child_process_1 = __nccwpck_require__(32081); +const util_1 = __nccwpck_require__(73837); +const getValidatedProcessCredentials_1 = __nccwpck_require__(37841); +======= const property_provider_1 = __nccwpck_require__(68655); const child_process_1 = __nccwpck_require__(32081); const util_1 = __nccwpck_require__(73837); const getValidatedProcessCredentials_1 = __nccwpck_require__(5343); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const resolveProcessCredentials = async (profileName, profiles) => { const profile = profiles[profileName]; if (profiles[profileName]) { @@ -31005,366 +36904,511 @@ exports.resolveProcessCredentials = resolveProcessCredentials; /***/ }), +<<<<<<< HEAD +/***/ 72460: +======= /***/ 91407: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 65765: +======= /***/ 16796: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromSSO = void 0; +<<<<<<< HEAD +const property_provider_1 = __nccwpck_require__(12955); +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +const isSsoProfile_1 = __nccwpck_require__(70821); +const resolveSSOCredentials_1 = __nccwpck_require__(74782); +const validateSsoProfile_1 = __nccwpck_require__(47314); +======= const property_provider_1 = __nccwpck_require__(68655); const shared_ini_file_loader_1 = __nccwpck_require__(93378); const isSsoProfile_1 = __nccwpck_require__(74538); const resolveSSOCredentials_1 = __nccwpck_require__(27369); const validateSsoProfile_1 = __nccwpck_require__(63501); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const fromSSO = (init = {}) => async () => { - const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient } = init; - if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName) { + const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, ssoSession } = init; + const profileName = (0, shared_ini_file_loader_1.getProfileName)(init); + if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) { const profiles = await (0, shared_ini_file_loader_1.parseKnownFiles)(init); - const profileName = (0, shared_ini_file_loader_1.getProfileName)(init); const profile = profiles[profileName]; + if (!profile) { + throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} was not found.`); + } if (!(0, isSsoProfile_1.isSsoProfile)(profile)) { throw new property_provider_1.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`); } - const { sso_start_url, sso_account_id, sso_region, sso_role_name } = (0, validateSsoProfile_1.validateSsoProfile)(profile); + if (profile === null || profile === void 0 ? void 0 : profile.sso_session) { + const ssoSessions = await (0, shared_ini_file_loader_1.loadSsoSessionData)(init); + const session = ssoSessions[profile.sso_session]; + const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`; + if (ssoRegion && ssoRegion !== session.sso_region) { + throw new property_provider_1.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, false); + } + if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) { + throw new property_provider_1.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, false); + } + profile.sso_region = session.sso_region; + profile.sso_start_url = session.sso_start_url; + } + const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = (0, validateSsoProfile_1.validateSsoProfile)(profile); return (0, resolveSSOCredentials_1.resolveSSOCredentials)({ ssoStartUrl: sso_start_url, + ssoSession: sso_session, ssoAccountId: sso_account_id, ssoRegion: sso_region, ssoRoleName: sso_role_name, ssoClient: ssoClient, + profile: profileName, }); } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) { - throw new property_provider_1.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl",' + - ' "ssoAccountId", "ssoRegion", "ssoRoleName"'); + throw new property_provider_1.CredentialsProviderError("Incomplete configuration. The fromSSO() argument hash must include " + + '"ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"'); } else { - return (0, resolveSSOCredentials_1.resolveSSOCredentials)({ ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient }); + return (0, resolveSSOCredentials_1.resolveSSOCredentials)({ + ssoStartUrl, + ssoSession, + ssoAccountId, + ssoRegion, + ssoRoleName, + ssoClient, + profile: profileName, + }); } }; exports.fromSSO = fromSSO; @@ -31372,31 +37416,46 @@ exports.fromSSO = fromSSO; /***/ }), +<<<<<<< HEAD +/***/ 82419: +======= /***/ 23666: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(2635); +tslib_1.__exportStar(__nccwpck_require__(65765), exports); +tslib_1.__exportStar(__nccwpck_require__(70821), exports); +tslib_1.__exportStar(__nccwpck_require__(66675), exports); +tslib_1.__exportStar(__nccwpck_require__(47314), exports); +======= const tslib_1 = __nccwpck_require__(9439); tslib_1.__exportStar(__nccwpck_require__(16796), exports); tslib_1.__exportStar(__nccwpck_require__(74538), exports); tslib_1.__exportStar(__nccwpck_require__(87714), exports); tslib_1.__exportStar(__nccwpck_require__(63501), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 70821: +======= /***/ 74538: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isSsoProfile = void 0; const isSsoProfile = (arg) => arg && (typeof arg.sso_start_url === "string" || typeof arg.sso_account_id === "string" || + typeof arg.sso_session === "string" || typeof arg.sso_region === "string" || typeof arg.sso_role_name === "string"); exports.isSsoProfile = isSsoProfile; @@ -31404,28 +37463,52 @@ exports.isSsoProfile = isSsoProfile; /***/ }), +<<<<<<< HEAD +/***/ 74782: +======= /***/ 27369: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveSSOCredentials = void 0; +<<<<<<< HEAD +const client_sso_1 = __nccwpck_require__(62764); +const token_providers_1 = __nccwpck_require__(64260); +const property_provider_1 = __nccwpck_require__(12955); +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +======= const client_sso_1 = __nccwpck_require__(2394); const property_provider_1 = __nccwpck_require__(68655); const shared_ini_file_loader_1 = __nccwpck_require__(93378); const EXPIRE_WINDOW_MS = 15 * 60 * 1000; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const SHOULD_FAIL_CREDENTIAL_CHAIN = false; -const resolveSSOCredentials = async ({ ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, }) => { +const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, profile, }) => { let token; const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; - try { - token = await (0, shared_ini_file_loader_1.getSSOTokenFromFile)(ssoStartUrl); + if (ssoSession) { + try { + const _token = await (0, token_providers_1.fromSso)({ profile })(); + token = { + accessToken: _token.token, + expiresAt: new Date(_token.expiration).toISOString(), + }; + } + catch (e) { + throw new property_provider_1.CredentialsProviderError(e.message, SHOULD_FAIL_CREDENTIAL_CHAIN); + } } - catch (e) { - throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); + else { + try { + token = await (0, shared_ini_file_loader_1.getSSOTokenFromFile)(ssoStartUrl); + } + catch (e) { + throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); + } } - if (new Date(token.expiresAt).getTime() - Date.now() <= EXPIRE_WINDOW_MS) { + if (new Date(token.expiresAt).getTime() - Date.now() <= 0) { throw new property_provider_1.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, SHOULD_FAIL_CREDENTIAL_CHAIN); } const { accessToken } = token; @@ -31452,29 +37535,39 @@ exports.resolveSSOCredentials = resolveSSOCredentials; /***/ }), +<<<<<<< HEAD +/***/ 66675: +======= /***/ 87714: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), +<<<<<<< HEAD +/***/ 47314: +======= /***/ 63501: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.validateSsoProfile = void 0; +<<<<<<< HEAD +const property_provider_1 = __nccwpck_require__(12955); +======= const property_provider_1 = __nccwpck_require__(68655); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const validateSsoProfile = (profile) => { const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile; if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) { - throw new property_provider_1.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", ` + - `"sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, false); + throw new property_provider_1.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", ` + + `"sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(profile).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`, false); } return profile; }; @@ -31483,348 +37576,461 @@ exports.validateSsoProfile = validateSsoProfile; /***/ }), +<<<<<<< HEAD +/***/ 2635: +======= /***/ 9439: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 49580: +======= /***/ 13481: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromTokenFile = void 0; +<<<<<<< HEAD +const property_provider_1 = __nccwpck_require__(12955); +const fs_1 = __nccwpck_require__(57147); +const fromWebToken_1 = __nccwpck_require__(46289); +======= const property_provider_1 = __nccwpck_require__(68655); const fs_1 = __nccwpck_require__(57147); const fromWebToken_1 = __nccwpck_require__(68715); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE"; const ENV_ROLE_ARN = "AWS_ROLE_ARN"; const ENV_ROLE_SESSION_NAME = "AWS_ROLE_SESSION_NAME"; const fromTokenFile = (init = {}) => async () => { - return resolveTokenFile(init); -}; -exports.fromTokenFile = fromTokenFile; -const resolveTokenFile = (init) => { var _a, _b, _c; const webIdentityTokenFile = (_a = init === null || init === void 0 ? void 0 : init.webIdentityTokenFile) !== null && _a !== void 0 ? _a : process.env[ENV_TOKEN_FILE]; const roleArn = (_b = init === null || init === void 0 ? void 0 : init.roleArn) !== null && _b !== void 0 ? _b : process.env[ENV_ROLE_ARN]; @@ -31839,18 +38045,26 @@ const resolveTokenFile = (init) => { roleSessionName, })(); }; +exports.fromTokenFile = fromTokenFile; /***/ }), +<<<<<<< HEAD +/***/ 46289: +======= /***/ 68715: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromWebToken = void 0; +<<<<<<< HEAD +const property_provider_1 = __nccwpck_require__(12955); +======= const property_provider_1 = __nccwpck_require__(68655); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const fromWebToken = (init) => () => { const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds, roleAssumerWithWebIdentity, } = init; if (!roleAssumerWithWebIdentity) { @@ -31872,341 +38086,87 @@ exports.fromWebToken = fromWebToken; /***/ }), +<<<<<<< HEAD +/***/ 92087: +======= /***/ 62017: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(97436); +tslib_1.__exportStar(__nccwpck_require__(49580), exports); +tslib_1.__exportStar(__nccwpck_require__(46289), exports); +======= const tslib_1 = __nccwpck_require__(75319); tslib_1.__exportStar(__nccwpck_require__(13481), exports); tslib_1.__exportStar(__nccwpck_require__(68715), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 97436: +======= /***/ 75319: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); - - +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +<<<<<<< HEAD +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); +======= /***/ }), /***/ 78219: @@ -32222,25 +38182,23 @@ const splitMessage_1 = __nccwpck_require__(28356); class EventStreamCodec { constructor(toUtf8, fromUtf8) { this.headerMarshaller = new HeaderMarshaller_1.HeaderMarshaller(toUtf8, fromUtf8); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - encode({ headers: rawHeaders, body }) { - const headers = this.headerMarshaller.format(rawHeaders); - const length = headers.byteLength + body.byteLength + 16; - const out = new Uint8Array(length); - const view = new DataView(out.buffer, out.byteOffset, out.byteLength); - const checksum = new crc32_1.Crc32(); - view.setUint32(0, length, false); - view.setUint32(4, headers.byteLength, false); - view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); - out.set(headers, 12); - out.set(body, headers.byteLength + 12); - view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); - return out; + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } - decode(message) { - const { headers, body } = (0, splitMessage_1.splitMessage)(message); - return { headers: this.headerMarshaller.parse(headers), body }; + else { + factory(createExporter(root)); } +<<<<<<< HEAD + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; +======= formatHeaders(rawHeaders) { return this.headerMarshaller.format(rawHeaders); } @@ -32411,36 +38369,25 @@ class HeaderMarshaller { break; default: throw new Error(`Unrecognized header type tag`); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } } - return out; + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } -} -exports.HeaderMarshaller = HeaderMarshaller; -var HEADER_VALUE_TYPE; -(function (HEADER_VALUE_TYPE) { - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolTrue"] = 0] = "boolTrue"; - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolFalse"] = 1] = "boolFalse"; - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byte"] = 2] = "byte"; - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["short"] = 3] = "short"; - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["integer"] = 4] = "integer"; - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["long"] = 5] = "long"; - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byteArray"] = 6] = "byteArray"; - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["string"] = 7] = "string"; - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["timestamp"] = 8] = "timestamp"; - HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["uuid"] = 9] = "uuid"; -})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); -const BOOLEAN_TAG = "boolean"; -const BYTE_TAG = "byte"; -const SHORT_TAG = "short"; -const INT_TAG = "integer"; -const LONG_TAG = "long"; -const BINARY_TAG = "binary"; -const STRING_TAG = "string"; -const TIMESTAMP_TAG = "timestamp"; -const UUID_TAG = "uuid"; -const UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; +}) +(function (exporter) { + var 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]; }; +<<<<<<< HEAD + __extends = function (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 __()); +======= /***/ }), @@ -32558,350 +38505,108 @@ function splitMessage({ byteLength, byteOffset, buffer }) { return { headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)), +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; -} -exports.splitMessage = splitMessage; + __assign = Object.assign || function (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; + }; -/***/ }), + __rest = function (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; + }; +<<<<<<< HEAD + __decorate = function (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; + }; +======= /***/ 56680: /***/ ((module) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -/****************************************************************************** -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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + __esDecorate = function (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)); }; + 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; + }; -/***/ }), + __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; + }; +<<<<<<< HEAD + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; +======= /***/ 47793: /***/ ((__unused_webpack_module, exports) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; + __setFunctionName = function (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 }); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.resolveEventStreamSerdeConfig = void 0; -const resolveEventStreamSerdeConfig = (input) => ({ - ...input, - eventStreamMarshaller: input.eventStreamSerdeProvider(input), -}); -exports.resolveEventStreamSerdeConfig = resolveEventStreamSerdeConfig; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; +<<<<<<< HEAD + __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()); +======= /***/ }), @@ -32920,323 +38625,323 @@ tslib_1.__exportStar(__nccwpck_require__(47793), exports); /***/ 58822: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -33256,17 +38961,49 @@ class EventStreamMarshaller { this.universalMarshaller = new eventstream_serde_universal_1.EventStreamMarshaller({ utf8Decoder, utf8Encoder, +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }); - } - deserialize(body, deserializer) { - const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : (0, utils_1.readabletoIterable)(body); - return this.universalMarshaller.deserialize(bodyIterable, deserializer); - } - serialize(input, serializer) { - const serializedIterable = this.universalMarshaller.serialize(input, serializer); - if (typeof stream_1.Readable.from === "function") { - return stream_1.Readable.from(serializedIterable); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; } +<<<<<<< HEAD + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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]; } }; +======= else { const iterator = serializedIterable[Symbol.asyncIterator](); const serializedStream = new stream_1.Readable({ @@ -33347,347 +39084,346 @@ async function* readabletoIterable(readStream) { } if (err) { throw err; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; }); - readStream.on("data", (data) => { - records.push(data); - }); - readStream.on("end", () => { - streamEnded = true; - }); - while (!generationEnded) { - const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0)); - if (value) { - yield value; - } - generationEnded = streamEnded && records.length === 0; - } -} -exports.readabletoIterable = readabletoIterable; +<<<<<<< HEAD + __values = function (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 }; +======= /***/ }), /***/ 59638: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -33722,9 +39458,12 @@ class EventStreamMarshaller { for await (const chunk of input) { const payloadBuf = self.eventStreamCodec.encode(serializer(chunk)); yield payloadBuf; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - yield new Uint8Array(0); }; +<<<<<<< HEAD + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +======= return { [Symbol.asyncIterator]: serializedIterator, }; @@ -33756,60 +39495,15 @@ function getChunkedStream(source) { currentMessage = new Uint8Array(size); const currentMessageView = new DataView(currentMessage.buffer); currentMessageView.setUint32(0, size, false); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; - const iterator = async function* () { - const sourceIterator = source[Symbol.asyncIterator](); - while (true) { - const { value, done } = await sourceIterator.next(); - if (done) { - if (!currentMessageTotalLength) { - return; - } - else if (currentMessageTotalLength === currentMessagePendingLength) { - yield currentMessage; - } - else { - throw new Error("Truncated event message received."); - } - return; - } - const chunkLength = value.length; - let currentOffset = 0; - while (currentOffset < chunkLength) { - if (!currentMessage) { - const bytesRemaining = chunkLength - currentOffset; - if (!messageLengthBuffer) { - messageLengthBuffer = new Uint8Array(4); - } - const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining); - messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength); - currentMessagePendingLength += numBytesForTotal; - currentOffset += numBytesForTotal; - if (currentMessagePendingLength < 4) { - break; - } - allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); - messageLengthBuffer = null; - } - const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset); - currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength); - currentMessagePendingLength += numBytesToWrite; - currentOffset += numBytesToWrite; - if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { - yield currentMessage; - currentMessage = null; - currentMessageTotalLength = 0; - currentMessagePendingLength = 0; - } - } - } - }; - return { - [Symbol.asyncIterator]: iterator, - }; -} -exports.getChunkedStream = getChunkedStream; +<<<<<<< HEAD + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; +======= /***/ }), @@ -33893,323 +39587,323 @@ exports.eventStreamSerdeProvider = eventStreamSerdeProvider; /***/ 55098: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -34266,25 +39960,202 @@ class HashCalculator extends stream_1.Writable { this.hash = hash; } _write(chunk, encoding, callback) { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 try { - this.hash.update(chunk); + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } - catch (err) { - return callback(err); + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } - callback(); - } -} -exports.HashCalculator = HashCalculator; + 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 = 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; + }; +<<<<<<< HEAD + __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)); + }; +======= /***/ 76896: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; +<<<<<<< HEAD + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +======= Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fileStreamHasher = void 0; const fs_1 = __nccwpck_require__(57147); @@ -34309,13 +40180,27 @@ const fileStreamHasher = (hashCtor, fileStream) => new Promise((resolve, reject) hashCalculator.on("finish", function () { hash.digest().then(resolve).catch(reject); }); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }); -exports.fileStreamHasher = fileStreamHasher; -const isReadStream = (stream) => typeof stream.path === "string"; /***/ }), +<<<<<<< HEAD +/***/ 31941: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Upload = void 0; +const client_s3_1 = __nccwpck_require__(23371); +const abort_controller_1 = __nccwpck_require__(82655); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const smithy_client_1 = __nccwpck_require__(33218); +const events_1 = __nccwpck_require__(82361); +const bytelength_1 = __nccwpck_require__(55076); +const chunker_1 = __nccwpck_require__(91330); +======= /***/ 30785: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -34363,323 +40248,323 @@ exports.readableStreamHasher = readableStreamHasher; /***/ 51396: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -34711,9 +40596,11 @@ const smithy_client_1 = __nccwpck_require__(26351); const events_1 = __nccwpck_require__(82361); const bytelength_1 = __nccwpck_require__(12295); const chunker_1 = __nccwpck_require__(60198); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const MIN_PART_SIZE = 1024 * 1024 * 5; class Upload extends events_1.EventEmitter { constructor(options) { + var _a; super(); this.MAX_PARTS = 10000; this.queueSize = 4; @@ -34732,7 +40619,7 @@ class Upload extends events_1.EventEmitter { this.__validateInput(); this.totalBytes = (0, bytelength_1.byteLength)(this.params.Body); this.bytesUploadedSoFar = 0; - this.abortController = new abort_controller_1.AbortController(); + this.abortController = (_a = options.abortController) !== null && _a !== void 0 ? _a : new abort_controller_1.AbortController(); } async abort() { this.abortController.abort(); @@ -34745,9 +40632,11 @@ class Upload extends events_1.EventEmitter { return super.on(event, listener); } async __uploadUsingPut(dataPart) { + var _a; this.isMultiPart = false; const params = { ...this.params, Body: dataPart.data }; - const requestHandler = this.client.config.requestHandler; + const clientConfig = this.client.config; + const requestHandler = clientConfig.requestHandler; const eventEmitter = requestHandler instanceof events_1.EventEmitter ? requestHandler : null; const uploadEventListener = (event) => { this.bytesUploadedSoFar = event.loaded; @@ -34763,10 +40652,17 @@ class Upload extends events_1.EventEmitter { if (eventEmitter !== null) { eventEmitter.on("xhr.upload.progress", uploadEventListener); } - const [putResult, endpoint] = await Promise.all([ - this.client.send(new client_s3_1.PutObjectCommand(params)), - this.client.config.endpoint(), - ]); + const resolved = await Promise.all([this.client.send(new client_s3_1.PutObjectCommand(params)), (_a = clientConfig === null || clientConfig === void 0 ? void 0 : clientConfig.endpoint) === null || _a === void 0 ? void 0 : _a.call(clientConfig)]); + const putResult = resolved[0]; + let endpoint = resolved[1]; + if (!endpoint) { + endpoint = (0, middleware_endpoint_1.toEndpointV1)(await (0, middleware_endpoint_1.getEndpointFromInstructions)(params, client_s3_1.PutObjectCommand, { + ...clientConfig, + })); + } + if (!endpoint) { + throw new Error('Could not resolve endpoint from S3 "client.config.endpoint()" nor EndpointsV2.'); + } if (eventEmitter !== null) { eventEmitter.off("xhr.upload.progress", uploadEventListener); } @@ -34775,9 +40671,17 @@ class Upload extends events_1.EventEmitter { .map((segment) => (0, smithy_client_1.extendedEncodeURIComponent)(segment)) .join("/"); const locationBucket = (0, smithy_client_1.extendedEncodeURIComponent)(this.params.Bucket); - const Location = this.client.config.forcePathStyle - ? `${endpoint.protocol}//${endpoint.hostname}/${locationBucket}/${locationKey}` - : `${endpoint.protocol}//${locationBucket}.${endpoint.hostname}/${locationKey}`; + const Location = (() => { + const endpointHostnameIncludesBucket = endpoint.hostname.startsWith(`${locationBucket}.`); + const forcePathStyle = this.client.config.forcePathStyle; + if (forcePathStyle) { + return `${endpoint.protocol}//${endpoint.hostname}/${locationBucket}/${locationKey}`; + } + if (endpointHostnameIncludesBucket) { + return `${endpoint.protocol}//${endpoint.hostname}/${locationKey}`; + } + return `${endpoint.protocol}//${locationBucket}.${endpoint.hostname}/${locationKey}`; + })(); this.singleUploadResult = { ...putResult, Bucket: this.params.Bucket, @@ -34798,8 +40702,7 @@ class Upload extends events_1.EventEmitter { const createCommandParams = { ...this.params, Body: undefined }; this.createMultiPartPromise = this.client.send(new client_s3_1.CreateMultipartUploadCommand(createCommandParams)); } - const createMultipartUploadResult = await this.createMultiPartPromise; - this.uploadId = createMultipartUploadResult.UploadId; + return this.createMultiPartPromise; } async __doConcurrentUpload(dataFeeder) { for await (const dataPart of dataFeeder) { @@ -34814,7 +40717,8 @@ class Upload extends events_1.EventEmitter { return await this.__uploadUsingPut(dataPart); } if (!this.uploadId) { - await this.__createMultipartUpload(); + const { UploadId } = await this.__createMultipartUpload(); + this.uploadId = UploadId; if (this.abortController.signal.aborted) { return; } @@ -34957,14 +40861,21 @@ exports.Upload = Upload; /***/ }), +<<<<<<< HEAD +/***/ 55076: +======= /***/ 12295: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.byteLength = void 0; +<<<<<<< HEAD +const runtimeConfig_1 = __nccwpck_require__(33900); +======= const runtimeConfig_1 = __nccwpck_require__(35754); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const byteLength = (input) => { if (input === null || input === undefined) return 0; @@ -34994,19 +40905,29 @@ exports.byteLength = byteLength; /***/ }), +<<<<<<< HEAD +/***/ 91330: +======= /***/ 60198: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getChunk = void 0; const buffer_1 = __nccwpck_require__(14300); const stream_1 = __nccwpck_require__(12781); +<<<<<<< HEAD +const getChunkBuffer_1 = __nccwpck_require__(10598); +const getChunkStream_1 = __nccwpck_require__(67487); +const getDataReadable_1 = __nccwpck_require__(5412); +const getDataReadableStream_1 = __nccwpck_require__(19935); +======= const getChunkBuffer_1 = __nccwpck_require__(92746); const getChunkStream_1 = __nccwpck_require__(67436); const getDataReadable_1 = __nccwpck_require__(65213); const getDataReadableStream_1 = __nccwpck_require__(76728); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getChunk = (data, partSize) => { if (data instanceof buffer_1.Buffer) { return (0, getChunkBuffer_1.getChunkBuffer)(data, partSize); @@ -35032,10 +40953,13 @@ exports.getChunk = getChunk; /***/ }), +<<<<<<< HEAD +/***/ 10598: +======= /***/ 92746: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getChunkBuffer = void 0; @@ -35063,10 +40987,13 @@ exports.getChunkBuffer = getChunkBuffer; /***/ }), +<<<<<<< HEAD +/***/ 67487: +======= /***/ 67436: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getChunkStream = void 0; @@ -35099,10 +41026,13 @@ exports.getChunkStream = getChunkStream; /***/ }), +<<<<<<< HEAD +/***/ 5412: +======= /***/ 65213: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getDataReadable = void 0; @@ -35117,10 +41047,13 @@ exports.getDataReadable = getDataReadable; /***/ }), +<<<<<<< HEAD +/***/ 19935: +======= /***/ 76728: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getDataReadableStream = void 0; @@ -35147,28 +41080,44 @@ exports.getDataReadableStream = getDataReadableStream; /***/ }), +<<<<<<< HEAD +/***/ 20488: +======= /***/ 13436: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(69389); +tslib_1.__exportStar(__nccwpck_require__(31941), exports); +tslib_1.__exportStar(__nccwpck_require__(94543), exports); +======= const tslib_1 = __nccwpck_require__(42135); tslib_1.__exportStar(__nccwpck_require__(47984), exports); tslib_1.__exportStar(__nccwpck_require__(71498), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 33900: +======= /***/ 35754: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ClientDefaultValues = void 0; const fs_1 = __nccwpck_require__(57147); +<<<<<<< HEAD +const runtimeConfig_shared_1 = __nccwpck_require__(41541); +======= const runtimeConfig_shared_1 = __nccwpck_require__(67836); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.ClientDefaultValues = { ...runtimeConfig_shared_1.ClientSharedValues, runtime: "node", @@ -35178,10 +41127,13 @@ exports.ClientDefaultValues = { /***/ }), +<<<<<<< HEAD +/***/ 41541: +======= /***/ 67836: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.ClientSharedValues = void 0; @@ -35192,348 +41144,466 @@ exports.ClientSharedValues = { /***/ }), +<<<<<<< HEAD +/***/ 94543: +======= /***/ 71498: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), +<<<<<<< HEAD +/***/ 69389: +======= /***/ 42135: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 78879: +======= /***/ 10179: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS = exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME = exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME = void 0; +<<<<<<< HEAD +const util_config_provider_1 = __nccwpck_require__(32617); +======= const util_config_provider_1 = __nccwpck_require__(46522); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_ENV_NAME = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS"; exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_INI_NAME = "s3_disable_multiregion_access_points"; exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS = { @@ -35545,14 +41615,21 @@ exports.NODE_DISABLE_MULTIREGION_ACCESS_POINT_CONFIG_OPTIONS = { /***/ }), +<<<<<<< HEAD +/***/ 87018: +======= /***/ 73033: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.NODE_USE_ARN_REGION_CONFIG_OPTIONS = exports.NODE_USE_ARN_REGION_INI_NAME = exports.NODE_USE_ARN_REGION_ENV_NAME = void 0; +<<<<<<< HEAD +const util_config_provider_1 = __nccwpck_require__(32617); +======= const util_config_provider_1 = __nccwpck_require__(46522); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.NODE_USE_ARN_REGION_ENV_NAME = "AWS_S3_USE_ARN_REGION"; exports.NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region"; exports.NODE_USE_ARN_REGION_CONFIG_OPTIONS = { @@ -35564,16 +41641,25 @@ exports.NODE_USE_ARN_REGION_CONFIG_OPTIONS = { /***/ }), +<<<<<<< HEAD +/***/ 58207: +======= /***/ 42221: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getBucketEndpointPlugin = exports.bucketEndpointMiddlewareOptions = exports.bucketEndpointMiddleware = void 0; +<<<<<<< HEAD +const util_arn_parser_1 = __nccwpck_require__(84122); +const protocol_http_1 = __nccwpck_require__(45311); +const bucketHostname_1 = __nccwpck_require__(40339); +======= const protocol_http_1 = __nccwpck_require__(35712); const util_arn_parser_1 = __nccwpck_require__(1679); const bucketHostname_1 = __nccwpck_require__(28226); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const bucketEndpointMiddleware = (options) => (next, context) => async (args) => { const { Bucket: bucketName } = args.input; let replaceBucketInPath = options.bucketEndpoint; @@ -35658,14 +41744,21 @@ exports.getBucketEndpointPlugin = getBucketEndpointPlugin; /***/ }), +<<<<<<< HEAD +/***/ 40339: +======= /***/ 28226: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.bucketHostname = void 0; +<<<<<<< HEAD +const bucketHostnameUtils_1 = __nccwpck_require__(58189); +======= const bucketHostnameUtils_1 = __nccwpck_require__(79495); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const bucketHostname = (options) => { (0, bucketHostnameUtils_1.validateCustomEndpoint)(options); return (0, bucketHostnameUtils_1.isBucketNameOptions)(options) @@ -35794,10 +41887,13 @@ const getEndpointFromAccessPointArn = ({ useArnRegion, clientRegion, clientSigni /***/ }), +<<<<<<< HEAD +/***/ 58189: +======= /***/ 79495: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.validateMrapAlias = exports.validateNoFIPS = exports.validateNoDualstack = exports.getArnResources = exports.validateCustomEndpoint = exports.validateDNSHostLabel = exports.validateAccountId = exports.validateRegionalClient = exports.validateRegion = exports.validatePartition = exports.validateOutpostService = exports.validateS3Service = exports.validateService = exports.validateArnEndpointOptions = exports.getSuffixForArnEndpoint = exports.getSuffix = exports.isDnsCompatibleBucketName = exports.isBucketNameOptions = exports.S3_HOSTNAME_PATTERN = exports.DOT_PATTERN = void 0; @@ -35955,10 +42051,13 @@ exports.validateMrapAlias = validateMrapAlias; /***/ }), +<<<<<<< HEAD +/***/ 46000: +======= /***/ 86006: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveBucketEndpointConfig = void 0; @@ -35980,13 +42079,25 @@ exports.resolveBucketEndpointConfig = resolveBucketEndpointConfig; /***/ }), +<<<<<<< HEAD +/***/ 24602: +======= /***/ 98228: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.validateNoFIPS = exports.validateNoDualstack = exports.validateDNSHostLabel = exports.validateRegion = exports.validateAccountId = exports.validatePartition = exports.validateOutpostService = exports.getSuffixForArnEndpoint = exports.getArnResources = void 0; +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(51367); +tslib_1.__exportStar(__nccwpck_require__(78879), exports); +tslib_1.__exportStar(__nccwpck_require__(87018), exports); +tslib_1.__exportStar(__nccwpck_require__(58207), exports); +tslib_1.__exportStar(__nccwpck_require__(40339), exports); +tslib_1.__exportStar(__nccwpck_require__(46000), exports); +var bucketHostnameUtils_1 = __nccwpck_require__(58189); +======= const tslib_1 = __nccwpck_require__(10845); tslib_1.__exportStar(__nccwpck_require__(10179), exports); tslib_1.__exportStar(__nccwpck_require__(73033), exports); @@ -35994,6 +42105,7 @@ tslib_1.__exportStar(__nccwpck_require__(42221), exports); tslib_1.__exportStar(__nccwpck_require__(28226), exports); tslib_1.__exportStar(__nccwpck_require__(86006), exports); var bucketHostnameUtils_1 = __nccwpck_require__(79495); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "getArnResources", ({ enumerable: true, get: function () { return bucketHostnameUtils_1.getArnResources; } })); Object.defineProperty(exports, "getSuffixForArnEndpoint", ({ enumerable: true, get: function () { return bucketHostnameUtils_1.getSuffixForArnEndpoint; } })); Object.defineProperty(exports, "validateOutpostService", ({ enumerable: true, get: function () { return bucketHostnameUtils_1.validateOutpostService; } })); @@ -36007,328 +42119,79 @@ Object.defineProperty(exports, "validateNoFIPS", ({ enumerable: true, get: funct /***/ }), +<<<<<<< HEAD +/***/ 51367: +======= /***/ 10845: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); - - +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +<<<<<<< HEAD +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; +======= /***/ }), /***/ 96962: @@ -36358,39 +42221,383 @@ function contentLengthMiddleware(bodyLengthChecker) { } catch (error) { } +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } } - return next({ - ...args, - request, + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); }); }; -} -exports.contentLengthMiddleware = contentLengthMiddleware; -exports.contentLengthMiddlewareOptions = { - step: "build", - tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], - name: "contentLengthMiddleware", - override: true, -}; -const getContentLengthPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), exports.contentLengthMiddlewareOptions); - }, + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); }); -exports.getContentLengthPlugin = getContentLengthPlugin; /***/ }), +<<<<<<< HEAD +/***/ 17335: +======= /***/ 57411: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getAddExpectContinuePlugin = exports.addExpectContinueMiddlewareOptions = exports.addExpectContinueMiddleware = void 0; +<<<<<<< HEAD +const protocol_http_1 = __nccwpck_require__(45311); +======= const protocol_http_1 = __nccwpck_require__(35712); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 function addExpectContinueMiddleware(options) { return (next) => async (args) => { const { request } = args; @@ -36423,13 +42630,16 @@ exports.getAddExpectContinuePlugin = getAddExpectContinuePlugin; /***/ }), +<<<<<<< HEAD +/***/ 62058: +======= /***/ 62339: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumLocation = exports.ChecksumAlgorithm = void 0; +exports.S3_EXPRESS_DEFAULT_CHECKSUM_ALGORITHM = exports.DEFAULT_CHECKSUM_ALGORITHM = exports.ChecksumLocation = exports.ChecksumAlgorithm = void 0; var ChecksumAlgorithm; (function (ChecksumAlgorithm) { ChecksumAlgorithm["MD5"] = "MD5"; @@ -36443,16 +42653,38 @@ var ChecksumLocation; ChecksumLocation["HEADER"] = "header"; ChecksumLocation["TRAILER"] = "trailer"; })(ChecksumLocation = exports.ChecksumLocation || (exports.ChecksumLocation = {})); +exports.DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.MD5; +exports.S3_EXPRESS_DEFAULT_CHECKSUM_ALGORITHM = ChecksumAlgorithm.CRC32; /***/ }), +<<<<<<< HEAD +/***/ 68300: +======= /***/ 8914: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.flexibleChecksumsMiddleware = exports.flexibleChecksumsMiddlewareOptions = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const getChecksumAlgorithmForRequest_1 = __nccwpck_require__(29372); +const getChecksumLocationName_1 = __nccwpck_require__(94642); +const hasHeader_1 = __nccwpck_require__(61513); +const isStreaming_1 = __nccwpck_require__(44558); +const selectChecksumAlgorithmFunction_1 = __nccwpck_require__(62671); +const stringHasher_1 = __nccwpck_require__(81763); +exports.flexibleChecksumsMiddlewareOptions = { + name: "flexibleChecksumsMiddleware", + step: "build", + tags: ["BODY_CHECKSUM"], + override: true, +}; +const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next, context) => async (args) => { +======= exports.flexibleChecksumsMiddleware = void 0; const protocol_http_1 = __nccwpck_require__(35712); const getChecksumAlgorithmForRequest_1 = __nccwpck_require__(91039); @@ -36463,6 +42695,7 @@ const selectChecksumAlgorithmFunction_1 = __nccwpck_require__(95991); const stringHasher_1 = __nccwpck_require__(83826); const validateChecksumFromResponse_1 = __nccwpck_require__(33742); const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next) => async (args) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 if (!protocol_http_1.HttpRequest.isInstance(args.request)) { return next(args); } @@ -36473,7 +42706,7 @@ const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next) => asyn const checksumAlgorithm = (0, getChecksumAlgorithmForRequest_1.getChecksumAlgorithmForRequest)(input, { requestChecksumRequired, requestAlgorithmMember, - }); + }, !!context.isS3ExpressBucket); let updatedBody = requestBody; let updatedHeaders = headers; if (checksumAlgorithm) { @@ -36490,7 +42723,9 @@ const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next) => asyn }); updatedHeaders = { ...headers, - "content-encoding": "aws-chunked", + "content-encoding": headers["content-encoding"] + ? `${headers["content-encoding"]},aws-chunked` + : "aws-chunked", "transfer-encoding": "chunked", "x-amz-decoded-content-length": headers["content-length"], "x-amz-content-sha256": "STREAMING-UNSIGNED-PAYLOAD-TRAILER", @@ -36514,29 +42749,91 @@ const flexibleChecksumsMiddleware = (config, middlewareConfig) => (next) => asyn body: updatedBody, }, }); + return result; +}; +exports.flexibleChecksumsMiddleware = flexibleChecksumsMiddleware; + + +/***/ }), + +<<<<<<< HEAD +/***/ 58608: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.flexibleChecksumsResponseMiddleware = exports.flexibleChecksumsResponseMiddlewareOptions = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const getChecksumAlgorithmListForResponse_1 = __nccwpck_require__(27358); +const getChecksumLocationName_1 = __nccwpck_require__(94642); +const isChecksumWithPartNumber_1 = __nccwpck_require__(42726); +const isStreaming_1 = __nccwpck_require__(44558); +const create_read_stream_on_buffer_1 = __nccwpck_require__(31327); +const validateChecksumFromResponse_1 = __nccwpck_require__(79295); +exports.flexibleChecksumsResponseMiddlewareOptions = { + name: "flexibleChecksumsResponseMiddleware", + toMiddleware: "deserializerMiddleware", + relation: "after", + tags: ["BODY_CHECKSUM"], + override: true, +}; +const flexibleChecksumsResponseMiddleware = (config, middlewareConfig) => (next, context) => async (args) => { + if (!protocol_http_1.HttpRequest.isInstance(args.request)) { + return next(args); + } + const input = args.input; + const result = await next(args); + const response = result.response; + let collectedStream = undefined; const { requestValidationModeMember, responseAlgorithms } = middlewareConfig; if (requestValidationModeMember && input[requestValidationModeMember] === "ENABLED") { - (0, validateChecksumFromResponse_1.validateChecksumFromResponse)(result.response, { + const { clientName, commandName } = context; + const isS3WholeObjectMultipartGetResponseChecksum = clientName === "S3Client" && + commandName === "GetObjectCommand" && + (0, getChecksumAlgorithmListForResponse_1.getChecksumAlgorithmListForResponse)(responseAlgorithms).every((algorithm) => { + const responseHeader = (0, getChecksumLocationName_1.getChecksumLocationName)(algorithm); + const checksumFromResponse = response.headers[responseHeader]; + return !checksumFromResponse || (0, isChecksumWithPartNumber_1.isChecksumWithPartNumber)(checksumFromResponse); + }); + if (isS3WholeObjectMultipartGetResponseChecksum) { + return result; + } + const isStreamingBody = (0, isStreaming_1.isStreaming)(response.body); + if (isStreamingBody) { + collectedStream = await config.streamCollector(response.body); + response.body = (0, create_read_stream_on_buffer_1.createReadStreamOnBuffer)(collectedStream); + } + await (0, validateChecksumFromResponse_1.validateChecksumFromResponse)(result.response, { config, responseAlgorithms, }); + if (isStreamingBody && collectedStream) { + response.body = (0, create_read_stream_on_buffer_1.createReadStreamOnBuffer)(collectedStream); + } } return result; }; -exports.flexibleChecksumsMiddleware = flexibleChecksumsMiddleware; +exports.flexibleChecksumsResponseMiddleware = flexibleChecksumsResponseMiddleware; /***/ }), +/***/ 14094: +======= /***/ 32202: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getChecksum = void 0; +<<<<<<< HEAD +const isStreaming_1 = __nccwpck_require__(44558); +const stringHasher_1 = __nccwpck_require__(81763); +======= const isStreaming_1 = __nccwpck_require__(7424); const stringHasher_1 = __nccwpck_require__(83826); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getChecksum = async (body, { streamHasher, checksumAlgorithmFn, base64Encoder }) => { const digest = (0, isStreaming_1.isStreaming)(body) ? streamHasher(checksumAlgorithmFn, body) : (0, stringHasher_1.stringHasher)(checksumAlgorithmFn, body); return base64Encoder(await digest); @@ -36546,18 +42843,28 @@ exports.getChecksum = getChecksum; /***/ }), +<<<<<<< HEAD +/***/ 29372: +======= /***/ 91039: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getChecksumAlgorithmForRequest = void 0; +<<<<<<< HEAD +const constants_1 = __nccwpck_require__(62058); +const types_1 = __nccwpck_require__(83364); +const getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestAlgorithmMember }, isS3Express) => { + const defaultAlgorithm = isS3Express ? constants_1.S3_EXPRESS_DEFAULT_CHECKSUM_ALGORITHM : constants_1.DEFAULT_CHECKSUM_ALGORITHM; +======= const constants_1 = __nccwpck_require__(62339); const types_1 = __nccwpck_require__(39967); const getChecksumAlgorithmForRequest = (input, { requestChecksumRequired, requestAlgorithmMember }) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 if (!requestAlgorithmMember || !input[requestAlgorithmMember]) { - return requestChecksumRequired ? constants_1.ChecksumAlgorithm.MD5 : undefined; + return requestChecksumRequired ? defaultAlgorithm : undefined; } const checksumAlgorithm = input[requestAlgorithmMember]; if (!types_1.CLIENT_SUPPORTED_ALGORITHMS.includes(checksumAlgorithm)) { @@ -36571,14 +42878,21 @@ exports.getChecksumAlgorithmForRequest = getChecksumAlgorithmForRequest; /***/ }), +<<<<<<< HEAD +/***/ 27358: +======= /***/ 45618: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getChecksumAlgorithmListForResponse = void 0; +<<<<<<< HEAD +const types_1 = __nccwpck_require__(83364); +======= const types_1 = __nccwpck_require__(39967); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getChecksumAlgorithmListForResponse = (responseAlgorithms = []) => { const validChecksumAlgorithms = []; for (const algorithm of types_1.PRIORITY_ORDER_ALGORITHMS) { @@ -36594,26 +42908,41 @@ exports.getChecksumAlgorithmListForResponse = getChecksumAlgorithmListForRespons /***/ }), +<<<<<<< HEAD +/***/ 94642: +======= /***/ 38235: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getChecksumLocationName = void 0; +<<<<<<< HEAD +const constants_1 = __nccwpck_require__(62058); +======= const constants_1 = __nccwpck_require__(62339); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getChecksumLocationName = (algorithm) => algorithm === constants_1.ChecksumAlgorithm.MD5 ? "content-md5" : `x-amz-checksum-${algorithm.toLowerCase()}`; exports.getChecksumLocationName = getChecksumLocationName; /***/ }), +<<<<<<< HEAD +/***/ 83578: +======= /***/ 48743: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.getFlexibleChecksumsPlugin = void 0; +const flexibleChecksumsMiddleware_1 = __nccwpck_require__(68300); +const flexibleChecksumsResponseMiddleware_1 = __nccwpck_require__(58608); +======= exports.getFlexibleChecksumsPlugin = exports.flexibleChecksumsMiddlewareOptions = void 0; const flexibleChecksumsMiddleware_1 = __nccwpck_require__(8914); exports.flexibleChecksumsMiddlewareOptions = { @@ -36622,9 +42951,11 @@ exports.flexibleChecksumsMiddlewareOptions = { tags: ["BODY_CHECKSUM"], override: true, }; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getFlexibleChecksumsPlugin = (config, middlewareConfig) => ({ applyToStack: (clientStack) => { - clientStack.add((0, flexibleChecksumsMiddleware_1.flexibleChecksumsMiddleware)(config, middlewareConfig), exports.flexibleChecksumsMiddlewareOptions); + clientStack.add((0, flexibleChecksumsMiddleware_1.flexibleChecksumsMiddleware)(config, middlewareConfig), flexibleChecksumsMiddleware_1.flexibleChecksumsMiddlewareOptions); + clientStack.addRelativeTo((0, flexibleChecksumsResponseMiddleware_1.flexibleChecksumsResponseMiddleware)(config, middlewareConfig), flexibleChecksumsResponseMiddleware_1.flexibleChecksumsResponseMiddlewareOptions); }, }); exports.getFlexibleChecksumsPlugin = getFlexibleChecksumsPlugin; @@ -36632,10 +42963,13 @@ exports.getFlexibleChecksumsPlugin = getFlexibleChecksumsPlugin; /***/ }), +<<<<<<< HEAD +/***/ 61513: +======= /***/ 80851: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.hasHeader = void 0; @@ -36653,44 +42987,94 @@ exports.hasHeader = hasHeader; /***/ }), +<<<<<<< HEAD +/***/ 53106: +======= /***/ 77389: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(17819); +tslib_1.__exportStar(__nccwpck_require__(62058), exports); +tslib_1.__exportStar(__nccwpck_require__(68300), exports); +tslib_1.__exportStar(__nccwpck_require__(83578), exports); +======= const tslib_1 = __nccwpck_require__(42379); tslib_1.__exportStar(__nccwpck_require__(62339), exports); tslib_1.__exportStar(__nccwpck_require__(8914), exports); tslib_1.__exportStar(__nccwpck_require__(48743), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 42726: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isChecksumWithPartNumber = void 0; +const isChecksumWithPartNumber = (checksum) => { + const lastHyphenIndex = checksum.lastIndexOf("-"); + if (lastHyphenIndex !== -1) { + const numberPart = checksum.slice(lastHyphenIndex + 1); + if (!numberPart.startsWith("0")) { + const number = parseInt(numberPart, 10); + if (!isNaN(number) && number >= 1 && number <= 10000) { + return true; + } + } + } + return false; +}; +exports.isChecksumWithPartNumber = isChecksumWithPartNumber; + + +/***/ }), + +/***/ 44558: +======= /***/ 7424: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isStreaming = void 0; +<<<<<<< HEAD +const is_array_buffer_1 = __nccwpck_require__(80743); +======= const is_array_buffer_1 = __nccwpck_require__(1627); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const isStreaming = (body) => body !== undefined && typeof body !== "string" && !ArrayBuffer.isView(body) && !(0, is_array_buffer_1.isArrayBuffer)(body); exports.isStreaming = isStreaming; /***/ }), +<<<<<<< HEAD +/***/ 62671: +======= /***/ 95991: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.selectChecksumAlgorithmFunction = void 0; +<<<<<<< HEAD +const crc32_1 = __nccwpck_require__(30343); +const crc32c_1 = __nccwpck_require__(21256); +const constants_1 = __nccwpck_require__(62058); +======= const crc32_1 = __nccwpck_require__(51224); const crc32c_1 = __nccwpck_require__(47003); const constants_1 = __nccwpck_require__(62339); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const selectChecksumAlgorithmFunction = (checksumAlgorithm, config) => ({ [constants_1.ChecksumAlgorithm.MD5]: config.md5, [constants_1.ChecksumAlgorithm.CRC32]: crc32_1.AwsCrc32, @@ -36703,16 +43087,39 @@ exports.selectChecksumAlgorithmFunction = selectChecksumAlgorithmFunction; /***/ }), +<<<<<<< HEAD +/***/ 31327: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createReadStreamOnBuffer = void 0; +const stream_1 = __nccwpck_require__(12781); +function createReadStreamOnBuffer(buffer) { + const stream = new stream_1.Transform(); + stream.push(buffer); + stream.push(null); + return stream; +} +exports.createReadStreamOnBuffer = createReadStreamOnBuffer; + + +/***/ }), + +/***/ 81763: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +======= /***/ 83826: /***/ ((__unused_webpack_module, exports) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.stringHasher = void 0; +const util_utf8_1 = __nccwpck_require__(38134); const stringHasher = (checksumAlgorithmFn, body) => { const hash = new checksumAlgorithmFn(); - hash.update(body || ""); + hash.update((0, util_utf8_1.toUint8Array)(body || "")); return hash.digest(); }; exports.stringHasher = stringHasher; @@ -36720,14 +43127,21 @@ exports.stringHasher = stringHasher; /***/ }), +<<<<<<< HEAD +/***/ 83364: +======= /***/ 39967: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.PRIORITY_ORDER_ALGORITHMS = exports.CLIENT_SUPPORTED_ALGORITHMS = void 0; +<<<<<<< HEAD +const constants_1 = __nccwpck_require__(62058); +======= const constants_1 = __nccwpck_require__(62339); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.CLIENT_SUPPORTED_ALGORITHMS = [ constants_1.ChecksumAlgorithm.CRC32, constants_1.ChecksumAlgorithm.CRC32C, @@ -36744,17 +43158,27 @@ exports.PRIORITY_ORDER_ALGORITHMS = [ /***/ }), +<<<<<<< HEAD +/***/ 79295: +======= /***/ 33742: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.validateChecksumFromResponse = void 0; +<<<<<<< HEAD +const getChecksum_1 = __nccwpck_require__(14094); +const getChecksumAlgorithmListForResponse_1 = __nccwpck_require__(27358); +const getChecksumLocationName_1 = __nccwpck_require__(94642); +const selectChecksumAlgorithmFunction_1 = __nccwpck_require__(62671); +======= const getChecksum_1 = __nccwpck_require__(32202); const getChecksumAlgorithmListForResponse_1 = __nccwpck_require__(45618); const getChecksumLocationName_1 = __nccwpck_require__(38235); const selectChecksumAlgorithmFunction_1 = __nccwpck_require__(95991); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const validateChecksumFromResponse = async (response, { config, responseAlgorithms }) => { const checksumAlgorithms = (0, getChecksumAlgorithmListForResponse_1.getChecksumAlgorithmListForResponse)(responseAlgorithms); const { body: responseBody, headers: responseHeaders } = response; @@ -36778,338 +43202,453 @@ exports.validateChecksumFromResponse = validateChecksumFromResponse; /***/ }), +<<<<<<< HEAD +/***/ 17819: +======= /***/ 42379: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 23213: +======= /***/ 18127: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getHostHeaderPlugin = exports.hostHeaderMiddlewareOptions = exports.hostHeaderMiddleware = exports.resolveHostHeaderConfig = void 0; +<<<<<<< HEAD +const protocol_http_1 = __nccwpck_require__(45311); +======= const protocol_http_1 = __nccwpck_require__(35712); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 function resolveHostHeaderConfig(input) { return input; } @@ -37121,10 +43660,13 @@ const hostHeaderMiddleware = (options) => (next) => async (args) => { const { handlerProtocol = "" } = options.requestHandler.metadata || {}; if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) { delete request.headers["host"]; - request.headers[":authority"] = ""; + request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : ""); } else if (!request.headers["host"]) { - request.headers["host"] = request.hostname; + let host = request.hostname; + if (request.port != null) + host += `:${request.port}`; + request.headers["host"] = host; } return next(args); }; @@ -37146,10 +43688,13 @@ exports.getHostHeaderPlugin = getHostHeaderPlugin; /***/ }), +<<<<<<< HEAD +/***/ 0: +======= /***/ 13882: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getLocationConstraintPlugin = exports.locationConstraintMiddlewareOptions = exports.locationConstraintMiddleware = void 0; @@ -37157,7 +43702,7 @@ function locationConstraintMiddleware(options) { return (next) => async (args) => { const { CreateBucketConfiguration } = args.input; const region = await options.region(); - if (!CreateBucketConfiguration || !CreateBucketConfiguration.LocationConstraint) { + if (!(CreateBucketConfiguration === null || CreateBucketConfiguration === void 0 ? void 0 : CreateBucketConfiguration.LocationConstraint) && !(CreateBucketConfiguration === null || CreateBucketConfiguration === void 0 ? void 0 : CreateBucketConfiguration.Location)) { args = { ...args, input: { @@ -37186,42 +43731,67 @@ exports.getLocationConstraintPlugin = getLocationConstraintPlugin; /***/ }), +<<<<<<< HEAD +/***/ 45288: +======= /***/ 67662: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(39680); +tslib_1.__exportStar(__nccwpck_require__(70104), exports); +======= const tslib_1 = __nccwpck_require__(1885); tslib_1.__exportStar(__nccwpck_require__(12764), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 70104: +======= /***/ 12764: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getLoggerPlugin = exports.loggerMiddlewareOptions = exports.loggerMiddleware = void 0; const loggerMiddleware = () => (next, context) => async (args) => { - const { clientName, commandName, inputFilterSensitiveLog, logger, outputFilterSensitiveLog } = context; - const response = await next(args); - if (!logger) { - return response; - } - if (typeof logger.info === "function") { + var _a, _b; + try { + const response = await next(args); + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog !== null && overrideInputFilterSensitiveLog !== void 0 ? overrideInputFilterSensitiveLog : context.inputFilterSensitiveLog; + const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog !== null && overrideOutputFilterSensitiveLog !== void 0 ? overrideOutputFilterSensitiveLog : context.outputFilterSensitiveLog; const { $metadata, ...outputWithoutMetadata } = response.output; - logger.info({ + (_a = logger === null || logger === void 0 ? void 0 : logger.info) === null || _a === void 0 ? void 0 : _a.call(logger, { clientName, commandName, input: inputFilterSensitiveLog(args.input), output: outputFilterSensitiveLog(outputWithoutMetadata), metadata: $metadata, }); + return response; + } + catch (error) { + const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context; + const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions; + const inputFilterSensitiveLog = overrideInputFilterSensitiveLog !== null && overrideInputFilterSensitiveLog !== void 0 ? overrideInputFilterSensitiveLog : context.inputFilterSensitiveLog; + (_b = logger === null || logger === void 0 ? void 0 : logger.error) === null || _b === void 0 ? void 0 : _b.call(logger, { + clientName, + commandName, + input: inputFilterSensitiveLog(args.input), + error, + metadata: error.$metadata, + }); + throw error; } - return response; }; exports.loggerMiddleware = loggerMiddleware; exports.loggerMiddlewareOptions = { @@ -37240,338 +43810,453 @@ exports.getLoggerPlugin = getLoggerPlugin; /***/ }), +<<<<<<< HEAD +/***/ 39680: +======= /***/ 1885: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 13807: +======= /***/ 34755: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getRecursionDetectionPlugin = exports.addRecursionDetectionMiddlewareOptions = exports.recursionDetectionMiddleware = void 0; +<<<<<<< HEAD +const protocol_http_1 = __nccwpck_require__(45311); +======= const protocol_http_1 = __nccwpck_require__(35712); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id"; const ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME"; const ENV_TRACE_ID = "_X_AMZN_TRACE_ID"; @@ -37611,6 +44296,16 @@ exports.getRecursionDetectionPlugin = getRecursionDetectionPlugin; /***/ }), +<<<<<<< HEAD +/***/ 10397: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCheckContentLengthHeaderPlugin = exports.checkContentLengthHeaderMiddlewareOptions = exports.checkContentLengthHeader = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const smithy_client_1 = __nccwpck_require__(33218); +======= /***/ 24720: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -38130,323 +44825,323 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ 8441: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -38459,6 +45154,7 @@ var __createBinding; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCheckContentLengthHeaderPlugin = exports.checkContentLengthHeaderMiddlewareOptions = exports.checkContentLengthHeader = void 0; const protocol_http_1 = __nccwpck_require__(35712); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const CONTENT_LENGTH_HEADER = "content-length"; function checkContentLengthHeader() { return (next, context) => async (args) => { @@ -38467,7 +45163,7 @@ function checkContentLengthHeader() { if (protocol_http_1.HttpRequest.isInstance(request)) { if (!request.headers[CONTENT_LENGTH_HEADER]) { const message = `Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.`; - if (typeof ((_a = context === null || context === void 0 ? void 0 : context.logger) === null || _a === void 0 ? void 0 : _a.warn) === "function") { + if (typeof ((_a = context === null || context === void 0 ? void 0 : context.logger) === null || _a === void 0 ? void 0 : _a.warn) === "function" && !(context.logger instanceof smithy_client_1.NoOpLogger)) { context.logger.warn(message); } else { @@ -38495,36 +45191,455 @@ exports.getCheckContentLengthHeaderPlugin = getCheckContentLengthHeaderPlugin; /***/ }), +<<<<<<< HEAD +/***/ 52776: +======= /***/ 60444: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(85591); +tslib_1.__exportStar(__nccwpck_require__(10397), exports); +tslib_1.__exportStar(__nccwpck_require__(46928), exports); +tslib_1.__exportStar(__nccwpck_require__(98385), exports); +tslib_1.__exportStar(__nccwpck_require__(74219), exports); +tslib_1.__exportStar(__nccwpck_require__(41215), exports); +tslib_1.__exportStar(__nccwpck_require__(80110), exports); +tslib_1.__exportStar(__nccwpck_require__(42758), exports); +======= const tslib_1 = __nccwpck_require__(66576); tslib_1.__exportStar(__nccwpck_require__(95408), exports); tslib_1.__exportStar(__nccwpck_require__(93265), exports); tslib_1.__exportStar(__nccwpck_require__(86327), exports); tslib_1.__exportStar(__nccwpck_require__(62014), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/***/ }), + +<<<<<<< HEAD +/***/ 46928: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.regionRedirectEndpointMiddlewareOptions = exports.regionRedirectEndpointMiddleware = void 0; +const regionRedirectEndpointMiddleware = (config) => { + return (next, context) => async (args) => { + const originalRegion = await config.region(); + const regionProviderRef = config.region; + if (context.__s3RegionRedirect) { + config.region = async () => { + config.region = regionProviderRef; + return context.__s3RegionRedirect; + }; + } + const result = await next(args); + if (context.__s3RegionRedirect) { + const region = await config.region(); + if (originalRegion !== region) { + throw new Error("Region was not restored following S3 region redirect."); + } + } + return result; + }; +}; +exports.regionRedirectEndpointMiddleware = regionRedirectEndpointMiddleware; +exports.regionRedirectEndpointMiddlewareOptions = { + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectEndpointMiddleware", + override: true, + relation: "before", + toMiddleware: "endpointV2Middleware", +}; + + +/***/ }), + +/***/ 98385: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRegionRedirectMiddlewarePlugin = exports.regionRedirectMiddlewareOptions = exports.regionRedirectMiddleware = void 0; +const region_redirect_endpoint_middleware_1 = __nccwpck_require__(46928); +function regionRedirectMiddleware(clientConfig) { + return (next, context) => async (args) => { + var _a, _b; + try { + return await next(args); + } + catch (err) { + if (clientConfig.followRegionRedirects && + ((_a = err === null || err === void 0 ? void 0 : err.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) === 301) { + try { + const actualRegion = err.$response.headers["x-amz-bucket-region"]; + (_b = context.logger) === null || _b === void 0 ? void 0 : _b.debug(`Redirecting from ${await clientConfig.region()} to ${actualRegion}`); + context.__s3RegionRedirect = actualRegion; + } + catch (e) { + throw new Error("Region redirect failed: " + e); + } + return next(args); + } + else { + throw err; + } + } + }; +} +exports.regionRedirectMiddleware = regionRedirectMiddleware; +exports.regionRedirectMiddlewareOptions = { + step: "initialize", + tags: ["REGION_REDIRECT", "S3"], + name: "regionRedirectMiddleware", + override: true, +}; +const getRegionRedirectMiddlewarePlugin = (clientConfig) => ({ + applyToStack: (clientStack) => { + clientStack.add(regionRedirectMiddleware(clientConfig), exports.regionRedirectMiddlewareOptions); + clientStack.addRelativeTo((0, region_redirect_endpoint_middleware_1.regionRedirectEndpointMiddleware)(clientConfig), region_redirect_endpoint_middleware_1.regionRedirectEndpointMiddlewareOptions); + }, +}); +exports.getRegionRedirectMiddlewarePlugin = getRegionRedirectMiddlewarePlugin; + + +/***/ }), + +/***/ 47502: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.S3ExpressIdentityCache = void 0; +class S3ExpressIdentityCache { + constructor(data = {}) { + this.data = data; + this.lastPurgeTime = Date.now(); + } + get(key) { + const entry = this.data[key]; + if (!entry) { + return; + } + return entry; + } + set(key, entry) { + this.data[key] = entry; + return entry; + } + delete(key) { + delete this.data[key]; + } + async purgeExpired() { + const now = Date.now(); + if (this.lastPurgeTime + S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS > now) { + return; + } + for (const key in this.data) { + const entry = this.data[key]; + if (!entry.isRefreshing) { + const credential = await entry.identity; + if (credential.expiration) { + if (credential.expiration.getTime() < now) { + delete this.data[key]; + } + } + } + } + } +} +exports.S3ExpressIdentityCache = S3ExpressIdentityCache; +S3ExpressIdentityCache.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS = 30000; + + +/***/ }), + +/***/ 70483: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.S3ExpressIdentityCacheEntry = void 0; +class S3ExpressIdentityCacheEntry { + constructor(_identity, isRefreshing = false, accessed = Date.now()) { + this._identity = _identity; + this.isRefreshing = isRefreshing; + this.accessed = accessed; + } + get identity() { + this.accessed = Date.now(); + return this._identity; + } +} +exports.S3ExpressIdentityCacheEntry = S3ExpressIdentityCacheEntry; + + +/***/ }), + +/***/ 46610: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.S3ExpressIdentityProviderImpl = void 0; +const S3ExpressIdentityCache_1 = __nccwpck_require__(47502); +const S3ExpressIdentityCacheEntry_1 = __nccwpck_require__(70483); +class S3ExpressIdentityProviderImpl { + constructor(createSessionFn, cache = new S3ExpressIdentityCache_1.S3ExpressIdentityCache()) { + this.createSessionFn = createSessionFn; + this.cache = cache; + } + async getS3ExpressIdentity(awsIdentity, identityProperties) { + const key = identityProperties.Bucket; + const { cache } = this; + const entry = cache.get(key); + if (entry) { + return entry.identity.then((identity) => { + var _a, _b, _c, _d; + const isExpired = ((_b = (_a = identity.expiration) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : 0) < Date.now(); + if (isExpired) { + return cache.set(key, new S3ExpressIdentityCacheEntry_1.S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + const isExpiringSoon = ((_d = (_c = identity.expiration) === null || _c === void 0 ? void 0 : _c.getTime()) !== null && _d !== void 0 ? _d : 0) < Date.now() + S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS; + if (isExpiringSoon && !entry.isRefreshing) { + entry.isRefreshing = true; + this.getIdentity(key).then((id) => { + cache.set(key, new S3ExpressIdentityCacheEntry_1.S3ExpressIdentityCacheEntry(Promise.resolve(id))); + }); + } + return identity; + }); + } + return cache.set(key, new S3ExpressIdentityCacheEntry_1.S3ExpressIdentityCacheEntry(this.getIdentity(key))).identity; + } + async getIdentity(key) { + var _a, _b; + await this.cache.purgeExpired().catch((error) => { + console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n" + error); + }); + const session = await this.createSessionFn(key); + if (!((_a = session.Credentials) === null || _a === void 0 ? void 0 : _a.AccessKeyId) || !((_b = session.Credentials) === null || _b === void 0 ? void 0 : _b.SecretAccessKey)) { + throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey."); + } + const identity = { + accessKeyId: session.Credentials.AccessKeyId, + secretAccessKey: session.Credentials.SecretAccessKey, + sessionToken: session.Credentials.SessionToken, + expiration: session.Credentials.Expiration ? new Date(session.Credentials.Expiration) : undefined, + }; + return identity; + } +} +exports.S3ExpressIdentityProviderImpl = S3ExpressIdentityProviderImpl; +S3ExpressIdentityProviderImpl.REFRESH_WINDOW_MS = 60000; + + +/***/ }), + +/***/ 33534: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SignatureV4S3Express = void 0; +const signature_v4_1 = __nccwpck_require__(91116); +const constants_1 = __nccwpck_require__(33695); +class SignatureV4S3Express extends signature_v4_1.SignatureV4 { + async signWithCredentials(requestToSign, credentials, options) { + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + requestToSign.headers[constants_1.SESSION_TOKEN_HEADER] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return privateAccess.signRequest(requestToSign, options !== null && options !== void 0 ? options : {}); + } + async presignWithCredentials(requestToSign, credentials, options) { + var _a; + const credentialsWithoutSessionToken = getCredentialsWithoutSessionToken(credentials); + delete requestToSign.headers[constants_1.SESSION_TOKEN_HEADER]; + requestToSign.headers[constants_1.SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + requestToSign.query = (_a = requestToSign.query) !== null && _a !== void 0 ? _a : {}; + requestToSign.query[constants_1.SESSION_TOKEN_QUERY_PARAM] = credentials.sessionToken; + const privateAccess = this; + setSingleOverride(privateAccess, credentialsWithoutSessionToken); + return this.presign(requestToSign, options); + } +} +exports.SignatureV4S3Express = SignatureV4S3Express; +function getCredentialsWithoutSessionToken(credentials) { + const credentialsWithoutSessionToken = { + accessKeyId: credentials.accessKeyId, + secretAccessKey: credentials.secretAccessKey, + expiration: credentials.expiration, + }; + return credentialsWithoutSessionToken; +} +function setSingleOverride(privateAccess, credentialsWithoutSessionToken) { + const id = setTimeout(() => { + throw new Error("SignatureV4S3Express credential override was created but not called."); + }, 10); + const currentCredentialProvider = privateAccess.credentialProvider; + const overrideCredentialsProviderOnce = () => { + clearTimeout(id); + privateAccess.credentialProvider = currentCredentialProvider; + return Promise.resolve(credentialsWithoutSessionToken); + }; + privateAccess.credentialProvider = overrideCredentialsProviderOnce; +} + + +/***/ }), + +/***/ 33695: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = exports.SESSION_TOKEN_HEADER = exports.SESSION_TOKEN_QUERY_PARAM = exports.S3_EXPRESS_AUTH_SCHEME = exports.S3_EXPRESS_BACKEND = exports.S3_EXPRESS_BUCKET_TYPE = void 0; +const util_config_provider_1 = __nccwpck_require__(32617); +exports.S3_EXPRESS_BUCKET_TYPE = "Directory"; +exports.S3_EXPRESS_BACKEND = "S3Express"; +exports.S3_EXPRESS_AUTH_SCHEME = "sigv4-s3express"; +exports.SESSION_TOKEN_QUERY_PARAM = "X-Amz-S3session-Token"; +exports.SESSION_TOKEN_HEADER = exports.SESSION_TOKEN_QUERY_PARAM.toLowerCase(); +exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH"; +exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = "s3_disable_express_session_auth"; +exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = { + environmentVariableSelector: (env) => (0, util_config_provider_1.booleanSelector)(env, exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, util_config_provider_1.SelectorType.ENV), + configFileSelector: (profile) => (0, util_config_provider_1.booleanSelector)(profile, exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, util_config_provider_1.SelectorType.CONFIG), + default: false, +}; /***/ }), +/***/ 50076: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getS3ExpressPlugin = exports.s3ExpressMiddlewareOptions = exports.s3ExpressMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const constants_1 = __nccwpck_require__(33695); +const s3ExpressMiddleware = (options) => { + return (next, context) => async (args) => { + var _a, _b, _c, _d, _e; + if (context.endpointV2) { + const endpoint = context.endpointV2; + const isS3ExpressAuth = ((_c = (_b = (_a = endpoint.properties) === null || _a === void 0 ? void 0 : _a.authSchemes) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.name) === constants_1.S3_EXPRESS_AUTH_SCHEME; + const isS3ExpressBucket = ((_d = endpoint.properties) === null || _d === void 0 ? void 0 : _d.backend) === constants_1.S3_EXPRESS_BACKEND || + ((_e = endpoint.properties) === null || _e === void 0 ? void 0 : _e.bucketType) === constants_1.S3_EXPRESS_BUCKET_TYPE; + if (isS3ExpressBucket) { + context.isS3ExpressBucket = true; + } + if (isS3ExpressAuth) { + const requestBucket = args.input.Bucket; + if (requestBucket) { + const s3ExpressIdentity = await options.s3ExpressIdentityProvider.getS3ExpressIdentity(await options.credentials(), { + Bucket: requestBucket, + }); + context.s3ExpressIdentity = s3ExpressIdentity; + if (protocol_http_1.HttpRequest.isInstance(args.request) && s3ExpressIdentity.sessionToken) { + args.request.headers[constants_1.SESSION_TOKEN_HEADER] = s3ExpressIdentity.sessionToken; + } + } + } + } + return next(args); + }; +}; +exports.s3ExpressMiddleware = s3ExpressMiddleware; +exports.s3ExpressMiddlewareOptions = { + name: "s3ExpressMiddleware", + step: "build", + tags: ["S3", "S3_EXPRESS"], + override: true, +}; +const getS3ExpressPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add((0, exports.s3ExpressMiddleware)(options), exports.s3ExpressMiddlewareOptions); + }, +}); +exports.getS3ExpressPlugin = getS3ExpressPlugin; + + +/***/ }), + +/***/ 74219: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.s3ExpressMiddlewareOptions = exports.s3ExpressMiddleware = exports.getS3ExpressPlugin = exports.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = exports.SignatureV4S3Express = exports.S3ExpressIdentityProviderImpl = exports.S3ExpressIdentityCacheEntry = exports.S3ExpressIdentityCache = void 0; +var S3ExpressIdentityCache_1 = __nccwpck_require__(47502); +Object.defineProperty(exports, "S3ExpressIdentityCache", ({ enumerable: true, get: function () { return S3ExpressIdentityCache_1.S3ExpressIdentityCache; } })); +var S3ExpressIdentityCacheEntry_1 = __nccwpck_require__(70483); +Object.defineProperty(exports, "S3ExpressIdentityCacheEntry", ({ enumerable: true, get: function () { return S3ExpressIdentityCacheEntry_1.S3ExpressIdentityCacheEntry; } })); +var S3ExpressIdentityProviderImpl_1 = __nccwpck_require__(46610); +Object.defineProperty(exports, "S3ExpressIdentityProviderImpl", ({ enumerable: true, get: function () { return S3ExpressIdentityProviderImpl_1.S3ExpressIdentityProviderImpl; } })); +var SignatureV4S3Express_1 = __nccwpck_require__(33534); +Object.defineProperty(exports, "SignatureV4S3Express", ({ enumerable: true, get: function () { return SignatureV4S3Express_1.SignatureV4S3Express; } })); +var constants_1 = __nccwpck_require__(33695); +Object.defineProperty(exports, "NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS", ({ enumerable: true, get: function () { return constants_1.NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS; } })); +var s3ExpressMiddleware_1 = __nccwpck_require__(50076); +Object.defineProperty(exports, "getS3ExpressPlugin", ({ enumerable: true, get: function () { return s3ExpressMiddleware_1.getS3ExpressPlugin; } })); +Object.defineProperty(exports, "s3ExpressMiddleware", ({ enumerable: true, get: function () { return s3ExpressMiddleware_1.s3ExpressMiddleware; } })); +Object.defineProperty(exports, "s3ExpressMiddlewareOptions", ({ enumerable: true, get: function () { return s3ExpressMiddleware_1.s3ExpressMiddlewareOptions; } })); + + +/***/ }), + +/***/ 41215: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveS3Config = void 0; +const s3_express_1 = __nccwpck_require__(74219); +const resolveS3Config = (input, { session, }) => { + var _a, _b, _c, _d, _e; + const [s3ClientProvider, CreateSessionCommandCtor] = session; + return { + ...input, + forcePathStyle: (_a = input.forcePathStyle) !== null && _a !== void 0 ? _a : false, + useAccelerateEndpoint: (_b = input.useAccelerateEndpoint) !== null && _b !== void 0 ? _b : false, + disableMultiregionAccessPoints: (_c = input.disableMultiregionAccessPoints) !== null && _c !== void 0 ? _c : false, + followRegionRedirects: (_d = input.followRegionRedirects) !== null && _d !== void 0 ? _d : false, + s3ExpressIdentityProvider: (_e = input.s3ExpressIdentityProvider) !== null && _e !== void 0 ? _e : new s3_express_1.S3ExpressIdentityProviderImpl(async (key) => s3ClientProvider().send(new CreateSessionCommandCtor({ + Bucket: key, + SessionMode: "ReadWrite", + }))), + }; +}; +exports.resolveS3Config = resolveS3Config; + + +/***/ }), + +/***/ 80110: +======= /***/ 93265: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getThrow200ExceptionsPlugin = exports.throw200ExceptionsMiddlewareOptions = exports.throw200ExceptionsMiddleware = void 0; +<<<<<<< HEAD +const protocol_http_1 = __nccwpck_require__(45311); +======= const protocol_http_1 = __nccwpck_require__(35712); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const throw200ExceptionsMiddleware = (config) => (next) => async (args) => { const result = await next(args); const { response } = result; if (!protocol_http_1.HttpResponse.isInstance(response)) return result; const { statusCode, body } = response; - if (statusCode < 200 && statusCode >= 300) + if (statusCode < 200 || statusCode >= 300) return result; const bodyBytes = await collectBody(body, config); const bodyString = await collectBodyString(bodyBytes, config); @@ -38564,14 +45679,21 @@ exports.getThrow200ExceptionsPlugin = getThrow200ExceptionsPlugin; /***/ }), +<<<<<<< HEAD +/***/ 42758: +======= /***/ 86327: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getValidateBucketNamePlugin = exports.validateBucketNameMiddlewareOptions = exports.validateBucketNameMiddleware = void 0; +<<<<<<< HEAD +const util_arn_parser_1 = __nccwpck_require__(84122); +======= const util_arn_parser_1 = __nccwpck_require__(1679); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 function validateBucketNameMiddleware() { return (next) => async (args) => { const { input: { Bucket }, } = args; @@ -38600,6 +45722,9 @@ exports.getValidateBucketNamePlugin = getValidateBucketNamePlugin; /***/ }), +<<<<<<< HEAD +/***/ 85591: +======= /***/ 62014: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -38652,327 +45777,61 @@ exports.getWriteGetObjectResponseEndpointPlugin = getWriteGetObjectResponseEndpo /***/ }), /***/ 66576: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); - - +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +<<<<<<< HEAD +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); +======= /***/ }), /***/ 42055: @@ -39007,16 +45866,39 @@ const deserializerMiddleware = (options, deserializer) => (next, context) => asy response, output: parsed, }; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - catch (error) { - Object.defineProperty(error, "$response", { - value: response, - }); - throw error; + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } -}; -exports.deserializerMiddleware = deserializerMiddleware; + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; +<<<<<<< HEAD + __extends = function (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 __()); +======= /***/ }), @@ -39061,365 +45943,699 @@ function getSerdePlugin(config, serializer, deserializer) { commandStack.add((0, deserializerMiddleware_1.deserializerMiddleware)(config, deserializer), exports.deserializerMiddlewareOption); commandStack.add((0, serializerMiddleware_1.serializerMiddleware)(config, serializer), exports.serializerMiddlewareOption); }, +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; -} -exports.getSerdePlugin = getSerdePlugin; + __assign = Object.assign || function (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; + }; -/***/ }), + __rest = function (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; + }; +<<<<<<< HEAD + __decorate = function (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; + }; +======= /***/ 65370: /***/ ((__unused_webpack_module, exports) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.serializerMiddleware = void 0; -const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { - const request = await serializer(args.input, options); - return next({ - ...args, - request, + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; }); -}; -exports.serializerMiddleware = serializerMiddleware; + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 95179: +======= /***/ 73332: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), /***/ 24276: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveSigV4AuthConfig = exports.resolveAwsAuthConfig = void 0; +<<<<<<< HEAD +const property_provider_1 = __nccwpck_require__(12955); +const signature_v4_1 = __nccwpck_require__(91116); +const util_middleware_1 = __nccwpck_require__(81243); +======= const property_provider_1 = __nccwpck_require__(68655); const signature_v4_1 = __nccwpck_require__(30849); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const CREDENTIAL_EXPIRE_WINDOW = 300000; const resolveAwsAuthConfig = (input) => { const normalizedCreds = input.credentials @@ -39428,10 +46644,10 @@ const resolveAwsAuthConfig = (input) => { const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input; let signer; if (input.signer) { - signer = normalizeProvider(input.signer); + signer = (0, util_middleware_1.normalizeProvider)(input.signer); } - else { - signer = () => normalizeProvider(input.region)() + else if (input.regionInfoProvider) { + signer = () => (0, util_middleware_1.normalizeProvider)(input.region)() .then(async (region) => [ (await input.regionInfoProvider(region, { useFipsEndpoint: await input.useFipsEndpoint(), @@ -39451,10 +46667,34 @@ const resolveAwsAuthConfig = (input) => { sha256, uriEscapePath: signingEscapePath, }; - const signerConstructor = input.signerConstructor || signature_v4_1.SignatureV4; - return new signerConstructor(params); + const SignerCtor = input.signerConstructor || signature_v4_1.SignatureV4; + return new SignerCtor(params); }); } + else { + signer = async (authScheme) => { + authScheme = Object.assign({}, { + name: "sigv4", + signingName: input.signingName || input.defaultSigningName, + signingRegion: await (0, util_middleware_1.normalizeProvider)(input.region)(), + properties: {}, + }, authScheme); + const signingRegion = authScheme.signingRegion; + const signingService = authScheme.signingName; + input.signingRegion = input.signingRegion || signingRegion; + input.signingName = input.signingName || signingService || input.serviceId; + const params = { + ...input, + credentials: normalizedCreds, + region: input.signingRegion, + service: input.signingName, + sha256, + uriEscapePath: signingEscapePath, + }; + const SignerCtor = input.signerConstructor || signature_v4_1.SignatureV4; + return new SignerCtor(params); + }; + } return { ...input, systemClockOffset, @@ -39471,10 +46711,10 @@ const resolveSigV4AuthConfig = (input) => { const { signingEscapePath = true, systemClockOffset = input.systemClockOffset || 0, sha256 } = input; let signer; if (input.signer) { - signer = normalizeProvider(input.signer); + signer = (0, util_middleware_1.normalizeProvider)(input.signer); } else { - signer = normalizeProvider(new signature_v4_1.SignatureV4({ + signer = (0, util_middleware_1.normalizeProvider)(new signature_v4_1.SignatureV4({ credentials: normalizedCreds, region: input.region, service: input.signingName, @@ -39491,24 +46731,28 @@ const resolveSigV4AuthConfig = (input) => { }; }; exports.resolveSigV4AuthConfig = resolveSigV4AuthConfig; -const normalizeProvider = (input) => { - if (typeof input === "object") { - const promisified = Promise.resolve(input); - return () => promisified; - } - return input; -}; const normalizeCredentialProvider = (credentials) => { if (typeof credentials === "function") { return (0, property_provider_1.memoize)(credentials, (credentials) => credentials.expiration !== undefined && credentials.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW, (credentials) => credentials.expiration !== undefined); } - return normalizeProvider(credentials); + return (0, util_middleware_1.normalizeProvider)(credentials); }; /***/ }), +<<<<<<< HEAD +/***/ 60044: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSigV4AuthPlugin = exports.getAwsAuthPlugin = exports.awsAuthMiddlewareOptions = exports.awsAuthMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const getSkewCorrectedDate_1 = __nccwpck_require__(8095); +const getUpdatedSystemClockOffset_1 = __nccwpck_require__(52474); +======= /***/ 33233: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -39532,17 +46776,33 @@ exports.getSigV4AuthPlugin = exports.getAwsAuthPlugin = exports.awsAuthMiddlewar const protocol_http_1 = __nccwpck_require__(35712); const getSkewCorrectedDate_1 = __nccwpck_require__(14274); const getUpdatedSystemClockOffset_1 = __nccwpck_require__(26354); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const awsAuthMiddleware = (options) => (next, context) => async function (args) { + var _a, _b, _c, _d; if (!protocol_http_1.HttpRequest.isInstance(args.request)) return next(args); - const signer = await options.signer(); + const authScheme = (_c = (_b = (_a = context.endpointV2) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.authSchemes) === null || _c === void 0 ? void 0 : _c[0]; + const multiRegionOverride = (authScheme === null || authScheme === void 0 ? void 0 : authScheme.name) === "sigv4a" ? (_d = authScheme === null || authScheme === void 0 ? void 0 : authScheme.signingRegionSet) === null || _d === void 0 ? void 0 : _d.join(",") : undefined; + const signer = await options.signer(authScheme); + let signedRequest; + const signingOptions = { + signingDate: (0, getSkewCorrectedDate_1.getSkewCorrectedDate)(options.systemClockOffset), + signingRegion: multiRegionOverride || context["signing_region"], + signingService: context["signing_service"], + }; + if (context.s3ExpressIdentity) { + const sigV4MultiRegion = signer; + signedRequest = await sigV4MultiRegion.signWithCredentials(args.request, context.s3ExpressIdentity, signingOptions); + if (signedRequest.headers["X-Amz-Security-Token"] || signedRequest.headers["x-amz-security-token"]) { + throw new Error("X-Amz-Security-Token must not be set for s3-express requests."); + } + } + else { + signedRequest = await signer.sign(args.request, signingOptions); + } const output = await next({ ...args, - request: await signer.sign(args.request, { - signingDate: (0, getSkewCorrectedDate_1.getSkewCorrectedDate)(options.systemClockOffset), - signingRegion: context["signing_region"], - signingService: context["signing_service"], - }), + request: signedRequest, }).catch((error) => { var _a; const serverTime = (_a = error.ServerTime) !== null && _a !== void 0 ? _a : getDateHeader(error.$response); @@ -39577,10 +46837,25 @@ exports.getSigV4AuthPlugin = exports.getAwsAuthPlugin; /***/ }), +<<<<<<< HEAD +/***/ 25050: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(7430); +tslib_1.__exportStar(__nccwpck_require__(95179), exports); +tslib_1.__exportStar(__nccwpck_require__(60044), exports); + + +/***/ }), + +/***/ 8095: +======= /***/ 14274: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getSkewCorrectedDate = void 0; @@ -39590,14 +46865,21 @@ exports.getSkewCorrectedDate = getSkewCorrectedDate; /***/ }), +<<<<<<< HEAD +/***/ 52474: +======= /***/ 26354: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getUpdatedSystemClockOffset = void 0; +<<<<<<< HEAD +const isClockSkewed_1 = __nccwpck_require__(22984); +======= const isClockSkewed_1 = __nccwpck_require__(38373); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { const clockTimeInMs = Date.parse(clockTime); if ((0, isClockSkewed_1.isClockSkewed)(clockTimeInMs, currentSystemClockOffset)) { @@ -39610,348 +46892,466 @@ exports.getUpdatedSystemClockOffset = getUpdatedSystemClockOffset; /***/ }), +<<<<<<< HEAD +/***/ 22984: +======= /***/ 38373: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isClockSkewed = void 0; +<<<<<<< HEAD +const getSkewCorrectedDate_1 = __nccwpck_require__(8095); +======= const getSkewCorrectedDate_1 = __nccwpck_require__(14274); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const isClockSkewed = (clockTime, systemClockOffset) => Math.abs((0, getSkewCorrectedDate_1.getSkewCorrectedDate)(systemClockOffset).getTime() - clockTime) >= 300000; exports.isClockSkewed = isClockSkewed; /***/ }), +<<<<<<< HEAD +/***/ 7430: +======= /***/ 15406: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 33563: +======= /***/ 58483: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getSsecPlugin = exports.ssecMiddlewareOptions = exports.ssecMiddleware = void 0; @@ -40009,6 +47409,11 @@ exports.getSsecPlugin = getSsecPlugin; /***/ }), +<<<<<<< HEAD +/***/ 24543: +/***/ ((__unused_webpack_module, exports) => { + +======= /***/ 74191: /***/ ((__unused_webpack_module, exports) => { @@ -40247,323 +47652,323 @@ tslib_1.__exportStar(__nccwpck_require__(74191), exports); /***/ 27705: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -40572,6 +47977,7 @@ var __createBinding; /***/ ((__unused_webpack_module, exports) => { "use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 Object.defineProperty(exports, "__esModule", ({ value: true })); exports.resolveUserAgentConfig = void 0; @@ -40586,43 +47992,67 @@ exports.resolveUserAgentConfig = resolveUserAgentConfig; /***/ }), +<<<<<<< HEAD +/***/ 42579: +======= /***/ 30348: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.UA_ESCAPE_REGEX = exports.SPACE = exports.X_AMZ_USER_AGENT = exports.USER_AGENT = void 0; +exports.UA_ESCAPE_CHAR = exports.UA_VALUE_ESCAPE_REGEX = exports.UA_NAME_ESCAPE_REGEX = exports.UA_NAME_SEPARATOR = exports.SPACE = exports.X_AMZ_USER_AGENT = exports.USER_AGENT = void 0; exports.USER_AGENT = "user-agent"; exports.X_AMZ_USER_AGENT = "x-amz-user-agent"; exports.SPACE = " "; -exports.UA_ESCAPE_REGEX = /[^\!\#\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; +exports.UA_NAME_SEPARATOR = "/"; +exports.UA_NAME_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g; +exports.UA_VALUE_ESCAPE_REGEX = /[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g; +exports.UA_ESCAPE_CHAR = "-"; /***/ }), +<<<<<<< HEAD +/***/ 3549: +======= /***/ 54738: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(98905); +tslib_1.__exportStar(__nccwpck_require__(24543), exports); +tslib_1.__exportStar(__nccwpck_require__(7958), exports); +======= const tslib_1 = __nccwpck_require__(3190); tslib_1.__exportStar(__nccwpck_require__(44291), exports); tslib_1.__exportStar(__nccwpck_require__(88493), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 7958: +======= /***/ 88493: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getUserAgentPlugin = exports.getUserAgentMiddlewareOptions = exports.userAgentMiddleware = void 0; +<<<<<<< HEAD +const util_endpoints_1 = __nccwpck_require__(60698); +const protocol_http_1 = __nccwpck_require__(45311); +const constants_1 = __nccwpck_require__(42579); +======= const protocol_http_1 = __nccwpck_require__(35712); const constants_1 = __nccwpck_require__(30348); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const userAgentMiddleware = (options) => (next, context) => async (args) => { var _a, _b; const { request } = args; @@ -40632,7 +48062,10 @@ const userAgentMiddleware = (options) => (next, context) => async (args) => { const userAgent = ((_a = context === null || context === void 0 ? void 0 : context.userAgent) === null || _a === void 0 ? void 0 : _a.map(escapeUserAgent)) || []; const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent); const customUserAgent = ((_b = options === null || options === void 0 ? void 0 : options.customUserAgent) === null || _b === void 0 ? void 0 : _b.map(escapeUserAgent)) || []; - const sdkUserAgentValue = [...defaultUserAgent, ...userAgent, ...customUserAgent].join(constants_1.SPACE); + const prefix = (0, util_endpoints_1.getUserAgentPrefix)(); + const sdkUserAgentValue = (prefix ? [prefix] : []) + .concat([...defaultUserAgent, ...userAgent, ...customUserAgent]) + .join(constants_1.SPACE); const normalUAValue = [ ...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), ...customUserAgent, @@ -40654,8 +48087,14 @@ const userAgentMiddleware = (options) => (next, context) => async (args) => { }); }; exports.userAgentMiddleware = userAgentMiddleware; -const escapeUserAgent = ([name, version]) => { - const prefixSeparatorIndex = name.indexOf("/"); +const escapeUserAgent = (userAgentPair) => { + var _a; + const name = userAgentPair[0] + .split(constants_1.UA_NAME_SEPARATOR) + .map((part) => part.replace(constants_1.UA_NAME_ESCAPE_REGEX, constants_1.UA_ESCAPE_CHAR)) + .join(constants_1.UA_NAME_SEPARATOR); + const version = (_a = userAgentPair[1]) === null || _a === void 0 ? void 0 : _a.replace(constants_1.UA_VALUE_ESCAPE_REGEX, constants_1.UA_ESCAPE_CHAR); + const prefixSeparatorIndex = name.indexOf(constants_1.UA_NAME_SEPARATOR); const prefix = name.substring(0, prefixSeparatorIndex); let uaName = name.substring(prefixSeparatorIndex + 1); if (prefix === "api") { @@ -40663,8 +48102,16 @@ const escapeUserAgent = ([name, version]) => { } return [prefix, uaName, version] .filter((item) => item && item.length > 0) - .map((item) => item === null || item === void 0 ? void 0 : item.replace(constants_1.UA_ESCAPE_REGEX, "_")) - .join("/"); + .reduce((acc, item, index) => { + switch (index) { + case 0: + return item; + case 1: + return `${acc}/${item}`; + default: + return `${acc}#${item}`; + } + }, ""); }; exports.getUserAgentMiddlewareOptions = { name: "getUserAgentMiddleware", @@ -40683,328 +48130,68 @@ exports.getUserAgentPlugin = getUserAgentPlugin; /***/ }), +<<<<<<< HEAD +/***/ 98905: +======= /***/ 3190: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); - - +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +<<<<<<< HEAD +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); +======= /***/ }), /***/ 67180: @@ -41113,323 +48300,323 @@ tslib_1.__exportStar(__nccwpck_require__(67180), exports); /***/ 77015: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -41854,10 +49041,21 @@ function writeRequestBody(httpRequest, request) { httpRequest.on("continue", () => { writeBody(httpRequest, request.body); }); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } else { - writeBody(httpRequest, request.body); + factory(createExporter(root)); } +<<<<<<< HEAD + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } +======= } exports.writeRequestBody = writeRequestBody; function writeBody(httpRequest, body) { @@ -41878,323 +49076,323 @@ function writeBody(httpRequest, body) { /***/ 72766: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -42261,12 +49459,30 @@ function chain(...providers) { } throw err; }); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - return promise; + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); }; -} -exports.chain = chain; +<<<<<<< HEAD + __assign = Object.assign || function (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]; +======= /***/ }), @@ -42314,368 +49530,706 @@ const memoize = (provider, isExpired, requiresRefresh) => { const coalesceProvider = async () => { if (!pending) { pending = provider(); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + } + return t; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; try { - resolved = await pending; - hasResult = true; - isConstant = false; + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } + catch (error) { e = { error: error }; } finally { - pending = undefined; + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } - return resolved; + return ar; }; - if (isExpired === undefined) { - return async (options) => { - if (!hasResult || (options === null || options === void 0 ? void 0 : options.forceRefresh)) { - resolved = await coalesceProvider(); + + /** @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 = 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; + }; + + __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 resolved; - }; - } - return async (options) => { - if (!hasResult || (options === null || options === void 0 ? void 0 : options.forceRefresh)) { - resolved = await coalesceProvider(); } - if (isConstant) { - return resolved; + return to.concat(ar || Array.prototype.slice.call(from)); + }; + + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); } - if (requiresRefresh && !requiresRefresh(resolved)) { - isConstant = true; - return resolved; + else if (async) { + env.stack.push({ async: true }); } - if (isExpired(resolved)) { - await coalesceProvider(); - return resolved; + return value; + }; + + 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; + }; + + __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; } - return resolved; + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); + + +/***/ }), + +/***/ 57842: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveAwsRegionExtensionConfiguration = exports.getAwsRegionExtensionConfiguration = void 0; +const getAwsRegionExtensionConfiguration = (runtimeConfig) => { + let runtimeConfigRegion = async () => { + if (runtimeConfig.region === undefined) { + throw new Error("Region is missing from runtimeConfig"); + } + const region = runtimeConfig.region; + if (typeof region === "string") { + return region; + } + return region(); + }; + return { + setRegion(region) { + runtimeConfigRegion = region; + }, + region() { + return runtimeConfigRegion; + }, }; }; -exports.memoize = memoize; +exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration; +const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => { + return { + region: awsRegionExtensionConfiguration.region(), + }; +}; +exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration; /***/ }), +<<<<<<< HEAD +/***/ 35657: +======= /***/ 80770: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -42773,366 +50327,395 @@ exports.HttpResponse = HttpResponse; /***/ }), /***/ 35712: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(41816); +tslib_1.__exportStar(__nccwpck_require__(57842), exports); +tslib_1.__exportStar(__nccwpck_require__(34868), exports); +======= const tslib_1 = __nccwpck_require__(70690); tslib_1.__exportStar(__nccwpck_require__(42053), exports); tslib_1.__exportStar(__nccwpck_require__(39203), exports); tslib_1.__exportStar(__nccwpck_require__(18411), exports); tslib_1.__exportStar(__nccwpck_require__(20158), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 66491: +======= /***/ 20158: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isValidHostname = void 0; -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} -exports.isValidHostname = isValidHostname; +exports.NODE_REGION_CONFIG_FILE_OPTIONS = exports.NODE_REGION_CONFIG_OPTIONS = exports.REGION_INI_NAME = exports.REGION_ENV_NAME = void 0; +exports.REGION_ENV_NAME = "AWS_REGION"; +exports.REGION_INI_NAME = "region"; +exports.NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[exports.REGION_ENV_NAME], + configFileSelector: (profile) => profile[exports.REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + }, +}; +exports.NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials", +}; /***/ }), +<<<<<<< HEAD +/***/ 55962: +======= /***/ 70690: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), /***/ 27974: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.getRealRegion = void 0; +const isFipsRegion_1 = __nccwpck_require__(5615); +const getRealRegion = (region) => (0, isFipsRegion_1.isFipsRegion)(region) + ? ["fips-aws-global", "aws-fips"].includes(region) + ? "us-east-1" + : region.replace(/fips-(dkr-|prod-)?|-fips/, "") + : region; +exports.getRealRegion = getRealRegion; +======= exports.buildQueryString = void 0; const util_uri_escape_1 = __nccwpck_require__(15592); function buildQueryString(query) { @@ -43156,87 +50739,252 @@ function buildQueryString(query) { return parts.join("&"); } exports.buildQueryString = buildQueryString; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 34868: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +======= /***/ 59634: /***/ ((__unused_webpack_module, exports) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseQueryString = void 0; -function parseQueryString(querystring) { - const query = {}; - querystring = querystring.replace(/^\?/, ""); - if (querystring) { - for (const pair of querystring.split("&")) { - let [key, value = null] = pair.split("="); - key = decodeURIComponent(key); - if (value) { - value = decodeURIComponent(value); +const tslib_1 = __nccwpck_require__(41816); +tslib_1.__exportStar(__nccwpck_require__(66491), exports); +tslib_1.__exportStar(__nccwpck_require__(76646), exports); + + +/***/ }), + +/***/ 5615: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isFipsRegion = void 0; +const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); +exports.isFipsRegion = isFipsRegion; + + +/***/ }), + +/***/ 76646: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveRegionConfig = void 0; +const getRealRegion_1 = __nccwpck_require__(55962); +const isFipsRegion_1 = __nccwpck_require__(5615); +const resolveRegionConfig = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return { + ...input, + region: async () => { + if (typeof region === "string") { + return (0, getRealRegion_1.getRealRegion)(region); } - if (!(key in query)) { - query[key] = value; + const providedRegion = await region(); + return (0, getRealRegion_1.getRealRegion)(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if ((0, isFipsRegion_1.isFipsRegion)(providedRegion)) { + return true; } - else if (Array.isArray(query[key])) { - query[key].push(value); + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + }, + }; +}; +exports.resolveRegionConfig = resolveRegionConfig; + + +/***/ }), + +/***/ 41816: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); } else { - query[key] = [query[key], value]; + exports.__esModule = true; } } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } - return query; -} -exports.parseQueryString = parseQueryString; - +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -/***/ }), + __assign = Object.assign || function (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; + }; +<<<<<<< HEAD + __rest = function (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; + }; +======= /***/ 31338: /***/ ((__unused_webpack_module, exports) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; + __decorate = function (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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.TRANSIENT_ERROR_STATUS_CODES = exports.TRANSIENT_ERROR_CODES = exports.THROTTLING_ERROR_CODES = exports.CLOCK_SKEW_ERROR_CODES = void 0; -exports.CLOCK_SKEW_ERROR_CODES = [ - "AuthFailure", - "InvalidSignatureException", - "RequestExpired", - "RequestInTheFuture", - "RequestTimeTooSkewed", - "SignatureDoesNotMatch", -]; -exports.THROTTLING_ERROR_CODES = [ - "BandwidthLimitExceeded", - "EC2ThrottledException", - "LimitExceededException", - "PriorRequestNotComplete", - "ProvisionedThroughputExceededException", - "RequestLimitExceeded", - "RequestThrottled", - "RequestThrottledException", - "SlowDown", - "ThrottledException", - "Throttling", - "ThrottlingException", - "TooManyRequestsException", - "TransactionInProgressException", -]; -exports.TRANSIENT_ERROR_CODES = ["AbortError", "TimeoutError", "RequestTimeout", "RequestTimeoutException"]; -exports.TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + __esDecorate = function (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)); }; + 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; + }; -/***/ }), + __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; + }; +<<<<<<< HEAD + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; +======= /***/ 18300: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; + __setFunctionName = function (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 }); + }; +<<<<<<< HEAD + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; +======= Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isTransientError = exports.isThrottlingError = exports.isClockSkewError = exports.isRetryableByTrait = void 0; const constants_1 = __nccwpck_require__(31338); @@ -43257,15 +51005,80 @@ const isTransientError = (error) => { constants_1.TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) || 0); }; exports.isTransientError = isTransientError; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + __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()); + }); + }; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; -/***/ }), - +<<<<<<< HEAD + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; +======= /***/ 25327: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -"use strict"; - +<<<<<<< HEAD + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; +======= Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getConfigFilepath = exports.ENV_CONFIG_PATH = void 0; const path_1 = __nccwpck_require__(71017); @@ -43273,15 +51086,61 @@ const getHomeDir_1 = __nccwpck_require__(42713); exports.ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; const getConfigFilepath = () => process.env[exports.ENV_CONFIG_PATH] || (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "config"); exports.getConfigFilepath = getConfigFilepath; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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; + }; +<<<<<<< HEAD + /** @deprecated */ + __spreadArrays = function () { + 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; + }; +======= /***/ 92054: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; + __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)); + }; +<<<<<<< HEAD + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; +======= Object.defineProperty(exports, "__esModule", ({ value: true })); exports.getCredentialsFilepath = exports.ENV_CREDENTIALS_PATH = void 0; const path_1 = __nccwpck_require__(71017); @@ -43289,52 +51148,178 @@ const getHomeDir_1 = __nccwpck_require__(42713); exports.ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; const getCredentialsFilepath = () => process.env[exports.ENV_CREDENTIALS_PATH] || (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "credentials"); exports.getCredentialsFilepath = getCredentialsFilepath; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + __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(n, v); }); }; } + 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]); } + }; + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -/***/ }), - +<<<<<<< HEAD + __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); } + }; +======= /***/ 42713: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __nccwpck_require__(22037); -const path_1 = __nccwpck_require__(71017); -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - return (0, os_1.homedir)(); -}; -exports.getHomeDir = getHomeDir; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + __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; + }; -/***/ }), + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; +<<<<<<< HEAD + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; +======= /***/ 47238: /***/ ((__unused_webpack_module, exports) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getProfileData = void 0; -const profileKeyRegex = /^profile\s(["'])?([^\1]+)\1$/; -const getProfileData = (data) => Object.entries(data) - .filter(([key]) => profileKeyRegex.test(key)) - .reduce((acc, [key, value]) => ({ ...acc, [profileKeyRegex.exec(key)[2]]: value }), { - ...(data.default && { default: data.default }), + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); }); -exports.getProfileData = getProfileData; /***/ }), +<<<<<<< HEAD +/***/ 51846: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SignatureV4MultiRegion = void 0; +const middleware_sdk_s3_1 = __nccwpck_require__(52776); +const signature_v4_crt_container_1 = __nccwpck_require__(8312); +======= /***/ 61870: /***/ ((__unused_webpack_module, exports) => { @@ -43533,323 +51518,323 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ 16642: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -43862,9 +51847,10 @@ var __createBinding; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.SignatureV4MultiRegion = void 0; const signature_v4_1 = __nccwpck_require__(30849); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class SignatureV4MultiRegion { constructor(options) { - this.sigv4Signer = new signature_v4_1.SignatureV4(options); + this.sigv4Signer = new middleware_sdk_s3_1.SignatureV4S3Express(options); this.signerOptions = options; } async sign(requestToSign, options = {}) { @@ -43875,6 +51861,14 @@ class SignatureV4MultiRegion { } return this.sigv4Signer.sign(requestToSign, options); } + async signWithCredentials(requestToSign, credentials, options = {}) { + if (options.signingRegion === "*") { + if (this.signerOptions.runtime !== "node") + throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js"); + return this.getSigv4aSigner().signWithCredentials(requestToSign, credentials, options); + } + return this.sigv4Signer.signWithCredentials(requestToSign, credentials, options); + } async presign(originalRequest, options = {}) { if (options.signingRegion === "*") { if (this.signerOptions.runtime !== "node") @@ -43883,17 +51877,30 @@ class SignatureV4MultiRegion { } return this.sigv4Signer.presign(originalRequest, options); } + async presignWithCredentials(originalRequest, credentials, options = {}) { + if (options.signingRegion === "*") { + throw new Error("Method presignWithCredentials is not supported for [signingRegion=*]."); + } + return this.sigv4Signer.presignWithCredentials(originalRequest, credentials, options); + } getSigv4aSigner() { if (!this.sigv4aSigner) { - let CrtSignerV4; + let CrtSignerV4 = null; try { +<<<<<<< HEAD + CrtSignerV4 = signature_v4_crt_container_1.signatureV4CrtContainer.CrtSignerV4; +======= CrtSignerV4 = true && (__nccwpck_require__(35949).CrtSignerV4); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 if (typeof CrtSignerV4 !== "function") throw new Error(); } catch (e) { e.message = - `${e.message}\nPlease check if you have installed "@aws-sdk/signature-v4-crt" package explicitly. \n` + + `${e.message}\n` + + `Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. \n` + + `You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] ` + + `or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. \n` + "For more information please go to " + "https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt"; throw e; @@ -43911,340 +51918,102 @@ exports.SignatureV4MultiRegion = SignatureV4MultiRegion; /***/ }), +<<<<<<< HEAD +/***/ 8149: +======= /***/ 96037: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(13752); +tslib_1.__exportStar(__nccwpck_require__(51846), exports); +tslib_1.__exportStar(__nccwpck_require__(8312), exports); +======= const tslib_1 = __nccwpck_require__(43571); tslib_1.__exportStar(__nccwpck_require__(54583), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), -/***/ 43571: -/***/ ((module) => { +<<<<<<< HEAD +/***/ 8312: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.signatureV4CrtContainer = void 0; +exports.signatureV4CrtContainer = { + CrtSignerV4: null, +}; + -/****************************************************************************** -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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/***/ }), +/***/ 13752: +======= +/***/ 43571: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((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. + +<<<<<<< HEAD +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); +======= /***/ }), /***/ 84562: @@ -44793,323 +52562,323 @@ exports.toDate = toDate; /***/ 18145: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -45267,89 +53036,408 @@ const parseEpochTimestamp = (value) => { } else if (typeof value === "string") { valueAsDouble = (0, parse_utils_1.strictParseDouble)(value); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } else { - throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); - } - if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { - throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); - } - return new Date(Math.round(valueAsDouble * 1000)); -}; -exports.parseEpochTimestamp = parseEpochTimestamp; -const buildDate = (year, month, day, time) => { - const adjustedMonth = month - 1; - validateDayOfMonth(year, adjustedMonth, day); - return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds))); -}; -const parseTwoDigitYear = (value) => { - const thisYear = new Date().getUTCFullYear(); - const valueInThisCentury = Math.floor(thisYear / 100) * 100 + (0, parse_utils_1.strictParseShort)(stripLeadingZeroes(value)); - if (valueInThisCentury < thisYear) { - return valueInThisCentury + 100; - } - return valueInThisCentury; -}; -const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; -const adjustRfc850Year = (input) => { - if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) { - return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); - } - return input; -}; -const parseMonthByShortName = (value) => { - const monthIdx = MONTHS.indexOf(value); - if (monthIdx < 0) { - throw new TypeError(`Invalid month: ${value}`); - } - return monthIdx + 1; -}; -const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; -const validateDayOfMonth = (year, month, day) => { - let maxDays = DAYS_IN_MONTH[month]; - if (month === 1 && isLeapYear(year)) { - maxDays = 29; - } - if (day > maxDays) { - throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); - } -}; -const isLeapYear = (year) => { - return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); -}; -const parseDateValue = (value, type, lower, upper) => { - const dateVal = (0, parse_utils_1.strictParseByte)(stripLeadingZeroes(value)); - if (dateVal < lower || dateVal > upper) { - throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); - } - return dateVal; -}; -const parseMilliseconds = (value) => { - if (value === null || value === undefined) { - return 0; + factory(createExporter(root)); } - return (0, parse_utils_1.strictParseFloat32)("0." + value) * 1000; -}; -const stripLeadingZeroes = (value) => { - let idx = 0; - while (idx < value.length - 1 && value.charAt(idx) === "0") { - idx++; + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } - if (idx === 0) { +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } return value; - } - return value.slice(idx); -}; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 7559: +======= /***/ 21733: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.UnsupportedGrantTypeException = exports.UnauthorizedClientException = exports.SlowDownException = exports.SSOOIDCClient = exports.InvalidScopeException = exports.InvalidRequestException = exports.InvalidClientException = exports.InternalServerException = exports.ExpiredTokenException = exports.CreateTokenCommand = exports.AuthorizationPendingException = exports.AccessDeniedException = void 0; +const middleware_host_header_1 = __nccwpck_require__(23213); +const middleware_logger_1 = __nccwpck_require__(45288); +const middleware_recursion_detection_1 = __nccwpck_require__(13807); +const middleware_user_agent_1 = __nccwpck_require__(3549); +const config_resolver_1 = __nccwpck_require__(66041); +const middleware_content_length_1 = __nccwpck_require__(38959); +const middleware_endpoint_1 = __nccwpck_require__(24916); +const middleware_retry_1 = __nccwpck_require__(54801); +const smithy_client_1 = __nccwpck_require__(33218); +var resolveClientEndpointParameters = (options) => { + var _a, _b; + return { + ...options, + useDualstackEndpoint: (_a = options.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false, + useFipsEndpoint: (_b = options.useFipsEndpoint) !== null && _b !== void 0 ? _b : false, + defaultSigningName: "awsssooidc", + }; +======= exports.throwDefaultError = void 0; const exceptions_1 = __nccwpck_require__(41948); const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { @@ -45361,17 +53449,856 @@ const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => $metadata, }); throw (0, exceptions_1.decorateServiceException)(response, parsedBody); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +}; +var package_default = { version: "3.429.0" }; +const util_user_agent_node_1 = __nccwpck_require__(61876); +const config_resolver_2 = __nccwpck_require__(66041); +const hash_node_1 = __nccwpck_require__(86775); +const middleware_retry_2 = __nccwpck_require__(54801); +const node_config_provider_1 = __nccwpck_require__(13079); +const node_http_handler_1 = __nccwpck_require__(54065); +const util_body_length_node_1 = __nccwpck_require__(87693); +const util_retry_1 = __nccwpck_require__(13744); +const smithy_client_2 = __nccwpck_require__(33218); +const url_parser_1 = __nccwpck_require__(98245); +const util_base64_1 = __nccwpck_require__(14478); +const util_utf8_1 = __nccwpck_require__(38134); +const util_endpoints_1 = __nccwpck_require__(34548); +var s = "required"; +var t = "fn"; +var u = "argv"; +var v = "ref"; +var a = "isSet"; +var b = "tree"; +var c = "error"; +var d = "endpoint"; +var e = "PartitionResult"; +var f = "getAttr"; +var g = { [s]: false, type: "String" }; +var h = { [s]: true, default: false, type: "Boolean" }; +var i = { [v]: "Endpoint" }; +var j = { [t]: "booleanEquals", [u]: [{ [v]: "UseFIPS" }, true] }; +var k = { [t]: "booleanEquals", [u]: [{ [v]: "UseDualStack" }, true] }; +var l = {}; +var m = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [{ [v]: e }, "supportsFIPS"] }] }; +var n = { [v]: e }; +var o = { [t]: "booleanEquals", [u]: [true, { [t]: f, [u]: [n, "supportsDualStack"] }] }; +var p = [j]; +var q = [k]; +var r = [{ [v]: "Region" }]; +var _data = { + version: "1.0", + parameters: { Region: g, UseDualStack: h, UseFIPS: h, Endpoint: g }, + rules: [ + { + conditions: [{ [t]: a, [u]: [i] }], + type: b, + rules: [ + { conditions: p, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: c }, + { conditions: q, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: c }, + { endpoint: { url: i, properties: l, headers: l }, type: d }, + ], + }, + { + conditions: [{ [t]: a, [u]: r }], + type: b, + rules: [ + { + conditions: [{ [t]: "aws.partition", [u]: r, assign: e }], + type: b, + rules: [ + { + conditions: [j, k], + type: b, + rules: [ + { + conditions: [m, o], + type: b, + rules: [ + { + endpoint: { + url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", + properties: l, + headers: l, + }, + type: d, + }, + ], + }, + { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: c }, + ], + }, + { + conditions: p, + type: b, + rules: [ + { + conditions: [m], + type: b, + rules: [ + { + conditions: [{ [t]: "stringEquals", [u]: ["aws-us-gov", { [t]: f, [u]: [n, "name"] }] }], + endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: l, headers: l }, + type: d, + }, + { + endpoint: { + url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", + properties: l, + headers: l, + }, + type: d, + }, + ], + }, + { error: "FIPS is enabled but this partition does not support FIPS", type: c }, + ], + }, + { + conditions: q, + type: b, + rules: [ + { + conditions: [o], + type: b, + rules: [ + { + endpoint: { + url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", + properties: l, + headers: l, + }, + type: d, + }, + ], + }, + { error: "DualStack is enabled but this partition does not support DualStack", type: c }, + ], + }, + { + endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: l, headers: l }, + type: d, + }, + ], + }, + ], + }, + { error: "Invalid Configuration: Missing Region", type: c }, + ], }; -exports.throwDefaultError = throwDefaultError; -const deserializeMetadata = (output) => { - var _a; +var ruleSet = _data; +var defaultEndpointResolver = (endpointParams, context = {}) => { + return (0, util_endpoints_1.resolveEndpoint)(ruleSet, { + endpointParams, + logger: context.logger, + }); +}; +var getRuntimeConfig = (config) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; + return ({ + apiVersion: "2019-06-10", + base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_1.fromBase64, + base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_1.toBase64, + disableHostPrefix: (_c = config === null || config === void 0 ? void 0 : config.disableHostPrefix) !== null && _c !== void 0 ? _c : false, + endpointProvider: (_d = config === null || config === void 0 ? void 0 : config.endpointProvider) !== null && _d !== void 0 ? _d : defaultEndpointResolver, + extensions: (_e = config === null || config === void 0 ? void 0 : config.extensions) !== null && _e !== void 0 ? _e : [], + logger: (_f = config === null || config === void 0 ? void 0 : config.logger) !== null && _f !== void 0 ? _f : new smithy_client_2.NoOpLogger(), + serviceId: (_g = config === null || config === void 0 ? void 0 : config.serviceId) !== null && _g !== void 0 ? _g : "SSO OIDC", + urlParser: (_h = config === null || config === void 0 ? void 0 : config.urlParser) !== null && _h !== void 0 ? _h : url_parser_1.parseUrl, + utf8Decoder: (_j = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _j !== void 0 ? _j : util_utf8_1.fromUtf8, + utf8Encoder: (_k = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _k !== void 0 ? _k : util_utf8_1.toUtf8, + }); +}; +const smithy_client_3 = __nccwpck_require__(33218); +const util_defaults_mode_node_1 = __nccwpck_require__(6061); +const smithy_client_4 = __nccwpck_require__(33218); +var getRuntimeConfig2 = (config) => { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; + (0, smithy_client_4.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_3.loadConfigsForDefaultMode); + const clientSharedValues = getRuntimeConfig(config); + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + bodyLengthChecker: (_a = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _a !== void 0 ? _a : util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: (_b = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _b !== void 0 ? _b : (0, util_user_agent_node_1.defaultUserAgent)({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }), + maxAttempts: (_c = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _c !== void 0 ? _c : (0, node_config_provider_1.loadConfig)(middleware_retry_2.NODE_MAX_ATTEMPT_CONFIG_OPTIONS), + region: (_d = config === null || config === void 0 ? void 0 : config.region) !== null && _d !== void 0 ? _d : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_REGION_CONFIG_OPTIONS, config_resolver_2.NODE_REGION_CONFIG_FILE_OPTIONS), + requestHandler: (_e = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _e !== void 0 ? _e : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider), + retryMode: (_f = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _f !== void 0 ? _f : (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_2.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }), + sha256: (_g = config === null || config === void 0 ? void 0 : config.sha256) !== null && _g !== void 0 ? _g : hash_node_1.Hash.bind(null, "sha256"), + streamCollector: (_h = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _h !== void 0 ? _h : node_http_handler_1.streamCollector, + useDualstackEndpoint: (_j = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _j !== void 0 ? _j : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), + useFipsEndpoint: (_k = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _k !== void 0 ? _k : (0, node_config_provider_1.loadConfig)(config_resolver_2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), + }; +}; +const region_config_resolver_1 = __nccwpck_require__(35657); +const protocol_http_1 = __nccwpck_require__(45311); +const smithy_client_5 = __nccwpck_require__(33218); +var asPartial = (t2) => t2; +var resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = { + ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, smithy_client_5.getDefaultExtensionConfiguration)(runtimeConfig)), + ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)), + }; + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return { + ...runtimeConfig, + ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), + ...(0, smithy_client_5.resolveDefaultRuntimeConfig)(extensionConfiguration), + ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), + }; +}; +var SSOOIDCClient = class extends smithy_client_1.Client { + constructor(...[configuration]) { + const _config_0 = getRuntimeConfig2(configuration || {}); + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = (0, config_resolver_1.resolveRegionConfig)(_config_1); + const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2); + const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3); + const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4); + const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5); + const _config_7 = resolveRuntimeExtensions(_config_6, (configuration === null || configuration === void 0 ? void 0 : configuration.extensions) || []); + super(_config_7); + this.config = _config_7; + this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config)); + this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config)); + this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config)); + this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config)); + this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config)); + this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config)); + } + destroy() { + super.destroy(); + } +}; +exports.SSOOIDCClient = SSOOIDCClient; +const smithy_client_6 = __nccwpck_require__(33218); +const middleware_endpoint_2 = __nccwpck_require__(24916); +const middleware_serde_1 = __nccwpck_require__(4247); +const smithy_client_7 = __nccwpck_require__(33218); +const types_1 = __nccwpck_require__(75751); +const protocol_http_2 = __nccwpck_require__(45311); +const smithy_client_8 = __nccwpck_require__(33218); +const smithy_client_9 = __nccwpck_require__(33218); +var SSOOIDCServiceException = class _SSOOIDCServiceException extends smithy_client_9.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype); + } +}; +var AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + this.name = "AccessDeniedException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _AccessDeniedException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.AccessDeniedException = AccessDeniedException; +var AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "AuthorizationPendingException", + $fault: "client", + ...opts, + }); + this.name = "AuthorizationPendingException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _AuthorizationPendingException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.AuthorizationPendingException = AuthorizationPendingException; +var ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts, + }); + this.name = "ExpiredTokenException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _ExpiredTokenException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.ExpiredTokenException = ExpiredTokenException; +var InternalServerException = class _InternalServerException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + this.name = "InternalServerException"; + this.$fault = "server"; + Object.setPrototypeOf(this, _InternalServerException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.InternalServerException = InternalServerException; +var InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "InvalidClientException", + $fault: "client", + ...opts, + }); + this.name = "InvalidClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.InvalidClientException = InvalidClientException; +var InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "InvalidGrantException", + $fault: "client", + ...opts, + }); + this.name = "InvalidGrantException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidGrantException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +var InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "InvalidRequestException", + $fault: "client", + ...opts, + }); + this.name = "InvalidRequestException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidRequestException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.InvalidRequestException = InvalidRequestException; +var InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "InvalidScopeException", + $fault: "client", + ...opts, + }); + this.name = "InvalidScopeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidScopeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.InvalidScopeException = InvalidScopeException; +var SlowDownException = class _SlowDownException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "SlowDownException", + $fault: "client", + ...opts, + }); + this.name = "SlowDownException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _SlowDownException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.SlowDownException = SlowDownException; +var UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "UnauthorizedClientException", + $fault: "client", + ...opts, + }); + this.name = "UnauthorizedClientException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnauthorizedClientException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.UnauthorizedClientException = UnauthorizedClientException; +var UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "UnsupportedGrantTypeException", + $fault: "client", + ...opts, + }); + this.name = "UnsupportedGrantTypeException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException; +var InvalidClientMetadataException = class _InvalidClientMetadataException extends SSOOIDCServiceException { + constructor(opts) { + super({ + name: "InvalidClientMetadataException", + $fault: "client", + ...opts, + }); + this.name = "InvalidClientMetadataException"; + this.$fault = "client"; + Object.setPrototypeOf(this, _InvalidClientMetadataException.prototype); + this.error = opts.error; + this.error_description = opts.error_description; + } +}; +var se_CreateTokenCommand = async (input, context) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers = { + "content-type": "application/json", + }; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/token`; + let body; + body = JSON.stringify((0, smithy_client_8.take)(input, { + clientId: [], + clientSecret: [], + code: [], + deviceCode: [], + grantType: [], + redirectUri: [], + refreshToken: [], + scope: (_) => (0, smithy_client_8._json)(_), + })); + return new protocol_http_2.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +var se_RegisterClientCommand = async (input, context) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers = { + "content-type": "application/json", + }; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/client/register`; + let body; + body = JSON.stringify((0, smithy_client_8.take)(input, { + clientName: [], + clientType: [], + scopes: (_) => (0, smithy_client_8._json)(_), + })); + return new protocol_http_2.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +var se_StartDeviceAuthorizationCommand = async (input, context) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers = { + "content-type": "application/json", + }; + const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}/device_authorization`; + let body; + body = JSON.stringify((0, smithy_client_8.take)(input, { + clientId: [], + clientSecret: [], + startUrl: [], + })); + return new protocol_http_2.HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; +var de_CreateTokenCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CreateTokenCommandError(output, context); + } + const contents = (0, smithy_client_8.map)({ + $metadata: deserializeMetadata(output), + }); + const data = (0, smithy_client_8.expectNonNull)((0, smithy_client_8.expectObject)(await parseBody(output.body, context)), "body"); + const doc = (0, smithy_client_8.take)(data, { + accessToken: smithy_client_8.expectString, + expiresIn: smithy_client_8.expectInt32, + idToken: smithy_client_8.expectString, + refreshToken: smithy_client_8.expectString, + tokenType: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + return contents; +}; +var de_CreateTokenCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.ssooidc#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "AuthorizationPendingException": + case "com.amazonaws.ssooidc#AuthorizationPendingException": + throw await de_AuthorizationPendingExceptionRes(parsedOutput, context); + case "ExpiredTokenException": + case "com.amazonaws.ssooidc#ExpiredTokenException": + throw await de_ExpiredTokenExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidClientException": + case "com.amazonaws.ssooidc#InvalidClientException": + throw await de_InvalidClientExceptionRes(parsedOutput, context); + case "InvalidGrantException": + case "com.amazonaws.ssooidc#InvalidGrantException": + throw await de_InvalidGrantExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "InvalidScopeException": + case "com.amazonaws.ssooidc#InvalidScopeException": + throw await de_InvalidScopeExceptionRes(parsedOutput, context); + case "SlowDownException": + case "com.amazonaws.ssooidc#SlowDownException": + throw await de_SlowDownExceptionRes(parsedOutput, context); + case "UnauthorizedClientException": + case "com.amazonaws.ssooidc#UnauthorizedClientException": + throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); + case "UnsupportedGrantTypeException": + case "com.amazonaws.ssooidc#UnsupportedGrantTypeException": + throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; +var de_RegisterClientCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_RegisterClientCommandError(output, context); + } + const contents = (0, smithy_client_8.map)({ + $metadata: deserializeMetadata(output), + }); + const data = (0, smithy_client_8.expectNonNull)((0, smithy_client_8.expectObject)(await parseBody(output.body, context)), "body"); + const doc = (0, smithy_client_8.take)(data, { + authorizationEndpoint: smithy_client_8.expectString, + clientId: smithy_client_8.expectString, + clientIdIssuedAt: smithy_client_8.expectLong, + clientSecret: smithy_client_8.expectString, + clientSecretExpiresAt: smithy_client_8.expectLong, + tokenEndpoint: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + return contents; +}; +var de_RegisterClientCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidClientMetadataException": + case "com.amazonaws.ssooidc#InvalidClientMetadataException": + throw await de_InvalidClientMetadataExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "InvalidScopeException": + case "com.amazonaws.ssooidc#InvalidScopeException": + throw await de_InvalidScopeExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; +var de_StartDeviceAuthorizationCommand = async (output, context) => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_StartDeviceAuthorizationCommandError(output, context); + } + const contents = (0, smithy_client_8.map)({ + $metadata: deserializeMetadata(output), + }); + const data = (0, smithy_client_8.expectNonNull)((0, smithy_client_8.expectObject)(await parseBody(output.body, context)), "body"); + const doc = (0, smithy_client_8.take)(data, { + deviceCode: smithy_client_8.expectString, + expiresIn: smithy_client_8.expectInt32, + interval: smithy_client_8.expectInt32, + userCode: smithy_client_8.expectString, + verificationUri: smithy_client_8.expectString, + verificationUriComplete: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + return contents; +}; +var de_StartDeviceAuthorizationCommandError = async (output, context) => { + const parsedOutput = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "InternalServerException": + case "com.amazonaws.ssooidc#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "InvalidClientException": + case "com.amazonaws.ssooidc#InvalidClientException": + throw await de_InvalidClientExceptionRes(parsedOutput, context); + case "InvalidRequestException": + case "com.amazonaws.ssooidc#InvalidRequestException": + throw await de_InvalidRequestExceptionRes(parsedOutput, context); + case "SlowDownException": + case "com.amazonaws.ssooidc#SlowDownException": + throw await de_SlowDownExceptionRes(parsedOutput, context); + case "UnauthorizedClientException": + case "com.amazonaws.ssooidc#UnauthorizedClientException": + throw await de_UnauthorizedClientExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; +var throwDefaultError = (0, smithy_client_8.withBaseException)(SSOOIDCServiceException); +var de_AccessDeniedExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new AccessDeniedException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_AuthorizationPendingExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new AuthorizationPendingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new ExpiredTokenException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_InternalServerExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new InternalServerException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_InvalidClientExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_InvalidClientMetadataExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidClientMetadataException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_InvalidGrantExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidGrantException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_InvalidRequestExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidRequestException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_InvalidScopeExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new InvalidScopeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_SlowDownExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new SlowDownException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_UnauthorizedClientExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new UnauthorizedClientException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var de_UnsupportedGrantTypeExceptionRes = async (parsedOutput, context) => { + const contents = (0, smithy_client_8.map)({}); + const data = parsedOutput.body; + const doc = (0, smithy_client_8.take)(data, { + error: smithy_client_8.expectString, + error_description: smithy_client_8.expectString, + }); + Object.assign(contents, doc); + const exception = new UnsupportedGrantTypeException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return (0, smithy_client_8.decorateServiceException)(exception, parsedOutput.body); +}; +var deserializeMetadata = (output) => { + var _a, _b; return ({ httpStatusCode: output.statusCode, - requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"], + requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"], extendedRequestId: output.headers["x-amz-id-2"], cfId: output.headers["x-amz-cf-id"], }); }; +<<<<<<< HEAD +var collectBodyString = (streamBody, context) => (0, smithy_client_8.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)); +var parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; +}); +var parseErrorBody = async (errorBody, context) => { + var _a; + const value = await parseBody(errorBody, context); + value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message; +======= /***/ }), @@ -45772,136 +54699,233 @@ const expectNonNull = (value, location) => { } throw new TypeError("Expected a non-null value"); } +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 return value; }; -exports.expectNonNull = expectNonNull; -const expectObject = (value) => { - if (value === null || value === undefined) { - return undefined; +var loadRestJsonErrorCode = (output, data) => { + const findKey = (object, key) => Object.keys(object).find((k2) => k2.toLowerCase() === key.toLowerCase()); + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + const headerKey = findKey(output.headers, "x-amzn-errortype"); + if (headerKey !== void 0) { + return sanitizeErrorCode(output.headers[headerKey]); } - if (typeof value === "object" && !Array.isArray(value)) { - return value; + if (data.code !== void 0) { + return sanitizeErrorCode(data.code); + } + if (data["__type"] !== void 0) { + return sanitizeErrorCode(data["__type"]); } - throw new TypeError(`Expected object, got ${typeof value}`); }; -exports.expectObject = expectObject; -const expectString = (value) => { - if (value === null || value === undefined) { - return undefined; +var CreateTokenCommand = class _CreateTokenCommand extends smithy_client_7.Command { + constructor(input) { + super(); + this.input = input; } - if (typeof value === "string") { - return value; + static getEndpointParameterInstructions() { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; } - throw new TypeError(`Expected string, got ${typeof value}`); -}; -exports.expectString = expectString; -const expectUnion = (value) => { - if (value === null || value === undefined) { - return undefined; + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_2.getEndpointPlugin)(configuration, _CreateTokenCommand.getEndpointParameterInstructions())); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SSOOIDCClient"; + const commandName = "CreateTokenCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_1.SMITHY_CONTEXT_KEY]: { + service: "AWSSSOOIDCService", + operation: "CreateToken", + }, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } - const asObject = (0, exports.expectObject)(value); - const setKeys = Object.entries(asObject) - .filter(([_, v]) => v !== null && v !== undefined) - .map(([k, _]) => k); - if (setKeys.length === 0) { - throw new TypeError(`Unions must have exactly one non-null member`); + serialize(input, context) { + return se_CreateTokenCommand(input, context); } - if (setKeys.length > 1) { - throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + deserialize(output, context) { + return de_CreateTokenCommand(output, context); } - return asObject; }; -exports.expectUnion = expectUnion; -const strictParseDouble = (value) => { - if (typeof value == "string") { - return (0, exports.expectNumber)(parseNumber(value)); +exports.CreateTokenCommand = CreateTokenCommand; +const middleware_endpoint_3 = __nccwpck_require__(24916); +const middleware_serde_2 = __nccwpck_require__(4247); +const smithy_client_10 = __nccwpck_require__(33218); +const types_2 = __nccwpck_require__(75751); +var RegisterClientCommand = class _RegisterClientCommand extends smithy_client_10.Command { + constructor(input) { + super(); + this.input = input; } - return (0, exports.expectNumber)(value); -}; -exports.strictParseDouble = strictParseDouble; -exports.strictParseFloat = exports.strictParseDouble; -const strictParseFloat32 = (value) => { - if (typeof value == "string") { - return (0, exports.expectFloat32)(parseNumber(value)); + static getEndpointParameterInstructions() { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; } - return (0, exports.expectFloat32)(value); -}; -exports.strictParseFloat32 = strictParseFloat32; -const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; -const parseNumber = (value) => { - const matches = value.match(NUMBER_REGEX); - if (matches === null || matches[0].length !== value.length) { - throw new TypeError(`Expected real number, got implicit NaN`); + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use((0, middleware_serde_2.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_3.getEndpointPlugin)(configuration, _RegisterClientCommand.getEndpointParameterInstructions())); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SSOOIDCClient"; + const commandName = "RegisterClientCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_2.SMITHY_CONTEXT_KEY]: { + service: "AWSSSOOIDCService", + operation: "RegisterClient", + }, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } - return parseFloat(value); -}; -const limitedParseDouble = (value) => { - if (typeof value == "string") { - return parseFloatString(value); + serialize(input, context) { + return se_RegisterClientCommand(input, context); } - return (0, exports.expectNumber)(value); -}; -exports.limitedParseDouble = limitedParseDouble; -exports.handleFloat = exports.limitedParseDouble; -exports.limitedParseFloat = exports.limitedParseDouble; -const limitedParseFloat32 = (value) => { - if (typeof value == "string") { - return parseFloatString(value); + deserialize(output, context) { + return de_RegisterClientCommand(output, context); } - return (0, exports.expectFloat32)(value); }; -exports.limitedParseFloat32 = limitedParseFloat32; -const parseFloatString = (value) => { - switch (value) { - case "NaN": - return NaN; - case "Infinity": - return Infinity; - case "-Infinity": - return -Infinity; - default: - throw new Error(`Unable to parse float value: ${value}`); +const middleware_endpoint_4 = __nccwpck_require__(24916); +const middleware_serde_3 = __nccwpck_require__(4247); +const smithy_client_11 = __nccwpck_require__(33218); +const types_3 = __nccwpck_require__(75751); +var StartDeviceAuthorizationCommand = class _StartDeviceAuthorizationCommand extends smithy_client_11.Command { + constructor(input) { + super(); + this.input = input; } -}; -const strictParseLong = (value) => { - if (typeof value === "string") { - return (0, exports.expectLong)(parseNumber(value)); + static getEndpointParameterInstructions() { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; } - return (0, exports.expectLong)(value); -}; -exports.strictParseLong = strictParseLong; -exports.strictParseInt = exports.strictParseLong; -const strictParseInt32 = (value) => { - if (typeof value === "string") { - return (0, exports.expectInt32)(parseNumber(value)); + resolveMiddleware(clientStack, configuration, options) { + this.middlewareStack.use((0, middleware_serde_3.getSerdePlugin)(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use((0, middleware_endpoint_4.getEndpointPlugin)(configuration, _StartDeviceAuthorizationCommand.getEndpointParameterInstructions())); + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const clientName = "SSOOIDCClient"; + const commandName = "StartDeviceAuthorizationCommand"; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_) => _, + outputFilterSensitiveLog: (_) => _, + [types_3.SMITHY_CONTEXT_KEY]: { + service: "AWSSSOOIDCService", + operation: "StartDeviceAuthorization", + }, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } - return (0, exports.expectInt32)(value); -}; -exports.strictParseInt32 = strictParseInt32; -const strictParseShort = (value) => { - if (typeof value === "string") { - return (0, exports.expectShort)(parseNumber(value)); + serialize(input, context) { + return se_StartDeviceAuthorizationCommand(input, context); } - return (0, exports.expectShort)(value); -}; -exports.strictParseShort = strictParseShort; -const strictParseByte = (value) => { - if (typeof value === "string") { - return (0, exports.expectByte)(parseNumber(value)); + deserialize(output, context) { + return de_StartDeviceAuthorizationCommand(output, context); } - return (0, exports.expectByte)(value); }; -exports.strictParseByte = strictParseByte; +var commands = { + CreateTokenCommand, + RegisterClientCommand, + StartDeviceAuthorizationCommand, +}; +var SSOOIDC = class extends SSOOIDCClient { +}; +(0, smithy_client_6.createAggregatedClient)(commands, SSOOIDC); + + +/***/ }), + +<<<<<<< HEAD +/***/ 49026: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.REFRESH_MESSAGE = exports.EXPIRE_WINDOW_MS = void 0; +exports.EXPIRE_WINDOW_MS = 5 * 60 * 1000; +exports.REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; /***/ }), +/***/ 40821: +======= /***/ 20556: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.fromSso = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +const constants_1 = __nccwpck_require__(49026); +const getNewSsoOidcToken_1 = __nccwpck_require__(57291); +const validateTokenExpiry_1 = __nccwpck_require__(11503); +const validateTokenKey_1 = __nccwpck_require__(61684); +const writeSSOTokenToFile_1 = __nccwpck_require__(73631); +const lastRefreshAttemptTime = new Date(0); +const fromSso = (init = {}) => async () => { + const profiles = await (0, shared_ini_file_loader_1.parseKnownFiles)(init); + const profileName = (0, shared_ini_file_loader_1.getProfileName)(init); + const profile = profiles[profileName]; + if (!profile) { + throw new property_provider_1.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false); + } + else if (!profile["sso_session"]) { + throw new property_provider_1.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`); + } + const ssoSessionName = profile["sso_session"]; + const ssoSessions = await (0, shared_ini_file_loader_1.loadSsoSessionData)(init); + const ssoSession = ssoSessions[ssoSessionName]; + if (!ssoSession) { + throw new property_provider_1.TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`, false); + } + for (const ssoSessionRequiredKey of ["sso_start_url", "sso_region"]) { + if (!ssoSession[ssoSessionRequiredKey]) { + throw new property_provider_1.TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`, false); +======= exports.resolvedPath = void 0; const extended_encode_uri_component_1 = __nccwpck_require__(93542); const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { @@ -45909,17 +54933,19 @@ const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLa const labelValue = labelValueProvider(); if (labelValue.length <= 0) { throw new Error("Empty value provided for input HTTP label: " + memberName + "."); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel - ? labelValue - .split("/") - .map((segment) => (0, extended_encode_uri_component_1.extendedEncodeURIComponent)(segment)) - .join("/") - : (0, extended_encode_uri_component_1.extendedEncodeURIComponent)(labelValue)); } - else { - throw new Error("No value provided for input HTTP label: " + memberName + "."); + const ssoStartUrl = ssoSession["sso_start_url"]; + const ssoRegion = ssoSession["sso_region"]; + let ssoToken; + try { + ssoToken = await (0, shared_ini_file_loader_1.getSSOTokenFromFile)(ssoSessionName); } +<<<<<<< HEAD + catch (e) { + throw new property_provider_1.TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${constants_1.REFRESH_MESSAGE}`, false); +======= return resolvedPath; }; exports.resolvedPath = resolvedPath; @@ -45937,382 +54963,263 @@ exports.serializeFloat = void 0; const serializeFloat = (value) => { if (value !== value) { return "NaN"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + } + (0, validateTokenKey_1.validateTokenKey)("accessToken", ssoToken.accessToken); + (0, validateTokenKey_1.validateTokenKey)("expiresAt", ssoToken.expiresAt); + const { accessToken, expiresAt } = ssoToken; + const existingToken = { token: accessToken, expiration: new Date(expiresAt) }; + if (existingToken.expiration.getTime() - Date.now() > constants_1.EXPIRE_WINDOW_MS) { + return existingToken; + } + if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1000) { + (0, validateTokenExpiry_1.validateTokenExpiry)(existingToken); + return existingToken; + } + (0, validateTokenKey_1.validateTokenKey)("clientId", ssoToken.clientId, true); + (0, validateTokenKey_1.validateTokenKey)("clientSecret", ssoToken.clientSecret, true); + (0, validateTokenKey_1.validateTokenKey)("refreshToken", ssoToken.refreshToken, true); + try { + lastRefreshAttemptTime.setTime(Date.now()); + const newSsoOidcToken = await (0, getNewSsoOidcToken_1.getNewSsoOidcToken)(ssoToken, ssoRegion); + (0, validateTokenKey_1.validateTokenKey)("accessToken", newSsoOidcToken.accessToken); + (0, validateTokenKey_1.validateTokenKey)("expiresIn", newSsoOidcToken.expiresIn); + const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000); + try { + await (0, writeSSOTokenToFile_1.writeSSOTokenToFile)(ssoSessionName, { + ...ssoToken, + accessToken: newSsoOidcToken.accessToken, + expiresAt: newTokenExpiration.toISOString(), + refreshToken: newSsoOidcToken.refreshToken, + }); + } + catch (error) { + } + return { + token: newSsoOidcToken.accessToken, + expiration: newTokenExpiration, + }; } - switch (value) { - case Infinity: - return "Infinity"; - case -Infinity: - return "-Infinity"; - default: - return value; + catch (error) { + (0, validateTokenExpiry_1.validateTokenExpiry)(existingToken); + return existingToken; } }; -exports.serializeFloat = serializeFloat; +exports.fromSso = fromSso; /***/ }), +<<<<<<< HEAD +/***/ 83767: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +======= /***/ 20335: /***/ ((__unused_webpack_module, exports) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitEvery = void 0; -function splitEvery(value, delimiter, numDelimiters) { - if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { - throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); +exports.fromStatic = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const fromStatic = ({ token }) => async () => { + if (!token || !token.token) { + throw new property_provider_1.TokenProviderError(`Please pass a valid token to fromStatic`, false); } - const segments = value.split(delimiter); - if (numDelimiters === 1) { - return segments; + return token; +}; +exports.fromStatic = fromStatic; + + +/***/ }), + +<<<<<<< HEAD +/***/ 57291: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getNewSsoOidcToken = void 0; +const client_sso_oidc_node_1 = __nccwpck_require__(7559); +const getSsoOidcClient_1 = __nccwpck_require__(18314); +const getNewSsoOidcToken = (ssoToken, ssoRegion) => { + const ssoOidcClient = (0, getSsoOidcClient_1.getSsoOidcClient)(ssoRegion); + return ssoOidcClient.send(new client_sso_oidc_node_1.CreateTokenCommand({ + clientId: ssoToken.clientId, + clientSecret: ssoToken.clientSecret, + refreshToken: ssoToken.refreshToken, + grantType: "refresh_token", + })); +}; +exports.getNewSsoOidcToken = getNewSsoOidcToken; + + +/***/ }), + +/***/ 18314: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSsoOidcClient = void 0; +const client_sso_oidc_node_1 = __nccwpck_require__(7559); +const ssoOidcClientsHash = {}; +const getSsoOidcClient = (ssoRegion) => { + if (ssoOidcClientsHash[ssoRegion]) { + return ssoOidcClientsHash[ssoRegion]; } - const compoundSegments = []; - let currentSegment = ""; - for (let i = 0; i < segments.length; i++) { - if (currentSegment === "") { - currentSegment = segments[i]; - } - else { - currentSegment += delimiter + segments[i]; - } - if ((i + 1) % numDelimiters === 0) { - compoundSegments.push(currentSegment); - currentSegment = ""; - } + const ssoOidcClient = new client_sso_oidc_node_1.SSOOIDCClient({ region: ssoRegion }); + ssoOidcClientsHash[ssoRegion] = ssoOidcClient; + return ssoOidcClient; +}; +exports.getSsoOidcClient = getSsoOidcClient; + + +/***/ }), + +/***/ 64260: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(4578); +tslib_1.__exportStar(__nccwpck_require__(7559), exports); +tslib_1.__exportStar(__nccwpck_require__(40821), exports); +tslib_1.__exportStar(__nccwpck_require__(83767), exports); +tslib_1.__exportStar(__nccwpck_require__(49273), exports); + + +/***/ }), + +/***/ 49273: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.nodeProvider = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const fromSso_1 = __nccwpck_require__(40821); +const nodeProvider = (init = {}) => (0, property_provider_1.memoize)((0, property_provider_1.chain)((0, fromSso_1.fromSso)(init), async () => { + throw new property_provider_1.TokenProviderError("Could not load token from any providers", false); +}), (token) => token.expiration !== undefined && token.expiration.getTime() - Date.now() < 300000, (token) => token.expiration !== undefined); +exports.nodeProvider = nodeProvider; + + +/***/ }), + +/***/ 11503: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.validateTokenExpiry = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const constants_1 = __nccwpck_require__(49026); +const validateTokenExpiry = (token) => { + if (token.expiration && token.expiration.getTime() < Date.now()) { + throw new property_provider_1.TokenProviderError(`Token is expired. ${constants_1.REFRESH_MESSAGE}`, false); } - if (currentSegment !== "") { - compoundSegments.push(currentSegment); +}; +exports.validateTokenExpiry = validateTokenExpiry; + + +/***/ }), + +/***/ 61684: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.validateTokenKey = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const constants_1 = __nccwpck_require__(49026); +const validateTokenKey = (key, value, forRefresh = false) => { + if (typeof value === "undefined") { + throw new property_provider_1.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${constants_1.REFRESH_MESSAGE}`, false); } - return compoundSegments; -} -exports.splitEvery = splitEvery; +}; +exports.validateTokenKey = validateTokenKey; /***/ }), -/***/ 45945: -/***/ ((module) => { +/***/ 73631: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.writeSSOTokenToFile = void 0; +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +const fs_1 = __nccwpck_require__(57147); +const { writeFile } = fs_1.promises; +const writeSSOTokenToFile = (id, ssoToken) => { + const tokenFilepath = (0, shared_ini_file_loader_1.getSSOTokenFilepath)(id); + const tokenString = JSON.stringify(ssoToken, null, 2); + return writeFile(tokenFilepath, tokenString); +}; +exports.writeSSOTokenToFile = writeSSOTokenToFile; + -/****************************************************************************** -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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/***/ }), +/***/ 4578: +======= +/***/ 45945: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((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. + +<<<<<<< HEAD +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); +======= /***/ }), /***/ 13797: @@ -46328,24 +55235,389 @@ const parseUrl = (url) => { let query; if (search) { query = (0, querystring_parser_1.parseQueryString)(search); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - return { - hostname, - port: port ? parseInt(port) : undefined, - protocol, - path: pathname, - query, + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); }; -}; -exports.parseUrl = parseUrl; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 84122: +======= /***/ 1679: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.build = exports.parse = exports.validate = void 0; @@ -46377,12 +55649,25 @@ exports.build = build; /***/ }), +<<<<<<< HEAD +/***/ 47480: +======= /***/ 7147: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const util_endpoints_1 = __nccwpck_require__(34548); +const isVirtualHostableS3Bucket_1 = __nccwpck_require__(22209); +const parseArn_1 = __nccwpck_require__(42880); +const partition_1 = __nccwpck_require__(88088); +const awsEndpointFunctions = { + isVirtualHostableS3Bucket: isVirtualHostableS3Bucket_1.isVirtualHostableS3Bucket, + parseArn: parseArn_1.parseArn, + partition: partition_1.partition, +======= exports.toBase64 = exports.fromBase64 = void 0; const util_buffer_from_1 = __nccwpck_require__(87048); const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; @@ -46433,354 +55718,382 @@ const calculateBodyLength = (body) => { return (0, fs_1.fstatSync)(body.fd).size; } throw new Error(`Body Length computation failed for ${body}`); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; -exports.calculateBodyLength = calculateBodyLength; +util_endpoints_1.customEndpointFunctions.aws = awsEndpointFunctions; /***/ }), +<<<<<<< HEAD +/***/ 60698: +======= /***/ 19989: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(27208); +tslib_1.__exportStar(__nccwpck_require__(47480), exports); +tslib_1.__exportStar(__nccwpck_require__(88088), exports); +tslib_1.__exportStar(__nccwpck_require__(30287), exports); +tslib_1.__exportStar(__nccwpck_require__(4389), exports); +tslib_1.__exportStar(__nccwpck_require__(56159), exports); +======= const tslib_1 = __nccwpck_require__(59799); tslib_1.__exportStar(__nccwpck_require__(96869), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 22209: +======= /***/ 59799: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + __assign = Object.assign || function (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; + }; -/***/ }), + __rest = function (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; + }; -/***/ 87048: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); + + +/***/ }), + +/***/ 87048: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.isVirtualHostableS3Bucket = void 0; +const util_endpoints_1 = __nccwpck_require__(34548); +const isIpAddress_1 = __nccwpck_require__(30287); +const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!(0, exports.isVirtualHostableS3Bucket)(label)) { + return false; + } + } +======= exports.fromString = exports.fromArrayBuffer = void 0; const is_array_buffer_1 = __nccwpck_require__(1627); const buffer_1 = __nccwpck_require__(14300); @@ -46818,16 +56131,31 @@ const booleanSelector = (obj, key, type) => { if (!(key in obj)) return undefined; if (obj[key] === "true") +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 return true; - if (obj[key] === "false") + } + if (!(0, util_endpoints_1.isValidHostLabel)(value)) { return false; - throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if ((0, isIpAddress_1.isIpAddress)(value)) { + return false; + } + return true; }; -exports.booleanSelector = booleanSelector; +exports.isVirtualHostableS3Bucket = isVirtualHostableS3Bucket; /***/ }), +<<<<<<< HEAD +/***/ 42880: +======= /***/ 46522: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -46843,333 +56171,349 @@ tslib_1.__exportStar(__nccwpck_require__(95176), exports); /***/ 45121: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), /***/ 44196: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.parseArn = void 0; +const parseArn = (value) => { + const segments = value.split(":"); + if (segments.length < 6) + return null; + const [arn, partition, service, region, accountId, ...resourceId] = segments; + if (arn !== "arn" || partition === "" || service === "" || resourceId[0] === "") + return null; + return { + partition, + service, + region, + accountId, + resourceId: resourceId[0].includes("/") ? resourceId[0].split("/") : resourceId, +======= exports.IMDS_REGION_PATH = exports.DEFAULTS_MODE_OPTIONS = exports.ENV_IMDS_DISABLED = exports.AWS_DEFAULT_REGION_ENV = exports.AWS_REGION_ENV = exports.AWS_EXECUTION_ENV = void 0; exports.AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; exports.AWS_REGION_ENV = "AWS_REGION"; @@ -47283,323 +56627,323 @@ const inferPhysicalRegion = async () => { /***/ 72298: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -47683,323 +57027,323 @@ exports.normalizeProvider = normalizeProvider; /***/ 71089: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -48076,738 +57420,992 @@ const sdkStreamMixin = (stream) => { } transformed = true; return await (0, node_http_handler_1.streamCollector)(stream); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); - }, - transformToWebStream: () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - if (stream.readableFlowing !== null) { - throw new Error("The stream has been consumed by other callbacks."); - } - if (typeof stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available."); - } - transformed = true; - return stream_1.Readable.toWeb(stream); - }, - }); }; -exports.sdkStreamMixin = sdkStreamMixin; +exports.parseArn = parseArn; /***/ }), +<<<<<<< HEAD +/***/ 88088: +======= /***/ 71069: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), /***/ 37945: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.getUserAgentPrefix = exports.useDefaultPartitionInfo = exports.setPartitionInfo = exports.partition = void 0; +const tslib_1 = __nccwpck_require__(27208); +const partitions_json_1 = tslib_1.__importDefault(__nccwpck_require__(95367)); +let selectedPartitionsInfo = partitions_json_1.default; +let selectedUserAgentPrefix = ""; +const partition = (value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition of partitions) { + const { regions, outputs } = partition; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData, + }; + } + } + } + for (const partition of partitions) { + const { regionRegex, outputs } = partition; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs, + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex," + + " and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs, + }; +}; +exports.partition = partition; +const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}; +exports.setPartitionInfo = setPartitionInfo; +const useDefaultPartitionInfo = () => { + (0, exports.setPartitionInfo)(partitions_json_1.default, ""); +}; +exports.useDefaultPartitionInfo = useDefaultPartitionInfo; +const getUserAgentPrefix = () => selectedUserAgentPrefix; +exports.getUserAgentPrefix = getUserAgentPrefix; +======= exports.escapeUriPath = void 0; const escape_uri_1 = __nccwpck_require__(20954); const escapeUriPath = (uri) => uri.split("/").map(escape_uri_1.escapeUri).join("/"); exports.escapeUriPath = escapeUriPath; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/***/ }), + +<<<<<<< HEAD +/***/ 30287: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isIpAddress = void 0; +var util_endpoints_1 = __nccwpck_require__(34548); +Object.defineProperty(exports, "isIpAddress", ({ enumerable: true, get: function () { return util_endpoints_1.isIpAddress; } })); + + +/***/ }), + +/***/ 4389: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveEndpoint = void 0; +var util_endpoints_1 = __nccwpck_require__(34548); +Object.defineProperty(exports, "resolveEndpoint", ({ enumerable: true, get: function () { return util_endpoints_1.resolveEndpoint; } })); + + +/***/ }), + +/***/ 22736: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EndpointError = void 0; +var util_endpoints_1 = __nccwpck_require__(34548); +Object.defineProperty(exports, "EndpointError", ({ enumerable: true, get: function () { return util_endpoints_1.EndpointError; } })); /***/ }), +/***/ 25809: +======= /***/ 20954: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +<<<<<<< HEAD +/***/ 26960: /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.escapeUri = void 0; -const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); -exports.escapeUri = escapeUri; -const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; /***/ }), +/***/ 50309: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 38664: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + + +/***/ }), + +/***/ 56159: +======= /***/ 15592: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(27208); +tslib_1.__exportStar(__nccwpck_require__(22736), exports); +tslib_1.__exportStar(__nccwpck_require__(25809), exports); +tslib_1.__exportStar(__nccwpck_require__(26960), exports); +tslib_1.__exportStar(__nccwpck_require__(50309), exports); +tslib_1.__exportStar(__nccwpck_require__(38664), exports); +tslib_1.__exportStar(__nccwpck_require__(77967), exports); +======= const tslib_1 = __nccwpck_require__(65539); tslib_1.__exportStar(__nccwpck_require__(20954), exports); tslib_1.__exportStar(__nccwpck_require__(37945), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/***/ }), + +<<<<<<< HEAD +/***/ 77967: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), +/***/ 27208: +======= /***/ 65539: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; + + __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) { + if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : ""; + return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), +<<<<<<< HEAD +/***/ 78749: +/***/ ((__unused_webpack_module, exports) => { +======= /***/ 7494: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +exports.crtAvailability = void 0; +exports.crtAvailability = { + isCrtAvailable: false, +}; + + +/***/ }), + +/***/ 61876: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultUserAgent = exports.UA_APP_ID_INI_NAME = exports.UA_APP_ID_ENV_NAME = exports.crtAvailability = void 0; +const node_config_provider_1 = __nccwpck_require__(13079); +const os_1 = __nccwpck_require__(22037); +const process_1 = __nccwpck_require__(77282); +const is_crt_available_1 = __nccwpck_require__(7593); +var crt_availability_1 = __nccwpck_require__(78749); +Object.defineProperty(exports, "crtAvailability", ({ enumerable: true, get: function () { return crt_availability_1.crtAvailability; } })); +======= exports.defaultUserAgent = exports.UA_APP_ID_INI_NAME = exports.UA_APP_ID_ENV_NAME = void 0; const node_config_provider_1 = __nccwpck_require__(15071); const os_1 = __nccwpck_require__(22037); const process_1 = __nccwpck_require__(77282); const is_crt_available_1 = __nccwpck_require__(48763); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID"; exports.UA_APP_ID_INI_NAME = "sdk-ua-app-id"; const defaultUserAgent = ({ serviceId, clientVersion }) => { const sections = [ ["aws-sdk-js", clientVersion], + ["ua", "2.0"], [`os/${(0, os_1.platform)()}`, (0, os_1.release)()], ["lang/js"], ["md/nodejs", `${process_1.versions.node}`], @@ -48841,14 +58439,22 @@ exports.defaultUserAgent = defaultUserAgent; /***/ }), +<<<<<<< HEAD +/***/ 7593: +======= /***/ 48763: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.isCrtAvailable = void 0; +const crt_availability_1 = __nccwpck_require__(78749); const isCrtAvailable = () => { +<<<<<<< HEAD + if (crt_availability_1.crtAvailability.isCrtAvailable) { + return ["md/crt-avail"]; +======= try { if ( true && __nccwpck_require__(84332)) { return ["md/crt-avail"]; @@ -48857,22 +58463,32 @@ const isCrtAvailable = () => { } catch (e) { return null; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } + return null; }; exports.isCrtAvailable = isCrtAvailable; /***/ }), +<<<<<<< HEAD +/***/ 77296: +======= /***/ 83288: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toUtf8 = exports.fromUtf8 = void 0; +<<<<<<< HEAD +const pureJs_1 = __nccwpck_require__(92341); +const whatwgEncodingApi_1 = __nccwpck_require__(51506); +======= const pureJs_1 = __nccwpck_require__(97088); const whatwgEncodingApi_1 = __nccwpck_require__(38874); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const fromUtf8 = (input) => typeof TextEncoder === "function" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input); exports.fromUtf8 = fromUtf8; const toUtf8 = (input) => typeof TextDecoder === "function" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input); @@ -48881,10 +58497,13 @@ exports.toUtf8 = toUtf8; /***/ }), +<<<<<<< HEAD +/***/ 92341: +======= /***/ 97088: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toUtf8 = exports.fromUtf8 = void 0; @@ -48936,10 +58555,13 @@ exports.toUtf8 = toUtf8; /***/ }), +<<<<<<< HEAD +/***/ 51506: +======= /***/ 38874: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.toUtf8 = exports.fromUtf8 = void 0; @@ -48955,6 +58577,16 @@ exports.toUtf8 = toUtf8; /***/ }), +<<<<<<< HEAD +/***/ 71299: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.XmlNode = void 0; +const escape_attribute_1 = __nccwpck_require__(35335); +const XmlText_1 = __nccwpck_require__(45306); +======= /***/ 1266: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -49174,323 +58806,323 @@ exports.checkExceptions = checkExceptions; /***/ 64258: /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, System, Reflect, Promise */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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; + }; + + __rest = function (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; + }; + + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; + + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + exporter("__extends", __extends); + exporter("__assign", __assign); + exporter("__rest", __rest); + exporter("__decorate", __decorate); + exporter("__param", __param); + exporter("__metadata", __metadata); + exporter("__awaiter", __awaiter); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); +}); /***/ }), @@ -49504,12 +59136,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.XmlNode = void 0; const escape_attribute_1 = __nccwpck_require__(13706); const XmlText_1 = __nccwpck_require__(36652); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class XmlNode { - constructor(name, children = []) { - this.name = name; - this.children = children; - this.attributes = {}; - } static of(name, childText, withName) { const node = new XmlNode(name); if (childText !== undefined) { @@ -49520,6 +59148,11 @@ class XmlNode { } return node; } + constructor(name, children = []) { + this.name = name; + this.children = children; + this.attributes = {}; + } withName(name) { this.name = name; return this; @@ -49536,13 +59169,52 @@ class XmlNode { delete this.attributes[name]; return this; } + n(name) { + this.name = name; + return this; + } + c(child) { + this.children.push(child); + return this; + } + a(name, value) { + if (value != null) { + this.attributes[name] = value; + } + return this; + } + cc(input, field, withName = field) { + if (input[field] != null) { + const node = XmlNode.of(field, input[field]).withName(withName); + this.c(node); + } + } + l(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + nodes.map((node) => { + node.withName(memberName); + this.c(node); + }); + } + } + lc(input, listName, memberName, valueProvider) { + if (input[listName] != null) { + const nodes = valueProvider(); + const containerNode = new XmlNode(memberName); + nodes.map((node) => { + containerNode.c(node); + }); + this.c(containerNode); + } + } toString() { const hasChildren = Boolean(this.children.length); let xmlText = `<${this.name}`; const attributes = this.attributes; for (const attributeName of Object.keys(attributes)) { const attribute = attributes[attributeName]; - if (typeof attribute !== "undefined" && attribute !== null) { + if (attribute != null) { xmlText += ` ${attributeName}="${(0, escape_attribute_1.escapeAttribute)("" + attribute)}"`; } } @@ -49554,14 +59226,21 @@ exports.XmlNode = XmlNode; /***/ }), +<<<<<<< HEAD +/***/ 45306: +======= /***/ 36652: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.XmlText = void 0; +<<<<<<< HEAD +const escape_element_1 = __nccwpck_require__(89522); +======= const escape_element_1 = __nccwpck_require__(90020); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 class XmlText { constructor(value) { this.value = value; @@ -49575,10 +59254,13 @@ exports.XmlText = XmlText; /***/ }), +<<<<<<< HEAD +/***/ 35335: +======= /***/ 13706: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.escapeAttribute = void 0; @@ -49590,10 +59272,13 @@ exports.escapeAttribute = escapeAttribute; /***/ }), +<<<<<<< HEAD +/***/ 89522: +======= /***/ 90020: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.escapeElement = void 0; @@ -49614,341 +59299,87 @@ exports.escapeElement = escapeElement; /***/ }), +<<<<<<< HEAD +/***/ 63131: +======= /***/ 78161: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +const tslib_1 = __nccwpck_require__(72433); +tslib_1.__exportStar(__nccwpck_require__(71299), exports); +tslib_1.__exportStar(__nccwpck_require__(45306), exports); +======= const tslib_1 = __nccwpck_require__(42386); tslib_1.__exportStar(__nccwpck_require__(65234), exports); tslib_1.__exportStar(__nccwpck_require__(36652), exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ }), +<<<<<<< HEAD +/***/ 72433: +======= /***/ 42386: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((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. -***************************************************************************** */ -/* global global, define, System, Reflect, Promise */ -var __extends; -var __assign; -var __rest; -var __decorate; -var __param; -var __metadata; -var __awaiter; -var __generator; -var __exportStar; -var __values; -var __read; -var __spread; -var __spreadArrays; -var __spreadArray; -var __await; -var __asyncGenerator; -var __asyncDelegator; -var __asyncValues; -var __makeTemplateObject; -var __importStar; -var __importDefault; -var __classPrivateFieldGet; -var __classPrivateFieldSet; -var __classPrivateFieldIn; -var __createBinding; -(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) { factory(createExporter(root, createExporter(exports))); }); - } - else if ( true && typeof module.exports === "object") { - factory(createExporter(root, createExporter(module.exports))); - } - else { - factory(createExporter(root)); - } - function createExporter(exports, previous) { - if (exports !== root) { - if (typeof Object.create === "function") { - Object.defineProperty(exports, "__esModule", { value: true }); - } - else { - exports.__esModule = true; - } - } - return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; - } -}) -(function (exporter) { - var 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]; }; - - __extends = function (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 __()); - }; - - __assign = Object.assign || function (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; - }; - - __rest = function (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; - }; - - __decorate = function (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; - }; - - __param = function (paramIndex, decorator) { - return function (target, key) { decorator(target, key, paramIndex); } - }; - - __metadata = function (metadataKey, metadataValue) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); - }; - - __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()); - }); - }; - - __generator = function (thisArg, body) { - var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; - return g = { next: verb(0), "throw": verb(1), "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 (_) 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; } - 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; - } - 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 }; - } - }; - - __exportStar = function(m, o) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); - }; - - __createBinding = Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) 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 === undefined) k2 = k; - o[k2] = m[k]; - }); - - __values = function (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 }; - } - }; - throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); - }; - - __read = function (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: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.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 = 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; - }; - - __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 = function (v) { - return this instanceof __await ? (this.v = v, this) : new __await(v); - }; - - __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(n, v); }); }; } - 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]); } - }; - - __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(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } - }; - - __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); } - }; - - __makeTemplateObject = function (cooked, raw) { - if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } - return cooked; - }; - - var __setModuleDefault = Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }; - - __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; - }; - - __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; - }; - - __classPrivateFieldGet = function (receiver, state, kind, f) { - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); - return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); - }; - - __classPrivateFieldSet = function (receiver, state, value, kind, f) { - if (kind === "m") throw new TypeError("Private method is not writable"); - if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); - if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); - return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; - }; - - __classPrivateFieldIn = function (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); - }; - - exporter("__extends", __extends); - exporter("__assign", __assign); - exporter("__rest", __rest); - exporter("__decorate", __decorate); - exporter("__param", __param); - exporter("__metadata", __metadata); - exporter("__awaiter", __awaiter); - exporter("__generator", __generator); - exporter("__exportStar", __exportStar); - exporter("__createBinding", __createBinding); - exporter("__values", __values); - exporter("__read", __read); - exporter("__spread", __spread); - exporter("__spreadArrays", __spreadArrays); - exporter("__spreadArray", __spreadArray); - exporter("__await", __await); - exporter("__asyncGenerator", __asyncGenerator); - exporter("__asyncDelegator", __asyncDelegator); - exporter("__asyncValues", __asyncValues); - exporter("__makeTemplateObject", __makeTemplateObject); - exporter("__importStar", __importStar); - exporter("__importDefault", __importDefault); - exporter("__classPrivateFieldGet", __classPrivateFieldGet); - exporter("__classPrivateFieldSet", __classPrivateFieldSet); - exporter("__classPrivateFieldIn", __classPrivateFieldIn); -}); - - +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +<<<<<<< HEAD +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); +======= /***/ }), /***/ 30158: @@ -50135,187 +59566,39 @@ async function readHeader(reader) { if (block.version !== 1) { if (typeof block.version === 'string') { throw new Error(`Invalid CAR version: "${ block.version }"`); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - throw new Error(`Invalid CAR version: ${ block.version }`); - } - if (!Array.isArray(block.roots)) { - throw new Error('Invalid CAR header format'); - } - if (Object.keys(block).filter(p => p !== 'roots' && p !== 'version').length) { - throw new Error('Invalid CAR header format'); - } - return block; -} -async function readMultihash(reader) { - const bytes = await reader.upTo(8); - varint__default["default"].decode(bytes); - const codeLength = varint__default["default"].decode.bytes; - const length = varint__default["default"].decode(bytes.subarray(varint__default["default"].decode.bytes)); - const lengthLength = varint__default["default"].decode.bytes; - const mhLength = codeLength + lengthLength + length; - const multihash = await reader.exactly(mhLength); - reader.seek(mhLength); - return multihash; -} -async function readCid(reader) { - const first = await reader.exactly(2); - if (first[0] === CIDV0_BYTES.SHA2_256 && first[1] === CIDV0_BYTES.LENGTH) { - const bytes = await reader.exactly(34); - reader.seek(34); - const multihash = Digest__namespace.decode(bytes); - return cid.CID.create(0, CIDV0_BYTES.DAG_PB, multihash); - } - const version = await readVarint(reader); - if (version !== 1) { - throw new Error(`Unexpected CID version (${ version })`); - } - const codec = await readVarint(reader); - const bytes = await readMultihash(reader); - const multihash = Digest__namespace.decode(bytes); - return cid.CID.create(version, codec, multihash); -} -async function readBlockHead(reader) { - const start = reader.pos; - let length = await readVarint(reader); - if (length === 0) { - throw new Error('Invalid CAR section (zero length)'); - } - length += reader.pos - start; - const cid = await readCid(reader); - const blockLength = length - (reader.pos - start); - return { - cid, - length, - blockLength - }; -} -async function readBlock(reader) { - const {cid, blockLength} = await readBlockHead(reader); - const bytes = await reader.exactly(blockLength); - reader.seek(blockLength); - return { - bytes, - cid - }; -} -async function readBlockIndex(reader) { - const offset = reader.pos; - const {cid, length, blockLength} = await readBlockHead(reader); - const index = { - cid, - length, - blockLength, - offset, - blockOffset: reader.pos - }; - reader.seek(index.blockLength); - return index; -} -function createDecoder(reader) { - const headerPromise = readHeader(reader); - return { - header: () => headerPromise, - async *blocks() { - await headerPromise; - while ((await reader.upTo(8)).length > 0) { - yield await readBlock(reader); - } - }, - async *blocksIndex() { - await headerPromise; - while ((await reader.upTo(8)).length > 0) { - yield await readBlockIndex(reader); - } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } - }; -} -function bytesReader(bytes) { - let pos = 0; - return { - async upTo(length) { - return bytes.subarray(pos, pos + Math.min(length, bytes.length - pos)); - }, - async exactly(length) { - if (length > bytes.length - pos) { - throw new Error('Unexpected end of data'); - } - return bytes.subarray(pos, pos + length); - }, - seek(length) { - pos += length; - }, - get pos() { - return pos; + else { + factory(createExporter(root)); } - }; -} -function chunkReader(readChunk) { - let pos = 0; - let have = 0; - let offset = 0; - let currentChunk = new Uint8Array(0); - const read = async length => { - have = currentChunk.length - offset; - const bufa = [currentChunk.subarray(offset)]; - while (have < length) { - const chunk = await readChunk(); - if (chunk == null) { - break; - } - if (have < 0) { - if (chunk.length > have) { - bufa.push(chunk.subarray(-have)); + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } } - } else { - bufa.push(chunk); - } - have += chunk.length; - } - currentChunk = new Uint8Array(bufa.reduce((p, c) => p + c.length, 0)); - let off = 0; - for (const b of bufa) { - currentChunk.set(b, off); - off += b.length; - } - offset = 0; - }; - return { - async upTo(length) { - if (currentChunk.length - offset < length) { - await read(length); - } - return currentChunk.subarray(offset, offset + Math.min(currentChunk.length - offset, length)); - }, - async exactly(length) { - if (currentChunk.length - offset < length) { - await read(length); - } - if (currentChunk.length - offset < length) { - throw new Error('Unexpected end of data'); - } - return currentChunk.subarray(offset, offset + length); - }, - seek(length) { - pos += length; - offset += length; - }, - get pos() { - return pos; - } - }; -} -function asyncIterableReader(asyncIterable) { - const iterator = asyncIterable[Symbol.asyncIterator](); - async function readChunk() { - const next = await iterator.next(); - if (next.done) { - return null; + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } - return next.value; - } - return chunkReader(readChunk); -} - +}) +(function (exporter) { + var 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]; }; + +<<<<<<< HEAD + __extends = function (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 __()); +======= exports.asyncIterableReader = asyncIterableReader; exports.bytesReader = bytesReader; exports.chunkReader = chunkReader; @@ -50428,535 +59711,1070 @@ class CarIndexedReader { offset: 0, blockLength: blockIndex.blockLength, blockOffset: blockIndex.blockOffset +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; - return reader.CarReader.readRaw(this._fd, readIndex); - } - async *blocks() { - for (const cidStr of this._order) { - const block = await this.get(cid.CID.parse(cidStr)); - if (!block) { - throw new Error('Unexpected internal error'); - } - yield block; - } - } - async *cids() { - for (const cidStr of this._order) { - yield cid.CID.parse(cidStr); - } - } - async close() { - if (this._fd) { - return this._fd.close(); - } - } - static async fromFile(path) { - if (typeof path !== 'string') { - throw new TypeError('fromFile() requires a file path string'); - } - const iterable = await indexer.CarIndexer.fromIterable(stream.Readable.from(fs__default["default"].createReadStream(path))); - const index = new Map(); - const order = []; - for await (const {cid, blockLength, blockOffset} of iterable) { - const cidStr = cid.toString(); - index.set(cidStr, { - blockLength, - blockOffset - }); - order.push(cidStr); - } - return new CarIndexedReader(iterable.version, path, await iterable.getRoots(), index, order); - } -} -const __browser = false; - -exports.CarIndexedReader = CarIndexedReader; -exports.__browser = __browser; - - -/***/ }), -/***/ 76346: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __assign = Object.assign || function (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; + }; -"use strict"; + __rest = function (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; + }; + __decorate = function (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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -var decoder = __nccwpck_require__(92730); + __esDecorate = function (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)); }; + 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; + }; -class CarIndexer { - constructor(version, roots, iterator) { - this._version = version; - this._roots = roots; - this._iterator = iterator; - } - get version() { - return this._version; - } - async getRoots() { - return this._roots; - } - [Symbol.asyncIterator]() { - return this._iterator; - } - static async fromBytes(bytes) { - if (!(bytes instanceof Uint8Array)) { - throw new TypeError('fromBytes() requires a Uint8Array'); - } - return decodeIndexerComplete(decoder.bytesReader(bytes)); - } - static async fromIterable(asyncIterable) { - if (!asyncIterable || !(typeof asyncIterable[Symbol.asyncIterator] === 'function')) { - throw new TypeError('fromIterable() requires an async iterable'); - } - return decodeIndexerComplete(decoder.asyncIterableReader(asyncIterable)); - } -} -async function decodeIndexerComplete(reader) { - const decoder$1 = decoder.createDecoder(reader); - const {version, roots} = await decoder$1.header(); - return new CarIndexer(version, roots, decoder$1.blocksIndex()); -} + __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; + }; -exports.CarIndexer = CarIndexer; + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + __setFunctionName = function (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 }); + }; -/***/ }), + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -/***/ 69388: -/***/ ((__unused_webpack_module, 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()); + }); + }; -"use strict"; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -function noop() { -} -function create() { - const chunkQueue = []; - let drainer = null; - let drainerResolver = noop; - let ended = false; - let outWait = null; - let outWaitResolver = noop; - const makeDrainer = () => { - if (!drainer) { - drainer = new Promise(resolve => { - drainerResolver = () => { - drainer = null; - drainerResolver = noop; - resolve(); + __values = function (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 }; + } }; - }); - } - return drainer; - }; - const writer = { - write(chunk) { - chunkQueue.push(chunk); - const drainer = makeDrainer(); - outWaitResolver(); - return drainer; - }, - async end() { - ended = true; - const drainer = makeDrainer(); - outWaitResolver(); - return drainer; - } - }; - const iterator = { - async next() { - const chunk = chunkQueue.shift(); - if (chunk) { - if (chunkQueue.length === 0) { - drainerResolver(); + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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); } - return { - done: false, - value: chunk - }; - } - if (ended) { - drainerResolver(); - return { - done: true, - value: undefined - }; - } - if (!outWait) { - outWait = new Promise(resolve => { - outWaitResolver = () => { - outWait = null; - outWaitResolver = noop; - return resolve(iterator.next()); - }; - }); - } - return outWait; - } - }; - return { - writer, - iterator - }; -} + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -exports.create = create; + /** @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 = 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; + }; -/***/ }), + __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)); + }; -/***/ 2650: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -"use strict"; + __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(n, v); }); }; } + 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]); } + }; + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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); } + }; -var decoder = __nccwpck_require__(92730); + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -class CarIteratorBase { - constructor(version, roots, iterable) { - this._version = version; - this._roots = roots; - this._iterable = iterable; - this._decoded = false; - } - get version() { - return this._version; - } - async getRoots() { - return this._roots; - } -} -class CarBlockIterator extends CarIteratorBase { - [Symbol.asyncIterator]() { - if (this._decoded) { - throw new Error('Cannot decode more than once'); - } - if (!this._iterable) { - throw new Error('Block iterable not found'); - } - this._decoded = true; - return this._iterable[Symbol.asyncIterator](); - } - static async fromBytes(bytes) { - const {version, roots, iterator} = await fromBytes(bytes); - return new CarBlockIterator(version, roots, iterator); - } - static async fromIterable(asyncIterable) { - const {version, roots, iterator} = await fromIterable(asyncIterable); - return new CarBlockIterator(version, roots, iterator); - } -} -class CarCIDIterator extends CarIteratorBase { - [Symbol.asyncIterator]() { - if (this._decoded) { - throw new Error('Cannot decode more than once'); - } - if (!this._iterable) { - throw new Error('Block iterable not found'); - } - this._decoded = true; - const iterable = this._iterable[Symbol.asyncIterator](); - return { - async next() { - const next = await iterable.next(); - if (next.done) { - return next; - } - return { - done: false, - value: next.value.cid - }; - } + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; }; - } - static async fromBytes(bytes) { - const {version, roots, iterator} = await fromBytes(bytes); - return new CarCIDIterator(version, roots, iterator); - } - static async fromIterable(asyncIterable) { - const {version, roots, iterator} = await fromIterable(asyncIterable); - return new CarCIDIterator(version, roots, iterator); - } -} -async function fromBytes(bytes) { - if (!(bytes instanceof Uint8Array)) { - throw new TypeError('fromBytes() requires a Uint8Array'); - } - return decodeIterator(decoder.bytesReader(bytes)); -} -async function fromIterable(asyncIterable) { - if (!asyncIterable || !(typeof asyncIterable[Symbol.asyncIterator] === 'function')) { - throw new TypeError('fromIterable() requires an async iterable'); - } - return decodeIterator(decoder.asyncIterableReader(asyncIterable)); -} -async function decodeIterator(reader) { - const decoder$1 = decoder.createDecoder(reader); - const {version, roots} = await decoder$1.header(); - return { - version, - roots, - iterator: decoder$1.blocks() - }; -} -exports.CarBlockIterator = CarBlockIterator; -exports.CarCIDIterator = CarCIDIterator; -exports.CarIteratorBase = CarIteratorBase; + __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; + }; + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -/***/ }), + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -/***/ 18824: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -"use strict"; + __classPrivateFieldIn = function (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); + }; + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + 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; + }; -var decoder = __nccwpck_require__(92730); + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -class CarReader { - constructor(version, roots, blocks) { - this._version = version; - this._roots = roots; - this._blocks = blocks; - this._keys = blocks.map(b => b.cid.toString()); + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); + + +/***/ }), + +<<<<<<< HEAD +/***/ 74700: +======= +/***/ 76346: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +var __webpack_unused_export__; + + +__webpack_unused_export__ = ({ + value: true +}); +Object.defineProperty(exports, "zR", ({ + enumerable: true, + get: function () { + return _nil.default; } - get version() { - return this._version; +})); +Object.defineProperty(exports, "Qc", ({ + enumerable: true, + get: function () { + return _parse.default; } - async getRoots() { - return this._roots; +})); +Object.defineProperty(exports, "Pz", ({ + enumerable: true, + get: function () { + return _stringify.default; } - async has(key) { - return this._keys.indexOf(key.toString()) > -1; +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; } - async get(key) { - const index = this._keys.indexOf(key.toString()); - return index > -1 ? this._blocks[index] : undefined; +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; } - async *blocks() { - for (const block of this._blocks) { - yield block; - } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; } - async *cids() { - for (const block of this._blocks) { - yield block.cid; - } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; } - static async fromBytes(bytes) { - if (!(bytes instanceof Uint8Array)) { - throw new TypeError('fromBytes() requires a Uint8Array'); - } - return decodeReaderComplete(decoder.bytesReader(bytes)); +})); +Object.defineProperty(exports, "Gu", ({ + enumerable: true, + get: function () { + return _validate.default; } - static async fromIterable(asyncIterable) { - if (!asyncIterable || !(typeof asyncIterable[Symbol.asyncIterator] === 'function')) { - throw new TypeError('fromIterable() requires an async iterable'); - } - return decodeReaderComplete(decoder.asyncIterableReader(asyncIterable)); +})); +Object.defineProperty(exports, "i8", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); + +<<<<<<< HEAD +var _v = _interopRequireDefault(__nccwpck_require__(7863)); +======= +var decoder = __nccwpck_require__(92730); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var _v2 = _interopRequireDefault(__nccwpck_require__(83804)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(48308)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(17773)); + +var _nil = _interopRequireDefault(__nccwpck_require__(75396)); + +var _version = _interopRequireDefault(__nccwpck_require__(1932)); + +var _validate = _interopRequireDefault(__nccwpck_require__(43384)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(64346)); + +var _parse = _interopRequireDefault(__nccwpck_require__(12798)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +<<<<<<< HEAD +/***/ 2026: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); } + + return _crypto.default.createHash('md5').update(bytes).digest(); } -async function decodeReaderComplete(reader) { - const decoder$1 = decoder.createDecoder(reader); - const {version, roots} = await decoder$1.header(); - const blocks = []; - for await (const block of decoder$1.blocks()) { - blocks.push(block); + +var _default = md5; +exports["default"] = _default; + +/***/ }), + +/***/ 45476: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var _default = { + randomUUID: _crypto.default.randomUUID +}; +exports["default"] = _default; + +/***/ }), + +/***/ 75396: +======= +/***/ 69388: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; + +/***/ }), + +/***/ 12798: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _validate = _interopRequireDefault(__nccwpck_require__(43384)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); } - return new CarReader(version, roots, blocks); + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; } -const __browser = true; -exports.CarReader = CarReader; -exports.__browser = __browser; +var _default = parse; +exports["default"] = _default; + +/***/ }), + +/***/ 14296: +/***/ ((__unused_webpack_module, exports) => { + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + /***/ }), -/***/ 67237: +/***/ 7782: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; -var fs = __nccwpck_require__(57147); -var util = __nccwpck_require__(73837); -var readerBrowser = __nccwpck_require__(18824); +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate -const fsread = util.promisify(fs__default["default"].read); -class CarReader extends readerBrowser.CarReader { - static async readRaw(fd, blockIndex) { - const {cid, blockLength, blockOffset} = blockIndex; - const bytes = new Uint8Array(blockLength); - let read; - if (typeof fd === 'number') { - read = (await fsread(fd, bytes, 0, blockLength, blockOffset)).bytesRead; - } else if (typeof fd === 'object' && typeof fd.read === 'function') { - read = (await fd.read(bytes, 0, blockLength, blockOffset)).bytesRead; - } else { - throw new TypeError('Bad fd'); - } - if (read !== blockLength) { - throw new Error(`Failed to read entire block (${ read } instead of ${ blockLength })`); - } - return { - cid, - bytes - }; +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); } -const __browser = false; -exports.CarReader = CarReader; -exports.__browser = __browser; +/***/ }), + +/***/ 26860: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports["default"] = _default; /***/ }), -/***/ 25562: +/***/ 64346: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +exports.unsafeStringify = unsafeStringify; -var cid = __nccwpck_require__(24247); -var encoder = __nccwpck_require__(32454); -var iteratorChannel = __nccwpck_require__(69388); -var decoder = __nccwpck_require__(92730); +var _validate = _interopRequireDefault(__nccwpck_require__(43384)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).slice(1)); +} + +function unsafeStringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]; +} + +function stringify(arr, offset = 0) { + const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields -class CarWriter { - constructor(roots, encoder) { - this._encoder = encoder; - this._mutex = encoder.setRoots(roots); - this._ended = false; + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); } - async put(block) { - if (!(block.bytes instanceof Uint8Array) || !block.cid) { - throw new TypeError('Can only write {cid, bytes} objects'); - } - if (this._ended) { - throw new Error('Already closed'); - } - const cid$1 = cid.CID.asCID(block.cid); - if (!cid$1) { - throw new TypeError('Can only write {cid, bytes} objects'); + + return uuid; +} + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +/***/ 7863: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _rng = _interopRequireDefault(__nccwpck_require__(7782)); + +var _stringify = __nccwpck_require__(64346); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; } - this._mutex = this._mutex.then(() => this._encoder.writeBlock({ - cid: cid$1, - bytes: block.bytes - })); - return this._mutex; - } - async close() { - if (this._ended) { - throw new Error('Already closed'); + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; } - await this._mutex; - this._ended = true; - return this._encoder.close(); + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); } - static create(roots) { - roots = toRoots(roots); - const {encoder, iterator} = encodeWriter(); - const writer = new CarWriter(roots, encoder); - const out = new CarWriterOut(iterator); - return { - writer, - out - }; + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; } - static createAppender() { - const {encoder, iterator} = encodeWriter(); - encoder.setRoots = () => Promise.resolve(); - const writer = new CarWriter([], encoder); - const out = new CarWriterOut(iterator); - return { - writer, - out - }; + + return buf || (0, _stringify.unsafeStringify)(b); +} + +var _default = v1; +exports["default"] = _default; + +/***/ }), + +/***/ 83804: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _v = _interopRequireDefault(__nccwpck_require__(50771)); + +var _md = _interopRequireDefault(__nccwpck_require__(2026)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; + +/***/ }), + +/***/ 50771: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.URL = exports.DNS = void 0; +exports["default"] = v35; + +var _stringify = __nccwpck_require__(64346); + +var _parse = _interopRequireDefault(__nccwpck_require__(12798)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); } - static async updateRootsInBytes(bytes, roots) { - const reader = decoder.bytesReader(bytes); - await decoder.readHeader(reader); - const newHeader = encoder.createHeader(roots); - if (reader.pos !== newHeader.length) { - throw new Error(`updateRoots() can only overwrite a header of the same length (old header is ${ reader.pos } bytes, new header is ${ newHeader.length } bytes)`); + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function v35(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + var _namespace; + + if (typeof value === 'string') { + value = stringToBytes(value); } - bytes.set(newHeader, 0); - return bytes; - } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.unsafeStringify)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; } -class CarWriterOut { - constructor(iterator) { - this._iterator = iterator; + +/***/ }), + +<<<<<<< HEAD +/***/ 48308: +======= +/***/ 2650: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _native = _interopRequireDefault(__nccwpck_require__(45476)); +======= +var decoder = __nccwpck_require__(92730); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var _rng = _interopRequireDefault(__nccwpck_require__(7782)); + +var _stringify = __nccwpck_require__(64346); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + if (_native.default.randomUUID && !buf && !options) { + return _native.default.randomUUID(); } - [Symbol.asyncIterator]() { - if (this._iterating) { - throw new Error('Multiple iterator not supported'); + + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; } - this._iterating = true; - return this._iterator; + + return buf; } + + return (0, _stringify.unsafeStringify)(rnds); } -function encodeWriter() { - const iw = iteratorChannel.create(); - const {writer, iterator} = iw; - const encoder$1 = encoder.createEncoder(writer); - return { - encoder: encoder$1, - iterator - }; + +var _default = v4; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 17773: +======= +/***/ 18824: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _v = _interopRequireDefault(__nccwpck_require__(50771)); +======= +var decoder = __nccwpck_require__(92730); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var _sha = _interopRequireDefault(__nccwpck_require__(26860)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 43384: +======= +/***/ 67237: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _regex = _interopRequireDefault(__nccwpck_require__(14296)); +======= +var fs = __nccwpck_require__(57147); +var util = __nccwpck_require__(73837); +var readerBrowser = __nccwpck_require__(18824); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); } -function toRoots(roots) { - if (roots === undefined) { - return []; - } - if (!Array.isArray(roots)) { - const cid$1 = cid.CID.asCID(roots); - if (!cid$1) { - throw new TypeError('roots must be a single CID or an array of CIDs'); - } - return [cid$1]; - } - const _roots = []; - for (const root of roots) { - const _root = cid.CID.asCID(root); - if (!_root) { - throw new TypeError('roots must be a single CID or an array of CIDs'); - } - _roots.push(_root); + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 1932: +======= +/***/ 25562: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _validate = _interopRequireDefault(__nccwpck_require__(43384)); +======= +var cid = __nccwpck_require__(24247); +var encoder = __nccwpck_require__(32454); +var iteratorChannel = __nccwpck_require__(69388); +var decoder = __nccwpck_require__(92730); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); } - return _roots; -} -const __browser = true; -exports.CarWriter = CarWriter; -exports.CarWriterOut = CarWriterOut; -exports.__browser = __browser; + return parseInt(uuid.slice(14, 15), 16); +} +var _default = version; +exports["default"] = _default; /***/ }), +<<<<<<< HEAD +/***/ 95018: +======= /***/ 72902: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { @@ -51017,6 +60835,7 @@ exports.__browser = __browser; /***/ }), /***/ 54346: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((module) => { module.exports = read @@ -51052,7 +60871,11 @@ function read(buf, offset) { /***/ }), +<<<<<<< HEAD +/***/ 51732: +======= /***/ 86526: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((module) => { module.exports = encode @@ -51089,6 +60912,15 @@ function encode(num, out, offset) { /***/ }), +<<<<<<< HEAD +/***/ 59800: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + encode: __nccwpck_require__(51732) + , decode: __nccwpck_require__(95018) + , encodingLength: __nccwpck_require__(75026) +======= /***/ 75739: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { @@ -51096,12 +60928,17 @@ module.exports = { encode: __nccwpck_require__(86526) , decode: __nccwpck_require__(54346) , encodingLength: __nccwpck_require__(22651) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } /***/ }), +<<<<<<< HEAD +/***/ 75026: +======= /***/ 22651: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((module) => { @@ -51133,14 +60970,46 @@ module.exports = function (value) { /***/ }), +<<<<<<< HEAD +/***/ 74405: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +======= /***/ 89778: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; +var balanced = __nccwpck_require__(99171); +module.exports = expandTop; -Object.defineProperty(exports, "__esModule", ({ value: true })); +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; + +<<<<<<< HEAD +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} + +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +======= var cborg = __nccwpck_require__(12085); var cid = __nccwpck_require__(24247); @@ -51456,173 +61325,59 @@ function decode(bytes) { }); } return node; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } -exports.createLink = util.createLink; -exports.createNode = util.createNode; -exports.prepare = util.prepare; -exports.validate = util.validate; -exports.code = code; -exports.decode = decode; -exports.encode = encode; -exports.name = name; +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; -/***/ }), + var parts = []; + var m = balanced('{', '}', str); +<<<<<<< HEAD + if (!m) + return str.split(','); +======= /***/ 80021: /***/ ((__unused_webpack_module, exports) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); + } -Object.defineProperty(exports, "__esModule", ({ value: true })); + parts.push.apply(parts, p); -const textDecoder = new TextDecoder(); -function decodeVarint(bytes, offset) { - let v = 0; - for (let shift = 0;; shift += 7) { - if (shift >= 64) { - throw new Error('protobuf: varint overflow'); - } - if (offset >= bytes.length) { - throw new Error('protobuf: unexpected end of data'); - } - const b = bytes[offset++]; - v += shift < 28 ? (b & 127) << shift : (b & 127) * 2 ** shift; - if (b < 128) { - break; - } - } - return [ - v, - offset - ]; -} -function decodeBytes(bytes, offset) { - let byteLen; - [byteLen, offset] = decodeVarint(bytes, offset); - const postOffset = offset + byteLen; - if (byteLen < 0 || postOffset < 0) { - throw new Error('protobuf: invalid length'); - } - if (postOffset > bytes.length) { - throw new Error('protobuf: unexpected end of data'); - } - return [ - bytes.subarray(offset, postOffset), - postOffset - ]; -} -function decodeKey(bytes, index) { - let wire; - [wire, index] = decodeVarint(bytes, index); - return [ - wire & 7, - wire >> 3, - index - ]; -} -function decodeLink(bytes) { - const link = {}; - const l = bytes.length; - let index = 0; - while (index < l) { - let wireType, fieldNum; - [wireType, fieldNum, index] = decodeKey(bytes, index); - if (fieldNum === 1) { - if (link.Hash) { - throw new Error('protobuf: (PBLink) duplicate Hash section'); - } - if (wireType !== 2) { - throw new Error(`protobuf: (PBLink) wrong wireType (${ wireType }) for Hash`); - } - if (link.Name !== undefined) { - throw new Error('protobuf: (PBLink) invalid order, found Name before Hash'); - } - if (link.Tsize !== undefined) { - throw new Error('protobuf: (PBLink) invalid order, found Tsize before Hash'); - } - ; - [link.Hash, index] = decodeBytes(bytes, index); - } else if (fieldNum === 2) { - if (link.Name !== undefined) { - throw new Error('protobuf: (PBLink) duplicate Name section'); - } - if (wireType !== 2) { - throw new Error(`protobuf: (PBLink) wrong wireType (${ wireType }) for Name`); - } - if (link.Tsize !== undefined) { - throw new Error('protobuf: (PBLink) invalid order, found Tsize before Name'); - } - let byts; - [byts, index] = decodeBytes(bytes, index); - link.Name = textDecoder.decode(byts); - } else if (fieldNum === 3) { - if (link.Tsize !== undefined) { - throw new Error('protobuf: (PBLink) duplicate Tsize section'); - } - if (wireType !== 0) { - throw new Error(`protobuf: (PBLink) wrong wireType (${ wireType }) for Tsize`); - } - ; - [link.Tsize, index] = decodeVarint(bytes, index); - } else { - throw new Error(`protobuf: (PBLink) invalid fieldNumber, expected 1, 2 or 3, got ${ fieldNum }`); - } - } - if (index > l) { - throw new Error('protobuf: (PBLink) unexpected end of data'); - } - return link; -} -function decodeNode(bytes) { - const l = bytes.length; - let index = 0; - let links; - let linksBeforeData = false; - let data; - while (index < l) { - let wireType, fieldNum; - [wireType, fieldNum, index] = decodeKey(bytes, index); - if (wireType !== 2) { - throw new Error(`protobuf: (PBNode) invalid wireType, expected 2, got ${ wireType }`); - } - if (fieldNum === 1) { - if (data) { - throw new Error('protobuf: (PBNode) duplicate Data section'); - } - ; - [data, index] = decodeBytes(bytes, index); - if (links) { - linksBeforeData = true; - } - } else if (fieldNum === 2) { - if (linksBeforeData) { - throw new Error('protobuf: (PBNode) duplicate Links section'); - } else if (!links) { - links = []; - } - let byts; - [byts, index] = decodeBytes(bytes, index); - links.push(decodeLink(byts)); - } else { - throw new Error(`protobuf: (PBNode) invalid fieldNumber, expected 1 or 2, got ${ fieldNum }`); - } - } - if (index > l) { - throw new Error('protobuf: (PBNode) unexpected end of data'); - } - const node = {}; - if (data) { - node.Data = data; - } - node.Links = links || []; - return node; + return parts; } -exports.decodeNode = decodeNode; +function expandTop(str) { + if (!str) + return []; +<<<<<<< HEAD + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); +======= /***/ }), @@ -51648,366 +61403,16 @@ function encodeLink(link, bytes) { } i = encodeVarint(bytes, i, link.Tsize) - 1; bytes[i] = 24; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - if (typeof link.Name === 'string') { - const nameBytes = textEncoder.encode(link.Name); - i -= nameBytes.length; - bytes.set(nameBytes, i); - i = encodeVarint(bytes, i, nameBytes.length) - 1; - bytes[i] = 18; - } - if (link.Hash) { - i -= link.Hash.length; - bytes.set(link.Hash, i); - i = encodeVarint(bytes, i, link.Hash.length) - 1; - bytes[i] = 10; - } - return bytes.length - i; -} -function encodeNode(node) { - const size = sizeNode(node); - const bytes = new Uint8Array(size); - let i = size; - if (node.Data) { - i -= node.Data.length; - bytes.set(node.Data, i); - i = encodeVarint(bytes, i, node.Data.length) - 1; - bytes[i] = 10; - } - if (node.Links) { - for (let index = node.Links.length - 1; index >= 0; index--) { - const size = encodeLink(node.Links[index], bytes.subarray(0, i)); - i -= size; - i = encodeVarint(bytes, i, size) - 1; - bytes[i] = 18; - } - } - return bytes; -} -function sizeLink(link) { - let n = 0; - if (link.Hash) { - const l = link.Hash.length; - n += 1 + l + sov(l); - } - if (typeof link.Name === 'string') { - const l = textEncoder.encode(link.Name).length; - n += 1 + l + sov(l); - } - if (typeof link.Tsize === 'number') { - n += 1 + sov(link.Tsize); - } - return n; -} -function sizeNode(node) { - let n = 0; - if (node.Data) { - const l = node.Data.length; - n += 1 + l + sov(l); - } - if (node.Links) { - for (const link of node.Links) { - const l = sizeLink(link); - n += 1 + l + sov(l); - } - } - return n; -} -function encodeVarint(bytes, offset, v) { - offset -= sov(v); - const base = offset; - while (v >= maxUInt32) { - bytes[offset++] = v & 127 | 128; - v /= 128; - } - while (v >= 128) { - bytes[offset++] = v & 127 | 128; - v >>>= 7; - } - bytes[offset] = v; - return base; -} -function sov(x) { - if (x % 2 === 0) { - x++; - } - return Math.floor((len64(x) + 6) / 7); -} -function len64(x) { - let n = 0; - if (x >= maxInt32) { - x = Math.floor(x / maxInt32); - n = 32; - } - if (x >= 1 << 16) { - x >>>= 16; - n += 16; - } - if (x >= 1 << 8) { - x >>>= 8; - n += 8; - } - return n + len8tab[x]; + + return expand(escapeBraces(str), true).map(unescapeBraces); } -const len8tab = [ - 0, - 1, - 2, - 2, - 3, - 3, - 3, - 3, - 4, - 4, - 4, - 4, - 4, - 4, - 4, - 4, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 5, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 6, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 7, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8 -]; +<<<<<<< HEAD +function embrace(str) { + return '{' + str + '}'; +======= exports.encodeNode = encodeNode; @@ -52049,146 +61454,144 @@ function linkComparator(a, b) { } } return x < y ? -1 : y < x ? 1 : 0; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } -function hasOnlyProperties(node, properties) { - return !Object.keys(node).some(p => !properties.includes(p)); +function isPadded(el) { + return /^-?0\d/.test(el); } -function asLink(link) { - if (typeof link.asCID === 'object') { - const Hash = cid.CID.asCID(link); - if (!Hash) { - throw new TypeError('Invalid DAG-PB form'); + +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} + +function expand(str, isTop) { + var expansions = []; + + var m = balanced('{', '}', str); + if (!m) return [str]; + + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; + + if (/\$$/.test(m.pre)) { + for (var k = 0; k < post.length; k++) { + var expansion = pre+ '{' + m.body + '}' + post[k]; + expansions.push(expansion); } - return { Hash }; - } - if (typeof link !== 'object' || Array.isArray(link)) { - throw new TypeError('Invalid DAG-PB form'); - } - const pbl = {}; - if (link.Hash) { - let cid$1 = cid.CID.asCID(link.Hash); - try { - if (!cid$1) { - if (typeof link.Hash === 'string') { - cid$1 = cid.CID.parse(link.Hash); - } else if (link.Hash instanceof Uint8Array) { - cid$1 = cid.CID.decode(link.Hash); - } + } else { + 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.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); } - } catch (e) { - throw new TypeError(`Invalid DAG-PB form: ${ e.message }`); - } - if (cid$1) { - pbl.Hash = cid$1; + return [str]; } - } - if (!pbl.Hash) { - throw new TypeError('Invalid DAG-PB form'); - } - if (typeof link.Name === 'string') { - pbl.Name = link.Name; - } - if (typeof link.Tsize === 'number') { - pbl.Tsize = link.Tsize; - } - return pbl; -} -function prepare(node) { - if (node instanceof Uint8Array || typeof node === 'string') { - node = { Data: node }; - } - if (typeof node !== 'object' || Array.isArray(node)) { - throw new TypeError('Invalid DAG-PB form'); - } - const pbn = {}; - if (node.Data !== undefined) { - if (typeof node.Data === 'string') { - pbn.Data = textEncoder.encode(node.Data); - } else if (node.Data instanceof Uint8Array) { - pbn.Data = node.Data; + + var n; + if (isSequence) { + n = m.body.split(/\.\./); } else { - throw new TypeError('Invalid DAG-PB form'); + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } } - } - if (node.Links !== undefined) { - if (Array.isArray(node.Links)) { - pbn.Links = node.Links.map(asLink); - pbn.Links.sort(linkComparator); + + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + var N; + + if (isSequence) { + var x = numeric(n[0]); + 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 < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + + N = []; + + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } } else { - throw new TypeError('Invalid DAG-PB form'); - } - } else { - pbn.Links = []; - } - return pbn; -} -function validate(node) { - if (!node || typeof node !== 'object' || Array.isArray(node)) { - throw new TypeError('Invalid DAG-PB form'); - } - if (!hasOnlyProperties(node, pbNodeProperties)) { - throw new TypeError('Invalid DAG-PB form (extraneous properties)'); - } - if (node.Data !== undefined && !(node.Data instanceof Uint8Array)) { - throw new TypeError('Invalid DAG-PB form (Data must be a Uint8Array)'); - } - if (!Array.isArray(node.Links)) { - throw new TypeError('Invalid DAG-PB form (Links must be an array)'); - } - for (let i = 0; i < node.Links.length; i++) { - const link = node.Links[i]; - if (!link || typeof link !== 'object' || Array.isArray(link)) { - throw new TypeError('Invalid DAG-PB form (bad link object)'); - } - if (!hasOnlyProperties(link, pbLinkProperties)) { - throw new TypeError('Invalid DAG-PB form (extraneous properties on link object)'); - } - if (!link.Hash) { - throw new TypeError('Invalid DAG-PB form (link must have a Hash)'); - } - if (link.Hash.asCID !== link.Hash) { - throw new TypeError('Invalid DAG-PB form (link Hash must be a CID)'); - } - if (link.Name !== undefined && typeof link.Name !== 'string') { - throw new TypeError('Invalid DAG-PB form (link Name must be a string)'); - } - if (link.Tsize !== undefined && (typeof link.Tsize !== 'number' || link.Tsize % 1 !== 0)) { - throw new TypeError('Invalid DAG-PB form (link Tsize must be an integer)'); + N = []; + + for (var j = 0; j < n.length; j++) { + N.push.apply(N, expand(n[j], false)); + } } - if (i > 0 && linkComparator(link, node.Links[i - 1]) === -1) { - throw new TypeError('Invalid DAG-PB form (links must be sorted by Name bytes)'); + + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } } } -} -function createNode(data, links = []) { - return prepare({ - Data: data, - Links: links - }); -} -function createLink(name, size, cid) { - return asLink({ - Hash: cid, - Name: name, - Tsize: size - }); + + return expansions; } -exports.createLink = createLink; -exports.createNode = createNode; -exports.prepare = prepare; -exports.validate = validate; /***/ }), +<<<<<<< HEAD +/***/ 72426: +======= /***/ 17422: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - +/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */ Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +======= var hasher = __nccwpck_require__(62030); var multiformats = __nccwpck_require__(27331); @@ -52230,11 +61633,16 @@ exports.murmur332 = murmur332; /*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */ Object.defineProperty(exports, "__esModule", ({ value: true })); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 exports.utils = exports.curve25519 = exports.getSharedSecret = exports.sync = exports.verify = exports.sign = exports.getPublicKey = exports.Signature = exports.Point = exports.RistrettoPoint = exports.ExtendedPoint = exports.CURVE = void 0; const nodeCrypto = __nccwpck_require__(6113); const _0n = BigInt(0); const _1n = BigInt(1); const _2n = BigInt(2); +<<<<<<< HEAD +const _8n = BigInt(8); +======= +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const CU_O = BigInt('7237005577332262213973186563042994240857116359379907606001950938285454250989'); const CURVE = Object.freeze({ a: BigInt(-1), @@ -52362,7 +61770,11 @@ class ExtendedPoint { } } let p = ExtendedPoint.ZERO; +<<<<<<< HEAD + let f = ExtendedPoint.BASE; +======= let f = ExtendedPoint.ZERO; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 const windows = 1 + 256 / W; const windowSize = 2 ** (W - 1); const mask = BigInt(2 ** W - 1); @@ -52376,23 +61788,63 @@ class ExtendedPoint { wbits -= maxNumber; n += _1n; } + const offset1 = offset; + const offset2 = offset + Math.abs(wbits) - 1; + const cond1 = window % 2 !== 0; + const cond2 = wbits < 0; if (wbits === 0) { - let pr = precomputes[offset]; - if (window % 2) - pr = pr.negate(); - f = f.add(pr); + f = f.add(constTimeNegate(cond1, precomputes[offset1])); } else { - let cached = precomputes[offset + Math.abs(wbits) - 1]; - if (wbits < 0) - cached = cached.negate(); - p = p.add(cached); + p = p.add(constTimeNegate(cond2, precomputes[offset2])); } } return ExtendedPoint.normalizeZ([p, f])[0]; } multiply(scalar, affinePoint) { return this.wNAF(normalizeScalar(scalar, CURVE.l), affinePoint); +<<<<<<< HEAD + } + multiplyUnsafe(scalar) { + let n = normalizeScalar(scalar, CURVE.l, false); + const G = ExtendedPoint.BASE; + const P0 = ExtendedPoint.ZERO; + if (n === _0n) + return P0; + if (this.equals(P0) || n === _1n) + return this; + if (this.equals(G)) + return this.wNAF(n); + let p = P0; + let d = this; + while (n > _0n) { + if (n & _1n) + p = p.add(d); + d = d.double(); + n >>= _1n; + } + return p; + } + isSmallOrder() { + return this.multiplyUnsafe(CURVE.h).equals(ExtendedPoint.ZERO); + } + isTorsionFree() { + let p = this.multiplyUnsafe(CURVE.l / _2n).double(); + if (CURVE.l % _2n) + p = p.add(this); + return p.equals(ExtendedPoint.ZERO); + } + toAffine(invZ) { + const { x, y, z } = this; + const is0 = this.equals(ExtendedPoint.ZERO); + if (invZ == null) + invZ = is0 ? _8n : invert(z); + const ax = mod(x * invZ); + const ay = mod(y * invZ); + const zz = mod(z * invZ); + if (is0) + return Point.ZERO; +======= } multiplyUnsafe(scalar) { let n = normalizeScalar(scalar, CURVE.l, false); @@ -52425,6 +61877,7 @@ class ExtendedPoint { const ax = mod(x * invZ); const ay = mod(y * invZ); const zz = mod(z * invZ); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 if (zz !== _1n) throw new Error('invZ was invalid'); return new Point(ax, ay); @@ -52442,6 +61895,13 @@ class ExtendedPoint { exports.ExtendedPoint = ExtendedPoint; ExtendedPoint.BASE = new ExtendedPoint(CURVE.Gx, CURVE.Gy, _1n, mod(CURVE.Gx * CURVE.Gy)); ExtendedPoint.ZERO = new ExtendedPoint(_0n, _1n, _1n, _0n); +<<<<<<< HEAD +function constTimeNegate(condition, item) { + const neg = item.negate(); + return condition ? neg : item; +} +======= +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 function assertExtPoint(other) { if (!(other instanceof ExtendedPoint)) throw new TypeError('ExtendedPoint expected'); @@ -53119,40 +62579,82 @@ Object.defineProperties(exports.utils, { /***/ }), +<<<<<<< HEAD +/***/ 14681: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +======= /***/ 61163: /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -"use strict"; -/*! noble-secp256k1 - MIT License (c) Paul Miller (paulmillr.com) */ -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; +/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.utils = exports.schnorr = exports.verify = exports.signSync = exports.sign = exports.getSharedSecret = exports.recoverPublicKey = exports.getPublicKey = exports.Signature = exports.Point = exports.CURVE = void 0; -const crypto_1 = __importDefault(__nccwpck_require__(6113)); +const nodeCrypto = __nccwpck_require__(6113); const _0n = BigInt(0); const _1n = BigInt(1); const _2n = BigInt(2); const _3n = BigInt(3); const _8n = BigInt(8); -const POW_2_256 = _2n ** BigInt(256); -const CURVE = { +const CURVE = Object.freeze({ a: _0n, b: BigInt(7), - P: POW_2_256 - _2n ** BigInt(32) - BigInt(977), - n: POW_2_256 - BigInt('432420386565659656852420866394968145599'), + P: BigInt('0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f'), + n: BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141'), h: _1n, Gx: BigInt('55066263022277343669578718895168534326250603453777594175500187360389116729240'), Gy: BigInt('32670510020758816978083085130507043184471273380659243275938904335757337482424'), beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'), -}; +}); exports.CURVE = CURVE; -function weistrass(x) { +const divNearest = (a, b) => (a + b / _2n) / b; +const endo = { + beta: BigInt('0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee'), + splitScalar(k) { + const { n } = CURVE; + const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15'); + const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3'); + const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8'); + const b2 = a1; + const POW_2_128 = BigInt('0x100000000000000000000000000000000'); + const c1 = divNearest(b2 * k, n); + const c2 = divNearest(-b1 * k, n); + let k1 = mod(k - c1 * a1 - c2 * a2, n); + let k2 = mod(-c1 * b1 - c2 * b2, n); + const k1neg = k1 > POW_2_128; + const k2neg = k2 > POW_2_128; + if (k1neg) + k1 = n - k1; + if (k2neg) + k2 = n - k2; + if (k1 > POW_2_128 || k2 > POW_2_128) { + throw new Error('splitScalarEndo: Endomorphism failed, k=' + k); + } + return { k1neg, k1, k2neg, k2 }; + }, +}; +const fieldLen = 32; +const groupLen = 32; +const hashLen = 32; +const compressedLen = fieldLen + 1; +const uncompressedLen = 2 * fieldLen + 1; +function weierstrass(x) { const { a, b } = CURVE; - return mod(x ** _3n + a * x + b); + const x2 = mod(x * x); + const x3 = mod(x2 * x); + return mod(x3 + a * x + b); } const USE_ENDOMORPHISM = CURVE.a === _0n; +class ShaError extends Error { + constructor(message) { + super(message); + } +} +function assertJacPoint(other) { + if (!(other instanceof JacobianPoint)) + throw new TypeError('JacobianPoint expected'); +} class JacobianPoint { constructor(x, y, z) { this.x = x; @@ -53163,6 +62665,8 @@ class JacobianPoint { if (!(p instanceof Point)) { throw new TypeError('JacobianPoint#fromAffine: expected Point'); } + if (p.equals(Point.ZERO)) + return JacobianPoint.ZERO; return new JacobianPoint(p.x, p.y, _1n); } static toAffineBatch(points) { @@ -53173,51 +62677,47 @@ class JacobianPoint { return JacobianPoint.toAffineBatch(points).map(JacobianPoint.fromAffine); } equals(other) { - const a = this; - const b = other; - const az2 = mod(a.z * a.z); - const az3 = mod(a.z * az2); - const bz2 = mod(b.z * b.z); - const bz3 = mod(b.z * bz2); - return mod(a.x * bz2) === mod(az2 * b.x) && mod(a.y * bz3) === mod(az3 * b.y); + assertJacPoint(other); + const { x: X1, y: Y1, z: Z1 } = this; + const { x: X2, y: Y2, z: Z2 } = other; + const Z1Z1 = mod(Z1 * Z1); + const Z2Z2 = mod(Z2 * Z2); + const U1 = mod(X1 * Z2Z2); + const U2 = mod(X2 * Z1Z1); + const S1 = mod(mod(Y1 * Z2) * Z2Z2); + const S2 = mod(mod(Y2 * Z1) * Z1Z1); + return U1 === U2 && S1 === S2; } negate() { return new JacobianPoint(this.x, mod(-this.y), this.z); } double() { - const X1 = this.x; - const Y1 = this.y; - const Z1 = this.z; - const A = mod(X1 ** _2n); - const B = mod(Y1 ** _2n); - const C = mod(B ** _2n); - const D = mod(_2n * (mod(mod((X1 + B) ** _2n)) - A - C)); + const { x: X1, y: Y1, z: Z1 } = this; + const A = mod(X1 * X1); + const B = mod(Y1 * Y1); + const C = mod(B * B); + const x1b = X1 + B; + const D = mod(_2n * (mod(x1b * x1b) - A - C)); const E = mod(_3n * A); - const F = mod(E ** _2n); + const F = mod(E * E); const X3 = mod(F - _2n * D); const Y3 = mod(E * (D - X3) - _8n * C); const Z3 = mod(_2n * Y1 * Z1); return new JacobianPoint(X3, Y3, Z3); } add(other) { - if (!(other instanceof JacobianPoint)) { - throw new TypeError('JacobianPoint#add: expected JacobianPoint'); - } - const X1 = this.x; - const Y1 = this.y; - const Z1 = this.z; - const X2 = other.x; - const Y2 = other.y; - const Z2 = other.z; + assertJacPoint(other); + const { x: X1, y: Y1, z: Z1 } = this; + const { x: X2, y: Y2, z: Z2 } = other; if (X2 === _0n || Y2 === _0n) return this; if (X1 === _0n || Y1 === _0n) return other; - const Z1Z1 = mod(Z1 ** _2n); - const Z2Z2 = mod(Z2 ** _2n); + const Z1Z1 = mod(Z1 * Z1); + const Z2Z2 = mod(Z2 * Z2); const U1 = mod(X1 * Z2Z2); const U2 = mod(X2 * Z1Z1); - const S1 = mod(Y1 * Z2 * Z2Z2); + const S1 = mod(mod(Y1 * Z2) * Z2Z2); const S2 = mod(mod(Y2 * Z1) * Z1Z1); const H = mod(U2 - U1); const r = mod(S2 - S1); @@ -53229,10 +62729,10 @@ class JacobianPoint { return JacobianPoint.ZERO; } } - const HH = mod(H ** _2n); + const HH = mod(H * H); const HHH = mod(H * HH); const V = mod(U1 * HH); - const X3 = mod(r ** _2n - HHH - _2n * V); + const X3 = mod(r * r - HHH - _2n * V); const Y3 = mod(r * (V - X3) - S1 * HHH); const Z3 = mod(Z1 * Z2 * H); return new JacobianPoint(X3, Y3, Z3); @@ -53241,9 +62741,14 @@ class JacobianPoint { return this.add(other.negate()); } multiplyUnsafe(scalar) { + const P0 = JacobianPoint.ZERO; + if (typeof scalar === 'bigint' && scalar === _0n) + return P0; let n = normalizeScalar(scalar); + if (n === _1n) + return this; if (!USE_ENDOMORPHISM) { - let p = JacobianPoint.ZERO; + let p = P0; let d = this; while (n > _0n) { if (n & _1n) @@ -53253,9 +62758,9 @@ class JacobianPoint { } return p; } - let { k1neg, k1, k2neg, k2 } = splitScalarEndo(n); - let k1p = JacobianPoint.ZERO; - let k2p = JacobianPoint.ZERO; + let { k1neg, k1, k2neg, k2 } = endo.splitScalar(n); + let k1p = P0; + let k2p = P0; let d = this; while (k1 > _0n || k2 > _0n) { if (k1 & _1n) @@ -53270,12 +62775,12 @@ class JacobianPoint { k1p = k1p.negate(); if (k2neg) k2p = k2p.negate(); - k2p = new JacobianPoint(mod(k2p.x * CURVE.beta), k2p.y, k2p.z); + k2p = new JacobianPoint(mod(k2p.x * endo.beta), k2p.y, k2p.z); return k1p.add(k2p); } precomputeWindow(W) { const windows = USE_ENDOMORPHISM ? 128 / W + 1 : 256 / W + 1; - let points = []; + const points = []; let p = this; let base = p; for (let window = 0; window < windows; window++) { @@ -53305,8 +62810,8 @@ class JacobianPoint { } } let p = JacobianPoint.ZERO; - let f = JacobianPoint.ZERO; - const windows = USE_ENDOMORPHISM ? 128 / W + 1 : 256 / W + 1; + let f = JacobianPoint.BASE; + const windows = 1 + (USE_ENDOMORPHISM ? 128 / W : 256 / W); const windowSize = 2 ** (W - 1); const mask = BigInt(2 ** W - 1); const maxNumber = 2 ** W; @@ -53319,17 +62824,15 @@ class JacobianPoint { wbits -= maxNumber; n += _1n; } + const offset1 = offset; + const offset2 = offset + Math.abs(wbits) - 1; + const cond1 = window % 2 !== 0; + const cond2 = wbits < 0; if (wbits === 0) { - let pr = precomputes[offset]; - if (window % 2) - pr = pr.negate(); - f = f.add(pr); + f = f.add(constTimeNegate(cond1, precomputes[offset1])); } else { - let cached = precomputes[offset + Math.abs(wbits) - 1]; - if (wbits < 0) - cached = cached.negate(); - p = p.add(cached); + p = p.add(constTimeNegate(cond2, precomputes[offset2])); } } return { p, f }; @@ -53339,33 +62842,46 @@ class JacobianPoint { let point; let fake; if (USE_ENDOMORPHISM) { - let { k1neg, k1, k2neg, k2 } = splitScalarEndo(n); + const { k1neg, k1, k2neg, k2 } = endo.splitScalar(n); let { p: k1p, f: f1p } = this.wNAF(k1, affinePoint); let { p: k2p, f: f2p } = this.wNAF(k2, affinePoint); - if (k1neg) - k1p = k1p.negate(); - if (k2neg) - k2p = k2p.negate(); - k2p = new JacobianPoint(mod(k2p.x * CURVE.beta), k2p.y, k2p.z); + k1p = constTimeNegate(k1neg, k1p); + k2p = constTimeNegate(k2neg, k2p); + k2p = new JacobianPoint(mod(k2p.x * endo.beta), k2p.y, k2p.z); point = k1p.add(k2p); fake = f1p.add(f2p); } else { - let { p, f } = this.wNAF(n, affinePoint); + const { p, f } = this.wNAF(n, affinePoint); point = p; fake = f; } return JacobianPoint.normalizeZ([point, fake])[0]; } - toAffine(invZ = invert(this.z)) { - const invZ2 = invZ ** _2n; - const x = mod(this.x * invZ2); - const y = mod(this.y * invZ2 * invZ); - return new Point(x, y); + toAffine(invZ) { + const { x, y, z } = this; + const is0 = this.equals(JacobianPoint.ZERO); + if (invZ == null) + invZ = is0 ? _8n : invert(z); + const iz1 = invZ; + const iz2 = mod(iz1 * iz1); + const iz3 = mod(iz2 * iz1); + const ax = mod(x * iz2); + const ay = mod(y * iz3); + const zz = mod(z * iz1); + if (is0) + return Point.ZERO; + if (zz !== _1n) + throw new Error('invZ was invalid'); + return new Point(ax, ay); } } JacobianPoint.BASE = new JacobianPoint(CURVE.Gx, CURVE.Gy, _1n); JacobianPoint.ZERO = new JacobianPoint(_0n, _1n, _0n); +function constTimeNegate(condition, item) { + const neg = item.negate(); + return condition ? neg : item; +} const pointPrecomputes = new WeakMap(); class Point { constructor(x, y) { @@ -53376,10 +62892,15 @@ class Point { this._WINDOW_SIZE = windowSize; pointPrecomputes.delete(this); } + hasEvenY() { + return this.y % _2n === _0n; + } static fromCompressedHex(bytes) { const isShort = bytes.length === 32; - const x = bytesToNumber(isShort ? bytes : bytes.slice(1)); - const y2 = weistrass(x); + const x = bytesToNumber(isShort ? bytes : bytes.subarray(1)); + if (!isValidFieldElement(x)) + throw new Error('Point is not on curve'); + const y2 = weierstrass(x); let y = sqrtMod(y2); const isYOdd = (y & _1n) === _1n; if (isShort) { @@ -53396,52 +62917,57 @@ class Point { return point; } static fromUncompressedHex(bytes) { - const x = bytesToNumber(bytes.slice(1, 33)); - const y = bytesToNumber(bytes.slice(33)); + const x = bytesToNumber(bytes.subarray(1, fieldLen + 1)); + const y = bytesToNumber(bytes.subarray(fieldLen + 1, fieldLen * 2 + 1)); const point = new Point(x, y); point.assertValidity(); return point; } static fromHex(hex) { const bytes = ensureBytes(hex); + const len = bytes.length; const header = bytes[0]; - if (bytes.length === 32 || (bytes.length === 33 && (header === 0x02 || header === 0x03))) { + if (len === fieldLen) + return this.fromCompressedHex(bytes); + if (len === compressedLen && (header === 0x02 || header === 0x03)) { return this.fromCompressedHex(bytes); } - if (bytes.length === 65 && header === 0x04) + if (len === uncompressedLen && header === 0x04) return this.fromUncompressedHex(bytes); - throw new Error(`Point.fromHex: received invalid point. Expected 32-33 compressed bytes or 65 uncompressed bytes, not ${bytes.length}`); + throw new Error(`Point.fromHex: received invalid point. Expected 32-${compressedLen} compressed bytes or ${uncompressedLen} uncompressed bytes, not ${len}`); } static fromPrivateKey(privateKey) { return Point.BASE.multiply(normalizePrivateKey(privateKey)); } static fromSignature(msgHash, signature, recovery) { - let h = msgHash instanceof Uint8Array ? bytesToNumber(msgHash) : hexToNumber(msgHash); - const sig = normalizeSignature(signature); - const { r, s } = sig; - if (recovery !== 0 && recovery !== 1) { - throw new Error('Cannot recover signature: invalid recovery bit'); - } - const prefix = 2 + (recovery & 1); - const P_ = Point.fromHex(`0${prefix}${pad64(r)}`); - const sP = JacobianPoint.fromAffine(P_).multiplyUnsafe(s); - const hG = JacobianPoint.BASE.multiply(h); - const rinv = invert(r, CURVE.n); - const Q = sP.subtract(hG).multiplyUnsafe(rinv); - const point = Q.toAffine(); - point.assertValidity(); - return point; + const { r, s } = normalizeSignature(signature); + if (![0, 1, 2, 3].includes(recovery)) + throw new Error('Cannot recover: invalid recovery bit'); + const h = truncateHash(ensureBytes(msgHash)); + const { n } = CURVE; + const radj = recovery === 2 || recovery === 3 ? r + n : r; + const rinv = invert(radj, n); + const u1 = mod(-h * rinv, n); + const u2 = mod(s * rinv, n); + const prefix = recovery & 1 ? '03' : '02'; + const R = Point.fromHex(prefix + numTo32bStr(radj)); + const Q = Point.BASE.multiplyAndAddUnsafe(R, u1, u2); + if (!Q) + throw new Error('Cannot recover signature: point at infinify'); + Q.assertValidity(); + return Q; } toRawBytes(isCompressed = false) { return hexToBytes(this.toHex(isCompressed)); } toHex(isCompressed = false) { - const x = pad64(this.x); + const x = numTo32bStr(this.x); if (isCompressed) { - return `${this.y & _1n ? '03' : '02'}${x}`; + const prefix = this.hasEvenY() ? '02' : '03'; + return `${prefix}${x}`; } else { - return `04${x}${pad64(this.y)}`; + return `04${x}${numTo32bStr(this.y)}`; } } toHexX() { @@ -53452,13 +62978,12 @@ class Point { } assertValidity() { const msg = 'Point is not on elliptic curve'; - const { P } = CURVE; const { x, y } = this; - if (x === _0n || y === _0n || x >= P || y >= P) + if (!isValidFieldElement(x) || !isValidFieldElement(y)) throw new Error(msg); const left = mod(y * y); - const right = weistrass(x); - if ((left - right) % P !== _0n) + const right = weierstrass(x); + if (mod(left - right) !== _0n) throw new Error(msg); } equals(other) { @@ -53479,6 +63004,13 @@ class Point { multiply(scalar) { return JacobianPoint.fromAffine(this).multiply(scalar, this).toAffine(); } + multiplyAndAddUnsafe(Q, a, b) { + const P = JacobianPoint.fromAffine(this); + const aP = a === _0n || a === _1n || this !== Point.BASE ? P.multiplyUnsafe(a) : P.multiply(a); + const bQ = JacobianPoint.fromAffine(Q).multiplyUnsafe(b); + const sum = aP.add(bQ); + return sum.equals(JacobianPoint.ZERO) ? undefined : sum.toAffine(); + } } exports.Point = Point; Point.BASE = new Point(CURVE.Gx, CURVE.Gy); @@ -53552,19 +63084,19 @@ class Signature { return this.s > HALF; } normalizeS() { - return this.hasHighS() ? new Signature(this.r, CURVE.n - this.s) : this; - } - toDERRawBytes(isCompressed = false) { - return hexToBytes(this.toDERHex(isCompressed)); - } - toDERHex(isCompressed = false) { - const sHex = sliceDER(numberToHex(this.s)); - if (isCompressed) - return sHex; - const rHex = sliceDER(numberToHex(this.r)); - const rLen = numberToHex(rHex.length / 2); - const sLen = numberToHex(sHex.length / 2); - const length = numberToHex(rHex.length / 2 + sHex.length / 2 + 4); + return this.hasHighS() ? new Signature(this.r, mod(-this.s, CURVE.n)) : this; + } + toDERRawBytes() { + return hexToBytes(this.toDERHex()); + } + toDERHex() { + const sHex = sliceDER(numberToHexUnpadded(this.s)); + const rHex = sliceDER(numberToHexUnpadded(this.r)); + const sHexL = sHex.length / 2; + const rHexL = rHex.length / 2; + const sLen = numberToHexUnpadded(sHexL); + const rLen = numberToHexUnpadded(rHexL); + const length = numberToHexUnpadded(rHexL + sHexL + 4); return `30${length}02${rLen}${rHex}02${sLen}${sHex}`; } toRawBytes() { @@ -53577,11 +63109,13 @@ class Signature { return hexToBytes(this.toCompactHex()); } toCompactHex() { - return pad64(this.r) + pad64(this.s); + return numTo32bStr(this.r) + numTo32bStr(this.s); } } exports.Signature = Signature; function concatBytes(...arrays) { + if (!arrays.every((b) => b instanceof Uint8Array)) + throw new Error('Uint8Array list expected'); if (arrays.length === 1) return arrays[0]; const length = arrays.reduce((a, arr) => a + arr.length, 0); @@ -53595,21 +63129,29 @@ function concatBytes(...arrays) { } const hexes = Array.from({ length: 256 }, (v, i) => i.toString(16).padStart(2, '0')); function bytesToHex(uint8a) { + if (!(uint8a instanceof Uint8Array)) + throw new Error('Expected Uint8Array'); let hex = ''; for (let i = 0; i < uint8a.length; i++) { hex += hexes[uint8a[i]]; } return hex; } -function pad64(num) { - if (num > POW_2_256) - throw new Error('pad64: invalid number'); +const POW_2_256 = BigInt('0x10000000000000000000000000000000000000000000000000000000000000000'); +function numTo32bStr(num) { + if (typeof num !== 'bigint') + throw new Error('Expected bigint'); + if (!(_0n <= num && num < POW_2_256)) + throw new Error('Expected number 0 <= n < 2^256'); return num.toString(16).padStart(64, '0'); } -function pad32b(num) { - return hexToBytes(pad64(num)); +function numTo32b(num) { + const b = hexToBytes(numTo32bStr(num)); + if (b.length !== 32) + throw new Error('Error: expected 32 bytes'); + return b; } -function numberToHex(num) { +function numberToHexUnpadded(num) { const hex = num.toString(16); return hex.length & 1 ? `0${hex}` : hex; } @@ -53619,35 +63161,31 @@ function hexToNumber(hex) { } return BigInt(`0x${hex}`); } -function parseHexByte(hexByte) { - if (hexByte.length !== 2) - throw new Error('Invalid byte sequence'); - const byte = Number.parseInt(hexByte, 16); - if (Number.isNaN(byte)) - throw new Error('Invalid byte sequence'); - return byte; -} function hexToBytes(hex) { if (typeof hex !== 'string') { throw new TypeError('hexToBytes: expected string, got ' + typeof hex); } if (hex.length % 2) - throw new Error('hexToBytes: received invalid unpadded hex'); + throw new Error('hexToBytes: received invalid unpadded hex' + hex.length); const array = new Uint8Array(hex.length / 2); for (let i = 0; i < array.length; i++) { const j = i * 2; - array[i] = parseHexByte(hex.slice(j, j + 2)); + const hexByte = hex.slice(j, j + 2); + const byte = Number.parseInt(hexByte, 16); + if (Number.isNaN(byte) || byte < 0) + throw new Error('Invalid byte sequence'); + array[i] = byte; } return array; } -function ensureBytes(hex) { - return hex instanceof Uint8Array ? hex : hexToBytes(hex); -} function bytesToNumber(bytes) { return hexToNumber(bytesToHex(bytes)); } +function ensureBytes(hex) { + return hex instanceof Uint8Array ? Uint8Array.from(hex) : hexToBytes(hex); +} function normalizeScalar(num) { - if (typeof num === 'number' && num > 0 && Number.isSafeInteger(num)) + if (typeof num === 'number' && Number.isSafeInteger(num) && num > 0) return BigInt(num); if (typeof num === 'bigint' && isWithinCurveOrder(num)) return num; @@ -53655,7 +63193,7 @@ function normalizeScalar(num) { } function mod(a, b = CURVE.P) { const result = a % b; - return result >= 0 ? result : b + result; + return result >= _0n ? result : b + result; } function pow2(x, power) { const { P } = CURVE; @@ -53687,7 +63225,11 @@ function sqrtMod(x) { const b223 = (pow2(b220, _3n) * b3) % P; const t1 = (pow2(b223, _23n) * b22) % P; const t2 = (pow2(t1, _6n) * b2) % P; - return pow2(t2, _2n); + const rt = pow2(t2, _2n); + const xc = (rt * rt) % P; + if (xc !== x) + throw new Error('Cannot find square root'); + return rt; } function invert(number, modulo = CURVE.P) { if (number === _0n || modulo <= _0n) { @@ -53708,136 +63250,133 @@ function invert(number, modulo = CURVE.P) { throw new Error('invert: does not exist'); return mod(x, modulo); } -function invertBatch(nums, n = CURVE.P) { - const len = nums.length; - const scratch = new Array(len); - let acc = _1n; - for (let i = 0; i < len; i++) { - if (nums[i] === _0n) - continue; +function invertBatch(nums, p = CURVE.P) { + const scratch = new Array(nums.length); + const lastMultiplied = nums.reduce((acc, num, i) => { + if (num === _0n) + return acc; scratch[i] = acc; - acc = mod(acc * nums[i], n); - } - acc = invert(acc, n); - for (let i = len - 1; i >= 0; i--) { - if (nums[i] === _0n) - continue; - const tmp = mod(acc * nums[i], n); - nums[i] = mod(acc * scratch[i], n); - acc = tmp; - } - return nums; + return mod(acc * num, p); + }, _1n); + const inverted = invert(lastMultiplied, p); + nums.reduceRight((acc, num, i) => { + if (num === _0n) + return acc; + scratch[i] = mod(acc * scratch[i], p); + return mod(acc * num, p); + }, inverted); + return scratch; } -const divNearest = (a, b) => (a + b / _2n) / b; -const POW_2_128 = _2n ** BigInt(128); -function splitScalarEndo(k) { +function bits2int_2(bytes) { + const delta = bytes.length * 8 - groupLen * 8; + const num = bytesToNumber(bytes); + return delta > 0 ? num >> BigInt(delta) : num; +} +function truncateHash(hash, truncateOnly = false) { + const h = bits2int_2(hash); + if (truncateOnly) + return h; const { n } = CURVE; - const a1 = BigInt('0x3086d221a7d46bcde86c90e49284eb15'); - const b1 = -_1n * BigInt('0xe4437ed6010e88286f547fa90abfe4c3'); - const a2 = BigInt('0x114ca50f7a8e2f3f657c1108d9d44cfd8'); - const b2 = a1; - const c1 = divNearest(b2 * k, n); - const c2 = divNearest(-b1 * k, n); - let k1 = mod(k - c1 * a1 - c2 * a2, n); - let k2 = mod(-c1 * b1 - c2 * b2, n); - const k1neg = k1 > POW_2_128; - const k2neg = k2 > POW_2_128; - if (k1neg) - k1 = n - k1; - if (k2neg) - k2 = n - k2; - if (k1 > POW_2_128 || k2 > POW_2_128) - throw new Error('splitScalarEndo: Endomorphism failed'); - return { k1neg, k1, k2neg, k2 }; -} -function truncateHash(hash) { - if (typeof hash !== 'string') - hash = bytesToHex(hash); - let msg = hexToNumber(hash || '0'); - const byteLength = hash.length / 2; - const delta = byteLength * 8 - 256; - if (delta > 0) { - msg = msg >> BigInt(delta); - } - if (msg >= CURVE.n) { - msg -= CURVE.n; - } - return msg; -} -function _abc6979(msgHash, privateKey, extraEntropy) { - if (msgHash == null) - throw new Error(`sign: expected valid msgHash, not "${msgHash}"`); - const num = typeof msgHash === 'string' ? hexToNumber(msgHash) : bytesToNumber(msgHash); - const h1 = pad32b(num); - const h1n = bytesToNumber(h1); - const x = pad32b(privateKey); - let v = new Uint8Array(32).fill(1); - let k = new Uint8Array(32).fill(0); - const b0 = Uint8Array.from([0x00]); - const b1 = Uint8Array.from([0x01]); - let xh1 = concatBytes(x, h1); - if (extraEntropy != null) { - const e = pad32b(typeof extraEntropy === 'string' ? hexToNumber(extraEntropy) : bytesToNumber(extraEntropy)); - if (e.length !== 32) - throw new Error('secp256k1: Expected 32 bytes of extra data'); - xh1 = concatBytes(xh1, e); - } - return { xh1, h1n, v, k, b0, b1 }; -} -async function getQRSrfc6979(msgHash, privateKey, extraEntropy) { - const privKey = normalizePrivateKey(privateKey); - let { xh1, h1n, v, k, b0, b1 } = _abc6979(msgHash, privKey, extraEntropy); - const hmac = exports.utils.hmacSha256; - k = await hmac(k, v, b0, xh1); - v = await hmac(k, v); - k = await hmac(k, v, b1, xh1); - v = await hmac(k, v); - for (let i = 0; i < 1000; i++) { - v = await hmac(k, v); - const qrs = calcQRSFromK(v, h1n, privKey); - if (qrs) - return qrs; - k = await hmac(k, v, b0); - v = await hmac(k, v); - } - throw new TypeError('secp256k1: Tried 1,000 k values for sign(), all were invalid'); -} -function getQRSrfc6979Sync(msgHash, privateKey, extraEntropy) { - const privKey = normalizePrivateKey(privateKey); - let { xh1, h1n, v, k, b0, b1 } = _abc6979(msgHash, privKey, extraEntropy); - const hmac = exports.utils.hmacSha256Sync; - if (!hmac) - throw new Error('utils.hmacSha256Sync is undefined, you need to set it'); - k = hmac(k, v, b0, xh1); - if (k instanceof Promise) - throw new Error('To use sync sign(), ensure utils.hmacSha256 is sync'); - v = hmac(k, v); - k = hmac(k, v, b1, xh1); - v = hmac(k, v); - for (let i = 0; i < 1000; i++) { - v = hmac(k, v); - const qrs = calcQRSFromK(v, h1n, privKey); - if (qrs) - return qrs; - k = hmac(k, v, b0); - v = hmac(k, v); - } - throw new TypeError('secp256k1: Tried 1,000 k values for sign(), all were invalid'); + return h >= n ? h - n : h; +} +let _sha256Sync; +let _hmacSha256Sync; +class HmacDrbg { + constructor(hashLen, qByteLen) { + this.hashLen = hashLen; + this.qByteLen = qByteLen; + if (typeof hashLen !== 'number' || hashLen < 2) + throw new Error('hashLen must be a number'); + if (typeof qByteLen !== 'number' || qByteLen < 2) + throw new Error('qByteLen must be a number'); + this.v = new Uint8Array(hashLen).fill(1); + this.k = new Uint8Array(hashLen).fill(0); + this.counter = 0; + } + hmac(...values) { + return exports.utils.hmacSha256(this.k, ...values); + } + hmacSync(...values) { + return _hmacSha256Sync(this.k, ...values); + } + checkSync() { + if (typeof _hmacSha256Sync !== 'function') + throw new ShaError('hmacSha256Sync needs to be set'); + } + incr() { + if (this.counter >= 1000) + throw new Error('Tried 1,000 k values for sign(), all were invalid'); + this.counter += 1; + } + async reseed(seed = new Uint8Array()) { + this.k = await this.hmac(this.v, Uint8Array.from([0x00]), seed); + this.v = await this.hmac(this.v); + if (seed.length === 0) + return; + this.k = await this.hmac(this.v, Uint8Array.from([0x01]), seed); + this.v = await this.hmac(this.v); + } + reseedSync(seed = new Uint8Array()) { + this.checkSync(); + this.k = this.hmacSync(this.v, Uint8Array.from([0x00]), seed); + this.v = this.hmacSync(this.v); + if (seed.length === 0) + return; + this.k = this.hmacSync(this.v, Uint8Array.from([0x01]), seed); + this.v = this.hmacSync(this.v); + } + async generate() { + this.incr(); + let len = 0; + const out = []; + while (len < this.qByteLen) { + this.v = await this.hmac(this.v); + const sl = this.v.slice(); + out.push(sl); + len += this.v.length; + } + return concatBytes(...out); + } + generateSync() { + this.checkSync(); + this.incr(); + let len = 0; + const out = []; + while (len < this.qByteLen) { + this.v = this.hmacSync(this.v); + const sl = this.v.slice(); + out.push(sl); + len += this.v.length; + } + return concatBytes(...out); + } } function isWithinCurveOrder(num) { - return 0 < num && num < CURVE.n; + return _0n < num && num < CURVE.n; +} +function isValidFieldElement(num) { + return _0n < num && num < CURVE.P; } -function calcQRSFromK(v, msg, priv) { - const k = bytesToNumber(v); +function kmdToSig(kBytes, m, d, lowS = true) { + const { n } = CURVE; + const k = truncateHash(kBytes, true); if (!isWithinCurveOrder(k)) return; - const max = CURVE.n; + const kinv = invert(k, n); const q = Point.BASE.multiply(k); - const r = mod(q.x, max); - const s = mod(invert(k, max) * (msg + r * priv), max); - if (r === _0n || s === _0n) + const r = mod(q.x, n); + if (r === _0n) + return; + const s = mod(kinv * mod(m + d * r, n), n); + if (s === _0n) return; - return { q, r, s }; + let sig = new Signature(r, s); + let recovery = (q.x === sig.r ? 0 : 2) | Number(q.y & _1n); + if (lowS && sig.hasHighS()) { + sig = sig.normalizeS(); + recovery ^= 1; + } + return { sig, recovery }; } function normalizePrivateKey(key) { let num; @@ -53848,12 +63387,12 @@ function normalizePrivateKey(key) { num = BigInt(key); } else if (typeof key === 'string') { - if (key.length !== 64) + if (key.length !== 2 * groupLen) throw new Error('Expected 32 bytes of private key'); num = hexToNumber(key); } else if (key instanceof Uint8Array) { - if (key.length !== 32) + if (key.length !== groupLen) throw new Error('Expected 32 bytes of private key'); num = bytesToNumber(key); } @@ -53889,51 +63428,86 @@ function getPublicKey(privateKey, isCompressed = false) { return Point.fromPrivateKey(privateKey).toRawBytes(isCompressed); } exports.getPublicKey = getPublicKey; -function recoverPublicKey(msgHash, signature, recovery) { - return Point.fromSignature(msgHash, signature, recovery).toRawBytes(); +function recoverPublicKey(msgHash, signature, recovery, isCompressed = false) { + return Point.fromSignature(msgHash, signature, recovery).toRawBytes(isCompressed); } exports.recoverPublicKey = recoverPublicKey; -function isPub(item) { +function isProbPub(item) { const arr = item instanceof Uint8Array; const str = typeof item === 'string'; const len = (arr || str) && item.length; if (arr) - return len === 33 || len === 65; + return len === compressedLen || len === uncompressedLen; if (str) - return len === 66 || len === 130; + return len === compressedLen * 2 || len === uncompressedLen * 2; if (item instanceof Point) return true; return false; } function getSharedSecret(privateA, publicB, isCompressed = false) { - if (isPub(privateA)) + if (isProbPub(privateA)) throw new TypeError('getSharedSecret: first arg must be private key'); - if (!isPub(publicB)) + if (!isProbPub(publicB)) throw new TypeError('getSharedSecret: second arg must be public key'); const b = normalizePublicKey(publicB); b.assertValidity(); return b.multiply(normalizePrivateKey(privateA)).toRawBytes(isCompressed); } exports.getSharedSecret = getSharedSecret; -function QRSToSig(qrs, opts) { - const { q, r, s } = qrs; - const defaultOpts = { canonical: true, der: true }; - let { canonical, der, recovered } = Object.assign(defaultOpts, opts); - let recovery = (q.x === r ? 0 : 2) | Number(q.y & _1n); - let sig = new Signature(r, s); - if (canonical && sig.hasHighS()) { - sig = sig.normalizeS(); - recovery ^= 1; - } +function bits2int(bytes) { + const slice = bytes.length > fieldLen ? bytes.slice(0, fieldLen) : bytes; + return bytesToNumber(slice); +} +function bits2octets(bytes) { + const z1 = bits2int(bytes); + const z2 = mod(z1, CURVE.n); + return int2octets(z2 < _0n ? z1 : z2); +} +function int2octets(num) { + return numTo32b(num); +} +function initSigArgs(msgHash, privateKey, extraEntropy) { + if (msgHash == null) + throw new Error(`sign: expected valid message hash, not "${msgHash}"`); + const h1 = ensureBytes(msgHash); + const d = normalizePrivateKey(privateKey); + const seedArgs = [int2octets(d), bits2octets(h1)]; + if (extraEntropy != null) { + if (extraEntropy === true) + extraEntropy = exports.utils.randomBytes(fieldLen); + const e = ensureBytes(extraEntropy); + if (e.length !== fieldLen) + throw new Error(`sign: Expected ${fieldLen} bytes of extra data`); + seedArgs.push(e); + } + const seed = concatBytes(...seedArgs); + const m = bits2int(h1); + return { seed, m, d }; +} +function finalizeSig(recSig, opts) { + const { sig, recovery } = recSig; + const { der, recovered } = Object.assign({ canonical: true, der: true }, opts); const hashed = der ? sig.toDERRawBytes() : sig.toCompactRawBytes(); return recovered ? [hashed, recovery] : hashed; } async function sign(msgHash, privKey, opts = {}) { - return QRSToSig(await getQRSrfc6979(msgHash, privKey, opts.extraEntropy), opts); + const { seed, m, d } = initSigArgs(msgHash, privKey, opts.extraEntropy); + const drbg = new HmacDrbg(hashLen, groupLen); + await drbg.reseed(seed); + let sig; + while (!(sig = kmdToSig(await drbg.generate(), m, d, opts.canonical))) + await drbg.reseed(); + return finalizeSig(sig, opts); } exports.sign = sign; function signSync(msgHash, privKey, opts = {}) { - return QRSToSig(getQRSrfc6979Sync(msgHash, privKey, opts.extraEntropy), opts); + const { seed, m, d } = initSigArgs(msgHash, privKey, opts.extraEntropy); + const drbg = new HmacDrbg(hashLen, groupLen); + drbg.reseedSync(seed); + let sig; + while (!(sig = kmdToSig(drbg.generateSync(), m, d, opts.canonical))) + drbg.reseedSync(); + return finalizeSig(sig, opts); } exports.signSync = signSync; const vopts = { strict: true }; @@ -53941,6 +63515,7 @@ function verify(signature, msgHash, publicKey, opts = vopts) { let sig; try { sig = normalizeSignature(signature); + msgHash = ensureBytes(msgHash); } catch (error) { return false; @@ -53949,58 +63524,48 @@ function verify(signature, msgHash, publicKey, opts = vopts) { if (opts.strict && sig.hasHighS()) return false; const h = truncateHash(msgHash); - if (h === _0n) - return false; - let pubKey; + let P; try { - pubKey = JacobianPoint.fromAffine(normalizePublicKey(publicKey)); + P = normalizePublicKey(publicKey); } catch (error) { return false; } const { n } = CURVE; - const s1 = invert(s, n); - const u1 = mod(h * s1, n); - const u2 = mod(r * s1, n); - const Ghs1 = JacobianPoint.BASE.multiply(u1); - const Prs1 = pubKey.multiplyUnsafe(u2); - const R = Ghs1.add(Prs1).toAffine(); + const sinv = invert(s, n); + const u1 = mod(h * sinv, n); + const u2 = mod(r * sinv, n); + const R = Point.BASE.multiplyAndAddUnsafe(P, u1, u2); + if (!R) + return false; const v = mod(R.x, n); return v === r; } exports.verify = verify; -async function taggedHash(tag, ...messages) { - const tagB = new Uint8Array(tag.split('').map((c) => c.charCodeAt(0))); - const tagH = await exports.utils.sha256(tagB); - const h = await exports.utils.sha256(concatBytes(tagH, tagH, ...messages)); - return bytesToNumber(h); -} -async function createChallenge(x, P, message) { - const rx = pad32b(x); - const t = await taggedHash('BIP0340/challenge', rx, P.toRawX(), message); - return mod(t, CURVE.n); -} -function hasEvenY(point) { - return mod(point.y, _2n) === _0n; +function schnorrChallengeFinalize(ch) { + return mod(bytesToNumber(ch), CURVE.n); } class SchnorrSignature { constructor(r, s) { this.r = r; this.s = s; - if (r <= _0n || s <= _0n || r >= CURVE.P || s >= CURVE.n) - throw new Error('Invalid signature'); + this.assertValidity(); } static fromHex(hex) { const bytes = ensureBytes(hex); - if (bytes.length !== 64) { + if (bytes.length !== 64) throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${bytes.length}`); - } - const r = bytesToNumber(bytes.slice(0, 32)); - const s = bytesToNumber(bytes.slice(32)); + const r = bytesToNumber(bytes.subarray(0, 32)); + const s = bytesToNumber(bytes.subarray(32, 64)); return new SchnorrSignature(r, s); } + assertValidity() { + const { r, s } = this; + if (!isValidFieldElement(r) || !isWithinCurveOrder(s)) + throw new Error('Invalid signature'); + } toHex() { - return pad64(this.r) + pad64(this.s); + return numTo32bStr(this.r) + numTo32bStr(this.s); } toRawBytes() { return hexToBytes(this.toHex()); @@ -54009,58 +63574,132 @@ class SchnorrSignature { function schnorrGetPublicKey(privateKey) { return Point.fromPrivateKey(privateKey).toRawX(); } -async function schnorrSign(msgHash, privateKey, auxRand = exports.utils.randomBytes()) { - if (msgHash == null) - throw new TypeError(`sign: Expected valid message, not "${msgHash}"`); - if (!privateKey) - privateKey = _0n; - const { n } = CURVE; - const m = ensureBytes(msgHash); - const d0 = normalizePrivateKey(privateKey); - const rand = ensureBytes(auxRand); - if (rand.length !== 32) - throw new TypeError('sign: Expected 32 bytes of aux randomness'); - const P = Point.fromPrivateKey(d0); - const d = hasEvenY(P) ? d0 : n - d0; - const t0h = await taggedHash('BIP0340/aux', rand); - const t = d ^ t0h; - const k0h = await taggedHash('BIP0340/nonce', pad32b(t), P.toRawX(), m); - const k0 = mod(k0h, n); - if (k0 === _0n) - throw new Error('sign: Creation of signature failed. k is zero'); - const R = Point.fromPrivateKey(k0); - const k = hasEvenY(R) ? k0 : n - k0; - const e = await createChallenge(R.x, P, m); - const sig = new SchnorrSignature(R.x, mod(k + e * d, n)); - const isValid = await schnorrVerify(sig.toRawBytes(), m, P.toRawX()); - if (!isValid) +class InternalSchnorrSignature { + constructor(message, privateKey, auxRand = exports.utils.randomBytes()) { + if (message == null) + throw new TypeError(`sign: Expected valid message, not "${message}"`); + this.m = ensureBytes(message); + const { x, scalar } = this.getScalar(normalizePrivateKey(privateKey)); + this.px = x; + this.d = scalar; + this.rand = ensureBytes(auxRand); + if (this.rand.length !== 32) + throw new TypeError('sign: Expected 32 bytes of aux randomness'); + } + getScalar(priv) { + const point = Point.fromPrivateKey(priv); + const scalar = point.hasEvenY() ? priv : CURVE.n - priv; + return { point, scalar, x: point.toRawX() }; + } + initNonce(d, t0h) { + return numTo32b(d ^ bytesToNumber(t0h)); + } + finalizeNonce(k0h) { + const k0 = mod(bytesToNumber(k0h), CURVE.n); + if (k0 === _0n) + throw new Error('sign: Creation of signature failed. k is zero'); + const { point: R, x: rx, scalar: k } = this.getScalar(k0); + return { R, rx, k }; + } + finalizeSig(R, k, e, d) { + return new SchnorrSignature(R.x, mod(k + e * d, CURVE.n)).toRawBytes(); + } + error() { throw new Error('sign: Invalid signature produced'); - return sig.toRawBytes(); -} -async function schnorrVerify(signature, msgHash, publicKey) { - const sig = signature instanceof SchnorrSignature ? signature : SchnorrSignature.fromHex(signature); - const m = typeof msgHash === 'string' ? hexToBytes(msgHash) : msgHash; - const P = normalizePublicKey(publicKey); - const e = await createChallenge(sig.r, P, m); - const sG = Point.fromPrivateKey(sig.s); - const eP = P.multiply(e); - const R = sG.subtract(eP); - if (R.equals(Point.BASE) || !hasEvenY(R) || R.x !== sig.r) + } + async calc() { + const { m, d, px, rand } = this; + const tag = exports.utils.taggedHash; + const t = this.initNonce(d, await tag(TAGS.aux, rand)); + const { R, rx, k } = this.finalizeNonce(await tag(TAGS.nonce, t, px, m)); + const e = schnorrChallengeFinalize(await tag(TAGS.challenge, rx, px, m)); + const sig = this.finalizeSig(R, k, e, d); + if (!(await schnorrVerify(sig, m, px))) + this.error(); + return sig; + } + calcSync() { + const { m, d, px, rand } = this; + const tag = exports.utils.taggedHashSync; + const t = this.initNonce(d, tag(TAGS.aux, rand)); + const { R, rx, k } = this.finalizeNonce(tag(TAGS.nonce, t, px, m)); + const e = schnorrChallengeFinalize(tag(TAGS.challenge, rx, px, m)); + const sig = this.finalizeSig(R, k, e, d); + if (!schnorrVerifySync(sig, m, px)) + this.error(); + return sig; + } +} +async function schnorrSign(msg, privKey, auxRand) { + return new InternalSchnorrSignature(msg, privKey, auxRand).calc(); +} +function schnorrSignSync(msg, privKey, auxRand) { + return new InternalSchnorrSignature(msg, privKey, auxRand).calcSync(); +} +function initSchnorrVerify(signature, message, publicKey) { + const raw = signature instanceof SchnorrSignature; + const sig = raw ? signature : SchnorrSignature.fromHex(signature); + if (raw) + sig.assertValidity(); + return { + ...sig, + m: ensureBytes(message), + P: normalizePublicKey(publicKey), + }; +} +function finalizeSchnorrVerify(r, P, s, e) { + const R = Point.BASE.multiplyAndAddUnsafe(P, normalizePrivateKey(s), mod(-e, CURVE.n)); + if (!R || !R.hasEvenY() || R.x !== r) return false; return true; } +async function schnorrVerify(signature, message, publicKey) { + try { + const { r, s, m, P } = initSchnorrVerify(signature, message, publicKey); + const e = schnorrChallengeFinalize(await exports.utils.taggedHash(TAGS.challenge, numTo32b(r), P.toRawX(), m)); + return finalizeSchnorrVerify(r, P, s, e); + } + catch (error) { + return false; + } +} +function schnorrVerifySync(signature, message, publicKey) { + try { + const { r, s, m, P } = initSchnorrVerify(signature, message, publicKey); + const e = schnorrChallengeFinalize(exports.utils.taggedHashSync(TAGS.challenge, numTo32b(r), P.toRawX(), m)); + return finalizeSchnorrVerify(r, P, s, e); + } + catch (error) { + if (error instanceof ShaError) + throw error; + return false; + } +} exports.schnorr = { Signature: SchnorrSignature, getPublicKey: schnorrGetPublicKey, sign: schnorrSign, verify: schnorrVerify, + signSync: schnorrSignSync, + verifySync: schnorrVerifySync, }; Point.BASE._setWindowSize(8); const crypto = { - node: crypto_1.default, + node: nodeCrypto, web: typeof self === 'object' && 'crypto' in self ? self.crypto : undefined, }; +const TAGS = { + challenge: 'BIP0340/challenge', + aux: 'BIP0340/aux', + nonce: 'BIP0340/nonce', +}; +const TAGGED_HASH_PREFIXES = {}; exports.utils = { + bytesToHex, + hexToBytes, + concatBytes, + mod, + invert, isValidPrivateKey(privateKey) { try { normalizePrivateKey(privateKey); @@ -54070,37 +63709,46 @@ exports.utils = { return false; } }, + _bigintTo32Bytes: numTo32b, + _normalizePrivateKey: normalizePrivateKey, + hashToPrivateKey: (hash) => { + hash = ensureBytes(hash); + const minLen = groupLen + 8; + if (hash.length < minLen || hash.length > 1024) { + throw new Error(`Expected valid bytes of private key as per FIPS 186`); + } + const num = mod(bytesToNumber(hash), CURVE.n - _1n) + _1n; + return numTo32b(num); + }, randomBytes: (bytesLength = 32) => { if (crypto.web) { return crypto.web.getRandomValues(new Uint8Array(bytesLength)); } else if (crypto.node) { const { randomBytes } = crypto.node; - return new Uint8Array(randomBytes(bytesLength).buffer); + return Uint8Array.from(randomBytes(bytesLength)); } else { throw new Error("The environment doesn't have randomBytes function"); } }, - randomPrivateKey: () => { - let i = 8; - while (i--) { - const b32 = exports.utils.randomBytes(32); - const num = bytesToNumber(b32); - if (isWithinCurveOrder(num) && num !== _1n) - return b32; - } - throw new Error('Valid private key was not found in 8 iterations. PRNG is broken'); + randomPrivateKey: () => exports.utils.hashToPrivateKey(exports.utils.randomBytes(groupLen + 8)), + precompute(windowSize = 8, point = Point.BASE) { + const cached = point === Point.BASE ? point : new Point(point.x, point.y); + cached._setWindowSize(windowSize); + cached.multiply(_3n); + return cached; }, - bytesToHex, - sha256: async (message) => { + sha256: async (...messages) => { if (crypto.web) { - const buffer = await crypto.web.subtle.digest('SHA-256', message.buffer); + const buffer = await crypto.web.subtle.digest('SHA-256', concatBytes(...messages)); return new Uint8Array(buffer); } else if (crypto.node) { const { createHash } = crypto.node; - return Uint8Array.from(createHash('sha256').update(message).digest()); + const hash = createHash('sha256'); + messages.forEach((m) => hash.update(m)); + return Uint8Array.from(hash.digest()); } else { throw new Error("The environment doesn't have sha256 function"); @@ -54116,9 +63764,7 @@ exports.utils = { else if (crypto.node) { const { createHmac } = crypto.node; const hash = createHmac('sha256', key); - for (const message of messages) { - hash.update(message); - } + messages.forEach((m) => hash.update(m)); return Uint8Array.from(hash.digest()); } else { @@ -54127,6 +63773,14 @@ exports.utils = { }, sha256Sync: undefined, hmacSha256Sync: undefined, +<<<<<<< HEAD + taggedHash: async (tag, ...messages) => { + let tagP = TAGGED_HASH_PREFIXES[tag]; + if (tagP === undefined) { + const tagH = await exports.utils.sha256(Uint8Array.from(tag, (c) => c.charCodeAt(0))); + tagP = concatBytes(tagH, tagH); + TAGGED_HASH_PREFIXES[tag] = tagP; +======= precompute(windowSize = 8, point = Point.BASE) { const cached = point === Point.BASE ? point : new Point(point.x, point.y); cached._setWindowSize(windowSize); @@ -54343,50 +63997,90 @@ class Octokit { if (typeof defaults === "function") { super(defaults(options)); return; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } - - super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? { - userAgent: `${options.userAgent} ${defaults.userAgent}` - } : null)); - } - - }; - return OctokitWithDefaults; - } - /** - * Attach a plugin (or many) to your Octokit instance. - * - * @example - * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...) - */ - - - static plugin(...newPlugins) { - var _a; - - const currentPlugins = this.plugins; - const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a); - return NewOctokit; - } - -} -Octokit.VERSION = VERSION; -Octokit.plugins = []; - -exports.Octokit = Octokit; -//# sourceMappingURL=index.js.map + return exports.utils.sha256(tagP, ...messages); + }, + taggedHashSync: (tag, ...messages) => { + if (typeof _sha256Sync !== 'function') + throw new ShaError('sha256Sync is undefined, you need to set it'); + let tagP = TAGGED_HASH_PREFIXES[tag]; + if (tagP === undefined) { + const tagH = _sha256Sync(Uint8Array.from(tag, (c) => c.charCodeAt(0))); + tagP = concatBytes(tagH, tagH); + TAGGED_HASH_PREFIXES[tag] = tagP; + } + return _sha256Sync(tagP, ...messages); + }, + _JacobianPoint: JacobianPoint, +}; +Object.defineProperties(exports.utils, { + sha256Sync: { + configurable: false, + get() { + return _sha256Sync; + }, + set(val) { + if (!_sha256Sync) + _sha256Sync = val; + }, + }, + hmacSha256Sync: { + configurable: false, + get() { + return _hmacSha256Sync; + }, + set(val) { + if (!_hmacSha256Sync) + _hmacSha256Sync = val; + }, + }, +}); /***/ }), +<<<<<<< HEAD +/***/ 12510: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +======= /***/ 89106: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -Object.defineProperty(exports, "__esModule", ({ value: true })); +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +<<<<<<< HEAD +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + GraphqlResponseError: () => GraphqlResponseError, + graphql: () => graphql2, + withCustomRequest: () => withCustomRequest +}); +module.exports = __toCommonJS(dist_src_exports); +var import_request3 = __nccwpck_require__(21790); +var import_universal_user_agent = __nccwpck_require__(60031); +======= var request = __nccwpck_require__(31131); var universalUserAgent = __nccwpck_require__(35770); @@ -54690,194 +64384,342 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); var isPlainObject = __nccwpck_require__(9551); var universalUserAgent = __nccwpck_require__(35770); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// pkg/dist-src/version.js +var VERSION = "7.0.2"; + +// pkg/dist-src/with-defaults.js +var import_request2 = __nccwpck_require__(21790); + +// pkg/dist-src/graphql.js +var import_request = __nccwpck_require__(21790); + +// pkg/dist-src/error.js +function _buildMessageForResponseErrors(data) { + return `Request failed due to following response errors: +` + data.errors.map((e) => ` - ${e.message}`).join("\n"); +} +var GraphqlResponseError = class extends Error { + constructor(request2, headers, response) { + super(_buildMessageForResponseErrors(response)); + this.request = request2; + this.headers = headers; + this.response = response; + this.name = "GraphqlResponseError"; + this.errors = response.errors; + this.data = response.data; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } +}; +// pkg/dist-src/graphql.js +var NON_VARIABLE_OPTIONS = [ + "method", + "baseUrl", + "url", + "headers", + "request", + "query", + "mediaType" +]; +var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"]; +var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/; +function graphql(request2, query, options) { + if (options) { + if (typeof query === "string" && "query" in options) { + return Promise.reject( + new Error(`[@octokit/graphql] "query" cannot be used as variable name`) + ); + } + for (const key in options) { + if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) + continue; + return Promise.reject( + new Error( + `[@octokit/graphql] "${key}" cannot be used as variable name` + ) + ); + } + } + const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query; + const requestOptions = Object.keys( + parsedOptions + ).reduce((result, key) => { + if (NON_VARIABLE_OPTIONS.includes(key)) { + result[key] = parsedOptions[key]; + return result; + } + if (!result.variables) { + result.variables = {}; + } + result.variables[key] = parsedOptions[key]; + return result; + }, {}); + const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl; + if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) { + requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql"); + } + return request2(requestOptions).then((response) => { + if (response.data.errors) { + const headers = {}; + for (const key of Object.keys(response.headers)) { + headers[key] = response.headers[key]; + } + throw new GraphqlResponseError( + requestOptions, + headers, + response.data + ); + } + return response.data.data; + }); +} + +// pkg/dist-src/with-defaults.js +function withDefaults(request2, newDefaults) { + const newRequest = request2.defaults(newDefaults); + const newApi = (query, options) => { + return graphql(newRequest, query, options); + }; + return Object.assign(newApi, { + defaults: withDefaults.bind(null, newRequest), + endpoint: newRequest.endpoint + }); +} + +// pkg/dist-src/index.js +var graphql2 = withDefaults(import_request3.request, { + headers: { + "user-agent": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` + }, + method: "POST", + url: "/graphql" +}); +function withCustomRequest(customRequest) { + return withDefaults(customRequest, { + method: "POST", + url: "/graphql" + }); +} +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + +/***/ }), + +/***/ 10103: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + endpoint: () => endpoint +}); +module.exports = __toCommonJS(dist_src_exports); + +// pkg/dist-src/defaults.js +var import_universal_user_agent = __nccwpck_require__(60031); + +// pkg/dist-src/version.js +var VERSION = "9.0.4"; + +// pkg/dist-src/defaults.js +var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; +var DEFAULTS = { + method: "GET", + baseUrl: "https://api.github.com", + headers: { + accept: "application/vnd.github.v3+json", + "user-agent": userAgent + }, + mediaType: { + format: "" + } +}; + +// pkg/dist-src/util/lowercase-keys.js function lowercaseKeys(object) { if (!object) { return {}; } - return Object.keys(object).reduce((newObj, key) => { newObj[key.toLowerCase()] = object[key]; return newObj; }, {}); } +// pkg/dist-src/util/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} + +// pkg/dist-src/util/merge-deep.js function mergeDeep(defaults, options) { const result = Object.assign({}, defaults); - Object.keys(options).forEach(key => { - if (isPlainObject.isPlainObject(options[key])) { - if (!(key in defaults)) Object.assign(result, { - [key]: options[key] - });else result[key] = mergeDeep(defaults[key], options[key]); + Object.keys(options).forEach((key) => { + if (isPlainObject(options[key])) { + if (!(key in defaults)) + Object.assign(result, { [key]: options[key] }); + else + result[key] = mergeDeep(defaults[key], options[key]); } else { - Object.assign(result, { - [key]: options[key] - }); + Object.assign(result, { [key]: options[key] }); } }); return result; } +// pkg/dist-src/util/remove-undefined-properties.js function removeUndefinedProperties(obj) { for (const key in obj) { - if (obj[key] === undefined) { + if (obj[key] === void 0) { delete obj[key]; } } - return obj; } +// pkg/dist-src/merge.js function merge(defaults, route, options) { if (typeof route === "string") { let [method, url] = route.split(" "); - options = Object.assign(url ? { - method, - url - } : { - url: method - }, options); + options = Object.assign(url ? { method, url } : { url: method }, options); } else { options = Object.assign({}, route); - } // lowercase header names before merging with defaults to avoid duplicates - - - options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging - + } + options.headers = lowercaseKeys(options.headers); removeUndefinedProperties(options); removeUndefinedProperties(options.headers); - const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten - - if (defaults && defaults.mediaType.previews.length) { - mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews); + const mergedOptions = mergeDeep(defaults || {}, options); + if (options.url === "/graphql") { + if (defaults && defaults.mediaType.previews?.length) { + mergedOptions.mediaType.previews = defaults.mediaType.previews.filter( + (preview) => !mergedOptions.mediaType.previews.includes(preview) + ).concat(mergedOptions.mediaType.previews); + } + mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, "")); } - - mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, "")); return mergedOptions; } +// pkg/dist-src/util/add-query-parameters.js function addQueryParameters(url, parameters) { const separator = /\?/.test(url) ? "&" : "?"; const names = Object.keys(parameters); - if (names.length === 0) { return url; } - - return url + separator + names.map(name => { + return url + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } - return `${name}=${encodeURIComponent(parameters[name])}`; }).join("&"); } -const urlVariableRegex = /\{[^}]+\}/g; - +// pkg/dist-src/util/extract-url-variable-names.js +var urlVariableRegex = /\{[^}]+\}/g; function removeNonChars(variableName) { return variableName.replace(/^\W+|\W+$/g, "").split(/,/); } - function extractUrlVariableNames(url) { const matches = url.match(urlVariableRegex); - if (!matches) { return []; } - return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []); } +// pkg/dist-src/util/omit.js function omit(object, keysToOmit) { - return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => { - obj[key] = object[key]; - return obj; - }, {}); + const result = { __proto__: null }; + for (const key of Object.keys(object)) { + if (keysToOmit.indexOf(key) === -1) { + result[key] = object[key]; + } + } + return result; } -// Based on https://github.com/bramstein/url-template, licensed under BSD -// TODO: create separate package. -// -// Copyright (c) 2012-2014, Bram Stein -// All rights reserved. -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// 1. Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// 2. Redistributions in binary form must reproduce the above copyright -// notice, this list of conditions and the following disclaimer in the -// documentation and/or other materials provided with the distribution. -// 3. The name of the author may not be used to endorse or promote products -// derived from this software without specific prior written permission. -// THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO -// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* istanbul ignore file */ +// pkg/dist-src/util/url-template.js function encodeReserved(str) { - return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { + return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) { if (!/%[0-9A-Fa-f]/.test(part)) { part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]"); } - return part; }).join(""); } - function encodeUnreserved(str) { - return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return encodeURIComponent(str).replace(/[!'()*]/g, function(c) { return "%" + c.charCodeAt(0).toString(16).toUpperCase(); }); } - function encodeValue(operator, value, key) { value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value); - if (key) { return encodeUnreserved(key) + "=" + value; } else { return value; } } - function isDefined(value) { - return value !== undefined && value !== null; + return value !== void 0 && value !== null; } - function isKeyOperator(operator) { return operator === ";" || operator === "&" || operator === "?"; } - function getValues(context, operator, key, modifier) { - var value = context[key], - result = []; - + var value = context[key], result = []; if (isDefined(value) && value !== "") { if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { value = value.toString(); - if (modifier && modifier !== "*") { value = value.substring(0, parseInt(modifier, 10)); } - - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + result.push( + encodeValue(operator, value, isKeyOperator(operator) ? key : "") + ); } else { if (modifier === "*") { if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : "")); + value.filter(isDefined).forEach(function(value2) { + result.push( + encodeValue(operator, value2, isKeyOperator(operator) ? key : "") + ); }); } else { - Object.keys(value).forEach(function (k) { + Object.keys(value).forEach(function(k) { if (isDefined(value[k])) { result.push(encodeValue(operator, value[k], k)); } @@ -54885,20 +64727,18 @@ function getValues(context, operator, key, modifier) { } } else { const tmp = []; - if (Array.isArray(value)) { - value.filter(isDefined).forEach(function (value) { - tmp.push(encodeValue(operator, value)); + value.filter(isDefined).forEach(function(value2) { + tmp.push(encodeValue(operator, value2)); }); } else { - Object.keys(value).forEach(function (k) { + Object.keys(value).forEach(function(k) { if (isDefined(value[k])) { tmp.push(encodeUnreserved(k)); tmp.push(encodeValue(operator, value[k].toString())); } }); } - if (isKeyOperator(operator)) { result.push(encodeUnreserved(key) + "=" + tmp.join(",")); } else if (tmp.length !== 0) { @@ -54917,89 +64757,93 @@ function getValues(context, operator, key, modifier) { result.push(""); } } - return result; } - function parseUrl(template) { return { expand: expand.bind(null, template) }; } - function expand(template, context) { var operators = ["+", "#", ".", "/", ";", "?", "&"]; - return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) { - if (expression) { - let operator = ""; - const values = []; - - if (operators.indexOf(expression.charAt(0)) !== -1) { - operator = expression.charAt(0); - expression = expression.substr(1); - } - - expression.split(/,/g).forEach(function (variable) { - var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); - values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); - }); - - if (operator && operator !== "+") { - var separator = ","; - - if (operator === "?") { - separator = "&"; - } else if (operator !== "#") { - separator = operator; + template = template.replace( + /\{([^\{\}]+)\}|([^\{\}]+)/g, + function(_, expression, literal) { + if (expression) { + let operator = ""; + const values = []; + if (operators.indexOf(expression.charAt(0)) !== -1) { + operator = expression.charAt(0); + expression = expression.substr(1); + } + expression.split(/,/g).forEach(function(variable) { + var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable); + values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3])); + }); + if (operator && operator !== "+") { + var separator = ","; + if (operator === "?") { + separator = "&"; + } else if (operator !== "#") { + separator = operator; + } + return (values.length !== 0 ? operator : "") + values.join(separator); + } else { + return values.join(","); } - - return (values.length !== 0 ? operator : "") + values.join(separator); } else { - return values.join(","); + return encodeReserved(literal); } - } else { - return encodeReserved(literal); } - }); + ); + if (template === "/") { + return template; + } else { + return template.replace(/\/$/, ""); + } } +// pkg/dist-src/parse.js function parse(options) { - // https://fetch.spec.whatwg.org/#methods - let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible - + let method = options.method.toUpperCase(); let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); let body; - let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later - + let parameters = omit(options, [ + "method", + "baseUrl", + "url", + "headers", + "request", + "mediaType" + ]); const urlVariableNames = extractUrlVariableNames(url); url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { url = options.baseUrl + url; } - - const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl"); + const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); const isBinaryRequest = /application\/octet-stream/i.test(headers.accept); - if (!isBinaryRequest) { if (options.mediaType.format) { - // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw - headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(","); - } - - if (options.mediaType.previews.length) { - const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; - headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => { - const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; - return `application/vnd.github.${preview}-preview${format}`; - }).join(","); + headers.accept = headers.accept.split(/,/).map( + (format) => format.replace( + /application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, + `application/vnd$1$2.${options.mediaType.format}` + ) + ).join(","); + } + if (url.endsWith("/graphql")) { + if (options.mediaType.previews?.length) { + const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || []; + headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => { + const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; + return `application/vnd.github.${preview}-preview${format}`; + }).join(","); + } } - } // for GET/HEAD requests, set URL query parameters from remaining parameters - // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters - - + } if (["GET", "HEAD"].includes(method)) { url = addQueryParameters(url, remainingParameters); } else { @@ -55008,67 +64852,68 @@ function parse(options) { } else { if (Object.keys(remainingParameters).length) { body = remainingParameters; - } else { - headers["content-length"] = 0; } } - } // default content-type for JSON if body is set - - + } if (!headers["content-type"] && typeof body !== "undefined") { headers["content-type"] = "application/json; charset=utf-8"; - } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body. - // fetch does not allow to set `content-length` header, but we can set body to an empty string - - + } if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") { body = ""; - } // Only return body/request keys if present - - - return Object.assign({ - method, - url, - headers - }, typeof body !== "undefined" ? { - body - } : null, options.request ? { - request: options.request - } : null); + } + return Object.assign( + { method, url, headers }, + typeof body !== "undefined" ? { body } : null, + options.request ? { request: options.request } : null + ); } +// pkg/dist-src/endpoint-with-defaults.js function endpointWithDefaults(defaults, route, options) { return parse(merge(defaults, route, options)); } +// pkg/dist-src/with-defaults.js function withDefaults(oldDefaults, newDefaults) { - const DEFAULTS = merge(oldDefaults, newDefaults); - const endpoint = endpointWithDefaults.bind(null, DEFAULTS); - return Object.assign(endpoint, { - DEFAULTS, - defaults: withDefaults.bind(null, DEFAULTS), - merge: merge.bind(null, DEFAULTS), + const DEFAULTS2 = merge(oldDefaults, newDefaults); + const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2); + return Object.assign(endpoint2, { + DEFAULTS: DEFAULTS2, + defaults: withDefaults.bind(null, DEFAULTS2), + merge: merge.bind(null, DEFAULTS2), parse }); } -const VERSION = "6.0.12"; +// pkg/dist-src/index.js +var endpoint = withDefaults(null, DEFAULTS); +// Annotate the CommonJS export names for ESM import in node: +0 && (0); -const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url. -// So we use RequestParameters and add method as additional required property. -const DEFAULTS = { - method: "GET", - baseUrl: "https://api.github.com", - headers: { - accept: "application/vnd.github.v3+json", - "user-agent": userAgent - }, - mediaType: { - format: "", - previews: [] - } -}; +/***/ }), + +/***/ 7651: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +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 __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +<<<<<<< HEAD +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); +======= const endpoint = withDefaults(null, DEFAULTS); @@ -55096,8 +64941,33 @@ function ownKeys(object, enumerableOnly) { enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); - } - +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +<<<<<<< HEAD +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + RequestError: () => RequestError +}); +module.exports = __toCommonJS(dist_src_exports); +var import_deprecation = __nccwpck_require__(40454); +var import_once = __toESM(__nccwpck_require__(56939)); +var logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation)); +var RequestError = class extends Error { +======= return keys; } @@ -55311,78 +65181,116 @@ const logOnceHeaders = once(deprecation => console.warn(deprecation)); */ class RequestError extends Error { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 constructor(message, statusCode, options) { - super(message); // Maintains proper stack trace (only available on V8) - - /* istanbul ignore next */ - + super(message); if (Error.captureStackTrace) { Error.captureStackTrace(this, this.constructor); } - this.name = "HttpError"; this.status = statusCode; let headers; - if ("headers" in options && typeof options.headers !== "undefined") { headers = options.headers; } - if ("response" in options) { this.response = options.response; headers = options.response.headers; - } // redact request credentials without mutating original request options - - + } const requestCopy = Object.assign({}, options.request); - if (options.request.headers.authorization) { requestCopy.headers = Object.assign({}, options.request.headers, { - authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]") + authorization: options.request.headers.authorization.replace( + / .*$/, + " [REDACTED]" + ) }); } - - requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit - // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications - .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended - // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header - .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); - this.request = requestCopy; // deprecations - + requestCopy.url = requestCopy.url.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]").replace(/\baccess_token=\w+/g, "access_token=[REDACTED]"); + this.request = requestCopy; Object.defineProperty(this, "code", { get() { - logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")); + logOnceCode( + new import_deprecation.Deprecation( + "[@octokit/request-error] `error.code` is deprecated, use `error.status`." + ) + ); return statusCode; } - }); Object.defineProperty(this, "headers", { get() { - logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.")); + logOnceHeaders( + new import_deprecation.Deprecation( + "[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`." + ) + ); return headers || {}; } - }); } - -} - -exports.RequestError = RequestError; -//# sourceMappingURL=index.js.map +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), +<<<<<<< HEAD +/***/ 21790: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +======= /***/ 31131: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -Object.defineProperty(exports, "__esModule", ({ value: true })); +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } +// pkg/dist-src/index.js +var dist_src_exports = {}; +__export(dist_src_exports, { + request: () => request +}); +module.exports = __toCommonJS(dist_src_exports); +var import_endpoint = __nccwpck_require__(10103); +var import_universal_user_agent = __nccwpck_require__(60031); +<<<<<<< HEAD +// pkg/dist-src/version.js +var VERSION = "8.1.6"; + +// pkg/dist-src/is-plain-object.js +function isPlainObject(value) { + if (typeof value !== "object" || value === null) + return false; + if (Object.prototype.toString.call(value) !== "[object Object]") + return false; + const proto = Object.getPrototypeOf(value); + if (proto === null) + return true; + const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); +} +======= var endpoint = __nccwpck_require__(96164); var universalUserAgent = __nccwpck_require__(35770); var isPlainObject = __nccwpck_require__(9551); @@ -55390,66 +65298,76 @@ var nodeFetch = _interopDefault(__nccwpck_require__(66471)); var requestError = __nccwpck_require__(39148); const VERSION = "5.6.3"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// pkg/dist-src/fetch-wrapper.js +var import_request_error = __nccwpck_require__(7651); +// pkg/dist-src/get-buffer-response.js function getBufferResponse(response) { return response.arrayBuffer(); } +// pkg/dist-src/fetch-wrapper.js function fetchWrapper(requestOptions) { + var _a, _b, _c; const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; - - if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { + const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; + if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { requestOptions.body = JSON.stringify(requestOptions.body); } - let headers = {}; let status; let url; - const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; - return fetch(requestOptions.url, Object.assign({ + let { fetch } = globalThis; + if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { + fetch = requestOptions.request.fetch; + } + if (!fetch) { + throw new Error( + "fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing" + ); + } + return fetch(requestOptions.url, { method: requestOptions.method, body: requestOptions.body, headers: requestOptions.headers, - redirect: requestOptions.redirect - }, // `requestOptions.request.agent` type is incompatible - // see https://github.com/octokit/types.ts/pull/264 - requestOptions.request)).then(async response => { + signal: (_c = requestOptions.request) == null ? void 0 : _c.signal, + // duplex must be set if request.body is ReadableStream or Async Iterables. + // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. + ...requestOptions.body && { duplex: "half" } + }).then(async (response) => { url = response.url; status = response.status; - for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; } - if ("deprecation" in headers) { const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/); const deprecationLink = matches && matches.pop(); - log.warn(`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`); + log.warn( + `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` + ); } - if (status === 204 || status === 205) { return; - } // GitHub API returns 200 for HEAD requests - - + } if (requestOptions.method === "HEAD") { if (status < 400) { return; } - - throw new requestError.RequestError(response.statusText, status, { + throw new import_request_error.RequestError(response.statusText, status, { response: { url, status, headers, - data: undefined + data: void 0 }, request: requestOptions }); } - if (status === 304) { - throw new requestError.RequestError("Not modified", status, { + throw new import_request_error.RequestError("Not modified", status, { response: { url, status, @@ -55459,10 +65377,9 @@ function fetchWrapper(requestOptions) { request: requestOptions }); } - if (status >= 400) { const data = await getResponseData(response); - const error = new requestError.RequestError(toErrorMessage(data), status, { + const error = new import_request_error.RequestError(toErrorMessage(data), status, { response: { url, status, @@ -55473,92 +65390,96 @@ function fetchWrapper(requestOptions) { }); throw error; } - - return getResponseData(response); - }).then(data => { + return parseSuccessResponseBody ? await getResponseData(response) : response.body; + }).then((data) => { return { status, url, headers, data }; - }).catch(error => { - if (error instanceof requestError.RequestError) throw error; - throw new requestError.RequestError(error.message, 500, { + }).catch((error) => { + if (error instanceof import_request_error.RequestError) + throw error; + else if (error.name === "AbortError") + throw error; + let message = error.message; + if (error.name === "TypeError" && "cause" in error) { + if (error.cause instanceof Error) { + message = error.cause.message; + } else if (typeof error.cause === "string") { + message = error.cause; + } + } + throw new import_request_error.RequestError(message, 500, { request: requestOptions }); }); } - async function getResponseData(response) { const contentType = response.headers.get("content-type"); - if (/application\/json/.test(contentType)) { - return response.json(); + return response.json().catch(() => response.text()).catch(() => ""); } - if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) { return response.text(); } - return getBufferResponse(response); } - function toErrorMessage(data) { - if (typeof data === "string") return data; // istanbul ignore else - just in case - + if (typeof data === "string") + return data; if ("message" in data) { if (Array.isArray(data.errors)) { return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`; } - return data.message; - } // istanbul ignore next - just in case - - + } return `Unknown error: ${JSON.stringify(data)}`; } +// pkg/dist-src/with-defaults.js function withDefaults(oldEndpoint, newDefaults) { - const endpoint = oldEndpoint.defaults(newDefaults); - - const newApi = function (route, parameters) { - const endpointOptions = endpoint.merge(route, parameters); - + const endpoint2 = oldEndpoint.defaults(newDefaults); + const newApi = function(route, parameters) { + const endpointOptions = endpoint2.merge(route, parameters); if (!endpointOptions.request || !endpointOptions.request.hook) { - return fetchWrapper(endpoint.parse(endpointOptions)); + return fetchWrapper(endpoint2.parse(endpointOptions)); } - - const request = (route, parameters) => { - return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters))); + const request2 = (route2, parameters2) => { + return fetchWrapper( + endpoint2.parse(endpoint2.merge(route2, parameters2)) + ); }; - - Object.assign(request, { - endpoint, - defaults: withDefaults.bind(null, endpoint) + Object.assign(request2, { + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) }); - return endpointOptions.request.hook(request, endpointOptions); + return endpointOptions.request.hook(request2, endpointOptions); }; - return Object.assign(newApi, { - endpoint, - defaults: withDefaults.bind(null, endpoint) + endpoint: endpoint2, + defaults: withDefaults.bind(null, endpoint2) }); } -const request = withDefaults(endpoint.endpoint, { +// pkg/dist-src/index.js +var request = withDefaults(import_endpoint.endpoint, { headers: { - "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}` + "user-agent": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}` } }); - -exports.request = request; -//# sourceMappingURL=index.js.map +// Annotate the CommonJS export names for ESM import in node: +0 && (0); /***/ }), +<<<<<<< HEAD +/***/ 80590: +======= /***/ 44386: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { (function webpackUniversalModuleDefinition(root, factory) { @@ -79715,717 +89636,725 @@ module.exports = __nccwpck_require__(59796); /***/ }), +<<<<<<< HEAD +/***/ 40488: +======= /***/ 66619: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((module) => { -"use strict"; - -module.exports = asPromise; - -/** - * Callback as used by {@link util.asPromise}. - * @typedef asPromiseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {...*} params Additional arguments - * @returns {undefined} - */ - -/** - * Returns a promise from a node-style callback function. - * @memberof util - * @param {asPromiseCallback} fn Function to call - * @param {*} ctx Function context - * @param {...*} params Function arguments - * @returns {Promise<*>} Promisified function - */ -function asPromise(fn, ctx/*, varargs */) { - var params = new Array(arguments.length - 1), - offset = 0, - index = 2, - pending = true; - while (index < arguments.length) - params[offset++] = arguments[index++]; - return new Promise(function executor(resolve, reject) { - params[offset] = function callback(err/*, varargs */) { - if (pending) { - pending = false; - if (err) - reject(err); - else { - var params = new Array(arguments.length - 1), - offset = 0; - while (offset < params.length) - params[offset++] = arguments[offset]; - resolve.apply(null, params); - } - } - }; - try { - fn.apply(ctx || null, params); - } catch (err) { - if (pending) { - pending = false; - reject(err); - } - } - }); -} + +module.exports = asPromise; + +/** + * Callback as used by {@link util.asPromise}. + * @typedef asPromiseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {...*} params Additional arguments + * @returns {undefined} + */ + +/** + * Returns a promise from a node-style callback function. + * @memberof util + * @param {asPromiseCallback} fn Function to call + * @param {*} ctx Function context + * @param {...*} params Function arguments + * @returns {Promise<*>} Promisified function + */ +function asPromise(fn, ctx/*, varargs */) { + var params = new Array(arguments.length - 1), + offset = 0, + index = 2, + pending = true; + while (index < arguments.length) + params[offset++] = arguments[index++]; + return new Promise(function executor(resolve, reject) { + params[offset] = function callback(err/*, varargs */) { + if (pending) { + pending = false; + if (err) + reject(err); + else { + var params = new Array(arguments.length - 1), + offset = 0; + while (offset < params.length) + params[offset++] = arguments[offset]; + resolve.apply(null, params); + } + } + }; + try { + fn.apply(ctx || null, params); + } catch (err) { + if (pending) { + pending = false; + reject(err); + } + } + }); +} /***/ }), +<<<<<<< HEAD +/***/ 81246: +======= /***/ 37366: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports) => { -"use strict"; - - -/** - * A minimal base64 implementation for number arrays. - * @memberof util - * @namespace - */ -var base64 = exports; - -/** - * Calculates the byte length of a base64 encoded string. - * @param {string} string Base64 encoded string - * @returns {number} Byte length - */ -base64.length = function length(string) { - var p = string.length; - if (!p) - return 0; - var n = 0; - while (--p % 4 > 1 && string.charAt(p) === "=") - ++n; - return Math.ceil(string.length * 3) / 4 - n; -}; - -// Base64 encoding table -var b64 = new Array(64); - -// Base64 decoding table -var s64 = new Array(123); - -// 65..90, 97..122, 48..57, 43, 47 -for (var i = 0; i < 64;) - s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; - -/** - * Encodes a buffer to a base64 encoded string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} Base64 encoded string - */ -base64.encode = function encode(buffer, start, end) { - var parts = null, - chunk = []; - var i = 0, // output index - j = 0, // goto index - t; // temporary - while (start < end) { - var b = buffer[start++]; - switch (j) { - case 0: - chunk[i++] = b64[b >> 2]; - t = (b & 3) << 4; - j = 1; - break; - case 1: - chunk[i++] = b64[t | b >> 4]; - t = (b & 15) << 2; - j = 2; - break; - case 2: - chunk[i++] = b64[t | b >> 6]; - chunk[i++] = b64[b & 63]; - j = 0; - break; - } - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); - i = 0; - } - } - if (j) { - chunk[i++] = b64[t]; - chunk[i++] = 61; - if (j === 1) - chunk[i++] = 61; - } - if (parts) { - if (i) - parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode.apply(String, chunk.slice(0, i)); -}; - -var invalidEncoding = "invalid encoding"; - -/** - * Decodes a base64 encoded string to a buffer. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Number of bytes written - * @throws {Error} If encoding is invalid - */ -base64.decode = function decode(string, buffer, offset) { - var start = offset; - var j = 0, // goto index - t; // temporary - for (var i = 0; i < string.length;) { - var c = string.charCodeAt(i++); - if (c === 61 && j > 1) - break; - if ((c = s64[c]) === undefined) - throw Error(invalidEncoding); - switch (j) { - case 0: - t = c; - j = 1; - break; - case 1: - buffer[offset++] = t << 2 | (c & 48) >> 4; - t = c; - j = 2; - break; - case 2: - buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; - t = c; - j = 3; - break; - case 3: - buffer[offset++] = (t & 3) << 6 | c; - j = 0; - break; - } - } - if (j === 1) - throw Error(invalidEncoding); - return offset - start; -}; - -/** - * Tests if the specified string appears to be base64 encoded. - * @param {string} string String to test - * @returns {boolean} `true` if probably base64 encoded, otherwise false - */ -base64.test = function test(string) { - return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); -}; + + +/** + * A minimal base64 implementation for number arrays. + * @memberof util + * @namespace + */ +var base64 = exports; + +/** + * Calculates the byte length of a base64 encoded string. + * @param {string} string Base64 encoded string + * @returns {number} Byte length + */ +base64.length = function length(string) { + var p = string.length; + if (!p) + return 0; + var n = 0; + while (--p % 4 > 1 && string.charAt(p) === "=") + ++n; + return Math.ceil(string.length * 3) / 4 - n; +}; + +// Base64 encoding table +var b64 = new Array(64); + +// Base64 decoding table +var s64 = new Array(123); + +// 65..90, 97..122, 48..57, 43, 47 +for (var i = 0; i < 64;) + s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++; + +/** + * Encodes a buffer to a base64 encoded string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} Base64 encoded string + */ +base64.encode = function encode(buffer, start, end) { + var parts = null, + chunk = []; + var i = 0, // output index + j = 0, // goto index + t; // temporary + while (start < end) { + var b = buffer[start++]; + switch (j) { + case 0: + chunk[i++] = b64[b >> 2]; + t = (b & 3) << 4; + j = 1; + break; + case 1: + chunk[i++] = b64[t | b >> 4]; + t = (b & 15) << 2; + j = 2; + break; + case 2: + chunk[i++] = b64[t | b >> 6]; + chunk[i++] = b64[b & 63]; + j = 0; + break; + } + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (j) { + chunk[i++] = b64[t]; + chunk[i++] = 61; + if (j === 1) + chunk[i++] = 61; + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +var invalidEncoding = "invalid encoding"; + +/** + * Decodes a base64 encoded string to a buffer. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Number of bytes written + * @throws {Error} If encoding is invalid + */ +base64.decode = function decode(string, buffer, offset) { + var start = offset; + var j = 0, // goto index + t; // temporary + for (var i = 0; i < string.length;) { + var c = string.charCodeAt(i++); + if (c === 61 && j > 1) + break; + if ((c = s64[c]) === undefined) + throw Error(invalidEncoding); + switch (j) { + case 0: + t = c; + j = 1; + break; + case 1: + buffer[offset++] = t << 2 | (c & 48) >> 4; + t = c; + j = 2; + break; + case 2: + buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2; + t = c; + j = 3; + break; + case 3: + buffer[offset++] = (t & 3) << 6 | c; + j = 0; + break; + } + } + if (j === 1) + throw Error(invalidEncoding); + return offset - start; +}; + +/** + * Tests if the specified string appears to be base64 encoded. + * @param {string} string String to test + * @returns {boolean} `true` if probably base64 encoded, otherwise false + */ +base64.test = function test(string) { + return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string); +}; /***/ }), +<<<<<<< HEAD +/***/ 85885: +======= /***/ 98873: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((module) => { -"use strict"; - -module.exports = EventEmitter; - -/** - * Constructs a new event emitter instance. - * @classdesc A minimal event emitter. - * @memberof util - * @constructor - */ -function EventEmitter() { - - /** - * Registered listeners. - * @type {Object.} - * @private - */ - this._listeners = {}; -} - -/** - * Registers an event listener. - * @param {string} evt Event name - * @param {function} fn Listener - * @param {*} [ctx] Listener context - * @returns {util.EventEmitter} `this` - */ -EventEmitter.prototype.on = function on(evt, fn, ctx) { - (this._listeners[evt] || (this._listeners[evt] = [])).push({ - fn : fn, - ctx : ctx || this - }); - return this; -}; - -/** - * Removes an event listener or any matching listeners if arguments are omitted. - * @param {string} [evt] Event name. Removes all listeners if omitted. - * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. - * @returns {util.EventEmitter} `this` - */ -EventEmitter.prototype.off = function off(evt, fn) { - if (evt === undefined) - this._listeners = {}; - else { - if (fn === undefined) - this._listeners[evt] = []; - else { - var listeners = this._listeners[evt]; - for (var i = 0; i < listeners.length;) - if (listeners[i].fn === fn) - listeners.splice(i, 1); - else - ++i; - } - } - return this; -}; - -/** - * Emits an event by calling its listeners with the specified arguments. - * @param {string} evt Event name - * @param {...*} args Arguments - * @returns {util.EventEmitter} `this` - */ -EventEmitter.prototype.emit = function emit(evt) { - var listeners = this._listeners[evt]; - if (listeners) { - var args = [], - i = 1; - for (; i < arguments.length;) - args.push(arguments[i++]); - for (i = 0; i < listeners.length;) - listeners[i].fn.apply(listeners[i++].ctx, args); - } - return this; -}; + +module.exports = EventEmitter; + +/** + * Constructs a new event emitter instance. + * @classdesc A minimal event emitter. + * @memberof util + * @constructor + */ +function EventEmitter() { + + /** + * Registered listeners. + * @type {Object.} + * @private + */ + this._listeners = {}; +} + +/** + * Registers an event listener. + * @param {string} evt Event name + * @param {function} fn Listener + * @param {*} [ctx] Listener context + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.on = function on(evt, fn, ctx) { + (this._listeners[evt] || (this._listeners[evt] = [])).push({ + fn : fn, + ctx : ctx || this + }); + return this; +}; + +/** + * Removes an event listener or any matching listeners if arguments are omitted. + * @param {string} [evt] Event name. Removes all listeners if omitted. + * @param {function} [fn] Listener to remove. Removes all listeners of `evt` if omitted. + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.off = function off(evt, fn) { + if (evt === undefined) + this._listeners = {}; + else { + if (fn === undefined) + this._listeners[evt] = []; + else { + var listeners = this._listeners[evt]; + for (var i = 0; i < listeners.length;) + if (listeners[i].fn === fn) + listeners.splice(i, 1); + else + ++i; + } + } + return this; +}; + +/** + * Emits an event by calling its listeners with the specified arguments. + * @param {string} evt Event name + * @param {...*} args Arguments + * @returns {util.EventEmitter} `this` + */ +EventEmitter.prototype.emit = function emit(evt) { + var listeners = this._listeners[evt]; + if (listeners) { + var args = [], + i = 1; + for (; i < arguments.length;) + args.push(arguments[i++]); + for (i = 0; i < listeners.length;) + listeners[i].fn.apply(listeners[i++].ctx, args); + } + return this; +}; /***/ }), +<<<<<<< HEAD +/***/ 26666: +======= /***/ 13001: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((module) => { -"use strict"; - - -module.exports = factory(factory); - -/** - * Reads / writes floats / doubles from / to buffers. - * @name util.float - * @namespace - */ - -/** - * Writes a 32 bit float to a buffer using little endian byte order. - * @name util.float.writeFloatLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 32 bit float to a buffer using big endian byte order. - * @name util.float.writeFloatBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 32 bit float from a buffer using little endian byte order. - * @name util.float.readFloatLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 32 bit float from a buffer using big endian byte order. - * @name util.float.readFloatBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Writes a 64 bit double to a buffer using little endian byte order. - * @name util.float.writeDoubleLE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Writes a 64 bit double to a buffer using big endian byte order. - * @name util.float.writeDoubleBE - * @function - * @param {number} val Value to write - * @param {Uint8Array} buf Target buffer - * @param {number} pos Target buffer offset - * @returns {undefined} - */ - -/** - * Reads a 64 bit double from a buffer using little endian byte order. - * @name util.float.readDoubleLE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -/** - * Reads a 64 bit double from a buffer using big endian byte order. - * @name util.float.readDoubleBE - * @function - * @param {Uint8Array} buf Source buffer - * @param {number} pos Source buffer offset - * @returns {number} Value read - */ - -// Factory function for the purpose of node-based testing in modified global environments -function factory(exports) { - - // float: typed array - if (typeof Float32Array !== "undefined") (function() { - - var f32 = new Float32Array([ -0 ]), - f8b = new Uint8Array(f32.buffer), - le = f8b[3] === 128; - - function writeFloat_f32_cpy(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - } - - function writeFloat_f32_rev(val, buf, pos) { - f32[0] = val; - buf[pos ] = f8b[3]; - buf[pos + 1] = f8b[2]; - buf[pos + 2] = f8b[1]; - buf[pos + 3] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; - /* istanbul ignore next */ - exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; - - function readFloat_f32_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - return f32[0]; - } - - function readFloat_f32_rev(buf, pos) { - f8b[3] = buf[pos ]; - f8b[2] = buf[pos + 1]; - f8b[1] = buf[pos + 2]; - f8b[0] = buf[pos + 3]; - return f32[0]; - } - - /* istanbul ignore next */ - exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; - /* istanbul ignore next */ - exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; - - // float: ieee754 - })(); else (function() { - - function writeFloat_ieee754(writeUint, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); - else if (isNaN(val)) - writeUint(2143289344, buf, pos); - else if (val > 3.4028234663852886e+38) // +-Infinity - writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); - else if (val < 1.1754943508222875e-38) // denormal - writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); - else { - var exponent = Math.floor(Math.log(val) / Math.LN2), - mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; - writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); - } - } - - exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); - exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); - - function readFloat_ieee754(readUint, buf, pos) { - var uint = readUint(buf, pos), - sign = (uint >> 31) * 2 + 1, - exponent = uint >>> 23 & 255, - mantissa = uint & 8388607; - return exponent === 255 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 1.401298464324817e-45 * mantissa - : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); - } - - exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); - exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); - - })(); - - // double: typed array - if (typeof Float64Array !== "undefined") (function() { - - var f64 = new Float64Array([-0]), - f8b = new Uint8Array(f64.buffer), - le = f8b[7] === 128; - - function writeDouble_f64_cpy(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[0]; - buf[pos + 1] = f8b[1]; - buf[pos + 2] = f8b[2]; - buf[pos + 3] = f8b[3]; - buf[pos + 4] = f8b[4]; - buf[pos + 5] = f8b[5]; - buf[pos + 6] = f8b[6]; - buf[pos + 7] = f8b[7]; - } - - function writeDouble_f64_rev(val, buf, pos) { - f64[0] = val; - buf[pos ] = f8b[7]; - buf[pos + 1] = f8b[6]; - buf[pos + 2] = f8b[5]; - buf[pos + 3] = f8b[4]; - buf[pos + 4] = f8b[3]; - buf[pos + 5] = f8b[2]; - buf[pos + 6] = f8b[1]; - buf[pos + 7] = f8b[0]; - } - - /* istanbul ignore next */ - exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; - /* istanbul ignore next */ - exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; - - function readDouble_f64_cpy(buf, pos) { - f8b[0] = buf[pos ]; - f8b[1] = buf[pos + 1]; - f8b[2] = buf[pos + 2]; - f8b[3] = buf[pos + 3]; - f8b[4] = buf[pos + 4]; - f8b[5] = buf[pos + 5]; - f8b[6] = buf[pos + 6]; - f8b[7] = buf[pos + 7]; - return f64[0]; - } - - function readDouble_f64_rev(buf, pos) { - f8b[7] = buf[pos ]; - f8b[6] = buf[pos + 1]; - f8b[5] = buf[pos + 2]; - f8b[4] = buf[pos + 3]; - f8b[3] = buf[pos + 4]; - f8b[2] = buf[pos + 5]; - f8b[1] = buf[pos + 6]; - f8b[0] = buf[pos + 7]; - return f64[0]; - } - - /* istanbul ignore next */ - exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; - /* istanbul ignore next */ - exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; - - // double: ieee754 - })(); else (function() { - - function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { - var sign = val < 0 ? 1 : 0; - if (sign) - val = -val; - if (val === 0) { - writeUint(0, buf, pos + off0); - writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); - } else if (isNaN(val)) { - writeUint(0, buf, pos + off0); - writeUint(2146959360, buf, pos + off1); - } else if (val > 1.7976931348623157e+308) { // +-Infinity - writeUint(0, buf, pos + off0); - writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); - } else { - var mantissa; - if (val < 2.2250738585072014e-308) { // denormal - mantissa = val / 5e-324; - writeUint(mantissa >>> 0, buf, pos + off0); - writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); - } else { - var exponent = Math.floor(Math.log(val) / Math.LN2); - if (exponent === 1024) - exponent = 1023; - mantissa = val * Math.pow(2, -exponent); - writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); - writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); - } - } - } - - exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); - exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); - - function readDouble_ieee754(readUint, off0, off1, buf, pos) { - var lo = readUint(buf, pos + off0), - hi = readUint(buf, pos + off1); - var sign = (hi >> 31) * 2 + 1, - exponent = hi >>> 20 & 2047, - mantissa = 4294967296 * (hi & 1048575) + lo; - return exponent === 2047 - ? mantissa - ? NaN - : sign * Infinity - : exponent === 0 // denormal - ? sign * 5e-324 * mantissa - : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); - } - - exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); - exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); - - })(); - - return exports; -} - -// uint helpers - -function writeUintLE(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; -} - -function writeUintBE(val, buf, pos) { - buf[pos ] = val >>> 24; - buf[pos + 1] = val >>> 16 & 255; - buf[pos + 2] = val >>> 8 & 255; - buf[pos + 3] = val & 255; -} - -function readUintLE(buf, pos) { - return (buf[pos ] - | buf[pos + 1] << 8 - | buf[pos + 2] << 16 - | buf[pos + 3] << 24) >>> 0; -} - -function readUintBE(buf, pos) { - return (buf[pos ] << 24 - | buf[pos + 1] << 16 - | buf[pos + 2] << 8 - | buf[pos + 3]) >>> 0; -} + + +module.exports = factory(factory); + +/** + * Reads / writes floats / doubles from / to buffers. + * @name util.float + * @namespace + */ + +/** + * Writes a 32 bit float to a buffer using little endian byte order. + * @name util.float.writeFloatLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 32 bit float to a buffer using big endian byte order. + * @name util.float.writeFloatBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 32 bit float from a buffer using little endian byte order. + * @name util.float.readFloatLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 32 bit float from a buffer using big endian byte order. + * @name util.float.readFloatBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Writes a 64 bit double to a buffer using little endian byte order. + * @name util.float.writeDoubleLE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Writes a 64 bit double to a buffer using big endian byte order. + * @name util.float.writeDoubleBE + * @function + * @param {number} val Value to write + * @param {Uint8Array} buf Target buffer + * @param {number} pos Target buffer offset + * @returns {undefined} + */ + +/** + * Reads a 64 bit double from a buffer using little endian byte order. + * @name util.float.readDoubleLE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +/** + * Reads a 64 bit double from a buffer using big endian byte order. + * @name util.float.readDoubleBE + * @function + * @param {Uint8Array} buf Source buffer + * @param {number} pos Source buffer offset + * @returns {number} Value read + */ + +// Factory function for the purpose of node-based testing in modified global environments +function factory(exports) { + + // float: typed array + if (typeof Float32Array !== "undefined") (function() { + + var f32 = new Float32Array([ -0 ]), + f8b = new Uint8Array(f32.buffer), + le = f8b[3] === 128; + + function writeFloat_f32_cpy(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + } + + function writeFloat_f32_rev(val, buf, pos) { + f32[0] = val; + buf[pos ] = f8b[3]; + buf[pos + 1] = f8b[2]; + buf[pos + 2] = f8b[1]; + buf[pos + 3] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeFloatLE = le ? writeFloat_f32_cpy : writeFloat_f32_rev; + /* istanbul ignore next */ + exports.writeFloatBE = le ? writeFloat_f32_rev : writeFloat_f32_cpy; + + function readFloat_f32_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + return f32[0]; + } + + function readFloat_f32_rev(buf, pos) { + f8b[3] = buf[pos ]; + f8b[2] = buf[pos + 1]; + f8b[1] = buf[pos + 2]; + f8b[0] = buf[pos + 3]; + return f32[0]; + } + + /* istanbul ignore next */ + exports.readFloatLE = le ? readFloat_f32_cpy : readFloat_f32_rev; + /* istanbul ignore next */ + exports.readFloatBE = le ? readFloat_f32_rev : readFloat_f32_cpy; + + // float: ieee754 + })(); else (function() { + + function writeFloat_ieee754(writeUint, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos); + else if (isNaN(val)) + writeUint(2143289344, buf, pos); + else if (val > 3.4028234663852886e+38) // +-Infinity + writeUint((sign << 31 | 2139095040) >>> 0, buf, pos); + else if (val < 1.1754943508222875e-38) // denormal + writeUint((sign << 31 | Math.round(val / 1.401298464324817e-45)) >>> 0, buf, pos); + else { + var exponent = Math.floor(Math.log(val) / Math.LN2), + mantissa = Math.round(val * Math.pow(2, -exponent) * 8388608) & 8388607; + writeUint((sign << 31 | exponent + 127 << 23 | mantissa) >>> 0, buf, pos); + } + } + + exports.writeFloatLE = writeFloat_ieee754.bind(null, writeUintLE); + exports.writeFloatBE = writeFloat_ieee754.bind(null, writeUintBE); + + function readFloat_ieee754(readUint, buf, pos) { + var uint = readUint(buf, pos), + sign = (uint >> 31) * 2 + 1, + exponent = uint >>> 23 & 255, + mantissa = uint & 8388607; + return exponent === 255 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 1.401298464324817e-45 * mantissa + : sign * Math.pow(2, exponent - 150) * (mantissa + 8388608); + } + + exports.readFloatLE = readFloat_ieee754.bind(null, readUintLE); + exports.readFloatBE = readFloat_ieee754.bind(null, readUintBE); + + })(); + + // double: typed array + if (typeof Float64Array !== "undefined") (function() { + + var f64 = new Float64Array([-0]), + f8b = new Uint8Array(f64.buffer), + le = f8b[7] === 128; + + function writeDouble_f64_cpy(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; + buf[pos + 4] = f8b[4]; + buf[pos + 5] = f8b[5]; + buf[pos + 6] = f8b[6]; + buf[pos + 7] = f8b[7]; + } + + function writeDouble_f64_rev(val, buf, pos) { + f64[0] = val; + buf[pos ] = f8b[7]; + buf[pos + 1] = f8b[6]; + buf[pos + 2] = f8b[5]; + buf[pos + 3] = f8b[4]; + buf[pos + 4] = f8b[3]; + buf[pos + 5] = f8b[2]; + buf[pos + 6] = f8b[1]; + buf[pos + 7] = f8b[0]; + } + + /* istanbul ignore next */ + exports.writeDoubleLE = le ? writeDouble_f64_cpy : writeDouble_f64_rev; + /* istanbul ignore next */ + exports.writeDoubleBE = le ? writeDouble_f64_rev : writeDouble_f64_cpy; + + function readDouble_f64_cpy(buf, pos) { + f8b[0] = buf[pos ]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + f8b[4] = buf[pos + 4]; + f8b[5] = buf[pos + 5]; + f8b[6] = buf[pos + 6]; + f8b[7] = buf[pos + 7]; + return f64[0]; + } + + function readDouble_f64_rev(buf, pos) { + f8b[7] = buf[pos ]; + f8b[6] = buf[pos + 1]; + f8b[5] = buf[pos + 2]; + f8b[4] = buf[pos + 3]; + f8b[3] = buf[pos + 4]; + f8b[2] = buf[pos + 5]; + f8b[1] = buf[pos + 6]; + f8b[0] = buf[pos + 7]; + return f64[0]; + } + + /* istanbul ignore next */ + exports.readDoubleLE = le ? readDouble_f64_cpy : readDouble_f64_rev; + /* istanbul ignore next */ + exports.readDoubleBE = le ? readDouble_f64_rev : readDouble_f64_cpy; + + // double: ieee754 + })(); else (function() { + + function writeDouble_ieee754(writeUint, off0, off1, val, buf, pos) { + var sign = val < 0 ? 1 : 0; + if (sign) + val = -val; + if (val === 0) { + writeUint(0, buf, pos + off0); + writeUint(1 / val > 0 ? /* positive */ 0 : /* negative 0 */ 2147483648, buf, pos + off1); + } else if (isNaN(val)) { + writeUint(0, buf, pos + off0); + writeUint(2146959360, buf, pos + off1); + } else if (val > 1.7976931348623157e+308) { // +-Infinity + writeUint(0, buf, pos + off0); + writeUint((sign << 31 | 2146435072) >>> 0, buf, pos + off1); + } else { + var mantissa; + if (val < 2.2250738585072014e-308) { // denormal + mantissa = val / 5e-324; + writeUint(mantissa >>> 0, buf, pos + off0); + writeUint((sign << 31 | mantissa / 4294967296) >>> 0, buf, pos + off1); + } else { + var exponent = Math.floor(Math.log(val) / Math.LN2); + if (exponent === 1024) + exponent = 1023; + mantissa = val * Math.pow(2, -exponent); + writeUint(mantissa * 4503599627370496 >>> 0, buf, pos + off0); + writeUint((sign << 31 | exponent + 1023 << 20 | mantissa * 1048576 & 1048575) >>> 0, buf, pos + off1); + } + } + } + + exports.writeDoubleLE = writeDouble_ieee754.bind(null, writeUintLE, 0, 4); + exports.writeDoubleBE = writeDouble_ieee754.bind(null, writeUintBE, 4, 0); + + function readDouble_ieee754(readUint, off0, off1, buf, pos) { + var lo = readUint(buf, pos + off0), + hi = readUint(buf, pos + off1); + var sign = (hi >> 31) * 2 + 1, + exponent = hi >>> 20 & 2047, + mantissa = 4294967296 * (hi & 1048575) + lo; + return exponent === 2047 + ? mantissa + ? NaN + : sign * Infinity + : exponent === 0 // denormal + ? sign * 5e-324 * mantissa + : sign * Math.pow(2, exponent - 1075) * (mantissa + 4503599627370496); + } + + exports.readDoubleLE = readDouble_ieee754.bind(null, readUintLE, 0, 4); + exports.readDoubleBE = readDouble_ieee754.bind(null, readUintBE, 4, 0); + + })(); + + return exports; +} + +// uint helpers + +function writeUintLE(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +function writeUintBE(val, buf, pos) { + buf[pos ] = val >>> 24; + buf[pos + 1] = val >>> 16 & 255; + buf[pos + 2] = val >>> 8 & 255; + buf[pos + 3] = val & 255; +} + +function readUintLE(buf, pos) { + return (buf[pos ] + | buf[pos + 1] << 8 + | buf[pos + 2] << 16 + | buf[pos + 3] << 24) >>> 0; +} + +function readUintBE(buf, pos) { + return (buf[pos ] << 24 + | buf[pos + 1] << 16 + | buf[pos + 2] << 8 + | buf[pos + 3]) >>> 0; +} /***/ }), +<<<<<<< HEAD +/***/ 62798: +======= /***/ 74097: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((module) => { -"use strict"; - -module.exports = inquire; - -/** - * Requires a module only if available. - * @memberof util - * @param {string} moduleName Module to require - * @returns {?Object} Required module if available and not empty, otherwise `null` - */ -function inquire(moduleName) { - try { - var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval - if (mod && (mod.length || Object.keys(mod).length)) - return mod; - } catch (e) {} // eslint-disable-line no-empty - return null; -} +module.exports = inquire; +<<<<<<< HEAD +/** + * Requires a module only if available. + * @memberof util + * @param {string} moduleName Module to require + * @returns {?Object} Required module if available and not empty, otherwise `null` + */ +function inquire(moduleName) { +======= /***/ }), /***/ 15177: /***/ ((module) => { "use strict"; - -module.exports = pool; - -/** - * An allocator as used by {@link util.pool}. - * @typedef PoolAllocator - * @type {function} - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer - */ - -/** - * A slicer as used by {@link util.pool}. - * @typedef PoolSlicer - * @type {function} - * @param {number} start Start offset - * @param {number} end End offset - * @returns {Uint8Array} Buffer slice - * @this {Uint8Array} - */ - -/** - * A general purpose buffer pool. - * @memberof util - * @function - * @param {PoolAllocator} alloc Allocator - * @param {PoolSlicer} slice Slicer - * @param {number} [size=8192] Slab size - * @returns {PoolAllocator} Pooled allocator - */ -function pool(alloc, slice, size) { - var SIZE = size || 8192; - var MAX = SIZE >>> 1; - var slab = null; - var offset = SIZE; - return function pool_alloc(size) { - if (size < 1 || size > MAX) - return alloc(size); - if (offset + size > SIZE) { - slab = alloc(SIZE); - offset = 0; - } - var buf = slice.call(slab, offset, offset += size); - if (offset & 7) // align to 32 bit - offset = (offset | 7) + 1; - return buf; - }; -} + +module.exports = pool; + +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ + +/** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ + +/** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator + */ +function pool(alloc, slice, size) { + var SIZE = size || 8192; + var MAX = SIZE >>> 1; + var slab = null; + var offset = SIZE; + return function pool_alloc(size) { + if (size < 1 || size > MAX) + return alloc(size); + if (offset + size > SIZE) { + slab = alloc(SIZE); + offset = 0; + } + var buf = slice.call(slab, offset, offset += size); + if (offset & 7) // align to 32 bit + offset = (offset | 7) + 1; + return buf; + }; +} /***/ }), @@ -80434,111 +90363,111 @@ function pool(alloc, slice, size) { /***/ ((__unused_webpack_module, exports) => { "use strict"; - - -/** - * A minimal UTF8 implementation for number arrays. - * @memberof util - * @namespace - */ -var utf8 = exports; - -/** - * Calculates the UTF8 byte length of a string. - * @param {string} string String - * @returns {number} Byte length - */ -utf8.length = function utf8_length(string) { - var len = 0, - c = 0; - for (var i = 0; i < string.length; ++i) { - c = string.charCodeAt(i); - if (c < 128) - len += 1; - else if (c < 2048) - len += 2; - else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { - ++i; - len += 4; - } else - len += 3; - } - return len; -}; - -/** - * Reads UTF8 bytes as a string. - * @param {Uint8Array} buffer Source buffer - * @param {number} start Source start - * @param {number} end Source end - * @returns {string} String read - */ -utf8.read = function utf8_read(buffer, start, end) { - var len = end - start; - if (len < 1) - return ""; - var parts = null, - chunk = [], - i = 0, // char offset - t; // temporary - while (start < end) { - t = buffer[start++]; - if (t < 128) - chunk[i++] = t; - else if (t > 191 && t < 224) - chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; - else if (t > 239 && t < 365) { - t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; - chunk[i++] = 0xD800 + (t >> 10); - chunk[i++] = 0xDC00 + (t & 1023); - } else - chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; - if (i > 8191) { - (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); - i = 0; - } - } - if (parts) { - if (i) - parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); - return parts.join(""); - } - return String.fromCharCode.apply(String, chunk.slice(0, i)); -}; - -/** - * Writes a string as UTF8 bytes. - * @param {string} string Source string - * @param {Uint8Array} buffer Destination buffer - * @param {number} offset Destination offset - * @returns {number} Bytes written - */ -utf8.write = function utf8_write(string, buffer, offset) { - var start = offset, - c1, // character 1 - c2; // character 2 - for (var i = 0; i < string.length; ++i) { - c1 = string.charCodeAt(i); - if (c1 < 128) { - buffer[offset++] = c1; - } else if (c1 < 2048) { - buffer[offset++] = c1 >> 6 | 192; - buffer[offset++] = c1 & 63 | 128; - } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { - c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); - ++i; - buffer[offset++] = c1 >> 18 | 240; - buffer[offset++] = c1 >> 12 & 63 | 128; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } else { - buffer[offset++] = c1 >> 12 | 224; - buffer[offset++] = c1 >> 6 & 63 | 128; - buffer[offset++] = c1 & 63 | 128; - } - } - return offset - start; -}; + + +/** + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace + */ +var utf8 = exports; + +/** + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length + */ +utf8.length = function utf8_length(string) { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; + } + return len; +}; + +/** + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read + */ +utf8.read = function utf8_read(buffer, start, end) { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer[start++]; + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; + +/** + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written + */ +utf8.write = function utf8_write(string, buffer, offset) { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return offset - start; +}; /***/ }), @@ -80922,20861 +90851,24769 @@ class ReadableStreamSearch { } async *[Symbol.asyncIterator]() { const reader = this._readableStream.getReader(); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 try { - while (true) { - const result = await reader.read(); - if (result.done) { - break; - } - yield* this._search.feed(result.value); - } - const tail = this._search.end(); - if (tail.length) { - yield tail; - } - } finally { - reader.releaseLock(); - } - } -} -const EOQ = Symbol('End of Queue'); -class QueueableStreamSearch { - constructor(needle) { - this._chunksQueue = []; - this._closed = false; - this._search = new StreamSearch(needle); - } - push(...chunks) { - if (this._closed) { - throw new Error('cannot call push after close'); - } - this._chunksQueue.push(...chunks); - if (this._notify) { - this._notify(); - } - } - close() { - if (this._closed) { - throw new Error('close was already called'); - } - this._closed = true; - this._chunksQueue.push(EOQ); - if (this._notify) { - this._notify(); - } - } - async *[Symbol.asyncIterator]() { - while (true) { - let chunk; - while (!(chunk = this._chunksQueue.shift())) { - await new Promise(resolve => this._notify = resolve); - this._notify = undefined; - } - if (chunk === EOQ) { - break; - } - yield* this._search.feed(chunk); - } - const tail = this._search.end(); - if (tail.length) { - yield tail; - } - } -} -function splitChunks(chunks, needle) { - const search = new StreamSearch(needle); - const outchunks = [[]]; - for (const chunk of chunks) { - for (const token of search.feed(chunk)) { - if (token === MATCH) { - outchunks.push([]); - } else { - outchunks[outchunks.length - 1].push(token); - } - } - } - const end = search.end(); - outchunks[outchunks.length - 1].push(end); - return outchunks.map(chunks => utils.mergeArrays(...chunks)); -} -function split(buf, needle) { - return splitChunks([buf], needle); -} -async function* chunksIterator(iter) { - let chunks = []; - for await (const value of iter) { - if (value === MATCH) { - yield chunks; - chunks = []; - } else { - chunks.push(value); - } - } - yield chunks; -} -async function* stringIterator(iter) { - for await (const chunk of chunksIterator(iter)) { - yield chunk.map(utils.arrayToString).join(''); - } -} -async function allStrings(iter) { - const segments = []; - for await (const value of stringIterator(iter)) { - segments.push(value); - } - return segments; -} -async function* arrayIterator(iter) { - for await (const chunk of chunksIterator(iter)) { - yield utils.mergeArrays(...chunk); - } + var mod = eval("quire".replace(/^/,"re"))(moduleName); // eslint-disable-line no-eval + if (mod && (mod.length || Object.keys(mod).length)) + return mod; + } catch (e) {} // eslint-disable-line no-empty + return null; } -exports.MATCH = MATCH; -exports.QueueableStreamSearch = QueueableStreamSearch; -exports.ReadableStreamSearch = ReadableStreamSearch; -exports.StreamSearch = StreamSearch; -exports.allStrings = allStrings; -exports.arrayIterator = arrayIterator; -exports.chunksIterator = chunksIterator; -exports.split = split; -exports.splitChunks = splitChunks; -exports.stringIterator = stringIterator; - /***/ }), -/***/ 14466: -/***/ ((__unused_webpack_module, exports) => { +<<<<<<< HEAD +/***/ 45350: +/***/ ((module) => { -"use strict"; +module.exports = pool; -Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * An allocator as used by {@link util.pool}. + * @typedef PoolAllocator + * @type {function} + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ -function stringToArray(s) { - const utf8 = unescape(encodeURIComponent(s)); - return Uint8Array.from(utf8, (_, i) => utf8.charCodeAt(i)); -} -function arrayToString(a) { - const utf8 = String.fromCharCode.apply(null, a); - return decodeURIComponent(escape(utf8)); -} -function mergeArrays(...arrays) { - const out = new Uint8Array(arrays.reduce((total, arr) => total + arr.length, 0)); - let offset = 0; - for (const arr of arrays) { - out.set(arr, offset); - offset += arr.length; - } - return out; -} -function arraysEqual(a, b) { - if (a.length !== b.length) { - return false; - } - for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) { - return false; - } - } - return true; -} +/** + * A slicer as used by {@link util.pool}. + * @typedef PoolSlicer + * @type {function} + * @param {number} start Start offset + * @param {number} end End offset + * @returns {Uint8Array} Buffer slice + * @this {Uint8Array} + */ -exports.arrayToString = arrayToString; -exports.arraysEqual = arraysEqual; -exports.mergeArrays = mergeArrays; -exports.stringToArray = stringToArray; +/** + * A general purpose buffer pool. + * @memberof util + * @function + * @param {PoolAllocator} alloc Allocator + * @param {PoolSlicer} slice Slicer + * @param {number} [size=8192] Slab size + * @returns {PoolAllocator} Pooled allocator + */ +function pool(alloc, slice, size) { + var SIZE = size || 8192; + var MAX = SIZE >>> 1; + var slab = null; + var offset = SIZE; + return function pool_alloc(size) { + if (size < 1 || size > MAX) + return alloc(size); + if (offset + size > SIZE) { + slab = alloc(SIZE); + offset = 0; + } + var buf = slice.call(slab, offset, offset += size); + if (offset & 7) // align to 32 bit + offset = (offset | 7) + 1; + return buf; + }; +} /***/ }), -/***/ 67022: -/***/ ((module, exports, __nccwpck_require__) => { - -"use strict"; -/** - * @author Toru Nagashima - * See LICENSE file in root directory for full license. - */ - +/***/ 30105: +======= +/***/ 14466: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { -Object.defineProperty(exports, "__esModule", ({ value: true })); -var eventTargetShim = __nccwpck_require__(69685); /** - * The signal class. - * @see https://dom.spec.whatwg.org/#abortsignal - */ -class AbortSignal extends eventTargetShim.EventTarget { - /** - * AbortSignal cannot be constructed directly. - */ - constructor() { - super(); - throw new TypeError("AbortSignal cannot be constructed directly"); - } - /** - * Returns `true` if this `AbortSignal`'s `AbortController` has signaled to abort, and `false` otherwise. - */ - get aborted() { - const aborted = abortedFlags.get(this); - if (typeof aborted !== "boolean") { - throw new TypeError(`Expected 'this' to be an 'AbortSignal' object, but got ${this === null ? "null" : typeof this}`); - } - return aborted; - } -} -eventTargetShim.defineEventAttribute(AbortSignal.prototype, "abort"); -/** - * Create an AbortSignal object. + * A minimal UTF8 implementation for number arrays. + * @memberof util + * @namespace */ -function createAbortSignal() { - const signal = Object.create(AbortSignal.prototype); - eventTargetShim.EventTarget.call(signal); - abortedFlags.set(signal, false); - return signal; -} +var utf8 = exports; + /** - * Abort a given signal. + * Calculates the UTF8 byte length of a string. + * @param {string} string String + * @returns {number} Byte length */ -function abortSignal(signal) { - if (abortedFlags.get(signal) !== false) { - return; +utf8.length = function utf8_length(string) { + var len = 0, + c = 0; + for (var i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) + len += 1; + else if (c < 2048) + len += 2; + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } else + len += 3; } - abortedFlags.set(signal, true); - signal.dispatchEvent({ type: "abort" }); -} + return len; +}; + /** - * Aborted flag for each instances. + * Reads UTF8 bytes as a string. + * @param {Uint8Array} buffer Source buffer + * @param {number} start Source start + * @param {number} end Source end + * @returns {string} String read */ -const abortedFlags = new WeakMap(); -// Properties should be enumerable. -Object.defineProperties(AbortSignal.prototype, { - aborted: { enumerable: true }, -}); -// `toString()` should return `"[object AbortSignal]"` -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortSignal.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortSignal", - }); -} +utf8.read = function utf8_read(buffer, start, end) { + var len = end - start; + if (len < 1) + return ""; + var parts = null, + chunk = [], + i = 0, // char offset + t; // temporary + while (start < end) { + t = buffer[start++]; + if (t < 128) + chunk[i++] = t; + else if (t > 191 && t < 224) + chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } else + chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; + if (i > 8191) { + (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts) { + if (i) + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + return parts.join(""); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +}; /** - * The AbortController. - * @see https://dom.spec.whatwg.org/#abortcontroller + * Writes a string as UTF8 bytes. + * @param {string} string Source string + * @param {Uint8Array} buffer Destination buffer + * @param {number} offset Destination offset + * @returns {number} Bytes written */ +utf8.write = function utf8_write(string, buffer, offset) { + var start = offset, + c1, // character 1 + c2; // character 2 + for (var i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return offset - start; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 46612: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +======= +/***/ 67022: +/***/ ((module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AbortController = void 0; +const AbortSignal_1 = __nccwpck_require__(51015); class AbortController { - /** - * Initialize this controller. - */ constructor() { - signals.set(this, createAbortSignal()); - } - /** - * Returns the `AbortSignal` object associated with this object. - */ - get signal() { - return getSignal(this); + this.signal = new AbortSignal_1.AbortSignal(); } - /** - * Abort and signal to any observers that the associated activity is to be aborted. - */ abort() { - abortSignal(getSignal(this)); - } -} -/** - * Associated signals. - */ -const signals = new WeakMap(); -/** - * Get the associated signal of a given controller. - */ -function getSignal(controller) { - const signal = signals.get(controller); - if (signal == null) { - throw new TypeError(`Expected 'this' to be an 'AbortController' object, but got ${controller === null ? "null" : typeof controller}`); + this.signal.abort(); } - return signal; -} -// Properties should be enumerable. -Object.defineProperties(AbortController.prototype, { - signal: { enumerable: true }, - abort: { enumerable: true }, -}); -if (typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol") { - Object.defineProperty(AbortController.prototype, Symbol.toStringTag, { - configurable: true, - value: "AbortController", - }); } - exports.AbortController = AbortController; -exports.AbortSignal = AbortSignal; -exports["default"] = AbortController; - -module.exports = AbortController -module.exports.AbortController = module.exports["default"] = AbortController -module.exports.AbortSignal = AbortSignal -//# sourceMappingURL=abort-controller.js.map /***/ }), -/***/ 65618: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 51015: +/***/ ((__unused_webpack_module, exports) => { -const { AbortController } = __nccwpck_require__(43586) -/** - * Takes an array of AbortSignals and returns a single signal. - * If any signals are aborted, the returned signal will be aborted. - * @param {Array} signals - * @returns {AbortSignal} - */ -function anySignal (signals) { - const controller = new AbortController() +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AbortSignal = void 0; +class AbortSignal { + constructor() { + this.onabort = null; + this._aborted = false; + Object.defineProperty(this, "_aborted", { + value: false, + writable: true, + }); + } + get aborted() { + return this._aborted; + } + abort() { + this._aborted = true; + if (this.onabort) { + this.onabort(this); + this.onabort = null; + } + } +} +exports.AbortSignal = AbortSignal; - function onAbort () { - controller.abort() - for (const signal of signals) { - if (!signal || !signal.removeEventListener) continue - signal.removeEventListener('abort', onAbort) - } - } +/***/ }), - for (const signal of signals) { - if (!signal || !signal.addEventListener) continue - if (signal.aborted) { - onAbort() - break - } - signal.addEventListener('abort', onAbort) - } +/***/ 82655: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return controller.signal -} -module.exports = anySignal -module.exports.anySignal = anySignal +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(35025); +tslib_1.__exportStar(__nccwpck_require__(46612), exports); +tslib_1.__exportStar(__nccwpck_require__(51015), exports); /***/ }), -/***/ 66058: +/***/ 35025: /***/ ((module) => { -"use strict"; - -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - var r = range(a, b, str); + __assign = Object.assign || function (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; + }; - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} + __rest = function (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 maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} + __decorate = function (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; + }; -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); - var i = ai; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; + __esDecorate = function (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)); }; + 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; + }; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; + __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; + }; - bi = str.indexOf(b, i + 1); - } + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - i = ai < bi && ai >= 0 ? ai : bi; - } + __setFunctionName = function (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 }); + }; - if (begs.length) { - result = [ left, right ]; - } - } + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - return result; -} + __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()); + }); + }; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; -/***/ }), + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -/***/ 87455: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -"use strict"; + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -const { Buffer } = __nccwpck_require__(14300) -const symbol = Symbol.for('BufferList') + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; -function BufferList (buf) { - if (!(this instanceof BufferList)) { - return new BufferList(buf) - } + /** @deprecated */ + __spreadArrays = function () { + 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; + }; - BufferList._init.call(this, buf) -} + __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)); + }; -BufferList._init = function _init (buf) { - Object.defineProperty(this, symbol, { value: true }) + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - this._bufs = [] - this.length = 0 + __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(n, v); }); }; } + 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]); } + }; - if (buf) { - this.append(buf) - } -} + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -BufferList.prototype._new = function _new (buf) { - return new BufferList(buf) -} + __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); } + }; -BufferList.prototype._offset = function _offset (offset) { - if (offset === 0) { - return [0, 0] - } + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - let tot = 0 + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - for (let i = 0; i < this._bufs.length; i++) { - const _t = tot + this._bufs[i].length - if (offset < _t || i === this._bufs.length - 1) { - return [i, offset - tot] - } - tot = _t - } -} + __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; + }; -BufferList.prototype._reverseOffset = function (blOffset) { - const bufferId = blOffset[0] - let offset = blOffset[1] + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - for (let i = 0; i < bufferId; i++) { - offset += this._bufs[i].length - } + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - return offset -} + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -BufferList.prototype.get = function get (index) { - if (index > this.length || index < 0) { - return undefined - } + __classPrivateFieldIn = function (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); + }; - const offset = this._offset(index) + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - return this._bufs[offset[0]][offset[1]] -} + 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; + }; -BufferList.prototype.slice = function slice (start, end) { - if (typeof start === 'number' && start < 0) { - start += this.length - } + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; - if (typeof end === 'number' && end < 0) { - end += this.length - } + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); - return this.copy(null, 0, start, end) -} -BufferList.prototype.copy = function copy (dst, dstStart, srcStart, srcEnd) { - if (typeof srcStart !== 'number' || srcStart < 0) { - srcStart = 0 - } +/***/ }), - if (typeof srcEnd !== 'number' || srcEnd > this.length) { - srcEnd = this.length - } +/***/ 94551: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (srcStart >= this.length) { - return dst || Buffer.alloc(0) - } - if (srcEnd <= 0) { - return dst || Buffer.alloc(0) - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = exports.DEFAULT_USE_DUALSTACK_ENDPOINT = exports.CONFIG_USE_DUALSTACK_ENDPOINT = exports.ENV_USE_DUALSTACK_ENDPOINT = void 0; +const util_config_provider_1 = __nccwpck_require__(32617); +exports.ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; +exports.CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; +exports.DEFAULT_USE_DUALSTACK_ENDPOINT = false; +exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, util_config_provider_1.booleanSelector)(env, exports.ENV_USE_DUALSTACK_ENDPOINT, util_config_provider_1.SelectorType.ENV), + configFileSelector: (profile) => (0, util_config_provider_1.booleanSelector)(profile, exports.CONFIG_USE_DUALSTACK_ENDPOINT, util_config_provider_1.SelectorType.CONFIG), + default: false, +}; - const copy = !!dst - const off = this._offset(srcStart) - const len = srcEnd - srcStart - let bytes = len - let bufoff = (copy && dstStart) || 0 - let start = off[1] - // copy/slice everything - if (srcStart === 0 && srcEnd === this.length) { - if (!copy) { - // slice, but full concat if multiple buffers - return this._bufs.length === 1 - ? this._bufs[0] - : Buffer.concat(this._bufs, this.length) - } +/***/ }), - // copy, need to copy individual buffers - for (let i = 0; i < this._bufs.length; i++) { - this._bufs[i].copy(dst, bufoff) - bufoff += this._bufs[i].length - } +/***/ 3364: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return dst - } - // easy, cheap case where it's a subset of one of the buffers - if (bytes <= this._bufs[off[0]].length - start) { - return copy - ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) - : this._bufs[off[0]].slice(start, start + bytes) - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = exports.DEFAULT_USE_FIPS_ENDPOINT = exports.CONFIG_USE_FIPS_ENDPOINT = exports.ENV_USE_FIPS_ENDPOINT = void 0; +const util_config_provider_1 = __nccwpck_require__(32617); +exports.ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; +exports.CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; +exports.DEFAULT_USE_FIPS_ENDPOINT = false; +exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => (0, util_config_provider_1.booleanSelector)(env, exports.ENV_USE_FIPS_ENDPOINT, util_config_provider_1.SelectorType.ENV), + configFileSelector: (profile) => (0, util_config_provider_1.booleanSelector)(profile, exports.CONFIG_USE_FIPS_ENDPOINT, util_config_provider_1.SelectorType.CONFIG), + default: false, +}; - if (!copy) { - // a slice, we need something to copy in to - dst = Buffer.allocUnsafe(len) - } - for (let i = off[0]; i < this._bufs.length; i++) { - const l = this._bufs[i].length - start +/***/ }), - if (bytes > l) { - this._bufs[i].copy(dst, bufoff, start) - bufoff += l - } else { - this._bufs[i].copy(dst, bufoff, start, start + bytes) - bufoff += l - break - } +/***/ 62681: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - bytes -= l - if (start) { - start = 0 - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(86002); +tslib_1.__exportStar(__nccwpck_require__(94551), exports); +tslib_1.__exportStar(__nccwpck_require__(3364), exports); +tslib_1.__exportStar(__nccwpck_require__(83451), exports); +tslib_1.__exportStar(__nccwpck_require__(81765), exports); - // safeguard so that we don't return uninitialized memory - if (dst.length > bufoff) return dst.slice(0, bufoff) - return dst -} +/***/ }), -BufferList.prototype.shallowSlice = function shallowSlice (start, end) { - start = start || 0 - end = typeof end !== 'number' ? this.length : end +/***/ 83451: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (start < 0) { - start += this.length - } - if (end < 0) { - end += this.length - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveCustomEndpointsConfig = void 0; +const util_middleware_1 = __nccwpck_require__(81243); +const resolveCustomEndpointsConfig = (input) => { + var _a, _b; + const { endpoint, urlParser } = input; + return { + ...input, + tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true, + endpoint: (0, util_middleware_1.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint), + isCustomEndpoint: true, + useDualstackEndpoint: (0, util_middleware_1.normalizeProvider)((_b = input.useDualstackEndpoint) !== null && _b !== void 0 ? _b : false), + }; +}; +exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig; - if (start === end) { - return this._new() - } - const startOffset = this._offset(start) - const endOffset = this._offset(end) - const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1) +/***/ }), - if (endOffset[1] === 0) { - buffers.pop() - } else { - buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1]) - } +/***/ 81765: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (startOffset[1] !== 0) { - buffers[0] = buffers[0].slice(startOffset[1]) - } - return this._new(buffers) -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveEndpointsConfig = void 0; +const util_middleware_1 = __nccwpck_require__(81243); +const getEndpointFromRegion_1 = __nccwpck_require__(61811); +const resolveEndpointsConfig = (input) => { + var _a, _b; + const useDualstackEndpoint = (0, util_middleware_1.normalizeProvider)((_a = input.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false); + const { endpoint, useFipsEndpoint, urlParser } = input; + return { + ...input, + tls: (_b = input.tls) !== null && _b !== void 0 ? _b : true, + endpoint: endpoint + ? (0, util_middleware_1.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) + : () => (0, getEndpointFromRegion_1.getEndpointFromRegion)({ ...input, useDualstackEndpoint, useFipsEndpoint }), + isCustomEndpoint: !!endpoint, + useDualstackEndpoint, + }; +}; +exports.resolveEndpointsConfig = resolveEndpointsConfig; -BufferList.prototype.toString = function toString (encoding, start, end) { - return this.slice(start, end).toString(encoding) -} -BufferList.prototype.consume = function consume (bytes) { - // first, normalize the argument, in accordance with how Buffer does it - bytes = Math.trunc(bytes) - // do nothing if not a positive number - if (Number.isNaN(bytes) || bytes <= 0) return this +/***/ }), - while (this._bufs.length) { - if (bytes >= this._bufs[0].length) { - bytes -= this._bufs[0].length - this.length -= this._bufs[0].length - this._bufs.shift() - } else { - this._bufs[0] = this._bufs[0].slice(bytes) - this.length -= bytes - break - } - } +/***/ 61811: +/***/ ((__unused_webpack_module, exports) => { - return this -} -BufferList.prototype.duplicate = function duplicate () { - const copy = this._new() +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointFromRegion = void 0; +const getEndpointFromRegion = async (input) => { + var _a; + const { tls = true } = input; + const region = await input.region(); + const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/); + if (!dnsHostRegex.test(region)) { + throw new Error("Invalid region in client config"); + } + const useDualstackEndpoint = await input.useDualstackEndpoint(); + const useFipsEndpoint = await input.useFipsEndpoint(); + const { hostname } = (_a = (await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }))) !== null && _a !== void 0 ? _a : {}; + if (!hostname) { + throw new Error("Cannot resolve hostname from client config"); + } + return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`); +}; +exports.getEndpointFromRegion = getEndpointFromRegion; - for (let i = 0; i < this._bufs.length; i++) { - copy.append(this._bufs[i]) - } - return copy -} +/***/ }), -BufferList.prototype.append = function append (buf) { - if (buf == null) { - return this - } +/***/ 66041: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (buf.buffer) { - // append a view of the underlying ArrayBuffer - this._appendBuffer(Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength)) - } else if (Array.isArray(buf)) { - for (let i = 0; i < buf.length; i++) { - this.append(buf[i]) - } - } else if (this._isBufferList(buf)) { - // unwrap argument into individual BufferLists - for (let i = 0; i < buf._bufs.length; i++) { - this.append(buf._bufs[i]) - } - } else { - // coerce number arguments to strings, since Buffer(number) does - // uninitialized memory allocation - if (typeof buf === 'number') { - buf = buf.toString() - } - this._appendBuffer(Buffer.from(buf)) - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(86002); +tslib_1.__exportStar(__nccwpck_require__(62681), exports); +tslib_1.__exportStar(__nccwpck_require__(44772), exports); +tslib_1.__exportStar(__nccwpck_require__(66563), exports); - return this -} -BufferList.prototype._appendBuffer = function appendBuffer (buf) { - this._bufs.push(buf) - this.length += buf.length -} +/***/ }), -BufferList.prototype.indexOf = function (search, offset, encoding) { - if (encoding === undefined && typeof offset === 'string') { - encoding = offset - offset = undefined - } +/***/ 6817: +/***/ ((__unused_webpack_module, exports) => { - if (typeof search === 'function' || Array.isArray(search)) { - throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.') - } else if (typeof search === 'number') { - search = Buffer.from([search]) - } else if (typeof search === 'string') { - search = Buffer.from(search, encoding) - } else if (this._isBufferList(search)) { - search = search.slice() - } else if (Array.isArray(search.buffer)) { - search = Buffer.from(search.buffer, search.byteOffset, search.byteLength) - } else if (!Buffer.isBuffer(search)) { - search = Buffer.from(search) - } - offset = Number(offset || 0) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_REGION_CONFIG_FILE_OPTIONS = exports.NODE_REGION_CONFIG_OPTIONS = exports.REGION_INI_NAME = exports.REGION_ENV_NAME = void 0; +exports.REGION_ENV_NAME = "AWS_REGION"; +exports.REGION_INI_NAME = "region"; +exports.NODE_REGION_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[exports.REGION_ENV_NAME], + configFileSelector: (profile) => profile[exports.REGION_INI_NAME], + default: () => { + throw new Error("Region is missing"); + }, +}; +exports.NODE_REGION_CONFIG_FILE_OPTIONS = { + preferredFile: "credentials", +}; - if (isNaN(offset)) { - offset = 0 - } - if (offset < 0) { - offset = this.length + offset - } +/***/ }), - if (offset < 0) { - offset = 0 - } +/***/ 80356: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (search.length === 0) { - return offset > this.length ? this.length : offset - } - const blOffset = this._offset(offset) - let blIndex = blOffset[0] // index of which internal buffer we're working on - let buffOffset = blOffset[1] // offset of the internal buffer we're working on +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRealRegion = void 0; +const isFipsRegion_1 = __nccwpck_require__(39753); +const getRealRegion = (region) => (0, isFipsRegion_1.isFipsRegion)(region) + ? ["fips-aws-global", "aws-fips"].includes(region) + ? "us-east-1" + : region.replace(/fips-(dkr-|prod-)?|-fips/, "") + : region; +exports.getRealRegion = getRealRegion; - // scan over each buffer - for (; blIndex < this._bufs.length; blIndex++) { - const buff = this._bufs[blIndex] - while (buffOffset < buff.length) { - const availableWindow = buff.length - buffOffset +/***/ }), - if (availableWindow >= search.length) { - const nativeSearchResult = buff.indexOf(search, buffOffset) +/***/ 44772: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (nativeSearchResult !== -1) { - return this._reverseOffset([blIndex, nativeSearchResult]) - } - buffOffset = buff.length - search.length + 1 // end of native search window - } else { - const revOffset = this._reverseOffset([blIndex, buffOffset]) +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(86002); +tslib_1.__exportStar(__nccwpck_require__(6817), exports); +tslib_1.__exportStar(__nccwpck_require__(14096), exports); - if (this._match(revOffset, search)) { - return revOffset - } - buffOffset++ - } - } +/***/ }), - buffOffset = 0 - } +/***/ 39753: +/***/ ((__unused_webpack_module, exports) => { - return -1 -} -BufferList.prototype._match = function (offset, search) { - if (this.length - offset < search.length) { - return false - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isFipsRegion = void 0; +const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips")); +exports.isFipsRegion = isFipsRegion; - for (let searchOffset = 0; searchOffset < search.length; searchOffset++) { - if (this.get(offset + searchOffset) !== search[searchOffset]) { - return false - } - } - return true -} -;(function () { - const methods = { - readDoubleBE: 8, - readDoubleLE: 8, - readFloatBE: 4, - readFloatLE: 4, - readInt32BE: 4, - readInt32LE: 4, - readUInt32BE: 4, - readUInt32LE: 4, - readInt16BE: 2, - readInt16LE: 2, - readUInt16BE: 2, - readUInt16LE: 2, - readInt8: 1, - readUInt8: 1, - readIntBE: null, - readIntLE: null, - readUIntBE: null, - readUIntLE: null - } - - for (const m in methods) { - (function (m) { - if (methods[m] === null) { - BufferList.prototype[m] = function (offset, byteLength) { - return this.slice(offset, offset + byteLength)[m](0, byteLength) - } - } else { - BufferList.prototype[m] = function (offset = 0) { - return this.slice(offset, offset + methods[m])[m](0) - } - } - }(m)) - } -}()) +/***/ }), -// Used internally by the class and also as an indicator of this object being -// a `BufferList`. It's not possible to use `instanceof BufferList` in a browser -// environment because there could be multiple different copies of the -// BufferList class and some `BufferList`s might be `BufferList`s. -BufferList.prototype._isBufferList = function _isBufferList (b) { - return b instanceof BufferList || BufferList.isBufferList(b) -} +/***/ 14096: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -BufferList.isBufferList = function isBufferList (b) { - return b != null && b[symbol] -} -module.exports = BufferList +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveRegionConfig = void 0; +const getRealRegion_1 = __nccwpck_require__(80356); +const isFipsRegion_1 = __nccwpck_require__(39753); +const resolveRegionConfig = (input) => { + const { region, useFipsEndpoint } = input; + if (!region) { + throw new Error("Region is missing"); + } + return { + ...input, + region: async () => { + if (typeof region === "string") { + return (0, getRealRegion_1.getRealRegion)(region); + } + const providedRegion = await region(); + return (0, getRealRegion_1.getRealRegion)(providedRegion); + }, + useFipsEndpoint: async () => { + const providedRegion = typeof region === "string" ? region : await region(); + if ((0, isFipsRegion_1.isFipsRegion)(providedRegion)) { + return true; + } + return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); + }, + }; +}; +exports.resolveRegionConfig = resolveRegionConfig; /***/ }), -/***/ 74827: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 51127: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; -/* eslint-env browser */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +======= +var eventTargetShim = __nccwpck_require__(69685); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -const browserReadableStreamToIt = __nccwpck_require__(31049) +/***/ }), -/** - * @param {Blob} blob - * @returns {AsyncIterable} - */ -function blobToIt (blob) { - if (typeof blob.stream === 'function') { - // @ts-ignore missing some properties - return browserReadableStreamToIt(blob.stream()) - } +/***/ 92375: +/***/ ((__unused_webpack_module, exports) => { - // firefox < 69 does not support blob.stream() - // @ts-ignore - response.body is optional, but in practice it's a stream. - return browserReadableStreamToIt(new Response(blob).body) -} -module.exports = blobToIt +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 57453: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 90764: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHostnameFromVariants = void 0; +const getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => { + var _a; + return (_a = variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))) === null || _a === void 0 ? void 0 : _a.hostname; +}; +exports.getHostnameFromVariants = getHostnameFromVariants; -var drain = __nccwpck_require__(85041); -var filter = __nccwpck_require__(78883); -var take = __nccwpck_require__(16346); -var all = __nccwpck_require__(81172); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var drain__default = /*#__PURE__*/_interopDefaultLegacy(drain); -var filter__default = /*#__PURE__*/_interopDefaultLegacy(filter); -var take__default = /*#__PURE__*/_interopDefaultLegacy(take); -var all__default = /*#__PURE__*/_interopDefaultLegacy(all); +/***/ 29977: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const sortAll = (iterable, sorter) => { - return async function* () { - const values = await all__default["default"](iterable); - yield* values.sort(sorter); - }(); -}; -class BaseBlockstore { - open() { - return Promise.reject(new Error('.open is not implemented')); - } - close() { - return Promise.reject(new Error('.close is not implemented')); - } - put(key, val, options) { - return Promise.reject(new Error('.put is not implemented')); - } - get(key, options) { - return Promise.reject(new Error('.get is not implemented')); - } - has(key, options) { - return Promise.reject(new Error('.has is not implemented')); - } - delete(key, options) { - return Promise.reject(new Error('.delete is not implemented')); - } - async *putMany(source, options = {}) { - for await (const {key, value} of source) { - await this.put(key, value, options); - yield { - key, - value - }; - } - } - async *getMany(source, options = {}) { - for await (const key of source) { - yield this.get(key, options); - } - } - async *deleteMany(source, options = {}) { - for await (const key of source) { - await this.delete(key, options); - yield key; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRegionInfo = void 0; +const getHostnameFromVariants_1 = __nccwpck_require__(90764); +const getResolvedHostname_1 = __nccwpck_require__(998); +const getResolvedPartition_1 = __nccwpck_require__(67891); +const getResolvedSigningRegion_1 = __nccwpck_require__(273); +const getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash, }) => { + var _a, _b, _c, _d, _e, _f; + const partition = (0, getResolvedPartition_1.getResolvedPartition)(region, { partitionHash }); + const resolvedRegion = region in regionHash ? region : (_b = (_a = partitionHash[partition]) === null || _a === void 0 ? void 0 : _a.endpoint) !== null && _b !== void 0 ? _b : region; + const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint }; + const regionHostname = (0, getHostnameFromVariants_1.getHostnameFromVariants)((_c = regionHash[resolvedRegion]) === null || _c === void 0 ? void 0 : _c.variants, hostnameOptions); + const partitionHostname = (0, getHostnameFromVariants_1.getHostnameFromVariants)((_d = partitionHash[partition]) === null || _d === void 0 ? void 0 : _d.variants, hostnameOptions); + const hostname = (0, getResolvedHostname_1.getResolvedHostname)(resolvedRegion, { regionHostname, partitionHostname }); + if (hostname === undefined) { + throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`); } - } - batch() { - let puts = []; - let dels = []; + const signingRegion = (0, getResolvedSigningRegion_1.getResolvedSigningRegion)(hostname, { + signingRegion: (_e = regionHash[resolvedRegion]) === null || _e === void 0 ? void 0 : _e.signingRegion, + regionRegex: partitionHash[partition].regionRegex, + useFipsEndpoint, + }); return { - put(key, value) { - puts.push({ - key, - value - }); - }, - delete(key) { - dels.push(key); - }, - commit: async options => { - await drain__default["default"](this.putMany(puts, options)); - puts = []; - await drain__default["default"](this.deleteMany(dels, options)); - dels = []; - } + partition, + signingService, + hostname, + ...(signingRegion && { signingRegion }), + ...(((_f = regionHash[resolvedRegion]) === null || _f === void 0 ? void 0 : _f.signingService) && { + signingService: regionHash[resolvedRegion].signingService, + }), }; - } - async *_all(q, options) { - throw new Error('._all is not implemented'); - } - async *_allKeys(q, options) { - throw new Error('._allKeys is not implemented'); - } - query(q, options) { - let it = this._all(q, options); - if (q.prefix != null) { - it = filter__default["default"](it, e => e.key.toString().startsWith(q.prefix || '')); - } - if (Array.isArray(q.filters)) { - it = q.filters.reduce((it, f) => filter__default["default"](it, f), it); - } - if (Array.isArray(q.orders)) { - it = q.orders.reduce((it, f) => sortAll(it, f), it); - } - if (q.offset != null) { - let i = 0; - it = filter__default["default"](it, () => i++ >= (q.offset || 0)); - } - if (q.limit != null) { - it = take__default["default"](it, q.limit); - } - return it; - } - queryKeys(q, options) { - let it = this._allKeys(q, options); - if (q.prefix != null) { - it = filter__default["default"](it, cid => cid.toString().startsWith(q.prefix || '')); - } - if (Array.isArray(q.filters)) { - it = q.filters.reduce((it, f) => filter__default["default"](it, f), it); - } - if (Array.isArray(q.orders)) { - it = q.orders.reduce((it, f) => sortAll(it, f), it); - } - if (q.offset != null) { - let i = 0; - it = filter__default["default"](it, () => i++ >= q.offset); - } - if (q.limit != null) { - it = take__default["default"](it, q.limit); - } - return it; - } -} - -exports.BaseBlockstore = BaseBlockstore; +}; +exports.getRegionInfo = getRegionInfo; /***/ }), -/***/ 36200: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 998: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getResolvedHostname = void 0; +const getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname + ? regionHostname + : partitionHostname + ? partitionHostname.replace("{region}", resolvedRegion) + : undefined; +exports.getResolvedHostname = getResolvedHostname; + + +/***/ }), + +/***/ 67891: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getResolvedPartition = void 0; +const getResolvedPartition = (region, { partitionHash }) => { var _a; return (_a = Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region))) !== null && _a !== void 0 ? _a : "aws"; }; +exports.getResolvedPartition = getResolvedPartition; -var errCode = __nccwpck_require__(5822); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +/***/ 273: +/***/ ((__unused_webpack_module, exports) => { -function notFoundError(err) { - err = err || new Error('Not Found'); - return errCode__default["default"](err, 'ERR_NOT_FOUND'); -} -function abortedError(err) { - err = err || new Error('Aborted'); - return errCode__default["default"](err, 'ERR_ABORTED'); -} -exports.abortedError = abortedError; -exports.notFoundError = notFoundError; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getResolvedSigningRegion = void 0; +const getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => { + if (signingRegion) { + return signingRegion; + } + else if (useFipsEndpoint) { + const regionRegexJs = regionRegex.replace("\\\\", "\\").replace(/^\^/g, "\\.").replace(/\$$/g, "\\."); + const regionRegexmatchArray = hostname.match(regionRegexJs); + if (regionRegexmatchArray) { + return regionRegexmatchArray[0].slice(1, -1); + } + } +}; +exports.getResolvedSigningRegion = getResolvedSigningRegion; /***/ }), -/***/ 95301: +/***/ 66563: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(86002); +tslib_1.__exportStar(__nccwpck_require__(51127), exports); +tslib_1.__exportStar(__nccwpck_require__(92375), exports); +tslib_1.__exportStar(__nccwpck_require__(29977), exports); -var errors = __nccwpck_require__(36200); -var base = __nccwpck_require__(57453); -var memory = __nccwpck_require__(6584); -const Errors = { ...errors }; +/***/ }), -exports.BaseBlockstore = base.BaseBlockstore; -exports.MemoryBlockstore = memory.MemoryBlockstore; -exports.Errors = Errors; +/***/ 86002: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -/***/ }), + __assign = Object.assign || function (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; + }; -/***/ 6584: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __rest = function (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; + }; -"use strict"; + __decorate = function (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; + }; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __esDecorate = function (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)); }; + 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; + }; -var base = __nccwpck_require__(57453); -var base32 = __nccwpck_require__(70784); -var raw = __nccwpck_require__(4848); -var cid = __nccwpck_require__(24247); -var Digest = __nccwpck_require__(81168); -var errors = __nccwpck_require__(36200); + __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; + }; -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + + __setFunctionName = function (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 }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); }); - } + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; }); - } - n["default"] = e; - return Object.freeze(n); -} -var raw__namespace = /*#__PURE__*/_interopNamespace(raw); -var Digest__namespace = /*#__PURE__*/_interopNamespace(Digest); + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -class MemoryBlockstore extends base.BaseBlockstore { - constructor() { - super(); - this.data = {}; - } - open() { - return Promise.resolve(); - } - close() { - return Promise.resolve(); - } - async put(key, val) { - this.data[base32.base32.encode(key.multihash.bytes)] = val; - } - async get(key) { - const exists = await this.has(key); - if (!exists) - throw errors.notFoundError(); - return this.data[base32.base32.encode(key.multihash.bytes)]; - } - async has(key) { - return this.data[base32.base32.encode(key.multihash.bytes)] !== undefined; - } - async delete(key) { - delete this.data[base32.base32.encode(key.multihash.bytes)]; - } - async *_all() { - yield* Object.entries(this.data).map(([key, value]) => ({ - key: cid.CID.createV1(raw__namespace.code, Digest__namespace.decode(base32.base32.decode(key))), - value - })); - } - async *_allKeys() { - yield* Object.entries(this.data).map(([key]) => cid.CID.createV1(raw__namespace.code, Digest__namespace.decode(base32.base32.decode(key)))); - } -} + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -exports.MemoryBlockstore = MemoryBlockstore; + /** @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 = 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; + }; -/***/ }), + __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)); + }; -/***/ 73594: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -var concatMap = __nccwpck_require__(73132); -var balanced = __nccwpck_require__(66058); + __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(n, v); }); }; } + 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]); } + }; -module.exports = expandTop; + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; + __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); } + }; -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} + __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; + }; + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - var parts = []; - var m = balanced('{', '}', str); + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - if (!m) - return str.split(','); + __classPrivateFieldIn = function (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); + }; - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } + 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; + }; - parts.push.apply(parts, p); + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; - return parts; -} + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); -function expandTop(str) { - if (!str) - return []; - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } +/***/ }), - return expand(escapeBraces(str), true).map(unescapeBraces); -} +/***/ 85646: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function identity(e) { - return e; -} -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSmithyContext = void 0; +const types_1 = __nccwpck_require__(75751); +const getSmithyContext = (context) => context[types_1.SMITHY_CONTEXT_KEY] || (context[types_1.SMITHY_CONTEXT_KEY] = {}); +exports.getSmithyContext = getSmithyContext; -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} -function expand(str, isTop) { - var expansions = []; +/***/ }), - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; +/***/ 53938: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - 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.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - if (isSequence) { - var x = numeric(n[0]); - 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 < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPaginator = void 0; +const tslib_1 = __nccwpck_require__(6605); +tslib_1.__exportStar(__nccwpck_require__(85286), exports); +tslib_1.__exportStar(__nccwpck_require__(51847), exports); +tslib_1.__exportStar(__nccwpck_require__(38461), exports); +tslib_1.__exportStar(__nccwpck_require__(85646), exports); +tslib_1.__exportStar(__nccwpck_require__(60235), exports); +tslib_1.__exportStar(__nccwpck_require__(29962), exports); +var createPaginator_1 = __nccwpck_require__(35966); +Object.defineProperty(exports, "createPaginator", ({ enumerable: true, get: function () { return createPaginator_1.createPaginator; } })); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { 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]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } +/***/ 43742: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return expansions; -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHttpAuthSchemeEndpointRuleSetPlugin = exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions = void 0; +const middleware_endpoint_1 = __nccwpck_require__(24916); +const httpAuthSchemeMiddleware_1 = __nccwpck_require__(30637); +exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: middleware_endpoint_1.endpointMiddlewareOptions.name, +}; +const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo((0, httpAuthSchemeMiddleware_1.httpAuthSchemeMiddleware)(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider, + }), exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions); + }, +}); +exports.getHttpAuthSchemeEndpointRuleSetPlugin = getHttpAuthSchemeEndpointRuleSetPlugin; /***/ }), -/***/ 31049: -/***/ ((module) => { +/***/ 79619: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHttpAuthSchemePlugin = exports.httpAuthSchemeMiddlewareOptions = void 0; +const middleware_serde_1 = __nccwpck_require__(4247); +const httpAuthSchemeMiddleware_1 = __nccwpck_require__(30637); +exports.httpAuthSchemeMiddlewareOptions = { + step: "serialize", + tags: ["HTTP_AUTH_SCHEME"], + name: "httpAuthSchemeMiddleware", + override: true, + relation: "before", + toMiddleware: middleware_serde_1.serializerMiddlewareOption.name, +}; +const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo((0, httpAuthSchemeMiddleware_1.httpAuthSchemeMiddleware)(config, { + httpAuthSchemeParametersProvider, + identityProviderConfigProvider, + }), exports.httpAuthSchemeMiddlewareOptions); + }, +}); +exports.getHttpAuthSchemePlugin = getHttpAuthSchemePlugin; -/** - * Turns a browser readable stream into an async iterable. Async iteration over - * returned iterable will lock give stream, preventing any other consumer from - * acquiring a reader. The lock will be released if iteration loop is broken. To - * prevent stream cancelling optional `{ preventCancel: true }` could be passed - * as a second argument. - * @template T - * @param {ReadableStream} stream - * @param {Object} [options] - * @param {boolean} [options.preventCancel=boolean] - * @returns {AsyncIterable} - */ -async function * browserReadableStreamToIt (stream, options = {}) { - const reader = stream.getReader() - try { - while (true) { - const result = await reader.read() +/***/ }), - if (result.done) { - return - } +/***/ 30637: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - yield result.value - } - } finally { - if (options.preventCancel !== true) { - reader.cancel() - } - reader.releaseLock() - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.httpAuthSchemeMiddleware = void 0; +const types_1 = __nccwpck_require__(75751); +const util_middleware_1 = __nccwpck_require__(81243); +function convertHttpAuthSchemesToMap(httpAuthSchemes) { + const map = new Map(); + for (const scheme of httpAuthSchemes) { + map.set(scheme.schemeId, scheme); + } + return map; } - -module.exports = browserReadableStreamToIt +const httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => { + var _a; + const options = config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)); + const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes); + const smithyContext = (0, util_middleware_1.getSmithyContext)(context); + const failureReasons = []; + for (const option of options) { + const scheme = authSchemes.get(option.schemeId); + if (!scheme) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`); + continue; + } + const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config)); + if (!identityProvider) { + failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`); + continue; + } + const { identityProperties = {}, signingProperties = {} } = ((_a = option.propertiesExtractor) === null || _a === void 0 ? void 0 : _a.call(option, config, context)) || {}; + option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties); + option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties); + smithyContext.selectedHttpAuthScheme = { + httpAuthOption: option, + identity: await identityProvider(option.identityProperties), + signer: scheme.signer, + }; + break; + } + if (!smithyContext.selectedHttpAuthScheme) { + throw new Error(failureReasons.join("\n")); + } + return next(args); +}; +exports.httpAuthSchemeMiddleware = httpAuthSchemeMiddleware; /***/ }), -/***/ 12085: +/***/ 85286: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(6605); +tslib_1.__exportStar(__nccwpck_require__(30637), exports); +tslib_1.__exportStar(__nccwpck_require__(43742), exports); +tslib_1.__exportStar(__nccwpck_require__(79619), exports); -var encode = __nccwpck_require__(87446); -var decode = __nccwpck_require__(53216); -var token = __nccwpck_require__(90915); +/***/ }), + +/***/ 33121: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -exports.encode = encode.encode; -exports.decode = decode.decode; -exports.Token = token.Token; -exports.Type = token.Type; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHttpSigningPlugin = exports.httpSigningMiddlewareOptions = void 0; +const middleware_retry_1 = __nccwpck_require__(54801); +const httpSigningMiddleware_1 = __nccwpck_require__(96503); +exports.httpSigningMiddlewareOptions = { + step: "finalizeRequest", + tags: ["HTTP_SIGNING"], + name: "httpSigningMiddleware", + aliases: ["apiKeyMiddleware", "tokenMiddleware", "awsAuthMiddleware"], + override: true, + relation: "after", + toMiddleware: middleware_retry_1.retryMiddlewareOptions.name, +}; +const getHttpSigningPlugin = (config) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo((0, httpSigningMiddleware_1.httpSigningMiddleware)(config), exports.httpSigningMiddlewareOptions); + }, +}); +exports.getHttpSigningPlugin = getHttpSigningPlugin; /***/ }), -/***/ 80316: +/***/ 96503: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var token = __nccwpck_require__(90915); -var common = __nccwpck_require__(47907); - -const uintBoundaries = [ - 24, - 256, - 65536, - 4294967296, - BigInt('18446744073709551616') -]; -function readUint8(data, offset, options) { - common.assertEnoughData(data, offset, 1); - const value = data[offset]; - if (options.strict === true && value < uintBoundaries[0]) { - throw new Error(`${ common.decodeErrPrefix } integer encoded in more bytes than necessary (strict decode)`); - } - return value; -} -function readUint16(data, offset, options) { - common.assertEnoughData(data, offset, 2); - const value = data[offset] << 8 | data[offset + 1]; - if (options.strict === true && value < uintBoundaries[1]) { - throw new Error(`${ common.decodeErrPrefix } integer encoded in more bytes than necessary (strict decode)`); - } - return value; -} -function readUint32(data, offset, options) { - common.assertEnoughData(data, offset, 4); - const value = data[offset] * 16777216 + (data[offset + 1] << 16) + (data[offset + 2] << 8) + data[offset + 3]; - if (options.strict === true && value < uintBoundaries[2]) { - throw new Error(`${ common.decodeErrPrefix } integer encoded in more bytes than necessary (strict decode)`); - } - return value; -} -function readUint64(data, offset, options) { - common.assertEnoughData(data, offset, 8); - const hi = data[offset] * 16777216 + (data[offset + 1] << 16) + (data[offset + 2] << 8) + data[offset + 3]; - const lo = data[offset + 4] * 16777216 + (data[offset + 5] << 16) + (data[offset + 6] << 8) + data[offset + 7]; - const value = (BigInt(hi) << BigInt(32)) + BigInt(lo); - if (options.strict === true && value < uintBoundaries[3]) { - throw new Error(`${ common.decodeErrPrefix } integer encoded in more bytes than necessary (strict decode)`); - } - if (value <= Number.MAX_SAFE_INTEGER) { - return Number(value); - } - if (options.allowBigInt === true) { - return value; - } - throw new Error(`${ common.decodeErrPrefix } integers outside of the safe integer range are not supported`); -} -function decodeUint8(data, pos, _minor, options) { - return new token.Token(token.Type.uint, readUint8(data, pos + 1, options), 2); -} -function decodeUint16(data, pos, _minor, options) { - return new token.Token(token.Type.uint, readUint16(data, pos + 1, options), 3); -} -function decodeUint32(data, pos, _minor, options) { - return new token.Token(token.Type.uint, readUint32(data, pos + 1, options), 5); -} -function decodeUint64(data, pos, _minor, options) { - return new token.Token(token.Type.uint, readUint64(data, pos + 1, options), 9); -} -function encodeUint(buf, token) { - return encodeUintValue(buf, 0, token.value); -} -function encodeUintValue(buf, major, uint) { - if (uint < uintBoundaries[0]) { - const nuint = Number(uint); - buf.push([major | nuint]); - } else if (uint < uintBoundaries[1]) { - const nuint = Number(uint); - buf.push([ - major | 24, - nuint - ]); - } else if (uint < uintBoundaries[2]) { - const nuint = Number(uint); - buf.push([ - major | 25, - nuint >>> 8, - nuint & 255 - ]); - } else if (uint < uintBoundaries[3]) { - const nuint = Number(uint); - buf.push([ - major | 26, - nuint >>> 24 & 255, - nuint >>> 16 & 255, - nuint >>> 8 & 255, - nuint & 255 - ]); - } else { - const buint = BigInt(uint); - if (buint < uintBoundaries[4]) { - const set = [ - major | 27, - 0, - 0, - 0, - 0, - 0, - 0, - 0 - ]; - let lo = Number(buint & BigInt(4294967295)); - let hi = Number(buint >> BigInt(32) & BigInt(4294967295)); - set[8] = lo & 255; - lo = lo >> 8; - set[7] = lo & 255; - lo = lo >> 8; - set[6] = lo & 255; - lo = lo >> 8; - set[5] = lo & 255; - set[4] = hi & 255; - hi = hi >> 8; - set[3] = hi & 255; - hi = hi >> 8; - set[2] = hi & 255; - hi = hi >> 8; - set[1] = hi & 255; - buf.push(set); - } else { - throw new Error(`${ common.decodeErrPrefix } encountered BigInt larger than allowable range`); - } - } -} -encodeUint.encodedSize = function encodedSize(token) { - return encodeUintValue.encodedSize(token.value); -}; -encodeUintValue.encodedSize = function encodedSize(uint) { - if (uint < uintBoundaries[0]) { - return 1; - } - if (uint < uintBoundaries[1]) { - return 2; - } - if (uint < uintBoundaries[2]) { - return 3; - } - if (uint < uintBoundaries[3]) { - return 5; - } - return 9; +exports.httpSigningMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const types_1 = __nccwpck_require__(75751); +const util_middleware_1 = __nccwpck_require__(81243); +const defaultErrorHandler = (signingProperties) => (error) => { + throw error; }; -encodeUint.compareTokens = function compareTokens(tok1, tok2) { - return tok1.value < tok2.value ? -1 : tok1.value > tok2.value ? 1 : 0; +const defaultSuccessHandler = (httpResponse, signingProperties) => { }; +const httpSigningMiddleware = (config) => (next, context) => async (args) => { + if (!protocol_http_1.HttpRequest.isInstance(args.request)) { + return next(args); + } + const smithyContext = (0, util_middleware_1.getSmithyContext)(context); + const scheme = smithyContext.selectedHttpAuthScheme; + if (!scheme) { + throw new Error(`No HttpAuthScheme was selected: unable to sign request`); + } + const { httpAuthOption: { signingProperties = {} }, identity, signer, } = scheme; + const output = await next({ + ...args, + request: await signer.sign(args.request, identity, signingProperties), + }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties)); + (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties); + return output; }; - -exports.decodeUint16 = decodeUint16; -exports.decodeUint32 = decodeUint32; -exports.decodeUint64 = decodeUint64; -exports.decodeUint8 = decodeUint8; -exports.encodeUint = encodeUint; -exports.encodeUintValue = encodeUintValue; -exports.readUint16 = readUint16; -exports.readUint32 = readUint32; -exports.readUint64 = readUint64; -exports.readUint8 = readUint8; -exports.uintBoundaries = uintBoundaries; +exports.httpSigningMiddleware = httpSigningMiddleware; /***/ }), -/***/ 33709: +/***/ 51847: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(6605); +tslib_1.__exportStar(__nccwpck_require__(96503), exports); +tslib_1.__exportStar(__nccwpck_require__(33121), exports); -var token = __nccwpck_require__(90915); -var _0uint = __nccwpck_require__(80316); -var common = __nccwpck_require__(47907); - -function decodeNegint8(data, pos, _minor, options) { - return new token.Token(token.Type.negint, -1 - _0uint.readUint8(data, pos + 1, options), 2); -} -function decodeNegint16(data, pos, _minor, options) { - return new token.Token(token.Type.negint, -1 - _0uint.readUint16(data, pos + 1, options), 3); -} -function decodeNegint32(data, pos, _minor, options) { - return new token.Token(token.Type.negint, -1 - _0uint.readUint32(data, pos + 1, options), 5); -} -const neg1b = BigInt(-1); -const pos1b = BigInt(1); -function decodeNegint64(data, pos, _minor, options) { - const int = _0uint.readUint64(data, pos + 1, options); - if (typeof int !== 'bigint') { - const value = -1 - int; - if (value >= Number.MIN_SAFE_INTEGER) { - return new token.Token(token.Type.negint, value, 9); - } - } - if (options.allowBigInt !== true) { - throw new Error(`${ common.decodeErrPrefix } integers outside of the safe integer range are not supported`); - } - return new token.Token(token.Type.negint, neg1b - BigInt(int), 9); -} -function encodeNegint(buf, token) { - const negint = token.value; - const unsigned = typeof negint === 'bigint' ? negint * neg1b - pos1b : negint * -1 - 1; - _0uint.encodeUintValue(buf, token.type.majorEncoded, unsigned); -} -encodeNegint.encodedSize = function encodedSize(token) { - const negint = token.value; - const unsigned = typeof negint === 'bigint' ? negint * neg1b - pos1b : negint * -1 - 1; - if (unsigned < _0uint.uintBoundaries[0]) { - return 1; - } - if (unsigned < _0uint.uintBoundaries[1]) { - return 2; - } - if (unsigned < _0uint.uintBoundaries[2]) { - return 3; - } - if (unsigned < _0uint.uintBoundaries[3]) { - return 5; - } - return 9; -}; -encodeNegint.compareTokens = function compareTokens(tok1, tok2) { - return tok1.value < tok2.value ? 1 : tok1.value > tok2.value ? -1 : 0; -}; -exports.decodeNegint16 = decodeNegint16; -exports.decodeNegint32 = decodeNegint32; -exports.decodeNegint64 = decodeNegint64; -exports.decodeNegint8 = decodeNegint8; -exports.encodeNegint = encodeNegint; +/***/ }), +/***/ 60235: +/***/ ((__unused_webpack_module, exports) => { -/***/ }), -/***/ 70195: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.normalizeProvider = void 0; +const normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; +}; +exports.normalizeProvider = normalizeProvider; -"use strict"; +/***/ }), -Object.defineProperty(exports, "__esModule", ({ value: true })); +/***/ 35966: +/***/ ((__unused_webpack_module, exports) => { -var token = __nccwpck_require__(90915); -var common = __nccwpck_require__(47907); -var _0uint = __nccwpck_require__(80316); -var byteUtils = __nccwpck_require__(46070); -function toToken(data, pos, prefix, length) { - common.assertEnoughData(data, pos, prefix + length); - const buf = byteUtils.slice(data, pos + prefix, pos + prefix + length); - return new token.Token(token.Type.bytes, buf, prefix + length); -} -function decodeBytesCompact(data, pos, minor, _options) { - return toToken(data, pos, 1, minor); -} -function decodeBytes8(data, pos, _minor, options) { - return toToken(data, pos, 2, _0uint.readUint8(data, pos + 1, options)); -} -function decodeBytes16(data, pos, _minor, options) { - return toToken(data, pos, 3, _0uint.readUint16(data, pos + 1, options)); -} -function decodeBytes32(data, pos, _minor, options) { - return toToken(data, pos, 5, _0uint.readUint32(data, pos + 1, options)); -} -function decodeBytes64(data, pos, _minor, options) { - const l = _0uint.readUint64(data, pos + 1, options); - if (typeof l === 'bigint') { - throw new Error(`${ common.decodeErrPrefix } 64-bit integer bytes lengths not supported`); - } - return toToken(data, pos, 9, l); -} -function tokenBytes(token$1) { - if (token$1.encodedBytes === undefined) { - token$1.encodedBytes = token$1.type === token.Type.string ? byteUtils.fromString(token$1.value) : token$1.value; - } - return token$1.encodedBytes; -} -function encodeBytes(buf, token) { - const bytes = tokenBytes(token); - _0uint.encodeUintValue(buf, token.type.majorEncoded, bytes.length); - buf.push(bytes); -} -encodeBytes.encodedSize = function encodedSize(token) { - const bytes = tokenBytes(token); - return _0uint.encodeUintValue.encodedSize(bytes.length) + bytes.length; -}; -encodeBytes.compareTokens = function compareTokens(tok1, tok2) { - return compareBytes(tokenBytes(tok1), tokenBytes(tok2)); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createPaginator = void 0; +const makePagedClientRequest = async (CommandCtor, client, input, ...args) => { + return await client.send(new CommandCtor(input), ...args); }; -function compareBytes(b1, b2) { - return b1.length < b2.length ? -1 : b1.length > b2.length ? 1 : byteUtils.compare(b1, b2); +function createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) { + return async function* paginateOperation(config, input, ...additionalArguments) { + var _a; + let token = config.startingToken || undefined; + let hasNext = true; + let page; + while (hasNext) { + input[inputTokenName] = token; + if (pageSizeTokenName) { + input[pageSizeTokenName] = (_a = input[pageSizeTokenName]) !== null && _a !== void 0 ? _a : config.pageSize; + } + if (config.client instanceof ClientCtor) { + page = await makePagedClientRequest(CommandCtor, config.client, input, ...additionalArguments); + } + else { + throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`); + } + yield page; + const prevToken = token; + token = page[outputTokenName]; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + return undefined; + }; } - -exports.compareBytes = compareBytes; -exports.decodeBytes16 = decodeBytes16; -exports.decodeBytes32 = decodeBytes32; -exports.decodeBytes64 = decodeBytes64; -exports.decodeBytes8 = decodeBytes8; -exports.decodeBytesCompact = decodeBytesCompact; -exports.encodeBytes = encodeBytes; +exports.createPaginator = createPaginator; /***/ }), -/***/ 49081: +/***/ 29962: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var token = __nccwpck_require__(90915); -var common = __nccwpck_require__(47907); -var _0uint = __nccwpck_require__(80316); -var _2bytes = __nccwpck_require__(70195); -var byteUtils = __nccwpck_require__(46070); - -function toToken(data, pos, prefix, length) { - const totLength = prefix + length; - common.assertEnoughData(data, pos, totLength); - return new token.Token(token.Type.string, byteUtils.toString(data, pos + prefix, pos + totLength), totLength); -} -function decodeStringCompact(data, pos, minor, _options) { - return toToken(data, pos, 1, minor); -} -function decodeString8(data, pos, _minor, options) { - return toToken(data, pos, 2, _0uint.readUint8(data, pos + 1, options)); -} -function decodeString16(data, pos, _minor, options) { - return toToken(data, pos, 3, _0uint.readUint16(data, pos + 1, options)); -} -function decodeString32(data, pos, _minor, options) { - return toToken(data, pos, 5, _0uint.readUint32(data, pos + 1, options)); -} -function decodeString64(data, pos, _minor, options) { - const l = _0uint.readUint64(data, pos + 1, options); - if (typeof l === 'bigint') { - throw new Error(`${ common.decodeErrPrefix } 64-bit integer string lengths not supported`); - } - return toToken(data, pos, 9, l); +exports.RequestBuilder = exports.requestBuilder = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const smithy_client_1 = __nccwpck_require__(33218); +function requestBuilder(input, context) { + return new RequestBuilder(input, context); +} +exports.requestBuilder = requestBuilder; +class RequestBuilder { + constructor(input, context) { + this.input = input; + this.context = context; + this.query = {}; + this.method = ""; + this.headers = {}; + this.path = ""; + this.body = null; + this.hostname = ""; + this.resolvePathStack = []; + } + async build() { + const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint(); + this.path = basePath; + for (const resolvePath of this.resolvePathStack) { + resolvePath(this.path); + } + return new protocol_http_1.HttpRequest({ + protocol, + hostname: this.hostname || hostname, + port, + method: this.method, + path: this.path, + query: this.query, + body: this.body, + headers: this.headers, + }); + } + hn(hostname) { + this.hostname = hostname; + return this; + } + bp(uriLabel) { + this.resolvePathStack.push((basePath) => { + this.path = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + uriLabel; + }); + return this; + } + p(memberName, labelValueProvider, uriLabel, isGreedyLabel) { + this.resolvePathStack.push((path) => { + this.path = (0, smithy_client_1.resolvedPath)(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel); + }); + return this; + } + h(headers) { + this.headers = headers; + return this; + } + q(query) { + this.query = query; + return this; + } + b(body) { + this.body = body; + return this; + } + m(method) { + this.method = method; + return this; + } } -const encodeString = _2bytes.encodeBytes; - -exports.decodeString16 = decodeString16; -exports.decodeString32 = decodeString32; -exports.decodeString64 = decodeString64; -exports.decodeString8 = decodeString8; -exports.decodeStringCompact = decodeStringCompact; -exports.encodeString = encodeString; +exports.RequestBuilder = RequestBuilder; /***/ }), -/***/ 22339: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 73771: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); - -var token = __nccwpck_require__(90915); -var _0uint = __nccwpck_require__(80316); -var common = __nccwpck_require__(47907); - -function toToken(_data, _pos, prefix, length) { - return new token.Token(token.Type.array, length, prefix); -} -function decodeArrayCompact(data, pos, minor, _options) { - return toToken(data, pos, 1, minor); -} -function decodeArray8(data, pos, _minor, options) { - return toToken(data, pos, 2, _0uint.readUint8(data, pos + 1, options)); -} -function decodeArray16(data, pos, _minor, options) { - return toToken(data, pos, 3, _0uint.readUint16(data, pos + 1, options)); -} -function decodeArray32(data, pos, _minor, options) { - return toToken(data, pos, 5, _0uint.readUint32(data, pos + 1, options)); -} -function decodeArray64(data, pos, _minor, options) { - const l = _0uint.readUint64(data, pos + 1, options); - if (typeof l === 'bigint') { - throw new Error(`${ common.decodeErrPrefix } 64-bit integer array lengths not supported`); - } - return toToken(data, pos, 9, l); -} -function decodeArrayIndefinite(data, pos, _minor, options) { - if (options.allowIndefinite === false) { - throw new Error(`${ common.decodeErrPrefix } indefinite length items not allowed`); - } - return toToken(data, pos, 1, Infinity); -} -function encodeArray(buf, token$1) { - _0uint.encodeUintValue(buf, token.Type.array.majorEncoded, token$1.value); +exports.DefaultIdentityProviderConfig = void 0; +class DefaultIdentityProviderConfig { + constructor(config) { + this.authSchemes = new Map(); + for (const [key, value] of Object.entries(config)) { + if (value !== undefined) { + this.authSchemes.set(key, value); + } + } + } + getIdentityProvider(schemeId) { + return this.authSchemes.get(schemeId); + } } -encodeArray.compareTokens = _0uint.encodeUint.compareTokens; - -exports.decodeArray16 = decodeArray16; -exports.decodeArray32 = decodeArray32; -exports.decodeArray64 = decodeArray64; -exports.decodeArray8 = decodeArray8; -exports.decodeArrayCompact = decodeArrayCompact; -exports.decodeArrayIndefinite = decodeArrayIndefinite; -exports.encodeArray = encodeArray; +exports.DefaultIdentityProviderConfig = DefaultIdentityProviderConfig; /***/ }), -/***/ 91440: +/***/ 81720: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var token = __nccwpck_require__(90915); -var _0uint = __nccwpck_require__(80316); -var common = __nccwpck_require__(47907); - -function toToken(_data, _pos, prefix, length) { - return new token.Token(token.Type.map, length, prefix); -} -function decodeMapCompact(data, pos, minor, _options) { - return toToken(data, pos, 1, minor); -} -function decodeMap8(data, pos, _minor, options) { - return toToken(data, pos, 2, _0uint.readUint8(data, pos + 1, options)); -} -function decodeMap16(data, pos, _minor, options) { - return toToken(data, pos, 3, _0uint.readUint16(data, pos + 1, options)); -} -function decodeMap32(data, pos, _minor, options) { - return toToken(data, pos, 5, _0uint.readUint32(data, pos + 1, options)); -} -function decodeMap64(data, pos, _minor, options) { - const l = _0uint.readUint64(data, pos + 1, options); - if (typeof l === 'bigint') { - throw new Error(`${ common.decodeErrPrefix } 64-bit integer map lengths not supported`); - } - return toToken(data, pos, 9, l); -} -function decodeMapIndefinite(data, pos, _minor, options) { - if (options.allowIndefinite === false) { - throw new Error(`${ common.decodeErrPrefix } indefinite length items not allowed`); - } - return toToken(data, pos, 1, Infinity); -} -function encodeMap(buf, token$1) { - _0uint.encodeUintValue(buf, token.Type.map.majorEncoded, token$1.value); +exports.HttpApiKeyAuthSigner = void 0; +const types_1 = __nccwpck_require__(75751); +class HttpApiKeyAuthSigner { + async sign(httpRequest, identity, signingProperties) { + if (!signingProperties) { + throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing"); + } + if (!signingProperties.name) { + throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing"); + } + if (!signingProperties.in) { + throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing"); + } + if (!identity.apiKey) { + throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined"); + } + const clonedRequest = httpRequest.clone(); + if (signingProperties.in === types_1.HttpApiKeyAuthLocation.QUERY) { + clonedRequest.query[signingProperties.name] = identity.apiKey; + } + else if (signingProperties.in === types_1.HttpApiKeyAuthLocation.HEADER) { + clonedRequest.headers[signingProperties.name] = signingProperties.scheme + ? `${signingProperties.scheme} ${identity.apiKey}` + : identity.apiKey; + } + else { + throw new Error("request can only be signed with `apiKey` locations `query` or `header`, " + + "but found: `" + + signingProperties.in + + "`"); + } + return clonedRequest; + } } -encodeMap.compareTokens = _0uint.encodeUint.compareTokens; - -exports.decodeMap16 = decodeMap16; -exports.decodeMap32 = decodeMap32; -exports.decodeMap64 = decodeMap64; -exports.decodeMap8 = decodeMap8; -exports.decodeMapCompact = decodeMapCompact; -exports.decodeMapIndefinite = decodeMapIndefinite; -exports.encodeMap = encodeMap; +exports.HttpApiKeyAuthSigner = HttpApiKeyAuthSigner; /***/ }), -/***/ 97051: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 31721: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); - -var token = __nccwpck_require__(90915); -var _0uint = __nccwpck_require__(80316); - -function decodeTagCompact(_data, _pos, minor, _options) { - return new token.Token(token.Type.tag, minor, 1); -} -function decodeTag8(data, pos, _minor, options) { - return new token.Token(token.Type.tag, _0uint.readUint8(data, pos + 1, options), 2); -} -function decodeTag16(data, pos, _minor, options) { - return new token.Token(token.Type.tag, _0uint.readUint16(data, pos + 1, options), 3); -} -function decodeTag32(data, pos, _minor, options) { - return new token.Token(token.Type.tag, _0uint.readUint32(data, pos + 1, options), 5); -} -function decodeTag64(data, pos, _minor, options) { - return new token.Token(token.Type.tag, _0uint.readUint64(data, pos + 1, options), 9); -} -function encodeTag(buf, token$1) { - _0uint.encodeUintValue(buf, token.Type.tag.majorEncoded, token$1.value); +exports.HttpBearerAuthSigner = void 0; +class HttpBearerAuthSigner { + async sign(httpRequest, identity, signingProperties) { + const clonedRequest = httpRequest.clone(); + if (!identity.token) { + throw new Error("request could not be signed with `token` since the `token` is not defined"); + } + clonedRequest.headers["Authorization"] = `Bearer ${identity.token}`; + return clonedRequest; + } } -encodeTag.compareTokens = _0uint.encodeUint.compareTokens; - -exports.decodeTag16 = decodeTag16; -exports.decodeTag32 = decodeTag32; -exports.decodeTag64 = decodeTag64; -exports.decodeTag8 = decodeTag8; -exports.decodeTagCompact = decodeTagCompact; -exports.encodeTag = encodeTag; +exports.HttpBearerAuthSigner = HttpBearerAuthSigner; /***/ }), -/***/ 59213: +/***/ 31834: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(6605); +tslib_1.__exportStar(__nccwpck_require__(81720), exports); +tslib_1.__exportStar(__nccwpck_require__(31721), exports); +tslib_1.__exportStar(__nccwpck_require__(83435), exports); -var token = __nccwpck_require__(90915); -var common = __nccwpck_require__(47907); -var _0uint = __nccwpck_require__(80316); -const MINOR_FALSE = 20; -const MINOR_TRUE = 21; -const MINOR_NULL = 22; -const MINOR_UNDEFINED = 23; -function decodeUndefined(_data, _pos, _minor, options) { - if (options.allowUndefined === false) { - throw new Error(`${ common.decodeErrPrefix } undefined values are not supported`); - } else if (options.coerceUndefinedToNull === true) { - return new token.Token(token.Type.null, null, 1); - } - return new token.Token(token.Type.undefined, undefined, 1); -} -function decodeBreak(_data, _pos, _minor, options) { - if (options.allowIndefinite === false) { - throw new Error(`${ common.decodeErrPrefix } indefinite length items not allowed`); - } - return new token.Token(token.Type.break, undefined, 1); -} -function createToken(value, bytes, options) { - if (options) { - if (options.allowNaN === false && Number.isNaN(value)) { - throw new Error(`${ common.decodeErrPrefix } NaN values are not supported`); - } - if (options.allowInfinity === false && (value === Infinity || value === -Infinity)) { - throw new Error(`${ common.decodeErrPrefix } Infinity values are not supported`); - } - } - return new token.Token(token.Type.float, value, bytes); -} -function decodeFloat16(data, pos, _minor, options) { - return createToken(readFloat16(data, pos + 1), 3, options); -} -function decodeFloat32(data, pos, _minor, options) { - return createToken(readFloat32(data, pos + 1), 5, options); -} -function decodeFloat64(data, pos, _minor, options) { - return createToken(readFloat64(data, pos + 1), 9, options); -} -function encodeFloat(buf, token$1, options) { - const float = token$1.value; - if (float === false) { - buf.push([token.Type.float.majorEncoded | MINOR_FALSE]); - } else if (float === true) { - buf.push([token.Type.float.majorEncoded | MINOR_TRUE]); - } else if (float === null) { - buf.push([token.Type.float.majorEncoded | MINOR_NULL]); - } else if (float === undefined) { - buf.push([token.Type.float.majorEncoded | MINOR_UNDEFINED]); - } else { - let decoded; - let success = false; - if (!options || options.float64 !== true) { - encodeFloat16(float); - decoded = readFloat16(ui8a, 1); - if (float === decoded || Number.isNaN(float)) { - ui8a[0] = 249; - buf.push(ui8a.slice(0, 3)); - success = true; - } else { - encodeFloat32(float); - decoded = readFloat32(ui8a, 1); - if (float === decoded) { - ui8a[0] = 250; - buf.push(ui8a.slice(0, 5)); - success = true; - } - } - } - if (!success) { - encodeFloat64(float); - decoded = readFloat64(ui8a, 1); - ui8a[0] = 251; - buf.push(ui8a.slice(0, 9)); - } - } -} -encodeFloat.encodedSize = function encodedSize(token, options) { - const float = token.value; - if (float === false || float === true || float === null || float === undefined) { - return 1; - } - let decoded; - if (!options || options.float64 !== true) { - encodeFloat16(float); - decoded = readFloat16(ui8a, 1); - if (float === decoded || Number.isNaN(float)) { - return 3; - } - encodeFloat32(float); - decoded = readFloat32(ui8a, 1); - if (float === decoded) { - return 5; - } - } - return 9; -}; -const buffer = new ArrayBuffer(9); -const dataView = new DataView(buffer, 1); -const ui8a = new Uint8Array(buffer, 0); -function encodeFloat16(inp) { - if (inp === Infinity) { - dataView.setUint16(0, 31744, false); - } else if (inp === -Infinity) { - dataView.setUint16(0, 64512, false); - } else if (Number.isNaN(inp)) { - dataView.setUint16(0, 32256, false); - } else { - dataView.setFloat32(0, inp); - const valu32 = dataView.getUint32(0); - const exponent = (valu32 & 2139095040) >> 23; - const mantissa = valu32 & 8388607; - if (exponent === 255) { - dataView.setUint16(0, 31744, false); - } else if (exponent === 0) { - dataView.setUint16(0, (inp & 2147483648) >> 16 | mantissa >> 13, false); - } else { - const logicalExponent = exponent - 127; - if (logicalExponent < -24) { - dataView.setUint16(0, 0); - } else if (logicalExponent < -14) { - dataView.setUint16(0, (valu32 & 2147483648) >> 16 | 1 << 24 + logicalExponent, false); - } else { - dataView.setUint16(0, (valu32 & 2147483648) >> 16 | logicalExponent + 15 << 10 | mantissa >> 13, false); - } +/***/ }), + +/***/ 83435: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NoAuthSigner = void 0; +class NoAuthSigner { + async sign(httpRequest, identity, signingProperties) { + return httpRequest; } - } -} -function readFloat16(ui8a, pos) { - if (ui8a.length - pos < 2) { - throw new Error(`${ common.decodeErrPrefix } not enough data for float16`); - } - const half = (ui8a[pos] << 8) + ui8a[pos + 1]; - if (half === 31744) { - return Infinity; - } - if (half === 64512) { - return -Infinity; - } - if (half === 32256) { - return NaN; - } - const exp = half >> 10 & 31; - const mant = half & 1023; - let val; - if (exp === 0) { - val = mant * 2 ** -24; - } else if (exp !== 31) { - val = (mant + 1024) * 2 ** (exp - 25); - } else { - val = mant === 0 ? Infinity : NaN; - } - return half & 32768 ? -val : val; -} -function encodeFloat32(inp) { - dataView.setFloat32(0, inp, false); -} -function readFloat32(ui8a, pos) { - if (ui8a.length - pos < 4) { - throw new Error(`${ common.decodeErrPrefix } not enough data for float32`); - } - const offset = (ui8a.byteOffset || 0) + pos; - return new DataView(ui8a.buffer, offset, 4).getFloat32(0, false); -} -function encodeFloat64(inp) { - dataView.setFloat64(0, inp, false); -} -function readFloat64(ui8a, pos) { - if (ui8a.length - pos < 8) { - throw new Error(`${ common.decodeErrPrefix } not enough data for float64`); - } - const offset = (ui8a.byteOffset || 0) + pos; - return new DataView(ui8a.buffer, offset, 8).getFloat64(0, false); } -encodeFloat.compareTokens = _0uint.encodeUint.compareTokens; - -exports.decodeBreak = decodeBreak; -exports.decodeFloat16 = decodeFloat16; -exports.decodeFloat32 = decodeFloat32; -exports.decodeFloat64 = decodeFloat64; -exports.decodeUndefined = decodeUndefined; -exports.encodeFloat = encodeFloat; +exports.NoAuthSigner = NoAuthSigner; /***/ }), -/***/ 31889: +/***/ 38461: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(6605); +tslib_1.__exportStar(__nccwpck_require__(73771), exports); +tslib_1.__exportStar(__nccwpck_require__(31834), exports); +tslib_1.__exportStar(__nccwpck_require__(8980), exports); -var byteUtils = __nccwpck_require__(46070); -const defaultChunkSize = 256; -class Bl { - constructor(chunkSize = defaultChunkSize) { - this.chunkSize = chunkSize; - this.cursor = 0; - this.maxCursor = -1; - this.chunks = []; - this._initReuseChunk = null; - } - reset() { - this.chunks = []; - this.cursor = 0; - this.maxCursor = -1; - if (this._initReuseChunk !== null) { - this.chunks.push(this._initReuseChunk); - this.maxCursor = this._initReuseChunk.length - 1; +/***/ }), + +/***/ 8980: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.memoizeIdentityProvider = exports.doesIdentityRequireRefresh = exports.isIdentityExpired = exports.EXPIRATION_MS = exports.createIsIdentityExpiredFunction = void 0; +const createIsIdentityExpiredFunction = (expirationMs) => (identity) => (0, exports.doesIdentityRequireRefresh)(identity) && identity.expiration.getTime() - Date.now() < expirationMs; +exports.createIsIdentityExpiredFunction = createIsIdentityExpiredFunction; +exports.EXPIRATION_MS = 300000; +exports.isIdentityExpired = (0, exports.createIsIdentityExpiredFunction)(exports.EXPIRATION_MS); +const doesIdentityRequireRefresh = (identity) => identity.expiration !== undefined; +exports.doesIdentityRequireRefresh = doesIdentityRequireRefresh; +const memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => { + if (provider === undefined) { + return undefined; } - } - push(bytes) { - let topChunk = this.chunks[this.chunks.length - 1]; - const newMax = this.cursor + bytes.length; - if (newMax <= this.maxCursor + 1) { - const chunkPos = topChunk.length - (this.maxCursor - this.cursor) - 1; - topChunk.set(bytes, chunkPos); - } else { - if (topChunk) { - const chunkPos = topChunk.length - (this.maxCursor - this.cursor) - 1; - if (chunkPos < topChunk.length) { - this.chunks[this.chunks.length - 1] = topChunk.subarray(0, chunkPos); - this.maxCursor = this.cursor - 1; + const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider; + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async (options) => { + if (!pending) { + pending = normalizedProvider(options); } - } - if (bytes.length < 64 && bytes.length < this.chunkSize) { - topChunk = byteUtils.alloc(this.chunkSize); - this.chunks.push(topChunk); - this.maxCursor += topChunk.length; - if (this._initReuseChunk === null) { - this._initReuseChunk = topChunk; + try { + resolved = await pending; + hasResult = true; + isConstant = false; } - topChunk.set(bytes, 0); - } else { - this.chunks.push(bytes); - this.maxCursor += bytes.length; - } + finally { + pending = undefined; + } + return resolved; + }; + if (isExpired === undefined) { + return async (options) => { + if (!hasResult || (options === null || options === void 0 ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(options); + } + return resolved; + }; } - this.cursor += bytes.length; - } - toBytes(reset = false) { - let byts; - if (this.chunks.length === 1) { - const chunk = this.chunks[0]; - if (reset && this.cursor > chunk.length / 2) { - byts = this.cursor === chunk.length ? chunk : chunk.subarray(0, this.cursor); - this._initReuseChunk = null; - this.chunks = []; - } else { - byts = byteUtils.slice(chunk, 0, this.cursor); - } - } else { - byts = byteUtils.concat(this.chunks, this.cursor); + return async (options) => { + if (!hasResult || (options === null || options === void 0 ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(options); + } + if (isConstant) { + return resolved; + } + if (!requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(options); + return resolved; + } + return resolved; + }; +}; +exports.memoizeIdentityProvider = memoizeIdentityProvider; + + +/***/ }), + +/***/ 6605: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } - if (reset) { - this.reset(); + else { + factory(createExporter(root)); } - return byts; - } -} + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -exports.Bl = Bl; + __assign = Object.assign || function (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; + }; + __rest = function (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; + }; -/***/ }), + __decorate = function (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; + }; -/***/ 46070: -/***/ ((__unused_webpack_module, exports) => { + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -"use strict"; + __esDecorate = function (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)); }; + 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; + }; + __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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -const useBuffer = globalThis.process && !globalThis.process.browser && globalThis.Buffer && typeof globalThis.Buffer.isBuffer === 'function'; -const textDecoder = new TextDecoder(); -const textEncoder = new TextEncoder(); -function isBuffer(buf) { - return useBuffer && globalThis.Buffer.isBuffer(buf); -} -function asU8A(buf) { - if (!(buf instanceof Uint8Array)) { - return Uint8Array.from(buf); - } - return isBuffer(buf) ? new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength) : buf; -} -const toString = useBuffer ? (bytes, start, end) => { - return end - start > 64 ? globalThis.Buffer.from(bytes.subarray(start, end)).toString('utf8') : utf8Slice(bytes, start, end); -} : (bytes, start, end) => { - return end - start > 64 ? textDecoder.decode(bytes.subarray(start, end)) : utf8Slice(bytes, start, end); -}; -const fromString = useBuffer ? string => { - return string.length > 64 ? globalThis.Buffer.from(string) : utf8ToBytes(string); -} : string => { - return string.length > 64 ? textEncoder.encode(string) : utf8ToBytes(string); -}; -const fromArray = arr => { - return Uint8Array.from(arr); -}; -const slice = useBuffer ? (bytes, start, end) => { - if (isBuffer(bytes)) { - return new Uint8Array(bytes.subarray(start, end)); - } - return bytes.slice(start, end); -} : (bytes, start, end) => { - return bytes.slice(start, end); -}; -const concat = useBuffer ? (chunks, length) => { - chunks = chunks.map(c => c instanceof Uint8Array ? c : globalThis.Buffer.from(c)); - return asU8A(globalThis.Buffer.concat(chunks, length)); -} : (chunks, length) => { - const out = new Uint8Array(length); - let off = 0; - for (let b of chunks) { - if (off + b.length > out.length) { - b = b.subarray(0, out.length - off); - } - out.set(b, off); - off += b.length; - } - return out; -}; -const alloc = useBuffer ? size => { - return globalThis.Buffer.allocUnsafe(size); -} : size => { - return new Uint8Array(size); -}; -const toHex = useBuffer ? d => { - if (typeof d === 'string') { - return d; - } - return globalThis.Buffer.from(toBytes(d)).toString('hex'); -} : d => { - if (typeof d === 'string') { - return d; - } - return Array.prototype.reduce.call(toBytes(d), (p, c) => `${ p }${ c.toString(16).padStart(2, '0') }`, ''); -}; -const fromHex = useBuffer ? hex => { - if (hex instanceof Uint8Array) { - return hex; - } - return globalThis.Buffer.from(hex, 'hex'); -} : hex => { - if (hex instanceof Uint8Array) { - return hex; - } - if (!hex.length) { - return new Uint8Array(0); - } - return new Uint8Array(hex.split('').map((c, i, d) => i % 2 === 0 ? `0x${ c }${ d[i + 1] }` : '').filter(Boolean).map(e => parseInt(e, 16))); -}; -function toBytes(obj) { - if (obj instanceof Uint8Array && obj.constructor.name === 'Uint8Array') { - return obj; - } - if (obj instanceof ArrayBuffer) { - return new Uint8Array(obj); - } - if (ArrayBuffer.isView(obj)) { - return new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength); - } - throw new Error('Unknown type, must be binary type'); -} -function compare(b1, b2) { - if (isBuffer(b1) && isBuffer(b2)) { - return b1.compare(b2); - } - for (let i = 0; i < b1.length; i++) { - if (b1[i] === b2[i]) { - continue; - } - return b1[i] < b2[i] ? -1 : 1; - } - return 0; -} -function utf8ToBytes(string, units = Infinity) { - let codePoint; - const length = string.length; - let leadSurrogate = null; - const bytes = []; - for (let i = 0; i < length; ++i) { - codePoint = string.charCodeAt(i); - if (codePoint > 55295 && codePoint < 57344) { - if (!leadSurrogate) { - if (codePoint > 56319) { - if ((units -= 3) > -1) - bytes.push(239, 191, 189); - continue; - } else if (i + 1 === length) { - if ((units -= 3) > -1) - bytes.push(239, 191, 189); - continue; + __setFunctionName = function (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 }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; } - leadSurrogate = codePoint; - continue; - } - if (codePoint < 56320) { - if ((units -= 3) > -1) - bytes.push(239, 191, 189); - leadSurrogate = codePoint; - continue; - } - codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536; - } else if (leadSurrogate) { - if ((units -= 3) > -1) - bytes.push(239, 191, 189); - } - leadSurrogate = null; - if (codePoint < 128) { - if ((units -= 1) < 0) - break; - bytes.push(codePoint); - } else if (codePoint < 2048) { - if ((units -= 2) < 0) - break; - bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128); - } else if (codePoint < 65536) { - if ((units -= 3) < 0) - break; - bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128); - } else if (codePoint < 1114112) { - if ((units -= 4) < 0) - break; - bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128); - } else { - throw new Error('Invalid code point'); - } - } - return bytes; -} -function utf8Slice(buf, offset, end) { - const res = []; - while (offset < end) { - const firstByte = buf[offset]; - let codePoint = null; - let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1; - if (offset + bytesPerSequence <= end) { - let secondByte, thirdByte, fourthByte, tempCodePoint; - switch (bytesPerSequence) { - case 1: - if (firstByte < 128) { - codePoint = firstByte; + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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]; } }; } - break; - case 2: - secondByte = buf[offset + 1]; - if ((secondByte & 192) === 128) { - tempCodePoint = (firstByte & 31) << 6 | secondByte & 63; - if (tempCodePoint > 127) { - codePoint = tempCodePoint; - } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); + + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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); } - break; - case 3: - secondByte = buf[offset + 1]; - thirdByte = buf[offset + 2]; - if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) { - tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63; - if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) { - codePoint = tempCodePoint; - } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } - break; - case 4: - secondByte = buf[offset + 1]; - thirdByte = buf[offset + 2]; - fourthByte = buf[offset + 3]; - if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) { - tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63; - if (tempCodePoint > 65535 && tempCodePoint < 1114112) { - codePoint = tempCodePoint; - } + 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 = 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; + }; + + __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]; + } } - } - } - if (codePoint === null) { - codePoint = 65533; - bytesPerSequence = 1; - } else if (codePoint > 65535) { - codePoint -= 65536; - res.push(codePoint >>> 10 & 1023 | 55296); - codePoint = 56320 | codePoint & 1023; - } - res.push(codePoint); - offset += bytesPerSequence; - } - return decodeCodePointsArray(res); -} -const MAX_ARGUMENTS_LENGTH = 4096; -function decodeCodePointsArray(codePoints) { - const len = codePoints.length; - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints); - } - let res = ''; - let i = 0; - while (i < len) { - res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); - } - return res; -} + return to.concat(ar || Array.prototype.slice.call(from)); + }; -exports.alloc = alloc; -exports.asU8A = asU8A; -exports.compare = compare; -exports.concat = concat; -exports.decodeCodePointsArray = decodeCodePointsArray; -exports.fromArray = fromArray; -exports.fromHex = fromHex; -exports.fromString = fromString; -exports.slice = slice; -exports.toHex = toHex; -exports.toString = toString; -exports.useBuffer = useBuffer; + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 47907: +/***/ 56028: /***/ ((__unused_webpack_module, exports) => { -"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Endpoint = void 0; +var Endpoint; +(function (Endpoint) { + Endpoint["IPv4"] = "http://169.254.169.254"; + Endpoint["IPv6"] = "http://[fd00:ec2::254]"; +})(Endpoint = exports.Endpoint || (exports.Endpoint = {})); + + +/***/ }), + +/***/ 28366: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ENDPOINT_CONFIG_OPTIONS = exports.CONFIG_ENDPOINT_NAME = exports.ENV_ENDPOINT_NAME = void 0; +exports.ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; +exports.CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; +exports.ENDPOINT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[exports.ENV_ENDPOINT_NAME], + configFileSelector: (profile) => profile[exports.CONFIG_ENDPOINT_NAME], + default: undefined, +}; -const decodeErrPrefix = 'CBOR decode error:'; -const encodeErrPrefix = 'CBOR encode error:'; -const uintMinorPrefixBytes = []; -uintMinorPrefixBytes[23] = 1; -uintMinorPrefixBytes[24] = 2; -uintMinorPrefixBytes[25] = 3; -uintMinorPrefixBytes[26] = 5; -uintMinorPrefixBytes[27] = 9; -function assertEnoughData(data, pos, need) { - if (data.length - pos < need) { - throw new Error(`${ decodeErrPrefix } not enough data for type`); - } -} -exports.assertEnoughData = assertEnoughData; -exports.decodeErrPrefix = decodeErrPrefix; -exports.encodeErrPrefix = encodeErrPrefix; -exports.uintMinorPrefixBytes = uintMinorPrefixBytes; +/***/ }), + +/***/ 1988: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EndpointMode = void 0; +var EndpointMode; +(function (EndpointMode) { + EndpointMode["IPv4"] = "IPv4"; + EndpointMode["IPv6"] = "IPv6"; +})(EndpointMode = exports.EndpointMode || (exports.EndpointMode = {})); /***/ }), -/***/ 53216: +/***/ 76819: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ENDPOINT_MODE_CONFIG_OPTIONS = exports.CONFIG_ENDPOINT_MODE_NAME = exports.ENV_ENDPOINT_MODE_NAME = void 0; +const EndpointMode_1 = __nccwpck_require__(1988); +exports.ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; +exports.CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; +exports.ENDPOINT_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[exports.ENV_ENDPOINT_MODE_NAME], + configFileSelector: (profile) => profile[exports.CONFIG_ENDPOINT_MODE_NAME], + default: EndpointMode_1.EndpointMode.IPv4, +}; -var common = __nccwpck_require__(47907); -var token = __nccwpck_require__(90915); -var jump = __nccwpck_require__(60294); -const defaultDecodeOptions = { - strict: false, - allowIndefinite: true, - allowUndefined: true, - allowBigInt: true -}; -class Tokeniser { - constructor(data, options = {}) { - this.pos = 0; - this.data = data; - this.options = options; - } - done() { - return this.pos >= this.data.length; - } - next() { - const byt = this.data[this.pos]; - let token = jump.quick[byt]; - if (token === undefined) { - const decoder = jump.jump[byt]; - if (!decoder) { - throw new Error(`${ common.decodeErrPrefix } no decoder for major type ${ byt >>> 5 } (byte 0x${ byt.toString(16).padStart(2, '0') })`); - } - const minor = byt & 31; - token = decoder(this.data, this.pos, minor, this.options); - } - this.pos += token.encodedLength; - return token; - } -} -const DONE = Symbol.for('DONE'); -const BREAK = Symbol.for('BREAK'); -function tokenToArray(token, tokeniser, options) { - const arr = []; - for (let i = 0; i < token.value; i++) { - const value = tokensToObject(tokeniser, options); - if (value === BREAK) { - if (token.value === Infinity) { - break; - } - throw new Error(`${ common.decodeErrPrefix } got unexpected break to lengthed array`); - } - if (value === DONE) { - throw new Error(`${ common.decodeErrPrefix } found array but not enough entries (got ${ i }, expected ${ token.value })`); - } - arr[i] = value; - } - return arr; -} -function tokenToMap(token, tokeniser, options) { - const useMaps = options.useMaps === true; - const obj = useMaps ? undefined : {}; - const m = useMaps ? new Map() : undefined; - for (let i = 0; i < token.value; i++) { - const key = tokensToObject(tokeniser, options); - if (key === BREAK) { - if (token.value === Infinity) { - break; - } - throw new Error(`${ common.decodeErrPrefix } got unexpected break to lengthed map`); - } - if (key === DONE) { - throw new Error(`${ common.decodeErrPrefix } found map but not enough entries (got ${ i } [no key], expected ${ token.value })`); - } - if (useMaps !== true && typeof key !== 'string') { - throw new Error(`${ common.decodeErrPrefix } non-string keys not supported (got ${ typeof key })`); - } - const value = tokensToObject(tokeniser, options); - if (value === DONE) { - throw new Error(`${ common.decodeErrPrefix } found map but not enough entries (got ${ i } [no value], expected ${ token.value })`); - } - if (useMaps) { - m.set(key, value); - } else { - obj[key] = value; - } - } - return useMaps ? m : obj; -} -function tokensToObject(tokeniser, options) { - if (tokeniser.done()) { - return DONE; - } - const token$1 = tokeniser.next(); - if (token$1.type === token.Type.break) { - return BREAK; - } - if (token$1.type.terminal) { - return token$1.value; - } - if (token$1.type === token.Type.array) { - return tokenToArray(token$1, tokeniser, options); - } - if (token$1.type === token.Type.map) { - return tokenToMap(token$1, tokeniser, options); - } - if (token$1.type === token.Type.tag) { - if (options.tags && typeof options.tags[token$1.value] === 'function') { - const tagged = tokensToObject(tokeniser, options); - return options.tags[token$1.value](tagged); +/***/ }), + +/***/ 57740: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.InstanceMetadataV1FallbackError = void 0; +const property_provider_1 = __nccwpck_require__(12955); +class InstanceMetadataV1FallbackError extends property_provider_1.CredentialsProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "InstanceMetadataV1FallbackError"; + Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype); } - throw new Error(`${ common.decodeErrPrefix } tag not supported (${ token$1.value })`); - } - throw new Error('unsupported'); -} -function decode(data, options) { - if (!(data instanceof Uint8Array)) { - throw new Error(`${ common.decodeErrPrefix } data to decode must be a Uint8Array`); - } - options = Object.assign({}, defaultDecodeOptions, options); - const tokeniser = options.tokenizer || new Tokeniser(data, options); - const decoded = tokensToObject(tokeniser, options); - if (decoded === DONE) { - throw new Error(`${ common.decodeErrPrefix } did not find any content to decode`); - } - if (decoded === BREAK) { - throw new Error(`${ common.decodeErrPrefix } got unexpected break`); - } - if (!tokeniser.done()) { - throw new Error(`${ common.decodeErrPrefix } too many terminals, data makes no sense`); - } - return decoded; } - -exports.Tokeniser = Tokeniser; -exports.decode = decode; -exports.tokensToObject = tokensToObject; +exports.InstanceMetadataV1FallbackError = InstanceMetadataV1FallbackError; /***/ }), -/***/ 87446: +/***/ 11957: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var is = __nccwpck_require__(30700); -var token = __nccwpck_require__(90915); -var bl = __nccwpck_require__(31889); -var common = __nccwpck_require__(47907); -var jump = __nccwpck_require__(60294); -var byteUtils = __nccwpck_require__(46070); -var _0uint = __nccwpck_require__(80316); -var _1negint = __nccwpck_require__(33709); -var _2bytes = __nccwpck_require__(70195); -var _3string = __nccwpck_require__(49081); -var _4array = __nccwpck_require__(22339); -var _5map = __nccwpck_require__(91440); -var _6tag = __nccwpck_require__(97051); -var _7float = __nccwpck_require__(59213); - -const defaultEncodeOptions = { - float64: false, - mapSorter, - quickEncodeToken: jump.quickEncodeToken +exports.fromContainerMetadata = exports.ENV_CMDS_AUTH_TOKEN = exports.ENV_CMDS_RELATIVE_URI = exports.ENV_CMDS_FULL_URI = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const url_1 = __nccwpck_require__(57310); +const httpRequest_1 = __nccwpck_require__(59002); +const ImdsCredentials_1 = __nccwpck_require__(15737); +const RemoteProviderInit_1 = __nccwpck_require__(58969); +const retry_1 = __nccwpck_require__(9919); +exports.ENV_CMDS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"; +exports.ENV_CMDS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"; +exports.ENV_CMDS_AUTH_TOKEN = "AWS_CONTAINER_AUTHORIZATION_TOKEN"; +const fromContainerMetadata = (init = {}) => { + const { timeout, maxRetries } = (0, RemoteProviderInit_1.providerConfigFromInit)(init); + return () => (0, retry_1.retry)(async () => { + const requestOptions = await getCmdsUri(); + const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions)); + if (!(0, ImdsCredentials_1.isImdsCredentials)(credsResponse)) { + throw new property_provider_1.CredentialsProviderError("Invalid response received from instance metadata service."); + } + return (0, ImdsCredentials_1.fromImdsCredentials)(credsResponse); + }, maxRetries); }; -const cborEncoders = []; -cborEncoders[token.Type.uint.major] = _0uint.encodeUint; -cborEncoders[token.Type.negint.major] = _1negint.encodeNegint; -cborEncoders[token.Type.bytes.major] = _2bytes.encodeBytes; -cborEncoders[token.Type.string.major] = _3string.encodeString; -cborEncoders[token.Type.array.major] = _4array.encodeArray; -cborEncoders[token.Type.map.major] = _5map.encodeMap; -cborEncoders[token.Type.tag.major] = _6tag.encodeTag; -cborEncoders[token.Type.float.major] = _7float.encodeFloat; -const buf = new bl.Bl(); -class Ref { - constructor(obj, parent) { - this.obj = obj; - this.parent = parent; - } - includes(obj) { - let p = this; - do { - if (p.obj === obj) { - return true; - } - } while (p = p.parent); - return false; - } - static createCheck(stack, obj) { - if (stack && stack.includes(obj)) { - throw new Error(`${ common.encodeErrPrefix } object contains circular references`); +exports.fromContainerMetadata = fromContainerMetadata; +const requestFromEcsImds = async (timeout, options) => { + if (process.env[exports.ENV_CMDS_AUTH_TOKEN]) { + options.headers = { + ...options.headers, + Authorization: process.env[exports.ENV_CMDS_AUTH_TOKEN], + }; } - return new Ref(obj, stack); - } -} -const simpleTokens = { - null: new token.Token(token.Type.null, null), - undefined: new token.Token(token.Type.undefined, undefined), - true: new token.Token(token.Type.true, true), - false: new token.Token(token.Type.false, false), - emptyArray: new token.Token(token.Type.array, 0), - emptyMap: new token.Token(token.Type.map, 0) + const buffer = await (0, httpRequest_1.httpRequest)({ + ...options, + timeout, + }); + return buffer.toString(); }; -const typeEncoders = { - number(obj, _typ, _options, _refStack) { - if (!Number.isInteger(obj) || !Number.isSafeInteger(obj)) { - return new token.Token(token.Type.float, obj); - } else if (obj >= 0) { - return new token.Token(token.Type.uint, obj); - } else { - return new token.Token(token.Type.negint, obj); - } - }, - bigint(obj, _typ, _options, _refStack) { - if (obj >= BigInt(0)) { - return new token.Token(token.Type.uint, obj); - } else { - return new token.Token(token.Type.negint, obj); - } - }, - Uint8Array(obj, _typ, _options, _refStack) { - return new token.Token(token.Type.bytes, obj); - }, - string(obj, _typ, _options, _refStack) { - return new token.Token(token.Type.string, obj); - }, - boolean(obj, _typ, _options, _refStack) { - return obj ? simpleTokens.true : simpleTokens.false; - }, - null(_obj, _typ, _options, _refStack) { - return simpleTokens.null; - }, - undefined(_obj, _typ, _options, _refStack) { - return simpleTokens.undefined; - }, - ArrayBuffer(obj, _typ, _options, _refStack) { - return new token.Token(token.Type.bytes, new Uint8Array(obj)); - }, - DataView(obj, _typ, _options, _refStack) { - return new token.Token(token.Type.bytes, new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength)); - }, - Array(obj, _typ, options, refStack) { - if (!obj.length) { - if (options.addBreakTokens === true) { - return [ - simpleTokens.emptyArray, - new token.Token(token.Type.break) - ]; - } - return simpleTokens.emptyArray; - } - refStack = Ref.createCheck(refStack, obj); - const entries = []; - let i = 0; - for (const e of obj) { - entries[i++] = objectToTokens(e, options, refStack); - } - if (options.addBreakTokens) { - return [ - new token.Token(token.Type.array, obj.length), - entries, - new token.Token(token.Type.break) - ]; - } - return [ - new token.Token(token.Type.array, obj.length), - entries - ]; - }, - Object(obj, typ, options, refStack) { - const isMap = typ !== 'Object'; - const keys = isMap ? obj.keys() : Object.keys(obj); - const length = isMap ? obj.size : keys.length; - if (!length) { - if (options.addBreakTokens === true) { - return [ - simpleTokens.emptyMap, - new token.Token(token.Type.break) - ]; - } - return simpleTokens.emptyMap; - } - refStack = Ref.createCheck(refStack, obj); - const entries = []; - let i = 0; - for (const key of keys) { - entries[i++] = [ - objectToTokens(key, options, refStack), - objectToTokens(isMap ? obj.get(key) : obj[key], options, refStack) - ]; - } - sortMapEntries(entries, options); - if (options.addBreakTokens) { - return [ - new token.Token(token.Type.map, length), - entries, - new token.Token(token.Type.break) - ]; - } - return [ - new token.Token(token.Type.map, length), - entries - ]; - } +const CMDS_IP = "169.254.170.2"; +const GREENGRASS_HOSTS = { + localhost: true, + "127.0.0.1": true, }; -typeEncoders.Map = typeEncoders.Object; -typeEncoders.Buffer = typeEncoders.Uint8Array; -for (const typ of 'Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64'.split(' ')) { - typeEncoders[`${ typ }Array`] = typeEncoders.DataView; -} -function objectToTokens(obj, options = {}, refStack) { - const typ = is.is(obj); - const customTypeEncoder = options && options.typeEncoders && options.typeEncoders[typ] || typeEncoders[typ]; - if (typeof customTypeEncoder === 'function') { - const tokens = customTypeEncoder(obj, typ, options, refStack); - if (tokens != null) { - return tokens; - } - } - const typeEncoder = typeEncoders[typ]; - if (!typeEncoder) { - throw new Error(`${ common.encodeErrPrefix } unsupported type: ${ typ }`); - } - return typeEncoder(obj, typ, options, refStack); -} -function sortMapEntries(entries, options) { - if (options.mapSorter) { - entries.sort(options.mapSorter); - } -} -function mapSorter(e1, e2) { - const keyToken1 = Array.isArray(e1[0]) ? e1[0][0] : e1[0]; - const keyToken2 = Array.isArray(e2[0]) ? e2[0][0] : e2[0]; - if (keyToken1.type !== keyToken2.type) { - return keyToken1.type.compare(keyToken2.type); - } - const major = keyToken1.type.major; - const tcmp = cborEncoders[major].compareTokens(keyToken1, keyToken2); - if (tcmp === 0) { - console.warn('WARNING: complex key types used, CBOR key sorting guarantees are gone'); - } - return tcmp; -} -function tokensToEncoded(buf, tokens, encoders, options) { - if (Array.isArray(tokens)) { - for (const token of tokens) { - tokensToEncoded(buf, token, encoders, options); +const GREENGRASS_PROTOCOLS = { + "http:": true, + "https:": true, +}; +const getCmdsUri = async () => { + if (process.env[exports.ENV_CMDS_RELATIVE_URI]) { + return { + hostname: CMDS_IP, + path: process.env[exports.ENV_CMDS_RELATIVE_URI], + }; } - } else { - encoders[tokens.type.major](buf, tokens, options); - } -} -function encodeCustom(data, encoders, options) { - const tokens = objectToTokens(data, options); - if (!Array.isArray(tokens) && options.quickEncodeToken) { - const quickBytes = options.quickEncodeToken(tokens); - if (quickBytes) { - return quickBytes; + if (process.env[exports.ENV_CMDS_FULL_URI]) { + const parsed = (0, url_1.parse)(process.env[exports.ENV_CMDS_FULL_URI]); + if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) { + throw new property_provider_1.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, false); + } + if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) { + throw new property_provider_1.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, false); + } + return { + ...parsed, + port: parsed.port ? parseInt(parsed.port, 10) : undefined, + }; } - const encoder = encoders[tokens.type.major]; - if (encoder.encodedSize) { - const size = encoder.encodedSize(tokens, options); - const buf = new bl.Bl(size); - encoder(buf, tokens, options); - if (buf.chunks.length !== 1) { - throw new Error(`Unexpected error: pre-calculated length for ${ tokens } was wrong`); - } - return byteUtils.asU8A(buf.chunks[0]); + throw new property_provider_1.CredentialsProviderError("The container metadata credential provider cannot be used unless" + + ` the ${exports.ENV_CMDS_RELATIVE_URI} or ${exports.ENV_CMDS_FULL_URI} environment` + + " variable is set", false); +}; + + +/***/ }), + +/***/ 72909: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromInstanceMetadata = void 0; +const node_config_provider_1 = __nccwpck_require__(13079); +const property_provider_1 = __nccwpck_require__(12955); +const InstanceMetadataV1FallbackError_1 = __nccwpck_require__(57740); +const httpRequest_1 = __nccwpck_require__(59002); +const ImdsCredentials_1 = __nccwpck_require__(15737); +const RemoteProviderInit_1 = __nccwpck_require__(58969); +const retry_1 = __nccwpck_require__(9919); +const getInstanceMetadataEndpoint_1 = __nccwpck_require__(44877); +const staticStabilityProvider_1 = __nccwpck_require__(12868); +const IMDS_PATH = "/latest/meta-data/iam/security-credentials/"; +const IMDS_TOKEN_PATH = "/latest/api/token"; +const AWS_EC2_METADATA_V1_DISABLED = "AWS_EC2_METADATA_V1_DISABLED"; +const PROFILE_AWS_EC2_METADATA_V1_DISABLED = "ec2_metadata_v1_disabled"; +const X_AWS_EC2_METADATA_TOKEN = "x-aws-ec2-metadata-token"; +const fromInstanceMetadata = (init = {}) => (0, staticStabilityProvider_1.staticStabilityProvider)(getInstanceImdsProvider(init), { logger: init.logger }); +exports.fromInstanceMetadata = fromInstanceMetadata; +const getInstanceImdsProvider = (init) => { + let disableFetchToken = false; + const { logger, profile } = init; + const { timeout, maxRetries } = (0, RemoteProviderInit_1.providerConfigFromInit)(init); + const getCredentials = async (maxRetries, options) => { + var _a; + const isImdsV1Fallback = disableFetchToken || ((_a = options.headers) === null || _a === void 0 ? void 0 : _a[X_AWS_EC2_METADATA_TOKEN]) == null; + if (isImdsV1Fallback) { + let fallbackBlockedFromProfile = false; + let fallbackBlockedFromProcessEnv = false; + const configValue = await (0, node_config_provider_1.loadConfig)({ + environmentVariableSelector: (env) => { + const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; + if (envValue === undefined) { + throw new property_provider_1.CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`); + } + return fallbackBlockedFromProcessEnv; + }, + configFileSelector: (profile) => { + const profileValue = profile[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; + fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; + return fallbackBlockedFromProfile; + }, + default: false, + }, { + profile, + })(); + if (init.ec2MetadataV1Disabled || configValue) { + const causes = []; + if (init.ec2MetadataV1Disabled) + causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); + if (fallbackBlockedFromProfile) + causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProcessEnv) + causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); + throw new InstanceMetadataV1FallbackError_1.InstanceMetadataV1FallbackError(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(", ")}].`); + } + } + const imdsProfile = (await (0, retry_1.retry)(async () => { + let profile; + try { + profile = await getProfile(options); + } + catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return profile; + }, maxRetries)).trim(); + return (0, retry_1.retry)(async () => { + let creds; + try { + creds = await getCredentialsFromProfile(imdsProfile, options); + } + catch (err) { + if (err.statusCode === 401) { + disableFetchToken = false; + } + throw err; + } + return creds; + }, maxRetries); + }; + return async () => { + const endpoint = await (0, getInstanceMetadataEndpoint_1.getInstanceMetadataEndpoint)(); + if (disableFetchToken) { + logger === null || logger === void 0 ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (no token fetch)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + else { + let token; + try { + token = (await getMetadataToken({ ...endpoint, timeout })).toString(); + } + catch (error) { + if ((error === null || error === void 0 ? void 0 : error.statusCode) === 400) { + throw Object.assign(error, { + message: "EC2 Metadata token request returned error", + }); + } + else if (error.message === "TimeoutError" || [403, 404, 405].includes(error.statusCode)) { + disableFetchToken = true; + } + logger === null || logger === void 0 ? void 0 : logger.debug("AWS SDK Instance Metadata", "using v1 fallback (initial)"); + return getCredentials(maxRetries, { ...endpoint, timeout }); + } + return getCredentials(maxRetries, { + ...endpoint, + headers: { + [X_AWS_EC2_METADATA_TOKEN]: token, + }, + timeout, + }); + } + }; +}; +const getMetadataToken = async (options) => (0, httpRequest_1.httpRequest)({ + ...options, + path: IMDS_TOKEN_PATH, + method: "PUT", + headers: { + "x-aws-ec2-metadata-token-ttl-seconds": "21600", + }, +}); +const getProfile = async (options) => (await (0, httpRequest_1.httpRequest)({ ...options, path: IMDS_PATH })).toString(); +const getCredentialsFromProfile = async (profile, options) => { + const credsResponse = JSON.parse((await (0, httpRequest_1.httpRequest)({ + ...options, + path: IMDS_PATH + profile, + })).toString()); + if (!(0, ImdsCredentials_1.isImdsCredentials)(credsResponse)) { + throw new property_provider_1.CredentialsProviderError("Invalid response received from instance metadata service."); } - } - tokensToEncoded(buf, tokens, encoders, options); - return buf.toBytes(true); -} -function encode(data, options) { - options = Object.assign({}, defaultEncodeOptions, options); - return encodeCustom(data, cborEncoders, options); -} + return (0, ImdsCredentials_1.fromImdsCredentials)(credsResponse); +}; -exports.Ref = Ref; -exports.encode = encode; -exports.encodeCustom = encodeCustom; -exports.objectToTokens = objectToTokens; + +/***/ }), + +/***/ 34673: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getInstanceMetadataEndpoint = exports.httpRequest = void 0; +const tslib_1 = __nccwpck_require__(27222); +tslib_1.__exportStar(__nccwpck_require__(11957), exports); +tslib_1.__exportStar(__nccwpck_require__(72909), exports); +tslib_1.__exportStar(__nccwpck_require__(58969), exports); +tslib_1.__exportStar(__nccwpck_require__(11472), exports); +var httpRequest_1 = __nccwpck_require__(59002); +Object.defineProperty(exports, "httpRequest", ({ enumerable: true, get: function () { return httpRequest_1.httpRequest; } })); +var getInstanceMetadataEndpoint_1 = __nccwpck_require__(44877); +Object.defineProperty(exports, "getInstanceMetadataEndpoint", ({ enumerable: true, get: function () { return getInstanceMetadataEndpoint_1.getInstanceMetadataEndpoint; } })); /***/ }), -/***/ 30700: +/***/ 15737: /***/ ((__unused_webpack_module, exports) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromImdsCredentials = exports.isImdsCredentials = void 0; +const isImdsCredentials = (arg) => Boolean(arg) && + typeof arg === "object" && + typeof arg.AccessKeyId === "string" && + typeof arg.SecretAccessKey === "string" && + typeof arg.Token === "string" && + typeof arg.Expiration === "string"; +exports.isImdsCredentials = isImdsCredentials; +const fromImdsCredentials = (creds) => ({ + accessKeyId: creds.AccessKeyId, + secretAccessKey: creds.SecretAccessKey, + sessionToken: creds.Token, + expiration: new Date(creds.Expiration), +}); +exports.fromImdsCredentials = fromImdsCredentials; -const typeofs = [ - 'string', - 'number', - 'bigint', - 'symbol' -]; -const objectTypeNames = [ - 'Function', - 'Generator', - 'AsyncGenerator', - 'GeneratorFunction', - 'AsyncGeneratorFunction', - 'AsyncFunction', - 'Observable', - 'Array', - 'Buffer', - 'Object', - 'RegExp', - 'Date', - 'Error', - 'Map', - 'Set', - 'WeakMap', - 'WeakSet', - 'ArrayBuffer', - 'SharedArrayBuffer', - 'DataView', - 'Promise', - 'URL', - 'HTMLElement', - 'Int8Array', - 'Uint8Array', - 'Uint8ClampedArray', - 'Int16Array', - 'Uint16Array', - 'Int32Array', - 'Uint32Array', - 'Float32Array', - 'Float64Array', - 'BigInt64Array', - 'BigUint64Array' -]; -function is(value) { - if (value === null) { - return 'null'; - } - if (value === undefined) { - return 'undefined'; - } - if (value === true || value === false) { - return 'boolean'; - } - const typeOf = typeof value; - if (typeofs.includes(typeOf)) { - return typeOf; - } - if (typeOf === 'function') { - return 'Function'; - } - if (Array.isArray(value)) { - return 'Array'; - } - if (isBuffer(value)) { - return 'Buffer'; - } - const objectType = getObjectType(value); - if (objectType) { - return objectType; - } - return 'Object'; -} -function isBuffer(value) { - return value && value.constructor && value.constructor.isBuffer && value.constructor.isBuffer.call(null, value); -} -function getObjectType(value) { - const objectTypeName = Object.prototype.toString.call(value).slice(8, -1); - if (objectTypeNames.includes(objectTypeName)) { - return objectTypeName; - } - return undefined; -} -exports.is = is; +/***/ }), +/***/ 58969: +/***/ ((__unused_webpack_module, exports) => { -/***/ }), -/***/ 42029: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.providerConfigFromInit = exports.DEFAULT_MAX_RETRIES = exports.DEFAULT_TIMEOUT = void 0; +exports.DEFAULT_TIMEOUT = 1000; +exports.DEFAULT_MAX_RETRIES = 0; +const providerConfigFromInit = ({ maxRetries = exports.DEFAULT_MAX_RETRIES, timeout = exports.DEFAULT_TIMEOUT, }) => ({ maxRetries, timeout }); +exports.providerConfigFromInit = providerConfigFromInit; -"use strict"; +/***/ }), -Object.defineProperty(exports, "__esModule", ({ value: true })); +/***/ 59002: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -var decode$1 = __nccwpck_require__(53216); -var token = __nccwpck_require__(90915); -var byteUtils = __nccwpck_require__(46070); -var common = __nccwpck_require__(47907); -class Tokenizer { - constructor(data, options = {}) { - this.pos = 0; - this.data = data; - this.options = options; - this.modeStack = ['value']; - this.lastToken = ''; - } - done() { - return this.pos >= this.data.length; - } - ch() { - return this.data[this.pos]; - } - currentMode() { - return this.modeStack[this.modeStack.length - 1]; - } - skipWhitespace() { - let c = this.ch(); - while (c === 32 || c === 9 || c === 13 || c === 10) { - c = this.data[++this.pos]; - } - } - expect(str) { - if (this.data.length - this.pos < str.length) { - throw new Error(`${ common.decodeErrPrefix } unexpected end of input at position ${ this.pos }`); - } - for (let i = 0; i < str.length; i++) { - if (this.data[this.pos++] !== str[i]) { - throw new Error(`${ common.decodeErrPrefix } unexpected token at position ${ this.pos }, expected to find '${ String.fromCharCode(...str) }'`); - } - } - } - parseNumber() { - const startPos = this.pos; - let negative = false; - let float = false; - const swallow = chars => { - while (!this.done()) { - const ch = this.ch(); - if (chars.includes(ch)) { - this.pos++; - } else { - break; - } - } - }; - if (this.ch() === 45) { - negative = true; - this.pos++; - } - if (this.ch() === 48) { - this.pos++; - if (this.ch() === 46) { - this.pos++; - float = true; - } else { - return new token.Token(token.Type.uint, 0, this.pos - startPos); - } - } - swallow([ - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57 - ]); - if (negative && this.pos === startPos + 1) { - throw new Error(`${ common.decodeErrPrefix } unexpected token at position ${ this.pos }`); - } - if (!this.done() && this.ch() === 46) { - if (float) { - throw new Error(`${ common.decodeErrPrefix } unexpected token at position ${ this.pos }`); - } - float = true; - this.pos++; - swallow([ - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57 - ]); - } - if (!this.done() && (this.ch() === 101 || this.ch() === 69)) { - float = true; - this.pos++; - if (!this.done() && (this.ch() === 43 || this.ch() === 45)) { - this.pos++; - } - swallow([ - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57 - ]); - } - const numStr = String.fromCharCode.apply(null, this.data.subarray(startPos, this.pos)); - const num = parseFloat(numStr); - if (float) { - return new token.Token(token.Type.float, num, this.pos - startPos); - } - if (this.options.allowBigInt !== true || Number.isSafeInteger(num)) { - return new token.Token(num >= 0 ? token.Type.uint : token.Type.negint, num, this.pos - startPos); - } - return new token.Token(num >= 0 ? token.Type.uint : token.Type.negint, BigInt(numStr), this.pos - startPos); - } - parseString() { - if (this.ch() !== 34) { - throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }; this shouldn't happen`); - } - this.pos++; - for (let i = this.pos, l = 0; i < this.data.length && l < 65536; i++, l++) { - const ch = this.data[i]; - if (ch === 92 || ch < 32 || ch >= 128) { - break; - } - if (ch === 34) { - const str = String.fromCharCode.apply(null, this.data.subarray(this.pos, i)); - this.pos = i + 1; - return new token.Token(token.Type.string, str, l); - } - } - const startPos = this.pos; - const chars = []; - const readu4 = () => { - if (this.pos + 4 >= this.data.length) { - throw new Error(`${ common.decodeErrPrefix } unexpected end of unicode escape sequence at position ${ this.pos }`); - } - let u4 = 0; - for (let i = 0; i < 4; i++) { - let ch = this.ch(); - if (ch >= 48 && ch <= 57) { - ch -= 48; - } else if (ch >= 97 && ch <= 102) { - ch = ch - 97 + 10; - } else if (ch >= 65 && ch <= 70) { - ch = ch - 65 + 10; - } else { - throw new Error(`${ common.decodeErrPrefix } unexpected unicode escape character at position ${ this.pos }`); - } - u4 = u4 * 16 + ch; - this.pos++; - } - return u4; - }; - const readUtf8Char = () => { - const firstByte = this.ch(); - let codePoint = null; - let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1; - if (this.pos + bytesPerSequence > this.data.length) { - throw new Error(`${ common.decodeErrPrefix } unexpected unicode sequence at position ${ this.pos }`); - } - let secondByte, thirdByte, fourthByte, tempCodePoint; - switch (bytesPerSequence) { - case 1: - if (firstByte < 128) { - codePoint = firstByte; - } - break; - case 2: - secondByte = this.data[this.pos + 1]; - if ((secondByte & 192) === 128) { - tempCodePoint = (firstByte & 31) << 6 | secondByte & 63; - if (tempCodePoint > 127) { - codePoint = tempCodePoint; - } - } - break; - case 3: - secondByte = this.data[this.pos + 1]; - thirdByte = this.data[this.pos + 2]; - if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) { - tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63; - if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) { - codePoint = tempCodePoint; - } - } - break; - case 4: - secondByte = this.data[this.pos + 1]; - thirdByte = this.data[this.pos + 2]; - fourthByte = this.data[this.pos + 3]; - if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) { - tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63; - if (tempCodePoint > 65535 && tempCodePoint < 1114112) { - codePoint = tempCodePoint; - } - } - } - if (codePoint === null) { - codePoint = 65533; - bytesPerSequence = 1; - } else if (codePoint > 65535) { - codePoint -= 65536; - chars.push(codePoint >>> 10 & 1023 | 55296); - codePoint = 56320 | codePoint & 1023; - } - chars.push(codePoint); - this.pos += bytesPerSequence; - }; - while (!this.done()) { - const ch = this.ch(); - let ch1; - switch (ch) { - case 92: - this.pos++; - if (this.done()) { - throw new Error(`${ common.decodeErrPrefix } unexpected string termination at position ${ this.pos }`); - } - ch1 = this.ch(); - this.pos++; - switch (ch1) { - case 34: - case 39: - case 92: - case 47: - chars.push(ch1); - break; - case 98: - chars.push(8); - break; - case 116: - chars.push(9); - break; - case 110: - chars.push(10); - break; - case 102: - chars.push(12); - break; - case 114: - chars.push(13); - break; - case 117: - chars.push(readu4()); - break; - default: - throw new Error(`${ common.decodeErrPrefix } unexpected string escape character at position ${ this.pos }`); - } - break; - case 34: - this.pos++; - return new token.Token(token.Type.string, byteUtils.decodeCodePointsArray(chars), this.pos - startPos); - default: - if (ch < 32) { - throw new Error(`${ common.decodeErrPrefix } invalid control character at position ${ this.pos }`); - } else if (ch < 128) { - chars.push(ch); - this.pos++; - } else { - readUtf8Char(); - } - } - } - throw new Error(`${ common.decodeErrPrefix } unexpected end of string at position ${ this.pos }`); - } - parseValue() { - switch (this.ch()) { - case 123: - this.modeStack.push('obj-start'); - this.pos++; - return new token.Token(token.Type.map, Infinity, 1); - case 91: - this.modeStack.push('array-start'); - this.pos++; - return new token.Token(token.Type.array, Infinity, 1); - case 34: { - return this.parseString(); - } - case 110: - this.expect([ - 110, - 117, - 108, - 108 - ]); - return new token.Token(token.Type.null, null, 4); - case 102: - this.expect([ - 102, - 97, - 108, - 115, - 101 - ]); - return new token.Token(token.Type.false, false, 5); - case 116: - this.expect([ - 116, - 114, - 117, - 101 - ]); - return new token.Token(token.Type.true, true, 4); - case 45: - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - return this.parseNumber(); - default: - throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }`); - } - } - next() { - this.skipWhitespace(); - switch (this.currentMode()) { - case 'value': - this.modeStack.pop(); - return this.parseValue(); - case 'array-value': { - this.modeStack.pop(); - if (this.ch() === 93) { - this.pos++; - this.skipWhitespace(); - return new token.Token(token.Type.break, undefined, 1); - } - if (this.ch() !== 44) { - throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }, was expecting array delimiter but found '${ String.fromCharCode(this.ch()) }'`); - } - this.pos++; - this.modeStack.push('array-value'); - this.skipWhitespace(); - return this.parseValue(); - } - case 'array-start': { - this.modeStack.pop(); - if (this.ch() === 93) { - this.pos++; - this.skipWhitespace(); - return new token.Token(token.Type.break, undefined, 1); - } - this.modeStack.push('array-value'); - this.skipWhitespace(); - return this.parseValue(); - } - case 'obj-key': - if (this.ch() === 125) { - this.modeStack.pop(); - this.pos++; - this.skipWhitespace(); - return new token.Token(token.Type.break, undefined, 1); - } - if (this.ch() !== 44) { - throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }, was expecting object delimiter but found '${ String.fromCharCode(this.ch()) }'`); - } - this.pos++; - this.skipWhitespace(); - case 'obj-start': { - this.modeStack.pop(); - if (this.ch() === 125) { - this.pos++; - this.skipWhitespace(); - return new token.Token(token.Type.break, undefined, 1); - } - const token$1 = this.parseString(); - this.skipWhitespace(); - if (this.ch() !== 58) { - throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }, was expecting key/value delimiter ':' but found '${ String.fromCharCode(this.ch()) }'`); - } - this.pos++; - this.modeStack.push('obj-value'); - return token$1; - } - case 'obj-value': { - this.modeStack.pop(); - this.modeStack.push('obj-key'); - this.skipWhitespace(); - return this.parseValue(); - } - default: - throw new Error(`${ common.decodeErrPrefix } unexpected parse state at position ${ this.pos }; this shouldn't happen`); - } - } -} -function decode(data, options) { - options = Object.assign({ tokenizer: new Tokenizer(data, options) }, options); - return decode$1.decode(data, options); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.httpRequest = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const buffer_1 = __nccwpck_require__(14300); +const http_1 = __nccwpck_require__(13685); +function httpRequest(options) { + return new Promise((resolve, reject) => { + var _a; + const req = (0, http_1.request)({ + method: "GET", + ...options, + hostname: (_a = options.hostname) === null || _a === void 0 ? void 0 : _a.replace(/^\[(.+)\]$/, "$1"), + }); + req.on("error", (err) => { + reject(Object.assign(new property_provider_1.ProviderError("Unable to connect to instance metadata service"), err)); + req.destroy(); + }); + req.on("timeout", () => { + reject(new property_provider_1.ProviderError("TimeoutError from instance metadata service")); + req.destroy(); + }); + req.on("response", (res) => { + const { statusCode = 400 } = res; + if (statusCode < 200 || 300 <= statusCode) { + reject(Object.assign(new property_provider_1.ProviderError("Error response received from instance metadata service"), { statusCode })); + req.destroy(); + } + const chunks = []; + res.on("data", (chunk) => { + chunks.push(chunk); + }); + res.on("end", () => { + resolve(buffer_1.Buffer.concat(chunks)); + req.destroy(); + }); + }); + req.end(); + }); } - -exports.Tokenizer = Tokenizer; -exports.decode = decode; +exports.httpRequest = httpRequest; /***/ }), -/***/ 65805: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 9919: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); - -var token = __nccwpck_require__(90915); -var encode$1 = __nccwpck_require__(87446); -var common = __nccwpck_require__(47907); -var byteUtils = __nccwpck_require__(46070); - -class JSONEncoder extends Array { - constructor() { - super(); - this.inRecursive = []; - } - prefix(buf) { - const recurs = this.inRecursive[this.inRecursive.length - 1]; - if (recurs) { - if (recurs.type === token.Type.array) { - recurs.elements++; - if (recurs.elements !== 1) { - buf.push([44]); - } - } - if (recurs.type === token.Type.map) { - recurs.elements++; - if (recurs.elements !== 1) { - if (recurs.elements % 2 === 1) { - buf.push([44]); - } else { - buf.push([58]); - } - } - } - } - } - [token.Type.uint.major](buf, token) { - this.prefix(buf); - const is = String(token.value); - const isa = []; - for (let i = 0; i < is.length; i++) { - isa[i] = is.charCodeAt(i); - } - buf.push(isa); - } - [token.Type.negint.major](buf, token$1) { - this[token.Type.uint.major](buf, token$1); - } - [token.Type.bytes.major](_buf, _token) { - throw new Error(`${ common.encodeErrPrefix } unsupported type: Uint8Array`); - } - [token.Type.string.major](buf, token) { - this.prefix(buf); - const byts = byteUtils.fromString(JSON.stringify(token.value)); - buf.push(byts.length > 32 ? byteUtils.asU8A(byts) : byts); - } - [token.Type.array.major](buf, _token) { - this.prefix(buf); - this.inRecursive.push({ - type: token.Type.array, - elements: 0 - }); - buf.push([91]); - } - [token.Type.map.major](buf, _token) { - this.prefix(buf); - this.inRecursive.push({ - type: token.Type.map, - elements: 0 - }); - buf.push([123]); - } - [token.Type.tag.major](_buf, _token) { - } - [token.Type.float.major](buf, token$1) { - if (token$1.type.name === 'break') { - const recurs = this.inRecursive.pop(); - if (recurs) { - if (recurs.type === token.Type.array) { - buf.push([93]); - } else if (recurs.type === token.Type.map) { - buf.push([125]); - } else { - throw new Error('Unexpected recursive type; this should not happen!'); - } - return; - } - throw new Error('Unexpected break; this should not happen!'); - } - if (token$1.value === undefined) { - throw new Error(`${ common.encodeErrPrefix } unsupported type: undefined`); - } - this.prefix(buf); - if (token$1.type.name === 'true') { - buf.push([ - 116, - 114, - 117, - 101 - ]); - return; - } else if (token$1.type.name === 'false') { - buf.push([ - 102, - 97, - 108, - 115, - 101 - ]); - return; - } else if (token$1.type.name === 'null') { - buf.push([ - 110, - 117, - 108, - 108 - ]); - return; - } - const is = String(token$1.value); - const isa = []; - let dp = false; - for (let i = 0; i < is.length; i++) { - isa[i] = is.charCodeAt(i); - if (!dp && (isa[i] === 46 || isa[i] === 101 || isa[i] === 69)) { - dp = true; - } - } - if (!dp) { - isa.push(46); - isa.push(48); +exports.retry = void 0; +const retry = (toRetry, maxRetries) => { + let promise = toRetry(); + for (let i = 0; i < maxRetries; i++) { + promise = promise.catch(toRetry); } - buf.push(isa); - } -} -function mapSorter(e1, e2) { - if (Array.isArray(e1[0]) || Array.isArray(e2[0])) { - throw new Error(`${ common.encodeErrPrefix } complex map keys are not supported`); - } - const keyToken1 = e1[0]; - const keyToken2 = e2[0]; - if (keyToken1.type !== token.Type.string || keyToken2.type !== token.Type.string) { - throw new Error(`${ common.encodeErrPrefix } non-string map keys are not supported`); - } - if (keyToken1 < keyToken2) { - return -1; - } - if (keyToken1 > keyToken2) { - return 1; - } - throw new Error(`${ common.encodeErrPrefix } unexpected duplicate map keys, this is not supported`); -} -const defaultEncodeOptions = { - addBreakTokens: true, - mapSorter + return promise; }; -function encode(data, options) { - options = Object.assign({}, defaultEncodeOptions, options); - return encode$1.encodeCustom(data, new JSONEncoder(), options); -} - -exports.encode = encode; +exports.retry = retry; /***/ }), -/***/ 81342: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 11472: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var encode = __nccwpck_require__(65805); -var decode = __nccwpck_require__(42029); +/***/ }), +/***/ 43201: +/***/ ((__unused_webpack_module, exports) => { -exports.encode = encode.encode; -exports.Tokenizer = decode.Tokenizer; -exports.decode = decode.decode; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getExtendedInstanceMetadataCredentials = void 0; +const STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60; +const STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60; +const STATIC_STABILITY_DOC_URL = "https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html"; +const getExtendedInstanceMetadataCredentials = (credentials, logger) => { + var _a; + const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS); + const newExpiration = new Date(Date.now() + refreshInterval * 1000); + logger.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these " + + "credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: " + + STATIC_STABILITY_DOC_URL); + const originalExpiration = (_a = credentials.originalExpiration) !== null && _a !== void 0 ? _a : credentials.expiration; + return { + ...credentials, + ...(originalExpiration ? { originalExpiration } : {}), + expiration: newExpiration, + }; +}; +exports.getExtendedInstanceMetadataCredentials = getExtendedInstanceMetadataCredentials; /***/ }), -/***/ 60294: +/***/ 44877: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var token = __nccwpck_require__(90915); -var _0uint = __nccwpck_require__(80316); -var _1negint = __nccwpck_require__(33709); -var _2bytes = __nccwpck_require__(70195); -var _3string = __nccwpck_require__(49081); -var _4array = __nccwpck_require__(22339); -var _5map = __nccwpck_require__(91440); -var _6tag = __nccwpck_require__(97051); -var _7float = __nccwpck_require__(59213); -var common = __nccwpck_require__(47907); -var byteUtils = __nccwpck_require__(46070); - -function invalidMinor(data, pos, minor) { - throw new Error(`${ common.decodeErrPrefix } encountered invalid minor (${ minor }) for major ${ data[pos] >>> 5 }`); -} -function errorer(msg) { - return () => { - throw new Error(`${ common.decodeErrPrefix } ${ msg }`); - }; -} -const jump = []; -for (let i = 0; i <= 23; i++) { - jump[i] = invalidMinor; -} -jump[24] = _0uint.decodeUint8; -jump[25] = _0uint.decodeUint16; -jump[26] = _0uint.decodeUint32; -jump[27] = _0uint.decodeUint64; -jump[28] = invalidMinor; -jump[29] = invalidMinor; -jump[30] = invalidMinor; -jump[31] = invalidMinor; -for (let i = 32; i <= 55; i++) { - jump[i] = invalidMinor; -} -jump[56] = _1negint.decodeNegint8; -jump[57] = _1negint.decodeNegint16; -jump[58] = _1negint.decodeNegint32; -jump[59] = _1negint.decodeNegint64; -jump[60] = invalidMinor; -jump[61] = invalidMinor; -jump[62] = invalidMinor; -jump[63] = invalidMinor; -for (let i = 64; i <= 87; i++) { - jump[i] = _2bytes.decodeBytesCompact; -} -jump[88] = _2bytes.decodeBytes8; -jump[89] = _2bytes.decodeBytes16; -jump[90] = _2bytes.decodeBytes32; -jump[91] = _2bytes.decodeBytes64; -jump[92] = invalidMinor; -jump[93] = invalidMinor; -jump[94] = invalidMinor; -jump[95] = errorer('indefinite length bytes/strings are not supported'); -for (let i = 96; i <= 119; i++) { - jump[i] = _3string.decodeStringCompact; -} -jump[120] = _3string.decodeString8; -jump[121] = _3string.decodeString16; -jump[122] = _3string.decodeString32; -jump[123] = _3string.decodeString64; -jump[124] = invalidMinor; -jump[125] = invalidMinor; -jump[126] = invalidMinor; -jump[127] = errorer('indefinite length bytes/strings are not supported'); -for (let i = 128; i <= 151; i++) { - jump[i] = _4array.decodeArrayCompact; -} -jump[152] = _4array.decodeArray8; -jump[153] = _4array.decodeArray16; -jump[154] = _4array.decodeArray32; -jump[155] = _4array.decodeArray64; -jump[156] = invalidMinor; -jump[157] = invalidMinor; -jump[158] = invalidMinor; -jump[159] = _4array.decodeArrayIndefinite; -for (let i = 160; i <= 183; i++) { - jump[i] = _5map.decodeMapCompact; -} -jump[184] = _5map.decodeMap8; -jump[185] = _5map.decodeMap16; -jump[186] = _5map.decodeMap32; -jump[187] = _5map.decodeMap64; -jump[188] = invalidMinor; -jump[189] = invalidMinor; -jump[190] = invalidMinor; -jump[191] = _5map.decodeMapIndefinite; -for (let i = 192; i <= 215; i++) { - jump[i] = _6tag.decodeTagCompact; -} -jump[216] = _6tag.decodeTag8; -jump[217] = _6tag.decodeTag16; -jump[218] = _6tag.decodeTag32; -jump[219] = _6tag.decodeTag64; -jump[220] = invalidMinor; -jump[221] = invalidMinor; -jump[222] = invalidMinor; -jump[223] = invalidMinor; -for (let i = 224; i <= 243; i++) { - jump[i] = errorer('simple values are not supported'); -} -jump[244] = invalidMinor; -jump[245] = invalidMinor; -jump[246] = invalidMinor; -jump[247] = _7float.decodeUndefined; -jump[248] = errorer('simple values are not supported'); -jump[249] = _7float.decodeFloat16; -jump[250] = _7float.decodeFloat32; -jump[251] = _7float.decodeFloat64; -jump[252] = invalidMinor; -jump[253] = invalidMinor; -jump[254] = invalidMinor; -jump[255] = _7float.decodeBreak; -const quick = []; -for (let i = 0; i < 24; i++) { - quick[i] = new token.Token(token.Type.uint, i, 1); -} -for (let i = -1; i >= -24; i--) { - quick[31 - i] = new token.Token(token.Type.negint, i, 1); -} -quick[64] = new token.Token(token.Type.bytes, new Uint8Array(0), 1); -quick[96] = new token.Token(token.Type.string, '', 1); -quick[128] = new token.Token(token.Type.array, 0, 1); -quick[160] = new token.Token(token.Type.map, 0, 1); -quick[244] = new token.Token(token.Type.false, false, 1); -quick[245] = new token.Token(token.Type.true, true, 1); -quick[246] = new token.Token(token.Type.null, null, 1); -function quickEncodeToken(token$1) { - switch (token$1.type) { - case token.Type.false: - return byteUtils.fromArray([244]); - case token.Type.true: - return byteUtils.fromArray([245]); - case token.Type.null: - return byteUtils.fromArray([246]); - case token.Type.bytes: - if (!token$1.value.length) { - return byteUtils.fromArray([64]); - } - return; - case token.Type.string: - if (token$1.value === '') { - return byteUtils.fromArray([96]); - } - return; - case token.Type.array: - if (token$1.value === 0) { - return byteUtils.fromArray([128]); - } - return; - case token.Type.map: - if (token$1.value === 0) { - return byteUtils.fromArray([160]); - } - return; - case token.Type.uint: - if (token$1.value < 24) { - return byteUtils.fromArray([Number(token$1.value)]); - } - return; - case token.Type.negint: - if (token$1.value >= -24) { - return byteUtils.fromArray([31 - Number(token$1.value)]); +exports.getInstanceMetadataEndpoint = void 0; +const node_config_provider_1 = __nccwpck_require__(13079); +const url_parser_1 = __nccwpck_require__(98245); +const Endpoint_1 = __nccwpck_require__(56028); +const EndpointConfigOptions_1 = __nccwpck_require__(28366); +const EndpointMode_1 = __nccwpck_require__(1988); +const EndpointModeConfigOptions_1 = __nccwpck_require__(76819); +const getInstanceMetadataEndpoint = async () => (0, url_parser_1.parseUrl)((await getFromEndpointConfig()) || (await getFromEndpointModeConfig())); +exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint; +const getFromEndpointConfig = async () => (0, node_config_provider_1.loadConfig)(EndpointConfigOptions_1.ENDPOINT_CONFIG_OPTIONS)(); +const getFromEndpointModeConfig = async () => { + const endpointMode = await (0, node_config_provider_1.loadConfig)(EndpointModeConfigOptions_1.ENDPOINT_MODE_CONFIG_OPTIONS)(); + switch (endpointMode) { + case EndpointMode_1.EndpointMode.IPv4: + return Endpoint_1.Endpoint.IPv4; + case EndpointMode_1.EndpointMode.IPv6: + return Endpoint_1.Endpoint.IPv6; + default: + throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode_1.EndpointMode)}`); } - } -} - -exports.jump = jump; -exports.quick = quick; -exports.quickEncodeToken = quickEncodeToken; +}; /***/ }), -/***/ 90915: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; +/***/ 12868: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); - -class Type { - constructor(major, name, terminal) { - this.major = major; - this.majorEncoded = major << 5; - this.name = name; - this.terminal = terminal; - } - toString() { - return `Type[${ this.major }].${ this.name }`; - } - compare(typ) { - return this.major < typ.major ? -1 : this.major > typ.major ? 1 : 0; - } -} -Type.uint = new Type(0, 'uint', true); -Type.negint = new Type(1, 'negint', true); -Type.bytes = new Type(2, 'bytes', true); -Type.string = new Type(3, 'string', true); -Type.array = new Type(4, 'array', false); -Type.map = new Type(5, 'map', false); -Type.tag = new Type(6, 'tag', false); -Type.float = new Type(7, 'float', true); -Type.false = new Type(7, 'false', true); -Type.true = new Type(7, 'true', true); -Type.null = new Type(7, 'null', true); -Type.undefined = new Type(7, 'undefined', true); -Type.break = new Type(7, 'break', true); -class Token { - constructor(type, value, encodedLength) { - this.type = type; - this.value = value; - this.encodedLength = encodedLength; - this.encodedBytes = undefined; - } - toString() { - return `Token[${ this.type }].${ this.value }`; - } -} - -exports.Token = Token; -exports.Type = Type; +exports.staticStabilityProvider = void 0; +const getExtendedInstanceMetadataCredentials_1 = __nccwpck_require__(43201); +const staticStabilityProvider = (provider, options = {}) => { + const logger = (options === null || options === void 0 ? void 0 : options.logger) || console; + let pastCredentials; + return async () => { + let credentials; + try { + credentials = await provider(); + if (credentials.expiration && credentials.expiration.getTime() < Date.now()) { + credentials = (0, getExtendedInstanceMetadataCredentials_1.getExtendedInstanceMetadataCredentials)(credentials, logger); + } + } + catch (e) { + if (pastCredentials) { + logger.warn("Credential renew failed: ", e); + credentials = (0, getExtendedInstanceMetadataCredentials_1.getExtendedInstanceMetadataCredentials)(pastCredentials, logger); + } + else { + throw e; + } + } + pastCredentials = credentials; + return credentials; + }; +}; +exports.staticStabilityProvider = staticStabilityProvider; /***/ }), -/***/ 86421: +/***/ 27222: /***/ ((module) => { -"use strict"; - +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 withIs(Class, { className, symbolName }) { - const symbol = Symbol.for(symbolName); + __assign = Object.assign || function (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; + }; - const ClassIsWrapper = { - // The code below assigns the class wrapper to an object to trick - // JavaScript engines to show the name of the extended class when - // logging an instances. - // We are assigning an anonymous class (class wrapper) to the object - // with key `className` to keep the correct name. - // If this is not supported it falls back to logging `ClassIsWrapper`. - [className]: class extends Class { - constructor(...args) { - super(...args); - Object.defineProperty(this, symbol, { value: true }); + __rest = function (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; + }; - get [Symbol.toStringTag]() { - return className; - } - }, - }[className]; + __decorate = function (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; + }; - ClassIsWrapper[`is${className}`] = (obj) => !!(obj && obj[symbol]); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - return ClassIsWrapper; -} + __esDecorate = function (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)); }; + 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 withIsProto(Class, { className, symbolName, withoutNew }) { - const symbol = Symbol.for(symbolName); + __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; + }; - /* eslint-disable object-shorthand */ - const ClassIsWrapper = { - [className]: function (...args) { - if (withoutNew && !(this instanceof ClassIsWrapper)) { - return new ClassIsWrapper(...args); - } + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - const _this = Class.call(this, ...args) || this; + __setFunctionName = function (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 }); + }; - if (_this && !_this[symbol]) { - Object.defineProperty(_this, symbol, { value: true }); - } + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - return _this; - }, - }[className]; - /* eslint-enable object-shorthand */ + __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()); + }); + }; - ClassIsWrapper.prototype = Object.create(Class.prototype); - ClassIsWrapper.prototype.constructor = ClassIsWrapper; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; - Object.defineProperty(ClassIsWrapper.prototype, Symbol.toStringTag, { - get() { - return className; - }, + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; }); - ClassIsWrapper[`is${className}`] = (obj) => !!(obj && obj[symbol]); + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - return ClassIsWrapper; -} + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -module.exports = withIs; -module.exports.proto = withIsProto; + /** @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 = 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; + }; -/***/ }), + __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)); + }; -/***/ 73132: -/***/ ((module) => { + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; + __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(n, v); }); }; } + 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]); } + }; -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + __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); } + }; -/***/ }), + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -/***/ 43102: -/***/ ((module) => { + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -"use strict"; + __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; + }; -/** - * Returns a `Buffer` instance from the given data URI `uri`. - * - * @param {String} uri Data URI to turn into a Buffer instance - * @return {Buffer} Buffer instance from Data URI - * @api public - */ -function dataUriToBuffer(uri) { - if (!/^data:/i.test(uri)) { - throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")'); - } - // strip newlines - uri = uri.replace(/\r?\n/g, ''); - // split the URI up into the "metadata" and the "data" portions - const firstComma = uri.indexOf(','); - if (firstComma === -1 || firstComma <= 4) { - throw new TypeError('malformed data: URI'); - } - // remove the "data:" scheme and parse the metadata - const meta = uri.substring(5, firstComma).split(';'); - let charset = ''; - let base64 = false; - const type = meta[0] || 'text/plain'; - let typeFull = type; - for (let i = 1; i < meta.length; i++) { - if (meta[i] === 'base64') { - base64 = true; + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); } - else { - typeFull += `;${meta[i]}`; - if (meta[i].indexOf('charset=') === 0) { - charset = meta[i].substring(8); + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } } + if (env.hasError) throw env.error; } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); + + +/***/ }), + +/***/ 66941: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EventStreamCodec = void 0; +const crc32_1 = __nccwpck_require__(30343); +const HeaderMarshaller_1 = __nccwpck_require__(47987); +const splitMessage_1 = __nccwpck_require__(52963); +class EventStreamCodec { + constructor(toUtf8, fromUtf8) { + this.headerMarshaller = new HeaderMarshaller_1.HeaderMarshaller(toUtf8, fromUtf8); + this.messageBuffer = []; + this.isEndOfStream = false; } - // defaults to US-ASCII only if type is not provided - if (!meta[0] && !charset.length) { - typeFull += ';charset=US-ASCII'; - charset = 'US-ASCII'; + feed(message) { + this.messageBuffer.push(this.decode(message)); + } + endOfStream() { + this.isEndOfStream = true; + } + getMessage() { + const message = this.messageBuffer.pop(); + const isEndOfStream = this.isEndOfStream; + return { + getMessage() { + return message; + }, + isEndOfStream() { + return isEndOfStream; + }, + }; + } + getAvailableMessages() { + const messages = this.messageBuffer; + this.messageBuffer = []; + const isEndOfStream = this.isEndOfStream; + return { + getMessages() { + return messages; + }, + isEndOfStream() { + return isEndOfStream; + }, + }; + } + encode({ headers: rawHeaders, body }) { + const headers = this.headerMarshaller.format(rawHeaders); + const length = headers.byteLength + body.byteLength + 16; + const out = new Uint8Array(length); + const view = new DataView(out.buffer, out.byteOffset, out.byteLength); + const checksum = new crc32_1.Crc32(); + view.setUint32(0, length, false); + view.setUint32(4, headers.byteLength, false); + view.setUint32(8, checksum.update(out.subarray(0, 8)).digest(), false); + out.set(headers, 12); + out.set(body, headers.byteLength + 12); + view.setUint32(length - 4, checksum.update(out.subarray(8, length - 4)).digest(), false); + return out; + } + decode(message) { + const { headers, body } = (0, splitMessage_1.splitMessage)(message); + return { headers: this.headerMarshaller.parse(headers), body }; + } + formatHeaders(rawHeaders) { + return this.headerMarshaller.format(rawHeaders); } - // get the encoded data portion and decode URI-encoded chars - const encoding = base64 ? 'base64' : 'ascii'; - const data = unescape(uri.substring(firstComma + 1)); - const buffer = Buffer.from(data, encoding); - // set `.type` and `.typeFull` properties to MIME type - buffer.type = type; - buffer.typeFull = typeFull; - // set the `.charset` property - buffer.charset = charset; - return buffer; } -module.exports = dataUriToBuffer; -//# sourceMappingURL=index.js.map +exports.EventStreamCodec = EventStreamCodec; + /***/ }), -/***/ 15524: -/***/ ((module, exports, __nccwpck_require__) => { +/***/ 47987: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/* eslint-env browser */ -/** - * This is the web browser implementation of `debug()`. - */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HeaderMarshaller = void 0; +const util_hex_encoding_1 = __nccwpck_require__(61027); +const Int64_1 = __nccwpck_require__(54876); +class HeaderMarshaller { + constructor(toUtf8, fromUtf8) { + this.toUtf8 = toUtf8; + this.fromUtf8 = fromUtf8; + } + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = this.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); + } + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; + } + return out; + } + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = this.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64_1.Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); + } + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set((0, util_hex_encoding_1.fromHex)(header.value.replace(/\-/g, "")), 1); + return uuidBytes; + } + } + parse(headers) { + const out = {}; + let position = 0; + while (position < headers.byteLength) { + const nameLength = headers.getUint8(position++); + const name = this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, nameLength)); + position += nameLength; + switch (headers.getUint8(position++)) { + case 0: + out[name] = { + type: BOOLEAN_TAG, + value: true, + }; + break; + case 1: + out[name] = { + type: BOOLEAN_TAG, + value: false, + }; + break; + case 2: + out[name] = { + type: BYTE_TAG, + value: headers.getInt8(position++), + }; + break; + case 3: + out[name] = { + type: SHORT_TAG, + value: headers.getInt16(position, false), + }; + position += 2; + break; + case 4: + out[name] = { + type: INT_TAG, + value: headers.getInt32(position, false), + }; + position += 4; + break; + case 5: + out[name] = { + type: LONG_TAG, + value: new Int64_1.Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)), + }; + position += 8; + break; + case 6: + const binaryLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: BINARY_TAG, + value: new Uint8Array(headers.buffer, headers.byteOffset + position, binaryLength), + }; + position += binaryLength; + break; + case 7: + const stringLength = headers.getUint16(position, false); + position += 2; + out[name] = { + type: STRING_TAG, + value: this.toUtf8(new Uint8Array(headers.buffer, headers.byteOffset + position, stringLength)), + }; + position += stringLength; + break; + case 8: + out[name] = { + type: TIMESTAMP_TAG, + value: new Date(new Int64_1.Int64(new Uint8Array(headers.buffer, headers.byteOffset + position, 8)).valueOf()), + }; + position += 8; + break; + case 9: + const uuidBytes = new Uint8Array(headers.buffer, headers.byteOffset + position, 16); + position += 16; + out[name] = { + type: UUID_TAG, + value: `${(0, util_hex_encoding_1.toHex)(uuidBytes.subarray(0, 4))}-${(0, util_hex_encoding_1.toHex)(uuidBytes.subarray(4, 6))}-${(0, util_hex_encoding_1.toHex)(uuidBytes.subarray(6, 8))}-${(0, util_hex_encoding_1.toHex)(uuidBytes.subarray(8, 10))}-${(0, util_hex_encoding_1.toHex)(uuidBytes.subarray(10))}`, + }; + break; + default: + throw new Error(`Unrecognized header type tag`); + } + } + return out; + } +} +exports.HeaderMarshaller = HeaderMarshaller; +var HEADER_VALUE_TYPE; +(function (HEADER_VALUE_TYPE) { + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolTrue"] = 0] = "boolTrue"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolFalse"] = 1] = "boolFalse"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byte"] = 2] = "byte"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["short"] = 3] = "short"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["integer"] = 4] = "integer"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["long"] = 5] = "long"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byteArray"] = 6] = "byteArray"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["string"] = 7] = "string"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["timestamp"] = 8] = "timestamp"; + HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["uuid"] = 9] = "uuid"; +})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {})); +const BOOLEAN_TAG = "boolean"; +const BYTE_TAG = "byte"; +const SHORT_TAG = "short"; +const INT_TAG = "integer"; +const LONG_TAG = "long"; +const BINARY_TAG = "binary"; +const STRING_TAG = "string"; +const TIMESTAMP_TAG = "timestamp"; +const UUID_TAG = "uuid"; +const UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.storage = localstorage(); -exports.destroy = (() => { - let warned = false; - return () => { - if (!warned) { - warned = true; - console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); - } - }; -})(); +/***/ }), -/** - * Colors. - */ +/***/ 54876: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -exports.colors = [ - '#0000CC', - '#0000FF', - '#0033CC', - '#0033FF', - '#0066CC', - '#0066FF', - '#0099CC', - '#0099FF', - '#00CC00', - '#00CC33', - '#00CC66', - '#00CC99', - '#00CCCC', - '#00CCFF', - '#3300CC', - '#3300FF', - '#3333CC', - '#3333FF', - '#3366CC', - '#3366FF', - '#3399CC', - '#3399FF', - '#33CC00', - '#33CC33', - '#33CC66', - '#33CC99', - '#33CCCC', - '#33CCFF', - '#6600CC', - '#6600FF', - '#6633CC', - '#6633FF', - '#66CC00', - '#66CC33', - '#9900CC', - '#9900FF', - '#9933CC', - '#9933FF', - '#99CC00', - '#99CC33', - '#CC0000', - '#CC0033', - '#CC0066', - '#CC0099', - '#CC00CC', - '#CC00FF', - '#CC3300', - '#CC3333', - '#CC3366', - '#CC3399', - '#CC33CC', - '#CC33FF', - '#CC6600', - '#CC6633', - '#CC9900', - '#CC9933', - '#CCCC00', - '#CCCC33', - '#FF0000', - '#FF0033', - '#FF0066', - '#FF0099', - '#FF00CC', - '#FF00FF', - '#FF3300', - '#FF3333', - '#FF3366', - '#FF3399', - '#FF33CC', - '#FF33FF', - '#FF6600', - '#FF6633', - '#FF9900', - '#FF9933', - '#FFCC00', - '#FFCC33' -]; -/** - * Currently only WebKit-based Web Inspectors, Firefox >= v31, - * and the Firebug extension (any Firefox version) are known - * to support "%c" CSS customizations. - * - * TODO: add a `localStorage` variable to explicitly enable/disable colors - */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Int64 = void 0; +const util_hex_encoding_1 = __nccwpck_require__(61027); +class Int64 { + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); + } + } + static fromNumber(number) { + if (number > 9223372036854776000 || number < -9223372036854776000) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); + } + const bytes = new Uint8Array(8); + for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; + } + if (number < 0) { + negate(bytes); + } + return new Int64(bytes); + } + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 0b10000000; + if (negative) { + negate(bytes); + } + return parseInt((0, util_hex_encoding_1.toHex)(bytes), 16) * (negative ? -1 : 1); + } + toString() { + return String(this.valueOf()); + } +} +exports.Int64 = Int64; +function negate(bytes) { + for (let i = 0; i < 8; i++) { + bytes[i] ^= 0xff; + } + for (let i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; + } +} -// eslint-disable-next-line complexity -function useColors() { - // NB: In an Electron preload script, document will be defined but not fully - // initialized. Since we know we're in Chrome, we'll just detect this case - // explicitly - if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { - return true; - } - // Internet Explorer and Edge do not support colors. - if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { - return false; - } +/***/ }), - // Is webkit? http://stackoverflow.com/a/16459606/376773 - // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 - return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || - // Is firebug? http://stackoverflow.com/a/398120/376773 - (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || - // Is firefox >= v31? - // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || - // Double check webkit in userAgent just in case we are in a worker - (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); -} +/***/ 19705: +/***/ ((__unused_webpack_module, exports) => { -/** - * Colorize log arguments if enabled. - * - * @api public - */ -function formatArgs(args) { - args[0] = (this.useColors ? '%c' : '') + - this.namespace + - (this.useColors ? ' %c' : ' ') + - args[0] + - (this.useColors ? '%c ' : ' ') + - '+' + module.exports.humanize(this.diff); +Object.defineProperty(exports, "__esModule", ({ value: true })); - if (!this.useColors) { - return; - } - const c = 'color: ' + this.color; - args.splice(1, 0, c, 'color: inherit'); +/***/ }), - // The final "%c" is somewhat tricky, because there could be other - // arguments passed either before or after the %c, so we need to - // figure out the correct index to insert the CSS into - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, match => { - if (match === '%%') { - return; - } - index++; - if (match === '%c') { - // We only are interested in the *last* %c - // (the user may have provided their own) - lastC = index; - } - }); +/***/ 28338: +/***/ ((__unused_webpack_module, exports) => { - args.splice(lastC, 0, c); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MessageDecoderStream = void 0; +class MessageDecoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const bytes of this.options.inputStream) { + const decoded = this.options.decoder.decode(bytes); + yield decoded; + } + } } +exports.MessageDecoderStream = MessageDecoderStream; -/** - * Invokes `console.debug()` when available. - * No-op when `console.debug` is not a "function". - * If `console.debug` is not available, falls back - * to `console.log`. - * - * @api public - */ -exports.log = console.debug || console.log || (() => {}); -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - try { - if (namespaces) { - exports.storage.setItem('debug', namespaces); - } else { - exports.storage.removeItem('debug'); - } - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } -} +/***/ }), -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ -function load() { - let r; - try { - r = exports.storage.getItem('debug'); - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } +/***/ 7130: +/***/ ((__unused_webpack_module, exports) => { - // If debug isn't set in LS, and we're in Electron, try to load $DEBUG - if (!r && typeof process !== 'undefined' && 'env' in process) { - r = process.env.DEBUG; - } - return r; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MessageEncoderStream = void 0; +class MessageEncoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const msg of this.options.messageStream) { + const encoded = this.options.encoder.encode(msg); + yield encoded; + } + if (this.options.includeEndFrame) { + yield new Uint8Array(0); + } + } } +exports.MessageEncoderStream = MessageEncoderStream; -/** - * Localstorage attempts to return the localstorage. - * - * This is necessary because safari throws - * when a user disables cookies/localstorage - * and you attempt to access it. - * - * @return {LocalStorage} - * @api private - */ -function localstorage() { - try { - // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context - // The Browser also has localStorage in the global context. - return localStorage; - } catch (error) { - // Swallow - // XXX (@Qix-) should we be logging these? - } +/***/ }), + +/***/ 41598: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SmithyMessageDecoderStream = void 0; +class SmithyMessageDecoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const message of this.options.messageStream) { + const deserialized = await this.options.deserializer(message); + if (deserialized === undefined) + continue; + yield deserialized; + } + } } +exports.SmithyMessageDecoderStream = SmithyMessageDecoderStream; -module.exports = __nccwpck_require__(46881)(exports); -const {formatters} = module.exports; +/***/ }), -/** - * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. - */ +/***/ 72548: +/***/ ((__unused_webpack_module, exports) => { -formatters.j = function (v) { - try { - return JSON.stringify(v); - } catch (error) { - return '[UnexpectedJSONParseError]: ' + error.message; - } -}; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SmithyMessageEncoderStream = void 0; +class SmithyMessageEncoderStream { + constructor(options) { + this.options = options; + } + [Symbol.asyncIterator]() { + return this.asyncIterator(); + } + async *asyncIterator() { + for await (const chunk of this.options.inputStream) { + const payloadBuf = this.options.serializer(chunk); + yield payloadBuf; + } + } +} +exports.SmithyMessageEncoderStream = SmithyMessageEncoderStream; /***/ }), -/***/ 46881: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 58152: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * This is the common logic for both the Node.js and web browser - * implementations of `debug()`. - */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(28530); +tslib_1.__exportStar(__nccwpck_require__(66941), exports); +tslib_1.__exportStar(__nccwpck_require__(47987), exports); +tslib_1.__exportStar(__nccwpck_require__(54876), exports); +tslib_1.__exportStar(__nccwpck_require__(19705), exports); +tslib_1.__exportStar(__nccwpck_require__(28338), exports); +tslib_1.__exportStar(__nccwpck_require__(7130), exports); +tslib_1.__exportStar(__nccwpck_require__(41598), exports); +tslib_1.__exportStar(__nccwpck_require__(72548), exports); -function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = __nccwpck_require__(3562); - createDebug.destroy = destroy; - Object.keys(env).forEach(key => { - createDebug[key] = env[key]; - }); +/***/ }), - /** - * The currently active debug mode names, and names to skip. - */ +/***/ 52963: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - createDebug.names = []; - createDebug.skips = []; - /** - * Map of special "%n" handling functions, for the debug "format" argument. - * - * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". - */ - createDebug.formatters = {}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.splitMessage = void 0; +const crc32_1 = __nccwpck_require__(30343); +const PRELUDE_MEMBER_LENGTH = 4; +const PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2; +const CHECKSUM_LENGTH = 4; +const MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2; +function splitMessage({ byteLength, byteOffset, buffer }) { + if (byteLength < MINIMUM_MESSAGE_LENGTH) { + throw new Error("Provided message too short to accommodate event stream message overhead"); + } + const view = new DataView(buffer, byteOffset, byteLength); + const messageLength = view.getUint32(0, false); + if (byteLength !== messageLength) { + throw new Error("Reported message length does not match received message length"); + } + const headerLength = view.getUint32(PRELUDE_MEMBER_LENGTH, false); + const expectedPreludeChecksum = view.getUint32(PRELUDE_LENGTH, false); + const expectedMessageChecksum = view.getUint32(byteLength - CHECKSUM_LENGTH, false); + const checksummer = new crc32_1.Crc32().update(new Uint8Array(buffer, byteOffset, PRELUDE_LENGTH)); + if (expectedPreludeChecksum !== checksummer.digest()) { + throw new Error(`The prelude checksum specified in the message (${expectedPreludeChecksum}) does not match the calculated CRC32 checksum (${checksummer.digest()})`); + } + checksummer.update(new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH, byteLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH))); + if (expectedMessageChecksum !== checksummer.digest()) { + throw new Error(`The message checksum (${checksummer.digest()}) did not match the expected value of ${expectedMessageChecksum}`); + } + return { + headers: new DataView(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH, headerLength), + body: new Uint8Array(buffer, byteOffset + PRELUDE_LENGTH + CHECKSUM_LENGTH + headerLength, messageLength - headerLength - (PRELUDE_LENGTH + CHECKSUM_LENGTH + CHECKSUM_LENGTH)), + }; +} +exports.splitMessage = splitMessage; - /** - * Selects a color for a debug namespace - * @param {String} namespace The namespace string for the debug instance to be colored - * @return {Number|String} An ANSI color code for the given namespace - * @api private - */ - function selectColor(namespace) { - let hash = 0; - for (let i = 0; i < namespace.length; i++) { - hash = ((hash << 5) - hash) + namespace.charCodeAt(i); - hash |= 0; // Convert to 32bit integer - } +/***/ }), - return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; +/***/ 28530: +/***/ ((module) => { - /** - * Create a debugger with the given `namespace`. - * - * @param {String} namespace - * @return {Function} - * @api public - */ - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 debug(...args) { - // Disabled? - if (!debug.enabled) { - return; - } + __assign = Object.assign || function (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; + }; - const self = debug; + __rest = function (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; + }; - // Set `diff` timestamp - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self.diff = ms; - self.prev = prevTime; - self.curr = curr; - prevTime = curr; + __decorate = function (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; + }; - args[0] = createDebug.coerce(args[0]); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - if (typeof args[0] !== 'string') { - // Anything else let's inspect with %O - args.unshift('%O'); - } + __esDecorate = function (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)); }; + 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; + }; - // Apply any `formatters` transformations - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - // If we encounter an escaped % then don't increase the array index - if (match === '%%') { - return '%'; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === 'function') { - const val = args[index]; - match = formatter.call(self, val); + __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; + }; - // Now we need to remove `args[index]` since it's inlined in the `format` - args.splice(index, 1); - index--; - } - return match; - }); + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - // Apply env-specific formatting (colors, etc.) - createDebug.formatArgs.call(self, args); + __setFunctionName = function (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 }); + }; - const logFn = self.log || createDebug.log; - logFn.apply(self, args); - } + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - debug.namespace = namespace; - debug.useColors = createDebug.useColors(); - debug.color = createDebug.selectColor(namespace); - debug.extend = extend; - debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + __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(debug, 'enabled', { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; - return enabledCache; - }, - set: v => { - enableOverride = v; - } - }); + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - // Env-specific initialization logic for debug instances - if (typeof createDebug.init === 'function') { - createDebug.init(debug); - } + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - return debug; - } + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; - /** - * Enables a debug mode by namespaces. This can include modes - * separated by a colon and wildcards. - * - * @param {String} namespaces - * @api public - */ - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; - createDebug.names = []; - createDebug.skips = []; + /** @deprecated */ + __spreadArrays = function () { + 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; + }; - let i; - const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); - const len = split.length; + __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)); + }; - for (i = 0; i < len; i++) { - if (!split[i]) { - // ignore empty strings - continue; - } + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - namespaces = split[i].replace(/\*/g, '.*?'); + __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(n, v); }); }; } + 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]); } + }; - if (namespaces[0] === '-') { - createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); - } else { - createDebug.names.push(new RegExp('^' + namespaces + '$')); - } - } - } + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - /** - * Disable debug output. - * - * @return {String} namespaces - * @api public - */ - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) - ].join(','); - createDebug.enable(''); - return namespaces; - } + __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); } + }; - /** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - function enabled(name) { - if (name[name.length - 1] === '*') { - return true; - } + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - let i; - let len; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } + __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; + }; - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - return false; - } + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - /** - * Convert regexp to namespace - * - * @param {RegExp} regxep - * @return {String} namespace - * @api private - */ - function toNamespace(regexp) { - return regexp.toString() - .substring(2, regexp.toString().length - 2) - .replace(/\.\*\?$/, '*'); - } + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - /** - * Coerce `val`. - * - * @param {Mixed} val - * @return {Mixed} - * @api private - */ - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; - } - return val; - } + __classPrivateFieldIn = function (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); + }; - /** - * XXX DO NOT USE. This is a temporary stub function. - * XXX It WILL be removed in the next major release. - */ - 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`.'); - } + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - createDebug.enable(createDebug.load()); + 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 createDebug; -} + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -module.exports = setup; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 58923: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 40117: +/***/ ((__unused_webpack_module, exports) => { -/** - * 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 = __nccwpck_require__(15524); -} else { - module.exports = __nccwpck_require__(21251); -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveEventStreamSerdeConfig = void 0; +const resolveEventStreamSerdeConfig = (input) => ({ + ...input, + eventStreamMarshaller: input.eventStreamSerdeProvider(input), +}); +exports.resolveEventStreamSerdeConfig = resolveEventStreamSerdeConfig; /***/ }), -/***/ 21251: -/***/ ((module, exports, __nccwpck_require__) => { +/***/ 33299: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Module dependencies. - */ -const tty = __nccwpck_require__(76224); -const util = __nccwpck_require__(73837); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(37643); +tslib_1.__exportStar(__nccwpck_require__(40117), exports); -/** - * This is the Node.js implementation of `debug()`. - */ -exports.init = init; -exports.log = log; -exports.formatArgs = formatArgs; -exports.save = save; -exports.load = load; -exports.useColors = useColors; -exports.destroy = util.deprecate( - () => {}, - 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' -); +/***/ }), -/** - * Colors. - */ +/***/ 37643: +/***/ ((module) => { -exports.colors = [6, 2, 3, 4, 5, 1]; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -try { - // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) - // eslint-disable-next-line import/no-extraneous-dependencies - const supportsColor = __nccwpck_require__(76463); + __assign = Object.assign || function (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; + }; - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } -} catch (error) { - // Swallow - we only care if `supports-color` is available; it doesn't have to be. -} + __rest = function (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; + }; -/** - * Build up the default `inspectOpts` object from the environment variables. - * - * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js - */ + __decorate = function (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; + }; -exports.inspectOpts = Object.keys(process.env).filter(key => { - return /^debug_/i.test(key); -}).reduce((obj, key) => { - // Camel-case - const prop = key - .substring(6) - .toLowerCase() - .replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - // Coerce string value into JS value - let val = process.env[key]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === 'null') { - val = null; - } else { - val = Number(val); - } + __esDecorate = function (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)); }; + 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; + }; - obj[prop] = val; - return obj; -}, {}); + __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; + }; -/** - * Is stdout a TTY? Colored output is enabled when `true`. - */ + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -function useColors() { - return 'colors' in exports.inspectOpts ? - Boolean(exports.inspectOpts.colors) : - tty.isatty(process.stderr.fd); -} + __setFunctionName = function (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 }); + }; -/** - * Adds ANSI color escape codes if enabled. - * - * @api public - */ + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -function formatArgs(args) { - const {namespace: name, useColors} = this; + __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()); + }); + }; - if (useColors) { - const c = this.color; - const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); - const prefix = ` ${colorCode};1m${name} \u001B[0m`; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; - args[0] = prefix + args[0].split('\n').join('\n' + prefix); - args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m'); - } else { - args[0] = getDate() + name + ' ' + args[0]; - } -} + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -function getDate() { - if (exports.inspectOpts.hideDate) { - return ''; - } - return new Date().toISOString() + ' '; -} + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -/** - * Invokes `util.format()` with the specified arguments and writes to stderr. - */ + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -function log(...args) { - return process.stderr.write(util.format(...args) + '\n'); -} + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -/** - * Save `namespaces`. - * - * @param {String} namespaces - * @api private - */ -function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - // If you set a process.env field to null or undefined, it gets cast to the - // string 'null' or 'undefined'. Just delete instead. - delete process.env.DEBUG; - } -} + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; -/** - * Load `namespaces`. - * - * @return {String} returns the previously persisted debug modes - * @api private - */ + /** @deprecated */ + __spreadArrays = function () { + 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 load() { - return process.env.DEBUG; -} + __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)); + }; -/** - * Init logic for `debug` instances. - * - * Create a new `inspectOpts` object in case `useColors` is set - * differently for a particular `debug` instance. - */ + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -function init(debug) { - debug.inspectOpts = {}; + __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(n, v); }); }; } + 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]); } + }; - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } -} + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -module.exports = __nccwpck_require__(46881)(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); } + }; -const {formatters} = module.exports; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -/** - * Map %o to `util.inspect()`, all on a single line. - */ + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -formatters.o = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts) - .split('\n') - .map(str => str.trim()) - .join(' '); -}; + __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; + }; -/** - * Map %O to `util.inspect()`, allowing multiple lines if needed. - */ + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -formatters.O = function (v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); -}; + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -/***/ }), + __classPrivateFieldIn = function (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); + }; -/***/ 17320: -/***/ ((__unused_webpack_module, exports) => { + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -"use strict"; + 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; + }; + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); -class Deprecation extends Error { - constructor(message) { - super(message); // Maintains proper stack trace (only available on V8) - /* istanbul ignore next */ +/***/ }), - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } +/***/ 12662: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this.name = 'Deprecation'; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EventStreamMarshaller = void 0; +const eventstream_serde_universal_1 = __nccwpck_require__(91372); +const stream_1 = __nccwpck_require__(12781); +const utils_1 = __nccwpck_require__(25188); +class EventStreamMarshaller { + constructor({ utf8Encoder, utf8Decoder }) { + this.universalMarshaller = new eventstream_serde_universal_1.EventStreamMarshaller({ + utf8Decoder, + utf8Encoder, + }); + } + deserialize(body, deserializer) { + const bodyIterable = typeof body[Symbol.asyncIterator] === "function" ? body : (0, utils_1.readabletoIterable)(body); + return this.universalMarshaller.deserialize(bodyIterable, deserializer); + } + serialize(input, serializer) { + return stream_1.Readable.from(this.universalMarshaller.serialize(input, serializer)); + } } - -exports.Deprecation = Deprecation; +exports.EventStreamMarshaller = EventStreamMarshaller; /***/ }), -/***/ 8281: +/***/ 6293: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(67586); +tslib_1.__exportStar(__nccwpck_require__(12662), exports); +tslib_1.__exportStar(__nccwpck_require__(93043), exports); + + +/***/ }), + +/***/ 93043: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.eventStreamSerdeProvider = void 0; +const EventStreamMarshaller_1 = __nccwpck_require__(12662); +const eventStreamSerdeProvider = (options) => new EventStreamMarshaller_1.EventStreamMarshaller(options); +exports.eventStreamSerdeProvider = eventStreamSerdeProvider; -var url = __nccwpck_require__(57310); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var zlib = __nccwpck_require__(59796); -var Stream = __nccwpck_require__(12781); -var encoding = __nccwpck_require__(73931); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { - return e[k]; - } - }); - } - }); - } - n['default'] = e; - return Object.freeze(n); -} +/***/ 25188: +/***/ ((__unused_webpack_module, exports) => { -var http__namespace = /*#__PURE__*/_interopNamespace(http); -var https__namespace = /*#__PURE__*/_interopNamespace(https); -var zlib__namespace = /*#__PURE__*/_interopNamespace(zlib); -var Stream__default = /*#__PURE__*/_interopDefaultLegacy(Stream); -function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.readabletoIterable = void 0; +async function* readabletoIterable(readStream) { + let streamEnded = false; + let generationEnded = false; + const records = new Array(); + readStream.on("error", (err) => { + if (!streamEnded) { + streamEnded = true; + } + if (err) { + throw err; + } + }); + readStream.on("data", (data) => { + records.push(data); + }); + readStream.on("end", () => { + streamEnded = true; + }); + while (!generationEnded) { + const value = await new Promise((resolve) => setTimeout(() => resolve(records.shift()), 0)); + if (value) { + yield value; + } + generationEnded = streamEnded && records.length === 0; + } } +exports.readabletoIterable = readabletoIterable; -function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; +/***/ }), - return arr2; -} +/***/ 67586: +/***/ ((module) => { -function _createForOfIteratorHelperLoose(o, allowArrayLike) { - var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; - if (it) return (it = it.call(o)).next.bind(it); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - return function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; + __assign = Object.assign || function (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; }; - } - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); -} + __rest = function (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; + }; -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js -// (MIT licensed) -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); -const CLOSED = Symbol('closed'); -class Blob { - constructor() { - Object.defineProperty(this, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true - }); - this[CLOSED] = false; - this[TYPE] = ''; - const blobParts = arguments[0]; - const options = arguments[1]; - const buffers = []; + __decorate = function (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; + }; - if (blobParts) { - const a = blobParts; - const length = Number(a.length); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; + __esDecorate = function (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)); }; + 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; + }; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(new Uint8Array(element.buffer, element.byteOffset, element.byteLength)); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(new Uint8Array(element)); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + __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; + }; - buffers.push(buffer); - } - } + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - this[BUFFER] = Buffer.concat(buffers); - const type = options && options.type !== undefined && String(options.type).toLowerCase(); + __setFunctionName = function (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 }); + }; - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - get size() { - return this[CLOSED] ? 0 : this[BUFFER].length; - } + __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()); + }); + }; - get type() { - return this[TYPE]; - } + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; - get isClosed() { - return this[CLOSED]; - } + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - slice() { - const size = this.size; - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; - const span = Math.max(relativeEnd - relativeStart, 0); - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { - type: arguments[2] - }); - blob[BUFFER] = slicedBuffer; - blob[CLOSED] = this[CLOSED]; - return blob; - } + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; - close() { - this[CLOSED] = true; - } + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -} -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'BlobPrototype', - writable: false, - enumerable: false, - configurable: true -}); + __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)); + }; -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -/** - * Create FetchError instance - * - * @param {string} message Error message for human - * @param {string} type Error type for machine - * @param {string} systemError For Node.js system error - * @return {FetchError} - */ -const netErrorMap = { - ERR_CONNECTION_REFUSED: 'ECONNREFUSED', - ERR_EMPTY_RESPONSE: 'ECONNRESET', - ERR_NAME_NOT_RESOLVED: 'ENOTFOUND', - ERR_CONTENT_DECODING_FAILED: 'Z_DATA_ERROR', - ERR_CONTENT_DECODING_INIT_FAILED: 'Z_DATA_ERROR' -}; -function FetchError(message, type, systemError) { - Error.call(this, message); - const regex = /^.*net::(.*)/; + __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(n, v); }); }; } + 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]); } + }; - if (regex.test(message)) { - let errorCode = regex.exec(message)[1]; // istanbul ignore else + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - if (Object.prototype.hasOwnProperty.call(netErrorMap, errorCode)) errorCode = netErrorMap[errorCode]; - systemError = { - code: errorCode + __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); } }; - } - this.message = message; - this.type = type; // when err.type is `system`, err.code contains system error code + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - if (systemError) { - this.code = this.errno = systemError.code; - } // hide custom error implementation details from end-users + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + __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; + }; - Error.captureStackTrace(this, this.constructor); -} -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -const DISTURBED = Symbol('disturbed'); -/** - * Body class - * - * Cannot use ES6 class because Body must be called with .call(). - * - * @param {Stream|string|Blob|Buffer|null} body Readable stream - * @param {number} size - * @param {number} timeout - */ + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -function Body(body, { - size = 0, - timeout = 0 -} = {}) { - if (body == null) { - // body is undefined or null - body = null; - } else if (typeof body === 'string') ; else if (body instanceof Blob) ; else if (Buffer.isBuffer(body)) ; else if (body instanceof Stream__default['default']) ; else { - // none of the above - // coerce to string - body = String(body); - } + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - this.body = body; - this[DISTURBED] = false; - this.size = size; - this.timeout = timeout; -} -Body.prototype = { - get bodyUsed() { - return this[DISTURBED]; - }, + __classPrivateFieldIn = function (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); + }; - /** - * Decode response as ArrayBuffer - * - * @return {Promise} - */ - arrayBuffer() { - return consumeBody.call(this).then(buf => buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength)); - }, + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - /** - * Return raw response as Blob - * - * @return {Promise} - */ - blob() { - const ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(buf => Object.assign( // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - })); - }, + 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; + }; - /** - * Decode response as json - * - * @return {Promise} - */ - json() { - return consumeBody.call(this).then(buffer => JSON.parse(buffer.toString())); - }, + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; - /** - * Decode response as text - * - * @return {Promise} - */ - text() { - return consumeBody.call(this).then(buffer => buffer.toString()); - }, + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); - /** - * Decode response as buffer (non-spec api) - * - * @return {Promise} - */ - buffer() { - return consumeBody.call(this); - }, - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return {Promise} - */ - textConverted() { - return consumeBody.call(this).then(buffer => convertBody(buffer, this.headers)); - } +/***/ }), -}; +/***/ 6913: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -Body.mixIn = function (proto) { - for (var _iterator = _createForOfIteratorHelperLoose(Object.getOwnPropertyNames(Body.prototype)), _step; !(_step = _iterator()).done;) { - const name = _step.value; - // istanbul ignore else - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EventStreamMarshaller = void 0; +const eventstream_codec_1 = __nccwpck_require__(58152); +const getChunkedStream_1 = __nccwpck_require__(14614); +const getUnmarshalledStream_1 = __nccwpck_require__(94504); +class EventStreamMarshaller { + constructor({ utf8Encoder, utf8Decoder }) { + this.eventStreamCodec = new eventstream_codec_1.EventStreamCodec(utf8Encoder, utf8Decoder); + this.utfEncoder = utf8Encoder; } - } -}; -/** - * Decode buffers into utf-8 string - * - * @return {Promise} - */ + deserialize(body, deserializer) { + const inputStream = (0, getChunkedStream_1.getChunkedStream)(body); + return new eventstream_codec_1.SmithyMessageDecoderStream({ + messageStream: new eventstream_codec_1.MessageDecoderStream({ inputStream, decoder: this.eventStreamCodec }), + deserializer: (0, getUnmarshalledStream_1.getMessageUnmarshaller)(deserializer, this.utfEncoder), + }); + } + serialize(inputStream, serializer) { + return new eventstream_codec_1.MessageEncoderStream({ + messageStream: new eventstream_codec_1.SmithyMessageEncoderStream({ inputStream, serializer }), + encoder: this.eventStreamCodec, + includeEndFrame: true, + }); + } +} +exports.EventStreamMarshaller = EventStreamMarshaller; -function consumeBody() { - if (this[DISTURBED]) { - return Promise.reject(new Error(`body used already for: ${this.url}`)); - } +/***/ }), - this[DISTURBED] = true; // body is null +/***/ 14614: +/***/ ((__unused_webpack_module, exports) => { - if (this.body === null) { - return Promise.resolve(Buffer.alloc(0)); - } // body is string +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getChunkedStream = void 0; +function getChunkedStream(source) { + let currentMessageTotalLength = 0; + let currentMessagePendingLength = 0; + let currentMessage = null; + let messageLengthBuffer = null; + const allocateMessage = (size) => { + if (typeof size !== "number") { + throw new Error("Attempted to allocate an event message where size was not a number: " + size); + } + currentMessageTotalLength = size; + currentMessagePendingLength = 4; + currentMessage = new Uint8Array(size); + const currentMessageView = new DataView(currentMessage.buffer); + currentMessageView.setUint32(0, size, false); + }; + const iterator = async function* () { + const sourceIterator = source[Symbol.asyncIterator](); + while (true) { + const { value, done } = await sourceIterator.next(); + if (done) { + if (!currentMessageTotalLength) { + return; + } + else if (currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + } + else { + throw new Error("Truncated event message received."); + } + return; + } + const chunkLength = value.length; + let currentOffset = 0; + while (currentOffset < chunkLength) { + if (!currentMessage) { + const bytesRemaining = chunkLength - currentOffset; + if (!messageLengthBuffer) { + messageLengthBuffer = new Uint8Array(4); + } + const numBytesForTotal = Math.min(4 - currentMessagePendingLength, bytesRemaining); + messageLengthBuffer.set(value.slice(currentOffset, currentOffset + numBytesForTotal), currentMessagePendingLength); + currentMessagePendingLength += numBytesForTotal; + currentOffset += numBytesForTotal; + if (currentMessagePendingLength < 4) { + break; + } + allocateMessage(new DataView(messageLengthBuffer.buffer).getUint32(0, false)); + messageLengthBuffer = null; + } + const numBytesToWrite = Math.min(currentMessageTotalLength - currentMessagePendingLength, chunkLength - currentOffset); + currentMessage.set(value.slice(currentOffset, currentOffset + numBytesToWrite), currentMessagePendingLength); + currentMessagePendingLength += numBytesToWrite; + currentOffset += numBytesToWrite; + if (currentMessageTotalLength && currentMessageTotalLength === currentMessagePendingLength) { + yield currentMessage; + currentMessage = null; + currentMessageTotalLength = 0; + currentMessagePendingLength = 0; + } + } + } + }; + return { + [Symbol.asyncIterator]: iterator, + }; +} +exports.getChunkedStream = getChunkedStream; - if (typeof this.body === 'string') { - return Promise.resolve(Buffer.from(this.body)); - } // body is blob +/***/ }), - if (this.body instanceof Blob) { - return Promise.resolve(this.body[BUFFER]); - } // body is buffer +/***/ 94504: +/***/ ((__unused_webpack_module, exports) => { - if (Buffer.isBuffer(this.body)) { - return Promise.resolve(this.body); - } // istanbul ignore if: should never happen +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getMessageUnmarshaller = exports.getUnmarshalledStream = void 0; +function getUnmarshalledStream(source, options) { + const messageUnmarshaller = getMessageUnmarshaller(options.deserializer, options.toUtf8); + return { + [Symbol.asyncIterator]: async function* () { + for await (const chunk of source) { + const message = options.eventStreamCodec.decode(chunk); + const type = await messageUnmarshaller(message); + if (type === undefined) + continue; + yield type; + } + }, + }; +} +exports.getUnmarshalledStream = getUnmarshalledStream; +function getMessageUnmarshaller(deserializer, toUtf8) { + return async function (message) { + const { value: messageType } = message.headers[":message-type"]; + if (messageType === "error") { + const unmodeledError = new Error(message.headers[":error-message"].value || "UnknownError"); + unmodeledError.name = message.headers[":error-code"].value; + throw unmodeledError; + } + else if (messageType === "exception") { + const code = message.headers[":exception-type"].value; + const exception = { [code]: message }; + const deserializedException = await deserializer(exception); + if (deserializedException.$unknown) { + const error = new Error(toUtf8(message.body)); + error.name = code; + throw error; + } + throw deserializedException[code]; + } + else if (messageType === "event") { + const event = { + [message.headers[":event-type"].value]: message, + }; + const deserialized = await deserializer(event); + if (deserialized.$unknown) + return; + return deserialized; + } + else { + throw Error(`Unrecognizable event type: ${message.headers[":event-type"].value}`); + } + }; +} +exports.getMessageUnmarshaller = getMessageUnmarshaller; - if (!(this.body instanceof Stream__default['default'])) { - return Promise.resolve(Buffer.alloc(0)); - } // body is stream - // get ready to actually consume the body +/***/ }), +/***/ 91372: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const accum = []; - let accumBytes = 0; - let abort = false; - return new Promise((resolve, reject) => { - let resTimeout; // allow timeout on slow response body - if (this.timeout) { - resTimeout = setTimeout(() => { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`, 'body-timeout')); - this.body.emit('cancel-request'); - }, this.timeout); - } // handle stream error, such as incorrect content-encoding +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(42021); +tslib_1.__exportStar(__nccwpck_require__(6913), exports); +tslib_1.__exportStar(__nccwpck_require__(29333), exports); - this.body.on('error', err => { - reject(new FetchError(`Invalid response body while trying to fetch ${this.url}: ${err.message}`, 'system', err)); - }); - this.body.on('data', chunk => { - if (abort || chunk === null) { - return; - } +/***/ }), - if (this.size && accumBytes + chunk.length > this.size) { - abort = true; - reject(new FetchError(`content size at ${this.url} over limit: ${this.size}`, 'max-size')); - this.body.emit('cancel-request'); - return; - } +/***/ 29333: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - accumBytes += chunk.length; - accum.push(chunk); - }); - this.body.on('end', () => { - if (abort) { - return; - } - clearTimeout(resTimeout); - resolve(Buffer.concat(accum)); - }); - }); -} -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param {Buffer} buffer Incoming buffer - * @param {Headers} headers - * @return {string} - */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.eventStreamSerdeProvider = void 0; +const EventStreamMarshaller_1 = __nccwpck_require__(6913); +const eventStreamSerdeProvider = (options) => new EventStreamMarshaller_1.EventStreamMarshaller(options); +exports.eventStreamSerdeProvider = eventStreamSerdeProvider; -function convertBody(buffer, headers) { - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res; // header +/***/ }), - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } // no charset in content type, peek at response body for at most 1024 bytes +/***/ 42021: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - const str = buffer.slice(0, 1024).toString(); // html5 + __assign = Object.assign || function (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; + }; - if (!res && str) { - res = /= 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; + }; - if (!res && str) { - res = /= 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)); }; + 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; + }; + __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; + }; - if (!res && str) { - res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str); - } // found charset + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + __setFunctionName = function (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 }); + }; - if (res) { - charset = res.pop(); // prevent decode issues when sites use incorrect encoding - // ref: https://hsivonen.fi/encoding-menu/ + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - if (charset === 'gb2312' || charset === 'gbk') { - charset = 'gb18030'; - } - } // turn raw buffers into a single utf-8 buffer + __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()); + }); + }; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; - return encoding.convert(buffer, 'UTF-8', charset).toString(); -} -/** - * Clone body given Res/Req instance - * - * @param {Response|Request} instance Response or Request instance - * @return {string|Blob|Buffer|Stream} - */ + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -function clone(instance) { - let p1, p2; - let body = instance.body; // don't allow cloning a used body + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - if (instance.bodyUsed) { - throw new Error('cannot clone body after it is used'); - } // check that body is a stream and not form-data object - // note: we can't clone the form-data object without having it as a dependency + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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; + }; - if (body instanceof Stream__default['default'] && typeof body.getBoundary !== 'function') { - // tee instance body - p1 = new Stream.PassThrough(); - p2 = new Stream.PassThrough(); - body.pipe(p1); - body.pipe(p2); // set instance body to teed body and return the other teed body + /** @deprecated */ + __spreadArrays = function () { + 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; + }; - instance.body = p1; - body = p2; - } + __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)); + }; - return body; -} -/** - * Performs the operation "extract a `Content-Type` value from |object|" as - * specified in the specification: - * https://fetch.spec.whatwg.org/#concept-bodyinit-extract - * - * This function assumes that instance.body is present and non-null. - * - * @param {Response|Request} instance Response or Request instance - */ + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -function extractContentType(instance) { - const body = instance.body; // istanbul ignore if: Currently, because of a guard in Request, body - // can never be null. Included here for completeness. + __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(n, v); }); }; } + 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]); } + }; - if (body === null) { - // body is null - return null; - } else if (typeof body === 'string') { - // body is string - return 'text/plain;charset=UTF-8'; - } else if (body instanceof Blob) { - // body is blob - return body.type || null; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return null; - } else if (typeof body.getBoundary === 'function') { - // detect form data input from form-data module - return `multipart/form-data;boundary=${body.getBoundary()}`; - } else { - // body is stream - // can't really do much about this - return null; - } -} -function getTotalBytes(instance) { - const body = instance.body; // istanbul ignore if: included for completion + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - if (body === null) { - // body is null - return 0; - } else if (typeof body === 'string') { - // body is string - return Buffer.byteLength(body); - } else if (body instanceof Blob) { - // body is blob - return body.size; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return body.length; - } else if (body && typeof body.getLengthSync === 'function') { - // detect form data input from form-data module - // istanbul ignore next - if (body._lengthRetrievers && body._lengthRetrievers.length === 0 || body.hasKnownLength && body.hasKnownLength()) { - // 2.x - return body.getLengthSync(); - } + __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); } + }; - return null; - } else { - // body is stream - // can't really do much about this - return null; - } -} -function writeToStream(dest, instance) { - const body = instance.body; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - if (body === null) { - // body is null - dest.end(); - } else if (typeof body === 'string') { - // body is string - dest.write(body); - dest.end(); - } else if (body instanceof Blob) { - // body is blob - dest.write(body[BUFFER]); - dest.end(); - } else if (Buffer.isBuffer(body)) { - // body is buffer - dest.write(body); - dest.end(); - } else { - // body is stream - if (instance.useElectronNet) { - dest.chunkedEncoding = instance.chunkedEncoding; // Force a first write to start the request otherwise an empty body stream - // will cause an error when closing the dest stream with Electron v7. + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - dest.write(''); - } + __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; + }; - body.pipe(new Stream.PassThrough()) // I have to put a PassThrough because somehow, FormData streams are not eaten by electron/net - .pipe(dest); - } -} + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -/** - * A set of utilities borrowed from Node.js' _http_common.js - */ + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -/** - * 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 - * - * Allowed characters in an HTTP token: - * ^_`a-z 94-122 - * A-Z 65-90 - * - 45 - * 0-9 48-57 - * ! 33 - * #$%&' 35-39 - * *+ 42-43 - * . 46 - * | 124 - * ~ 126 - * - * This implementation of checkIsHttpToken() loops over the string instead of - * using a regular expression since the former is up to 180% faster with v8 4.9 - * depending on the string length (the shorter the string, the larger the - * performance difference) - * - * Additionally, checkIsHttpToken() is currently designed to be inlinable by v8, - * so take care when making changes to the implementation so that the source - * code size does not exceed v8's default max_inlined_source_size setting. - **/ -// istanbul ignore next -function isValidTokenChar(ch) { - if (ch >= 94 && ch <= 122) { - return true; - } + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - if (ch >= 65 && ch <= 90) { - return true; - } + __classPrivateFieldIn = function (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); + }; - if (ch === 45) { - return true; - } + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - if (ch >= 48 && ch <= 57) { - return true; - } + 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; + }; - if (ch === 34 || ch === 40 || ch === 41 || ch === 44) { - return false; - } + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; - if (ch >= 33 && ch <= 46) { - return true; - } + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); - if (ch === 124 || ch === 126) { - return true; - } - return false; -} // istanbul ignore next +/***/ }), +/***/ 86775: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function checkIsHttpToken(val) { - if (typeof val !== 'string' || val.length === 0) { - return false; - } - if (!isValidTokenChar(val.charCodeAt(0))) { - return false; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Hash = void 0; +const util_buffer_from_1 = __nccwpck_require__(41308); +const util_utf8_1 = __nccwpck_require__(38134); +const buffer_1 = __nccwpck_require__(14300); +const crypto_1 = __nccwpck_require__(6113); +class Hash { + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); + } + update(toHash, encoding) { + this.hash.update((0, util_utf8_1.toUint8Array)(castSourceData(toHash, encoding))); + } + digest() { + return Promise.resolve(this.hash.digest()); + } + reset() { + this.hash = this.secret + ? (0, crypto_1.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) + : (0, crypto_1.createHash)(this.algorithmIdentifier); + } +} +exports.Hash = Hash; +function castSourceData(toCast, encoding) { + if (buffer_1.Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return (0, util_buffer_from_1.fromString)(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return (0, util_buffer_from_1.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return (0, util_buffer_from_1.fromArrayBuffer)(toCast); +} - const len = val.length; - if (len > 1) { - if (!isValidTokenChar(val.charCodeAt(1))) { - return false; - } +/***/ }), - if (len > 2) { - if (!isValidTokenChar(val.charCodeAt(2))) { - return false; - } +/***/ 62765: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (len > 3) { - if (!isValidTokenChar(val.charCodeAt(3))) { - return false; - } - for (let i = 4; i < len; i++) { - if (!isValidTokenChar(val.charCodeAt(i))) { - return false; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HashCalculator = void 0; +const util_utf8_1 = __nccwpck_require__(38134); +const stream_1 = __nccwpck_require__(12781); +class HashCalculator extends stream_1.Writable { + constructor(hash, options) { + super(options); + this.hash = hash; + } + _write(chunk, encoding, callback) { + try { + this.hash.update((0, util_utf8_1.toUint8Array)(chunk)); } - } + catch (err) { + return callback(err); + } + callback(); } - } - - return true; } -/** - * True 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 - * - * checkInvalidHeaderChar() is currently designed to be inlinable by v8, - * so take care when making changes to the implementation so that the source - * code size does not exceed v8's default max_inlined_source_size setting. - **/ -// istanbul ignore next +exports.HashCalculator = HashCalculator; -function checkInvalidHeaderChar(val) { - val += ''; - if (val.length < 1) { - return false; - } +/***/ }), - let c = val.charCodeAt(0); +/***/ 35557: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (c <= 31 && c !== 9 || c > 255 || c === 127) { - return true; - } - if (val.length < 2) { - return false; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fileStreamHasher = void 0; +const fs_1 = __nccwpck_require__(57147); +const HashCalculator_1 = __nccwpck_require__(62765); +const fileStreamHasher = (hashCtor, fileStream) => new Promise((resolve, reject) => { + if (!isReadStream(fileStream)) { + reject(new Error("Unable to calculate hash for non-file streams.")); + return; + } + const fileStreamTee = (0, fs_1.createReadStream)(fileStream.path, { + start: fileStream.start, + end: fileStream.end, + }); + const hash = new hashCtor(); + const hashCalculator = new HashCalculator_1.HashCalculator(hash); + fileStreamTee.pipe(hashCalculator); + fileStreamTee.on("error", (err) => { + hashCalculator.end(); + reject(err); + }); + hashCalculator.on("error", reject); + hashCalculator.on("finish", function () { + hash.digest().then(resolve).catch(reject); + }); +}); +exports.fileStreamHasher = fileStreamHasher; +const isReadStream = (stream) => typeof stream.path === "string"; - c = val.charCodeAt(1); - if (c <= 31 && c !== 9 || c > 255 || c === 127) { - return true; - } +/***/ }), - if (val.length < 3) { - return false; - } +<<<<<<< HEAD +/***/ 70516: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - c = val.charCodeAt(2); - if (c <= 31 && c !== 9 || c > 255 || c === 127) { - return true; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(48384); +tslib_1.__exportStar(__nccwpck_require__(35557), exports); +tslib_1.__exportStar(__nccwpck_require__(94628), exports); - for (let i = 3; i < val.length; ++i) { - c = val.charCodeAt(i); - if (c <= 31 && c !== 9 || c > 255 || c === 127) { - return true; +/***/ }), + +/***/ 94628: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.readableStreamHasher = void 0; +const HashCalculator_1 = __nccwpck_require__(62765); +const readableStreamHasher = (hashCtor, readableStream) => { + if (readableStream.readableFlowing !== null) { + throw new Error("Unable to calculate hash for flowing readable stream"); } - } + const hash = new hashCtor(); + const hashCalculator = new HashCalculator_1.HashCalculator(hash); + readableStream.pipe(hashCalculator); + return new Promise((resolve, reject) => { + readableStream.on("error", (err) => { + hashCalculator.end(); + reject(err); + }); + hashCalculator.on("error", reject); + hashCalculator.on("finish", () => { + hash.digest().then(resolve).catch(reject); + }); + }); +}; +exports.readableStreamHasher = readableStreamHasher; - return false; -} -function sanitizeName(name) { - name += ''; +/***/ }), - if (!checkIsHttpToken(name)) { - throw new TypeError(`${name} is not a legal HTTP header name`); - } +/***/ 48384: +/***/ ((module) => { - return name.toLowerCase(); -} +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 sanitizeValue(value) { - value += ''; + __assign = Object.assign || function (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; + }; - if (checkInvalidHeaderChar(value)) { - throw new TypeError(`${value} is not a legal HTTP header value`); - } + __rest = function (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; + }; - return value; -} + __decorate = function (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; + }; -const MAP = Symbol('map'); -class Headers { - /** - * Headers class - * - * @param {Object} init Response headers - */ - constructor(init = undefined) { - this[MAP] = Object.create(null); // We don't worry about converting prop to ByteString here as append() - // will handle it. + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; + __esDecorate = function (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)); }; + 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; + }; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } // sequence> - // Note: per spec we have to first exhaust the lists then process them + __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); + }; - const pairs = []; + __setFunctionName = function (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 }); + }; - for (var _iterator = _createForOfIteratorHelperLoose(init), _step; !(_step = _iterator()).done;) { - const pair = _step.value; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } + __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()); + }); + }; - pairs.push(Array.from(pair)); + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; } + }; - for (var _i = 0, _pairs = pairs; _i < _pairs.length; _i++) { - const pair = _pairs[_i]; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - this.append(pair[0], pair[1]); + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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); } - } else { - // record - for (var _i2 = 0, _Object$keys = Object.keys(init); _i2 < _Object$keys.length; _i2++) { - const key = _Object$keys[_i2]; - const value = init[key]; - this.append(key, value); + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } + return ar; + }; - Object.defineProperty(this, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true - }); - } - /** - * Return first header value given name - * - * @param {string} name Header name - * @return {string} - */ + /** @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 = 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; + }; - get(name) { - const list = this[MAP][sanitizeName(name)]; + __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)); + }; - if (!list) { - return null; - } + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - return list.join(','); - } - /** - * Iterate over all headers - * - * @param {function} callback Executed for each item with parameters (value, name, thisArg) - * @param {boolean} thisArg `this` context for callback function - */ + __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(n, v); }); }; } + 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]); } + }; + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - forEach(callback, thisArg = undefined) { - let pairs = getHeaderPairs(this); - let i = 0; + __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); } + }; - while (i < pairs.length) { - const _pairs$i = pairs[i], - name = _pairs$i[0], - value = _pairs$i[1]; - callback.call(thisArg, value, name, this); - pairs = getHeaderPairs(this); - i++; - } - } - /** - * Overwrite header values given name - * - * @param {string} name Header name - * @param {string|Array.|*} value Header value - */ + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - set(name, value) { - this[MAP][sanitizeName(name)] = [sanitizeValue(value)]; - } - /** - * Append a value onto existing header - * - * @param {string} name Header name - * @param {string|Array.|*} value Header value - */ + __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; + }; + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - append(name, value) { - if (!this.has(name)) { - this.set(name, value); - return; - } + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - this[MAP][sanitizeName(name)].push(sanitizeValue(value)); - } - /** - * Check for header name existence - * - * @param {string} name Header name - * @return {boolean} - */ + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + __classPrivateFieldIn = function (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); + }; - has(name) { - return !!this[MAP][sanitizeName(name)]; - } - /** - * Delete all header values given name - * - * @param {string} name Header name - */ + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + 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; + }; - delete(name) { - delete this[MAP][sanitizeName(name)]; - } - /** - * Return raw headers (non-spec api) - * - * @return {Object} - */ + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); - raw() { - return this[MAP]; - } - /** - * Get an iterator on keys. - * - * @return {Iterator} - */ +/***/ }), - keys() { - return createHeadersIterator(this, 'key'); - } - /** - * Get an iterator on values. - * - * @return {Iterator} - */ +/***/ 80743: +/***/ ((__unused_webpack_module, exports) => { - values() { - return createHeadersIterator(this, 'value'); - } - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return {Iterator} - */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isArrayBuffer = void 0; +const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || + Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; +exports.isArrayBuffer = isArrayBuffer; - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } +/***/ }), + +/***/ 38959: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getContentLengthPlugin = exports.contentLengthMiddlewareOptions = exports.contentLengthMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const CONTENT_LENGTH_HEADER = "content-length"; +function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (protocol_http_1.HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && + Object.keys(headers) + .map((str) => str.toLowerCase()) + .indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER]: String(length), + }; + } + catch (error) { + } + } + } + return next({ + ...args, + request, + }); + }; } -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'HeadersPrototype', - writable: false, - enumerable: false, - configurable: true +exports.contentLengthMiddleware = contentLengthMiddleware; +exports.contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true, +}; +const getContentLengthPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), exports.contentLengthMiddlewareOptions); + }, }); +exports.getContentLengthPlugin = getContentLengthPlugin; -function getHeaderPairs(headers, kind) { - if (kind === 'key') return Object.keys(headers[MAP]).sort().map(k => [k]); - const pairs = []; - for (var _iterator2 = _createForOfIteratorHelperLoose(Object.keys(headers[MAP]).sort()), _step2; !(_step2 = _iterator2()).done;) { - const key = _step2.value; +/***/ }), - for (var _iterator3 = _createForOfIteratorHelperLoose(headers[MAP][key]), _step3; !(_step3 = _iterator3()).done;) { - const value = _step3.value; - pairs.push([key, value]); - } - } +/***/ 95111: +/***/ ((__unused_webpack_module, exports) => { - return pairs; -} -const INTERNAL = Symbol('internal'); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createConfigValueProvider = void 0; +const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => { + const configProvider = async () => { + var _a; + const configValue = (_a = config[configKey]) !== null && _a !== void 0 ? _a : config[canonicalEndpointParamKey]; + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }; + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; + } + return configProvider; +}; +exports.createConfigValueProvider = createConfigValueProvider; -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } +/***/ }), - const _this$INTERNAL = this[INTERNAL], - target = _this$INTERNAL.target, - kind = _this$INTERNAL.kind, - index = _this$INTERNAL.index; - const values = getHeaderPairs(target, kind); - const len = values.length; +/***/ 43366: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (index >= len) { - return { - value: undefined, - done: true - }; - } - const pair = values[index]; - this[INTERNAL].index = index + 1; - let result; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointFromConfig = void 0; +const node_config_provider_1 = __nccwpck_require__(13079); +const getEndpointUrlConfig_1 = __nccwpck_require__(85603); +const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))(); +exports.getEndpointFromConfig = getEndpointFromConfig; - if (kind === 'key') { - result = pair[0]; - } else if (kind === 'value') { - result = pair[1]; - } else { - result = pair; - } - return { - value: result, - done: false - }; - } +/***/ }), -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); +/***/ 53931: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * response.js - * - * Response class provides content decoding - */ -/** - * Response class - * - * @param {Stream} body Readable stream - * @param {Object} opts Response options - */ -class Response { - constructor(body = null, opts = {}) { - Body.call(this, body, opts); - this.url = opts.url; - this.status = opts.status || 200; - this.statusText = opts.statusText || http.STATUS_CODES[this.status]; - this.headers = new Headers(opts.headers); - this.useElectronNet = opts.useElectronNet; - Object.defineProperty(this, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true - }); - } - /** - * Convenience property representing if the request ended normally - */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveParams = exports.getEndpointFromInstructions = void 0; +const service_customizations_1 = __nccwpck_require__(48836); +const createConfigValueProvider_1 = __nccwpck_require__(95111); +const getEndpointFromConfig_1 = __nccwpck_require__(43366); +const toEndpointV1_1 = __nccwpck_require__(83007); +const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.endpoint) { + const endpointFromConfig = await (0, getEndpointFromConfig_1.getEndpointFromConfig)(clientConfig.serviceId || ""); + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve((0, toEndpointV1_1.toEndpointV1)(endpointFromConfig)); + } + } + const endpointParams = await (0, exports.resolveParams)(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context); + return endpoint; +}; +exports.getEndpointFromInstructions = getEndpointFromInstructions; +const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => { + var _a; + const endpointParams = {}; + const instructions = ((_a = instructionsSupplier === null || instructionsSupplier === void 0 ? void 0 : instructionsSupplier.getEndpointParameterInstructions) === null || _a === void 0 ? void 0 : _a.call(instructionsSupplier)) || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await (0, createConfigValueProvider_1.createConfigValueProvider)(instruction.name, name, clientConfig)(); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await (0, service_customizations_1.resolveParamsForS3)(endpointParams); + } + return endpointParams; +}; +exports.resolveParams = resolveParams; - get ok() { - return this.status >= 200 && this.status < 300; - } - /** - * Clone this response - * - * @return {Response} - */ +/***/ }), +/***/ 85603: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - useElectronNet: this.useElectronNet - }); - } -} -Body.mixIn(Response.prototype); -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'ResponsePrototype', - writable: false, - enumerable: false, - configurable: true +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointUrlConfig = void 0; +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; +const CONFIG_ENDPOINT_URL = "endpoint_url"; +const getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); + const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + configFileSelector: (profile, config) => { + if (config && profile.services) { + const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl) + return endpointUrl; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + default: undefined, }); +exports.getEndpointUrlConfig = getEndpointUrlConfig; -/** - * request.js - * - * Request class contains server only options - */ -const PARSED_URL = Symbol('url'); -/** - * Request class - * - * @param {string|Request} input Url or Request instance - * @param {Object} init Custom options - */ - -class Request { - constructor(input, init = {}) { - let parsedURL; // normalize input - if (!(input instanceof Request)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = url.parse(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = url.parse(`${input}`); - } +/***/ }), - input = {}; - } else { - parsedURL = url.parse(input.url); - } +/***/ 3100: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const method = init.method || input.method || 'GET'; - if ((init.body != null || input instanceof Request && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(20729); +tslib_1.__exportStar(__nccwpck_require__(53931), exports); +tslib_1.__exportStar(__nccwpck_require__(83007), exports); - const inputBody = init.body != null ? init.body : input instanceof Request && input.body !== null ? clone(input) : null; - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); // fetch spec options - this.method = method.toUpperCase(); - this.redirect = init.redirect || input.redirect || 'follow'; - this.signal = init.signal || input.signal || null; - this.headers = new Headers(init.headers || input.headers || {}); - this.headers.delete('Content-Length'); // user cannot set content-length themself as per fetch spec +/***/ }), - this.chunkedEncoding = false; - this.useElectronNet = init.useElectronNet !== undefined // have to do this instead of || because it can be set to false - ? init.useElectronNet : input.useElectronNet; // istanbul ignore if +/***/ 83007: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (this.useElectronNet && !process.versions.electron) throw new Error('Cannot use Electron/net module on Node.js!'); - if (this.useElectronNet === undefined) { - this.useElectronNet = Boolean(process.versions.electron); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toEndpointV1 = void 0; +const url_parser_1 = __nccwpck_require__(98245); +const toEndpointV1 = (endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return (0, url_parser_1.parseUrl)(endpoint.url); + } + return endpoint; } + return (0, url_parser_1.parseUrl)(endpoint); +}; +exports.toEndpointV1 = toEndpointV1; - if (this.useElectronNet) { - this.useSessionCookies = init.useSessionCookies !== undefined ? init.useSessionCookies : input.useSessionCookies; - } - if (init.body != null) { - const contentType = extractContentType(this); +/***/ }), - if (contentType !== null && !this.headers.has('Content-Type')) { - this.headers.append('Content-Type', contentType); - } - } // server only options +/***/ 37332: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.counter = init.counter || input.counter || 0; - this.session = init.session || input.session; - this[PARSED_URL] = parsedURL; - Object.defineProperty(this, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true - }); - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.endpointMiddleware = void 0; +const util_middleware_1 = __nccwpck_require__(81243); +const getEndpointFromInstructions_1 = __nccwpck_require__(53931); +const endpointMiddleware = ({ config, instructions, }) => { + return (next, context) => async (args) => { + var _a, _b, _c; + const endpoint = await (0, getEndpointFromInstructions_1.getEndpointFromInstructions)(args.input, { + getEndpointParameterInstructions() { + return instructions; + }, + }, { ...config }, context); + context.endpointV2 = endpoint; + context.authSchemes = (_a = endpoint.properties) === null || _a === void 0 ? void 0 : _a.authSchemes; + const authScheme = (_b = context.authSchemes) === null || _b === void 0 ? void 0 : _b[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = (0, util_middleware_1.getSmithyContext)(context); + const httpAuthOption = (_c = smithyContext === null || smithyContext === void 0 ? void 0 : smithyContext.selectedHttpAuthScheme) === null || _c === void 0 ? void 0 : _c.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet, + }, authScheme.properties); + } + } + return next({ + ...args, + }); + }; +}; +exports.endpointMiddleware = endpointMiddleware; - get url() { - return url.format(this[PARSED_URL]); - } - /** - * Clone this request - * - * @return {Request} - */ +/***/ }), - clone() { - return new Request(this); - } +/***/ 38613: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -} -Body.mixIn(Request.prototype); -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'RequestPrototype', - writable: false, - enumerable: false, - configurable: true + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointPlugin = exports.endpointMiddlewareOptions = void 0; +const middleware_serde_1 = __nccwpck_require__(4247); +const endpointMiddleware_1 = __nccwpck_require__(37332); +exports.endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: middleware_serde_1.serializerMiddlewareOption.name, +}; +const getEndpointPlugin = (config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo((0, endpointMiddleware_1.endpointMiddleware)({ + config, + instructions, + }), exports.endpointMiddlewareOptions); + }, }); -function getNodeRequestOptions(request) { - const parsedURL = request[PARSED_URL]; - const headers = new Headers(request.headers); // fetch step 3 +exports.getEndpointPlugin = getEndpointPlugin; - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } // Basic fetch +/***/ }), - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } +/***/ 24916: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } // HTTP-network-or-cache fetch steps 5-9 +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(20729); +tslib_1.__exportStar(__nccwpck_require__(3100), exports); +tslib_1.__exportStar(__nccwpck_require__(37332), exports); +tslib_1.__exportStar(__nccwpck_require__(38613), exports); +tslib_1.__exportStar(__nccwpck_require__(81666), exports); +tslib_1.__exportStar(__nccwpck_require__(68667), exports); - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } +/***/ }), - if (request.body != null) { - const totalBytes = getTotalBytes(request); +/***/ 81666: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - if (!request.useElectronNet) headers.set('Content-Length', contentLengthValue); - } else { - request.chunkedEncoding = true; - } // HTTP-network-or-cache fetch step 12 +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveEndpointConfig = void 0; +const util_middleware_1 = __nccwpck_require__(81243); +const toEndpointV1_1 = __nccwpck_require__(83007); +const resolveEndpointConfig = (input) => { + var _a, _b, _c; + const tls = (_a = input.tls) !== null && _a !== void 0 ? _a : true; + const { endpoint } = input; + const customEndpointProvider = endpoint != null ? async () => (0, toEndpointV1_1.toEndpointV1)(await (0, util_middleware_1.normalizeProvider)(endpoint)()) : undefined; + const isCustomEndpoint = !!endpoint; + return { + ...input, + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: (0, util_middleware_1.normalizeProvider)((_b = input.useDualstackEndpoint) !== null && _b !== void 0 ? _b : false), + useFipsEndpoint: (0, util_middleware_1.normalizeProvider)((_c = input.useFipsEndpoint) !== null && _c !== void 0 ? _c : false), + }; +}; +exports.resolveEndpointConfig = resolveEndpointConfig; - if (!headers.has('User-Agent')) { - headers.set('User-Agent', `electron-fetch/1.0 ${request.useElectronNet ? 'electron' : 'node'} (+https://github.com/arantes555/electron-fetch)`); - } // HTTP-network-or-cache fetch step 16 +/***/ }), +/***/ 48836: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - headers.set('Accept-Encoding', 'gzip,deflate'); - if (!headers.has('Connection')) { - headers.set('Connection', 'close'); - } // HTTP-network fetch step 4 - // chunked encoding is handled by Node.js when not running in electron +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(20729); +tslib_1.__exportStar(__nccwpck_require__(62126), exports); - return Object.assign({}, parsedURL, { - method: request.method, - headers: headers.raw() - }); -} +/***/ }), -let electron; // istanbul ignore else +/***/ 62126: +/***/ ((__unused_webpack_module, exports) => { -if (process.versions.electron) { - electron = __nccwpck_require__(66477); -} -const isReady = electron && electron.app && !electron.app.isReady() ? new Promise(resolve => electron.app.once('ready', resolve)) : Promise.resolve(); -/** - * Fetch function - * - * @param {string|Request} url Absolute url or Request instance - * @param {Object} [opts] Fetch options - * @return {Promise} - */ +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isArnBucketName = exports.isDnsCompatibleBucketName = exports.S3_HOSTNAME_PATTERN = exports.DOT_PATTERN = exports.resolveParamsForS3 = void 0; +const resolveParamsForS3 = async (endpointParams) => { + const bucket = (endpointParams === null || endpointParams === void 0 ? void 0 : endpointParams.Bucket) || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if ((0, exports.isArnBucketName)(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } + else if (!(0, exports.isDnsCompatibleBucketName)(bucket) || + (bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:")) || + bucket.toLowerCase() !== bucket || + bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; +}; +exports.resolveParamsForS3 = resolveParamsForS3; +const DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; +const IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; +const DOTS_PATTERN = /\.\./; +exports.DOT_PATTERN = /\./; +exports.S3_HOSTNAME_PATTERN = /^(.+\.)?s3(-fips)?(\.dualstack)?[.-]([a-z0-9-]+)\./; +const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); +exports.isDnsCompatibleBucketName = isDnsCompatibleBucketName; +const isArnBucketName = (bucketName) => { + const [arn, partition, service, region, account, typeOrId] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5; + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return arn === "arn" && !!partition && !!service && !!account && !!typeOrId; +}; +exports.isArnBucketName = isArnBucketName; -function fetch(url$1, opts = {}) { - // wrap http.request into fetch - return isReady.then(() => new Promise((resolve, reject) => { - // build request object - const request = new Request(url$1, opts); - const options = getNodeRequestOptions(request); - const send = request.useElectronNet ? electron.net.request : (options.protocol === 'https:' ? https__namespace : http__namespace).request; // http.request only support string as host header, this hack make custom host header possible - if (options.headers.host) { - options.headers.host = options.headers.host[0]; - } +/***/ }), - if (request.signal && request.signal.aborted) { - reject(new FetchError('request aborted', 'abort')); - return; - } // send request +/***/ 68667: +/***/ ((__unused_webpack_module, exports) => { - let headers; +Object.defineProperty(exports, "__esModule", ({ value: true })); - if (request.useElectronNet) { - headers = options.headers; - delete options.headers; - options.session = opts.session || electron.session.defaultSession; - options.useSessionCookies = request.useSessionCookies; - } else { - if (opts.agent) options.agent = opts.agent; - } - const req = send(options); +/***/ }), - if (request.useElectronNet) { - for (const headerName in headers) { - if (typeof headers[headerName] === 'string') req.setHeader(headerName, headers[headerName]);else { - for (var _iterator = _createForOfIteratorHelperLoose(headers[headerName]), _step; !(_step = _iterator()).done;) { - const headerValue = _step.value; - req.setHeader(headerName, headerValue); - } +/***/ 20729: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } } - } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - let reqTimeout; + __assign = Object.assign || function (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; + }; - const cancelRequest = () => { - if (request.useElectronNet) { - req.abort(); // in electron, `req.destroy()` does not send abort to server - } else { - req.destroy(); // in node.js, `req.abort()` is deprecated - } + __rest = function (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; }; - const abortRequest = () => { - const err = new FetchError('request aborted', 'abort'); - reject(err); - cancelRequest(); - req.emit('error', err); + __decorate = function (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; }; - if (request.signal) { - request.signal.addEventListener('abort', abortRequest); - } + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - if (request.timeout) { - reqTimeout = setTimeout(() => { - const err = new FetchError(`network timeout at: ${request.url}`, 'request-timeout'); - reject(err); - cancelRequest(); - }, request.timeout); - } + __esDecorate = function (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)); }; + 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; + }; - if (request.useElectronNet) { - // handle authenticating proxies - req.on('login', (authInfo, callback) => { - if (opts.user && opts.password) { - callback(opts.user, opts.password); - } else { - cancelRequest(); - reject(new FetchError(`login event received from ${authInfo.host} but no credentials provided`, 'proxy', { - code: 'PROXY_AUTH_FAILED' - })); + __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; + }; - req.on('error', err => { - clearTimeout(reqTimeout); + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - if (request.signal) { - request.signal.removeEventListener('abort', abortRequest); - } + __setFunctionName = function (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 }); + }; - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - }); - req.on('abort', () => { - clearTimeout(reqTimeout); + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - if (request.signal) { - request.signal.removeEventListener('abort', abortRequest); - } - }); - req.on('response', res => { - clearTimeout(reqTimeout); + __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()); + }); + }; - if (request.signal) { - request.signal.removeEventListener('abort', abortRequest); - } // handle redirect + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - if (fetch.isRedirect(res.statusCode) && request.redirect !== 'manual') { - if (request.redirect === 'error') { - reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); - return; + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - return; + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } + return ar; + }; - if (!res.headers.location) { - reject(new FetchError(`redirect location header missing at: ${request.url}`, 'invalid-redirect')); - return; - } // per fetch spec, for POST request with 301/302 response, or any request with 303 response, use GET when following redirect + /** @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 = 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; + }; - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - request.method = 'GET'; - request.body = null; - request.headers.delete('content-length'); + __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)); + }; - request.counter++; - resolve(fetch(url.resolve(request.url, res.headers.location), request)); - return; - } // normalize location header for manual redirect mode + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + __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(n, v); }); }; } + 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]); } + }; - const headers = new Headers(); + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - for (var _i = 0, _Object$keys = Object.keys(res.headers); _i < _Object$keys.length; _i++) { - const name = _Object$keys[_i]; + __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); } + }; - if (Array.isArray(res.headers[name])) { - for (var _iterator2 = _createForOfIteratorHelperLoose(res.headers[name]), _step2; !(_step2 = _iterator2()).done;) { - const val = _step2.value; - headers.append(name, val); - } - } else { - headers.append(name, res.headers[name]); - } - } + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - if (request.redirect === 'manual' && headers.has('location')) { - headers.set('location', url.resolve(request.url, headers.get('location'))); - } // prepare response + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + __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; + }; - let body = new Stream.PassThrough(); - res.on('error', err => body.emit('error', err)); - res.pipe(body); - body.on('error', cancelRequest); - body.on('cancel-request', cancelRequest); + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - const abortBody = () => { - res.destroy(); - res.emit('error', new FetchError('request aborted', 'abort')); // separated from the `.destroy()` because somehow Node's IncomingMessage streams do not emit errors on destroy - }; + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - if (request.signal) { - request.signal.addEventListener('abort', abortBody); - res.on('end', () => { - request.signal.removeEventListener('abort', abortBody); - }); - res.on('error', () => { - request.signal.removeEventListener('abort', abortBody); - }); - } + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - const responseOptions = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - useElectronNet: request.useElectronNet, - useSessionCookies: request.useSessionCookies - }; // HTTP-network fetch step 16.1.2 - - const codings = headers.get('Content-Encoding'); // HTTP-network fetch step 16.1.3: handle content codings - // in following scenarios we ignore compression support - // 1. running on Electron/net module (it manages it for us) - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - - if (!request.useElectronNet && request.method !== 'HEAD' && codings !== null && res.statusCode !== 204 && res.statusCode !== 304) { - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - // /!\ This is disabled for now, because it seems broken in recent node - // const zlibOptions = { - // flush: zlib.Z_SYNC_FLUSH, - // finishFlush: zlib.Z_SYNC_FLUSH - // } - if (codings === 'gzip' || codings === 'x-gzip') { - // for gzip - body = body.pipe(zlib__namespace.createGunzip()); - } else if (codings === 'deflate' || codings === 'x-deflate') { - // for deflate - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new Stream.PassThrough()); - return raw.once('data', chunk => { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib__namespace.createInflate()); - } else { - body = body.pipe(zlib__namespace.createInflateRaw()); - } + __classPrivateFieldIn = function (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); + }; - const response = new Response(body, responseOptions); - resolve(response); - }); + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); } - } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - const response = new Response(body, responseOptions); - resolve(response); - }); - writeToStream(req, request); - })); -} -/** - * Redirect code matching - * - * @param {number} code Status code - * @return {boolean} - */ + 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; + }; -fetch.isRedirect = code => code === 301 || code === 302 || code === 303 || code === 307 || code === 308; + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -exports.FetchError = FetchError; -exports.Headers = Headers; -exports.Request = Request; -exports.Response = Response; -exports["default"] = fetch; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 73931: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 9878: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AdaptiveRetryStrategy = void 0; +const util_retry_1 = __nccwpck_require__(13744); +const StandardRetryStrategy_1 = __nccwpck_require__(10241); +class AdaptiveRetryStrategy extends StandardRetryStrategy_1.StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options !== null && options !== void 0 ? options : {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter !== null && rateLimiter !== void 0 ? rateLimiter : new util_retry_1.DefaultRateLimiter(); + this.mode = util_retry_1.RETRY_MODES.ADAPTIVE; + } + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + }, + }); + } +} +exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy; -var iconvLite = __nccwpck_require__(17281); -// Expose to the world -module.exports.convert = convert; +/***/ }), -/** - * Convert encoding of an UTF-8 string or a buffer - * - * @param {String|Buffer} str String to be converted - * @param {String} to Encoding to be converted to - * @param {String} [from='UTF-8'] Encoding to be converted from - * @return {Buffer} Encoded string - */ -function convert(str, to, from) { - from = checkEncoding(from || 'UTF-8'); - to = checkEncoding(to || 'UTF-8'); - str = str || ''; +/***/ 10241: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var result; - if (from !== 'UTF-8' && typeof str === 'string') { - str = Buffer.from(str, 'binary'); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StandardRetryStrategy = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const service_error_classification_1 = __nccwpck_require__(48920); +const util_retry_1 = __nccwpck_require__(13744); +const uuid_1 = __nccwpck_require__(13472); +const defaultRetryQuota_1 = __nccwpck_require__(29708); +const delayDecider_1 = __nccwpck_require__(26375); +const retryDecider_1 = __nccwpck_require__(67785); +const util_1 = __nccwpck_require__(8473); +class StandardRetryStrategy { + constructor(maxAttemptsProvider, options) { + var _a, _b, _c; + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = util_retry_1.RETRY_MODES.STANDARD; + this.retryDecider = (_a = options === null || options === void 0 ? void 0 : options.retryDecider) !== null && _a !== void 0 ? _a : retryDecider_1.defaultRetryDecider; + this.delayDecider = (_b = options === null || options === void 0 ? void 0 : options.delayDecider) !== null && _b !== void 0 ? _b : delayDecider_1.defaultDelayDecider; + this.retryQuota = (_c = options === null || options === void 0 ? void 0 : options.retryQuota) !== null && _c !== void 0 ? _c : (0, defaultRetryQuota_1.getDefaultRetryQuota)(util_retry_1.INITIAL_RETRY_TOKENS); } - - if (from === to) { - if (typeof str === 'string') { - result = Buffer.from(str); - } else { - result = str; - } - } else { + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + } + async getMaxAttempts() { + let maxAttempts; try { - result = convertIconvLite(str, to, from); - } catch (E) { - console.error(E); - result = str; + maxAttempts = await this.maxAttemptsProvider(); } + catch (error) { + maxAttempts = util_retry_1.DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; } - - if (typeof result === 'string') { - result = Buffer.from(result, 'utf-8'); + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request } = args; + if (protocol_http_1.HttpRequest.isInstance(request)) { + request.headers[util_retry_1.INVOCATION_ID_HEADER] = (0, uuid_1.v4)(); + } + while (true) { + try { + if (protocol_http_1.HttpRequest.isInstance(request)) { + request.headers[util_retry_1.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options === null || options === void 0 ? void 0 : options.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options === null || options === void 0 ? void 0 : options.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } + catch (e) { + const err = (0, util_1.asSdkError)(e); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider((0, service_error_classification_1.isThrottlingError)(err) ? util_retry_1.THROTTLING_RETRY_DELAY_BASE : util_retry_1.DEFAULT_RETRY_DELAY_BASE, attempts); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; + } + } } - - return result; } +exports.StandardRetryStrategy = StandardRetryStrategy; +const getDelayFromRetryAfterHeader = (response) => { + if (!protocol_http_1.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1000; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); +}; -/** - * Convert encoding of astring with iconv-lite - * - * @param {String|Buffer} str String to be converted - * @param {String} to Encoding to be converted to - * @param {String} [from='UTF-8'] Encoding to be converted from - * @return {Buffer} Encoded string - */ -function convertIconvLite(str, to, from) { - if (to === 'UTF-8') { - return iconvLite.decode(str, from); - } else if (from === 'UTF-8') { - return iconvLite.encode(str, to); - } else { - return iconvLite.encode(iconvLite.decode(str, from), to); - } -} -/** - * Converts charset name if needed - * - * @param {String} name Character set - * @return {String} Character set name - */ -function checkEncoding(name) { - return (name || '') - .toString() - .trim() - .replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1') - .replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1') - .replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1') - .replace(/^ks_c_5601\-1987$/i, 'CP949') - .replace(/^us[\-_]?ascii$/i, 'ASCII') - .toUpperCase(); -} +/***/ }), + +/***/ 19498: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_RETRY_MODE_CONFIG_OPTIONS = exports.CONFIG_RETRY_MODE = exports.ENV_RETRY_MODE = exports.resolveRetryConfig = exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = exports.CONFIG_MAX_ATTEMPTS = exports.ENV_MAX_ATTEMPTS = void 0; +const util_middleware_1 = __nccwpck_require__(81243); +const util_retry_1 = __nccwpck_require__(13744); +exports.ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; +exports.CONFIG_MAX_ATTEMPTS = "max_attempts"; +exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[exports.ENV_MAX_ATTEMPTS]; + if (!value) + return undefined; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${exports.ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[exports.CONFIG_MAX_ATTEMPTS]; + if (!value) + return undefined; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${exports.CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: util_retry_1.DEFAULT_MAX_ATTEMPTS, +}; +const resolveRetryConfig = (input) => { + var _a; + const { retryStrategy } = input; + const maxAttempts = (0, util_middleware_1.normalizeProvider)((_a = input.maxAttempts) !== null && _a !== void 0 ? _a : util_retry_1.DEFAULT_MAX_ATTEMPTS); + return { + ...input, + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await (0, util_middleware_1.normalizeProvider)(input.retryMode)(); + if (retryMode === util_retry_1.RETRY_MODES.ADAPTIVE) { + return new util_retry_1.AdaptiveRetryStrategy(maxAttempts); + } + return new util_retry_1.StandardRetryStrategy(maxAttempts); + }, + }; +}; +exports.resolveRetryConfig = resolveRetryConfig; +exports.ENV_RETRY_MODE = "AWS_RETRY_MODE"; +exports.CONFIG_RETRY_MODE = "retry_mode"; +exports.NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[exports.ENV_RETRY_MODE], + configFileSelector: (profile) => profile[exports.CONFIG_RETRY_MODE], + default: util_retry_1.DEFAULT_RETRY_MODE, +}; /***/ }), -/***/ 20108: +/***/ 29708: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -var Buffer = (__nccwpck_require__(25213).Buffer); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDefaultRetryQuota = void 0; +const util_retry_1 = __nccwpck_require__(13744); +const getDefaultRetryQuota = (initialRetryTokens, options) => { + var _a, _b, _c; + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = (_a = options === null || options === void 0 ? void 0 : options.noRetryIncrement) !== null && _a !== void 0 ? _a : util_retry_1.NO_RETRY_INCREMENT; + const retryCost = (_b = options === null || options === void 0 ? void 0 : options.retryCost) !== null && _b !== void 0 ? _b : util_retry_1.RETRY_COST; + const timeoutRetryCost = (_c = options === null || options === void 0 ? void 0 : options.timeoutRetryCost) !== null && _c !== void 0 ? _c : util_retry_1.TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = (error) => (error.name === "TimeoutError" ? timeoutRetryCost : retryCost); + const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity; + const retrieveRetryTokens = (error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }; + const releaseRetryTokens = (capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount !== null && capacityReleaseAmount !== void 0 ? capacityReleaseAmount : noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }; + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens, + }); +}; +exports.getDefaultRetryQuota = getDefaultRetryQuota; -// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. -// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. -// To save memory and loading time, we read table files only when requested. -exports._dbcs = DBCSCodec; +/***/ }), -var UNASSIGNED = -1, - GB18030_CODE = -2, - SEQ_START = -10, - NODE_START = -1000, - UNASSIGNED_NODE = new Array(0x100), - DEF_CHAR = -1; +/***/ 26375: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -for (var i = 0; i < 0x100; i++) - UNASSIGNED_NODE[i] = UNASSIGNED; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultDelayDecider = void 0; +const util_retry_1 = __nccwpck_require__(13744); +const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(util_retry_1.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); +exports.defaultDelayDecider = defaultDelayDecider; -// Class DBCSCodec reads and initializes mapping tables. -function DBCSCodec(codecOptions, iconv) { - this.encodingName = codecOptions.encodingName; - if (!codecOptions) - throw new Error("DBCS codec is called without the data.") - if (!codecOptions.table) - throw new Error("Encoding '" + this.encodingName + "' has no data."); - // Load tables. - var mappingTable = codecOptions.table(); +/***/ }), +/***/ 54801: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Decode tables: MBCS -> Unicode. - // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. - // Trie root is decodeTables[0]. - // Values: >= 0 -> unicode character code. can be > 0xFFFF - // == UNASSIGNED -> unknown/unassigned sequence. - // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. - // <= NODE_START -> index of the next node in our trie to process next byte. - // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. - this.decodeTables = []; - this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(87846); +tslib_1.__exportStar(__nccwpck_require__(9878), exports); +tslib_1.__exportStar(__nccwpck_require__(10241), exports); +tslib_1.__exportStar(__nccwpck_require__(19498), exports); +tslib_1.__exportStar(__nccwpck_require__(26375), exports); +tslib_1.__exportStar(__nccwpck_require__(76406), exports); +tslib_1.__exportStar(__nccwpck_require__(67785), exports); +tslib_1.__exportStar(__nccwpck_require__(16194), exports); - // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. - this.decodeTableSeq = []; - // Actual mapping tables consist of chunks. Use them to fill up decode tables. - for (var i = 0; i < mappingTable.length; i++) - this._addDecodeChunk(mappingTable[i]); +/***/ }), - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. +/***/ 96992: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Add GB18030 common decode nodes. - var commonThirdByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); - var commonFourthByteNodeIdx = this.decodeTables.length; - this.decodeTables.push(UNASSIGNED_NODE.slice(0)); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isStreamingPayload = void 0; +const stream_1 = __nccwpck_require__(12781); +const isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof stream_1.Readable || + (typeof ReadableStream !== "undefined" && (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream); +exports.isStreamingPayload = isStreamingPayload; - // Fill out the tree - var firstByteNode = this.decodeTables[0]; - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; - for (var j = 0x30; j <= 0x39; j++) { - if (secondByteNode[j] === UNASSIGNED) { - secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; - } else if (secondByteNode[j] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 2"); - } - var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; - for (var k = 0x81; k <= 0xFE; k++) { - if (thirdByteNode[k] === UNASSIGNED) { - thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; - } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { - continue; - } else if (thirdByteNode[k] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 3"); - } +/***/ }), - var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; - for (var l = 0x30; l <= 0x39; l++) { - if (fourthByteNode[l] === UNASSIGNED) - fourthByteNode[l] = GB18030_CODE; - } - } - } - } +/***/ 76406: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getOmitRetryHeadersPlugin = exports.omitRetryHeadersMiddlewareOptions = exports.omitRetryHeadersMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const util_retry_1 = __nccwpck_require__(13744); +const omitRetryHeadersMiddleware = () => (next) => async (args) => { + const { request } = args; + if (protocol_http_1.HttpRequest.isInstance(request)) { + delete request.headers[util_retry_1.INVOCATION_ID_HEADER]; + delete request.headers[util_retry_1.REQUEST_HEADER]; } + return next(args); +}; +exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware; +exports.omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true, +}; +const getOmitRetryHeadersPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo((0, exports.omitRetryHeadersMiddleware)(), exports.omitRetryHeadersMiddlewareOptions); + }, +}); +exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin; - this.defaultCharUnicode = iconv.defaultCharUnicode; - - // Encode tables: Unicode -> DBCS. +/***/ }), - // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. - // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. - // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). - // == UNASSIGNED -> no conversion found. Output a default char. - // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. - this.encodeTable = []; - - // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of - // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key - // means end of sequence (needed when one sequence is a strict subsequence of another). - // Objects are kept separately from encodeTable to increase performance. - this.encodeTableSeq = []; +/***/ 67785: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Some chars can be decoded, but need not be encoded. - var skipEncodeChars = {}; - if (codecOptions.encodeSkipVals) - for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { - var val = codecOptions.encodeSkipVals[i]; - if (typeof val === 'number') - skipEncodeChars[val] = true; - else - for (var j = val.from; j <= val.to; j++) - skipEncodeChars[j] = true; - } - - // Use decode trie to recursively fill out encode tables. - this._fillEncodeTable(0, 0, skipEncodeChars); - // Add more encoding pairs when needed. - if (codecOptions.encodeAdd) { - for (var uChar in codecOptions.encodeAdd) - if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) - this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultRetryDecider = void 0; +const service_error_classification_1 = __nccwpck_require__(48920); +const defaultRetryDecider = (error) => { + if (!error) { + return false; } + return (0, service_error_classification_1.isRetryableByTrait)(error) || (0, service_error_classification_1.isClockSkewError)(error) || (0, service_error_classification_1.isThrottlingError)(error) || (0, service_error_classification_1.isTransientError)(error); +}; +exports.defaultRetryDecider = defaultRetryDecider; - this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; - if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; - if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); -} -DBCSCodec.prototype.encoder = DBCSEncoder; -DBCSCodec.prototype.decoder = DBCSDecoder; +/***/ }), -// Decoder helpers -DBCSCodec.prototype._getDecodeTrieNode = function(addr) { - var bytes = []; - for (; addr > 0; addr >>>= 8) - bytes.push(addr & 0xFF); - if (bytes.length == 0) - bytes.push(0); +/***/ 16194: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var node = this.decodeTables[0]; - for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. - var val = node[bytes[i]]; - if (val == UNASSIGNED) { // Create new node. - node[bytes[i]] = NODE_START - this.decodeTables.length; - this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRetryAfterHint = exports.getRetryPlugin = exports.retryMiddlewareOptions = exports.retryMiddleware = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const service_error_classification_1 = __nccwpck_require__(48920); +const smithy_client_1 = __nccwpck_require__(33218); +const util_retry_1 = __nccwpck_require__(13744); +const uuid_1 = __nccwpck_require__(13472); +const isStreamingPayload_1 = __nccwpck_require__(96992); +const util_1 = __nccwpck_require__(8473); +const retryMiddleware = (options) => (next, context) => async (args) => { + var _a; + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest = protocol_http_1.HttpRequest.isInstance(request); + if (isRequest) { + request.headers[util_retry_1.INVOCATION_ID_HEADER] = (0, uuid_1.v4)(); } - else if (val <= NODE_START) { // Existing node. - node = this.decodeTables[NODE_START - val]; + while (true) { + try { + if (isRequest) { + request.headers[util_retry_1.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } + catch (e) { + const retryErrorInfo = getRetryErrorInfo(e); + lastError = (0, util_1.asSdkError)(e); + if (isRequest && (0, isStreamingPayload_1.isStreamingPayload)(request)) { + (_a = (context.logger instanceof smithy_client_1.NoOpLogger ? console : context.logger)) === null || _a === void 0 ? void 0 : _a.warn("An error was encountered in a non-retryable streaming request."); + throw lastError; + } + try { + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } + catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; + } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + } } - else - throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); } - return node; -} + else { + retryStrategy = retryStrategy; + if (retryStrategy === null || retryStrategy === void 0 ? void 0 : retryStrategy.mode) + context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } +}; +exports.retryMiddleware = retryMiddleware; +const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && + typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && + typeof retryStrategy.recordSuccess !== "undefined"; +const getRetryErrorInfo = (error) => { + const errorInfo = { + errorType: getRetryErrorType(error), + }; + const retryAfterHint = (0, exports.getRetryAfterHint)(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; +}; +const getRetryErrorType = (error) => { + if ((0, service_error_classification_1.isThrottlingError)(error)) + return "THROTTLING"; + if ((0, service_error_classification_1.isTransientError)(error)) + return "TRANSIENT"; + if ((0, service_error_classification_1.isServerError)(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; +}; +exports.retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", + override: true, +}; +const getRetryPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add((0, exports.retryMiddleware)(options), exports.retryMiddlewareOptions); + }, +}); +exports.getRetryPlugin = getRetryPlugin; +const getRetryAfterHint = (response) => { + if (!protocol_http_1.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1000); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; +}; +exports.getRetryAfterHint = getRetryAfterHint; -DBCSCodec.prototype._addDecodeChunk = function(chunk) { - // First element of chunk is the hex mbcs code where we start. - var curAddr = parseInt(chunk[0], 16); +/***/ }), - // Choose the decoding node where we'll write our chars. - var writeTable = this._getDecodeTrieNode(curAddr); - curAddr = curAddr & 0xFF; +/***/ 8473: +/***/ ((__unused_webpack_module, exports) => { - // Write all other elements of the chunk to the table. - for (var k = 1; k < chunk.length; k++) { - var part = chunk[k]; - if (typeof part === "string") { // String, write as-is. - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++); - if (0xD800 <= code && code < 0xDC00) { // Decode surrogate - var codeTrail = part.charCodeAt(l++); - if (0xDC00 <= codeTrail && codeTrail < 0xE000) - writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); - else - throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); - } - else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) - var len = 0xFFF - code + 2; - var seq = []; - for (var m = 0; m < len; m++) - seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; - this.decodeTableSeq.push(seq); - } - else - writeTable[curAddr++] = code; // Basic char - } - } - else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. - var charCode = writeTable[curAddr - 1] + 1; - for (var l = 0; l < part; l++) - writeTable[curAddr++] = charCode++; - } - else - throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); - } - if (curAddr > 0xFF) - throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.asSdkError = void 0; +const asSdkError = (error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error(), error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); +}; +exports.asSdkError = asSdkError; -// Encoder helpers -DBCSCodec.prototype._getEncodeBucket = function(uCode) { - var high = uCode >> 8; // This could be > 0xFF because of astral characters. - if (this.encodeTable[high] === undefined) - this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. - return this.encodeTable[high]; -} -DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - if (bucket[low] <= SEQ_START) - this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. - else if (bucket[low] == UNASSIGNED) - bucket[low] = dbcsCode; -} +/***/ }), -DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { - - // Get the root of character tree according to first character of the sequence. - var uCode = seq[0]; - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; +/***/ 87846: +/***/ ((module) => { - var node; - if (bucket[low] <= SEQ_START) { - // There's already a sequence with - use it. - node = this.encodeTableSeq[SEQ_START-bucket[low]]; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } else { - // There was no sequence object - allocate a new one. - node = {}; - if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. - bucket[low] = SEQ_START - this.encodeTableSeq.length; - this.encodeTableSeq.push(node); + factory(createExporter(root)); } - - // Traverse the character tree, allocating new nodes as needed. - for (var j = 1; j < seq.length-1; j++) { - var oldVal = node[uCode]; - if (typeof oldVal === 'object') - node = oldVal; - else { - node = node[uCode] = {} - if (oldVal !== undefined) - node[DEF_CHAR] = oldVal + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - // Set the leaf to given dbcsCode. - uCode = seq[seq.length-1]; - node[uCode] = dbcsCode; -} + __assign = Object.assign || function (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; + }; -DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { - var node = this.decodeTables[nodeIdx]; - var hasValues = false; - var subNodeEmpty = {}; - for (var i = 0; i < 0x100; i++) { - var uCode = node[i]; - var mbCode = prefix + i; - if (skipEncodeChars[mbCode]) - continue; + __rest = function (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; + }; - if (uCode >= 0) { - this._setEncodeChar(uCode, mbCode); - hasValues = true; - } else if (uCode <= NODE_START) { - var subNodeIdx = NODE_START - uCode; - if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). - var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. - if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) - hasValues = true; - else - subNodeEmpty[subNodeIdx] = true; + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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] = _; } - } else if (uCode <= SEQ_START) { - this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); - hasValues = true; } - } - return hasValues; -} + 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); + }; -// == Encoder ================================================================== + __setFunctionName = function (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 DBCSEncoder(options, codec) { - // Encoder state - this.leadSurrogate = -1; - this.seqObj = undefined; - - // Static data - this.encodeTable = codec.encodeTable; - this.encodeTableSeq = codec.encodeTableSeq; - this.defaultCharSingleByte = codec.defCharSB; - this.gb18030 = codec.gb18030; -} + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -DBCSEncoder.prototype.write = function(str) { - var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), - leadSurrogate = this.leadSurrogate, - seqObj = this.seqObj, nextChar = -1, - i = 0, j = 0; + __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()); + }); + }; - while (true) { - // 0. Get next character. - if (nextChar === -1) { - if (i == str.length) break; - var uCode = str.charCodeAt(i++); + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; } - else { - var uCode = nextChar; - nextChar = -1; + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - // 1. Handle surrogates. - if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. - if (uCode < 0xDC00) { // We've got lead surrogate. - if (leadSurrogate === -1) { - leadSurrogate = uCode; - continue; - } else { - leadSurrogate = uCode; - // Double lead surrogate found. - uCode = UNASSIGNED; - } - } else { // We've got trail surrogate. - if (leadSurrogate !== -1) { - uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); - leadSurrogate = -1; - } else { - // Incomplete surrogate pair - only trail surrogate found. - uCode = UNASSIGNED; - } - + __values = function (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 }; } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + + __read = function (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); } - else if (leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. - leadSurrogate = -1; + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } } + return ar; + }; - // 2. Convert uCode character. - var dbcsCode = UNASSIGNED; - if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence - var resCode = seqObj[uCode]; - if (typeof resCode === 'object') { // Sequence continues. - seqObj = resCode; - continue; + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; - } else if (typeof resCode == 'number') { // Sequence finished. Write it. - dbcsCode = resCode; + /** @deprecated */ + __spreadArrays = function () { + 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; + }; - } else if (resCode == undefined) { // Current character is not part of the sequence. + __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)); + }; - // Try default character for this sequence - resCode = seqObj[DEF_CHAR]; - if (resCode !== undefined) { - dbcsCode = resCode; // Found. Write it. - nextChar = uCode; // Current character will be written too in the next iteration. + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - } else { - // TODO: What if we have no default? (resCode == undefined) - // Then, we should write first char of the sequence as-is and try the rest recursively. - // Didn't do it for now because no encoding has this situation yet. - // Currently, just skip the sequence and write current char. - } + __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(n, v); }); }; } + 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]); } + }; + + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + + __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); } + }; + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; } - seqObj = undefined; - } - else if (uCode >= 0) { // Regular character - var subtable = this.encodeTable[uCode >> 8]; - if (subtable !== undefined) - dbcsCode = subtable[uCode & 0xFF]; - - if (dbcsCode <= SEQ_START) { // Sequence start - seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; - continue; + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - if (dbcsCode == UNASSIGNED && this.gb18030) { - // Use GB18030 algorithm to find character(s) to write. - var idx = findIdx(this.gb18030.uChars, uCode); - if (idx != -1) { - var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; - newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; - newBuf[j++] = 0x30 + dbcsCode; - continue; + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); } } + if (env.hasError) throw env.error; } + return next(); + }; - // 3. Write dbcsCode character. - if (dbcsCode === UNASSIGNED) - dbcsCode = this.defaultCharSingleByte; - - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else if (dbcsCode < 0x10000) { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - else if (dbcsCode < 0x1000000) { - newBuf[j++] = dbcsCode >> 16; - newBuf[j++] = (dbcsCode >> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } else { - newBuf[j++] = dbcsCode >>> 24; - newBuf[j++] = (dbcsCode >>> 16) & 0xFF; - newBuf[j++] = (dbcsCode >>> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } - } + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); - this.seqObj = seqObj; - this.leadSurrogate = leadSurrogate; - return newBuf.slice(0, j); -} -DBCSEncoder.prototype.end = function() { - if (this.leadSurrogate === -1 && this.seqObj === undefined) - return; // All clean. Most often case. +/***/ }), - var newBuf = Buffer.alloc(10), j = 0; +/***/ 49897: +/***/ ((__unused_webpack_module, exports) => { - if (this.seqObj) { // We're in the sequence. - var dbcsCode = this.seqObj[DEF_CHAR]; - if (dbcsCode !== undefined) { // Write beginning of the sequence. - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - } else { - // See todo above. + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deserializerMiddleware = void 0; +const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed, + }; + } + catch (error) { + Object.defineProperty(error, "$response", { + value: response, + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + error.message += "\n " + hint; } - this.seqObj = undefined; + throw error; } +}; +exports.deserializerMiddleware = deserializerMiddleware; - if (this.leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - newBuf[j++] = this.defaultCharSingleByte; - this.leadSurrogate = -1; - } - - return newBuf.slice(0, j); -} -// Export for testing -DBCSEncoder.prototype.findIdx = findIdx; +/***/ }), +/***/ 4247: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// == Decoder ================================================================== -function DBCSDecoder(options, codec) { - // Decoder state - this.nodeIdx = 0; - this.prevBytes = []; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(41398); +tslib_1.__exportStar(__nccwpck_require__(49897), exports); +tslib_1.__exportStar(__nccwpck_require__(359), exports); +tslib_1.__exportStar(__nccwpck_require__(46186), exports); - // Static data - this.decodeTables = codec.decodeTables; - this.decodeTableSeq = codec.decodeTableSeq; - this.defaultCharUnicode = codec.defaultCharUnicode; - this.gb18030 = codec.gb18030; -} -DBCSDecoder.prototype.write = function(buf) { - var newBuf = Buffer.alloc(buf.length*2), - nodeIdx = this.nodeIdx, - prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, - seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. - uCode; +/***/ }), - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; +/***/ 359: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - // Lookup in current trie node. - var uCode = this.decodeTables[nodeIdx][curByte]; - if (uCode >= 0) { - // Normal character, just use it. - } - else if (uCode === UNASSIGNED) { // Unknown char. - // TODO: Callback with seq. - uCode = this.defaultCharUnicode.charCodeAt(0); - i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. - } - else if (uCode === GB18030_CODE) { - if (i >= 3) { - var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); - } else { - var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + - (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + - (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + - (curByte-0x30); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSerdePlugin = exports.serializerMiddlewareOption = exports.deserializerMiddlewareOption = void 0; +const deserializerMiddleware_1 = __nccwpck_require__(49897); +const serializerMiddleware_1 = __nccwpck_require__(46186); +exports.deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true, +}; +exports.serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true, +}; +function getSerdePlugin(config, serializer, deserializer) { + return { + applyToStack: (commandStack) => { + commandStack.add((0, deserializerMiddleware_1.deserializerMiddleware)(config, deserializer), exports.deserializerMiddlewareOption); + commandStack.add((0, serializerMiddleware_1.serializerMiddleware)(config, serializer), exports.serializerMiddlewareOption); + }, + }; +} +exports.getSerdePlugin = getSerdePlugin; + + +/***/ }), + +/***/ 46186: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serializerMiddleware = void 0; +const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { + var _a; + const endpoint = ((_a = context.endpointV2) === null || _a === void 0 ? void 0 : _a.url) && options.urlParser + ? async () => options.urlParser(context.endpointV2.url) + : options.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); + } + const request = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request, + }); +}; +exports.serializerMiddleware = serializerMiddleware; + + +/***/ }), + +/***/ 41398: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); } - var idx = findIdx(this.gb18030.gbChars, ptr); - uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; - } - else if (uCode <= NODE_START) { // Go to next trie node. - nodeIdx = NODE_START - uCode; - continue; - } - else if (uCode <= SEQ_START) { // Output a sequence of chars. - var seq = this.decodeTableSeq[SEQ_START - uCode]; - for (var k = 0; k < seq.length - 1; k++) { - uCode = seq[k]; - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; + else { + exports.__esModule = true; } - uCode = seq[seq.length-1]; } - else - throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); - - // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode >= 0x10000) { - uCode -= 0x10000; - var uCodeLead = 0xD800 | (uCode >> 10); - newBuf[j++] = uCodeLead & 0xFF; - newBuf[j++] = uCodeLead >> 8; + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - uCode = 0xDC00 | (uCode & 0x3FF); + __assign = Object.assign || function (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]; } - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; + return t; + }; - // Reset trie node. - nodeIdx = 0; seqStart = i+1; - } + __rest = function (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; + }; - this.nodeIdx = nodeIdx; - this.prevBytes = (seqStart >= 0) - ? Array.prototype.slice.call(buf, seqStart) - : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); + __decorate = function (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; + }; - return newBuf.slice(0, j).toString('ucs2'); -} + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -DBCSDecoder.prototype.end = function() { - var ret = ''; + __esDecorate = function (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)); }; + 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; + }; - // Try to parse all remaining chars. - while (this.prevBytes.length > 0) { - // Skip 1 character in the buffer. - ret += this.defaultCharUnicode; - var bytesArr = this.prevBytes.slice(1); + __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; + }; - // Parse remaining as usual. - this.prevBytes = []; - this.nodeIdx = 0; - if (bytesArr.length > 0) - ret += this.write(bytesArr); - } + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - this.prevBytes = []; - this.nodeIdx = 0; - return ret; -} + __setFunctionName = function (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 }); + }; -// Binary search for GB18030. Returns largest i such that table[i] <= val. -function findIdx(table, val) { - if (table[0] > val) - return -1; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - var l = 0, r = table.length; - while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + ((r-l+1) >> 1); - if (table[mid] <= val) - l = mid; - else - r = mid; - } - return l; -} + __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()); + }); + }; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -/***/ }), + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -/***/ 54275: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -"use strict"; + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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; + }; -// Description of supported double byte encodings and aliases. -// Tables are not require()-d until they are needed to speed up library load. -// require()-s are direct to support Browserify. + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -module.exports = { - - // == Japanese/ShiftJIS ==================================================== - // All japanese encodings are based on JIS X set of standards: - // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. - // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. - // Has several variations in 1978, 1983, 1990 and 1997. - // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. - // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. - // 2 planes, first is superset of 0208, second - revised 0212. - // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) + __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)); + }; - // Byte encodings are: - // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte - // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. - // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. - // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. - // 0x00-0x7F - lower part of 0201 - // 0x8E, 0xA1-0xDF - upper part of 0201 - // (0xA1-0xFE)x2 - 0208 plane (94x94). - // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). - // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. - // Used as-is in ISO2022 family. - // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, - // 0201-1976 Roman, 0208-1978, 0208-1983. - // * ISO2022-JP-1: Adds esc seq for 0212-1990. - // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. - // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. - // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. - // - // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. - // - // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - 'shiftjis': { - type: '_dbcs', - table: function() { return __nccwpck_require__(94965) }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - encodeSkipVals: [{from: 0xED40, to: 0xF940}], - }, - 'csshiftjis': 'shiftjis', - 'mskanji': 'shiftjis', - 'sjis': 'shiftjis', - 'windows31j': 'shiftjis', - 'ms31j': 'shiftjis', - 'xsjis': 'shiftjis', - 'windows932': 'shiftjis', - 'ms932': 'shiftjis', - '932': 'shiftjis', - 'cp932': 'shiftjis', + __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(n, v); }); }; } + 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]); } + }; - 'eucjp': { - type: '_dbcs', - table: function() { return __nccwpck_require__(9750) }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - }, + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - // TODO: KDDI extension to Shift_JIS - // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. - // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. + __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); } + }; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - // == Chinese/GBK ========================================================== - // http://en.wikipedia.org/wiki/GBK - // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 - 'gb2312': 'cp936', - 'gb231280': 'cp936', - 'gb23121980': 'cp936', - 'csgb2312': 'cp936', - 'csiso58gb231280': 'cp936', - 'euccn': 'cp936', + __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; + }; - // Microsoft's CP936 is a subset and approximation of GBK. - 'windows936': 'cp936', - 'ms936': 'cp936', - '936': 'cp936', - 'cp936': { - type: '_dbcs', - table: function() { return __nccwpck_require__(94904) }, - }, + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. - 'gbk': { - type: '_dbcs', - table: function() { return (__nccwpck_require__(94904).concat)(__nccwpck_require__(49429)) }, - }, - 'xgbk': 'gbk', - 'isoir58': 'gbk', + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - // GB18030 is an algorithmic extension of GBK. - // Main source: https://www.w3.org/TR/encoding/#gbk-encoder - // http://icu-project.org/docs/papers/gb18030.html - // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml - // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 - 'gb18030': { - type: '_dbcs', - table: function() { return (__nccwpck_require__(94904).concat)(__nccwpck_require__(49429)) }, - gb18030: function() { return __nccwpck_require__(25893) }, - encodeSkipVals: [0x80], - encodeAdd: {'€': 0xA2E3}, - }, + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - 'chinese': 'gb18030', + __classPrivateFieldIn = function (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); + }; + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - // == Korean =============================================================== - // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. - 'windows949': 'cp949', - 'ms949': 'cp949', - '949': 'cp949', - 'cp949': { - type: '_dbcs', - table: function() { return __nccwpck_require__(13940) }, - }, + 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; + }; - 'cseuckr': 'cp949', - 'csksc56011987': 'cp949', - 'euckr': 'cp949', - 'isoir149': 'cp949', - 'korean': 'cp949', - 'ksc56011987': 'cp949', - 'ksc56011989': 'cp949', - 'ksc5601': 'cp949', + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); - // == Big5/Taiwan/Hong Kong ================================================ - // There are lots of tables for Big5 and cp950. Please see the following links for history: - // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html - // Variations, in roughly number of defined chars: - // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT - // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ - // * Big5-2003 (Taiwan standard) almost superset of cp950. - // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. - // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. - // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. - // Plus, it has 4 combining sequences. - // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 - // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. - // Implementations are not consistent within browsers; sometimes labeled as just big5. - // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. - // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 - // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. - // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt - // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt - // - // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder - // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. - 'windows950': 'cp950', - 'ms950': 'cp950', - '950': 'cp950', - 'cp950': { - type: '_dbcs', - table: function() { return __nccwpck_require__(7507) }, - }, +/***/ }), - // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. - 'big5': 'big5hkscs', - 'big5hkscs': { - type: '_dbcs', - table: function() { return (__nccwpck_require__(7507).concat)(__nccwpck_require__(53768)) }, - encodeSkipVals: [ - // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of - // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. - // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. - 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, - 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, - 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, - 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, - 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, +/***/ 62559: +/***/ ((__unused_webpack_module, exports) => { - // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 - 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, - ], - }, - 'cnbig5': 'big5hkscs', - 'csbig5': 'big5hkscs', - 'xxbig5': 'big5hkscs', +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.constructStack = void 0; +const getAllAliases = (name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); + } + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); + } + } + return _aliases; +}; +const getMiddlewareNameWithAliases = (name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; +}; +const constructStack = () => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = new Set(); + const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || + priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]); + const removeByName = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const removeByReference = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const cloneTo = (toStack) => { + var _a; + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + (_a = toStack.identifyOnResolve) === null || _a === void 0 ? void 0 : _a.call(toStack, stack.identifyOnResolve()); + return toStack; + }; + const expandRelativeMiddlewareList = (from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } + else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } + else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }; + const getMiddlewareList = (debug = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [], + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [], + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === undefined) { + if (debug) { + return; + } + throw new Error(`${entry.toMiddleware} is not found when adding ` + + `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` + + `middleware ${entry.relation} ${entry.toMiddleware}`); + } + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); + } + } + }); + const mainChain = sort(normalizedAbsoluteEntries) + .map(expandRelativeMiddlewareList) + .reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }; + const stack = { + add: (middleware, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options, + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex((entry) => { var _a; return entry.name === alias || ((_a = entry.aliases) === null || _a === void 0 ? void 0 : _a.some((a) => a === alias)); }); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ` + + `${toOverride.priority} priority in ${toOverride.step} step cannot ` + + `be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ` + + `${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware, + ...options, + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex((entry) => { var _a; return entry.name === alias || ((_a = entry.aliases) === null || _a === void 0 ? void 0 : _a.some((a) => a === alias)); }); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ` + + `${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` + + `by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} ` + + `"${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo((0, exports.constructStack)()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + var _a, _b; + const cloned = cloneTo((0, exports.constructStack)()); + cloned.use(from); + cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || ((_b = (_a = from.identifyOnResolve) === null || _a === void 0 ? void 0 : _a.call(from)) !== null && _b !== void 0 ? _b : false)); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + var _a; + const step = (_a = mw.step) !== null && _a !== void 0 ? _a : mw.relation + + " " + + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context) => { + for (const middleware of getMiddlewareList() + .map((entry) => entry.middleware) + .reverse()) { + handler = middleware(handler, context); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + }, + }; + return stack; +}; +exports.constructStack = constructStack; +const stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1, +}; +const priorityWeights = { + high: 3, + normal: 2, + low: 1, }; /***/ }), -/***/ 80126: +/***/ 27814: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(26528); +tslib_1.__exportStar(__nccwpck_require__(62559), exports); -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - __nccwpck_require__(72097), - __nccwpck_require__(85501), - __nccwpck_require__(71611), - __nccwpck_require__(64846), - __nccwpck_require__(16399), - __nccwpck_require__(94797), - __nccwpck_require__(43281), - __nccwpck_require__(20108), - __nccwpck_require__(54275), -]; -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i]; - for (var enc in module) - if (Object.prototype.hasOwnProperty.call(module, enc)) - exports[enc] = module[enc]; -} +/***/ }), +/***/ 26528: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -/***/ 72097: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + __assign = Object.assign || function (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; + }; -"use strict"; + __rest = function (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; + }; -var Buffer = (__nccwpck_require__(25213).Buffer); + __decorate = function (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; + }; -// Export Node.js internal encodings. + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true}, - cesu8: { type: "_internal", bomAware: true}, - unicode11utf8: "utf8", + __esDecorate = function (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)); }; + 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; + }; - ucs2: { type: "_internal", bomAware: true}, - utf16le: "ucs2", + __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; + }; - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - // Codec. - _internal: InternalCodec, -}; + __setFunctionName = function (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 }); + }; -//------------------------------------------------------------------------------ + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -function InternalCodec(codecOptions, iconv) { - this.enc = codecOptions.encodingName; - this.bomAware = codecOptions.bomAware; + __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()); + }); + }; - if (this.enc === "base64") - this.encoder = InternalEncoderBase64; - else if (this.enc === "cesu8") { - this.enc = "utf8"; // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { - this.decoder = InternalDecoderCesu8; - this.defaultCharUnicode = iconv.defaultCharUnicode; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -InternalCodec.prototype.encoder = InternalEncoder; -InternalCodec.prototype.decoder = InternalDecoder; + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -//------------------------------------------------------------------------------ + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = (__nccwpck_require__(71576).StringDecoder); + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; -if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. - StringDecoder.prototype.end = function() {}; + /** @deprecated */ + __spreadArrays = function () { + 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; + }; + __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)); + }; -function InternalDecoder(options, codec) { - this.decoder = new StringDecoder(codec.enc); -} + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -InternalDecoder.prototype.write = function(buf) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer.from(buf); - } + __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(n, v); }); }; } + 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]); } + }; - return this.decoder.write(buf); -} + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -InternalDecoder.prototype.end = function() { - return this.decoder.end(); -} + __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); } + }; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -//------------------------------------------------------------------------------ -// Encoder is mostly trivial + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -function InternalEncoder(options, codec) { - this.enc = codec.enc; -} + __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; + }; -InternalEncoder.prototype.write = function(str) { - return Buffer.from(str, this.enc); -} + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -InternalEncoder.prototype.end = function() { -} + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -//------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. + __classPrivateFieldIn = function (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 InternalEncoderBase64(options, codec) { - this.prevStr = ''; -} + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - (str.length % 4); - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); + 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 Buffer.from(str, "base64"); -} + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -InternalEncoderBase64.prototype.end = function() { - return Buffer.from(this.prevStr, "base64"); -} + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); -//------------------------------------------------------------------------------ -// CESU-8 encoder is also special. +/***/ }), -function InternalEncoderCesu8(options, codec) { -} +/***/ 56528: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -InternalEncoderCesu8.prototype.write = function(str) { - var buf = Buffer.alloc(str.length * 3), bufIdx = 0; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i); - // Naive implementation, but it works because CESU-8 is especially easy - // to convert from UTF-16 (which all JS strings are encoded in). - if (charCode < 0x80) - buf[bufIdx++] = charCode; - else if (charCode < 0x800) { - buf[bufIdx++] = 0xC0 + (charCode >>> 6); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - else { // charCode will always be < 0x10000 in javascript. - buf[bufIdx++] = 0xE0 + (charCode >>> 12); - buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.loadConfig = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const fromEnv_1 = __nccwpck_require__(84319); +const fromSharedConfigFiles_1 = __nccwpck_require__(67597); +const fromStatic_1 = __nccwpck_require__(65569); +const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => (0, property_provider_1.memoize)((0, property_provider_1.chain)((0, fromEnv_1.fromEnv)(environmentVariableSelector), (0, fromSharedConfigFiles_1.fromSharedConfigFiles)(configFileSelector, configuration), (0, fromStatic_1.fromStatic)(defaultValue))); +exports.loadConfig = loadConfig; + + +/***/ }), + +/***/ 84319: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromEnv = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const fromEnv = (envVarSelector) => async () => { + try { + const config = envVarSelector(process.env); + if (config === undefined) { + throw new Error(); } + return config; } - return buf.slice(0, bufIdx); -} + catch (e) { + throw new property_provider_1.CredentialsProviderError(e.message || `Cannot load config from environment variables with getter: ${envVarSelector}`); + } +}; +exports.fromEnv = fromEnv; -InternalEncoderCesu8.prototype.end = function() { -} -//------------------------------------------------------------------------------ -// CESU-8 decoder is not implemented in Node v4.0+ +/***/ }), -function InternalDecoderCesu8(options, codec) { - this.acc = 0; - this.contBytes = 0; - this.accBytes = 0; - this.defaultCharUnicode = codec.defaultCharUnicode; -} +/***/ 67597: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -InternalDecoderCesu8.prototype.write = function(buf) { - var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, - res = ''; - for (var i = 0; i < buf.length; i++) { - var curByte = buf[i]; - if ((curByte & 0xC0) !== 0x80) { // Leading byte - if (contBytes > 0) { // Previous code is invalid - res += this.defaultCharUnicode; - contBytes = 0; - } - if (curByte < 0x80) { // Single-byte code - res += String.fromCharCode(curByte); - } else if (curByte < 0xE0) { // Two-byte code - acc = curByte & 0x1F; - contBytes = 1; accBytes = 1; - } else if (curByte < 0xF0) { // Three-byte code - acc = curByte & 0x0F; - contBytes = 2; accBytes = 1; - } else { // Four or more are not supported for CESU-8. - res += this.defaultCharUnicode; - } - } else { // Continuation byte - if (contBytes > 0) { // We're waiting for it. - acc = (acc << 6) | (curByte & 0x3f); - contBytes--; accBytes++; - if (contBytes === 0) { - // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) - if (accBytes === 2 && acc < 0x80 && acc > 0) - res += this.defaultCharUnicode; - else if (accBytes === 3 && acc < 0x800) - res += this.defaultCharUnicode; - else - // Actually add character. - res += String.fromCharCode(acc); - } - } else { // Unexpected continuation byte - res += this.defaultCharUnicode; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromSharedConfigFiles = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const shared_ini_file_loader_1 = __nccwpck_require__(67097); +const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = (0, shared_ini_file_loader_1.getProfileName)(init); + const { configFile, credentialsFile } = await (0, shared_ini_file_loader_1.loadSharedConfigFiles)(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" + ? { ...profileFromCredentials, ...profileFromConfig } + : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === undefined) { + throw new Error(); } + return configValue; } - this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; - return res; -} + catch (e) { + throw new property_provider_1.CredentialsProviderError(e.message || `Cannot load config for profile ${profile} in SDK configuration files with getter: ${configSelector}`); + } +}; +exports.fromSharedConfigFiles = fromSharedConfigFiles; -InternalDecoderCesu8.prototype.end = function() { - var res = 0; - if (this.contBytes > 0) - res += this.defaultCharUnicode; - return res; -} + +/***/ }), + +/***/ 65569: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromStatic = void 0; +const property_provider_1 = __nccwpck_require__(12955); +const isFunction = (func) => typeof func === "function"; +const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, property_provider_1.fromStatic)(defaultValue); +exports.fromStatic = fromStatic; /***/ }), -/***/ 16399: +/***/ 13079: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -var Buffer = (__nccwpck_require__(25213).Buffer); +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(57450); +tslib_1.__exportStar(__nccwpck_require__(56528), exports); -// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that -// correspond to encoded bytes (if 128 - then lower half is ASCII). -exports._sbcs = SBCSCodec; -function SBCSCodec(codecOptions, iconv) { - if (!codecOptions) - throw new Error("SBCS codec is called without the data.") - - // Prepare char buffer for decoding. - if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) - throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (codecOptions.chars.length === 128) { - var asciiString = ""; - for (var i = 0; i < 128; i++) - asciiString += String.fromCharCode(i); - codecOptions.chars = asciiString + codecOptions.chars; +/***/ }), + +/***/ 57450: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); - - // Encoding buffer. - var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); + __assign = Object.assign || function (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; + }; - for (var i = 0; i < codecOptions.chars.length; i++) - encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + __rest = function (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; + }; - this.encodeBuf = encodeBuf; -} + __decorate = function (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; + }; -SBCSCodec.prototype.encoder = SBCSEncoder; -SBCSCodec.prototype.decoder = SBCSDecoder; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + __esDecorate = function (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)); }; + 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 SBCSEncoder(options, codec) { - this.encodeBuf = codec.encodeBuf; -} + __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; + }; -SBCSEncoder.prototype.write = function(str) { - var buf = Buffer.alloc(str.length); - for (var i = 0; i < str.length; i++) - buf[i] = this.encodeBuf[str.charCodeAt(i)]; - - return buf; -} + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -SBCSEncoder.prototype.end = function() { -} + __setFunctionName = function (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 }); + }; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -function SBCSDecoder(options, codec) { - this.decodeBuf = codec.decodeBuf; -} + __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()); + }); + }; -SBCSDecoder.prototype.write = function(buf) { - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var decodeBuf = this.decodeBuf; - var newBuf = Buffer.alloc(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0; i < buf.length; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = decodeBuf[idx1]; - newBuf[idx2+1] = decodeBuf[idx1+1]; - } - return newBuf.toString('ucs2'); -} + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; -SBCSDecoder.prototype.end = function() { -} + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -/***/ }), + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -/***/ 43281: -/***/ ((module) => { + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -"use strict"; + /** @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 = 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; + }; -// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. -module.exports = { - "437": "cp437", - "737": "cp737", - "775": "cp775", - "850": "cp850", - "852": "cp852", - "855": "cp855", - "856": "cp856", - "857": "cp857", - "858": "cp858", - "860": "cp860", - "861": "cp861", - "862": "cp862", - "863": "cp863", - "864": "cp864", - "865": "cp865", - "866": "cp866", - "869": "cp869", - "874": "windows874", - "922": "cp922", - "1046": "cp1046", - "1124": "cp1124", - "1125": "cp1125", - "1129": "cp1129", - "1133": "cp1133", - "1161": "cp1161", - "1162": "cp1162", - "1163": "cp1163", - "1250": "windows1250", - "1251": "windows1251", - "1252": "windows1252", - "1253": "windows1253", - "1254": "windows1254", - "1255": "windows1255", - "1256": "windows1256", - "1257": "windows1257", - "1258": "windows1258", - "28591": "iso88591", - "28592": "iso88592", - "28593": "iso88593", - "28594": "iso88594", - "28595": "iso88595", - "28596": "iso88596", - "28597": "iso88597", - "28598": "iso88598", - "28599": "iso88599", - "28600": "iso885910", - "28601": "iso885911", - "28603": "iso885913", - "28604": "iso885914", - "28605": "iso885915", - "28606": "iso885916", - "windows874": { - "type": "_sbcs", - "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "win874": "windows874", - "cp874": "windows874", - "windows1250": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "win1250": "windows1250", - "cp1250": "windows1250", - "windows1251": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "win1251": "windows1251", - "cp1251": "windows1251", - "windows1252": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "win1252": "windows1252", - "cp1252": "windows1252", - "windows1253": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "win1253": "windows1253", - "cp1253": "windows1253", - "windows1254": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "win1254": "windows1254", - "cp1254": "windows1254", - "windows1255": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "win1255": "windows1255", - "cp1255": "windows1255", - "windows1256": { - "type": "_sbcs", - "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" - }, - "win1256": "windows1256", - "cp1256": "windows1256", - "windows1257": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" - }, - "win1257": "windows1257", - "cp1257": "windows1257", - "windows1258": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "win1258": "windows1258", - "cp1258": "windows1258", - "iso88591": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28591": "iso88591", - "iso88592": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" - }, - "cp28592": "iso88592", - "iso88593": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" - }, - "cp28593": "iso88593", - "iso88594": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" - }, - "cp28594": "iso88594", - "iso88595": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" - }, - "cp28595": "iso88595", - "iso88596": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" - }, - "cp28596": "iso88596", - "iso88597": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" - }, - "cp28597": "iso88597", - "iso88598": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" - }, - "cp28598": "iso88598", - "iso88599": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" - }, - "cp28599": "iso88599", - "iso885910": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" - }, - "cp28600": "iso885910", - "iso885911": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "cp28601": "iso885911", - "iso885913": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" - }, - "cp28603": "iso885913", - "iso885914": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" - }, - "cp28604": "iso885914", - "iso885915": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28605": "iso885915", - "iso885916": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" - }, - "cp28606": "iso885916", - "cp437": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm437": "cp437", - "csibm437": "cp437", - "cp737": { - "type": "_sbcs", - "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " - }, - "ibm737": "cp737", - "csibm737": "cp737", - "cp775": { - "type": "_sbcs", - "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " - }, - "ibm775": "cp775", - "csibm775": "cp775", - "cp850": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm850": "cp850", - "csibm850": "cp850", - "cp852": { - "type": "_sbcs", - "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " - }, - "ibm852": "cp852", - "csibm852": "cp852", - "cp855": { - "type": "_sbcs", - "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " - }, - "ibm855": "cp855", - "csibm855": "cp855", - "cp856": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm856": "cp856", - "csibm856": "cp856", - "cp857": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " - }, - "ibm857": "cp857", - "csibm857": "cp857", - "cp858": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm858": "cp858", - "csibm858": "cp858", - "cp860": { - "type": "_sbcs", - "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm860": "cp860", - "csibm860": "cp860", - "cp861": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm861": "cp861", - "csibm861": "cp861", - "cp862": { - "type": "_sbcs", - "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm862": "cp862", - "csibm862": "cp862", - "cp863": { - "type": "_sbcs", - "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm863": "cp863", - "csibm863": "cp863", - "cp864": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" - }, - "ibm864": "cp864", - "csibm864": "cp864", - "cp865": { - "type": "_sbcs", - "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, - "ibm865": "cp865", - "csibm865": "cp865", - "cp866": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " - }, - "ibm866": "cp866", - "csibm866": "cp866", - "cp869": { - "type": "_sbcs", - "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " - }, - "ibm869": "cp869", - "csibm869": "cp869", - "cp922": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" - }, - "ibm922": "cp922", - "csibm922": "cp922", - "cp1046": { - "type": "_sbcs", - "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" - }, - "ibm1046": "cp1046", - "csibm1046": "cp1046", - "cp1124": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" - }, - "ibm1124": "cp1124", - "csibm1124": "cp1124", - "cp1125": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " - }, - "ibm1125": "cp1125", - "csibm1125": "cp1125", - "cp1129": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1129": "cp1129", - "csibm1129": "cp1129", - "cp1133": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" - }, - "ibm1133": "cp1133", - "csibm1133": "cp1133", - "cp1161": { - "type": "_sbcs", - "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " - }, - "ibm1161": "cp1161", - "csibm1161": "cp1161", - "cp1162": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - }, - "ibm1162": "cp1162", - "csibm1162": "cp1162", - "cp1163": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1163": "cp1163", - "csibm1163": "cp1163", - "maccroatian": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" - }, - "maccyrillic": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "macgreek": { - "type": "_sbcs", - "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" - }, - "maciceland": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macroman": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macromania": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macthai": { - "type": "_sbcs", - "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" - }, - "macturkish": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" - }, - "macukraine": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" - }, - "koi8r": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8u": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8ru": { - "type": "_sbcs", - "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "koi8t": { - "type": "_sbcs", - "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" - }, - "armscii8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" - }, - "rk1048": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "tcvn": { - "type": "_sbcs", - "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" - }, - "georgianacademy": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "georgianps": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" - }, - "pt154": { - "type": "_sbcs", - "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" - }, - "viscii": { - "type": "_sbcs", - "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" - }, - "iso646cn": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "iso646jp": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "hproman8": { - "type": "_sbcs", - "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" - }, - "macintosh": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" - }, - "ascii": { - "type": "_sbcs", - "chars": "��������������������������������������������������������������������������������������������������������������������������������" - }, - "tis620": { - "type": "_sbcs", - "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" - } -} + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -/***/ 94797: -/***/ ((module) => { + __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(n, v); }); }; } + 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]); } + }; -"use strict"; + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + __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); } + }; -// Manually added data to be used by sbcs codec in addition to generated one. + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -module.exports = { - // Not supported by iconv, not sure why. - "10029": "maccenteuro", - "maccenteuro": { - "type": "_sbcs", - "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" - }, + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - "808": "cp808", - "ibm808": "cp808", - "cp808": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " - }, + __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; + }; - "mik": { - "type": "_sbcs", - "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " - }, + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - "cp720": { - "type": "_sbcs", - "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" - }, + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - // Aliases of generated encodings. - "ascii8bit": "ascii", - "usascii": "ascii", - "ansix34": "ascii", - "ansix341968": "ascii", - "ansix341986": "ascii", - "csascii": "ascii", - "cp367": "ascii", - "ibm367": "ascii", - "isoir6": "ascii", - "iso646us": "ascii", - "iso646irv": "ascii", - "us": "ascii", + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - "latin1": "iso88591", - "latin2": "iso88592", - "latin3": "iso88593", - "latin4": "iso88594", - "latin5": "iso88599", - "latin6": "iso885910", - "latin7": "iso885913", - "latin8": "iso885914", - "latin9": "iso885915", - "latin10": "iso885916", + __classPrivateFieldIn = function (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); + }; - "csisolatin1": "iso88591", - "csisolatin2": "iso88592", - "csisolatin3": "iso88593", - "csisolatin4": "iso88594", - "csisolatincyrillic": "iso88595", - "csisolatinarabic": "iso88596", - "csisolatingreek" : "iso88597", - "csisolatinhebrew": "iso88598", - "csisolatin5": "iso88599", - "csisolatin6": "iso885910", + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - "l1": "iso88591", - "l2": "iso88592", - "l3": "iso88593", - "l4": "iso88594", - "l5": "iso88599", - "l6": "iso885910", - "l7": "iso885913", - "l8": "iso885914", - "l9": "iso885915", - "l10": "iso885916", + 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; + }; - "isoir14": "iso646jp", - "isoir57": "iso646cn", - "isoir100": "iso88591", - "isoir101": "iso88592", - "isoir109": "iso88593", - "isoir110": "iso88594", - "isoir144": "iso88595", - "isoir127": "iso88596", - "isoir126": "iso88597", - "isoir138": "iso88598", - "isoir148": "iso88599", - "isoir157": "iso885910", - "isoir166": "tis620", - "isoir179": "iso885913", - "isoir199": "iso885914", - "isoir203": "iso885915", - "isoir226": "iso885916", + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; - "cp819": "iso88591", - "ibm819": "iso88591", + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); - "cyrillic": "iso88595", - "arabic": "iso88596", - "arabic8": "iso88596", - "ecma114": "iso88596", - "asmo708": "iso88596", +/***/ }), - "greek" : "iso88597", - "greek8" : "iso88597", - "ecma118" : "iso88597", - "elot928" : "iso88597", +/***/ 61636: +/***/ ((__unused_webpack_module, exports) => { - "hebrew": "iso88598", - "hebrew8": "iso88598", - "turkish": "iso88599", - "turkish8": "iso88599", +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODEJS_TIMEOUT_ERROR_CODES = void 0; +exports.NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; - "thai": "iso885911", - "thai8": "iso885911", - "celtic": "iso885914", - "celtic8": "iso885914", - "isoceltic": "iso885914", +/***/ }), - "tis6200": "tis620", - "tis62025291": "tis620", - "tis62025330": "tis620", +/***/ 98661: +/***/ ((__unused_webpack_module, exports) => { - "10000": "macroman", - "10006": "macgreek", - "10007": "maccyrillic", - "10079": "maciceland", - "10081": "macturkish", - "cspc8codepage437": "cp437", - "cspc775baltic": "cp775", - "cspc850multilingual": "cp850", - "cspcp852": "cp852", - "cspc862latinhebrew": "cp862", - "cpgr": "cp869", +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getTransformedHeaders = void 0; +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}; +exports.getTransformedHeaders = getTransformedHeaders; - "msee": "cp1250", - "mscyrl": "cp1251", - "msansi": "cp1252", - "msgreek": "cp1253", - "msturk": "cp1254", - "mshebr": "cp1255", - "msarab": "cp1256", - "winbaltrim": "cp1257", - "cp20866": "koi8r", - "20866": "koi8r", - "ibm878": "koi8r", - "cskoi8r": "koi8r", +/***/ }), - "cp21866": "koi8u", - "21866": "koi8u", - "ibm1168": "koi8u", +/***/ 54065: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - "strk10482002": "rk1048", - "tcvn5712": "tcvn", - "tcvn57121": "tcvn", +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(30447); +tslib_1.__exportStar(__nccwpck_require__(56885), exports); +tslib_1.__exportStar(__nccwpck_require__(8056), exports); +tslib_1.__exportStar(__nccwpck_require__(32136), exports); - "gb198880": "iso646cn", - "cn": "iso646cn", - "csiso14jisc6220ro": "iso646jp", - "jisc62201969ro": "iso646jp", - "jp": "iso646jp", +/***/ }), - "cshproman8": "hproman8", - "r8": "hproman8", - "roman8": "hproman8", - "xroman8": "hproman8", - "ibm1051": "hproman8", +/***/ 56885: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - "mac": "macintosh", - "csmacintosh": "macintosh", -}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeHttpHandler = exports.DEFAULT_REQUEST_TIMEOUT = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const querystring_builder_1 = __nccwpck_require__(25201); +const http_1 = __nccwpck_require__(13685); +const https_1 = __nccwpck_require__(95687); +const constants_1 = __nccwpck_require__(61636); +const get_transformed_headers_1 = __nccwpck_require__(98661); +const set_connection_timeout_1 = __nccwpck_require__(31545); +const set_socket_keep_alive_1 = __nccwpck_require__(12063); +const set_socket_timeout_1 = __nccwpck_require__(48089); +const write_request_body_1 = __nccwpck_require__(8459); +exports.DEFAULT_REQUEST_TIMEOUT = 0; +class NodeHttpHandler { + static create(instanceOrOptions) { + if (typeof (instanceOrOptions === null || instanceOrOptions === void 0 ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new NodeHttpHandler(instanceOrOptions); + } + constructor(options) { + this.metadata = { handlerProtocol: "http/1.1" }; + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }) + .catch(reject); + } + else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout: requestTimeout !== null && requestTimeout !== void 0 ? requestTimeout : socketTimeout, + httpAgent: httpAgent || new http_1.Agent({ keepAlive, maxSockets }), + httpsAgent: httpsAgent || new https_1.Agent({ keepAlive, maxSockets }), + }; + } + destroy() { + var _a, _b, _c, _d; + (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.httpAgent) === null || _b === void 0 ? void 0 : _b.destroy(); + (_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.httpsAgent) === null || _d === void 0 ? void 0 : _d.destroy(); + } + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + var _a, _b; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (!this.config) { + throw new Error("Node HTTP request handler config is not resolved"); + } + if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const queryString = (0, querystring_builder_1.buildQueryString)(request.query || {}); + let auth = undefined; + if (request.username != null || request.password != null) { + const username = (_a = request.username) !== null && _a !== void 0 ? _a : ""; + const password = (_b = request.password) !== null && _b !== void 0 ? _b : ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const nodeHttpsOptions = { + headers: request.headers, + host: request.hostname, + method: request.method, + path, + port: request.port, + agent: isSSL ? this.config.httpsAgent : this.config.httpAgent, + auth, + }; + const requestFunc = isSSL ? https_1.request : http_1.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocol_http_1.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: (0, get_transformed_headers_1.getTransformedHeaders)(res.headers), + body: res, + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (constants_1.NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } + else { + reject(err); + } + }); + (0, set_connection_timeout_1.setConnectionTimeout)(req, reject, this.config.connectionTimeout); + (0, set_socket_timeout_1.setSocketTimeout)(req, reject, this.config.requestTimeout); + if (abortSignal) { + abortSignal.onabort = () => { + req.abort(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + } + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + (0, set_socket_keep_alive_1.setSocketKeepAlive)(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs, + }); + } + writeRequestBodyPromise = (0, write_request_body_1.writeRequestBody)(req, request, this.config.requestTimeout).catch(_reject); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + var _a; + return (_a = this.config) !== null && _a !== void 0 ? _a : {}; + } +} +exports.NodeHttpHandler = NodeHttpHandler; /***/ }), -/***/ 71611: +/***/ 24807: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - -var Buffer = (__nccwpck_require__(25213).Buffer); - -// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js - -// == UTF16-BE codec. ========================================================== -exports.utf16be = Utf16BECodec; -function Utf16BECodec() { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeHttp2ConnectionManager = void 0; +const tslib_1 = __nccwpck_require__(30447); +const http2_1 = tslib_1.__importDefault(__nccwpck_require__(85158)); +const node_http2_connection_pool_1 = __nccwpck_require__(68309); +class NodeHttp2ConnectionManager { + constructor(config) { + this.sessionCache = new Map(); + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = http2_1.default.connect(url); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + + this.config.maxConcurrency + + "when creating new session for " + + requestContext.destination.toString()); + } + }); + } + session.unref(); + const destroySessionCb = () => { + session.destroy(); + this.deleteSession(url, session); + }; + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new node_http2_connection_pool_1.NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; + } + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + var _a; + const cacheKey = this.getUrlString(requestContext); + (_a = this.sessionCache.get(cacheKey)) === null || _a === void 0 ? void 0 : _a.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request) { + return request.destination.toString(); + } } +exports.NodeHttp2ConnectionManager = NodeHttp2ConnectionManager; -Utf16BECodec.prototype.encoder = Utf16BEEncoder; -Utf16BECodec.prototype.decoder = Utf16BEDecoder; -Utf16BECodec.prototype.bomAware = true; +/***/ }), -// -- Encoding +/***/ 68309: +/***/ ((__unused_webpack_module, exports) => { -function Utf16BEEncoder() { -} -Utf16BEEncoder.prototype.write = function(str) { - var buf = Buffer.from(str, 'ucs2'); - for (var i = 0; i < buf.length; i += 2) { - var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeHttp2ConnectionPool = void 0; +class NodeHttp2ConnectionPool { + constructor(sessions) { + this.sessions = []; + this.sessions = sessions !== null && sessions !== void 0 ? sessions : []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } } - return buf; } +exports.NodeHttp2ConnectionPool = NodeHttp2ConnectionPool; -Utf16BEEncoder.prototype.end = function() { -} +/***/ }), -// -- Decoding +/***/ 8056: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function Utf16BEDecoder() { - this.overflowByte = -1; -} -Utf16BEDecoder.prototype.write = function(buf) { - if (buf.length == 0) - return ''; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NodeHttp2Handler = void 0; +const protocol_http_1 = __nccwpck_require__(45311); +const querystring_builder_1 = __nccwpck_require__(25201); +const http2_1 = __nccwpck_require__(85158); +const get_transformed_headers_1 = __nccwpck_require__(98661); +const node_http2_connection_manager_1 = __nccwpck_require__(24807); +const write_request_body_1 = __nccwpck_require__(8459); +class NodeHttp2Handler { + static create(instanceOrOptions) { + if (typeof (instanceOrOptions === null || instanceOrOptions === void 0 ? void 0 : instanceOrOptions.handle) === "function") { + return instanceOrOptions; + } + return new NodeHttp2Handler(instanceOrOptions); + } + constructor(options) { + this.metadata = { handlerProtocol: "h2" }; + this.connectionManager = new node_http2_connection_manager_1.NodeHttp2ConnectionManager({}); + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((opts) => { + resolve(opts || {}); + }) + .catch(reject); + } + else { + resolve(options || {}); + } + }); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout, disableConcurrentStreams } = this.config; + return new Promise((_resolve, _reject) => { + var _a, _b, _c; + let fulfilled = false; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = (_a = request.username) !== null && _a !== void 0 ? _a : ""; + const password = (_b = request.password) !== null && _b !== void 0 ? _b : ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: (_c = this.config) === null || _c === void 0 ? void 0 : _c.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false, + }); + const rejectWithDestroy = (err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }; + const queryString = (0, querystring_builder_1.buildQueryString)(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [http2_1.constants.HTTP2_HEADER_PATH]: path, + [http2_1.constants.HTTP2_HEADER_METHOD]: method, + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new protocol_http_1.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: (0, get_transformed_headers_1.getTransformedHeaders)(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (requestTimeout) { + req.setTimeout(requestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + abortSignal.onabort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = (0, write_request_body_1.writeRequestBody)(req, request, requestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + var _a; + return (_a = this.config) !== null && _a !== void 0 ? _a : {}; + } + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } +} +exports.NodeHttp2Handler = NodeHttp2Handler; - var buf2 = Buffer.alloc(buf.length + 1), - i = 0, j = 0; - if (this.overflowByte !== -1) { - buf2[0] = buf[0]; - buf2[1] = this.overflowByte; - i = 1; j = 2; - } +/***/ }), - for (; i < buf.length-1; i += 2, j+= 2) { - buf2[j] = buf[i+1]; - buf2[j+1] = buf[i]; - } +/***/ 31545: +/***/ ((__unused_webpack_module, exports) => { - this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; - return buf2.slice(0, j).toString('ucs2'); -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.setConnectionTimeout = void 0; +const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return; + } + const timeoutId = setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), { + name: "TimeoutError", + })); + }, timeoutInMs); + request.on("socket", (socket) => { + if (socket.connecting) { + socket.on("connect", () => { + clearTimeout(timeoutId); + }); + } + else { + clearTimeout(timeoutId); + } + }); +}; +exports.setConnectionTimeout = setConnectionTimeout; -Utf16BEDecoder.prototype.end = function() { - this.overflowByte = -1; -} +/***/ }), -// == UTF-16 codec ============================================================= -// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. -// Defaults to UTF-16LE, as it's prevalent and default in Node. -// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le -// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); +/***/ 12063: +/***/ ((__unused_webpack_module, exports) => { -// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). -exports.utf16 = Utf16Codec; -function Utf16Codec(codecOptions, iconv) { - this.iconv = iconv; -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.setSocketKeepAlive = void 0; +const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }) => { + if (keepAlive !== true) { + return; + } + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); +}; +exports.setSocketKeepAlive = setSocketKeepAlive; -Utf16Codec.prototype.encoder = Utf16Encoder; -Utf16Codec.prototype.decoder = Utf16Decoder; +/***/ }), -// -- Encoding (pass-through) +/***/ 48089: +/***/ ((__unused_webpack_module, exports) => { -function Utf16Encoder(options, codec) { - options = options || {}; - if (options.addBOM === undefined) - options.addBOM = true; - this.encoder = codec.iconv.getEncoder('utf-16le', options); -} -Utf16Encoder.prototype.write = function(str) { - return this.encoder.write(str); -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.setSocketTimeout = void 0; +const setSocketTimeout = (request, reject, timeoutInMs = 0) => { + request.setTimeout(timeoutInMs, () => { + request.destroy(); + reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); + }); +}; +exports.setSocketTimeout = setSocketTimeout; -Utf16Encoder.prototype.end = function() { - return this.encoder.end(); -} +/***/ }), -// -- Decoding +/***/ 4857: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function Utf16Decoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - this.options = options || {}; - this.iconv = codec.iconv; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Collector = void 0; +const stream_1 = __nccwpck_require__(12781); +class Collector extends stream_1.Writable { + constructor() { + super(...arguments); + this.bufferedBytes = []; + } + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } } +exports.Collector = Collector; -Utf16Decoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - - if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) - return ''; - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); +/***/ }), - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); +/***/ 32136: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; - } - return this.decoder.write(buf); -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.streamCollector = void 0; +const collector_1 = __nccwpck_require__(4857); +const streamCollector = (stream) => new Promise((resolve, reject) => { + const collector = new collector_1.Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); +}); +exports.streamCollector = streamCollector; -Utf16Decoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); +/***/ }), - var trail = this.decoder.end(); - if (trail) - resStr += trail; +/***/ 8459: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.writeRequestBody = void 0; +const stream_1 = __nccwpck_require__(12781); +const MIN_WAIT_TIME = 1000; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) { + var _a; + const headers = (_a = request.headers) !== null && _a !== void 0 ? _a : {}; + const expect = headers["Expect"] || headers["expect"]; + let timeoutId = -1; + let hasError = false; + if (expect === "100-continue") { + await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(setTimeout(resolve, Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + clearTimeout(timeoutId); + resolve(); + }); + httpRequest.on("error", () => { + hasError = true; + clearTimeout(timeoutId); + resolve(); + }); + }), + ]); + } + if (!hasError) { + writeBody(httpRequest, request.body); + } +} +exports.writeRequestBody = writeRequestBody; +function writeBody(httpRequest, body) { + if (body instanceof stream_1.Readable) { + body.pipe(httpRequest); + } + else if (body) { + httpRequest.end(Buffer.from(body)); + } + else { + httpRequest.end(); } - return this.decoder.end(); } -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. - - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 2) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; - if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; - } - if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; - if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; +/***/ }), - b.length = 0; - charsProcessed++; +/***/ 30447: +/***/ ((module) => { - if (charsProcessed >= 100) { - break outer_loop; - } +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; } } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - // Make decisions. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; - if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; - - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-16le'; -} - - - - -/***/ }), - -/***/ 85501: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + __assign = Object.assign || function (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; + }; + __rest = function (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; + }; -var Buffer = (__nccwpck_require__(25213).Buffer); + __decorate = function (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; + }; -// == UTF32-LE/BE codec. ========================================================== + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -exports._utf32 = Utf32Codec; + __esDecorate = function (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)); }; + 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 Utf32Codec(codecOptions, iconv) { - this.iconv = iconv; - this.bomAware = true; - this.isLE = codecOptions.isLE; -} + __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; + }; -exports.utf32le = { type: '_utf32', isLE: true }; -exports.utf32be = { type: '_utf32', isLE: false }; + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -// Aliases -exports.ucs4le = 'utf32le'; -exports.ucs4be = 'utf32be'; + __setFunctionName = function (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 }); + }; -Utf32Codec.prototype.encoder = Utf32Encoder; -Utf32Codec.prototype.decoder = Utf32Decoder; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -// -- Encoding + __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()); + }); + }; -function Utf32Encoder(options, codec) { - this.isLE = codec.isLE; - this.highSurrogate = 0; -} + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; -Utf32Encoder.prototype.write = function(str) { - var src = Buffer.from(str, 'ucs2'); - var dst = Buffer.alloc(src.length * 2); - var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; - var offset = 0; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - for (var i = 0; i < src.length; i += 2) { - var code = src.readUInt16LE(i); - var isHighSurrogate = (0xD800 <= code && code < 0xDC00); - var isLowSurrogate = (0xDC00 <= code && code < 0xE000); + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - if (this.highSurrogate) { - if (isHighSurrogate || !isLowSurrogate) { - // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low - // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character - // (technically wrong, but expected by some applications, like Windows file names). - write32.call(dst, this.highSurrogate, offset); - offset += 4; + __values = function (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 }; } - else { - // Create 32-bit value from high and low surrogates; - var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000; - - write32.call(dst, codepoint, offset); - offset += 4; - this.highSurrogate = 0; + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - continue; + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); } + finally { if (e) throw e.error; } } + return ar; + }; - if (isHighSurrogate) - this.highSurrogate = code; - else { - // Even if the current character is a low surrogate, with no previous high surrogate, we'll - // encode it as a semi-invalid stand-alone character for the same reasons expressed above for - // unpaired high surrogates. - write32.call(dst, code, offset); - offset += 4; - this.highSurrogate = 0; + /** @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 = 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; + }; + + __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)); + }; - if (offset < dst.length) - dst = dst.slice(0, offset); + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - return dst; -}; + __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(n, v); }); }; } + 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]); } + }; -Utf32Encoder.prototype.end = function() { - // Treat any leftover high surrogate as a semi-valid independent character. - if (!this.highSurrogate) - return; + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - var buf = Buffer.alloc(4); + __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); } + }; - if (this.isLE) - buf.writeUInt32LE(this.highSurrogate, 0); - else - buf.writeUInt32BE(this.highSurrogate, 0); + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - this.highSurrogate = 0; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - return buf; -}; + __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; + }; -// -- Decoding + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -function Utf32Decoder(options, codec) { - this.isLE = codec.isLE; - this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); - this.overflow = []; -} + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -Utf32Decoder.prototype.write = function(src) { - if (src.length === 0) - return ''; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - var i = 0; - var codepoint = 0; - var dst = Buffer.alloc(src.length + 4); - var offset = 0; - var isLE = this.isLE; - var overflow = this.overflow; - var badChar = this.badChar; + __classPrivateFieldIn = function (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); + }; - if (overflow.length > 0) { - for (; i < src.length && overflow.length < 4; i++) - overflow.push(src[i]); - - if (overflow.length === 4) { - // NOTE: codepoint is a signed int32 and can be negative. - // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). - if (isLE) { - codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24); - } else { - codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24); + __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; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; } - overflow.length = 0; - - offset = _writeCodepoint(dst, offset, codepoint, badChar); + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; + } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); } - } - - // Main loop. Should be as optimized as possible. - for (; i < src.length - 3; i += 4) { - // NOTE: codepoint is a signed int32 and can be negative. - if (isLE) { - codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24); - } else { - codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24); + else if (async) { + env.stack.push({ async: true }); } - offset = _writeCodepoint(dst, offset, codepoint, badChar); - } - - // Keep overflowing bytes. - for (; i < src.length; i++) { - overflow.push(src[i]); - } - - return dst.slice(0, offset).toString('ucs2'); -}; - -function _writeCodepoint(dst, offset, codepoint, badChar) { - // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. - if (codepoint < 0 || codepoint > 0x10FFFF) { - // Not a valid Unicode codepoint - codepoint = badChar; - } - - // Ephemeral Planes: Write high surrogate. - if (codepoint >= 0x10000) { - codepoint -= 0x10000; - - var high = 0xD800 | (codepoint >> 10); - dst[offset++] = high & 0xff; - dst[offset++] = high >> 8; + return value; + }; - // Low surrogate is written below. - var codepoint = 0xDC00 | (codepoint & 0x3FF); - } + 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; + }; - // Write BMP char or low surrogate. - dst[offset++] = codepoint & 0xff; - dst[offset++] = codepoint >> 8; + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; - return offset; -}; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); -Utf32Decoder.prototype.end = function() { - this.overflow.length = 0; -}; -// == UTF-32 Auto codec ============================================================= -// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. -// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 -// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); +/***/ }), -// Encoder prepends BOM (which can be overridden with (addBOM: false}). +/***/ 53329: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -exports.utf32 = Utf32AutoCodec; -exports.ucs4 = 'utf32'; -function Utf32AutoCodec(options, iconv) { - this.iconv = iconv; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CredentialsProviderError = void 0; +const ProviderError_1 = __nccwpck_require__(65470); +class CredentialsProviderError extends ProviderError_1.ProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "CredentialsProviderError"; + Object.setPrototypeOf(this, CredentialsProviderError.prototype); + } } +exports.CredentialsProviderError = CredentialsProviderError; -Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; -Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; - -// -- Encoding - -function Utf32AutoEncoder(options, codec) { - options = options || {}; - - if (options.addBOM === undefined) - options.addBOM = true; - - this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options); -} -Utf32AutoEncoder.prototype.write = function(str) { - return this.encoder.write(str); -}; +/***/ }), -Utf32AutoEncoder.prototype.end = function() { - return this.encoder.end(); -}; +/***/ 65470: +/***/ ((__unused_webpack_module, exports) => { -// -- Decoding -function Utf32AutoDecoder(options, codec) { - this.decoder = null; - this.initialBufs = []; - this.initialBufsLen = 0; - this.options = options || {}; - this.iconv = codec.iconv; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ProviderError = void 0; +class ProviderError extends Error { + constructor(message, tryNextLink = true) { + super(message); + this.tryNextLink = tryNextLink; + this.name = "ProviderError"; + Object.setPrototypeOf(this, ProviderError.prototype); + } + static from(error, tryNextLink = true) { + return Object.assign(new this(error.message, tryNextLink), error); + } } +exports.ProviderError = ProviderError; -Utf32AutoDecoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBufs.push(buf); - this.initialBufsLen += buf.length; - if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) - return ''; +/***/ }), - // We have enough bytes -> detect endianness. - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); +/***/ 36726: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.TokenProviderError = void 0; +const ProviderError_1 = __nccwpck_require__(65470); +class TokenProviderError extends ProviderError_1.ProviderError { + constructor(message, tryNextLink = true) { + super(message, tryNextLink); + this.tryNextLink = tryNextLink; + this.name = "TokenProviderError"; + Object.setPrototypeOf(this, TokenProviderError.prototype); } +} +exports.TokenProviderError = TokenProviderError; - return this.decoder.write(buf); -}; -Utf32AutoDecoder.prototype.end = function() { - if (!this.decoder) { - var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); +/***/ }), - var resStr = ''; - for (var i = 0; i < this.initialBufs.length; i++) - resStr += this.decoder.write(this.initialBufs[i]); +/***/ 41930: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var trail = this.decoder.end(); - if (trail) - resStr += trail; - this.initialBufs.length = this.initialBufsLen = 0; - return resStr; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.chain = void 0; +const ProviderError_1 = __nccwpck_require__(65470); +const chain = (...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError_1.ProviderError("No providers in chain"); } - - return this.decoder.end(); + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } + catch (err) { + lastProviderError = err; + if (err === null || err === void 0 ? void 0 : err.tryNextLink) { + continue; + } + throw err; + } + } + throw lastProviderError; }; +exports.chain = chain; -function detectEncoding(bufs, defaultEncoding) { - var b = []; - var charsProcessed = 0; - var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE. - var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE. - outer_loop: - for (var i = 0; i < bufs.length; i++) { - var buf = bufs[i]; - for (var j = 0; j < buf.length; j++) { - b.push(buf[j]); - if (b.length === 4) { - if (charsProcessed === 0) { - // Check BOM first. - if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { - return 'utf-32le'; - } - if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { - return 'utf-32be'; - } - } +/***/ }), - if (b[0] !== 0 || b[1] > 0x10) invalidBE++; - if (b[3] !== 0 || b[2] > 0x10) invalidLE++; +/***/ 50242: +/***/ ((__unused_webpack_module, exports) => { - if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; - if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; - b.length = 0; - charsProcessed++; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromStatic = void 0; +const fromStatic = (staticValue) => () => Promise.resolve(staticValue); +exports.fromStatic = fromStatic; - if (charsProcessed >= 100) { - break outer_loop; - } - } - } - } - // Make decisions. - if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be'; - if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le'; +/***/ }), - // Couldn't decide (likely all zeros or not enough data). - return defaultEncoding || 'utf-32le'; -} +/***/ 12955: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/***/ }), +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(45855); +tslib_1.__exportStar(__nccwpck_require__(53329), exports); +tslib_1.__exportStar(__nccwpck_require__(65470), exports); +tslib_1.__exportStar(__nccwpck_require__(36726), exports); +tslib_1.__exportStar(__nccwpck_require__(41930), exports); +tslib_1.__exportStar(__nccwpck_require__(50242), exports); +tslib_1.__exportStar(__nccwpck_require__(75595), exports); -/***/ 64846: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +/***/ }), -var Buffer = (__nccwpck_require__(25213).Buffer); +/***/ 75595: +/***/ ((__unused_webpack_module, exports) => { -// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 -// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 -exports.utf7 = Utf7Codec; -exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 -function Utf7Codec(codecOptions, iconv) { - this.iconv = iconv; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.memoize = void 0; +const memoize = (provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } + finally { + pending = undefined; + } + return resolved; + }; + if (isExpired === undefined) { + return async (options) => { + if (!hasResult || (options === null || options === void 0 ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || (options === null || options === void 0 ? void 0 : options.forceRefresh)) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; }; +exports.memoize = memoize; -Utf7Codec.prototype.encoder = Utf7Encoder; -Utf7Codec.prototype.decoder = Utf7Decoder; -Utf7Codec.prototype.bomAware = true; +/***/ }), -// -- Encoding +/***/ 45855: +/***/ ((module) => { -var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 Utf7Encoder(options, codec) { - this.iconv = codec.iconv; -} + __assign = Object.assign || function (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; + }; -Utf7Encoder.prototype.write = function(str) { - // Naive implementation. - // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". - return Buffer.from(str.replace(nonDirectChars, function(chunk) { - return "+" + (chunk === '+' ? '' : - this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) - + "-"; - }.bind(this))); -} + __rest = function (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; + }; -Utf7Encoder.prototype.end = function() { -} + __decorate = function (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; + }; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -// -- Decoding + __esDecorate = function (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)); }; + 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 Utf7Decoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} + __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; + }; -var base64Regex = /[A-Za-z0-9\/+]/; -var base64Chars = []; -for (var i = 0; i < 256; i++) - base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -var plusChar = '+'.charCodeAt(0), - minusChar = '-'.charCodeAt(0), - andChar = '&'.charCodeAt(0); + __setFunctionName = function (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 }); + }; -Utf7Decoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - // The decoder is more involved as we must handle chunks in stream. + __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()); + }); + }; - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '+' - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64Chars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" - res += "+"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; } + 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 }; + } + }; - if (buf[i] != minusChar) // Minus is absorbed after base64. - i--; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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]; } }; } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; - this.inBase64 = inBase64; - this.base64Accum = base64Accum; + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; - return res; -} + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -Utf7Decoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + __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)); + }; - this.inBase64 = false; - this.base64Accum = ''; - return res; -} + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + __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(n, v); }); }; } + 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]); } + }; -// UTF-7-IMAP codec. -// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) -// Differences: -// * Base64 part is started by "&" instead of "+" -// * Direct characters are 0x20-0x7E, except "&" (0x26) -// * In Base64, "," is used instead of "/" -// * Base64 must not be used to represent direct characters. -// * No implicit shift back from Base64 (should always end with '-') -// * String must end in non-shifted position. -// * "-&" while in base64 is not allowed. + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; + __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); } + }; -exports.utf7imap = Utf7IMAPCodec; -function Utf7IMAPCodec(codecOptions, iconv) { - this.iconv = iconv; -}; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; -Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; -Utf7IMAPCodec.prototype.bomAware = true; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + __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; + }; -// -- Encoding + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -function Utf7IMAPEncoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = Buffer.alloc(6); - this.base64AccumIdx = 0; -} + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -Utf7IMAPEncoder.prototype.write = function(str) { - var inBase64 = this.inBase64, - base64Accum = this.base64Accum, - base64AccumIdx = this.base64AccumIdx, - buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - for (var i = 0; i < str.length; i++) { - var uChar = str.charCodeAt(i); - if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. - if (inBase64) { - if (base64AccumIdx > 0) { - bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - base64AccumIdx = 0; - } + __classPrivateFieldIn = function (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); + }; - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - inBase64 = false; + __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; + if (async) { + if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined."); + dispose = value[Symbol.asyncDispose]; } - - if (!inBase64) { - buf[bufIdx++] = uChar; // Write direct character - - if (uChar === andChar) // Ampersand -> '&-' - buf[bufIdx++] = minusChar; + if (dispose === void 0) { + if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined."); + dispose = value[Symbol.dispose]; } + if (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - } else { // Non-direct character - if (!inBase64) { - buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. - inBase64 = true; - } - if (inBase64) { - base64Accum[base64AccumIdx++] = uChar >> 8; - base64Accum[base64AccumIdx++] = uChar & 0xFF; + 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; + }; - if (base64AccumIdx == base64Accum.length) { - bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); - base64AccumIdx = 0; + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); } } + if (env.hasError) throw env.error; } - } - - this.inBase64 = inBase64; - this.base64AccumIdx = base64AccumIdx; - - return buf.slice(0, bufIdx); -} + return next(); + }; -Utf7IMAPEncoder.prototype.end = function() { - var buf = Buffer.alloc(10), bufIdx = 0; - if (this.inBase64) { - if (this.base64AccumIdx > 0) { - bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - this.base64AccumIdx = 0; - } + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - this.inBase64 = false; - } - return buf.slice(0, bufIdx); -} +/***/ }), +/***/ 573: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// -- Decoding -function Utf7IMAPDecoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Field = void 0; +const types_1 = __nccwpck_require__(75751); +class Field { + constructor({ name, kind = types_1.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; + } + add(value) { + this.values.push(value); + } + set(values) { + this.values = values; + } + remove(value) { + this.values = this.values.filter((v) => v !== value); + } + toString() { + return this.values.map((v) => (v.includes(",") || v.includes(" ") ? `"${v}"` : v)).join(", "); + } + get() { + return this.values; + } } +exports.Field = Field; -var base64IMAPChars = base64Chars.slice(); -base64IMAPChars[','.charCodeAt(0)] = true; - -Utf7IMAPDecoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - // The decoder is more involved as we must handle chunks in stream. - // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). +/***/ }), - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '&' - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64IMAPChars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" - res += "&"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } +/***/ 87007: +/***/ ((__unused_webpack_module, exports) => { - if (buf[i] != minusChar) // Minus may be absorbed after base64. - i--; - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Fields = void 0; +class Fields { + constructor({ fields = [], encoding = "utf-8" }) { + this.entries = {}; + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; + } + setField(field) { + this.entries[field.name.toLowerCase()] = field; + } + getField(name) { + return this.entries[name.toLowerCase()]; + } + removeField(name) { + delete this.entries[name.toLowerCase()]; } + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); + } +} +exports.Fields = Fields; - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); +/***/ }), - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } +/***/ 7961: +/***/ ((__unused_webpack_module, exports) => { - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - return res; -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpHandlerRuntimeConfig = exports.getHttpHandlerExtensionConfiguration = void 0; +const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { + let httpHandler = runtimeConfig.httpHandler; + return { + setHttpHandler(handler) { + httpHandler = handler; + }, + httpHandler() { + return httpHandler; + }, + updateHttpClientConfig(key, value) { + httpHandler.updateHttpClientConfig(key, value); + }, + httpHandlerConfigs() { + return httpHandler.httpHandlerConfigs(); + }, + }; +}; +exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; +const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler(), + }; +}; +exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; -Utf7IMAPDecoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - this.inBase64 = false; - this.base64Accum = ''; - return res; -} +/***/ }), + +/***/ 37139: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(46707); +tslib_1.__exportStar(__nccwpck_require__(7961), exports); /***/ }), -/***/ 86302: +/***/ 69725: /***/ ((__unused_webpack_module, exports) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); -var BOMChar = '\uFEFF'; -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper(encoder, options) { - this.encoder = encoder; - this.addBOM = true; -} +/***/ }), -PrependBOMWrapper.prototype.write = function(str) { - if (this.addBOM) { - str = BOMChar + str; - this.addBOM = false; - } +/***/ 42234: +/***/ ((__unused_webpack_module, exports) => { - return this.encoder.write(str); -} -PrependBOMWrapper.prototype.end = function() { - return this.encoder.end(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpRequest = void 0; +class HttpRequest { + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol + ? options.protocol.slice(-1) !== ":" + ? `${options.protocol}:` + : options.protocol + : "https:"; + this.path = options.path ? (options.path.charAt(0) !== "/" ? `/${options.path}` : options.path) : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static isInstance(request) { + if (!request) + return false; + const req = request; + return ("method" in req && + "protocol" in req && + "hostname" in req && + "path" in req && + typeof req["query"] === "object" && + typeof req["headers"] === "object"); + } + clone() { + const cloned = new HttpRequest({ + ...this, + headers: { ...this.headers }, + }); + if (cloned.query) + cloned.query = cloneQuery(cloned.query); + return cloned; + } +} +exports.HttpRequest = HttpRequest; +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param, + }; + }, {}); } -//------------------------------------------------------------------------------ +/***/ }), -exports.StripBOM = StripBOMWrapper; -function StripBOMWrapper(decoder, options) { - this.decoder = decoder; - this.pass = false; - this.options = options || {}; -} +/***/ 16209: +/***/ ((__unused_webpack_module, exports) => { -StripBOMWrapper.prototype.write = function(buf) { - var res = this.decoder.write(buf); - if (this.pass || !res) - return res; - if (res[0] === BOMChar) { - res = res.slice(1); - if (typeof this.options.stripBOM === 'function') - this.options.stripBOM(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpResponse = void 0; +class HttpResponse { + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; } - - this.pass = true; - return res; } +exports.HttpResponse = HttpResponse; -StripBOMWrapper.prototype.end = function() { - return this.decoder.end(); -} + +/***/ }), + +/***/ 45311: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(46707); +tslib_1.__exportStar(__nccwpck_require__(37139), exports); +tslib_1.__exportStar(__nccwpck_require__(573), exports); +tslib_1.__exportStar(__nccwpck_require__(87007), exports); +tslib_1.__exportStar(__nccwpck_require__(69725), exports); +tslib_1.__exportStar(__nccwpck_require__(42234), exports); +tslib_1.__exportStar(__nccwpck_require__(16209), exports); +tslib_1.__exportStar(__nccwpck_require__(98136), exports); +tslib_1.__exportStar(__nccwpck_require__(17694), exports); + /***/ }), -/***/ 17281: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 98136: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isValidHostname = void 0; +function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); +} +exports.isValidHostname = isValidHostname; -var Buffer = (__nccwpck_require__(25213).Buffer); -var bomHandling = __nccwpck_require__(86302), - iconv = module.exports; +/***/ }), -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -iconv.encodings = null; +/***/ 17694: +/***/ ((__unused_webpack_module, exports) => { -// Characters emitted in case of error. -iconv.defaultCharUnicode = '�'; -iconv.defaultCharSingleByte = '?'; -// Public API. -iconv.encode = function encode(str, encoding, options) { - str = "" + (str || ""); // Ensure string. +Object.defineProperty(exports, "__esModule", ({ value: true })); - var encoder = iconv.getEncoder(encoding, options); - var res = encoder.write(str); - var trail = encoder.end(); - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; -} +/***/ }), -iconv.decode = function decode(buf, encoding, options) { - if (typeof buf === 'string') { - if (!iconv.skipDecodeWarning) { - console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); - iconv.skipDecodeWarning = true; - } +/***/ 46707: +/***/ ((module) => { - buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - var decoder = iconv.getDecoder(encoding, options); + __assign = Object.assign || function (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; + }; - var res = decoder.write(buf); - var trail = decoder.end(); + __rest = function (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; + }; - return trail ? (res + trail) : res; -} + __decorate = function (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; + }; -iconv.encodingExists = function encodingExists(enc) { - try { - iconv.getCodec(enc); - return true; - } catch (e) { - return false; - } -} - -// Legacy aliases to convert functions -iconv.toEncoding = iconv.encode; -iconv.fromEncoding = iconv.decode; - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -iconv._codecDataCache = {}; -iconv.getCodec = function getCodec(encoding) { - if (!iconv.encodings) - iconv.encodings = __nccwpck_require__(80126); // Lazy load all encoding definitions. - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = iconv._canonicalizeEncoding(encoding); - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {}; - while (true) { - var codec = iconv._codecDataCache[enc]; - if (codec) - return codec; - - var codecDef = iconv.encodings[enc]; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef; - break; + __esDecorate = function (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)); }; + 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; + }; - case "object": // Alias with options. Can be layered. - for (var key in codecDef) - codecOptions[key] = codecDef[key]; + __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; + }; - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - enc = codecDef.type; - break; + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - case "function": // Codec itself. - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; + __setFunctionName = function (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 }); + }; - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - codec = new codecDef(codecOptions, iconv); + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. - return codec; + __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()); + }); + }; - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; } - } -} - -iconv._canonicalizeEncoding = function(encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); -} + }; -iconv.getEncoder = function getEncoder(encoding, options) { - var codec = iconv.getCodec(encoding), - encoder = new codec.encoder(options, codec); + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - if (codec.bomAware && options && options.addBOM) - encoder = new bomHandling.PrependBOM(encoder, options); + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - return encoder; -} + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -iconv.getDecoder = function getDecoder(encoding, options) { - var codec = iconv.getCodec(encoding), - decoder = new codec.decoder(options, codec); + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; - if (codec.bomAware && !(options && options.stripBOM === false)) - decoder = new bomHandling.StripBOM(decoder, options); + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; - return decoder; -} + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -// Streaming API -// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add -// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. -// If you would like to enable it explicitly, please add the following code to your app: -// > iconv.enableStreamingAPI(require('stream')); -iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { - if (iconv.supportsStreams) - return; + __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)); + }; - // Dependency-inject stream module to create IconvLite stream classes. - var streams = __nccwpck_require__(90016)(stream_module); + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - // Not public API yet, but expose the stream classes. - iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; + __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(n, v); }); }; } + 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]); } + }; - // Streaming API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); - } + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - iconv.decodeStream = function decodeStream(encoding, options) { - return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); - } + __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); } + }; - iconv.supportsStreams = true; -} + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). -var stream_module; -try { - stream_module = __nccwpck_require__(12781); -} catch (e) {} + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -if (stream_module && stream_module.Transform) { - iconv.enableStreamingAPI(stream_module); + __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; + }; -} else { - // In rare cases where 'stream' module is not available by default, throw a helpful exception. - iconv.encodeStream = iconv.decodeStream = function() { - throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; -} -if (false) {} + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -/***/ }), + __classPrivateFieldIn = function (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); + }; -/***/ 90016: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -"use strict"; + 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; + }; + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -var Buffer = (__nccwpck_require__(25213).Buffer); + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); -// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), -// we opt to dependency-inject it instead of creating a hard dependency. -module.exports = function(stream_module) { - var Transform = stream_module.Transform; - // == Encoder stream ======================================================= +/***/ }), - function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); - } +/***/ 25201: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } - }); - IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.buildQueryString = void 0; +const util_uri_escape_1 = __nccwpck_require__(28768); +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = (0, util_uri_escape_1.escapeUri)(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${(0, util_uri_escape_1.escapeUri)(value[i])}`); + } } - catch (e) { - done(e); + else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${(0, util_uri_escape_1.escapeUri)(value)}`; + } + parts.push(qsEntry); } } + return parts.join("&"); +} +exports.buildQueryString = buildQueryString; - IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } - } - IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; - } +/***/ }), +/***/ 44435: +/***/ ((__unused_webpack_module, exports) => { - // == Decoder stream ======================================================= - function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseQueryString = void 0; +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } + else if (Array.isArray(query[key])) { + query[key].push(value); + } + else { + query[key] = [query[key], value]; + } + } } + return query; +} +exports.parseQueryString = parseQueryString; - IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } - }); - IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } +/***/ }), - IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } - } +/***/ 46311: +/***/ ((__unused_webpack_module, exports) => { - IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; - } - return { - IconvLiteEncoderStream: IconvLiteEncoderStream, - IconvLiteDecoderStream: IconvLiteDecoderStream, - }; -}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODEJS_TIMEOUT_ERROR_CODES = exports.TRANSIENT_ERROR_STATUS_CODES = exports.TRANSIENT_ERROR_CODES = exports.THROTTLING_ERROR_CODES = exports.CLOCK_SKEW_ERROR_CODES = void 0; +exports.CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch", +]; +exports.THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException", +]; +exports.TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; +exports.TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; +exports.NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; /***/ }), -/***/ 40407: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 48920: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0; -var entities_json_1 = __importDefault(__nccwpck_require__(59323)); -var legacy_json_1 = __importDefault(__nccwpck_require__(29591)); -var xml_json_1 = __importDefault(__nccwpck_require__(2586)); -var decode_codepoint_1 = __importDefault(__nccwpck_require__(5689)); -var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g; -exports.decodeXML = getStrictDecoder(xml_json_1.default); -exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default); -function getStrictDecoder(map) { - var replace = getReplacer(map); - return function (str) { return String(str).replace(strictEntityRe, replace); }; -} -var sorter = function (a, b) { return (a < b ? 1 : -1); }; -exports.decodeHTML = (function () { - var legacy = Object.keys(legacy_json_1.default).sort(sorter); - var keys = Object.keys(entities_json_1.default).sort(sorter); - for (var i = 0, j = 0; i < keys.length; i++) { - if (legacy[j] === keys[i]) { - keys[i] += ";?"; - j++; - } - else { - keys[i] += ";"; +exports.isServerError = exports.isTransientError = exports.isThrottlingError = exports.isClockSkewError = exports.isRetryableByTrait = void 0; +const constants_1 = __nccwpck_require__(46311); +const isRetryableByTrait = (error) => error.$retryable !== undefined; +exports.isRetryableByTrait = isRetryableByTrait; +const isClockSkewError = (error) => constants_1.CLOCK_SKEW_ERROR_CODES.includes(error.name); +exports.isClockSkewError = isClockSkewError; +const isThrottlingError = (error) => { + var _a, _b; + return ((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) === 429 || + constants_1.THROTTLING_ERROR_CODES.includes(error.name) || + ((_b = error.$retryable) === null || _b === void 0 ? void 0 : _b.throttling) == true; +}; +exports.isThrottlingError = isThrottlingError; +const isTransientError = (error) => { + var _a; + return constants_1.TRANSIENT_ERROR_CODES.includes(error.name) || + constants_1.NODEJS_TIMEOUT_ERROR_CODES.includes((error === null || error === void 0 ? void 0 : error.code) || "") || + constants_1.TRANSIENT_ERROR_STATUS_CODES.includes(((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) || 0); +}; +exports.isTransientError = isTransientError; +const isServerError = (error) => { + var _a; + if (((_a = error.$metadata) === null || _a === void 0 ? void 0 : _a.httpStatusCode) !== undefined) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !(0, exports.isTransientError)(error)) { + return true; } + return false; } - var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"); - var replace = getReplacer(entities_json_1.default); - function replacer(str) { - if (str.substr(-1) !== ";") - str += ";"; - return replace(str); - } - // TODO consider creating a merged map - return function (str) { return String(str).replace(re, replacer); }; -})(); -function getReplacer(map) { - return function replace(str) { - if (str.charAt(1) === "#") { - var secondChar = str.charAt(2); - if (secondChar === "X" || secondChar === "x") { - return decode_codepoint_1.default(parseInt(str.substr(3), 16)); - } - return decode_codepoint_1.default(parseInt(str.substr(2), 10)); - } - // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing - return map[str.slice(1, -1)] || str; - }; -} + return false; +}; +exports.isServerError = isServerError; /***/ }), -/***/ 5689: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 92737: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -var decode_json_1 = __importDefault(__nccwpck_require__(33600)); -// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119 -var fromCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -String.fromCodePoint || - function (codePoint) { - var output = ""; - if (codePoint > 0xffff) { - codePoint -= 0x10000; - output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); - codePoint = 0xdc00 | (codePoint & 0x3ff); - } - output += String.fromCharCode(codePoint); - return output; - }; -function decodeCodePoint(codePoint) { - if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { - return "\uFFFD"; - } - if (codePoint in decode_json_1.default) { - codePoint = decode_json_1.default[codePoint]; +exports.getConfigData = void 0; +const types_1 = __nccwpck_require__(75751); +const loadSharedConfigFiles_1 = __nccwpck_require__(25986); +const getConfigData = (data) => Object.entries(data) + .filter(([key]) => { + const indexOfSeparator = key.indexOf(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; } - return fromCodePoint(codePoint); -} -exports["default"] = decodeCodePoint; + return Object.values(types_1.IniSectionType).includes(key.substring(0, indexOfSeparator)); +}) + .reduce((acc, [key, value]) => { + const indexOfSeparator = key.indexOf(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === types_1.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; +}, { + ...(data.default && { default: data.default }), +}); +exports.getConfigData = getConfigData; /***/ }), -/***/ 95714: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 60895: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0; -var xml_json_1 = __importDefault(__nccwpck_require__(2586)); -var inverseXML = getInverseObj(xml_json_1.default); -var xmlReplacer = getInverseReplacer(inverseXML); -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using XML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -exports.encodeXML = getASCIIEncoder(inverseXML); -var entities_json_1 = __importDefault(__nccwpck_require__(59323)); -var inverseHTML = getInverseObj(entities_json_1.default); -var htmlReplacer = getInverseReplacer(inverseHTML); -/** - * Encodes all entities and non-ASCII characters in the input. - * - * This includes characters that are valid ASCII characters in HTML documents. - * For example `#` will be encoded as `#`. To get a more compact output, - * consider using the `encodeNonAsciiHTML` function. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -exports.encodeHTML = getInverse(inverseHTML, htmlReplacer); -/** - * Encodes all non-ASCII characters, as well as characters not valid in HTML - * documents using HTML entities. - * - * If a character has no equivalent entity, a - * numeric hexadecimal reference (eg. `ü`) will be used. - */ -exports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML); -function getInverseObj(obj) { - return Object.keys(obj) - .sort() - .reduce(function (inverse, name) { - inverse[obj[name]] = "&" + name + ";"; - return inverse; - }, {}); -} -function getInverseReplacer(inverse) { - var single = []; - var multiple = []; - for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) { - var k = _a[_i]; - if (k.length === 1) { - // Add value to single array - single.push("\\" + k); - } - else { - // Add value to multiple array - multiple.push(k); - } - } - // Add ranges to single characters. - single.sort(); - for (var start = 0; start < single.length - 1; start++) { - // Find the end of a run of characters - var end = start; - while (end < single.length - 1 && - single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) { - end += 1; - } - var count = 1 + end - start; - // We want to replace at least three characters - if (count < 3) - continue; - single.splice(start, count, single[start] + "-" + single[end]); - } - multiple.unshift("[" + single.join("") + "]"); - return new RegExp(multiple.join("|"), "g"); -} -// /[^\0-\x7F]/gu -var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g; -var getCodePoint = -// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -String.prototype.codePointAt != null - ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - function (str) { return str.codePointAt(0); } - : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae - function (c) { - return (c.charCodeAt(0) - 0xd800) * 0x400 + - c.charCodeAt(1) - - 0xdc00 + - 0x10000; - }; -function singleCharReplacer(c) { - return "&#x" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0)) - .toString(16) - .toUpperCase() + ";"; -} -function getInverse(inverse, re) { - return function (data) { - return data - .replace(re, function (name) { return inverse[name]; }) - .replace(reNonASCII, singleCharReplacer); - }; -} -var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g"); -/** - * Encodes all non-ASCII characters, as well as characters not valid in XML - * documents using numeric hexadecimal reference (eg. `ü`). - * - * Have a look at `escapeUTF8` if you want a more concise output at the expense - * of reduced transportability. - * - * @param data String to escape. - */ -function escape(data) { - return data.replace(reEscapeChars, singleCharReplacer); -} -exports.escape = escape; -/** - * Encodes all characters not valid in XML documents using numeric hexadecimal - * reference (eg. `ü`). - * - * Note that the output will be character-set dependent. - * - * @param data String to escape. - */ -function escapeUTF8(data) { - return data.replace(xmlReplacer, singleCharReplacer); -} -exports.escapeUTF8 = escapeUTF8; -function getASCIIEncoder(obj) { - return function (data) { - return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); }); - }; -} +exports.getConfigFilepath = exports.ENV_CONFIG_PATH = void 0; +const path_1 = __nccwpck_require__(71017); +const getHomeDir_1 = __nccwpck_require__(50927); +exports.ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; +const getConfigFilepath = () => process.env[exports.ENV_CONFIG_PATH] || (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "config"); +exports.getConfigFilepath = getConfigFilepath; /***/ }), -/***/ 78677: +/***/ 70056: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0; -var decode_1 = __nccwpck_require__(40407); -var encode_1 = __nccwpck_require__(95714); -/** - * Decodes a string with entities. - * - * @param data String to decode. - * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0. - * @deprecated Use `decodeXML` or `decodeHTML` directly. - */ -function decode(data, level) { - return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data); -} -exports.decode = decode; -/** - * Decodes a string with entities. Does not allow missing trailing semicolons for entities. - * - * @param data String to decode. - * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0. - * @deprecated Use `decodeHTMLStrict` or `decodeXML` directly. - */ -function decodeStrict(data, level) { - return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data); -} -exports.decodeStrict = decodeStrict; -/** - * Encodes a string with entities. - * - * @param data String to encode. - * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0. - * @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly. - */ -function encode(data, level) { - return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data); -} -exports.encode = encode; -var encode_2 = __nccwpck_require__(95714); -Object.defineProperty(exports, "encodeXML", ({ enumerable: true, get: function () { return encode_2.encodeXML; } })); -Object.defineProperty(exports, "encodeHTML", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } })); -Object.defineProperty(exports, "encodeNonAsciiHTML", ({ enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } })); -Object.defineProperty(exports, "escape", ({ enumerable: true, get: function () { return encode_2.escape; } })); -Object.defineProperty(exports, "escapeUTF8", ({ enumerable: true, get: function () { return encode_2.escapeUTF8; } })); -// Legacy aliases (deprecated) -Object.defineProperty(exports, "encodeHTML4", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } })); -Object.defineProperty(exports, "encodeHTML5", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } })); -var decode_2 = __nccwpck_require__(40407); -Object.defineProperty(exports, "decodeXML", ({ enumerable: true, get: function () { return decode_2.decodeXML; } })); -Object.defineProperty(exports, "decodeHTML", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } })); -Object.defineProperty(exports, "decodeHTMLStrict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } })); -// Legacy aliases (deprecated) -Object.defineProperty(exports, "decodeHTML4", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } })); -Object.defineProperty(exports, "decodeHTML5", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } })); -Object.defineProperty(exports, "decodeHTML4Strict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } })); -Object.defineProperty(exports, "decodeHTML5Strict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } })); -Object.defineProperty(exports, "decodeXMLStrict", ({ enumerable: true, get: function () { return decode_2.decodeXML; } })); +exports.getCredentialsFilepath = exports.ENV_CREDENTIALS_PATH = void 0; +const path_1 = __nccwpck_require__(71017); +const getHomeDir_1 = __nccwpck_require__(50927); +exports.ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; +const getCredentialsFilepath = () => process.env[exports.ENV_CREDENTIALS_PATH] || (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "credentials"); +exports.getCredentialsFilepath = getCredentialsFilepath; /***/ }), -/***/ 5822: -/***/ ((module) => { +/***/ 50927: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHomeDir = void 0; +const os_1 = __nccwpck_require__(22037); +const path_1 = __nccwpck_require__(71017); +const homeDirCache = {}; +const getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; + } + return "DEFAULT"; +}; +const getHomeDir = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; +}; +exports.getHomeDir = getHomeDir; -/** - * @typedef {{ [key: string]: any }} Extensions - * @typedef {Error} Err - * @property {string} message - */ -/** - * - * @param {Error} obj - * @param {Extensions} props - * @returns {Error & Extensions} - */ -function assign(obj, props) { - for (const key in props) { - Object.defineProperty(obj, key, { - value: props[key], - enumerable: true, - configurable: true, - }); - } +/***/ }), - return obj; -} +/***/ 18589: +/***/ ((__unused_webpack_module, exports) => { -/** - * - * @param {any} err - An Error - * @param {string|Extensions} code - A string code or props to set on the error - * @param {Extensions} [props] - Props to set on the error - * @returns {Error & Extensions} - */ -function createError(err, code, props) { - if (!err || typeof err === 'string') { - throw new TypeError('Please pass an Error to err-code'); - } - if (!props) { - props = {}; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getProfileName = exports.DEFAULT_PROFILE = exports.ENV_PROFILE = void 0; +exports.ENV_PROFILE = "AWS_PROFILE"; +exports.DEFAULT_PROFILE = "default"; +const getProfileName = (init) => init.profile || process.env[exports.ENV_PROFILE] || exports.DEFAULT_PROFILE; +exports.getProfileName = getProfileName; - if (typeof code === 'object') { - props = code; - code = ''; - } - if (code) { - props.code = code; - } +/***/ }), - try { - return assign(err, props); - } catch (_) { - props.message = err.message; - props.stack = err.stack; +/***/ 83694: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const ErrClass = function () {}; - ErrClass.prototype = Object.create(Object.getPrototypeOf(err)); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSSOTokenFilepath = void 0; +const crypto_1 = __nccwpck_require__(6113); +const path_1 = __nccwpck_require__(71017); +const getHomeDir_1 = __nccwpck_require__(50927); +const getSSOTokenFilepath = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); +}; +exports.getSSOTokenFilepath = getSSOTokenFilepath; - // @ts-ignore - const output = assign(new ErrClass(), props); - return output; - } -} +/***/ }), -module.exports = createError; +/***/ 26233: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/***/ }), +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSSOTokenFromFile = void 0; +const fs_1 = __nccwpck_require__(57147); +const getSSOTokenFilepath_1 = __nccwpck_require__(83694); +const { readFile } = fs_1.promises; +const getSSOTokenFromFile = async (id) => { + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await readFile(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); +}; +exports.getSSOTokenFromFile = getSSOTokenFromFile; -/***/ 69685: -/***/ ((module, exports) => { -"use strict"; -/** - * @author Toru Nagashima - * @copyright 2015 Toru Nagashima. All rights reserved. - * See LICENSE file in root directory for full license. - */ +/***/ }), + +/***/ 83474: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSsoSessionData = void 0; +const types_1 = __nccwpck_require__(75751); +const loadSharedConfigFiles_1 = __nccwpck_require__(25986); +const getSsoSessionData = (data) => Object.entries(data) + .filter(([key]) => key.startsWith(types_1.IniSectionType.SSO_SESSION + loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR)) + .reduce((acc, [key, value]) => ({ ...acc, [key.split(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR)[1]]: value }), {}); +exports.getSsoSessionData = getSsoSessionData; -/** - * @typedef {object} PrivateData - * @property {EventTarget} eventTarget The event target. - * @property {{type:string}} event The original event object. - * @property {number} eventPhase The current event phase. - * @property {EventTarget|null} currentTarget The current event target. - * @property {boolean} canceled The flag to prevent default. - * @property {boolean} stopped The flag to stop propagation. - * @property {boolean} immediateStopped The flag to stop propagation immediately. - * @property {Function|null} passiveListener The listener if the current listener is passive. Otherwise this is null. - * @property {number} timeStamp The unix time. - * @private - */ -/** - * Private data for event wrappers. - * @type {WeakMap} - * @private - */ -const privateData = new WeakMap(); +/***/ }), -/** - * Cache for wrapper classes. - * @type {WeakMap} - * @private - */ -const wrappers = new WeakMap(); +/***/ 67097: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Get private data. - * @param {Event} event The event object to get private data. - * @returns {PrivateData} The private data of the event. - * @private - */ -function pd(event) { - const retv = privateData.get(event); - console.assert( - retv != null, - "'this' is expected an Event object, but got", - event - ); - return retv -} -/** - * https://dom.spec.whatwg.org/#set-the-canceled-flag - * @param data {PrivateData} private data. - */ -function setCancelFlag(data) { - if (data.passiveListener != null) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error( - "Unable to preventDefault inside passive event listener invocation.", - data.passiveListener - ); - } - return - } - if (!data.event.cancelable) { - return - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(50010); +tslib_1.__exportStar(__nccwpck_require__(50927), exports); +tslib_1.__exportStar(__nccwpck_require__(18589), exports); +tslib_1.__exportStar(__nccwpck_require__(83694), exports); +tslib_1.__exportStar(__nccwpck_require__(26233), exports); +tslib_1.__exportStar(__nccwpck_require__(25986), exports); +tslib_1.__exportStar(__nccwpck_require__(87383), exports); +tslib_1.__exportStar(__nccwpck_require__(1014), exports); +tslib_1.__exportStar(__nccwpck_require__(32799), exports); - data.canceled = true; - if (typeof data.event.preventDefault === "function") { - data.event.preventDefault(); - } -} -/** - * @see https://dom.spec.whatwg.org/#interface-event - * @private - */ -/** - * The event wrapper. - * @constructor - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Event|{type:string}} event The original event to wrap. - */ -function Event(eventTarget, event) { - privateData.set(this, { - eventTarget, - event, - eventPhase: 2, - currentTarget: eventTarget, - canceled: false, - stopped: false, - immediateStopped: false, - passiveListener: null, - timeStamp: event.timeStamp || Date.now(), - }); - - // https://heycam.github.io/webidl/#Unforgeable - Object.defineProperty(this, "isTrusted", { value: false, enumerable: true }); - - // Define accessors - const keys = Object.keys(event); - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in this)) { - Object.defineProperty(this, key, defineRedirectDescriptor(key)); - } - } -} +/***/ }), -// Should be enumerable, but class methods are not enumerable. -Event.prototype = { - /** - * The type of this event. - * @type {string} - */ - get type() { - return pd(this).event.type - }, +/***/ 25986: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * The target of this event. - * @type {EventTarget} - */ - get target() { - return pd(this).eventTarget - }, - /** - * The target of this event. - * @type {EventTarget} - */ - get currentTarget() { - return pd(this).currentTarget - }, +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.loadSharedConfigFiles = exports.CONFIG_PREFIX_SEPARATOR = void 0; +const getConfigData_1 = __nccwpck_require__(92737); +const getConfigFilepath_1 = __nccwpck_require__(60895); +const getCredentialsFilepath_1 = __nccwpck_require__(70056); +const parseIni_1 = __nccwpck_require__(1748); +const slurpFile_1 = __nccwpck_require__(80089); +const swallowError = () => ({}); +exports.CONFIG_PREFIX_SEPARATOR = "."; +const loadSharedConfigFiles = async (init = {}) => { + const { filepath = (0, getCredentialsFilepath_1.getCredentialsFilepath)(), configFilepath = (0, getConfigFilepath_1.getConfigFilepath)() } = init; + const parsedFiles = await Promise.all([ + (0, slurpFile_1.slurpFile)(configFilepath, { + ignoreCache: init.ignoreCache, + }) + .then(parseIni_1.parseIni) + .then(getConfigData_1.getConfigData) + .catch(swallowError), + (0, slurpFile_1.slurpFile)(filepath, { + ignoreCache: init.ignoreCache, + }) + .then(parseIni_1.parseIni) + .catch(swallowError), + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1], + }; +}; +exports.loadSharedConfigFiles = loadSharedConfigFiles; - /** - * @returns {EventTarget[]} The composed path of this event. - */ - composedPath() { - const currentTarget = pd(this).currentTarget; - if (currentTarget == null) { - return [] - } - return [currentTarget] - }, - /** - * Constant of NONE. - * @type {number} - */ - get NONE() { - return 0 - }, +/***/ }), - /** - * Constant of CAPTURING_PHASE. - * @type {number} - */ - get CAPTURING_PHASE() { - return 1 - }, +/***/ 87383: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * Constant of AT_TARGET. - * @type {number} - */ - get AT_TARGET() { - return 2 - }, - /** - * Constant of BUBBLING_PHASE. - * @type {number} - */ - get BUBBLING_PHASE() { - return 3 - }, +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.loadSsoSessionData = void 0; +const getConfigFilepath_1 = __nccwpck_require__(60895); +const getSsoSessionData_1 = __nccwpck_require__(83474); +const parseIni_1 = __nccwpck_require__(1748); +const slurpFile_1 = __nccwpck_require__(80089); +const swallowError = () => ({}); +const loadSsoSessionData = async (init = {}) => { + var _a; + return (0, slurpFile_1.slurpFile)((_a = init.configFilepath) !== null && _a !== void 0 ? _a : (0, getConfigFilepath_1.getConfigFilepath)()) + .then(parseIni_1.parseIni) + .then(getSsoSessionData_1.getSsoSessionData) + .catch(swallowError); +}; +exports.loadSsoSessionData = loadSsoSessionData; - /** - * The target of this event. - * @type {number} - */ - get eventPhase() { - return pd(this).eventPhase - }, - /** - * Stop event bubbling. - * @returns {void} - */ - stopPropagation() { - const data = pd(this); +/***/ }), - data.stopped = true; - if (typeof data.event.stopPropagation === "function") { - data.event.stopPropagation(); - } - }, +/***/ 59731: +/***/ ((__unused_webpack_module, exports) => { - /** - * Stop event bubbling. - * @returns {void} - */ - stopImmediatePropagation() { - const data = pd(this); - data.stopped = true; - data.immediateStopped = true; - if (typeof data.event.stopImmediatePropagation === "function") { - data.event.stopImmediatePropagation(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.mergeConfigFiles = void 0; +const mergeConfigFiles = (...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== undefined) { + Object.assign(merged[key], values); + } + else { + merged[key] = values; + } } - }, - - /** - * The flag to be bubbling. - * @type {boolean} - */ - get bubbles() { - return Boolean(pd(this).event.bubbles) - }, + } + return merged; +}; +exports.mergeConfigFiles = mergeConfigFiles; - /** - * The flag to be cancelable. - * @type {boolean} - */ - get cancelable() { - return Boolean(pd(this).event.cancelable) - }, - /** - * Cancel this event. - * @returns {void} - */ - preventDefault() { - setCancelFlag(pd(this)); - }, +/***/ }), - /** - * The flag to indicate cancellation state. - * @type {boolean} - */ - get defaultPrevented() { - return pd(this).canceled - }, +/***/ 1748: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * The flag to be composed. - * @type {boolean} - */ - get composed() { - return Boolean(pd(this).event.composed) - }, - /** - * The unix time of this event. - * @type {number} - */ - get timeStamp() { - return pd(this).timeStamp - }, +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseIni = void 0; +const types_1 = __nccwpck_require__(75751); +const loadSharedConfigFiles_1 = __nccwpck_require__(25986); +const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; +const profileNameBlockList = ["__proto__", "profile __proto__"]; +const parseIni = (iniData) => { + const map = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = undefined; + currentSubSection = undefined; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(types_1.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR); + } + } + else { + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); + } + } + else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim(), + ]; + if (value === "") { + currentSubSection = name; + } + else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = undefined; + } + map[currentSection] = map[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(loadSharedConfigFiles_1.CONFIG_PREFIX_SEPARATOR) : name; + map[currentSection][key] = value; + } + } + } + } + return map; +}; +exports.parseIni = parseIni; - /** - * The target of this event. - * @type {EventTarget} - * @deprecated - */ - get srcElement() { - return pd(this).eventTarget - }, - /** - * The flag to stop event bubbling. - * @type {boolean} - * @deprecated - */ - get cancelBubble() { - return pd(this).stopped - }, - set cancelBubble(value) { - if (!value) { - return - } - const data = pd(this); +/***/ }), - data.stopped = true; - if (typeof data.event.cancelBubble === "boolean") { - data.event.cancelBubble = true; - } - }, +/***/ 1014: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * The flag to indicate cancellation state. - * @type {boolean} - * @deprecated - */ - get returnValue() { - return !pd(this).canceled - }, - set returnValue(value) { - if (!value) { - setCancelFlag(pd(this)); - } - }, - /** - * Initialize this event object. But do nothing under event dispatching. - * @param {string} type The event type. - * @param {boolean} [bubbles=false] The flag to be possible to bubble up. - * @param {boolean} [cancelable=false] The flag to be possible to cancel. - * @deprecated - */ - initEvent() { - // Do nothing. - }, +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseKnownFiles = void 0; +const loadSharedConfigFiles_1 = __nccwpck_require__(25986); +const mergeConfigFiles_1 = __nccwpck_require__(59731); +const parseKnownFiles = async (init) => { + const parsedFiles = await (0, loadSharedConfigFiles_1.loadSharedConfigFiles)(init); + return (0, mergeConfigFiles_1.mergeConfigFiles)(parsedFiles.configFile, parsedFiles.credentialsFile); }; +exports.parseKnownFiles = parseKnownFiles; -// `constructor` is not enumerable. -Object.defineProperty(Event.prototype, "constructor", { - value: Event, - configurable: true, - writable: true, -}); -// Ensure `event instanceof window.Event` is `true`. -if (typeof window !== "undefined" && typeof window.Event !== "undefined") { - Object.setPrototypeOf(Event.prototype, window.Event.prototype); +/***/ }), - // Make association for wrappers. - wrappers.set(window.Event.prototype, Event); -} +/***/ 80089: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * Get the property descriptor to redirect a given property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to redirect the property. - * @private - */ -function defineRedirectDescriptor(key) { - return { - get() { - return pd(this).event[key] - }, - set(value) { - pd(this).event[key] = value; - }, - configurable: true, - enumerable: true, - } -} -/** - * Get the property descriptor to call a given method property. - * @param {string} key Property name to define property descriptor. - * @returns {PropertyDescriptor} The property descriptor to call the method property. - * @private - */ -function defineCallDescriptor(key) { - return { - value() { - const event = pd(this).event; - return event[key].apply(event, arguments) - }, - configurable: true, - enumerable: true, +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.slurpFile = void 0; +const fs_1 = __nccwpck_require__(57147); +const { readFile } = fs_1.promises; +const filePromisesHash = {}; +const slurpFile = (path, options) => { + if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) { + filePromisesHash[path] = readFile(path, "utf8"); } -} + return filePromisesHash[path]; +}; +exports.slurpFile = slurpFile; -/** - * Define new wrapper class. - * @param {Function} BaseEvent The base wrapper class. - * @param {Object} proto The prototype of the original event. - * @returns {Function} The defined wrapper class. - * @private - */ -function defineWrapper(BaseEvent, proto) { - const keys = Object.keys(proto); - if (keys.length === 0) { - return BaseEvent - } - /** CustomEvent */ - function CustomEvent(eventTarget, event) { - BaseEvent.call(this, eventTarget, event); - } +/***/ }), - CustomEvent.prototype = Object.create(BaseEvent.prototype, { - constructor: { value: CustomEvent, configurable: true, writable: true }, - }); +/***/ 32799: +/***/ ((__unused_webpack_module, exports) => { - // Define accessors. - for (let i = 0; i < keys.length; ++i) { - const key = keys[i]; - if (!(key in BaseEvent.prototype)) { - const descriptor = Object.getOwnPropertyDescriptor(proto, key); - const isFunc = typeof descriptor.value === "function"; - Object.defineProperty( - CustomEvent.prototype, - key, - isFunc - ? defineCallDescriptor(key) - : defineRedirectDescriptor(key) - ); - } - } - return CustomEvent -} +Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * Get the wrapper class of a given prototype. - * @param {Object} proto The prototype of the original event to get its wrapper. - * @returns {Function} The wrapper class. - * @private - */ -function getWrapper(proto) { - if (proto == null || proto === Object.prototype) { - return Event - } - let wrapper = wrappers.get(proto); - if (wrapper == null) { - wrapper = defineWrapper(getWrapper(Object.getPrototypeOf(proto)), proto); - wrappers.set(proto, wrapper); - } - return wrapper -} +/***/ }), -/** - * Wrap a given event to management a dispatching. - * @param {EventTarget} eventTarget The event target of this dispatching. - * @param {Object} event The event to wrap. - * @returns {Event} The wrapper instance. - * @private - */ -function wrapEvent(eventTarget, event) { - const Wrapper = getWrapper(Object.getPrototypeOf(event)); - return new Wrapper(eventTarget, event) -} +/***/ 50010: +/***/ ((module) => { -/** - * Get the immediateStopped flag of a given event. - * @param {Event} event The event to get. - * @returns {boolean} The flag to stop propagation immediately. - * @private - */ -function isStopped(event) { - return pd(event).immediateStopped -} - -/** - * Set the current event phase of a given event. - * @param {Event} event The event to set current target. - * @param {number} eventPhase New event phase. - * @returns {void} - * @private - */ -function setEventPhase(event, eventPhase) { - pd(event).eventPhase = eventPhase; -} - -/** - * Set the current target of a given event. - * @param {Event} event The event to set current target. - * @param {EventTarget|null} currentTarget New current target. - * @returns {void} - * @private - */ -function setCurrentTarget(event, currentTarget) { - pd(event).currentTarget = currentTarget; -} - -/** - * Set a passive listener of a given event. - * @param {Event} event The event to set current target. - * @param {Function|null} passiveListener New passive listener. - * @returns {void} - * @private - */ -function setPassiveListener(event, passiveListener) { - pd(event).passiveListener = passiveListener; -} - -/** - * @typedef {object} ListenerNode - * @property {Function} listener - * @property {1|2|3} listenerType - * @property {boolean} passive - * @property {boolean} once - * @property {ListenerNode|null} next - * @private - */ - -/** - * @type {WeakMap>} - * @private - */ -const listenersMap = new WeakMap(); - -// Listener types -const CAPTURE = 1; -const BUBBLE = 2; -const ATTRIBUTE = 3; - -/** - * Check whether a given value is an object or not. - * @param {any} x The value to check. - * @returns {boolean} `true` if the value is an object. - */ -function isObject(x) { - return x !== null && typeof x === "object" //eslint-disable-line no-restricted-syntax -} - -/** - * Get listeners. - * @param {EventTarget} eventTarget The event target to get. - * @returns {Map} The listeners. - * @private - */ -function getListeners(eventTarget) { - const listeners = listenersMap.get(eventTarget); - if (listeners == null) { - throw new TypeError( - "'this' is expected an EventTarget object, but got another value." - ) +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } - return listeners -} - -/** - * Get the property descriptor for the event attribute of a given event. - * @param {string} eventName The event name to get property descriptor. - * @returns {PropertyDescriptor} The property descriptor. - * @private - */ -function defineEventAttributeDescriptor(eventName) { - return { - get() { - const listeners = getListeners(this); - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - return node.listener - } - node = node.next; - } - return null - }, - - set(listener) { - if (typeof listener !== "function" && !isObject(listener)) { - listener = null; // eslint-disable-line no-param-reassign - } - const listeners = getListeners(this); - - // Traverse to the tail while removing old value. - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if (node.listenerType === ATTRIBUTE) { - // Remove old value. - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - } else { - prev = node; - } - - node = node.next; + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); } - - // Add new value. - if (listener !== null) { - const newNode = { - listener, - listenerType: ATTRIBUTE, - passive: false, - once: false, - next: null, - }; - if (prev === null) { - listeners.set(eventName, newNode); - } else { - prev.next = newNode; - } + else { + exports.__esModule = true; } - }, - configurable: true, - enumerable: true, + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } -} - -/** - * Define an event attribute (e.g. `eventTarget.onclick`). - * @param {Object} eventTargetPrototype The event target prototype to define an event attrbite. - * @param {string} eventName The event name to define. - * @returns {void} - */ -function defineEventAttribute(eventTargetPrototype, eventName) { - Object.defineProperty( - eventTargetPrototype, - `on${eventName}`, - defineEventAttributeDescriptor(eventName) - ); -} +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -/** - * Define a custom EventTarget with event attributes. - * @param {string[]} eventNames Event names for event attributes. - * @returns {EventTarget} The custom EventTarget. - * @private - */ -function defineCustomEventTarget(eventNames) { - /** CustomEventTarget */ - function CustomEventTarget() { - EventTarget.call(this); - } + __assign = Object.assign || function (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; + }; - CustomEventTarget.prototype = Object.create(EventTarget.prototype, { - constructor: { - value: CustomEventTarget, - configurable: true, - writable: true, - }, - }); + __rest = function (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; + }; - for (let i = 0; i < eventNames.length; ++i) { - defineEventAttribute(CustomEventTarget.prototype, eventNames[i]); - } + __decorate = function (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; + }; - return CustomEventTarget -} + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -/** - * EventTarget. - * - * - This is constructor if no arguments. - * - This is a function which returns a CustomEventTarget constructor if there are arguments. - * - * For example: - * - * class A extends EventTarget {} - * class B extends EventTarget("message") {} - * class C extends EventTarget("message", "error") {} - * class D extends EventTarget(["message", "error"]) {} - */ -function EventTarget() { - /*eslint-disable consistent-return */ - if (this instanceof EventTarget) { - listenersMap.set(this, new Map()); - return - } - if (arguments.length === 1 && Array.isArray(arguments[0])) { - return defineCustomEventTarget(arguments[0]) - } - if (arguments.length > 0) { - const types = new Array(arguments.length); - for (let i = 0; i < arguments.length; ++i) { - types[i] = arguments[i]; + __esDecorate = function (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)); }; + 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] = _; + } } - return defineCustomEventTarget(types) - } - throw new TypeError("Cannot call a class as a function") - /*eslint-enable consistent-return */ -} + if (target) Object.defineProperty(target, contextIn.name, descriptor); + done = true; + }; -// Should be enumerable, but class methods are not enumerable. -EventTarget.prototype = { - /** - * Add a given listener to this event target. - * @param {string} eventName The event name to add. - * @param {Function} listener The listener to add. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - addEventListener(eventName, listener, options) { - if (listener == null) { - return + __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); } - if (typeof listener !== "function" && !isObject(listener)) { - throw new TypeError("'listener' should be a function or an object.") - } - - const listeners = getListeners(this); - const optionsIsObj = isObject(options); - const capture = optionsIsObj - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; - const newNode = { - listener, - listenerType, - passive: optionsIsObj && Boolean(options.passive), - once: optionsIsObj && Boolean(options.once), - next: null, - }; + return useValue ? value : void 0; + }; - // Set it as the first node if the first node is null. - let node = listeners.get(eventName); - if (node === undefined) { - listeners.set(eventName, newNode); - return - } + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - // Traverse to the tail while checking duplication.. - let prev = null; - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - // Should ignore duplication. - return - } - prev = node; - node = node.next; - } + __setFunctionName = function (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 }); + }; - // Add it. - prev.next = newNode; - }, + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - /** - * Remove a given listener from this event target. - * @param {string} eventName The event name to remove. - * @param {Function} listener The listener to remove. - * @param {boolean|{capture?:boolean,passive?:boolean,once?:boolean}} [options] The options for this listener. - * @returns {void} - */ - removeEventListener(eventName, listener, options) { - if (listener == null) { - return - } + __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()); + }); + }; - const listeners = getListeners(this); - const capture = isObject(options) - ? Boolean(options.capture) - : Boolean(options); - const listenerType = capture ? CAPTURE : BUBBLE; - - let prev = null; - let node = listeners.get(eventName); - while (node != null) { - if ( - node.listener === listener && - node.listenerType === listenerType - ) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; } - return - } - - prev = node; - node = node.next; + 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 }; } - }, + }; - /** - * Dispatch a given event. - * @param {Event|{type:string}} event The event to dispatch. - * @returns {boolean} `false` if canceled. - */ - dispatchEvent(event) { - if (event == null || typeof event.type !== "string") { - throw new TypeError('"event.type" should be a string.') - } - - // If listeners aren't registered, terminate. - const listeners = getListeners(this); - const eventName = event.type; - let node = listeners.get(eventName); - if (node == null) { - return true - } - - // Since we cannot rewrite several properties, so wrap object. - const wrappedEvent = wrapEvent(this, event); - - // This doesn't process capturing phase and bubbling phase. - // This isn't participating in a tree. - let prev = null; - while (node != null) { - // Remove this listener if it's once - if (node.once) { - if (prev !== null) { - prev.next = node.next; - } else if (node.next !== null) { - listeners.set(eventName, node.next); - } else { - listeners.delete(eventName); - } - } else { - prev = node; - } + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - // Call this listener - setPassiveListener( - wrappedEvent, - node.passive ? node.listener : null - ); - if (typeof node.listener === "function") { - try { - node.listener.call(this, wrappedEvent); - } catch (err) { - if ( - typeof console !== "undefined" && - typeof console.error === "function" - ) { - console.error(err); - } - } - } else if ( - node.listenerType !== ATTRIBUTE && - typeof node.listener.handleEvent === "function" - ) { - node.listener.handleEvent(wrappedEvent); - } + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - // Break if `event.stopImmediatePropagation` was called. - if (isStopped(wrappedEvent)) { - break + __values = function (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 }; } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - node = node.next; + __read = function (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); } - setPassiveListener(wrappedEvent, null); - setEventPhase(wrappedEvent, 0); - setCurrentTarget(wrappedEvent, null); - - return !wrappedEvent.defaultPrevented - }, -}; - -// `constructor` is not enumerable. -Object.defineProperty(EventTarget.prototype, "constructor", { - value: EventTarget, - configurable: true, - writable: true, -}); + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -// Ensure `eventTarget instanceof window.EventTarget` is `true`. -if ( - typeof window !== "undefined" && - typeof window.EventTarget !== "undefined" -) { - Object.setPrototypeOf(EventTarget.prototype, window.EventTarget.prototype); -} + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; -exports.defineEventAttribute = defineEventAttribute; -exports.EventTarget = EventTarget; -exports["default"] = EventTarget; + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -module.exports = EventTarget -module.exports.EventTarget = module.exports["default"] = EventTarget -module.exports.defineEventAttribute = defineEventAttribute -//# sourceMappingURL=event-target-shim.js.map + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -/***/ }), + __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(n, v); }); }; } + 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]); } + }; -/***/ 61166: -/***/ ((module) => { + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -module.exports = class FixedFIFO { - constructor (hwm) { - if (!(hwm > 0) || ((hwm - 1) & hwm) !== 0) throw new Error('Max size for a FixedFIFO should be a power of two') - this.buffer = new Array(hwm) - this.mask = hwm - 1 - this.top = 0 - this.btm = 0 - this.next = null - } + __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); } + }; - push (data) { - if (this.buffer[this.top] !== undefined) return false - this.buffer[this.top] = data - this.top = (this.top + 1) & this.mask - return true - } + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - shift () { - const last = this.buffer[this.btm] - if (last === undefined) return undefined - this.buffer[this.btm] = undefined - this.btm = (this.btm + 1) & this.mask - return last - } + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - isEmpty () { - return this.buffer[this.btm] === undefined - } -} + __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; + }; + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -/***/ }), + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -/***/ 20375: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -const FixedFIFO = __nccwpck_require__(61166) + __classPrivateFieldIn = function (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); + }; -module.exports = class FastFIFO { - constructor (hwm) { - this.hwm = hwm || 16 - this.head = new FixedFIFO(this.hwm) - this.tail = this.head - } + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - push (val) { - if (!this.head.push(val)) { - const prev = this.head - this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length) - this.head.push(val) - } - } + 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; + }; - shift () { - const val = this.tail.shift() - if (val === undefined && this.tail.next) { - const next = this.tail.next - this.tail.next = null - this.tail = next - return this.tail.shift() - } - return val - } + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; - isEmpty () { - return this.head.isEmpty() - } -} + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 6985: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -//parse Empty Node as self closing node -const buildOptions = (__nccwpck_require__(73430).buildOptions); - -const defaultOptions = { - attributeNamePrefix: '@_', - attrNodeName: false, - textNodeName: '#text', - ignoreAttributes: true, - cdataTagName: false, - cdataPositionChar: '\\c', - format: false, - indentBy: ' ', - supressEmptyNode: false, - tagValueProcessor: function(a) { - return a; - }, - attrValueProcessor: function(a) { - return a; - }, -}; - -const props = [ - 'attributeNamePrefix', - 'attrNodeName', - 'textNodeName', - 'ignoreAttributes', - 'cdataTagName', - 'cdataPositionChar', - 'format', - 'indentBy', - 'supressEmptyNode', - 'tagValueProcessor', - 'attrValueProcessor', -]; - -function Parser(options) { - this.options = buildOptions(options, defaultOptions, props); - if (this.options.ignoreAttributes || this.options.attrNodeName) { - this.isAttribute = function(/*a*/) { - return false; - }; - } else { - this.attrPrefixLen = this.options.attributeNamePrefix.length; - this.isAttribute = isAttribute; - } - if (this.options.cdataTagName) { - this.isCDATA = isCDATA; - } else { - this.isCDATA = function(/*a*/) { - return false; - }; - } - this.replaceCDATAstr = replaceCDATAstr; - this.replaceCDATAarr = replaceCDATAarr; - - if (this.options.format) { - this.indentate = indentate; - this.tagEndChar = '>\n'; - this.newLine = '\n'; - } else { - this.indentate = function() { - return ''; - }; - this.tagEndChar = '>'; - this.newLine = ''; - } - - if (this.options.supressEmptyNode) { - this.buildTextNode = buildEmptyTextNode; - this.buildObjNode = buildEmptyObjNode; - } else { - this.buildTextNode = buildTextValNode; - this.buildObjNode = buildObjectNode; - } - - this.buildTextValNode = buildTextValNode; - this.buildObjectNode = buildObjectNode; -} +/***/ 94905: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -Parser.prototype.parse = function(jObj) { - return this.j2x(jObj, 0).val; -}; -Parser.prototype.j2x = function(jObj, level) { - let attrStr = ''; - let val = ''; - const keys = Object.keys(jObj); - const len = keys.length; - for (let i = 0; i < len; i++) { - const key = keys[i]; - if (typeof jObj[key] === 'undefined') { - // supress undefined node - } else if (jObj[key] === null) { - val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (jObj[key] instanceof Date) { - val += this.buildTextNode(jObj[key], key, '', level); - } else if (typeof jObj[key] !== 'object') { - //premitive type - const attr = this.isAttribute(key); - if (attr) { - attrStr += ' ' + attr + '="' + this.options.attrValueProcessor('' + jObj[key]) + '"'; - } else if (this.isCDATA(key)) { - if (jObj[this.options.textNodeName]) { - val += this.replaceCDATAstr(jObj[this.options.textNodeName], jObj[key]); - } else { - val += this.replaceCDATAstr('', jObj[key]); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SignatureV4 = void 0; +const eventstream_codec_1 = __nccwpck_require__(58152); +const util_hex_encoding_1 = __nccwpck_require__(61027); +const util_middleware_1 = __nccwpck_require__(81243); +const util_utf8_1 = __nccwpck_require__(38134); +const constants_1 = __nccwpck_require__(92245); +const credentialDerivation_1 = __nccwpck_require__(26266); +const getCanonicalHeaders_1 = __nccwpck_require__(42188); +const getCanonicalQuery_1 = __nccwpck_require__(94300); +const getPayloadHash_1 = __nccwpck_require__(50179); +const headerUtil_1 = __nccwpck_require__(57211); +const moveHeadersToQuery_1 = __nccwpck_require__(72266); +const prepareRequest_1 = __nccwpck_require__(44656); +const utilDate_1 = __nccwpck_require__(81001); +class SignatureV4 { + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) { + this.headerMarshaller = new eventstream_codec_1.HeaderMarshaller(util_utf8_1.toUtf8, util_utf8_1.fromUtf8); + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = (0, util_middleware_1.normalizeProvider)(region); + this.credentialProvider = (0, util_middleware_1.normalizeProvider)(credentials); + } + async presign(originalRequest, options = {}) { + const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, signingRegion, signingService, } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider()); + const { longDate, shortDate } = formatDate(signingDate); + if (expiresIn > constants_1.MAX_PRESIGNED_TTL) { + return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future"); } - } else { - //tag value - if (key === this.options.textNodeName) { - if (jObj[this.options.cdataTagName]) { - //value will added while processing cdata - } else { - val += this.options.tagValueProcessor('' + jObj[key]); - } - } else { - val += this.buildTextNode(jObj[key], key, '', level); + const scope = (0, credentialDerivation_1.createScope)(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service); + const request = (0, moveHeadersToQuery_1.moveHeadersToQuery)((0, prepareRequest_1.prepareRequest)(originalRequest), { unhoistableHeaders }); + if (credentials.sessionToken) { + request.query[constants_1.TOKEN_QUERY_PARAM] = credentials.sessionToken; } - } - } else if (Array.isArray(jObj[key])) { - //repeated nodes - if (this.isCDATA(key)) { - val += this.indentate(level); - if (jObj[this.options.textNodeName]) { - val += this.replaceCDATAarr(jObj[this.options.textNodeName], jObj[key]); - } else { - val += this.replaceCDATAarr('', jObj[key]); + request.query[constants_1.ALGORITHM_QUERY_PARAM] = constants_1.ALGORITHM_IDENTIFIER; + request.query[constants_1.CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[constants_1.AMZ_DATE_QUERY_PARAM] = longDate; + request.query[constants_1.EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = (0, getCanonicalHeaders_1.getCanonicalHeaders)(request, unsignableHeaders, signableHeaders); + request.query[constants_1.SIGNED_HEADERS_QUERY_PARAM] = getCanonicalHeaderList(canonicalHeaders); + request.query[constants_1.SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await (0, getPayloadHash_1.getPayloadHash)(originalRequest, this.sha256))); + return request; + } + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); } - } else { - //nested nodes - const arrLen = jObj[key].length; - for (let j = 0; j < arrLen; j++) { - const item = jObj[key][j]; - if (typeof item === 'undefined') { - // supress undefined node - } else if (item === null) { - val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; - } else if (typeof item === 'object') { - const result = this.j2x(item, level + 1); - val += this.buildObjNode(result.val, key, result.attrStr, level); - } else { - val += this.buildTextNode(item, key, '', level); - } + else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); } - } - } else { - //nested node - if (this.options.attrNodeName && key === this.options.attrNodeName) { - const Ks = Object.keys(jObj[key]); - const L = Ks.length; - for (let j = 0; j < L; j++) { - attrStr += ' ' + Ks[j] + '="' + this.options.attrValueProcessor('' + jObj[key][Ks[j]]) + '"'; + else if (toSign.message) { + return this.signMessage(toSign, options); + } + else { + return this.signRequest(toSign, options); } - } else { - const result = this.j2x(jObj[key], level + 1); - val += this.buildObjNode(result.val, key, result.attrStr, level); - } } - } - return {attrStr: attrStr, val: val}; -}; - -function replaceCDATAstr(str, cdata) { - str = this.options.tagValueProcessor('' + str); - if (this.options.cdataPositionChar === '' || str === '') { - return str + ' { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider()); + const { shortDate } = formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update((0, util_utf8_1.toUint8Array)(stringToSign)); + return (0, util_hex_encoding_1.toHex)(await hash.digest()); + } + async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion !== null && signingRegion !== void 0 ? signingRegion : (await this.regionProvider()); + const request = (0, prepareRequest_1.prepareRequest)(requestToSign); + const { longDate, shortDate } = formatDate(signingDate); + const scope = (0, credentialDerivation_1.createScope)(shortDate, region, signingService !== null && signingService !== void 0 ? signingService : this.service); + request.headers[constants_1.AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[constants_1.TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await (0, getPayloadHash_1.getPayloadHash)(request, this.sha256); + if (!(0, headerUtil_1.hasHeader)(constants_1.SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[constants_1.SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = (0, getCanonicalHeaders_1.getCanonicalHeaders)(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); + request.headers[constants_1.AUTH_HEADER] = + `${constants_1.ALGORITHM_IDENTIFIER} ` + + `Credential=${credentials.accessKeyId}/${scope}, ` + + `SignedHeaders=${getCanonicalHeaderList(canonicalHeaders)}, ` + + `Signature=${signature}`; + return request; + } + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${(0, getCanonicalQuery_1.getCanonicalQuery)(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} -function replaceCDATAarr(str, cdata) { - str = this.options.tagValueProcessor('' + str); - if (this.options.cdataPositionChar === '' || str === '') { - return str + ''); +${sortedHeaders.join(";")} +${payloadHash}`; + } + async createStringToSign(longDate, credentialScope, canonicalRequest) { + const hash = new this.sha256(); + hash.update((0, util_utf8_1.toUint8Array)(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${constants_1.ALGORITHM_IDENTIFIER} +${longDate} +${credentialScope} +${(0, util_hex_encoding_1.toHex)(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if ((pathSegment === null || pathSegment === void 0 ? void 0 : pathSegment.length) === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } + else { + normalizedPathSegments.push(pathSegment); + } + } + const normalizedPath = `${(path === null || path === void 0 ? void 0 : path.startsWith("/")) ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && (path === null || path === void 0 ? void 0 : path.endsWith("/")) ? "/" : ""}`; + const doubleEncoded = encodeURIComponent(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); + } + return path; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest); + const hash = new this.sha256(await keyPromise); + hash.update((0, util_utf8_1.toUint8Array)(stringToSign)); + return (0, util_hex_encoding_1.toHex)(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return (0, credentialDerivation_1.getSigningKey)(this.sha256, credentials, shortDate, region, service || this.service); + } + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || + typeof credentials.accessKeyId !== "string" || + typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); + } } - return str + this.newLine; - } } +exports.SignatureV4 = SignatureV4; +const formatDate = (now) => { + const longDate = (0, utilDate_1.iso8601)(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8), + }; +}; +const getCanonicalHeaderList = (headers) => Object.keys(headers).sort().join(";"); -function buildObjectNode(val, key, attrStr, level) { - if (attrStr && !val.includes('<')) { - return ( - this.indentate(level) + - '<' + - key + - attrStr + - '>' + - val + - //+ this.newLine - // + this.indentate(level) - '' + - this.options.tagValueProcessor(val) + - ' { -function buildEmptyTextNode(val, key, attrStr, level) { - if (val !== '') { - return this.buildTextValNode(val, key, attrStr, level); - } else { - return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar; - } -} -function indentate(level) { - return this.options.indentBy.repeat(level); -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.cloneQuery = exports.cloneRequest = void 0; +const cloneRequest = ({ headers, query, ...rest }) => ({ + ...rest, + headers: { ...headers }, + query: query ? (0, exports.cloneQuery)(query) : undefined, +}); +exports.cloneRequest = cloneRequest; +const cloneQuery = (query) => Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param, + }; +}, {}); +exports.cloneQuery = cloneQuery; -function isAttribute(name /*, options*/) { - if (name.startsWith(this.options.attributeNamePrefix)) { - return name.substr(this.attrPrefixLen); - } else { - return false; - } -} -function isCDATA(name) { - return name === this.options.cdataTagName; -} +/***/ }), -//formatting -//indentation -//\n after each closing or self closing tag +/***/ 92245: +/***/ ((__unused_webpack_module, exports) => { -module.exports = Parser; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MAX_PRESIGNED_TTL = exports.KEY_TYPE_IDENTIFIER = exports.MAX_CACHE_SIZE = exports.UNSIGNED_PAYLOAD = exports.EVENT_ALGORITHM_IDENTIFIER = exports.ALGORITHM_IDENTIFIER_V4A = exports.ALGORITHM_IDENTIFIER = exports.UNSIGNABLE_PATTERNS = exports.SEC_HEADER_PATTERN = exports.PROXY_HEADER_PATTERN = exports.ALWAYS_UNSIGNABLE_HEADERS = exports.HOST_HEADER = exports.TOKEN_HEADER = exports.SHA256_HEADER = exports.SIGNATURE_HEADER = exports.GENERATED_HEADERS = exports.DATE_HEADER = exports.AMZ_DATE_HEADER = exports.AUTH_HEADER = exports.REGION_SET_PARAM = exports.TOKEN_QUERY_PARAM = exports.SIGNATURE_QUERY_PARAM = exports.EXPIRES_QUERY_PARAM = exports.SIGNED_HEADERS_QUERY_PARAM = exports.AMZ_DATE_QUERY_PARAM = exports.CREDENTIAL_QUERY_PARAM = exports.ALGORITHM_QUERY_PARAM = void 0; +exports.ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; +exports.CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; +exports.AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; +exports.SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; +exports.EXPIRES_QUERY_PARAM = "X-Amz-Expires"; +exports.SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +exports.TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +exports.REGION_SET_PARAM = "X-Amz-Region-Set"; +exports.AUTH_HEADER = "authorization"; +exports.AMZ_DATE_HEADER = exports.AMZ_DATE_QUERY_PARAM.toLowerCase(); +exports.DATE_HEADER = "date"; +exports.GENERATED_HEADERS = [exports.AUTH_HEADER, exports.AMZ_DATE_HEADER, exports.DATE_HEADER]; +exports.SIGNATURE_HEADER = exports.SIGNATURE_QUERY_PARAM.toLowerCase(); +exports.SHA256_HEADER = "x-amz-content-sha256"; +exports.TOKEN_HEADER = exports.TOKEN_QUERY_PARAM.toLowerCase(); +exports.HOST_HEADER = "host"; +exports.ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true, +}; +exports.PROXY_HEADER_PATTERN = /^proxy-/; +exports.SEC_HEADER_PATTERN = /^sec-/; +exports.UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; +exports.ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +exports.ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; +exports.EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; +exports.UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; +exports.MAX_CACHE_SIZE = 50; +exports.KEY_TYPE_IDENTIFIER = "aws4_request"; +exports.MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; /***/ }), -/***/ 50186: +/***/ 26266: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -const char = function(a) { - return String.fromCharCode(a); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.clearCredentialCache = exports.getSigningKey = exports.createScope = void 0; +const util_hex_encoding_1 = __nccwpck_require__(61027); +const util_utf8_1 = __nccwpck_require__(38134); +const constants_1 = __nccwpck_require__(92245); +const signingKeyCache = {}; +const cacheQueue = []; +const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${constants_1.KEY_TYPE_IDENTIFIER}`; +exports.createScope = createScope; +const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${(0, util_hex_encoding_1.toHex)(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; + } + cacheQueue.push(cacheKey); + while (cacheQueue.length > constants_1.MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; + } + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, constants_1.KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); + } + return (signingKeyCache[cacheKey] = key); +}; +exports.getSigningKey = getSigningKey; +const clearCredentialCache = () => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); +}; +exports.clearCredentialCache = clearCredentialCache; +const hmac = (ctor, secret, data) => { + const hash = new ctor(secret); + hash.update((0, util_utf8_1.toUint8Array)(data)); + return hash.digest(); }; -const chars = { - nilChar: char(176), - missingChar: char(201), - nilPremitive: char(175), - missingPremitive: char(200), - - emptyChar: char(178), - emptyValue: char(177), //empty Premitive - - boundryChar: char(179), - objStart: char(198), - arrStart: char(204), - arrayEnd: char(185), -}; +/***/ }), -const charsArr = [ - chars.nilChar, - chars.nilPremitive, - chars.missingChar, - chars.missingPremitive, - chars.boundryChar, - chars.emptyChar, - chars.emptyValue, - chars.arrayEnd, - chars.objStart, - chars.arrStart, -]; +/***/ 42188: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const _e = function(node, e_schema, options) { - if (typeof e_schema === 'string') { - //premitive - if (node && node[0] && node[0].val !== undefined) { - return getValue(node[0].val, e_schema); - } else { - return getValue(node, e_schema); - } - } else { - const hasValidData = hasData(node); - if (hasValidData === true) { - let str = ''; - if (Array.isArray(e_schema)) { - //attributes can't be repeated. hence check in children tags only - str += chars.arrStart; - const itemSchema = e_schema[0]; - //var itemSchemaType = itemSchema; - const arr_len = node.length; - if (typeof itemSchema === 'string') { - for (let arr_i = 0; arr_i < arr_len; arr_i++) { - const r = getValue(node[arr_i].val, itemSchema); - str = processValue(str, r); - } - } else { - for (let arr_i = 0; arr_i < arr_len; arr_i++) { - const r = _e(node[arr_i], itemSchema, options); - str = processValue(str, r); - } - } - str += chars.arrayEnd; //indicates that next item is not array item - } else { - //object - str += chars.objStart; - const keys = Object.keys(e_schema); - if (Array.isArray(node)) { - node = node[0]; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCanonicalHeaders = void 0; +const constants_1 = __nccwpck_require__(92245); +const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == undefined) { + continue; } - for (let i in keys) { - const key = keys[i]; - //a property defined in schema can be present either in attrsMap or children tags - //options.textNodeName will not present in both maps, take it's value from val - //options.attrNodeName will be present in attrsMap - let r; - if (!options.ignoreAttributes && node.attrsMap && node.attrsMap[key]) { - r = _e(node.attrsMap[key], e_schema[key], options); - } else if (key === options.textNodeName) { - r = _e(node.val, e_schema[key], options); - } else { - r = _e(node.child[key], e_schema[key], options); - } - str = processValue(str, r); + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in constants_1.ALWAYS_UNSIGNABLE_HEADERS || + (unsignableHeaders === null || unsignableHeaders === void 0 ? void 0 : unsignableHeaders.has(canonicalHeaderName)) || + constants_1.PROXY_HEADER_PATTERN.test(canonicalHeaderName) || + constants_1.SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) { + continue; + } } - } - return str; - } else { - return hasValidData; + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); } - } -}; - -const getValue = function(a /*, type*/) { - switch (a) { - case undefined: - return chars.missingPremitive; - case null: - return chars.nilPremitive; - case '': - return chars.emptyValue; - default: - return a; - } + return canonical; }; +exports.getCanonicalHeaders = getCanonicalHeaders; -const processValue = function(str, r) { - if (!isAppChar(r[0]) && !isAppChar(str[str.length - 1])) { - str += chars.boundryChar; - } - return str + r; -}; -const isAppChar = function(ch) { - return charsArr.indexOf(ch) !== -1; -}; +/***/ }), -function hasData(jObj) { - if (jObj === undefined) { - return chars.missingChar; - } else if (jObj === null) { - return chars.nilChar; - } else if ( - jObj.child && - Object.keys(jObj.child).length === 0 && - (!jObj.attrsMap || Object.keys(jObj.attrsMap).length === 0) - ) { - return chars.emptyChar; - } else { - return true; - } -} +/***/ 94300: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const x2j = __nccwpck_require__(5525); -const buildOptions = (__nccwpck_require__(73430).buildOptions); -const convert2nimn = function(node, e_schema, options) { - options = buildOptions(options, x2j.defaultOptions, x2j.props); - return _e(node, e_schema, options); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getCanonicalQuery = void 0; +const util_uri_escape_1 = __nccwpck_require__(28768); +const constants_1 = __nccwpck_require__(92245); +const getCanonicalQuery = ({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query).sort()) { + if (key.toLowerCase() === constants_1.SIGNATURE_HEADER) { + continue; + } + keys.push(key); + const value = query[key]; + if (typeof value === "string") { + serialized[key] = `${(0, util_uri_escape_1.escapeUri)(key)}=${(0, util_uri_escape_1.escapeUri)(value)}`; + } + else if (Array.isArray(value)) { + serialized[key] = value + .slice(0) + .reduce((encoded, value) => encoded.concat([`${(0, util_uri_escape_1.escapeUri)(key)}=${(0, util_uri_escape_1.escapeUri)(value)}`]), []) + .sort() + .join("&"); + } + } + return keys + .map((key) => serialized[key]) + .filter((serialized) => serialized) + .join("&"); }; - -exports.convert2nimn = convert2nimn; +exports.getCanonicalQuery = getCanonicalQuery; /***/ }), -/***/ 91113: +/***/ 50179: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - -const util = __nccwpck_require__(73430); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getPayloadHash = void 0; +const is_array_buffer_1 = __nccwpck_require__(80743); +const util_hex_encoding_1 = __nccwpck_require__(61027); +const util_utf8_1 = __nccwpck_require__(38134); +const constants_1 = __nccwpck_require__(92245); +const getPayloadHash = async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === constants_1.SHA256_HEADER) { + return headers[headerName]; + } + } + if (body == undefined) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; + } + else if (typeof body === "string" || ArrayBuffer.isView(body) || (0, is_array_buffer_1.isArrayBuffer)(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update((0, util_utf8_1.toUint8Array)(body)); + return (0, util_hex_encoding_1.toHex)(await hashCtor.digest()); + } + return constants_1.UNSIGNED_PAYLOAD; +}; +exports.getPayloadHash = getPayloadHash; -const convertToJson = function(node, options, parentTagName) { - const jObj = {}; - // when no child node or attr is present - if ((!node.child || util.isEmptyObject(node.child)) && (!node.attrsMap || util.isEmptyObject(node.attrsMap))) { - return util.isExist(node.val) ? node.val : ''; - } +/***/ }), - // otherwise create a textnode if node has some text - if (util.isExist(node.val) && !(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { - const asArray = util.isTagNameInArrayMode(node.tagname, options.arrayMode, parentTagName) - jObj[options.textNodeName] = asArray ? [node.val] : node.val; - } +/***/ 57211: +/***/ ((__unused_webpack_module, exports) => { - util.merge(jObj, node.attrsMap, options.arrayMode); - const keys = Object.keys(node.child); - for (let index = 0; index < keys.length; index++) { - const tagName = keys[index]; - if (node.child[tagName] && node.child[tagName].length > 1) { - jObj[tagName] = []; - for (let tag in node.child[tagName]) { - if (node.child[tagName].hasOwnProperty(tag)) { - jObj[tagName].push(convertToJson(node.child[tagName][tag], options, tagName)); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.deleteHeader = exports.getHeaderValue = exports.hasHeader = void 0; +const hasHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; } - } - } else { - const result = convertToJson(node.child[tagName][0], options, tagName); - const asArray = (options.arrayMode === true && typeof result === 'object') || util.isTagNameInArrayMode(tagName, options.arrayMode, parentTagName); - jObj[tagName] = asArray ? [result] : result; } - } - - //add value - return jObj; + return false; }; - -exports.convertToJson = convertToJson; +exports.hasHeader = hasHeader; +const getHeaderValue = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return headers[headerName]; + } + } + return undefined; +}; +exports.getHeaderValue = getHeaderValue; +const deleteHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + delete headers[headerName]; + } + } +}; +exports.deleteHeader = deleteHeader; /***/ }), -/***/ 61766: +/***/ 91116: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - -const util = __nccwpck_require__(73430); -const buildOptions = (__nccwpck_require__(73430).buildOptions); -const x2j = __nccwpck_require__(5525); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.prepareRequest = exports.moveHeadersToQuery = exports.getPayloadHash = exports.getCanonicalQuery = exports.getCanonicalHeaders = void 0; +const tslib_1 = __nccwpck_require__(44780); +tslib_1.__exportStar(__nccwpck_require__(94905), exports); +var getCanonicalHeaders_1 = __nccwpck_require__(42188); +Object.defineProperty(exports, "getCanonicalHeaders", ({ enumerable: true, get: function () { return getCanonicalHeaders_1.getCanonicalHeaders; } })); +var getCanonicalQuery_1 = __nccwpck_require__(94300); +Object.defineProperty(exports, "getCanonicalQuery", ({ enumerable: true, get: function () { return getCanonicalQuery_1.getCanonicalQuery; } })); +var getPayloadHash_1 = __nccwpck_require__(50179); +Object.defineProperty(exports, "getPayloadHash", ({ enumerable: true, get: function () { return getPayloadHash_1.getPayloadHash; } })); +var moveHeadersToQuery_1 = __nccwpck_require__(72266); +Object.defineProperty(exports, "moveHeadersToQuery", ({ enumerable: true, get: function () { return moveHeadersToQuery_1.moveHeadersToQuery; } })); +var prepareRequest_1 = __nccwpck_require__(44656); +Object.defineProperty(exports, "prepareRequest", ({ enumerable: true, get: function () { return prepareRequest_1.prepareRequest; } })); +tslib_1.__exportStar(__nccwpck_require__(26266), exports); -//TODO: do it later -const convertToJsonString = function(node, options) { - options = buildOptions(options, x2j.defaultOptions, x2j.props); - options.indentBy = options.indentBy || ''; - return _cToJsonStr(node, options, 0); -}; +/***/ }), -const _cToJsonStr = function(node, options, level) { - let jObj = '{'; +/***/ 72266: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - //traver through all the children - const keys = Object.keys(node.child); - for (let index = 0; index < keys.length; index++) { - var tagname = keys[index]; - if (node.child[tagname] && node.child[tagname].length > 1) { - jObj += '"' + tagname + '" : [ '; - for (var tag in node.child[tagname]) { - jObj += _cToJsonStr(node.child[tagname][tag], options) + ' , '; - } - jObj = jObj.substr(0, jObj.length - 1) + ' ] '; //remove extra comma in last - } else { - jObj += '"' + tagname + '" : ' + _cToJsonStr(node.child[tagname][0], options) + ' ,'; - } - } - util.merge(jObj, node.attrsMap); - //add attrsMap as new children - if (util.isEmptyObject(jObj)) { - return util.isExist(node.val) ? node.val : ''; - } else { - if (util.isExist(node.val)) { - if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { - jObj += '"' + options.textNodeName + '" : ' + stringval(node.val); - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.moveHeadersToQuery = void 0; +const cloneRequest_1 = __nccwpck_require__(19271); +const moveHeadersToQuery = (request, options = {}) => { + var _a; + const { headers, query = {} } = typeof request.clone === "function" ? request.clone() : (0, cloneRequest_1.cloneRequest)(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if (lname.slice(0, 6) === "x-amz-" && !((_a = options.unhoistableHeaders) === null || _a === void 0 ? void 0 : _a.has(lname))) { + query[name] = headers[name]; + delete headers[name]; + } } - } - //add value - if (jObj[jObj.length - 1] === ',') { - jObj = jObj.substr(0, jObj.length - 2); - } - return jObj + '}'; + return { + ...request, + headers, + query, + }; }; - -function stringval(v) { - if (v === true || v === false || !isNaN(v)) { - return v; - } else { - return '"' + v + '"'; - } -} - -function indentate(options, level) { - return options.indentBy.repeat(level); -} - -exports.convertToJsonString = convertToJsonString; +exports.moveHeadersToQuery = moveHeadersToQuery; /***/ }), -/***/ 65460: +/***/ 44656: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - - -const nodeToJson = __nccwpck_require__(91113); -const xmlToNodeobj = __nccwpck_require__(5525); -const x2xmlnode = __nccwpck_require__(5525); -const buildOptions = (__nccwpck_require__(73430).buildOptions); -const validator = __nccwpck_require__(77731); - -exports.parse = function(xmlData, options, validationOption) { - if( validationOption){ - if(validationOption === true) validationOption = {} - - const result = validator.validate(xmlData, validationOption); - if (result !== true) { - throw Error( result.err.msg) - } - } - options = buildOptions(options, x2xmlnode.defaultOptions, x2xmlnode.props); - const traversableObj = xmlToNodeobj.getTraversalObj(xmlData, options) - //print(traversableObj, " "); - return nodeToJson.convertToJson(traversableObj, options); -}; -exports.convertTonimn = __nccwpck_require__(50186).convert2nimn; -exports.getTraversalObj = xmlToNodeobj.getTraversalObj; -exports.convertToJson = nodeToJson.convertToJson; -exports.convertToJsonString = __nccwpck_require__(61766).convertToJsonString; -exports.validate = validator.validate; -exports.j2xParser = __nccwpck_require__(6985); -exports.parseToNimn = function(xmlData, schema, options) { - return exports.convertTonimn(exports.getTraversalObj(xmlData, options), schema, options); -}; - -function print(xmlNode, indentation){ - if(xmlNode){ - console.log(indentation + "{") - console.log(indentation + " \"tagName\": \"" + xmlNode.tagname + "\", "); - if(xmlNode.parent){ - console.log(indentation + " \"parent\": \"" + xmlNode.parent.tagname + "\", "); - } - console.log(indentation + " \"val\": \"" + xmlNode.val + "\", "); - console.log(indentation + " \"attrs\": " + JSON.stringify(xmlNode.attrsMap,null,4) + ", "); - - if(xmlNode.child){ - console.log(indentation + "\"child\": {") - const indentation2 = indentation + indentation; - Object.keys(xmlNode.child).forEach( function(key) { - const node = xmlNode.child[key]; - - if(Array.isArray(node)){ - console.log(indentation + "\""+key+"\" :[") - node.forEach( function(item,index) { - //console.log(indentation + " \""+index+"\" : [") - print(item, indentation2); - }) - console.log(indentation + "],") - }else{ - console.log(indentation + " \""+key+"\" : {") - print(node, indentation2); - console.log(indentation + "},") +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.prepareRequest = void 0; +const cloneRequest_1 = __nccwpck_require__(19271); +const constants_1 = __nccwpck_require__(92245); +const prepareRequest = (request) => { + request = typeof request.clone === "function" ? request.clone() : (0, cloneRequest_1.cloneRequest)(request); + for (const headerName of Object.keys(request.headers)) { + if (constants_1.GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; } - }); - console.log(indentation + "},") } - console.log(indentation + "},") - } -} + return request; +}; +exports.prepareRequest = prepareRequest; /***/ }), -/***/ 73430: +/***/ 81001: /***/ ((__unused_webpack_module, exports) => { -"use strict"; - - -const nameStartChar = ':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'; -const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; -const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*' -const regexName = new RegExp('^' + nameRegexp + '$'); - -const getAllMatches = function(string, regex) { - const matches = []; - let match = regex.exec(string); - while (match) { - const allmatches = []; - const len = match.length; - for (let index = 0; index < len; index++) { - allmatches.push(match[index]); - } - matches.push(allmatches); - match = regex.exec(string); - } - return matches; -}; - -const isName = function(string) { - const match = regexName.exec(string); - return !(match === null || typeof match === 'undefined'); -}; - -exports.isExist = function(v) { - return typeof v !== 'undefined'; -}; - -exports.isEmptyObject = function(obj) { - return Object.keys(obj).length === 0; -}; -/** - * Copy all the properties of a into b. - * @param {*} target - * @param {*} a - */ -exports.merge = function(target, a, arrayMode) { - if (a) { - const keys = Object.keys(a); // will return an array of own properties - const len = keys.length; //don't make it inline - for (let i = 0; i < len; i++) { - if (arrayMode === 'strict') { - target[keys[i]] = [ a[keys[i]] ]; - } else { - target[keys[i]] = a[keys[i]]; - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toDate = exports.iso8601 = void 0; +const iso8601 = (time) => (0, exports.toDate)(time) + .toISOString() + .replace(/\.\d{3}Z$/, "Z"); +exports.iso8601 = iso8601; +const toDate = (time) => { + if (typeof time === "number") { + return new Date(time * 1000); } - } -}; -/* exports.merge =function (b,a){ - return Object.assign(b,a); -} */ - -exports.getValue = function(v) { - if (exports.isExist(v)) { - return v; - } else { - return ''; - } -}; - -// const fakeCall = function(a) {return a;}; -// const fakeCallNoReturn = function() {}; - -exports.buildOptions = function(options, defaultOptions, props) { - var newOptions = {}; - if (!options) { - return defaultOptions; //if there are not options - } - - for (let i = 0; i < props.length; i++) { - if (options[props[i]] !== undefined) { - newOptions[props[i]] = options[props[i]]; - } else { - newOptions[props[i]] = defaultOptions[props[i]]; + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1000); + } + return new Date(time); } - } - return newOptions; + return time; }; - -/** - * Check if a tag name should be treated as array - * - * @param tagName the node tagname - * @param arrayMode the array mode option - * @param parentTagName the parent tag name - * @returns {boolean} true if node should be parsed as array - */ -exports.isTagNameInArrayMode = function (tagName, arrayMode, parentTagName) { - if (arrayMode === false) { - return false; - } else if (arrayMode instanceof RegExp) { - return arrayMode.test(tagName); - } else if (typeof arrayMode === 'function') { - return !!arrayMode(tagName, parentTagName); - } - - return arrayMode === "strict"; -} - -exports.isName = isName; -exports.getAllMatches = getAllMatches; -exports.nameRegexp = nameRegexp; +exports.toDate = toDate; /***/ }), -/***/ 77731: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 44780: +/***/ ((module) => { -"use strict"; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + __assign = Object.assign || function (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; + }; -const util = __nccwpck_require__(73430); + __rest = function (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; + }; -const defaultOptions = { - allowBooleanAttributes: false, //A tag can have attributes without any value -}; + __decorate = function (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; + }; -const props = ['allowBooleanAttributes']; + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -//const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g"); -exports.validate = function (xmlData, options) { - options = util.buildOptions(options, defaultOptions, props); + __esDecorate = function (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)); }; + 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; + }; - //xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line - //xmlData = xmlData.replace(/(^\s*<\?xml.*?\?>)/g,"");//Remove XML starting tag - //xmlData = xmlData.replace(/()/g,"");//Remove DOCTYPE - const tags = []; - let tagFound = false; + __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; + }; - //indicates that the root tag has been closed (aka. depth 0 has been reached) - let reachedRoot = false; + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - if (xmlData[0] === '\ufeff') { - // check for byte order mark (BOM) - xmlData = xmlData.substr(1); - } + __setFunctionName = function (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 }); + }; - for (let i = 0; i < xmlData.length; i++) { + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - if (xmlData[i] === '<' && xmlData[i+1] === '?') { - i+=2; - i = readPI(xmlData,i); - if (i.err) return i; - }else if (xmlData[i] === '<') { - //starting of tag - //read until you reach to '>' avoiding any '>' in attribute value + __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()); + }); + }; - i++; - - if (xmlData[i] === '!') { - i = readCommentAndCDATA(xmlData, i); - continue; - } else { - let closingTag = false; - if (xmlData[i] === '/') { - //closing tag - closingTag = true; - i++; - } - //read tagname - let tagName = ''; - for (; i < xmlData.length && - xmlData[i] !== '>' && - xmlData[i] !== ' ' && - xmlData[i] !== '\t' && - xmlData[i] !== '\n' && - xmlData[i] !== '\r'; i++ - ) { - tagName += xmlData[i]; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; } - tagName = tagName.trim(); - //console.log(tagName); + }; - if (tagName[tagName.length - 1] === '/') { - //self closing tag without attributes - tagName = tagName.substring(0, tagName.length - 1); - //continue; - i--; - } - if (!validateTagName(tagName)) { - let msg; - if (tagName.trim().length === 0) { - msg = "There is an unnecessary space between tag name and backward slash ' 0) { - return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, i)); - } else { - const otg = tags.pop(); - if (tagName !== otg) { - return getErrorObject('InvalidTag', "Closing tag '"+otg+"' is expected inplace of '"+tagName+"'.", getLineNumberForPosition(xmlData, i)); - } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; + }); - //when there are no more tags, we reached the root level. - if (tags.length == 0) { - reachedRoot = true; + __values = function (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 }; } - } - } else { - const isValid = validateAttributeString(attrStr, options); - if (isValid !== true) { - //the result from the nested function returns the position of the error within the attribute - //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute - //this gives us the absolute index in the entire xml, which we can use to find the line at last - return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); - } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - //if the root level has been reached before ... - if (reachedRoot === true) { - return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i)); - } else { - tags.push(tagName); - } - tagFound = true; + __read = function (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); } - - //skip tag text value - //It may include comments and CDATA value - for (i++; i < xmlData.length; i++) { - if (xmlData[i] === '<') { - if (xmlData[i + 1] === '!') { - //comment or CADATA - i++; - i = readCommentAndCDATA(xmlData, i); - continue; - } else if (xmlData[i+1] === '?') { - i = readPI(xmlData, ++i); - if (i.err) return i; - } else{ - break; + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); } - } else if (xmlData[i] === '&') { - const afterAmp = validateAmpersand(xmlData, i); - if (afterAmp == -1) - return getErrorObject('InvalidChar', "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); - i = afterAmp; - } - } //end of reading tag text value - if (xmlData[i] === '<') { - i--; + finally { if (e) throw e.error; } } - } - } else { - if (xmlData[i] === ' ' || xmlData[i] === '\t' || xmlData[i] === '\n' || xmlData[i] === '\r') { - continue; - } - return getErrorObject('InvalidChar', "char '"+xmlData[i]+"' is not expected.", getLineNumberForPosition(xmlData, i)); - } - } - - if (!tagFound) { - return getErrorObject('InvalidXml', 'Start tag expected.', 1); - } else if (tags.length > 0) { - return getErrorObject('InvalidXml', "Invalid '"+JSON.stringify(tags, null, 4).replace(/\r?\n/g, '')+"' found.", 1); - } + return ar; + }; - return true; -}; + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; -/** - * Read Processing insstructions and skip - * @param {*} xmlData - * @param {*} i - */ -function readPI(xmlData, i) { - var start = i; - for (; i < xmlData.length; i++) { - if (xmlData[i] == '?' || xmlData[i] == ' ') { - //tagname - var tagname = xmlData.substr(start, i - start); - if (i > 5 && tagname === 'xml') { - return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i)); - } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') { - //check if valid attribut string - i++; - break; - } else { - continue; - } - } - } - return i; -} + /** @deprecated */ + __spreadArrays = function () { + 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 readCommentAndCDATA(xmlData, i) { - if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') { - //comment - for (i += 3; i < xmlData.length; i++) { - if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') { - i += 2; - break; - } - } - } else if ( - xmlData.length > i + 8 && - xmlData[i + 1] === 'D' && - xmlData[i + 2] === 'O' && - xmlData[i + 3] === 'C' && - xmlData[i + 4] === 'T' && - xmlData[i + 5] === 'Y' && - xmlData[i + 6] === 'P' && - xmlData[i + 7] === 'E' - ) { - let angleBracketsCount = 1; - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === '<') { - angleBracketsCount++; - } else if (xmlData[i] === '>') { - angleBracketsCount--; - if (angleBracketsCount === 0) { - break; + __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]; + } } - } - } - } else if ( - xmlData.length > i + 9 && - xmlData[i + 1] === '[' && - xmlData[i + 2] === 'C' && - xmlData[i + 3] === 'D' && - xmlData[i + 4] === 'A' && - xmlData[i + 5] === 'T' && - xmlData[i + 6] === 'A' && - xmlData[i + 7] === '[' - ) { - for (i += 8; i < xmlData.length; i++) { - if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') { - i += 2; - break; - } - } - } + return to.concat(ar || Array.prototype.slice.call(from)); + }; - return i; -} + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -var doubleQuote = '"'; -var singleQuote = "'"; + __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(n, v); }); }; } + 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]); } + }; -/** - * Keep reading xmlData until '<' is found outside the attribute value. - * @param {string} xmlData - * @param {number} i - */ -function readAttributeStr(xmlData, i) { - let attrStr = ''; - let startChar = ''; - let tagClosed = false; - for (; i < xmlData.length; i++) { - if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { - if (startChar === '') { - startChar = xmlData[i]; - } else if (startChar !== xmlData[i]) { - //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa - continue; - } else { - startChar = ''; - } - } else if (xmlData[i] === '>') { - if (startChar === '') { - tagClosed = true; - break; - } - } - attrStr += xmlData[i]; - } - if (startChar !== '') { - return false; - } + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - return { - value: attrStr, - index: i, - tagClosed: tagClosed - }; -} + __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); } + }; -/** - * Select all the attributes whether valid or invalid. - */ -const validAttrStrRegxp = new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?', 'g'); + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -//attr, ="sd", a="amit's", a="sd"b="saf", ab cd="" + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -function validateAttributeString(attrStr, options) { - //console.log("start:"+attrStr+":end"); + __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; + }; - //if(attrStr.trim().length === 0) return true; //empty string + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - const matches = util.getAllMatches(attrStr, validAttrStrRegxp); - const attrNames = {}; + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - for (let i = 0; i < matches.length; i++) { - if (matches[i][1].length === 0) { - //nospace before attribute name: a="sd"b="saf" - return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' has no space in starting.", getPositionFromMatch(attrStr, matches[i][0])) - } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) { - //independent attribute: ab - return getErrorObject('InvalidAttr', "boolean attribute '"+matches[i][2]+"' is not allowed.", getPositionFromMatch(attrStr, matches[i][0])); - } - /* else if(matches[i][6] === undefined){//attribute without value: ab= - return { err: { code:"InvalidAttr",msg:"attribute " + matches[i][2] + " has no value assigned."}}; - } */ - const attrName = matches[i][2]; - if (!validateAttrName(attrName)) { - return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is an invalid name.", getPositionFromMatch(attrStr, matches[i][0])); - } - if (!attrNames.hasOwnProperty(attrName)) { - //check for duplicate attribute. - attrNames[attrName] = 1; - } else { - return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is repeated.", getPositionFromMatch(attrStr, matches[i][0])); - } - } + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - return true; -} + __classPrivateFieldIn = function (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 validateNumberAmpersand(xmlData, i) { - let re = /\d/; - if (xmlData[i] === 'x') { - i++; - re = /[\da-fA-F]/; - } - for (; i < xmlData.length; i++) { - if (xmlData[i] === ';') - return i; - if (!xmlData[i].match(re)) - break; - } - return -1; -} + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -function validateAmpersand(xmlData, i) { - // https://www.w3.org/TR/xml/#dt-charref - i++; - if (xmlData[i] === ';') - return -1; - if (xmlData[i] === '#') { - i++; - return validateNumberAmpersand(xmlData, i); - } - let count = 0; - for (; i < xmlData.length; i++, count++) { - if (xmlData[i].match(/\w/) && count < 20) - continue; - if (xmlData[i] === ';') - break; - return -1; - } - return i; -} + 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; + }; -function getErrorObject(code, message, lineNumber) { - return { - err: { - code: code, - msg: message, - line: lineNumber, - }, - }; -} + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -function validateAttrName(attrName) { - return util.isName(attrName); -} + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); -// const startsWithXML = /^xml/i; -function validateTagName(tagname) { - return util.isName(tagname) /* && !tagname.match(startsWithXML) */; -} +/***/ }), -//this function returns the line number for the character at the given index -function getLineNumberForPosition(xmlData, index) { - var lines = xmlData.substring(0, index).split(/\r?\n/); - return lines.length; -} +/***/ 21670: +/***/ ((__unused_webpack_module, exports) => { -//this function returns the position of the last character of match within attrStr -function getPositionFromMatch(attrStr, match) { - return attrStr.indexOf(match) + match.length; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NoOpLogger = void 0; +class NoOpLogger { + trace() { } + debug() { } + info() { } + warn() { } + error() { } } +exports.NoOpLogger = NoOpLogger; /***/ }), -/***/ 51835: -/***/ ((module) => { - -"use strict"; +/***/ 96620: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = function(tagname, parent, val) { - this.tagname = tagname; - this.parent = parent; - this.child = {}; //child tags - this.attrsMap = {}; //attributes map - this.val = val; //text only - this.addChild = function(child) { - if (Array.isArray(this.child[child.tagname])) { - //already presents - this.child[child.tagname].push(child); - } else { - this.child[child.tagname] = [child]; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Client = void 0; +const middleware_stack_1 = __nccwpck_require__(27814); +class Client { + constructor(config) { + this.middlewareStack = (0, middleware_stack_1.constructStack)(); + this.config = config; } - }; -}; + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + if (callback) { + handler(command) + .then((result) => callback(null, result.output), (err) => callback(err)) + .catch(() => { }); + } + else { + return handler(command).then((result) => result.output); + } + } + destroy() { + if (this.config.requestHandler.destroy) + this.config.requestHandler.destroy(); + } +} +exports.Client = Client; /***/ }), -/***/ 5525: +/***/ 92306: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - - -const util = __nccwpck_require__(73430); -const buildOptions = (__nccwpck_require__(73430).buildOptions); -const xmlNode = __nccwpck_require__(51835); -const regx = - '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' - .replace(/NAME/g, util.nameRegexp); - -//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); -//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); - -//polyfill -if (!Number.parseInt && window.parseInt) { - Number.parseInt = window.parseInt; -} -if (!Number.parseFloat && window.parseFloat) { - Number.parseFloat = window.parseFloat; -} -const defaultOptions = { - attributeNamePrefix: '@_', - attrNodeName: false, - textNodeName: '#text', - ignoreAttributes: true, - ignoreNameSpace: false, - allowBooleanAttributes: false, //a tag can have attributes without any value - //ignoreRootElement : false, - parseNodeValue: true, - parseAttributeValue: false, - arrayMode: false, - trimValues: true, //Trim string values of tag and attributes - cdataTagName: false, - cdataPositionChar: '\\c', - tagValueProcessor: function(a, tagName) { - return a; - }, - attrValueProcessor: function(a, attrName) { - return a; - }, - stopNodes: [] - //decodeStrict: false, +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.collectBody = void 0; +const util_stream_1 = __nccwpck_require__(55844); +const collectBody = async (streamBody = new Uint8Array(), context) => { + if (streamBody instanceof Uint8Array) { + return util_stream_1.Uint8ArrayBlobAdapter.mutate(streamBody); + } + if (!streamBody) { + return util_stream_1.Uint8ArrayBlobAdapter.mutate(new Uint8Array()); + } + const fromContext = context.streamCollector(streamBody); + return util_stream_1.Uint8ArrayBlobAdapter.mutate(await fromContext); }; +exports.collectBody = collectBody; -exports.defaultOptions = defaultOptions; -const props = [ - 'attributeNamePrefix', - 'attrNodeName', - 'textNodeName', - 'ignoreAttributes', - 'ignoreNameSpace', - 'allowBooleanAttributes', - 'parseNodeValue', - 'parseAttributeValue', - 'arrayMode', - 'trimValues', - 'cdataTagName', - 'cdataPositionChar', - 'tagValueProcessor', - 'attrValueProcessor', - 'parseTrueNumberOnly', - 'stopNodes' -]; -exports.props = props; +/***/ }), -/** - * Trim -> valueProcessor -> parse value - * @param {string} tagName - * @param {string} val - * @param {object} options - */ -function processTagValue(tagName, val, options) { - if (val) { - if (options.trimValues) { - val = val.trim(); - } - val = options.tagValueProcessor(val, tagName); - val = parseValue(val, options.parseNodeValue, options.parseTrueNumberOnly); - } +/***/ 52228: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return val; -} -function resolveNameSpace(tagname, options) { - if (options.ignoreNameSpace) { - const tags = tagname.split(':'); - const prefix = tagname.charAt(0) === '/' ? '/' : ''; - if (tags[0] === 'xmlns') { - return ''; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Command = void 0; +const middleware_stack_1 = __nccwpck_require__(27814); +const types_1 = __nccwpck_require__(75751); +class Command { + constructor() { + this.middlewareStack = (0, middleware_stack_1.constructStack)(); } - if (tags.length === 2) { - tagname = prefix + tags[1]; + static classBuilder() { + return new ClassBuilder(); + } + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); + } + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [types_1.SMITHY_CONTEXT_KEY]: { + ...smithyContext, + }, + ...additionalContext, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } - } - return tagname; } - -function parseValue(val, shouldParse, parseTrueNumberOnly) { - if (shouldParse && typeof val === 'string') { - let parsed; - if (val.trim() === '' || isNaN(val)) { - parsed = val === 'true' ? true : val === 'false' ? false : val; - } else { - if (val.indexOf('0x') !== -1) { - //support hexa decimal - parsed = Number.parseInt(val, 16); - } else if (val.indexOf('.') !== -1) { - parsed = Number.parseFloat(val); - val = val.replace(/\.?0+$/, ""); - } else { - parsed = Number.parseInt(val, 10); - } - if (parseTrueNumberOnly) { - parsed = String(parsed) === val ? parsed : val; - } +exports.Command = Command; +class ClassBuilder { + constructor() { + this._init = () => { }; + this._ep = {}; + this._middlewareFn = () => []; + this._commandName = ""; + this._clientName = ""; + this._additionalContext = {}; + this._smithyContext = {}; + this._inputFilterSensitiveLog = (_) => _; + this._outputFilterSensitiveLog = (_) => _; + this._serializer = null; + this._deserializer = null; + } + init(cb) { + this._init = cb; + } + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; } - return parsed; - } else { - if (util.isExist(val)) { - return val; - } else { - return ''; + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; } - } -} - -//TODO: change regex to capture NS -//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); -const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])(.*?)\\3)?', 'g'); - -function buildAttributesMap(attrStr, options) { - if (!options.ignoreAttributes && typeof attrStr === 'string') { - attrStr = attrStr.replace(/\r?\n/g, ' '); - //attrStr = attrStr || attrStr.trim(); - - const matches = util.getAllMatches(attrStr, attrsRegx); - const len = matches.length; //don't make it inline - const attrs = {}; - for (let i = 0; i < len; i++) { - const attrName = resolveNameSpace(matches[i][1], options); - if (attrName.length) { - if (matches[i][4] !== undefined) { - if (options.trimValues) { - matches[i][4] = matches[i][4].trim(); - } - matches[i][4] = options.attrValueProcessor(matches[i][4], attrName); - attrs[options.attributeNamePrefix + attrName] = parseValue( - matches[i][4], - options.parseAttributeValue, - options.parseTrueNumberOnly - ); - } else if (options.allowBooleanAttributes) { - attrs[options.attributeNamePrefix + attrName] = true; - } - } + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext, + }; + return this; } - if (!Object.keys(attrs).length) { - return; + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; } - if (options.attrNodeName) { - const attrCollection = {}; - attrCollection[options.attrNodeName] = attrs; - return attrCollection; + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + build() { + const closure = this; + let CommandRef; + return (CommandRef = class extends Command { + static getEndpointParameterInstructions() { + return closure._ep; + } + constructor(input) { + super(); + this.input = input; + this.serialize = closure._serializer; + this.deserialize = closure._deserializer; + closure._init(this); + } + resolveMiddleware(stack, configuration, options) { + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog, + outputFilterSensitiveLog: closure._outputFilterSensitiveLog, + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext, + }); + } + }); } - return attrs; - } } -const getTraversalObj = function(xmlData, options) { - xmlData = xmlData.replace(/\r\n?/g, "\n"); - options = buildOptions(options, defaultOptions, props); - const xmlObj = new xmlNode('!xml'); - let currentNode = xmlObj; - let textData = ""; - -//function match(xmlData){ - for(let i=0; i< xmlData.length; i++){ - const ch = xmlData[i]; - if(ch === '<'){ - if( xmlData[i+1] === '/') {//Closing Tag - const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") - let tagName = xmlData.substring(i+2,closeIndex).trim(); - - if(options.ignoreNameSpace){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - } - } - - /* if (currentNode.parent) { - currentNode.parent.val = util.getValue(currentNode.parent.val) + '' + processTagValue2(tagName, textData , options); - } */ - if(currentNode){ - if(currentNode.val){ - currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(tagName, textData , options); - }else{ - currentNode.val = processTagValue(tagName, textData , options); - } - } - - if (options.stopNodes.length && options.stopNodes.includes(currentNode.tagname)) { - currentNode.child = [] - if (currentNode.attrsMap == undefined) { currentNode.attrsMap = {}} - currentNode.val = xmlData.substr(currentNode.startIndex + 1, i - currentNode.startIndex - 1) - } - currentNode = currentNode.parent; - textData = ""; - i = closeIndex; - } else if( xmlData[i+1] === '?') { - i = findClosingIndex(xmlData, "?>", i, "Pi Tag is not closed.") - } else if(xmlData.substr(i + 1, 3) === '!--') { - i = findClosingIndex(xmlData, "-->", i, "Comment is not closed.") - } else if( xmlData.substr(i + 1, 2) === '!D') { - const closeIndex = findClosingIndex(xmlData, ">", i, "DOCTYPE is not closed.") - const tagExp = xmlData.substring(i, closeIndex); - if(tagExp.indexOf("[") >= 0){ - i = xmlData.indexOf("]>", i) + 1; - }else{ - i = closeIndex; - } - }else if(xmlData.substr(i + 1, 2) === '![') { - const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2 - const tagExp = xmlData.substring(i + 9,closeIndex); - //considerations - //1. CDATA will always have parent node - //2. A tag with CDATA is not a leaf node so it's value would be string type. - if(textData){ - currentNode.val = util.getValue(currentNode.val) + '' + processTagValue(currentNode.tagname, textData , options); - textData = ""; - } +/***/ }), - if (options.cdataTagName) { - //add cdata node - const childNode = new xmlNode(options.cdataTagName, currentNode, tagExp); - currentNode.addChild(childNode); - //for backtracking - currentNode.val = util.getValue(currentNode.val) + options.cdataPositionChar; - //add rest value to parent node - if (tagExp) { - childNode.val = tagExp; - } - } else { - currentNode.val = (currentNode.val || '') + (tagExp || ''); - } +/***/ 20081: +/***/ ((__unused_webpack_module, exports) => { - i = closeIndex + 2; - }else {//Opening tag - const result = closingIndexForOpeningTag(xmlData, i+1) - let tagExp = result.data; - const closeIndex = result.index; - const separatorIndex = tagExp.indexOf(" "); - let tagName = tagExp; - let shouldBuildAttributesMap = true; - if(separatorIndex !== -1){ - tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, ''); - tagExp = tagExp.substr(separatorIndex + 1); - } - - if(options.ignoreNameSpace){ - const colonIndex = tagName.indexOf(":"); - if(colonIndex !== -1){ - tagName = tagName.substr(colonIndex+1); - shouldBuildAttributesMap = tagName !== result.data.substr(colonIndex + 1); - } - } - //save text to parent node - if (currentNode && textData) { - if(currentNode.tagname !== '!xml'){ - currentNode.val = util.getValue(currentNode.val) + '' + processTagValue( currentNode.tagname, textData, options); - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SENSITIVE_STRING = void 0; +exports.SENSITIVE_STRING = "***SensitiveInformation***"; - if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){//selfClosing tag - if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' - tagName = tagName.substr(0, tagName.length - 1); - tagExp = tagName; - }else{ - tagExp = tagExp.substr(0, tagExp.length - 1); - } +/***/ }), - const childNode = new xmlNode(tagName, currentNode, ''); - if(tagName !== tagExp){ - childNode.attrsMap = buildAttributesMap(tagExp, options); - } - currentNode.addChild(childNode); - }else{//opening tag +/***/ 9588: +/***/ ((__unused_webpack_module, exports) => { - const childNode = new xmlNode( tagName, currentNode ); - if (options.stopNodes.length && options.stopNodes.includes(childNode.tagname)) { - childNode.startIndex=closeIndex; - } - if(tagName !== tagExp && shouldBuildAttributesMap){ - childNode.attrsMap = buildAttributesMap(tagExp, options); - } - currentNode.addChild(childNode); - currentNode = childNode; - } - textData = ""; - i = closeIndex; - } - }else{ - textData += xmlData[i]; - } - } - return xmlObj; -} -function closingIndexForOpeningTag(data, i){ - let attrBoundary; - let tagExp = ""; - for (let index = i; index < data.length; index++) { - let ch = data[index]; - if (attrBoundary) { - if (ch === attrBoundary) attrBoundary = "";//reset - } else if (ch === '"' || ch === "'") { - attrBoundary = ch; - } else if (ch === '>') { - return { - data: tagExp, - index: index - } - } else if (ch === '\t') { - ch = " " +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createAggregatedClient = void 0; +const createAggregatedClient = (commands, Client) => { + for (const command of Object.keys(commands)) { + const CommandCtor = commands[command]; + const methodImpl = async function (args, optionsOrCb, cb) { + const command = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } + else { + return this.send(command, optionsOrCb); + } + }; + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client.prototype[methodName] = methodImpl; } - tagExp += ch; - } -} - -function findClosingIndex(xmlData, str, i, errMsg){ - const closingIndex = xmlData.indexOf(str, i); - if(closingIndex === -1){ - throw new Error(errMsg) - }else{ - return closingIndex + str.length - 1; - } -} - -exports.getTraversalObj = getTraversalObj; +}; +exports.createAggregatedClient = createAggregatedClient; /***/ }), -/***/ 29857: +/***/ 51701: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var Path = __nccwpck_require__(71017); -var fs = __nccwpck_require__(68644); -var util = __nccwpck_require__(73837); -var glob = __nccwpck_require__(58956); -var errCode = __nccwpck_require__(5822); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var Path__default = /*#__PURE__*/_interopDefaultLegacy(Path); -var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); -var glob__default = /*#__PURE__*/_interopDefaultLegacy(glob); -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); - -const fsStat = util.promisify(fs__default["default"].stat); -async function getFilesFromPath(paths, options) { - const files = []; - for await (const file of filesFromPath(paths, options)) { - files.push(file); - } - return files; +exports.parseEpochTimestamp = exports.parseRfc7231DateTime = exports.parseRfc3339DateTimeWithOffset = exports.parseRfc3339DateTime = exports.dateToUtcString = void 0; +const parse_utils_1 = __nccwpck_require__(41456); +const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; +const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; +function dateToUtcString(date) { + const year = date.getUTCFullYear(); + const month = date.getUTCMonth(); + const dayOfWeek = date.getUTCDay(); + const dayOfMonthInt = date.getUTCDate(); + const hoursInt = date.getUTCHours(); + const minutesInt = date.getUTCMinutes(); + const secondsInt = date.getUTCSeconds(); + const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`; + const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`; + const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`; + const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`; + return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`; } -async function* filesFromPath(paths, options) { - options = options || {}; - if (typeof paths === 'string') { - paths = [paths]; - } - const globSourceOptions = { - recursive: true, - glob: { - dot: Boolean(options.hidden), - ignore: Array.isArray(options.ignore) ? options.ignore : [], - follow: options.followSymlinks != null ? options.followSymlinks : true +exports.dateToUtcString = dateToUtcString; +const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/); +const parseRfc3339DateTime = (value) => { + if (value === null || value === undefined) { + return undefined; } - }; - for await (const path of paths) { - if (typeof path !== 'string') { - throw errCode__default["default"](new Error('Path must be a string'), 'ERR_INVALID_PATH', { path }); + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); } - const absolutePath = Path__default["default"].resolve(process.cwd(), path); - const stat = await fsStat(absolutePath); - const prefix = options.pathPrefix || Path__default["default"].dirname(absolutePath); - let mode = options.mode; - if (options.preserveMode) { - mode = stat.mode; + const match = RFC3339.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); } - let mtime = options.mtime; - if (options.preserveMtime) { - mtime = stat.mtime; + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match; + const year = (0, parse_utils_1.strictParseShort)(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); +}; +exports.parseRfc3339DateTime = parseRfc3339DateTime; +const RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/); +const parseRfc3339DateTimeWithOffset = (value) => { + if (value === null || value === undefined) { + return undefined; } - yield* toGlobSource({ - path, - type: stat.isDirectory() ? 'dir' : 'file', - prefix, - mode, - mtime, - size: stat.size, - preserveMode: options.preserveMode, - preserveMtime: options.preserveMtime - }, globSourceOptions); - } -} -async function* toGlobSource({path, type, prefix, mode, mtime, size, preserveMode, preserveMtime}, options) { - options = options || {}; - const baseName = Path__default["default"].basename(path); - if (type === 'file') { - yield { - name: `/${ baseName.replace(prefix, '') }`, - stream: () => fs__default["default"].createReadStream(Path__default["default"].isAbsolute(path) ? path : Path__default["default"].join(process.cwd(), path)), - mode, - mtime, - size - }; - return; - } - const globOptions = Object.assign({}, options.glob, { - cwd: path, - nodir: false, - realpath: false, - absolute: true - }); - for await (const p of glob__default["default"](path, '**/*', globOptions)) { - const stat = await fsStat(p); - if (!stat.isFile()) { - continue; + if (typeof value !== "string") { + throw new TypeError("RFC-3339 date-times must be expressed as strings"); } - if (preserveMode || preserveMtime) { - if (preserveMode) { - mode = stat.mode; - } - if (preserveMtime) { - mtime = stat.mtime; - } + const match = RFC3339_WITH_OFFSET.exec(value); + if (!match) { + throw new TypeError("Invalid RFC-3339 date-time value"); } - yield { - name: toPosix(p.replace(prefix, '')), - stream: () => fs__default["default"].createReadStream(p), - mode, - mtime, - size: stat.size - }; - } -} -const toPosix = path => path.replace(/\\/g, '/'); - -exports.filesFromPath = filesFromPath; -exports.getFilesFromPath = getFilesFromPath; - - -/***/ }), - -/***/ 58956: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = (__nccwpck_require__(57147).promises) -const path = __nccwpck_require__(71017) -const minimatch = __nccwpck_require__(71111) - -/** - * @typedef {string} Glob - * @typedef {Object} OptionsExt - * @property {Glob[]} [ignore] - Glob patterns to ignore - * @property {string} [cwd=process.cwd()] - * @property {boolean} [absolute=false] - If true produces absolute paths - * @property {boolean} [nodir] - If true yields file paths and skip directories - * - * @typedef {OptionsExt & minimatch.IOptions} Options - */ - -/** - * Async iterable filename pattern matcher - * - * @param {string} dir - * @param {string} pattern - * @param {Options} [options] - * @returns {AsyncIterable} - */ -async function * glob (dir, pattern, options = {}) { - const absoluteDir = path.resolve(dir) - const relativeDir = path.relative(options.cwd || process.cwd(), dir) - - const stats = await fs.stat(absoluteDir) - - if (stats.isDirectory()) { - for await (const entry of _glob(absoluteDir, '', pattern, options)) { - yield entry + const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match; + const year = (0, parse_utils_1.strictParseShort)(stripLeadingZeroes(yearStr)); + const month = parseDateValue(monthStr, "month", 1, 12); + const day = parseDateValue(dayStr, "day", 1, 31); + const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds }); + if (offsetStr.toUpperCase() != "Z") { + date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr)); } - - return - } - - if (minimatch(relativeDir, pattern, options)) { - yield options.absolute ? absoluteDir : relativeDir - } -} - -/** - * @param {string} base - * @param {string} dir - * @param {Glob} pattern - * @param {Options} options - * @returns {AsyncIterable} - */ -async function * _glob (base, dir, pattern, options) { - for await (const entry of await fs.readdir(path.join(base, dir))) { - const relativeEntryPath = path.join(dir, entry) - const absoluteEntryPath = path.join(base, dir, entry) - const stats = await fs.stat(absoluteEntryPath) - let match = minimatch(relativeEntryPath, pattern, options) - - if (options.ignore && match && options.ignore.reduce((acc, curr) => { - return acc || minimatch(relativeEntryPath, curr, options) - }, false)) { - match = false + return date; +}; +exports.parseRfc3339DateTimeWithOffset = parseRfc3339DateTimeWithOffset; +const IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); +const RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/); +const ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/); +const parseRfc7231DateTime = (value) => { + if (value === null || value === undefined) { + return undefined; } - - if (match && !(stats.isDirectory() && options.nodir)) { - yield options.absolute ? absoluteEntryPath : relativeEntryPath + if (typeof value !== "string") { + throw new TypeError("RFC-7231 date-times must be expressed as strings"); } - - if (stats.isDirectory()) { - yield * _glob(base, relativeEntryPath, pattern, options) + let match = IMF_FIXDATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return buildDate((0, parse_utils_1.strictParseShort)(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); } - } -} - -module.exports = glob - - -/***/ }), - -/***/ 26805: -/***/ ((module) => { - -// If the passed object is an (async) iterable, then get the iterator -// If it's probably an iterator already (i.e. has next function) return it -// else throw -module.exports = function getIterator (obj) { - if (obj) { - if (typeof obj[Symbol.iterator] === 'function') { - return obj[Symbol.iterator]() + match = RFC_850_DATE.exec(value); + if (match) { + const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match; + return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { + hours, + minutes, + seconds, + fractionalMilliseconds, + })); } - if (typeof obj[Symbol.asyncIterator] === 'function') { - return obj[Symbol.asyncIterator]() + match = ASC_TIME.exec(value); + if (match) { + const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match; + return buildDate((0, parse_utils_1.strictParseShort)(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds }); } - if (typeof obj.next === 'function') { - return obj // probably an iterator + throw new TypeError("Invalid RFC-7231 date-time value"); +}; +exports.parseRfc7231DateTime = parseRfc7231DateTime; +const parseEpochTimestamp = (value) => { + if (value === null || value === undefined) { + return undefined; } - } - throw new Error('argument is not an iterator or iterable') -} + let valueAsDouble; + if (typeof value === "number") { + valueAsDouble = value; + } + else if (typeof value === "string") { + valueAsDouble = (0, parse_utils_1.strictParseDouble)(value); + } + else { + throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation"); + } + if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) { + throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics"); + } + return new Date(Math.round(valueAsDouble * 1000)); +}; +exports.parseEpochTimestamp = parseEpochTimestamp; +const buildDate = (year, month, day, time) => { + const adjustedMonth = month - 1; + validateDayOfMonth(year, adjustedMonth, day); + return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds))); +}; +const parseTwoDigitYear = (value) => { + const thisYear = new Date().getUTCFullYear(); + const valueInThisCentury = Math.floor(thisYear / 100) * 100 + (0, parse_utils_1.strictParseShort)(stripLeadingZeroes(value)); + if (valueInThisCentury < thisYear) { + return valueInThisCentury + 100; + } + return valueInThisCentury; +}; +const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000; +const adjustRfc850Year = (input) => { + if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) { + return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds())); + } + return input; +}; +const parseMonthByShortName = (value) => { + const monthIdx = MONTHS.indexOf(value); + if (monthIdx < 0) { + throw new TypeError(`Invalid month: ${value}`); + } + return monthIdx + 1; +}; +const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; +const validateDayOfMonth = (year, month, day) => { + let maxDays = DAYS_IN_MONTH[month]; + if (month === 1 && isLeapYear(year)) { + maxDays = 29; + } + if (day > maxDays) { + throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`); + } +}; +const isLeapYear = (year) => { + return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0); +}; +const parseDateValue = (value, type, lower, upper) => { + const dateVal = (0, parse_utils_1.strictParseByte)(stripLeadingZeroes(value)); + if (dateVal < lower || dateVal > upper) { + throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`); + } + return dateVal; +}; +const parseMilliseconds = (value) => { + if (value === null || value === undefined) { + return 0; + } + return (0, parse_utils_1.strictParseFloat32)("0." + value) * 1000; +}; +const parseOffsetToMilliseconds = (value) => { + const directionStr = value[0]; + let direction = 1; + if (directionStr == "+") { + direction = 1; + } + else if (directionStr == "-") { + direction = -1; + } + else { + throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`); + } + const hour = Number(value.substring(1, 3)); + const minute = Number(value.substring(4, 6)); + return direction * (hour * 60 + minute) * 60 * 1000; +}; +const stripLeadingZeroes = (value) => { + let idx = 0; + while (idx < value.length - 1 && value.charAt(idx) === "0") { + idx++; + } + if (idx === 0) { + return value; + } + return value.slice(idx); +}; /***/ }), -/***/ 9645: -/***/ ((module) => { - -"use strict"; +/***/ 65795: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -module.exports = clone +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.withBaseException = exports.throwDefaultError = void 0; +const exceptions_1 = __nccwpck_require__(60086); +const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined; + const response = new exceptionCtor({ + name: (parsedBody === null || parsedBody === void 0 ? void 0 : parsedBody.code) || (parsedBody === null || parsedBody === void 0 ? void 0 : parsedBody.Code) || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata, + }); + throw (0, exceptions_1.decorateServiceException)(response, parsedBody); +}; +exports.throwDefaultError = throwDefaultError; +const withBaseException = (ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + (0, exports.throwDefaultError)({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; +}; +exports.withBaseException = withBaseException; +const deserializeMetadata = (output) => { + var _a, _b; + return ({ + httpStatusCode: output.statusCode, + requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], + }); +}; -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ -} -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj +/***/ }), - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) +/***/ 75712: +/***/ ((__unused_webpack_module, exports) => { - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) - return copy -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.loadConfigsForDefaultMode = void 0; +const loadConfigsForDefaultMode = (mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100, + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100, + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100, + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 30000, + }; + default: + return {}; + } +}; +exports.loadConfigsForDefaultMode = loadConfigsForDefaultMode; /***/ }), -/***/ 68644: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 23656: +/***/ ((__unused_webpack_module, exports) => { -var fs = __nccwpck_require__(57147) -var polyfills = __nccwpck_require__(98944) -var legacy = __nccwpck_require__(75288) -var clone = __nccwpck_require__(9645) -var util = __nccwpck_require__(73837) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.emitWarningIfUnsupportedVersion = void 0; +let warningEmitted = false; +const emitWarningIfUnsupportedVersion = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 14) { + warningEmitted = true; + } +}; +exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' -} +/***/ }), -function noop () {} +/***/ 60086: +/***/ ((__unused_webpack_module, exports) => { -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decorateServiceException = exports.ServiceException = void 0; +class ServiceException extends Error { + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, ServiceException.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; } - }) } - -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) - } - -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) - - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - resetQueue() +exports.ServiceException = ServiceException; +const decorateServiceException = (exception, additions = {}) => { + Object.entries(additions) + .filter(([, v]) => v !== undefined) + .forEach(([k, v]) => { + if (exception[k] == undefined || exception[k] === "") { + exception[k] = v; } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; +}; +exports.decorateServiceException = decorateServiceException; - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } - - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) - - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - resetQueue() - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }) - return closeSync - })(fs.closeSync) +/***/ }), - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - __nccwpck_require__(39491).equal(fs[gracefulQueue].length, 0) - }) - } -} +/***/ 71345: +/***/ ((__unused_webpack_module, exports) => { -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.extendedEncodeURIComponent = void 0; +function extendedEncodeURIComponent(str) { + return encodeURIComponent(str).replace(/[!'()*]/g, function (c) { + return "%" + c.charCodeAt(0).toString(16).toUpperCase(); + }); } +exports.extendedEncodeURIComponent = extendedEncodeURIComponent; -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch - - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - - return go$readFile(path, options, cb) - function go$readFile (path, options, cb, startTime) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } +/***/ }), - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null +/***/ 56003: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - return go$writeFile(path, data, options, cb) - function go$writeFile (path, data, options, cb, startTime) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveChecksumRuntimeConfig = exports.getChecksumConfiguration = exports.AlgorithmId = void 0; +const types_1 = __nccwpck_require__(75751); +Object.defineProperty(exports, "AlgorithmId", ({ enumerable: true, get: function () { return types_1.AlgorithmId; } })); +const getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in types_1.AlgorithmId) { + const algorithmId = types_1.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === undefined) { + continue; } - }) + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId], + }); } - } + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + }, + }; +}; +exports.getChecksumConfiguration = getChecksumConfiguration; +const resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; +}; +exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig; - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null - return go$appendFile(path, data, options, cb) +/***/ }), - function go$appendFile (path, data, options, cb, startTime) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } +/***/ 31676: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return go$copyFile(src, dest, flags, cb) - function go$copyFile (src, dest, flags, cb, startTime) { - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - } - }) - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveDefaultRuntimeConfig = exports.getDefaultClientConfiguration = exports.getDefaultExtensionConfiguration = void 0; +const checksum_1 = __nccwpck_require__(56003); +const retry_1 = __nccwpck_require__(7198); +const getDefaultExtensionConfiguration = (runtimeConfig) => { + return { + ...(0, checksum_1.getChecksumConfiguration)(runtimeConfig), + ...(0, retry_1.getRetryConfiguration)(runtimeConfig), + }; +}; +exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration; +exports.getDefaultClientConfiguration = exports.getDefaultExtensionConfiguration; +const resolveDefaultRuntimeConfig = (config) => { + return { + ...(0, checksum_1.resolveChecksumRuntimeConfig)(config), + ...(0, retry_1.resolveRetryRuntimeConfig)(config), + }; +}; +exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; - var fs$readdir = fs.readdir - fs.readdir = readdir - var noReaddirOptionVersions = /^v[0-5]\./ - function readdir (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null - var go$readdir = noReaddirOptionVersions.test(process.version) - ? function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, fs$readdirCallback( - path, options, cb, startTime - )) - } - : function go$readdir (path, options, cb, startTime) { - return fs$readdir(path, options, fs$readdirCallback( - path, options, cb, startTime - )) - } +/***/ }), - return go$readdir(path, options, cb) +/***/ 62154: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - function fs$readdirCallback (path, options, cb, startTime) { - return function (err, files) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([ - go$readdir, - [path, options, cb], - err, - startTime || Date.now(), - Date.now() - ]) - else { - if (files && files.sort) - files.sort() - if (typeof cb === 'function') - cb.call(this, err, files) - } - } - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(72073); +tslib_1.__exportStar(__nccwpck_require__(31676), exports); - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } +/***/ }), - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } +/***/ 7198: +/***/ ((__unused_webpack_module, exports) => { - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveRetryRuntimeConfig = exports.getRetryConfiguration = void 0; +const getRetryConfiguration = (runtimeConfig) => { + let _retryStrategy = runtimeConfig.retryStrategy; + return { + setRetryStrategy(retryStrategy) { + _retryStrategy = retryStrategy; + }, + retryStrategy() { + return _retryStrategy; + }, + }; +}; +exports.getRetryConfiguration = getRetryConfiguration; +const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; +}; +exports.resolveRetryRuntimeConfig = resolveRetryRuntimeConfig; - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() +/***/ }), - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } +/***/ 37697: +/***/ ((__unused_webpack_module, exports) => { - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getArrayIfSingleItem = void 0; +const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; +exports.getArrayIfSingleItem = getArrayIfSingleItem; - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } +/***/ }), - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null +/***/ 78957: +/***/ ((__unused_webpack_module, exports) => { - return go$open(path, flags, mode, cb) - function go$open (path, flags, mode, cb, startTime) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getValueFromTextNode = void 0; +const getValueFromTextNode = (obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) { + obj[key] = obj[key][textNodeName]; + } + else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = (0, exports.getValueFromTextNode)(obj[key]); } - }) } - } - - return fs -} + return obj; +}; +exports.getValueFromTextNode = getValueFromTextNode; -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) - retry() -} -// keep track of the timeout between retry() calls -var retryTimer +/***/ }), -// reset the startTime and lastTime to now -// this resets the start of the 60 second overall timeout as well as the -// delay between attempts so that we'll retry these jobs sooner -function resetQueue () { - var now = Date.now() - for (var i = 0; i < fs[gracefulQueue].length; ++i) { - // entries that are only a length of 2 are from an older version, don't - // bother modifying those since they'll be retried anyway. - if (fs[gracefulQueue][i].length > 2) { - fs[gracefulQueue][i][3] = now // startTime - fs[gracefulQueue][i][4] = now // lastTime - } - } - // call retry to make sure we're actively processing the queue - retry() -} +/***/ 33218: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function retry () { - // clear the timer and remove it to help prevent unintended concurrency - clearTimeout(retryTimer) - retryTimer = undefined - if (fs[gracefulQueue].length === 0) - return +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(72073); +tslib_1.__exportStar(__nccwpck_require__(21670), exports); +tslib_1.__exportStar(__nccwpck_require__(96620), exports); +tslib_1.__exportStar(__nccwpck_require__(92306), exports); +tslib_1.__exportStar(__nccwpck_require__(52228), exports); +tslib_1.__exportStar(__nccwpck_require__(20081), exports); +tslib_1.__exportStar(__nccwpck_require__(9588), exports); +tslib_1.__exportStar(__nccwpck_require__(51701), exports); +tslib_1.__exportStar(__nccwpck_require__(65795), exports); +tslib_1.__exportStar(__nccwpck_require__(75712), exports); +tslib_1.__exportStar(__nccwpck_require__(23656), exports); +tslib_1.__exportStar(__nccwpck_require__(62154), exports); +tslib_1.__exportStar(__nccwpck_require__(60086), exports); +tslib_1.__exportStar(__nccwpck_require__(71345), exports); +tslib_1.__exportStar(__nccwpck_require__(37697), exports); +tslib_1.__exportStar(__nccwpck_require__(78957), exports); +tslib_1.__exportStar(__nccwpck_require__(90345), exports); +tslib_1.__exportStar(__nccwpck_require__(14477), exports); +tslib_1.__exportStar(__nccwpck_require__(41456), exports); +tslib_1.__exportStar(__nccwpck_require__(68799), exports); +tslib_1.__exportStar(__nccwpck_require__(96213), exports); +tslib_1.__exportStar(__nccwpck_require__(95339), exports); +tslib_1.__exportStar(__nccwpck_require__(93288), exports); + + +/***/ }), + +/***/ 90345: +/***/ ((__unused_webpack_module, exports) => { - var elem = fs[gracefulQueue].shift() - var fn = elem[0] - var args = elem[1] - // these items may be unset if they were added by an older graceful-fs - var err = elem[2] - var startTime = elem[3] - var lastTime = elem[4] - // if we don't have a startTime we have no way of knowing if we've waited - // long enough, so go ahead and retry this item now - if (startTime === undefined) { - debug('RETRY', fn.name, args) - fn.apply(null, args) - } else if (Date.now() - startTime >= 60000) { - // it's been more than 60 seconds total, bail now - debug('TIMEOUT', fn.name, args) - var cb = args.pop() - if (typeof cb === 'function') - cb.call(null, err) - } else { - // the amount of time between the last attempt and right now - var sinceAttempt = Date.now() - lastTime - // the amount of time between when we first tried, and when we last tried - // rounded up to at least 1 - var sinceStart = Math.max(lastTime - startTime, 1) - // backoff. wait longer than the total time we've been retrying, but only - // up to a maximum of 100ms - var desiredDelay = Math.min(sinceStart * 1.2, 100) - // it's been long enough since the last retry, do it again - if (sinceAttempt >= desiredDelay) { - debug('RETRY', fn.name, args) - fn.apply(null, args.concat([startTime])) - } else { - // if we can't do this job yet, push it to the end of the queue - // and let the next iteration check again - fs[gracefulQueue].push(elem) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.LazyJsonString = exports.StringWrapper = void 0; +const StringWrapper = function () { + const Class = Object.getPrototypeOf(this).constructor; + const Constructor = Function.bind.apply(String, [null, ...arguments]); + const instance = new Constructor(); + Object.setPrototypeOf(instance, Class.prototype); + return instance; +}; +exports.StringWrapper = StringWrapper; +exports.StringWrapper.prototype = Object.create(String.prototype, { + constructor: { + value: exports.StringWrapper, + enumerable: false, + writable: true, + configurable: true, + }, +}); +Object.setPrototypeOf(exports.StringWrapper, String); +class LazyJsonString extends exports.StringWrapper { + deserializeJSON() { + return JSON.parse(super.toString()); + } + toJSON() { + return super.toString(); + } + static fromObject(object) { + if (object instanceof LazyJsonString) { + return object; + } + else if (object instanceof String || typeof object === "string") { + return new LazyJsonString(object); + } + return new LazyJsonString(JSON.stringify(object)); } - } - - // schedule our next run if one isn't already scheduled - if (retryTimer === undefined) { - retryTimer = setTimeout(retry, 0) - } } +exports.LazyJsonString = LazyJsonString; /***/ }), -/***/ 75288: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var Stream = (__nccwpck_require__(12781).Stream) - -module.exports = legacy - -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream - } - - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); - - Stream.call(this); - - var self = this; - - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; - - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; +/***/ 14477: +/***/ ((__unused_webpack_module, exports) => { - options = options || {}; - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.take = exports.convertMap = exports.map = void 0; +function map(arg0, arg1, arg2) { + let target; + let filter; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; } - - if (this.encoding) this.setEncoding(this.encoding); - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; + else { + target = arg0; + if (typeof arg1 === "function") { + filter = arg1; + instructions = arg2; + return mapWithFilter(target, filter, instructions); + } + else { + instructions = arg1; + } } - - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); } - - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; + return target; +} +exports.map = map; +const convertMap = (target) => { + const output = {}; + for (const [k, v] of Object.entries(target || {})) { + output[k] = [, v]; + } + return output; +}; +exports.convertMap = convertMap; +const take = (source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; +}; +exports.take = take; +const mapWithFilter = (target, filter, instructions) => { + return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; + } + else { + if (typeof value === "function") { + _instructions[key] = [filter, value()]; + } + else { + _instructions[key] = [filter, value]; + } + } + return _instructions; + }, {})); +}; +const applyInstruction = (target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; + } + const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if ((typeof filter === "function" && filter(source[sourceKey])) || (typeof filter !== "function" && !!filter)) { + target[targetKey] = valueFn(source[sourceKey]); + } return; - } - - self.fd = fd; - self.emit('open', fd); - self._read(); - }) - } - - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); - - Stream.call(this); - - this.path = path; - this.fd = null; - this.writable = true; - - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; - - options = options || {}; - - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; } - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; + let [filter, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter === undefined && (_value = value()) != null; + const customFilterPassed = (typeof filter === "function" && !!filter(void 0)) || (typeof filter !== "function" && !!filter); + if (defaultFilterPassed) { + target[targetKey] = _value; + } + else if (customFilterPassed) { + target[targetKey] = value(); + } } - - this.busy = false; - this._queue = []; - - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); + else { + const defaultFilterPassed = filter === undefined && value != null; + const customFilterPassed = (typeof filter === "function" && !!filter(value)) || (typeof filter !== "function" && !!filter); + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } } - } -} +}; +const nonNullish = (_) => _ != null; +const pass = (_) => _; /***/ }), -/***/ 98944: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var constants = __nccwpck_require__(22057) - -var origCwd = process.cwd -var cwd = null - -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform - -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -try { - process.cwd() -} catch (er) {} - -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) -} - -module.exports = patch - -function patch (fs) { - // (re-)implement some things that are known busted or missing. - - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) - } - - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) - } - - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. - - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) - - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) - - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) - - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) - - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) +/***/ 41456: +/***/ ((__unused_webpack_module, exports) => { - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) - // if lchmod/lchown do not exist, then make them no-ops - if (fs.chmod && !fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (fs.chown && !fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.logger = exports.strictParseByte = exports.strictParseShort = exports.strictParseInt32 = exports.strictParseInt = exports.strictParseLong = exports.limitedParseFloat32 = exports.limitedParseFloat = exports.handleFloat = exports.limitedParseDouble = exports.strictParseFloat32 = exports.strictParseFloat = exports.strictParseDouble = exports.expectUnion = exports.expectString = exports.expectObject = exports.expectNonNull = exports.expectByte = exports.expectShort = exports.expectInt32 = exports.expectInt = exports.expectLong = exports.expectFloat32 = exports.expectNumber = exports.expectBoolean = exports.parseBoolean = void 0; +const parseBoolean = (value) => { + switch (value) { + case "true": + return true; + case "false": + return false; + default: + throw new Error(`Unable to parse boolean value "${value}"`); } - fs.lchownSync = function () {} - } - - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. - - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = typeof fs.rename !== 'function' ? fs.rename - : (function (fs$rename) { - function rename (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) - return rename - })(fs.rename) - } - - // if read() returns EAGAIN, then just try it again. - fs.read = typeof fs.read !== 'function' ? fs.read - : (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) +}; +exports.parseBoolean = parseBoolean; +const expectBoolean = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "number") { + if (value === 0 || value === 1) { + exports.logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (value === 0) { + return false; + } + if (value === 1) { + return true; } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) } - - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) - - fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync - : (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue + if (typeof value === "string") { + const lower = value.toLowerCase(); + if (lower === "false" || lower === "true") { + exports.logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`)); + } + if (lower === "false") { + return false; + } + if (lower === "true") { + return true; } - throw er - } } - }})(fs.readSync) - - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return + if (typeof value === "boolean") { + return value; + } + throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`); +}; +exports.expectBoolean = expectBoolean; +const expectNumber = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "string") { + const parsed = parseFloat(value); + if (!Number.isNaN(parsed)) { + if (String(parsed) !== String(value)) { + exports.logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`)); + } + return parsed; } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) } + if (typeof value === "number") { + return value; + } + throw new TypeError(`Expected number, got ${typeof value}: ${value}`); +}; +exports.expectNumber = expectNumber; +const MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23)); +const expectFloat32 = (value) => { + const expected = (0, exports.expectNumber)(value); + if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) { + if (Math.abs(expected) > MAX_FLOAT) { + throw new TypeError(`Expected 32-bit float, got ${value}`); + } + } + return expected; +}; +exports.expectFloat32 = expectFloat32; +const expectLong = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (Number.isInteger(value) && !Number.isNaN(value)) { + return value; + } + throw new TypeError(`Expected integer, got ${typeof value}: ${value}`); +}; +exports.expectLong = expectLong; +exports.expectInt = exports.expectLong; +const expectInt32 = (value) => expectSizedInt(value, 32); +exports.expectInt32 = expectInt32; +const expectShort = (value) => expectSizedInt(value, 16); +exports.expectShort = expectShort; +const expectByte = (value) => expectSizedInt(value, 8); +exports.expectByte = expectByte; +const expectSizedInt = (value, size) => { + const expected = (0, exports.expectLong)(value); + if (expected !== undefined && castInt(expected, size) !== expected) { + throw new TypeError(`Expected ${size}-bit integer, got ${value}`); + } + return expected; +}; +const castInt = (value, size) => { + switch (size) { + case 32: + return Int32Array.of(value)[0]; + case 16: + return Int16Array.of(value)[0]; + case 8: + return Int8Array.of(value)[0]; + } +}; +const expectNonNull = (value, location) => { + if (value === null || value === undefined) { + if (location) { + throw new TypeError(`Expected a non-null value for ${location}`); + } + throw new TypeError("Expected a non-null value"); + } + return value; +}; +exports.expectNonNull = expectNonNull; +const expectObject = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "object" && !Array.isArray(value)) { + return value; + } + const receivedType = Array.isArray(value) ? "array" : typeof value; + throw new TypeError(`Expected object, got ${receivedType}: ${value}`); +}; +exports.expectObject = expectObject; +const expectString = (value) => { + if (value === null || value === undefined) { + return undefined; + } + if (typeof value === "string") { + return value; + } + if (["boolean", "number", "bigint"].includes(typeof value)) { + exports.logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`)); + return String(value); + } + throw new TypeError(`Expected string, got ${typeof value}: ${value}`); +}; +exports.expectString = expectString; +const expectUnion = (value) => { + if (value === null || value === undefined) { + return undefined; + } + const asObject = (0, exports.expectObject)(value); + const setKeys = Object.entries(asObject) + .filter(([, v]) => v != null) + .map(([k]) => k); + if (setKeys.length === 0) { + throw new TypeError(`Unions must have exactly one non-null member. None were found.`); + } + if (setKeys.length > 1) { + throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`); + } + return asObject; +}; +exports.expectUnion = expectUnion; +const strictParseDouble = (value) => { + if (typeof value == "string") { + return (0, exports.expectNumber)(parseNumber(value)); + } + return (0, exports.expectNumber)(value); +}; +exports.strictParseDouble = strictParseDouble; +exports.strictParseFloat = exports.strictParseDouble; +const strictParseFloat32 = (value) => { + if (typeof value == "string") { + return (0, exports.expectFloat32)(parseNumber(value)); + } + return (0, exports.expectFloat32)(value); +}; +exports.strictParseFloat32 = strictParseFloat32; +const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g; +const parseNumber = (value) => { + const matches = value.match(NUMBER_REGEX); + if (matches === null || matches[0].length !== value.length) { + throw new TypeError(`Expected real number, got implicit NaN`); + } + return parseFloat(value); +}; +const limitedParseDouble = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return (0, exports.expectNumber)(value); +}; +exports.limitedParseDouble = limitedParseDouble; +exports.handleFloat = exports.limitedParseDouble; +exports.limitedParseFloat = exports.limitedParseDouble; +const limitedParseFloat32 = (value) => { + if (typeof value == "string") { + return parseFloatString(value); + } + return (0, exports.expectFloat32)(value); +}; +exports.limitedParseFloat32 = limitedParseFloat32; +const parseFloatString = (value) => { + switch (value) { + case "NaN": + return NaN; + case "Infinity": + return Infinity; + case "-Infinity": + return -Infinity; + default: + throw new Error(`Unable to parse float value: ${value}`); + } +}; +const strictParseLong = (value) => { + if (typeof value === "string") { + return (0, exports.expectLong)(parseNumber(value)); + } + return (0, exports.expectLong)(value); +}; +exports.strictParseLong = strictParseLong; +exports.strictParseInt = exports.strictParseLong; +const strictParseInt32 = (value) => { + if (typeof value === "string") { + return (0, exports.expectInt32)(parseNumber(value)); + } + return (0, exports.expectInt32)(value); +}; +exports.strictParseInt32 = strictParseInt32; +const strictParseShort = (value) => { + if (typeof value === "string") { + return (0, exports.expectShort)(parseNumber(value)); + } + return (0, exports.expectShort)(value); +}; +exports.strictParseShort = strictParseShort; +const strictParseByte = (value) => { + if (typeof value === "string") { + return (0, exports.expectByte)(parseNumber(value)); + } + return (0, exports.expectByte)(value); +}; +exports.strictParseByte = strictParseByte; +const stackTraceWarning = (message) => { + return String(new TypeError(message).stack || message) + .split("\n") + .slice(0, 5) + .filter((s) => !s.includes("stackTraceWarning")) + .join("\n"); +}; +exports.logger = { + warn: console.warn, +}; - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) +/***/ }), + +/***/ 68799: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolvedPath = void 0; +const extended_encode_uri_component_1 = __nccwpck_require__(71345); +const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => { + if (input != null && input[memberName] !== undefined) { + const labelValue = labelValueProvider(); + if (labelValue.length <= 0) { + throw new Error("Empty value provided for input HTTP label: " + memberName + "."); } - } - return ret + resolvedPath = resolvedPath.replace(uriLabel, isGreedyLabel + ? labelValue + .split("/") + .map((segment) => (0, extended_encode_uri_component_1.extendedEncodeURIComponent)(segment)) + .join("/") + : (0, extended_encode_uri_component_1.extendedEncodeURIComponent)(labelValue)); } - } + else { + throw new Error("No value provided for input HTTP label: " + memberName + "."); + } + return resolvedPath; +}; +exports.resolvedPath = resolvedPath; - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } +/***/ }), - } else if (fs.futimes) { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } - } +/***/ 96213: +/***/ ((__unused_webpack_module, exports) => { - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.serializeFloat = void 0; +const serializeFloat = (value) => { + if (value !== value) { + return "NaN"; } - } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } +}; +exports.serializeFloat = serializeFloat; - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } +/***/ }), - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } - } +/***/ 95339: +/***/ ((__unused_webpack_module, exports) => { - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports._json = void 0; +const _json = (obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_) => _ != null).map(exports._json); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = (0, exports._json)(obj[key]); } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) + return target; } - } + return obj; +}; +exports._json = _json; - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - return stats; - } - } - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true +/***/ }), - if (er.code === "ENOSYS") - return true +/***/ 93288: +/***/ ((__unused_webpack_module, exports) => { - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } - return false - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.splitEvery = void 0; +function splitEvery(value, delimiter, numDelimiters) { + if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) { + throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery."); + } + const segments = value.split(delimiter); + if (numDelimiters === 1) { + return segments; + } + const compoundSegments = []; + let currentSegment = ""; + for (let i = 0; i < segments.length; i++) { + if (currentSegment === "") { + currentSegment = segments[i]; + } + else { + currentSegment += delimiter + segments[i]; + } + if ((i + 1) % numDelimiters === 0) { + compoundSegments.push(currentSegment); + currentSegment = ""; + } + } + if (currentSegment !== "") { + compoundSegments.push(currentSegment); + } + return compoundSegments; } +exports.splitEvery = splitEvery; /***/ }), -/***/ 35779: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 72073: +/***/ ((module) => { -"use strict"; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + __assign = Object.assign || function (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; + }; -// @ts-ignore -const SparseArray = __nccwpck_require__(447) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) + __rest = function (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; + }; -/** - * @typedef {import('./consumable-hash').InfiniteHash} InfiniteHash - * @typedef {import('../').UserBucketOptions} UserBucketOptions - */ + __decorate = function (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; + }; -/** - * @template V - * @typedef {object} BucketChild - * @property {string} key - * @property {V} value - * @property {InfiniteHash} hash - */ + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -/** - * @template B - * - * @typedef {object} SA - * @property {number} length - * @property {() => B[]} compactArray - * @property {(i: number) => B} get - * @property {(i: number, value: B) => void} set - * @property { (fn: (acc: A, curr: B, index: number) => A, initial: A) => B} reduce - * @property {(fn: (item: B) => boolean) => B | undefined} find - * @property {() => number[]} bitField - * @property {(i: number) => void} unset - */ + __esDecorate = function (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)); }; + 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; + }; -/** - * @template T - * - * @typedef {object} BucketPosition - * @property {Bucket} bucket - * @property {number} pos - * @property {InfiniteHash} hash - * @property {BucketChild} [existingChild] - */ + __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; + }; -/** - * @typedef {object} BucketOptions - * @property {number} bits - * @property {(value: Uint8Array | InfiniteHash) => InfiniteHash} hash - */ + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -/** - * @template T - */ -class Bucket { - /** - * @param {BucketOptions} options - * @param {Bucket} [parent] - * @param {number} [posAtParent=0] - */ - constructor (options, parent, posAtParent = 0) { - this._options = options - this._popCount = 0 - this._parent = parent - this._posAtParent = posAtParent + __setFunctionName = function (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 }); + }; - /** @type {SA | BucketChild>} */ - this._children = new SparseArray() + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - /** @type {string | null} */ - this.key = null - } + __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()); + }); + }; - /** - * @param {string} key - * @param {T} value - */ - async put (key, value) { - const place = await this._findNewBucketAndPos(key) + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; - await place.bucket._putAt(place, key, value) - } + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - /** - * @param {string} key - */ - async get (key) { - const child = await this._findChild(key) + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - if (child) { - return child.value - } - } + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - /** - * @param {string} key - */ - async del (key) { - const place = await this._findPlace(key) - const child = place.bucket._at(place.pos) + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; - if (child && child.key === key) { - place.bucket._delAt(place.pos) - } - } + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; - /** - * @returns {number} - */ - leafCount () { - const children = this._children.compactArray() + /** @deprecated */ + __spreadArrays = function () { + 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; + }; - return children.reduce((acc, child) => { - if (child instanceof Bucket) { - return acc + child.leafCount() - } + __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)); + }; - return acc + 1 - }, 0) - } + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - childrenCount () { - return this._children.length - } + __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(n, v); }); }; } + 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]); } + }; - onlyChild () { - return this._children.get(0) - } + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - /** - * @returns {Iterable>} - */ - * eachLeafSeries () { - const children = this._children.compactArray() + __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); } + }; - for (const child of children) { - if (child instanceof Bucket) { - yield * child.eachLeafSeries() - } else { - yield child - } - } + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - // this is necessary because tsc requires a @return annotation as it - // can't derive a return type due to the recursion, and eslint requires - // a return statement when there is a @return annotation - return [] - } + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - /** - * @param {(value: BucketChild, index: number) => T} map - * @param {(reduced: any) => any} reduce - */ - serialize (map, reduce) { - /** @type {T[]} */ - const acc = [] - // serialize to a custom non-sparse representation - return reduce(this._children.reduce((acc, child, index) => { - if (child) { - if (child instanceof Bucket) { - acc.push(child.serialize(map, reduce)) - } else { - acc.push(map(child, index)) + __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; + }; + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); } - } - return acc - }, acc)) - } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - /** - * @param {(value: BucketChild) => Promise} asyncMap - * @param {(reduced: any) => Promise} asyncReduce - */ - asyncTransform (asyncMap, asyncReduce) { - return asyncTransformBucket(this, asyncMap, asyncReduce) - } + 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; + }; - toJSON () { - return this.serialize(mapNode, reduceNodes) - } + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; - prettyPrint () { - return JSON.stringify(this.toJSON(), null, ' ') - } + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); - tableSize () { - return Math.pow(2, this._options.bits) - } - /** - * @param {string} key - * @returns {Promise | undefined>} - */ - async _findChild (key) { - const result = await this._findPlace(key) - const child = result.bucket._at(result.pos) +/***/ }), - if (child instanceof Bucket) { - // should not be possible, this._findPlace should always - // return a location for a child, not a bucket - return undefined - } +/***/ 27311: +/***/ ((__unused_webpack_module, exports) => { - if (child && child.key === key) { - return child - } - } - /** - * @param {string | InfiniteHash} key - * @returns {Promise>} - */ - async _findPlace (key) { - const hashValue = this._options.hash(typeof key === 'string' ? uint8ArrayFromString(key) : key) - const index = await hashValue.take(this._options.bits) +Object.defineProperty(exports, "__esModule", ({ value: true })); - const child = this._children.get(index) - if (child instanceof Bucket) { - return child._findPlace(hashValue) - } +/***/ }), - return { - bucket: this, - pos: index, - hash: hashValue, - existingChild: child - } - } +/***/ 30177: +/***/ ((__unused_webpack_module, exports) => { - /** - * @param {string | InfiniteHash} key - * @returns {Promise>} - */ - async _findNewBucketAndPos (key) { - const place = await this._findPlace(key) - if (place.existingChild && place.existingChild.key !== key) { - // conflict - const bucket = new Bucket(this._options, place.bucket, place.pos) - place.bucket._putObjectAt(place.pos, bucket) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpApiKeyAuthLocation = void 0; +var HttpApiKeyAuthLocation; +(function (HttpApiKeyAuthLocation) { + HttpApiKeyAuthLocation["HEADER"] = "header"; + HttpApiKeyAuthLocation["QUERY"] = "query"; +})(HttpApiKeyAuthLocation = exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - // put the previous value - const newPlace = await bucket._findPlace(place.existingChild.hash) - newPlace.bucket._putAt(newPlace, place.existingChild.key, place.existingChild.value) - return bucket._findNewBucketAndPos(place.hash) - } +/***/ }), - // no conflict, we found the place - return place - } +/***/ 3890: +/***/ ((__unused_webpack_module, exports) => { - /** - * @param {BucketPosition} place - * @param {string} key - * @param {T} value - */ - _putAt (place, key, value) { - this._putObjectAt(place.pos, { - key: key, - value: value, - hash: place.hash - }) - } - /** - * @param {number} pos - * @param {Bucket | BucketChild} object - */ - _putObjectAt (pos, object) { - if (!this._children.get(pos)) { - this._popCount++ - } - this._children.set(pos, object) - } +Object.defineProperty(exports, "__esModule", ({ value: true })); - /** - * @param {number} pos - */ - _delAt (pos) { - if (pos === -1) { - throw new Error('Invalid position') - } - if (this._children.get(pos)) { - this._popCount-- - } - this._children.unset(pos) - this._level() - } +/***/ }), - _level () { - if (this._parent && this._popCount <= 1) { - if (this._popCount === 1) { - // remove myself from parent, replacing me with my only child - const onlyChild = this._children.find(exists) +/***/ 97166: +/***/ ((__unused_webpack_module, exports) => { - if (onlyChild && !(onlyChild instanceof Bucket)) { - const hash = onlyChild.hash - hash.untake(this._options.bits) - const place = { - pos: this._posAtParent, - hash: hash, - bucket: this._parent - } - this._parent._putAt(place, onlyChild.key, onlyChild.value) - } - } else { - this._parent._delAt(this._posAtParent) - } - } - } - /** - * @param {number} index - * @returns {BucketChild | Bucket | undefined} - */ - _at (index) { - return this._children.get(index) - } -} +Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * @param {any} o - */ -function exists (o) { - return Boolean(o) -} -/** - * - * @param {*} node - * @param {number} index - */ -function mapNode (node, index) { - return node.key -} +/***/ }), -/** - * @param {*} nodes - */ -function reduceNodes (nodes) { - return nodes -} +/***/ 54150: +/***/ ((__unused_webpack_module, exports) => { -/** - * @template T - * - * @param {Bucket} bucket - * @param {(value: BucketChild) => Promise} asyncMap - * @param {(reduced: any) => Promise} asyncReduce - */ -async function asyncTransformBucket (bucket, asyncMap, asyncReduce) { - const output = [] - for (const child of bucket._children.compactArray()) { - if (child instanceof Bucket) { - await asyncTransformBucket(child, asyncMap, asyncReduce) - } else { - const mappedChildren = await asyncMap(child) +Object.defineProperty(exports, "__esModule", ({ value: true })); - output.push({ - bitField: bucket._children.bitField(), - children: mappedChildren - }) - } - } - return asyncReduce(output) -} +/***/ }), -module.exports = Bucket +/***/ 87652: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 1267: -/***/ ((module) => { +/***/ 35711: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.HttpAuthLocation = void 0; +var HttpAuthLocation; +(function (HttpAuthLocation) { + HttpAuthLocation["HEADER"] = "header"; + HttpAuthLocation["QUERY"] = "query"; +})(HttpAuthLocation = exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); -const START_MASKS = [ - 0b11111111, - 0b11111110, - 0b11111100, - 0b11111000, - 0b11110000, - 0b11100000, - 0b11000000, - 0b10000000 -] -const STOP_MASKS = [ - 0b00000001, - 0b00000011, - 0b00000111, - 0b00001111, - 0b00011111, - 0b00111111, - 0b01111111, - 0b11111111 -] +/***/ }), -module.exports = class ConsumableBuffer { - /** - * @param {Uint8Array} value - */ - constructor (value) { - this._value = value - this._currentBytePos = value.length - 1 - this._currentBitPos = 7 - } +/***/ 18281: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - availableBits () { - return this._currentBitPos + 1 + this._currentBytePos * 8 - } - totalBits () { - return this._value.length * 8 - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(78889); +tslib_1.__exportStar(__nccwpck_require__(35711), exports); +tslib_1.__exportStar(__nccwpck_require__(30177), exports); +tslib_1.__exportStar(__nccwpck_require__(3890), exports); +tslib_1.__exportStar(__nccwpck_require__(97166), exports); +tslib_1.__exportStar(__nccwpck_require__(54150), exports); +tslib_1.__exportStar(__nccwpck_require__(87652), exports); - /** - * @param {number} bits - */ - take (bits) { - let pendingBits = bits - let result = 0 - while (pendingBits && this._haveBits()) { - const byte = this._value[this._currentBytePos] - const availableBits = this._currentBitPos + 1 - const taking = Math.min(availableBits, pendingBits) - const value = byteBitsToInt(byte, availableBits - taking, taking) - result = (result << taking) + value - pendingBits -= taking +/***/ }), - this._currentBitPos -= taking - if (this._currentBitPos < 0) { - this._currentBitPos = 7 - this._currentBytePos-- - } - } +/***/ 82707: +/***/ ((__unused_webpack_module, exports) => { - return result - } - /** - * @param {number} bits - */ - untake (bits) { - this._currentBitPos += bits - while (this._currentBitPos > 7) { - this._currentBitPos -= 8 - this._currentBytePos += 1 - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); - _haveBits () { - return this._currentBytePos >= 0 - } -} -/** - * @param {number} byte - * @param {number} start - * @param {number} length - */ -function byteBitsToInt (byte, start, length) { - const mask = maskFor(start, length) - return (byte & mask) >>> start -} +/***/ }), -/** - * @param {number} start - * @param {number} length - */ -function maskFor (start, length) { - return START_MASKS[start] & STOP_MASKS[Math.min(length + start - 1, 7)] -} +/***/ 76708: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 1663: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 13184: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); -const ConsumableBuffer = __nccwpck_require__(1267) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) -/** - * @param {(value: Uint8Array) => Promise} hashFn - */ -function wrapHash (hashFn) { - /** - * @param {InfiniteHash | Uint8Array} value - */ - function hashing (value) { - if (value instanceof InfiniteHash) { - // already a hash. return it - return value - } else { - return new InfiniteHash(value, hashFn) - } - } +/***/ }), - return hashing -} +/***/ 19628: +/***/ ((__unused_webpack_module, exports) => { -class InfiniteHash { - /** - * - * @param {Uint8Array} value - * @param {(value: Uint8Array) => Promise} hashFn - */ - constructor (value, hashFn) { - if (!(value instanceof Uint8Array)) { - throw new Error('can only hash Uint8Arrays') - } - this._value = value - this._hashFn = hashFn - this._depth = -1 - this._availableBits = 0 - this._currentBufferIndex = 0 +Object.defineProperty(exports, "__esModule", ({ value: true })); - /** @type {ConsumableBuffer[]} */ - this._buffers = [] - } - /** - * @param {number} bits - */ - async take (bits) { - let pendingBits = bits +/***/ }), - while (this._availableBits < pendingBits) { - await this._produceMoreBits() - } +/***/ 46555: +/***/ ((__unused_webpack_module, exports) => { - let result = 0 - while (pendingBits > 0) { - const hash = this._buffers[this._currentBufferIndex] - const available = Math.min(hash.availableBits(), pendingBits) - const took = hash.take(available) - result = (result << available) + took - pendingBits -= available - this._availableBits -= available +Object.defineProperty(exports, "__esModule", ({ value: true })); - if (hash.availableBits() === 0) { - this._currentBufferIndex++ - } - } - return result - } +/***/ }), - /** - * @param {number} bits - */ - untake (bits) { - let pendingBits = bits +/***/ 98864: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - while (pendingBits > 0) { - const hash = this._buffers[this._currentBufferIndex] - const availableForUntake = Math.min(hash.totalBits() - hash.availableBits(), pendingBits) - hash.untake(availableForUntake) - pendingBits -= availableForUntake - this._availableBits += availableForUntake - if (this._currentBufferIndex > 0 && hash.totalBits() === hash.availableBits()) { - this._depth-- - this._currentBufferIndex-- - } - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(78889); +tslib_1.__exportStar(__nccwpck_require__(46555), exports); +tslib_1.__exportStar(__nccwpck_require__(82619), exports); +tslib_1.__exportStar(__nccwpck_require__(31324), exports); - async _produceMoreBits () { - this._depth++ - const value = this._depth ? uint8ArrayConcat([this._value, Uint8Array.from([this._depth])]) : this._value - const hashValue = await this._hashFn(value) - const buffer = new ConsumableBuffer(hashValue) +/***/ }), - this._buffers.push(buffer) - this._availableBits += buffer.availableBits() - } -} +/***/ 82619: +/***/ ((__unused_webpack_module, exports) => { -module.exports = wrapHash -module.exports.InfiniteHash = InfiniteHash +Object.defineProperty(exports, "__esModule", ({ value: true })); -/***/ }), -/***/ 78338: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ }), -"use strict"; +/***/ 31324: +/***/ ((__unused_webpack_module, exports) => { -const Bucket = __nccwpck_require__(35779) -const wrapHash = __nccwpck_require__(1663) +Object.defineProperty(exports, "__esModule", ({ value: true })); -/** - * @typedef {object} UserBucketOptions - * @property {(value: Uint8Array) => Promise} hashFn - * @property {number} [bits=8] - */ -/** - * @param {UserBucketOptions} options - */ -function createHAMT (options) { - if (!options || !options.hashFn) { - throw new Error('please define an options.hashFn') - } +/***/ }), - const bucketOptions = { - bits: options.bits || 8, - hash: wrapHash(options.hashFn) - } +/***/ 34391: +/***/ ((__unused_webpack_module, exports) => { - return new Bucket(bucketOptions) -} -module.exports = { - createHAMT, - Bucket -} +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 24099: -/***/ ((module) => { +/***/ 39987: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; -module.exports = (flag, argv) => { - argv = argv || process.argv; - const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); - const pos = argv.indexOf(prefix + flag); - const terminatorPos = argv.indexOf('--'); - return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); -}; +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 94807: -/***/ ((module) => { - -"use strict"; +/***/ 72656: +/***/ ((__unused_webpack_module, exports) => { -const word = '[a-fA-F\\d:]'; -const b = options => options && options.includeBoundaries ? - `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` : - ''; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.EndpointURLScheme = void 0; +var EndpointURLScheme; +(function (EndpointURLScheme) { + EndpointURLScheme["HTTP"] = "http"; + EndpointURLScheme["HTTPS"] = "https"; +})(EndpointURLScheme = exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); -const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}'; -const v6seg = '[a-fA-F\\d]{1,4}'; -const v6 = ` -( -(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 -(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 -(?:${v6seg}:){5}(?::${v4}|(:${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 -(?:${v6seg}:){4}(?:(:${v6seg}){0,1}:${v4}|(:${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 -(?:${v6seg}:){3}(?:(:${v6seg}){0,2}:${v4}|(:${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 -(?:${v6seg}:){2}(?:(:${v6seg}){0,3}:${v4}|(:${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 -(?:${v6seg}:){1}(?:(:${v6seg}){0,4}:${v4}|(:${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 -(?::((?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 -)(%[0-9a-zA-Z]{1,})? // %eth0 %1 -`.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); +/***/ }), -const ip = options => options && options.exact ? - new RegExp(`(?:^${v4}$)|(?:^${v6}$)`) : - new RegExp(`(?:${b(options)}${v4}${b(options)})|(?:${b(options)}${v6}${b(options)})`, 'g'); +/***/ 36358: +/***/ ((__unused_webpack_module, exports) => { -ip.v4 = options => options && options.exact ? new RegExp(`^${v4}$`) : new RegExp(`${b(options)}${v4}${b(options)}`, 'g'); -ip.v6 = options => options && options.exact ? new RegExp(`^${v6}$`) : new RegExp(`${b(options)}${v6}${b(options)}`, 'g'); -module.exports = ip; +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 75433: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 6391: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.FsBlockStore = void 0; -const fs_1 = __importDefault(__nccwpck_require__(57147)); -const os_1 = __importDefault(__nccwpck_require__(22037)); -const multiformats_1 = __nccwpck_require__(27331); -const blockstore_core_1 = __nccwpck_require__(95301); -class FsBlockStore extends blockstore_core_1.BaseBlockstore { - constructor() { - super(); - this.path = `${os_1.default.tmpdir()}/${(parseInt(String(Math.random() * 1e9), 10)).toString() + Date.now()}`; - this._opened = false; - } - async _open() { - if (this._opening) { - await this._opening; - } - else { - this._opening = fs_1.default.promises.mkdir(this.path); - await this._opening; - this._opened = true; - } - } - async put(cid, bytes) { - if (!this._opened) { - await this._open(); - } - const cidStr = cid.toString(); - const location = `${this.path}/${cidStr}`; - await fs_1.default.promises.writeFile(location, bytes); - } - async get(cid) { - if (!this._opened) { - await this._open(); - } - const cidStr = cid.toString(); - const location = `${this.path}/${cidStr}`; - const bytes = await fs_1.default.promises.readFile(location); - return bytes; - } - async has(cid) { - if (!this._opened) { - await this._open(); - } - const cidStr = cid.toString(); - const location = `${this.path}/${cidStr}`; - try { - await fs_1.default.promises.access(location); - return true; - } - catch (err) { - return false; - } - } - async *blocks() { - if (!this._opened) { - await this._open(); - } - const cids = await fs_1.default.promises.readdir(this.path); - for (const cidStr of cids) { - const location = `${this.path}/${cidStr}`; - const bytes = await fs_1.default.promises.readFile(location); - yield { cid: multiformats_1.CID.parse(cidStr), bytes }; - } - } - async close() { - if (this._opened) { - await fs_1.default.promises.rm(this.path, { recursive: true }); - } - this._opened = false; - } -} -exports.FsBlockStore = FsBlockStore; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 58832: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 32982: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.MemoryBlockStore = void 0; -const multiformats_1 = __nccwpck_require__(27331); -const blockstore_core_1 = __nccwpck_require__(95301); -class MemoryBlockStore extends blockstore_core_1.BaseBlockstore { - constructor() { - super(); - this.store = new Map(); - } - async *blocks() { - for (const [cidStr, bytes] of this.store.entries()) { - yield { cid: multiformats_1.CID.parse(cidStr), bytes }; - } - } - put(cid, bytes) { - this.store.set(cid.toString(), bytes); - return Promise.resolve(); - } - get(cid) { - const bytes = this.store.get(cid.toString()); - if (!bytes) { - throw new Error(`block with cid ${cid.toString()} no found`); - } - return Promise.resolve(bytes); - } - has(cid) { - return Promise.resolve(this.store.has(cid.toString())); - } - close() { - this.store.clear(); - return Promise.resolve(); - } -} -exports.MemoryBlockStore = MemoryBlockStore; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 68118: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 9527: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.unixfsImporterOptionsDefault = void 0; -const sha2_1 = __nccwpck_require__(80960); -exports.unixfsImporterOptionsDefault = { - cidVersion: 1, - chunker: 'fixed', - maxChunkSize: 262144, - hasher: sha2_1.sha256, - rawLeaves: true, - wrapWithDirectory: true, - maxChildrenPerNode: 174 -}; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 47859: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +/***/ 68041: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.pack = void 0; -const it_last_1 = __importDefault(__nccwpck_require__(28741)); -const it_pipe_1 = __importDefault(__nccwpck_require__(74824)); -const car_1 = __nccwpck_require__(56994); -const ipfs_unixfs_importer_1 = __nccwpck_require__(17512); -const normalise_input_1 = __nccwpck_require__(24699); -const memory_1 = __nccwpck_require__(58832); -const constants_1 = __nccwpck_require__(68118); -async function pack({ input, blockstore: userBlockstore, hasher, maxChunkSize, maxChildrenPerNode, wrapWithDirectory, rawLeaves, cidVersion }) { - if (!input || (Array.isArray(input) && !input.length)) { - throw new Error('missing input file(s)'); - } - const blockstore = userBlockstore ? userBlockstore : new memory_1.MemoryBlockStore(); - // Consume the source - const rootEntry = await (0, it_last_1.default)((0, it_pipe_1.default)((0, normalise_input_1.getNormaliser)(input), (source) => (0, ipfs_unixfs_importer_1.importer)(source, blockstore, { - ...constants_1.unixfsImporterOptionsDefault, - hasher: hasher || constants_1.unixfsImporterOptionsDefault.hasher, - maxChunkSize: maxChunkSize || constants_1.unixfsImporterOptionsDefault.maxChunkSize, - maxChildrenPerNode: maxChildrenPerNode || constants_1.unixfsImporterOptionsDefault.maxChildrenPerNode, - wrapWithDirectory: wrapWithDirectory === false ? false : constants_1.unixfsImporterOptionsDefault.wrapWithDirectory, - rawLeaves: rawLeaves == null ? constants_1.unixfsImporterOptionsDefault.rawLeaves : rawLeaves, - cidVersion: typeof cidVersion === "number" ? cidVersion : constants_1.unixfsImporterOptionsDefault.cidVersion - }))); - if (!rootEntry || !rootEntry.cid) { - throw new Error('given input could not be parsed correctly'); - } - const root = rootEntry.cid; - const { writer, out: carOut } = await car_1.CarWriter.create([root]); - const carOutIter = carOut[Symbol.asyncIterator](); - let writingPromise; - const writeAll = async () => { - for await (const block of blockstore.blocks()) { - // `await` will block until all bytes in `carOut` are consumed by the user - // so we have backpressure here - await writer.put(block); - } - await writer.close(); - if (!userBlockstore) { - await blockstore.close(); - } - }; - const out = { - [Symbol.asyncIterator]() { - if (writingPromise != null) { - throw new Error('Multiple iterator not supported'); - } - // don't start writing until the user starts consuming the iterator - writingPromise = writeAll(); - return { - async next() { - const result = await carOutIter.next(); - if (result.done) { - await writingPromise; // any errors will propagate from here - } - return result; - } - }; - } - }; - return { root, out }; -} -exports.pack = pack; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(78889); +tslib_1.__exportStar(__nccwpck_require__(36358), exports); +tslib_1.__exportStar(__nccwpck_require__(6391), exports); +tslib_1.__exportStar(__nccwpck_require__(32982), exports); +tslib_1.__exportStar(__nccwpck_require__(19452), exports); +tslib_1.__exportStar(__nccwpck_require__(9527), exports); /***/ }), -/***/ 24699: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 19452: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getNormaliser = void 0; -const normalise_input_single_1 = __nccwpck_require__(82806); -const normalise_input_multiple_1 = __nccwpck_require__(36708); -function isBytes(obj) { - return ArrayBuffer.isView(obj) || obj instanceof ArrayBuffer; -} -function isBlob(obj) { - return Boolean(obj.constructor) && - (obj.constructor.name === 'Blob' || obj.constructor.name === 'File') && - typeof obj.stream === 'function'; -} -function isSingle(input) { - return typeof input === 'string' || input instanceof String || isBytes(input) || isBlob(input) || '_readableState' in input; -} -/** - * Get a single or multiple normaliser depending on the input. - */ -function getNormaliser(input) { - if (isSingle(input)) { - return (0, normalise_input_single_1.normaliseInput)(input); - } - else { - return (0, normalise_input_multiple_1.normaliseInput)(input); - } -} -exports.getNormaliser = getNormaliser; +Object.defineProperty(exports, "__esModule", ({ value: true })); -/***/ }), -/***/ 98381: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ }), -"use strict"; +/***/ 78168: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var errCode = __nccwpck_require__(5822); -var browserStreamToIt = __nccwpck_require__(31049); -var itPeekable = __nccwpck_require__(66140); -var map = __nccwpck_require__(6305); -var utils = __nccwpck_require__(43691); -var ipfsUnixfs = __nccwpck_require__(24821); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); -var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); -var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); -var map__default = /*#__PURE__*/_interopDefaultLegacy(map); +/***/ 17956: +/***/ ((__unused_webpack_module, exports) => { -async function* normaliseCandidateMultiple(input, normaliseContent) { - if (typeof input === 'string' || input instanceof String || utils.isBytes(input) || utils.isBlob(input) || input._readableState) { - throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); - } - if (utils.isReadableStream(input)) { - input = browserStreamToIt__default["default"](input); - } - if (Symbol.iterator in input || Symbol.asyncIterator in input) { - const peekable = itPeekable__default["default"](input); - const {value, done} = await peekable.peek(); - if (done) { - yield* []; - return; - } - peekable.push(value); - if (Number.isInteger(value)) { - throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); - } - if (value._readableState) { - yield* map__default["default"](peekable, value => toFileObject({ content: value }, normaliseContent)); - return; - } - if (utils.isBytes(value)) { - yield toFileObject({ content: peekable }, normaliseContent); - return; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveChecksumRuntimeConfig = exports.getChecksumConfiguration = exports.AlgorithmId = void 0; +var AlgorithmId; +(function (AlgorithmId) { + AlgorithmId["MD5"] = "md5"; + AlgorithmId["CRC32"] = "crc32"; + AlgorithmId["CRC32C"] = "crc32c"; + AlgorithmId["SHA1"] = "sha1"; + AlgorithmId["SHA256"] = "sha256"; +})(AlgorithmId = exports.AlgorithmId || (exports.AlgorithmId = {})); +const getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== undefined) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.SHA256, + checksumConstructor: () => runtimeConfig.sha256, + }); } - if (utils.isFileObject(value) || value[Symbol.iterator] || value[Symbol.asyncIterator] || utils.isReadableStream(value) || utils.isBlob(value)) { - yield* map__default["default"](peekable, value => toFileObject(value, normaliseContent)); - return; + if (runtimeConfig.md5 != undefined) { + checksumAlgorithms.push({ + algorithmId: () => AlgorithmId.MD5, + checksumConstructor: () => runtimeConfig.md5, + }); } - } - if (utils.isFileObject(input)) { - throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); - } - throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); -} -async function toFileObject(input, normaliseContent) { - const {path, mode, mtime, content} = input; - const file = { - path: path || '', - mode: ipfsUnixfs.parseMode(mode), - mtime: ipfsUnixfs.parseMtime(mtime) - }; - if (content) { - file.content = await normaliseContent(content); - } else if (!path) { - file.content = await normaliseContent(input); - } - return file; -} - -exports.normaliseCandidateMultiple = normaliseCandidateMultiple; + return { + _checksumAlgorithms: checksumAlgorithms, + addChecksumAlgorithm(algo) { + this._checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return this._checksumAlgorithms; + }, + }; +}; +exports.getChecksumConfiguration = getChecksumConfiguration; +const resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; +}; +exports.resolveChecksumRuntimeConfig = resolveChecksumRuntimeConfig; /***/ }), -/***/ 23772: +/***/ 20071: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveDefaultRuntimeConfig = exports.getDefaultClientConfiguration = void 0; +const checksum_1 = __nccwpck_require__(17956); +const getDefaultClientConfiguration = (runtimeConfig) => { + return { + ...(0, checksum_1.getChecksumConfiguration)(runtimeConfig), + }; +}; +exports.getDefaultClientConfiguration = getDefaultClientConfiguration; +const resolveDefaultRuntimeConfig = (config) => { + return { + ...(0, checksum_1.resolveChecksumRuntimeConfig)(config), + }; +}; +exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; -var errCode = __nccwpck_require__(5822); -var browserStreamToIt = __nccwpck_require__(31049); -var itPeekable = __nccwpck_require__(66140); -var utils = __nccwpck_require__(43691); -var ipfsUnixfs = __nccwpck_require__(24821); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); -var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); -var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); +/***/ 51839: +/***/ ((__unused_webpack_module, exports) => { -async function* normaliseCandidateSingle(input, normaliseContent) { - if (input === null || input === undefined) { - throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); - } - if (typeof input === 'string' || input instanceof String) { - yield toFileObject(input.toString(), normaliseContent); - return; - } - if (utils.isBytes(input) || utils.isBlob(input)) { - yield toFileObject(input, normaliseContent); - return; - } - if (utils.isReadableStream(input)) { - input = browserStreamToIt__default["default"](input); - } - if (Symbol.iterator in input || Symbol.asyncIterator in input) { - const peekable = itPeekable__default["default"](input); - const {value, done} = await peekable.peek(); - if (done) { - yield { content: [] }; - return; - } - peekable.push(value); - if (Number.isInteger(value) || utils.isBytes(value) || typeof value === 'string' || value instanceof String) { - yield toFileObject(peekable, normaliseContent); - return; - } - throw errCode__default["default"](new Error('Unexpected input: multiple items passed - if you are using ipfs.add, please use ipfs.addAll instead'), 'ERR_UNEXPECTED_INPUT'); - } - if (utils.isFileObject(input)) { - yield toFileObject(input, normaliseContent); - return; - } - throw errCode__default["default"](new Error('Unexpected input: cannot convert "' + typeof input + '" into ImportCandidate'), 'ERR_UNEXPECTED_INPUT'); -} -async function toFileObject(input, normaliseContent) { - const {path, mode, mtime, content} = input; - const file = { - path: path || '', - mode: ipfsUnixfs.parseMode(mode), - mtime: ipfsUnixfs.parseMtime(mtime) - }; - if (content) { - file.content = await normaliseContent(content); - } else if (!path) { - file.content = await normaliseContent(input); - } - return file; -} -exports.normaliseCandidateSingle = normaliseCandidateSingle; +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 49849: +/***/ 50873: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AlgorithmId = void 0; +const tslib_1 = __nccwpck_require__(78889); +tslib_1.__exportStar(__nccwpck_require__(20071), exports); +tslib_1.__exportStar(__nccwpck_require__(51839), exports); +var checksum_1 = __nccwpck_require__(17956); +Object.defineProperty(exports, "AlgorithmId", ({ enumerable: true, get: function () { return checksum_1.AlgorithmId; } })); -var errCode = __nccwpck_require__(5822); -var fromString = __nccwpck_require__(39451); -var browserStreamToIt = __nccwpck_require__(31049); -var blobToIt = __nccwpck_require__(74827); -var itPeekable = __nccwpck_require__(66140); -var all = __nccwpck_require__(81172); -var map = __nccwpck_require__(6305); -var utils = __nccwpck_require__(43691); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); -var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); -var blobToIt__default = /*#__PURE__*/_interopDefaultLegacy(blobToIt); -var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); -var all__default = /*#__PURE__*/_interopDefaultLegacy(all); -var map__default = /*#__PURE__*/_interopDefaultLegacy(map); +/***/ 66574: +/***/ ((__unused_webpack_module, exports) => { -async function* toAsyncIterable(thing) { - yield thing; -} -async function normaliseContent(input) { - if (utils.isBytes(input)) { - return toAsyncIterable(toBytes(input)); - } - if (typeof input === 'string' || input instanceof String) { - return toAsyncIterable(toBytes(input.toString())); - } - if (utils.isBlob(input)) { - return blobToIt__default["default"](input); - } - if (utils.isReadableStream(input)) { - input = browserStreamToIt__default["default"](input); - } - if (Symbol.iterator in input || Symbol.asyncIterator in input) { - const peekable = itPeekable__default["default"](input); - const {value, done} = await peekable.peek(); - if (done) { - return toAsyncIterable(new Uint8Array(0)); - } - peekable.push(value); - if (Number.isInteger(value)) { - return toAsyncIterable(Uint8Array.from(await all__default["default"](peekable))); - } - if (utils.isBytes(value) || typeof value === 'string' || value instanceof String) { - return map__default["default"](peekable, toBytes); - } - } - throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); -} -function toBytes(chunk) { - if (chunk instanceof Uint8Array) { - return chunk; - } - if (ArrayBuffer.isView(chunk)) { - return new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength); - } - if (chunk instanceof ArrayBuffer) { - return new Uint8Array(chunk); - } - if (Array.isArray(chunk)) { - return Uint8Array.from(chunk); - } - return fromString.fromString(chunk.toString()); -} -exports.normaliseContent = normaliseContent; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FieldPosition = void 0; +var FieldPosition; +(function (FieldPosition) { + FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; + FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; +})(FieldPosition = exports.FieldPosition || (exports.FieldPosition = {})); /***/ }), -/***/ 36708: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 56867: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var normaliseContent = __nccwpck_require__(49849); -var normaliseCandidateMultiple = __nccwpck_require__(98381); - -function normaliseInput(input) { - return normaliseCandidateMultiple.normaliseCandidateMultiple(input, normaliseContent.normaliseContent); -} - -exports.normaliseInput = normaliseInput; - /***/ }), -/***/ 82806: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 2197: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var normaliseContent = __nccwpck_require__(49849); -var normaliseCandidateSingle = __nccwpck_require__(23772); -function normaliseInput(input) { - return normaliseCandidateSingle.normaliseCandidateSingle(input, normaliseContent.normaliseContent); -} +/***/ }), -exports.normaliseInput = normaliseInput; +/***/ 8349: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 43691: +/***/ 60147: /***/ ((__unused_webpack_module, exports) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); -function isBytes(obj) { - return ArrayBuffer.isView(obj) || obj instanceof ArrayBuffer; -} -function isBlob(obj) { - return obj.constructor && (obj.constructor.name === 'Blob' || obj.constructor.name === 'File') && typeof obj.stream === 'function'; -} -function isFileObject(obj) { - return typeof obj === 'object' && (obj.path || obj.content); -} -const isReadableStream = value => value && typeof value.getReader === 'function'; - -exports.isBlob = isBlob; -exports.isBytes = isBytes; -exports.isFileObject = isFileObject; -exports.isReadableStream = isReadableStream; - /***/ }), -/***/ 34290: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 27469: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(78889); +tslib_1.__exportStar(__nccwpck_require__(2197), exports); +tslib_1.__exportStar(__nccwpck_require__(8349), exports); +tslib_1.__exportStar(__nccwpck_require__(60147), exports); +tslib_1.__exportStar(__nccwpck_require__(4417), exports); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var http__default = /*#__PURE__*/_interopDefaultLegacy(http); -var https__default = /*#__PURE__*/_interopDefaultLegacy(https); +/***/ 4417: +/***/ ((__unused_webpack_module, exports) => { -var agent = url => { - if (!url) { - throw new Error('URL required'); - } - return url.protocol.startsWith('https') ? https__default["default"].Agent : http__default["default"].Agent; -}; -module.exports = agent; +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 91946: +/***/ 75751: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(78889); +tslib_1.__exportStar(__nccwpck_require__(27311), exports); +tslib_1.__exportStar(__nccwpck_require__(18281), exports); +tslib_1.__exportStar(__nccwpck_require__(82707), exports); +tslib_1.__exportStar(__nccwpck_require__(76708), exports); +tslib_1.__exportStar(__nccwpck_require__(13184), exports); +tslib_1.__exportStar(__nccwpck_require__(19628), exports); +tslib_1.__exportStar(__nccwpck_require__(98864), exports); +tslib_1.__exportStar(__nccwpck_require__(34391), exports); +tslib_1.__exportStar(__nccwpck_require__(39987), exports); +tslib_1.__exportStar(__nccwpck_require__(72656), exports); +tslib_1.__exportStar(__nccwpck_require__(68041), exports); +tslib_1.__exportStar(__nccwpck_require__(78168), exports); +tslib_1.__exportStar(__nccwpck_require__(50873), exports); +tslib_1.__exportStar(__nccwpck_require__(66574), exports); +tslib_1.__exportStar(__nccwpck_require__(56867), exports); +tslib_1.__exportStar(__nccwpck_require__(27469), exports); +tslib_1.__exportStar(__nccwpck_require__(11617), exports); +tslib_1.__exportStar(__nccwpck_require__(38205), exports); +tslib_1.__exportStar(__nccwpck_require__(18760), exports); +tslib_1.__exportStar(__nccwpck_require__(47160), exports); +tslib_1.__exportStar(__nccwpck_require__(77883), exports); +tslib_1.__exportStar(__nccwpck_require__(89348), exports); +tslib_1.__exportStar(__nccwpck_require__(342), exports); +tslib_1.__exportStar(__nccwpck_require__(61557), exports); +tslib_1.__exportStar(__nccwpck_require__(39764), exports); +tslib_1.__exportStar(__nccwpck_require__(10599), exports); +tslib_1.__exportStar(__nccwpck_require__(50480), exports); +tslib_1.__exportStar(__nccwpck_require__(57046), exports); +tslib_1.__exportStar(__nccwpck_require__(72583), exports); +tslib_1.__exportStar(__nccwpck_require__(24592), exports); +tslib_1.__exportStar(__nccwpck_require__(26681), exports); +tslib_1.__exportStar(__nccwpck_require__(47982), exports); +tslib_1.__exportStar(__nccwpck_require__(14852), exports); +tslib_1.__exportStar(__nccwpck_require__(49541), exports); +tslib_1.__exportStar(__nccwpck_require__(15519), exports); +tslib_1.__exportStar(__nccwpck_require__(849), exports); + + +/***/ }), + +/***/ 11617: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var errCode = __nccwpck_require__(5822); -var browserStreamToIt = __nccwpck_require__(31049); -var itPeekable = __nccwpck_require__(66140); -var map = __nccwpck_require__(6305); -var utils = __nccwpck_require__(35630); -var ipfsUnixfs = __nccwpck_require__(24821); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); -var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); -var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); -var map__default = /*#__PURE__*/_interopDefaultLegacy(map); +/***/ 38205: +/***/ ((__unused_webpack_module, exports) => { -async function* normaliseCandidateMultiple(input, normaliseContent) { - if (typeof input === 'string' || input instanceof String || utils.isBytes(input) || utils.isBlob(input) || input._readableState) { - throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); - } - if (utils.isReadableStream(input)) { - input = browserStreamToIt__default["default"](input); - } - if (Symbol.iterator in input || Symbol.asyncIterator in input) { - const peekable = itPeekable__default["default"](input); - const {value, done} = await peekable.peek(); - if (done) { - yield* []; - return; - } - peekable.push(value); - if (Number.isInteger(value)) { - throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); - } - if (value._readableState) { - yield* map__default["default"](peekable, value => toFileObject({ content: value }, normaliseContent)); - return; - } - if (utils.isBytes(value)) { - yield toFileObject({ content: peekable }, normaliseContent); - return; - } - if (utils.isFileObject(value) || value[Symbol.iterator] || value[Symbol.asyncIterator] || utils.isReadableStream(value) || utils.isBlob(value)) { - yield* map__default["default"](peekable, value => toFileObject(value, normaliseContent)); - return; - } - } - if (utils.isFileObject(input)) { - throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); - } - throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); -} -async function toFileObject(input, normaliseContent) { - const {path, mode, mtime, content} = input; - const file = { - path: path || '', - mode: ipfsUnixfs.parseMode(mode), - mtime: ipfsUnixfs.parseMtime(mtime) - }; - if (content) { - file.content = await normaliseContent(content); - } else if (!path) { - file.content = await normaliseContent(input); - } - return file; -} -exports.normaliseCandidateMultiple = normaliseCandidateMultiple; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SMITHY_CONTEXT_KEY = void 0; +exports.SMITHY_CONTEXT_KEY = "__smithy_context"; /***/ }), -/***/ 89926: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 18760: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var errCode = __nccwpck_require__(5822); -var browserStreamToIt = __nccwpck_require__(31049); -var itPeekable = __nccwpck_require__(66140); -var utils = __nccwpck_require__(35630); -var ipfsUnixfs = __nccwpck_require__(24821); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); -var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); -var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); +/***/ 47160: +/***/ ((__unused_webpack_module, exports) => { -async function* normaliseCandidateSingle(input, normaliseContent) { - if (input === null || input === undefined) { - throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); - } - if (typeof input === 'string' || input instanceof String) { - yield toFileObject(input.toString(), normaliseContent); - return; - } - if (utils.isBytes(input) || utils.isBlob(input)) { - yield toFileObject(input, normaliseContent); - return; - } - if (utils.isReadableStream(input)) { - input = browserStreamToIt__default["default"](input); - } - if (Symbol.iterator in input || Symbol.asyncIterator in input) { - const peekable = itPeekable__default["default"](input); - const {value, done} = await peekable.peek(); - if (done) { - yield { content: [] }; - return; - } - peekable.push(value); - if (Number.isInteger(value) || utils.isBytes(value) || typeof value === 'string' || value instanceof String) { - yield toFileObject(peekable, normaliseContent); - return; - } - throw errCode__default["default"](new Error('Unexpected input: multiple items passed - if you are using ipfs.add, please use ipfs.addAll instead'), 'ERR_UNEXPECTED_INPUT'); - } - if (utils.isFileObject(input)) { - yield toFileObject(input, normaliseContent); - return; - } - throw errCode__default["default"](new Error('Unexpected input: cannot convert "' + typeof input + '" into ImportCandidate'), 'ERR_UNEXPECTED_INPUT'); -} -async function toFileObject(input, normaliseContent) { - const {path, mode, mtime, content} = input; - const file = { - path: path || '', - mode: ipfsUnixfs.parseMode(mode), - mtime: ipfsUnixfs.parseMtime(mtime) - }; - if (content) { - file.content = await normaliseContent(content); - } else if (!path) { - file.content = await normaliseContent(input); - } - return file; -} -exports.normaliseCandidateSingle = normaliseCandidateSingle; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IniSectionType = void 0; +var IniSectionType; +(function (IniSectionType) { + IniSectionType["PROFILE"] = "profile"; + IniSectionType["SSO_SESSION"] = "sso-session"; + IniSectionType["SERVICES"] = "services"; +})(IniSectionType = exports.IniSectionType || (exports.IniSectionType = {})); /***/ }), -/***/ 31890: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 77883: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var errCode = __nccwpck_require__(5822); -var itPeekable = __nccwpck_require__(66140); -var browserStreamToIt = __nccwpck_require__(31049); -var all = __nccwpck_require__(81172); -var utils = __nccwpck_require__(35630); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); -var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); -var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); -var all__default = /*#__PURE__*/_interopDefaultLegacy(all); +/***/ 89348: +/***/ ((__unused_webpack_module, exports) => { -async function normaliseContent(input) { - if (utils.isBytes(input)) { - return new Blob([input]); - } - if (typeof input === 'string' || input instanceof String) { - return new Blob([input.toString()]); - } - if (utils.isBlob(input)) { - return input; - } - if (utils.isReadableStream(input)) { - input = browserStreamToIt__default["default"](input); - } - if (Symbol.iterator in input || Symbol.asyncIterator in input) { - const peekable = itPeekable__default["default"](input); - const {value, done} = await peekable.peek(); - if (done) { - return itToBlob(peekable); - } - peekable.push(value); - if (Number.isInteger(value)) { - return new Blob([Uint8Array.from(await all__default["default"](peekable))]); - } - if (utils.isBytes(value) || typeof value === 'string' || value instanceof String) { - return itToBlob(peekable); - } - } - throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); -} -async function itToBlob(stream) { - const parts = []; - for await (const chunk of stream) { - parts.push(chunk); - } - return new Blob(parts); -} -exports.normaliseContent = normaliseContent; +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 20604: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 342: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var errCode = __nccwpck_require__(5822); -var fromString = __nccwpck_require__(39451); -var browserStreamToIt = __nccwpck_require__(31049); -var blobToIt = __nccwpck_require__(74827); -var itPeekable = __nccwpck_require__(66140); -var all = __nccwpck_require__(81172); -var map = __nccwpck_require__(6305); -var utils = __nccwpck_require__(35630); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); -var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); -var blobToIt__default = /*#__PURE__*/_interopDefaultLegacy(blobToIt); -var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); -var all__default = /*#__PURE__*/_interopDefaultLegacy(all); -var map__default = /*#__PURE__*/_interopDefaultLegacy(map); +/***/ 61557: +/***/ ((__unused_webpack_module, exports) => { -async function* toAsyncIterable(thing) { - yield thing; -} -async function normaliseContent(input) { - if (utils.isBytes(input)) { - return toAsyncIterable(toBytes(input)); - } - if (typeof input === 'string' || input instanceof String) { - return toAsyncIterable(toBytes(input.toString())); - } - if (utils.isBlob(input)) { - return blobToIt__default["default"](input); - } - if (utils.isReadableStream(input)) { - input = browserStreamToIt__default["default"](input); - } - if (Symbol.iterator in input || Symbol.asyncIterator in input) { - const peekable = itPeekable__default["default"](input); - const {value, done} = await peekable.peek(); - if (done) { - return toAsyncIterable(new Uint8Array(0)); - } - peekable.push(value); - if (Number.isInteger(value)) { - return toAsyncIterable(Uint8Array.from(await all__default["default"](peekable))); - } - if (utils.isBytes(value) || typeof value === 'string' || value instanceof String) { - return map__default["default"](peekable, toBytes); - } - } - throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); -} -function toBytes(chunk) { - if (chunk instanceof Uint8Array) { - return chunk; - } - if (ArrayBuffer.isView(chunk)) { - return new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength); - } - if (chunk instanceof ArrayBuffer) { - return new Uint8Array(chunk); - } - if (Array.isArray(chunk)) { - return Uint8Array.from(chunk); - } - return fromString.fromString(chunk.toString()); -} -exports.normaliseContent = normaliseContent; +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 19666: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 39764: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var normaliseContent_browser = __nccwpck_require__(31890); -var normaliseCandidateMultiple = __nccwpck_require__(91946); -function normaliseInput(input) { - return normaliseCandidateMultiple.normaliseCandidateMultiple(input, normaliseContent_browser.normaliseContent, true); -} +/***/ }), -exports.normaliseInput = normaliseInput; +/***/ 10599: +/***/ ((__unused_webpack_module, exports) => { -/***/ }), +Object.defineProperty(exports, "__esModule", ({ value: true })); -/***/ 46416: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +/***/ }), + +/***/ 50480: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var normaliseContent = __nccwpck_require__(20604); -var normaliseCandidateMultiple = __nccwpck_require__(91946); -function normaliseInput(input) { - return normaliseCandidateMultiple.normaliseCandidateMultiple(input, normaliseContent.normaliseContent); -} +/***/ }), -exports.normaliseInput = normaliseInput; +/***/ 57046: +/***/ ((__unused_webpack_module, exports) => { -/***/ }), +Object.defineProperty(exports, "__esModule", ({ value: true })); -/***/ 75400: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +/***/ }), + +/***/ 72583: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var normaliseContent = __nccwpck_require__(20604); -var normaliseCandidateSingle = __nccwpck_require__(89926); -function normaliseInput(input) { - return normaliseCandidateSingle.normaliseCandidateSingle(input, normaliseContent.normaliseContent); -} +/***/ }), + +/***/ 24592: +/***/ ((__unused_webpack_module, exports) => { -exports.normaliseInput = normaliseInput; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.RequestHandlerProtocol = void 0; +var RequestHandlerProtocol; +(function (RequestHandlerProtocol) { + RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; +})(RequestHandlerProtocol = exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); /***/ }), -/***/ 35630: +/***/ 26681: /***/ ((__unused_webpack_module, exports) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); -function isBytes(obj) { - return ArrayBuffer.isView(obj) || obj instanceof ArrayBuffer; -} -function isBlob(obj) { - return obj.constructor && (obj.constructor.name === 'Blob' || obj.constructor.name === 'File') && typeof obj.stream === 'function'; -} -function isFileObject(obj) { - return typeof obj === 'object' && (obj.path || obj.content); -} -const isReadableStream = value => value && typeof value.getReader === 'function'; - -exports.isBlob = isBlob; -exports.isBytes = isBytes; -exports.isFileObject = isFileObject; -exports.isReadableStream = isReadableStream; - /***/ }), -/***/ 1295: +/***/ 47982: /***/ ((__unused_webpack_module, exports) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); -function modeToString(mode) { - if (mode == null) { - return undefined; - } - if (typeof mode === 'string') { - return mode; - } - return mode.toString(8).padStart(4, '0'); -} - -exports.modeToString = modeToString; - /***/ }), -/***/ 61560: +/***/ 14852: /***/ ((__unused_webpack_module, exports) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); -const LOAD_BASE = name => Promise.reject(new Error(`No base found for "${ name }"`)); -class Multibases { - constructor(options) { - this._basesByName = {}; - this._basesByPrefix = {}; - this._loadBase = options.loadBase || LOAD_BASE; - for (const base of options.bases) { - this.addBase(base); - } - } - addBase(base) { - if (this._basesByName[base.name] || this._basesByPrefix[base.prefix]) { - throw new Error(`Codec already exists for codec "${ base.name }"`); - } - this._basesByName[base.name] = base; - this._basesByPrefix[base.prefix] = base; - } - removeBase(base) { - delete this._basesByName[base.name]; - delete this._basesByPrefix[base.prefix]; - } - async getBase(nameOrPrefix) { - if (this._basesByName[nameOrPrefix]) { - return this._basesByName[nameOrPrefix]; - } - if (this._basesByPrefix[nameOrPrefix]) { - return this._basesByPrefix[nameOrPrefix]; - } - const base = await this._loadBase(nameOrPrefix); - if (this._basesByName[base.name] == null && this._basesByPrefix[base.prefix] == null) { - this.addBase(base); - } - return base; - } - listBases() { - return Object.values(this._basesByName); - } -} - -exports.Multibases = Multibases; - /***/ }), -/***/ 83319: +/***/ 49541: /***/ ((__unused_webpack_module, exports) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); -const LOAD_CODEC = codeOrName => Promise.reject(new Error(`No codec found for "${ codeOrName }"`)); -class Multicodecs { - constructor(options) { - this._codecsByName = {}; - this._codecsByCode = {}; - this._loadCodec = options.loadCodec || LOAD_CODEC; - for (const codec of options.codecs) { - this.addCodec(codec); - } - } - addCodec(codec) { - if (this._codecsByName[codec.name] || this._codecsByCode[codec.code]) { - throw new Error(`Resolver already exists for codec "${ codec.name }"`); - } - this._codecsByName[codec.name] = codec; - this._codecsByCode[codec.code] = codec; - } - removeCodec(codec) { - delete this._codecsByName[codec.name]; - delete this._codecsByCode[codec.code]; - } - async getCodec(code) { - const table = typeof code === 'string' ? this._codecsByName : this._codecsByCode; - if (table[code]) { - return table[code]; - } - const codec = await this._loadCodec(code); - if (table[code] == null) { - this.addCodec(codec); - } - return codec; - } - listCodecs() { - return Object.values(this._codecsByName); - } -} -exports.Multicodecs = Multicodecs; +/***/ }), + +/***/ 15519: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 5529: +/***/ 849: /***/ ((__unused_webpack_module, exports) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); -const LOAD_HASHER = codeOrName => Promise.reject(new Error(`No hasher found for "${ codeOrName }"`)); -class Multihashes { - constructor(options) { - this._hashersByName = {}; - this._hashersByCode = {}; - this._loadHasher = options.loadHasher || LOAD_HASHER; - for (const hasher of options.hashers) { - this.addHasher(hasher); - } - } - addHasher(hasher) { - if (this._hashersByName[hasher.name] || this._hashersByCode[hasher.code]) { - throw new Error(`Resolver already exists for codec "${ hasher.name }"`); + +/***/ }), + +/***/ 78889: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } - this._hashersByName[hasher.name] = hasher; - this._hashersByCode[hasher.code] = hasher; - } - removeHasher(hasher) { - delete this._hashersByName[hasher.name]; - delete this._hashersByCode[hasher.code]; - } - async getHasher(code) { - const table = typeof code === 'string' ? this._hashersByName : this._hashersByCode; - if (table[code]) { - return table[code]; + else { + factory(createExporter(root)); } - const hasher = await this._loadHasher(code); - if (table[code] == null) { - this.addHasher(hasher); + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } - return hasher; - } - listHashers() { - return Object.values(this._hashersByName); - } -} +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -exports.Multihashes = Multihashes; + __assign = Object.assign || function (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; + }; + __rest = function (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; + }; -/***/ }), + __decorate = function (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; + }; -/***/ 20665: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -"use strict"; + __esDecorate = function (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)); }; + 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; + }; + __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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -var normaliseInputMultiple_browser = __nccwpck_require__(19666); -var modeToString = __nccwpck_require__(1295); + __setFunctionName = function (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 }); + }; -async function multipartRequest(source, abortController, headers = {}) { - const parts = []; - const formData = new FormData(); - let index = 0; - let total = 0; - for await (const {content, path, mode, mtime} of normaliseInputMultiple_browser.normaliseInput(source)) { - let fileSuffix = ''; - const type = content ? 'file' : 'dir'; - if (index > 0) { - fileSuffix = `-${ index }`; - } - let fieldName = type + fileSuffix; - const qs = []; - if (mode !== null && mode !== undefined) { - qs.push(`mode=${ modeToString.modeToString(mode) }`); - } - if (mtime != null) { - const {secs, nsecs} = mtime; - qs.push(`mtime=${ secs }`); - if (nsecs != null) { - qs.push(`mtime-nsecs=${ nsecs }`); - } - } - if (qs.length) { - fieldName = `${ fieldName }?${ qs.join('&') }`; - } - if (content) { - formData.set(fieldName, content, path != null ? encodeURIComponent(path) : undefined); - const end = total + content.size; - parts.push({ - name: path, - start: total, - end - }); - total = end; - } else if (path != null) { - formData.set(fieldName, new File([''], encodeURIComponent(path), { type: 'application/x-directory' })); - } else { - throw new Error('path or content or both must be set'); - } - index++; - } - return { - total, - parts, - headers, - body: formData - }; -} + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -exports.multipartRequest = multipartRequest; + __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()); + }); + }; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; -/***/ }), + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -/***/ 87527: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -"use strict"; + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; -var env_js = __nccwpck_require__(48488); -var multipartRequest_node = __nccwpck_require__(57043); -var multipartRequest_browser = __nccwpck_require__(20665); -var nanoid = __nccwpck_require__(45835); + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -async function multipartRequest(source, abortController, headers = {}, boundary = `-----------------------------${ nanoid.nanoid() }`) { - let req = multipartRequest_node.multipartRequest; - if (env_js.isElectronRenderer) { - req = multipartRequest_browser.multipartRequest; - } - return req(source, abortController, headers, boundary); -} + __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)); + }; -exports.multipartRequest = multipartRequest; + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + __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(n, v); }); }; } + 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]); } + }; -/***/ }), + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -/***/ 57043: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __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); } + }; -"use strict"; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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 normaliseInputMultiple = __nccwpck_require__(46416); -var nanoid = __nccwpck_require__(45835); -var modeToString = __nccwpck_require__(1295); -var mergeOpts = __nccwpck_require__(79139); -var toStream = __nccwpck_require__(28186); -var debug = __nccwpck_require__(58923); -var itPeekable = __nccwpck_require__(66140); + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -var mergeOpts__default = /*#__PURE__*/_interopDefaultLegacy(mergeOpts); -var toStream__default = /*#__PURE__*/_interopDefaultLegacy(toStream); -var debug__default = /*#__PURE__*/_interopDefaultLegacy(debug); -var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -const merge = mergeOpts__default["default"].bind({ ignoreUndefined: true }); -const log = debug__default["default"]('ipfs:core-utils:multipart-request'); -async function multipartRequest(source, abortController, headers = {}, boundary = `-----------------------------${ nanoid.nanoid() }`) { - async function* streamFiles(source) { - try { - let index = 0; - for await (const {content, path, mode, mtime} of source) { - let fileSuffix = ''; - const type = content ? 'file' : 'dir'; - if (index > 0) { - yield '\r\n'; - fileSuffix = `-${ index }`; - } - let fieldName = type + fileSuffix; - const qs = []; - if (mode !== null && mode !== undefined) { - qs.push(`mode=${ modeToString.modeToString(mode) }`); + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); } - if (mtime != null) { - const {secs, nsecs} = mtime; - qs.push(`mtime=${ secs }`); - if (nsecs != null) { - qs.push(`mtime-nsecs=${ nsecs }`); - } + else if (async) { + env.stack.push({ async: true }); } - if (qs.length) { - fieldName = `${ fieldName }?${ qs.join('&') }`; + return value; + }; + + 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; + }; + + __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; } - yield `--${ boundary }\r\n`; - yield `Content-Disposition: form-data; name="${ fieldName }"; filename="${ encodeURIComponent(path || '') }"\r\n`; - yield `Content-Type: ${ content ? 'application/octet-stream' : 'application/x-directory' }\r\n`; - yield '\r\n'; - if (content) { - yield* content; + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; } - index++; - } - } catch (err) { - log(err); - abortController.abort(); - } finally { - yield `\r\n--${ boundary }--\r\n`; - } - } - const peekable = itPeekable__default["default"](normaliseInputMultiple.normaliseInput(source)); - const {value, done} = await peekable.peek(); - if (!done) { - peekable.push(value); - } - return { - parts: null, - total: -1, - headers: merge(headers, { 'Content-Type': `multipart/form-data; boundary=${ boundary }` }), - body: toStream__default["default"](streamFiles(peekable)) - }; -} + return next(); + }; -exports.multipartRequest = multipartRequest; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 44956: +/***/ 98245: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseUrl = void 0; +const querystring_parser_1 = __nccwpck_require__(44435); +const parseUrl = (url) => { + if (typeof url === "string") { + return (0, exports.parseUrl)(new URL(url)); + } + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = (0, querystring_parser_1.parseQueryString)(search); + } + return { + hostname, + port: port ? parseInt(port) : undefined, + protocol, + path: pathname, + query, + }; +}; +exports.parseUrl = parseUrl; -var errCode = __nccwpck_require__(5822); -var cid = __nccwpck_require__(24247); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +/***/ 7417: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -async function* normaliseInput(input) { - if (input === null || input === undefined) { - throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); - } - const cid$1 = cid.CID.asCID(input); - if (cid$1) { - yield toPin({ cid: cid$1 }); - return; - } - if (input instanceof String || typeof input === 'string') { - yield toPin({ path: input }); - return; - } - if (input.cid != null || input.path != null) { - return yield toPin(input); - } - if (Symbol.iterator in input) { - const iterator = input[Symbol.iterator](); - const first = iterator.next(); - if (first.done) - return iterator; - if (cid.CID.asCID(first.value) || first.value instanceof String || typeof first.value === 'string') { - yield toPin({ cid: first.value }); - for (const cid of iterator) { - yield toPin({ cid }); - } - return; - } - if (first.value.cid != null || first.value.path != null) { - yield toPin(first.value); - for (const obj of iterator) { - yield toPin(obj); - } - return; - } - throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); - } - if (Symbol.asyncIterator in input) { - const iterator = input[Symbol.asyncIterator](); - const first = await iterator.next(); - if (first.done) - return iterator; - if (cid.CID.asCID(first.value) || first.value instanceof String || typeof first.value === 'string') { - yield toPin({ cid: first.value }); - for await (const cid of iterator) { - yield toPin({ cid }); - } - return; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromBase64 = void 0; +const util_buffer_from_1 = __nccwpck_require__(41308); +const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; +const fromBase64 = (input) => { + if ((input.length * 3) % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); } - if (first.value.cid != null || first.value.path != null) { - yield toPin(first.value); - for await (const obj of iterator) { - yield toPin(obj); - } - return; + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); } - throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); - } - throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); -} -function toPin(input) { - const path = input.cid || `${ input.path }`; - if (!path) { - throw errCode__default["default"](new Error('Unexpected input: Please path either a CID or an IPFS path'), 'ERR_UNEXPECTED_INPUT'); - } - const pin = { - path, - recursive: input.recursive !== false - }; - if (input.metadata != null) { - pin.metadata = input.metadata; - } - return pin; -} - -exports.normaliseInput = normaliseInput; + const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); +}; +exports.fromBase64 = fromBase64; /***/ }), -/***/ 4037: +/***/ 14478: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(84245); +tslib_1.__exportStar(__nccwpck_require__(7417), exports); +tslib_1.__exportStar(__nccwpck_require__(95756), exports); -var multiaddr = __nccwpck_require__(47730); -var multiAddrToUri = __nccwpck_require__(6211); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var multiAddrToUri__default = /*#__PURE__*/_interopDefaultLegacy(multiAddrToUri); +/***/ 95756: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function toUrlString(url) { - try { - url = multiAddrToUri__default["default"](new multiaddr.Multiaddr(url)); - } catch (err) { - } - url = url.toString(); - return url; -} -exports.toUrlString = toUrlString; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toBase64 = void 0; +const util_buffer_from_1 = __nccwpck_require__(41308); +const toBase64 = (input) => (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); +exports.toBase64 = toBase64; /***/ }), -/***/ 22126: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +/***/ 84245: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -const convert = __nccwpck_require__(59943) -const protocols = __nccwpck_require__(19612) -const varint = __nccwpck_require__(30310) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) + __assign = Object.assign || function (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; + }; -// export codec -module.exports = { - stringToStringTuples, - stringTuplesToString, + __rest = function (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; + }; - tuplesToStringTuples, - stringTuplesToTuples, + __decorate = function (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; + }; - bytesToTuples, - tuplesToBytes, + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - bytesToString, - stringToBytes, + __esDecorate = function (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)); }; + 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; + }; - fromString, - fromBytes, - validateBytes, - isValidBytes, - cleanPath, + __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; + }; - ParseError, - protoFromTuple, + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - sizeForAddr -} + __setFunctionName = function (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 }); + }; -// string -> [[str name, str addr]... ] -/** - * @param {string} str - */ -function stringToStringTuples (str) { - const tuples = [] - const parts = str.split('/').slice(1) // skip first empty elem - if (parts.length === 1 && parts[0] === '') { - return [] - } + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - for (let p = 0; p < parts.length; p++) { - const part = parts[p] - const proto = protocols(part) + __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()); + }); + }; - if (proto.size === 0) { - tuples.push([part]) - continue - } + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; - p++ // advance addr part - if (p >= parts.length) { - throw ParseError('invalid address: ' + str) - } + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - // if it's a path proto, take the rest - if (proto.path) { - tuples.push([ - part, - // TODO: should we need to check each path part to see if it's a proto? - // This would allow for other protocols to be added after a unix path, - // however it would have issues if the path had a protocol name in the path - cleanPath(parts.slice(p).join('/')) - ]) - break - } + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - tuples.push([part, parts[p]]) - } + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - return tuples -} + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -// [[str name, str addr]... ] -> string -/** - * @param {[number, string?][]} tuples - */ -function stringTuplesToString (tuples) { - /** @type {Array} */ - const parts = [] - tuples.map((tup) => { - const proto = protoFromTuple(tup) - parts.push(proto.name) - if (tup.length > 1) { - parts.push(tup[1]) - } - return null - }) + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; - return cleanPath(parts.join('/')) -} + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -// [[str name, str addr]... ] -> [[int code, Uint8Array]... ] -/** - * @param {Array} tuples - * @returns {[number , Uint8Array?][]} - */ -function stringTuplesToTuples (tuples) { - return tuples.map((tup) => { - if (!Array.isArray(tup)) { - tup = [tup] - } - const proto = protoFromTuple(tup) - if (tup.length > 1) { - return [proto.code, convert.toBytes(proto.code, tup[1])] - } - return [proto.code] - }) -} + __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)); + }; -/** - * Convert tuples to string tuples - * - * [[int code, Uint8Array]... ] -> [[int code, str addr]... ] - * - * @param {Array<[number, Uint8Array?]>} tuples - * @returns {Array<[number, string?]>} - */ + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -function tuplesToStringTuples (tuples) { - return tuples.map(tup => { - const proto = protoFromTuple(tup) - if (tup[1]) { - return [proto.code, convert.toString(proto.code, tup[1])] - } - return [proto.code] - }) -} + __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(n, v); }); }; } + 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]); } + }; -// [[int code, Uint8Array ]... ] -> Uint8Array -/** - * @param {[number, Uint8Array?][]} tuples - */ -function tuplesToBytes (tuples) { - return fromBytes(uint8ArrayConcat(tuples.map((/** @type {any[]} */ tup) => { - const proto = protoFromTuple(tup) - let buf = Uint8Array.from(varint.encode(proto.code)) + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - if (tup.length > 1) { - buf = uint8ArrayConcat([buf, tup[1]]) // add address buffer - } + __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); } + }; - return buf - }))) -} + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -/** - * @param {import("./types").Protocol} p - * @param {Uint8Array | number[]} addr - */ -function sizeForAddr (p, addr) { - if (p.size > 0) { - return p.size / 8 - } else if (p.size === 0) { - return 0 - } else { - const size = varint.decode(addr) - return size + varint.decode.bytes - } -} + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -/** - * - * @param {Uint8Array} buf - * @returns {Array<[number, Uint8Array?]>} - */ -function bytesToTuples (buf) { - /** @type {Array<[number, Uint8Array?]>} */ - const tuples = [] - let i = 0 - while (i < buf.length) { - const code = varint.decode(buf, i) - const n = varint.decode.bytes + __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; + }; - const p = protocols(code) + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - const size = sizeForAddr(p, buf.slice(i + n)) + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - if (size === 0) { - tuples.push([code]) - i += n - continue - } + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - const addr = buf.slice(i + n, i + n + size) + __classPrivateFieldIn = function (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); + }; - i += (size + n) + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; - if (i > buf.length) { // did not end _exactly_ at buffer.length - throw ParseError('Invalid address Uint8Array: ' + uint8ArrayToString(buf, 'base16')) - } + 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; + }; - // ok, tuple seems good. - tuples.push([code, addr]) - } + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; - return tuples -} + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); -// Uint8Array -> String -/** - * @param {Uint8Array} buf - */ -function bytesToString (buf) { - const a = bytesToTuples(buf) - const b = tuplesToStringTuples(a) - return stringTuplesToString(b) -} -// String -> Uint8Array -/** - * @param {string} str - */ -function stringToBytes (str) { - str = cleanPath(str) - const a = stringToStringTuples(str) - const b = stringTuplesToTuples(a) +/***/ }), - return tuplesToBytes(b) -} +/***/ 25590: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -// String -> Uint8Array -/** - * @param {string} str - */ -function fromString (str) { - return stringToBytes(str) -} -// Uint8Array -> Uint8Array -/** - * @param {Uint8Array} buf - */ -function fromBytes (buf) { - const err = validateBytes(buf) - if (err) throw err - return Uint8Array.from(buf) // copy -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.calculateBodyLength = void 0; +const fs_1 = __nccwpck_require__(57147); +const calculateBodyLength = (body) => { + if (!body) { + return 0; + } + if (typeof body === "string") { + return Buffer.from(body).length; + } + else if (typeof body.byteLength === "number") { + return body.byteLength; + } + else if (typeof body.size === "number") { + return body.size; + } + else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; + } + else if (typeof body.path === "string" || Buffer.isBuffer(body.path)) { + return (0, fs_1.lstatSync)(body.path).size; + } + else if (typeof body.fd === "number") { + return (0, fs_1.fstatSync)(body.fd).size; + } + throw new Error(`Body Length computation failed for ${body}`); +}; +exports.calculateBodyLength = calculateBodyLength; -/** - * @param {Uint8Array} buf - */ -function validateBytes (buf) { - try { - bytesToTuples(buf) // try to parse. will throw if breaks - } catch (err) { - return err - } -} -/** - * @param {Uint8Array} buf - */ -function isValidBytes (buf) { - return validateBytes(buf) === undefined -} +/***/ }), -/** - * @param {string} str - */ -function cleanPath (str) { - return '/' + str.trim().split('/').filter((/** @type {any} */ a) => a).join('/') -} +/***/ 87693: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -/** - * @param {string} str - */ -function ParseError (str) { - return new Error('Error parsing address: ' + str) -} -/** - * @param {any[]} tup - */ -function protoFromTuple (tup) { - const proto = protocols(tup[0]) - return proto -} +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(95586); +tslib_1.__exportStar(__nccwpck_require__(25590), exports); /***/ }), -/***/ 59943: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 95586: +/***/ ((module) => { -"use strict"; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + __assign = Object.assign || function (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; + }; -const ip = __nccwpck_require__(53153) -const protocols = __nccwpck_require__(19612) -const { CID } = __nccwpck_require__(24247) -const { base32 } = __nccwpck_require__(70784) -const { base58btc } = __nccwpck_require__(49108) -const Digest = __nccwpck_require__(81168) -const varint = __nccwpck_require__(30310) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) + __rest = function (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; + }; -module.exports = Convert + __decorate = function (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; + }; -// converts (serializes) addresses -/** - * @param {string} proto - * @param {string | Uint8Array} a - */ -function Convert (proto, a) { - if (a instanceof Uint8Array) { - return Convert.toString(proto, a) - } else { - return Convert.toBytes(proto, a) - } -} + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -/** - * Convert [code,Uint8Array] to string - * - * @param {number|string} proto - * @param {Uint8Array} buf - * @returns {string} - */ -Convert.toString = function convertToString (proto, buf) { - const protocol = protocols(proto) - switch (protocol.code) { - case 4: // ipv4 - case 41: // ipv6 - return bytes2ip(buf) + __esDecorate = function (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)); }; + 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; + }; - case 6: // tcp - case 273: // udp - case 33: // dccp - case 132: // sctp - return bytes2port(buf).toString() + __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; + }; - case 53: // dns - case 54: // dns4 - case 55: // dns6 - case 56: // dnsaddr - case 400: // unix - case 777: // memory - return bytes2str(buf) + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - case 421: // ipfs - return bytes2mh(buf) - case 444: // onion - return bytes2onion(buf) - case 445: // onion3 - return bytes2onion(buf) - default: - return uint8ArrayToString(buf, 'base16') // no clue. convert to hex - } -} + __setFunctionName = function (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 }); + }; -Convert.toBytes = function convertToBytes (/** @type {string | number } */ proto, /** @type {string} */ str) { - const protocol = protocols(proto) - switch (protocol.code) { - case 4: // ipv4 - return ip2bytes(str) - case 41: // ipv6 - return ip2bytes(str) + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; - case 6: // tcp - case 273: // udp - case 33: // dccp - case 132: // sctp - return port2bytes(parseInt(str, 10)) + __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()); + }); + }; - case 53: // dns - case 54: // dns4 - case 55: // dns6 - case 56: // dnsaddr - case 400: // unix - case 777: // memory - return str2bytes(str) + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; - case 421: // ipfs - return mh2bytes(str) - case 444: // onion - return onion2bytes(str) - case 445: // onion3 - return onion32bytes(str) - default: - return uint8ArrayFromString(str, 'base16') // no clue. convert from hex - } -} + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -/** - * @param {string} ipString - */ -function ip2bytes (ipString) { - if (!ip.isIP(ipString)) { - throw new Error('invalid ip address') - } - return ip.toBytes(ipString) -} + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -/** - * @param {Uint8Array} ipBuff - */ -function bytes2ip (ipBuff) { - const ipString = ip.toString(ipBuff) - if (!ipString || !ip.isIP(ipString)) { - throw new Error('invalid ip address') - } - return ipString -} + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -/** - * @param {number} port - */ -function port2bytes (port) { - const buf = new ArrayBuffer(2) - const view = new DataView(buf) - view.setUint16(0, port) + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; - return new Uint8Array(buf) -} + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; -/** - * @param {Uint8Array} buf - */ -function bytes2port (buf) { - const view = new DataView(buf.buffer) - return view.getUint16(buf.byteOffset) -} + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -/** - * @param {string} str - */ -function str2bytes (str) { - const buf = uint8ArrayFromString(str) - const size = Uint8Array.from(varint.encode(buf.length)) - return uint8ArrayConcat([size, buf], size.length + buf.length) -} + __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)); + }; -/** - * @param {Uint8Array} buf - */ -function bytes2str (buf) { - const size = varint.decode(buf) - buf = buf.slice(varint.decode.bytes) + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - if (buf.length !== size) { - throw new Error('inconsistent lengths') - } + __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(n, v); }); }; } + 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]); } + }; - return uint8ArrayToString(buf) -} + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -/** - * @param {string} hash - base58btc string - */ -function mh2bytes (hash) { - let mh + __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); } + }; - if (hash[0] === 'Q' || hash[0] === '1') { - mh = Digest.decode(base58btc.decode(`z${hash}`)).bytes - } else { - mh = CID.parse(hash).multihash.bytes - } + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - // the address is a varint prefixed multihash string representation - const size = Uint8Array.from(varint.encode(mh.length)) - return uint8ArrayConcat([size, mh], size.length + mh.length) -} + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -/** - * Converts bytes to bas58btc string - * - * @param {Uint8Array} buf - * @returns {string} base58btc string - */ -function bytes2mh (buf) { - const size = varint.decode(buf) - const address = buf.slice(varint.decode.bytes) + __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; + }; - if (address.length !== size) { - throw new Error('inconsistent lengths') - } + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - return uint8ArrayToString(address, 'base58btc') -} + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -/** - * @param {string} str - */ -function onion2bytes (str) { - const addr = str.split(':') - if (addr.length !== 2) { - throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') - } - if (addr[0].length !== 16) { - throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion address.') - } + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - // onion addresses do not include the multibase prefix, add it before decoding - const buf = base32.decode('b' + addr[0]) + __classPrivateFieldIn = function (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); + }; - // onion port number - const port = parseInt(addr[1], 10) - if (port < 1 || port > 65536) { - throw new Error('Port number is not in range(1, 65536)') - } - const portBuf = port2bytes(port) - return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) -} + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -/** - * @param {string} str - */ -function onion32bytes (str) { - const addr = str.split(':') - if (addr.length !== 2) { - throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') - } - if (addr[0].length !== 56) { - throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion3 address.') - } - // onion addresses do not include the multibase prefix, add it before decoding - const buf = base32.decode('b' + addr[0]) + 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; + }; - // onion port number - const port = parseInt(addr[1], 10) - if (port < 1 || port > 65536) { - throw new Error('Port number is not in range(1, 65536)') - } - const portBuf = port2bytes(port) - return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) -} + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -/** - * @param {Uint8Array} buf - */ -function bytes2onion (buf) { - const addrBytes = buf.slice(0, buf.length - 2) - const portBytes = buf.slice(buf.length - 2) - const addr = uint8ArrayToString(addrBytes, 'base32') - const port = bytes2port(portBytes) - return addr + ':' + port -} + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 47730: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 41308: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromString = exports.fromArrayBuffer = void 0; +const is_array_buffer_1 = __nccwpck_require__(80743); +const buffer_1 = __nccwpck_require__(14300); +const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { + if (!(0, is_array_buffer_1.isArrayBuffer)(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); + } + return buffer_1.Buffer.from(input, offset, length); +}; +exports.fromArrayBuffer = fromArrayBuffer; +const fromString = (input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + } + return encoding ? buffer_1.Buffer.from(input, encoding) : buffer_1.Buffer.from(input); +}; +exports.fromString = fromString; -const codec = __nccwpck_require__(22126) -const protocols = __nccwpck_require__(19612) -const varint = __nccwpck_require__(30310) -const { CID } = __nccwpck_require__(24247) -const { base58btc } = __nccwpck_require__(49108) -const errCode = __nccwpck_require__(5822) -const inspect = Symbol.for('nodejs.util.inspect.custom') -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) -/** - * @typedef {(addr: Multiaddr) => Promise} Resolver - * @typedef {string | Multiaddr | Uint8Array | null} MultiaddrInput - * @typedef {import('./types').MultiaddrObject} MultiaddrObject - * @typedef {import('./types').Protocol} Protocol - */ +/***/ }), -/** @type {Map} */ -const resolvers = new Map() -const symbol = Symbol.for('@multiformats/js-multiaddr/multiaddr') +/***/ 94733: +/***/ ((__unused_webpack_module, exports) => { -/** - * Creates a [multiaddr](https://github.com/multiformats/multiaddr) from - * a Uint8Array, String or another Multiaddr instance - * public key. - * - */ -class Multiaddr { - /** - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * ``` - * - * @param {MultiaddrInput} [addr] - If String or Uint8Array, needs to adhere to the address format of a [multiaddr](https://github.com/multiformats/multiaddr#string-format) - */ - constructor (addr) { - // default - if (addr == null) { - addr = '' - } - // Define symbol - Object.defineProperty(this, symbol, { value: true }) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.booleanSelector = void 0; +const booleanSelector = (obj, key, type) => { + if (!(key in obj)) + return undefined; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); +}; +exports.booleanSelector = booleanSelector; - if (addr instanceof Uint8Array) { - /** @type {Uint8Array} - The raw bytes representing this multiaddress */ - this.bytes = codec.fromBytes(addr) - } else if (typeof addr === 'string') { - if (addr.length > 0 && addr.charAt(0) !== '/') { - throw new Error(`multiaddr "${addr}" must start with a "/"`) - } - this.bytes = codec.fromString(addr) - } else if (Multiaddr.isMultiaddr(addr)) { // Multiaddr - this.bytes = codec.fromBytes(addr.bytes) // validate + copy buffer - } else { - throw new Error('addr must be a string, Buffer, or another Multiaddr') - } - } - /** - * Returns Multiaddr as a String - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toString() - * // '/ip4/127.0.0.1/tcp/4001' - * ``` - */ - toString () { - return codec.bytesToString(this.bytes) - } +/***/ }), - /** - * Returns Multiaddr as a JSON encoded object - * - * @example - * ```js - * JSON.stringify(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) - * // '/ip4/127.0.0.1/tcp/4001' - * ``` - */ - toJSON () { - return this.toString() - } +/***/ 32617: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - /** - * Returns Multiaddr as a convinient options object to be used with net.createConnection - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toOptions() - * // { family: 4, host: '127.0.0.1', transport: 'tcp', port: 4001 } - * ``` - */ - toOptions () { - /** @type {MultiaddrObject} */ - const opts = {} - const parsed = this.toString().split('/') - opts.family = parsed[1] === 'ip4' ? 4 : 6 - opts.host = parsed[2] - opts.transport = parsed[3] - opts.port = parseInt(parsed[4]) - return opts - } - /** - * Returns the protocols the Multiaddr is defined with, as an array of objects, in - * left-to-right order. Each object contains the protocol code, protocol name, - * and the size of its address space in bits. - * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protos() - * // [ { code: 4, size: 32, name: 'ip4' }, - * // { code: 6, size: 16, name: 'tcp' } ] - * ``` - * - * @returns {Protocol[]} protocols - All the protocols the address is composed of - */ - protos () { - return this.protoCodes().map(code => Object.assign({}, protocols(code))) - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(13823); +tslib_1.__exportStar(__nccwpck_require__(94733), exports); +tslib_1.__exportStar(__nccwpck_require__(39576), exports); +tslib_1.__exportStar(__nccwpck_require__(33376), exports); - /** - * Returns the codes of the protocols in left-to-right order. - * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) - * - * @example - * ```js - * Multiaddr('/ip4/127.0.0.1/tcp/4001').protoCodes() - * // [ 4, 6 ] - * ``` - * - * @returns {number[]} protocol codes - */ - protoCodes () { - const codes = [] - const buf = this.bytes - let i = 0 - while (i < buf.length) { - const code = varint.decode(buf, i) - const n = varint.decode.bytes - const p = protocols(code) - const size = codec.sizeForAddr(p, buf.slice(i + n)) +/***/ }), - i += (size + n) - codes.push(code) +/***/ 39576: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.numberSelector = void 0; +const numberSelector = (obj, key, type) => { + if (!(key in obj)) + return undefined; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); } + return numberValue; +}; +exports.numberSelector = numberSelector; - return codes - } - /** - * Returns the names of the protocols in left-to-right order. - * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protoNames() - * // [ 'ip4', 'tcp' ] - * ``` - * - * @returns {string[]} protocol names - */ - protoNames () { - return this.protos().map(proto => proto.name) - } +/***/ }), - /** - * Returns a tuple of parts - * - * @example - * ```js - * new Multiaddr("/ip4/127.0.0.1/tcp/4001").tuples() - * // [ [ 4, ], [ 6, ] ] - * ``` - */ - tuples () { - return codec.bytesToTuples(this.bytes) - } +/***/ 33376: +/***/ ((__unused_webpack_module, exports) => { - /** - * Returns a tuple of string/number parts - * - tuples[][0] = code of protocol - * - tuples[][1] = contents of address - * - * @example - * ```js - * new Multiaddr("/ip4/127.0.0.1/tcp/4001").stringTuples() - * // [ [ 4, '127.0.0.1' ], [ 6, '4001' ] ] - * ``` - */ - stringTuples () { - const t = codec.bytesToTuples(this.bytes) - return codec.tuplesToStringTuples(t) - } - /** - * Encapsulates a Multiaddr in another Multiaddr - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') - * // - * - * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * - * const mh3 = mh1.encapsulate(mh2) - * // - * - * mh3.toString() - * // '/ip4/8.8.8.8/tcp/1080/ip4/127.0.0.1/tcp/4001' - * ``` - * - * @param {MultiaddrInput} addr - Multiaddr to add into this Multiaddr - */ - encapsulate (addr) { - addr = new Multiaddr(addr) - return new Multiaddr(this.toString() + addr.toString()) - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SelectorType = void 0; +var SelectorType; +(function (SelectorType) { + SelectorType["ENV"] = "env"; + SelectorType["CONFIG"] = "shared config entry"; +})(SelectorType = exports.SelectorType || (exports.SelectorType = {})); - /** - * Decapsulates a Multiaddr from another Multiaddr - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') - * // - * - * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * - * const mh3 = mh1.encapsulate(mh2) - * // - * - * mh3.decapsulate(mh2).toString() - * // '/ip4/8.8.8.8/tcp/1080' - * ``` - * - * @param {Multiaddr | string} addr - Multiaddr to remove from this Multiaddr - * @returns {Multiaddr} - */ - decapsulate (addr) { - const addrString = addr.toString() - const s = this.toString() - const i = s.lastIndexOf(addrString) - if (i < 0) { - throw new Error('Address ' + this + ' does not contain subaddress: ' + addr) - } - return new Multiaddr(s.slice(0, i)) - } - /** - * A more reliable version of `decapsulate` if you are targeting a - * specific code, such as 421 (the `p2p` protocol code). The last index of the code - * will be removed from the `Multiaddr`, and a new instance will be returned. - * If the code is not present, the original `Multiaddr` is returned. - * - * @example - * ```js - * const addr = new Multiaddr('/ip4/0.0.0.0/tcp/8080/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC') - * // - * - * addr.decapsulateCode(421).toString() - * // '/ip4/0.0.0.0/tcp/8080' - * - * new Multiaddr('/ip4/127.0.0.1/tcp/8080').decapsulateCode(421).toString() - * // '/ip4/127.0.0.1/tcp/8080' - * ``` - * - * @param {number} code - The code of the protocol to decapsulate from this Multiaddr - * @returns {Multiaddr} - */ - decapsulateCode (code) { - const tuples = this.tuples() - for (let i = tuples.length - 1; i >= 0; i--) { - if (tuples[i][0] === code) { - return new Multiaddr(codec.tuplesToBytes(tuples.slice(0, i))) - } +/***/ }), + +/***/ 13823: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } - return this - } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; - /** - * Extract the peerId if the multiaddr contains one - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/ipfs/QmValidBase58string') - * // - * - * // should return QmValidBase58string or null if the id is missing or invalid - * const peerId = mh1.getPeerId() - * ``` - * - * @returns {string | null} peerId - The id of the peer or null if invalid or missing from the ma - */ - getPeerId () { - try { - const tuples = this.stringTuples().filter((tuple) => { - if (tuple[0] === protocols.names.ipfs.code) { - return true + __assign = Object.assign || function (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 false - }) + return t; + }; - // Get the last ipfs tuple ['ipfs', 'peerid string'] - const tuple = tuples.pop() - if (tuple && tuple[1]) { - const peerIdStr = tuple[1] + __rest = function (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; + }; - // peer id is base58btc encoded string but not multibase encoded so add the `z` - // prefix so we can validate that it is correctly encoded - if (peerIdStr[0] === 'Q' || peerIdStr[0] === '1') { - return uint8ArrayToString(base58btc.decode(`z${peerIdStr}`), 'base58btc') + __decorate = function (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; + }; + + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; + + __esDecorate = function (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)); }; + 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; + }; - // try to parse peer id as CID - return uint8ArrayToString(CID.parse(peerIdStr).multihash.bytes, 'base58btc') - } + __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; + }; - return null - } catch (e) { - return null - } - } + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; - /** - * Extract the path if the multiaddr contains one - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/unix/tmp/p2p.sock') - * // - * - * // should return utf8 string or null if the id is missing or invalid - * const path = mh1.getPath() - * ```js - * - * @returns {string | null} path - The path of the multiaddr, or null if no path protocol is present - */ - getPath () { - let path = null - try { - path = this.stringTuples().filter((tuple) => { - const proto = protocols(tuple[0]) - if (proto.path) { - return true + __setFunctionName = function (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 }); + }; + + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; } - return false - })[0][1] + }; - if (!path) { - path = null - } - } catch (e) { - path = null - } - return path - } + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; - /** - * Checks if two Multiaddrs are the same - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') - * // - * - * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * - * mh1.equals(mh1) - * // true - * - * mh1.equals(mh2) - * // false - * ``` - * - * @param {Multiaddr} addr - * @returns {boolean} - */ - equals (addr) { - return uint8ArrayEquals(this.bytes, addr.bytes) - } + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); - /** - * Resolve multiaddr if containing resolvable hostname. - * - * @example - * ```js - * Multiaddr.resolvers.set('dnsaddr', resolverFunction) - * const mh1 = new Multiaddr('/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb') - * const resolvedMultiaddrs = await mh1.resolve() - * // [ - * // , - * // , - * // - * // ] - * ``` - * - * @returns {Promise>} - */ - async resolve () { - const resolvableProto = this.protos().find((p) => p.resolvable) + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; - // Multiaddr is not resolvable? - if (!resolvableProto) { - return [this] - } + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; - const resolver = resolvers.get(resolvableProto.name) - if (!resolver) { - throw errCode(new Error(`no available resolver for ${resolvableProto.name}`), 'ERR_NO_AVAILABLE_RESOLVER') - } + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; - const addresses = await resolver(this) - return addresses.map((a) => new Multiaddr(a)) - } + /** @deprecated */ + __spreadArrays = function () { + 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; + }; - /** - * Gets a Multiaddrs node-friendly address object. Note that protocol information - * is left out: in Node (and most network systems) the protocol is unknowable - * given only the address. - * - * Has to be a ThinWaist Address, otherwise throws error - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').nodeAddress() - * // {family: 4, address: '127.0.0.1', port: 4001} - * ``` - * - * @returns {{family: 4 | 6, address: string, port: number}} - * @throws {Error} Throws error if Multiaddr is not a Thin Waist address - */ - nodeAddress () { - const codes = this.protoCodes() - const names = this.protoNames() - const parts = this.toString().split('/').slice(1) + __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)); + }; - if (parts.length < 4) { - throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".') - } else if (codes[0] !== 4 && codes[0] !== 41 && codes[0] !== 54 && codes[0] !== 55) { - throw new Error(`no protocol with name: "'${names[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`) - } else if (parts[2] !== 'tcp' && parts[2] !== 'udp') { - throw new Error(`no protocol with name: "'${names[1]}'". Must have a valid transport protocol: "{tcp, udp}".`) - } + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - return { - family: (codes[0] === 41 || codes[0] === 55) ? 6 : 4, - address: parts[1], - port: parseInt(parts[3]) // tcp or udp port - } - } + __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(n, v); }); }; } + 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]); } + }; - /** - * Returns if a Multiaddr is a Thin Waist address or not. - * - * Thin Waist is if a Multiaddr adheres to the standard combination of: - * - * `{IPv4, IPv6}/{TCP, UDP}` - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * const mh2 = new Multiaddr('/ip4/192.168.2.1/tcp/5001') - * // - * const mh3 = mh1.encapsulate(mh2) - * // - * const mh4 = new Multiaddr('/ip4/127.0.0.1/tcp/2000/wss/p2p-webrtc-star/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSooo2a') - * // - * mh1.isThinWaistAddress() - * // true - * mh2.isThinWaistAddress() - * // true - * mh3.isThinWaistAddress() - * // false - * mh4.isThinWaistAddress() - * // false - * ``` - * - * @param {Multiaddr} [addr] - Defaults to using `this` instance - */ - isThinWaistAddress (addr) { - const protos = (addr || this).protos() + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; - if (protos.length !== 2) { - return false - } + __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); } + }; - if (protos[0].code !== 4 && protos[0].code !== 41) { - return false - } - if (protos[1].code !== 6 && protos[1].code !== 273) { - return false - } - return true - } + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; - /** - * Creates a Multiaddr from a node-friendly address object - * - * @example - * ```js - * Multiaddr.fromNodeAddress({address: '127.0.0.1', port: '4001'}, 'tcp') - * // - * ``` - * - * @param {{family: 4 | 6, address: string, port: number}} addr - * @param {string} transport - */ - static fromNodeAddress (addr, transport) { - if (!addr) { throw new Error('requires node address object') } - if (!transport) { throw new Error('requires transport protocol') } - let ip - switch (addr.family) { - case 4: - ip = 'ip4' - break - case 6: - ip = 'ip6' - break - default: - throw Error(`Invalid addr family. Got '${addr.family}' instead of 4 or 6`) - } - return new Multiaddr('/' + [ip, addr.address, transport, addr.port].join('/')) - } + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; - /** - * Returns if something is a Multiaddr that is a name - * - * @param {Multiaddr} addr - * @returns {boolean} isName - */ - static isName (addr) { - if (!Multiaddr.isMultiaddr(addr)) { - return false - } + __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; + }; - // if a part of the multiaddr is resolvable, then return true - return addr.protos().some((proto) => proto.resolvable) - } + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - /** - * Check if object is a CID instance - * - * @param {any} value - * @returns {value is Multiaddr} - */ - static isMultiaddr (value) { - return value instanceof Multiaddr || Boolean(value && value[symbol]) - } + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; - /** - * Returns Multiaddr as a human-readable string. - * For post Node.js v10.0.0. - * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect - * - * @example - * ```js - * console.log(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) - * // '' - * ``` - * - * @returns {string} - */ - [inspect] () { - return '' - } + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; - /** - * Returns Multiaddr as a human-readable string. - * Fallback for pre Node.js v10.0.0. - * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').inspect() - * // '' - * ``` - * - * @returns {string} - */ - inspect () { - return '' - } -} + __classPrivateFieldIn = function (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); + }; -/** - * Object containing table, names and codes of all supported protocols. - * To get the protocol values from a Multiaddr, you can use - * [`.protos()`](#multiaddrprotos), - * [`.protoCodes()`](#multiaddrprotocodes) or - * [`.protoNames()`](#multiaddrprotonames) - * - * @returns {{table: Array, names: Object, codes: Object}} - */ -Multiaddr.protocols = protocols + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -Multiaddr.resolvers = resolvers + 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; + }; -/** - * Static factory - * - * @param {MultiaddrInput} addr - */ -function multiaddr (addr) { - return new Multiaddr(addr) -} + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -module.exports = { Multiaddr, multiaddr, protocols, resolvers } + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 53153: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ 88479: +/***/ ((__unused_webpack_module, exports) => { -"use strict"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IMDS_REGION_PATH = exports.DEFAULTS_MODE_OPTIONS = exports.ENV_IMDS_DISABLED = exports.AWS_DEFAULT_REGION_ENV = exports.AWS_REGION_ENV = exports.AWS_EXECUTION_ENV = void 0; +exports.AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; +exports.AWS_REGION_ENV = "AWS_REGION"; +exports.AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; +exports.ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +exports.DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; +exports.IMDS_REGION_PATH = "/latest/meta-data/placement/region"; -const isIp = __nccwpck_require__(89837) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const isIP = isIp -const isV4 = isIp.v4 -const isV6 = isIp.v6 +/***/ }), -// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L7 -// @ts-ignore - this is copied from the link above better to keep it the same -const toBytes = function (ip, buff, offset) { - offset = ~~offset +/***/ 11643: +/***/ ((__unused_webpack_module, exports) => { - let result - if (isV4(ip)) { - result = buff || new Uint8Array(offset + 4) - // @ts-ignore - // eslint-disable-next-line array-callback-return - ip.split(/\./g).map(function (byte) { - result[offset++] = parseInt(byte, 10) & 0xff - }) - } else if (isV6(ip)) { - const sections = ip.split(':', 8) +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.NODE_DEFAULTS_MODE_CONFIG_OPTIONS = void 0; +const AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; +const AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; +exports.NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + return env[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy", +}; - let i - for (i = 0; i < sections.length; i++) { - const isv4 = isV4(sections[i]) - let v4Buffer - if (isv4) { - v4Buffer = toBytes(sections[i]) - sections[i] = uint8ArrayToString(v4Buffer.slice(0, 2), 'base16') - } +/***/ }), - if (v4Buffer && ++i < 8) { - sections.splice(i, 0, uint8ArrayToString(v4Buffer.slice(2, 4), 'base16')) - } - } +/***/ 6061: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - if (sections[0] === '') { - while (sections.length < 8) sections.unshift('0') - } else if (sections[sections.length - 1] === '') { - while (sections.length < 8) sections.push('0') - } else if (sections.length < 8) { - for (i = 0; i < sections.length && sections[i] !== ''; i++); - const argv = [i, '1'] - for (i = 9 - sections.length; i > 0; i--) { - argv.push('0') - } - sections.splice.apply(sections, argv) - } - result = buff || new Uint8Array(offset + 16) - for (i = 0; i < sections.length; i++) { - const word = parseInt(sections[i], 16) - result[offset++] = (word >> 8) & 0xff - result[offset++] = word & 0xff - } - } +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(78457); +tslib_1.__exportStar(__nccwpck_require__(87965), exports); - if (!result) { - throw Error('Invalid ip address: ' + ip) - } - return result -} +/***/ }), -// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63 -// @ts-ignore - this is copied from the link above better to keep it the same -const toString = function (buff, offset, length) { - offset = ~~offset - length = length || (buff.length - offset) +/***/ 87965: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - const result = [] - let string - const view = new DataView(buff.buffer) - if (length === 4) { - // IPv4 - for (let i = 0; i < length; i++) { - result.push(buff[offset + i]) + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveDefaultsModeConfig = void 0; +const config_resolver_1 = __nccwpck_require__(66041); +const credential_provider_imds_1 = __nccwpck_require__(34673); +const node_config_provider_1 = __nccwpck_require__(13079); +const property_provider_1 = __nccwpck_require__(12955); +const constants_1 = __nccwpck_require__(88479); +const defaultsModeConfig_1 = __nccwpck_require__(11643); +const resolveDefaultsModeConfig = ({ region = (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS), defaultsMode = (0, node_config_provider_1.loadConfig)(defaultsModeConfig_1.NODE_DEFAULTS_MODE_CONFIG_OPTIONS), } = {}) => (0, property_provider_1.memoize)(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode === null || mode === void 0 ? void 0 : mode.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode === null || mode === void 0 ? void 0 : mode.toLocaleLowerCase()); + case undefined: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${constants_1.DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); } - string = result.join('.') - } else if (length === 16) { - // IPv6 - for (let i = 0; i < length; i += 2) { - result.push(view.getUint16(offset + i).toString(16)) +}); +exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig; +const resolveNodeDefaultsModeAuto = async (clientRegion) => { + if (clientRegion) { + const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; + const inferredRegion = await inferPhysicalRegion(); + if (!inferredRegion) { + return "standard"; + } + if (resolvedRegion === inferredRegion) { + return "in-region"; + } + else { + return "cross-region"; + } } - string = result.join(':') - string = string.replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3') - string = string.replace(/:{3,4}/, '::') - } - - return string -} - -module.exports = { - isIP, - isV4, - isV6, - toBytes, - toString -} + return "standard"; +}; +const inferPhysicalRegion = async () => { + var _a; + if (process.env[constants_1.AWS_EXECUTION_ENV] && (process.env[constants_1.AWS_REGION_ENV] || process.env[constants_1.AWS_DEFAULT_REGION_ENV])) { + return (_a = process.env[constants_1.AWS_REGION_ENV]) !== null && _a !== void 0 ? _a : process.env[constants_1.AWS_DEFAULT_REGION_ENV]; + } + if (!process.env[constants_1.ENV_IMDS_DISABLED]) { + try { + const endpoint = await (0, credential_provider_imds_1.getInstanceMetadataEndpoint)(); + return (await (0, credential_provider_imds_1.httpRequest)({ ...endpoint, path: constants_1.IMDS_REGION_PATH })).toString(); + } + catch (e) { + } + } +}; /***/ }), -/***/ 19612: +/***/ 78457: /***/ ((module) => { -"use strict"; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -/** @typedef {import("./types").Protocol} Protocol */ + __assign = Object.assign || function (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; + }; -/** - * Protocols - * - * @param {number | string} proto - * @returns {Protocol} - */ -function Protocols (proto) { - if (typeof (proto) === 'number') { - if (Protocols.codes[proto]) { - return Protocols.codes[proto] - } + __rest = function (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; + }; - throw new Error('no protocol with code: ' + proto) - } else if (typeof (proto) === 'string') { - if (Protocols.names[proto]) { - return Protocols.names[proto] - } + __decorate = function (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; + }; - throw new Error('no protocol with name: ' + proto) - } + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; - throw new Error('invalid protocol id type: ' + proto) -} + __esDecorate = function (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)); }; + 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; + }; -const V = -1 -Protocols.lengthPrefixedVarSize = V -Protocols.V = V + __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; + }; -/** @type {Array<[number, number, string, (string|boolean)?, string?]>} */ -Protocols.table = [ - [4, 32, 'ip4'], - [6, 16, 'tcp'], - [33, 16, 'dccp'], - [41, 128, 'ip6'], - [42, V, 'ip6zone'], - [53, V, 'dns', 'resolvable'], - [54, V, 'dns4', 'resolvable'], - [55, V, 'dns6', 'resolvable'], - [56, V, 'dnsaddr', 'resolvable'], - [132, 16, 'sctp'], - [273, 16, 'udp'], - [275, 0, 'p2p-webrtc-star'], - [276, 0, 'p2p-webrtc-direct'], - [277, 0, 'p2p-stardust'], - [290, 0, 'p2p-circuit'], - [301, 0, 'udt'], - [302, 0, 'utp'], - [400, V, 'unix', false, 'path'], - // `ipfs` is added before `p2p` for legacy support. - // All text representations will default to `p2p`, but `ipfs` will - // still be supported - [421, V, 'ipfs'], - // `p2p` is the preferred name for 421, and is now the default - [421, V, 'p2p'], - [443, 0, 'https'], - [444, 96, 'onion'], - [445, 296, 'onion3'], - [446, V, 'garlic64'], - [460, 0, 'quic'], - [477, 0, 'ws'], - [478, 0, 'wss'], - [479, 0, 'p2p-websocket-star'], - [480, 0, 'http'], - [777, V, 'memory'] -] -/** @type {Record} */ -Protocols.names = {} -/** @type {Record} */ -Protocols.codes = {} + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -// populate tables -Protocols.table.map(row => { - const proto = p.apply(null, row) - Protocols.codes[proto.code] = proto - Protocols.names[proto.name] = proto - return null -}) + __setFunctionName = function (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 }); + }; -Protocols.object = p + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -/** - * - * Create a protocol - * - * @param {number} code - * @param {number} size - * @param {string} name - * @param {any} [resolvable] - * @param {any} [path] - * @returns {Protocol} - */ -function p (code, size, name, resolvable, path) { - return { - code, - size, - name, - resolvable: Boolean(resolvable), - path: Boolean(path) - } -} + __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()); + }); + }; -module.exports = Protocols + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -/***/ }), + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -/***/ 45261: -/***/ ((module) => { + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -module.exports = read + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -var MSB = 0x80 - , REST = 0x7F + /** @deprecated */ + __spread = function () { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; + }; -function read(buf, offset) { - var res = 0 - , offset = offset || 0 - , shift = 0 - , counter = offset - , b - , l = buf.length + /** @deprecated */ + __spreadArrays = function () { + 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; + }; - do { - if (counter >= l || shift > 49) { - read.bytes = 0 - throw new RangeError('Could not decode varint') - } - b = buf[counter++] - res += shift < 28 - ? (b & REST) << shift - : (b & REST) * Math.pow(2, shift) - shift += 7 - } while (b >= MSB) + __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)); + }; - read.bytes = counter - offset + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; - return res -} + __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(n, v); }); }; } + 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]); } + }; + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -/***/ }), + __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); } + }; -/***/ 12801: -/***/ ((module) => { + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -module.exports = encode + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -var MSB = 0x80 - , REST = 0x7F - , MSBALL = ~REST - , INT = Math.pow(2, 31) + __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; + }; -function encode(num, out, offset) { - if (Number.MAX_SAFE_INTEGER && num > Number.MAX_SAFE_INTEGER) { - encode.bytes = 0 - throw new RangeError('Could not encode varint') - } - out = out || [] - offset = offset || 0 - var oldOffset = offset + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; - while(num >= INT) { - out[offset++] = (num & 0xFF) | MSB - num /= 128 - } - while(num & MSBALL) { - out[offset++] = (num & 0xFF) | MSB - num >>>= 7 - } - out[offset] = num | 0 - - encode.bytes = offset - oldOffset + 1 - - return out -} + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -/***/ }), + __classPrivateFieldIn = function (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); + }; -/***/ 30310: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -module.exports = { - encode: __nccwpck_require__(12801) - , decode: __nccwpck_require__(45261) - , encodingLength: __nccwpck_require__(92945) -} + 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; + }; + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -/***/ }), + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); -/***/ 92945: -/***/ ((module) => { +/***/ }), -var N1 = Math.pow(2, 7) -var N2 = Math.pow(2, 14) -var N3 = Math.pow(2, 21) -var N4 = Math.pow(2, 28) -var N5 = Math.pow(2, 35) -var N6 = Math.pow(2, 42) -var N7 = Math.pow(2, 49) -var N8 = Math.pow(2, 56) -var N9 = Math.pow(2, 63) +/***/ 82902: +/***/ ((__unused_webpack_module, exports) => { -module.exports = function (value) { - return ( - value < N1 ? 1 - : value < N2 ? 2 - : value < N3 ? 3 - : value < N4 ? 4 - : value < N5 ? 5 - : value < N6 ? 6 - : value < N7 ? 7 - : value < N8 ? 8 - : value < N9 ? 9 - : 10 - ) -} + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.debugId = void 0; +exports.debugId = "endpoints"; /***/ }), -/***/ 44713: +/***/ 4140: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(9286); +tslib_1.__exportStar(__nccwpck_require__(82902), exports); +tslib_1.__exportStar(__nccwpck_require__(47162), exports); -var cid = __nccwpck_require__(24247); -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var multipartRequest = __nccwpck_require__(87527); -var toUrlSearchParams = __nccwpck_require__(52836); -var abortSignal = __nccwpck_require__(14594); -var nativeAbortController = __nccwpck_require__(43586); -const createAddAll = configure.configure(api => { - async function* addAll(source, options = {}) { - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, options.signal); - const {headers, body, total, parts} = await multipartRequest.multipartRequest(source, controller, options.headers); - const [progressFn, onUploadProgress] = typeof options.progress === 'function' ? createProgressHandler(total, parts, options.progress) : [ - undefined, - undefined - ]; - const res = await api.post('add', { - searchParams: toUrlSearchParams.toUrlSearchParams({ - 'stream-channels': true, - ...options, - progress: Boolean(progressFn) - }), - onUploadProgress, - signal, - headers, - body - }); - for await (let file of res.ndjson()) { - file = objectToCamel.objectToCamel(file); - if (file.hash !== undefined) { - yield toCoreInterface(file); - } else if (progressFn) { - progressFn(file.bytes || 0, file.name); - } +/***/ }), + +/***/ 47162: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toDebugString = void 0; +function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; } - } - return addAll; -}); -const createProgressHandler = (total, parts, progress) => parts ? [ - undefined, - createOnUploadProgress(total, parts, progress) -] : [ - progress, - undefined -]; -const createOnUploadProgress = (size, parts, progress) => { - let index = 0; - const count = parts.length; - return ({loaded, total}) => { - const position = Math.floor(loaded / total * size); - while (index < count) { - const {start, end, name} = parts[index]; - if (position < end) { - progress(position - start, name); - break; - } else { - progress(end - start, name); - index += 1; - } + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; } - }; -}; -function toCoreInterface({name, hash, size, mode, mtime, mtimeNsecs}) { - const output = { - path: name, - cid: cid.CID.parse(hash), - size: parseInt(size) - }; - if (mode != null) { - output.mode = parseInt(mode, 8); - } - if (mtime != null) { - output.mtime = { - secs: mtime, - nsecs: mtimeNsecs || 0 - }; - } - return output; + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; + } + return JSON.stringify(input, null, 2); } - -exports.createAddAll = createAddAll; +exports.toDebugString = toDebugString; /***/ }), -/***/ 26151: +/***/ 34548: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(9286); +tslib_1.__exportStar(__nccwpck_require__(19229), exports); +tslib_1.__exportStar(__nccwpck_require__(73598), exports); +tslib_1.__exportStar(__nccwpck_require__(59612), exports); +tslib_1.__exportStar(__nccwpck_require__(77555), exports); +tslib_1.__exportStar(__nccwpck_require__(64175), exports); -var addAll = __nccwpck_require__(44713); -var last = __nccwpck_require__(28741); -var configure = __nccwpck_require__(31775); -var normaliseInputSingle = __nccwpck_require__(75400); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var last__default = /*#__PURE__*/_interopDefaultLegacy(last); +/***/ 56216: +/***/ ((__unused_webpack_module, exports) => { -function createAdd(options) { - const all = addAll.createAddAll(options); - return configure.configure(() => { - async function add(input, options = {}) { - return await last__default["default"](all(normaliseInputSingle.normaliseInput(input), options)); - } - return add; - })(options); -} -exports.createAdd = createAdd; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.booleanEquals = void 0; +const booleanEquals = (value1, value2) => value1 === value2; +exports.booleanEquals = booleanEquals; /***/ }), -/***/ 60138: +/***/ 27597: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var wantlist = __nccwpck_require__(81812); -var wantlistForPeer = __nccwpck_require__(34861); -var stat = __nccwpck_require__(70104); -var unwant = __nccwpck_require__(12388); - -function createBitswap(config) { - return { - wantlist: wantlist.createWantlist(config), - wantlistForPeer: wantlistForPeer.createWantlistForPeer(config), - unwant: unwant.createUnwant(config), - stat: stat.createStat(config) - }; -} - -exports.createBitswap = createBitswap; +exports.getAttr = void 0; +const types_1 = __nccwpck_require__(64175); +const getAttrPathList_1 = __nccwpck_require__(69180); +const getAttr = (value, path) => (0, getAttrPathList_1.getAttrPathList)(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new types_1.EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); + } + else if (Array.isArray(acc)) { + return acc[parseInt(index)]; + } + return acc[index]; +}, value); +exports.getAttr = getAttr; /***/ }), -/***/ 70104: +/***/ 69180: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createStat = configure.configure(api => { - async function stat(options = {}) { - const res = await api.post('bitswap/stat', { - searchParams: toUrlSearchParams.toUrlSearchParams(options), - signal: options.signal, - headers: options.headers - }); - return toCoreInterface(await res.json()); - } - return stat; -}); -function toCoreInterface(res) { - return { - provideBufLen: res.ProvideBufLen, - wantlist: (res.Wantlist || []).map(k => cid.CID.parse(k['/'])), - peers: res.Peers || [], - blocksReceived: BigInt(res.BlocksReceived), - dataReceived: BigInt(res.DataReceived), - blocksSent: BigInt(res.BlocksSent), - dataSent: BigInt(res.DataSent), - dupBlksReceived: BigInt(res.DupBlksReceived), - dupDataReceived: BigInt(res.DupDataReceived) - }; -} - -exports.createStat = createStat; +exports.getAttrPathList = void 0; +const types_1 = __nccwpck_require__(64175); +const getAttrPathList = (path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new types_1.EndpointError(`Path: '${path}' does not end with ']'`); + } + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new types_1.EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + } + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); + } + pathList.push(arrayIndex); + } + else { + pathList.push(part); + } + } + return pathList; +}; +exports.getAttrPathList = getAttrPathList; /***/ }), -/***/ 12388: +/***/ 8649: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createUnwant = configure.configure(api => { - async function unwant(cid, options = {}) { - const res = await api.post('bitswap/unwant', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: cid.toString(), - ...options - }), - headers: options.headers - }); - return res.json(); - } - return unwant; -}); - -exports.createUnwant = createUnwant; +const tslib_1 = __nccwpck_require__(9286); +tslib_1.__exportStar(__nccwpck_require__(56216), exports); +tslib_1.__exportStar(__nccwpck_require__(27597), exports); +tslib_1.__exportStar(__nccwpck_require__(15762), exports); +tslib_1.__exportStar(__nccwpck_require__(73598), exports); +tslib_1.__exportStar(__nccwpck_require__(89166), exports); +tslib_1.__exportStar(__nccwpck_require__(41146), exports); +tslib_1.__exportStar(__nccwpck_require__(39953), exports); +tslib_1.__exportStar(__nccwpck_require__(50584), exports); +tslib_1.__exportStar(__nccwpck_require__(28758), exports); /***/ }), -/***/ 34861: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 19229: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isIpAddress = void 0; +const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); +const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith("[") && value.endsWith("]")); +exports.isIpAddress = isIpAddress; -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -const createWantlistForPeer = configure.configure(api => { - async function wantlistForPeer(peerId, options = {}) { - const res = await (await api.post('bitswap/wantlist', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - ...options, - peer: peerId.toString() - }), - headers: options.headers - })).json(); - return (res.Keys || []).map(k => cid.CID.parse(k['/'])); - } - return wantlistForPeer; -}); +/***/ }), -exports.createWantlistForPeer = createWantlistForPeer; +/***/ 15762: +/***/ ((__unused_webpack_module, exports) => { -/***/ }), +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isSet = void 0; +const isSet = (value) => value != null; +exports.isSet = isSet; -/***/ 81812: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +/***/ }), + +/***/ 73598: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isValidHostLabel = void 0; +const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); +const isValidHostLabel = (value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); + } + const labels = value.split("."); + for (const label of labels) { + if (!(0, exports.isValidHostLabel)(label)) { + return false; + } + } + return true; +}; +exports.isValidHostLabel = isValidHostLabel; -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -const createWantlist = configure.configure(api => { - async function wantlist(options = {}) { - const res = await (await api.post('bitswap/wantlist', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - })).json(); - return (res.Keys || []).map(k => cid.CID.parse(k['/'])); - } - return wantlist; -}); +/***/ }), -exports.createWantlist = createWantlist; +/***/ 89166: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.not = void 0; +const not = (value) => !value; +exports.not = not; /***/ }), -/***/ 22845: +/***/ 41146: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.parseURL = void 0; +const types_1 = __nccwpck_require__(75751); +const isIpAddress_1 = __nccwpck_require__(19229); +const DEFAULT_PORTS = { + [types_1.EndpointURLScheme.HTTP]: 80, + [types_1.EndpointURLScheme.HTTPS]: 443, +}; +const parseURL = (value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; + } + if (typeof value === "object" && "hostname" in value) { + const { hostname, port, protocol = "", path = "", query = {} } = value; + const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : ""}${path}`); + url.search = Object.entries(query) + .map(([k, v]) => `${k}=${v}`) + .join("&"); + return url; + } + return new URL(value); + } + catch (error) { + return null; + } + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(types_1.EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = (0, isIpAddress_1.isIpAddress)(hostname); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || + (typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`)); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp, + }; +}; +exports.parseURL = parseURL; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -const createGet = configure.configure(api => { - async function get(cid, options = {}) { - const res = await api.post('block/get', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: cid.toString(), - ...options - }), - headers: options.headers - }); - return new Uint8Array(await res.arrayBuffer()); - } - return get; -}); +/***/ }), -exports.createGet = createGet; +/***/ 39953: +/***/ ((__unused_webpack_module, exports) => { -/***/ }), +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.stringEquals = void 0; +const stringEquals = (value1, value2) => value1 === value2; +exports.stringEquals = stringEquals; -/***/ 54826: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +/***/ }), + +/***/ 50584: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.substring = void 0; +const substring = (input, start, stop, reverse) => { + if (start >= stop || input.length < stop) { + return null; + } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); +}; +exports.substring = substring; -var get = __nccwpck_require__(22845); -var put = __nccwpck_require__(64124); -var rm = __nccwpck_require__(16250); -var stat = __nccwpck_require__(86947); -function createBlock(config) { - return { - get: get.createGet(config), - put: put.createPut(config), - rm: rm.createRm(config), - stat: stat.createStat(config) - }; -} +/***/ }), -exports.createBlock = createBlock; +/***/ 28758: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.uriEncode = void 0; +const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`); +exports.uriEncode = uriEncode; /***/ }), -/***/ 64124: +/***/ 77555: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var cid = __nccwpck_require__(24247); -var multipartRequest = __nccwpck_require__(87527); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var abortSignal = __nccwpck_require__(14594); -var nativeAbortController = __nccwpck_require__(43586); - -const createPut = configure.configure(api => { - async function put(data, options = {}) { - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, options.signal); - let res; - try { - const response = await api.post('block/put', { - signal: signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - ...await multipartRequest.multipartRequest([data], controller, options.headers) - }); - res = await response.json(); - } catch (err) { - if (options.format === 'dag-pb') { - return put(data, { - ...options, - format: 'protobuf' - }); - } else if (options.format === 'dag-cbor') { - return put(data, { - ...options, - format: 'cbor' - }); - } - throw err; +exports.resolveEndpoint = void 0; +const debug_1 = __nccwpck_require__(4140); +const types_1 = __nccwpck_require__(64175); +const utils_1 = __nccwpck_require__(76959); +const resolveEndpoint = (ruleSetObject, options) => { + var _a, _b, _c, _d, _e, _f; + const { endpointParams, logger } = options; + const { parameters, rules } = ruleSetObject; + (_b = (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, `${debug_1.debugId} Initial EndpointParams: ${(0, debug_1.toDebugString)(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters) + .filter(([, v]) => v.default != null) + .map(([k, v]) => [k, v.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = (_c = endpointParams[paramKey]) !== null && _c !== void 0 ? _c : paramDefaultValue; + } + } + const requiredParams = Object.entries(parameters) + .filter(([, v]) => v.required) + .map(([k]) => k); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new types_1.EndpointError(`Missing required parameter: '${requiredParam}'`); + } + } + const endpoint = (0, utils_1.evaluateRules)(rules, { endpointParams, logger, referenceRecord: {} }); + if ((_d = options.endpointParams) === null || _d === void 0 ? void 0 : _d.Endpoint) { + try { + const givenEndpoint = new URL(options.endpointParams.Endpoint); + const { protocol, port } = givenEndpoint; + endpoint.url.protocol = protocol; + endpoint.url.port = port; + } + catch (e) { + } } - return cid.CID.parse(res.Key); - } - return put; -}); - -exports.createPut = createPut; + (_f = (_e = options.logger) === null || _e === void 0 ? void 0 : _e.debug) === null || _f === void 0 ? void 0 : _f.call(_e, `${debug_1.debugId} Resolved endpoint: ${(0, debug_1.toDebugString)(endpoint)}`); + return endpoint; +}; +exports.resolveEndpoint = resolveEndpoint; /***/ }), -/***/ 16250: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 68232: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); - -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createRm = configure.configure(api => { - async function* rm(cid, options = {}) { - if (!Array.isArray(cid)) { - cid = [cid]; - } - const res = await api.post('block/rm', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: cid.map(cid => cid.toString()), - 'stream-channels': true, - ...options - }), - headers: options.headers - }); - for await (const removed of res.ndjson()) { - yield toCoreInterface(removed); +exports.EndpointError = void 0; +class EndpointError extends Error { + constructor(message) { + super(message); + this.name = "EndpointError"; } - } - return rm; -}); -function toCoreInterface(removed) { - const out = { cid: cid.CID.parse(removed.Hash) }; - if (removed.Error) { - out.error = new Error(removed.Error); - } - return out; } - -exports.createRm = createRm; +exports.EndpointError = EndpointError; /***/ }), -/***/ 86947: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 22147: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createStat = configure.configure(api => { - async function stat(cid$1, options = {}) { - const res = await api.post('block/stat', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: cid$1.toString(), - ...options - }), - headers: options.headers - }); - const data = await res.json(); - return { - cid: cid.CID.parse(data.Key), - size: data.Size - }; - } - return stat; -}); - -exports.createStat = createStat; - /***/ }), -/***/ 24438: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 109: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var multiaddr = __nccwpck_require__(78025); -const createAdd = configure.configure(api => { - async function add(addr, options = {}) { - const res = await api.post('bootstrap/add', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: addr, - ...options - }), - headers: options.headers - }); - const {Peers} = await res.json(); - return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; - } - return add; -}); +/***/ }), -exports.createAdd = createAdd; +/***/ 94743: +/***/ ((__unused_webpack_module, exports) => { -/***/ }), +Object.defineProperty(exports, "__esModule", ({ value: true })); -/***/ 99450: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +/***/ }), + +/***/ 40001: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var multiaddr = __nccwpck_require__(78025); -const createClear = configure.configure(api => { - async function clear(options = {}) { - const res = await api.post('bootstrap/rm', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - ...options, - all: true - }), - headers: options.headers - }); - const {Peers} = await res.json(); - return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; - } - return clear; -}); +/***/ }), + +/***/ 89764: +/***/ ((__unused_webpack_module, exports) => { -exports.createClear = createClear; + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 37723: +/***/ 64175: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(9286); +tslib_1.__exportStar(__nccwpck_require__(68232), exports); +tslib_1.__exportStar(__nccwpck_require__(22147), exports); +tslib_1.__exportStar(__nccwpck_require__(109), exports); +tslib_1.__exportStar(__nccwpck_require__(94743), exports); +tslib_1.__exportStar(__nccwpck_require__(40001), exports); +tslib_1.__exportStar(__nccwpck_require__(89764), exports); +tslib_1.__exportStar(__nccwpck_require__(71521), exports); -var add = __nccwpck_require__(24438); -var clear = __nccwpck_require__(99450); -var list = __nccwpck_require__(77448); -var reset = __nccwpck_require__(3542); -var rm = __nccwpck_require__(36783); -function createBootstrap(config) { - return { - add: add.createAdd(config), - clear: clear.createClear(config), - list: list.createList(config), - reset: reset.createReset(config), - rm: rm.createRm(config) - }; -} +/***/ }), -exports.createBootstrap = createBootstrap; +/***/ 71521: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 77448: +/***/ 85091: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.callFunction = void 0; +const customEndpointFunctions_1 = __nccwpck_require__(59612); +const endpointFunctions_1 = __nccwpck_require__(16515); +const evaluateExpression_1 = __nccwpck_require__(22023); +const callFunction = ({ fn, argv }, options) => { + const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : (0, evaluateExpression_1.evaluateExpression)(arg, "arg", options)); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions_1.customEndpointFunctions && fnSegments[1] != null) { + return customEndpointFunctions_1.customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions_1.endpointFunctions[fn](...evaluatedArgs); +}; +exports.callFunction = callFunction; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var multiaddr = __nccwpck_require__(78025); -const createList = configure.configure(api => { - async function list(options = {}) { - const res = await api.post('bootstrap/list', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - const {Peers} = await res.json(); - return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; - } - return list; -}); +/***/ }), -exports.createList = createList; +/***/ 59612: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.customEndpointFunctions = void 0; +exports.customEndpointFunctions = {}; /***/ }), -/***/ 3542: +/***/ 16515: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var multiaddr = __nccwpck_require__(78025); - -const createReset = configure.configure(api => { - async function reset(options = {}) { - const res = await api.post('bootstrap/add', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - ...options, - default: true - }), - headers: options.headers - }); - const {Peers} = await res.json(); - return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; - } - return reset; -}); - -exports.createReset = createReset; +exports.endpointFunctions = void 0; +const lib_1 = __nccwpck_require__(8649); +exports.endpointFunctions = { + booleanEquals: lib_1.booleanEquals, + getAttr: lib_1.getAttr, + isSet: lib_1.isSet, + isValidHostLabel: lib_1.isValidHostLabel, + not: lib_1.not, + parseURL: lib_1.parseURL, + stringEquals: lib_1.stringEquals, + substring: lib_1.substring, + uriEncode: lib_1.uriEncode, +}; /***/ }), -/***/ 36783: +/***/ 8742: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var multiaddr = __nccwpck_require__(78025); - -const createRm = configure.configure(api => { - async function rm(addr, options = {}) { - const res = await api.post('bootstrap/rm', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: addr, - ...options - }), - headers: options.headers - }); - const {Peers} = await res.json(); - return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; - } - return rm; -}); - -exports.createRm = createRm; +exports.evaluateCondition = void 0; +const debug_1 = __nccwpck_require__(4140); +const types_1 = __nccwpck_require__(64175); +const callFunction_1 = __nccwpck_require__(85091); +const evaluateCondition = ({ assign, ...fnArgs }, options) => { + var _a, _b; + if (assign && assign in options.referenceRecord) { + throw new types_1.EndpointError(`'${assign}' is already defined in Reference Record.`); + } + const value = (0, callFunction_1.callFunction)(fnArgs, options); + (_b = (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, debug_1.debugId, `evaluateCondition: ${(0, debug_1.toDebugString)(fnArgs)} = ${(0, debug_1.toDebugString)(value)}`); + return { + result: value === "" ? true : !!value, + ...(assign != null && { toAssign: { name: assign, value } }), + }; +}; +exports.evaluateCondition = evaluateCondition; /***/ }), -/***/ 84000: +/***/ 70232: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createCat = configure.configure(api => { - async function* cat(path, options = {}) { - const res = await api.post('cat', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path.toString(), - ...options - }), - headers: options.headers - }); - yield* res.iterator(); - } - return cat; -}); - -exports.createCat = createCat; +exports.evaluateConditions = void 0; +const debug_1 = __nccwpck_require__(4140); +const evaluateCondition_1 = __nccwpck_require__(8742); +const evaluateConditions = (conditions = [], options) => { + var _a, _b; + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = (0, evaluateCondition_1.evaluateCondition)(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord, + }, + }); + if (!result) { + return { result }; + } + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + (_b = (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, debug_1.debugId, `assign: ${toAssign.name} := ${(0, debug_1.toDebugString)(toAssign.value)}`); + } + } + return { result: true, referenceRecord: conditionsReferenceRecord }; +}; +exports.evaluateConditions = evaluateConditions; /***/ }), -/***/ 27154: +/***/ 86349: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createCommands = configure.configure(api => { - const commands = async (options = {}) => { - const res = await api.post('commands', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - return res.json(); - }; - return commands; -}); - -exports.createCommands = createCommands; +exports.evaluateEndpointRule = void 0; +const debug_1 = __nccwpck_require__(4140); +const evaluateConditions_1 = __nccwpck_require__(70232); +const getEndpointHeaders_1 = __nccwpck_require__(83362); +const getEndpointProperties_1 = __nccwpck_require__(46801); +const getEndpointUrl_1 = __nccwpck_require__(41658); +const evaluateEndpointRule = (endpointRule, options) => { + var _a, _b; + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = (0, evaluateConditions_1.evaluateConditions)(conditions, options); + if (!result) { + return; + } + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + }; + const { url, properties, headers } = endpoint; + (_b = (_a = options.logger) === null || _a === void 0 ? void 0 : _a.debug) === null || _b === void 0 ? void 0 : _b.call(_a, debug_1.debugId, `Resolving endpoint from template: ${(0, debug_1.toDebugString)(endpoint)}`); + return { + ...(headers != undefined && { + headers: (0, getEndpointHeaders_1.getEndpointHeaders)(headers, endpointRuleOptions), + }), + ...(properties != undefined && { + properties: (0, getEndpointProperties_1.getEndpointProperties)(properties, endpointRuleOptions), + }), + url: (0, getEndpointUrl_1.getEndpointUrl)(url, endpointRuleOptions), + }; +}; +exports.evaluateEndpointRule = evaluateEndpointRule; /***/ }), -/***/ 90372: +/***/ 86221: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createGetAll = configure.configure(api => { - const getAll = async (options = {}) => { - const res = await api.post('config/show', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ ...options }), - headers: options.headers - }); - const data = await res.json(); - return data; - }; - return getAll; -}); - -exports.createGetAll = createGetAll; +exports.evaluateErrorRule = void 0; +const types_1 = __nccwpck_require__(64175); +const evaluateConditions_1 = __nccwpck_require__(70232); +const evaluateExpression_1 = __nccwpck_require__(22023); +const evaluateErrorRule = (errorRule, options) => { + const { conditions, error } = errorRule; + const { result, referenceRecord } = (0, evaluateConditions_1.evaluateConditions)(conditions, options); + if (!result) { + return; + } + throw new types_1.EndpointError((0, evaluateExpression_1.evaluateExpression)(error, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + })); +}; +exports.evaluateErrorRule = evaluateErrorRule; /***/ }), -/***/ 45965: +/***/ 22023: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createGet = configure.configure(api => { - const get = async (key, options = {}) => { - if (!key) { - throw new Error('key argument is required'); +exports.evaluateExpression = void 0; +const types_1 = __nccwpck_require__(64175); +const callFunction_1 = __nccwpck_require__(85091); +const evaluateTemplate_1 = __nccwpck_require__(35724); +const getReferenceValue_1 = __nccwpck_require__(78048); +const evaluateExpression = (obj, keyName, options) => { + if (typeof obj === "string") { + return (0, evaluateTemplate_1.evaluateTemplate)(obj, options); } - const res = await api.post('config', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: key, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - return data.Value; - }; - return get; -}); - -exports.createGet = createGet; + else if (obj["fn"]) { + return (0, callFunction_1.callFunction)(obj, options); + } + else if (obj["ref"]) { + return (0, getReferenceValue_1.getReferenceValue)(obj, options); + } + throw new types_1.EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); +}; +exports.evaluateExpression = evaluateExpression; /***/ }), -/***/ 95499: +/***/ 31841: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var index = __nccwpck_require__(99566); -var get = __nccwpck_require__(45965); -var getAll = __nccwpck_require__(90372); -var replace = __nccwpck_require__(29380); -var set = __nccwpck_require__(78974); - -function createConfig(config) { - return { - getAll: getAll.createGetAll(config), - get: get.createGet(config), - set: set.createSet(config), - replace: replace.createReplace(config), - profiles: index.createProfiles(config) - }; -} - -exports.createConfig = createConfig; +exports.evaluateRules = void 0; +const types_1 = __nccwpck_require__(64175); +const evaluateEndpointRule_1 = __nccwpck_require__(86349); +const evaluateErrorRule_1 = __nccwpck_require__(86221); +const evaluateTreeRule_1 = __nccwpck_require__(50104); +const evaluateRules = (rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = (0, evaluateEndpointRule_1.evaluateEndpointRule)(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } + else if (rule.type === "error") { + (0, evaluateErrorRule_1.evaluateErrorRule)(rule, options); + } + else if (rule.type === "tree") { + const endpointOrUndefined = (0, evaluateTreeRule_1.evaluateTreeRule)(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } + } + else { + throw new types_1.EndpointError(`Unknown endpoint rule: ${rule}`); + } + } + throw new types_1.EndpointError(`Rules evaluation failed`); +}; +exports.evaluateRules = evaluateRules; /***/ }), -/***/ 93937: +/***/ 35724: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createApply = configure.configure(api => { - async function apply(profile, options = {}) { - const res = await api.post('config/profile/apply', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: profile, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - return { - original: data.OldCfg, - updated: data.NewCfg +exports.evaluateTemplate = void 0; +const lib_1 = __nccwpck_require__(8649); +const evaluateTemplate = (template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord, }; - } - return apply; -}); - -exports.createApply = createApply; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; + } + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push((0, lib_1.getAttr)(templateContext[refName], attrName)); + } + else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; + } + return evaluatedTemplateArr.join(""); +}; +exports.evaluateTemplate = evaluateTemplate; /***/ }), -/***/ 99566: +/***/ 50104: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var apply = __nccwpck_require__(93937); -var list = __nccwpck_require__(84442); - -function createProfiles(config) { - return { - apply: apply.createApply(config), - list: list.createList(config) - }; -} - -exports.createProfiles = createProfiles; +exports.evaluateTreeRule = void 0; +const evaluateConditions_1 = __nccwpck_require__(70232); +const evaluateRules_1 = __nccwpck_require__(31841); +const evaluateTreeRule = (treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = (0, evaluateConditions_1.evaluateConditions)(conditions, options); + if (!result) { + return; + } + return (0, evaluateRules_1.evaluateRules)(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + }); +}; +exports.evaluateTreeRule = evaluateTreeRule; /***/ }), -/***/ 84442: +/***/ 83362: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createList = configure.configure(api => { - async function list(options = {}) { - const res = await api.post('config/profile/list', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - const data = await res.json(); - return data.map(profile => objectToCamel.objectToCamel(profile)); - } - return list; -}); - -exports.createList = createList; +exports.getEndpointHeaders = void 0; +const types_1 = __nccwpck_require__(64175); +const evaluateExpression_1 = __nccwpck_require__(22023); +const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = (0, evaluateExpression_1.evaluateExpression)(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new types_1.EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }), +}), {}); +exports.getEndpointHeaders = getEndpointHeaders; /***/ }), -/***/ 29380: +/***/ 46801: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var fromString = __nccwpck_require__(39451); -var multipartRequest = __nccwpck_require__(87527); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var abortSignal = __nccwpck_require__(14594); -var nativeAbortController = __nccwpck_require__(43586); - -const createReplace = configure.configure(api => { - const replace = async (config, options = {}) => { - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, options.signal); - const res = await api.post('config/replace', { - signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - ...await multipartRequest.multipartRequest([fromString.fromString(JSON.stringify(config))], controller, options.headers) - }); - await res.text(); - }; - return replace; -}); - -exports.createReplace = createReplace; +exports.getEndpointProperties = void 0; +const getEndpointProperty_1 = __nccwpck_require__(74270); +const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: (0, getEndpointProperty_1.getEndpointProperty)(propertyVal, options), +}), {}); +exports.getEndpointProperties = getEndpointProperties; /***/ }), -/***/ 78974: +/***/ 74270: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createSet = configure.configure(api => { - const set = async (key, value, options = {}) => { - if (typeof key !== 'string') { - throw new Error('Invalid key type'); +exports.getEndpointProperty = void 0; +const types_1 = __nccwpck_require__(64175); +const evaluateTemplate_1 = __nccwpck_require__(35724); +const getEndpointProperties_1 = __nccwpck_require__(46801); +const getEndpointProperty = (property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => (0, exports.getEndpointProperty)(propertyEntry, options)); + } + switch (typeof property) { + case "string": + return (0, evaluateTemplate_1.evaluateTemplate)(property, options); + case "object": + if (property === null) { + throw new types_1.EndpointError(`Unexpected endpoint property: ${property}`); + } + return (0, getEndpointProperties_1.getEndpointProperties)(property, options); + case "boolean": + return property; + default: + throw new types_1.EndpointError(`Unexpected endpoint property type: ${typeof property}`); } - const params = { - ...options, - ...encodeParam(key, value) - }; - const res = await api.post('config', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(params), - headers: options.headers - }); - await res.text(); - }; - return set; -}); -const encodeParam = (key, value) => { - switch (typeof value) { - case 'boolean': - return { - arg: [ - key, - value.toString() - ], - bool: true - }; - case 'string': - return { - arg: [ - key, - value - ] - }; - default: - return { - arg: [ - key, - JSON.stringify(value) - ], - json: true - }; - } }; - -exports.createSet = createSet; +exports.getEndpointProperty = getEndpointProperty; /***/ }), -/***/ 36927: +/***/ 41658: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointUrl = void 0; +const types_1 = __nccwpck_require__(64175); +const evaluateExpression_1 = __nccwpck_require__(22023); +const getEndpointUrl = (endpointUrl, options) => { + const expression = (0, evaluateExpression_1.evaluateExpression)(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } + catch (error) { + console.error(`Failed to construct URL with ${expression}`, error); + throw error; + } + } + throw new types_1.EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); +}; +exports.getEndpointUrl = getEndpointUrl; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -const createExport = configure.configure(api => { - async function* dagExport(root, options = {}) { - const res = await api.post('dag/export', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ arg: root.toString() }), - headers: options.headers - }); - yield* res.iterator(); - } - return dagExport; -}); +/***/ }), + +/***/ 78048: +/***/ ((__unused_webpack_module, exports) => { -exports.createExport = createExport; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getReferenceValue = void 0; +const getReferenceValue = ({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord, + }; + return referenceRecord[ref]; +}; +exports.getReferenceValue = getReferenceValue; /***/ }), -/***/ 55291: +/***/ 76959: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(9286); +tslib_1.__exportStar(__nccwpck_require__(59612), exports); +tslib_1.__exportStar(__nccwpck_require__(31841), exports); -var configure = __nccwpck_require__(31775); -var resolve = __nccwpck_require__(51788); -var first = __nccwpck_require__(84103); -var last = __nccwpck_require__(28741); -var errCode = __nccwpck_require__(5822); -var get = __nccwpck_require__(22845); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var first__default = /*#__PURE__*/_interopDefaultLegacy(first); -var last__default = /*#__PURE__*/_interopDefaultLegacy(last); -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +/***/ 9286: +/***/ ((module) => { -const createGet = (codecs, options) => { - const fn = configure.configure((api, opts) => { - const getBlock = get.createGet(opts); - const get$1 = async (cid, options = {}) => { - if (options.path) { - const entry = options.localResolve ? await first__default["default"](resolve.resolve(cid, options.path, codecs, getBlock, options)) : await last__default["default"](resolve.resolve(cid, options.path, codecs, getBlock, options)); - const result = entry; - if (!result) { - throw errCode__default["default"](new Error('Not found'), 'ERR_NOT_FOUND'); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } } - return result; - } - const codec = await codecs.getCodec(cid.code); - const block = await getBlock(cid, options); - const node = codec.decode(block); - return { - value: node, - remainderPath: '' - }; + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); }; - return get$1; - }); - return fn(options); -}; -exports.createGet = createGet; + __assign = Object.assign || function (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; + }; + __rest = function (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; + }; -/***/ }), + __decorate = function (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; + }; -/***/ 22135: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -"use strict"; + __esDecorate = function (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)); }; + 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; + }; + __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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var abortSignal = __nccwpck_require__(14594); -var multipartRequest = __nccwpck_require__(87527); -var nativeAbortController = __nccwpck_require__(43586); -var cid = __nccwpck_require__(24247); + __setFunctionName = function (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 }); + }; -const createImport = configure.configure(api => { - async function* dagImport(source, options = {}) { - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, options.signal); - const {headers, body} = await multipartRequest.multipartRequest(source, controller, options.headers); - const res = await api.post('dag/import', { - signal, - headers, - body, - searchParams: toUrlSearchParams.toUrlSearchParams({ 'pin-roots': options.pinRoots }) + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + + __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()); + }); + }; + + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; + + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; }); - for await (const {Root} of res.ndjson()) { - if (Root !== undefined) { - const { - Cid: {'/': Cid}, - PinErrorMsg - } = Root; - yield { - root: { - cid: cid.CID.parse(Cid), - pinErrorMsg: PinErrorMsg - } + + __values = function (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 }; + } }; - } - } - } - return dagImport; -}); + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -exports.createImport = createImport; + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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 = 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; + }; -/***/ 71168: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __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)); + }; -"use strict"; + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + __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(n, v); }); }; } + 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]); } + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -var _export = __nccwpck_require__(36927); -var get = __nccwpck_require__(55291); -var _import = __nccwpck_require__(22135); -var put = __nccwpck_require__(79631); -var resolve = __nccwpck_require__(11229); + __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); } + }; -function createDag(codecs, config) { - return { - export: _export.createExport(config), - get: get.createGet(codecs, config), - import: _import.createImport(config), - put: put.createPut(codecs, config), - resolve: resolve.createResolve(config) - }; -} + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -exports.createDag = createDag; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; + __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; + }; -/***/ }), + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -/***/ 79631: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -"use strict"; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + __classPrivateFieldIn = function (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); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var multipartRequest = __nccwpck_require__(87527); -var toUrlSearchParams = __nccwpck_require__(52836); -var abortSignal = __nccwpck_require__(14594); -var nativeAbortController = __nccwpck_require__(43586); + 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; + }; -const createPut = (codecs, options) => { - const fn = configure.configure(api => { - const put = async (dagNode, options = {}) => { - const settings = { - storeCodec: 'dag-cbor', - hashAlg: 'sha2-256', - ...options - }; - let serialized; - if (settings.inputCodec) { - if (!(dagNode instanceof Uint8Array)) { - throw new Error('Can only inputCodec on raw bytes that can be decoded'); + __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; } - serialized = dagNode; - } else { - const storeCodec = await codecs.getCodec(settings.storeCodec); - serialized = storeCodec.encode(dagNode); - settings.inputCodec = settings.storeCodec; - } - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, settings.signal); - const res = await api.post('dag/put', { - timeout: settings.timeout, - signal, - searchParams: toUrlSearchParams.toUrlSearchParams(settings), - ...await multipartRequest.multipartRequest([serialized], controller, settings.headers) - }); - const data = await res.json(); - return cid.CID.parse(data.Cid['/']); + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); }; - return put; - }); - return fn(options); -}; -exports.createPut = createPut; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 11229: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 61027: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); - -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createResolve = configure.configure(api => { - const resolve = async (ipfsPath, options = {}) => { - const res = await api.post('dag/resolve', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: `${ ipfsPath }${ options.path ? `/${ options.path }`.replace(/\/[/]+/g, '/') : '' }`, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - return { - cid: cid.CID.parse(data.Cid['/']), - remainderPath: data.RemPath - }; - }; - return resolve; -}); - -exports.createResolve = createResolve; +exports.toHex = exports.fromHex = void 0; +const SHORT_TO_HEX = {}; +const HEX_TO_SHORT = {}; +for (let i = 0; i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; + } + SHORT_TO_HEX[i] = encodedByte; + HEX_TO_SHORT[encodedByte] = i; +} +function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); + } + const out = new Uint8Array(encoded.length / 2); + for (let i = 0; i < encoded.length; i += 2) { + const encodedByte = encoded.slice(i, i + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i / 2] = HEX_TO_SHORT[encodedByte]; + } + else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; +} +exports.fromHex = fromHex; +function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; +} +exports.toHex = toHex; /***/ }), -/***/ 71141: +/***/ 82346: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var mapEvent = __nccwpck_require__(79249); - -const createFindPeer = configure.configure(api => { - async function* findPeer(peerId, options = {}) { - const res = await api.post('dht/findpeer', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: peerId, - ...options - }), - headers: options.headers - }); - for await (const event of res.ndjson()) { - yield mapEvent.mapEvent(event); - } - } - return findPeer; -}); - -exports.createFindPeer = createFindPeer; +exports.getSmithyContext = void 0; +const types_1 = __nccwpck_require__(75751); +const getSmithyContext = (context) => context[types_1.SMITHY_CONTEXT_KEY] || (context[types_1.SMITHY_CONTEXT_KEY] = {}); +exports.getSmithyContext = getSmithyContext; /***/ }), -/***/ 1718: +/***/ 81243: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(77191); +tslib_1.__exportStar(__nccwpck_require__(82346), exports); +tslib_1.__exportStar(__nccwpck_require__(26851), exports); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var mapEvent = __nccwpck_require__(79249); -const createFindProvs = configure.configure(api => { - async function* findProvs(cid, options = {}) { - const res = await api.post('dht/findprovs', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: cid.toString(), - ...options - }), - headers: options.headers - }); - for await (const event of res.ndjson()) { - yield mapEvent.mapEvent(event); - } - } - return findProvs; -}); +/***/ }), -exports.createFindProvs = createFindProvs; +/***/ 26851: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.normalizeProvider = void 0; +const normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; +}; +exports.normalizeProvider = normalizeProvider; /***/ }), -/***/ 83019: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 77191: +/***/ ((module) => { -"use strict"; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + __assign = Object.assign || function (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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __rest = function (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; + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var mapEvent = __nccwpck_require__(79249); -var toString = __nccwpck_require__(2771); + __decorate = function (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; + }; -const createGet = configure.configure(api => { - async function* get(key, options = {}) { - const res = await api.post('dht/get', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: key instanceof Uint8Array ? toString.toString(key) : key.toString(), - ...options - }), - headers: options.headers - }); - for await (const event of res.ndjson()) { - yield mapEvent.mapEvent(event); - } - } - return get; -}); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -exports.createGet = createGet; + __esDecorate = function (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)); }; + 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; + }; + __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); + }; -/***/ 57135: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __setFunctionName = function (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 }); + }; -"use strict"; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + __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 })); + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; -var findPeer = __nccwpck_require__(71141); -var findProvs = __nccwpck_require__(1718); -var get = __nccwpck_require__(83019); -var provide = __nccwpck_require__(54851); -var put = __nccwpck_require__(76639); -var query = __nccwpck_require__(38533); + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -function createDht(config) { - return { - findPeer: findPeer.createFindPeer(config), - findProvs: findProvs.createFindProvs(config), - get: get.createGet(config), - provide: provide.createProvide(config), - put: put.createPut(config), - query: query.createQuery(config) - }; -} + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -exports.createDht = createDht; + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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; + }; -/***/ 79249: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -"use strict"; + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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(n, v); }); }; } + 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]); } + }; -var fromString = __nccwpck_require__(39451); -var responseTypes = __nccwpck_require__(85218); -var multiaddr = __nccwpck_require__(78025); + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -const mapEvent = event => { - if (event.Type === responseTypes.SendingQuery) { - return { - to: event.ID, - name: 'SENDING_QUERY', - type: event.Type + __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); } }; - } - if (event.Type === responseTypes.PeerResponse) { - return { - from: event.ID, - name: 'PEER_RESPONSE', - type: event.Type, - messageType: 0, - messageName: 'PUT_VALUE', - closer: (event.Responses || []).map(({ID, Addrs}) => ({ - id: ID, - multiaddrs: Addrs.map(addr => new multiaddr.Multiaddr(addr)) - })), - providers: (event.Responses || []).map(({ID, Addrs}) => ({ - id: ID, - multiaddrs: Addrs.map(addr => new multiaddr.Multiaddr(addr)) - })) + + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; }; - } - if (event.Type === responseTypes.FinalPeer) { - let peer = { - id: event.ID, - multiaddrs: [] + + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; }; - if (event.Responses && event.Responses.length) { - peer = { - id: event.Responses[0].ID, - multiaddrs: event.Responses[0].Addrs.map(addr => new multiaddr.Multiaddr(addr)) - }; - } - return { - from: event.ID, - name: 'FINAL_PEER', - type: event.Type, - peer + + __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; }; - } - if (event.Type === responseTypes.QueryError) { - return { - from: event.ID, - name: 'QUERY_ERROR', - type: event.Type, - error: new Error(event.Extra) + + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; }; - } - if (event.Type === responseTypes.Provider) { - return { - from: event.ID, - name: 'PROVIDER', - type: event.Type, - providers: event.Responses.map(({ID, Addrs}) => ({ - id: ID, - multiaddrs: Addrs.map(addr => new multiaddr.Multiaddr(addr)) - })) + + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; - } - if (event.Type === responseTypes.Value) { - return { - from: event.ID, - name: 'VALUE', - type: event.Type, - value: fromString.fromString(event.Extra, 'base64pad') + + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; - } - if (event.Type === responseTypes.AddingPeer) { - const peers = event.Responses.map(({ID}) => ID); - if (!peers.length) { - throw new Error('No peer found'); - } - return { - name: 'ADDING_PEER', - type: event.Type, - peer: peers[0] + + __classPrivateFieldIn = function (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); }; - } - if (event.Type === responseTypes.DialingPeer) { - return { - name: 'DIALING_PEER', - type: event.Type, - peer: event.ID + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; }; - } - throw new Error('Unknown DHT event type'); -}; -exports.mapEvent = mapEvent; + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 54851: +/***/ 37099: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var mapEvent = __nccwpck_require__(79249); - -const createProvide = configure.configure(api => { - async function* provide(cids, options = { recursive: false }) { - const cidArr = Array.isArray(cids) ? cids : [cids]; - const res = await api.post('dht/provide', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: cidArr.map(cid => cid.toString()), - ...options - }), - headers: options.headers - }); - for await (const event of res.ndjson()) { - yield mapEvent.mapEvent(event); +exports.AdaptiveRetryStrategy = void 0; +const config_1 = __nccwpck_require__(33047); +const DefaultRateLimiter_1 = __nccwpck_require__(71116); +const StandardRetryStrategy_1 = __nccwpck_require__(33965); +class AdaptiveRetryStrategy { + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.mode = config_1.RETRY_MODES.ADAPTIVE; + const { rateLimiter } = options !== null && options !== void 0 ? options : {}; + this.rateLimiter = rateLimiter !== null && rateLimiter !== void 0 ? rateLimiter : new DefaultRateLimiter_1.DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy_1.StandardRetryStrategy(maxAttemptsProvider); } - } - return provide; -}); - -exports.createProvide = createProvide; + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + } + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + } + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); + } +} +exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy; /***/ }), -/***/ 76639: +/***/ 2735: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var multipartRequest = __nccwpck_require__(87527); -var abortSignal = __nccwpck_require__(14594); -var nativeAbortController = __nccwpck_require__(43586); -var toString = __nccwpck_require__(2771); -var mapEvent = __nccwpck_require__(79249); - -const createPut = configure.configure(api => { - async function* put(key, value, options = {}) { - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, options.signal); - const res = await api.post('dht/put', { - signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: key instanceof Uint8Array ? toString.toString(key) : key.toString(), - ...options - }), - ...await multipartRequest.multipartRequest([value], controller, options.headers) - }); - for await (const event of res.ndjson()) { - yield mapEvent.mapEvent(event); +exports.ConfiguredRetryStrategy = void 0; +const constants_1 = __nccwpck_require__(99358); +const StandardRetryStrategy_1 = __nccwpck_require__(33965); +class ConfiguredRetryStrategy extends StandardRetryStrategy_1.StandardRetryStrategy { + constructor(maxAttempts, computeNextBackoffDelay = constants_1.DEFAULT_RETRY_DELAY_BASE) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; + } + else { + this.computeNextBackoffDelay = computeNextBackoffDelay; + } } - } - return put; -}); - -exports.createPut = createPut; + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; + } +} +exports.ConfiguredRetryStrategy = ConfiguredRetryStrategy; /***/ }), -/***/ 38533: +/***/ 71116: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DefaultRateLimiter = void 0; +const service_error_classification_1 = __nccwpck_require__(48920); +class DefaultRateLimiter { + constructor(options) { + var _a, _b, _c, _d, _e; + this.currentCapacity = 0; + this.enabled = false; + this.lastMaxRate = 0; + this.measuredTxRate = 0; + this.requestCount = 0; + this.lastTimestamp = 0; + this.timeWindow = 0; + this.beta = (_a = options === null || options === void 0 ? void 0 : options.beta) !== null && _a !== void 0 ? _a : 0.7; + this.minCapacity = (_b = options === null || options === void 0 ? void 0 : options.minCapacity) !== null && _b !== void 0 ? _b : 1; + this.minFillRate = (_c = options === null || options === void 0 ? void 0 : options.minFillRate) !== null && _c !== void 0 ? _c : 0.5; + this.scaleConstant = (_d = options === null || options === void 0 ? void 0 : options.scaleConstant) !== null && _d !== void 0 ? _d : 0.4; + this.smooth = (_e = options === null || options === void 0 ? void 0 : options.smooth) !== null && _e !== void 0 ? _e : 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; + } + getCurrentTimeInSeconds() { + return Date.now() / 1000; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000; + await new Promise((resolve) => setTimeout(resolve, delay)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if ((0, service_error_classification_1.isThrottlingError)(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } + else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } + } + getPrecise(num) { + return parseFloat(num.toFixed(8)); + } +} +exports.DefaultRateLimiter = DefaultRateLimiter; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var mapEvent = __nccwpck_require__(79249); -const createQuery = configure.configure(api => { - async function* query(peerId, options = {}) { - const res = await api.post('dht/query', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: peerId.toString(), - ...options - }), - headers: options.headers - }); - for await (const event of res.ndjson()) { - yield mapEvent.mapEvent(event); - } - } - return query; -}); +/***/ }), -exports.createQuery = createQuery; +/***/ 33965: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.StandardRetryStrategy = void 0; +const config_1 = __nccwpck_require__(33047); +const constants_1 = __nccwpck_require__(99358); +const defaultRetryBackoffStrategy_1 = __nccwpck_require__(8825); +const defaultRetryToken_1 = __nccwpck_require__(47819); +class StandardRetryStrategy { + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.mode = config_1.RETRY_MODES.STANDARD; + this.capacity = constants_1.INITIAL_RETRY_TOKENS; + this.retryBackoffStrategy = (0, defaultRetryBackoffStrategy_1.getDefaultRetryBackoffStrategy)(); + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + async acquireInitialRetryToken(retryTokenScope) { + return (0, defaultRetryToken_1.createDefaultRetryToken)({ + retryDelay: constants_1.DEFAULT_RETRY_DELAY_BASE, + retryCount: 0, + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? constants_1.THROTTLING_RETRY_DELAY_BASE : constants_1.DEFAULT_RETRY_DELAY_BASE); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint + ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) + : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return (0, defaultRetryToken_1.createDefaultRetryToken)({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost, + }); + } + throw new Error("No retry token available"); + } + recordSuccess(token) { + var _a; + this.capacity = Math.max(constants_1.INITIAL_RETRY_TOKENS, this.capacity + ((_a = token.getRetryCost()) !== null && _a !== void 0 ? _a : constants_1.NO_RETRY_INCREMENT)); + } + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } + catch (error) { + console.warn(`Max attempts provider could not resolve. Using default of ${config_1.DEFAULT_MAX_ATTEMPTS}`); + return config_1.DEFAULT_MAX_ATTEMPTS; + } + } + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return (attempts < maxAttempts && + this.capacity >= this.getCapacityCost(errorInfo.errorType) && + this.isRetryableError(errorInfo.errorType)); + } + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? constants_1.TIMEOUT_RETRY_COST : constants_1.RETRY_COST; + } + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; + } +} +exports.StandardRetryStrategy = StandardRetryStrategy; /***/ }), -/***/ 85218: +/***/ 33047: /***/ ((__unused_webpack_module, exports) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.DEFAULT_RETRY_MODE = exports.DEFAULT_MAX_ATTEMPTS = exports.RETRY_MODES = void 0; +var RETRY_MODES; +(function (RETRY_MODES) { + RETRY_MODES["STANDARD"] = "standard"; + RETRY_MODES["ADAPTIVE"] = "adaptive"; +})(RETRY_MODES = exports.RETRY_MODES || (exports.RETRY_MODES = {})); +exports.DEFAULT_MAX_ATTEMPTS = 3; +exports.DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD; -const SendingQuery = 0; -const PeerResponse = 1; -const FinalPeer = 2; -const QueryError = 3; -const Provider = 4; -const Value = 5; -const AddingPeer = 6; -const DialingPeer = 7; -exports.AddingPeer = AddingPeer; -exports.DialingPeer = DialingPeer; -exports.FinalPeer = FinalPeer; -exports.PeerResponse = PeerResponse; -exports.Provider = Provider; -exports.QueryError = QueryError; -exports.SendingQuery = SendingQuery; -exports.Value = Value; +/***/ }), + +/***/ 99358: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.REQUEST_HEADER = exports.INVOCATION_ID_HEADER = exports.NO_RETRY_INCREMENT = exports.TIMEOUT_RETRY_COST = exports.RETRY_COST = exports.INITIAL_RETRY_TOKENS = exports.THROTTLING_RETRY_DELAY_BASE = exports.MAXIMUM_RETRY_DELAY = exports.DEFAULT_RETRY_DELAY_BASE = void 0; +exports.DEFAULT_RETRY_DELAY_BASE = 100; +exports.MAXIMUM_RETRY_DELAY = 20 * 1000; +exports.THROTTLING_RETRY_DELAY_BASE = 500; +exports.INITIAL_RETRY_TOKENS = 500; +exports.RETRY_COST = 5; +exports.TIMEOUT_RETRY_COST = 10; +exports.NO_RETRY_INCREMENT = 1; +exports.INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; +exports.REQUEST_HEADER = "amz-sdk-request"; /***/ }), -/***/ 48257: +/***/ 8825: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getDefaultRetryBackoffStrategy = void 0; +const constants_1 = __nccwpck_require__(99358); +const getDefaultRetryBackoffStrategy = () => { + let delayBase = constants_1.DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = (attempts) => { + return Math.floor(Math.min(constants_1.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }; + const setDelayBase = (delay) => { + delayBase = delay; + }; + return { + computeNextBackoffDelay, + setDelayBase, + }; +}; +exports.getDefaultRetryBackoffStrategy = getDefaultRetryBackoffStrategy; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -const createCmds = configure.configure(api => { - async function cmds(options = {}) { - const res = await api.post('diag/cmds', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - return res.json(); - } - return cmds; -}); +/***/ }), -exports.createCmds = createCmds; +/***/ 47819: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createDefaultRetryToken = void 0; +const constants_1 = __nccwpck_require__(99358); +const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => { + const getRetryCount = () => retryCount; + const getRetryDelay = () => Math.min(constants_1.MAXIMUM_RETRY_DELAY, retryDelay); + const getRetryCost = () => retryCost; + return { + getRetryCount, + getRetryDelay, + getRetryCost, + }; +}; +exports.createDefaultRetryToken = createDefaultRetryToken; /***/ }), -/***/ 19433: +/***/ 13744: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(35061); +tslib_1.__exportStar(__nccwpck_require__(37099), exports); +tslib_1.__exportStar(__nccwpck_require__(2735), exports); +tslib_1.__exportStar(__nccwpck_require__(71116), exports); +tslib_1.__exportStar(__nccwpck_require__(33965), exports); +tslib_1.__exportStar(__nccwpck_require__(33047), exports); +tslib_1.__exportStar(__nccwpck_require__(99358), exports); +tslib_1.__exportStar(__nccwpck_require__(17474), exports); -var cmds = __nccwpck_require__(48257); -var net = __nccwpck_require__(97401); -var sys = __nccwpck_require__(803); -function createDiag(config) { - return { - cmds: cmds.createCmds(config), - net: net.createNet(config), - sys: sys.createSys(config) - }; -} +/***/ }), -exports.createDiag = createDiag; +/***/ 17474: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); /***/ }), -/***/ 97401: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 35061: +/***/ ((module) => { -"use strict"; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + __assign = Object.assign || function (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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __rest = function (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; + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __decorate = function (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; + }; -const createNet = configure.configure(api => { - async function net(options = {}) { - const res = await api.post('diag/net', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - return res.json(); - } - return net; -}); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -exports.createNet = createNet; + __esDecorate = function (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)); }; + 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; + }; + __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); + }; -/***/ 803: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __setFunctionName = function (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 }); + }; -"use strict"; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + __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 })); + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -const createSys = configure.configure(api => { - async function sys(options = {}) { - const res = await api.post('diag/sys', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; }); - return res.json(); - } - return sys; -}); -exports.createSys = createSys; + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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; + }; -/***/ 1503: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -"use strict"; + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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(n, v); }); }; } + 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]); } + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -const createDns = configure.configure(api => { - const dns = async (domain, options = {}) => { - const res = await api.post('dns', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: domain, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - return data.Path; - }; - return dns; -}); + __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); } + }; -exports.createDns = createDns; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -/***/ }), + __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; + }; -/***/ 48771: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -"use strict"; + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __classPrivateFieldIn = function (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); + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -const createChmod = configure.configure(api => { - async function chmod(path, mode, options = {}) { - const res = await api.post('files/chmod', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - mode, - ...options - }), - headers: options.headers - }); - await res.text(); - } - return chmod; -}); + 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; + }; -exports.createChmod = createChmod; + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 6545: +/***/ 99906: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createCp = configure.configure(api => { - async function cp(sources, destination, options = {}) { - const sourceArr = Array.isArray(sources) ? sources : [sources]; - const res = await api.post('files/cp', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: sourceArr.concat(destination).map(src => cid.CID.asCID(src) ? `/ipfs/${ src }` : src), - ...options - }), - headers: options.headers - }); - await res.text(); - } - return cp; -}); - -exports.createCp = createCp; +exports.Uint8ArrayBlobAdapter = void 0; +const transforms_1 = __nccwpck_require__(82724); +class Uint8ArrayBlobAdapter extends Uint8Array { + static fromString(source, encoding = "utf-8") { + switch (typeof source) { + case "string": + return (0, transforms_1.transformFromString)(source, encoding); + default: + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); + } + } + static mutate(source) { + Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); + return source; + } + transformToString(encoding = "utf-8") { + return (0, transforms_1.transformToString)(this, encoding); + } +} +exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; /***/ }), -/***/ 43346: +/***/ 82724: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createFlush = configure.configure(api => { - async function flush(path, options = {}) { - if (!path || typeof path !== 'string') { - throw new Error('ipfs.files.flush requires a path'); +exports.transformFromString = exports.transformToString = void 0; +const util_base64_1 = __nccwpck_require__(14478); +const util_utf8_1 = __nccwpck_require__(38134); +const Uint8ArrayBlobAdapter_1 = __nccwpck_require__(99906); +function transformToString(payload, encoding = "utf-8") { + if (encoding === "base64") { + return (0, util_base64_1.toBase64)(payload); } - const res = await api.post('files/flush', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - return cid.CID.parse(data.Cid); - } - return flush; -}); - -exports.createFlush = createFlush; + return (0, util_utf8_1.toUtf8)(payload); +} +exports.transformToString = transformToString; +function transformFromString(str, encoding) { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter_1.Uint8ArrayBlobAdapter.mutate((0, util_base64_1.fromBase64)(str)); + } + return Uint8ArrayBlobAdapter_1.Uint8ArrayBlobAdapter.mutate((0, util_utf8_1.fromUtf8)(str)); +} +exports.transformFromString = transformFromString; /***/ }), -/***/ 35976: +/***/ 55441: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getAwsChunkedEncodingStream = void 0; +const stream_1 = __nccwpck_require__(12781); +const getAwsChunkedEncodingStream = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && + checksumAlgorithmFn !== undefined && + checksumLocationName !== undefined && + streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; + const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); + readableStream.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readableStream.on("end", async () => { + awsChunkedEncodingStream.push(`0\r\n`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); + awsChunkedEncodingStream.push(`\r\n`); + } + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; +}; +exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; -var chmod = __nccwpck_require__(48771); -var cp = __nccwpck_require__(6545); -var flush = __nccwpck_require__(43346); -var ls = __nccwpck_require__(76291); -var mkdir = __nccwpck_require__(40643); -var mv = __nccwpck_require__(64840); -var read = __nccwpck_require__(42085); -var rm = __nccwpck_require__(33848); -var stat = __nccwpck_require__(74168); -var touch = __nccwpck_require__(91068); -var write = __nccwpck_require__(66447); -function createFiles(config) { - return { - chmod: chmod.createChmod(config), - cp: cp.createCp(config), - flush: flush.createFlush(config), - ls: ls.createLs(config), - mkdir: mkdir.createMkdir(config), - mv: mv.createMv(config), - read: read.createRead(config), - rm: rm.createRm(config), - stat: stat.createStat(config), - touch: touch.createTouch(config), - write: write.createWrite(config) - }; -} +/***/ }), -exports.createFiles = createFiles; +/***/ 55844: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(34974); +tslib_1.__exportStar(__nccwpck_require__(99906), exports); +tslib_1.__exportStar(__nccwpck_require__(55441), exports); +tslib_1.__exportStar(__nccwpck_require__(95063), exports); /***/ }), -/***/ 76291: +/***/ 95063: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var cid = __nccwpck_require__(24247); -var objectToCamelWithMetadata = __nccwpck_require__(28060); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createLs = configure.configure(api => { - async function* ls(path, options = {}) { - if (!path) { - throw new Error('ipfs.files.ls requires a path'); +exports.sdkStreamMixin = void 0; +const node_http_handler_1 = __nccwpck_require__(54065); +const util_buffer_from_1 = __nccwpck_require__(41308); +const stream_1 = __nccwpck_require__(12781); +const util_1 = __nccwpck_require__(73837); +const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; +const sdkStreamMixin = (stream) => { + var _a, _b; + if (!(stream instanceof stream_1.Readable)) { + const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); } - const res = await api.post('files/ls', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: cid.CID.asCID(path) ? `/ipfs/${ path }` : path, - long: true, - ...options, - stream: true - }), - headers: options.headers - }); - for await (const result of res.ndjson()) { - if ('Entries' in result) { - for (const entry of result.Entries || []) { - yield toCoreInterface(objectToCamelWithMetadata.objectToCamelWithMetadata(entry)); + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); } - } else { - yield toCoreInterface(objectToCamelWithMetadata.objectToCamelWithMetadata(result)); - } - } - } - return ls; -}); -function toCoreInterface(entry) { - if (entry.hash) { - entry.cid = cid.CID.parse(entry.hash); - } - delete entry.hash; - entry.type = entry.type === 1 ? 'directory' : 'file'; - return entry; -} - -exports.createLs = createLs; + transformed = true; + return await (0, node_http_handler_1.streamCollector)(stream); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === undefined || Buffer.isEncoding(encoding)) { + return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } + else { + const decoder = new util_1.TextDecoder(encoding); + return decoder.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof stream_1.Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream); + }, + }); +}; +exports.sdkStreamMixin = sdkStreamMixin; /***/ }), -/***/ 40643: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 34974: +/***/ ((module) => { -"use strict"; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + __assign = Object.assign || function (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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __rest = function (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; + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __decorate = function (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; + }; -const createMkdir = configure.configure(api => { - async function mkdir(path, options = {}) { - const res = await api.post('files/mkdir', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - ...options - }), - headers: options.headers - }); - await res.text(); - } - return mkdir; -}); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -exports.createMkdir = createMkdir; + __esDecorate = function (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)); }; + 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; + }; + __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); + }; -/***/ 64840: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __setFunctionName = function (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 }); + }; -"use strict"; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + __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 })); + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -const createMv = configure.configure(api => { - async function mv(sources, destination, options = {}) { - if (!Array.isArray(sources)) { - sources = [sources]; - } - const res = await api.post('files/mv', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: sources.concat(destination), - ...options - }), - headers: options.headers + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; }); - await res.text(); - } - return mv; -}); - -exports.createMv = createMv; - -/***/ }), + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -/***/ 42085: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; + }; -"use strict"; + /** @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 = 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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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)); + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var toIterable = __nccwpck_require__(79546); + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + __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(n, v); }); }; } + 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]); } + }; -var toIterable__default = /*#__PURE__*/_interopDefaultLegacy(toIterable); + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -const createRead = configure.configure(api => { - async function* read(path, options = {}) { - const res = await api.post('files/read', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - count: options.length, - ...options - }), - headers: options.headers - }); - yield* toIterable__default["default"](res.body); - } - return read; -}); + __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); } + }; -exports.createRead = createRead; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -/***/ }), + __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; + }; -/***/ 33848: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -"use strict"; + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __classPrivateFieldIn = function (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); + }; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var HTTP = __nccwpck_require__(24335); + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + 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; + }; -var HTTP__default = /*#__PURE__*/_interopDefaultLegacy(HTTP); + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -const createRm = configure.configure(api => { - async function rm(path, options = {}) { - const res = await api.post('files/rm', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - ...options - }), - headers: options.headers - }); - const body = await res.text(); - if (body !== '') { - const error = new HTTP__default["default"].HTTPError(res); - error.message = body; - throw error; - } - } - return rm; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); }); -exports.createRm = createRm; - /***/ }), -/***/ 74168: +/***/ 25989: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.escapeUriPath = void 0; +const escape_uri_1 = __nccwpck_require__(57916); +const escapeUriPath = (uri) => uri.split("/").map(escape_uri_1.escapeUri).join("/"); +exports.escapeUriPath = escapeUriPath; -var cid = __nccwpck_require__(24247); -var objectToCamelWithMetadata = __nccwpck_require__(28060); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -const createStat = configure.configure(api => { - async function stat(path, options = {}) { - const res = await api.post('files/stat', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - data.WithLocality = data.WithLocality || false; - return toCoreInterface(objectToCamelWithMetadata.objectToCamelWithMetadata(data)); - } - return stat; -}); -function toCoreInterface(entry) { - entry.cid = cid.CID.parse(entry.hash); - delete entry.hash; - return entry; -} +/***/ }), + +/***/ 57916: +/***/ ((__unused_webpack_module, exports) => { -exports.createStat = createStat; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.escapeUri = void 0; +const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode); +exports.escapeUri = escapeUri; +const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`; /***/ }), -/***/ 91068: +/***/ 28768: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(238); +tslib_1.__exportStar(__nccwpck_require__(57916), exports); +tslib_1.__exportStar(__nccwpck_require__(25989), exports); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createTouch = configure.configure(api => { - async function touch(path, options = {}) { - const res = await api.post('files/touch', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - ...options - }), - headers: options.headers - }); - await res.text(); - } - return touch; -}); -exports.createTouch = createTouch; +/***/ }), +/***/ 238: +/***/ ((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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; -/***/ 66447: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __assign = Object.assign || function (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; + }; -"use strict"; + __rest = function (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; + }; + __decorate = function (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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -var modeToString = __nccwpck_require__(87513); -var parseMtime = __nccwpck_require__(68414); -var configure = __nccwpck_require__(31775); -var multipartRequest = __nccwpck_require__(87527); -var toUrlSearchParams = __nccwpck_require__(52836); -var abortSignal = __nccwpck_require__(14594); -var nativeAbortController = __nccwpck_require__(43586); + __esDecorate = function (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)); }; + 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; + }; -const createWrite = configure.configure(api => { - async function write(path, input, options = {}) { - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, options.signal); - const res = await api.post('files/write', { - signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - streamChannels: true, - count: options.length, - ...options - }), - ...await multipartRequest.multipartRequest([{ - content: input, - path: 'arg', - mode: modeToString.modeToString(options.mode), - mtime: parseMtime.parseMtime(options.mtime) - }], controller, options.headers) - }); - await res.text(); - } - return write; -}); + __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; + }; -exports.createWrite = createWrite; + __propKey = function (x) { + return typeof x === "symbol" ? x : "".concat(x); + }; + __setFunctionName = function (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 }); + }; -/***/ }), + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -/***/ 89338: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __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()); + }); + }; -"use strict"; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -var configure = __nccwpck_require__(31775); + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -const createGetEndpointConfig = configure.configure(api => { - return () => { - const url = new URL(api.opts.base || ''); - return { - host: url.hostname, - port: url.port, - protocol: url.protocol, - pathname: url.pathname, - 'api-path': url.pathname + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; }; - }; -}); -exports.createGetEndpointConfig = createGetEndpointConfig; + /** @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 = 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; + }; -/***/ }), + __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)); + }; -/***/ 31471: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -"use strict"; + __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(n, v); }); }; } + 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]); } + }; + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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); } + }; -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; -const createGet = configure.configure(api => { - async function* get(path, options = {}) { - const opts = { - arg: `${ path instanceof Uint8Array ? cid.CID.decode(path) : path }`, - ...options + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; }; - if (opts.compressionLevel) { - opts['compression-level'] = opts.compressionLevel; - delete opts.compressionLevel; - } - const res = await api.post('get', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(opts), - headers: options.headers - }); - yield* res.iterator(); - } - return get; -}); -exports.createGet = createGet; + __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; + }; + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -/***/ }), + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; -/***/ 15192: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -"use strict"; + __classPrivateFieldIn = function (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); + }; + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + 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; + }; -var objectToCamel = __nccwpck_require__(62268); -var multiaddr = __nccwpck_require__(78025); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -const createId = configure.configure(api => { - async function id(options = {}) { - const res = await api.post('id', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: options.peerId ? options.peerId.toString() : undefined, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - const output = { ...objectToCamel.objectToCamel(data) }; - if (output.addresses) { - output.addresses = output.addresses.map(ma => new multiaddr.Multiaddr(ma)); - } - return output; - } - return id; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); }); -exports.createId = createId; - /***/ }), -/***/ 21719: +/***/ 54627: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromUtf8 = void 0; +const util_buffer_from_1 = __nccwpck_require__(41308); +const fromUtf8 = (input) => { + const buf = (0, util_buffer_from_1.fromString)(input, "utf8"); + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT); +}; +exports.fromUtf8 = fromUtf8; -var multibases = __nccwpck_require__(61560); -var multicodecs = __nccwpck_require__(83319); -var multihashes = __nccwpck_require__(5529); -var dagPB = __nccwpck_require__(72532); -var dagCBOR = __nccwpck_require__(89778); -var dagJSON = __nccwpck_require__(46777); -var identity = __nccwpck_require__(53863); -var basics = __nccwpck_require__(42916); -var index = __nccwpck_require__(60138); -var index$1 = __nccwpck_require__(54826); -var index$2 = __nccwpck_require__(37723); -var index$3 = __nccwpck_require__(95499); -var index$4 = __nccwpck_require__(71168); -var index$5 = __nccwpck_require__(57135); -var index$6 = __nccwpck_require__(19433); -var index$7 = __nccwpck_require__(35976); -var index$8 = __nccwpck_require__(66007); -var index$9 = __nccwpck_require__(85077); -var index$a = __nccwpck_require__(8302); -var index$b = __nccwpck_require__(64980); -var index$c = __nccwpck_require__(1115); -var index$d = __nccwpck_require__(38248); -var index$e = __nccwpck_require__(50782); -var index$f = __nccwpck_require__(65381); -var index$g = __nccwpck_require__(39825); -var index$h = __nccwpck_require__(8697); -var add = __nccwpck_require__(26151); -var addAll = __nccwpck_require__(44713); -var cat = __nccwpck_require__(84000); -var commands = __nccwpck_require__(27154); -var dns = __nccwpck_require__(1503); -var getEndpointConfig = __nccwpck_require__(89338); -var get = __nccwpck_require__(31471); -var id = __nccwpck_require__(15192); -var isOnline = __nccwpck_require__(5426); -var ls = __nccwpck_require__(97506); -var mount = __nccwpck_require__(75785); -var ping = __nccwpck_require__(25466); -var resolve = __nccwpck_require__(38587); -var start = __nccwpck_require__(86476); -var stop = __nccwpck_require__(94121); -var version = __nccwpck_require__(93620); -var globSourceImport = __nccwpck_require__(23905); -var cid = __nccwpck_require__(24247); -var multiaddr = __nccwpck_require__(78025); -var urlSource_js = __nccwpck_require__(74676); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); -} +/***/ }), -var dagPB__namespace = /*#__PURE__*/_interopNamespace(dagPB); -var dagCBOR__namespace = /*#__PURE__*/_interopNamespace(dagCBOR); -var dagJSON__namespace = /*#__PURE__*/_interopNamespace(dagJSON); -var globSourceImport__default = /*#__PURE__*/_interopDefaultLegacy(globSourceImport); -var urlSource_js__default = /*#__PURE__*/_interopDefaultLegacy(urlSource_js); +/***/ 38134: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -function create(options = {}) { - const id$1 = { - name: identity.identity.name, - code: identity.identity.code, - encode: id => id, - decode: id => id - }; - const multibaseCodecs = Object.values(basics.bases); - (options.ipld && options.ipld.bases ? options.ipld.bases : []).forEach(base => multibaseCodecs.push(base)); - const multibases$1 = new multibases.Multibases({ - bases: multibaseCodecs, - loadBase: options.ipld && options.ipld.loadBase - }); - const blockCodecs = Object.values(basics.codecs); - [ - dagPB__namespace, - dagCBOR__namespace, - dagJSON__namespace, - id$1 - ].concat(options.ipld && options.ipld.codecs || []).forEach(codec => blockCodecs.push(codec)); - const multicodecs$1 = new multicodecs.Multicodecs({ - codecs: blockCodecs, - loadCodec: options.ipld && options.ipld.loadCodec - }); - const multihashHashers = Object.values(basics.hashes); - (options.ipld && options.ipld.hashers ? options.ipld.hashers : []).forEach(hasher => multihashHashers.push(hasher)); - const multihashes$1 = new multihashes.Multihashes({ - hashers: multihashHashers, - loadHasher: options.ipld && options.ipld.loadHasher - }); - const client = { - add: add.createAdd(options), - addAll: addAll.createAddAll(options), - bitswap: index.createBitswap(options), - block: index$1.createBlock(options), - bootstrap: index$2.createBootstrap(options), - cat: cat.createCat(options), - commands: commands.createCommands(options), - config: index$3.createConfig(options), - dag: index$4.createDag(multicodecs$1, options), - dht: index$5.createDht(options), - diag: index$6.createDiag(options), - dns: dns.createDns(options), - files: index$7.createFiles(options), - get: get.createGet(options), - getEndpointConfig: getEndpointConfig.createGetEndpointConfig(options), - id: id.createId(options), - isOnline: isOnline.createIsOnline(options), - key: index$8.createKey(options), - log: index$9.createLog(options), - ls: ls.createLs(options), - mount: mount.createMount(options), - name: index$a.createName(options), - object: index$b.createObject(multicodecs$1, options), - pin: index$c.createPin(options), - ping: ping.createPing(options), - pubsub: index$d.createPubsub(options), - refs: index$e.createRefs(options), - repo: index$f.createRepo(options), - resolve: resolve.createResolve(options), - start: start.createStart(options), - stats: index$g.createStats(options), - stop: stop.createStop(options), - swarm: index$h.createSwarm(options), - version: version.createVersion(options), - bases: multibases$1, - codecs: multicodecs$1, - hashers: multihashes$1 - }; - return client; -} -const globSource = globSourceImport__default["default"]; -Object.defineProperty(exports, "CID", ({ - enumerable: true, - get: function () { return cid.CID; } -})); -Object.defineProperty(exports, "multiaddr", ({ - enumerable: true, - get: function () { return multiaddr.Multiaddr; } -})); -Object.defineProperty(exports, "urlSource", ({ - enumerable: true, - get: function () { return urlSource_js__default["default"]; } -})); -exports.create = create; -exports.globSource = globSource; +Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(20250); +tslib_1.__exportStar(__nccwpck_require__(54627), exports); +tslib_1.__exportStar(__nccwpck_require__(86621), exports); +tslib_1.__exportStar(__nccwpck_require__(80751), exports); /***/ }), -/***/ 5426: +/***/ 86621: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var id = __nccwpck_require__(15192); - -const createIsOnline = options => { - const id$1 = id.createId(options); - async function isOnline(options = {}) { - const res = await id$1(options); - return Boolean(res && res.addresses && res.addresses.length); - } - return isOnline; +exports.toUint8Array = void 0; +const fromUtf8_1 = __nccwpck_require__(54627); +const toUint8Array = (data) => { + if (typeof data === "string") { + return (0, fromUtf8_1.fromUtf8)(data); + } + if (ArrayBuffer.isView(data)) { + return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT); + } + return new Uint8Array(data); }; - -exports.createIsOnline = createIsOnline; +exports.toUint8Array = toUint8Array; /***/ }), -/***/ 89160: +/***/ 80751: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var errCode = __nccwpck_require__(5822); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); - -const createExport = configure.configure(api => { - const exportKey = async (name, password, options = {}) => { - throw errCode__default["default"](new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED'); - }; - return exportKey; -}); - -exports.createExport = createExport; +exports.toUtf8 = void 0; +const util_buffer_from_1 = __nccwpck_require__(41308); +const toUtf8 = (input) => (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("utf8"); +exports.toUtf8 = toUtf8; /***/ }), -/***/ 22932: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 20250: +/***/ ((module) => { -"use strict"; +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); + } + else { + factory(createExporter(root)); + } + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; + } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + __assign = Object.assign || function (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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __rest = function (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; + }; -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __decorate = function (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; + }; -const createGen = configure.configure(api => { - async function gen(name, options = { - type: 'rsa', - size: 2048 - }) { - const res = await api.post('key/gen', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: name, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - return objectToCamel.objectToCamel(data); - } - return gen; -}); + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -exports.createGen = createGen; + __esDecorate = function (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)); }; + 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; + }; + __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); + }; -/***/ 11031: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __setFunctionName = function (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 }); + }; -"use strict"; + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; + __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 })); + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -const createImport = configure.configure(api => { - async function importKey(name, pem, password, options = {}) { - const res = await api.post('key/import', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: name, - pem, - password, - ...options - }), - headers: options.headers + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; }); - const data = await res.json(); - return objectToCamel.objectToCamel(data); - } - return importKey; -}); -exports.createImport = createImport; + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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; + }; -/***/ 66007: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + /** @deprecated */ + __spreadArrays = function () { + 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; + }; -"use strict"; + __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 = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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(n, v); }); }; } + 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]); } + }; -var _export = __nccwpck_require__(89160); -var gen = __nccwpck_require__(22932); -var _import = __nccwpck_require__(11031); -var info = __nccwpck_require__(99925); -var list = __nccwpck_require__(98360); -var rename = __nccwpck_require__(47172); -var rm = __nccwpck_require__(94585); + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -function createKey(config) { - return { - export: _export.createExport(config), - gen: gen.createGen(config), - import: _import.createImport(config), - info: info.createInfo(config), - list: list.createList(config), - rename: rename.createRename(config), - rm: rm.createRm(config) - }; -} + __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); } + }; -exports.createKey = createKey; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -/***/ }), + __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; + }; -/***/ 99925: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -"use strict"; + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); + }; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __classPrivateFieldIn = function (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); + }; -var configure = __nccwpck_require__(31775); -var errCode = __nccwpck_require__(5822); + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + 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; + }; -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; -const createInfo = configure.configure(api => { - const info = async (name, options = {}) => { - throw errCode__default["default"](new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED'); - }; - return info; + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); }); -exports.createInfo = createInfo; - /***/ }), -/***/ 98360: +/***/ 58132: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createList = configure.configure(api => { - async function list(options = {}) { - const res = await api.post('key/list', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers +exports.createWaiter = void 0; +const poller_1 = __nccwpck_require__(60245); +const utils_1 = __nccwpck_require__(47955); +const waiter_1 = __nccwpck_require__(9020); +const abortTimeout = async (abortSignal) => { + return new Promise((resolve) => { + abortSignal.onabort = () => resolve({ state: waiter_1.WaiterState.ABORTED }); }); - const data = await res.json(); - return (data.Keys || []).map(k => objectToCamel.objectToCamel(k)); - } - return list; -}); - -exports.createList = createList; +}; +const createWaiter = async (options, input, acceptorChecks) => { + const params = { + ...waiter_1.waiterServiceDefaults, + ...options, + }; + (0, utils_1.validateWaiterOptions)(params); + const exitConditions = [(0, poller_1.runPolling)(params, input, acceptorChecks)]; + if (options.abortController) { + exitConditions.push(abortTimeout(options.abortController.signal)); + } + if (options.abortSignal) { + exitConditions.push(abortTimeout(options.abortSignal)); + } + return Promise.race(exitConditions); +}; +exports.createWaiter = createWaiter; /***/ }), -/***/ 47172: +/***/ 32406: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createRename = configure.configure(api => { - async function rename(oldName, newName, options = {}) { - const res = await api.post('key/rename', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: [ - oldName, - newName - ], - ...options - }), - headers: options.headers - }); - return objectToCamel.objectToCamel(await res.json()); - } - return rename; -}); - -exports.createRename = createRename; +const tslib_1 = __nccwpck_require__(8406); +tslib_1.__exportStar(__nccwpck_require__(58132), exports); +tslib_1.__exportStar(__nccwpck_require__(9020), exports); /***/ }), -/***/ 94585: +/***/ 60245: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); - -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createRm = configure.configure(api => { - async function rm(name, options = {}) { - const res = await api.post('key/rm', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: name, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - return objectToCamel.objectToCamel(data.Keys[0]); - } - return rm; -}); - -exports.createRm = createRm; +exports.runPolling = void 0; +const sleep_1 = __nccwpck_require__(55142); +const waiter_1 = __nccwpck_require__(9020); +const exponentialBackoffWithJitter = (minDelay, maxDelay, attemptCeiling, attempt) => { + if (attempt > attemptCeiling) + return maxDelay; + const delay = minDelay * 2 ** (attempt - 1); + return randomInRange(minDelay, delay); +}; +const randomInRange = (min, max) => min + Math.random() * (max - min); +const runPolling = async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => { + var _a; + const { state, reason } = await acceptorChecks(client, input); + if (state !== waiter_1.WaiterState.RETRY) { + return { state, reason }; + } + let currentAttempt = 1; + const waitUntil = Date.now() + maxWaitTime * 1000; + const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1; + while (true) { + if (((_a = abortController === null || abortController === void 0 ? void 0 : abortController.signal) === null || _a === void 0 ? void 0 : _a.aborted) || (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted)) { + return { state: waiter_1.WaiterState.ABORTED }; + } + const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt); + if (Date.now() + delay * 1000 > waitUntil) { + return { state: waiter_1.WaiterState.TIMEOUT }; + } + await (0, sleep_1.sleep)(delay); + const { state, reason } = await acceptorChecks(client, input); + if (state !== waiter_1.WaiterState.RETRY) { + return { state, reason }; + } + currentAttempt += 1; + } +}; +exports.runPolling = runPolling; /***/ }), -/***/ 14594: +/***/ 47955: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - Object.defineProperty(exports, "__esModule", ({ value: true })); +const tslib_1 = __nccwpck_require__(8406); +tslib_1.__exportStar(__nccwpck_require__(55142), exports); +tslib_1.__exportStar(__nccwpck_require__(56640), exports); -var anySignal = __nccwpck_require__(65618); - -function filter(signals) { - return signals.filter(Boolean); -} -function abortSignal(...signals) { - return anySignal.anySignal(filter(signals)); -} -exports.abortSignal = abortSignal; +/***/ }), +/***/ 55142: +/***/ ((__unused_webpack_module, exports) => { -/***/ }), -/***/ 31775: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sleep = void 0; +const sleep = (seconds) => { + return new Promise((resolve) => setTimeout(resolve, seconds * 1000)); +}; +exports.sleep = sleep; -"use strict"; +/***/ }), -Object.defineProperty(exports, "__esModule", ({ value: true })); +/***/ 56640: +/***/ ((__unused_webpack_module, exports) => { -var core = __nccwpck_require__(66212); -const configure = fn => { - return options => { - return fn(new core.Client(options), options); - }; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.validateWaiterOptions = void 0; +const validateWaiterOptions = (options) => { + if (options.maxWaitTime < 1) { + throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`); + } + else if (options.minDelay < 1) { + throw new Error(`WaiterConfiguration.minDelay must be greater than 0`); + } + else if (options.maxDelay < 1) { + throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`); + } + else if (options.maxWaitTime <= options.minDelay) { + throw new Error(`WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } + else if (options.maxDelay < options.minDelay) { + throw new Error(`WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`); + } }; - -exports.configure = configure; +exports.validateWaiterOptions = validateWaiterOptions; /***/ }), -/***/ 66212: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 9020: +/***/ ((__unused_webpack_module, exports) => { Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.checkExceptions = exports.WaiterState = exports.waiterServiceDefaults = void 0; +exports.waiterServiceDefaults = { + minDelay: 2, + maxDelay: 120, +}; +var WaiterState; +(function (WaiterState) { + WaiterState["ABORTED"] = "ABORTED"; + WaiterState["FAILURE"] = "FAILURE"; + WaiterState["SUCCESS"] = "SUCCESS"; + WaiterState["RETRY"] = "RETRY"; + WaiterState["TIMEOUT"] = "TIMEOUT"; +})(WaiterState = exports.WaiterState || (exports.WaiterState = {})); +const checkExceptions = (result) => { + if (result.state === WaiterState.ABORTED) { + const abortError = new Error(`${JSON.stringify({ + ...result, + reason: "Request was aborted", + })}`); + abortError.name = "AbortError"; + throw abortError; + } + else if (result.state === WaiterState.TIMEOUT) { + const timeoutError = new Error(`${JSON.stringify({ + ...result, + reason: "Waiter has timed out", + })}`); + timeoutError.name = "TimeoutError"; + throw timeoutError; + } + else if (result.state !== WaiterState.SUCCESS) { + throw new Error(`${JSON.stringify({ result })}`); + } + return result; +}; +exports.checkExceptions = checkExceptions; -var multiaddr = __nccwpck_require__(78025); -var env_js = __nccwpck_require__(48488); -var parseDuration = __nccwpck_require__(35632); -var debug = __nccwpck_require__(58923); -var HTTP = __nccwpck_require__(24335); -var mergeOpts = __nccwpck_require__(79139); -var toUrlString = __nccwpck_require__(4037); -var getAgent = __nccwpck_require__(34290); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/***/ }), -var parseDuration__default = /*#__PURE__*/_interopDefaultLegacy(parseDuration); -var debug__default = /*#__PURE__*/_interopDefaultLegacy(debug); -var HTTP__default = /*#__PURE__*/_interopDefaultLegacy(HTTP); -var mergeOpts__default = /*#__PURE__*/_interopDefaultLegacy(mergeOpts); -var getAgent__default = /*#__PURE__*/_interopDefaultLegacy(getAgent); +/***/ 8406: +/***/ ((module) => { -const log = debug__default["default"]('ipfs-http-client:lib:error-handler'); -const merge = mergeOpts__default["default"].bind({ ignoreUndefined: true }); -const DEFAULT_PROTOCOL = env_js.isBrowser || env_js.isWebWorker ? location.protocol : 'http'; -const DEFAULT_HOST = env_js.isBrowser || env_js.isWebWorker ? location.hostname : 'localhost'; -const DEFAULT_PORT = env_js.isBrowser || env_js.isWebWorker ? location.port : '5001'; -const normalizeOptions = (options = {}) => { - let url; - let opts = {}; - let agent; - if (typeof options === 'string' || multiaddr.Multiaddr.isMultiaddr(options)) { - url = new URL(toUrlString.toUrlString(options)); - } else if (options instanceof URL) { - url = options; - } else if (typeof options.url === 'string' || multiaddr.Multiaddr.isMultiaddr(options.url)) { - url = new URL(toUrlString.toUrlString(options.url)); - opts = options; - } else if (options.url instanceof URL) { - url = options.url; - opts = options; - } else { - opts = options || {}; - const protocol = (opts.protocol || DEFAULT_PROTOCOL).replace(':', ''); - const host = (opts.host || DEFAULT_HOST).split(':')[0]; - const port = opts.port || DEFAULT_PORT; - url = new URL(`${ protocol }://${ host }:${ port }`); - } - if (opts.apiPath) { - url.pathname = opts.apiPath; - } else if (url.pathname === '/' || url.pathname === undefined) { - url.pathname = 'api/v0'; - } - if (env_js.isNode) { - const Agent = getAgent__default["default"](url); - agent = opts.agent || new Agent({ - keepAlive: true, - maxSockets: 6 - }); - } - return { - ...opts, - host: url.host, - protocol: url.protocol.replace(':', ''), - port: Number(url.port), - apiPath: url.pathname, - url, - agent - }; -}; -const errorHandler = async response => { - let msg; - try { - if ((response.headers.get('Content-Type') || '').startsWith('application/json')) { - const data = await response.json(); - log(data); - msg = data.Message || data.message; - } else { - msg = await response.text(); +/****************************************************************************** +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. +***************************************************************************** */ +/* global global, define, Symbol, Reflect, Promise, SuppressedError */ +var __extends; +var __assign; +var __rest; +var __decorate; +var __param; +var __esDecorate; +var __runInitializers; +var __propKey; +var __setFunctionName; +var __metadata; +var __awaiter; +var __generator; +var __exportStar; +var __values; +var __read; +var __spread; +var __spreadArrays; +var __spreadArray; +var __await; +var __asyncGenerator; +var __asyncDelegator; +var __asyncValues; +var __makeTemplateObject; +var __importStar; +var __importDefault; +var __classPrivateFieldGet; +var __classPrivateFieldSet; +var __classPrivateFieldIn; +var __createBinding; +var __addDisposableResource; +var __disposeResources; +(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) { factory(createExporter(root, createExporter(exports))); }); + } + else if ( true && typeof module.exports === "object") { + factory(createExporter(root, createExporter(module.exports))); } - } catch (err) { - log('Failed to parse error response', err); - msg = err.message; - } - let error = new HTTP__default["default"].HTTPError(response); - if (msg) { - if (msg.includes('deadline has elapsed')) { - error = new HTTP__default["default"].TimeoutError(); + else { + factory(createExporter(root)); } - if (msg && msg.includes('context deadline exceeded')) { - error = new HTTP__default["default"].TimeoutError(); + function createExporter(exports, previous) { + if (exports !== root) { + if (typeof Object.create === "function") { + Object.defineProperty(exports, "__esModule", { value: true }); + } + else { + exports.__esModule = true; + } + } + return function (id, v) { return exports[id] = previous ? previous(id, v) : v; }; } - } - if (msg && msg.includes('request timed out')) { - error = new HTTP__default["default"].TimeoutError(); - } - if (msg) { - error.message = msg; - } - throw error; -}; -const KEBAB_REGEX = /[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g; -const kebabCase = str => { - return str.replace(KEBAB_REGEX, function (match) { - return '-' + match.toLowerCase(); - }); -}; -const parseTimeout = value => { - return typeof value === 'string' ? parseDuration__default["default"](value) : value; -}; -class Client extends HTTP__default["default"] { - constructor(options = {}) { - const opts = normalizeOptions(options); - super({ - timeout: parseTimeout(opts.timeout || 0) || undefined, - headers: opts.headers, - base: `${ opts.url }`, - handleError: errorHandler, - transformSearchParams: search => { - const out = new URLSearchParams(); - for (const [key, value] of search) { - if (value !== 'undefined' && value !== 'null' && key !== 'signal') { - out.append(kebabCase(key), value); - } - if (key === 'timeout' && !isNaN(value)) { - out.append(kebabCase(key), value); - } +}) +(function (exporter) { + var 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]; }; + + __extends = function (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 __()); + }; + + __assign = Object.assign || function (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 out; - }, - agent: opts.agent - }); - delete this.get; - delete this.put; - delete this.delete; - delete this.options; - const fetch = this.fetch; - this.fetch = (resource, options = {}) => { - if (typeof resource === 'string' && !resource.startsWith('/')) { - resource = `${ opts.url }/${ resource }`; - } - return fetch.call(this, resource, merge(options, { method: 'POST' })); + return t; }; - } -} -const HTTPError = HTTP__default["default"].HTTPError; -exports.Client = Client; -exports.HTTPError = HTTPError; -exports.errorHandler = errorHandler; + __rest = function (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; + }; + __decorate = function (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; + }; -/***/ }), + __param = function (paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } + }; -/***/ 29208: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __esDecorate = function (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)); }; + 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; + }; -"use strict"; + __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); + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __setFunctionName = function (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 }); + }; -var fromString = __nccwpck_require__(39451); -var toString = __nccwpck_require__(2771); -var base64 = __nccwpck_require__(98197); + __metadata = function (metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); + }; -const rpcArrayToTextArray = strings => { - if (Array.isArray(strings)) { - return strings.map(rpcToText); - } - return strings; -}; -const rpcToText = mb => toString.toString(rpcToBytes(mb)); -const rpcToBytes = mb => base64.base64url.decode(mb); -const textToUrlSafeRpc = text => base64.base64url.encode(fromString.fromString(text)); + __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()); + }); + }; -exports.rpcArrayToTextArray = rpcArrayToTextArray; -exports.rpcToBytes = rpcToBytes; -exports.rpcToText = rpcToText; -exports.textToUrlSafeRpc = textToUrlSafeRpc; + __generator = function (thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "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 && (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; } + 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; + } + 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 }; + } + }; + __exportStar = function(m, o) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p); + }; -/***/ }), + __createBinding = Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) 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 === undefined) k2 = k; + o[k2] = m[k]; + }); -/***/ 87513: -/***/ ((__unused_webpack_module, exports) => { + __values = function (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 }; + } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); + }; -"use strict"; + __read = function (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: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.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; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + /** @deprecated */ + __spreadArrays = function () { + 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 modeToString(mode) { - if (mode == null) { - return undefined; - } - if (typeof mode === 'string') { - return mode; - } - return mode.toString(8).padStart(4, '0'); -} + __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)); + }; -exports.modeToString = modeToString; + __await = function (v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); + }; + __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(n, v); }); }; } + 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]); } + }; -/***/ }), + __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(o[n](v)), done: false } : f ? f(v) : v; } : f; } + }; -/***/ 28060: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + __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); } + }; -"use strict"; + __makeTemplateObject = function (cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; + }; + var __setModuleDefault = Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + __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 objectToCamel = __nccwpck_require__(62268); + __importDefault = function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; + }; -function objectToCamelWithMetadata(entry) { - const file = objectToCamel.objectToCamel(entry); - if (Object.prototype.hasOwnProperty.call(file, 'mode')) { - file.mode = parseInt(file.mode, 8); - } - if (Object.prototype.hasOwnProperty.call(file, 'mtime')) { - file.mtime = { - secs: file.mtime, - nsecs: file.mtimeNsecs || 0 + __classPrivateFieldGet = function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; - delete file.mtimeNsecs; - } - return file; -} -exports.objectToCamelWithMetadata = objectToCamelWithMetadata; + __classPrivateFieldSet = function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; + }; + + __classPrivateFieldIn = function (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); + }; + + __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; + 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 (typeof dispose !== "function") throw new TypeError("Object not disposable."); + env.stack.push({ value: value, dispose: dispose, async: async }); + } + else if (async) { + env.stack.push({ async: true }); + } + return value; + }; + + 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; + }; + + __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; + } + function next() { + while (env.stack.length) { + var rec = env.stack.pop(); + try { + var result = rec.dispose && rec.dispose.call(rec.value); + if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); }); + } + catch (e) { + fail(e); + } + } + if (env.hasError) throw env.error; + } + return next(); + }; + + 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); + exporter("__generator", __generator); + exporter("__exportStar", __exportStar); + exporter("__createBinding", __createBinding); + exporter("__values", __values); + exporter("__read", __read); + exporter("__spread", __spread); + exporter("__spreadArrays", __spreadArrays); + exporter("__spreadArray", __spreadArray); + exporter("__await", __await); + exporter("__asyncGenerator", __asyncGenerator); + exporter("__asyncDelegator", __asyncDelegator); + exporter("__asyncValues", __asyncValues); + exporter("__makeTemplateObject", __makeTemplateObject); + exporter("__importStar", __importStar); + exporter("__importDefault", __importDefault); + exporter("__classPrivateFieldGet", __classPrivateFieldGet); + exporter("__classPrivateFieldSet", __classPrivateFieldSet); + exporter("__classPrivateFieldIn", __classPrivateFieldIn); + exporter("__addDisposableResource", __addDisposableResource); + exporter("__disposeResources", __disposeResources); +}); /***/ }), -/***/ 62268: -/***/ ((__unused_webpack_module, exports) => { +/***/ 28332: +/***/ ((module) => { +======= +/***/ 65618: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +const { AbortController } = __nccwpck_require__(43586) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/** + * Takes an array of AbortSignals and returns a single signal. + * If any signals are aborted, the returned signal will be aborted. + * @param {Array} signals + * @returns {AbortSignal} + */ +function anySignal (signals) { + const controller = new globalThis.AbortController() -Object.defineProperty(exports, "__esModule", ({ value: true })); + function onAbort () { + controller.abort() -function objectToCamel(obj) { - if (obj == null) { - return obj; + for (const signal of signals) { + if (!signal || !signal.removeEventListener) continue + signal.removeEventListener('abort', onAbort) + } } - const caps = /^[A-Z]+$/; - const output = {}; - return Object.keys(obj).reduce((camelObj, k) => { - if (caps.test(k)) { - camelObj[k.toLowerCase()] = obj[k]; - } else if (caps.test(k[0])) { - camelObj[k[0].toLowerCase() + k.slice(1)] = obj[k]; - } else { - camelObj[k] = obj[k]; + + for (const signal of signals) { + if (!signal || !signal.addEventListener) continue + if (signal.aborted) { + onAbort() + break } - return camelObj; - }, output); + signal.addEventListener('abort', onAbort) + } + + return controller.signal } -exports.objectToCamel = objectToCamel; +module.exports = anySignal +module.exports.anySignal = anySignal /***/ }), -/***/ 68414: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +<<<<<<< HEAD +/***/ 75719: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +module.exports = +{ + parallel : __nccwpck_require__(95230), + serial : __nccwpck_require__(42891), + serialOrdered : __nccwpck_require__(29499) +}; -Object.defineProperty(exports, "__esModule", ({ value: true })); +/***/ }), -var errCode = __nccwpck_require__(5822); +/***/ 27404: +/***/ ((module) => { -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +// API +module.exports = abort; -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +/** + * Aborts leftover active jobs + * + * @param {object} state - current state object + */ +function abort(state) +{ + Object.keys(state.jobs).forEach(clean.bind(state)); -function parseMtime(input) { - if (input == null) { - return undefined; - } - let mtime; - if (input.secs != null) { - mtime = { - secs: input.secs, - nsecs: input.nsecs - }; - } - if (input.Seconds != null) { - mtime = { - secs: input.Seconds, - nsecs: input.FractionalNanoseconds - }; - } - if (Array.isArray(input)) { - mtime = { - secs: input[0], - nsecs: input[1] - }; - } - if (input instanceof Date) { - const ms = input.getTime(); - const secs = Math.floor(ms / 1000); - mtime = { - secs: secs, - nsecs: (ms - secs * 1000) * 1000 - }; - } - if (!Object.prototype.hasOwnProperty.call(mtime, 'secs')) { - return undefined; - } - if (mtime != null && mtime.nsecs != null && (mtime.nsecs < 0 || mtime.nsecs > 999999999)) { - throw errCode__default["default"](new Error('mtime-nsecs must be within the range [0,999999999]'), 'ERR_INVALID_MTIME_NSECS'); - } - return mtime; + // reset leftover jobs + state.jobs = {}; } -exports.parseMtime = parseMtime; +/** + * Cleans up leftover job by invoking abort function for the provided job id + * + * @this state + * @param {string|number} key - job id to abort + */ +function clean(key) +{ + if (typeof this.jobs[key] == 'function') + { + this.jobs[key](); + } +} /***/ }), -/***/ 51788: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - +/***/ 23247: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -Object.defineProperty(exports, "__esModule", ({ value: true })); +var defer = __nccwpck_require__(25847); -var cid = __nccwpck_require__(24247); -var errCode = __nccwpck_require__(5822); +// API +module.exports = async; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/** + * Runs provided callback asynchronously + * even if callback itself is not + * + * @param {function} callback - callback to invoke + * @returns {function} - augmented callback + */ +function async(callback) +{ + var isAsync = false; -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + // check if async happened + defer(function() { isAsync = true; }); -async function* resolve(cid$1, path, codecs, getBlock, options) { - const load = async cid => { - const codec = await codecs.getCodec(cid.code); - const block = await getBlock(cid, options); - return codec.decode(block); - }; - const parts = path.split('/').filter(Boolean); - let value = await load(cid$1); - let lastCid = cid$1; - while (parts.length) { - const key = parts.shift(); - if (!key) { - throw errCode__default["default"](new Error(`Could not resolve path "${ path }"`), 'ERR_INVALID_PATH'); - } - if (Object.prototype.hasOwnProperty.call(value, key)) { - value = value[key]; - yield { - value, - remainderPath: parts.join('/') - }; - } else { - throw errCode__default["default"](new Error(`no link named "${ key }" under ${ lastCid }`), 'ERR_NO_LINK'); + return function async_callback(err, result) + { + if (isAsync) + { + callback(err, result); } - const cid$1 = cid.CID.asCID(value); - if (cid$1) { - lastCid = cid$1; - value = await load(value); + else + { + defer(function nextTick_callback() + { + callback(err, result); + }); } - } - yield { - value, - remainderPath: '' }; } -exports.resolve = resolve; - /***/ }), -/***/ 52836: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - +/***/ 25847: +/***/ ((module) => { -Object.defineProperty(exports, "__esModule", ({ value: true })); +module.exports = defer; -var modeToString = __nccwpck_require__(87513); -var parseMtime = __nccwpck_require__(68414); +/** + * Runs provided function on next iteration of the event loop + * + * @param {function} fn - function to run + */ +function defer(fn) +{ + var nextTick = typeof setImmediate == 'function' + ? setImmediate + : ( + typeof process == 'object' && typeof process.nextTick == 'function' + ? process.nextTick + : null + ); -function toUrlSearchParams({arg, searchParams, hashAlg, mtime, mode, ...options} = {}) { - if (searchParams) { - options = { - ...options, - ...searchParams - }; - } - if (hashAlg) { - options.hash = hashAlg; - } - if (mtime != null) { - mtime = parseMtime.parseMtime(mtime); - options.mtime = mtime.secs; - options.mtimeNsecs = mtime.nsecs; - } - if (mode != null) { - options.mode = modeToString.modeToString(mode); - } - if (options.timeout && !isNaN(options.timeout)) { - options.timeout = `${ options.timeout }ms`; + if (nextTick) + { + nextTick(fn); } - if (arg === undefined || arg === null) { - arg = []; - } else if (!Array.isArray(arg)) { - arg = [arg]; + else + { + setTimeout(fn, 0); } - const urlSearchParams = new URLSearchParams(options); - arg.forEach(arg => urlSearchParams.append('arg', arg)); - return urlSearchParams; } -exports.toUrlSearchParams = toUrlSearchParams; - /***/ }), -/***/ 85077: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 96930: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var async = __nccwpck_require__(23247) + , abort = __nccwpck_require__(27404) + ; +// API +module.exports = iterate; -Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Iterates over each job object + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {object} state - current job status + * @param {function} callback - invoked when all elements processed + */ +function iterate(list, iterator, state, callback) +{ + // store current index + var key = state['keyedList'] ? state['keyedList'][state.index] : state.index; -var level = __nccwpck_require__(84685); -var ls = __nccwpck_require__(17150); -var tail = __nccwpck_require__(17214); + state.jobs[key] = runJob(iterator, key, list[key], function(error, output) + { + // don't repeat yourself + // skip secondary callbacks + if (!(key in state.jobs)) + { + return; + } -function createLog(config) { - return { - level: level.createLevel(config), - ls: ls.createLs(config), - tail: tail.createTail(config) - }; + // clean up jobs + delete state.jobs[key]; + + if (error) + { + // don't process rest of the results + // stop still active jobs + // and reset the list + abort(state); + } + else + { + state.results[key] = output; + } + + // return salvaged results + callback(error, state.results); + }); } -exports.createLog = createLog; +/** + * Runs iterator over provided job element + * + * @param {function} iterator - iterator to invoke + * @param {string|number} key - key/index of the element in the list of jobs + * @param {mixed} item - job description + * @param {function} callback - invoked after iterator is done with the job + * @returns {function|mixed} - job abort function or something else + */ +function runJob(iterator, key, item, callback) +{ + var aborter; + // allow shortcut if iterator expects only two arguments + if (iterator.length == 2) + { + aborter = iterator(item, async(callback)); + } + // otherwise go with full three arguments + else + { + aborter = iterator(item, key, async(callback)); + } -/***/ }), + return aborter; +} -/***/ 84685: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +/***/ }), +/***/ 70152: +/***/ ((module) => { -Object.defineProperty(exports, "__esModule", ({ value: true })); +// API +module.exports = state; -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +/** + * Creates initial state object + * for iteration over list + * + * @param {array|object} list - list to iterate over + * @param {function|null} sortMethod - function to use for keys sort, + * or `null` to keep them as is + * @returns {object} - initial state object + */ +function state(list, sortMethod) +{ + var isNamedList = !Array.isArray(list) + , initState = + { + index : 0, + keyedList: isNamedList || sortMethod ? Object.keys(list) : null, + jobs : {}, + results : isNamedList ? {} : [], + size : isNamedList ? Object.keys(list).length : list.length + } + ; -const createLevel = configure.configure(api => { - async function level(subsystem, level, options = {}) { - const res = await api.post('log/level', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: [ - subsystem, - level - ], - ...options - }), - headers: options.headers + if (sortMethod) + { + // sort array keys based on it's values + // sort object's keys just on own merit + initState.keyedList.sort(isNamedList ? sortMethod : function(a, b) + { + return sortMethod(list[a], list[b]); }); - return objectToCamel.objectToCamel(await res.json()); } - return level; -}); -exports.createLevel = createLevel; + return initState; +} /***/ }), -/***/ 17150: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 13508: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var abort = __nccwpck_require__(27404) + , async = __nccwpck_require__(23247) + ; +// API +module.exports = terminator; -Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Terminates jobs in the attached state context + * + * @this AsyncKitState# + * @param {function} callback - final callback to invoke after termination + */ +function terminator(callback) +{ + if (!Object.keys(this.jobs).length) + { + return; + } -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + // fast forward iteration index + this.index = this.size; -const createLs = configure.configure(api => { - async function ls(options = {}) { - const res = await api.post('log/ls', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - const data = await res.json(); - return data.Strings; - } - return ls; -}); + // abort jobs + abort(this); -exports.createLs = createLs; + // send back results we have so far + async(callback)(null, this.results); +} /***/ }), -/***/ 17214: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 95230: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var iterate = __nccwpck_require__(96930) + , initState = __nccwpck_require__(70152) + , terminator = __nccwpck_require__(13508) + ; +// Public API +module.exports = parallel; -Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Runs iterator over provided array elements in parallel + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function parallel(list, iterator, callback) +{ + var state = initState(list); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + while (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, function(error, result) + { + if (error) + { + callback(error, result); + return; + } -const createTail = configure.configure(api => { - async function* tail(options = {}) { - const res = await api.post('log/tail', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers + // looks like it's the last one + if (Object.keys(state.jobs).length === 0) + { + callback(null, state.results); + return; + } }); - yield* res.ndjson(); + + state.index++; } - return tail; -}); -exports.createTail = createTail; + return terminator.bind(state, callback); +} /***/ }), -/***/ 97506: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - +/***/ 42891: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -Object.defineProperty(exports, "__esModule", ({ value: true })); +var serialOrdered = __nccwpck_require__(29499); -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var stat = __nccwpck_require__(74168); +// Public API +module.exports = serial; -const createLs = configure.configure((api, opts) => { - async function* ls(path, options = {}) { - const pathStr = `${ path instanceof Uint8Array ? cid.CID.decode(path) : path }`; - async function mapLink(link) { - let hash = link.Hash; - if (hash.includes('/')) { - const ipfsPath = hash.startsWith('/ipfs/') ? hash : `/ipfs/${ hash }`; - const stats = await stat.createStat(opts)(ipfsPath); - hash = stats.cid; - } else { - hash = cid.CID.parse(hash); - } - const entry = { - name: link.Name, - path: pathStr + (link.Name ? `/${ link.Name }` : ''), - size: link.Size, - cid: hash, - type: typeOf(link) - }; - if (link.Mode) { - entry.mode = parseInt(link.Mode, 8); - } - if (link.Mtime !== undefined && link.Mtime !== null) { - entry.mtime = { secs: link.Mtime }; - if (link.MtimeNsecs !== undefined && link.MtimeNsecs !== null) { - entry.mtime.nsecs = link.MtimeNsecs; - } - } - return entry; - } - const res = await api.post('ls', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: pathStr, - ...options - }), - headers: options.headers - }); - for await (let result of res.ndjson()) { - result = result.Objects; - if (!result) { - throw new Error('expected .Objects in results'); - } - result = result[0]; - if (!result) { - throw new Error('expected one array in results.Objects'); - } - const links = result.Links; - if (!Array.isArray(links)) { - throw new Error('expected one array in results.Objects[0].Links'); - } - if (!links.length) { - yield mapLink(result); - return; - } - yield* links.map(mapLink); - } - } - return ls; -}); -function typeOf(link) { - switch (link.Type) { - case 1: - case 5: - return 'dir'; - case 2: - return 'file'; - default: - return 'file'; - } +/** + * Runs iterator over provided array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serial(list, iterator, callback) +{ + return serialOrdered(list, iterator, null, callback); } -exports.createLs = createLs; - /***/ }), -/***/ 75785: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 29499: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var iterate = __nccwpck_require__(96930) + , initState = __nccwpck_require__(70152) + , terminator = __nccwpck_require__(13508) + ; +// Public API +module.exports = serialOrdered; +// sorting helpers +module.exports.ascending = ascending; +module.exports.descending = descending; -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createMount = configure.configure(api => { - async function mount(options = {}) { - const res = await api.post('dns', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - return objectToCamel.objectToCamel(await res.json()); - } - return mount; -}); - -exports.createMount = createMount; - +/** + * Runs iterator over provided sorted array elements in series + * + * @param {array|object} list - array or object (named list) to iterate over + * @param {function} iterator - iterator to run + * @param {function} sortMethod - custom sort function + * @param {function} callback - invoked when all elements processed + * @returns {function} - jobs terminator + */ +function serialOrdered(list, iterator, sortMethod, callback) +{ + var state = initState(list, sortMethod); -/***/ }), + iterate(list, iterator, state, function iteratorHandler(error, result) + { + if (error) + { + callback(error, result); + return; + } -/***/ 8302: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + state.index++; -"use strict"; + // are we there yet? + if (state.index < (state['keyedList'] || list).length) + { + iterate(list, iterator, state, iteratorHandler); + return; + } + // done here + callback(null, state.results); + }); -Object.defineProperty(exports, "__esModule", ({ value: true })); + return terminator.bind(state, callback); +} -var publish = __nccwpck_require__(29576); -var resolve = __nccwpck_require__(49726); -var index = __nccwpck_require__(98473); +/* + * -- Sort methods + */ -function createName(config) { - return { - publish: publish.createPublish(config), - resolve: resolve.createResolve(config), - pubsub: index.createPubsub(config) - }; +/** + * sort helper to sort array elements in ascending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function ascending(a, b) +{ + return a < b ? -1 : a > b ? 1 : 0; } -exports.createName = createName; +/** + * sort helper to sort array elements in descending order + * + * @param {mixed} a - an item to compare + * @param {mixed} b - an item to compare + * @returns {number} - comparison result + */ +function descending(a, b) +{ + return -1 * ascending(a, b); +} /***/ }), -/***/ 29576: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); +/***/ 99171: +======= +/***/ 66058: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -const createPublish = configure.configure(api => { - async function publish(path, options = {}) { - const res = await api.post('name/publish', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: `${ path }`, - ...options - }), - headers: options.headers - }); - return objectToCamel.objectToCamel(await res.json()); - } - return publish; -}); +module.exports = balanced; +function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); -exports.createPublish = createPublish; + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; +} -/***/ }), +function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; +} -/***/ 59820: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +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); + var i = ai; -"use strict"; + if (ai >= 0 && bi > 0) { + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [ begs.pop(), bi ]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } -Object.defineProperty(exports, "__esModule", ({ value: true })); + bi = str.indexOf(b, i + 1); + } -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + i = ai < bi && ai >= 0 ? ai : bi; + } -const createCancel = configure.configure(api => { - async function cancel(name, options = {}) { - const res = await api.post('name/pubsub/cancel', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: name, - ...options - }), - headers: options.headers - }); - return objectToCamel.objectToCamel(await res.json()); + if (begs.length) { + result = [ left, right ]; + } } - return cancel; -}); -exports.createCancel = createCancel; + return result; +} /***/ }), -/***/ 98473: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +<<<<<<< HEAD +/***/ 65997: +======= +/***/ 87455: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var register = __nccwpck_require__(64031); +var addHook = __nccwpck_require__(69819); +var removeHook = __nccwpck_require__(68870); -Object.defineProperty(exports, "__esModule", ({ value: true })); +// bind with array of arguments: https://stackoverflow.com/a/21792913 +var bind = Function.bind; +var bindable = bind.bind(bind); -var cancel = __nccwpck_require__(59820); -var state = __nccwpck_require__(68347); -var subs = __nccwpck_require__(79481); +function bindApi(hook, state, name) { + var removeHookRef = bindable(removeHook, null).apply( + null, + name ? [state, name] : [state] + ); + hook.api = { remove: removeHookRef }; + hook.remove = removeHookRef; + ["before", "error", "after", "wrap"].forEach(function (kind) { + var args = name ? [state, kind, name] : [state, kind]; + hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args); + }); +} -function createPubsub(config) { - return { - cancel: cancel.createCancel(config), - state: state.createState(config), - subs: subs.createSubs(config) +function HookSingular() { + var singularHookName = "h"; + var singularHookState = { + registry: {}, }; + var singularHook = register.bind(null, singularHookState, singularHookName); + bindApi(singularHook, singularHookState, singularHookName); + return singularHook; } -exports.createPubsub = createPubsub; - - -/***/ }), - -/***/ 68347: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - +function HookCollection() { + var state = { + registry: {}, + }; -Object.defineProperty(exports, "__esModule", ({ value: true })); + var hook = register.bind(null, state); + bindApi(hook, state); -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + return hook; +} -const createState = configure.configure(api => { - async function state(options = {}) { - const res = await api.post('name/pubsub/state', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - return objectToCamel.objectToCamel(await res.json()); +var collectionHookDeprecationMessageDisplayed = false; +function Hook() { + if (!collectionHookDeprecationMessageDisplayed) { + console.warn( + '[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4' + ); + collectionHookDeprecationMessageDisplayed = true; } - return state; -}); - -exports.createState = createState; - + return HookCollection(); +} -/***/ }), +Hook.Singular = HookSingular.bind(); +Hook.Collection = HookCollection.bind(); -/***/ 79481: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +module.exports = Hook; +// expose constructors as a named property for TypeScript +module.exports.Hook = Hook; +module.exports.Singular = Hook.Singular; +module.exports.Collection = Hook.Collection; -"use strict"; +/***/ }), -Object.defineProperty(exports, "__esModule", ({ value: true })); +<<<<<<< HEAD +/***/ 69819: +/***/ ((module) => { +======= +/***/ 74827: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +module.exports = addHook; -const createSubs = configure.configure(api => { - async function subs(options = {}) { - const res = await api.post('name/pubsub/subs', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - const data = await res.json(); - return data.Strings || []; +<<<<<<< HEAD +function addHook(state, kind, name, hook) { + var orig = hook; + if (!state.registry[name]) { + state.registry[name] = []; } - return subs; -}); - -exports.createSubs = createSubs; - - -/***/ }), - -/***/ 49726: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + if (kind === "before") { + hook = function (method, options) { + return Promise.resolve() + .then(orig.bind(null, options)) + .then(method.bind(null, options)); +======= -Object.defineProperty(exports, "__esModule", ({ value: true })); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +const browserReadableStreamToIt = __nccwpck_require__(31049) -const createResolve = configure.configure(api => { - async function* resolve(path, options = {}) { - const res = await api.post('name/resolve', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - stream: true, - ...options - }), - headers: options.headers - }); - for await (const result of res.ndjson()) { - yield result.Path; - } +/** + * @param {Blob} blob + * @returns {AsyncIterable} + */ +function blobToIt (blob) { + if (typeof blob.stream === 'function') { + // @ts-ignore missing some properties + return browserReadableStreamToIt(blob.stream()) } - return resolve; -}); -exports.createResolve = createResolve; + // firefox < 69 does not support blob.stream() + // @ts-ignore - response.body is optional, but in practice it's a stream. + return browserReadableStreamToIt(new Response(blob).body) +} + +module.exports = blobToIt /***/ }), -/***/ 47257: +/***/ 57453: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -101784,74 +115621,105 @@ exports.createResolve = createResolve; Object.defineProperty(exports, "__esModule", ({ value: true })); -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createData = configure.configure(api => { - async function data(cid$1, options = {}) { - const res = await api.post('object/data', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: `${ cid$1 instanceof Uint8Array ? cid.CID.decode(cid$1) : cid$1 }`, - ...options - }), - headers: options.headers - }); - const data = await res.arrayBuffer(); - return new Uint8Array(data, 0, data.byteLength); - } - return data; -}); - -exports.createData = createData; - - -/***/ }), - -/***/ 55651: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - +var drain = __nccwpck_require__(85041); +var filter = __nccwpck_require__(78883); +var take = __nccwpck_require__(16346); +var all = __nccwpck_require__(81172); -Object.defineProperty(exports, "__esModule", ({ value: true })); +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var fromString = __nccwpck_require__(39451); +var drain__default = /*#__PURE__*/_interopDefaultLegacy(drain); +var filter__default = /*#__PURE__*/_interopDefaultLegacy(filter); +var take__default = /*#__PURE__*/_interopDefaultLegacy(take); +var all__default = /*#__PURE__*/_interopDefaultLegacy(all); -const createGet = configure.configure(api => { - async function get(cid$1, options = {}) { - const res = await api.post('object/get', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: `${ cid$1 instanceof Uint8Array ? cid.CID.decode(cid$1) : cid$1 }`, - dataEncoding: 'base64', - ...options - }), - headers: options.headers - }); - const data = await res.json(); +const sortAll = (iterable, sorter) => { + return async function* () { + const values = await all__default["default"](iterable); + yield* values.sort(sorter); + }(); +}; +class BaseBlockstore { + open() { + return Promise.reject(new Error('.open is not implemented')); + } + close() { + return Promise.reject(new Error('.close is not implemented')); + } + put(key, val, options) { + return Promise.reject(new Error('.put is not implemented')); + } + get(key, options) { + return Promise.reject(new Error('.get is not implemented')); + } + has(key, options) { + return Promise.reject(new Error('.has is not implemented')); + } + delete(key, options) { + return Promise.reject(new Error('.delete is not implemented')); + } + async *putMany(source, options = {}) { + for await (const {key, value} of source) { + await this.put(key, value, options); + yield { + key, + value + }; + } + } + async *getMany(source, options = {}) { + for await (const key of source) { + yield this.get(key, options); + } + } + async *deleteMany(source, options = {}) { + for await (const key of source) { + await this.delete(key, options); + yield key; + } + } + batch() { + let puts = []; + let dels = []; return { - Data: fromString.fromString(data.Data, 'base64pad'), - Links: (data.Links || []).map(link => ({ - Name: link.Name, - Hash: cid.CID.parse(link.Hash), - Tsize: link.Size - })) + put(key, value) { + puts.push({ + key, + value + }); + }, + delete(key) { + dels.push(key); + }, + commit: async options => { + await drain__default["default"](this.putMany(puts, options)); + puts = []; + await drain__default["default"](this.deleteMany(dels, options)); + dels = []; + } +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 }; } - return get; -}); -exports.createGet = createGet; +<<<<<<< HEAD + if (kind === "after") { + hook = function (method, options) { + var result; + return Promise.resolve() + .then(method.bind(null, options)) + .then(function (result_) { + result = result_; + return orig(result, options); + }) + .then(function () { + return result; +======= +exports.BaseBlockstore = BaseBlockstore; /***/ }), -/***/ 64980: +/***/ 36200: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -101859,32 +115727,28 @@ exports.createGet = createGet; Object.defineProperty(exports, "__esModule", ({ value: true })); -var data = __nccwpck_require__(47257); -var get = __nccwpck_require__(55651); -var links = __nccwpck_require__(56797); -var _new = __nccwpck_require__(4050); -var put = __nccwpck_require__(35217); -var stat = __nccwpck_require__(46969); -var index = __nccwpck_require__(94482); +var errCode = __nccwpck_require__(5822); -function createObject(codecs, config) { - return { - data: data.createData(config), - get: get.createGet(config), - links: links.createLinks(config), - new: _new.createNew(config), - put: put.createPut(codecs, config), - stat: stat.createStat(config), - patch: index.createPatch(config) - }; +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +function notFoundError(err) { + err = err || new Error('Not Found'); + return errCode__default["default"](err, 'ERR_NOT_FOUND'); +} +function abortedError(err) { + err = err || new Error('Aborted'); + return errCode__default["default"](err, 'ERR_ABORTED'); } -exports.createObject = createObject; +exports.abortedError = abortedError; +exports.notFoundError = notFoundError; /***/ }), -/***/ 56797: +/***/ 95301: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -101892,36 +115756,20 @@ exports.createObject = createObject; Object.defineProperty(exports, "__esModule", ({ value: true })); -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +var errors = __nccwpck_require__(36200); +var base = __nccwpck_require__(57453); +var memory = __nccwpck_require__(6584); -const createLinks = configure.configure(api => { - async function links(cid$1, options = {}) { - const res = await api.post('object/links', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: `${ cid$1 instanceof Uint8Array ? cid.CID.decode(cid$1) : cid$1 }`, - ...options - }), - headers: options.headers - }); - const data = await res.json(); - return (data.Links || []).map(l => ({ - Name: l.Name, - Tsize: l.Size, - Hash: cid.CID.parse(l.Hash) - })); - } - return links; -}); +const Errors = { ...errors }; -exports.createLinks = createLinks; +exports.BaseBlockstore = base.BaseBlockstore; +exports.MemoryBlockstore = memory.MemoryBlockstore; +exports.Errors = Errors; /***/ }), -/***/ 4050: +/***/ 6584: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -101929,442 +115777,584 @@ exports.createLinks = createLinks; Object.defineProperty(exports, "__esModule", ({ value: true })); +var base = __nccwpck_require__(57453); +var base32 = __nccwpck_require__(70784); +var raw = __nccwpck_require__(4848); var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +var Digest = __nccwpck_require__(81168); +var errors = __nccwpck_require__(36200); -const createNew = configure.configure(api => { - async function newObject(options = {}) { - const res = await api.post('object/new', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: options.template, - ...options - }), - headers: options.headers - }); - const {Hash} = await res.json(); - return cid.CID.parse(Hash); +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + }); + }; } - return newObject; -}); -exports.createNew = createNew; + if (kind === "error") { + hook = function (method, options) { + return Promise.resolve() + .then(method.bind(null, options)) + .catch(function (error) { + return orig(error, options); + }); + }; + } + state.registry[name].push({ + hook: hook, + orig: orig, + }); +} -/***/ }), -/***/ 23641: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ }), -"use strict"; +<<<<<<< HEAD +/***/ 64031: +/***/ ((module) => { +module.exports = register; -Object.defineProperty(exports, "__esModule", ({ value: true })); +function register(state, name, method, options) { + if (typeof method !== "function") { + throw new Error("method for before hook must be a function"); + } -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + if (!options) { + options = {}; + } -const createAddLink = configure.configure(api => { - async function addLink(cid$1, dLink, options = {}) { - const res = await api.post('object/patch/add-link', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: [ - `${ cid$1 }`, - dLink.Name || dLink.name || '', - (dLink.Hash || dLink.cid || '').toString() || null - ], - ...options - }), - headers: options.headers - }); - const {Hash} = await res.json(); - return cid.CID.parse(Hash); + if (Array.isArray(name)) { + return name.reverse().reduce(function (callback, name) { + return register.bind(null, state, name, callback, options); + }, method)(); } - return addLink; -}); -exports.createAddLink = createAddLink; + return Promise.resolve().then(function () { + if (!state.registry[name]) { + return method(options); + } + + return state.registry[name].reduce(function (method, registered) { + return registered.hook.bind(null, method, options); + }, method)(); + }); +} /***/ }), -/***/ 16432: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 68870: +/***/ ((module) => { +module.exports = removeHook; -Object.defineProperty(exports, "__esModule", ({ value: true })); +function removeHook(state, name, method) { + if (!state.registry[name]) { + return; + } -var cid = __nccwpck_require__(24247); -var multipartRequest = __nccwpck_require__(87527); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var abortSignal = __nccwpck_require__(14594); -var nativeAbortController = __nccwpck_require__(43586); + var index = state.registry[name] + .map(function (registered) { + return registered.orig; + }) + .indexOf(method); -const createAppendData = configure.configure(api => { - async function appendData(cid$1, data, options = {}) { - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, options.signal); - const res = await api.post('object/patch/append-data', { - signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: `${ cid$1 }`, - ...options - }), - ...await multipartRequest.multipartRequest([data], controller, options.headers) - }); - const {Hash} = await res.json(); - return cid.CID.parse(Hash); + if (index === -1) { + return; } - return appendData; -}); -exports.createAppendData = createAppendData; + state.registry[name].splice(index, 1); +} /***/ }), -/***/ 94482: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/***/ 11401: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var balanced = __nccwpck_require__(99171); -Object.defineProperty(exports, "__esModule", ({ value: true })); +module.exports = expandTop; -var addLink = __nccwpck_require__(23641); -var appendData = __nccwpck_require__(16432); -var rmLink = __nccwpck_require__(86253); -var setData = __nccwpck_require__(89010); +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; -function createPatch(config) { - return { - addLink: addLink.createAddLink(config), - appendData: appendData.createAppendData(config), - rmLink: rmLink.createRmLink(config), - setData: setData.createSetData(config) - }; +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); } -exports.createPatch = createPatch; - +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} -/***/ }), +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} -/***/ 86253: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + var parts = []; + var m = balanced('{', '}', str); -Object.defineProperty(exports, "__esModule", ({ value: true })); + if (!m) + return str.split(','); -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); -const createRmLink = configure.configure(api => { - async function rmLink(cid$1, dLink, options = {}) { - const res = await api.post('object/patch/rm-link', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: [ - `${ cid$1 }`, - dLink.Name || dLink.name || null - ], - ...options - }), - headers: options.headers - }); - const {Hash} = await res.json(); - return cid.CID.parse(Hash); + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); } - return rmLink; -}); - -exports.createRmLink = createRmLink; + parts.push.apply(parts, p); -/***/ }), + return parts; +} -/***/ 89010: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function expandTop(str) { + if (!str) + return []; -"use strict"; + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + return expand(escapeBraces(str), true).map(unescapeBraces); +} -Object.defineProperty(exports, "__esModule", ({ value: true })); +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} -var cid = __nccwpck_require__(24247); -var multipartRequest = __nccwpck_require__(87527); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var abortSignal = __nccwpck_require__(14594); -var nativeAbortController = __nccwpck_require__(43586); +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} -const createSetData = configure.configure(api => { - async function setData(cid$1, data, options = {}) { - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, options.signal); - const res = await api.post('object/patch/set-data', { - signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: [`${ cid$1 }`], - ...options - }), - ...await multipartRequest.multipartRequest([data], controller, options.headers) - }); - const {Hash} = await res.json(); - return cid.CID.parse(Hash); - } - return setData; -}); +function expand(str, isTop) { + var expansions = []; -exports.createSetData = createSetData; + var m = balanced('{', '}', str); + if (!m) return [str]; + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; -/***/ }), + if (/\$$/.test(m.pre)) { + for (var k = 0; k < post.length; k++) { + var expansion = pre+ '{' + m.body + '}' + post[k]; + expansions.push(expansion); + } + } else { + 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.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); + } + return [str]; + } -/***/ 35217: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } -"use strict"; + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. + var N; + + if (isSequence) { + var x = numeric(n[0]); + 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 < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + N = []; -Object.defineProperty(exports, "__esModule", ({ value: true })); + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = []; -var configure = __nccwpck_require__(31775); -var put = __nccwpck_require__(79631); + for (var j = 0; j < n.length; j++) { + N.push.apply(N, expand(n[j], false)); + } + } -const createPut = (codecs, options) => { - const fn = configure.configure(api => { - const dagPut = put.createPut(codecs, options); - async function put$1(obj, options = {}) { - return dagPut(obj, { - ...options, - storeCodec: 'dag-pb', - hashAlg: 'sha2-256', - version: 1 - }); + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } } - return put$1; - }); - return fn(options); -}; + } -exports.createPut = createPut; + return expansions; +} -/***/ }), -/***/ 46969: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ }), -"use strict"; +/***/ 3263: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var concatMap = __nccwpck_require__(42054); +var balanced = __nccwpck_require__(99171); +======= +/***/ 73594: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -Object.defineProperty(exports, "__esModule", ({ value: true })); +var concatMap = __nccwpck_require__(73132); +var balanced = __nccwpck_require__(66058); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +module.exports = expandTop; -const createStat = configure.configure(api => { - async function stat(cid$1, options = {}) { - const res = await api.post('object/stat', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: `${ cid$1 }`, - ...options - }), - headers: options.headers - }); - const output = await res.json(); - return { - ...output, - Hash: cid.CID.parse(output.Hash) - }; - } - return stat; -}); +var escSlash = '\0SLASH'+Math.random()+'\0'; +var escOpen = '\0OPEN'+Math.random()+'\0'; +var escClose = '\0CLOSE'+Math.random()+'\0'; +var escComma = '\0COMMA'+Math.random()+'\0'; +var escPeriod = '\0PERIOD'+Math.random()+'\0'; -exports.createStat = createStat; +function numeric(str) { + return parseInt(str, 10) == str + ? parseInt(str, 10) + : str.charCodeAt(0); +} +function escapeBraces(str) { + return str.split('\\\\').join(escSlash) + .split('\\{').join(escOpen) + .split('\\}').join(escClose) + .split('\\,').join(escComma) + .split('\\.').join(escPeriod); +} -/***/ }), +function unescapeBraces(str) { + return str.split(escSlash).join('\\') + .split(escOpen).join('{') + .split(escClose).join('}') + .split(escComma).join(',') + .split(escPeriod).join('.'); +} -/***/ 95440: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +// Basically just str.split(","), but handling cases +// where we have nested braced sections, which should be +// treated as individual members, like {a,{b,c},d} +function parseCommaParts(str) { + if (!str) + return ['']; + var parts = []; + var m = balanced('{', '}', str); -Object.defineProperty(exports, "__esModule", ({ value: true })); + if (!m) + return str.split(','); -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var normaliseInput = __nccwpck_require__(44956); -var toUrlSearchParams = __nccwpck_require__(52836); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(','); -const createAddAll = configure.configure(api => { - async function* addAll(source, options = {}) { - for await (const {path, recursive, metadata} of normaliseInput.normaliseInput(source)) { - const res = await api.post('pin/add', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - ...options, - arg: path, - recursive, - metadata: metadata ? JSON.stringify(metadata) : undefined, - stream: true - }), - headers: options.headers - }); - for await (const pin of res.ndjson()) { - if (pin.Pins) { - for (const cid$1 of pin.Pins) { - yield cid.CID.parse(cid$1); - } - continue; - } - yield cid.CID.parse(pin); - } - } + p[p.length-1] += '{' + body + '}'; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length-1] += postParts.shift(); + p.push.apply(p, postParts); } - return addAll; -}); - -exports.createAddAll = createAddAll; + parts.push.apply(parts, p); -/***/ }), + return parts; +} -/***/ 52127: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function expandTop(str) { + if (!str) + return []; -"use strict"; + // I don't know why Bash 4.3 does this, but it does. + // Anything starting with {} will have the first two bytes preserved + // but *only* at the top level, so {},a}b will not expand to anything, + // but a{},b}c will be expanded to [a}c,abc]. + // One could argue that this is a bug in Bash, but since the goal of + // this module is to match Bash's rules, we escape a leading {} + if (str.substr(0, 2) === '{}') { + str = '\\{\\}' + str.substr(2); + } + return expand(escapeBraces(str), true).map(unescapeBraces); +} -Object.defineProperty(exports, "__esModule", ({ value: true })); +function identity(e) { + return e; +} -var addAll = __nccwpck_require__(95440); -var last = __nccwpck_require__(28741); -var configure = __nccwpck_require__(31775); +function embrace(str) { + return '{' + str + '}'; +} +function isPadded(el) { + return /^-?0\d/.test(el); +} -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +function lte(i, y) { + return i <= y; +} +function gte(i, y) { + return i >= y; +} -var last__default = /*#__PURE__*/_interopDefaultLegacy(last); +function expand(str, isTop) { + var expansions = []; -function createAdd(config) { - const all = addAll.createAddAll(config); - return configure.configure(() => { - async function add(path, options = {}) { - return last__default["default"](all([{ - path, - ...options - }], options)); + 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.body.indexOf(',') >= 0; + if (!isSequence && !isOptions) { + // {a},b} + if (m.post.match(/,.*\}/)) { + str = m.pre + '{' + m.body + escClose + m.post; + return expand(str); } - return add; - })(config); -} + return [str]; + } -exports.createAdd = createAdd; + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + // x{{a,b}}y ==> x{a}y x{b}y + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length + ? expand(m.post, false) + : ['']; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + // at this point, n is the parts, and we know it's not a comma set + // with a single entry. -/***/ }), + // no need to expand pre, since it is guaranteed to be free of brace-sets + var pre = m.pre; + var post = m.post.length + ? expand(m.post, false) + : ['']; -/***/ 1115: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + var N; -"use strict"; + if (isSequence) { + var x = numeric(n[0]); + 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 < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + N = []; -Object.defineProperty(exports, "__esModule", ({ value: true })); + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === '\\') + c = ''; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join('0'); + if (i < 0) + c = '-' + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { return expand(el, false) }); + } -var addAll = __nccwpck_require__(95440); -var add = __nccwpck_require__(52127); -var ls = __nccwpck_require__(17454); -var rmAll = __nccwpck_require__(56863); -var rm = __nccwpck_require__(73805); -var index = __nccwpck_require__(69617); + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } -function createPin(config) { - return { - addAll: addAll.createAddAll(config), - add: add.createAdd(config), - ls: ls.createLs(config), - rmAll: rmAll.createRmAll(config), - rm: rm.createRm(config), - remote: index.createRemote(config) - }; + return expansions; } -exports.createPin = createPin; /***/ }), -/***/ 17454: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +<<<<<<< HEAD +/***/ 82677: +/***/ ((module) => { + +======= +/***/ 31049: +/***/ ((module) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * Turns a browser readable stream into an async iterable. Async iteration over + * returned iterable will lock give stream, preventing any other consumer from + * acquiring a reader. The lock will be released if iteration loop is broken. To + * prevent stream cancelling optional `{ preventCancel: true }` could be passed + * as a second argument. + * @template T + * @param {ReadableStream} stream + * @param {Object} [options] + * @param {boolean} [options.preventCancel=boolean] + * @returns {AsyncIterable} + */ +async function * browserReadableStreamToIt (stream, options = {}) { + const reader = stream.getReader() -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + try { + while (true) { + const result = await reader.read() -function toPin(type, cid$1, metadata) { - const pin = { - type, - cid: cid.CID.parse(cid$1) - }; - if (metadata) { - pin.metadata = metadata; - } - return pin; -} -const createLs = configure.configure(api => { - async function* ls(options = {}) { - let paths = []; - if (options.paths) { - paths = Array.isArray(options.paths) ? options.paths : [options.paths]; - } - const res = await api.post('pin/ls', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - ...options, - arg: paths.map(path => `${ path }`), - stream: true - }), - headers: options.headers - }); - for await (const pin of res.ndjson()) { - if (pin.Keys) { - for (const cid of Object.keys(pin.Keys)) { - yield toPin(pin.Keys[cid].Type, cid, pin.Keys[cid].Metadata); - } - return; + if (result.done) { + return } - yield toPin(pin.Type, pin.Cid, pin.Metadata); + + yield result.value + } + } finally { + if (options.preventCancel !== true) { + reader.cancel() } + + reader.releaseLock() } - return ls; -}); +} -exports.createLs = createLs; +module.exports = browserReadableStreamToIt /***/ }), -/***/ 96668: +/***/ 12085: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102372,30 +116362,21 @@ exports.createLs = createLs; Object.defineProperty(exports, "__esModule", ({ value: true })); -var utils = __nccwpck_require__(21292); +var encode = __nccwpck_require__(87446); +var decode = __nccwpck_require__(53216); +var token = __nccwpck_require__(90915); -function createAdd(client) { - async function add(cid, {timeout, signal, headers, ...query}) { - const response = await client.post('pin/remote/add', { - timeout, - signal, - headers, - searchParams: utils.encodeAddParams({ - cid, - ...query - }) - }); - return utils.decodePin(await response.json()); - } - return add; -} -exports.createAdd = createAdd; + +exports.encode = encode.encode; +exports.decode = decode.decode; +exports.Token = token.Token; +exports.Type = token.Type; /***/ }), -/***/ 69617: +/***/ 80316: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102403,30 +116384,170 @@ exports.createAdd = createAdd; Object.defineProperty(exports, "__esModule", ({ value: true })); -var core = __nccwpck_require__(66212); -var add = __nccwpck_require__(96668); -var ls = __nccwpck_require__(94900); -var rm = __nccwpck_require__(51590); -var rmAll = __nccwpck_require__(79654); -var index = __nccwpck_require__(94954); +var token = __nccwpck_require__(90915); +var common = __nccwpck_require__(47907); -function createRemote(config) { - const client = new core.Client(config); - return { - add: add.createAdd(client), - ls: ls.createLs(client), - rm: rm.createRm(client), - rmAll: rmAll.createRmAll(client), - service: index.createService(config) - }; +const uintBoundaries = [ + 24, + 256, + 65536, + 4294967296, + BigInt('18446744073709551616') +]; +function readUint8(data, offset, options) { + common.assertEnoughData(data, offset, 1); + const value = data[offset]; + if (options.strict === true && value < uintBoundaries[0]) { + throw new Error(`${ common.decodeErrPrefix } integer encoded in more bytes than necessary (strict decode)`); + } + return value; +} +function readUint16(data, offset, options) { + common.assertEnoughData(data, offset, 2); + const value = data[offset] << 8 | data[offset + 1]; + if (options.strict === true && value < uintBoundaries[1]) { + throw new Error(`${ common.decodeErrPrefix } integer encoded in more bytes than necessary (strict decode)`); + } + return value; +} +function readUint32(data, offset, options) { + common.assertEnoughData(data, offset, 4); + const value = data[offset] * 16777216 + (data[offset + 1] << 16) + (data[offset + 2] << 8) + data[offset + 3]; + if (options.strict === true && value < uintBoundaries[2]) { + throw new Error(`${ common.decodeErrPrefix } integer encoded in more bytes than necessary (strict decode)`); + } + return value; +} +function readUint64(data, offset, options) { + common.assertEnoughData(data, offset, 8); + const hi = data[offset] * 16777216 + (data[offset + 1] << 16) + (data[offset + 2] << 8) + data[offset + 3]; + const lo = data[offset + 4] * 16777216 + (data[offset + 5] << 16) + (data[offset + 6] << 8) + data[offset + 7]; + const value = (BigInt(hi) << BigInt(32)) + BigInt(lo); + if (options.strict === true && value < uintBoundaries[3]) { + throw new Error(`${ common.decodeErrPrefix } integer encoded in more bytes than necessary (strict decode)`); + } + if (value <= Number.MAX_SAFE_INTEGER) { + return Number(value); + } + if (options.allowBigInt === true) { + return value; + } + throw new Error(`${ common.decodeErrPrefix } integers outside of the safe integer range are not supported`); +} +function decodeUint8(data, pos, _minor, options) { + return new token.Token(token.Type.uint, readUint8(data, pos + 1, options), 2); +} +function decodeUint16(data, pos, _minor, options) { + return new token.Token(token.Type.uint, readUint16(data, pos + 1, options), 3); +} +function decodeUint32(data, pos, _minor, options) { + return new token.Token(token.Type.uint, readUint32(data, pos + 1, options), 5); +} +function decodeUint64(data, pos, _minor, options) { + return new token.Token(token.Type.uint, readUint64(data, pos + 1, options), 9); +} +function encodeUint(buf, token) { + return encodeUintValue(buf, 0, token.value); +} +function encodeUintValue(buf, major, uint) { + if (uint < uintBoundaries[0]) { + const nuint = Number(uint); + buf.push([major | nuint]); + } else if (uint < uintBoundaries[1]) { + const nuint = Number(uint); + buf.push([ + major | 24, + nuint + ]); + } else if (uint < uintBoundaries[2]) { + const nuint = Number(uint); + buf.push([ + major | 25, + nuint >>> 8, + nuint & 255 + ]); + } else if (uint < uintBoundaries[3]) { + const nuint = Number(uint); + buf.push([ + major | 26, + nuint >>> 24 & 255, + nuint >>> 16 & 255, + nuint >>> 8 & 255, + nuint & 255 + ]); + } else { + const buint = BigInt(uint); + if (buint < uintBoundaries[4]) { + const set = [ + major | 27, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ]; + let lo = Number(buint & BigInt(4294967295)); + let hi = Number(buint >> BigInt(32) & BigInt(4294967295)); + set[8] = lo & 255; + lo = lo >> 8; + set[7] = lo & 255; + lo = lo >> 8; + set[6] = lo & 255; + lo = lo >> 8; + set[5] = lo & 255; + set[4] = hi & 255; + hi = hi >> 8; + set[3] = hi & 255; + hi = hi >> 8; + set[2] = hi & 255; + hi = hi >> 8; + set[1] = hi & 255; + buf.push(set); + } else { + throw new Error(`${ common.decodeErrPrefix } encountered BigInt larger than allowable range`); + } + } } +encodeUint.encodedSize = function encodedSize(token) { + return encodeUintValue.encodedSize(token.value); +}; +encodeUintValue.encodedSize = function encodedSize(uint) { + if (uint < uintBoundaries[0]) { + return 1; + } + if (uint < uintBoundaries[1]) { + return 2; + } + if (uint < uintBoundaries[2]) { + return 3; + } + if (uint < uintBoundaries[3]) { + return 5; + } + return 9; +}; +encodeUint.compareTokens = function compareTokens(tok1, tok2) { + return tok1.value < tok2.value ? -1 : tok1.value > tok2.value ? 1 : 0; +}; -exports.createRemote = createRemote; +exports.decodeUint16 = decodeUint16; +exports.decodeUint32 = decodeUint32; +exports.decodeUint64 = decodeUint64; +exports.decodeUint8 = decodeUint8; +exports.encodeUint = encodeUint; +exports.encodeUintValue = encodeUintValue; +exports.readUint16 = readUint16; +exports.readUint32 = readUint32; +exports.readUint64 = readUint64; +exports.readUint8 = readUint8; +exports.uintBoundaries = uintBoundaries; /***/ }), -/***/ 94900: +/***/ 33709: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102434,29 +116555,70 @@ exports.createRemote = createRemote; Object.defineProperty(exports, "__esModule", ({ value: true })); -var utils = __nccwpck_require__(21292); +var token = __nccwpck_require__(90915); +var _0uint = __nccwpck_require__(80316); +var common = __nccwpck_require__(47907); -function createLs(client) { - async function* ls({timeout, signal, headers, ...query}) { - const response = await client.post('pin/remote/ls', { - timeout, - signal, - headers, - searchParams: utils.encodeQuery(query) - }); - for await (const pin of response.ndjson()) { - yield utils.decodePin(pin); +function decodeNegint8(data, pos, _minor, options) { + return new token.Token(token.Type.negint, -1 - _0uint.readUint8(data, pos + 1, options), 2); +} +function decodeNegint16(data, pos, _minor, options) { + return new token.Token(token.Type.negint, -1 - _0uint.readUint16(data, pos + 1, options), 3); +} +function decodeNegint32(data, pos, _minor, options) { + return new token.Token(token.Type.negint, -1 - _0uint.readUint32(data, pos + 1, options), 5); +} +const neg1b = BigInt(-1); +const pos1b = BigInt(1); +function decodeNegint64(data, pos, _minor, options) { + const int = _0uint.readUint64(data, pos + 1, options); + if (typeof int !== 'bigint') { + const value = -1 - int; + if (value >= Number.MIN_SAFE_INTEGER) { + return new token.Token(token.Type.negint, value, 9); } } - return ls; + if (options.allowBigInt !== true) { + throw new Error(`${ common.decodeErrPrefix } integers outside of the safe integer range are not supported`); + } + return new token.Token(token.Type.negint, neg1b - BigInt(int), 9); +} +function encodeNegint(buf, token) { + const negint = token.value; + const unsigned = typeof negint === 'bigint' ? negint * neg1b - pos1b : negint * -1 - 1; + _0uint.encodeUintValue(buf, token.type.majorEncoded, unsigned); } +encodeNegint.encodedSize = function encodedSize(token) { + const negint = token.value; + const unsigned = typeof negint === 'bigint' ? negint * neg1b - pos1b : negint * -1 - 1; + if (unsigned < _0uint.uintBoundaries[0]) { + return 1; + } + if (unsigned < _0uint.uintBoundaries[1]) { + return 2; + } + if (unsigned < _0uint.uintBoundaries[2]) { + return 3; + } + if (unsigned < _0uint.uintBoundaries[3]) { + return 5; + } + return 9; +}; +encodeNegint.compareTokens = function compareTokens(tok1, tok2) { + return tok1.value < tok2.value ? 1 : tok1.value > tok2.value ? -1 : 0; +}; -exports.createLs = createLs; +exports.decodeNegint16 = decodeNegint16; +exports.decodeNegint32 = decodeNegint32; +exports.decodeNegint64 = decodeNegint64; +exports.decodeNegint8 = decodeNegint8; +exports.encodeNegint = encodeNegint; /***/ }), -/***/ 79654: +/***/ 70195: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102464,29 +116626,69 @@ exports.createLs = createLs; Object.defineProperty(exports, "__esModule", ({ value: true })); -var utils = __nccwpck_require__(21292); +var token = __nccwpck_require__(90915); +var common = __nccwpck_require__(47907); +var _0uint = __nccwpck_require__(80316); +var byteUtils = __nccwpck_require__(46070); -function createRmAll(client) { - async function rmAll({timeout, signal, headers, ...query}) { - await client.post('pin/remote/rm', { - timeout, - signal, - headers, - searchParams: utils.encodeQuery({ - ...query, - all: true - }) - }); +function toToken(data, pos, prefix, length) { + common.assertEnoughData(data, pos, prefix + length); + const buf = byteUtils.slice(data, pos + prefix, pos + prefix + length); + return new token.Token(token.Type.bytes, buf, prefix + length); +} +function decodeBytesCompact(data, pos, minor, _options) { + return toToken(data, pos, 1, minor); +} +function decodeBytes8(data, pos, _minor, options) { + return toToken(data, pos, 2, _0uint.readUint8(data, pos + 1, options)); +} +function decodeBytes16(data, pos, _minor, options) { + return toToken(data, pos, 3, _0uint.readUint16(data, pos + 1, options)); +} +function decodeBytes32(data, pos, _minor, options) { + return toToken(data, pos, 5, _0uint.readUint32(data, pos + 1, options)); +} +function decodeBytes64(data, pos, _minor, options) { + const l = _0uint.readUint64(data, pos + 1, options); + if (typeof l === 'bigint') { + throw new Error(`${ common.decodeErrPrefix } 64-bit integer bytes lengths not supported`); } - return rmAll; + return toToken(data, pos, 9, l); +} +function tokenBytes(token$1) { + if (token$1.encodedBytes === undefined) { + token$1.encodedBytes = token$1.type === token.Type.string ? byteUtils.fromString(token$1.value) : token$1.value; + } + return token$1.encodedBytes; +} +function encodeBytes(buf, token) { + const bytes = tokenBytes(token); + _0uint.encodeUintValue(buf, token.type.majorEncoded, bytes.length); + buf.push(bytes); +} +encodeBytes.encodedSize = function encodedSize(token) { + const bytes = tokenBytes(token); + return _0uint.encodeUintValue.encodedSize(bytes.length) + bytes.length; +}; +encodeBytes.compareTokens = function compareTokens(tok1, tok2) { + return compareBytes(tokenBytes(tok1), tokenBytes(tok2)); +}; +function compareBytes(b1, b2) { + return b1.length < b2.length ? -1 : b1.length > b2.length ? 1 : byteUtils.compare(b1, b2); } -exports.createRmAll = createRmAll; +exports.compareBytes = compareBytes; +exports.decodeBytes16 = decodeBytes16; +exports.decodeBytes32 = decodeBytes32; +exports.decodeBytes64 = decodeBytes64; +exports.decodeBytes8 = decodeBytes8; +exports.decodeBytesCompact = decodeBytesCompact; +exports.encodeBytes = encodeBytes; /***/ }), -/***/ 51590: +/***/ 49081: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102494,29 +116696,49 @@ exports.createRmAll = createRmAll; Object.defineProperty(exports, "__esModule", ({ value: true })); -var utils = __nccwpck_require__(21292); +var token = __nccwpck_require__(90915); +var common = __nccwpck_require__(47907); +var _0uint = __nccwpck_require__(80316); +var _2bytes = __nccwpck_require__(70195); +var byteUtils = __nccwpck_require__(46070); -function createRm(client) { - async function rm({timeout, signal, headers, ...query}) { - await client.post('pin/remote/rm', { - timeout, - signal, - headers, - searchParams: utils.encodeQuery({ - ...query, - all: false - }) - }); +function toToken(data, pos, prefix, length) { + const totLength = prefix + length; + common.assertEnoughData(data, pos, totLength); + return new token.Token(token.Type.string, byteUtils.toString(data, pos + prefix, pos + totLength), totLength); +} +function decodeStringCompact(data, pos, minor, _options) { + return toToken(data, pos, 1, minor); +} +function decodeString8(data, pos, _minor, options) { + return toToken(data, pos, 2, _0uint.readUint8(data, pos + 1, options)); +} +function decodeString16(data, pos, _minor, options) { + return toToken(data, pos, 3, _0uint.readUint16(data, pos + 1, options)); +} +function decodeString32(data, pos, _minor, options) { + return toToken(data, pos, 5, _0uint.readUint32(data, pos + 1, options)); +} +function decodeString64(data, pos, _minor, options) { + const l = _0uint.readUint64(data, pos + 1, options); + if (typeof l === 'bigint') { + throw new Error(`${ common.decodeErrPrefix } 64-bit integer string lengths not supported`); } - return rm; + return toToken(data, pos, 9, l); } +const encodeString = _2bytes.encodeBytes; -exports.createRm = createRm; +exports.decodeString16 = decodeString16; +exports.decodeString32 = decodeString32; +exports.decodeString64 = decodeString64; +exports.decodeString8 = decodeString8; +exports.decodeStringCompact = decodeStringCompact; +exports.encodeString = encodeString; /***/ }), -/***/ 93865: +/***/ 22339: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102524,34 +116746,55 @@ exports.createRm = createRm; Object.defineProperty(exports, "__esModule", ({ value: true })); -var toUrlSearchParams = __nccwpck_require__(52836); -var utils = __nccwpck_require__(73125); +var token = __nccwpck_require__(90915); +var _0uint = __nccwpck_require__(80316); +var common = __nccwpck_require__(47907); -function createAdd(client) { - async function add(name, options) { - const {endpoint, key, headers, timeout, signal} = options; - await client.post('pin/remote/service/add', { - timeout, - signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: [ - name, - utils.encodeEndpoint(endpoint), - key - ] - }), - headers - }); +function toToken(_data, _pos, prefix, length) { + return new token.Token(token.Type.array, length, prefix); +} +function decodeArrayCompact(data, pos, minor, _options) { + return toToken(data, pos, 1, minor); +} +function decodeArray8(data, pos, _minor, options) { + return toToken(data, pos, 2, _0uint.readUint8(data, pos + 1, options)); +} +function decodeArray16(data, pos, _minor, options) { + return toToken(data, pos, 3, _0uint.readUint16(data, pos + 1, options)); +} +function decodeArray32(data, pos, _minor, options) { + return toToken(data, pos, 5, _0uint.readUint32(data, pos + 1, options)); +} +function decodeArray64(data, pos, _minor, options) { + const l = _0uint.readUint64(data, pos + 1, options); + if (typeof l === 'bigint') { + throw new Error(`${ common.decodeErrPrefix } 64-bit integer array lengths not supported`); } - return add; + return toToken(data, pos, 9, l); +} +function decodeArrayIndefinite(data, pos, _minor, options) { + if (options.allowIndefinite === false) { + throw new Error(`${ common.decodeErrPrefix } indefinite length items not allowed`); + } + return toToken(data, pos, 1, Infinity); } +function encodeArray(buf, token$1) { + _0uint.encodeUintValue(buf, token.Type.array.majorEncoded, token$1.value); +} +encodeArray.compareTokens = _0uint.encodeUint.compareTokens; -exports.createAdd = createAdd; +exports.decodeArray16 = decodeArray16; +exports.decodeArray32 = decodeArray32; +exports.decodeArray64 = decodeArray64; +exports.decodeArray8 = decodeArray8; +exports.decodeArrayCompact = decodeArrayCompact; +exports.decodeArrayIndefinite = decodeArrayIndefinite; +exports.encodeArray = encodeArray; /***/ }), -/***/ 94954: +/***/ 91440: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102559,26 +116802,55 @@ exports.createAdd = createAdd; Object.defineProperty(exports, "__esModule", ({ value: true })); -var core = __nccwpck_require__(66212); -var add = __nccwpck_require__(93865); -var ls = __nccwpck_require__(85974); -var rm = __nccwpck_require__(21021); +var token = __nccwpck_require__(90915); +var _0uint = __nccwpck_require__(80316); +var common = __nccwpck_require__(47907); -function createService(config) { - const client = new core.Client(config); - return { - add: add.createAdd(client), - ls: ls.createLs(client), - rm: rm.createRm(client) - }; +function toToken(_data, _pos, prefix, length) { + return new token.Token(token.Type.map, length, prefix); +} +function decodeMapCompact(data, pos, minor, _options) { + return toToken(data, pos, 1, minor); +} +function decodeMap8(data, pos, _minor, options) { + return toToken(data, pos, 2, _0uint.readUint8(data, pos + 1, options)); } +function decodeMap16(data, pos, _minor, options) { + return toToken(data, pos, 3, _0uint.readUint16(data, pos + 1, options)); +} +function decodeMap32(data, pos, _minor, options) { + return toToken(data, pos, 5, _0uint.readUint32(data, pos + 1, options)); +} +function decodeMap64(data, pos, _minor, options) { + const l = _0uint.readUint64(data, pos + 1, options); + if (typeof l === 'bigint') { + throw new Error(`${ common.decodeErrPrefix } 64-bit integer map lengths not supported`); + } + return toToken(data, pos, 9, l); +} +function decodeMapIndefinite(data, pos, _minor, options) { + if (options.allowIndefinite === false) { + throw new Error(`${ common.decodeErrPrefix } indefinite length items not allowed`); + } + return toToken(data, pos, 1, Infinity); +} +function encodeMap(buf, token$1) { + _0uint.encodeUintValue(buf, token.Type.map.majorEncoded, token$1.value); +} +encodeMap.compareTokens = _0uint.encodeUint.compareTokens; -exports.createService = createService; +exports.decodeMap16 = decodeMap16; +exports.decodeMap32 = decodeMap32; +exports.decodeMap64 = decodeMap64; +exports.decodeMap8 = decodeMap8; +exports.decodeMapCompact = decodeMapCompact; +exports.decodeMapIndefinite = decodeMapIndefinite; +exports.encodeMap = encodeMap; /***/ }), -/***/ 85974: +/***/ 97051: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102586,30 +116858,40 @@ exports.createService = createService; Object.defineProperty(exports, "__esModule", ({ value: true })); -var toUrlSearchParams = __nccwpck_require__(52836); -var utils = __nccwpck_require__(73125); +var token = __nccwpck_require__(90915); +var _0uint = __nccwpck_require__(80316); -function createLs(client) { - async function ls(options = {}) { - const {stat, headers, timeout, signal} = options; - const response = await client.post('pin/remote/service/ls', { - timeout, - signal, - headers, - searchParams: stat === true ? toUrlSearchParams.toUrlSearchParams({ stat }) : undefined - }); - const {RemoteServices} = await response.json(); - return RemoteServices.map(utils.decodeRemoteService); - } - return ls; +function decodeTagCompact(_data, _pos, minor, _options) { + return new token.Token(token.Type.tag, minor, 1); +} +function decodeTag8(data, pos, _minor, options) { + return new token.Token(token.Type.tag, _0uint.readUint8(data, pos + 1, options), 2); +} +function decodeTag16(data, pos, _minor, options) { + return new token.Token(token.Type.tag, _0uint.readUint16(data, pos + 1, options), 3); +} +function decodeTag32(data, pos, _minor, options) { + return new token.Token(token.Type.tag, _0uint.readUint32(data, pos + 1, options), 5); +} +function decodeTag64(data, pos, _minor, options) { + return new token.Token(token.Type.tag, _0uint.readUint64(data, pos + 1, options), 9); } +function encodeTag(buf, token$1) { + _0uint.encodeUintValue(buf, token.Type.tag.majorEncoded, token$1.value); +} +encodeTag.compareTokens = _0uint.encodeUint.compareTokens; -exports.createLs = createLs; +exports.decodeTag16 = decodeTag16; +exports.decodeTag32 = decodeTag32; +exports.decodeTag64 = decodeTag64; +exports.decodeTag8 = decodeTag8; +exports.decodeTagCompact = decodeTagCompact; +exports.encodeTag = encodeTag; /***/ }), -/***/ 21021: +/***/ 59213: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102617,77 +116899,196 @@ exports.createLs = createLs; Object.defineProperty(exports, "__esModule", ({ value: true })); -var toUrlSearchParams = __nccwpck_require__(52836); +var token = __nccwpck_require__(90915); +var common = __nccwpck_require__(47907); +var _0uint = __nccwpck_require__(80316); -function createRm(client) { - async function rm(name, options = {}) { - await client.post('pin/remote/service/rm', { - signal: options.signal, - headers: options.headers, - searchParams: toUrlSearchParams.toUrlSearchParams({ arg: name }) - }); +const MINOR_FALSE = 20; +const MINOR_TRUE = 21; +const MINOR_NULL = 22; +const MINOR_UNDEFINED = 23; +function decodeUndefined(_data, _pos, _minor, options) { + if (options.allowUndefined === false) { + throw new Error(`${ common.decodeErrPrefix } undefined values are not supported`); + } else if (options.coerceUndefinedToNull === true) { + return new token.Token(token.Type.null, null, 1); } - return rm; + return new token.Token(token.Type.undefined, undefined, 1); } - -exports.createRm = createRm; - - -/***/ }), - -/***/ 73125: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -function encodeEndpoint(url) { - const href = String(url); - if (href === 'undefined') { - throw Error('endpoint is required'); +function decodeBreak(_data, _pos, _minor, options) { + if (options.allowIndefinite === false) { + throw new Error(`${ common.decodeErrPrefix } indefinite length items not allowed`); } - return href[href.length - 1] === '/' ? href.slice(0, -1) : href; + return new token.Token(token.Type.break, undefined, 1); } -function decodeRemoteService(json) { - return { - service: json.Service, - endpoint: new URL(json.ApiEndpoint), - ...json.Stat && { stat: decodeStat(json.Stat) } - }; +function createToken(value, bytes, options) { + if (options) { + if (options.allowNaN === false && Number.isNaN(value)) { + throw new Error(`${ common.decodeErrPrefix } NaN values are not supported`); + } + if (options.allowInfinity === false && (value === Infinity || value === -Infinity)) { + throw new Error(`${ common.decodeErrPrefix } Infinity values are not supported`); + } + } + return new token.Token(token.Type.float, value, bytes); } -function decodeStat(json) { - switch (json.Status) { - case 'valid': { - const {Pinning, Pinned, Queued, Failed} = json.PinCount; - return { - status: 'valid', - pinCount: { - queued: Queued, - pinning: Pinning, - pinned: Pinned, - failed: Failed +function decodeFloat16(data, pos, _minor, options) { + return createToken(readFloat16(data, pos + 1), 3, options); +} +function decodeFloat32(data, pos, _minor, options) { + return createToken(readFloat32(data, pos + 1), 5, options); +} +function decodeFloat64(data, pos, _minor, options) { + return createToken(readFloat64(data, pos + 1), 9, options); +} +function encodeFloat(buf, token$1, options) { + const float = token$1.value; + if (float === false) { + buf.push([token.Type.float.majorEncoded | MINOR_FALSE]); + } else if (float === true) { + buf.push([token.Type.float.majorEncoded | MINOR_TRUE]); + } else if (float === null) { + buf.push([token.Type.float.majorEncoded | MINOR_NULL]); + } else if (float === undefined) { + buf.push([token.Type.float.majorEncoded | MINOR_UNDEFINED]); + } else { + let decoded; + let success = false; + if (!options || options.float64 !== true) { + encodeFloat16(float); + decoded = readFloat16(ui8a, 1); + if (float === decoded || Number.isNaN(float)) { + ui8a[0] = 249; + buf.push(ui8a.slice(0, 3)); + success = true; + } else { + encodeFloat32(float); + decoded = readFloat32(ui8a, 1); + if (float === decoded) { + ui8a[0] = 250; + buf.push(ui8a.slice(0, 5)); + success = true; } - }; + } } - case 'invalid': { - return { status: 'invalid' }; + if (!success) { + encodeFloat64(float); + decoded = readFloat64(ui8a, 1); + ui8a[0] = 251; + buf.push(ui8a.slice(0, 9)); } - default: { - return { status: json.Status }; + } +} +encodeFloat.encodedSize = function encodedSize(token, options) { + const float = token.value; + if (float === false || float === true || float === null || float === undefined) { + return 1; + } + let decoded; + if (!options || options.float64 !== true) { + encodeFloat16(float); + decoded = readFloat16(ui8a, 1); + if (float === decoded || Number.isNaN(float)) { + return 3; + } + encodeFloat32(float); + decoded = readFloat32(ui8a, 1); + if (float === decoded) { + return 5; + } + } + return 9; +}; +const buffer = new ArrayBuffer(9); +const dataView = new DataView(buffer, 1); +const ui8a = new Uint8Array(buffer, 0); +function encodeFloat16(inp) { + if (inp === Infinity) { + dataView.setUint16(0, 31744, false); + } else if (inp === -Infinity) { + dataView.setUint16(0, 64512, false); + } else if (Number.isNaN(inp)) { + dataView.setUint16(0, 32256, false); + } else { + dataView.setFloat32(0, inp); + const valu32 = dataView.getUint32(0); + const exponent = (valu32 & 2139095040) >> 23; + const mantissa = valu32 & 8388607; + if (exponent === 255) { + dataView.setUint16(0, 31744, false); + } else if (exponent === 0) { + dataView.setUint16(0, (inp & 2147483648) >> 16 | mantissa >> 13, false); + } else { + const logicalExponent = exponent - 127; + if (logicalExponent < -24) { + dataView.setUint16(0, 0); + } else if (logicalExponent < -14) { + dataView.setUint16(0, (valu32 & 2147483648) >> 16 | 1 << 24 + logicalExponent, false); + } else { + dataView.setUint16(0, (valu32 & 2147483648) >> 16 | logicalExponent + 15 << 10 | mantissa >> 13, false); + } } } } +function readFloat16(ui8a, pos) { + if (ui8a.length - pos < 2) { + throw new Error(`${ common.decodeErrPrefix } not enough data for float16`); + } + const half = (ui8a[pos] << 8) + ui8a[pos + 1]; + if (half === 31744) { + return Infinity; + } + if (half === 64512) { + return -Infinity; + } + if (half === 32256) { + return NaN; + } + const exp = half >> 10 & 31; + const mant = half & 1023; + let val; + if (exp === 0) { + val = mant * 2 ** -24; + } else if (exp !== 31) { + val = (mant + 1024) * 2 ** (exp - 25); + } else { + val = mant === 0 ? Infinity : NaN; + } + return half & 32768 ? -val : val; +} +function encodeFloat32(inp) { + dataView.setFloat32(0, inp, false); +} +function readFloat32(ui8a, pos) { + if (ui8a.length - pos < 4) { + throw new Error(`${ common.decodeErrPrefix } not enough data for float32`); + } + const offset = (ui8a.byteOffset || 0) + pos; + return new DataView(ui8a.buffer, offset, 4).getFloat32(0, false); +} +function encodeFloat64(inp) { + dataView.setFloat64(0, inp, false); +} +function readFloat64(ui8a, pos) { + if (ui8a.length - pos < 8) { + throw new Error(`${ common.decodeErrPrefix } not enough data for float64`); + } + const offset = (ui8a.byteOffset || 0) + pos; + return new DataView(ui8a.buffer, offset, 8).getFloat64(0, false); +} +encodeFloat.compareTokens = _0uint.encodeUint.compareTokens; -exports.decodeRemoteService = decodeRemoteService; -exports.decodeStat = decodeStat; -exports.encodeEndpoint = encodeEndpoint; +exports.decodeBreak = decodeBreak; +exports.decodeFloat16 = decodeFloat16; +exports.decodeFloat32 = decodeFloat32; +exports.decodeFloat64 = decodeFloat64; +exports.decodeUndefined = decodeUndefined; +exports.encodeFloat = encodeFloat; /***/ }), -/***/ 21292: +/***/ 31889: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -102695,321 +117096,365 @@ exports.encodeEndpoint = encodeEndpoint; Object.defineProperty(exports, "__esModule", ({ value: true })); -var cid = __nccwpck_require__(24247); -var toUrlSearchParams = __nccwpck_require__(52836); +var byteUtils = __nccwpck_require__(46070); -const decodePin = ({ - Name: name, - Status: status, - Cid: cid$1 -}) => { - return { - cid: cid.CID.parse(cid$1), - name, - status - }; -}; -const encodeService = service => { - if (typeof service === 'string' && service !== '') { - return service; - } else { - throw new TypeError('service name must be passed'); +const defaultChunkSize = 256; +class Bl { + constructor(chunkSize = defaultChunkSize) { + this.chunkSize = chunkSize; + this.cursor = 0; + this.maxCursor = -1; + this.chunks = []; + this._initReuseChunk = null; } -}; -const encodeCID = cid$1 => { - if (cid.CID.asCID(cid$1)) { - return cid$1.toString(); - } else { - throw new TypeError(`CID instance expected instead of ${ typeof cid$1 }`); + reset() { + this.chunks = []; + this.cursor = 0; + this.maxCursor = -1; + if (this._initReuseChunk !== null) { + this.chunks.push(this._initReuseChunk); + this.maxCursor = this._initReuseChunk.length - 1; + } } -}; -const encodeQuery = ({service, cid, name, status, all}) => { - const query = toUrlSearchParams.toUrlSearchParams({ - service: encodeService(service), - name, - force: all ? true : undefined - }); - if (cid) { - for (const value of cid) { - query.append('cid', encodeCID(value)); + push(bytes) { + let topChunk = this.chunks[this.chunks.length - 1]; + const newMax = this.cursor + bytes.length; + if (newMax <= this.maxCursor + 1) { + const chunkPos = topChunk.length - (this.maxCursor - this.cursor) - 1; + topChunk.set(bytes, chunkPos); + } else { + if (topChunk) { + const chunkPos = topChunk.length - (this.maxCursor - this.cursor) - 1; + if (chunkPos < topChunk.length) { + this.chunks[this.chunks.length - 1] = topChunk.subarray(0, chunkPos); + this.maxCursor = this.cursor - 1; + } + } + if (bytes.length < 64 && bytes.length < this.chunkSize) { + topChunk = byteUtils.alloc(this.chunkSize); + this.chunks.push(topChunk); + this.maxCursor += topChunk.length; + if (this._initReuseChunk === null) { + this._initReuseChunk = topChunk; + } + topChunk.set(bytes, 0); + } else { + this.chunks.push(bytes); + this.maxCursor += bytes.length; + } } + this.cursor += bytes.length; } - if (status) { - for (const value of status) { - query.append('status', value); + toBytes(reset = false) { + let byts; + if (this.chunks.length === 1) { + const chunk = this.chunks[0]; + if (reset && this.cursor > chunk.length / 2) { + byts = this.cursor === chunk.length ? chunk : chunk.subarray(0, this.cursor); + this._initReuseChunk = null; + this.chunks = []; + } else { + byts = byteUtils.slice(chunk, 0, this.cursor); + } + } else { + byts = byteUtils.concat(this.chunks, this.cursor); } - } - return query; -}; -const encodeAddParams = ({cid, service, background, name, origins}) => { - const params = toUrlSearchParams.toUrlSearchParams({ - arg: encodeCID(cid), - service: encodeService(service), - name, - background: background ? true : undefined - }); - if (origins) { - for (const origin of origins) { - params.append('origin', origin.toString()); + if (reset) { + this.reset(); } + return byts; } - return params; -}; +} -exports.decodePin = decodePin; -exports.encodeAddParams = encodeAddParams; -exports.encodeCID = encodeCID; -exports.encodeQuery = encodeQuery; -exports.encodeService = encodeService; +exports.Bl = Bl; /***/ }), -/***/ 56863: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 46070: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var normaliseInput = __nccwpck_require__(44956); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createRmAll = configure.configure(api => { - async function* rmAll(source, options = {}) { - for await (const {path, recursive} of normaliseInput.normaliseInput(source)) { - const searchParams = new URLSearchParams(options.searchParams); - searchParams.append('arg', `${ path }`); - if (recursive != null) - searchParams.set('recursive', String(recursive)); - const res = await api.post('pin/rm', { - signal: options.signal, - headers: options.headers, - searchParams: toUrlSearchParams.toUrlSearchParams({ - ...options, - arg: `${ path }`, - recursive - }) - }); - for await (const pin of res.ndjson()) { - if (pin.Pins) { - yield* pin.Pins.map(cid$1 => cid.CID.parse(cid$1)); +const useBuffer = globalThis.process && !globalThis.process.browser && globalThis.Buffer && typeof globalThis.Buffer.isBuffer === 'function'; +const textDecoder = new TextDecoder(); +const textEncoder = new TextEncoder(); +function isBuffer(buf) { + return useBuffer && globalThis.Buffer.isBuffer(buf); +} +function asU8A(buf) { + if (!(buf instanceof Uint8Array)) { + return Uint8Array.from(buf); + } + return isBuffer(buf) ? new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength) : buf; +} +const toString = useBuffer ? (bytes, start, end) => { + return end - start > 64 ? globalThis.Buffer.from(bytes.subarray(start, end)).toString('utf8') : utf8Slice(bytes, start, end); +} : (bytes, start, end) => { + return end - start > 64 ? textDecoder.decode(bytes.subarray(start, end)) : utf8Slice(bytes, start, end); +}; +const fromString = useBuffer ? string => { + return string.length > 64 ? globalThis.Buffer.from(string) : utf8ToBytes(string); +} : string => { + return string.length > 64 ? textEncoder.encode(string) : utf8ToBytes(string); +}; +const fromArray = arr => { + return Uint8Array.from(arr); +}; +const slice = useBuffer ? (bytes, start, end) => { + if (isBuffer(bytes)) { + return new Uint8Array(bytes.subarray(start, end)); + } + return bytes.slice(start, end); +} : (bytes, start, end) => { + return bytes.slice(start, end); +}; +const concat = useBuffer ? (chunks, length) => { + chunks = chunks.map(c => c instanceof Uint8Array ? c : globalThis.Buffer.from(c)); + return asU8A(globalThis.Buffer.concat(chunks, length)); +} : (chunks, length) => { + const out = new Uint8Array(length); + let off = 0; + for (let b of chunks) { + if (off + b.length > out.length) { + b = b.subarray(0, out.length - off); + } + out.set(b, off); + off += b.length; + } + return out; +}; +const alloc = useBuffer ? size => { + return globalThis.Buffer.allocUnsafe(size); +} : size => { + return new Uint8Array(size); +}; +const toHex = useBuffer ? d => { + if (typeof d === 'string') { + return d; + } + return globalThis.Buffer.from(toBytes(d)).toString('hex'); +} : d => { + if (typeof d === 'string') { + return d; + } + return Array.prototype.reduce.call(toBytes(d), (p, c) => `${ p }${ c.toString(16).padStart(2, '0') }`, ''); +}; +const fromHex = useBuffer ? hex => { + if (hex instanceof Uint8Array) { + return hex; + } + return globalThis.Buffer.from(hex, 'hex'); +} : hex => { + if (hex instanceof Uint8Array) { + return hex; + } + if (!hex.length) { + return new Uint8Array(0); + } + return new Uint8Array(hex.split('').map((c, i, d) => i % 2 === 0 ? `0x${ c }${ d[i + 1] }` : '').filter(Boolean).map(e => parseInt(e, 16))); +}; +function toBytes(obj) { + if (obj instanceof Uint8Array && obj.constructor.name === 'Uint8Array') { + return obj; + } + if (obj instanceof ArrayBuffer) { + return new Uint8Array(obj); + } + if (ArrayBuffer.isView(obj)) { + return new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength); + } + throw new Error('Unknown type, must be binary type'); +} +function compare(b1, b2) { + if (isBuffer(b1) && isBuffer(b2)) { + return b1.compare(b2); + } + for (let i = 0; i < b1.length; i++) { + if (b1[i] === b2[i]) { + continue; + } + return b1[i] < b2[i] ? -1 : 1; + } + return 0; +} +function utf8ToBytes(string, units = Infinity) { + let codePoint; + const length = string.length; + let leadSurrogate = null; + const bytes = []; + for (let i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i); + if (codePoint > 55295 && codePoint < 57344) { + if (!leadSurrogate) { + if (codePoint > 56319) { + if ((units -= 3) > -1) + bytes.push(239, 191, 189); + continue; + } else if (i + 1 === length) { + if ((units -= 3) > -1) + bytes.push(239, 191, 189); continue; } - yield cid.CID.parse(pin); + leadSurrogate = codePoint; + continue; + } + if (codePoint < 56320) { + if ((units -= 3) > -1) + bytes.push(239, 191, 189); + leadSurrogate = codePoint; + continue; } + codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536; + } else if (leadSurrogate) { + if ((units -= 3) > -1) + bytes.push(239, 191, 189); + } + leadSurrogate = null; + if (codePoint < 128) { + if ((units -= 1) < 0) + break; + bytes.push(codePoint); + } else if (codePoint < 2048) { + if ((units -= 2) < 0) + break; + bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128); + } else if (codePoint < 65536) { + if ((units -= 3) < 0) + break; + bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128); + } else if (codePoint < 1114112) { + if ((units -= 4) < 0) + break; + bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128); + } else { + throw new Error('Invalid code point'); } } - return rmAll; -}); - -exports.createRmAll = createRmAll; - - -/***/ }), - -/***/ 73805: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var rmAll = __nccwpck_require__(56863); -var last = __nccwpck_require__(28741); -var configure = __nccwpck_require__(31775); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var last__default = /*#__PURE__*/_interopDefaultLegacy(last); - -const createRm = config => { - const all = rmAll.createRmAll(config); - return configure.configure(() => { - async function rm(path, options = {}) { - return last__default["default"](all([{ - path, - ...options - }], options)); + return bytes; +} +function utf8Slice(buf, offset, end) { + const res = []; + while (offset < end) { + const firstByte = buf[offset]; + let codePoint = null; + let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1; + if (offset + bytesPerSequence <= end) { + let secondByte, thirdByte, fourthByte, tempCodePoint; + switch (bytesPerSequence) { + case 1: + if (firstByte < 128) { + codePoint = firstByte; + } + break; + case 2: + secondByte = buf[offset + 1]; + if ((secondByte & 192) === 128) { + tempCodePoint = (firstByte & 31) << 6 | secondByte & 63; + if (tempCodePoint > 127) { + codePoint = tempCodePoint; + } + } + break; + case 3: + secondByte = buf[offset + 1]; + thirdByte = buf[offset + 2]; + if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) { + tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63; + if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) { + codePoint = tempCodePoint; + } + } + break; + case 4: + secondByte = buf[offset + 1]; + thirdByte = buf[offset + 2]; + fourthByte = buf[offset + 3]; + if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) { + tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63; + if (tempCodePoint > 65535 && tempCodePoint < 1114112) { + codePoint = tempCodePoint; + } + } + } } - return rm; - })(config); -}; - -exports.createRm = createRm; - - -/***/ }), - -/***/ 25466: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createPing = configure.configure(api => { - async function* ping(peerId, options = {}) { - const res = await api.post('ping', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: `${ peerId }`, - ...options - }), - headers: options.headers, - transform: objectToCamel.objectToCamel - }); - yield* res.ndjson(); + if (codePoint === null) { + codePoint = 65533; + bytesPerSequence = 1; + } else if (codePoint > 65535) { + codePoint -= 65536; + res.push(codePoint >>> 10 & 1023 | 55296); + codePoint = 56320 | codePoint & 1023; + } + res.push(codePoint); + offset += bytesPerSequence; } - return ping; -}); - -exports.createPing = createPing; - - -/***/ }), - -/***/ 38248: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var ls = __nccwpck_require__(16114); -var peers = __nccwpck_require__(47504); -var publish = __nccwpck_require__(39969); -var subscribe = __nccwpck_require__(13073); -var unsubscribe = __nccwpck_require__(20939); -var subscriptionTracker = __nccwpck_require__(34690); - -function createPubsub(config) { - const subscriptionTracker$1 = new subscriptionTracker.SubscriptionTracker(); - return { - ls: ls.createLs(config), - peers: peers.createPeers(config), - publish: publish.createPublish(config), - subscribe: subscribe.createSubscribe(config, subscriptionTracker$1), - unsubscribe: unsubscribe.createUnsubscribe(config, subscriptionTracker$1) - }; + return decodeCodePointsArray(res); } - -exports.createPubsub = createPubsub; - - -/***/ }), - -/***/ 16114: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var httpRpcWireFormat = __nccwpck_require__(29208); - -const createLs = configure.configure(api => { - async function ls(options = {}) { - const {Strings} = await (await api.post('pubsub/ls', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - })).json(); - return httpRpcWireFormat.rpcArrayToTextArray(Strings) || []; +const MAX_ARGUMENTS_LENGTH = 4096; +function decodeCodePointsArray(codePoints) { + const len = codePoints.length; + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints); } - return ls; -}); - -exports.createLs = createLs; - - -/***/ }), - -/***/ 47504: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var httpRpcWireFormat = __nccwpck_require__(29208); - -const createPeers = configure.configure(api => { - async function peers(topic, options = {}) { - const res = await api.post('pubsub/peers', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: httpRpcWireFormat.textToUrlSafeRpc(topic), - ...options - }), - headers: options.headers - }); - const {Strings} = await res.json(); - return Strings || []; + let res = ''; + let i = 0; + while (i < len) { + res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); } - return peers; -}); + return res; +} -exports.createPeers = createPeers; +exports.alloc = alloc; +exports.asU8A = asU8A; +exports.compare = compare; +exports.concat = concat; +exports.decodeCodePointsArray = decodeCodePointsArray; +exports.fromArray = fromArray; +exports.fromHex = fromHex; +exports.fromString = fromString; +exports.slice = slice; +exports.toHex = toHex; +exports.toString = toString; +exports.useBuffer = useBuffer; /***/ }), -/***/ 39969: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 47907: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var multipartRequest = __nccwpck_require__(87527); -var abortSignal = __nccwpck_require__(14594); -var httpRpcWireFormat = __nccwpck_require__(29208); -var nativeAbortController = __nccwpck_require__(43586); - -const createPublish = configure.configure(api => { - async function publish(topic, data, options = {}) { - const searchParams = toUrlSearchParams.toUrlSearchParams({ - arg: httpRpcWireFormat.textToUrlSafeRpc(topic), - ...options - }); - const controller = new nativeAbortController.AbortController(); - const signal = abortSignal.abortSignal(controller.signal, options.signal); - const res = await api.post('pubsub/pub', { - signal, - searchParams, - ...await multipartRequest.multipartRequest([data], controller, options.headers) - }); - await res.text(); +const decodeErrPrefix = 'CBOR decode error:'; +const encodeErrPrefix = 'CBOR encode error:'; +const uintMinorPrefixBytes = []; +uintMinorPrefixBytes[23] = 1; +uintMinorPrefixBytes[24] = 2; +uintMinorPrefixBytes[25] = 3; +uintMinorPrefixBytes[26] = 5; +uintMinorPrefixBytes[27] = 9; +function assertEnoughData(data, pos, need) { + if (data.length - pos < need) { + throw new Error(`${ decodeErrPrefix } not enough data for type`); } - return publish; -}); +} -exports.createPublish = createPublish; +exports.assertEnoughData = assertEnoughData; +exports.decodeErrPrefix = decodeErrPrefix; +exports.encodeErrPrefix = encodeErrPrefix; +exports.uintMinorPrefixBytes = uintMinorPrefixBytes; /***/ }), -/***/ 13073: +/***/ 53216: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -103017,98 +117462,142 @@ exports.createPublish = createPublish; Object.defineProperty(exports, "__esModule", ({ value: true })); -var debug = __nccwpck_require__(58923); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var httpRpcWireFormat = __nccwpck_require__(29208); - -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - -var debug__default = /*#__PURE__*/_interopDefaultLegacy(debug); +var common = __nccwpck_require__(47907); +var token = __nccwpck_require__(90915); +var jump = __nccwpck_require__(60294); -const log = debug__default["default"]('ipfs-http-client:pubsub:subscribe'); -const createSubscribe = (options, subsTracker) => { - return configure.configure(api => { - async function subscribe(topic, handler, options = {}) { - options.signal = subsTracker.subscribe(topic, handler, options.signal); - let done; - let fail; - const result = new Promise((resolve, reject) => { - done = resolve; - fail = reject; - }); - const ffWorkaround = setTimeout(() => done(), 1000); - api.post('pubsub/sub', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: httpRpcWireFormat.textToUrlSafeRpc(topic), - ...options - }), - headers: options.headers - }).catch(err => { - subsTracker.unsubscribe(topic, handler); - fail(err); - }).then(response => { - clearTimeout(ffWorkaround); - if (!response) { - return; - } - readMessages(response, { - onMessage: handler, - onEnd: () => subsTracker.unsubscribe(topic, handler), - onError: options.onError - }); - done(); - }); - return result; - } - return subscribe; - })(options); +const defaultDecodeOptions = { + strict: false, + allowIndefinite: true, + allowUndefined: true, + allowBigInt: true }; -async function readMessages(response, {onMessage, onEnd, onError}) { - onError = onError || log; - try { - for await (const msg of response.ndjson()) { - try { - if (!msg.from) { - continue; - } - onMessage({ - from: msg.from, - data: httpRpcWireFormat.rpcToBytes(msg.data), - seqno: httpRpcWireFormat.rpcToBytes(msg.seqno), - topicIDs: httpRpcWireFormat.rpcArrayToTextArray(msg.topicIDs) - }); - } catch (err) { - err.message = `Failed to parse pubsub message: ${ err.message }`; - onError(err, false, msg); +class Tokeniser { + constructor(data, options = {}) { + this.pos = 0; + this.data = data; + this.options = options; + } + done() { + return this.pos >= this.data.length; + } + next() { + const byt = this.data[this.pos]; + let token = jump.quick[byt]; + if (token === undefined) { + const decoder = jump.jump[byt]; + if (!decoder) { + throw new Error(`${ common.decodeErrPrefix } no decoder for major type ${ byt >>> 5 } (byte 0x${ byt.toString(16).padStart(2, '0') })`); } + const minor = byt & 31; + token = decoder(this.data, this.pos, minor, this.options); } - } catch (err) { - if (!isAbortError(err)) { - onError(err, true); + this.pos += token.encodedLength; + return token; + } +} +const DONE = Symbol.for('DONE'); +const BREAK = Symbol.for('BREAK'); +function tokenToArray(token, tokeniser, options) { + const arr = []; + for (let i = 0; i < token.value; i++) { + const value = tokensToObject(tokeniser, options); + if (value === BREAK) { + if (token.value === Infinity) { + break; + } + throw new Error(`${ common.decodeErrPrefix } got unexpected break to lengthed array`); } - } finally { - onEnd(); + if (value === DONE) { + throw new Error(`${ common.decodeErrPrefix } found array but not enough entries (got ${ i }, expected ${ token.value })`); + } + arr[i] = value; } + return arr; } -const isAbortError = error => { - switch (error.type) { - case 'aborted': - return true; - case 'abort': - return true; - default: - return error.name === 'AbortError'; +function tokenToMap(token, tokeniser, options) { + const useMaps = options.useMaps === true; + const obj = useMaps ? undefined : {}; + const m = useMaps ? new Map() : undefined; + for (let i = 0; i < token.value; i++) { + const key = tokensToObject(tokeniser, options); + if (key === BREAK) { + if (token.value === Infinity) { + break; + } + throw new Error(`${ common.decodeErrPrefix } got unexpected break to lengthed map`); + } + if (key === DONE) { + throw new Error(`${ common.decodeErrPrefix } found map but not enough entries (got ${ i } [no key], expected ${ token.value })`); + } + if (useMaps !== true && typeof key !== 'string') { + throw new Error(`${ common.decodeErrPrefix } non-string keys not supported (got ${ typeof key })`); + } + const value = tokensToObject(tokeniser, options); + if (value === DONE) { + throw new Error(`${ common.decodeErrPrefix } found map but not enough entries (got ${ i } [no value], expected ${ token.value })`); + } + if (useMaps) { + m.set(key, value); + } else { + obj[key] = value; + } } -}; + return useMaps ? m : obj; +} +function tokensToObject(tokeniser, options) { + if (tokeniser.done()) { + return DONE; + } + const token$1 = tokeniser.next(); + if (token$1.type === token.Type.break) { + return BREAK; + } + if (token$1.type.terminal) { + return token$1.value; + } + if (token$1.type === token.Type.array) { + return tokenToArray(token$1, tokeniser, options); + } + if (token$1.type === token.Type.map) { + return tokenToMap(token$1, tokeniser, options); + } + if (token$1.type === token.Type.tag) { + if (options.tags && typeof options.tags[token$1.value] === 'function') { + const tagged = tokensToObject(tokeniser, options); + return options.tags[token$1.value](tagged); + } + throw new Error(`${ common.decodeErrPrefix } tag not supported (${ token$1.value })`); + } + throw new Error('unsupported'); +} +function decode(data, options) { + if (!(data instanceof Uint8Array)) { + throw new Error(`${ common.decodeErrPrefix } data to decode must be a Uint8Array`); + } + options = Object.assign({}, defaultDecodeOptions, options); + const tokeniser = options.tokenizer || new Tokeniser(data, options); + const decoded = tokensToObject(tokeniser, options); + if (decoded === DONE) { + throw new Error(`${ common.decodeErrPrefix } did not find any content to decode`); + } + if (decoded === BREAK) { + throw new Error(`${ common.decodeErrPrefix } got unexpected break`); + } + if (!tokeniser.done()) { + throw new Error(`${ common.decodeErrPrefix } too many terminals, data makes no sense`); + } + return decoded; +} -exports.createSubscribe = createSubscribe; +exports.Tokeniser = Tokeniser; +exports.decode = decode; +exports.tokensToObject = tokensToObject; /***/ }), -/***/ 34690: +/***/ 87446: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -103116,106 +117605,344 @@ exports.createSubscribe = createSubscribe; Object.defineProperty(exports, "__esModule", ({ value: true })); -var nativeAbortController = __nccwpck_require__(43586); +var is = __nccwpck_require__(30700); +var token = __nccwpck_require__(90915); +var bl = __nccwpck_require__(31889); +var common = __nccwpck_require__(47907); +var jump = __nccwpck_require__(60294); +var byteUtils = __nccwpck_require__(46070); +var _0uint = __nccwpck_require__(80316); +var _1negint = __nccwpck_require__(33709); +var _2bytes = __nccwpck_require__(70195); +var _3string = __nccwpck_require__(49081); +var _4array = __nccwpck_require__(22339); +var _5map = __nccwpck_require__(91440); +var _6tag = __nccwpck_require__(97051); +var _7float = __nccwpck_require__(59213); -class SubscriptionTracker { - constructor() { - this._subs = new Map(); +const defaultEncodeOptions = { + float64: false, + mapSorter, + quickEncodeToken: jump.quickEncodeToken +}; +const cborEncoders = []; +cborEncoders[token.Type.uint.major] = _0uint.encodeUint; +cborEncoders[token.Type.negint.major] = _1negint.encodeNegint; +cborEncoders[token.Type.bytes.major] = _2bytes.encodeBytes; +cborEncoders[token.Type.string.major] = _3string.encodeString; +cborEncoders[token.Type.array.major] = _4array.encodeArray; +cborEncoders[token.Type.map.major] = _5map.encodeMap; +cborEncoders[token.Type.tag.major] = _6tag.encodeTag; +cborEncoders[token.Type.float.major] = _7float.encodeFloat; +const buf = new bl.Bl(); +class Ref { + constructor(obj, parent) { + this.obj = obj; + this.parent = parent; } - subscribe(topic, handler, signal) { - const topicSubs = this._subs.get(topic) || []; - if (topicSubs.find(s => s.handler === handler)) { - throw new Error(`Already subscribed to ${ topic } with this handler`); - } - const controller = new nativeAbortController.AbortController(); - this._subs.set(topic, [{ - handler, - controller - }].concat(topicSubs)); - if (signal) { - signal.addEventListener('abort', () => this.unsubscribe(topic, handler)); + includes(obj) { + let p = this; + do { + if (p.obj === obj) { + return true; + } + } while (p = p.parent); + return false; + } + static createCheck(stack, obj) { + if (stack && stack.includes(obj)) { + throw new Error(`${ common.encodeErrPrefix } object contains circular references`); } - return controller.signal; + return new Ref(obj, stack); } - unsubscribe(topic, handler) { - const subs = this._subs.get(topic) || []; - let unsubs; - if (handler) { - this._subs.set(topic, subs.filter(s => s.handler !== handler)); - unsubs = subs.filter(s => s.handler === handler); +} +const simpleTokens = { + null: new token.Token(token.Type.null, null), + undefined: new token.Token(token.Type.undefined, undefined), + true: new token.Token(token.Type.true, true), + false: new token.Token(token.Type.false, false), + emptyArray: new token.Token(token.Type.array, 0), + emptyMap: new token.Token(token.Type.map, 0) +}; +const typeEncoders = { + number(obj, _typ, _options, _refStack) { + if (!Number.isInteger(obj) || !Number.isSafeInteger(obj)) { + return new token.Token(token.Type.float, obj); + } else if (obj >= 0) { + return new token.Token(token.Type.uint, obj); } else { - this._subs.set(topic, []); - unsubs = subs; + return new token.Token(token.Type.negint, obj); } - if (!(this._subs.get(topic) || []).length) { - this._subs.delete(topic); + }, + bigint(obj, _typ, _options, _refStack) { + if (obj >= BigInt(0)) { + return new token.Token(token.Type.uint, obj); + } else { + return new token.Token(token.Type.negint, obj); } - unsubs.forEach(s => s.controller.abort()); + }, + Uint8Array(obj, _typ, _options, _refStack) { + return new token.Token(token.Type.bytes, obj); + }, + string(obj, _typ, _options, _refStack) { + return new token.Token(token.Type.string, obj); + }, + boolean(obj, _typ, _options, _refStack) { + return obj ? simpleTokens.true : simpleTokens.false; + }, + null(_obj, _typ, _options, _refStack) { + return simpleTokens.null; + }, + undefined(_obj, _typ, _options, _refStack) { + return simpleTokens.undefined; + }, + ArrayBuffer(obj, _typ, _options, _refStack) { + return new token.Token(token.Type.bytes, new Uint8Array(obj)); + }, + DataView(obj, _typ, _options, _refStack) { + return new token.Token(token.Type.bytes, new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength)); + }, + Array(obj, _typ, options, refStack) { + if (!obj.length) { + if (options.addBreakTokens === true) { + return [ + simpleTokens.emptyArray, + new token.Token(token.Type.break) + ]; + } + return simpleTokens.emptyArray; + } + refStack = Ref.createCheck(refStack, obj); + const entries = []; + let i = 0; + for (const e of obj) { + entries[i++] = objectToTokens(e, options, refStack); + } + if (options.addBreakTokens) { + return [ + new token.Token(token.Type.array, obj.length), + entries, + new token.Token(token.Type.break) + ]; + } + return [ + new token.Token(token.Type.array, obj.length), + entries + ]; + }, + Object(obj, typ, options, refStack) { + const isMap = typ !== 'Object'; + const keys = isMap ? obj.keys() : Object.keys(obj); + const length = isMap ? obj.size : keys.length; + if (!length) { + if (options.addBreakTokens === true) { + return [ + simpleTokens.emptyMap, + new token.Token(token.Type.break) + ]; + } + return simpleTokens.emptyMap; + } + refStack = Ref.createCheck(refStack, obj); + const entries = []; + let i = 0; + for (const key of keys) { + entries[i++] = [ + objectToTokens(key, options, refStack), + objectToTokens(isMap ? obj.get(key) : obj[key], options, refStack) + ]; + } + sortMapEntries(entries, options); + if (options.addBreakTokens) { + return [ + new token.Token(token.Type.map, length), + entries, + new token.Token(token.Type.break) + ]; + } + return [ + new token.Token(token.Type.map, length), + entries + ]; } +}; +typeEncoders.Map = typeEncoders.Object; +typeEncoders.Buffer = typeEncoders.Uint8Array; +for (const typ of 'Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64'.split(' ')) { + typeEncoders[`${ typ }Array`] = typeEncoders.DataView; } - -exports.SubscriptionTracker = SubscriptionTracker; - - -/***/ }), - -/***/ 20939: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const createUnsubscribe = (options, subsTracker) => { - async function unsubscribe(topic, handler) { - subsTracker.unsubscribe(topic, handler); +function objectToTokens(obj, options = {}, refStack) { + const typ = is.is(obj); + const customTypeEncoder = options && options.typeEncoders && options.typeEncoders[typ] || typeEncoders[typ]; + if (typeof customTypeEncoder === 'function') { + const tokens = customTypeEncoder(obj, typ, options, refStack); + if (tokens != null) { + return tokens; + } } - return unsubscribe; -}; + const typeEncoder = typeEncoders[typ]; + if (!typeEncoder) { + throw new Error(`${ common.encodeErrPrefix } unsupported type: ${ typ }`); + } + return typeEncoder(obj, typ, options, refStack); +} +function sortMapEntries(entries, options) { + if (options.mapSorter) { + entries.sort(options.mapSorter); + } +} +function mapSorter(e1, e2) { + const keyToken1 = Array.isArray(e1[0]) ? e1[0][0] : e1[0]; + const keyToken2 = Array.isArray(e2[0]) ? e2[0][0] : e2[0]; + if (keyToken1.type !== keyToken2.type) { + return keyToken1.type.compare(keyToken2.type); + } + const major = keyToken1.type.major; + const tcmp = cborEncoders[major].compareTokens(keyToken1, keyToken2); + if (tcmp === 0) { + console.warn('WARNING: complex key types used, CBOR key sorting guarantees are gone'); + } + return tcmp; +} +function tokensToEncoded(buf, tokens, encoders, options) { + if (Array.isArray(tokens)) { + for (const token of tokens) { + tokensToEncoded(buf, token, encoders, options); + } + } else { + encoders[tokens.type.major](buf, tokens, options); + } +} +function encodeCustom(data, encoders, options) { + const tokens = objectToTokens(data, options); + if (!Array.isArray(tokens) && options.quickEncodeToken) { + const quickBytes = options.quickEncodeToken(tokens); + if (quickBytes) { + return quickBytes; + } + const encoder = encoders[tokens.type.major]; + if (encoder.encodedSize) { + const size = encoder.encodedSize(tokens, options); + const buf = new bl.Bl(size); + encoder(buf, tokens, options); + if (buf.chunks.length !== 1) { + throw new Error(`Unexpected error: pre-calculated length for ${ tokens } was wrong`); + } + return byteUtils.asU8A(buf.chunks[0]); + } + } + tokensToEncoded(buf, tokens, encoders, options); + return buf.toBytes(true); +} +function encode(data, options) { + options = Object.assign({}, defaultEncodeOptions, options); + return encodeCustom(data, cborEncoders, options); +} -exports.createUnsubscribe = createUnsubscribe; +exports.Ref = Ref; +exports.encode = encode; +exports.encodeCustom = encodeCustom; +exports.objectToTokens = objectToTokens; /***/ }), -/***/ 50782: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 30700: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var cid = __nccwpck_require__(24247); -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -var local = __nccwpck_require__(77565); - -const createRefs = configure.configure((api, opts) => { - const refs = async function* (args, options = {}) { - const argsArr = Array.isArray(args) ? args : [args]; - const res = await api.post('refs', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: argsArr.map(arg => `${ arg instanceof Uint8Array ? cid.CID.decode(arg) : arg }`), - ...options - }), - headers: options.headers, - transform: objectToCamel.objectToCamel - }); - yield* res.ndjson(); - }; - return Object.assign(refs, { local: local.createLocal(opts) }); -}); +const typeofs = [ + 'string', + 'number', + 'bigint', + 'symbol' +]; +const objectTypeNames = [ + 'Function', + 'Generator', + 'AsyncGenerator', + 'GeneratorFunction', + 'AsyncGeneratorFunction', + 'AsyncFunction', + 'Observable', + 'Array', + 'Buffer', + 'Object', + 'RegExp', + 'Date', + 'Error', + 'Map', + 'Set', + 'WeakMap', + 'WeakSet', + 'ArrayBuffer', + 'SharedArrayBuffer', + 'DataView', + 'Promise', + 'URL', + 'HTMLElement', + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +]; +function is(value) { + if (value === null) { + return 'null'; + } + if (value === undefined) { + return 'undefined'; + } + if (value === true || value === false) { + return 'boolean'; + } + const typeOf = typeof value; + if (typeofs.includes(typeOf)) { + return typeOf; + } + if (typeOf === 'function') { + return 'Function'; + } + if (Array.isArray(value)) { + return 'Array'; + } + if (isBuffer(value)) { + return 'Buffer'; + } + const objectType = getObjectType(value); + if (objectType) { + return objectType; + } + return 'Object'; +} +function isBuffer(value) { + return value && value.constructor && value.constructor.isBuffer && value.constructor.isBuffer.call(null, value); +} +function getObjectType(value) { + const objectTypeName = Object.prototype.toString.call(value).slice(8, -1); + if (objectTypeNames.includes(objectTypeName)) { + return objectTypeName; + } + return undefined; +} -exports.createRefs = createRefs; +exports.is = is; /***/ }), -/***/ 77565: +/***/ 42029: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -103223,29 +117950,421 @@ exports.createRefs = createRefs; Object.defineProperty(exports, "__esModule", ({ value: true })); -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +var decode$1 = __nccwpck_require__(53216); +var token = __nccwpck_require__(90915); +var byteUtils = __nccwpck_require__(46070); +var common = __nccwpck_require__(47907); -const createLocal = configure.configure(api => { - async function* refsLocal(options = {}) { - const res = await api.post('refs/local', { - signal: options.signal, - transform: objectToCamel.objectToCamel, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - yield* res.ndjson(); +class Tokenizer { + constructor(data, options = {}) { + this.pos = 0; + this.data = data; + this.options = options; + this.modeStack = ['value']; + this.lastToken = ''; } - return refsLocal; -}); + done() { + return this.pos >= this.data.length; + } + ch() { + return this.data[this.pos]; + } + currentMode() { + return this.modeStack[this.modeStack.length - 1]; + } + skipWhitespace() { + let c = this.ch(); + while (c === 32 || c === 9 || c === 13 || c === 10) { + c = this.data[++this.pos]; + } + } + expect(str) { + if (this.data.length - this.pos < str.length) { + throw new Error(`${ common.decodeErrPrefix } unexpected end of input at position ${ this.pos }`); + } + for (let i = 0; i < str.length; i++) { + if (this.data[this.pos++] !== str[i]) { + throw new Error(`${ common.decodeErrPrefix } unexpected token at position ${ this.pos }, expected to find '${ String.fromCharCode(...str) }'`); + } + } + } + parseNumber() { + const startPos = this.pos; + let negative = false; + let float = false; + const swallow = chars => { + while (!this.done()) { + const ch = this.ch(); + if (chars.includes(ch)) { + this.pos++; + } else { + break; + } + } + }; + if (this.ch() === 45) { + negative = true; + this.pos++; + } + if (this.ch() === 48) { + this.pos++; + if (this.ch() === 46) { + this.pos++; + float = true; + } else { + return new token.Token(token.Type.uint, 0, this.pos - startPos); + } + } + swallow([ + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57 + ]); + if (negative && this.pos === startPos + 1) { + throw new Error(`${ common.decodeErrPrefix } unexpected token at position ${ this.pos }`); + } + if (!this.done() && this.ch() === 46) { + if (float) { + throw new Error(`${ common.decodeErrPrefix } unexpected token at position ${ this.pos }`); + } + float = true; + this.pos++; + swallow([ + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57 + ]); + } + if (!this.done() && (this.ch() === 101 || this.ch() === 69)) { + float = true; + this.pos++; + if (!this.done() && (this.ch() === 43 || this.ch() === 45)) { + this.pos++; + } + swallow([ + 48, + 49, + 50, + 51, + 52, + 53, + 54, + 55, + 56, + 57 + ]); + } + const numStr = String.fromCharCode.apply(null, this.data.subarray(startPos, this.pos)); + const num = parseFloat(numStr); + if (float) { + return new token.Token(token.Type.float, num, this.pos - startPos); + } + if (this.options.allowBigInt !== true || Number.isSafeInteger(num)) { + return new token.Token(num >= 0 ? token.Type.uint : token.Type.negint, num, this.pos - startPos); + } + return new token.Token(num >= 0 ? token.Type.uint : token.Type.negint, BigInt(numStr), this.pos - startPos); + } + parseString() { + if (this.ch() !== 34) { + throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }; this shouldn't happen`); + } + this.pos++; + for (let i = this.pos, l = 0; i < this.data.length && l < 65536; i++, l++) { + const ch = this.data[i]; + if (ch === 92 || ch < 32 || ch >= 128) { + break; + } + if (ch === 34) { + const str = String.fromCharCode.apply(null, this.data.subarray(this.pos, i)); + this.pos = i + 1; + return new token.Token(token.Type.string, str, l); + } + } + const startPos = this.pos; + const chars = []; + const readu4 = () => { + if (this.pos + 4 >= this.data.length) { + throw new Error(`${ common.decodeErrPrefix } unexpected end of unicode escape sequence at position ${ this.pos }`); + } + let u4 = 0; + for (let i = 0; i < 4; i++) { + let ch = this.ch(); + if (ch >= 48 && ch <= 57) { + ch -= 48; + } else if (ch >= 97 && ch <= 102) { + ch = ch - 97 + 10; + } else if (ch >= 65 && ch <= 70) { + ch = ch - 65 + 10; + } else { + throw new Error(`${ common.decodeErrPrefix } unexpected unicode escape character at position ${ this.pos }`); + } + u4 = u4 * 16 + ch; + this.pos++; + } + return u4; + }; + const readUtf8Char = () => { + const firstByte = this.ch(); + let codePoint = null; + let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1; + if (this.pos + bytesPerSequence > this.data.length) { + throw new Error(`${ common.decodeErrPrefix } unexpected unicode sequence at position ${ this.pos }`); + } + let secondByte, thirdByte, fourthByte, tempCodePoint; + switch (bytesPerSequence) { + case 1: + if (firstByte < 128) { + codePoint = firstByte; + } + break; + case 2: + secondByte = this.data[this.pos + 1]; + if ((secondByte & 192) === 128) { + tempCodePoint = (firstByte & 31) << 6 | secondByte & 63; + if (tempCodePoint > 127) { + codePoint = tempCodePoint; + } + } + break; + case 3: + secondByte = this.data[this.pos + 1]; + thirdByte = this.data[this.pos + 2]; + if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) { + tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63; + if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) { + codePoint = tempCodePoint; + } + } + break; + case 4: + secondByte = this.data[this.pos + 1]; + thirdByte = this.data[this.pos + 2]; + fourthByte = this.data[this.pos + 3]; + if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) { + tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63; + if (tempCodePoint > 65535 && tempCodePoint < 1114112) { + codePoint = tempCodePoint; + } + } + } + if (codePoint === null) { + codePoint = 65533; + bytesPerSequence = 1; + } else if (codePoint > 65535) { + codePoint -= 65536; + chars.push(codePoint >>> 10 & 1023 | 55296); + codePoint = 56320 | codePoint & 1023; + } + chars.push(codePoint); + this.pos += bytesPerSequence; + }; + while (!this.done()) { + const ch = this.ch(); + let ch1; + switch (ch) { + case 92: + this.pos++; + if (this.done()) { + throw new Error(`${ common.decodeErrPrefix } unexpected string termination at position ${ this.pos }`); + } + ch1 = this.ch(); + this.pos++; + switch (ch1) { + case 34: + case 39: + case 92: + case 47: + chars.push(ch1); + break; + case 98: + chars.push(8); + break; + case 116: + chars.push(9); + break; + case 110: + chars.push(10); + break; + case 102: + chars.push(12); + break; + case 114: + chars.push(13); + break; + case 117: + chars.push(readu4()); + break; + default: + throw new Error(`${ common.decodeErrPrefix } unexpected string escape character at position ${ this.pos }`); + } + break; + case 34: + this.pos++; + return new token.Token(token.Type.string, byteUtils.decodeCodePointsArray(chars), this.pos - startPos); + default: + if (ch < 32) { + throw new Error(`${ common.decodeErrPrefix } invalid control character at position ${ this.pos }`); + } else if (ch < 128) { + chars.push(ch); + this.pos++; + } else { + readUtf8Char(); + } + } + } + throw new Error(`${ common.decodeErrPrefix } unexpected end of string at position ${ this.pos }`); + } + parseValue() { + switch (this.ch()) { + case 123: + this.modeStack.push('obj-start'); + this.pos++; + return new token.Token(token.Type.map, Infinity, 1); + case 91: + this.modeStack.push('array-start'); + this.pos++; + return new token.Token(token.Type.array, Infinity, 1); + case 34: { + return this.parseString(); + } + case 110: + this.expect([ + 110, + 117, + 108, + 108 + ]); + return new token.Token(token.Type.null, null, 4); + case 102: + this.expect([ + 102, + 97, + 108, + 115, + 101 + ]); + return new token.Token(token.Type.false, false, 5); + case 116: + this.expect([ + 116, + 114, + 117, + 101 + ]); + return new token.Token(token.Type.true, true, 4); + case 45: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return this.parseNumber(); + default: + throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }`); + } + } + next() { + this.skipWhitespace(); + switch (this.currentMode()) { + case 'value': + this.modeStack.pop(); + return this.parseValue(); + case 'array-value': { + this.modeStack.pop(); + if (this.ch() === 93) { + this.pos++; + this.skipWhitespace(); + return new token.Token(token.Type.break, undefined, 1); + } + if (this.ch() !== 44) { + throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }, was expecting array delimiter but found '${ String.fromCharCode(this.ch()) }'`); + } + this.pos++; + this.modeStack.push('array-value'); + this.skipWhitespace(); + return this.parseValue(); + } + case 'array-start': { + this.modeStack.pop(); + if (this.ch() === 93) { + this.pos++; + this.skipWhitespace(); + return new token.Token(token.Type.break, undefined, 1); + } + this.modeStack.push('array-value'); + this.skipWhitespace(); + return this.parseValue(); + } + case 'obj-key': + if (this.ch() === 125) { + this.modeStack.pop(); + this.pos++; + this.skipWhitespace(); + return new token.Token(token.Type.break, undefined, 1); + } + if (this.ch() !== 44) { + throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }, was expecting object delimiter but found '${ String.fromCharCode(this.ch()) }'`); + } + this.pos++; + this.skipWhitespace(); + case 'obj-start': { + this.modeStack.pop(); + if (this.ch() === 125) { + this.pos++; + this.skipWhitespace(); + return new token.Token(token.Type.break, undefined, 1); + } + const token$1 = this.parseString(); + this.skipWhitespace(); + if (this.ch() !== 58) { + throw new Error(`${ common.decodeErrPrefix } unexpected character at position ${ this.pos }, was expecting key/value delimiter ':' but found '${ String.fromCharCode(this.ch()) }'`); + } + this.pos++; + this.modeStack.push('obj-value'); + return token$1; + } + case 'obj-value': { + this.modeStack.pop(); + this.modeStack.push('obj-key'); + this.skipWhitespace(); + return this.parseValue(); + } + default: + throw new Error(`${ common.decodeErrPrefix } unexpected parse state at position ${ this.pos }; this shouldn't happen`); + } + } +} +function decode(data, options) { + options = Object.assign({ tokenizer: new Tokenizer(data, options) }, options); + return decode$1.decode(data, options); +} -exports.createLocal = createLocal; +exports.Tokenizer = Tokenizer; +exports.decode = decode; /***/ }), -/***/ 51417: +/***/ 65805: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -103253,34 +118372,168 @@ exports.createLocal = createLocal; Object.defineProperty(exports, "__esModule", ({ value: true })); -var cid = __nccwpck_require__(24247); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +var token = __nccwpck_require__(90915); +var encode$1 = __nccwpck_require__(87446); +var common = __nccwpck_require__(47907); +var byteUtils = __nccwpck_require__(46070); -const createGc = configure.configure(api => { - async function* gc(options = {}) { - const res = await api.post('repo/gc', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers, - transform: res => { - return { - err: res.Error ? new Error(res.Error) : null, - cid: (res.Key || {})['/'] ? cid.CID.parse(res.Key['/']) : null - }; +class JSONEncoder extends Array { + constructor() { + super(); + this.inRecursive = []; + } + prefix(buf) { + const recurs = this.inRecursive[this.inRecursive.length - 1]; + if (recurs) { + if (recurs.type === token.Type.array) { + recurs.elements++; + if (recurs.elements !== 1) { + buf.push([44]); + } + } + if (recurs.type === token.Type.map) { + recurs.elements++; + if (recurs.elements !== 1) { + if (recurs.elements % 2 === 1) { + buf.push([44]); + } else { + buf.push([58]); + } + } } + } + } + [token.Type.uint.major](buf, token) { + this.prefix(buf); + const is = String(token.value); + const isa = []; + for (let i = 0; i < is.length; i++) { + isa[i] = is.charCodeAt(i); + } + buf.push(isa); + } + [token.Type.negint.major](buf, token$1) { + this[token.Type.uint.major](buf, token$1); + } + [token.Type.bytes.major](_buf, _token) { + throw new Error(`${ common.encodeErrPrefix } unsupported type: Uint8Array`); + } + [token.Type.string.major](buf, token) { + this.prefix(buf); + const byts = byteUtils.fromString(JSON.stringify(token.value)); + buf.push(byts.length > 32 ? byteUtils.asU8A(byts) : byts); + } + [token.Type.array.major](buf, _token) { + this.prefix(buf); + this.inRecursive.push({ + type: token.Type.array, + elements: 0 }); - yield* res.ndjson(); + buf.push([91]); } - return gc; -}); + [token.Type.map.major](buf, _token) { + this.prefix(buf); + this.inRecursive.push({ + type: token.Type.map, + elements: 0 + }); + buf.push([123]); + } + [token.Type.tag.major](_buf, _token) { + } + [token.Type.float.major](buf, token$1) { + if (token$1.type.name === 'break') { + const recurs = this.inRecursive.pop(); + if (recurs) { + if (recurs.type === token.Type.array) { + buf.push([93]); + } else if (recurs.type === token.Type.map) { + buf.push([125]); + } else { + throw new Error('Unexpected recursive type; this should not happen!'); + } + return; + } + throw new Error('Unexpected break; this should not happen!'); + } + if (token$1.value === undefined) { + throw new Error(`${ common.encodeErrPrefix } unsupported type: undefined`); + } + this.prefix(buf); + if (token$1.type.name === 'true') { + buf.push([ + 116, + 114, + 117, + 101 + ]); + return; + } else if (token$1.type.name === 'false') { + buf.push([ + 102, + 97, + 108, + 115, + 101 + ]); + return; + } else if (token$1.type.name === 'null') { + buf.push([ + 110, + 117, + 108, + 108 + ]); + return; + } + const is = String(token$1.value); + const isa = []; + let dp = false; + for (let i = 0; i < is.length; i++) { + isa[i] = is.charCodeAt(i); + if (!dp && (isa[i] === 46 || isa[i] === 101 || isa[i] === 69)) { + dp = true; + } + } + if (!dp) { + isa.push(46); + isa.push(48); + } + buf.push(isa); + } +} +function mapSorter(e1, e2) { + if (Array.isArray(e1[0]) || Array.isArray(e2[0])) { + throw new Error(`${ common.encodeErrPrefix } complex map keys are not supported`); + } + const keyToken1 = e1[0]; + const keyToken2 = e2[0]; + if (keyToken1.type !== token.Type.string || keyToken2.type !== token.Type.string) { + throw new Error(`${ common.encodeErrPrefix } non-string map keys are not supported`); + } + if (keyToken1 < keyToken2) { + return -1; + } + if (keyToken1 > keyToken2) { + return 1; + } + throw new Error(`${ common.encodeErrPrefix } unexpected duplicate map keys, this is not supported`); +} +const defaultEncodeOptions = { + addBreakTokens: true, + mapSorter +}; +function encode(data, options) { + options = Object.assign({}, defaultEncodeOptions, options); + return encode$1.encodeCustom(data, new JSONEncoder(), options); +} -exports.createGc = createGc; +exports.encode = encode; /***/ }), -/***/ 65381: +/***/ 81342: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -103288,24 +118541,19 @@ exports.createGc = createGc; Object.defineProperty(exports, "__esModule", ({ value: true })); -var gc = __nccwpck_require__(51417); -var stat = __nccwpck_require__(48097); -var version = __nccwpck_require__(74956); +var encode = __nccwpck_require__(65805); +var decode = __nccwpck_require__(42029); -function createRepo(config) { - return { - gc: gc.createGc(config), - stat: stat.createStat(config), - version: version.createVersion(config) - }; -} -exports.createRepo = createRepo; + +exports.encode = encode.encode; +exports.Tokenizer = decode.Tokenizer; +exports.decode = decode.decode; /***/ }), -/***/ 48097: +/***/ 60294: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -103313,11748 +118561,110368 @@ exports.createRepo = createRepo; Object.defineProperty(exports, "__esModule", ({ value: true })); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +var token = __nccwpck_require__(90915); +var _0uint = __nccwpck_require__(80316); +var _1negint = __nccwpck_require__(33709); +var _2bytes = __nccwpck_require__(70195); +var _3string = __nccwpck_require__(49081); +var _4array = __nccwpck_require__(22339); +var _5map = __nccwpck_require__(91440); +var _6tag = __nccwpck_require__(97051); +var _7float = __nccwpck_require__(59213); +var common = __nccwpck_require__(47907); +var byteUtils = __nccwpck_require__(46070); -const createStat = configure.configure(api => { - async function stat(options = {}) { - const res = await api.post('repo/stat', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - const data = await res.json(); - return { - numObjects: BigInt(data.NumObjects), - repoSize: BigInt(data.RepoSize), - repoPath: data.RepoPath, - version: data.Version, - storageMax: BigInt(data.StorageMax) - }; +function invalidMinor(data, pos, minor) { + throw new Error(`${ common.decodeErrPrefix } encountered invalid minor (${ minor }) for major ${ data[pos] >>> 5 }`); +} +function errorer(msg) { + return () => { + throw new Error(`${ common.decodeErrPrefix } ${ msg }`); + }; +} +const jump = []; +for (let i = 0; i <= 23; i++) { + jump[i] = invalidMinor; +} +jump[24] = _0uint.decodeUint8; +jump[25] = _0uint.decodeUint16; +jump[26] = _0uint.decodeUint32; +jump[27] = _0uint.decodeUint64; +jump[28] = invalidMinor; +jump[29] = invalidMinor; +jump[30] = invalidMinor; +jump[31] = invalidMinor; +for (let i = 32; i <= 55; i++) { + jump[i] = invalidMinor; +} +jump[56] = _1negint.decodeNegint8; +jump[57] = _1negint.decodeNegint16; +jump[58] = _1negint.decodeNegint32; +jump[59] = _1negint.decodeNegint64; +jump[60] = invalidMinor; +jump[61] = invalidMinor; +jump[62] = invalidMinor; +jump[63] = invalidMinor; +for (let i = 64; i <= 87; i++) { + jump[i] = _2bytes.decodeBytesCompact; +} +jump[88] = _2bytes.decodeBytes8; +jump[89] = _2bytes.decodeBytes16; +jump[90] = _2bytes.decodeBytes32; +jump[91] = _2bytes.decodeBytes64; +jump[92] = invalidMinor; +jump[93] = invalidMinor; +jump[94] = invalidMinor; +jump[95] = errorer('indefinite length bytes/strings are not supported'); +for (let i = 96; i <= 119; i++) { + jump[i] = _3string.decodeStringCompact; +} +jump[120] = _3string.decodeString8; +jump[121] = _3string.decodeString16; +jump[122] = _3string.decodeString32; +jump[123] = _3string.decodeString64; +jump[124] = invalidMinor; +jump[125] = invalidMinor; +jump[126] = invalidMinor; +jump[127] = errorer('indefinite length bytes/strings are not supported'); +for (let i = 128; i <= 151; i++) { + jump[i] = _4array.decodeArrayCompact; +} +jump[152] = _4array.decodeArray8; +jump[153] = _4array.decodeArray16; +jump[154] = _4array.decodeArray32; +jump[155] = _4array.decodeArray64; +jump[156] = invalidMinor; +jump[157] = invalidMinor; +jump[158] = invalidMinor; +jump[159] = _4array.decodeArrayIndefinite; +for (let i = 160; i <= 183; i++) { + jump[i] = _5map.decodeMapCompact; +} +jump[184] = _5map.decodeMap8; +jump[185] = _5map.decodeMap16; +jump[186] = _5map.decodeMap32; +jump[187] = _5map.decodeMap64; +jump[188] = invalidMinor; +jump[189] = invalidMinor; +jump[190] = invalidMinor; +jump[191] = _5map.decodeMapIndefinite; +for (let i = 192; i <= 215; i++) { + jump[i] = _6tag.decodeTagCompact; +} +jump[216] = _6tag.decodeTag8; +jump[217] = _6tag.decodeTag16; +jump[218] = _6tag.decodeTag32; +jump[219] = _6tag.decodeTag64; +jump[220] = invalidMinor; +jump[221] = invalidMinor; +jump[222] = invalidMinor; +jump[223] = invalidMinor; +for (let i = 224; i <= 243; i++) { + jump[i] = errorer('simple values are not supported'); +} +jump[244] = invalidMinor; +jump[245] = invalidMinor; +jump[246] = invalidMinor; +jump[247] = _7float.decodeUndefined; +jump[248] = errorer('simple values are not supported'); +jump[249] = _7float.decodeFloat16; +jump[250] = _7float.decodeFloat32; +jump[251] = _7float.decodeFloat64; +jump[252] = invalidMinor; +jump[253] = invalidMinor; +jump[254] = invalidMinor; +jump[255] = _7float.decodeBreak; +const quick = []; +for (let i = 0; i < 24; i++) { + quick[i] = new token.Token(token.Type.uint, i, 1); +} +for (let i = -1; i >= -24; i--) { + quick[31 - i] = new token.Token(token.Type.negint, i, 1); +} +quick[64] = new token.Token(token.Type.bytes, new Uint8Array(0), 1); +quick[96] = new token.Token(token.Type.string, '', 1); +quick[128] = new token.Token(token.Type.array, 0, 1); +quick[160] = new token.Token(token.Type.map, 0, 1); +quick[244] = new token.Token(token.Type.false, false, 1); +quick[245] = new token.Token(token.Type.true, true, 1); +quick[246] = new token.Token(token.Type.null, null, 1); +function quickEncodeToken(token$1) { + switch (token$1.type) { + case token.Type.false: + return byteUtils.fromArray([244]); + case token.Type.true: + return byteUtils.fromArray([245]); + case token.Type.null: + return byteUtils.fromArray([246]); + case token.Type.bytes: + if (!token$1.value.length) { + return byteUtils.fromArray([64]); + } + return; + case token.Type.string: + if (token$1.value === '') { + return byteUtils.fromArray([96]); + } + return; + case token.Type.array: + if (token$1.value === 0) { + return byteUtils.fromArray([128]); + } + return; + case token.Type.map: + if (token$1.value === 0) { + return byteUtils.fromArray([160]); + } + return; + case token.Type.uint: + if (token$1.value < 24) { + return byteUtils.fromArray([Number(token$1.value)]); + } + return; + case token.Type.negint: + if (token$1.value >= -24) { + return byteUtils.fromArray([31 - Number(token$1.value)]); + } } - return stat; -}); +} -exports.createStat = createStat; +exports.jump = jump; +exports.quick = quick; +exports.quickEncodeToken = quickEncodeToken; /***/ }), -/***/ 74956: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 90915: +/***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createVersion = configure.configure(api => { - async function version(options = {}) { - const res = await (await api.post('repo/version', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - })).json(); - return res.Version; +class Type { + constructor(major, name, terminal) { + this.major = major; + this.majorEncoded = major << 5; + this.name = name; + this.terminal = terminal; } - return version; -}); + toString() { + return `Type[${ this.major }].${ this.name }`; + } + compare(typ) { + return this.major < typ.major ? -1 : this.major > typ.major ? 1 : 0; + } +} +Type.uint = new Type(0, 'uint', true); +Type.negint = new Type(1, 'negint', true); +Type.bytes = new Type(2, 'bytes', true); +Type.string = new Type(3, 'string', true); +Type.array = new Type(4, 'array', false); +Type.map = new Type(5, 'map', false); +Type.tag = new Type(6, 'tag', false); +Type.float = new Type(7, 'float', true); +Type.false = new Type(7, 'false', true); +Type.true = new Type(7, 'true', true); +Type.null = new Type(7, 'null', true); +Type.undefined = new Type(7, 'undefined', true); +Type.break = new Type(7, 'break', true); +class Token { + constructor(type, value, encodedLength) { + this.type = type; + this.value = value; + this.encodedLength = encodedLength; + this.encodedBytes = undefined; + } + toString() { + return `Token[${ this.type }].${ this.value }`; + } +} -exports.createVersion = createVersion; +exports.Token = Token; +exports.Type = Type; /***/ }), -/***/ 38587: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 86421: +/***/ ((module) => { "use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +function withIs(Class, { className, symbolName }) { + const symbol = Symbol.for(symbolName); -const createResolve = configure.configure(api => { - async function resolve(path, options = {}) { - const res = await api.post('resolve', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: path, - ...options - }), - headers: options.headers - }); - const {Path} = await res.json(); - return Path; - } - return resolve; -}); + const ClassIsWrapper = { + // The code below assigns the class wrapper to an object to trick + // JavaScript engines to show the name of the extended class when + // logging an instances. + // We are assigning an anonymous class (class wrapper) to the object + // with key `className` to keep the correct name. + // If this is not supported it falls back to logging `ClassIsWrapper`. + [className]: class extends Class { + constructor(...args) { + super(...args); + Object.defineProperty(this, symbol, { value: true }); + } -exports.createResolve = createResolve; + get [Symbol.toStringTag]() { + return className; + } + }, + }[className]; + ClassIsWrapper[`is${className}`] = (obj) => !!(obj && obj[symbol]); -/***/ }), + return ClassIsWrapper; +} -/***/ 86476: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function withIsProto(Class, { className, symbolName, withoutNew }) { + const symbol = Symbol.for(symbolName); -"use strict"; + /* eslint-disable object-shorthand */ + const ClassIsWrapper = { + [className]: function (...args) { + if (withoutNew && !(this instanceof ClassIsWrapper)) { + return new ClassIsWrapper(...args); + } + const _this = Class.call(this, ...args) || this; -Object.defineProperty(exports, "__esModule", ({ value: true })); + if (_this && !_this[symbol]) { + Object.defineProperty(_this, symbol, { value: true }); + } -var configure = __nccwpck_require__(31775); -var errCode = __nccwpck_require__(5822); + return _this; + }, + }[className]; + /* eslint-enable object-shorthand */ -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + ClassIsWrapper.prototype = Object.create(Class.prototype); + ClassIsWrapper.prototype.constructor = ClassIsWrapper; -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); - -const createStart = configure.configure(api => { - const start = async (options = {}) => { - throw errCode__default["default"](new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED'); - }; - return start; -}); - -exports.createStart = createStart; - - -/***/ }), - -/***/ 14486: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); - -const createBw = configure.configure(api => { - async function* bw(options = {}) { - const res = await api.post('stats/bw', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers, - transform: stats => ({ - totalIn: BigInt(stats.TotalIn), - totalOut: BigInt(stats.TotalOut), - rateIn: parseFloat(stats.RateIn), - rateOut: parseFloat(stats.RateOut) - }) + Object.defineProperty(ClassIsWrapper.prototype, Symbol.toStringTag, { + get() { + return className; + }, }); - yield* res.ndjson(); - } - return bw; -}); - -exports.createBw = createBw; - -/***/ }), - -/***/ 39825: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var stat = __nccwpck_require__(70104); -var stat$1 = __nccwpck_require__(48097); -var bw = __nccwpck_require__(14486); + ClassIsWrapper[`is${className}`] = (obj) => !!(obj && obj[symbol]); -function createStats(config) { - return { - bitswap: stat.createStat(config), - repo: stat$1.createStat(config), - bw: bw.createBw(config) - }; + return ClassIsWrapper; } -exports.createStats = createStats; +module.exports = withIs; +module.exports.proto = withIsProto; /***/ }), -/***/ 94121: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +<<<<<<< HEAD +/***/ 69715: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var util = __nccwpck_require__(73837); +var Stream = (__nccwpck_require__(12781).Stream); +var DelayedStream = __nccwpck_require__(96382); +module.exports = CombinedStream; +function CombinedStream() { + this.writable = false; + this.readable = true; + this.dataSize = 0; + this.maxDataSize = 2 * 1024 * 1024; + this.pauseStreams = true; -Object.defineProperty(exports, "__esModule", ({ value: true })); + this._released = false; + this._streams = []; + this._currentStream = null; + this._insideLoop = false; + this._pendingNext = false; +} +util.inherits(CombinedStream, Stream); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +CombinedStream.create = function(options) { + var combinedStream = new this(); -const createStop = configure.configure(api => { - async function stop(options = {}) { - const res = await api.post('shutdown', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - await res.text(); + options = options || {}; + for (var option in options) { + combinedStream[option] = options[option]; } - return stop; -}); - -exports.createStop = createStop; - -/***/ }), - -/***/ 34779: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + return combinedStream; +}; -"use strict"; +CombinedStream.isStreamLike = function(stream) { + return (typeof stream !== 'function') + && (typeof stream !== 'string') + && (typeof stream !== 'boolean') + && (typeof stream !== 'number') + && (!Buffer.isBuffer(stream)); +}; +CombinedStream.prototype.append = function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); -Object.defineProperty(exports, "__esModule", ({ value: true })); + if (isStreamLike) { + if (!(stream instanceof DelayedStream)) { + var newStream = DelayedStream.create(stream, { + maxDataSize: Infinity, + pauseStream: this.pauseStreams, + }); + stream.on('data', this._checkDataSize.bind(this)); + stream = newStream; + } -var multiaddr = __nccwpck_require__(78025); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + this._handleErrors(stream); -const createAddrs = configure.configure(api => { - async function addrs(options = {}) { - const res = await api.post('swarm/addrs', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - const {Addrs} = await res.json(); - return Object.keys(Addrs).map(id => ({ - id, - addrs: (Addrs[id] || []).map(a => new multiaddr.Multiaddr(a)) - })); + if (this.pauseStreams) { + stream.pause(); + } } - return addrs; -}); - -exports.createAddrs = createAddrs; - - -/***/ }), - -/***/ 45988: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + this._streams.push(stream); + return this; +}; -Object.defineProperty(exports, "__esModule", ({ value: true })); +CombinedStream.prototype.pipe = function(dest, options) { + Stream.prototype.pipe.call(this, dest, options); + this.resume(); + return dest; +}; -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +CombinedStream.prototype._getNext = function() { + this._currentStream = null; -const createConnect = configure.configure(api => { - async function connect(addr, options = {}) { - const res = await api.post('swarm/connect', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: addr, - ...options - }), - headers: options.headers - }); - const {Strings} = await res.json(); - return Strings || []; + if (this._insideLoop) { + this._pendingNext = true; + return; // defer call } - return connect; -}); - -exports.createConnect = createConnect; - - -/***/ }), - -/***/ 83865: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + this._insideLoop = true; + try { + do { + this._pendingNext = false; + this._realGetNext(); + } while (this._pendingNext); + } finally { + this._insideLoop = false; + } +}; -Object.defineProperty(exports, "__esModule", ({ value: true })); +CombinedStream.prototype._realGetNext = function() { + var stream = this._streams.shift(); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); -const createDisconnect = configure.configure(api => { - async function disconnect(addr, options = {}) { - const res = await api.post('swarm/disconnect', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams({ - arg: addr, - ...options - }), - headers: options.headers - }); - const {Strings} = await res.json(); - return Strings || []; + if (typeof stream == 'undefined') { + this.end(); + return; } - return disconnect; -}); - -exports.createDisconnect = createDisconnect; - -/***/ }), + if (typeof stream !== 'function') { + this._pipeNext(stream); + return; + } -/***/ 8697: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + var getStream = stream; + getStream(function(stream) { + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('data', this._checkDataSize.bind(this)); + this._handleErrors(stream); + } -"use strict"; + this._pipeNext(stream); + }.bind(this)); +}; +CombinedStream.prototype._pipeNext = function(stream) { + this._currentStream = stream; -Object.defineProperty(exports, "__esModule", ({ value: true })); + var isStreamLike = CombinedStream.isStreamLike(stream); + if (isStreamLike) { + stream.on('end', this._getNext.bind(this)); + stream.pipe(this, {end: false}); + return; + } -var addrs = __nccwpck_require__(34779); -var connect = __nccwpck_require__(45988); -var disconnect = __nccwpck_require__(83865); -var localAddrs = __nccwpck_require__(27815); -var peers = __nccwpck_require__(78953); + var value = stream; + this.write(value); + this._getNext(); +}; -function createSwarm(config) { - return { - addrs: addrs.createAddrs(config), - connect: connect.createConnect(config), - disconnect: disconnect.createDisconnect(config), - localAddrs: localAddrs.createLocalAddrs(config), - peers: peers.createPeers(config) - }; -} +CombinedStream.prototype._handleErrors = function(stream) { + var self = this; + stream.on('error', function(err) { + self._emitError(err); + }); +}; -exports.createSwarm = createSwarm; +CombinedStream.prototype.write = function(data) { + this.emit('data', data); +}; +CombinedStream.prototype.pause = function() { + if (!this.pauseStreams) { + return; + } -/***/ }), + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.pause) == 'function') this._currentStream.pause(); + this.emit('pause'); +}; -/***/ 27815: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +CombinedStream.prototype.resume = function() { + if (!this._released) { + this._released = true; + this.writable = true; + this._getNext(); + } -"use strict"; + if(this.pauseStreams && this._currentStream && typeof(this._currentStream.resume) == 'function') this._currentStream.resume(); + this.emit('resume'); +}; +CombinedStream.prototype.end = function() { + this._reset(); + this.emit('end'); +}; -Object.defineProperty(exports, "__esModule", ({ value: true })); +CombinedStream.prototype.destroy = function() { + this._reset(); + this.emit('close'); +}; -var multiaddr = __nccwpck_require__(78025); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +CombinedStream.prototype._reset = function() { + this.writable = false; + this._streams = []; + this._currentStream = null; +}; -const createLocalAddrs = configure.configure(api => { - async function localAddrs(options = {}) { - const res = await api.post('swarm/addrs/local', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - const {Strings} = await res.json(); - return (Strings || []).map(a => new multiaddr.Multiaddr(a)); +CombinedStream.prototype._checkDataSize = function() { + this._updateDataSize(); + if (this.dataSize <= this.maxDataSize) { + return; } - return localAddrs; -}); - -exports.createLocalAddrs = createLocalAddrs; - - -/***/ }), -/***/ 78953: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.'; + this._emitError(new Error(message)); +}; +CombinedStream.prototype._updateDataSize = function() { + this.dataSize = 0; -Object.defineProperty(exports, "__esModule", ({ value: true })); + var self = this; + this._streams.forEach(function(stream) { + if (!stream.dataSize) { + return; + } -var multiaddr = __nccwpck_require__(78025); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); + self.dataSize += stream.dataSize; + }); -const createPeers = configure.configure(api => { - async function peers(options = {}) { - const res = await api.post('swarm/peers', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - const {Peers} = await res.json(); - return (Peers || []).map(peer => { - return { - addr: new multiaddr.Multiaddr(peer.Addr), - peer: peer.Peer, - muxer: peer.Muxer, - latency: peer.Latency, - streams: peer.Streams, - direction: peer.Direction == null ? undefined : peer.Direction === 0 ? 'inbound' : 'outbound' - }; - }); + if (this._currentStream && this._currentStream.dataSize) { + this.dataSize += this._currentStream.dataSize; } - return peers; -}); +}; -exports.createPeers = createPeers; +CombinedStream.prototype._emitError = function(err) { + this._reset(); + this.emit('error', err); +}; /***/ }), -/***/ 93620: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -var objectToCamel = __nccwpck_require__(62268); -var configure = __nccwpck_require__(31775); -var toUrlSearchParams = __nccwpck_require__(52836); +/***/ 42054: +======= +/***/ 73132: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { -const createVersion = configure.configure(api => { - async function version(options = {}) { - const res = await api.post('version', { - signal: options.signal, - searchParams: toUrlSearchParams.toUrlSearchParams(options), - headers: options.headers - }); - return { - ...objectToCamel.objectToCamel(await res.json()), - 'ipfs-http-client': '1.0.0' - }; - } - return version; -}); +module.exports = function (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; +}; -exports.createVersion = createVersion; +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; /***/ }), -/***/ 38050: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +<<<<<<< HEAD +/***/ 77442: +======= +/***/ 43102: +/***/ ((module) => { "use strict"; - -const convert = __nccwpck_require__(74954) -const protocols = __nccwpck_require__(46015) -const varint = __nccwpck_require__(9280) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) - -// export codec -module.exports = { - stringToStringTuples, - stringTuplesToString, - - tuplesToStringTuples, - stringTuplesToTuples, - - bytesToTuples, - tuplesToBytes, - - bytesToString, - stringToBytes, - - fromString, - fromBytes, - validateBytes, - isValidBytes, - cleanPath, - - ParseError, - protoFromTuple, - - sizeForAddr -} - -// string -> [[str name, str addr]... ] /** - * @param {string} str + * Returns a `Buffer` instance from the given data URI `uri`. + * + * @param {String} uri Data URI to turn into a Buffer instance + * @return {Buffer} Buffer instance from Data URI + * @api public */ -function stringToStringTuples (str) { - const tuples = [] - const parts = str.split('/').slice(1) // skip first empty elem - if (parts.length === 1 && parts[0] === '') { - return [] - } - - for (let p = 0; p < parts.length; p++) { - const part = parts[p] - const proto = protocols(part) - - if (proto.size === 0) { - tuples.push([part]) - continue +function dataUriToBuffer(uri) { + if (!/^data:/i.test(uri)) { + throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")'); } - - p++ // advance addr part - if (p >= parts.length) { - throw ParseError('invalid address: ' + str) + // strip newlines + uri = uri.replace(/\r?\n/g, ''); + // split the URI up into the "metadata" and the "data" portions + const firstComma = uri.indexOf(','); + if (firstComma === -1 || firstComma <= 4) { + throw new TypeError('malformed data: URI'); } - - // if it's a path proto, take the rest - if (proto.path) { - tuples.push([ - part, - // TODO: should we need to check each path part to see if it's a proto? - // This would allow for other protocols to be added after a unix path, - // however it would have issues if the path had a protocol name in the path - cleanPath(parts.slice(p).join('/')) - ]) - break + // remove the "data:" scheme and parse the metadata + const meta = uri.substring(5, firstComma).split(';'); + let charset = ''; + let base64 = false; + const type = meta[0] || 'text/plain'; + let typeFull = type; + for (let i = 1; i < meta.length; i++) { + if (meta[i] === 'base64') { + base64 = true; + } + else { + typeFull += `;${meta[i]}`; + if (meta[i].indexOf('charset=') === 0) { + charset = meta[i].substring(8); + } + } + } + // defaults to US-ASCII only if type is not provided + if (!meta[0] && !charset.length) { + typeFull += ';charset=US-ASCII'; + charset = 'US-ASCII'; } + // get the encoded data portion and decode URI-encoded chars + const encoding = base64 ? 'base64' : 'ascii'; + const data = unescape(uri.substring(firstComma + 1)); + const buffer = Buffer.from(data, encoding); + // set `.type` and `.typeFull` properties to MIME type + buffer.type = type; + buffer.typeFull = typeFull; + // set the `.charset` property + buffer.charset = charset; + return buffer; +} +module.exports = dataUriToBuffer; +//# sourceMappingURL=index.js.map - tuples.push([part, parts[p]]) - } +/***/ }), - return tuples -} +/***/ 15524: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, exports, __nccwpck_require__) => { + +/* eslint-env browser */ -// [[str name, str addr]... ] -> string /** - * @param {[number, string?][]} tuples + * This is the web browser implementation of `debug()`. */ -function stringTuplesToString (tuples) { - /** @type {Array} */ - const parts = [] - tuples.map((tup) => { - const proto = protoFromTuple(tup) - parts.push(proto.name) - if (tup.length > 1) { - parts.push(tup[1]) - } - return null - }) - return cleanPath(parts.join('/')) -} +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.storage = localstorage(); +exports.destroy = (() => { + let warned = false; -// [[str name, str addr]... ] -> [[int code, Uint8Array]... ] -/** - * @param {Array} tuples - * @returns {[number , Uint8Array?][]} - */ -function stringTuplesToTuples (tuples) { - return tuples.map((tup) => { - if (!Array.isArray(tup)) { - tup = [tup] - } - const proto = protoFromTuple(tup) - if (tup.length > 1) { - return [proto.code, convert.toBytes(proto.code, tup[1])] - } - return [proto.code] - }) -} + return () => { + if (!warned) { + warned = true; + console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'); + } + }; +})(); /** - * Convert tuples to string tuples - * - * [[int code, Uint8Array]... ] -> [[int code, str addr]... ] - * - * @param {Array<[number, Uint8Array?]>} tuples - * @returns {Array<[number, string?]>} + * Colors. */ -function tuplesToStringTuples (tuples) { - return tuples.map(tup => { - const proto = protoFromTuple(tup) - if (tup[1]) { - return [proto.code, convert.toString(proto.code, tup[1])] - } - return [proto.code] - }) -} +exports.colors = [ + '#0000CC', + '#0000FF', + '#0033CC', + '#0033FF', + '#0066CC', + '#0066FF', + '#0099CC', + '#0099FF', + '#00CC00', + '#00CC33', + '#00CC66', + '#00CC99', + '#00CCCC', + '#00CCFF', + '#3300CC', + '#3300FF', + '#3333CC', + '#3333FF', + '#3366CC', + '#3366FF', + '#3399CC', + '#3399FF', + '#33CC00', + '#33CC33', + '#33CC66', + '#33CC99', + '#33CCCC', + '#33CCFF', + '#6600CC', + '#6600FF', + '#6633CC', + '#6633FF', + '#66CC00', + '#66CC33', + '#9900CC', + '#9900FF', + '#9933CC', + '#9933FF', + '#99CC00', + '#99CC33', + '#CC0000', + '#CC0033', + '#CC0066', + '#CC0099', + '#CC00CC', + '#CC00FF', + '#CC3300', + '#CC3333', + '#CC3366', + '#CC3399', + '#CC33CC', + '#CC33FF', + '#CC6600', + '#CC6633', + '#CC9900', + '#CC9933', + '#CCCC00', + '#CCCC33', + '#FF0000', + '#FF0033', + '#FF0066', + '#FF0099', + '#FF00CC', + '#FF00FF', + '#FF3300', + '#FF3333', + '#FF3366', + '#FF3399', + '#FF33CC', + '#FF33FF', + '#FF6600', + '#FF6633', + '#FF9900', + '#FF9933', + '#FFCC00', + '#FFCC33' +]; -// [[int code, Uint8Array ]... ] -> Uint8Array /** - * @param {[number, Uint8Array?][]} tuples + * Currently only WebKit-based Web Inspectors, Firefox >= v31, + * and the Firebug extension (any Firefox version) are known + * to support "%c" CSS customizations. + * + * TODO: add a `localStorage` variable to explicitly enable/disable colors */ -function tuplesToBytes (tuples) { - return fromBytes(uint8ArrayConcat(tuples.map((/** @type {any[]} */ tup) => { - const proto = protoFromTuple(tup) - let buf = Uint8Array.from(varint.encode(proto.code)) - if (tup.length > 1) { - buf = uint8ArrayConcat([buf, tup[1]]) // add address buffer - } +// eslint-disable-next-line complexity +function useColors() { + // NB: In an Electron preload script, document will be defined but not fully + // initialized. Since we know we're in Chrome, we'll just detect this case + // explicitly + if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) { + return true; + } - return buf - }))) -} + // Internet Explorer and Edge do not support colors. + if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + return false; + } -/** - * @param {import("./types").Protocol} p - * @param {Uint8Array | number[]} addr - */ -function sizeForAddr (p, addr) { - if (p.size > 0) { - return p.size / 8 - } else if (p.size === 0) { - return 0 - } else { - const size = varint.decode(addr) - return size + varint.decode.bytes - } + // Is webkit? http://stackoverflow.com/a/16459606/376773 + // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 + return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) || + // Is firebug? http://stackoverflow.com/a/398120/376773 + (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) || + // Is firefox >= v31? + // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) || + // Double check webkit in userAgent just in case we are in a worker + (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)); } /** + * Colorize log arguments if enabled. * - * @param {Uint8Array} buf - * @returns {Array<[number, Uint8Array?]>} + * @api public */ -function bytesToTuples (buf) { - /** @type {Array<[number, Uint8Array?]>} */ - const tuples = [] - let i = 0 - while (i < buf.length) { - const code = varint.decode(buf, i) - const n = varint.decode.bytes - - const p = protocols(code) - - const size = sizeForAddr(p, buf.slice(i + n)) - - if (size === 0) { - tuples.push([code]) - i += n - continue - } - const addr = buf.slice(i + n, i + n + size) +function formatArgs(args) { + args[0] = (this.useColors ? '%c' : '') + + this.namespace + + (this.useColors ? ' %c' : ' ') + + args[0] + + (this.useColors ? '%c ' : ' ') + + '+' + module.exports.humanize(this.diff); - i += (size + n) + if (!this.useColors) { + return; + } - if (i > buf.length) { // did not end _exactly_ at buffer.length - throw ParseError('Invalid address Uint8Array: ' + uint8ArrayToString(buf, 'base16')) - } + const c = 'color: ' + this.color; + args.splice(1, 0, c, 'color: inherit'); - // ok, tuple seems good. - tuples.push([code, addr]) - } + // The final "%c" is somewhat tricky, because there could be other + // arguments passed either before or after the %c, so we need to + // figure out the correct index to insert the CSS into + let index = 0; + let lastC = 0; + args[0].replace(/%[a-zA-Z%]/g, match => { + if (match === '%%') { + return; + } + index++; + if (match === '%c') { + // We only are interested in the *last* %c + // (the user may have provided their own) + lastC = index; + } + }); - return tuples + args.splice(lastC, 0, c); } -// Uint8Array -> String /** - * @param {Uint8Array} buf + * Invokes `console.debug()` when available. + * No-op when `console.debug` is not a "function". + * If `console.debug` is not available, falls back + * to `console.log`. + * + * @api public */ -function bytesToString (buf) { - const a = bytesToTuples(buf) - const b = tuplesToStringTuples(a) - return stringTuplesToString(b) -} +exports.log = console.debug || console.log || (() => {}); -// String -> Uint8Array /** - * @param {string} str + * Save `namespaces`. + * + * @param {String} namespaces + * @api private */ -function stringToBytes (str) { - str = cleanPath(str) - const a = stringToStringTuples(str) - const b = stringTuplesToTuples(a) - - return tuplesToBytes(b) +function save(namespaces) { + try { + if (namespaces) { + exports.storage.setItem('debug', namespaces); + } else { + exports.storage.removeItem('debug'); + } + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } } -// String -> Uint8Array /** - * @param {string} str + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private */ -function fromString (str) { - return stringToBytes(str) -} +function load() { + let r; + try { + r = exports.storage.getItem('debug'); + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } -// Uint8Array -> Uint8Array -/** - * @param {Uint8Array} buf - */ -function fromBytes (buf) { - const err = validateBytes(buf) - if (err) throw err - return Uint8Array.from(buf) // copy -} + // If debug isn't set in LS, and we're in Electron, try to load $DEBUG + if (!r && typeof process !== 'undefined' && 'env' in process) { + r = process.env.DEBUG; + } -/** - * @param {Uint8Array} buf - */ -function validateBytes (buf) { - try { - bytesToTuples(buf) // try to parse. will throw if breaks - } catch (err) { - return err - } + return r; } /** - * @param {Uint8Array} buf + * Localstorage attempts to return the localstorage. + * + * This is necessary because safari throws + * when a user disables cookies/localstorage + * and you attempt to access it. + * + * @return {LocalStorage} + * @api private */ -function isValidBytes (buf) { - return validateBytes(buf) === undefined -} -/** - * @param {string} str - */ -function cleanPath (str) { - return '/' + str.trim().split('/').filter((/** @type {any} */ a) => a).join('/') +function localstorage() { + try { + // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context + // The Browser also has localStorage in the global context. + return localStorage; + } catch (error) { + // Swallow + // XXX (@Qix-) should we be logging these? + } } -/** - * @param {string} str - */ -function ParseError (str) { - return new Error('Error parsing address: ' + str) -} +<<<<<<< HEAD +module.exports = __nccwpck_require__(63469)(exports); +======= +module.exports = __nccwpck_require__(46881)(exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const {formatters} = module.exports; /** - * @param {any[]} tup + * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ -function protoFromTuple (tup) { - const proto = protocols(tup[0]) - return proto -} + +formatters.j = function (v) { + try { + return JSON.stringify(v); + } catch (error) { + return '[UnexpectedJSONParseError]: ' + error.message; + } +}; /***/ }), -/***/ 74954: +<<<<<<< HEAD +/***/ 63469: +======= +/***/ 46881: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; - - -const ip = __nccwpck_require__(48239) -const protocols = __nccwpck_require__(46015) -const { CID } = __nccwpck_require__(24247) -const { base32 } = __nccwpck_require__(70784) -const { base58btc } = __nccwpck_require__(49108) -const Digest = __nccwpck_require__(81168) -const varint = __nccwpck_require__(9280) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) - -module.exports = Convert -// converts (serializes) addresses /** - * @param {string} proto - * @param {string | Uint8Array} a + * This is the common logic for both the Node.js and web browser + * implementations of `debug()`. */ -function Convert (proto, a) { - if (a instanceof Uint8Array) { - return Convert.toString(proto, a) - } else { - return Convert.toBytes(proto, a) - } -} -/** - * Convert [code,Uint8Array] to string - * - * @param {number|string} proto - * @param {Uint8Array} buf - * @returns {string} - */ -Convert.toString = function convertToString (proto, buf) { - const protocol = protocols(proto) - switch (protocol.code) { - case 4: // ipv4 - case 41: // ipv6 - return bytes2ip(buf) +function setup(env) { + createDebug.debug = createDebug; + createDebug.default = createDebug; + createDebug.coerce = coerce; + createDebug.disable = disable; + createDebug.enable = enable; + createDebug.enabled = enabled; +<<<<<<< HEAD + createDebug.humanize = __nccwpck_require__(20603); +======= + createDebug.humanize = __nccwpck_require__(3562); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + createDebug.destroy = destroy; - case 6: // tcp - case 273: // udp - case 33: // dccp - case 132: // sctp - return bytes2port(buf).toString() + Object.keys(env).forEach(key => { + createDebug[key] = env[key]; + }); - case 53: // dns - case 54: // dns4 - case 55: // dns6 - case 56: // dnsaddr - case 400: // unix - case 777: // memory - return bytes2str(buf) + /** + * The currently active debug mode names, and names to skip. + */ - case 421: // ipfs - return bytes2mh(buf) - case 444: // onion - return bytes2onion(buf) - case 445: // onion3 - return bytes2onion(buf) - default: - return uint8ArrayToString(buf, 'base16') // no clue. convert to hex - } -} + createDebug.names = []; + createDebug.skips = []; -Convert.toBytes = function convertToBytes (/** @type {string | number } */ proto, /** @type {string} */ str) { - const protocol = protocols(proto) - switch (protocol.code) { - case 4: // ipv4 - return ip2bytes(str) - case 41: // ipv6 - return ip2bytes(str) + /** + * Map of special "%n" handling functions, for the debug "format" argument. + * + * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N". + */ + createDebug.formatters = {}; - case 6: // tcp - case 273: // udp - case 33: // dccp - case 132: // sctp - return port2bytes(parseInt(str, 10)) + /** + * Selects a color for a debug namespace + * @param {String} namespace The namespace string for the debug instance to be colored + * @return {Number|String} An ANSI color code for the given namespace + * @api private + */ + function selectColor(namespace) { + let hash = 0; - case 53: // dns - case 54: // dns4 - case 55: // dns6 - case 56: // dnsaddr - case 400: // unix - case 777: // memory - return str2bytes(str) + for (let i = 0; i < namespace.length; i++) { + hash = ((hash << 5) - hash) + namespace.charCodeAt(i); + hash |= 0; // Convert to 32bit integer + } - case 421: // ipfs - return mh2bytes(str) - case 444: // onion - return onion2bytes(str) - case 445: // onion3 - return onion32bytes(str) - default: - return uint8ArrayFromString(str, 'base16') // no clue. convert from hex - } + return createDebug.colors[Math.abs(hash) % createDebug.colors.length]; + } + createDebug.selectColor = selectColor; + + /** + * Create a debugger with the given `namespace`. + * + * @param {String} namespace + * @return {Function} + * @api public + */ + function createDebug(namespace) { + let prevTime; + let enableOverride = null; + let namespacesCache; + let enabledCache; + + function debug(...args) { + // Disabled? + if (!debug.enabled) { + return; + } + + const self = debug; + + // Set `diff` timestamp + const curr = Number(new Date()); + const ms = curr - (prevTime || curr); + self.diff = ms; + self.prev = prevTime; + self.curr = curr; + prevTime = curr; + + args[0] = createDebug.coerce(args[0]); + + if (typeof args[0] !== 'string') { + // Anything else let's inspect with %O + args.unshift('%O'); + } + + // Apply any `formatters` transformations + let index = 0; + args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { + // If we encounter an escaped % then don't increase the array index + if (match === '%%') { + return '%'; + } + index++; + const formatter = createDebug.formatters[format]; + if (typeof formatter === 'function') { + const val = args[index]; + match = formatter.call(self, val); + + // Now we need to remove `args[index]` since it's inlined in the `format` + args.splice(index, 1); + index--; + } + return match; + }); + + // Apply env-specific formatting (colors, etc.) + createDebug.formatArgs.call(self, args); + + const logFn = self.log || createDebug.log; + logFn.apply(self, args); + } + + debug.namespace = namespace; + debug.useColors = createDebug.useColors(); + debug.color = createDebug.selectColor(namespace); + debug.extend = extend; + debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release. + + Object.defineProperty(debug, 'enabled', { + enumerable: true, + configurable: false, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, + set: v => { + enableOverride = v; + } + }); + + // Env-specific initialization logic for debug instances + if (typeof createDebug.init === 'function') { + createDebug.init(debug); + } + + return debug; + } + + function extend(namespace, delimiter) { + const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace); + newDebug.log = this.log; + return newDebug; + } + + /** + * Enables a debug mode by namespaces. This can include modes + * separated by a colon and wildcards. + * + * @param {String} namespaces + * @api public + */ + function enable(namespaces) { + createDebug.save(namespaces); + createDebug.namespaces = namespaces; + + createDebug.names = []; + createDebug.skips = []; + + let i; + const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/); + const len = split.length; + + for (i = 0; i < len; i++) { + if (!split[i]) { + // ignore empty strings + continue; + } + + namespaces = split[i].replace(/\*/g, '.*?'); + + if (namespaces[0] === '-') { + createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$')); + } else { + createDebug.names.push(new RegExp('^' + namespaces + '$')); + } + } + } + + /** + * Disable debug output. + * + * @return {String} namespaces + * @api public + */ + function disable() { + const namespaces = [ + ...createDebug.names.map(toNamespace), + ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace) + ].join(','); + createDebug.enable(''); + return namespaces; + } + + /** + * Returns true if the given mode name is enabled, false otherwise. + * + * @param {String} name + * @return {Boolean} + * @api public + */ + function enabled(name) { + if (name[name.length - 1] === '*') { + return true; + } + + let i; + let len; + + for (i = 0, len = createDebug.skips.length; i < len; i++) { + if (createDebug.skips[i].test(name)) { + return false; + } + } + + for (i = 0, len = createDebug.names.length; i < len; i++) { + if (createDebug.names[i].test(name)) { + return true; + } + } + + return false; + } + + /** + * Convert regexp to namespace + * + * @param {RegExp} regxep + * @return {String} namespace + * @api private + */ + function toNamespace(regexp) { + return regexp.toString() + .substring(2, regexp.toString().length - 2) + .replace(/\.\*\?$/, '*'); + } + + /** + * Coerce `val`. + * + * @param {Mixed} val + * @return {Mixed} + * @api private + */ + function coerce(val) { + if (val instanceof Error) { + return val.stack || val.message; + } + return val; + } + + /** + * XXX DO NOT USE. This is a temporary stub function. + * XXX It WILL be removed in the next major release. + */ + 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; + + +/***/ }), + +<<<<<<< HEAD +/***/ 80908: +======= +/***/ 58923: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** - * @param {string} ipString + * Detect Electron renderer / nwjs process, which is node, but we should + * treat as a browser. */ -function ip2bytes (ipString) { - if (!ip.isIP(ipString)) { - throw new Error('invalid ip address') - } - return ip.toBytes(ipString) + +if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) { +<<<<<<< HEAD + module.exports = __nccwpck_require__(77442); +} else { + module.exports = __nccwpck_require__(23258); +======= + module.exports = __nccwpck_require__(15524); +} else { + module.exports = __nccwpck_require__(21251); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 } + +/***/ }), + +<<<<<<< HEAD +/***/ 23258: +======= +/***/ 21251: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, exports, __nccwpck_require__) => { + /** - * @param {Uint8Array} ipBuff + * Module dependencies. */ -function bytes2ip (ipBuff) { - const ipString = ip.toString(ipBuff) - if (!ipString || !ip.isIP(ipString)) { - throw new Error('invalid ip address') - } - return ipString -} + +const tty = __nccwpck_require__(76224); +const util = __nccwpck_require__(73837); /** - * @param {number} port + * This is the Node.js implementation of `debug()`. */ -function port2bytes (port) { - const buf = new ArrayBuffer(2) - const view = new DataView(buf) - view.setUint16(0, port) - return new Uint8Array(buf) -} +exports.init = init; +exports.log = log; +exports.formatArgs = formatArgs; +exports.save = save; +exports.load = load; +exports.useColors = useColors; +exports.destroy = util.deprecate( + () => {}, + 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.' +); /** - * @param {Uint8Array} buf + * Colors. */ -function bytes2port (buf) { - const view = new DataView(buf.buffer) - return view.getUint16(buf.byteOffset) + +exports.colors = [6, 2, 3, 4, 5, 1]; + +try { + // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json) + // eslint-disable-next-line import/no-extraneous-dependencies +<<<<<<< HEAD + const supportsColor = __nccwpck_require__(4147); +======= + const supportsColor = __nccwpck_require__(76463); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { + exports.colors = [ + 20, + 21, + 26, + 27, + 32, + 33, + 38, + 39, + 40, + 41, + 42, + 43, + 44, + 45, + 56, + 57, + 62, + 63, + 68, + 69, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 92, + 93, + 98, + 99, + 112, + 113, + 128, + 129, + 134, + 135, + 148, + 149, + 160, + 161, + 162, + 163, + 164, + 165, + 166, + 167, + 168, + 169, + 170, + 171, + 172, + 173, + 178, + 179, + 184, + 185, + 196, + 197, + 198, + 199, + 200, + 201, + 202, + 203, + 204, + 205, + 206, + 207, + 208, + 209, + 214, + 215, + 220, + 221 + ]; + } +} catch (error) { + // Swallow - we only care if `supports-color` is available; it doesn't have to be. } /** - * @param {string} str + * Build up the default `inspectOpts` object from the environment variables. + * + * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js */ -function str2bytes (str) { - const buf = uint8ArrayFromString(str) - const size = Uint8Array.from(varint.encode(buf.length)) - return uint8ArrayConcat([size, buf], size.length + buf.length) + +exports.inspectOpts = Object.keys(process.env).filter(key => { + return /^debug_/i.test(key); +}).reduce((obj, key) => { + // Camel-case + const prop = key + .substring(6) + .toLowerCase() + .replace(/_([a-z])/g, (_, k) => { + return k.toUpperCase(); + }); + + // Coerce string value into JS value + let val = process.env[key]; + if (/^(yes|on|true|enabled)$/i.test(val)) { + val = true; + } else if (/^(no|off|false|disabled)$/i.test(val)) { + val = false; + } else if (val === 'null') { + val = null; + } else { + val = Number(val); + } + + obj[prop] = val; + return obj; +}, {}); + +/** + * Is stdout a TTY? Colored output is enabled when `true`. + */ + +function useColors() { + return 'colors' in exports.inspectOpts ? + Boolean(exports.inspectOpts.colors) : + tty.isatty(process.stderr.fd); } /** - * @param {Uint8Array} buf + * Adds ANSI color escape codes if enabled. + * + * @api public */ -function bytes2str (buf) { - const size = varint.decode(buf) - buf = buf.slice(varint.decode.bytes) - if (buf.length !== size) { - throw new Error('inconsistent lengths') - } +function formatArgs(args) { + const {namespace: name, useColors} = this; - return uint8ArrayToString(buf) + if (useColors) { + const c = this.color; + const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c); + 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) + '\u001B[0m'); + } else { + args[0] = getDate() + name + ' ' + args[0]; + } +} + +function getDate() { + if (exports.inspectOpts.hideDate) { + return ''; + } + return new Date().toISOString() + ' '; } /** - * @param {string} hash - base58btc string + * Invokes `util.format()` with the specified arguments and writes to stderr. */ -function mh2bytes (hash) { - let mh - if (hash[0] === 'Q' || hash[0] === '1') { - mh = Digest.decode(base58btc.decode(`z${hash}`)).bytes - } else { - mh = CID.parse(hash).multihash.bytes - } - - // the address is a varint prefixed multihash string representation - const size = Uint8Array.from(varint.encode(mh.length)) - return uint8ArrayConcat([size, mh], size.length + mh.length) +function log(...args) { + return process.stderr.write(util.format(...args) + '\n'); } /** - * Converts bytes to bas58btc string + * Save `namespaces`. * - * @param {Uint8Array} buf - * @returns {string} base58btc string + * @param {String} namespaces + * @api private */ -function bytes2mh (buf) { - const size = varint.decode(buf) - const address = buf.slice(varint.decode.bytes) +function save(namespaces) { + if (namespaces) { + process.env.DEBUG = namespaces; + } else { + // If you set a process.env field to null or undefined, it gets cast to the + // string 'null' or 'undefined'. Just delete instead. + delete process.env.DEBUG; + } +} - if (address.length !== size) { - throw new Error('inconsistent lengths') - } +/** + * Load `namespaces`. + * + * @return {String} returns the previously persisted debug modes + * @api private + */ - return uint8ArrayToString(address, 'base58btc') +function load() { + return process.env.DEBUG; } /** - * @param {string} str + * Init logic for `debug` instances. + * + * Create a new `inspectOpts` object in case `useColors` is set + * differently for a particular `debug` instance. */ -function onion2bytes (str) { - const addr = str.split(':') - if (addr.length !== 2) { - throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') - } - if (addr[0].length !== 16) { - throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion address.') - } - // onion addresses do not include the multibase prefix, add it before decoding - const buf = base32.decode('b' + addr[0]) +function init(debug) { + debug.inspectOpts = {}; - // onion port number - const port = parseInt(addr[1], 10) - if (port < 1 || port > 65536) { - throw new Error('Port number is not in range(1, 65536)') - } - const portBuf = port2bytes(port) - return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) + const keys = Object.keys(exports.inspectOpts); + for (let i = 0; i < keys.length; i++) { + debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; + } } +<<<<<<< HEAD +module.exports = __nccwpck_require__(63469)(exports); +======= +module.exports = __nccwpck_require__(46881)(exports); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const {formatters} = module.exports; + /** - * @param {string} str + * Map %o to `util.inspect()`, all on a single line. */ -function onion32bytes (str) { - const addr = str.split(':') - if (addr.length !== 2) { - throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') - } - if (addr[0].length !== 56) { - throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion3 address.') - } - // onion addresses do not include the multibase prefix, add it before decoding - const buf = base32.decode('b' + addr[0]) - // onion port number - const port = parseInt(addr[1], 10) - if (port < 1 || port > 65536) { - throw new Error('Port number is not in range(1, 65536)') - } - const portBuf = port2bytes(port) - return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) -} +formatters.o = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts) + .split('\n') + .map(str => str.trim()) + .join(' '); +}; /** - * @param {Uint8Array} buf + * Map %O to `util.inspect()`, allowing multiple lines if needed. */ -function bytes2onion (buf) { - const addrBytes = buf.slice(0, buf.length - 2) - const portBytes = buf.slice(buf.length - 2) - const addr = uint8ArrayToString(addrBytes, 'base32') - const port = bytes2port(portBytes) - return addr + ':' + port -} + +formatters.O = function (v) { + this.inspectOpts.colors = this.useColors; + return util.inspect(v, this.inspectOpts); +}; /***/ }), -/***/ 78025: +<<<<<<< HEAD +/***/ 96382: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +var Stream = (__nccwpck_require__(12781).Stream); +var util = __nccwpck_require__(73837); +module.exports = DelayedStream; +function DelayedStream() { + this.source = null; + this.dataSize = 0; + this.maxDataSize = 1024 * 1024; + this.pauseStream = true; -const codec = __nccwpck_require__(38050) -const protocols = __nccwpck_require__(46015) -const varint = __nccwpck_require__(9280) -const { CID } = __nccwpck_require__(24247) -const { base58btc } = __nccwpck_require__(49108) -const errCode = __nccwpck_require__(5822) -const inspect = Symbol.for('nodejs.util.inspect.custom') -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) + this._maxDataSizeExceeded = false; + this._released = false; + this._bufferedEvents = []; +} +util.inherits(DelayedStream, Stream); -/** - * @typedef {(addr: Multiaddr) => Promise} Resolver - * @typedef {string | Multiaddr | Uint8Array | null} MultiaddrInput - * @typedef {import('./types').MultiaddrObject} MultiaddrObject - * @typedef {import('./types').Protocol} Protocol - */ +DelayedStream.create = function(source, options) { + var delayedStream = new this(); -/** @type {Map} */ -const resolvers = new Map() -const symbol = Symbol.for('@multiformats/js-multiaddr/multiaddr') + options = options || {}; + for (var option in options) { + delayedStream[option] = options[option]; + } -/** - * Creates a [multiaddr](https://github.com/multiformats/multiaddr) from - * a Uint8Array, String or another Multiaddr instance - * public key. - * - */ -class Multiaddr { - /** - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * ``` - * - * @param {MultiaddrInput} [addr] - If String or Uint8Array, needs to adhere to the address format of a [multiaddr](https://github.com/multiformats/multiaddr#string-format) - */ - constructor (addr) { - // default - if (addr == null) { - addr = '' - } + delayedStream.source = source; - // Define symbol - Object.defineProperty(this, symbol, { value: true }) + var realEmit = source.emit; + source.emit = function() { + delayedStream._handleEmit(arguments); + return realEmit.apply(source, arguments); + }; - if (addr instanceof Uint8Array) { - /** @type {Uint8Array} - The raw bytes representing this multiaddress */ - this.bytes = codec.fromBytes(addr) - } else if (typeof addr === 'string') { - if (addr.length > 0 && addr.charAt(0) !== '/') { - throw new Error(`multiaddr "${addr}" must start with a "/"`) - } - this.bytes = codec.fromString(addr) - } else if (Multiaddr.isMultiaddr(addr)) { // Multiaddr - this.bytes = codec.fromBytes(addr.bytes) // validate + copy buffer - } else { - throw new Error('addr must be a string, Buffer, or another Multiaddr') - } + source.on('error', function() {}); + if (delayedStream.pauseStream) { + source.pause(); } - /** - * Returns Multiaddr as a String - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toString() - * // '/ip4/127.0.0.1/tcp/4001' - * ``` - */ - toString () { - return codec.bytesToString(this.bytes) - } + return delayedStream; +}; - /** - * Returns Multiaddr as a JSON encoded object - * - * @example - * ```js - * JSON.stringify(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) - * // '/ip4/127.0.0.1/tcp/4001' - * ``` - */ - toJSON () { - return this.toString() +Object.defineProperty(DelayedStream.prototype, 'readable', { + configurable: true, + enumerable: true, + get: function() { + return this.source.readable; } +}); - /** - * Returns Multiaddr as a convinient options object to be used with net.createConnection - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toOptions() - * // { family: 4, host: '127.0.0.1', transport: 'tcp', port: 4001 } - * ``` - */ - toOptions () { - /** @type {MultiaddrObject} */ - const opts = {} - const parsed = this.toString().split('/') - opts.family = parsed[1] === 'ip4' ? 4 : 6 - opts.host = parsed[2] - opts.transport = parsed[3] - opts.port = parseInt(parsed[4]) - return opts - } +DelayedStream.prototype.setEncoding = function() { + return this.source.setEncoding.apply(this.source, arguments); +}; - /** - * Returns the protocols the Multiaddr is defined with, as an array of objects, in - * left-to-right order. Each object contains the protocol code, protocol name, - * and the size of its address space in bits. - * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protos() - * // [ { code: 4, size: 32, name: 'ip4' }, - * // { code: 6, size: 16, name: 'tcp' } ] - * ``` - * - * @returns {Protocol[]} protocols - All the protocols the address is composed of - */ - protos () { - return this.protoCodes().map(code => Object.assign({}, protocols(code))) +DelayedStream.prototype.resume = function() { + if (!this._released) { + this.release(); } - /** - * Returns the codes of the protocols in left-to-right order. - * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) - * - * @example - * ```js - * Multiaddr('/ip4/127.0.0.1/tcp/4001').protoCodes() - * // [ 4, 6 ] - * ``` - * - * @returns {number[]} protocol codes - */ - protoCodes () { - const codes = [] - const buf = this.bytes - let i = 0 - while (i < buf.length) { - const code = varint.decode(buf, i) - const n = varint.decode.bytes + this.source.resume(); +}; - const p = protocols(code) - const size = codec.sizeForAddr(p, buf.slice(i + n)) +DelayedStream.prototype.pause = function() { + this.source.pause(); +}; - i += (size + n) - codes.push(code) - } +DelayedStream.prototype.release = function() { + this._released = true; - return codes - } + this._bufferedEvents.forEach(function(args) { + this.emit.apply(this, args); + }.bind(this)); + this._bufferedEvents = []; +}; - /** - * Returns the names of the protocols in left-to-right order. - * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protoNames() - * // [ 'ip4', 'tcp' ] - * ``` - * - * @returns {string[]} protocol names - */ - protoNames () { - return this.protos().map(proto => proto.name) - } +DelayedStream.prototype.pipe = function() { + var r = Stream.prototype.pipe.apply(this, arguments); + this.resume(); + return r; +}; - /** - * Returns a tuple of parts - * - * @example - * ```js - * new Multiaddr("/ip4/127.0.0.1/tcp/4001").tuples() - * // [ [ 4, ], [ 6, ] ] - * ``` - */ - tuples () { - return codec.bytesToTuples(this.bytes) +DelayedStream.prototype._handleEmit = function(args) { + if (this._released) { + this.emit.apply(this, args); + return; } - /** - * Returns a tuple of string/number parts - * - tuples[][0] = code of protocol - * - tuples[][1] = contents of address - * - * @example - * ```js - * new Multiaddr("/ip4/127.0.0.1/tcp/4001").stringTuples() - * // [ [ 4, '127.0.0.1' ], [ 6, '4001' ] ] - * ``` - */ - stringTuples () { - const t = codec.bytesToTuples(this.bytes) - return codec.tuplesToStringTuples(t) + if (args[0] === 'data') { + this.dataSize += args[1].length; + this._checkIfMaxDataSizeExceeded(); } - /** - * Encapsulates a Multiaddr in another Multiaddr - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') - * // - * - * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * - * const mh3 = mh1.encapsulate(mh2) - * // - * - * mh3.toString() - * // '/ip4/8.8.8.8/tcp/1080/ip4/127.0.0.1/tcp/4001' - * ``` - * - * @param {MultiaddrInput} addr - Multiaddr to add into this Multiaddr - */ - encapsulate (addr) { - addr = new Multiaddr(addr) - return new Multiaddr(this.toString() + addr.toString()) - } + this._bufferedEvents.push(args); +}; - /** - * Decapsulates a Multiaddr from another Multiaddr - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') - * // - * - * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * - * const mh3 = mh1.encapsulate(mh2) - * // - * - * mh3.decapsulate(mh2).toString() - * // '/ip4/8.8.8.8/tcp/1080' - * ``` - * - * @param {Multiaddr | string} addr - Multiaddr to remove from this Multiaddr - * @returns {Multiaddr} - */ - decapsulate (addr) { - const addrString = addr.toString() - const s = this.toString() - const i = s.lastIndexOf(addrString) - if (i < 0) { - throw new Error('Address ' + this + ' does not contain subaddress: ' + addr) - } - return new Multiaddr(s.slice(0, i)) +DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { + if (this._maxDataSizeExceeded) { + return; } - /** - * A more reliable version of `decapsulate` if you are targeting a - * specific code, such as 421 (the `p2p` protocol code). The last index of the code - * will be removed from the `Multiaddr`, and a new instance will be returned. - * If the code is not present, the original `Multiaddr` is returned. - * - * @example - * ```js - * const addr = new Multiaddr('/ip4/0.0.0.0/tcp/8080/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC') - * // - * - * addr.decapsulateCode(421).toString() - * // '/ip4/0.0.0.0/tcp/8080' - * - * new Multiaddr('/ip4/127.0.0.1/tcp/8080').decapsulateCode(421).toString() - * // '/ip4/127.0.0.1/tcp/8080' - * ``` - * - * @param {number} code - The code of the protocol to decapsulate from this Multiaddr - * @returns {Multiaddr} - */ - decapsulateCode (code) { - const tuples = this.tuples() - for (let i = tuples.length - 1; i >= 0; i--) { - if (tuples[i][0] === code) { - return new Multiaddr(codec.tuplesToBytes(tuples.slice(0, i))) - } - } - return this + if (this.dataSize <= this.maxDataSize) { + return; } - /** - * Extract the peerId if the multiaddr contains one - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/ipfs/QmValidBase58string') - * // - * - * // should return QmValidBase58string or null if the id is missing or invalid - * const peerId = mh1.getPeerId() - * ``` - * - * @returns {string | null} peerId - The id of the peer or null if invalid or missing from the ma - */ - getPeerId () { - try { - const tuples = this.stringTuples().filter((tuple) => { - if (tuple[0] === protocols.names.ipfs.code) { - return true - } - return false - }) + this._maxDataSizeExceeded = true; + var message = + 'DelayedStream#maxDataSize of ' + this.maxDataSize + ' bytes exceeded.' + this.emit('error', new Error(message)); +}; - // Get the last ipfs tuple ['ipfs', 'peerid string'] - const tuple = tuples.pop() - if (tuple && tuple[1]) { - const peerIdStr = tuple[1] - // peer id is base58btc encoded string but not multibase encoded so add the `z` - // prefix so we can validate that it is correctly encoded - if (peerIdStr[0] === 'Q' || peerIdStr[0] === '1') { - return uint8ArrayToString(base58btc.decode(`z${peerIdStr}`), 'base58btc') - } +/***/ }), - // try to parse peer id as CID - return uint8ArrayToString(CID.parse(peerIdStr).multihash.bytes, 'base58btc') - } +/***/ 40454: +======= +/***/ 17320: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { - return null - } catch (e) { - return null + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +class Deprecation extends Error { + constructor(message) { + super(message); // Maintains proper stack trace (only available on V8) + + /* istanbul ignore next */ + + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); } + + this.name = 'Deprecation'; } - /** - * Extract the path if the multiaddr contains one - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/unix/tmp/p2p.sock') - * // - * - * // should return utf8 string or null if the id is missing or invalid - * const path = mh1.getPath() - * ```js - * - * @returns {string | null} path - The path of the multiaddr, or null if no path protocol is present - */ - getPath () { - let path = null - try { - path = this.stringTuples().filter((tuple) => { - const proto = protocols(tuple[0]) - if (proto.path) { - return true - } - return false - })[0][1] +} - if (!path) { - path = null +exports.Deprecation = Deprecation; + + +/***/ }), + +<<<<<<< HEAD +/***/ 37647: +======= +/***/ 8281: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var url = __nccwpck_require__(57310); +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var zlib = __nccwpck_require__(59796); +var Stream = __nccwpck_require__(12781); +<<<<<<< HEAD +var encoding = __nccwpck_require__(1086); +======= +var encoding = __nccwpck_require__(73931); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); } - } catch (e) { - path = null - } - return path + }); } + n["default"] = e; + return Object.freeze(n); +} - /** - * Checks if two Multiaddrs are the same - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') - * // - * - * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * - * mh1.equals(mh1) - * // true - * - * mh1.equals(mh2) - * // false - * ``` - * - * @param {Multiaddr} addr - * @returns {boolean} - */ - equals (addr) { - return uint8ArrayEquals(this.bytes, addr.bytes) +var http__namespace = /*#__PURE__*/_interopNamespace(http); +var https__namespace = /*#__PURE__*/_interopNamespace(https); +var zlib__namespace = /*#__PURE__*/_interopNamespace(zlib); +var Stream__default = /*#__PURE__*/_interopDefaultLegacy(Stream); + +function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); +} + +function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + + return arr2; +} + +function _createForOfIteratorHelperLoose(o, allowArrayLike) { + var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; + if (it) return (it = it.call(o)).next.bind(it); + + if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { + if (it) o = it; + var i = 0; + return function () { + if (i >= o.length) return { + done: true + }; + return { + done: false, + value: o[i++] + }; + }; } - /** - * Resolve multiaddr if containing resolvable hostname. - * - * @example - * ```js - * Multiaddr.resolvers.set('dnsaddr', resolverFunction) - * const mh1 = new Multiaddr('/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb') - * const resolvedMultiaddrs = await mh1.resolve() - * // [ - * // , - * // , - * // - * // ] - * ``` - * - * @returns {Promise>} - */ - async resolve () { - const resolvableProto = this.protos().find((p) => p.resolvable) + throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); +} - // Multiaddr is not resolvable? - if (!resolvableProto) { - return [this] +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js +// (MIT licensed) +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); +const CLOSED = Symbol('closed'); +class Blob { + constructor() { + Object.defineProperty(this, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true + }); + this[CLOSED] = false; + this[TYPE] = ''; + const blobParts = arguments[0]; + const options = arguments[1]; + const buffers = []; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(new Uint8Array(element.buffer, element.byteOffset, element.byteLength)); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(new Uint8Array(element)); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + + buffers.push(buffer); + } } - const resolver = resolvers.get(resolvableProto.name) - if (!resolver) { - throw errCode(new Error(`no available resolver for ${resolvableProto.name}`), 'ERR_NO_AVAILABLE_RESOLVER') + this[BUFFER] = Buffer.concat(buffers); + const type = options && options.type !== undefined && String(options.type).toLowerCase(); + + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; } + } - const addresses = await resolver(this) - return addresses.map((a) => new Multiaddr(a)) + get size() { + return this[CLOSED] ? 0 : this[BUFFER].length; } - /** - * Gets a Multiaddrs node-friendly address object. Note that protocol information - * is left out: in Node (and most network systems) the protocol is unknowable - * given only the address. - * - * Has to be a ThinWaist Address, otherwise throws error - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').nodeAddress() - * // {family: 4, address: '127.0.0.1', port: 4001} - * ``` - * - * @returns {{family: 4 | 6, address: string, port: number}} - * @throws {Error} Throws error if Multiaddr is not a Thin Waist address - */ - nodeAddress () { - const codes = this.protoCodes() - const names = this.protoNames() - const parts = this.toString().split('/').slice(1) + get type() { + return this[TYPE]; + } - if (parts.length < 4) { - throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".') - } else if (codes[0] !== 4 && codes[0] !== 41 && codes[0] !== 54 && codes[0] !== 55) { - throw new Error(`no protocol with name: "'${names[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`) - } else if (parts[2] !== 'tcp' && parts[2] !== 'udp') { - throw new Error(`no protocol with name: "'${names[1]}'". Must have a valid transport protocol: "{tcp, udp}".`) + get isClosed() { + return this[CLOSED]; + } + + slice() { + const size = this.size; + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); } - return { - family: (codes[0] === 41 || codes[0] === 55) ? 6 : 4, - address: parts[1], - port: parseInt(parts[3]) // tcp or udp port + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); } + + const span = Math.max(relativeEnd - relativeStart, 0); + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { + type: arguments[2] + }); + blob[BUFFER] = slicedBuffer; + blob[CLOSED] = this[CLOSED]; + return blob; } - /** - * Returns if a Multiaddr is a Thin Waist address or not. - * - * Thin Waist is if a Multiaddr adheres to the standard combination of: - * - * `{IPv4, IPv6}/{TCP, UDP}` - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * const mh2 = new Multiaddr('/ip4/192.168.2.1/tcp/5001') - * // - * const mh3 = mh1.encapsulate(mh2) - * // - * const mh4 = new Multiaddr('/ip4/127.0.0.1/tcp/2000/wss/p2p-webrtc-star/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSooo2a') - * // - * mh1.isThinWaistAddress() - * // true - * mh2.isThinWaistAddress() - * // true - * mh3.isThinWaistAddress() - * // false - * mh4.isThinWaistAddress() - * // false - * ``` - * - * @param {Multiaddr} [addr] - Defaults to using `this` instance - */ - isThinWaistAddress (addr) { - const protos = (addr || this).protos() + close() { + this[CLOSED] = true; + } - if (protos.length !== 2) { - return false - } +} +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'BlobPrototype', + writable: false, + enumerable: false, + configurable: true +}); - if (protos[0].code !== 4 && protos[0].code !== 41) { - return false - } - if (protos[1].code !== 6 && protos[1].code !== 273) { - return false - } - return true +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param {string} message Error message for human + * @param {string} type Error type for machine + * @param {string} systemError For Node.js system error + * @return {FetchError} + */ +const netErrorMap = { + ERR_CONNECTION_REFUSED: 'ECONNREFUSED', + ERR_EMPTY_RESPONSE: 'ECONNRESET', + ERR_NAME_NOT_RESOLVED: 'ENOTFOUND', + ERR_CONTENT_DECODING_FAILED: 'Z_DATA_ERROR', + ERR_CONTENT_DECODING_INIT_FAILED: 'Z_DATA_ERROR' +}; +function FetchError(message, type, systemError) { + Error.call(this, message); + const regex = /^.*net::(.*)/; + + if (regex.test(message)) { + let errorCode = regex.exec(message)[1]; // istanbul ignore else + + if (Object.prototype.hasOwnProperty.call(netErrorMap, errorCode)) errorCode = netErrorMap[errorCode]; + systemError = { + code: errorCode + }; + } + + this.message = message; + this.type = type; // when err.type is `system`, err.code contains system error code + + if (systemError) { + this.code = this.errno = systemError.code; + } // hide custom error implementation details from end-users + + + Error.captureStackTrace(this, this.constructor); +} +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +const DISTURBED = Symbol('disturbed'); +/** + * Body class + * + * Cannot use ES6 class because Body must be called with .call(). + * + * @param {Stream|string|Blob|Buffer|null} body Readable stream + * @param {number} size + * @param {number} timeout + */ + +function Body(body, { + size = 0, + timeout = 0 +} = {}) { + if (body == null) { + // body is undefined or null + body = null; + } else if (typeof body === 'string') ; else if (body instanceof Blob) ; else if (Buffer.isBuffer(body)) ; else if (body instanceof Stream__default["default"]) ; else { + // none of the above + // coerce to string + body = String(body); } + this.body = body; + this[DISTURBED] = false; + this.size = size; + this.timeout = timeout; +} +Body.prototype = { + get bodyUsed() { + return this[DISTURBED]; + }, + /** - * Creates a Multiaddr from a node-friendly address object - * - * @example - * ```js - * Multiaddr.fromNodeAddress({address: '127.0.0.1', port: '4001'}, 'tcp') - * // - * ``` + * Decode response as ArrayBuffer * - * @param {{family: 4 | 6, address: string, port: number}} addr - * @param {string} transport + * @return {Promise} */ - static fromNodeAddress (addr, transport) { - if (!addr) { throw new Error('requires node address object') } - if (!transport) { throw new Error('requires transport protocol') } - let ip - switch (addr.family) { - case 4: - ip = 'ip4' - break - case 6: - ip = 'ip6' - break - default: - throw Error(`Invalid addr family. Got '${addr.family}' instead of 4 or 6`) - } - return new Multiaddr('/' + [ip, addr.address, transport, addr.port].join('/')) - } + arrayBuffer() { + return consumeBody.call(this).then(buf => buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength)); + }, /** - * Returns if something is a Multiaddr that is a name + * Return raw response as Blob * - * @param {Multiaddr} addr - * @returns {boolean} isName + * @return {Promise} */ - static isName (addr) { - if (!Multiaddr.isMultiaddr(addr)) { - return false - } - - // if a part of the multiaddr is resolvable, then return true - return addr.protos().some((proto) => proto.resolvable) - } + blob() { + const ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(buf => Object.assign( // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + })); + }, /** - * Check if object is a CID instance + * Decode response as json * - * @param {any} value - * @returns {value is Multiaddr} + * @return {Promise} */ - static isMultiaddr (value) { - return value instanceof Multiaddr || Boolean(value && value[symbol]) - } + json() { + return consumeBody.call(this).then(buffer => JSON.parse(buffer.toString())); + }, /** - * Returns Multiaddr as a human-readable string. - * For post Node.js v10.0.0. - * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect - * - * @example - * ```js - * console.log(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) - * // '' - * ``` + * Decode response as text * - * @returns {string} + * @return {Promise} */ - [inspect] () { - return '' - } + text() { + return consumeBody.call(this).then(buffer => buffer.toString()); + }, /** - * Returns Multiaddr as a human-readable string. - * Fallback for pre Node.js v10.0.0. - * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect + * Decode response as buffer (non-spec api) * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').inspect() - * // '' - * ``` + * @return {Promise} + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) * - * @returns {string} + * @return {Promise} */ - inspect () { - return '' + textConverted() { + return consumeBody.call(this).then(buffer => convertBody(buffer, this.headers)); } -} -/** - * Object containing table, names and codes of all supported protocols. - * To get the protocol values from a Multiaddr, you can use - * [`.protos()`](#multiaddrprotos), - * [`.protoCodes()`](#multiaddrprotocodes) or - * [`.protoNames()`](#multiaddrprotonames) - * - * @returns {{table: Array, names: Object, codes: Object}} - */ -Multiaddr.protocols = protocols +}; -Multiaddr.resolvers = resolvers +Body.mixIn = function (proto) { + for (var _iterator = _createForOfIteratorHelperLoose(Object.getOwnPropertyNames(Body.prototype)), _step; !(_step = _iterator()).done;) { + const name = _step.value; + // istanbul ignore else + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; /** - * Static factory + * Decode buffers into utf-8 string * - * @param {MultiaddrInput} addr + * @return {Promise} */ -function multiaddr (addr) { - return new Multiaddr(addr) -} -module.exports = { Multiaddr, multiaddr, protocols, resolvers } +function consumeBody() { + if (this[DISTURBED]) { + return Promise.reject(new Error(`body used already for: ${this.url}`)); + } -/***/ }), + this[DISTURBED] = true; // body is null -/***/ 48239: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (this.body === null) { + return Promise.resolve(Buffer.alloc(0)); + } // body is string -"use strict"; + if (typeof this.body === 'string') { + return Promise.resolve(Buffer.from(this.body)); + } // body is blob -const isIp = __nccwpck_require__(89837) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const isIP = isIp -const isV4 = isIp.v4 -const isV6 = isIp.v6 + if (this.body instanceof Blob) { + return Promise.resolve(this.body[BUFFER]); + } // body is buffer -// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L7 -// @ts-ignore - this is copied from the link above better to keep it the same -const toBytes = function (ip, buff, offset) { - offset = ~~offset - let result + if (Buffer.isBuffer(this.body)) { + return Promise.resolve(this.body); + } // istanbul ignore if: should never happen - if (isV4(ip)) { - result = buff || new Uint8Array(offset + 4) - // @ts-ignore - // eslint-disable-next-line array-callback-return - ip.split(/\./g).map(function (byte) { - result[offset++] = parseInt(byte, 10) & 0xff - }) - } else if (isV6(ip)) { - const sections = ip.split(':', 8) - let i - for (i = 0; i < sections.length; i++) { - const isv4 = isV4(sections[i]) - let v4Buffer + if (!(this.body instanceof Stream__default["default"])) { + return Promise.resolve(Buffer.alloc(0)); + } // body is stream + // get ready to actually consume the body - if (isv4) { - v4Buffer = toBytes(sections[i]) - sections[i] = uint8ArrayToString(v4Buffer.slice(0, 2), 'base16') + + const accum = []; + let accumBytes = 0; + let abort = false; + return new Promise((resolve, reject) => { + let resTimeout; // allow timeout on slow response body + + if (this.timeout) { + resTimeout = setTimeout(() => { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`, 'body-timeout')); + this.body.emit('cancel-request'); + }, this.timeout); + } // handle stream error, such as incorrect content-encoding + + + this.body.on('error', err => { + reject(new FetchError(`Invalid response body while trying to fetch ${this.url}: ${err.message}`, 'system', err)); + }); + this.body.on('data', chunk => { + if (abort || chunk === null) { + return; } - if (v4Buffer && ++i < 8) { - sections.splice(i, 0, uint8ArrayToString(v4Buffer.slice(2, 4), 'base16')) + if (this.size && accumBytes + chunk.length > this.size) { + abort = true; + reject(new FetchError(`content size at ${this.url} over limit: ${this.size}`, 'max-size')); + this.body.emit('cancel-request'); + return; } - } - if (sections[0] === '') { - while (sections.length < 8) sections.unshift('0') - } else if (sections[sections.length - 1] === '') { - while (sections.length < 8) sections.push('0') - } else if (sections.length < 8) { - for (i = 0; i < sections.length && sections[i] !== ''; i++); - const argv = [i, '1'] - for (i = 9 - sections.length; i > 0; i--) { - argv.push('0') + accumBytes += chunk.length; + accum.push(chunk); + }); + this.body.on('end', () => { + if (abort) { + return; } - sections.splice.apply(sections, argv) - } - result = buff || new Uint8Array(offset + 16) - for (i = 0; i < sections.length; i++) { - const word = parseInt(sections[i], 16) - result[offset++] = (word >> 8) & 0xff - result[offset++] = word & 0xff - } - } + clearTimeout(resTimeout); + resolve(Buffer.concat(accum)); + }); + }); +} +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param {Buffer} buffer Incoming buffer + * @param {Headers} headers + * @return {string} + */ - if (!result) { - throw Error('Invalid ip address: ' + ip) - } - return result -} +function convertBody(buffer, headers) { + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res; // header -// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63 -// @ts-ignore - this is copied from the link above better to keep it the same -const toString = function (buff, offset, length) { - offset = ~~offset - length = length || (buff.length - offset) + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } // no charset in content type, peek at response body for at most 1024 bytes - const result = [] - let string - const view = new DataView(buff.buffer) - if (length === 4) { - // IPv4 - for (let i = 0; i < length; i++) { - result.push(buff[offset + i]) - } - string = result.join('.') - } else if (length === 16) { - // IPv6 - for (let i = 0; i < length; i += 2) { - result.push(view.getUint16(offset + i).toString(16)) - } - string = result.join(':') - string = string.replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3') - string = string.replace(/:{3,4}/, '::') - } - return string -} + const str = buffer.slice(0, 1024).toString(); // html5 -module.exports = { - isIP, - isV4, - isV6, - toBytes, - toString -} + if (!res && str) { + res = / { + if (res) { + res = /charset=(.*)/i.exec(res.pop()); + } + } // xml -"use strict"; -/** @typedef {import("./types").Protocol} Protocol */ + if (!res && str) { + res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str); + } // found charset -/** - * Protocols - * - * @param {number | string} proto - * @returns {Protocol} - */ -function Protocols (proto) { - if (typeof (proto) === 'number') { - if (Protocols.codes[proto]) { - return Protocols.codes[proto] - } - throw new Error('no protocol with code: ' + proto) - } else if (typeof (proto) === 'string') { - if (Protocols.names[proto]) { - return Protocols.names[proto] + if (res) { + charset = res.pop(); // prevent decode issues when sites use incorrect encoding + // ref: https://hsivonen.fi/encoding-menu/ + + if (charset === 'gb2312' || charset === 'gbk') { + charset = 'gb18030'; } + } // turn raw buffers into a single utf-8 buffer - throw new Error('no protocol with name: ' + proto) - } - throw new Error('invalid protocol id type: ' + proto) + return encoding.convert(buffer, 'UTF-8', charset).toString(); } +/** + * Clone body given Res/Req instance + * + * @param {Response|Request} instance Response or Request instance + * @return {string|Blob|Buffer|Stream} + */ -const V = -1 -Protocols.lengthPrefixedVarSize = V -Protocols.V = V -/** @type {Array<[number, number, string, (string|boolean)?, string?]>} */ -Protocols.table = [ - [4, 32, 'ip4'], - [6, 16, 'tcp'], - [33, 16, 'dccp'], - [41, 128, 'ip6'], - [42, V, 'ip6zone'], - [53, V, 'dns', 'resolvable'], - [54, V, 'dns4', 'resolvable'], - [55, V, 'dns6', 'resolvable'], - [56, V, 'dnsaddr', 'resolvable'], - [132, 16, 'sctp'], - [273, 16, 'udp'], - [275, 0, 'p2p-webrtc-star'], - [276, 0, 'p2p-webrtc-direct'], - [277, 0, 'p2p-stardust'], - [290, 0, 'p2p-circuit'], - [301, 0, 'udt'], - [302, 0, 'utp'], - [400, V, 'unix', false, 'path'], - // `ipfs` is added before `p2p` for legacy support. - // All text representations will default to `p2p`, but `ipfs` will - // still be supported - [421, V, 'ipfs'], - // `p2p` is the preferred name for 421, and is now the default - [421, V, 'p2p'], - [443, 0, 'https'], - [444, 96, 'onion'], - [445, 296, 'onion3'], - [446, V, 'garlic64'], - [460, 0, 'quic'], - [477, 0, 'ws'], - [478, 0, 'wss'], - [479, 0, 'p2p-websocket-star'], - [480, 0, 'http'], - [777, V, 'memory'] -] -/** @type {Record} */ -Protocols.names = {} -/** @type {Record} */ -Protocols.codes = {} +function clone(instance) { + let p1, p2; + let body = instance.body; // don't allow cloning a used body -// populate tables -Protocols.table.map(row => { - const proto = p.apply(null, row) - Protocols.codes[proto.code] = proto - Protocols.names[proto.name] = proto - return null -}) + if (instance.bodyUsed) { + throw new Error('cannot clone body after it is used'); + } // check that body is a stream and not form-data object + // note: we can't clone the form-data object without having it as a dependency -Protocols.object = p + if (body instanceof Stream__default["default"] && typeof body.getBoundary !== 'function') { + // tee instance body + p1 = new Stream.PassThrough(); + p2 = new Stream.PassThrough(); + body.pipe(p1); + body.pipe(p2); // set instance body to teed body and return the other teed body + + instance.body = p1; + body = p2; + } + + return body; +} /** + * Performs the operation "extract a `Content-Type` value from |object|" as + * specified in the specification: + * https://fetch.spec.whatwg.org/#concept-bodyinit-extract * - * Create a protocol + * This function assumes that instance.body is present and non-null. * - * @param {number} code - * @param {number} size - * @param {string} name - * @param {any} [resolvable] - * @param {any} [path] - * @returns {Protocol} + * @param {Response|Request} instance Response or Request instance */ -function p (code, size, name, resolvable, path) { - return { - code, - size, - name, - resolvable: Boolean(resolvable), - path: Boolean(path) - } -} -module.exports = Protocols - - -/***/ }), +function extractContentType(instance) { + const body = instance.body; // istanbul ignore if: Currently, because of a guard in Request, body + // can never be null. Included here for completeness. -/***/ 27914: -/***/ ((module) => { + if (body === null) { + // body is null + return null; + } else if (typeof body === 'string') { + // body is string + return 'text/plain;charset=UTF-8'; + } else if (body instanceof Blob) { + // body is blob + return body.type || null; + } else if (Buffer.isBuffer(body)) { + // body is buffer + return null; + } else if (typeof body.getBoundary === 'function') { + // detect form data input from form-data module + return `multipart/form-data;boundary=${body.getBoundary()}`; + } else { + // body is stream + // can't really do much about this + return null; + } +} +function getTotalBytes(instance) { + const body = instance.body; // istanbul ignore if: included for completion -module.exports = read + if (body === null) { + // body is null + return 0; + } else if (typeof body === 'string') { + // body is string + return Buffer.byteLength(body); + } else if (body instanceof Blob) { + // body is blob + return body.size; + } else if (Buffer.isBuffer(body)) { + // body is buffer + return body.length; + } else if (body && typeof body.getLengthSync === 'function') { + // detect form data input from form-data module + // istanbul ignore next + if (body._lengthRetrievers && body._lengthRetrievers.length === 0 || // 1.x + body.hasKnownLength && body.hasKnownLength()) { + // 2.x + return body.getLengthSync(); + } -var MSB = 0x80 - , REST = 0x7F + return null; + } else { + // body is stream + // can't really do much about this + return null; + } +} +function writeToStream(dest, instance) { + const body = instance.body; -function read(buf, offset) { - var res = 0 - , offset = offset || 0 - , shift = 0 - , counter = offset - , b - , l = buf.length + if (body === null) { + // body is null + dest.end(); + } else if (typeof body === 'string') { + // body is string + dest.write(body); + dest.end(); + } else if (body instanceof Blob) { + // body is blob + dest.write(body[BUFFER]); + dest.end(); + } else if (Buffer.isBuffer(body)) { + // body is buffer + dest.write(body); + dest.end(); + } else { + // body is stream + if (instance.useElectronNet) { + dest.chunkedEncoding = instance.chunkedEncoding; // Force a first write to start the request otherwise an empty body stream + // will cause an error when closing the dest stream with Electron v7. - do { - if (counter >= l || shift > 49) { - read.bytes = 0 - throw new RangeError('Could not decode varint') + dest.write(''); } - b = buf[counter++] - res += shift < 28 - ? (b & REST) << shift - : (b & REST) * Math.pow(2, shift) - shift += 7 - } while (b >= MSB) - read.bytes = counter - offset - - return res + body.pipe(new Stream.PassThrough()) // I have to put a PassThrough because somehow, FormData streams are not eaten by electron/net + .pipe(dest); + } } +/** + * A set of utilities borrowed from Node.js' _http_common.js + */ -/***/ }), +/** + * 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 + * + * Allowed characters in an HTTP token: + * ^_`a-z 94-122 + * A-Z 65-90 + * - 45 + * 0-9 48-57 + * ! 33 + * #$%&' 35-39 + * *+ 42-43 + * . 46 + * | 124 + * ~ 126 + * + * This implementation of checkIsHttpToken() loops over the string instead of + * using a regular expression since the former is up to 180% faster with v8 4.9 + * depending on the string length (the shorter the string, the larger the + * performance difference) + * + * Additionally, checkIsHttpToken() is currently designed to be inlinable by v8, + * so take care when making changes to the implementation so that the source + * code size does not exceed v8's default max_inlined_source_size setting. + **/ +// istanbul ignore next +function isValidTokenChar(ch) { + if (ch >= 94 && ch <= 122) { + return true; + } -/***/ 95177: -/***/ ((module) => { + if (ch >= 65 && ch <= 90) { + return true; + } -module.exports = encode + if (ch === 45) { + return true; + } -var MSB = 0x80 - , REST = 0x7F - , MSBALL = ~REST - , INT = Math.pow(2, 31) + if (ch >= 48 && ch <= 57) { + return true; + } -function encode(num, out, offset) { - if (Number.MAX_SAFE_INTEGER && num > Number.MAX_SAFE_INTEGER) { - encode.bytes = 0 - throw new RangeError('Could not encode varint') + if (ch === 34 || ch === 40 || ch === 41 || ch === 44) { + return false; } - out = out || [] - offset = offset || 0 - var oldOffset = offset - while(num >= INT) { - out[offset++] = (num & 0xFF) | MSB - num /= 128 + if (ch >= 33 && ch <= 46) { + return true; } - while(num & MSBALL) { - out[offset++] = (num & 0xFF) | MSB - num >>>= 7 + + if (ch === 124 || ch === 126) { + return true; } - out[offset] = num | 0 - - encode.bytes = offset - oldOffset + 1 - - return out -} + return false; +} // istanbul ignore next -/***/ }), -/***/ 9280: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +function checkIsHttpToken(val) { + if (typeof val !== 'string' || val.length === 0) { + return false; + } -module.exports = { - encode: __nccwpck_require__(95177) - , decode: __nccwpck_require__(27914) - , encodingLength: __nccwpck_require__(62841) -} + if (!isValidTokenChar(val.charCodeAt(0))) { + return false; + } + const len = val.length; -/***/ }), + if (len > 1) { + if (!isValidTokenChar(val.charCodeAt(1))) { + return false; + } -/***/ 62841: -/***/ ((module) => { + if (len > 2) { + if (!isValidTokenChar(val.charCodeAt(2))) { + return false; + } + if (len > 3) { + if (!isValidTokenChar(val.charCodeAt(3))) { + return false; + } -var N1 = Math.pow(2, 7) -var N2 = Math.pow(2, 14) -var N3 = Math.pow(2, 21) -var N4 = Math.pow(2, 28) -var N5 = Math.pow(2, 35) -var N6 = Math.pow(2, 42) -var N7 = Math.pow(2, 49) -var N8 = Math.pow(2, 56) -var N9 = Math.pow(2, 63) + for (let i = 4; i < len; i++) { + if (!isValidTokenChar(val.charCodeAt(i))) { + return false; + } + } + } + } + } -module.exports = function (value) { - return ( - value < N1 ? 1 - : value < N2 ? 2 - : value < N3 ? 3 - : value < N4 ? 4 - : value < N5 ? 5 - : value < N6 ? 6 - : value < N7 ? 7 - : value < N8 ? 8 - : value < N9 ? 9 - : 10 - ) + return true; } +/** + * True 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 + * + * checkInvalidHeaderChar() is currently designed to be inlinable by v8, + * so take care when making changes to the implementation so that the source + * code size does not exceed v8's default max_inlined_source_size setting. + **/ +// istanbul ignore next +function checkInvalidHeaderChar(val) { + val += ''; -/***/ }), - -/***/ 51949: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; + if (val.length < 1) { + return false; + } + let c = val.charCodeAt(0); -var BufferList = __nccwpck_require__(87455); + if (c <= 31 && c !== 9 || c > 255 || c === 127) { + return true; + } -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + if (val.length < 2) { + return false; + } -var BufferList__default = /*#__PURE__*/_interopDefaultLegacy(BufferList); + c = val.charCodeAt(1); -async function* fixedSizeChunker(source, options) { - let bl = new BufferList__default["default"](); - let currentLength = 0; - let emitted = false; - const maxChunkSize = options.maxChunkSize; - for await (const buffer of source) { - bl.append(buffer); - currentLength += buffer.length; - while (currentLength >= maxChunkSize) { - yield bl.slice(0, maxChunkSize); - emitted = true; - if (maxChunkSize === bl.length) { - bl = new BufferList__default["default"](); - currentLength = 0; - } else { - const newBl = new BufferList__default["default"](); - newBl.append(bl.shallowSlice(maxChunkSize)); - bl = newBl; - currentLength -= maxChunkSize; - } - } + if (c <= 31 && c !== 9 || c > 255 || c === 127) { + return true; } - if (!emitted || currentLength) { - yield bl.slice(0, currentLength); + + if (val.length < 3) { + return false; } -} -module.exports = fixedSizeChunker; + c = val.charCodeAt(2); + if (c <= 31 && c !== 9 || c > 255 || c === 127) { + return true; + } -/***/ }), + for (let i = 3; i < val.length; ++i) { + c = val.charCodeAt(i); -/***/ 26682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (c <= 31 && c !== 9 || c > 255 || c === 127) { + return true; + } + } -"use strict"; + return false; +} +function sanitizeName(name) { + name += ''; -var BufferList = __nccwpck_require__(87455); -var rabinWasm = __nccwpck_require__(41333); -var errCode = __nccwpck_require__(5822); + if (!checkIsHttpToken(name)) { + throw new TypeError(`${name} is not a legal HTTP header name`); + } -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + return name.toLowerCase(); +} -var BufferList__default = /*#__PURE__*/_interopDefaultLegacy(BufferList); -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +function sanitizeValue(value) { + value += ''; -async function* rabinChunker(source, options) { - let min, max, avg; - if (options.minChunkSize && options.maxChunkSize && options.avgChunkSize) { - avg = options.avgChunkSize; - min = options.minChunkSize; - max = options.maxChunkSize; - } else if (!options.avgChunkSize) { - throw errCode__default["default"](new Error('please specify an average chunk size'), 'ERR_INVALID_AVG_CHUNK_SIZE'); - } else { - avg = options.avgChunkSize; - min = avg / 3; - max = avg + avg / 2; - } - if (min < 16) { - throw errCode__default["default"](new Error('rabin min must be greater than 16'), 'ERR_INVALID_MIN_CHUNK_SIZE'); - } - if (max < min) { - max = min; - } - if (avg < min) { - avg = min; - } - const sizepow = Math.floor(Math.log2(avg)); - for await (const chunk of rabin(source, { - min: min, - max: max, - bits: sizepow, - window: options.window, - polynomial: options.polynomial - })) { - yield chunk; - } -} -async function* rabin(source, options) { - const r = await rabinWasm.create(options.bits, options.min, options.max, options.window); - const buffers = new BufferList__default["default"](); - for await (const chunk of source) { - buffers.append(chunk); - const sizes = r.fingerprint(chunk); - for (let i = 0; i < sizes.length; i++) { - const size = sizes[i]; - const buf = buffers.slice(0, size); - buffers.consume(size); - yield buf; - } - } - if (buffers.length) { - yield buffers.slice(0); + if (checkInvalidHeaderChar(value)) { + throw new TypeError(`${value} is not a legal HTTP header value`); } + + return value; } -module.exports = rabinChunker; +const MAP = Symbol('map'); +class Headers { + /** + * Headers class + * + * @param {Object} init Response headers + */ + constructor(init = undefined) { + this[MAP] = Object.create(null); // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; -/***/ }), + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } // sequence> + // Note: per spec we have to first exhaust the lists then process them -/***/ 5662: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; + const pairs = []; + for (var _iterator = _createForOfIteratorHelperLoose(init), _step; !(_step = _iterator()).done;) { + const pair = _step.value; -var ipfsUnixfs = __nccwpck_require__(24821); -var persist = __nccwpck_require__(57161); -var dagPb = __nccwpck_require__(72532); + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } -const dirBuilder = async (item, blockstore, options) => { - const unixfs = new ipfsUnixfs.UnixFS({ - type: 'directory', - mtime: item.mtime, - mode: item.mode - }); - const buffer = dagPb.encode(dagPb.prepare({ Data: unixfs.marshal() })); - const cid = await persist(buffer, blockstore, options); - const path = item.path; - return { - cid, - path, - unixfs, - size: buffer.length - }; -}; + pairs.push(Array.from(pair)); + } -module.exports = dirBuilder; + for (var _i = 0, _pairs = pairs; _i < _pairs.length; _i++) { + const pair = _pairs[_i]; + + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (var _i2 = 0, _Object$keys = Object.keys(init); _i2 < _Object$keys.length; _i2++) { + const key = _Object$keys[_i2]; + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } -/***/ }), + Object.defineProperty(this, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true + }); + } + /** + * Return first header value given name + * + * @param {string} name Header name + * @return {string} + */ -/***/ 11011: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; + get(name) { + const list = this[MAP][sanitizeName(name)]; + if (!list) { + return null; + } -var batch = __nccwpck_require__(58611); + return list.join(','); + } + /** + * Iterate over all headers + * + * @param {function} callback Executed for each item with parameters (value, name, thisArg) + * @param {boolean} thisArg `this` context for callback function + */ -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } -var batch__default = /*#__PURE__*/_interopDefaultLegacy(batch); + forEach(callback, thisArg = undefined) { + let pairs = getHeaderPairs(this); + let i = 0; -function balanced(source, reduce, options) { - return reduceToParents(source, reduce, options); -} -async function reduceToParents(source, reduce, options) { - const roots = []; - for await (const chunked of batch__default["default"](source, options.maxChildrenPerNode)) { - roots.push(await reduce(chunked)); + while (i < pairs.length) { + const _pairs$i = pairs[i], + name = _pairs$i[0], + value = _pairs$i[1]; + callback.call(thisArg, value, name, this); + pairs = getHeaderPairs(this); + i++; + } } - if (roots.length > 1) { - return reduceToParents(roots, reduce, options); + /** + * Overwrite header values given name + * + * @param {string} name Header name + * @param {string|Array.|*} value Header value + */ + + + set(name, value) { + this[MAP][sanitizeName(name)] = [sanitizeValue(value)]; } - return roots[0]; -} + /** + * Append a value onto existing header + * + * @param {string} name Header name + * @param {string|Array.|*} value Header value + */ -module.exports = balanced; + append(name, value) { + if (!this.has(name)) { + this.set(name, value); + return; + } -/***/ }), + this[MAP][sanitizeName(name)].push(sanitizeValue(value)); + } + /** + * Check for header name existence + * + * @param {string} name Header name + * @return {boolean} + */ -/***/ 96097: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; + has(name) { + return !!this[MAP][sanitizeName(name)]; + } + /** + * Delete all header values given name + * + * @param {string} name Header name + */ -var ipfsUnixfs = __nccwpck_require__(24821); -var persist = __nccwpck_require__(57161); -var dagPb = __nccwpck_require__(72532); -var rawCodec = __nccwpck_require__(4848); + delete(name) { + delete this[MAP][sanitizeName(name)]; + } + /** + * Return raw headers (non-spec api) + * + * @return {Object} + */ -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); + + raw() { + return this[MAP]; } - n["default"] = e; - return Object.freeze(n); -} + /** + * Get an iterator on keys. + * + * @return {Iterator} + */ -var dagPb__namespace = /*#__PURE__*/_interopNamespace(dagPb); -var rawCodec__namespace = /*#__PURE__*/_interopNamespace(rawCodec); -async function* bufferImporter(file, block, options) { - for await (let buffer of file.content) { - yield async () => { - options.progress(buffer.length, file.path); - let unixfs; - const opts = { - codec: dagPb__namespace, - cidVersion: options.cidVersion, - hasher: options.hasher, - onlyHash: options.onlyHash - }; - if (options.rawLeaves) { - opts.codec = rawCodec__namespace; - opts.cidVersion = 1; - } else { - unixfs = new ipfsUnixfs.UnixFS({ - type: options.leafType, - data: buffer - }); - buffer = dagPb__namespace.encode({ - Data: unixfs.marshal(), - Links: [] - }); - } - return { - cid: await persist(buffer, block, opts), - unixfs, - size: buffer.length - }; - }; + keys() { + return createHeadersIterator(this, 'key'); } -} + /** + * Get an iterator on values. + * + * @return {Iterator} + */ -module.exports = bufferImporter; + + values() { + return createHeadersIterator(this, 'value'); + } + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return {Iterator} + */ -/***/ }), + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } -/***/ 84486: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'HeadersPrototype', + writable: false, + enumerable: false, + configurable: true +}); -"use strict"; +function getHeaderPairs(headers, kind) { + if (kind === 'key') return Object.keys(headers[MAP]).sort().map(k => [k]); + const pairs = []; + for (var _iterator2 = _createForOfIteratorHelperLoose(Object.keys(headers[MAP]).sort()), _step2; !(_step2 = _iterator2()).done;) { + const key = _step2.value; -var all = __nccwpck_require__(81172); + for (var _iterator3 = _createForOfIteratorHelperLoose(headers[MAP][key]), _step3; !(_step3 = _iterator3()).done;) { + const value = _step3.value; + pairs.push([key, value]); + } + } -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + return pairs; +} -var all__default = /*#__PURE__*/_interopDefaultLegacy(all); +const INTERNAL = Symbol('internal'); -async function flat(source, reduce) { - return reduce(await all__default["default"](source)); +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; } -module.exports = flat; +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + const _this$INTERNAL = this[INTERNAL], + target = _this$INTERNAL.target, + kind = _this$INTERNAL.kind, + index = _this$INTERNAL.index; + const values = getHeaderPairs(target, kind); + const len = values.length; -/***/ }), + if (index >= len) { + return { + value: undefined, + done: true + }; + } -/***/ 28484: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + const pair = values[index]; + this[INTERNAL].index = index + 1; + let result; -"use strict"; + if (kind === 'key') { + result = pair[0]; + } else if (kind === 'value') { + result = pair[1]; + } else { + result = pair; + } + return { + value: result, + done: false + }; + } -var errCode = __nccwpck_require__(5822); -var ipfsUnixfs = __nccwpck_require__(24821); -var persist = __nccwpck_require__(57161); -var dagPb = __nccwpck_require__(72532); -var parallelBatch = __nccwpck_require__(62898); -var rawCodec = __nccwpck_require__(4848); -var flat = __nccwpck_require__(84486); -var balanced = __nccwpck_require__(11011); -var trickle = __nccwpck_require__(27000); -var bufferImporter = __nccwpck_require__(96097); +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +/** + * response.js + * + * Response class provides content decoding + */ +/** + * Response class + * + * @param {Stream} body Readable stream + * @param {Object} opts Response options + */ -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } +class Response { + constructor(body = null, opts = {}) { + Body.call(this, body, opts); + this.url = opts.url; + this.status = opts.status || 200; + this.statusText = opts.statusText || http.STATUS_CODES[this.status]; + this.headers = new Headers(opts.headers); + this.useElectronNet = opts.useElectronNet; + Object.defineProperty(this, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true }); } - n["default"] = e; - return Object.freeze(n); -} + /** + * Convenience property representing if the request ended normally + */ -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); -var dagPb__namespace = /*#__PURE__*/_interopNamespace(dagPb); -var parallelBatch__default = /*#__PURE__*/_interopDefaultLegacy(parallelBatch); -var rawCodec__namespace = /*#__PURE__*/_interopNamespace(rawCodec); -const dagBuilders = { - flat: flat, - balanced: balanced, - trickle: trickle -}; -async function* buildFileBatch(file, blockstore, options) { - let count = -1; - let previous; - let bufferImporter$1; - if (typeof options.bufferImporter === 'function') { - bufferImporter$1 = options.bufferImporter; - } else { - bufferImporter$1 = bufferImporter; - } - for await (const entry of parallelBatch__default["default"](bufferImporter$1(file, blockstore, options), options.blockWriteConcurrency)) { - count++; - if (count === 0) { - previous = entry; - continue; - } else if (count === 1 && previous) { - yield previous; - previous = null; - } - yield entry; - } - if (previous) { - previous.single = true; - yield previous; + get ok() { + return this.status >= 200 && this.status < 300; } -} -const reduce = (file, blockstore, options) => { - async function reducer(leaves) { - if (leaves.length === 1 && leaves[0].single && options.reduceSingleLeafToSelf) { - const leaf = leaves[0]; - if (file.mtime !== undefined || file.mode !== undefined) { - let buffer = await blockstore.get(leaf.cid); - leaf.unixfs = new ipfsUnixfs.UnixFS({ - type: 'file', - mtime: file.mtime, - mode: file.mode, - data: buffer - }); - buffer = dagPb.encode(dagPb.prepare({ Data: leaf.unixfs.marshal() })); - leaf.cid = await persist(buffer, blockstore, { - ...options, - codec: dagPb__namespace, - hasher: options.hasher, - cidVersion: options.cidVersion - }); - leaf.size = buffer.length; - } - return { - cid: leaf.cid, - path: file.path, - unixfs: leaf.unixfs, - size: leaf.size - }; - } - const f = new ipfsUnixfs.UnixFS({ - type: 'file', - mtime: file.mtime, - mode: file.mode - }); - const links = leaves.filter(leaf => { - if (leaf.cid.code === rawCodec__namespace.code && leaf.size) { - return true; - } - if (leaf.unixfs && !leaf.unixfs.data && leaf.unixfs.fileSize()) { - return true; - } - return Boolean(leaf.unixfs && leaf.unixfs.data && leaf.unixfs.data.length); - }).map(leaf => { - if (leaf.cid.code === rawCodec__namespace.code) { - f.addBlockSize(leaf.size); - return { - Name: '', - Tsize: leaf.size, - Hash: leaf.cid - }; - } - if (!leaf.unixfs || !leaf.unixfs.data) { - f.addBlockSize(leaf.unixfs && leaf.unixfs.fileSize() || 0); - } else { - f.addBlockSize(leaf.unixfs.data.length); - } - return { - Name: '', - Tsize: leaf.size, - Hash: leaf.cid - }; + /** + * Clone this response + * + * @return {Response} + */ + + + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + useElectronNet: this.useElectronNet }); - const node = { - Data: f.marshal(), - Links: links - }; - const buffer = dagPb.encode(dagPb.prepare(node)); - const cid = await persist(buffer, blockstore, options); - return { - cid, - path: file.path, - unixfs: f, - size: buffer.length + node.Links.reduce((acc, curr) => acc + curr.Tsize, 0) - }; - } - return reducer; -}; -function fileBuilder(file, block, options) { - const dagBuilder = dagBuilders[options.strategy]; - if (!dagBuilder) { - throw errCode__default["default"](new Error(`Unknown importer build strategy name: ${ options.strategy }`), 'ERR_BAD_STRATEGY'); } - return dagBuilder(buildFileBatch(file, block, options), reduce(file, block, options), options); + } +Body.mixIn(Response.prototype); +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'ResponsePrototype', + writable: false, + enumerable: false, + configurable: true +}); -module.exports = fileBuilder; +/** + * request.js + * + * Request class contains server only options + */ +const PARSED_URL = Symbol('url'); +/** + * Request class + * + * @param {string|Request} input Url or Request instance + * @param {Object} init Custom options + */ +class Request { + constructor(input, init = {}) { + let parsedURL; // normalize input -/***/ }), + if (!(input instanceof Request)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = url.parse(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = url.parse(`${input}`); + } -/***/ 27000: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + input = {}; + } else { + parsedURL = url.parse(input.url); + } -"use strict"; + const method = init.method || input.method || 'GET'; + + if ((init.body != null || input instanceof Request && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + const inputBody = init.body != null ? init.body : input instanceof Request && input.body !== null ? clone(input) : null; + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); // fetch spec options -var batch = __nccwpck_require__(58611); + this.method = method.toUpperCase(); + this.redirect = init.redirect || input.redirect || 'follow'; + this.signal = init.signal || input.signal || null; + this.headers = new Headers(init.headers || input.headers || {}); + this.headers.delete('Content-Length'); // user cannot set content-length themself as per fetch spec -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + this.chunkedEncoding = false; + this.useElectronNet = init.useElectronNet !== undefined // have to do this instead of || because it can be set to false + ? init.useElectronNet : input.useElectronNet; // istanbul ignore if -var batch__default = /*#__PURE__*/_interopDefaultLegacy(batch); + if (this.useElectronNet && !process.versions.electron) throw new Error('Cannot use Electron/net module on Node.js!'); -async function trickleStream(source, reduce, options) { - const root = new Root(options.layerRepeat); - let iteration = 0; - let maxDepth = 1; - let subTree = root; - for await (const layer of batch__default["default"](source, options.maxChildrenPerNode)) { - if (subTree.isFull()) { - if (subTree !== root) { - root.addChild(await subTree.reduce(reduce)); - } - if (iteration && iteration % options.layerRepeat === 0) { - maxDepth++; - } - subTree = new SubTree(maxDepth, options.layerRepeat, iteration); - iteration++; - } - subTree.append(layer); - } - if (subTree && subTree !== root) { - root.addChild(await subTree.reduce(reduce)); - } - return root.reduce(reduce); -} -class SubTree { - constructor(maxDepth, layerRepeat, iteration = 0) { - this.maxDepth = maxDepth; - this.layerRepeat = layerRepeat; - this.currentDepth = 1; - this.iteration = iteration; - this.root = this.node = this.parent = { - children: [], - depth: this.currentDepth, - maxDepth, - maxChildren: (this.maxDepth - this.currentDepth) * this.layerRepeat - }; - } - isFull() { - if (!this.root.data) { - return false; - } - if (this.currentDepth < this.maxDepth && this.node.maxChildren) { - this._addNextNodeToParent(this.node); - return false; - } - const distantRelative = this._findParent(this.node, this.currentDepth); - if (distantRelative) { - this._addNextNodeToParent(distantRelative); - return false; - } - return true; - } - _addNextNodeToParent(parent) { - this.parent = parent; - const nextNode = { - children: [], - depth: parent.depth + 1, - parent, - maxDepth: this.maxDepth, - maxChildren: Math.floor(parent.children.length / this.layerRepeat) * this.layerRepeat - }; - parent.children.push(nextNode); - this.currentDepth = nextNode.depth; - this.node = nextNode; - } - append(layer) { - this.node.data = layer; - } - reduce(reduce) { - return this._reduce(this.root, reduce); - } - async _reduce(node, reduce) { - let children = []; - if (node.children.length) { - children = await Promise.all(node.children.filter(child => child.data).map(child => this._reduce(child, reduce))); - } - return reduce((node.data || []).concat(children)); - } - _findParent(node, depth) { - const parent = node.parent; - if (!parent || parent.depth === 0) { - return; + if (this.useElectronNet === undefined) { + this.useElectronNet = Boolean(process.versions.electron); } - if (parent.children.length === parent.maxChildren || !parent.maxChildren) { - return this._findParent(parent, depth); + + if (this.useElectronNet) { + this.useSessionCookies = init.useSessionCookies !== undefined ? init.useSessionCookies : input.useSessionCookies; } - return parent; - } -} -class Root extends SubTree { - constructor(layerRepeat) { - super(0, layerRepeat); - this.root.depth = 0; - this.currentDepth = 1; - } - addChild(child) { - this.root.children.push(child); + + if (init.body != null) { + const contentType = extractContentType(this); + + if (contentType !== null && !this.headers.has('Content-Type')) { + this.headers.append('Content-Type', contentType); + } + } // server only options + + + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.counter = init.counter || input.counter || 0; + this.session = init.session || input.session; + this[PARSED_URL] = parsedURL; + Object.defineProperty(this, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true + }); } - reduce(reduce) { - return reduce((this.root.data || []).concat(this.root.children)); + + get url() { + return url.format(this[PARSED_URL]); } -} + /** + * Clone this request + * + * @return {Request} + */ -module.exports = trickleStream; + clone() { + return new Request(this); + } -/***/ }), +} +Body.mixIn(Request.prototype); +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'RequestPrototype', + writable: false, + enumerable: false, + configurable: true +}); +function getNodeRequestOptions(request) { + const parsedURL = request[PARSED_URL]; + const headers = new Headers(request.headers); // fetch step 3 -/***/ 59929: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } // Basic fetch -"use strict"; + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } -var dir = __nccwpck_require__(5662); -var index = __nccwpck_require__(28484); -var errCode = __nccwpck_require__(5822); -var rabin = __nccwpck_require__(26682); -var fixedSize = __nccwpck_require__(51949); -var validateChunks = __nccwpck_require__(1843); + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } // HTTP-network-or-cache fetch steps 5-9 -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + let contentLengthValue = null; -function isIterable(thing) { - return Symbol.iterator in thing; -} -function isAsyncIterable(thing) { - return Symbol.asyncIterator in thing; -} -function contentAsAsyncIterable(content) { - try { - if (content instanceof Uint8Array) { - return async function* () { - yield content; - }(); - } else if (isIterable(content)) { - return async function* () { - yield* content; - }(); - } else if (isAsyncIterable(content)) { - return content; - } - } catch { - throw errCode__default["default"](new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; } - throw errCode__default["default"](new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); -} -async function* dagBuilder(source, blockstore, options) { - for await (const entry of source) { - if (entry.path) { - if (entry.path.substring(0, 2) === './') { - options.wrapWithDirectory = true; - } - entry.path = entry.path.split('/').filter(path => path && path !== '.').join('/'); - } - if (entry.content) { - let chunker; - if (typeof options.chunker === 'function') { - chunker = options.chunker; - } else if (options.chunker === 'rabin') { - chunker = rabin; - } else { - chunker = fixedSize; - } - let chunkValidator; - if (typeof options.chunkValidator === 'function') { - chunkValidator = options.chunkValidator; - } else { - chunkValidator = validateChunks; - } - const file = { - path: entry.path, - mtime: entry.mtime, - mode: entry.mode, - content: chunker(chunkValidator(contentAsAsyncIterable(entry.content), options), options) - }; - yield () => index(file, blockstore, options); - } else if (entry.path) { - const dir$1 = { - path: entry.path, - mtime: entry.mtime, - mode: entry.mode - }; - yield () => dir(dir$1, blockstore, options); - } else { - throw new Error('Import candidate must have content or path or both'); + + if (request.body != null) { + const totalBytes = getTotalBytes(request); + + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); } } -} -module.exports = dagBuilder; + if (contentLengthValue) { + if (!request.useElectronNet) headers.set('Content-Length', contentLengthValue); + } else { + request.chunkedEncoding = true; + } // HTTP-network-or-cache fetch step 12 -/***/ }), + if (!headers.has('User-Agent')) { + headers.set('User-Agent', `electron-fetch/1.0 ${request.useElectronNet ? 'electron' : 'node'} (+https://github.com/arantes555/electron-fetch)`); + } // HTTP-network-or-cache fetch step 16 -/***/ 1843: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; + headers.set('Accept-Encoding', 'gzip,deflate'); + if (!headers.has('Connection')) { + headers.set('Connection', 'close'); + } // HTTP-network fetch step 4 + // chunked encoding is handled by Node.js when not running in electron -var errCode = __nccwpck_require__(5822); -var fromString = __nccwpck_require__(39451); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + return Object.assign({}, parsedURL, { + method: request.method, + headers: headers.raw() + }); +} -var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +let electron; // istanbul ignore else -async function* validateChunks(source) { - for await (const content of source) { - if (content.length === undefined) { - throw errCode__default["default"](new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); +if (process.versions.electron) { +<<<<<<< HEAD + electron = __nccwpck_require__(83251); +======= + electron = __nccwpck_require__(66477); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +} + +const isReady = electron && electron.app && !electron.app.isReady() ? new Promise(resolve => electron.app.once('ready', resolve)) : Promise.resolve(); +/** + * Fetch function + * + * @param {string|Request} url Absolute url or Request instance + * @param {Object} [opts] Fetch options + * @return {Promise} + */ + +function fetch(url$1, opts = {}) { + // wrap http.request into fetch + return isReady.then(() => new Promise((resolve, reject) => { + // build request object + const request = new Request(url$1, opts); + const options = getNodeRequestOptions(request); + const send = request.useElectronNet ? electron.net.request : (options.protocol === 'https:' ? https__namespace : http__namespace).request; // http.request only support string as host header, this hack make custom host header possible + + if (options.headers.host) { + options.headers.host = options.headers.host[0]; } - if (typeof content === 'string' || content instanceof String) { - yield fromString.fromString(content.toString()); - } else if (Array.isArray(content)) { - yield Uint8Array.from(content); - } else if (content instanceof Uint8Array) { - yield content; + + if (request.signal && request.signal.aborted) { + reject(new FetchError('request aborted', 'abort')); + return; + } // send request + + + let headers; + + if (request.useElectronNet) { + headers = options.headers; + delete options.headers; + options.session = opts.session || electron.session.defaultSession; + options.useSessionCookies = request.useSessionCookies; } else { - throw errCode__default["default"](new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); + if (opts.agent) options.agent = opts.agent; + if (opts.onLogin) reject(new Error('"onLogin" option is only supported with "useElectronNet" enabled')); } - } -} - -module.exports = validateChunks; + const req = send(options); -/***/ }), + if (request.useElectronNet) { + for (const headerName in headers) { + if (typeof headers[headerName] === 'string') req.setHeader(headerName, headers[headerName]);else { + for (var _iterator = _createForOfIteratorHelperLoose(headers[headerName]), _step; !(_step = _iterator()).done;) { + const headerValue = _step.value; + req.setHeader(headerName, headerValue); + } + } + } + } -/***/ 22728: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + let reqTimeout; -"use strict"; + const cancelRequest = () => { + if (request.useElectronNet) { + req.abort(); // in electron, `req.destroy()` does not send abort to server + } else { + req.destroy(); // in node.js, `req.abort()` is deprecated + } + }; + const abortRequest = () => { + const err = new FetchError('request aborted', 'abort'); + reject(err); + cancelRequest(); + req.emit('error', err); + }; -var dagPb = __nccwpck_require__(72532); -var ipfsUnixfs = __nccwpck_require__(24821); -var dir = __nccwpck_require__(86803); -var persist = __nccwpck_require__(57161); + if (request.signal) { + request.signal.addEventListener('abort', abortRequest); + } -class DirFlat extends dir { - constructor(props, options) { - super(props, options); - this._children = {}; - } - async put(name, value) { - this.cid = undefined; - this.size = undefined; - this._children[name] = value; - } - get(name) { - return Promise.resolve(this._children[name]); - } - childCount() { - return Object.keys(this._children).length; - } - directChildrenCount() { - return this.childCount(); - } - onlyChild() { - return this._children[Object.keys(this._children)[0]]; - } - async *eachChildSeries() { - const keys = Object.keys(this._children); - for (let i = 0; i < keys.length; i++) { - const key = keys[i]; - yield { - key: key, - child: this._children[key] - }; + if (request.timeout) { + reqTimeout = setTimeout(() => { + const err = new FetchError(`network timeout at: ${request.url}`, 'request-timeout'); + reject(err); + cancelRequest(); + }, request.timeout); } - } - async *flush(block) { - const children = Object.keys(this._children); - const links = []; - for (let i = 0; i < children.length; i++) { - let child = this._children[children[i]]; - if (child instanceof dir) { - for await (const entry of child.flush(block)) { - child = entry; - yield child; + + if (request.useElectronNet) { + // handle authenticating proxies + req.on('login', (authInfo, callback) => { + if (opts.user && opts.password) { + callback(opts.user, opts.password); + } else if (opts.onLogin) { + opts.onLogin(authInfo).then(credentials => { + if (credentials) { + callback(credentials.username, credentials.password); + } else { + callback(); + } + }).catch(error => { + cancelRequest(); + reject(error); + }); + } else { + cancelRequest(); + reject(new FetchError(`login event received from ${authInfo.host} but no credentials or onLogin handler provided`, 'proxy', { + code: 'PROXY_AUTH_FAILED' + })); } + }); + } + + req.on('error', err => { + clearTimeout(reqTimeout); + + if (request.signal) { + request.signal.removeEventListener('abort', abortRequest); } - if (child.size != null && child.cid) { - links.push({ - Name: children[i], - Tsize: child.size, - Hash: child.cid - }); + + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + }); + req.on('abort', () => { + clearTimeout(reqTimeout); + + if (request.signal) { + request.signal.removeEventListener('abort', abortRequest); } - } - const unixfs = new ipfsUnixfs.UnixFS({ - type: 'directory', - mtime: this.mtime, - mode: this.mode }); - const node = { - Data: unixfs.marshal(), - Links: links - }; - const buffer = dagPb.encode(dagPb.prepare(node)); - const cid = await persist(buffer, block, this.options); - const size = buffer.length + node.Links.reduce((acc, curr) => acc + (curr.Tsize == null ? 0 : curr.Tsize), 0); - this.cid = cid; - this.size = size; - yield { - cid, - unixfs, - path: this.path, - size - }; - } -} + req.on('response', res => { + try { + clearTimeout(reqTimeout); -module.exports = DirFlat; + if (request.signal) { + request.signal.removeEventListener('abort', abortRequest); + } // handle redirect -/***/ }), + if (fetch.isRedirect(res.statusCode) && request.redirect !== 'manual') { + if (request.redirect === 'error') { + reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect')); + return; + } -/***/ 9967: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + return; + } -"use strict"; + if (!res.headers.location) { + reject(new FetchError(`redirect location header missing at: ${request.url}`, 'invalid-redirect')); + return; + } // per fetch spec, for POST request with 301/302 response, or any request with 303 response, use GET when following redirect -var dagPb = __nccwpck_require__(72532); -var ipfsUnixfs = __nccwpck_require__(24821); -var dir = __nccwpck_require__(86803); -var persist = __nccwpck_require__(57161); -var hamtSharding = __nccwpck_require__(78338); + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + request.method = 'GET'; + request.body = null; + request.headers.delete('content-length'); + } -class DirSharded extends dir { - constructor(props, options) { - super(props, options); - this._bucket = hamtSharding.createHAMT({ - hashFn: options.hamtHashFn, - bits: options.hamtBucketBits - }); - } - async put(name, value) { - await this._bucket.put(name, value); - } - get(name) { - return this._bucket.get(name); - } - childCount() { - return this._bucket.leafCount(); - } - directChildrenCount() { - return this._bucket.childrenCount(); - } - onlyChild() { - return this._bucket.onlyChild(); - } - async *eachChildSeries() { - for await (const {key, value} of this._bucket.eachLeafSeries()) { - yield { - key, - child: value - }; - } - } - async *flush(blockstore) { - for await (const entry of flush(this._bucket, blockstore, this, this.options)) { - yield { - ...entry, - path: this.path - }; - } - } -} -async function* flush(bucket, blockstore, shardRoot, options) { - const children = bucket._children; - const links = []; - let childrenSize = 0; - for (let i = 0; i < children.length; i++) { - const child = children.get(i); - if (!child) { - continue; - } - const labelPrefix = i.toString(16).toUpperCase().padStart(2, '0'); - if (child instanceof hamtSharding.Bucket) { - let shard; - for await (const subShard of await flush(child, blockstore, null, options)) { - shard = subShard; - } - if (!shard) { - throw new Error('Could not flush sharded directory, no subshard found'); - } - links.push({ - Name: labelPrefix, - Tsize: shard.size, - Hash: shard.cid - }); - childrenSize += shard.size; - } else if (typeof child.value.flush === 'function') { - const dir = child.value; - let flushedDir; - for await (const entry of dir.flush(blockstore)) { - flushedDir = entry; - yield flushedDir; - } - const label = labelPrefix + child.key; - links.push({ - Name: label, - Tsize: flushedDir.size, - Hash: flushedDir.cid - }); - childrenSize += flushedDir.size; - } else { - const value = child.value; - if (!value.cid) { - continue; - } - const label = labelPrefix + child.key; - const size = value.size; - links.push({ - Name: label, - Tsize: size, - Hash: value.cid - }); - childrenSize += size; - } - } - const data = Uint8Array.from(children.bitField().reverse()); - const dir = new ipfsUnixfs.UnixFS({ - type: 'hamt-sharded-directory', - data, - fanout: bucket.tableSize(), - hashType: options.hamtHashCode, - mtime: shardRoot && shardRoot.mtime, - mode: shardRoot && shardRoot.mode - }); - const node = { - Data: dir.marshal(), - Links: links - }; - const buffer = dagPb.encode(dagPb.prepare(node)); - const cid = await persist(buffer, blockstore, options); - const size = buffer.length + childrenSize; - yield { - cid, - unixfs: dir, - size - }; -} + request.counter++; + resolve(fetch(url.resolve(request.url, res.headers.location), request)); + return; + } // normalize location header for manual redirect mode -module.exports = DirSharded; + const headers = new Headers(); -/***/ }), + for (var _i = 0, _Object$keys = Object.keys(res.headers); _i < _Object$keys.length; _i++) { + const name = _Object$keys[_i]; -/***/ 86803: -/***/ ((module) => { + if (Array.isArray(res.headers[name])) { + for (var _iterator2 = _createForOfIteratorHelperLoose(res.headers[name]), _step2; !(_step2 = _iterator2()).done;) { + const val = _step2.value; + headers.append(name, val); + } + } else { + headers.append(name, res.headers[name]); + } + } -"use strict"; + if (request.redirect === 'manual' && headers.has('location')) { + headers.set('location', url.resolve(request.url, headers.get('location'))); + } // prepare response -class Dir { - constructor(props, options) { - this.options = options || {}; - this.root = props.root; - this.dir = props.dir; - this.path = props.path; - this.dirty = props.dirty; - this.flat = props.flat; - this.parent = props.parent; - this.parentKey = props.parentKey; - this.unixfs = props.unixfs; - this.mode = props.mode; - this.mtime = props.mtime; - this.cid = undefined; - this.size = undefined; - } - async put(name, value) { - } - get(name) { - return Promise.resolve(this); - } - async *eachChildSeries() { - } - async *flush(blockstore) { - } + let body = new Stream.PassThrough(); + res.on('error', err => body.emit('error', err)); + res.pipe(body); + body.on('error', cancelRequest); + body.on('cancel-request', cancelRequest); + + const abortBody = () => { + res.destroy(); + res.emit('error', new FetchError('request aborted', 'abort')); // separated from the `.destroy()` because somehow Node's IncomingMessage streams do not emit errors on destroy + }; + + if (request.signal) { + request.signal.addEventListener('abort', abortBody); + res.on('end', () => { + request.signal.removeEventListener('abort', abortBody); + }); + res.on('error', () => { + request.signal.removeEventListener('abort', abortBody); + }); + } + + const responseOptions = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers, + size: request.size, + timeout: request.timeout, + useElectronNet: request.useElectronNet, + useSessionCookies: request.useSessionCookies + }; // HTTP-network fetch step 16.1.2 + + const codings = headers.get('Content-Encoding'); // HTTP-network fetch step 16.1.3: handle content codings + // in following scenarios we ignore compression support + // 1. running on Electron/net module (it manages it for us) + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + + if (!request.useElectronNet && request.method !== 'HEAD' && codings !== null && res.statusCode !== 204 && res.statusCode !== 304) { + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + // /!\ This is disabled for now, because it seems broken in recent node + // const zlibOptions = { + // flush: zlib.Z_SYNC_FLUSH, + // finishFlush: zlib.Z_SYNC_FLUSH + // } + if (codings === 'gzip' || codings === 'x-gzip') { + // for gzip + body = body.pipe(zlib__namespace.createGunzip()); + } else if (codings === 'deflate' || codings === 'x-deflate') { + // for deflate + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new Stream.PassThrough()); + return raw.once('data', chunk => { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib__namespace.createInflate()); + } else { + body = body.pipe(zlib__namespace.createInflateRaw()); + } + + const response = new Response(body, responseOptions); + resolve(response); + }); + } + } + + const response = new Response(body, responseOptions); + resolve(response); + } catch (error) { + reject(new FetchError(`Invalid response: ${error.message}`, 'invalid-response')); + cancelRequest(); + } + }); + writeToStream(req, request); + })); } +/** + * Redirect code matching + * + * @param {number} code Status code + * @return {boolean} + */ -module.exports = Dir; +fetch.isRedirect = code => code === 301 || code === 302 || code === 303 || code === 307 || code === 308; + +exports.FetchError = FetchError; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports["default"] = fetch; /***/ }), -/***/ 72095: +<<<<<<< HEAD +/***/ 1086: +======= +/***/ 73931: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -var dirSharded = __nccwpck_require__(9967); -var dirFlat = __nccwpck_require__(22728); +<<<<<<< HEAD +var iconvLite = __nccwpck_require__(72249); +======= +var iconvLite = __nccwpck_require__(17281); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -async function flatToShard(child, dir, threshold, options) { - let newDir = dir; - if (dir instanceof dirFlat && dir.directChildrenCount() >= threshold) { - newDir = await convertToShard(dir, options); - } - const parent = newDir.parent; - if (parent) { - if (newDir !== dir) { - if (child) { - child.parent = newDir; - } - if (!newDir.parentKey) { - throw new Error('No parent key found'); - } - await parent.put(newDir.parentKey, newDir); +// Expose to the world +module.exports.convert = convert; + +/** + * Convert encoding of an UTF-8 string or a buffer + * + * @param {String|Buffer} str String to be converted + * @param {String} to Encoding to be converted to + * @param {String} [from='UTF-8'] Encoding to be converted from + * @return {Buffer} Encoded string + */ +function convert(str, to, from) { + from = checkEncoding(from || 'UTF-8'); + to = checkEncoding(to || 'UTF-8'); + str = str || ''; + + var result; + + if (from !== 'UTF-8' && typeof str === 'string') { + str = Buffer.from(str, 'binary'); } - return flatToShard(newDir, parent, threshold, options); - } - return newDir; + + if (from === to) { + if (typeof str === 'string') { + result = Buffer.from(str); + } else { + result = str; + } + } else { + try { + result = convertIconvLite(str, to, from); + } catch (E) { + console.error(E); + result = str; + } + } + + if (typeof result === 'string') { + result = Buffer.from(result, 'utf-8'); + } + + return result; } -async function convertToShard(oldDir, options) { - const newDir = new dirSharded({ - root: oldDir.root, - dir: true, - parent: oldDir.parent, - parentKey: oldDir.parentKey, - path: oldDir.path, - dirty: oldDir.dirty, - flat: false, - mtime: oldDir.mtime, - mode: oldDir.mode - }, options); - for await (const {key, child} of oldDir.eachChildSeries()) { - await newDir.put(key, child); - } - return newDir; + +/** + * Convert encoding of astring with iconv-lite + * + * @param {String|Buffer} str String to be converted + * @param {String} to Encoding to be converted to + * @param {String} [from='UTF-8'] Encoding to be converted from + * @return {Buffer} Encoded string + */ +function convertIconvLite(str, to, from) { + if (to === 'UTF-8') { + return iconvLite.decode(str, from); + } else if (from === 'UTF-8') { + return iconvLite.encode(str, to); + } else { + return iconvLite.encode(iconvLite.decode(str, from), to); + } } -module.exports = flatToShard; +/** + * Converts charset name if needed + * + * @param {String} name Character set + * @return {String} Character set name + */ +function checkEncoding(name) { + return (name || '') + .toString() + .trim() + .replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1') + .replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1') + .replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1') + .replace(/^ks_c_5601\-1987$/i, 'CP949') + .replace(/^us[\-_]?ascii$/i, 'ASCII') + .toUpperCase(); +} /***/ }), -/***/ 17512: +<<<<<<< HEAD +/***/ 91573: +======= +/***/ 20108: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +<<<<<<< HEAD +var Buffer = (__nccwpck_require__(95944).Buffer); +======= +var Buffer = (__nccwpck_require__(25213).Buffer); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 -Object.defineProperty(exports, "__esModule", ({ value: true })); +// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. +// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. +// To save memory and loading time, we read table files only when requested. -var parallelBatch = __nccwpck_require__(62898); -var options = __nccwpck_require__(91534); -var index = __nccwpck_require__(59929); -var treeBuilder = __nccwpck_require__(65599); +exports._dbcs = DBCSCodec; -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +var UNASSIGNED = -1, + GB18030_CODE = -2, + SEQ_START = -10, + NODE_START = -1000, + UNASSIGNED_NODE = new Array(0x100), + DEF_CHAR = -1; -var parallelBatch__default = /*#__PURE__*/_interopDefaultLegacy(parallelBatch); +for (var i = 0; i < 0x100; i++) + UNASSIGNED_NODE[i] = UNASSIGNED; -async function* importer(source, blockstore, options$1 = {}) { - const opts = options(options$1); - let dagBuilder; - if (typeof options$1.dagBuilder === 'function') { - dagBuilder = options$1.dagBuilder; - } else { - dagBuilder = index; - } - let treeBuilder$1; - if (typeof options$1.treeBuilder === 'function') { - treeBuilder$1 = options$1.treeBuilder; - } else { - treeBuilder$1 = treeBuilder; - } - let candidates; - if (Symbol.asyncIterator in source || Symbol.iterator in source) { - candidates = source; - } else { - candidates = [source]; - } - for await (const entry of treeBuilder$1(parallelBatch__default["default"](dagBuilder(candidates, blockstore, opts), opts.fileImportConcurrency), blockstore, opts)) { - yield { - cid: entry.cid, - path: entry.path, - unixfs: entry.unixfs, - size: entry.size - }; - } -} -exports.importer = importer; +// Class DBCSCodec reads and initializes mapping tables. +function DBCSCodec(codecOptions, iconv) { + this.encodingName = codecOptions.encodingName; + if (!codecOptions) + throw new Error("DBCS codec is called without the data.") + if (!codecOptions.table) + throw new Error("Encoding '" + this.encodingName + "' has no data."); + // Load tables. + var mappingTable = codecOptions.table(); -/***/ }), -/***/ 91534: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Decode tables: MBCS -> Unicode. -"use strict"; + // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. + // Trie root is decodeTables[0]. + // Values: >= 0 -> unicode character code. can be > 0xFFFF + // == UNASSIGNED -> unknown/unassigned sequence. + // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. + // <= NODE_START -> index of the next node in our trie to process next byte. + // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. + this.decodeTables = []; + this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. + // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. + this.decodeTableSeq = []; -var mergeOptions = __nccwpck_require__(79139); -var sha2 = __nccwpck_require__(80960); -var murmur3 = __nccwpck_require__(17422); + // Actual mapping tables consist of chunks. Use them to fill up decode tables. + for (var i = 0; i < mappingTable.length; i++) + this._addDecodeChunk(mappingTable[i]); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + // Load & create GB18030 tables when needed. + if (typeof codecOptions.gb18030 === 'function') { + this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. -var mergeOptions__default = /*#__PURE__*/_interopDefaultLegacy(mergeOptions); + // Add GB18030 common decode nodes. + var commonThirdByteNodeIdx = this.decodeTables.length; + this.decodeTables.push(UNASSIGNED_NODE.slice(0)); -async function hamtHashFn(buf) { - return (await murmur3.murmur3128.encode(buf)).slice(0, 8).reverse(); -} -const defaultOptions = { - chunker: 'fixed', - strategy: 'balanced', - rawLeaves: false, - onlyHash: false, - reduceSingleLeafToSelf: true, - hasher: sha2.sha256, - leafType: 'file', - cidVersion: 0, - progress: () => () => { - }, - shardSplitThreshold: 1000, - fileImportConcurrency: 50, - blockWriteConcurrency: 10, - minChunkSize: 262144, - maxChunkSize: 262144, - avgChunkSize: 262144, - window: 16, - polynomial: 17437180132763652, - maxChildrenPerNode: 174, - layerRepeat: 4, - wrapWithDirectory: false, - recursive: false, - hidden: false, - timeout: undefined, - hamtHashFn, - hamtHashCode: 34, - hamtBucketBits: 8 -}; -var defaultOptions$1 = (options = {}) => { - const defaults = mergeOptions__default["default"].bind({ ignoreUndefined: true }); - return defaults(defaultOptions, options); -}; + var commonFourthByteNodeIdx = this.decodeTables.length; + this.decodeTables.push(UNASSIGNED_NODE.slice(0)); -module.exports = defaultOptions$1; + // Fill out the tree + var firstByteNode = this.decodeTables[0]; + for (var i = 0x81; i <= 0xFE; i++) { + var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; + for (var j = 0x30; j <= 0x39; j++) { + if (secondByteNode[j] === UNASSIGNED) { + secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; + } else if (secondByteNode[j] > NODE_START) { + throw new Error("gb18030 decode tables conflict at byte 2"); + } + var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; + for (var k = 0x81; k <= 0xFE; k++) { + if (thirdByteNode[k] === UNASSIGNED) { + thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; + } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { + continue; + } else if (thirdByteNode[k] > NODE_START) { + throw new Error("gb18030 decode tables conflict at byte 3"); + } -/***/ }), + var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; + for (var l = 0x30; l <= 0x39; l++) { + if (fourthByteNode[l] === UNASSIGNED) + fourthByteNode[l] = GB18030_CODE; + } + } + } + } + } -/***/ 65599: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + this.defaultCharUnicode = iconv.defaultCharUnicode; -"use strict"; + + // Encode tables: Unicode -> DBCS. + // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. + // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. + // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). + // == UNASSIGNED -> no conversion found. Output a default char. + // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. + this.encodeTable = []; + + // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of + // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key + // means end of sequence (needed when one sequence is a strict subsequence of another). + // Objects are kept separately from encodeTable to increase performance. + this.encodeTableSeq = []; -var dirFlat = __nccwpck_require__(22728); -var flatToShard = __nccwpck_require__(72095); -var dir = __nccwpck_require__(86803); -var toPathComponents = __nccwpck_require__(22931); + // Some chars can be decoded, but need not be encoded. + var skipEncodeChars = {}; + if (codecOptions.encodeSkipVals) + for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { + var val = codecOptions.encodeSkipVals[i]; + if (typeof val === 'number') + skipEncodeChars[val] = true; + else + for (var j = val.from; j <= val.to; j++) + skipEncodeChars[j] = true; + } + + // Use decode trie to recursively fill out encode tables. + this._fillEncodeTable(0, 0, skipEncodeChars); -async function addToTree(elem, tree, options) { - const pathElems = toPathComponents(elem.path || ''); - const lastIndex = pathElems.length - 1; - let parent = tree; - let currentPath = ''; - for (let i = 0; i < pathElems.length; i++) { - const pathElem = pathElems[i]; - currentPath += `${ currentPath ? '/' : '' }${ pathElem }`; - const last = i === lastIndex; - parent.dirty = true; - parent.cid = undefined; - parent.size = undefined; - if (last) { - await parent.put(pathElem, elem); - tree = await flatToShard(null, parent, options.shardSplitThreshold, options); - } else { - let dir$1 = await parent.get(pathElem); - if (!dir$1 || !(dir$1 instanceof dir)) { - dir$1 = new dirFlat({ - root: false, - dir: true, - parent: parent, - parentKey: pathElem, - path: currentPath, - dirty: true, - flat: true, - mtime: dir$1 && dir$1.unixfs && dir$1.unixfs.mtime, - mode: dir$1 && dir$1.unixfs && dir$1.unixfs.mode - }, options); - } - await parent.put(pathElem, dir$1); - parent = dir$1; - } - } - return tree; -} -async function* flushAndYield(tree, blockstore) { - if (!(tree instanceof dir)) { - if (tree && tree.unixfs && tree.unixfs.isDirectory()) { - yield tree; - } - return; - } - yield* tree.flush(blockstore); -} -async function* treeBuilder(source, block, options) { - let tree = new dirFlat({ - root: true, - dir: true, - path: '', - dirty: true, - flat: true - }, options); - for await (const entry of source) { - if (!entry) { - continue; - } - tree = await addToTree(entry, tree, options); - if (!entry.unixfs || !entry.unixfs.isDirectory()) { - yield entry; - } - } - if (options.wrapWithDirectory) { - yield* flushAndYield(tree, block); - } else { - for await (const unwrapped of tree.eachChildSeries()) { - if (!unwrapped) { - continue; - } - yield* flushAndYield(unwrapped.child, block); + // Add more encoding pairs when needed. + if (codecOptions.encodeAdd) { + for (var uChar in codecOptions.encodeAdd) + if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) + this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); } - } -} - -module.exports = treeBuilder; + this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; + if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); +} -/***/ }), - -/***/ 57161: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +DBCSCodec.prototype.encoder = DBCSEncoder; +DBCSCodec.prototype.decoder = DBCSDecoder; +// Decoder helpers +DBCSCodec.prototype._getDecodeTrieNode = function(addr) { + var bytes = []; + for (; addr > 0; addr >>>= 8) + bytes.push(addr & 0xFF); + if (bytes.length == 0) + bytes.push(0); -var cid = __nccwpck_require__(24247); -var dagPb = __nccwpck_require__(72532); -var sha2 = __nccwpck_require__(80960); + var node = this.decodeTables[0]; + for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. + var val = node[bytes[i]]; -function _interopNamespace(e) { - if (e && e.__esModule) return e; - var n = Object.create(null); - if (e) { - Object.keys(e).forEach(function (k) { - if (k !== 'default') { - var d = Object.getOwnPropertyDescriptor(e, k); - Object.defineProperty(n, k, d.get ? d : { - enumerable: true, - get: function () { return e[k]; } - }); - } - }); - } - n["default"] = e; - return Object.freeze(n); + if (val == UNASSIGNED) { // Create new node. + node[bytes[i]] = NODE_START - this.decodeTables.length; + this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); + } + else if (val <= NODE_START) { // Existing node. + node = this.decodeTables[NODE_START - val]; + } + else + throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } + return node; } -var dagPb__namespace = /*#__PURE__*/_interopNamespace(dagPb); -const persist = async (buffer, blockstore, options) => { - if (!options.codec) { - options.codec = dagPb__namespace; - } - if (!options.hasher) { - options.hasher = sha2.sha256; - } - if (options.cidVersion === undefined) { - options.cidVersion = 1; - } - if (options.codec === dagPb__namespace && options.hasher !== sha2.sha256) { - options.cidVersion = 1; - } - const multihash = await options.hasher.digest(buffer); - const cid$1 = cid.CID.create(options.cidVersion, options.codec.code, multihash); - if (!options.onlyHash) { - await blockstore.put(cid$1, buffer, { signal: options.signal }); - } - return cid$1; -}; +DBCSCodec.prototype._addDecodeChunk = function(chunk) { + // First element of chunk is the hex mbcs code where we start. + var curAddr = parseInt(chunk[0], 16); -module.exports = persist; + // Choose the decoding node where we'll write our chars. + var writeTable = this._getDecodeTrieNode(curAddr); + curAddr = curAddr & 0xFF; + // Write all other elements of the chunk to the table. + for (var k = 1; k < chunk.length; k++) { + var part = chunk[k]; + if (typeof part === "string") { // String, write as-is. + for (var l = 0; l < part.length;) { + var code = part.charCodeAt(l++); + if (0xD800 <= code && code < 0xDC00) { // Decode surrogate + var codeTrail = part.charCodeAt(l++); + if (0xDC00 <= codeTrail && codeTrail < 0xE000) + writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); + else + throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } + else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) + var len = 0xFFF - code + 2; + var seq = []; + for (var m = 0; m < len; m++) + seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. -/***/ }), + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } + else + writeTable[curAddr++] = code; // Basic char + } + } + else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. + var charCode = writeTable[curAddr - 1] + 1; + for (var l = 0; l < part; l++) + writeTable[curAddr++] = charCode++; + } + else + throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); + } + if (curAddr > 0xFF) + throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); +} -/***/ 22931: -/***/ ((module) => { +// Encoder helpers +DBCSCodec.prototype._getEncodeBucket = function(uCode) { + var high = uCode >> 8; // This could be > 0xFF because of astral characters. + if (this.encodeTable[high] === undefined) + this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. + return this.encodeTable[high]; +} -"use strict"; +DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + if (bucket[low] <= SEQ_START) + this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. + else if (bucket[low] == UNASSIGNED) + bucket[low] = dbcsCode; +} +DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { + + // Get the root of character tree according to first character of the sequence. + var uCode = seq[0]; + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; -const toPathComponents = (path = '') => { - return (path.trim().match(/([^\\/]|\\\/)+/g) || []).filter(Boolean); -}; + var node; + if (bucket[low] <= SEQ_START) { + // There's already a sequence with - use it. + node = this.encodeTableSeq[SEQ_START-bucket[low]]; + } + else { + // There was no sequence object - allocate a new one. + node = {}; + if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. + bucket[low] = SEQ_START - this.encodeTableSeq.length; + this.encodeTableSeq.push(node); + } -module.exports = toPathComponents; + // Traverse the character tree, allocating new nodes as needed. + for (var j = 1; j < seq.length-1; j++) { + var oldVal = node[uCode]; + if (typeof oldVal === 'object') + node = oldVal; + else { + node = node[uCode] = {} + if (oldVal !== undefined) + node[DEF_CHAR] = oldVal + } + } + // Set the leaf to given dbcsCode. + uCode = seq[seq.length-1]; + node[uCode] = dbcsCode; +} -/***/ }), +DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { + var node = this.decodeTables[nodeIdx]; + var hasValues = false; + var subNodeEmpty = {}; + for (var i = 0; i < 0x100; i++) { + var uCode = node[i]; + var mbCode = prefix + i; + if (skipEncodeChars[mbCode]) + continue; -/***/ 24821: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + if (uCode >= 0) { + this._setEncodeChar(uCode, mbCode); + hasValues = true; + } else if (uCode <= NODE_START) { + var subNodeIdx = NODE_START - uCode; + if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). + var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. + if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) + hasValues = true; + else + subNodeEmpty[subNodeIdx] = true; + } + } else if (uCode <= SEQ_START) { + this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + hasValues = true; + } + } + return hasValues; +} -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); +// == Encoder ================================================================== -var errcode = __nccwpck_require__(5822); -var unixfs = __nccwpck_require__(81422); +function DBCSEncoder(options, codec) { + // Encoder state + this.leadSurrogate = -1; + this.seqObj = undefined; + + // Static data + this.encodeTable = codec.encodeTable; + this.encodeTableSeq = codec.encodeTableSeq; + this.defaultCharSingleByte = codec.defCharSB; + this.gb18030 = codec.gb18030; +} -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } +DBCSEncoder.prototype.write = function(str) { + var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), + leadSurrogate = this.leadSurrogate, + seqObj = this.seqObj, nextChar = -1, + i = 0, j = 0; -var errcode__default = /*#__PURE__*/_interopDefaultLegacy(errcode); + while (true) { + // 0. Get next character. + if (nextChar === -1) { + if (i == str.length) break; + var uCode = str.charCodeAt(i++); + } + else { + var uCode = nextChar; + nextChar = -1; + } -const PBData = unixfs.Data; -const types = [ - 'raw', - 'directory', - 'file', - 'metadata', - 'symlink', - 'hamt-sharded-directory' -]; -const dirTypes = [ - 'directory', - 'hamt-sharded-directory' + // 1. Handle surrogates. + if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. + if (uCode < 0xDC00) { // We've got lead surrogate. + if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + // Double lead surrogate found. + uCode = UNASSIGNED; + } + } else { // We've got trail surrogate. + if (leadSurrogate !== -1) { + uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); + leadSurrogate = -1; + } else { + // Incomplete surrogate pair - only trail surrogate found. + uCode = UNASSIGNED; + } + + } + } + else if (leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. + leadSurrogate = -1; + } + + // 2. Convert uCode character. + var dbcsCode = UNASSIGNED; + if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence + var resCode = seqObj[uCode]; + if (typeof resCode === 'object') { // Sequence continues. + seqObj = resCode; + continue; + + } else if (typeof resCode == 'number') { // Sequence finished. Write it. + dbcsCode = resCode; + + } else if (resCode == undefined) { // Current character is not part of the sequence. + + // Try default character for this sequence + resCode = seqObj[DEF_CHAR]; + if (resCode !== undefined) { + dbcsCode = resCode; // Found. Write it. + nextChar = uCode; // Current character will be written too in the next iteration. + + } else { + // TODO: What if we have no default? (resCode == undefined) + // Then, we should write first char of the sequence as-is and try the rest recursively. + // Didn't do it for now because no encoding has this situation yet. + // Currently, just skip the sequence and write current char. + } + } + seqObj = undefined; + } + else if (uCode >= 0) { // Regular character + var subtable = this.encodeTable[uCode >> 8]; + if (subtable !== undefined) + dbcsCode = subtable[uCode & 0xFF]; + + if (dbcsCode <= SEQ_START) { // Sequence start + seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; + continue; + } + + if (dbcsCode == UNASSIGNED && this.gb18030) { + // Use GB18030 algorithm to find character(s) to write. + var idx = findIdx(this.gb18030.uChars, uCode); + if (idx != -1) { + var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; + newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; + newBuf[j++] = 0x30 + dbcsCode; + continue; + } + } + } + + // 3. Write dbcsCode character. + if (dbcsCode === UNASSIGNED) + dbcsCode = this.defaultCharSingleByte; + + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else if (dbcsCode < 0x10000) { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + else if (dbcsCode < 0x1000000) { + newBuf[j++] = dbcsCode >> 16; + newBuf[j++] = (dbcsCode >> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; + } else { + newBuf[j++] = dbcsCode >>> 24; + newBuf[j++] = (dbcsCode >>> 16) & 0xFF; + newBuf[j++] = (dbcsCode >>> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; + } + } + + this.seqObj = seqObj; + this.leadSurrogate = leadSurrogate; + return newBuf.slice(0, j); +} + +DBCSEncoder.prototype.end = function() { + if (this.leadSurrogate === -1 && this.seqObj === undefined) + return; // All clean. Most often case. + + var newBuf = Buffer.alloc(10), j = 0; + + if (this.seqObj) { // We're in the sequence. + var dbcsCode = this.seqObj[DEF_CHAR]; + if (dbcsCode !== undefined) { // Write beginning of the sequence. + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + } else { + // See todo above. + } + this.seqObj = undefined; + } + + if (this.leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + newBuf[j++] = this.defaultCharSingleByte; + this.leadSurrogate = -1; + } + + return newBuf.slice(0, j); +} + +// Export for testing +DBCSEncoder.prototype.findIdx = findIdx; + + +// == Decoder ================================================================== + +function DBCSDecoder(options, codec) { + // Decoder state + this.nodeIdx = 0; + this.prevBytes = []; + + // Static data + this.decodeTables = codec.decodeTables; + this.decodeTableSeq = codec.decodeTableSeq; + this.defaultCharUnicode = codec.defaultCharUnicode; + this.gb18030 = codec.gb18030; +} + +DBCSDecoder.prototype.write = function(buf) { + var newBuf = Buffer.alloc(buf.length*2), + nodeIdx = this.nodeIdx, + prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, + seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. + uCode; + + for (var i = 0, j = 0; i < buf.length; i++) { + var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; + + // Lookup in current trie node. + var uCode = this.decodeTables[nodeIdx][curByte]; + + if (uCode >= 0) { + // Normal character, just use it. + } + else if (uCode === UNASSIGNED) { // Unknown char. + // TODO: Callback with seq. + uCode = this.defaultCharUnicode.charCodeAt(0); + i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. + } + else if (uCode === GB18030_CODE) { + if (i >= 3) { + var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); + } else { + var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + + (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + + (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + + (curByte-0x30); + } + var idx = findIdx(this.gb18030.gbChars, ptr); + uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; + } + else if (uCode <= NODE_START) { // Go to next trie node. + nodeIdx = NODE_START - uCode; + continue; + } + else if (uCode <= SEQ_START) { // Output a sequence of chars. + var seq = this.decodeTableSeq[SEQ_START - uCode]; + for (var k = 0; k < seq.length - 1; k++) { + uCode = seq[k]; + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + } + uCode = seq[seq.length-1]; + } + else + throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); + + // Write the character to buffer, handling higher planes using surrogate pair. + if (uCode >= 0x10000) { + uCode -= 0x10000; + var uCodeLead = 0xD800 | (uCode >> 10); + newBuf[j++] = uCodeLead & 0xFF; + newBuf[j++] = uCodeLead >> 8; + + uCode = 0xDC00 | (uCode & 0x3FF); + } + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + + // Reset trie node. + nodeIdx = 0; seqStart = i+1; + } + + this.nodeIdx = nodeIdx; + this.prevBytes = (seqStart >= 0) + ? Array.prototype.slice.call(buf, seqStart) + : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); + + return newBuf.slice(0, j).toString('ucs2'); +} + +DBCSDecoder.prototype.end = function() { + var ret = ''; + + // Try to parse all remaining chars. + while (this.prevBytes.length > 0) { + // Skip 1 character in the buffer. + ret += this.defaultCharUnicode; + var bytesArr = this.prevBytes.slice(1); + + // Parse remaining as usual. + this.prevBytes = []; + this.nodeIdx = 0; + if (bytesArr.length > 0) + ret += this.write(bytesArr); + } + + this.prevBytes = []; + this.nodeIdx = 0; + return ret; +} + +// Binary search for GB18030. Returns largest i such that table[i] <= val. +function findIdx(table, val) { + if (table[0] > val) + return -1; + + var l = 0, r = table.length; + while (l < r-1) { // always table[l] <= val < table[r] + var mid = l + ((r-l+1) >> 1); + if (table[mid] <= val) + l = mid; + else + r = mid; + } + return l; +} + + + +/***/ }), + +<<<<<<< HEAD +/***/ 12409: +======= +/***/ 54275: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +// Description of supported double byte encodings and aliases. +// Tables are not require()-d until they are needed to speed up library load. +// require()-s are direct to support Browserify. + +module.exports = { + + // == Japanese/ShiftJIS ==================================================== + // All japanese encodings are based on JIS X set of standards: + // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. + // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. + // Has several variations in 1978, 1983, 1990 and 1997. + // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. + // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. + // 2 planes, first is superset of 0208, second - revised 0212. + // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) + + // Byte encodings are: + // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte + // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. + // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. + // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. + // 0x00-0x7F - lower part of 0201 + // 0x8E, 0xA1-0xDF - upper part of 0201 + // (0xA1-0xFE)x2 - 0208 plane (94x94). + // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). + // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. + // Used as-is in ISO2022 family. + // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, + // 0201-1976 Roman, 0208-1978, 0208-1983. + // * ISO2022-JP-1: Adds esc seq for 0212-1990. + // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. + // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. + // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. + // + // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. + // + // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html + + 'shiftjis': { + type: '_dbcs', + table: function() { return __nccwpck_require__(94965) }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + encodeSkipVals: [{from: 0xED40, to: 0xF940}], + }, + 'csshiftjis': 'shiftjis', + 'mskanji': 'shiftjis', + 'sjis': 'shiftjis', + 'windows31j': 'shiftjis', + 'ms31j': 'shiftjis', + 'xsjis': 'shiftjis', + 'windows932': 'shiftjis', + 'ms932': 'shiftjis', + '932': 'shiftjis', + 'cp932': 'shiftjis', + + 'eucjp': { + type: '_dbcs', + table: function() { return __nccwpck_require__(9750) }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + }, + + // TODO: KDDI extension to Shift_JIS + // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. + // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. + + + // == Chinese/GBK ========================================================== + // http://en.wikipedia.org/wiki/GBK + // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder + + // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 + 'gb2312': 'cp936', + 'gb231280': 'cp936', + 'gb23121980': 'cp936', + 'csgb2312': 'cp936', + 'csiso58gb231280': 'cp936', + 'euccn': 'cp936', + + // Microsoft's CP936 is a subset and approximation of GBK. + 'windows936': 'cp936', + 'ms936': 'cp936', + '936': 'cp936', + 'cp936': { + type: '_dbcs', + table: function() { return __nccwpck_require__(94904) }, + }, + + // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. + 'gbk': { + type: '_dbcs', + table: function() { return (__nccwpck_require__(94904).concat)(__nccwpck_require__(49429)) }, + }, + 'xgbk': 'gbk', + 'isoir58': 'gbk', + + // GB18030 is an algorithmic extension of GBK. + // Main source: https://www.w3.org/TR/encoding/#gbk-encoder + // http://icu-project.org/docs/papers/gb18030.html + // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml + // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 + 'gb18030': { + type: '_dbcs', + table: function() { return (__nccwpck_require__(94904).concat)(__nccwpck_require__(49429)) }, + gb18030: function() { return __nccwpck_require__(25893) }, + encodeSkipVals: [0x80], + encodeAdd: {'€': 0xA2E3}, + }, + + 'chinese': 'gb18030', + + + // == Korean =============================================================== + // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. + 'windows949': 'cp949', + 'ms949': 'cp949', + '949': 'cp949', + 'cp949': { + type: '_dbcs', + table: function() { return __nccwpck_require__(13940) }, + }, + + 'cseuckr': 'cp949', + 'csksc56011987': 'cp949', + 'euckr': 'cp949', + 'isoir149': 'cp949', + 'korean': 'cp949', + 'ksc56011987': 'cp949', + 'ksc56011989': 'cp949', + 'ksc5601': 'cp949', + + + // == Big5/Taiwan/Hong Kong ================================================ + // There are lots of tables for Big5 and cp950. Please see the following links for history: + // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html + // Variations, in roughly number of defined chars: + // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT + // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ + // * Big5-2003 (Taiwan standard) almost superset of cp950. + // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. + // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. + // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. + // Plus, it has 4 combining sequences. + // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 + // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. + // Implementations are not consistent within browsers; sometimes labeled as just big5. + // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. + // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 + // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. + // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt + // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt + // + // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder + // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. + + 'windows950': 'cp950', + 'ms950': 'cp950', + '950': 'cp950', + 'cp950': { + type: '_dbcs', + table: function() { return __nccwpck_require__(7507) }, + }, + + // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. + 'big5': 'big5hkscs', + 'big5hkscs': { + type: '_dbcs', + table: function() { return (__nccwpck_require__(7507).concat)(__nccwpck_require__(53768)) }, + encodeSkipVals: [ + // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of + // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. + // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. + 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, + 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, + 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, + 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, + 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, + + // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 + 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, + ], + }, + + 'cnbig5': 'big5hkscs', + 'csbig5': 'big5hkscs', + 'xxbig5': 'big5hkscs', +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 80742: +======= +/***/ 80126: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +// Update this array if you add/rename/remove files in this directory. +// We support Browserify by skipping automatic module discovery and requiring modules directly. +var modules = [ +<<<<<<< HEAD + __nccwpck_require__(80434), + __nccwpck_require__(28641), + __nccwpck_require__(28712), + __nccwpck_require__(79211), + __nccwpck_require__(19716), + __nccwpck_require__(25456), + __nccwpck_require__(16804), + __nccwpck_require__(91573), + __nccwpck_require__(12409), +======= + __nccwpck_require__(72097), + __nccwpck_require__(85501), + __nccwpck_require__(71611), + __nccwpck_require__(64846), + __nccwpck_require__(16399), + __nccwpck_require__(94797), + __nccwpck_require__(43281), + __nccwpck_require__(20108), + __nccwpck_require__(54275), +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 ]; -const DEFAULT_FILE_MODE = parseInt('0644', 8); -const DEFAULT_DIRECTORY_MODE = parseInt('0755', 8); -function parseMode(mode) { - if (mode == null) { - return undefined; + +// Put all encoding/alias/codec definitions to single object and export it. +for (var i = 0; i < modules.length; i++) { + var module = modules[i]; + for (var enc in module) + if (Object.prototype.hasOwnProperty.call(module, enc)) + exports[enc] = module[enc]; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 80434: +======= +/***/ 72097: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +<<<<<<< HEAD +var Buffer = (__nccwpck_require__(95944).Buffer); +======= +var Buffer = (__nccwpck_require__(25213).Buffer); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// Export Node.js internal encodings. + +module.exports = { + // Encodings + utf8: { type: "_internal", bomAware: true}, + cesu8: { type: "_internal", bomAware: true}, + unicode11utf8: "utf8", + + ucs2: { type: "_internal", bomAware: true}, + utf16le: "ucs2", + + binary: { type: "_internal" }, + base64: { type: "_internal" }, + hex: { type: "_internal" }, + + // Codec. + _internal: InternalCodec, +}; + +//------------------------------------------------------------------------------ + +function InternalCodec(codecOptions, iconv) { + this.enc = codecOptions.encodingName; + this.bomAware = codecOptions.bomAware; + + if (this.enc === "base64") + this.encoder = InternalEncoderBase64; + else if (this.enc === "cesu8") { + this.enc = "utf8"; // Use utf8 for decoding. + this.encoder = InternalEncoderCesu8; + + // Add decoder for versions of Node not supporting CESU-8 + if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { + this.decoder = InternalDecoderCesu8; + this.defaultCharUnicode = iconv.defaultCharUnicode; + } + } +} + +InternalCodec.prototype.encoder = InternalEncoder; +InternalCodec.prototype.decoder = InternalDecoder; + +//------------------------------------------------------------------------------ + +// We use node.js internal decoder. Its signature is the same as ours. +var StringDecoder = (__nccwpck_require__(71576).StringDecoder); + +if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. + StringDecoder.prototype.end = function() {}; + + +function InternalDecoder(options, codec) { + this.decoder = new StringDecoder(codec.enc); +} + +InternalDecoder.prototype.write = function(buf) { + if (!Buffer.isBuffer(buf)) { + buf = Buffer.from(buf); + } + + return this.decoder.write(buf); +} + +InternalDecoder.prototype.end = function() { + return this.decoder.end(); +} + + +//------------------------------------------------------------------------------ +// Encoder is mostly trivial + +function InternalEncoder(options, codec) { + this.enc = codec.enc; +} + +InternalEncoder.prototype.write = function(str) { + return Buffer.from(str, this.enc); +} + +InternalEncoder.prototype.end = function() { +} + + +//------------------------------------------------------------------------------ +// Except base64 encoder, which must keep its state. + +function InternalEncoderBase64(options, codec) { + this.prevStr = ''; +} + +InternalEncoderBase64.prototype.write = function(str) { + str = this.prevStr + str; + var completeQuads = str.length - (str.length % 4); + this.prevStr = str.slice(completeQuads); + str = str.slice(0, completeQuads); + + return Buffer.from(str, "base64"); +} + +InternalEncoderBase64.prototype.end = function() { + return Buffer.from(this.prevStr, "base64"); +} + + +//------------------------------------------------------------------------------ +// CESU-8 encoder is also special. + +function InternalEncoderCesu8(options, codec) { +} + +InternalEncoderCesu8.prototype.write = function(str) { + var buf = Buffer.alloc(str.length * 3), bufIdx = 0; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + // Naive implementation, but it works because CESU-8 is especially easy + // to convert from UTF-16 (which all JS strings are encoded in). + if (charCode < 0x80) + buf[bufIdx++] = charCode; + else if (charCode < 0x800) { + buf[bufIdx++] = 0xC0 + (charCode >>> 6); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + else { // charCode will always be < 0x10000 in javascript. + buf[bufIdx++] = 0xE0 + (charCode >>> 12); + buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + } + return buf.slice(0, bufIdx); +} + +InternalEncoderCesu8.prototype.end = function() { +} + +//------------------------------------------------------------------------------ +// CESU-8 decoder is not implemented in Node v4.0+ + +function InternalDecoderCesu8(options, codec) { + this.acc = 0; + this.contBytes = 0; + this.accBytes = 0; + this.defaultCharUnicode = codec.defaultCharUnicode; +} + +InternalDecoderCesu8.prototype.write = function(buf) { + var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, + res = ''; + for (var i = 0; i < buf.length; i++) { + var curByte = buf[i]; + if ((curByte & 0xC0) !== 0x80) { // Leading byte + if (contBytes > 0) { // Previous code is invalid + res += this.defaultCharUnicode; + contBytes = 0; + } + + if (curByte < 0x80) { // Single-byte code + res += String.fromCharCode(curByte); + } else if (curByte < 0xE0) { // Two-byte code + acc = curByte & 0x1F; + contBytes = 1; accBytes = 1; + } else if (curByte < 0xF0) { // Three-byte code + acc = curByte & 0x0F; + contBytes = 2; accBytes = 1; + } else { // Four or more are not supported for CESU-8. + res += this.defaultCharUnicode; + } + } else { // Continuation byte + if (contBytes > 0) { // We're waiting for it. + acc = (acc << 6) | (curByte & 0x3f); + contBytes--; accBytes++; + if (contBytes === 0) { + // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) + if (accBytes === 2 && acc < 0x80 && acc > 0) + res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 0x800) + res += this.defaultCharUnicode; + else + // Actually add character. + res += String.fromCharCode(acc); + } + } else { // Unexpected continuation byte + res += this.defaultCharUnicode; + } + } + } + this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; + return res; +} + +InternalDecoderCesu8.prototype.end = function() { + var res = 0; + if (this.contBytes > 0) + res += this.defaultCharUnicode; + return res; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 19716: +======= +/***/ 16399: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +<<<<<<< HEAD +var Buffer = (__nccwpck_require__(95944).Buffer); +======= +var Buffer = (__nccwpck_require__(25213).Buffer); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that +// correspond to encoded bytes (if 128 - then lower half is ASCII). + +exports._sbcs = SBCSCodec; +function SBCSCodec(codecOptions, iconv) { + if (!codecOptions) + throw new Error("SBCS codec is called without the data.") + + // Prepare char buffer for decoding. + if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) + throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); + + if (codecOptions.chars.length === 128) { + var asciiString = ""; + for (var i = 0; i < 128; i++) + asciiString += String.fromCharCode(i); + codecOptions.chars = asciiString + codecOptions.chars; + } + + this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); + + // Encoding buffer. + var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); + + for (var i = 0; i < codecOptions.chars.length; i++) + encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + + this.encodeBuf = encodeBuf; +} + +SBCSCodec.prototype.encoder = SBCSEncoder; +SBCSCodec.prototype.decoder = SBCSDecoder; + + +function SBCSEncoder(options, codec) { + this.encodeBuf = codec.encodeBuf; +} + +SBCSEncoder.prototype.write = function(str) { + var buf = Buffer.alloc(str.length); + for (var i = 0; i < str.length; i++) + buf[i] = this.encodeBuf[str.charCodeAt(i)]; + + return buf; +} + +SBCSEncoder.prototype.end = function() { +} + + +function SBCSDecoder(options, codec) { + this.decodeBuf = codec.decodeBuf; +} + +SBCSDecoder.prototype.write = function(buf) { + // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. + var decodeBuf = this.decodeBuf; + var newBuf = Buffer.alloc(buf.length*2); + var idx1 = 0, idx2 = 0; + for (var i = 0; i < buf.length; i++) { + idx1 = buf[i]*2; idx2 = i*2; + newBuf[idx2] = decodeBuf[idx1]; + newBuf[idx2+1] = decodeBuf[idx1+1]; + } + return newBuf.toString('ucs2'); +} + +SBCSDecoder.prototype.end = function() { +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 16804: +======= +/***/ 43281: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. +module.exports = { + "437": "cp437", + "737": "cp737", + "775": "cp775", + "850": "cp850", + "852": "cp852", + "855": "cp855", + "856": "cp856", + "857": "cp857", + "858": "cp858", + "860": "cp860", + "861": "cp861", + "862": "cp862", + "863": "cp863", + "864": "cp864", + "865": "cp865", + "866": "cp866", + "869": "cp869", + "874": "windows874", + "922": "cp922", + "1046": "cp1046", + "1124": "cp1124", + "1125": "cp1125", + "1129": "cp1129", + "1133": "cp1133", + "1161": "cp1161", + "1162": "cp1162", + "1163": "cp1163", + "1250": "windows1250", + "1251": "windows1251", + "1252": "windows1252", + "1253": "windows1253", + "1254": "windows1254", + "1255": "windows1255", + "1256": "windows1256", + "1257": "windows1257", + "1258": "windows1258", + "28591": "iso88591", + "28592": "iso88592", + "28593": "iso88593", + "28594": "iso88594", + "28595": "iso88595", + "28596": "iso88596", + "28597": "iso88597", + "28598": "iso88598", + "28599": "iso88599", + "28600": "iso885910", + "28601": "iso885911", + "28603": "iso885913", + "28604": "iso885914", + "28605": "iso885915", + "28606": "iso885916", + "windows874": { + "type": "_sbcs", + "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "win874": "windows874", + "cp874": "windows874", + "windows1250": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "win1250": "windows1250", + "cp1250": "windows1250", + "windows1251": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "win1251": "windows1251", + "cp1251": "windows1251", + "windows1252": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "win1252": "windows1252", + "cp1252": "windows1252", + "windows1253": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "win1253": "windows1253", + "cp1253": "windows1253", + "windows1254": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "win1254": "windows1254", + "cp1254": "windows1254", + "windows1255": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "win1255": "windows1255", + "cp1255": "windows1255", + "windows1256": { + "type": "_sbcs", + "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" + }, + "win1256": "windows1256", + "cp1256": "windows1256", + "windows1257": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" + }, + "win1257": "windows1257", + "cp1257": "windows1257", + "windows1258": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "win1258": "windows1258", + "cp1258": "windows1258", + "iso88591": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28591": "iso88591", + "iso88592": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "cp28592": "iso88592", + "iso88593": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" + }, + "cp28593": "iso88593", + "iso88594": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" + }, + "cp28594": "iso88594", + "iso88595": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" + }, + "cp28595": "iso88595", + "iso88596": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" + }, + "cp28596": "iso88596", + "iso88597": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "cp28597": "iso88597", + "iso88598": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "cp28598": "iso88598", + "iso88599": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "cp28599": "iso88599", + "iso885910": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" + }, + "cp28600": "iso885910", + "iso885911": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "cp28601": "iso885911", + "iso885913": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" + }, + "cp28603": "iso885913", + "iso885914": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" + }, + "cp28604": "iso885914", + "iso885915": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28605": "iso885915", + "iso885916": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" + }, + "cp28606": "iso885916", + "cp437": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm437": "cp437", + "csibm437": "cp437", + "cp737": { + "type": "_sbcs", + "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " + }, + "ibm737": "cp737", + "csibm737": "cp737", + "cp775": { + "type": "_sbcs", + "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " + }, + "ibm775": "cp775", + "csibm775": "cp775", + "cp850": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm850": "cp850", + "csibm850": "cp850", + "cp852": { + "type": "_sbcs", + "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " + }, + "ibm852": "cp852", + "csibm852": "cp852", + "cp855": { + "type": "_sbcs", + "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " + }, + "ibm855": "cp855", + "csibm855": "cp855", + "cp856": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm856": "cp856", + "csibm856": "cp856", + "cp857": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " + }, + "ibm857": "cp857", + "csibm857": "cp857", + "cp858": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm858": "cp858", + "csibm858": "cp858", + "cp860": { + "type": "_sbcs", + "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm860": "cp860", + "csibm860": "cp860", + "cp861": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm861": "cp861", + "csibm861": "cp861", + "cp862": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm862": "cp862", + "csibm862": "cp862", + "cp863": { + "type": "_sbcs", + "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm863": "cp863", + "csibm863": "cp863", + "cp864": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" + }, + "ibm864": "cp864", + "csibm864": "cp864", + "cp865": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm865": "cp865", + "csibm865": "cp865", + "cp866": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " + }, + "ibm866": "cp866", + "csibm866": "cp866", + "cp869": { + "type": "_sbcs", + "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " + }, + "ibm869": "cp869", + "csibm869": "cp869", + "cp922": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" + }, + "ibm922": "cp922", + "csibm922": "cp922", + "cp1046": { + "type": "_sbcs", + "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" + }, + "ibm1046": "cp1046", + "csibm1046": "cp1046", + "cp1124": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" + }, + "ibm1124": "cp1124", + "csibm1124": "cp1124", + "cp1125": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " + }, + "ibm1125": "cp1125", + "csibm1125": "cp1125", + "cp1129": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1129": "cp1129", + "csibm1129": "cp1129", + "cp1133": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" + }, + "ibm1133": "cp1133", + "csibm1133": "cp1133", + "cp1161": { + "type": "_sbcs", + "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " + }, + "ibm1161": "cp1161", + "csibm1161": "cp1161", + "cp1162": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "ibm1162": "cp1162", + "csibm1162": "cp1162", + "cp1163": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1163": "cp1163", + "csibm1163": "cp1163", + "maccroatian": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" + }, + "maccyrillic": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "macgreek": { + "type": "_sbcs", + "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" + }, + "maciceland": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macroman": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macromania": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macthai": { + "type": "_sbcs", + "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" + }, + "macturkish": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macukraine": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "koi8r": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8u": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8ru": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8t": { + "type": "_sbcs", + "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "armscii8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" + }, + "rk1048": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "tcvn": { + "type": "_sbcs", + "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" + }, + "georgianacademy": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "georgianps": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "pt154": { + "type": "_sbcs", + "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "viscii": { + "type": "_sbcs", + "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" + }, + "iso646cn": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "iso646jp": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "hproman8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" + }, + "macintosh": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "ascii": { + "type": "_sbcs", + "chars": "��������������������������������������������������������������������������������������������������������������������������������" + }, + "tis620": { + "type": "_sbcs", + "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + } +} + +/***/ }), + +<<<<<<< HEAD +/***/ 25456: +======= +/***/ 94797: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +// Manually added data to be used by sbcs codec in addition to generated one. + +module.exports = { + // Not supported by iconv, not sure why. + "10029": "maccenteuro", + "maccenteuro": { + "type": "_sbcs", + "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" + }, + + "808": "cp808", + "ibm808": "cp808", + "cp808": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " + }, + + "mik": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + + "cp720": { + "type": "_sbcs", + "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" + }, + + // Aliases of generated encodings. + "ascii8bit": "ascii", + "usascii": "ascii", + "ansix34": "ascii", + "ansix341968": "ascii", + "ansix341986": "ascii", + "csascii": "ascii", + "cp367": "ascii", + "ibm367": "ascii", + "isoir6": "ascii", + "iso646us": "ascii", + "iso646irv": "ascii", + "us": "ascii", + + "latin1": "iso88591", + "latin2": "iso88592", + "latin3": "iso88593", + "latin4": "iso88594", + "latin5": "iso88599", + "latin6": "iso885910", + "latin7": "iso885913", + "latin8": "iso885914", + "latin9": "iso885915", + "latin10": "iso885916", + + "csisolatin1": "iso88591", + "csisolatin2": "iso88592", + "csisolatin3": "iso88593", + "csisolatin4": "iso88594", + "csisolatincyrillic": "iso88595", + "csisolatinarabic": "iso88596", + "csisolatingreek" : "iso88597", + "csisolatinhebrew": "iso88598", + "csisolatin5": "iso88599", + "csisolatin6": "iso885910", + + "l1": "iso88591", + "l2": "iso88592", + "l3": "iso88593", + "l4": "iso88594", + "l5": "iso88599", + "l6": "iso885910", + "l7": "iso885913", + "l8": "iso885914", + "l9": "iso885915", + "l10": "iso885916", + + "isoir14": "iso646jp", + "isoir57": "iso646cn", + "isoir100": "iso88591", + "isoir101": "iso88592", + "isoir109": "iso88593", + "isoir110": "iso88594", + "isoir144": "iso88595", + "isoir127": "iso88596", + "isoir126": "iso88597", + "isoir138": "iso88598", + "isoir148": "iso88599", + "isoir157": "iso885910", + "isoir166": "tis620", + "isoir179": "iso885913", + "isoir199": "iso885914", + "isoir203": "iso885915", + "isoir226": "iso885916", + + "cp819": "iso88591", + "ibm819": "iso88591", + + "cyrillic": "iso88595", + + "arabic": "iso88596", + "arabic8": "iso88596", + "ecma114": "iso88596", + "asmo708": "iso88596", + + "greek" : "iso88597", + "greek8" : "iso88597", + "ecma118" : "iso88597", + "elot928" : "iso88597", + + "hebrew": "iso88598", + "hebrew8": "iso88598", + + "turkish": "iso88599", + "turkish8": "iso88599", + + "thai": "iso885911", + "thai8": "iso885911", + + "celtic": "iso885914", + "celtic8": "iso885914", + "isoceltic": "iso885914", + + "tis6200": "tis620", + "tis62025291": "tis620", + "tis62025330": "tis620", + + "10000": "macroman", + "10006": "macgreek", + "10007": "maccyrillic", + "10079": "maciceland", + "10081": "macturkish", + + "cspc8codepage437": "cp437", + "cspc775baltic": "cp775", + "cspc850multilingual": "cp850", + "cspcp852": "cp852", + "cspc862latinhebrew": "cp862", + "cpgr": "cp869", + + "msee": "cp1250", + "mscyrl": "cp1251", + "msansi": "cp1252", + "msgreek": "cp1253", + "msturk": "cp1254", + "mshebr": "cp1255", + "msarab": "cp1256", + "winbaltrim": "cp1257", + + "cp20866": "koi8r", + "20866": "koi8r", + "ibm878": "koi8r", + "cskoi8r": "koi8r", + + "cp21866": "koi8u", + "21866": "koi8u", + "ibm1168": "koi8u", + + "strk10482002": "rk1048", + + "tcvn5712": "tcvn", + "tcvn57121": "tcvn", + + "gb198880": "iso646cn", + "cn": "iso646cn", + + "csiso14jisc6220ro": "iso646jp", + "jisc62201969ro": "iso646jp", + "jp": "iso646jp", + + "cshproman8": "hproman8", + "r8": "hproman8", + "roman8": "hproman8", + "xroman8": "hproman8", + "ibm1051": "hproman8", + + "mac": "macintosh", + "csmacintosh": "macintosh", +}; + + + +/***/ }), + +<<<<<<< HEAD +/***/ 28712: +======= +/***/ 71611: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +<<<<<<< HEAD +var Buffer = (__nccwpck_require__(95944).Buffer); +======= +var Buffer = (__nccwpck_require__(25213).Buffer); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js + +// == UTF16-BE codec. ========================================================== + +exports.utf16be = Utf16BECodec; +function Utf16BECodec() { +} + +Utf16BECodec.prototype.encoder = Utf16BEEncoder; +Utf16BECodec.prototype.decoder = Utf16BEDecoder; +Utf16BECodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf16BEEncoder() { +} + +Utf16BEEncoder.prototype.write = function(str) { + var buf = Buffer.from(str, 'ucs2'); + for (var i = 0; i < buf.length; i += 2) { + var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; + } + return buf; +} + +Utf16BEEncoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf16BEDecoder() { + this.overflowByte = -1; +} + +Utf16BEDecoder.prototype.write = function(buf) { + if (buf.length == 0) + return ''; + + var buf2 = Buffer.alloc(buf.length + 1), + i = 0, j = 0; + + if (this.overflowByte !== -1) { + buf2[0] = buf[0]; + buf2[1] = this.overflowByte; + i = 1; j = 2; + } + + for (; i < buf.length-1; i += 2, j+= 2) { + buf2[j] = buf[i+1]; + buf2[j+1] = buf[i]; + } + + this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; + + return buf2.slice(0, j).toString('ucs2'); +} + +Utf16BEDecoder.prototype.end = function() { + this.overflowByte = -1; +} + + +// == UTF-16 codec ============================================================= +// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. +// Defaults to UTF-16LE, as it's prevalent and default in Node. +// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le +// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); + +// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). + +exports.utf16 = Utf16Codec; +function Utf16Codec(codecOptions, iconv) { + this.iconv = iconv; +} + +Utf16Codec.prototype.encoder = Utf16Encoder; +Utf16Codec.prototype.decoder = Utf16Decoder; + + +// -- Encoding (pass-through) + +function Utf16Encoder(options, codec) { + options = options || {}; + if (options.addBOM === undefined) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder('utf-16le', options); +} + +Utf16Encoder.prototype.write = function(str) { + return this.encoder.write(str); +} + +Utf16Encoder.prototype.end = function() { + return this.encoder.end(); +} + + +// -- Decoding + +function Utf16Decoder(options, codec) { + this.decoder = null; + this.initialBufs = []; + this.initialBufsLen = 0; + + this.options = options || {}; + this.iconv = codec.iconv; +} + +Utf16Decoder.prototype.write = function(buf) { + if (!this.decoder) { + // Codec is not chosen yet. Accumulate initial bytes. + this.initialBufs.push(buf); + this.initialBufsLen += buf.length; + + if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) + return ''; + + // We have enough bytes -> detect endianness. + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + + return this.decoder.write(buf); +} + +Utf16Decoder.prototype.end = function() { + if (!this.decoder) { + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + + var trail = this.decoder.end(); + if (trail) + resStr += trail; + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + return this.decoder.end(); +} + +function detectEncoding(bufs, defaultEncoding) { + var b = []; + var charsProcessed = 0; + var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. + + outer_loop: + for (var i = 0; i < bufs.length; i++) { + var buf = bufs[i]; + for (var j = 0; j < buf.length; j++) { + b.push(buf[j]); + if (b.length === 2) { + if (charsProcessed === 0) { + // Check BOM first. + if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; + if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; + } + + if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; + if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; + + b.length = 0; + charsProcessed++; + + if (charsProcessed >= 100) { + break outer_loop; + } + } + } + } + + // Make decisions. + // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. + // So, we count ASCII as if it was LE or BE, and decide from that. + if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; + if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; + + // Couldn't decide (likely all zeros or not enough data). + return defaultEncoding || 'utf-16le'; +} + + + + +/***/ }), + +<<<<<<< HEAD +/***/ 28641: +======= +/***/ 85501: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +var Buffer = (__nccwpck_require__(95944).Buffer); +======= +var Buffer = (__nccwpck_require__(25213).Buffer); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// == UTF32-LE/BE codec. ========================================================== + +exports._utf32 = Utf32Codec; + +function Utf32Codec(codecOptions, iconv) { + this.iconv = iconv; + this.bomAware = true; + this.isLE = codecOptions.isLE; +} + +exports.utf32le = { type: '_utf32', isLE: true }; +exports.utf32be = { type: '_utf32', isLE: false }; + +// Aliases +exports.ucs4le = 'utf32le'; +exports.ucs4be = 'utf32be'; + +Utf32Codec.prototype.encoder = Utf32Encoder; +Utf32Codec.prototype.decoder = Utf32Decoder; + +// -- Encoding + +function Utf32Encoder(options, codec) { + this.isLE = codec.isLE; + this.highSurrogate = 0; +} + +Utf32Encoder.prototype.write = function(str) { + var src = Buffer.from(str, 'ucs2'); + var dst = Buffer.alloc(src.length * 2); + var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; + var offset = 0; + + for (var i = 0; i < src.length; i += 2) { + var code = src.readUInt16LE(i); + var isHighSurrogate = (0xD800 <= code && code < 0xDC00); + var isLowSurrogate = (0xDC00 <= code && code < 0xE000); + + if (this.highSurrogate) { + if (isHighSurrogate || !isLowSurrogate) { + // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low + // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character + // (technically wrong, but expected by some applications, like Windows file names). + write32.call(dst, this.highSurrogate, offset); + offset += 4; + } + else { + // Create 32-bit value from high and low surrogates; + var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000; + + write32.call(dst, codepoint, offset); + offset += 4; + this.highSurrogate = 0; + + continue; + } + } + + if (isHighSurrogate) + this.highSurrogate = code; + else { + // Even if the current character is a low surrogate, with no previous high surrogate, we'll + // encode it as a semi-invalid stand-alone character for the same reasons expressed above for + // unpaired high surrogates. + write32.call(dst, code, offset); + offset += 4; + this.highSurrogate = 0; + } + } + + if (offset < dst.length) + dst = dst.slice(0, offset); + + return dst; +}; + +Utf32Encoder.prototype.end = function() { + // Treat any leftover high surrogate as a semi-valid independent character. + if (!this.highSurrogate) + return; + + var buf = Buffer.alloc(4); + + if (this.isLE) + buf.writeUInt32LE(this.highSurrogate, 0); + else + buf.writeUInt32BE(this.highSurrogate, 0); + + this.highSurrogate = 0; + + return buf; +}; + +// -- Decoding + +function Utf32Decoder(options, codec) { + this.isLE = codec.isLE; + this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); + this.overflow = []; +} + +Utf32Decoder.prototype.write = function(src) { + if (src.length === 0) + return ''; + + var i = 0; + var codepoint = 0; + var dst = Buffer.alloc(src.length + 4); + var offset = 0; + var isLE = this.isLE; + var overflow = this.overflow; + var badChar = this.badChar; + + if (overflow.length > 0) { + for (; i < src.length && overflow.length < 4; i++) + overflow.push(src[i]); + + if (overflow.length === 4) { + // NOTE: codepoint is a signed int32 and can be negative. + // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). + if (isLE) { + codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24); + } else { + codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24); + } + overflow.length = 0; + + offset = _writeCodepoint(dst, offset, codepoint, badChar); + } + } + + // Main loop. Should be as optimized as possible. + for (; i < src.length - 3; i += 4) { + // NOTE: codepoint is a signed int32 and can be negative. + if (isLE) { + codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24); + } else { + codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24); + } + offset = _writeCodepoint(dst, offset, codepoint, badChar); + } + + // Keep overflowing bytes. + for (; i < src.length; i++) { + overflow.push(src[i]); + } + + return dst.slice(0, offset).toString('ucs2'); +}; + +function _writeCodepoint(dst, offset, codepoint, badChar) { + // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. + if (codepoint < 0 || codepoint > 0x10FFFF) { + // Not a valid Unicode codepoint + codepoint = badChar; + } + + // Ephemeral Planes: Write high surrogate. + if (codepoint >= 0x10000) { + codepoint -= 0x10000; + + var high = 0xD800 | (codepoint >> 10); + dst[offset++] = high & 0xff; + dst[offset++] = high >> 8; + + // Low surrogate is written below. + var codepoint = 0xDC00 | (codepoint & 0x3FF); + } + + // Write BMP char or low surrogate. + dst[offset++] = codepoint & 0xff; + dst[offset++] = codepoint >> 8; + + return offset; +}; + +Utf32Decoder.prototype.end = function() { + this.overflow.length = 0; +}; + +// == UTF-32 Auto codec ============================================================= +// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. +// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 +// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); + +// Encoder prepends BOM (which can be overridden with (addBOM: false}). + +exports.utf32 = Utf32AutoCodec; +exports.ucs4 = 'utf32'; + +function Utf32AutoCodec(options, iconv) { + this.iconv = iconv; +} + +Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; +Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; + +// -- Encoding + +function Utf32AutoEncoder(options, codec) { + options = options || {}; + + if (options.addBOM === undefined) + options.addBOM = true; + + this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options); +} + +Utf32AutoEncoder.prototype.write = function(str) { + return this.encoder.write(str); +}; + +Utf32AutoEncoder.prototype.end = function() { + return this.encoder.end(); +}; + +// -- Decoding + +function Utf32AutoDecoder(options, codec) { + this.decoder = null; + this.initialBufs = []; + this.initialBufsLen = 0; + this.options = options || {}; + this.iconv = codec.iconv; +} + +Utf32AutoDecoder.prototype.write = function(buf) { + if (!this.decoder) { + // Codec is not chosen yet. Accumulate initial bytes. + this.initialBufs.push(buf); + this.initialBufsLen += buf.length; + + if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) + return ''; + + // We have enough bytes -> detect endianness. + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + + return this.decoder.write(buf); +}; + +Utf32AutoDecoder.prototype.end = function() { + if (!this.decoder) { + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + + var trail = this.decoder.end(); + if (trail) + resStr += trail; + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + + return this.decoder.end(); +}; + +function detectEncoding(bufs, defaultEncoding) { + var b = []; + var charsProcessed = 0; + var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE. + var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE. + + outer_loop: + for (var i = 0; i < bufs.length; i++) { + var buf = bufs[i]; + for (var j = 0; j < buf.length; j++) { + b.push(buf[j]); + if (b.length === 4) { + if (charsProcessed === 0) { + // Check BOM first. + if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { + return 'utf-32le'; + } + if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { + return 'utf-32be'; + } + } + + if (b[0] !== 0 || b[1] > 0x10) invalidBE++; + if (b[3] !== 0 || b[2] > 0x10) invalidLE++; + + if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; + if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; + + b.length = 0; + charsProcessed++; + + if (charsProcessed >= 100) { + break outer_loop; + } + } + } + } + + // Make decisions. + if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be'; + if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le'; + + // Couldn't decide (likely all zeros or not enough data). + return defaultEncoding || 'utf-32le'; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 79211: +======= +/***/ 64846: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +<<<<<<< HEAD +var Buffer = (__nccwpck_require__(95944).Buffer); +======= +var Buffer = (__nccwpck_require__(25213).Buffer); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 +// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 + +exports.utf7 = Utf7Codec; +exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 +function Utf7Codec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7Codec.prototype.encoder = Utf7Encoder; +Utf7Codec.prototype.decoder = Utf7Decoder; +Utf7Codec.prototype.bomAware = true; + + +// -- Encoding + +var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; + +function Utf7Encoder(options, codec) { + this.iconv = codec.iconv; +} + +Utf7Encoder.prototype.write = function(str) { + // Naive implementation. + // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". + return Buffer.from(str.replace(nonDirectChars, function(chunk) { + return "+" + (chunk === '+' ? '' : + this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + + "-"; + }.bind(this))); +} + +Utf7Encoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf7Decoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64Regex = /[A-Za-z0-9\/+]/; +var base64Chars = []; +for (var i = 0; i < 256; i++) + base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + +var plusChar = '+'.charCodeAt(0), + minusChar = '-'.charCodeAt(0), + andChar = '&'.charCodeAt(0); + +Utf7Decoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '+' + if (buf[i] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64Chars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" + res += "+"; + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus is absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7Decoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + +// UTF-7-IMAP codec. +// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) +// Differences: +// * Base64 part is started by "&" instead of "+" +// * Direct characters are 0x20-0x7E, except "&" (0x26) +// * In Base64, "," is used instead of "/" +// * Base64 must not be used to represent direct characters. +// * No implicit shift back from Base64 (should always end with '-') +// * String must end in non-shifted position. +// * "-&" while in base64 is not allowed. + + +exports.utf7imap = Utf7IMAPCodec; +function Utf7IMAPCodec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; +Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; +Utf7IMAPCodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf7IMAPEncoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = Buffer.alloc(6); + this.base64AccumIdx = 0; +} + +Utf7IMAPEncoder.prototype.write = function(str) { + var inBase64 = this.inBase64, + base64Accum = this.base64Accum, + base64AccumIdx = this.base64AccumIdx, + buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; + + for (var i = 0; i < str.length; i++) { + var uChar = str.charCodeAt(i); + if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. + if (inBase64) { + if (base64AccumIdx > 0) { + bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + inBase64 = false; + } + + if (!inBase64) { + buf[bufIdx++] = uChar; // Write direct character + + if (uChar === andChar) // Ampersand -> '&-' + buf[bufIdx++] = minusChar; + } + + } else { // Non-direct character + if (!inBase64) { + buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. + inBase64 = true; + } + if (inBase64) { + base64Accum[base64AccumIdx++] = uChar >> 8; + base64Accum[base64AccumIdx++] = uChar & 0xFF; + + if (base64AccumIdx == base64Accum.length) { + bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); + base64AccumIdx = 0; + } + } + } + } + + this.inBase64 = inBase64; + this.base64AccumIdx = base64AccumIdx; + + return buf.slice(0, bufIdx); +} + +Utf7IMAPEncoder.prototype.end = function() { + var buf = Buffer.alloc(10), bufIdx = 0; + if (this.inBase64) { + if (this.base64AccumIdx > 0) { + bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + this.base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + this.inBase64 = false; + } + + return buf.slice(0, bufIdx); +} + + +// -- Decoding + +function Utf7IMAPDecoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64IMAPChars = base64Chars.slice(); +base64IMAPChars[','.charCodeAt(0)] = true; + +Utf7IMAPDecoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '&' + if (buf[i] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64IMAPChars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" + res += "&"; + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus may be absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7IMAPDecoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + + + +/***/ }), + +<<<<<<< HEAD +/***/ 46685: +======= +/***/ 86302: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +var BOMChar = '\uFEFF'; + +exports.PrependBOM = PrependBOMWrapper +function PrependBOMWrapper(encoder, options) { + this.encoder = encoder; + this.addBOM = true; +} + +PrependBOMWrapper.prototype.write = function(str) { + if (this.addBOM) { + str = BOMChar + str; + this.addBOM = false; + } + + return this.encoder.write(str); +} + +PrependBOMWrapper.prototype.end = function() { + return this.encoder.end(); +} + + +//------------------------------------------------------------------------------ + +exports.StripBOM = StripBOMWrapper; +function StripBOMWrapper(decoder, options) { + this.decoder = decoder; + this.pass = false; + this.options = options || {}; +} + +StripBOMWrapper.prototype.write = function(buf) { + var res = this.decoder.write(buf); + if (this.pass || !res) + return res; + + if (res[0] === BOMChar) { + res = res.slice(1); + if (typeof this.options.stripBOM === 'function') + this.options.stripBOM(); + } + + this.pass = true; + return res; +} + +StripBOMWrapper.prototype.end = function() { + return this.decoder.end(); +} + + + +/***/ }), + +<<<<<<< HEAD +/***/ 72249: +======= +/***/ 17281: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +var Buffer = (__nccwpck_require__(95944).Buffer); + +var bomHandling = __nccwpck_require__(46685), +======= +var Buffer = (__nccwpck_require__(25213).Buffer); + +var bomHandling = __nccwpck_require__(86302), +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + iconv = module.exports; + +// All codecs and aliases are kept here, keyed by encoding name/alias. +// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. +iconv.encodings = null; + +// Characters emitted in case of error. +iconv.defaultCharUnicode = '�'; +iconv.defaultCharSingleByte = '?'; + +// Public API. +iconv.encode = function encode(str, encoding, options) { + str = "" + (str || ""); // Ensure string. + + var encoder = iconv.getEncoder(encoding, options); + + var res = encoder.write(str); + var trail = encoder.end(); + + return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; +} + +iconv.decode = function decode(buf, encoding, options) { + if (typeof buf === 'string') { + if (!iconv.skipDecodeWarning) { + console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); + iconv.skipDecodeWarning = true; + } + + buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. + } + + var decoder = iconv.getDecoder(encoding, options); + + var res = decoder.write(buf); + var trail = decoder.end(); + + return trail ? (res + trail) : res; +} + +iconv.encodingExists = function encodingExists(enc) { + try { + iconv.getCodec(enc); + return true; + } catch (e) { + return false; + } +} + +// Legacy aliases to convert functions +iconv.toEncoding = iconv.encode; +iconv.fromEncoding = iconv.decode; + +// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. +iconv._codecDataCache = {}; +iconv.getCodec = function getCodec(encoding) { + if (!iconv.encodings) +<<<<<<< HEAD + iconv.encodings = __nccwpck_require__(80742); // Lazy load all encoding definitions. +======= + iconv.encodings = __nccwpck_require__(80126); // Lazy load all encoding definitions. +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + var enc = iconv._canonicalizeEncoding(encoding); + + // Traverse iconv.encodings to find actual codec. + var codecOptions = {}; + while (true) { + var codec = iconv._codecDataCache[enc]; + if (codec) + return codec; + + var codecDef = iconv.encodings[enc]; + + switch (typeof codecDef) { + case "string": // Direct alias to other encoding. + enc = codecDef; + break; + + case "object": // Alias with options. Can be layered. + for (var key in codecDef) + codecOptions[key] = codecDef[key]; + + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + enc = codecDef.type; + break; + + case "function": // Codec itself. + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + // The codec function must load all tables and return object with .encoder and .decoder methods. + // It'll be called only once (for each different options object). + codec = new codecDef(codecOptions, iconv); + + iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. + return codec; + + default: + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); + } + } +} + +iconv._canonicalizeEncoding = function(encoding) { + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); +} + +iconv.getEncoder = function getEncoder(encoding, options) { + var codec = iconv.getCodec(encoding), + encoder = new codec.encoder(options, codec); + + if (codec.bomAware && options && options.addBOM) + encoder = new bomHandling.PrependBOM(encoder, options); + + return encoder; +} + +iconv.getDecoder = function getDecoder(encoding, options) { + var codec = iconv.getCodec(encoding), + decoder = new codec.decoder(options, codec); + + if (codec.bomAware && !(options && options.stripBOM === false)) + decoder = new bomHandling.StripBOM(decoder, options); + + return decoder; +} + +// Streaming API +// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add +// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. +// If you would like to enable it explicitly, please add the following code to your app: +// > iconv.enableStreamingAPI(require('stream')); +iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { + if (iconv.supportsStreams) + return; + + // Dependency-inject stream module to create IconvLite stream classes. +<<<<<<< HEAD + var streams = __nccwpck_require__(31699)(stream_module); +======= + var streams = __nccwpck_require__(90016)(stream_module); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + // Not public API yet, but expose the stream classes. + iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; + + // Streaming API. + iconv.encodeStream = function encodeStream(encoding, options) { + return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + } + + iconv.decodeStream = function decodeStream(encoding, options) { + return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + } + + iconv.supportsStreams = true; +} + +// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). +var stream_module; +try { + stream_module = __nccwpck_require__(12781); +} catch (e) {} + +if (stream_module && stream_module.Transform) { + iconv.enableStreamingAPI(stream_module); + +} else { + // In rare cases where 'stream' module is not available by default, throw a helpful exception. + iconv.encodeStream = iconv.decodeStream = function() { + throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); + }; +} + +if (false) {} + + +/***/ }), + +<<<<<<< HEAD +/***/ 31699: +======= +/***/ 90016: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +var Buffer = (__nccwpck_require__(95944).Buffer); +======= +var Buffer = (__nccwpck_require__(25213).Buffer); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), +// we opt to dependency-inject it instead of creating a hard dependency. +module.exports = function(stream_module) { + var Transform = stream_module.Transform; + + // == Encoder stream ======================================================= + + function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; // We accept only strings, so we don't need to decode them. + Transform.call(this, options); + } + + IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } + }); + + IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != 'string') + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on('error', cb); + this.on('data', function(chunk) { chunks.push(chunk); }); + this.on('end', function() { + cb(null, Buffer.concat(chunks)); + }); + return this; + } + + + // == Decoder stream ======================================================= + + function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = 'utf8'; // We output strings. + Transform.call(this, options); + } + + IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } + }); + + IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ''; + this.on('error', cb); + this.on('data', function(chunk) { res += chunk; }); + this.on('end', function() { + cb(null, res); + }); + return this; + } + + return { + IconvLiteEncoderStream: IconvLiteEncoderStream, + IconvLiteDecoderStream: IconvLiteDecoderStream, + }; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 22077: +======= +/***/ 40407: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decodeHTML = exports.decodeHTMLStrict = exports.decodeXML = void 0; +var entities_json_1 = __importDefault(__nccwpck_require__(59323)); +var legacy_json_1 = __importDefault(__nccwpck_require__(29591)); +var xml_json_1 = __importDefault(__nccwpck_require__(2586)); +var decode_codepoint_1 = __importDefault(__nccwpck_require__(5689)); +var strictEntityRe = /&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g; +exports.decodeXML = getStrictDecoder(xml_json_1.default); +exports.decodeHTMLStrict = getStrictDecoder(entities_json_1.default); +function getStrictDecoder(map) { + var replace = getReplacer(map); + return function (str) { return String(str).replace(strictEntityRe, replace); }; +} +var sorter = function (a, b) { return (a < b ? 1 : -1); }; +exports.decodeHTML = (function () { + var legacy = Object.keys(legacy_json_1.default).sort(sorter); + var keys = Object.keys(entities_json_1.default).sort(sorter); + for (var i = 0, j = 0; i < keys.length; i++) { + if (legacy[j] === keys[i]) { + keys[i] += ";?"; + j++; + } + else { + keys[i] += ";"; + } + } + var re = new RegExp("&(?:" + keys.join("|") + "|#[xX][\\da-fA-F]+;?|#\\d+;?)", "g"); + var replace = getReplacer(entities_json_1.default); + function replacer(str) { + if (str.substr(-1) !== ";") + str += ";"; + return replace(str); + } + // TODO consider creating a merged map + return function (str) { return String(str).replace(re, replacer); }; +})(); +function getReplacer(map) { + return function replace(str) { + if (str.charAt(1) === "#") { + var secondChar = str.charAt(2); + if (secondChar === "X" || secondChar === "x") { + return decode_codepoint_1.default(parseInt(str.substr(3), 16)); + } + return decode_codepoint_1.default(parseInt(str.substr(2), 10)); + } + // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing + return map[str.slice(1, -1)] || str; + }; +} + + +/***/ }), + +/***/ 5689: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +var decode_json_1 = __importDefault(__nccwpck_require__(33600)); +// Adapted from https://github.com/mathiasbynens/he/blob/master/src/he.js#L94-L119 +var fromCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition +String.fromCodePoint || + function (codePoint) { + var output = ""; + if (codePoint > 0xffff) { + codePoint -= 0x10000; + output += String.fromCharCode(((codePoint >>> 10) & 0x3ff) | 0xd800); + codePoint = 0xdc00 | (codePoint & 0x3ff); + } + output += String.fromCharCode(codePoint); + return output; + }; +function decodeCodePoint(codePoint) { + if ((codePoint >= 0xd800 && codePoint <= 0xdfff) || codePoint > 0x10ffff) { + return "\uFFFD"; + } + if (codePoint in decode_json_1.default) { + codePoint = decode_json_1.default[codePoint]; + } + return fromCodePoint(codePoint); +} +exports["default"] = decodeCodePoint; + + +/***/ }), + +/***/ 95714: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = void 0; +var xml_json_1 = __importDefault(__nccwpck_require__(2586)); +var inverseXML = getInverseObj(xml_json_1.default); +var xmlReplacer = getInverseReplacer(inverseXML); +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using XML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +exports.encodeXML = getASCIIEncoder(inverseXML); +var entities_json_1 = __importDefault(__nccwpck_require__(59323)); +var inverseHTML = getInverseObj(entities_json_1.default); +var htmlReplacer = getInverseReplacer(inverseHTML); +/** + * Encodes all entities and non-ASCII characters in the input. + * + * This includes characters that are valid ASCII characters in HTML documents. + * For example `#` will be encoded as `#`. To get a more compact output, + * consider using the `encodeNonAsciiHTML` function. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +exports.encodeHTML = getInverse(inverseHTML, htmlReplacer); +/** + * Encodes all non-ASCII characters, as well as characters not valid in HTML + * documents using HTML entities. + * + * If a character has no equivalent entity, a + * numeric hexadecimal reference (eg. `ü`) will be used. + */ +exports.encodeNonAsciiHTML = getASCIIEncoder(inverseHTML); +function getInverseObj(obj) { + return Object.keys(obj) + .sort() + .reduce(function (inverse, name) { + inverse[obj[name]] = "&" + name + ";"; + return inverse; + }, {}); +} +function getInverseReplacer(inverse) { + var single = []; + var multiple = []; + for (var _i = 0, _a = Object.keys(inverse); _i < _a.length; _i++) { + var k = _a[_i]; + if (k.length === 1) { + // Add value to single array + single.push("\\" + k); + } + else { + // Add value to multiple array + multiple.push(k); + } + } + // Add ranges to single characters. + single.sort(); + for (var start = 0; start < single.length - 1; start++) { + // Find the end of a run of characters + var end = start; + while (end < single.length - 1 && + single[end].charCodeAt(1) + 1 === single[end + 1].charCodeAt(1)) { + end += 1; + } + var count = 1 + end - start; + // We want to replace at least three characters + if (count < 3) + continue; + single.splice(start, count, single[start] + "-" + single[end]); + } + multiple.unshift("[" + single.join("") + "]"); + return new RegExp(multiple.join("|"), "g"); +} +// /[^\0-\x7F]/gu +var reNonASCII = /(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g; +var getCodePoint = +// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition +String.prototype.codePointAt != null + ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + function (str) { return str.codePointAt(0); } + : // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae + function (c) { + return (c.charCodeAt(0) - 0xd800) * 0x400 + + c.charCodeAt(1) - + 0xdc00 + + 0x10000; + }; +function singleCharReplacer(c) { + return "&#x" + (c.length > 1 ? getCodePoint(c) : c.charCodeAt(0)) + .toString(16) + .toUpperCase() + ";"; +} +function getInverse(inverse, re) { + return function (data) { + return data + .replace(re, function (name) { return inverse[name]; }) + .replace(reNonASCII, singleCharReplacer); + }; +} +var reEscapeChars = new RegExp(xmlReplacer.source + "|" + reNonASCII.source, "g"); +/** + * Encodes all non-ASCII characters, as well as characters not valid in XML + * documents using numeric hexadecimal reference (eg. `ü`). + * + * Have a look at `escapeUTF8` if you want a more concise output at the expense + * of reduced transportability. + * + * @param data String to escape. + */ +function escape(data) { + return data.replace(reEscapeChars, singleCharReplacer); +} +exports.escape = escape; +/** + * Encodes all characters not valid in XML documents using numeric hexadecimal + * reference (eg. `ü`). + * + * Note that the output will be character-set dependent. + * + * @param data String to escape. + */ +function escapeUTF8(data) { + return data.replace(xmlReplacer, singleCharReplacer); +} +exports.escapeUTF8 = escapeUTF8; +function getASCIIEncoder(obj) { + return function (data) { + return data.replace(reEscapeChars, function (c) { return obj[c] || singleCharReplacer(c); }); + }; +} + + +/***/ }), + +/***/ 78677: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.decodeXMLStrict = exports.decodeHTML5Strict = exports.decodeHTML4Strict = exports.decodeHTML5 = exports.decodeHTML4 = exports.decodeHTMLStrict = exports.decodeHTML = exports.decodeXML = exports.encodeHTML5 = exports.encodeHTML4 = exports.escapeUTF8 = exports.escape = exports.encodeNonAsciiHTML = exports.encodeHTML = exports.encodeXML = exports.encode = exports.decodeStrict = exports.decode = void 0; +var decode_1 = __nccwpck_require__(40407); +var encode_1 = __nccwpck_require__(95714); +/** + * Decodes a string with entities. + * + * @param data String to decode. + * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0. + * @deprecated Use `decodeXML` or `decodeHTML` directly. + */ +function decode(data, level) { + return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTML)(data); +} +exports.decode = decode; +/** + * Decodes a string with entities. Does not allow missing trailing semicolons for entities. + * + * @param data String to decode. + * @param level Optional level to decode at. 0 = XML, 1 = HTML. Default is 0. + * @deprecated Use `decodeHTMLStrict` or `decodeXML` directly. + */ +function decodeStrict(data, level) { + return (!level || level <= 0 ? decode_1.decodeXML : decode_1.decodeHTMLStrict)(data); +} +exports.decodeStrict = decodeStrict; +/** + * Encodes a string with entities. + * + * @param data String to encode. + * @param level Optional level to encode at. 0 = XML, 1 = HTML. Default is 0. + * @deprecated Use `encodeHTML`, `encodeXML` or `encodeNonAsciiHTML` directly. + */ +function encode(data, level) { + return (!level || level <= 0 ? encode_1.encodeXML : encode_1.encodeHTML)(data); +} +exports.encode = encode; +var encode_2 = __nccwpck_require__(95714); +Object.defineProperty(exports, "encodeXML", ({ enumerable: true, get: function () { return encode_2.encodeXML; } })); +Object.defineProperty(exports, "encodeHTML", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } })); +Object.defineProperty(exports, "encodeNonAsciiHTML", ({ enumerable: true, get: function () { return encode_2.encodeNonAsciiHTML; } })); +Object.defineProperty(exports, "escape", ({ enumerable: true, get: function () { return encode_2.escape; } })); +Object.defineProperty(exports, "escapeUTF8", ({ enumerable: true, get: function () { return encode_2.escapeUTF8; } })); +// Legacy aliases (deprecated) +Object.defineProperty(exports, "encodeHTML4", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } })); +Object.defineProperty(exports, "encodeHTML5", ({ enumerable: true, get: function () { return encode_2.encodeHTML; } })); +var decode_2 = __nccwpck_require__(40407); +Object.defineProperty(exports, "decodeXML", ({ enumerable: true, get: function () { return decode_2.decodeXML; } })); +Object.defineProperty(exports, "decodeHTML", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } })); +Object.defineProperty(exports, "decodeHTMLStrict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } })); +// Legacy aliases (deprecated) +Object.defineProperty(exports, "decodeHTML4", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } })); +Object.defineProperty(exports, "decodeHTML5", ({ enumerable: true, get: function () { return decode_2.decodeHTML; } })); +Object.defineProperty(exports, "decodeHTML4Strict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } })); +Object.defineProperty(exports, "decodeHTML5Strict", ({ enumerable: true, get: function () { return decode_2.decodeHTMLStrict; } })); +Object.defineProperty(exports, "decodeXMLStrict", ({ enumerable: true, get: function () { return decode_2.decodeXML; } })); + + +/***/ }), + +/***/ 5822: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +/** + * @typedef {{ [key: string]: any }} Extensions + * @typedef {Error} Err + * @property {string} message + */ + +/** + * + * @param {Error} obj + * @param {Extensions} props + * @returns {Error & Extensions} + */ +function assign(obj, props) { + for (const key in props) { + Object.defineProperty(obj, key, { + value: props[key], + enumerable: true, + configurable: true, + }); + } + + return obj; +} + +/** + * + * @param {any} err - An Error + * @param {string|Extensions} code - A string code or props to set on the error + * @param {Extensions} [props] - Props to set on the error + * @returns {Error & Extensions} + */ +function createError(err, code, props) { + if (!err || typeof err === 'string') { + throw new TypeError('Please pass an Error to err-code'); + } + + if (!props) { + props = {}; + } + + if (typeof code === 'object') { + props = code; + code = ''; + } + + if (code) { + props.code = code; + } + + try { + return assign(err, props); + } catch (_) { + props.message = err.message; + props.stack = err.stack; + + const ErrClass = function () {}; + + ErrClass.prototype = Object.create(Object.getPrototypeOf(err)); + + // @ts-ignore + const output = assign(new ErrClass(), props); + + return output; + } +} + +module.exports = createError; + + +/***/ }), + +<<<<<<< HEAD +/***/ 27929: +/***/ ((module) => { +======= +/***/ 69685: +/***/ ((module, exports) => { + +"use strict"; +/** + * @author Toru Nagashima + * @copyright 2015 Toru Nagashima. All rights reserved. + * See LICENSE file in root directory for full license. + */ +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + + +var has = Object.prototype.hasOwnProperty + , prefix = '~'; + +/** + * Constructor to create a storage for our `EE` objects. + * An `Events` instance is a plain object whose properties are event names. + * + * @constructor + * @private + */ +function Events() {} + +// +// We try to not inherit from `Object.prototype`. In some engines creating an +// instance in this way is faster than calling `Object.create(null)` directly. +// If `Object.create(null)` is not supported we prefix the event names with a +// character to make sure that the built-in object properties are not +// overridden or used as an attack vector. +// +if (Object.create) { + Events.prototype = Object.create(null); + + // + // This hack is needed because the `__proto__` property is still inherited in + // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5. + // + if (!new Events().__proto__) prefix = false; +} + +/** + * Representation of a single event listener. + * + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} [once=false] Specify if the listener is a one-time listener. + * @constructor + * @private + */ +function EE(fn, context, once) { + this.fn = fn; + this.context = context; + this.once = once || false; +} + +/** + * Add a listener for a given event. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} context The context to invoke the listener with. + * @param {Boolean} once Specify if the listener is a one-time listener. + * @returns {EventEmitter} + * @private + */ +function addListener(emitter, event, fn, context, once) { + if (typeof fn !== 'function') { + throw new TypeError('The listener must be a function'); + } + + var listener = new EE(fn, context || emitter, once) + , evt = prefix ? prefix + event : event; + + if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++; + else if (!emitter._events[evt].fn) emitter._events[evt].push(listener); + else emitter._events[evt] = [emitter._events[evt], listener]; + + return emitter; +} + +/** + * Clear event by name. + * + * @param {EventEmitter} emitter Reference to the `EventEmitter` instance. + * @param {(String|Symbol)} evt The Event name. + * @private + */ +function clearEvent(emitter, evt) { + if (--emitter._eventsCount === 0) emitter._events = new Events(); + else delete emitter._events[evt]; +} + +/** + * Minimal `EventEmitter` interface that is molded against the Node.js + * `EventEmitter` interface. + * + * @constructor + * @public + */ +function EventEmitter() { + this._events = new Events(); + this._eventsCount = 0; +} + +/** + * Return an array listing the events for which the emitter has registered + * listeners. + * + * @returns {Array} + * @public + */ +EventEmitter.prototype.eventNames = function eventNames() { + var names = [] + , events + , name; + + if (this._eventsCount === 0) return names; + + for (name in (events = this._events)) { + if (has.call(events, name)) names.push(prefix ? name.slice(1) : name); + } + + if (Object.getOwnPropertySymbols) { + return names.concat(Object.getOwnPropertySymbols(events)); + } + + return names; +}; + +/** + * Return the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Array} The registered listeners. + * @public + */ +EventEmitter.prototype.listeners = function listeners(event) { + var evt = prefix ? prefix + event : event + , handlers = this._events[evt]; + + if (!handlers) return []; + if (handlers.fn) return [handlers.fn]; + + for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) { + ee[i] = handlers[i].fn; + } + + return ee; +}; + +/** + * Return the number of listeners listening to a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Number} The number of listeners. + * @public + */ +EventEmitter.prototype.listenerCount = function listenerCount(event) { + var evt = prefix ? prefix + event : event + , listeners = this._events[evt]; + + if (!listeners) return 0; + if (listeners.fn) return 1; + return listeners.length; +}; + +/** + * Calls each of the listeners registered for a given event. + * + * @param {(String|Symbol)} event The event name. + * @returns {Boolean} `true` if the event had listeners, else `false`. + * @public + */ +EventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return false; + + var listeners = this._events[evt] + , len = arguments.length + , args + , i; + + if (listeners.fn) { + if (listeners.once) this.removeListener(event, listeners.fn, undefined, true); + + switch (len) { + case 1: return listeners.fn.call(listeners.context), true; + case 2: return listeners.fn.call(listeners.context, a1), true; + case 3: return listeners.fn.call(listeners.context, a1, a2), true; + case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true; + case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true; + case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true; + } + + for (i = 1, args = new Array(len -1); i < len; i++) { + args[i - 1] = arguments[i]; + } + + listeners.fn.apply(listeners.context, args); + } else { + var length = listeners.length + , j; + + for (i = 0; i < length; i++) { + if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true); + + switch (len) { + case 1: listeners[i].fn.call(listeners[i].context); break; + case 2: listeners[i].fn.call(listeners[i].context, a1); break; + case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break; + case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break; + default: + if (!args) for (j = 1, args = new Array(len -1); j < len; j++) { + args[j - 1] = arguments[j]; + } + + listeners[i].fn.apply(listeners[i].context, args); + } + } + } + + return true; +}; + +/** + * Add a listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.on = function on(event, fn, context) { + return addListener(this, event, fn, context, false); +}; + +/** + * Add a one-time listener for a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn The listener function. + * @param {*} [context=this] The context to invoke the listener with. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.once = function once(event, fn, context) { + return addListener(this, event, fn, context, true); +}; + +/** + * Remove the listeners of a given event. + * + * @param {(String|Symbol)} event The event name. + * @param {Function} fn Only remove the listeners that match this function. + * @param {*} context Only remove the listeners that have this context. + * @param {Boolean} once Only remove one-time listeners. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) { + var evt = prefix ? prefix + event : event; + + if (!this._events[evt]) return this; + if (!fn) { + clearEvent(this, evt); + return this; + } + + var listeners = this._events[evt]; + + if (listeners.fn) { + if ( + listeners.fn === fn && + (!once || listeners.once) && + (!context || listeners.context === context) + ) { + clearEvent(this, evt); + } + } else { + for (var i = 0, events = [], length = listeners.length; i < length; i++) { + if ( + listeners[i].fn !== fn || + (once && !listeners[i].once) || + (context && listeners[i].context !== context) + ) { + events.push(listeners[i]); + } + } + + // + // Reset the array, or remove it completely if we have no more listeners. + // + if (events.length) this._events[evt] = events.length === 1 ? events[0] : events; + else clearEvent(this, evt); + } + + return this; +}; + +/** + * Remove all listeners, or those of the specified event. + * + * @param {(String|Symbol)} [event] The event name. + * @returns {EventEmitter} `this`. + * @public + */ +EventEmitter.prototype.removeAllListeners = function removeAllListeners(event) { + var evt; + + if (event) { + evt = prefix ? prefix + event : event; + if (this._events[evt]) clearEvent(this, evt); + } else { + this._events = new Events(); + this._eventsCount = 0; + } + + return this; +}; + +// +// Alias methods names because people roll like that. +// +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; +EventEmitter.prototype.addListener = EventEmitter.prototype.on; + +// +// Expose the prefix. +// +EventEmitter.prefixed = prefix; + +// +// Allow `EventEmitter` to be imported as module namespace. +// +EventEmitter.EventEmitter = EventEmitter; + +// +// Expose the module. +// +if (true) { + module.exports = EventEmitter; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 43250: +======= +/***/ 61166: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +module.exports = class FixedFIFO { + constructor (hwm) { + if (!(hwm > 0) || ((hwm - 1) & hwm) !== 0) throw new Error('Max size for a FixedFIFO should be a power of two') + this.buffer = new Array(hwm) + this.mask = hwm - 1 + this.top = 0 + this.btm = 0 + this.next = null + } + + clear () { + this.top = this.btm = 0 + this.next = null + this.buffer.fill(undefined) + } + + push (data) { + if (this.buffer[this.top] !== undefined) return false + this.buffer[this.top] = data + this.top = (this.top + 1) & this.mask + return true + } + + shift () { + const last = this.buffer[this.btm] + if (last === undefined) return undefined + this.buffer[this.btm] = undefined + this.btm = (this.btm + 1) & this.mask + return last + } + + peek () { + return this.buffer[this.btm] + } + + isEmpty () { + return this.buffer[this.btm] === undefined + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 98761: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const FixedFIFO = __nccwpck_require__(43250) +======= +/***/ 20375: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const FixedFIFO = __nccwpck_require__(61166) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = class FastFIFO { + constructor (hwm) { + this.hwm = hwm || 16 + this.head = new FixedFIFO(this.hwm) + this.tail = this.head + this.length = 0 + } + + clear () { + this.head = this.tail + this.head.clear() + this.length = 0 + } + + push (val) { + this.length++ + if (!this.head.push(val)) { + const prev = this.head + this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length) + this.head.push(val) + } + } + + shift () { + if (this.length !== 0) this.length-- + const val = this.tail.shift() + if (val === undefined && this.tail.next) { + const next = this.tail.next + this.tail.next = null + this.tail = next + return this.tail.shift() + } + + return val + } + + peek () { + const val = this.tail.peek() + if (val === undefined && this.tail.next) return this.tail.next.peek() + return val + } + + isEmpty () { + return this.length === 0 + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 27865: +======= +/***/ 6985: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +<<<<<<< HEAD +======= +//parse Empty Node as self closing node +const buildOptions = (__nccwpck_require__(73430).buildOptions); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const { open, write, close, rename, fsync, unlink } = __nccwpck_require__(57147) +const { join, dirname } = __nccwpck_require__(71017) + +var counter = 0 + +function cleanup (dest, err, cb) { + unlink(dest, function () { + cb(err) + }) +} + +function closeAndCleanup (fd, dest, err, cb) { + close(fd, cleanup.bind(null, dest, err, cb)) +} + +function writeLoop (fd, content, contentLength, offset, cb) { + write(fd, content, offset, function (err, bytesWritten) { + if (err) { + cb(err) + return + } + + return (bytesWritten < contentLength - offset) + ? writeLoop(fd, content, contentLength, offset + bytesWritten, cb) + : cb(null) + }) +} + +function openLoop (dest, cb) { + open(dest, 'w', function (err, fd) { + if (err) { + return (err.code === 'EMFILE') + ? openLoop(dest, cb) + : cb(err) + } + + cb(null, fd) + }) +} + +function writeAtomic (path, content, cb) { + const tmp = join(dirname(path), '.' + process.pid + '.' + counter++) + openLoop(tmp, function (err, fd) { + if (err) { + cb(err) + return + } + + const contentLength = Buffer.byteLength(content) + writeLoop(fd, content, contentLength, 0, function (err) { + if (err) { + closeAndCleanup(fd, tmp, err, cb) + return + } + + fsync(fd, function (err) { + if (err) { + closeAndCleanup(fd, tmp, err, cb) + return + } + + close(fd, function (err) { + if (err) { + // TODO could we possibly be leaking a file descriptor here? + cleanup(tmp, err, cb) + return + } + + rename(tmp, path, (err) => { + if (err) { + cleanup(tmp, err, cb) + return + } + +<<<<<<< HEAD + cb(null) +======= +function replaceCDATAarr(str, cdata) { + str = this.options.tagValueProcessor('' + str); + if (this.options.cdataPositionChar === '' || str === '') { + return str + ''); + } + return str + this.newLine; + } +} + +function buildObjectNode(val, key, attrStr, level) { + if (attrStr && !val.includes('<')) { + return ( + this.indentate(level) + + '<' + + key + + attrStr + + '>' + + val + + //+ this.newLine + // + this.indentate(level) + '' + + this.options.tagValueProcessor(val) + + ' { + +"use strict"; + +const char = function(a) { + return String.fromCharCode(a); +}; + +const chars = { + nilChar: char(176), + missingChar: char(201), + nilPremitive: char(175), + missingPremitive: char(200), + + emptyChar: char(178), + emptyValue: char(177), //empty Premitive + + boundryChar: char(179), + + objStart: char(198), + arrStart: char(204), + arrayEnd: char(185), +}; + +const charsArr = [ + chars.nilChar, + chars.nilPremitive, + chars.missingChar, + chars.missingPremitive, + chars.boundryChar, + chars.emptyChar, + chars.emptyValue, + chars.arrayEnd, + chars.objStart, + chars.arrStart, +]; + +const _e = function(node, e_schema, options) { + if (typeof e_schema === 'string') { + //premitive + if (node && node[0] && node[0].val !== undefined) { + return getValue(node[0].val, e_schema); + } else { + return getValue(node, e_schema); + } + } else { + const hasValidData = hasData(node); + if (hasValidData === true) { + let str = ''; + if (Array.isArray(e_schema)) { + //attributes can't be repeated. hence check in children tags only + str += chars.arrStart; + const itemSchema = e_schema[0]; + //var itemSchemaType = itemSchema; + const arr_len = node.length; + + if (typeof itemSchema === 'string') { + for (let arr_i = 0; arr_i < arr_len; arr_i++) { + const r = getValue(node[arr_i].val, itemSchema); + str = processValue(str, r); + } + } else { + for (let arr_i = 0; arr_i < arr_len; arr_i++) { + const r = _e(node[arr_i], itemSchema, options); + str = processValue(str, r); + } + } + str += chars.arrayEnd; //indicates that next item is not array item + } else { + //object + str += chars.objStart; + const keys = Object.keys(e_schema); + if (Array.isArray(node)) { + node = node[0]; + } + for (let i in keys) { + const key = keys[i]; + //a property defined in schema can be present either in attrsMap or children tags + //options.textNodeName will not present in both maps, take it's value from val + //options.attrNodeName will be present in attrsMap + let r; + if (!options.ignoreAttributes && node.attrsMap && node.attrsMap[key]) { + r = _e(node.attrsMap[key], e_schema[key], options); + } else if (key === options.textNodeName) { + r = _e(node.val, e_schema[key], options); + } else { + r = _e(node.child[key], e_schema[key], options); + } + str = processValue(str, r); + } + } + return str; + } else { + return hasValidData; + } + } +}; + +const getValue = function(a /*, type*/) { + switch (a) { + case undefined: + return chars.missingPremitive; + case null: + return chars.nilPremitive; + case '': + return chars.emptyValue; + default: + return a; + } +}; + +const processValue = function(str, r) { + if (!isAppChar(r[0]) && !isAppChar(str[str.length - 1])) { + str += chars.boundryChar; + } + return str + r; +}; + +const isAppChar = function(ch) { + return charsArr.indexOf(ch) !== -1; +}; + +function hasData(jObj) { + if (jObj === undefined) { + return chars.missingChar; + } else if (jObj === null) { + return chars.nilChar; + } else if ( + jObj.child && + Object.keys(jObj.child).length === 0 && + (!jObj.attrsMap || Object.keys(jObj.attrsMap).length === 0) + ) { + return chars.emptyChar; + } else { + return true; + } +} + +const x2j = __nccwpck_require__(5525); +const buildOptions = (__nccwpck_require__(73430).buildOptions); + +const convert2nimn = function(node, e_schema, options) { + options = buildOptions(options, x2j.defaultOptions, x2j.props); + return _e(node, e_schema, options); +}; + +exports.convert2nimn = convert2nimn; + + +/***/ }), + +/***/ 91113: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const util = __nccwpck_require__(73430); + +const convertToJson = function(node, options, parentTagName) { + const jObj = {}; + + // when no child node or attr is present + if ((!node.child || util.isEmptyObject(node.child)) && (!node.attrsMap || util.isEmptyObject(node.attrsMap))) { + return util.isExist(node.val) ? node.val : ''; + } + + // otherwise create a textnode if node has some text + if (util.isExist(node.val) && !(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { + const asArray = util.isTagNameInArrayMode(node.tagname, options.arrayMode, parentTagName) + jObj[options.textNodeName] = asArray ? [node.val] : node.val; + } + + util.merge(jObj, node.attrsMap, options.arrayMode); + + const keys = Object.keys(node.child); + for (let index = 0; index < keys.length; index++) { + const tagName = keys[index]; + if (node.child[tagName] && node.child[tagName].length > 1) { + jObj[tagName] = []; + for (let tag in node.child[tagName]) { + if (node.child[tagName].hasOwnProperty(tag)) { + jObj[tagName].push(convertToJson(node.child[tagName][tag], options, tagName)); + } + } + } else { + const result = convertToJson(node.child[tagName][0], options, tagName); + const asArray = (options.arrayMode === true && typeof result === 'object') || util.isTagNameInArrayMode(tagName, options.arrayMode, parentTagName); + jObj[tagName] = asArray ? [result] : result; + } + } + + //add value + return jObj; +}; + +exports.convertToJson = convertToJson; + + +/***/ }), + +/***/ 61766: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const util = __nccwpck_require__(73430); +const buildOptions = (__nccwpck_require__(73430).buildOptions); +const x2j = __nccwpck_require__(5525); + +//TODO: do it later +const convertToJsonString = function(node, options) { + options = buildOptions(options, x2j.defaultOptions, x2j.props); + + options.indentBy = options.indentBy || ''; + return _cToJsonStr(node, options, 0); +}; + +const _cToJsonStr = function(node, options, level) { + let jObj = '{'; + + //traver through all the children + const keys = Object.keys(node.child); + + for (let index = 0; index < keys.length; index++) { + var tagname = keys[index]; + if (node.child[tagname] && node.child[tagname].length > 1) { + jObj += '"' + tagname + '" : [ '; + for (var tag in node.child[tagname]) { + jObj += _cToJsonStr(node.child[tagname][tag], options) + ' , '; + } + jObj = jObj.substr(0, jObj.length - 1) + ' ] '; //remove extra comma in last + } else { + jObj += '"' + tagname + '" : ' + _cToJsonStr(node.child[tagname][0], options) + ' ,'; + } + } + util.merge(jObj, node.attrsMap); + //add attrsMap as new children + if (util.isEmptyObject(jObj)) { + return util.isExist(node.val) ? node.val : ''; + } else { + if (util.isExist(node.val)) { + if (!(typeof node.val === 'string' && (node.val === '' || node.val === options.cdataPositionChar))) { + jObj += '"' + options.textNodeName + '" : ' + stringval(node.val); + } + } + } + //add value + if (jObj[jObj.length - 1] === ',') { + jObj = jObj.substr(0, jObj.length - 2); + } + return jObj + '}'; +}; + +function stringval(v) { + if (v === true || v === false || !isNaN(v)) { + return v; + } else { + return '"' + v + '"'; + } +} + +function indentate(options, level) { + return options.indentBy.repeat(level); +} + +exports.convertToJsonString = convertToJsonString; + + +/***/ }), + +/***/ 65460: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +const nodeToJson = __nccwpck_require__(91113); +const xmlToNodeobj = __nccwpck_require__(5525); +const x2xmlnode = __nccwpck_require__(5525); +const buildOptions = (__nccwpck_require__(73430).buildOptions); +const validator = __nccwpck_require__(77731); + +exports.parse = function(xmlData, options, validationOption) { + if( validationOption){ + if(validationOption === true) validationOption = {} + + const result = validator.validate(xmlData, validationOption); + if (result !== true) { + throw Error( result.err.msg) + } + } + options = buildOptions(options, x2xmlnode.defaultOptions, x2xmlnode.props); + const traversableObj = xmlToNodeobj.getTraversalObj(xmlData, options) + //print(traversableObj, " "); + return nodeToJson.convertToJson(traversableObj, options); +}; +exports.convertTonimn = __nccwpck_require__(50186).convert2nimn; +exports.getTraversalObj = xmlToNodeobj.getTraversalObj; +exports.convertToJson = nodeToJson.convertToJson; +exports.convertToJsonString = __nccwpck_require__(61766).convertToJsonString; +exports.validate = validator.validate; +exports.j2xParser = __nccwpck_require__(6985); +exports.parseToNimn = function(xmlData, schema, options) { + return exports.convertTonimn(exports.getTraversalObj(xmlData, options), schema, options); +}; + + +function print(xmlNode, indentation){ + if(xmlNode){ + console.log(indentation + "{") + console.log(indentation + " \"tagName\": \"" + xmlNode.tagname + "\", "); + if(xmlNode.parent){ + console.log(indentation + " \"parent\": \"" + xmlNode.parent.tagname + "\", "); + } + console.log(indentation + " \"val\": \"" + xmlNode.val + "\", "); + console.log(indentation + " \"attrs\": " + JSON.stringify(xmlNode.attrsMap,null,4) + ", "); + + if(xmlNode.child){ + console.log(indentation + "\"child\": {") + const indentation2 = indentation + indentation; + Object.keys(xmlNode.child).forEach( function(key) { + const node = xmlNode.child[key]; + + if(Array.isArray(node)){ + console.log(indentation + "\""+key+"\" :[") + node.forEach( function(item,index) { + //console.log(indentation + " \""+index+"\" : [") + print(item, indentation2); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + }) + }) + }) + }) + + // clean up after oursevles, this is not needed + // anymore + content = null + }) +} + +module.exports = writeAtomic + + +/***/ }), + +<<<<<<< HEAD +/***/ 6714: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const validator = __nccwpck_require__(77890); +const XMLParser = __nccwpck_require__(58505); +const XMLBuilder = __nccwpck_require__(24554); + +module.exports = { + XMLParser: XMLParser, + XMLValidator: validator, + XMLBuilder: XMLBuilder +} + +/***/ }), + +/***/ 58151: +======= +/***/ 73430: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +const nameStartChar = ':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'; +const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; +const nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*' +const regexName = new RegExp('^' + nameRegexp + '$'); + +const getAllMatches = function(string, regex) { + const matches = []; + let match = regex.exec(string); + while (match) { + const allmatches = []; + allmatches.startIndex = regex.lastIndex - match[0].length; + const len = match.length; + for (let index = 0; index < len; index++) { + allmatches.push(match[index]); + } + matches.push(allmatches); + match = regex.exec(string); + } + return matches; +}; + +const isName = function(string) { + const match = regexName.exec(string); + return !(match === null || typeof match === 'undefined'); +}; + +exports.isExist = function(v) { + return typeof v !== 'undefined'; +}; + +exports.isEmptyObject = function(obj) { + return Object.keys(obj).length === 0; +}; + +/** + * Copy all the properties of a into b. + * @param {*} target + * @param {*} a + */ +exports.merge = function(target, a, arrayMode) { + if (a) { + const keys = Object.keys(a); // will return an array of own properties + const len = keys.length; //don't make it inline + for (let i = 0; i < len; i++) { + if (arrayMode === 'strict') { + target[keys[i]] = [ a[keys[i]] ]; + } else { + target[keys[i]] = a[keys[i]]; + } + } + } +}; +/* exports.merge =function (b,a){ + return Object.assign(b,a); +} */ + +exports.getValue = function(v) { + if (exports.isExist(v)) { + return v; + } else { + return ''; + } +}; + +// const fakeCall = function(a) {return a;}; +// const fakeCallNoReturn = function() {}; + +exports.isName = isName; +exports.getAllMatches = getAllMatches; +exports.nameRegexp = nameRegexp; + + +/***/ }), + +<<<<<<< HEAD +/***/ 77890: +======= +/***/ 77731: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const util = __nccwpck_require__(58151); +======= +const util = __nccwpck_require__(73430); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const defaultOptions = { + allowBooleanAttributes: false, //A tag can have attributes without any value + unpairedTags: [] +}; + +//const tagsPattern = new RegExp("<\\/?([\\w:\\-_\.]+)\\s*\/?>","g"); +exports.validate = function (xmlData, options) { + options = Object.assign({}, defaultOptions, options); + + //xmlData = xmlData.replace(/(\r\n|\n|\r)/gm,"");//make it single line + //xmlData = xmlData.replace(/(^\s*<\?xml.*?\?>)/g,"");//Remove XML starting tag + //xmlData = xmlData.replace(/()/g,"");//Remove DOCTYPE + const tags = []; + let tagFound = false; + + //indicates that the root tag has been closed (aka. depth 0 has been reached) + let reachedRoot = false; + + if (xmlData[0] === '\ufeff') { + // check for byte order mark (BOM) + xmlData = xmlData.substr(1); + } + + for (let i = 0; i < xmlData.length; i++) { + + if (xmlData[i] === '<' && xmlData[i+1] === '?') { + i+=2; + i = readPI(xmlData,i); + if (i.err) return i; + }else if (xmlData[i] === '<') { + //starting of tag + //read until you reach to '>' avoiding any '>' in attribute value + let tagStartPos = i; + i++; + + if (xmlData[i] === '!') { + i = readCommentAndCDATA(xmlData, i); + continue; + } else { + let closingTag = false; + if (xmlData[i] === '/') { + //closing tag + closingTag = true; + i++; + } + //read tagname + let tagName = ''; + for (; i < xmlData.length && + xmlData[i] !== '>' && + xmlData[i] !== ' ' && + xmlData[i] !== '\t' && + xmlData[i] !== '\n' && + xmlData[i] !== '\r'; i++ + ) { + tagName += xmlData[i]; + } + tagName = tagName.trim(); + //console.log(tagName); + + if (tagName[tagName.length - 1] === '/') { + //self closing tag without attributes + tagName = tagName.substring(0, tagName.length - 1); + //continue; + i--; + } + if (!validateTagName(tagName)) { + let msg; + if (tagName.trim().length === 0) { + msg = "Invalid space after '<'."; + } else { + msg = "Tag '"+tagName+"' is an invalid name."; + } + return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i)); + } + + const result = readAttributeStr(xmlData, i); + if (result === false) { + return getErrorObject('InvalidAttr', "Attributes for '"+tagName+"' have open quote.", getLineNumberForPosition(xmlData, i)); + } + let attrStr = result.value; + i = result.index; + + if (attrStr[attrStr.length - 1] === '/') { + //self closing tag + const attrStrStart = i - attrStr.length; + attrStr = attrStr.substring(0, attrStr.length - 1); + const isValid = validateAttributeString(attrStr, options); + if (isValid === true) { + tagFound = true; + //continue; //text may presents after self closing tag + } else { + //the result from the nested function returns the position of the error within the attribute + //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute + //this gives us the absolute index in the entire xml, which we can use to find the line at last + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line)); + } + } else if (closingTag) { + if (!result.tagClosed) { + return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' doesn't have proper closing.", getLineNumberForPosition(xmlData, i)); + } else if (attrStr.trim().length > 0) { + return getErrorObject('InvalidTag', "Closing tag '"+tagName+"' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos)); + } else { + const otg = tags.pop(); + if (tagName !== otg.tagName) { + let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos); + return getErrorObject('InvalidTag', + "Expected closing tag '"+otg.tagName+"' (opened in line "+openPos.line+", col "+openPos.col+") instead of closing tag '"+tagName+"'.", + getLineNumberForPosition(xmlData, tagStartPos)); + } + + //when there are no more tags, we reached the root level. + if (tags.length == 0) { + reachedRoot = true; + } + } + } else { + const isValid = validateAttributeString(attrStr, options); + if (isValid !== true) { + //the result from the nested function returns the position of the error within the attribute + //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute + //this gives us the absolute index in the entire xml, which we can use to find the line at last + return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line)); + } + + //if the root level has been reached before ... + if (reachedRoot === true) { + return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i)); + } else if(options.unpairedTags.indexOf(tagName) !== -1){ + //don't push into stack + } else { + tags.push({tagName, tagStartPos}); + } + tagFound = true; + } + + //skip tag text value + //It may include comments and CDATA value + for (i++; i < xmlData.length; i++) { + if (xmlData[i] === '<') { + if (xmlData[i + 1] === '!') { + //comment or CADATA + i++; + i = readCommentAndCDATA(xmlData, i); + continue; + } else if (xmlData[i+1] === '?') { + i = readPI(xmlData, ++i); + if (i.err) return i; + } else{ + break; + } + } else if (xmlData[i] === '&') { + const afterAmp = validateAmpersand(xmlData, i); + if (afterAmp == -1) + return getErrorObject('InvalidChar', "char '&' is not expected.", getLineNumberForPosition(xmlData, i)); + i = afterAmp; + }else{ + if (reachedRoot === true && !isWhiteSpace(xmlData[i])) { + return getErrorObject('InvalidXml', "Extra text at the end", getLineNumberForPosition(xmlData, i)); + } + } + } //end of reading tag text value + if (xmlData[i] === '<') { + i--; + } + } + } else { + if ( isWhiteSpace(xmlData[i])) { + continue; + } + return getErrorObject('InvalidChar', "char '"+xmlData[i]+"' is not expected.", getLineNumberForPosition(xmlData, i)); + } + } + + if (!tagFound) { + return getErrorObject('InvalidXml', 'Start tag expected.', 1); + }else if (tags.length == 1) { + return getErrorObject('InvalidTag', "Unclosed tag '"+tags[0].tagName+"'.", getLineNumberForPosition(xmlData, tags[0].tagStartPos)); + }else if (tags.length > 0) { + return getErrorObject('InvalidXml', "Invalid '"+ + JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\r?\n/g, '')+ + "' found.", {line: 1, col: 1}); + } + + return true; +}; + +function isWhiteSpace(char){ + return char === ' ' || char === '\t' || char === '\n' || char === '\r'; +} +/** + * Read Processing insstructions and skip + * @param {*} xmlData + * @param {*} i + */ +function readPI(xmlData, i) { + const start = i; + for (; i < xmlData.length; i++) { + if (xmlData[i] == '?' || xmlData[i] == ' ') { + //tagname + const tagname = xmlData.substr(start, i - start); + if (i > 5 && tagname === 'xml') { + return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i)); + } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') { + //check if valid attribut string + i++; + break; + } else { + continue; + } + } + } + return i; +} + +function readCommentAndCDATA(xmlData, i) { + if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') { + //comment + for (i += 3; i < xmlData.length; i++) { + if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') { + i += 2; + break; + } + } + } else if ( + xmlData.length > i + 8 && + xmlData[i + 1] === 'D' && + xmlData[i + 2] === 'O' && + xmlData[i + 3] === 'C' && + xmlData[i + 4] === 'T' && + xmlData[i + 5] === 'Y' && + xmlData[i + 6] === 'P' && + xmlData[i + 7] === 'E' + ) { + let angleBracketsCount = 1; + for (i += 8; i < xmlData.length; i++) { + if (xmlData[i] === '<') { + angleBracketsCount++; + } else if (xmlData[i] === '>') { + angleBracketsCount--; + if (angleBracketsCount === 0) { + break; + } + } + } + } else if ( + xmlData.length > i + 9 && + xmlData[i + 1] === '[' && + xmlData[i + 2] === 'C' && + xmlData[i + 3] === 'D' && + xmlData[i + 4] === 'A' && + xmlData[i + 5] === 'T' && + xmlData[i + 6] === 'A' && + xmlData[i + 7] === '[' + ) { + for (i += 8; i < xmlData.length; i++) { + if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') { + i += 2; + break; + } + } + } + + return i; +} + +const doubleQuote = '"'; +const singleQuote = "'"; + +/** + * Keep reading xmlData until '<' is found outside the attribute value. + * @param {string} xmlData + * @param {number} i + */ +function readAttributeStr(xmlData, i) { + let attrStr = ''; + let startChar = ''; + let tagClosed = false; + for (; i < xmlData.length; i++) { + if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) { + if (startChar === '') { + startChar = xmlData[i]; + } else if (startChar !== xmlData[i]) { + //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa + } else { + startChar = ''; + } + } else if (xmlData[i] === '>') { + if (startChar === '') { + tagClosed = true; + break; + } + } + attrStr += xmlData[i]; + } + if (startChar !== '') { + return false; + } + + return { + value: attrStr, + index: i, + tagClosed: tagClosed + }; +} + +/** + * Select all the attributes whether valid or invalid. + */ +const validAttrStrRegxp = new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?', 'g'); + +//attr, ="sd", a="amit's", a="sd"b="saf", ab cd="" + +function validateAttributeString(attrStr, options) { + //console.log("start:"+attrStr+":end"); + + //if(attrStr.trim().length === 0) return true; //empty string + + const matches = util.getAllMatches(attrStr, validAttrStrRegxp); + const attrNames = {}; + + for (let i = 0; i < matches.length; i++) { + if (matches[i][1].length === 0) { + //nospace before attribute name: a="sd"b="saf" + return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' has no space in starting.", getPositionFromMatch(matches[i])) + } else if (matches[i][3] !== undefined && matches[i][4] === undefined) { + return getErrorObject('InvalidAttr', "Attribute '"+matches[i][2]+"' is without value.", getPositionFromMatch(matches[i])); + } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) { + //independent attribute: ab + return getErrorObject('InvalidAttr', "boolean attribute '"+matches[i][2]+"' is not allowed.", getPositionFromMatch(matches[i])); + } + /* else if(matches[i][6] === undefined){//attribute without value: ab= + return { err: { code:"InvalidAttr",msg:"attribute " + matches[i][2] + " has no value assigned."}}; + } */ + const attrName = matches[i][2]; + if (!validateAttrName(attrName)) { + return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is an invalid name.", getPositionFromMatch(matches[i])); + } + if (!attrNames.hasOwnProperty(attrName)) { + //check for duplicate attribute. + attrNames[attrName] = 1; + } else { + return getErrorObject('InvalidAttr', "Attribute '"+attrName+"' is repeated.", getPositionFromMatch(matches[i])); + } + } + + return true; +} + +function validateNumberAmpersand(xmlData, i) { + let re = /\d/; + if (xmlData[i] === 'x') { + i++; + re = /[\da-fA-F]/; + } + for (; i < xmlData.length; i++) { + if (xmlData[i] === ';') + return i; + if (!xmlData[i].match(re)) + break; + } + return -1; +} + +function validateAmpersand(xmlData, i) { + // https://www.w3.org/TR/xml/#dt-charref + i++; + if (xmlData[i] === ';') + return -1; + if (xmlData[i] === '#') { + i++; + return validateNumberAmpersand(xmlData, i); + } + let count = 0; + for (; i < xmlData.length; i++, count++) { + if (xmlData[i].match(/\w/) && count < 20) + continue; + if (xmlData[i] === ';') + break; + return -1; + } + return i; +} + +function getErrorObject(code, message, lineNumber) { + return { + err: { + code: code, + msg: message, + line: lineNumber.line || lineNumber, + col: lineNumber.col, + }, + }; +} + +function validateAttrName(attrName) { + return util.isName(attrName); +} + +// const startsWithXML = /^xml/i; + +function validateTagName(tagname) { + return util.isName(tagname) /* && !tagname.match(startsWithXML) */; +} + +//this function returns the line number for the character at the given index +function getLineNumberForPosition(xmlData, index) { + const lines = xmlData.substring(0, index).split(/\r?\n/); + return { + line: lines.length, + + // column number is last line's length + 1, because column numbering starts at 1: + col: lines[lines.length - 1].length + 1 + }; +} + +//this function returns the position of the first character of match within attrStr +function getPositionFromMatch(match) { + return match.startIndex + match[1].length; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 24554: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +======= +/***/ 51835: +/***/ ((module) => { + +"use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +//parse Empty Node as self closing node +const buildFromOrderedJs = __nccwpck_require__(94934); + +const defaultOptions = { + attributeNamePrefix: '@_', + attributesGroupName: false, + textNodeName: '#text', + ignoreAttributes: true, + cdataPropName: false, + format: false, + indentBy: ' ', + suppressEmptyNode: false, + suppressUnpairedNode: true, + suppressBooleanAttributes: true, + tagValueProcessor: function(key, a) { + return a; + }, + attributeValueProcessor: function(attrName, a) { + return a; + }, + preserveOrder: false, + commentPropName: false, + unpairedTags: [], + entities: [ + { regex: new RegExp("&", "g"), val: "&" },//it must be on top + { regex: new RegExp(">", "g"), val: ">" }, + { regex: new RegExp("<", "g"), val: "<" }, + { regex: new RegExp("\'", "g"), val: "'" }, + { regex: new RegExp("\"", "g"), val: """ } + ], + processEntities: true, + stopNodes: [], + // transformTagName: false, + // transformAttributeName: false, + oneListGroup: false +}; + +function Builder(options) { + this.options = Object.assign({}, defaultOptions, options); + if (this.options.ignoreAttributes || this.options.attributesGroupName) { + this.isAttribute = function(/*a*/) { + return false; + }; + } else { + this.attrPrefixLen = this.options.attributeNamePrefix.length; + this.isAttribute = isAttribute; + } + + this.processTextOrObjNode = processTextOrObjNode + + if (this.options.format) { + this.indentate = indentate; + this.tagEndChar = '>\n'; + this.newLine = '\n'; + } else { + this.indentate = function() { + return ''; + }; + this.tagEndChar = '>'; + this.newLine = ''; + } +} + +Builder.prototype.build = function(jObj) { + if(this.options.preserveOrder){ + return buildFromOrderedJs(jObj, this.options); + }else { + if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){ + jObj = { + [this.options.arrayNodeName] : jObj + } + } + return this.j2x(jObj, 0).val; + } +}; + +Builder.prototype.j2x = function(jObj, level) { + let attrStr = ''; + let val = ''; + for (let key in jObj) { + if (typeof jObj[key] === 'undefined') { + // supress undefined node + } else if (jObj[key] === null) { + if(key[0] === "?") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar; + else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; + // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; + } else if (jObj[key] instanceof Date) { + val += this.buildTextValNode(jObj[key], key, '', level); + } else if (typeof jObj[key] !== 'object') { + //premitive type + const attr = this.isAttribute(key); + if (attr) { + attrStr += this.buildAttrPairStr(attr, '' + jObj[key]); + }else { + //tag value + if (key === this.options.textNodeName) { + let newval = this.options.tagValueProcessor(key, '' + jObj[key]); + val += this.replaceEntitiesValue(newval); + } else { + val += this.buildTextValNode(jObj[key], key, '', level); + } + } + } else if (Array.isArray(jObj[key])) { + //repeated nodes + const arrLen = jObj[key].length; + let listTagVal = ""; + for (let j = 0; j < arrLen; j++) { + const item = jObj[key][j]; + if (typeof item === 'undefined') { + // supress undefined node + } else if (item === null) { + if(key[0] === "?") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar; + else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; + // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar; + } else if (typeof item === 'object') { + if(this.options.oneListGroup ){ + listTagVal += this.j2x(item, level + 1).val; + }else{ + listTagVal += this.processTextOrObjNode(item, key, level) + } + } else { + listTagVal += this.buildTextValNode(item, key, '', level); + } + } + if(this.options.oneListGroup){ + listTagVal = this.buildObjectNode(listTagVal, key, '', level); + } + val += listTagVal; + } else { + //nested node + if (this.options.attributesGroupName && key === this.options.attributesGroupName) { + const Ks = Object.keys(jObj[key]); + const L = Ks.length; + for (let j = 0; j < L; j++) { + attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]); + } + } else { + val += this.processTextOrObjNode(jObj[key], key, level) + } + } + } + return {attrStr: attrStr, val: val}; +}; + +Builder.prototype.buildAttrPairStr = function(attrName, val){ + val = this.options.attributeValueProcessor(attrName, '' + val); + val = this.replaceEntitiesValue(val); + if (this.options.suppressBooleanAttributes && val === "true") { + return ' ' + attrName; + } else return ' ' + attrName + '="' + val + '"'; +} + +function processTextOrObjNode (object, key, level) { + const result = this.j2x(object, level + 1); + if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) { + return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level); + } else { + return this.buildObjectNode(result.val, key, result.attrStr, level); + } +} + +Builder.prototype.buildObjectNode = function(val, key, attrStr, level) { + if(val === ""){ + if(key[0] === "?") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; + else { + return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar; + } + }else{ + + let tagEndExp = '' + val + tagEndExp ); + } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) { + return this.indentate(level) + `` + this.newLine; + }else { + return ( + this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar + + val + + this.indentate(level) + tagEndExp ); + } + } +} + +Builder.prototype.closeTag = function(key){ + let closeTag = ""; + if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired + if(!this.options.suppressUnpairedNode) closeTag = "/" + }else if(this.options.suppressEmptyNode){ //empty + closeTag = "/"; + }else{ + closeTag = `>` + this.newLine; + }else if (this.options.commentPropName !== false && key === this.options.commentPropName) { + return this.indentate(level) + `` + this.newLine; + }else if(key[0] === "?") {//PI tag + return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; + }else{ + let textValue = this.options.tagValueProcessor(key, val); + textValue = this.replaceEntitiesValue(textValue); + + if( textValue === ''){ + return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar; + }else{ + return this.indentate(level) + '<' + key + attrStr + '>' + + textValue + + ' 0 && this.options.processEntities){ + for (let i=0; i { +======= +/***/ 5525: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const EOL = "\n"; + +/** + * + * @param {array} jArray + * @param {any} options + * @returns + */ +function toXml(jArray, options) { + let indentation = ""; + if (options.format && options.indentBy.length > 0) { + indentation = EOL; + } + return arrToStr(jArray, options, "", indentation); +} + +function arrToStr(arr, options, jPath, indentation) { + let xmlStr = ""; + let isPreviousElementTag = false; + + for (let i = 0; i < arr.length; i++) { + const tagObj = arr[i]; + const tagName = propName(tagObj); + let newJPath = ""; + if (jPath.length === 0) newJPath = tagName + else newJPath = `${jPath}.${tagName}`; + + if (tagName === options.textNodeName) { + let tagText = tagObj[tagName]; + if (!isStopNode(newJPath, options)) { + tagText = options.tagValueProcessor(tagName, tagText); + tagText = replaceEntitiesValue(tagText, options); + } + if (isPreviousElementTag) { + xmlStr += indentation; + } + xmlStr += tagText; + isPreviousElementTag = false; + continue; + } else if (tagName === options.cdataPropName) { + if (isPreviousElementTag) { + xmlStr += indentation; + } + xmlStr += ``; + isPreviousElementTag = false; + continue; + } else if (tagName === options.commentPropName) { + xmlStr += indentation + ``; + isPreviousElementTag = true; + continue; + } else if (tagName[0] === "?") { + const attStr = attr_to_str(tagObj[":@"], options); + const tempInd = tagName === "?xml" ? "" : indentation; + let piTextNodeName = tagObj[tagName][0][options.textNodeName]; + piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : ""; //remove extra spacing + xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`; + isPreviousElementTag = true; + continue; + } + let newIdentation = indentation; + if (newIdentation !== "") { + newIdentation += options.indentBy; + } + const attStr = attr_to_str(tagObj[":@"], options); + const tagStart = indentation + `<${tagName}${attStr}`; + const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation); + if (options.unpairedTags.indexOf(tagName) !== -1) { + if (options.suppressUnpairedNode) xmlStr += tagStart + ">"; + else xmlStr += tagStart + "/>"; + } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) { + xmlStr += tagStart + "/>"; + } else if (tagValue && tagValue.endsWith(">")) { + xmlStr += tagStart + `>${tagValue}${indentation}`; + } else { + xmlStr += tagStart + ">"; + if (tagValue && indentation !== "" && (tagValue.includes("/>") || tagValue.includes("`; + } + isPreviousElementTag = true; + } + + return xmlStr; +} + +function propName(obj) { + const keys = Object.keys(obj); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if (key !== ":@") return key; + } +} + +function attr_to_str(attrMap, options) { + let attrStr = ""; + if (attrMap && !options.ignoreAttributes) { + for (let attr in attrMap) { + let attrVal = options.attributeValueProcessor(attr, attrMap[attr]); + attrVal = replaceEntitiesValue(attrVal, options); + if (attrVal === true && options.suppressBooleanAttributes) { + attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`; + } else { + attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`; + } + } + } + return attrStr; +} + +function isStopNode(jPath, options) { + jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1); + let tagName = jPath.substr(jPath.lastIndexOf(".") + 1); + for (let index in options.stopNodes) { + if (options.stopNodes[index] === jPath || options.stopNodes[index] === "*." + tagName) return true; + } + return false; +} + +function replaceEntitiesValue(textValue, options) { + if (textValue && textValue.length > 0 && options.processEntities) { + for (let i = 0; i < options.entities.length; i++) { + const entity = options.entities[i]; + textValue = textValue.replace(entity.regex, entity.val); + } + } + return textValue; +} +module.exports = toXml; + + +<<<<<<< HEAD +/***/ }), + +/***/ 31838: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const util = __nccwpck_require__(58151); + +//TODO: handle comments +function readDocType(xmlData, i){ + + const entities = {}; + if( xmlData[i + 3] === 'O' && + xmlData[i + 4] === 'C' && + xmlData[i + 5] === 'T' && + xmlData[i + 6] === 'Y' && + xmlData[i + 7] === 'P' && + xmlData[i + 8] === 'E') + { + i = i+9; + let angleBracketsCount = 1; + let hasBody = false, comment = false; + let exp = ""; + for(;i') { //Read tag content + if(comment){ + if( xmlData[i - 1] === "-" && xmlData[i - 2] === "-"){ + comment = false; + angleBracketsCount--; + } + }else{ + angleBracketsCount--; + } + if (angleBracketsCount === 0) { + break; + } + }else if( xmlData[i] === '['){ + hasBody = true; + }else{ + exp += xmlData[i]; + } + } + if(angleBracketsCount !== 0){ + throw new Error(`Unclosed DOCTYPE`); + } + }else{ + throw new Error(`Invalid Tag instead of DOCTYPE`); + } + return {entities, i}; +} + +function readEntityExp(xmlData,i){ + //External entities are not supported + // + + //Parameter entities are not supported + // + + //Internal entities are supported + // + + //read EntityName + let entityName = ""; + for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"' ); i++) { + // if(xmlData[i] === " ") continue; + // else + entityName += xmlData[i]; + } + entityName = entityName.trim(); + if(entityName.indexOf(" ") !== -1) throw new Error("External entites are not supported"); + + //read Entity Value + const startChar = xmlData[i++]; + let val = "" + for (; i < xmlData.length && xmlData[i] !== startChar ; i++) { + val += xmlData[i]; + } + return [entityName, val, i]; +} + +function isComment(xmlData, i){ + if(xmlData[i+1] === '!' && + xmlData[i+2] === '-' && + xmlData[i+3] === '-') return true + return false +} +function isEntity(xmlData, i){ + if(xmlData[i+1] === '!' && + xmlData[i+2] === 'E' && + xmlData[i+3] === 'N' && + xmlData[i+4] === 'T' && + xmlData[i+5] === 'I' && + xmlData[i+6] === 'T' && + xmlData[i+7] === 'Y') return true + return false +} +function isElement(xmlData, i){ + if(xmlData[i+1] === '!' && + xmlData[i+2] === 'E' && + xmlData[i+3] === 'L' && + xmlData[i+4] === 'E' && + xmlData[i+5] === 'M' && + xmlData[i+6] === 'E' && + xmlData[i+7] === 'N' && + xmlData[i+8] === 'T') return true + return false +} + +function isAttlist(xmlData, i){ + if(xmlData[i+1] === '!' && + xmlData[i+2] === 'A' && + xmlData[i+3] === 'T' && + xmlData[i+4] === 'T' && + xmlData[i+5] === 'L' && + xmlData[i+6] === 'I' && + xmlData[i+7] === 'S' && + xmlData[i+8] === 'T') return true + return false +} +function isNotation(xmlData, i){ + if(xmlData[i+1] === '!' && + xmlData[i+2] === 'N' && + xmlData[i+3] === 'O' && + xmlData[i+4] === 'T' && + xmlData[i+5] === 'A' && + xmlData[i+6] === 'T' && + xmlData[i+7] === 'I' && + xmlData[i+8] === 'O' && + xmlData[i+9] === 'N') return true + return false +} + +function validateEntityName(name){ + if (util.isName(name)) + return name; + else + throw new Error(`Invalid entity name ${name}`); +} + +module.exports = readDocType; + + +/***/ }), + +/***/ 80633: +/***/ ((__unused_webpack_module, exports) => { + + +const defaultOptions = { + preserveOrder: false, + attributeNamePrefix: '@_', + attributesGroupName: false, + textNodeName: '#text', + ignoreAttributes: true, + removeNSPrefix: false, // remove NS from tag name or attribute name if true + allowBooleanAttributes: false, //a tag can have attributes without any value + //ignoreRootElement : false, + parseTagValue: true, + parseAttributeValue: false, + trimValues: true, //Trim string values of tag and attributes + cdataPropName: false, + numberParseOptions: { + hex: true, + leadingZeros: true, + eNotation: true + }, + tagValueProcessor: function(tagName, val) { + return val; + }, + attributeValueProcessor: function(attrName, val) { + return val; + }, + stopNodes: [], //nested tags will not be parsed even for errors + alwaysCreateTextNode: false, + isArray: () => false, + commentPropName: false, + unpairedTags: [], + processEntities: true, + htmlEntities: false, + ignoreDeclaration: false, + ignorePiTags: false, + transformTagName: false, + transformAttributeName: false, + updateTag: function(tagName, jPath, attrs){ + return tagName + }, + // skipEmptyListItem: false +}; + +const buildOptions = function(options) { + return Object.assign({}, defaultOptions, options); +}; + +exports.buildOptions = buildOptions; +exports.defaultOptions = defaultOptions; + +/***/ }), + +/***/ 79063: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +///@ts-check + +const util = __nccwpck_require__(58151); +const xmlNode = __nccwpck_require__(43056); +const readDocType = __nccwpck_require__(31838); +const toNumber = __nccwpck_require__(88828); + +======= +const util = __nccwpck_require__(73430); +const buildOptions = (__nccwpck_require__(73430).buildOptions); +const xmlNode = __nccwpck_require__(51835); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +const regx = + '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)' + .replace(/NAME/g, util.nameRegexp); + +//const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g"); +//const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g"); + +class OrderedObjParser{ + constructor(options){ + this.options = options; + this.currentNode = null; + this.tagsNodeStack = []; + this.docTypeEntities = {}; + this.lastEntities = { + "apos" : { regex: /&(apos|#39|#x27);/g, val : "'"}, + "gt" : { regex: /&(gt|#62|#x3E);/g, val : ">"}, + "lt" : { regex: /&(lt|#60|#x3C);/g, val : "<"}, + "quot" : { regex: /&(quot|#34|#x22);/g, val : "\""}, + }; + this.ampEntity = { regex: /&(amp|#38|#x26);/g, val : "&"}; + this.htmlEntities = { + "space": { regex: /&(nbsp|#160);/g, val: " " }, + // "lt" : { regex: /&(lt|#60);/g, val: "<" }, + // "gt" : { regex: /&(gt|#62);/g, val: ">" }, + // "amp" : { regex: /&(amp|#38);/g, val: "&" }, + // "quot" : { regex: /&(quot|#34);/g, val: "\"" }, + // "apos" : { regex: /&(apos|#39);/g, val: "'" }, + "cent" : { regex: /&(cent|#162);/g, val: "¢" }, + "pound" : { regex: /&(pound|#163);/g, val: "£" }, + "yen" : { regex: /&(yen|#165);/g, val: "¥" }, + "euro" : { regex: /&(euro|#8364);/g, val: "€" }, + "copyright" : { regex: /&(copy|#169);/g, val: "©" }, + "reg" : { regex: /&(reg|#174);/g, val: "®" }, + "inr" : { regex: /&(inr|#8377);/g, val: "₹" }, + }; + this.addExternalEntities = addExternalEntities; + this.parseXml = parseXml; + this.parseTextData = parseTextData; + this.resolveNameSpace = resolveNameSpace; + this.buildAttributesMap = buildAttributesMap; + this.isItStopNode = isItStopNode; + this.replaceEntitiesValue = replaceEntitiesValue; + this.readStopNodeData = readStopNodeData; + this.saveTextToParentTag = saveTextToParentTag; + this.addChild = addChild; + } + +} + +function addExternalEntities(externalEntities){ + const entKeys = Object.keys(externalEntities); + for (let i = 0; i < entKeys.length; i++) { + const ent = entKeys[i]; + this.lastEntities[ent] = { + regex: new RegExp("&"+ent+";","g"), + val : externalEntities[ent] + } + } +} + +/** + * @param {string} val + * @param {string} tagName + * @param {string} jPath + * @param {boolean} dontTrim + * @param {boolean} hasAttributes + * @param {boolean} isLeafNode + * @param {boolean} escapeEntities + */ +function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) { + if (val !== undefined) { + if (this.options.trimValues && !dontTrim) { + val = val.trim(); + } + if(val.length > 0){ + if(!escapeEntities) val = this.replaceEntitiesValue(val); + + const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode); + if(newval === null || newval === undefined){ + //don't parse + return val; + }else if(typeof newval !== typeof val || newval !== val){ + //overwrite + return newval; + }else if(this.options.trimValues){ + return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); + }else{ + const trimmedVal = val.trim(); + if(trimmedVal === val){ + return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions); + }else{ + return val; + } + } + } + } +} + +function resolveNameSpace(tagname) { + if (this.options.removeNSPrefix) { + const tags = tagname.split(':'); + const prefix = tagname.charAt(0) === '/' ? '/' : ''; + if (tags[0] === 'xmlns') { + return ''; + } + if (tags.length === 2) { + tagname = prefix + tags[1]; + } + } + return tagname; +} + +//TODO: change regex to capture NS +//const attrsRegx = new RegExp("([\\w\\-\\.\\:]+)\\s*=\\s*(['\"])((.|\n)*?)\\2","gm"); +const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm'); + +function buildAttributesMap(attrStr, jPath, tagName) { + if (!this.options.ignoreAttributes && typeof attrStr === 'string') { + // attrStr = attrStr.replace(/\r?\n/g, ' '); + //attrStr = attrStr || attrStr.trim(); + + const matches = util.getAllMatches(attrStr, attrsRegx); + const len = matches.length; //don't make it inline + const attrs = {}; + for (let i = 0; i < len; i++) { + const attrName = this.resolveNameSpace(matches[i][1]); + let oldVal = matches[i][4]; + let aName = this.options.attributeNamePrefix + attrName; + if (attrName.length) { + if (this.options.transformAttributeName) { + aName = this.options.transformAttributeName(aName); + } + if(aName === "__proto__") aName = "#__proto__"; + if (oldVal !== undefined) { + if (this.options.trimValues) { + oldVal = oldVal.trim(); + } + oldVal = this.replaceEntitiesValue(oldVal); + const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath); + if(newVal === null || newVal === undefined){ + //don't parse + attrs[aName] = oldVal; + }else if(typeof newVal !== typeof oldVal || newVal !== oldVal){ + //overwrite + attrs[aName] = newVal; + }else{ + //parse + attrs[aName] = parseValue( + oldVal, + this.options.parseAttributeValue, + this.options.numberParseOptions + ); + } + } else if (this.options.allowBooleanAttributes) { + attrs[aName] = true; + } + } + } + if (!Object.keys(attrs).length) { + return; + } + if (this.options.attributesGroupName) { + const attrCollection = {}; + attrCollection[this.options.attributesGroupName] = attrs; + return attrCollection; + } + return attrs + } +} + +const parseXml = function(xmlData) { + xmlData = xmlData.replace(/\r\n?/g, "\n"); //TODO: remove this line + const xmlObj = new xmlNode('!xml'); + let currentNode = xmlObj; + let textData = ""; + let jPath = ""; + for(let i=0; i< xmlData.length; i++){//for each char in XML data + const ch = xmlData[i]; + if(ch === '<'){ + // const nextIndex = i+1; + // const _2ndChar = xmlData[nextIndex]; + if( xmlData[i+1] === '/') {//Closing Tag + const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed.") + let tagName = xmlData.substring(i+2,closeIndex).trim(); + + if(this.options.removeNSPrefix){ + const colonIndex = tagName.indexOf(":"); + if(colonIndex !== -1){ + tagName = tagName.substr(colonIndex+1); + } + } + + if(this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + + if(currentNode){ + textData = this.saveTextToParentTag(textData, currentNode, jPath); + } + + //check if last tag of nested tag was unpaired tag + const lastTagName = jPath.substring(jPath.lastIndexOf(".")+1); + if(tagName && this.options.unpairedTags.indexOf(tagName) !== -1 ){ + throw new Error(`Unpaired tag can not be used as closing tag: `); + } + let propIndex = 0 + if(lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1 ){ + propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.')-1) + this.tagsNodeStack.pop(); + }else{ + propIndex = jPath.lastIndexOf("."); + } + jPath = jPath.substring(0, propIndex); + + currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope + textData = ""; + i = closeIndex; + } else if( xmlData[i+1] === '?') { + + let tagData = readTagExp(xmlData,i, false, "?>"); + if(!tagData) throw new Error("Pi Tag is not closed."); + + textData = this.saveTextToParentTag(textData, currentNode, jPath); + if( (this.options.ignoreDeclaration && tagData.tagName === "?xml") || this.options.ignorePiTags){ + + }else{ + + const childNode = new xmlNode(tagData.tagName); + childNode.add(this.options.textNodeName, ""); + + if(tagData.tagName !== tagData.tagExp && tagData.attrExpPresent){ + childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName); + } + this.addChild(currentNode, childNode, jPath) + + } + + + i = tagData.closeIndex + 1; + } else if(xmlData.substr(i + 1, 3) === '!--') { + const endIndex = findClosingIndex(xmlData, "-->", i+4, "Comment is not closed.") + if(this.options.commentPropName){ + const comment = xmlData.substring(i + 4, endIndex - 2); + + textData = this.saveTextToParentTag(textData, currentNode, jPath); + + currentNode.add(this.options.commentPropName, [ { [this.options.textNodeName] : comment } ]); + } + i = endIndex; + } else if( xmlData.substr(i + 1, 2) === '!D') { + const result = readDocType(xmlData, i); + this.docTypeEntities = result.entities; + i = result.i; + }else if(xmlData.substr(i + 1, 2) === '![') { + const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2; + const tagExp = xmlData.substring(i + 9,closeIndex); + + textData = this.saveTextToParentTag(textData, currentNode, jPath); + + //cdata should be set even if it is 0 length string + if(this.options.cdataPropName){ + // let val = this.parseTextData(tagExp, this.options.cdataPropName, jPath + "." + this.options.cdataPropName, true, false, true); + // if(!val) val = ""; + currentNode.add(this.options.cdataPropName, [ { [this.options.textNodeName] : tagExp } ]); + }else{ + let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true); + if(val == undefined) val = ""; + currentNode.add(this.options.textNodeName, val); + } + + i = closeIndex + 2; + }else {//Opening tag + let result = readTagExp(xmlData,i, this.options.removeNSPrefix); + let tagName= result.tagName; + let tagExp = result.tagExp; + let attrExpPresent = result.attrExpPresent; + let closeIndex = result.closeIndex; + + if (this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + + //save text as child node + if (currentNode && textData) { + if(currentNode.tagname !== '!xml'){ + //when nested tag is found + textData = this.saveTextToParentTag(textData, currentNode, jPath, false); + } + } + + //check if last tag was unpaired tag + const lastTag = currentNode; + if(lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1 ){ + currentNode = this.tagsNodeStack.pop(); + jPath = jPath.substring(0, jPath.lastIndexOf(".")); + } + if(tagName !== xmlObj.tagname){ + jPath += jPath ? "." + tagName : tagName; + } + if (this.isItStopNode(this.options.stopNodes, jPath, tagName)) { //TODO: namespace + let tagContent = ""; + //self-closing tag + if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){ + i = result.closeIndex; + } + //unpaired tag + else if(this.options.unpairedTags.indexOf(tagName) !== -1){ + i = result.closeIndex; + } + //normal tag + else{ + //read until closing tag is found + const result = this.readStopNodeData(xmlData, tagName, closeIndex + 1); + if(!result) throw new Error(`Unexpected end of ${tagName}`); + i = result.i; + tagContent = result.tagContent; + } + + const childNode = new xmlNode(tagName); + if(tagName !== tagExp && attrExpPresent){ + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + if(tagContent) { + tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true); + } + + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + childNode.add(this.options.textNodeName, tagContent); + + this.addChild(currentNode, childNode, jPath) + }else{ + //selfClosing tag + if(tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1){ + if(tagName[tagName.length - 1] === "/"){ //remove trailing '/' + tagName = tagName.substr(0, tagName.length - 1); + tagExp = tagName; + }else{ + tagExp = tagExp.substr(0, tagExp.length - 1); + } + + if(this.options.transformTagName) { + tagName = this.options.transformTagName(tagName); + } + + const childNode = new xmlNode(tagName); + if(tagName !== tagExp && attrExpPresent){ + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath) + jPath = jPath.substr(0, jPath.lastIndexOf(".")); + } + //opening tag + else{ + const childNode = new xmlNode( tagName); + this.tagsNodeStack.push(currentNode); + + if(tagName !== tagExp && attrExpPresent){ + childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName); + } + this.addChild(currentNode, childNode, jPath) + currentNode = childNode; + } + textData = ""; + i = closeIndex; + } + } + }else{ + textData += xmlData[i]; + } + } + return xmlObj.child; +} + +function addChild(currentNode, childNode, jPath){ + const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"]) + if(result === false){ + }else if(typeof result === "string"){ + childNode.tagname = result + currentNode.addChild(childNode); + }else{ + currentNode.addChild(childNode); + } +} + +const replaceEntitiesValue = function(val){ + + if(this.options.processEntities){ + for(let entityName in this.docTypeEntities){ + const entity = this.docTypeEntities[entityName]; + val = val.replace( entity.regx, entity.val); + } + for(let entityName in this.lastEntities){ + const entity = this.lastEntities[entityName]; + val = val.replace( entity.regex, entity.val); + } + if(this.options.htmlEntities){ + for(let entityName in this.htmlEntities){ + const entity = this.htmlEntities[entityName]; + val = val.replace( entity.regex, entity.val); + } + } + val = val.replace( this.ampEntity.regex, this.ampEntity.val); + } + return val; +} +function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) { + if (textData) { //store previously collected data as textNode + if(isLeafNode === undefined) isLeafNode = Object.keys(currentNode.child).length === 0 + + textData = this.parseTextData(textData, + currentNode.tagname, + jPath, + false, + currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false, + isLeafNode); + + if (textData !== undefined && textData !== "") + currentNode.add(this.options.textNodeName, textData); + textData = ""; + } + return textData; +} + +//TODO: use jPath to simplify the logic +/** + * + * @param {string[]} stopNodes + * @param {string} jPath + * @param {string} currentTagName + */ +function isItStopNode(stopNodes, jPath, currentTagName){ + const allNodesExp = "*." + currentTagName; + for (const stopNodePath in stopNodes) { + const stopNodeExp = stopNodes[stopNodePath]; + if( allNodesExp === stopNodeExp || jPath === stopNodeExp ) return true; + } + return false; +} + +/** + * Returns the tag Expression and where it is ending handling single-double quotes situation + * @param {string} xmlData + * @param {number} i starting index + * @returns + */ +function tagExpWithClosingIndex(xmlData, i, closingChar = ">"){ + let attrBoundary; + let tagExp = ""; + for (let index = i; index < xmlData.length; index++) { + let ch = xmlData[index]; + if (attrBoundary) { + if (ch === attrBoundary) attrBoundary = "";//reset + } else if (ch === '"' || ch === "'") { + attrBoundary = ch; + } else if (ch === closingChar[0]) { + if(closingChar[1]){ + if(xmlData[index + 1] === closingChar[1]){ + return { + data: tagExp, + index: index + } + } + }else{ + return { + data: tagExp, + index: index + } + } + } else if (ch === '\t') { + ch = " " + } + tagExp += ch; + } +} + +function findClosingIndex(xmlData, str, i, errMsg){ + const closingIndex = xmlData.indexOf(str, i); + if(closingIndex === -1){ + throw new Error(errMsg) + }else{ + return closingIndex + str.length - 1; + } +} + +function readTagExp(xmlData,i, removeNSPrefix, closingChar = ">"){ + const result = tagExpWithClosingIndex(xmlData, i+1, closingChar); + if(!result) return; + let tagExp = result.data; + const closeIndex = result.index; + const separatorIndex = tagExp.search(/\s/); + let tagName = tagExp; + let attrExpPresent = true; + if(separatorIndex !== -1){//separate tag name and attributes expression + tagName = tagExp.substr(0, separatorIndex).replace(/\s\s*$/, ''); + tagExp = tagExp.substr(separatorIndex + 1); + } + + if(removeNSPrefix){ + const colonIndex = tagName.indexOf(":"); + if(colonIndex !== -1){ + tagName = tagName.substr(colonIndex+1); + attrExpPresent = tagName !== result.data.substr(colonIndex + 1); + } + } + + return { + tagName: tagName, + tagExp: tagExp, + closeIndex: closeIndex, + attrExpPresent: attrExpPresent, + } +} +/** + * find paired tag for a stop node + * @param {string} xmlData + * @param {string} tagName + * @param {number} i + */ +function readStopNodeData(xmlData, tagName, i){ + const startIndex = i; + // Starting at 1 since we already have an open tag + let openTagCount = 1; + + for (; i < xmlData.length; i++) { + if( xmlData[i] === "<"){ + if (xmlData[i+1] === "/") {//close tag + const closeIndex = findClosingIndex(xmlData, ">", i, `${tagName} is not closed`); + let closeTagName = xmlData.substring(i+2,closeIndex).trim(); + if(closeTagName === tagName){ + openTagCount--; + if (openTagCount === 0) { + return { + tagContent: xmlData.substring(startIndex, i), + i : closeIndex + } + } + } + i=closeIndex; + } else if(xmlData[i+1] === '?') { + const closeIndex = findClosingIndex(xmlData, "?>", i+1, "StopNode is not closed.") + i=closeIndex; + } else if(xmlData.substr(i + 1, 3) === '!--') { + const closeIndex = findClosingIndex(xmlData, "-->", i+3, "StopNode is not closed.") + i=closeIndex; + } else if(xmlData.substr(i + 1, 2) === '![') { + const closeIndex = findClosingIndex(xmlData, "]]>", i, "StopNode is not closed.") - 2; + i=closeIndex; + } else { + const tagData = readTagExp(xmlData, i, '>') + + if (tagData) { + const openTagName = tagData && tagData.tagName; + if (openTagName === tagName && tagData.tagExp[tagData.tagExp.length-1] !== "/") { + openTagCount++; + } + i=tagData.closeIndex; + } + } + } + }//end for loop +} + +function parseValue(val, shouldParse, options) { + if (shouldParse && typeof val === 'string') { + //console.log(options) + const newval = val.trim(); + if(newval === 'true' ) return true; + else if(newval === 'false' ) return false; + else return toNumber(val, options); + } else { + if (util.isExist(val)) { + return val; + } else { + return ''; + } + } +} + + +module.exports = OrderedObjParser; + + +/***/ }), + +<<<<<<< HEAD +/***/ 58505: +======= +/***/ 29857: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var Path = __nccwpck_require__(71017); +var fs = __nccwpck_require__(68644); +var util = __nccwpck_require__(73837); +var glob = __nccwpck_require__(58956); +var errCode = __nccwpck_require__(5822); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var Path__default = /*#__PURE__*/_interopDefaultLegacy(Path); +var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs); +var glob__default = /*#__PURE__*/_interopDefaultLegacy(glob); +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +const fsStat = util.promisify(fs__default["default"].stat); +async function getFilesFromPath(paths, options) { + const files = []; + for await (const file of filesFromPath(paths, options)) { + files.push(file); + } + return files; +} +async function* filesFromPath(paths, options) { + options = options || {}; + if (typeof paths === 'string') { + paths = [paths]; + } + const globSourceOptions = { + recursive: true, + glob: { + dot: Boolean(options.hidden), + ignore: Array.isArray(options.ignore) ? options.ignore : [], + follow: options.followSymlinks != null ? options.followSymlinks : true + } + }; + for await (const path of paths) { + if (typeof path !== 'string') { + throw errCode__default["default"](new Error('Path must be a string'), 'ERR_INVALID_PATH', { path }); + } + const absolutePath = Path__default["default"].resolve(process.cwd(), path); + const stat = await fsStat(absolutePath); + const prefix = options.pathPrefix || Path__default["default"].dirname(absolutePath); + let mode = options.mode; + if (options.preserveMode) { + mode = stat.mode; + } + let mtime = options.mtime; + if (options.preserveMtime) { + mtime = stat.mtime; + } + yield* toGlobSource({ + path, + type: stat.isDirectory() ? 'dir' : 'file', + prefix, + mode, + mtime, + size: stat.size, + preserveMode: options.preserveMode, + preserveMtime: options.preserveMtime + }, globSourceOptions); + } +} +async function* toGlobSource({path, type, prefix, mode, mtime, size, preserveMode, preserveMtime}, options) { + options = options || {}; + const baseName = Path__default["default"].basename(path); + if (type === 'file') { + yield { + name: `/${ baseName.replace(prefix, '') }`, + stream: () => fs__default["default"].createReadStream(Path__default["default"].isAbsolute(path) ? path : Path__default["default"].join(process.cwd(), path)), + mode, + mtime, + size + }; + return; + } + const globOptions = Object.assign({}, options.glob, { + cwd: path, + nodir: false, + realpath: false, + absolute: true + }); + for await (const p of glob__default["default"](path, '**/*', globOptions)) { + const stat = await fsStat(p); + if (!stat.isFile()) { + continue; + } + if (preserveMode || preserveMtime) { + if (preserveMode) { + mode = stat.mode; + } + if (preserveMtime) { + mtime = stat.mtime; + } + } + yield { + name: toPosix(p.replace(prefix, '')), + stream: () => fs__default["default"].createReadStream(p), + mode, + mtime, + size: stat.size + }; + } +} +const toPosix = path => path.replace(/\\/g, '/'); + +exports.filesFromPath = filesFromPath; +exports.getFilesFromPath = getFilesFromPath; + + +/***/ }), + +/***/ 58956: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { buildOptions} = __nccwpck_require__(80633); +const OrderedObjParser = __nccwpck_require__(79063); +const { prettify} = __nccwpck_require__(89353); +const validator = __nccwpck_require__(77890); + +<<<<<<< HEAD +class XMLParser{ + + constructor(options){ + this.externalEntities = {}; + this.options = buildOptions(options); + + } + /** + * Parse XML dats to JS object + * @param {string|Buffer} xmlData + * @param {boolean|Object} validationOption + */ + parse(xmlData,validationOption){ + if(typeof xmlData === "string"){ + }else if( xmlData.toString){ + xmlData = xmlData.toString(); + }else{ + throw new Error("XML data is accepted in String or Bytes[] form.") + } + if( validationOption){ + if(validationOption === true) validationOption = {}; //validate with default options + + const result = validator.validate(xmlData, validationOption); + if (result !== true) { + throw Error( `${result.err.msg}:${result.err.line}:${result.err.col}` ) + } + } + const orderedObjParser = new OrderedObjParser(this.options); + orderedObjParser.addExternalEntities(this.externalEntities); + const orderedResult = orderedObjParser.parseXml(xmlData); + if(this.options.preserveOrder || orderedResult === undefined) return orderedResult; + else return prettify(orderedResult, this.options); +======= + +const fs = (__nccwpck_require__(57147).promises) +const path = __nccwpck_require__(71017) +const minimatch = __nccwpck_require__(71111) + +/** + * @typedef {string} Glob + * @typedef {Object} OptionsExt + * @property {Glob[]} [ignore] - Glob patterns to ignore + * @property {string} [cwd=process.cwd()] + * @property {boolean} [absolute=false] - If true produces absolute paths + * @property {boolean} [nodir] - If true yields file paths and skip directories + * + * @typedef {OptionsExt & minimatch.IOptions} Options + */ + +/** + * Async iterable filename pattern matcher + * + * @param {string} dir + * @param {string} pattern + * @param {Options} [options] + * @returns {AsyncIterable} + */ +async function * glob (dir, pattern, options = {}) { + const absoluteDir = path.resolve(dir) + const relativeDir = path.relative(options.cwd || process.cwd(), dir) + + const stats = await fs.stat(absoluteDir) + + if (stats.isDirectory()) { + for await (const entry of _glob(absoluteDir, '', pattern, options)) { + yield entry +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + } + + /** + * Add Entity which is not by default supported by this library + * @param {string} key + * @param {string} value + */ + addEntity(key, value){ + if(value.indexOf("&") !== -1){ + throw new Error("Entity value can't have '&'") + }else if(key.indexOf("&") !== -1 || key.indexOf(";") !== -1){ + throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '") + }else if(value === "&"){ + throw new Error("An entity with value '&' is not permitted"); + }else{ + this.externalEntities[key] = value; + } + } +} + +module.exports = XMLParser; + +/***/ }), + +/***/ 89353: +/***/ ((__unused_webpack_module, exports) => { + + + +/** + * + * @param {array} node + * @param {any} options + * @returns + */ +function prettify(node, options){ + return compress( node, options); +} + +/** + * + * @param {array} arr + * @param {object} options + * @param {string} jPath + * @returns object + */ +function compress(arr, options, jPath){ + let text; + const compressedObj = {}; + for (let i = 0; i < arr.length; i++) { + const tagObj = arr[i]; + const property = propName(tagObj); + let newJpath = ""; + if(jPath === undefined) newJpath = property; + else newJpath = jPath + "." + property; + + if(property === options.textNodeName){ + if(text === undefined) text = tagObj[property]; + else text += "" + tagObj[property]; + }else if(property === undefined){ + continue; + }else if(tagObj[property]){ + + let val = compress(tagObj[property], options, newJpath); + const isLeaf = isLeafTag(val, options); + + if(tagObj[":@"]){ + assignAttributes( val, tagObj[":@"], newJpath, options); + }else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){ + val = val[options.textNodeName]; + }else if(Object.keys(val).length === 0){ + if(options.alwaysCreateTextNode) val[options.textNodeName] = ""; + else val = ""; + } + + if(compressedObj[property] !== undefined && compressedObj.hasOwnProperty(property)) { + if(!Array.isArray(compressedObj[property])) { + compressedObj[property] = [ compressedObj[property] ]; + } + compressedObj[property].push(val); + }else{ + //TODO: if a node is not an array, then check if it should be an array + //also determine if it is a leaf node + if (options.isArray(property, newJpath, isLeaf )) { + compressedObj[property] = [val]; + }else{ + compressedObj[property] = val; + } + } + } + + } + // if(text && text.length > 0) compressedObj[options.textNodeName] = text; + if(typeof text === "string"){ + if(text.length > 0) compressedObj[options.textNodeName] = text; + }else if(text !== undefined) compressedObj[options.textNodeName] = text; + return compressedObj; +} + +function propName(obj){ + const keys = Object.keys(obj); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + if(key !== ":@") return key; + } +} + +function assignAttributes(obj, attrMap, jpath, options){ + if (attrMap) { + const keys = Object.keys(attrMap); + const len = keys.length; //don't make it inline + for (let i = 0; i < len; i++) { + const atrrName = keys[i]; + if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) { + obj[atrrName] = [ attrMap[atrrName] ]; + } else { + obj[atrrName] = attrMap[atrrName]; + } + } + } +} + +function isLeafTag(obj, options){ + const { textNodeName } = options; + const propCount = Object.keys(obj).length; + + if (propCount === 0) { + return true; + } + + if ( + propCount === 1 && + (obj[textNodeName] || typeof obj[textNodeName] === "boolean" || obj[textNodeName] === 0) + ) { + return true; + } + + return false; +} +exports.prettify = prettify; + + +/***/ }), + +<<<<<<< HEAD +/***/ 43056: +/***/ ((module) => { + + + +class XmlNode{ + constructor(tagname) { + this.tagname = tagname; + this.child = []; //nested tags, text, cdata, comments in order + this[":@"] = {}; //attributes map + } + add(key,val){ + // this.child.push( {name : key, val: val, isCdata: isCdata }); + if(key === "__proto__") key = "#__proto__"; + this.child.push( {[key]: val }); + } + addChild(node) { + if(node.tagname === "__proto__") node.tagname = "#__proto__"; + if(node[":@"] && Object.keys(node[":@"]).length > 0){ + this.child.push( { [node.tagname]: node.child, [":@"]: node[":@"] }); + }else{ + this.child.push( { [node.tagname]: node.child }); + } + }; +}; + + +module.exports = XmlNode; + +/***/ }), + +/***/ 62879: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var debug; + +module.exports = function () { + if (!debug) { + try { + /* eslint global-require: off */ + debug = __nccwpck_require__(80908)("follow-redirects"); + } + catch (error) { /* */ } + if (typeof debug !== "function") { + debug = function () { /* */ }; + } + } + debug.apply(null, arguments); +}; + + +/***/ }), + +/***/ 55213: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var url = __nccwpck_require__(57310); +var URL = url.URL; +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var Writable = (__nccwpck_require__(12781).Writable); +var assert = __nccwpck_require__(39491); +var debug = __nccwpck_require__(62879); + +// Create handlers that pass events from native requests +var events = ["abort", "aborted", "connect", "error", "socket", "timeout"]; +var eventHandlers = Object.create(null); +events.forEach(function (event) { + eventHandlers[event] = function (arg1, arg2, arg3) { + this._redirectable.emit(event, arg1, arg2, arg3); + }; +}); + +var InvalidUrlError = createErrorType( + "ERR_INVALID_URL", + "Invalid URL", + TypeError +); +// Error types with codes +var RedirectionError = createErrorType( + "ERR_FR_REDIRECTION_FAILURE", + "Redirected request failed" +); +var TooManyRedirectsError = createErrorType( + "ERR_FR_TOO_MANY_REDIRECTS", + "Maximum number of redirects exceeded" +); +var MaxBodyLengthExceededError = createErrorType( + "ERR_FR_MAX_BODY_LENGTH_EXCEEDED", + "Request body larger than maxBodyLength limit" +); +var WriteAfterEndError = createErrorType( + "ERR_STREAM_WRITE_AFTER_END", + "write after end" +); + +// istanbul ignore next +var destroy = Writable.prototype.destroy || noop; + +// An HTTP(S) request that can be redirected +function RedirectableRequest(options, responseCallback) { + // Initialize the request + Writable.call(this); + this._sanitizeOptions(options); + this._options = options; + this._ended = false; + this._ending = false; + this._redirectCount = 0; + this._redirects = []; + this._requestBodyLength = 0; + this._requestBodyBuffers = []; + + // Attach a callback if passed + if (responseCallback) { + this.on("response", responseCallback); + } + + // React to responses of native requests + var self = this; + this._onNativeResponse = function (response) { + self._processResponse(response); + }; + + // Perform the first request + this._performRequest(); +} +RedirectableRequest.prototype = Object.create(Writable.prototype); + +RedirectableRequest.prototype.abort = function () { + destroyRequest(this._currentRequest); + this._currentRequest.abort(); + this.emit("abort"); +}; + +RedirectableRequest.prototype.destroy = function (error) { + destroyRequest(this._currentRequest, error); + destroy.call(this, error); + return this; +}; + +// Writes buffered data to the current native request +RedirectableRequest.prototype.write = function (data, encoding, callback) { + // Writing is not allowed if end has been called + if (this._ending) { + throw new WriteAfterEndError(); + } + + // Validate input and shift parameters if necessary + if (!isString(data) && !isBuffer(data)) { + throw new TypeError("data should be a string, Buffer or Uint8Array"); + } + if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + + // Ignore empty buffers, since writing them doesn't invoke the callback + // https://github.com/nodejs/node/issues/22066 + if (data.length === 0) { + if (callback) { + callback(); + } + return; + } + // Only write when we don't exceed the maximum body length + if (this._requestBodyLength + data.length <= this._options.maxBodyLength) { + this._requestBodyLength += data.length; + this._requestBodyBuffers.push({ data: data, encoding: encoding }); + this._currentRequest.write(data, encoding, callback); + } + // Error when we exceed the maximum body length + else { + this.emit("error", new MaxBodyLengthExceededError()); + this.abort(); + } +}; + +// Ends the current native request +RedirectableRequest.prototype.end = function (data, encoding, callback) { + // Shift parameters if necessary + if (isFunction(data)) { + callback = data; + data = encoding = null; + } + else if (isFunction(encoding)) { + callback = encoding; + encoding = null; + } + + // Write data if needed and end + if (!data) { + this._ended = this._ending = true; + this._currentRequest.end(null, null, callback); + } + else { + var self = this; + var currentRequest = this._currentRequest; + this.write(data, encoding, function () { + self._ended = true; + currentRequest.end(null, null, callback); + }); + this._ending = true; + } +}; + +// Sets a header value on the current native request +RedirectableRequest.prototype.setHeader = function (name, value) { + this._options.headers[name] = value; + this._currentRequest.setHeader(name, value); +}; + +// Clears a header value on the current native request +RedirectableRequest.prototype.removeHeader = function (name) { + delete this._options.headers[name]; + this._currentRequest.removeHeader(name); +}; + +// Global timeout for all underlying requests +RedirectableRequest.prototype.setTimeout = function (msecs, callback) { + var self = this; + + // Destroys the socket on timeout + function destroyOnTimeout(socket) { + socket.setTimeout(msecs); + socket.removeListener("timeout", socket.destroy); + socket.addListener("timeout", socket.destroy); + } + + // Sets up a timer to trigger a timeout event + function startTimer(socket) { + if (self._timeout) { + clearTimeout(self._timeout); + } + self._timeout = setTimeout(function () { + self.emit("timeout"); + clearTimer(); + }, msecs); + destroyOnTimeout(socket); + } + + // Stops a timeout from triggering + function clearTimer() { + // Clear the timeout + if (self._timeout) { + clearTimeout(self._timeout); + self._timeout = null; + } + + // Clean up all attached listeners + self.removeListener("abort", clearTimer); + self.removeListener("error", clearTimer); + self.removeListener("response", clearTimer); + self.removeListener("close", clearTimer); + if (callback) { + self.removeListener("timeout", callback); + } + if (!self.socket) { + self._currentRequest.removeListener("socket", startTimer); + } + } + + // Attach callback if passed + if (callback) { + this.on("timeout", callback); + } + + // Start the timer if or when the socket is opened + if (this.socket) { + startTimer(this.socket); + } + else { + this._currentRequest.once("socket", startTimer); + } + + // Clean up on events + this.on("socket", destroyOnTimeout); + this.on("abort", clearTimer); + this.on("error", clearTimer); + this.on("response", clearTimer); + this.on("close", clearTimer); + + return this; +}; + +// Proxy all other public ClientRequest methods +[ + "flushHeaders", "getHeader", + "setNoDelay", "setSocketKeepAlive", +].forEach(function (method) { + RedirectableRequest.prototype[method] = function (a, b) { + return this._currentRequest[method](a, b); + }; +}); + +// Proxy all public ClientRequest properties +["aborted", "connection", "socket"].forEach(function (property) { + Object.defineProperty(RedirectableRequest.prototype, property, { + get: function () { return this._currentRequest[property]; }, + }); +}); + +RedirectableRequest.prototype._sanitizeOptions = function (options) { + // Ensure headers are always present + if (!options.headers) { + options.headers = {}; + } + + // Since http.request treats host as an alias of hostname, + // but the url module interprets host as hostname plus port, + // eliminate the host property to avoid confusion. + if (options.host) { + // Use hostname if set, because it has precedence + if (!options.hostname) { + options.hostname = options.host; + } + delete options.host; + } + + // Complete the URL object when necessary + if (!options.pathname && options.path) { + var searchPos = options.path.indexOf("?"); + if (searchPos < 0) { + options.pathname = options.path; + } + else { + options.pathname = options.path.substring(0, searchPos); + options.search = options.path.substring(searchPos); + } + } +}; + + +// Executes the next native request (initial or redirect) +RedirectableRequest.prototype._performRequest = function () { + // Load the native protocol + var protocol = this._options.protocol; + var nativeProtocol = this._options.nativeProtocols[protocol]; + if (!nativeProtocol) { + this.emit("error", new TypeError("Unsupported protocol " + protocol)); + return; + } + + // If specified, use the agent corresponding to the protocol + // (HTTP and HTTPS use different types of agents) + if (this._options.agents) { + var scheme = protocol.slice(0, -1); + this._options.agent = this._options.agents[scheme]; + } + + // Create the native request and set up its event handlers + var request = this._currentRequest = + nativeProtocol.request(this._options, this._onNativeResponse); + request._redirectable = this; + for (var event of events) { + request.on(event, eventHandlers[event]); + } + + // RFC7230§5.3.1: When making a request directly to an origin server, […] + // a client MUST send only the absolute path […] as the request-target. + this._currentUrl = /^\//.test(this._options.path) ? + url.format(this._options) : + // When making a request to a proxy, […] + // a client MUST send the target URI in absolute-form […]. + this._options.path; + + // End a redirected request + // (The first request must be ended explicitly with RedirectableRequest#end) + if (this._isRedirect) { + // Write the request entity and end + var i = 0; + var self = this; + var buffers = this._requestBodyBuffers; + (function writeNext(error) { + // Only write if this request has not been redirected yet + /* istanbul ignore else */ + if (request === self._currentRequest) { + // Report any write errors + /* istanbul ignore if */ + if (error) { + self.emit("error", error); + } + // Write the next buffer if there are still left + else if (i < buffers.length) { + var buffer = buffers[i++]; + /* istanbul ignore else */ + if (!request.finished) { + request.write(buffer.data, buffer.encoding, writeNext); + } + } + // End the request if `end` has been called on us + else if (self._ended) { + request.end(); + } + } + }()); + } +}; + +// Processes a response from the current native request +RedirectableRequest.prototype._processResponse = function (response) { + // Store the redirected response + var statusCode = response.statusCode; + if (this._options.trackRedirects) { + this._redirects.push({ + url: this._currentUrl, + headers: response.headers, + statusCode: statusCode, + }); + } + + // RFC7231§6.4: The 3xx (Redirection) class of status code indicates + // that further action needs to be taken by the user agent in order to + // fulfill the request. If a Location header field is provided, + // the user agent MAY automatically redirect its request to the URI + // referenced by the Location field value, + // even if the specific status code is not understood. + + // If the response is not a redirect; return it as-is + var location = response.headers.location; + if (!location || this._options.followRedirects === false || + statusCode < 300 || statusCode >= 400) { + response.responseUrl = this._currentUrl; + response.redirects = this._redirects; + this.emit("response", response); + + // Clean up + this._requestBodyBuffers = []; + return; + } + + // The response is a redirect, so abort the current request + destroyRequest(this._currentRequest); + // Discard the remainder of the response to avoid waiting for data + response.destroy(); + + // RFC7231§6.4: A client SHOULD detect and intervene + // in cyclical redirections (i.e., "infinite" redirection loops). + if (++this._redirectCount > this._options.maxRedirects) { + this.emit("error", new TooManyRedirectsError()); + return; + } + + // Store the request headers if applicable + var requestHeaders; + var beforeRedirect = this._options.beforeRedirect; + if (beforeRedirect) { + requestHeaders = Object.assign({ + // The Host header was set by nativeProtocol.request + Host: response.req.getHeader("host"), + }, this._options.headers); + } + + // RFC7231§6.4: Automatic redirection needs to done with + // care for methods not known to be safe, […] + // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change + // the request method from POST to GET for the subsequent request. + var method = this._options.method; + if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || + // RFC7231§6.4.4: The 303 (See Other) status code indicates that + // the server is redirecting the user agent to a different resource […] + // A user agent can perform a retrieval request targeting that URI + // (a GET or HEAD request if using HTTP) […] + (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) { + this._options.method = "GET"; + // Drop a possible entity and headers related to it + this._requestBodyBuffers = []; + removeMatchingHeaders(/^content-/i, this._options.headers); + } + + // Drop the Host header, as the redirect might lead to a different host + var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); + + // If the redirect is relative, carry over the host of the last request + var currentUrlParts = url.parse(this._currentUrl); + var currentHost = currentHostHeader || currentUrlParts.host; + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : + url.format(Object.assign(currentUrlParts, { host: currentHost })); + + // Determine the URL of the redirection + var redirectUrl; + try { + redirectUrl = url.resolve(currentUrl, location); + } + catch (cause) { + this.emit("error", new RedirectionError({ cause: cause })); + return; + } + + // Create the redirected request + debug("redirecting to", redirectUrl); + this._isRedirect = true; + var redirectUrlParts = url.parse(redirectUrl); + Object.assign(this._options, redirectUrlParts); + + // Drop confidential headers when redirecting to a less secure protocol + // or to a different domain that is not a superdomain + if (redirectUrlParts.protocol !== currentUrlParts.protocol && + redirectUrlParts.protocol !== "https:" || + redirectUrlParts.host !== currentHost && + !isSubdomain(redirectUrlParts.host, currentHost)) { + removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers); + } + + // Evaluate the beforeRedirect callback + if (isFunction(beforeRedirect)) { + var responseDetails = { + headers: response.headers, + statusCode: statusCode, + }; + var requestDetails = { + url: currentUrl, + method: method, + headers: requestHeaders, + }; + try { + beforeRedirect(this._options, responseDetails, requestDetails); + } + catch (err) { + this.emit("error", err); + return; + } + this._sanitizeOptions(this._options); + } + + // Perform the redirected request + try { + this._performRequest(); + } + catch (cause) { + this.emit("error", new RedirectionError({ cause: cause })); + } +}; + +// Wraps the key/value object of protocols with redirect functionality +function wrap(protocols) { + // Default settings + var exports = { + maxRedirects: 21, + maxBodyLength: 10 * 1024 * 1024, + }; + + // Wrap each protocol + var nativeProtocols = {}; + Object.keys(protocols).forEach(function (scheme) { + var protocol = scheme + ":"; + var nativeProtocol = nativeProtocols[protocol] = protocols[scheme]; + var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol); + + // Executes a request, following redirects + function request(input, options, callback) { + // Parse parameters + if (isString(input)) { + var parsed; + try { + parsed = urlToOptions(new URL(input)); + } + catch (err) { + /* istanbul ignore next */ + parsed = url.parse(input); + } + if (!isString(parsed.protocol)) { + throw new InvalidUrlError({ input }); + } + input = parsed; + } + else if (URL && (input instanceof URL)) { + input = urlToOptions(input); + } + else { + callback = options; + options = input; + input = { protocol: protocol }; + } + if (isFunction(options)) { + callback = options; + options = null; + } + + // Set defaults + options = Object.assign({ + maxRedirects: exports.maxRedirects, + maxBodyLength: exports.maxBodyLength, + }, input, options); + options.nativeProtocols = nativeProtocols; + if (!isString(options.host) && !isString(options.hostname)) { + options.hostname = "::1"; + } + + assert.equal(options.protocol, protocol, "protocol mismatch"); + debug("options", options); + return new RedirectableRequest(options, callback); + } + + // Executes a GET request, following redirects + function get(input, options, callback) { + var wrappedRequest = wrappedProtocol.request(input, options, callback); + wrappedRequest.end(); + return wrappedRequest; + } + + // Expose the properties on the wrapped protocol + Object.defineProperties(wrappedProtocol, { + request: { value: request, configurable: true, enumerable: true, writable: true }, + get: { value: get, configurable: true, enumerable: true, writable: true }, + }); + }); + return exports; +} + +/* istanbul ignore next */ +function noop() { /* empty */ } + +// from https://github.com/nodejs/node/blob/master/lib/internal/url.js +function urlToOptions(urlObject) { + var options = { + protocol: urlObject.protocol, + hostname: urlObject.hostname.startsWith("[") ? + /* istanbul ignore next */ + urlObject.hostname.slice(1, -1) : + urlObject.hostname, + hash: urlObject.hash, + search: urlObject.search, + pathname: urlObject.pathname, + path: urlObject.pathname + urlObject.search, + href: urlObject.href, + }; + if (urlObject.port !== "") { + options.port = Number(urlObject.port); + } + return options; +} + +function removeMatchingHeaders(regex, headers) { + var lastValue; + for (var header in headers) { + if (regex.test(header)) { + lastValue = headers[header]; + delete headers[header]; + } + } + return (lastValue === null || typeof lastValue === "undefined") ? + undefined : String(lastValue).trim(); +} + +function createErrorType(code, message, baseClass) { + // Create constructor + function CustomError(properties) { + Error.captureStackTrace(this, this.constructor); + Object.assign(this, properties || {}); + this.code = code; + this.message = this.cause ? message + ": " + this.cause.message : message; + } + + // Attach constructor and set default properties + CustomError.prototype = new (baseClass || Error)(); + CustomError.prototype.constructor = CustomError; + CustomError.prototype.name = "Error [" + code + "]"; + return CustomError; +} + +function destroyRequest(request, error) { + for (var event of events) { + request.removeListener(event, eventHandlers[event]); + } + request.on("error", noop); + request.destroy(error); +} + +function isSubdomain(subdomain, domain) { + assert(isString(subdomain) && isString(domain)); + var dot = subdomain.length - domain.length - 1; + return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); +} + +function isString(value) { + return typeof value === "string" || value instanceof String; +} + +function isFunction(value) { + return typeof value === "function"; +} + +function isBuffer(value) { + return typeof value === "object" && ("length" in value); +} + +// Exports +module.exports = wrap({ http: http, https: https }); +module.exports.wrap = wrap; + + +/***/ }), + +/***/ 68111: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var CombinedStream = __nccwpck_require__(69715); +var util = __nccwpck_require__(73837); +var path = __nccwpck_require__(71017); +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var parseUrl = (__nccwpck_require__(57310).parse); +var fs = __nccwpck_require__(57147); +var Stream = (__nccwpck_require__(12781).Stream); +var mime = __nccwpck_require__(21919); +var asynckit = __nccwpck_require__(75719); +var populate = __nccwpck_require__(74808); + +// Public API +module.exports = FormData; + +// make it a Stream +util.inherits(FormData, CombinedStream); + +/** + * Create readable "multipart/form-data" streams. + * Can be used to submit forms + * and file uploads to other web applications. + * + * @constructor + * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + */ +function FormData(options) { + if (!(this instanceof FormData)) { + return new FormData(options); + } + + this._overheadLength = 0; + this._valueLength = 0; + this._valuesToMeasure = []; + + CombinedStream.call(this); + + options = options || {}; + for (var option in options) { + this[option] = options[option]; + } +} + +FormData.LINE_BREAK = '\r\n'; +FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; + +FormData.prototype.append = function(field, value, options) { + + options = options || {}; + + // allow filename as single option + if (typeof options == 'string') { + options = {filename: options}; + } + + var append = CombinedStream.prototype.append.bind(this); + + // all that streamy business can't handle numbers + if (typeof value == 'number') { + value = '' + value; + } + + // https://github.com/felixge/node-form-data/issues/38 + if (util.isArray(value)) { + // Please convert your array into string + // the way web server expects it + this._error(new Error('Arrays are not supported.')); + return; + } + + var header = this._multiPartHeader(field, value, options); + var footer = this._multiPartFooter(); + + append(header); + append(value); + append(footer); + + // pass along options.knownLength + this._trackLength(header, value, options); +}; + +FormData.prototype._trackLength = function(header, value, options) { + var valueLength = 0; + + // used w/ getLengthSync(), when length is known. + // e.g. for streaming directly from a remote server, + // w/ a known file a size, and not wanting to wait for + // incoming file to finish to get its size. + if (options.knownLength != null) { + valueLength += +options.knownLength; + } else if (Buffer.isBuffer(value)) { + valueLength = value.length; + } else if (typeof value === 'string') { + valueLength = Buffer.byteLength(value); + } + + this._valueLength += valueLength; + + // @check why add CRLF? does this account for custom/multiple CRLFs? + this._overheadLength += + Buffer.byteLength(header) + + FormData.LINE_BREAK.length; + + // empty or either doesn't have path or not an http response or not a stream + if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { + return; + } + + // no need to bother with the length + if (!options.knownLength) { + this._valuesToMeasure.push(value); + } +}; + +FormData.prototype._lengthRetriever = function(value, callback) { + + if (value.hasOwnProperty('fd')) { + + // take read range into a account + // `end` = Infinity –> read file till the end + // + // TODO: Looks like there is bug in Node fs.createReadStream + // it doesn't respect `end` options without `start` options + // Fix it when node fixes it. + // https://github.com/joyent/node/issues/7819 + if (value.end != undefined && value.end != Infinity && value.start != undefined) { + + // when end specified + // no need to calculate range + // inclusive, starts with 0 + callback(null, value.end + 1 - (value.start ? value.start : 0)); + + // not that fast snoopy + } else { + // still need to fetch file size from fs + fs.stat(value.path, function(err, stat) { + + var fileSize; + + if (err) { + callback(err); + return; + } + + // update final size based on the range options + fileSize = stat.size - (value.start ? value.start : 0); + callback(null, fileSize); + }); + } + + // or http response + } else if (value.hasOwnProperty('httpVersion')) { + callback(null, +value.headers['content-length']); + + // or request stream http://github.com/mikeal/request + } else if (value.hasOwnProperty('httpModule')) { + // wait till response come back + value.on('response', function(response) { + value.pause(); + callback(null, +response.headers['content-length']); + }); + value.resume(); + + // something else + } else { + callback('Unknown stream'); + } +}; + +FormData.prototype._multiPartHeader = function(field, value, options) { + // custom header specified (as string)? + // it becomes responsible for boundary + // (e.g. to handle extra CRLFs on .NET servers) + if (typeof options.header == 'string') { + return options.header; + } + + var contentDisposition = this._getContentDisposition(value, options); + var contentType = this._getContentType(value, options); + + var contents = ''; + var headers = { + // add custom disposition as third element or keep it two elements if not + 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), + // if no content type. allow it to be empty array + 'Content-Type': [].concat(contentType || []) + }; + + // allow custom headers. + if (typeof options.header == 'object') { + populate(headers, options.header); + } + + var header; + for (var prop in headers) { + if (!headers.hasOwnProperty(prop)) continue; + header = headers[prop]; + + // skip nullish headers. + if (header == null) { + continue; + } + + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } + + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } + } + + return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; +}; + +FormData.prototype._getContentDisposition = function(value, options) { + + var filename + , contentDisposition + ; + + if (typeof options.filepath === 'string') { + // custom filepath for relative paths + filename = path.normalize(options.filepath).replace(/\\/g, '/'); + } else if (options.filename || value.name || value.path) { + // custom filename take precedence + // formidable and the browser add a name property + // fs- and request- streams have path property + filename = path.basename(options.filename || value.name || value.path); + } else if (value.readable && value.hasOwnProperty('httpVersion')) { + // or try http response + filename = path.basename(value.client._httpMessage.path || ''); + } + + if (filename) { + contentDisposition = 'filename="' + filename + '"'; + } + + return contentDisposition; +}; + +FormData.prototype._getContentType = function(value, options) { + + // use custom content-type above all + var contentType = options.contentType; + + // or try `name` from formidable, browser + if (!contentType && value.name) { + contentType = mime.lookup(value.name); + } + + // or try `path` from fs-, request- streams + if (!contentType && value.path) { + contentType = mime.lookup(value.path); + } + + // or if it's http-reponse + if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { + contentType = value.headers['content-type']; + } + + // or guess it from the filepath or filename + if (!contentType && (options.filepath || options.filename)) { + contentType = mime.lookup(options.filepath || options.filename); + } + + // fallback to the default content type if `value` is not simple value + if (!contentType && typeof value == 'object') { + contentType = FormData.DEFAULT_CONTENT_TYPE; + } + + return contentType; +}; + +FormData.prototype._multiPartFooter = function() { + return function(next) { + var footer = FormData.LINE_BREAK; + + var lastPart = (this._streams.length === 0); + if (lastPart) { + footer += this._lastBoundary(); + } + + next(footer); + }.bind(this); +}; + +FormData.prototype._lastBoundary = function() { + return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; +}; + +FormData.prototype.getHeaders = function(userHeaders) { + var header; + var formHeaders = { + 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() + }; + + for (header in userHeaders) { + if (userHeaders.hasOwnProperty(header)) { + formHeaders[header.toLowerCase()] = userHeaders[header]; + } + } + + return formHeaders; +}; + +FormData.prototype.setBoundary = function(boundary) { + this._boundary = boundary; +}; + +FormData.prototype.getBoundary = function() { + if (!this._boundary) { + this._generateBoundary(); + } + + return this._boundary; +}; + +FormData.prototype.getBuffer = function() { + var dataBuffer = new Buffer.alloc( 0 ); + var boundary = this.getBoundary(); + + // Create the form content. Add Line breaks to the end of data. + for (var i = 0, len = this._streams.length; i < len; i++) { + if (typeof this._streams[i] !== 'function') { + + // Add content to the buffer. + if(Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); + }else { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); + } + + // Add break after content. + if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { + dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); + } + } + } + + // Add the footer and return the Buffer object. + return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); +}; + +FormData.prototype._generateBoundary = function() { + // This generates a 50 character boundary similar to those used by Firefox. + // They are optimized for boyer-moore parsing. + var boundary = '--------------------------'; + for (var i = 0; i < 24; i++) { + boundary += Math.floor(Math.random() * 10).toString(16); + } + + this._boundary = boundary; +}; + +// Note: getLengthSync DOESN'T calculate streams length +// As workaround one can calculate file size manually +// and add it as knownLength option +FormData.prototype.getLengthSync = function() { + var knownLength = this._overheadLength + this._valueLength; + + // Don't get confused, there are 3 "internal" streams for each keyval pair + // so it basically checks if there is any value added to the form + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + // https://github.com/form-data/form-data/issues/40 + if (!this.hasKnownLength()) { + // Some async length retrievers are present + // therefore synchronous length calculation is false. + // Please use getLength(callback) to get proper length + this._error(new Error('Cannot calculate proper length in synchronous way.')); + } + + return knownLength; +}; + +// Public API to check if length of added values is known +// https://github.com/form-data/form-data/issues/196 +// https://github.com/form-data/form-data/issues/262 +FormData.prototype.hasKnownLength = function() { + var hasKnownLength = true; + + if (this._valuesToMeasure.length) { + hasKnownLength = false; + } + + return hasKnownLength; +}; + +FormData.prototype.getLength = function(cb) { + var knownLength = this._overheadLength + this._valueLength; + + if (this._streams.length) { + knownLength += this._lastBoundary().length; + } + + if (!this._valuesToMeasure.length) { + process.nextTick(cb.bind(this, null, knownLength)); + return; + } + + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + if (err) { + cb(err); + return; + } + + values.forEach(function(length) { + knownLength += length; + }); + + cb(null, knownLength); + }); +}; + +FormData.prototype.submit = function(params, cb) { + var request + , options + , defaults = {method: 'post'} + ; + + // parse provided url if it's string + // or treat it as options object + if (typeof params == 'string') { + + params = parseUrl(params); + options = populate({ + port: params.port, + path: params.pathname, + host: params.hostname, + protocol: params.protocol + }, defaults); + + // use custom params + } else { + + options = populate(params, defaults); + // if no port provided use default one + if (!options.port) { + options.port = options.protocol == 'https:' ? 443 : 80; + } + } + + // put that good code in getHeaders to some use + options.headers = this.getHeaders(params.headers); + + // https if specified, fallback to http in any other case + if (options.protocol == 'https:') { + request = https.request(options); + } else { + request = http.request(options); + } + + // get content length and fire away + this.getLength(function(err, length) { + if (err && err !== 'Unknown stream') { + this._error(err); + return; + } + + // add content length + if (length) { + request.setHeader('Content-Length', length); + } + + this.pipe(request); + if (cb) { + var onResponse; + + var callback = function (error, responce) { + request.removeListener('error', callback); + request.removeListener('response', onResponse); + + return cb.call(this, error, responce); + }; + + onResponse = callback.bind(this, null); + + request.on('error', callback); + request.on('response', onResponse); + } + }.bind(this)); + + return request; +}; + +FormData.prototype._error = function(err) { + if (!this.error) { + this.error = err; + this.pause(); + this.emit('error', err); + } +}; + +FormData.prototype.toString = function () { + return '[object FormData]'; +}; + + +/***/ }), + +/***/ 74808: +/***/ ((module) => { + +// populates missing values +module.exports = function(dst, src) { + + Object.keys(src).forEach(function(prop) + { + dst[prop] = dst[prop] || src[prop]; + }); + + return dst; +}; + + +/***/ }), + +/***/ 50481: +======= +/***/ 26805: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +// If the passed object is an (async) iterable, then get the iterator +// If it's probably an iterator already (i.e. has next function) return it +// else throw +module.exports = function getIterator (obj) { + if (obj) { + if (typeof obj[Symbol.iterator] === 'function') { + return obj[Symbol.iterator]() + } + if (typeof obj[Symbol.asyncIterator] === 'function') { + return obj[Symbol.asyncIterator]() + } + if (typeof obj.next === 'function') { + return obj // probably an iterator + } + } + throw new Error('argument is not an iterator or iterable') +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 35772: +======= +/***/ 9645: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +module.exports = clone + +var getPrototypeOf = Object.getPrototypeOf || function (obj) { + return obj.__proto__ +} + +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj + + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 20846: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var fs = __nccwpck_require__(57147) +var polyfills = __nccwpck_require__(82132) +var legacy = __nccwpck_require__(46641) +var clone = __nccwpck_require__(35772) +======= +/***/ 68644: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var fs = __nccwpck_require__(57147) +var polyfills = __nccwpck_require__(98944) +var legacy = __nccwpck_require__(75288) +var clone = __nccwpck_require__(9645) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var util = __nccwpck_require__(73837) + +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol + +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} + +function noop () {} + +function publishQueue(context, queue) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue + } + }) +} + +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } + +// Once time initialization +if (!fs[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = global[gracefulQueue] || [] + publishQueue(fs, queue) + + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + resetQueue() + } + + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } + + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) + + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + resetQueue() + } + + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) + + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(fs[gracefulQueue]) + __nccwpck_require__(39491).equal(fs[gracefulQueue].length, 0) + }) + } +} + +if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); +} + +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} + +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch + + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$readFile(path, options, cb) + + function go$readFile (path, options, cb, startTime) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$writeFile(path, data, options, cb) + + function go$writeFile (path, data, options, cb, startTime) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + return go$appendFile(path, data, options, cb) + + function go$appendFile (path, data, options, cb, startTime) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$copyFile = fs.copyFile + if (fs$copyFile) + fs.copyFile = copyFile + function copyFile (src, dest, flags, cb) { + if (typeof flags === 'function') { + cb = flags + flags = 0 + } + return go$copyFile(src, dest, flags, cb) + + function go$copyFile (src, dest, flags, cb, startTime) { + return fs$copyFile(src, dest, flags, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$copyFile, [src, dest, flags, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + var fs$readdir = fs.readdir + fs.readdir = readdir + var noReaddirOptionVersions = /^v[0-5]\./ + function readdir (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null + + var go$readdir = noReaddirOptionVersions.test(process.version) + ? function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, fs$readdirCallback( + path, options, cb, startTime + )) + } + : function go$readdir (path, options, cb, startTime) { + return fs$readdir(path, options, fs$readdirCallback( + path, options, cb, startTime + )) + } + + return go$readdir(path, options, cb) + + function fs$readdirCallback (path, options, cb, startTime) { + return function (err, files) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([ + go$readdir, + [path, options, cb], + err, + startTime || Date.now(), + Date.now() + ]) + else { + if (files && files.sort) + files.sort() + + if (typeof cb === 'function') + cb.call(this, err, files) + } + } + } + } + + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } + + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } + + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } + + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) + + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) + + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } + + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() + + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } + + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } + + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } + + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } + + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } + + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null + + return go$open(path, flags, mode, cb) + + function go$open (path, flags, mode, cb, startTime) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb], err, startTime || Date.now(), Date.now()]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + } + }) + } + } + + return fs +} + +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + fs[gracefulQueue].push(elem) + retry() +} + +// keep track of the timeout between retry() calls +var retryTimer + +// reset the startTime and lastTime to now +// this resets the start of the 60 second overall timeout as well as the +// delay between attempts so that we'll retry these jobs sooner +function resetQueue () { + var now = Date.now() + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + // entries that are only a length of 2 are from an older version, don't + // bother modifying those since they'll be retried anyway. + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now // startTime + fs[gracefulQueue][i][4] = now // lastTime + } + } + // call retry to make sure we're actively processing the queue + retry() +} + +function retry () { + // clear the timer and remove it to help prevent unintended concurrency + clearTimeout(retryTimer) + retryTimer = undefined + + if (fs[gracefulQueue].length === 0) + return + + var elem = fs[gracefulQueue].shift() + var fn = elem[0] + var args = elem[1] + // these items may be unset if they were added by an older graceful-fs + var err = elem[2] + var startTime = elem[3] + var lastTime = elem[4] + + // if we don't have a startTime we have no way of knowing if we've waited + // long enough, so go ahead and retry this item now + if (startTime === undefined) { + debug('RETRY', fn.name, args) + fn.apply(null, args) + } else if (Date.now() - startTime >= 60000) { + // it's been more than 60 seconds total, bail now + debug('TIMEOUT', fn.name, args) + var cb = args.pop() + if (typeof cb === 'function') + cb.call(null, err) + } else { + // the amount of time between the last attempt and right now + var sinceAttempt = Date.now() - lastTime + // the amount of time between when we first tried, and when we last tried + // rounded up to at least 1 + var sinceStart = Math.max(lastTime - startTime, 1) + // backoff. wait longer than the total time we've been retrying, but only + // up to a maximum of 100ms + var desiredDelay = Math.min(sinceStart * 1.2, 100) + // it's been long enough since the last retry, do it again + if (sinceAttempt >= desiredDelay) { + debug('RETRY', fn.name, args) + fn.apply(null, args.concat([startTime])) + } else { + // if we can't do this job yet, push it to the end of the queue + // and let the next iteration check again + fs[gracefulQueue].push(elem) + } + } + + // schedule our next run if one isn't already scheduled + if (retryTimer === undefined) { + retryTimer = setTimeout(retry, 0) + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 46641: +======= +/***/ 75288: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var Stream = (__nccwpck_require__(12781).Stream) + +module.exports = legacy + +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } + + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + + Stream.call(this); + + var self = this; + + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.encoding) this.setEncoding(this.encoding); + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } + + if (this.start > this.end) { + throw new Error('start must be <= end'); + } + + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); + }); + return; + } + + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } + + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } + + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + + Stream.call(this); + + this.path = path; + this.fd = null; + this.writable = true; + + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; + + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } + + this.pos = this.start; + } + + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 82132: +======= +/***/ 98944: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var constants = __nccwpck_require__(22057) + +var origCwd = process.cwd +var cwd = null + +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} + +// This check is needed until node.js 12 is required +if (typeof process.chdir === 'function') { + var chdir = process.chdir + process.chdir = function (d) { + cwd = null + chdir.call(process, d) + } + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) +} + +module.exports = patch + +function patch (fs) { + // (re-)implement some things that are known busted or missing. + + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } + + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) + } + + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. + + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) + + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) + + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) + + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) + + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) + + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) + + // if lchmod/lchown do not exist, then make them no-ops + if (fs.chmod && !fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (fs.chown && !fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } + + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 60 seconds. + + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { + fs.rename = typeof fs.rename !== 'function' ? fs.rename + : (function (fs$rename) { + function rename (from, to, cb) { + var start = Date.now() + var backoff = 0; + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er) + }) + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename) + return rename + })(fs.rename) + } + + // if read() returns EAGAIN, then just try it again. + fs.read = typeof fs.read !== 'function' ? fs.read + : (function (fs$read) { + function read (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + + // This ensures `util.promisify` works as it does for native `fs.read`. + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) + return read + })(fs.read) + + fs.readSync = typeof fs.readSync !== 'function' ? fs.readSync + : (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) + + function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) + } + + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + } + + function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK") && fs.futimes) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } + + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + + } else if (fs.futimes) { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } + } + + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } + + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } + + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null + } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + if (cb) cb.apply(this, arguments) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) + } + } + + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + return stats; + } + } + + // ENOSYS means that the fs doesn't support the op. Just ignore + // that, because it doesn't matter. + // + // if there's no getuid, or if getuid() is something other + // than 0, and the error is EINVAL or EPERM, then just ignore + // it. + // + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // + // When running as root, or if other types of errors are + // encountered, then it's strict. + function chownErOk (er) { + if (!er) + return true + + if (er.code === "ENOSYS") + return true + + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } + + return false + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 55392: +/***/ ((module) => { + +======= +/***/ 35779: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +// @ts-ignore +const SparseArray = __nccwpck_require__(447) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) + +/** + * @typedef {import('./consumable-hash').InfiniteHash} InfiniteHash + * @typedef {import('../').UserBucketOptions} UserBucketOptions + */ + +/** + * @template V + * @typedef {object} BucketChild + * @property {string} key + * @property {V} value + * @property {InfiniteHash} hash + */ + +/** + * @template B + * + * @typedef {object} SA + * @property {number} length + * @property {() => B[]} compactArray + * @property {(i: number) => B} get + * @property {(i: number, value: B) => void} set + * @property { (fn: (acc: A, curr: B, index: number) => A, initial: A) => B} reduce + * @property {(fn: (item: B) => boolean) => B | undefined} find + * @property {() => number[]} bitField + * @property {(i: number) => void} unset + */ + +/** + * @template T + * + * @typedef {object} BucketPosition + * @property {Bucket} bucket + * @property {number} pos + * @property {InfiniteHash} hash + * @property {BucketChild} [existingChild] + */ + +/** + * @typedef {object} BucketOptions + * @property {number} bits + * @property {(value: Uint8Array | InfiniteHash) => InfiniteHash} hash + */ + +/** + * @template T + */ +class Bucket { + /** + * @param {BucketOptions} options + * @param {Bucket} [parent] + * @param {number} [posAtParent=0] + */ + constructor (options, parent, posAtParent = 0) { + this._options = options + this._popCount = 0 + this._parent = parent + this._posAtParent = posAtParent + + /** @type {SA | BucketChild>} */ + this._children = new SparseArray() + + /** @type {string | null} */ + this.key = null + } + + /** + * @param {string} key + * @param {T} value + */ + async put (key, value) { + const place = await this._findNewBucketAndPos(key) + + await place.bucket._putAt(place, key, value) + } + + /** + * @param {string} key + */ + async get (key) { + const child = await this._findChild(key) + + if (child) { + return child.value + } + } + + /** + * @param {string} key + */ + async del (key) { + const place = await this._findPlace(key) + const child = place.bucket._at(place.pos) + + if (child && child.key === key) { + place.bucket._delAt(place.pos) + } + } + + /** + * @returns {number} + */ + leafCount () { + const children = this._children.compactArray() + + return children.reduce((acc, child) => { + if (child instanceof Bucket) { + return acc + child.leafCount() + } + + return acc + 1 + }, 0) + } + + childrenCount () { + return this._children.length + } + + onlyChild () { + return this._children.get(0) + } + + /** + * @returns {Iterable>} + */ + * eachLeafSeries () { + const children = this._children.compactArray() + + for (const child of children) { + if (child instanceof Bucket) { + yield * child.eachLeafSeries() + } else { + yield child + } + } + + // this is necessary because tsc requires a @return annotation as it + // can't derive a return type due to the recursion, and eslint requires + // a return statement when there is a @return annotation + return [] + } + + /** + * @param {(value: BucketChild, index: number) => T} map + * @param {(reduced: any) => any} reduce + */ + serialize (map, reduce) { + /** @type {T[]} */ + const acc = [] + // serialize to a custom non-sparse representation + return reduce(this._children.reduce((acc, child, index) => { + if (child) { + if (child instanceof Bucket) { + acc.push(child.serialize(map, reduce)) + } else { + acc.push(map(child, index)) + } + } + return acc + }, acc)) + } + + /** + * @param {(value: BucketChild) => Promise} asyncMap + * @param {(reduced: any) => Promise} asyncReduce + */ + asyncTransform (asyncMap, asyncReduce) { + return asyncTransformBucket(this, asyncMap, asyncReduce) + } + + toJSON () { + return this.serialize(mapNode, reduceNodes) + } + + prettyPrint () { + return JSON.stringify(this.toJSON(), null, ' ') + } + + tableSize () { + return Math.pow(2, this._options.bits) + } + + /** + * @param {string} key + * @returns {Promise | undefined>} + */ + async _findChild (key) { + const result = await this._findPlace(key) + const child = result.bucket._at(result.pos) + + if (child instanceof Bucket) { + // should not be possible, this._findPlace should always + // return a location for a child, not a bucket + return undefined + } + + if (child && child.key === key) { + return child + } + } + + /** + * @param {string | InfiniteHash} key + * @returns {Promise>} + */ + async _findPlace (key) { + const hashValue = this._options.hash(typeof key === 'string' ? uint8ArrayFromString(key) : key) + const index = await hashValue.take(this._options.bits) + + const child = this._children.get(index) + + if (child instanceof Bucket) { + return child._findPlace(hashValue) + } + + return { + bucket: this, + pos: index, + hash: hashValue, + existingChild: child + } + } + + /** + * @param {string | InfiniteHash} key + * @returns {Promise>} + */ + async _findNewBucketAndPos (key) { + const place = await this._findPlace(key) + + if (place.existingChild && place.existingChild.key !== key) { + // conflict + const bucket = new Bucket(this._options, place.bucket, place.pos) + place.bucket._putObjectAt(place.pos, bucket) + + // put the previous value + const newPlace = await bucket._findPlace(place.existingChild.hash) + newPlace.bucket._putAt(newPlace, place.existingChild.key, place.existingChild.value) + + return bucket._findNewBucketAndPos(place.hash) + } + + // no conflict, we found the place + return place + } + + /** + * @param {BucketPosition} place + * @param {string} key + * @param {T} value + */ + _putAt (place, key, value) { + this._putObjectAt(place.pos, { + key: key, + value: value, + hash: place.hash + }) + } + + /** + * @param {number} pos + * @param {Bucket | BucketChild} object + */ + _putObjectAt (pos, object) { + if (!this._children.get(pos)) { + this._popCount++ + } + this._children.set(pos, object) + } + + /** + * @param {number} pos + */ + _delAt (pos) { + if (pos === -1) { + throw new Error('Invalid position') + } + + if (this._children.get(pos)) { + this._popCount-- + } + this._children.unset(pos) + this._level() + } + + _level () { + if (this._parent && this._popCount <= 1) { + if (this._popCount === 1) { + // remove myself from parent, replacing me with my only child + const onlyChild = this._children.find(exists) + + if (onlyChild && !(onlyChild instanceof Bucket)) { + const hash = onlyChild.hash + hash.untake(this._options.bits) + const place = { + pos: this._posAtParent, + hash: hash, + bucket: this._parent + } + this._parent._putAt(place, onlyChild.key, onlyChild.value) + } + } else { + this._parent._delAt(this._posAtParent) + } + } + } + + /** + * @param {number} index + * @returns {BucketChild | Bucket | undefined} + */ + _at (index) { + return this._children.get(index) + } +} + +/** + * @param {any} o + */ +function exists (o) { + return Boolean(o) +} + +/** + * + * @param {*} node + * @param {number} index + */ +function mapNode (node, index) { + return node.key +} + +/** + * @param {*} nodes + */ +function reduceNodes (nodes) { + return nodes +} + +/** + * @template T + * + * @param {Bucket} bucket + * @param {(value: BucketChild) => Promise} asyncMap + * @param {(reduced: any) => Promise} asyncReduce + */ +async function asyncTransformBucket (bucket, asyncMap, asyncReduce) { + const output = [] + + for (const child of bucket._children.compactArray()) { + if (child instanceof Bucket) { + await asyncTransformBucket(child, asyncMap, asyncReduce) + } else { + const mappedChildren = await asyncMap(child) + + output.push({ + bitField: bucket._children.bitField(), + children: mappedChildren + }) + } + } + + return asyncReduce(output) +} + +module.exports = Bucket + + +/***/ }), + +/***/ 1267: +/***/ ((module) => { + +"use strict"; + + +const START_MASKS = [ + 0b11111111, + 0b11111110, + 0b11111100, + 0b11111000, + 0b11110000, + 0b11100000, + 0b11000000, + 0b10000000 +] + +const STOP_MASKS = [ + 0b00000001, + 0b00000011, + 0b00000111, + 0b00001111, + 0b00011111, + 0b00111111, + 0b01111111, + 0b11111111 +] + +module.exports = class ConsumableBuffer { + /** + * @param {Uint8Array} value + */ + constructor (value) { + this._value = value + this._currentBytePos = value.length - 1 + this._currentBitPos = 7 + } + + availableBits () { + return this._currentBitPos + 1 + this._currentBytePos * 8 + } + + totalBits () { + return this._value.length * 8 + } + + /** + * @param {number} bits + */ + take (bits) { + let pendingBits = bits + let result = 0 + while (pendingBits && this._haveBits()) { + const byte = this._value[this._currentBytePos] + const availableBits = this._currentBitPos + 1 + const taking = Math.min(availableBits, pendingBits) + const value = byteBitsToInt(byte, availableBits - taking, taking) + result = (result << taking) + value + + pendingBits -= taking + + this._currentBitPos -= taking + if (this._currentBitPos < 0) { + this._currentBitPos = 7 + this._currentBytePos-- + } + } + + return result + } + + /** + * @param {number} bits + */ + untake (bits) { + this._currentBitPos += bits + while (this._currentBitPos > 7) { + this._currentBitPos -= 8 + this._currentBytePos += 1 + } + } + + _haveBits () { + return this._currentBytePos >= 0 + } +} + +/** + * @param {number} byte + * @param {number} start + * @param {number} length + */ +function byteBitsToInt (byte, start, length) { + const mask = maskFor(start, length) + return (byte & mask) >>> start +} + +/** + * @param {number} start + * @param {number} length + */ +function maskFor (start, length) { + return START_MASKS[start] & STOP_MASKS[Math.min(length + start - 1, 7)] +} + + +/***/ }), + +/***/ 1663: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const ConsumableBuffer = __nccwpck_require__(1267) +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) + +/** + * @param {(value: Uint8Array) => Promise} hashFn + */ +function wrapHash (hashFn) { + /** + * @param {InfiniteHash | Uint8Array} value + */ + function hashing (value) { + if (value instanceof InfiniteHash) { + // already a hash. return it + return value + } else { + return new InfiniteHash(value, hashFn) + } + } + + return hashing +} + +class InfiniteHash { + /** + * + * @param {Uint8Array} value + * @param {(value: Uint8Array) => Promise} hashFn + */ + constructor (value, hashFn) { + if (!(value instanceof Uint8Array)) { + throw new Error('can only hash Uint8Arrays') + } + + this._value = value + this._hashFn = hashFn + this._depth = -1 + this._availableBits = 0 + this._currentBufferIndex = 0 + + /** @type {ConsumableBuffer[]} */ + this._buffers = [] + } + + /** + * @param {number} bits + */ + async take (bits) { + let pendingBits = bits + + while (this._availableBits < pendingBits) { + await this._produceMoreBits() + } + + let result = 0 + + while (pendingBits > 0) { + const hash = this._buffers[this._currentBufferIndex] + const available = Math.min(hash.availableBits(), pendingBits) + const took = hash.take(available) + result = (result << available) + took + pendingBits -= available + this._availableBits -= available + + if (hash.availableBits() === 0) { + this._currentBufferIndex++ + } + } + + return result + } + + /** + * @param {number} bits + */ + untake (bits) { + let pendingBits = bits + + while (pendingBits > 0) { + const hash = this._buffers[this._currentBufferIndex] + const availableForUntake = Math.min(hash.totalBits() - hash.availableBits(), pendingBits) + hash.untake(availableForUntake) + pendingBits -= availableForUntake + this._availableBits += availableForUntake + + if (this._currentBufferIndex > 0 && hash.totalBits() === hash.availableBits()) { + this._depth-- + this._currentBufferIndex-- + } + } + } + + async _produceMoreBits () { + this._depth++ + + const value = this._depth ? uint8ArrayConcat([this._value, Uint8Array.from([this._depth])]) : this._value + const hashValue = await this._hashFn(value) + const buffer = new ConsumableBuffer(hashValue) + + this._buffers.push(buffer) + this._availableBits += buffer.availableBits() + } +} + +module.exports = wrapHash +module.exports.InfiniteHash = InfiniteHash + + +/***/ }), + +/***/ 78338: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const Bucket = __nccwpck_require__(35779) +const wrapHash = __nccwpck_require__(1663) + +/** + * @typedef {object} UserBucketOptions + * @property {(value: Uint8Array) => Promise} hashFn + * @property {number} [bits=8] + */ + +/** + * @param {UserBucketOptions} options + */ +function createHAMT (options) { + if (!options || !options.hashFn) { + throw new Error('please define an options.hashFn') + } + + const bucketOptions = { + bits: options.bits || 8, + hash: wrapHash(options.hashFn) + } + + return new Bucket(bucketOptions) +} + +module.exports = { + createHAMT, + Bucket +} + + +/***/ }), + +/***/ 24099: +/***/ ((module) => { + +"use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = (flag, argv) => { + argv = argv || process.argv; + const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--'); + const pos = argv.indexOf(prefix + flag); + const terminatorPos = argv.indexOf('--'); + return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos); +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 42413: +======= +/***/ 94807: +/***/ ((module) => { + +"use strict"; + + +const word = '[a-fA-F\\d:]'; +const b = options => options && options.includeBoundaries ? + `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` : + ''; + +const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}'; + +const v6seg = '[a-fA-F\\d]{1,4}'; +const v6 = ` +( +(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 +(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 +(?:${v6seg}:){5}(?::${v4}|(:${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 +(?:${v6seg}:){4}(?:(:${v6seg}){0,1}:${v4}|(:${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 +(?:${v6seg}:){3}(?:(:${v6seg}){0,2}:${v4}|(:${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 +(?:${v6seg}:){2}(?:(:${v6seg}){0,3}:${v4}|(:${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 +(?:${v6seg}:){1}(?:(:${v6seg}){0,4}:${v4}|(:${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 +(?::((?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 +)(%[0-9a-zA-Z]{1,})? // %eth0 %1 +`.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); + +const ip = options => options && options.exact ? + new RegExp(`(?:^${v4}$)|(?:^${v6}$)`) : + new RegExp(`(?:${b(options)}${v4}${b(options)})|(?:${b(options)}${v6}${b(options)})`, 'g'); + +ip.v4 = options => options && options.exact ? new RegExp(`^${v4}$`) : new RegExp(`${b(options)}${v4}${b(options)}`, 'g'); +ip.v6 = options => options && options.exact ? new RegExp(`^${v6}$`) : new RegExp(`${b(options)}${v6}${b(options)}`, 'g'); + +module.exports = ip; + + +/***/ }), + +/***/ 75433: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.FsBlockStore = void 0; +const fs_1 = __importDefault(__nccwpck_require__(57147)); +const os_1 = __importDefault(__nccwpck_require__(22037)); +const multiformats_1 = __nccwpck_require__(27331); +const blockstore_core_1 = __nccwpck_require__(95301); +class FsBlockStore extends blockstore_core_1.BaseBlockstore { + constructor() { + super(); + this.path = `${os_1.default.tmpdir()}/${(parseInt(String(Math.random() * 1e9), 10)).toString() + Date.now()}`; + this._opened = false; + } + async _open() { + if (this._opening) { + await this._opening; + } + else { + this._opening = fs_1.default.promises.mkdir(this.path); + await this._opening; + this._opened = true; + } + } + async put(cid, bytes) { + if (!this._opened) { + await this._open(); + } + const cidStr = cid.toString(); + const location = `${this.path}/${cidStr}`; + await fs_1.default.promises.writeFile(location, bytes); + } + async get(cid) { + if (!this._opened) { + await this._open(); + } + const cidStr = cid.toString(); + const location = `${this.path}/${cidStr}`; + const bytes = await fs_1.default.promises.readFile(location); + return bytes; + } + async has(cid) { + if (!this._opened) { + await this._open(); + } + const cidStr = cid.toString(); + const location = `${this.path}/${cidStr}`; + try { + await fs_1.default.promises.access(location); + return true; + } + catch (err) { + return false; + } + } + async *blocks() { + if (!this._opened) { + await this._open(); + } + const cids = await fs_1.default.promises.readdir(this.path); + for (const cidStr of cids) { + const location = `${this.path}/${cidStr}`; + const bytes = await fs_1.default.promises.readFile(location); + yield { cid: multiformats_1.CID.parse(cidStr), bytes }; + } + } + async close() { + if (this._opened) { + await fs_1.default.promises.rm(this.path, { recursive: true }); + } + this._opened = false; + } +} +exports.FsBlockStore = FsBlockStore; + + +/***/ }), + +/***/ 58832: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.MemoryBlockStore = void 0; +const multiformats_1 = __nccwpck_require__(27331); +const blockstore_core_1 = __nccwpck_require__(95301); +class MemoryBlockStore extends blockstore_core_1.BaseBlockstore { + constructor() { + super(); + this.store = new Map(); + } + async *blocks() { + for (const [cidStr, bytes] of this.store.entries()) { + yield { cid: multiformats_1.CID.parse(cidStr), bytes }; + } + } + put(cid, bytes) { + this.store.set(cid.toString(), bytes); + return Promise.resolve(); + } + get(cid) { + const bytes = this.store.get(cid.toString()); + if (!bytes) { + throw new Error(`block with cid ${cid.toString()} no found`); + } + return Promise.resolve(bytes); + } + has(cid) { + return Promise.resolve(this.store.has(cid.toString())); + } + close() { + this.store.clear(); + return Promise.resolve(); + } +} +exports.MemoryBlockStore = MemoryBlockStore; + + +/***/ }), + +/***/ 68118: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.unixfsImporterOptionsDefault = void 0; +const sha2_1 = __nccwpck_require__(80960); +exports.unixfsImporterOptionsDefault = { + cidVersion: 1, + chunker: 'fixed', + maxChunkSize: 262144, + hasher: sha2_1.sha256, + rawLeaves: true, + wrapWithDirectory: true, + maxChildrenPerNode: 174 +}; + + +/***/ }), + +/***/ 47859: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + +"use strict"; + +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.pack = void 0; +const it_last_1 = __importDefault(__nccwpck_require__(28741)); +const it_pipe_1 = __importDefault(__nccwpck_require__(74824)); +const car_1 = __nccwpck_require__(56994); +const ipfs_unixfs_importer_1 = __nccwpck_require__(17512); +const normalise_input_1 = __nccwpck_require__(24699); +const memory_1 = __nccwpck_require__(58832); +const constants_1 = __nccwpck_require__(68118); +async function pack({ input, blockstore: userBlockstore, hasher, maxChunkSize, maxChildrenPerNode, wrapWithDirectory, rawLeaves, cidVersion }) { + if (!input || (Array.isArray(input) && !input.length)) { + throw new Error('missing input file(s)'); + } + const blockstore = userBlockstore ? userBlockstore : new memory_1.MemoryBlockStore(); + // Consume the source + const rootEntry = await (0, it_last_1.default)((0, it_pipe_1.default)((0, normalise_input_1.getNormaliser)(input), (source) => (0, ipfs_unixfs_importer_1.importer)(source, blockstore, { + ...constants_1.unixfsImporterOptionsDefault, + hasher: hasher || constants_1.unixfsImporterOptionsDefault.hasher, + maxChunkSize: maxChunkSize || constants_1.unixfsImporterOptionsDefault.maxChunkSize, + maxChildrenPerNode: maxChildrenPerNode || constants_1.unixfsImporterOptionsDefault.maxChildrenPerNode, + wrapWithDirectory: wrapWithDirectory === false ? false : constants_1.unixfsImporterOptionsDefault.wrapWithDirectory, + rawLeaves: rawLeaves == null ? constants_1.unixfsImporterOptionsDefault.rawLeaves : rawLeaves, + cidVersion: typeof cidVersion === "number" ? cidVersion : constants_1.unixfsImporterOptionsDefault.cidVersion + }))); + if (!rootEntry || !rootEntry.cid) { + throw new Error('given input could not be parsed correctly'); + } + const root = rootEntry.cid; + const { writer, out: carOut } = await car_1.CarWriter.create([root]); + const carOutIter = carOut[Symbol.asyncIterator](); + let writingPromise; + const writeAll = async () => { + for await (const block of blockstore.blocks()) { + // `await` will block until all bytes in `carOut` are consumed by the user + // so we have backpressure here + await writer.put(block); + } + await writer.close(); + if (!userBlockstore) { + await blockstore.close(); + } + }; + const out = { + [Symbol.asyncIterator]() { + if (writingPromise != null) { + throw new Error('Multiple iterator not supported'); + } + // don't start writing until the user starts consuming the iterator + writingPromise = writeAll(); + return { + async next() { + const result = await carOutIter.next(); + if (result.done) { + await writingPromise; // any errors will propagate from here + } + return result; + } + }; + } + }; + return { root, out }; +} +exports.pack = pack; + + +/***/ }), + +/***/ 24699: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getNormaliser = void 0; +const normalise_input_single_1 = __nccwpck_require__(82806); +const normalise_input_multiple_1 = __nccwpck_require__(36708); +function isBytes(obj) { + return ArrayBuffer.isView(obj) || obj instanceof ArrayBuffer; +} +function isBlob(obj) { + return Boolean(obj.constructor) && + (obj.constructor.name === 'Blob' || obj.constructor.name === 'File') && + typeof obj.stream === 'function'; +} +function isSingle(input) { + return typeof input === 'string' || input instanceof String || isBytes(input) || isBlob(input) || '_readableState' in input; +} +/** + * Get a single or multiple normaliser depending on the input. + */ +function getNormaliser(input) { + if (isSingle(input)) { + return (0, normalise_input_single_1.normaliseInput)(input); + } + else { + return (0, normalise_input_multiple_1.normaliseInput)(input); + } +} +exports.getNormaliser = getNormaliser; + + +/***/ }), + +/***/ 98381: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errCode = __nccwpck_require__(5822); +var browserStreamToIt = __nccwpck_require__(31049); +var itPeekable = __nccwpck_require__(66140); +var map = __nccwpck_require__(6305); +var utils = __nccwpck_require__(43691); +var ipfsUnixfs = __nccwpck_require__(24821); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); +var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); +var map__default = /*#__PURE__*/_interopDefaultLegacy(map); + +async function* normaliseCandidateMultiple(input, normaliseContent) { + if (typeof input === 'string' || input instanceof String || utils.isBytes(input) || utils.isBlob(input) || input._readableState) { + throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); + } + if (utils.isReadableStream(input)) { + input = browserStreamToIt__default["default"](input); + } + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + const peekable = itPeekable__default["default"](input); + const {value, done} = await peekable.peek(); + if (done) { + yield* []; + return; + } + peekable.push(value); + if (Number.isInteger(value)) { + throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); + } + if (value._readableState) { + yield* map__default["default"](peekable, value => toFileObject({ content: value }, normaliseContent)); + return; + } + if (utils.isBytes(value)) { + yield toFileObject({ content: peekable }, normaliseContent); + return; + } + if (utils.isFileObject(value) || value[Symbol.iterator] || value[Symbol.asyncIterator] || utils.isReadableStream(value) || utils.isBlob(value)) { + yield* map__default["default"](peekable, value => toFileObject(value, normaliseContent)); + return; + } + } + if (utils.isFileObject(input)) { + throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); + } + throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); +} +async function toFileObject(input, normaliseContent) { + const {path, mode, mtime, content} = input; + const file = { + path: path || '', + mode: ipfsUnixfs.parseMode(mode), + mtime: ipfsUnixfs.parseMtime(mtime) + }; + if (content) { + file.content = await normaliseContent(content); + } else if (!path) { + file.content = await normaliseContent(input); + } + return file; +} + +exports.normaliseCandidateMultiple = normaliseCandidateMultiple; + + +/***/ }), + +/***/ 23772: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errCode = __nccwpck_require__(5822); +var browserStreamToIt = __nccwpck_require__(31049); +var itPeekable = __nccwpck_require__(66140); +var utils = __nccwpck_require__(43691); +var ipfsUnixfs = __nccwpck_require__(24821); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); +var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); + +async function* normaliseCandidateSingle(input, normaliseContent) { + if (input === null || input === undefined) { + throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); + } + if (typeof input === 'string' || input instanceof String) { + yield toFileObject(input.toString(), normaliseContent); + return; + } + if (utils.isBytes(input) || utils.isBlob(input)) { + yield toFileObject(input, normaliseContent); + return; + } + if (utils.isReadableStream(input)) { + input = browserStreamToIt__default["default"](input); + } + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + const peekable = itPeekable__default["default"](input); + const {value, done} = await peekable.peek(); + if (done) { + yield { content: [] }; + return; + } + peekable.push(value); + if (Number.isInteger(value) || utils.isBytes(value) || typeof value === 'string' || value instanceof String) { + yield toFileObject(peekable, normaliseContent); + return; + } + throw errCode__default["default"](new Error('Unexpected input: multiple items passed - if you are using ipfs.add, please use ipfs.addAll instead'), 'ERR_UNEXPECTED_INPUT'); + } + if (utils.isFileObject(input)) { + yield toFileObject(input, normaliseContent); + return; + } + throw errCode__default["default"](new Error('Unexpected input: cannot convert "' + typeof input + '" into ImportCandidate'), 'ERR_UNEXPECTED_INPUT'); +} +async function toFileObject(input, normaliseContent) { + const {path, mode, mtime, content} = input; + const file = { + path: path || '', + mode: ipfsUnixfs.parseMode(mode), + mtime: ipfsUnixfs.parseMtime(mtime) + }; + if (content) { + file.content = await normaliseContent(content); + } else if (!path) { + file.content = await normaliseContent(input); + } + return file; +} + +exports.normaliseCandidateSingle = normaliseCandidateSingle; + + +/***/ }), + +/***/ 49849: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errCode = __nccwpck_require__(5822); +var fromString = __nccwpck_require__(39451); +var browserStreamToIt = __nccwpck_require__(31049); +var blobToIt = __nccwpck_require__(74827); +var itPeekable = __nccwpck_require__(66140); +var all = __nccwpck_require__(81172); +var map = __nccwpck_require__(6305); +var utils = __nccwpck_require__(43691); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); +var blobToIt__default = /*#__PURE__*/_interopDefaultLegacy(blobToIt); +var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); +var all__default = /*#__PURE__*/_interopDefaultLegacy(all); +var map__default = /*#__PURE__*/_interopDefaultLegacy(map); + +async function* toAsyncIterable(thing) { + yield thing; +} +async function normaliseContent(input) { + if (utils.isBytes(input)) { + return toAsyncIterable(toBytes(input)); + } + if (typeof input === 'string' || input instanceof String) { + return toAsyncIterable(toBytes(input.toString())); + } + if (utils.isBlob(input)) { + return blobToIt__default["default"](input); + } + if (utils.isReadableStream(input)) { + input = browserStreamToIt__default["default"](input); + } + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + const peekable = itPeekable__default["default"](input); + const {value, done} = await peekable.peek(); + if (done) { + return toAsyncIterable(new Uint8Array(0)); + } + peekable.push(value); + if (Number.isInteger(value)) { + return toAsyncIterable(Uint8Array.from(await all__default["default"](peekable))); + } + if (utils.isBytes(value) || typeof value === 'string' || value instanceof String) { + return map__default["default"](peekable, toBytes); + } + } + throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); +} +function toBytes(chunk) { + if (chunk instanceof Uint8Array) { + return chunk; + } + if (ArrayBuffer.isView(chunk)) { + return new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength); + } + if (chunk instanceof ArrayBuffer) { + return new Uint8Array(chunk); + } + if (Array.isArray(chunk)) { + return Uint8Array.from(chunk); + } + return fromString.fromString(chunk.toString()); +} + +exports.normaliseContent = normaliseContent; + + +/***/ }), + +/***/ 36708: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var normaliseContent = __nccwpck_require__(49849); +var normaliseCandidateMultiple = __nccwpck_require__(98381); + +function normaliseInput(input) { + return normaliseCandidateMultiple.normaliseCandidateMultiple(input, normaliseContent.normaliseContent); +} + +exports.normaliseInput = normaliseInput; + + +/***/ }), + +/***/ 82806: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var normaliseContent = __nccwpck_require__(49849); +var normaliseCandidateSingle = __nccwpck_require__(23772); + +function normaliseInput(input) { + return normaliseCandidateSingle.normaliseCandidateSingle(input, normaliseContent.normaliseContent); +} + +exports.normaliseInput = normaliseInput; + + +/***/ }), + +/***/ 43691: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function isBytes(obj) { + return ArrayBuffer.isView(obj) || obj instanceof ArrayBuffer; +} +function isBlob(obj) { + return obj.constructor && (obj.constructor.name === 'Blob' || obj.constructor.name === 'File') && typeof obj.stream === 'function'; +} +function isFileObject(obj) { + return typeof obj === 'object' && (obj.path || obj.content); +} +const isReadableStream = value => value && typeof value.getReader === 'function'; + +exports.isBlob = isBlob; +exports.isBytes = isBytes; +exports.isFileObject = isFileObject; +exports.isReadableStream = isReadableStream; + + +/***/ }), + +/***/ 34290: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// minimal library entry point. + + +module.exports = __nccwpck_require__(51539); + + +/***/ }), + +/***/ 51539: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +var protobuf = exports; + +/** + * Build type, one of `"full"`, `"light"` or `"minimal"`. + * @name build + * @type {string} + * @const + */ +protobuf.build = "minimal"; + +// Serialization +protobuf.Writer = __nccwpck_require__(18583); +protobuf.BufferWriter = __nccwpck_require__(41779); +protobuf.Reader = __nccwpck_require__(40118); +protobuf.BufferReader = __nccwpck_require__(65886); + +// Utility +protobuf.util = __nccwpck_require__(14512); +protobuf.rpc = __nccwpck_require__(57978); +protobuf.roots = __nccwpck_require__(19080); +protobuf.configure = configure; + +/* istanbul ignore next */ +/** + * Reconfigures the library according to the environment. + * @returns {undefined} + */ +function configure() { + protobuf.util._configure(); + protobuf.Writer._configure(protobuf.BufferWriter); + protobuf.Reader._configure(protobuf.BufferReader); +} + +// Set up buffer utility according to the environment +configure(); + + +/***/ }), + +/***/ 40118: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = Reader; + +var util = __nccwpck_require__(14512); + +var BufferReader; // cyclic + +var LongBits = util.LongBits, + utf8 = util.utf8; + +/* istanbul ignore next */ +function indexOutOfRange(reader, writeLength) { + return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); +} + +/** + * Constructs a new reader instance using the specified buffer. + * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. + * @constructor + * @param {Uint8Array} buffer Buffer to read from + */ +function Reader(buffer) { + + /** + * Read buffer. + * @type {Uint8Array} + */ + this.buf = buffer; + + /** + * Read buffer position. + * @type {number} + */ + this.pos = 0; + + /** + * Read buffer length. + * @type {number} + */ + this.len = buffer.length; +} + +var create_array = typeof Uint8Array !== "undefined" + ? function create_typed_array(buffer) { + if (buffer instanceof Uint8Array || Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + } + /* istanbul ignore next */ + : function create_array(buffer) { + if (Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + }; + +var create = function create() { + return util.Buffer + ? function create_buffer_setup(buffer) { + return (Reader.create = function create_buffer(buffer) { + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + /* istanbul ignore next */ + : create_array(buffer); + })(buffer); + } + /* istanbul ignore next */ + : create_array; +}; + +<<<<<<< HEAD +/** + * Creates a new reader using the specified buffer. + * @function + * @param {Uint8Array|Buffer} buffer Buffer to read from + * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} + * @throws {Error} If `buffer` is not a valid buffer + */ +Reader.create = create(); + +Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; + +/** + * Reads a varint as an unsigned 32 bit value. + * @function + * @returns {number} Value read + */ +Reader.prototype.uint32 = (function read_uint32_setup() { + var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) + return function read_uint32() { + value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; + + /* istanbul ignore if */ + if ((this.pos += 5) > this.len) { + this.pos = this.len; + throw indexOutOfRange(this, 10); + } + return value; + }; +})(); + +/** + * Reads a varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.int32 = function read_int32() { + return this.uint32() | 0; +}; + +/** + * Reads a zig-zag encoded varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.sint32 = function read_sint32() { + var value = this.uint32(); + return value >>> 1 ^ -(value & 1) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readLongVarint() { + // tends to deopt with local vars for octet etc. + var bits = new LongBits(0, 0); + var i = 0; + if (this.len - this.pos > 4) { // fast route (lo) + for (; i < 4; ++i) { + // 1st..4th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 5th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; + bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + i = 0; + } else { + for (; i < 3; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 1st..3th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; +======= +module.exports = agent; + + +/***/ }), + +/***/ 91946: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errCode = __nccwpck_require__(5822); +var browserStreamToIt = __nccwpck_require__(31049); +var itPeekable = __nccwpck_require__(66140); +var map = __nccwpck_require__(6305); +var utils = __nccwpck_require__(35630); +var ipfsUnixfs = __nccwpck_require__(24821); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); +var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); +var map__default = /*#__PURE__*/_interopDefaultLegacy(map); + +async function* normaliseCandidateMultiple(input, normaliseContent) { + if (typeof input === 'string' || input instanceof String || utils.isBytes(input) || utils.isBlob(input) || input._readableState) { + throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); + } + if (utils.isReadableStream(input)) { + input = browserStreamToIt__default["default"](input); + } + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + const peekable = itPeekable__default["default"](input); + const {value, done} = await peekable.peek(); + if (done) { + yield* []; + return; + } + peekable.push(value); + if (Number.isInteger(value)) { + throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); + } + if (value._readableState) { + yield* map__default["default"](peekable, value => toFileObject({ content: value }, normaliseContent)); + return; + } + if (utils.isBytes(value)) { + yield toFileObject({ content: peekable }, normaliseContent); + return; + } + if (utils.isFileObject(value) || value[Symbol.iterator] || value[Symbol.asyncIterator] || utils.isReadableStream(value) || utils.isBlob(value)) { + yield* map__default["default"](peekable, value => toFileObject(value, normaliseContent)); + return; + } + } + if (utils.isFileObject(input)) { + throw errCode__default["default"](new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT'); + } + throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); +} +async function toFileObject(input, normaliseContent) { + const {path, mode, mtime, content} = input; + const file = { + path: path || '', + mode: ipfsUnixfs.parseMode(mode), + mtime: ipfsUnixfs.parseMtime(mtime) + }; + if (content) { + file.content = await normaliseContent(content); + } else if (!path) { + file.content = await normaliseContent(input); + } + return file; +} + +exports.normaliseCandidateMultiple = normaliseCandidateMultiple; + + +/***/ }), + +/***/ 89926: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errCode = __nccwpck_require__(5822); +var browserStreamToIt = __nccwpck_require__(31049); +var itPeekable = __nccwpck_require__(66140); +var utils = __nccwpck_require__(35630); +var ipfsUnixfs = __nccwpck_require__(24821); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); +var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); + +async function* normaliseCandidateSingle(input, normaliseContent) { + if (input === null || input === undefined) { + throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); + } + if (typeof input === 'string' || input instanceof String) { + yield toFileObject(input.toString(), normaliseContent); + return; + } + if (utils.isBytes(input) || utils.isBlob(input)) { + yield toFileObject(input, normaliseContent); + return; + } + if (utils.isReadableStream(input)) { + input = browserStreamToIt__default["default"](input); + } + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + const peekable = itPeekable__default["default"](input); + const {value, done} = await peekable.peek(); + if (done) { + yield { content: [] }; + return; + } + peekable.push(value); + if (Number.isInteger(value) || utils.isBytes(value) || typeof value === 'string' || value instanceof String) { + yield toFileObject(peekable, normaliseContent); + return; + } + throw errCode__default["default"](new Error('Unexpected input: multiple items passed - if you are using ipfs.add, please use ipfs.addAll instead'), 'ERR_UNEXPECTED_INPUT'); + } + if (utils.isFileObject(input)) { + yield toFileObject(input, normaliseContent); + return; + } + throw errCode__default["default"](new Error('Unexpected input: cannot convert "' + typeof input + '" into ImportCandidate'), 'ERR_UNEXPECTED_INPUT'); +} +async function toFileObject(input, normaliseContent) { + const {path, mode, mtime, content} = input; + const file = { + path: path || '', + mode: ipfsUnixfs.parseMode(mode), + mtime: ipfsUnixfs.parseMtime(mtime) + }; + if (content) { + file.content = await normaliseContent(content); + } else if (!path) { + file.content = await normaliseContent(input); + } + return file; +} + +exports.normaliseCandidateSingle = normaliseCandidateSingle; + + +/***/ }), + +/***/ 31890: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errCode = __nccwpck_require__(5822); +var itPeekable = __nccwpck_require__(66140); +var browserStreamToIt = __nccwpck_require__(31049); +var all = __nccwpck_require__(81172); +var utils = __nccwpck_require__(35630); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); +var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); +var all__default = /*#__PURE__*/_interopDefaultLegacy(all); + +async function normaliseContent(input) { + if (utils.isBytes(input)) { + return new Blob([input]); + } + if (typeof input === 'string' || input instanceof String) { + return new Blob([input.toString()]); + } + if (utils.isBlob(input)) { + return input; + } + if (utils.isReadableStream(input)) { + input = browserStreamToIt__default["default"](input); + } + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + const peekable = itPeekable__default["default"](input); + const {value, done} = await peekable.peek(); + if (done) { + return itToBlob(peekable); + } + peekable.push(value); + if (Number.isInteger(value)) { + return new Blob([Uint8Array.from(await all__default["default"](peekable))]); + } + if (utils.isBytes(value) || typeof value === 'string' || value instanceof String) { + return itToBlob(peekable); + } + } + throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); +} +async function itToBlob(stream) { + const parts = []; + for await (const chunk of stream) { + parts.push(chunk); + } + return new Blob(parts); +} + +exports.normaliseContent = normaliseContent; + + +/***/ }), + +/***/ 20604: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errCode = __nccwpck_require__(5822); +var fromString = __nccwpck_require__(39451); +var browserStreamToIt = __nccwpck_require__(31049); +var blobToIt = __nccwpck_require__(74827); +var itPeekable = __nccwpck_require__(66140); +var all = __nccwpck_require__(81172); +var map = __nccwpck_require__(6305); +var utils = __nccwpck_require__(35630); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +var browserStreamToIt__default = /*#__PURE__*/_interopDefaultLegacy(browserStreamToIt); +var blobToIt__default = /*#__PURE__*/_interopDefaultLegacy(blobToIt); +var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); +var all__default = /*#__PURE__*/_interopDefaultLegacy(all); +var map__default = /*#__PURE__*/_interopDefaultLegacy(map); + +async function* toAsyncIterable(thing) { + yield thing; +} +async function normaliseContent(input) { + if (utils.isBytes(input)) { + return toAsyncIterable(toBytes(input)); + } + if (typeof input === 'string' || input instanceof String) { + return toAsyncIterable(toBytes(input.toString())); + } + if (utils.isBlob(input)) { + return blobToIt__default["default"](input); + } + if (utils.isReadableStream(input)) { + input = browserStreamToIt__default["default"](input); + } + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + const peekable = itPeekable__default["default"](input); + const {value, done} = await peekable.peek(); + if (done) { + return toAsyncIterable(new Uint8Array(0)); + } + peekable.push(value); + if (Number.isInteger(value)) { + return toAsyncIterable(Uint8Array.from(await all__default["default"](peekable))); + } + if (utils.isBytes(value) || typeof value === 'string' || value instanceof String) { + return map__default["default"](peekable, toBytes); + } + } + throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); +} +function toBytes(chunk) { + if (chunk instanceof Uint8Array) { + return chunk; + } + if (ArrayBuffer.isView(chunk)) { + return new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength); + } + if (chunk instanceof ArrayBuffer) { + return new Uint8Array(chunk); + } + if (Array.isArray(chunk)) { + return Uint8Array.from(chunk); + } + return fromString.fromString(chunk.toString()); +} + +exports.normaliseContent = normaliseContent; + + +/***/ }), + +/***/ 19666: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var normaliseContent_browser = __nccwpck_require__(31890); +var normaliseCandidateMultiple = __nccwpck_require__(91946); + +function normaliseInput(input) { + return normaliseCandidateMultiple.normaliseCandidateMultiple(input, normaliseContent_browser.normaliseContent, true); +} + +exports.normaliseInput = normaliseInput; + + +/***/ }), + +/***/ 46416: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var normaliseContent = __nccwpck_require__(20604); +var normaliseCandidateMultiple = __nccwpck_require__(91946); + +function normaliseInput(input) { + return normaliseCandidateMultiple.normaliseCandidateMultiple(input, normaliseContent.normaliseContent); +} + +exports.normaliseInput = normaliseInput; + + +/***/ }), + +/***/ 75400: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var normaliseContent = __nccwpck_require__(20604); +var normaliseCandidateSingle = __nccwpck_require__(89926); + +function normaliseInput(input) { + return normaliseCandidateSingle.normaliseCandidateSingle(input, normaliseContent.normaliseContent); +} + +exports.normaliseInput = normaliseInput; + + +/***/ }), + +/***/ 35630: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function isBytes(obj) { + return ArrayBuffer.isView(obj) || obj instanceof ArrayBuffer; +} +function isBlob(obj) { + return obj.constructor && (obj.constructor.name === 'Blob' || obj.constructor.name === 'File') && typeof obj.stream === 'function'; +} +function isFileObject(obj) { + return typeof obj === 'object' && (obj.path || obj.content); +} +const isReadableStream = value => value && typeof value.getReader === 'function'; + +exports.isBlob = isBlob; +exports.isBytes = isBytes; +exports.isFileObject = isFileObject; +exports.isReadableStream = isReadableStream; + + +/***/ }), + +/***/ 1295: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function modeToString(mode) { + if (mode == null) { + return undefined; + } + if (typeof mode === 'string') { + return mode; + } + return mode.toString(8).padStart(4, '0'); +} + +exports.modeToString = modeToString; + + +/***/ }), + +/***/ 61560: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const LOAD_BASE = name => Promise.reject(new Error(`No base found for "${ name }"`)); +class Multibases { + constructor(options) { + this._basesByName = {}; + this._basesByPrefix = {}; + this._loadBase = options.loadBase || LOAD_BASE; + for (const base of options.bases) { + this.addBase(base); + } + } + addBase(base) { + if (this._basesByName[base.name] || this._basesByPrefix[base.prefix]) { + throw new Error(`Codec already exists for codec "${ base.name }"`); + } + this._basesByName[base.name] = base; + this._basesByPrefix[base.prefix] = base; + } + removeBase(base) { + delete this._basesByName[base.name]; + delete this._basesByPrefix[base.prefix]; + } + async getBase(nameOrPrefix) { + if (this._basesByName[nameOrPrefix]) { + return this._basesByName[nameOrPrefix]; + } + if (this._basesByPrefix[nameOrPrefix]) { + return this._basesByPrefix[nameOrPrefix]; + } + const base = await this._loadBase(nameOrPrefix); + if (this._basesByName[base.name] == null && this._basesByPrefix[base.prefix] == null) { + this.addBase(base); + } + return base; + } + listBases() { + return Object.values(this._basesByName); + } +} + +exports.Multibases = Multibases; + + +/***/ }), + +/***/ 83319: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const LOAD_CODEC = codeOrName => Promise.reject(new Error(`No codec found for "${ codeOrName }"`)); +class Multicodecs { + constructor(options) { + this._codecsByName = {}; + this._codecsByCode = {}; + this._loadCodec = options.loadCodec || LOAD_CODEC; + for (const codec of options.codecs) { + this.addCodec(codec); + } + } + addCodec(codec) { + if (this._codecsByName[codec.name] || this._codecsByCode[codec.code]) { + throw new Error(`Resolver already exists for codec "${ codec.name }"`); + } + this._codecsByName[codec.name] = codec; + this._codecsByCode[codec.code] = codec; + } + removeCodec(codec) { + delete this._codecsByName[codec.name]; + delete this._codecsByCode[codec.code]; + } + async getCodec(code) { + const table = typeof code === 'string' ? this._codecsByName : this._codecsByCode; + if (table[code]) { + return table[code]; + } + const codec = await this._loadCodec(code); + if (table[code] == null) { + this.addCodec(codec); + } + return codec; + } + listCodecs() { + return Object.values(this._codecsByName); + } +} + +exports.Multicodecs = Multicodecs; + + +/***/ }), + +/***/ 5529: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const LOAD_HASHER = codeOrName => Promise.reject(new Error(`No hasher found for "${ codeOrName }"`)); +class Multihashes { + constructor(options) { + this._hashersByName = {}; + this._hashersByCode = {}; + this._loadHasher = options.loadHasher || LOAD_HASHER; + for (const hasher of options.hashers) { + this.addHasher(hasher); + } + } + addHasher(hasher) { + if (this._hashersByName[hasher.name] || this._hashersByCode[hasher.code]) { + throw new Error(`Resolver already exists for codec "${ hasher.name }"`); + } + this._hashersByName[hasher.name] = hasher; + this._hashersByCode[hasher.code] = hasher; + } + removeHasher(hasher) { + delete this._hashersByName[hasher.name]; + delete this._hashersByCode[hasher.code]; + } + async getHasher(code) { + const table = typeof code === 'string' ? this._hashersByName : this._hashersByCode; + if (table[code]) { + return table[code]; + } + const hasher = await this._loadHasher(code); + if (table[code] == null) { + this.addHasher(hasher); + } + return hasher; + } + listHashers() { + return Object.values(this._hashersByName); + } +} + +exports.Multihashes = Multihashes; + + +/***/ }), + +/***/ 20665: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var normaliseInputMultiple_browser = __nccwpck_require__(19666); +var modeToString = __nccwpck_require__(1295); + +async function multipartRequest(source, abortController, headers = {}) { + const parts = []; + const formData = new FormData(); + let index = 0; + let total = 0; + for await (const {content, path, mode, mtime} of normaliseInputMultiple_browser.normaliseInput(source)) { + let fileSuffix = ''; + const type = content ? 'file' : 'dir'; + if (index > 0) { + fileSuffix = `-${ index }`; + } + let fieldName = type + fileSuffix; + const qs = []; + if (mode !== null && mode !== undefined) { + qs.push(`mode=${ modeToString.modeToString(mode) }`); + } + if (mtime != null) { + const {secs, nsecs} = mtime; + qs.push(`mtime=${ secs }`); + if (nsecs != null) { + qs.push(`mtime-nsecs=${ nsecs }`); + } + } + if (qs.length) { + fieldName = `${ fieldName }?${ qs.join('&') }`; + } + if (content) { + formData.set(fieldName, content, path != null ? encodeURIComponent(path) : undefined); + const end = total + content.size; + parts.push({ + name: path, + start: total, + end + }); + total = end; + } else if (path != null) { + formData.set(fieldName, new File([''], encodeURIComponent(path), { type: 'application/x-directory' })); + } else { + throw new Error('path or content or both must be set'); + } + index++; + } + return { + total, + parts, + headers, + body: formData + }; +} + +exports.multipartRequest = multipartRequest; + + +/***/ }), + +/***/ 87527: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var env_js = __nccwpck_require__(48488); +var multipartRequest_node = __nccwpck_require__(57043); +var multipartRequest_browser = __nccwpck_require__(20665); +var nanoid = __nccwpck_require__(45835); + +async function multipartRequest(source, abortController, headers = {}, boundary = `-----------------------------${ nanoid.nanoid() }`) { + let req = multipartRequest_node.multipartRequest; + if (env_js.isElectronRenderer) { + req = multipartRequest_browser.multipartRequest; + } + return req(source, abortController, headers, boundary); +} + +exports.multipartRequest = multipartRequest; + + +/***/ }), + +/***/ 57043: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var normaliseInputMultiple = __nccwpck_require__(46416); +var nanoid = __nccwpck_require__(45835); +var modeToString = __nccwpck_require__(1295); +var mergeOpts = __nccwpck_require__(79139); +var toStream = __nccwpck_require__(28186); +var debug = __nccwpck_require__(58923); +var itPeekable = __nccwpck_require__(66140); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var mergeOpts__default = /*#__PURE__*/_interopDefaultLegacy(mergeOpts); +var toStream__default = /*#__PURE__*/_interopDefaultLegacy(toStream); +var debug__default = /*#__PURE__*/_interopDefaultLegacy(debug); +var itPeekable__default = /*#__PURE__*/_interopDefaultLegacy(itPeekable); + +const merge = mergeOpts__default["default"].bind({ ignoreUndefined: true }); +const log = debug__default["default"]('ipfs:core-utils:multipart-request'); +async function multipartRequest(source, abortController, headers = {}, boundary = `-----------------------------${ nanoid.nanoid() }`) { + async function* streamFiles(source) { + try { + let index = 0; + for await (const {content, path, mode, mtime} of source) { + let fileSuffix = ''; + const type = content ? 'file' : 'dir'; + if (index > 0) { + yield '\r\n'; + fileSuffix = `-${ index }`; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + } + // 4th + bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; + return bits; + } + if (this.len - this.pos > 4) { // fast route (hi) + for (; i < 5; ++i) { + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } +<<<<<<< HEAD +======= + if (mtime != null) { + const {secs, nsecs} = mtime; + qs.push(`mtime=${ secs }`); + if (nsecs != null) { + qs.push(`mtime-nsecs=${ nsecs }`); + } + } + if (qs.length) { + fieldName = `${ fieldName }?${ qs.join('&') }`; + } + yield `--${ boundary }\r\n`; + yield `Content-Disposition: form-data; name="${ fieldName }"; filename="${ encodeURIComponent(path || '') }"\r\n`; + yield `Content-Type: ${ content ? 'application/octet-stream' : 'application/x-directory' }\r\n`; + yield '\r\n'; + if (content) { + yield* content; + } + index++; + } + } catch (err) { + log(err); + abortController.abort(); + } finally { + yield `\r\n--${ boundary }--\r\n`; + } + } + const peekable = itPeekable__default["default"](normaliseInputMultiple.normaliseInput(source)); + const {value, done} = await peekable.peek(); + if (!done) { + peekable.push(value); + } + return { + parts: null, + total: -1, + headers: merge(headers, { 'Content-Type': `multipart/form-data; boundary=${ boundary }` }), + body: toStream__default["default"](streamFiles(peekable)) + }; +} + +exports.multipartRequest = multipartRequest; + + +/***/ }), + +/***/ 44956: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errCode = __nccwpck_require__(5822); +var cid = __nccwpck_require__(24247); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +async function* normaliseInput(input) { + if (input === null || input === undefined) { + throw errCode__default["default"](new Error(`Unexpected input: ${ input }`), 'ERR_UNEXPECTED_INPUT'); + } + const cid$1 = cid.CID.asCID(input); + if (cid$1) { + yield toPin({ cid: cid$1 }); + return; + } + if (input instanceof String || typeof input === 'string') { + yield toPin({ path: input }); + return; + } + if (input.cid != null || input.path != null) { + return yield toPin(input); + } + if (Symbol.iterator in input) { + const iterator = input[Symbol.iterator](); + const first = iterator.next(); + if (first.done) + return iterator; + if (cid.CID.asCID(first.value) || first.value instanceof String || typeof first.value === 'string') { + yield toPin({ cid: first.value }); + for (const cid of iterator) { + yield toPin({ cid }); + } + return; + } + if (first.value.cid != null || first.value.path != null) { + yield toPin(first.value); + for (const obj of iterator) { + yield toPin(obj); + } + return; + } + throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); + } + if (Symbol.asyncIterator in input) { + const iterator = input[Symbol.asyncIterator](); + const first = await iterator.next(); + if (first.done) + return iterator; + if (cid.CID.asCID(first.value) || first.value instanceof String || typeof first.value === 'string') { + yield toPin({ cid: first.value }); + for await (const cid of iterator) { + yield toPin({ cid }); + } + return; + } + if (first.value.cid != null || first.value.path != null) { + yield toPin(first.value); + for await (const obj of iterator) { + yield toPin(obj); + } + return; + } + throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); + } + throw errCode__default["default"](new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT'); +} +function toPin(input) { + const path = input.cid || `${ input.path }`; + if (!path) { + throw errCode__default["default"](new Error('Unexpected input: Please path either a CID or an IPFS path'), 'ERR_UNEXPECTED_INPUT'); + } + const pin = { + path, + recursive: input.recursive !== false + }; + if (input.metadata != null) { + pin.metadata = input.metadata; + } + return pin; +} + +exports.normaliseInput = normaliseInput; + + +/***/ }), + +/***/ 4037: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var multiaddr = __nccwpck_require__(47730); +var multiAddrToUri = __nccwpck_require__(6211); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var multiAddrToUri__default = /*#__PURE__*/_interopDefaultLegacy(multiAddrToUri); + +function toUrlString(url) { + try { + url = multiAddrToUri__default["default"](new multiaddr.Multiaddr(url)); + } catch (err) { + } + url = url.toString(); + return url; +} + +exports.toUrlString = toUrlString; + + +/***/ }), + +/***/ 22126: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const convert = __nccwpck_require__(59943) +const protocols = __nccwpck_require__(19612) +const varint = __nccwpck_require__(30310) +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) + +// export codec +module.exports = { + stringToStringTuples, + stringTuplesToString, + + tuplesToStringTuples, + stringTuplesToTuples, + + bytesToTuples, + tuplesToBytes, + + bytesToString, + stringToBytes, + + fromString, + fromBytes, + validateBytes, + isValidBytes, + cleanPath, + + ParseError, + protoFromTuple, + + sizeForAddr +} + +// string -> [[str name, str addr]... ] +/** + * @param {string} str + */ +function stringToStringTuples (str) { + const tuples = [] + const parts = str.split('/').slice(1) // skip first empty elem + if (parts.length === 1 && parts[0] === '') { + return [] + } + + for (let p = 0; p < parts.length; p++) { + const part = parts[p] + const proto = protocols(part) + + if (proto.size === 0) { + tuples.push([part]) + continue + } + + p++ // advance addr part + if (p >= parts.length) { + throw ParseError('invalid address: ' + str) + } + + // if it's a path proto, take the rest + if (proto.path) { + tuples.push([ + part, + // TODO: should we need to check each path part to see if it's a proto? + // This would allow for other protocols to be added after a unix path, + // however it would have issues if the path had a protocol name in the path + cleanPath(parts.slice(p).join('/')) + ]) + break + } + + tuples.push([part, parts[p]]) + } + + return tuples +} + +// [[str name, str addr]... ] -> string +/** + * @param {[number, string?][]} tuples + */ +function stringTuplesToString (tuples) { + /** @type {Array} */ + const parts = [] + tuples.map((tup) => { + const proto = protoFromTuple(tup) + parts.push(proto.name) + if (tup.length > 1) { + parts.push(tup[1]) + } + return null + }) + + return cleanPath(parts.join('/')) +} + +// [[str name, str addr]... ] -> [[int code, Uint8Array]... ] +/** + * @param {Array} tuples + * @returns {[number , Uint8Array?][]} + */ +function stringTuplesToTuples (tuples) { + return tuples.map((tup) => { + if (!Array.isArray(tup)) { + tup = [tup] + } + const proto = protoFromTuple(tup) + if (tup.length > 1) { + return [proto.code, convert.toBytes(proto.code, tup[1])] + } + return [proto.code] + }) +} + +/** + * Convert tuples to string tuples + * + * [[int code, Uint8Array]... ] -> [[int code, str addr]... ] + * + * @param {Array<[number, Uint8Array?]>} tuples + * @returns {Array<[number, string?]>} + */ + +function tuplesToStringTuples (tuples) { + return tuples.map(tup => { + const proto = protoFromTuple(tup) + if (tup[1]) { + return [proto.code, convert.toString(proto.code, tup[1])] + } + return [proto.code] + }) +} + +// [[int code, Uint8Array ]... ] -> Uint8Array +/** + * @param {[number, Uint8Array?][]} tuples + */ +function tuplesToBytes (tuples) { + return fromBytes(uint8ArrayConcat(tuples.map((/** @type {any[]} */ tup) => { + const proto = protoFromTuple(tup) + let buf = Uint8Array.from(varint.encode(proto.code)) + + if (tup.length > 1) { + buf = uint8ArrayConcat([buf, tup[1]]) // add address buffer + } + + return buf + }))) +} + +/** + * @param {import("./types").Protocol} p + * @param {Uint8Array | number[]} addr + */ +function sizeForAddr (p, addr) { + if (p.size > 0) { + return p.size / 8 + } else if (p.size === 0) { + return 0 + } else { + const size = varint.decode(addr) + return size + varint.decode.bytes + } +} + +/** + * + * @param {Uint8Array} buf + * @returns {Array<[number, Uint8Array?]>} + */ +function bytesToTuples (buf) { + /** @type {Array<[number, Uint8Array?]>} */ + const tuples = [] + let i = 0 + while (i < buf.length) { + const code = varint.decode(buf, i) + const n = varint.decode.bytes + + const p = protocols(code) + + const size = sizeForAddr(p, buf.slice(i + n)) + + if (size === 0) { + tuples.push([code]) + i += n + continue + } + + const addr = buf.slice(i + n, i + n + size) + + i += (size + n) + + if (i > buf.length) { // did not end _exactly_ at buffer.length + throw ParseError('Invalid address Uint8Array: ' + uint8ArrayToString(buf, 'base16')) + } + + // ok, tuple seems good. + tuples.push([code, addr]) + } + + return tuples +} + +// Uint8Array -> String +/** + * @param {Uint8Array} buf + */ +function bytesToString (buf) { + const a = bytesToTuples(buf) + const b = tuplesToStringTuples(a) + return stringTuplesToString(b) +} + +// String -> Uint8Array +/** + * @param {string} str + */ +function stringToBytes (str) { + str = cleanPath(str) + const a = stringToStringTuples(str) + const b = stringTuplesToTuples(a) + + return tuplesToBytes(b) +} + +// String -> Uint8Array +/** + * @param {string} str + */ +function fromString (str) { + return stringToBytes(str) +} + +// Uint8Array -> Uint8Array +/** + * @param {Uint8Array} buf + */ +function fromBytes (buf) { + const err = validateBytes(buf) + if (err) throw err + return Uint8Array.from(buf) // copy +} + +/** + * @param {Uint8Array} buf + */ +function validateBytes (buf) { + try { + bytesToTuples(buf) // try to parse. will throw if breaks + } catch (err) { + return err + } +} + +/** + * @param {Uint8Array} buf + */ +function isValidBytes (buf) { + return validateBytes(buf) === undefined +} + +/** + * @param {string} str + */ +function cleanPath (str) { + return '/' + str.trim().split('/').filter((/** @type {any} */ a) => a).join('/') +} + +/** + * @param {string} str + */ +function ParseError (str) { + return new Error('Error parsing address: ' + str) +} + +/** + * @param {any[]} tup + */ +function protoFromTuple (tup) { + const proto = protocols(tup[0]) + return proto +} + + +/***/ }), + +/***/ 59943: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const ip = __nccwpck_require__(53153) +const protocols = __nccwpck_require__(19612) +const { CID } = __nccwpck_require__(24247) +const { base32 } = __nccwpck_require__(70784) +const { base58btc } = __nccwpck_require__(49108) +const Digest = __nccwpck_require__(81168) +const varint = __nccwpck_require__(30310) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) + +module.exports = Convert + +// converts (serializes) addresses +/** + * @param {string} proto + * @param {string | Uint8Array} a + */ +function Convert (proto, a) { + if (a instanceof Uint8Array) { + return Convert.toString(proto, a) + } else { + return Convert.toBytes(proto, a) + } +} + +/** + * Convert [code,Uint8Array] to string + * + * @param {number|string} proto + * @param {Uint8Array} buf + * @returns {string} + */ +Convert.toString = function convertToString (proto, buf) { + const protocol = protocols(proto) + switch (protocol.code) { + case 4: // ipv4 + case 41: // ipv6 + return bytes2ip(buf) + + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return bytes2port(buf).toString() + + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 777: // memory + return bytes2str(buf) + + case 421: // ipfs + return bytes2mh(buf) + case 444: // onion + return bytes2onion(buf) + case 445: // onion3 + return bytes2onion(buf) + default: + return uint8ArrayToString(buf, 'base16') // no clue. convert to hex + } +} + +Convert.toBytes = function convertToBytes (/** @type {string | number } */ proto, /** @type {string} */ str) { + const protocol = protocols(proto) + switch (protocol.code) { + case 4: // ipv4 + return ip2bytes(str) + case 41: // ipv6 + return ip2bytes(str) + + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return port2bytes(parseInt(str, 10)) + + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 777: // memory + return str2bytes(str) + + case 421: // ipfs + return mh2bytes(str) + case 444: // onion + return onion2bytes(str) + case 445: // onion3 + return onion32bytes(str) + default: + return uint8ArrayFromString(str, 'base16') // no clue. convert from hex + } +} + +/** + * @param {string} ipString + */ +function ip2bytes (ipString) { + if (!ip.isIP(ipString)) { + throw new Error('invalid ip address') + } + return ip.toBytes(ipString) +} + +/** + * @param {Uint8Array} ipBuff + */ +function bytes2ip (ipBuff) { + const ipString = ip.toString(ipBuff) + if (!ipString || !ip.isIP(ipString)) { + throw new Error('invalid ip address') + } + return ipString +} + +/** + * @param {number} port + */ +function port2bytes (port) { + const buf = new ArrayBuffer(2) + const view = new DataView(buf) + view.setUint16(0, port) + + return new Uint8Array(buf) +} + +/** + * @param {Uint8Array} buf + */ +function bytes2port (buf) { + const view = new DataView(buf.buffer) + return view.getUint16(buf.byteOffset) +} + +/** + * @param {string} str + */ +function str2bytes (str) { + const buf = uint8ArrayFromString(str) + const size = Uint8Array.from(varint.encode(buf.length)) + return uint8ArrayConcat([size, buf], size.length + buf.length) +} + +/** + * @param {Uint8Array} buf + */ +function bytes2str (buf) { + const size = varint.decode(buf) + buf = buf.slice(varint.decode.bytes) + + if (buf.length !== size) { + throw new Error('inconsistent lengths') + } + + return uint8ArrayToString(buf) +} + +/** + * @param {string} hash - base58btc string + */ +function mh2bytes (hash) { + let mh + + if (hash[0] === 'Q' || hash[0] === '1') { + mh = Digest.decode(base58btc.decode(`z${hash}`)).bytes + } else { + mh = CID.parse(hash).multihash.bytes + } + + // the address is a varint prefixed multihash string representation + const size = Uint8Array.from(varint.encode(mh.length)) + return uint8ArrayConcat([size, mh], size.length + mh.length) +} + +/** + * Converts bytes to bas58btc string + * + * @param {Uint8Array} buf + * @returns {string} base58btc string + */ +function bytes2mh (buf) { + const size = varint.decode(buf) + const address = buf.slice(varint.decode.bytes) + + if (address.length !== size) { + throw new Error('inconsistent lengths') + } + + return uint8ArrayToString(address, 'base58btc') +} + +/** + * @param {string} str + */ +function onion2bytes (str) { + const addr = str.split(':') + if (addr.length !== 2) { + throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') + } + if (addr[0].length !== 16) { + throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion address.') + } + + // onion addresses do not include the multibase prefix, add it before decoding + const buf = base32.decode('b' + addr[0]) + + // onion port number + const port = parseInt(addr[1], 10) + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)') + } + const portBuf = port2bytes(port) + return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) +} + +/** + * @param {string} str + */ +function onion32bytes (str) { + const addr = str.split(':') + if (addr.length !== 2) { + throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') + } + if (addr[0].length !== 56) { + throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion3 address.') + } + // onion addresses do not include the multibase prefix, add it before decoding + const buf = base32.decode('b' + addr[0]) + + // onion port number + const port = parseInt(addr[1], 10) + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)') + } + const portBuf = port2bytes(port) + return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) +} + +/** + * @param {Uint8Array} buf + */ +function bytes2onion (buf) { + const addrBytes = buf.slice(0, buf.length - 2) + const portBytes = buf.slice(buf.length - 2) + const addr = uint8ArrayToString(addrBytes, 'base32') + const port = bytes2port(portBytes) + return addr + ':' + port +} + + +/***/ }), + +/***/ 47730: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const codec = __nccwpck_require__(22126) +const protocols = __nccwpck_require__(19612) +const varint = __nccwpck_require__(30310) +const { CID } = __nccwpck_require__(24247) +const { base58btc } = __nccwpck_require__(49108) +const errCode = __nccwpck_require__(5822) +const inspect = Symbol.for('nodejs.util.inspect.custom') +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) + +/** + * @typedef {(addr: Multiaddr) => Promise} Resolver + * @typedef {string | Multiaddr | Uint8Array | null} MultiaddrInput + * @typedef {import('./types').MultiaddrObject} MultiaddrObject + * @typedef {import('./types').Protocol} Protocol + */ + +/** @type {Map} */ +const resolvers = new Map() +const symbol = Symbol.for('@multiformats/js-multiaddr/multiaddr') + +/** + * Creates a [multiaddr](https://github.com/multiformats/multiaddr) from + * a Uint8Array, String or another Multiaddr instance + * public key. + * + */ +class Multiaddr { + /** + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * ``` + * + * @param {MultiaddrInput} [addr] - If String or Uint8Array, needs to adhere to the address format of a [multiaddr](https://github.com/multiformats/multiaddr#string-format) + */ + constructor (addr) { + // default + if (addr == null) { + addr = '' + } + + // Define symbol + Object.defineProperty(this, symbol, { value: true }) + + if (addr instanceof Uint8Array) { + /** @type {Uint8Array} - The raw bytes representing this multiaddress */ + this.bytes = codec.fromBytes(addr) + } else if (typeof addr === 'string') { + if (addr.length > 0 && addr.charAt(0) !== '/') { + throw new Error(`multiaddr "${addr}" must start with a "/"`) + } + this.bytes = codec.fromString(addr) + } else if (Multiaddr.isMultiaddr(addr)) { // Multiaddr + this.bytes = codec.fromBytes(addr.bytes) // validate + copy buffer +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + } else { + for (; i < 5; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } + /* istanbul ignore next */ + throw Error("invalid varint encoding"); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads a varint as a signed 64 bit value. + * @name Reader#int64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as an unsigned 64 bit value. + * @name Reader#uint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a zig-zag encoded varint as a signed 64 bit value. + * @name Reader#sint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as a boolean. + * @returns {boolean} Value read + */ +Reader.prototype.bool = function read_bool() { + return this.uint32() !== 0; +}; + +function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` + return (buf[end - 4] + | buf[end - 3] << 8 + | buf[end - 2] << 16 + | buf[end - 1] << 24) >>> 0; +} + +/** + * Reads fixed 32 bits as an unsigned 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.fixed32 = function read_fixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4); +}; + +/** + * Reads fixed 32 bits as a signed 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.sfixed32 = function read_sfixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readFixed64(/* this: Reader */) { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 8); + + return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads fixed 64 bits. + * @name Reader#fixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads zig-zag encoded fixed 64 bits. + * @name Reader#sfixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a float (32 bit) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.float = function read_float() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readFloatLE(this.buf, this.pos); + this.pos += 4; + return value; +}; + +/** + * Reads a double (64 bit float) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.double = function read_double() { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readDoubleLE(this.buf, this.pos); + this.pos += 8; + return value; +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @returns {Uint8Array} Value read + */ +Reader.prototype.bytes = function read_bytes() { + var length = this.uint32(), + start = this.pos, + end = this.pos + length; + + /* istanbul ignore if */ + if (end > this.len) + throw indexOutOfRange(this, length); + + this.pos += length; + if (Array.isArray(this.buf)) // plain array + return this.buf.slice(start, end); + + if (start === end) { // fix for IE 10/Win8 and others' subarray returning array of size 1 + var nativeBuffer = util.Buffer; + return nativeBuffer + ? nativeBuffer.alloc(0) + : new this.buf.constructor(0); + } + return this._slice.call(this.buf, start, end); +}; + +/** + * Reads a string preceeded by its byte length as a varint. + * @returns {string} Value read + */ +Reader.prototype.string = function read_string() { + var bytes = this.bytes(); + return utf8.read(bytes, 0, bytes.length); +}; + +/** + * Skips the specified number of bytes if specified, otherwise skips a varint. + * @param {number} [length] Length if known, otherwise a varint is assumed + * @returns {Reader} `this` + */ +Reader.prototype.skip = function skip(length) { + if (typeof length === "number") { + /* istanbul ignore if */ + if (this.pos + length > this.len) + throw indexOutOfRange(this, length); + this.pos += length; + } else { + do { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + } while (this.buf[this.pos++] & 128); + } + return this; +}; + +/** + * Skips the next element of the specified wire type. + * @param {number} wireType Wire type received + * @returns {Reader} `this` + */ +Reader.prototype.skipType = function(wireType) { + switch (wireType) { + case 0: + this.skip(); + break; + case 1: + this.skip(8); + break; + case 2: + this.skip(this.uint32()); + break; + case 3: + while ((wireType = this.uint32() & 7) !== 4) { + this.skipType(wireType); + } + break; + case 5: + this.skip(4); + break; + + /* istanbul ignore next */ + default: + throw Error("invalid wire type " + wireType + " at offset " + this.pos); + } + return this; +}; + +Reader._configure = function(BufferReader_) { + BufferReader = BufferReader_; + Reader.create = create(); + BufferReader._configure(); + + var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; + util.merge(Reader.prototype, { + + int64: function read_int64() { + return readLongVarint.call(this)[fn](false); + }, + + uint64: function read_uint64() { + return readLongVarint.call(this)[fn](true); + }, + + sint64: function read_sint64() { + return readLongVarint.call(this).zzDecode()[fn](false); + }, + + fixed64: function read_fixed64() { + return readFixed64.call(this)[fn](true); + }, + + sfixed64: function read_sfixed64() { + return readFixed64.call(this)[fn](false); + } + + }); +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 65886: +======= +/***/ 53153: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = BufferReader; + +<<<<<<< HEAD +// extends Reader +var Reader = __nccwpck_require__(40118); +(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; +======= +const isIp = __nccwpck_require__(89837) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var util = __nccwpck_require__(14512); + +/** + * Constructs a new buffer reader instance. + * @classdesc Wire format reader using node buffers. + * @extends Reader + * @constructor + * @param {Buffer} buffer Buffer to read from + */ +function BufferReader(buffer) { + Reader.call(this, buffer); + + /** + * Read buffer. + * @name BufferReader#buf + * @type {Buffer} + */ +} + +BufferReader._configure = function () { + /* istanbul ignore else */ + if (util.Buffer) + BufferReader.prototype._slice = util.Buffer.prototype.slice; +}; + + +/** + * @override + */ +BufferReader.prototype.string = function read_string_buffer() { + var len = this.uint32(); // modifies pos + return this.buf.utf8Slice + ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) + : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @name BufferReader#bytes + * @function + * @returns {Buffer} Value read + */ + +BufferReader._configure(); + + +/***/ }), + +<<<<<<< HEAD +/***/ 19080: +======= +/***/ 19612: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + +module.exports = {}; + +/** + * Named roots. + * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). + * Can also be used manually to make roots available across modules. + * @name roots + * @type {Object.} + * @example + * // pbjs -r myroot -o compiled.js ... + * + * // in another module: + * require("./compiled.js"); + * + * // in any subsequent module: + * var root = protobuf.roots["myroot"]; + */ + + +/***/ }), + +<<<<<<< HEAD +/***/ 57978: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +/** + * Streaming RPC helpers. + * @namespace + */ +var rpc = exports; + +/** + * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. + * @typedef RPCImpl + * @type {function} + * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called + * @param {Uint8Array} requestData Request data + * @param {RPCImplCallback} callback Callback function + * @returns {undefined} + * @example + * function rpcImpl(method, requestData, callback) { + * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code + * throw Error("no such method"); + * asynchronouslyObtainAResponse(requestData, function(err, responseData) { + * callback(err, responseData); + * }); + * } + */ + +/** + * Node-style callback as used by {@link RPCImpl}. + * @typedef RPCImplCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error + * @returns {undefined} + */ + +rpc.Service = __nccwpck_require__(54783); + + +/***/ }), + +/***/ 54783: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = Service; + +var util = __nccwpck_require__(14512); + +// Extends EventEmitter +(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; + +/** + * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. + * + * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. + * @typedef rpc.ServiceMethodCallback + * @template TRes extends Message + * @type {function} + * @param {Error|null} error Error, if any + * @param {TRes} [response] Response message + * @returns {undefined} + */ + +/** + * A service method part of a {@link rpc.Service} as created by {@link Service.create}. + * @typedef rpc.ServiceMethod + * @template TReq extends Message + * @template TRes extends Message + * @type {function} + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message + * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` + */ + +/** + * Constructs a new RPC service instance. + * @classdesc An RPC service as returned by {@link Service#create}. + * @exports rpc.Service + * @extends util.EventEmitter + * @constructor + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ +function Service(rpcImpl, requestDelimited, responseDelimited) { + + if (typeof rpcImpl !== "function") + throw TypeError("rpcImpl must be a function"); + + util.EventEmitter.call(this); + + /** + * RPC implementation. Becomes `null` once the service is ended. + * @type {RPCImpl|null} + */ + this.rpcImpl = rpcImpl; + + /** + * Whether requests are length-delimited. + * @type {boolean} + */ + this.requestDelimited = Boolean(requestDelimited); + + /** + * Whether responses are length-delimited. + * @type {boolean} + */ + this.responseDelimited = Boolean(responseDelimited); +} + +/** + * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. + * @param {Method|rpc.ServiceMethod} method Reflected or static method + * @param {Constructor} requestCtor Request constructor + * @param {Constructor} responseCtor Response constructor + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} callback Service callback + * @returns {undefined} + * @template TReq extends Message + * @template TRes extends Message + */ +Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { + + if (!request) + throw TypeError("request must be specified"); + + var self = this; + if (!callback) + return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); + + if (!self.rpcImpl) { + setTimeout(function() { callback(Error("already ended")); }, 0); + return undefined; + } + + try { + return self.rpcImpl( + method, + requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), + function rpcCallback(err, response) { + + if (err) { + self.emit("error", err, method); + return callback(err); + } + + if (response === null) { + self.end(/* endedByRPC */ true); + return undefined; + } + + if (!(response instanceof responseCtor)) { + try { + response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); + } catch (err) { + self.emit("error", err, method); + return callback(err); + } + } + + self.emit("data", response, method); + return callback(null, response); + } + ); + } catch (err) { + self.emit("error", err, method); + setTimeout(function() { callback(err); }, 0); + return undefined; + } +}; + +/** + * Ends this service and emits the `end` event. + * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. + * @returns {rpc.Service} `this` + */ +Service.prototype.end = function end(endedByRPC) { + if (this.rpcImpl) { + if (!endedByRPC) // signal end to rpcImpl + this.rpcImpl(null, null, null); + this.rpcImpl = null; + this.emit("end").off(); + } + return this; +}; + + +/***/ }), + +/***/ 23958: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = LongBits; + +var util = __nccwpck_require__(14512); + +/** + * Constructs new long bits. + * @classdesc Helper class for working with the low and high bits of a 64 bit value. + * @memberof util + * @constructor + * @param {number} lo Low 32 bits, unsigned + * @param {number} hi High 32 bits, unsigned + */ +function LongBits(lo, hi) { + + // note that the casts below are theoretically unnecessary as of today, but older statically + // generated converter code might still call the ctor with signed 32bits. kept for compat. + + /** + * Low bits. + * @type {number} + */ + this.lo = lo >>> 0; + + /** + * High bits. + * @type {number} + */ + this.hi = hi >>> 0; +} + +/** + * Zero bits. + * @memberof util.LongBits + * @type {util.LongBits} + */ +var zero = LongBits.zero = new LongBits(0, 0); + +zero.toNumber = function() { return 0; }; +zero.zzEncode = zero.zzDecode = function() { return this; }; +zero.length = function() { return 1; }; + +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + +/** + * Constructs new long bits from the specified number. + * @param {number} value Value + * @returns {util.LongBits} Instance + */ +LongBits.fromNumber = function fromNumber(value) { + if (value === 0) + return zero; + var sign = value < 0; + if (sign) + value = -value; + var lo = value >>> 0, + hi = (value - lo) / 4294967296 >>> 0; + if (sign) { + hi = ~hi >>> 0; + lo = ~lo >>> 0; + if (++lo > 4294967295) { + lo = 0; + if (++hi > 4294967295) + hi = 0; + } + } + return new LongBits(lo, hi); +}; + +/** + * Constructs new long bits from a number, long or string. + * @param {Long|number|string} value Value + * @returns {util.LongBits} Instance + */ +LongBits.from = function from(value) { + if (typeof value === "number") + return LongBits.fromNumber(value); + if (util.isString(value)) { + /* istanbul ignore else */ + if (util.Long) + value = util.Long.fromString(value); + else + return LongBits.fromNumber(parseInt(value, 10)); + } + return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; +}; + +/** + * Converts this long bits to a possibly unsafe JavaScript number. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {number} Possibly unsafe number + */ +LongBits.prototype.toNumber = function toNumber(unsigned) { + if (!unsigned && this.hi >>> 31) { + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); + } + return this.lo + this.hi * 4294967296; +}; + +/** + * Converts this long bits to a long. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long} Long + */ +LongBits.prototype.toLong = function toLong(unsigned) { + return util.Long + ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ + : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; +}; + +var charCodeAt = String.prototype.charCodeAt; + +/** + * Constructs new long bits from the specified 8 characters long hash. + * @param {string} hash Hash + * @returns {util.LongBits} Bits + */ +LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; + return new LongBits( + ( charCodeAt.call(hash, 0) + | charCodeAt.call(hash, 1) << 8 + | charCodeAt.call(hash, 2) << 16 + | charCodeAt.call(hash, 3) << 24) >>> 0 + , + ( charCodeAt.call(hash, 4) + | charCodeAt.call(hash, 5) << 8 + | charCodeAt.call(hash, 6) << 16 + | charCodeAt.call(hash, 7) << 24) >>> 0 + ); +}; + +/** + * Converts this long bits to a 8 characters long hash. + * @returns {string} Hash + */ +LongBits.prototype.toHash = function toHash() { + return String.fromCharCode( + this.lo & 255, + this.lo >>> 8 & 255, + this.lo >>> 16 & 255, + this.lo >>> 24 , + this.hi & 255, + this.hi >>> 8 & 255, + this.hi >>> 16 & 255, + this.hi >>> 24 + ); +}; + +/** + * Zig-zag encodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzEncode = function zzEncode() { + var mask = this.hi >> 31; + this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; + this.lo = ( this.lo << 1 ^ mask) >>> 0; + return this; +}; + +/** + * Zig-zag decodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzDecode = function zzDecode() { + var mask = -(this.lo & 1); + this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; + this.hi = ( this.hi >>> 1 ^ mask) >>> 0; + return this; +}; + +/** + * Calculates the length of this longbits when encoded as a varint. + * @returns {number} Length + */ +LongBits.prototype.length = function length() { + var part0 = this.lo, + part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, + part2 = this.hi >>> 24; + return part2 === 0 + ? part1 === 0 + ? part0 < 16384 + ? part0 < 128 ? 1 : 2 + : part0 < 2097152 ? 3 : 4 + : part1 < 16384 + ? part1 < 128 ? 5 : 6 + : part1 < 2097152 ? 7 : 8 + : part2 < 128 ? 9 : 10; +}; + + +/***/ }), + +/***/ 14512: +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var util = exports; + +// used to return a Promise where callback is omitted +util.asPromise = __nccwpck_require__(40488); + +// converts to / from base64 encoded strings +util.base64 = __nccwpck_require__(81246); + +// base class of rpc.Service +util.EventEmitter = __nccwpck_require__(85885); + +// float handling accross browsers +util.float = __nccwpck_require__(26666); + +// requires modules optionally and hides the call from bundlers +util.inquire = __nccwpck_require__(62798); + +// converts to / from utf8 encoded strings +util.utf8 = __nccwpck_require__(30105); + +// provides a node-like buffer pool in the browser +util.pool = __nccwpck_require__(45350); + +// utility to work with the low and high bits of a 64 bit value +util.LongBits = __nccwpck_require__(23958); + +/** + * Whether running within node or not. + * @memberof util + * @type {boolean} + */ +util.isNode = Boolean(typeof global !== "undefined" + && global + && global.process + && global.process.versions + && global.process.versions.node); + +/** + * Global object reference. + * @memberof util + * @type {Object} + */ +util.global = util.isNode && global + || typeof window !== "undefined" && window + || typeof self !== "undefined" && self + || this; // eslint-disable-line no-invalid-this + +/** + * An immuable empty array. + * @memberof util + * @type {Array.<*>} + * @const + */ +util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes + +/** + * An immutable empty object. + * @type {Object} + * @const + */ +util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes + +/** + * Tests if the specified value is an integer. + * @function + * @param {*} value Value to test + * @returns {boolean} `true` if the value is an integer + */ +util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; +}; + +/** + * Tests if the specified value is a string. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a string + */ +util.isString = function isString(value) { + return typeof value === "string" || value instanceof String; +}; + +/** + * Tests if the specified value is a non-null object. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a non-null object + */ +util.isObject = function isObject(value) { + return value && typeof value === "object"; +}; + +/** + * Checks if a property on a message is considered to be present. + * This is an alias of {@link util.isSet}. + * @function + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isset = + +/** + * Checks if a property on a message is considered to be present. + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isSet = function isSet(obj, prop) { + var value = obj[prop]; + if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins + return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; + return false; +}; + +/** + * Any compatible Buffer instance. + * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. + * @interface Buffer + * @extends Uint8Array + */ + +/** + * Node's Buffer class if available. + * @type {Constructor} + */ +util.Buffer = (function() { + try { + var Buffer = util.inquire("buffer").Buffer; + // refuse to use non-node buffers if not explicitly assigned (perf reasons): + return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; + } catch (e) { + /* istanbul ignore next */ + return null; + } +})(); + +// Internal alias of or polyfull for Buffer.from. +util._Buffer_from = null; + +// Internal alias of or polyfill for Buffer.allocUnsafe. +util._Buffer_allocUnsafe = null; + +/** + * Creates a new buffer of whatever type supported by the environment. + * @param {number|number[]} [sizeOrArray=0] Buffer size or number array + * @returns {Uint8Array|Buffer} Buffer + */ +util.newBuffer = function newBuffer(sizeOrArray) { + /* istanbul ignore next */ + return typeof sizeOrArray === "number" + ? util.Buffer + ? util._Buffer_allocUnsafe(sizeOrArray) + : new util.Array(sizeOrArray) + : util.Buffer + ? util._Buffer_from(sizeOrArray) + : typeof Uint8Array === "undefined" + ? sizeOrArray + : new Uint8Array(sizeOrArray); +}; + +/** + * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. + * @type {Constructor} + */ +util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; + +/** + * Any compatible Long instance. + * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. + * @interface Long + * @property {number} low Low bits + * @property {number} high High bits + * @property {boolean} unsigned Whether unsigned or not + */ + +/** + * Long.js's Long class if available. + * @type {Constructor} + */ +util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long + || /* istanbul ignore next */ util.global.Long + || util.inquire("long"); + +/** + * Regular expression used to verify 2 bit (`bool`) map keys. + * @type {RegExp} + * @const + */ +util.key2Re = /^true|false|0|1$/; + +/** + * Regular expression used to verify 32 bit (`int32` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; + +/** + * Regular expression used to verify 64 bit (`int64` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; + +/** + * Converts a number or long to an 8 characters long hash string. + * @param {Long|number} value Value to convert + * @returns {string} Hash + */ +util.longToHash = function longToHash(value) { + return value + ? util.LongBits.from(value).toHash() + : util.LongBits.zeroHash; +}; + +/** + * Converts an 8 characters long hash string to a long or number. + * @param {string} hash Hash + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long|number} Original value + */ +util.longFromHash = function longFromHash(hash, unsigned) { + var bits = util.LongBits.fromHash(hash); + if (util.Long) + return util.Long.fromBits(bits.lo, bits.hi, unsigned); + return bits.toNumber(Boolean(unsigned)); +}; + +/** + * Merges the properties of the source object into the destination object. + * @memberof util + * @param {Object.} dst Destination object + * @param {Object.} src Source object + * @param {boolean} [ifNotSet=false] Merges only if the key is not already set + * @returns {Object.} Destination object + */ +function merge(dst, src, ifNotSet) { // used by converters + for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) + if (dst[keys[i]] === undefined || !ifNotSet) + dst[keys[i]] = src[keys[i]]; + return dst; +} + +util.merge = merge; + +/** + * Converts the first character of a string to lower case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.lcFirst = function lcFirst(str) { + return str.charAt(0).toLowerCase() + str.substring(1); +}; + +/** + * Creates a custom error constructor. + * @memberof util + * @param {string} name Error name + * @returns {Constructor} Custom error constructor + */ +function newError(name) { + + function CustomError(message, properties) { + + if (!(this instanceof CustomError)) + return new CustomError(message, properties); + + // Error.call(this, message); + // ^ just returns a new error instance because the ctor can be called as a function + + Object.defineProperty(this, "message", { get: function() { return message; } }); + + /* istanbul ignore next */ + if (Error.captureStackTrace) // node + Error.captureStackTrace(this, CustomError); + else + Object.defineProperty(this, "stack", { value: new Error().stack || "" }); + + if (properties) + merge(this, properties); + } + + CustomError.prototype = Object.create(Error.prototype, { + constructor: { + value: CustomError, + writable: true, + enumerable: false, + configurable: true, + }, + name: { + get: function get() { return name; }, + set: undefined, + enumerable: false, + // configurable: false would accurately preserve the behavior of + // the original, but I'm guessing that was not intentional. + // For an actual error subclass, this property would + // be configurable. + configurable: true, + }, + toString: { + value: function value() { return this.name + ": " + this.message; }, + writable: true, + enumerable: false, + configurable: true, + }, + }); + + return CustomError; +} + +util.newError = newError; + +/** + * Constructs a new protocol error. + * @classdesc Error subclass indicating a protocol specifc error. + * @memberof util + * @extends Error + * @template T extends Message + * @constructor + * @param {string} message Error message + * @param {Object.} [properties] Additional properties + * @example + * try { + * MyMessage.decode(someBuffer); // throws if required fields are missing + * } catch (e) { + * if (e instanceof ProtocolError && e.instance) + * console.log("decoded so far: " + JSON.stringify(e.instance)); + * } + */ +util.ProtocolError = newError("ProtocolError"); + +/** + * So far decoded message instance. + * @name util.ProtocolError#instance + * @type {Message} + */ + +/** + * A OneOf getter as returned by {@link util.oneOfGetter}. + * @typedef OneOfGetter + * @type {function} + * @returns {string|undefined} Set field name, if any + */ + +/** + * Builds a getter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfGetter} Unbound getter + */ +util.oneOfGetter = function getOneOf(fieldNames) { + var fieldMap = {}; + for (var i = 0; i < fieldNames.length; ++i) + fieldMap[fieldNames[i]] = 1; + + /** + * @returns {string|undefined} Set field name, if any + * @this Object + * @ignore + */ + return function() { // eslint-disable-line consistent-return + for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) + if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) + return keys[i]; + }; +}; + +/** + * A OneOf setter as returned by {@link util.oneOfSetter}. + * @typedef OneOfSetter + * @type {function} + * @param {string|undefined} value Field name + * @returns {undefined} + */ + +/** + * Builds a setter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfSetter} Unbound setter + */ +util.oneOfSetter = function setOneOf(fieldNames) { + + /** + * @param {string} name Field name + * @returns {undefined} + * @this Object + * @ignore + */ + return function(name) { + for (var i = 0; i < fieldNames.length; ++i) + if (fieldNames[i] !== name) + delete this[fieldNames[i]]; + }; +}; + +/** + * Default conversion options used for {@link Message#toJSON} implementations. + * + * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: + * + * - Longs become strings + * - Enums become string keys + * - Bytes become base64 encoded strings + * - (Sub-)Messages become plain objects + * - Maps become plain objects with all string keys + * - Repeated fields become arrays + * - NaN and Infinity for float and double fields become strings + * + * @type {IConversionOptions} + * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json + */ +util.toJSONOptions = { + longs: String, + enums: String, + bytes: String, + json: true +}; + +// Sets up buffer utility according to the environment (called in index-minimal) +util._configure = function() { + var Buffer = util.Buffer; + /* istanbul ignore if */ + if (!Buffer) { + util._Buffer_from = util._Buffer_allocUnsafe = null; + return; + } + // because node 4.x buffers are incompatible & immutable + // see: https://github.com/dcodeIO/protobuf.js/pull/665 + util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || + /* istanbul ignore next */ + function Buffer_from(value, encoding) { + return new Buffer(value, encoding); + }; + util._Buffer_allocUnsafe = Buffer.allocUnsafe || + /* istanbul ignore next */ + function Buffer_allocUnsafe(size) { + return new Buffer(size); + }; +}; + + +/***/ }), + +/***/ 18583: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = Writer; + +var util = __nccwpck_require__(14512); + +var BufferWriter; // cyclic + +var LongBits = util.LongBits, + base64 = util.base64, + utf8 = util.utf8; + +/** + * Constructs a new writer operation instance. + * @classdesc Scheduled writer operation. + * @constructor + * @param {function(*, Uint8Array, number)} fn Function to call + * @param {number} len Value byte length + * @param {*} val Value to write + * @ignore + */ +function Op(fn, len, val) { + + /** + * Function to call. + * @type {function(Uint8Array, number, *)} + */ + this.fn = fn; + + /** + * Value byte length. + * @type {number} + */ + this.len = len; + + /** + * Next operation. + * @type {Writer.Op|undefined} + */ + this.next = undefined; + + /** + * Value to write. + * @type {*} + */ + this.val = val; // type varies +} + +/* istanbul ignore next */ +function noop() {} // eslint-disable-line no-empty-function + +/** + * Constructs a new writer state instance. + * @classdesc Copied writer state. + * @memberof Writer + * @constructor + * @param {Writer} writer Writer to copy state from + * @ignore + */ +function State(writer) { + + /** + * Current head. + * @type {Writer.Op} + */ + this.head = writer.head; + + /** + * Current tail. + * @type {Writer.Op} + */ + this.tail = writer.tail; + + /** + * Current buffer length. + * @type {number} + */ + this.len = writer.len; + + /** + * Next state. + * @type {State|null} + */ + this.next = writer.states; +} + +/** + * Constructs a new writer instance. + * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. + * @constructor + */ +function Writer() { + + /** + * Current length. + * @type {number} + */ + this.len = 0; + + /** + * Operations head. + * @type {Object} + */ + this.head = new Op(noop, 0, 0); + + /** + * Operations tail + * @type {Object} + */ + this.tail = this.head; + + /** + * Linked forked states. + * @type {Object|null} + */ + this.states = null; + + // When a value is written, the writer calculates its byte length and puts it into a linked + // list of operations to perform when finish() is called. This both allows us to allocate + // buffers of the exact required size and reduces the amount of work we have to do compared + // to first calculating over objects and then encoding over objects. In our case, the encoding + // part is just a linked list walk calling operations with already prepared values. +} + +var create = function create() { + return util.Buffer + ? function create_buffer_setup() { + return (Writer.create = function create_buffer() { + return new BufferWriter(); + })(); + } + /* istanbul ignore next */ + : function create_array() { + return new Writer(); + }; +}; + +/** + * Creates a new writer. + * @function + * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} + */ +Writer.create = create(); + +/** + * Allocates a buffer of the specified size. + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ +Writer.alloc = function alloc(size) { + return new util.Array(size); +}; + +// Use Uint8Array buffer pool in the browser, just like node does with buffers +/* istanbul ignore else */ +if (util.Array !== Array) + Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); + +/** + * Pushes a new operation to the queue. + * @param {function(Uint8Array, number, *)} fn Function to call + * @param {number} len Value byte length + * @param {number} val Value to write + * @returns {Writer} `this` + * @private + */ +Writer.prototype._push = function push(fn, len, val) { + this.tail = this.tail.next = new Op(fn, len, val); + this.len += len; + return this; +}; + +function writeByte(val, buf, pos) { + buf[pos] = val & 255; +} + +function writeVarint32(val, buf, pos) { + while (val > 127) { + buf[pos++] = val & 127 | 128; + val >>>= 7; + } + buf[pos] = val; +} + +/** + * Constructs a new varint writer operation instance. + * @classdesc Scheduled varint writer operation. + * @extends Op + * @constructor + * @param {number} len Value byte length + * @param {number} val Value to write + * @ignore + */ +function VarintOp(len, val) { + this.len = len; + this.next = undefined; + this.val = val; +} + +VarintOp.prototype = Object.create(Op.prototype); +VarintOp.prototype.fn = writeVarint32; + +/** + * Writes an unsigned 32 bit value as a varint. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.uint32 = function write_uint32(value) { + // here, the call to this.push has been inlined and a varint specific Op subclass is used. + // uint32 is by far the most frequently used operation and benefits significantly from this. + this.len += (this.tail = this.tail.next = new VarintOp( + (value = value >>> 0) + < 128 ? 1 + : value < 16384 ? 2 + : value < 2097152 ? 3 + : value < 268435456 ? 4 + : 5, + value)).len; + return this; +}; + +/** + * Writes a signed 32 bit value as a varint. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.int32 = function write_int32(value) { + return value < 0 + ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec + : this.uint32(value); +}; + +/** + * Writes a 32 bit value as a varint, zig-zag encoded. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sint32 = function write_sint32(value) { + return this.uint32((value << 1 ^ value >> 31) >>> 0); +}; + +function writeVarint64(val, buf, pos) { + while (val.hi) { + buf[pos++] = val.lo & 127 | 128; + val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; + val.hi >>>= 7; + } + while (val.lo > 127) { + buf[pos++] = val.lo & 127 | 128; + val.lo = val.lo >>> 7; + } + buf[pos++] = val.lo; +} + +/** + * Writes an unsigned 64 bit value as a varint. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.uint64 = function write_uint64(value) { + var bits = LongBits.from(value); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a signed 64 bit value as a varint. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.int64 = Writer.prototype.uint64; + +/** + * Writes a signed 64 bit value as a varint, zig-zag encoded. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sint64 = function write_sint64(value) { + var bits = LongBits.from(value).zzEncode(); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a boolish value as a varint. + * @param {boolean} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.bool = function write_bool(value) { + return this._push(writeByte, 1, value ? 1 : 0); +}; + +function writeFixed32(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +/** + * Writes an unsigned 32 bit value as fixed 32 bits. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.fixed32 = function write_fixed32(value) { + return this._push(writeFixed32, 4, value >>> 0); +}; + +/** + * Writes a signed 32 bit value as fixed 32 bits. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sfixed32 = Writer.prototype.fixed32; + +/** + * Writes an unsigned 64 bit value as fixed 64 bits. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.fixed64 = function write_fixed64(value) { + var bits = LongBits.from(value); + return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); +}; + +/** + * Writes a signed 64 bit value as fixed 64 bits. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sfixed64 = Writer.prototype.fixed64; + +/** + * Writes a float (32 bit). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.float = function write_float(value) { + return this._push(util.float.writeFloatLE, 4, value); +}; + +/** + * Writes a double (64 bit float). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.double = function write_double(value) { + return this._push(util.float.writeDoubleLE, 8, value); +}; + +var writeBytes = util.Array.prototype.set + ? function writeBytes_set(val, buf, pos) { + buf.set(val, pos); // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytes_for(val, buf, pos) { + for (var i = 0; i < val.length; ++i) + buf[pos + i] = val[i]; + }; + +/** + * Writes a sequence of bytes. + * @param {Uint8Array|string} value Buffer or base64 encoded string to write + * @returns {Writer} `this` + */ +Writer.prototype.bytes = function write_bytes(value) { + var len = value.length >>> 0; + if (!len) + return this._push(writeByte, 1, 0); + if (util.isString(value)) { + var buf = Writer.alloc(len = base64.length(value)); + base64.decode(value, buf, 0); + value = buf; + } + return this.uint32(len)._push(writeBytes, len, value); +}; + +/** + * Writes a string. + * @param {string} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.string = function write_string(value) { + var len = utf8.length(value); + return len + ? this.uint32(len)._push(utf8.write, len, value) + : this._push(writeByte, 1, 0); +}; + +/** + * Forks this writer's state by pushing it to a stack. + * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. + * @returns {Writer} `this` + */ +Writer.prototype.fork = function fork() { + this.states = new State(this); + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + return this; +}; + +/** + * Resets this instance to the last state. + * @returns {Writer} `this` + */ +Writer.prototype.reset = function reset() { + if (this.states) { + this.head = this.states.head; + this.tail = this.states.tail; + this.len = this.states.len; + this.states = this.states.next; + } else { + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + } + return this; +}; + +/** + * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. + * @returns {Writer} `this` + */ +Writer.prototype.ldelim = function ldelim() { + var head = this.head, + tail = this.tail, + len = this.len; + this.reset().uint32(len); + if (len) { + this.tail.next = head.next; // skip noop + this.tail = tail; + this.len += len; + } + return this; +}; + +/** + * Finishes the write operation. + * @returns {Uint8Array} Finished buffer + */ +Writer.prototype.finish = function finish() { + var head = this.head.next, // skip noop + buf = this.constructor.alloc(this.len), + pos = 0; + while (head) { + head.fn(head.val, buf, pos); + pos += head.len; + head = head.next; + } + // this.head = this.tail = null; + return buf; +}; + +Writer._configure = function(BufferWriter_) { + BufferWriter = BufferWriter_; + Writer.create = create(); + BufferWriter._configure(); +}; + + +/***/ }), + +/***/ 41779: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = BufferWriter; + +// extends Writer +var Writer = __nccwpck_require__(18583); +(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; + +var util = __nccwpck_require__(14512); + +/** + * Constructs a new buffer writer instance. + * @classdesc Wire format writer using node buffers. + * @extends Writer + * @constructor + */ +function BufferWriter() { + Writer.call(this); +} + +BufferWriter._configure = function () { + /** + * Allocates a buffer of the specified size. + * @function + * @param {number} size Buffer size + * @returns {Buffer} Buffer + */ + BufferWriter.alloc = util._Buffer_allocUnsafe; + + BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" + ? function writeBytesBuffer_set(val, buf, pos) { + buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) + // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytesBuffer_copy(val, buf, pos) { + if (val.copy) // Buffer values + val.copy(buf, pos, 0, val.length); + else for (var i = 0; i < val.length;) // plain array values + buf[pos++] = val[i++]; + }; +}; + + +/** + * @override + */ +BufferWriter.prototype.bytes = function write_bytes_buffer(value) { + if (util.isString(value)) + value = util._Buffer_from(value, "base64"); + var len = value.length >>> 0; + this.uint32(len); + if (len) + this._push(BufferWriter.writeBytesBuffer, len, value); + return this; +}; + +function writeStringBuffer(val, buf, pos) { + if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) + util.utf8.write(val, buf, pos); + else if (buf.utf8Write) + buf.utf8Write(val, pos); + else + buf.write(val, pos); +} + +/** + * @override + */ +BufferWriter.prototype.string = function write_string_buffer(value) { + var len = util.Buffer.byteLength(value); + this.uint32(len); + if (len) + this._push(writeStringBuffer, len, value); + return this; +}; + + +/** + * Finishes the write operation. + * @name BufferWriter#finish + * @function + * @returns {Buffer} Finished buffer + */ + +BufferWriter._configure(); + + +/***/ }), + +/***/ 62193: +======= +/***/ 45261: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +module.exports = read + +var MSB = 0x80 + , REST = 0x7F + +function read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length + + do { + if (counter >= l || shift > 49) { + read.bytes = 0 + throw new RangeError('Could not decode varint') + } + b = buf[counter++] + res += shift < 28 + ? (b & REST) << shift + : (b & REST) * Math.pow(2, shift) + shift += 7 + } while (b >= MSB) + + read.bytes = counter - offset + + return res +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 7197: +======= +/***/ 12801: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +module.exports = encode + +var MSB = 0x80 + , REST = 0x7F + , MSBALL = ~REST + , INT = Math.pow(2, 31) + +function encode(num, out, offset) { + if (Number.MAX_SAFE_INTEGER && num > Number.MAX_SAFE_INTEGER) { + encode.bytes = 0 + throw new RangeError('Could not encode varint') + } + out = out || [] + offset = offset || 0 + var oldOffset = offset + + while(num >= INT) { + out[offset++] = (num & 0xFF) | MSB + num /= 128 + } + while(num & MSBALL) { + out[offset++] = (num & 0xFF) | MSB + num >>>= 7 + } + out[offset] = num | 0 + + encode.bytes = offset - oldOffset + 1 + + return out +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 86941: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + encode: __nccwpck_require__(7197) + , decode: __nccwpck_require__(62193) + , encodingLength: __nccwpck_require__(89336) +======= +/***/ 30310: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + encode: __nccwpck_require__(12801) + , decode: __nccwpck_require__(45261) + , encodingLength: __nccwpck_require__(92945) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 89336: +======= +/***/ 92945: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + +var N1 = Math.pow(2, 7) +var N2 = Math.pow(2, 14) +var N3 = Math.pow(2, 21) +var N4 = Math.pow(2, 28) +var N5 = Math.pow(2, 35) +var N6 = Math.pow(2, 42) +var N7 = Math.pow(2, 49) +var N8 = Math.pow(2, 56) +var N9 = Math.pow(2, 63) + +module.exports = function (value) { + return ( + value < N1 ? 1 + : value < N2 ? 2 + : value < N3 ? 3 + : value < N4 ? 4 + : value < N5 ? 5 + : value < N6 ? 6 + : value < N7 ? 7 + : value < N8 ? 8 + : value < N9 ? 9 + : 10 + ) +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 59759: +/***/ ((module) => { + + + +/** + * Turns a browser readable stream into an async iterable. Async iteration over + * returned iterable will lock give stream, preventing any other consumer from + * acquiring a reader. The lock will be released if iteration loop is broken. To + * prevent stream cancelling optional `{ preventCancel: true }` could be passed + * as a second argument. + * @template T + * @param {ReadableStream} stream + * @param {Object} [options] + * @param {boolean} [options.preventCancel=boolean] + * @returns {AsyncIterable} + */ +async function * browserReadableStreamToIt (stream, options = {}) { + const reader = stream.getReader() + +======= +/***/ 44713: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var multipartRequest = __nccwpck_require__(87527); +var toUrlSearchParams = __nccwpck_require__(52836); +var abortSignal = __nccwpck_require__(14594); +var nativeAbortController = __nccwpck_require__(43586); + +const createAddAll = configure.configure(api => { + async function* addAll(source, options = {}) { + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, options.signal); + const {headers, body, total, parts} = await multipartRequest.multipartRequest(source, controller, options.headers); + const [progressFn, onUploadProgress] = typeof options.progress === 'function' ? createProgressHandler(total, parts, options.progress) : [ + undefined, + undefined + ]; + const res = await api.post('add', { + searchParams: toUrlSearchParams.toUrlSearchParams({ + 'stream-channels': true, + ...options, + progress: Boolean(progressFn) + }), + onUploadProgress, + signal, + headers, + body + }); + for await (let file of res.ndjson()) { + file = objectToCamel.objectToCamel(file); + if (file.hash !== undefined) { + yield toCoreInterface(file); + } else if (progressFn) { + progressFn(file.bytes || 0, file.name); + } + } + } + return addAll; +}); +const createProgressHandler = (total, parts, progress) => parts ? [ + undefined, + createOnUploadProgress(total, parts, progress) +] : [ + progress, + undefined +]; +const createOnUploadProgress = (size, parts, progress) => { + let index = 0; + const count = parts.length; + return ({loaded, total}) => { + const position = Math.floor(loaded / total * size); + while (index < count) { + const {start, end, name} = parts[index]; + if (position < end) { + progress(position - start, name); + break; + } else { + progress(end - start, name); + index += 1; + } + } + }; +}; +function toCoreInterface({name, hash, size, mode, mtime, mtimeNsecs}) { + const output = { + path: name, + cid: cid.CID.parse(hash), + size: parseInt(size) + }; + if (mode != null) { + output.mode = parseInt(mode, 8); + } + if (mtime != null) { + output.mtime = { + secs: mtime, + nsecs: mtimeNsecs || 0 + }; + } + return output; +} + +exports.createAddAll = createAddAll; + + +/***/ }), + +/***/ 26151: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var addAll = __nccwpck_require__(44713); +var last = __nccwpck_require__(28741); +var configure = __nccwpck_require__(31775); +var normaliseInputSingle = __nccwpck_require__(75400); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var last__default = /*#__PURE__*/_interopDefaultLegacy(last); + +function createAdd(options) { + const all = addAll.createAddAll(options); + return configure.configure(() => { + async function add(input, options = {}) { + return await last__default["default"](all(normaliseInputSingle.normaliseInput(input), options)); + } + return add; + })(options); +} + +exports.createAdd = createAdd; + + +/***/ }), + +/***/ 60138: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var wantlist = __nccwpck_require__(81812); +var wantlistForPeer = __nccwpck_require__(34861); +var stat = __nccwpck_require__(70104); +var unwant = __nccwpck_require__(12388); + +function createBitswap(config) { + return { + wantlist: wantlist.createWantlist(config), + wantlistForPeer: wantlistForPeer.createWantlistForPeer(config), + unwant: unwant.createUnwant(config), + stat: stat.createStat(config) + }; +} + +exports.createBitswap = createBitswap; + + +/***/ }), + +/***/ 70104: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createStat = configure.configure(api => { + async function stat(options = {}) { + const res = await api.post('bitswap/stat', { + searchParams: toUrlSearchParams.toUrlSearchParams(options), + signal: options.signal, + headers: options.headers + }); + return toCoreInterface(await res.json()); + } + return stat; +}); +function toCoreInterface(res) { + return { + provideBufLen: res.ProvideBufLen, + wantlist: (res.Wantlist || []).map(k => cid.CID.parse(k['/'])), + peers: res.Peers || [], + blocksReceived: BigInt(res.BlocksReceived), + dataReceived: BigInt(res.DataReceived), + blocksSent: BigInt(res.BlocksSent), + dataSent: BigInt(res.DataSent), + dupBlksReceived: BigInt(res.DupBlksReceived), + dupDataReceived: BigInt(res.DupDataReceived) + }; +} + +exports.createStat = createStat; + + +/***/ }), + +/***/ 12388: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createUnwant = configure.configure(api => { + async function unwant(cid, options = {}) { + const res = await api.post('bitswap/unwant', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: cid.toString(), + ...options + }), + headers: options.headers + }); + return res.json(); + } + return unwant; +}); + +exports.createUnwant = createUnwant; + + +/***/ }), + +/***/ 34861: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createWantlistForPeer = configure.configure(api => { + async function wantlistForPeer(peerId, options = {}) { + const res = await (await api.post('bitswap/wantlist', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + ...options, + peer: peerId.toString() + }), + headers: options.headers + })).json(); + return (res.Keys || []).map(k => cid.CID.parse(k['/'])); + } + return wantlistForPeer; +}); + +exports.createWantlistForPeer = createWantlistForPeer; + + +/***/ }), + +/***/ 81812: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createWantlist = configure.configure(api => { + async function wantlist(options = {}) { + const res = await (await api.post('bitswap/wantlist', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + })).json(); + return (res.Keys || []).map(k => cid.CID.parse(k['/'])); + } + return wantlist; +}); + +exports.createWantlist = createWantlist; + + +/***/ }), + +/***/ 22845: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createGet = configure.configure(api => { + async function get(cid, options = {}) { + const res = await api.post('block/get', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: cid.toString(), + ...options + }), + headers: options.headers + }); + return new Uint8Array(await res.arrayBuffer()); + } + return get; +}); + +exports.createGet = createGet; + + +/***/ }), + +/***/ 54826: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var get = __nccwpck_require__(22845); +var put = __nccwpck_require__(64124); +var rm = __nccwpck_require__(16250); +var stat = __nccwpck_require__(86947); + +function createBlock(config) { + return { + get: get.createGet(config), + put: put.createPut(config), + rm: rm.createRm(config), + stat: stat.createStat(config) + }; +} + +exports.createBlock = createBlock; + + +/***/ }), + +/***/ 64124: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var multipartRequest = __nccwpck_require__(87527); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var abortSignal = __nccwpck_require__(14594); +var nativeAbortController = __nccwpck_require__(43586); + +const createPut = configure.configure(api => { + async function put(data, options = {}) { + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, options.signal); + let res; + try { + const response = await api.post('block/put', { + signal: signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + ...await multipartRequest.multipartRequest([data], controller, options.headers) + }); + res = await response.json(); + } catch (err) { + if (options.format === 'dag-pb') { + return put(data, { + ...options, + format: 'protobuf' + }); + } else if (options.format === 'dag-cbor') { + return put(data, { + ...options, + format: 'cbor' + }); + } + throw err; + } + return cid.CID.parse(res.Key); + } + return put; +}); + +exports.createPut = createPut; + + +/***/ }), + +/***/ 16250: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createRm = configure.configure(api => { + async function* rm(cid, options = {}) { + if (!Array.isArray(cid)) { + cid = [cid]; + } + const res = await api.post('block/rm', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: cid.map(cid => cid.toString()), + 'stream-channels': true, + ...options + }), + headers: options.headers + }); + for await (const removed of res.ndjson()) { + yield toCoreInterface(removed); + } + } + return rm; +}); +function toCoreInterface(removed) { + const out = { cid: cid.CID.parse(removed.Hash) }; + if (removed.Error) { + out.error = new Error(removed.Error); + } + return out; +} + +exports.createRm = createRm; + + +/***/ }), + +/***/ 86947: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createStat = configure.configure(api => { + async function stat(cid$1, options = {}) { + const res = await api.post('block/stat', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: cid$1.toString(), + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return { + cid: cid.CID.parse(data.Key), + size: data.Size + }; + } + return stat; +}); + +exports.createStat = createStat; + + +/***/ }), + +/***/ 24438: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var multiaddr = __nccwpck_require__(78025); + +const createAdd = configure.configure(api => { + async function add(addr, options = {}) { + const res = await api.post('bootstrap/add', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: addr, + ...options + }), + headers: options.headers + }); + const {Peers} = await res.json(); + return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; + } + return add; +}); + +exports.createAdd = createAdd; + + +/***/ }), + +/***/ 99450: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var multiaddr = __nccwpck_require__(78025); + +const createClear = configure.configure(api => { + async function clear(options = {}) { + const res = await api.post('bootstrap/rm', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + ...options, + all: true + }), + headers: options.headers + }); + const {Peers} = await res.json(); + return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; + } + return clear; +}); + +exports.createClear = createClear; + + +/***/ }), + +/***/ 37723: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var add = __nccwpck_require__(24438); +var clear = __nccwpck_require__(99450); +var list = __nccwpck_require__(77448); +var reset = __nccwpck_require__(3542); +var rm = __nccwpck_require__(36783); + +function createBootstrap(config) { + return { + add: add.createAdd(config), + clear: clear.createClear(config), + list: list.createList(config), + reset: reset.createReset(config), + rm: rm.createRm(config) + }; +} + +exports.createBootstrap = createBootstrap; + + +/***/ }), + +/***/ 77448: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var multiaddr = __nccwpck_require__(78025); + +const createList = configure.configure(api => { + async function list(options = {}) { + const res = await api.post('bootstrap/list', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + const {Peers} = await res.json(); + return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; + } + return list; +}); + +exports.createList = createList; + + +/***/ }), + +/***/ 3542: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var multiaddr = __nccwpck_require__(78025); + +const createReset = configure.configure(api => { + async function reset(options = {}) { + const res = await api.post('bootstrap/add', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + ...options, + default: true + }), + headers: options.headers + }); + const {Peers} = await res.json(); + return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; + } + return reset; +}); + +exports.createReset = createReset; + + +/***/ }), + +/***/ 36783: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var multiaddr = __nccwpck_require__(78025); + +const createRm = configure.configure(api => { + async function rm(addr, options = {}) { + const res = await api.post('bootstrap/rm', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: addr, + ...options + }), + headers: options.headers + }); + const {Peers} = await res.json(); + return { Peers: Peers.map(ma => new multiaddr.Multiaddr(ma)) }; + } + return rm; +}); + +exports.createRm = createRm; + + +/***/ }), + +/***/ 84000: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createCat = configure.configure(api => { + async function* cat(path, options = {}) { + const res = await api.post('cat', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path.toString(), + ...options + }), + headers: options.headers + }); + yield* res.iterator(); + } + return cat; +}); + +exports.createCat = createCat; + + +/***/ }), + +/***/ 27154: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createCommands = configure.configure(api => { + const commands = async (options = {}) => { + const res = await api.post('commands', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + return res.json(); + }; + return commands; +}); + +exports.createCommands = createCommands; + + +/***/ }), + +/***/ 90372: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createGetAll = configure.configure(api => { + const getAll = async (options = {}) => { + const res = await api.post('config/show', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ ...options }), + headers: options.headers + }); + const data = await res.json(); + return data; + }; + return getAll; +}); + +exports.createGetAll = createGetAll; + + +/***/ }), + +/***/ 45965: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createGet = configure.configure(api => { + const get = async (key, options = {}) => { + if (!key) { + throw new Error('key argument is required'); + } + const res = await api.post('config', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: key, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return data.Value; + }; + return get; +}); + +exports.createGet = createGet; + + +/***/ }), + +/***/ 95499: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var index = __nccwpck_require__(99566); +var get = __nccwpck_require__(45965); +var getAll = __nccwpck_require__(90372); +var replace = __nccwpck_require__(29380); +var set = __nccwpck_require__(78974); + +function createConfig(config) { + return { + getAll: getAll.createGetAll(config), + get: get.createGet(config), + set: set.createSet(config), + replace: replace.createReplace(config), + profiles: index.createProfiles(config) + }; +} + +exports.createConfig = createConfig; + + +/***/ }), + +/***/ 93937: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createApply = configure.configure(api => { + async function apply(profile, options = {}) { + const res = await api.post('config/profile/apply', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: profile, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return { + original: data.OldCfg, + updated: data.NewCfg + }; + } + return apply; +}); + +exports.createApply = createApply; + + +/***/ }), + +/***/ 99566: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var apply = __nccwpck_require__(93937); +var list = __nccwpck_require__(84442); + +function createProfiles(config) { + return { + apply: apply.createApply(config), + list: list.createList(config) + }; +} + +exports.createProfiles = createProfiles; + + +/***/ }), + +/***/ 84442: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createList = configure.configure(api => { + async function list(options = {}) { + const res = await api.post('config/profile/list', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + const data = await res.json(); + return data.map(profile => objectToCamel.objectToCamel(profile)); + } + return list; +}); + +exports.createList = createList; + + +/***/ }), + +/***/ 29380: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var fromString = __nccwpck_require__(39451); +var multipartRequest = __nccwpck_require__(87527); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var abortSignal = __nccwpck_require__(14594); +var nativeAbortController = __nccwpck_require__(43586); + +const createReplace = configure.configure(api => { + const replace = async (config, options = {}) => { + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, options.signal); + const res = await api.post('config/replace', { + signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + ...await multipartRequest.multipartRequest([fromString.fromString(JSON.stringify(config))], controller, options.headers) + }); + await res.text(); + }; + return replace; +}); + +exports.createReplace = createReplace; + + +/***/ }), + +/***/ 78974: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createSet = configure.configure(api => { + const set = async (key, value, options = {}) => { + if (typeof key !== 'string') { + throw new Error('Invalid key type'); + } + const params = { + ...options, + ...encodeParam(key, value) + }; + const res = await api.post('config', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(params), + headers: options.headers + }); + await res.text(); + }; + return set; +}); +const encodeParam = (key, value) => { + switch (typeof value) { + case 'boolean': + return { + arg: [ + key, + value.toString() + ], + bool: true + }; + case 'string': + return { + arg: [ + key, + value + ] + }; + default: + return { + arg: [ + key, + JSON.stringify(value) + ], + json: true + }; + } +}; + +exports.createSet = createSet; + + +/***/ }), + +/***/ 36927: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createExport = configure.configure(api => { + async function* dagExport(root, options = {}) { + const res = await api.post('dag/export', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ arg: root.toString() }), + headers: options.headers + }); + yield* res.iterator(); + } + return dagExport; +}); + +exports.createExport = createExport; + + +/***/ }), + +/***/ 55291: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var resolve = __nccwpck_require__(51788); +var first = __nccwpck_require__(84103); +var last = __nccwpck_require__(28741); +var errCode = __nccwpck_require__(5822); +var get = __nccwpck_require__(22845); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var first__default = /*#__PURE__*/_interopDefaultLegacy(first); +var last__default = /*#__PURE__*/_interopDefaultLegacy(last); +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +const createGet = (codecs, options) => { + const fn = configure.configure((api, opts) => { + const getBlock = get.createGet(opts); + const get$1 = async (cid, options = {}) => { + if (options.path) { + const entry = options.localResolve ? await first__default["default"](resolve.resolve(cid, options.path, codecs, getBlock, options)) : await last__default["default"](resolve.resolve(cid, options.path, codecs, getBlock, options)); + const result = entry; + if (!result) { + throw errCode__default["default"](new Error('Not found'), 'ERR_NOT_FOUND'); + } + return result; + } + const codec = await codecs.getCodec(cid.code); + const block = await getBlock(cid, options); + const node = codec.decode(block); + return { + value: node, + remainderPath: '' + }; + }; + return get$1; + }); + return fn(options); +}; + +exports.createGet = createGet; + + +/***/ }), + +/***/ 22135: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var abortSignal = __nccwpck_require__(14594); +var multipartRequest = __nccwpck_require__(87527); +var nativeAbortController = __nccwpck_require__(43586); +var cid = __nccwpck_require__(24247); + +const createImport = configure.configure(api => { + async function* dagImport(source, options = {}) { + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, options.signal); + const {headers, body} = await multipartRequest.multipartRequest(source, controller, options.headers); + const res = await api.post('dag/import', { + signal, + headers, + body, + searchParams: toUrlSearchParams.toUrlSearchParams({ 'pin-roots': options.pinRoots }) + }); + for await (const {Root} of res.ndjson()) { + if (Root !== undefined) { + const { + Cid: {'/': Cid}, + PinErrorMsg + } = Root; + yield { + root: { + cid: cid.CID.parse(Cid), + pinErrorMsg: PinErrorMsg + } + }; + } + } + } + return dagImport; +}); + +exports.createImport = createImport; + + +/***/ }), + +/***/ 71168: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var _export = __nccwpck_require__(36927); +var get = __nccwpck_require__(55291); +var _import = __nccwpck_require__(22135); +var put = __nccwpck_require__(79631); +var resolve = __nccwpck_require__(11229); + +function createDag(codecs, config) { + return { + export: _export.createExport(config), + get: get.createGet(codecs, config), + import: _import.createImport(config), + put: put.createPut(codecs, config), + resolve: resolve.createResolve(config) + }; +} + +exports.createDag = createDag; + + +/***/ }), + +/***/ 79631: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var multipartRequest = __nccwpck_require__(87527); +var toUrlSearchParams = __nccwpck_require__(52836); +var abortSignal = __nccwpck_require__(14594); +var nativeAbortController = __nccwpck_require__(43586); + +const createPut = (codecs, options) => { + const fn = configure.configure(api => { + const put = async (dagNode, options = {}) => { + const settings = { + storeCodec: 'dag-cbor', + hashAlg: 'sha2-256', + ...options + }; + let serialized; + if (settings.inputCodec) { + if (!(dagNode instanceof Uint8Array)) { + throw new Error('Can only inputCodec on raw bytes that can be decoded'); + } + serialized = dagNode; + } else { + const storeCodec = await codecs.getCodec(settings.storeCodec); + serialized = storeCodec.encode(dagNode); + settings.inputCodec = settings.storeCodec; + } + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, settings.signal); + const res = await api.post('dag/put', { + timeout: settings.timeout, + signal, + searchParams: toUrlSearchParams.toUrlSearchParams(settings), + ...await multipartRequest.multipartRequest([serialized], controller, settings.headers) + }); + const data = await res.json(); + return cid.CID.parse(data.Cid['/']); + }; + return put; + }); + return fn(options); +}; + +exports.createPut = createPut; + + +/***/ }), + +/***/ 11229: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createResolve = configure.configure(api => { + const resolve = async (ipfsPath, options = {}) => { + const res = await api.post('dag/resolve', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: `${ ipfsPath }${ options.path ? `/${ options.path }`.replace(/\/[/]+/g, '/') : '' }`, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return { + cid: cid.CID.parse(data.Cid['/']), + remainderPath: data.RemPath + }; + }; + return resolve; +}); + +exports.createResolve = createResolve; + + +/***/ }), + +/***/ 71141: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var mapEvent = __nccwpck_require__(79249); + +const createFindPeer = configure.configure(api => { + async function* findPeer(peerId, options = {}) { + const res = await api.post('dht/findpeer', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: peerId, + ...options + }), + headers: options.headers + }); + for await (const event of res.ndjson()) { + yield mapEvent.mapEvent(event); + } + } + return findPeer; +}); + +exports.createFindPeer = createFindPeer; + + +/***/ }), + +/***/ 1718: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var mapEvent = __nccwpck_require__(79249); + +const createFindProvs = configure.configure(api => { + async function* findProvs(cid, options = {}) { + const res = await api.post('dht/findprovs', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: cid.toString(), + ...options + }), + headers: options.headers + }); + for await (const event of res.ndjson()) { + yield mapEvent.mapEvent(event); + } + } + return findProvs; +}); + +exports.createFindProvs = createFindProvs; + + +/***/ }), + +/***/ 83019: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var mapEvent = __nccwpck_require__(79249); +var toString = __nccwpck_require__(2771); + +const createGet = configure.configure(api => { + async function* get(key, options = {}) { + const res = await api.post('dht/get', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: key instanceof Uint8Array ? toString.toString(key) : key.toString(), + ...options + }), + headers: options.headers + }); + for await (const event of res.ndjson()) { + yield mapEvent.mapEvent(event); + } + } + return get; +}); + +exports.createGet = createGet; + + +/***/ }), + +/***/ 57135: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var findPeer = __nccwpck_require__(71141); +var findProvs = __nccwpck_require__(1718); +var get = __nccwpck_require__(83019); +var provide = __nccwpck_require__(54851); +var put = __nccwpck_require__(76639); +var query = __nccwpck_require__(38533); + +function createDht(config) { + return { + findPeer: findPeer.createFindPeer(config), + findProvs: findProvs.createFindProvs(config), + get: get.createGet(config), + provide: provide.createProvide(config), + put: put.createPut(config), + query: query.createQuery(config) + }; +} + +exports.createDht = createDht; + + +/***/ }), + +/***/ 79249: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var fromString = __nccwpck_require__(39451); +var responseTypes = __nccwpck_require__(85218); +var multiaddr = __nccwpck_require__(78025); + +const mapEvent = event => { + if (event.Type === responseTypes.SendingQuery) { + return { + to: event.ID, + name: 'SENDING_QUERY', + type: event.Type + }; + } + if (event.Type === responseTypes.PeerResponse) { + return { + from: event.ID, + name: 'PEER_RESPONSE', + type: event.Type, + messageType: 0, + messageName: 'PUT_VALUE', + closer: (event.Responses || []).map(({ID, Addrs}) => ({ + id: ID, + multiaddrs: Addrs.map(addr => new multiaddr.Multiaddr(addr)) + })), + providers: (event.Responses || []).map(({ID, Addrs}) => ({ + id: ID, + multiaddrs: Addrs.map(addr => new multiaddr.Multiaddr(addr)) + })) + }; + } + if (event.Type === responseTypes.FinalPeer) { + let peer = { + id: event.ID, + multiaddrs: [] + }; + if (event.Responses && event.Responses.length) { + peer = { + id: event.Responses[0].ID, + multiaddrs: event.Responses[0].Addrs.map(addr => new multiaddr.Multiaddr(addr)) + }; + } + return { + from: event.ID, + name: 'FINAL_PEER', + type: event.Type, + peer + }; + } + if (event.Type === responseTypes.QueryError) { + return { + from: event.ID, + name: 'QUERY_ERROR', + type: event.Type, + error: new Error(event.Extra) + }; + } + if (event.Type === responseTypes.Provider) { + return { + from: event.ID, + name: 'PROVIDER', + type: event.Type, + providers: event.Responses.map(({ID, Addrs}) => ({ + id: ID, + multiaddrs: Addrs.map(addr => new multiaddr.Multiaddr(addr)) + })) + }; + } + if (event.Type === responseTypes.Value) { + return { + from: event.ID, + name: 'VALUE', + type: event.Type, + value: fromString.fromString(event.Extra, 'base64pad') + }; + } + if (event.Type === responseTypes.AddingPeer) { + const peers = event.Responses.map(({ID}) => ID); + if (!peers.length) { + throw new Error('No peer found'); + } + return { + name: 'ADDING_PEER', + type: event.Type, + peer: peers[0] + }; + } + if (event.Type === responseTypes.DialingPeer) { + return { + name: 'DIALING_PEER', + type: event.Type, + peer: event.ID + }; + } + throw new Error('Unknown DHT event type'); +}; + +exports.mapEvent = mapEvent; + + +/***/ }), + +/***/ 54851: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var mapEvent = __nccwpck_require__(79249); + +const createProvide = configure.configure(api => { + async function* provide(cids, options = { recursive: false }) { + const cidArr = Array.isArray(cids) ? cids : [cids]; + const res = await api.post('dht/provide', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: cidArr.map(cid => cid.toString()), + ...options + }), + headers: options.headers + }); + for await (const event of res.ndjson()) { + yield mapEvent.mapEvent(event); + } + } + return provide; +}); + +exports.createProvide = createProvide; + + +/***/ }), + +/***/ 76639: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var multipartRequest = __nccwpck_require__(87527); +var abortSignal = __nccwpck_require__(14594); +var nativeAbortController = __nccwpck_require__(43586); +var toString = __nccwpck_require__(2771); +var mapEvent = __nccwpck_require__(79249); + +const createPut = configure.configure(api => { + async function* put(key, value, options = {}) { + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, options.signal); + const res = await api.post('dht/put', { + signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: key instanceof Uint8Array ? toString.toString(key) : key.toString(), + ...options + }), + ...await multipartRequest.multipartRequest([value], controller, options.headers) + }); + for await (const event of res.ndjson()) { + yield mapEvent.mapEvent(event); + } + } + return put; +}); + +exports.createPut = createPut; + + +/***/ }), + +/***/ 38533: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var mapEvent = __nccwpck_require__(79249); + +const createQuery = configure.configure(api => { + async function* query(peerId, options = {}) { + const res = await api.post('dht/query', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: peerId.toString(), + ...options + }), + headers: options.headers + }); + for await (const event of res.ndjson()) { + yield mapEvent.mapEvent(event); + } + } + return query; +}); + +exports.createQuery = createQuery; + + +/***/ }), + +/***/ 85218: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const SendingQuery = 0; +const PeerResponse = 1; +const FinalPeer = 2; +const QueryError = 3; +const Provider = 4; +const Value = 5; +const AddingPeer = 6; +const DialingPeer = 7; + +exports.AddingPeer = AddingPeer; +exports.DialingPeer = DialingPeer; +exports.FinalPeer = FinalPeer; +exports.PeerResponse = PeerResponse; +exports.Provider = Provider; +exports.QueryError = QueryError; +exports.SendingQuery = SendingQuery; +exports.Value = Value; + + +/***/ }), + +/***/ 48257: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createCmds = configure.configure(api => { + async function cmds(options = {}) { + const res = await api.post('diag/cmds', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + return res.json(); + } + return cmds; +}); + +exports.createCmds = createCmds; + + +/***/ }), + +/***/ 19433: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cmds = __nccwpck_require__(48257); +var net = __nccwpck_require__(97401); +var sys = __nccwpck_require__(803); + +function createDiag(config) { + return { + cmds: cmds.createCmds(config), + net: net.createNet(config), + sys: sys.createSys(config) + }; +} + +exports.createDiag = createDiag; + + +/***/ }), + +/***/ 97401: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createNet = configure.configure(api => { + async function net(options = {}) { + const res = await api.post('diag/net', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + return res.json(); + } + return net; +}); + +exports.createNet = createNet; + + +/***/ }), + +/***/ 803: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createSys = configure.configure(api => { + async function sys(options = {}) { + const res = await api.post('diag/sys', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + return res.json(); + } + return sys; +}); + +exports.createSys = createSys; + + +/***/ }), + +/***/ 1503: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createDns = configure.configure(api => { + const dns = async (domain, options = {}) => { + const res = await api.post('dns', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: domain, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return data.Path; + }; + return dns; +}); + +exports.createDns = createDns; + + +/***/ }), + +/***/ 48771: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createChmod = configure.configure(api => { + async function chmod(path, mode, options = {}) { + const res = await api.post('files/chmod', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + mode, + ...options + }), + headers: options.headers + }); + await res.text(); + } + return chmod; +}); + +exports.createChmod = createChmod; + + +/***/ }), + +/***/ 6545: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createCp = configure.configure(api => { + async function cp(sources, destination, options = {}) { + const sourceArr = Array.isArray(sources) ? sources : [sources]; + const res = await api.post('files/cp', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: sourceArr.concat(destination).map(src => cid.CID.asCID(src) ? `/ipfs/${ src }` : src), + ...options + }), + headers: options.headers + }); + await res.text(); + } + return cp; +}); + +exports.createCp = createCp; + + +/***/ }), + +/***/ 43346: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createFlush = configure.configure(api => { + async function flush(path, options = {}) { + if (!path || typeof path !== 'string') { + throw new Error('ipfs.files.flush requires a path'); + } + const res = await api.post('files/flush', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return cid.CID.parse(data.Cid); + } + return flush; +}); + +exports.createFlush = createFlush; + + +/***/ }), + +/***/ 35976: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var chmod = __nccwpck_require__(48771); +var cp = __nccwpck_require__(6545); +var flush = __nccwpck_require__(43346); +var ls = __nccwpck_require__(76291); +var mkdir = __nccwpck_require__(40643); +var mv = __nccwpck_require__(64840); +var read = __nccwpck_require__(42085); +var rm = __nccwpck_require__(33848); +var stat = __nccwpck_require__(74168); +var touch = __nccwpck_require__(91068); +var write = __nccwpck_require__(66447); + +function createFiles(config) { + return { + chmod: chmod.createChmod(config), + cp: cp.createCp(config), + flush: flush.createFlush(config), + ls: ls.createLs(config), + mkdir: mkdir.createMkdir(config), + mv: mv.createMv(config), + read: read.createRead(config), + rm: rm.createRm(config), + stat: stat.createStat(config), + touch: touch.createTouch(config), + write: write.createWrite(config) + }; +} + +exports.createFiles = createFiles; + + +/***/ }), + +/***/ 76291: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var objectToCamelWithMetadata = __nccwpck_require__(28060); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createLs = configure.configure(api => { + async function* ls(path, options = {}) { + if (!path) { + throw new Error('ipfs.files.ls requires a path'); + } + const res = await api.post('files/ls', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: cid.CID.asCID(path) ? `/ipfs/${ path }` : path, + long: true, + ...options, + stream: true + }), + headers: options.headers + }); + for await (const result of res.ndjson()) { + if ('Entries' in result) { + for (const entry of result.Entries || []) { + yield toCoreInterface(objectToCamelWithMetadata.objectToCamelWithMetadata(entry)); + } + } else { + yield toCoreInterface(objectToCamelWithMetadata.objectToCamelWithMetadata(result)); + } + } + } + return ls; +}); +function toCoreInterface(entry) { + if (entry.hash) { + entry.cid = cid.CID.parse(entry.hash); + } + delete entry.hash; + entry.type = entry.type === 1 ? 'directory' : 'file'; + return entry; +} + +exports.createLs = createLs; + + +/***/ }), + +/***/ 40643: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createMkdir = configure.configure(api => { + async function mkdir(path, options = {}) { + const res = await api.post('files/mkdir', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }); + await res.text(); + } + return mkdir; +}); + +exports.createMkdir = createMkdir; + + +/***/ }), + +/***/ 64840: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createMv = configure.configure(api => { + async function mv(sources, destination, options = {}) { + if (!Array.isArray(sources)) { + sources = [sources]; + } + const res = await api.post('files/mv', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: sources.concat(destination), + ...options + }), + headers: options.headers + }); + await res.text(); + } + return mv; +}); + +exports.createMv = createMv; + + +/***/ }), + +/***/ 42085: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var toIterable = __nccwpck_require__(79546); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var toIterable__default = /*#__PURE__*/_interopDefaultLegacy(toIterable); + +const createRead = configure.configure(api => { + async function* read(path, options = {}) { + const res = await api.post('files/read', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + count: options.length, + ...options + }), + headers: options.headers + }); + yield* toIterable__default["default"](res.body); + } + return read; +}); + +exports.createRead = createRead; + + +/***/ }), + +/***/ 33848: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var HTTP = __nccwpck_require__(24335); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var HTTP__default = /*#__PURE__*/_interopDefaultLegacy(HTTP); + +const createRm = configure.configure(api => { + async function rm(path, options = {}) { + const res = await api.post('files/rm', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }); + const body = await res.text(); + if (body !== '') { + const error = new HTTP__default["default"].HTTPError(res); + error.message = body; + throw error; + } + } + return rm; +}); + +exports.createRm = createRm; + + +/***/ }), + +/***/ 74168: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var objectToCamelWithMetadata = __nccwpck_require__(28060); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createStat = configure.configure(api => { + async function stat(path, options = {}) { + const res = await api.post('files/stat', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + data.WithLocality = data.WithLocality || false; + return toCoreInterface(objectToCamelWithMetadata.objectToCamelWithMetadata(data)); + } + return stat; +}); +function toCoreInterface(entry) { + entry.cid = cid.CID.parse(entry.hash); + delete entry.hash; + return entry; +} + +exports.createStat = createStat; + + +/***/ }), + +/***/ 91068: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createTouch = configure.configure(api => { + async function touch(path, options = {}) { + const res = await api.post('files/touch', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }); + await res.text(); + } + return touch; +}); + +exports.createTouch = createTouch; + + +/***/ }), + +/***/ 66447: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var modeToString = __nccwpck_require__(87513); +var parseMtime = __nccwpck_require__(68414); +var configure = __nccwpck_require__(31775); +var multipartRequest = __nccwpck_require__(87527); +var toUrlSearchParams = __nccwpck_require__(52836); +var abortSignal = __nccwpck_require__(14594); +var nativeAbortController = __nccwpck_require__(43586); + +const createWrite = configure.configure(api => { + async function write(path, input, options = {}) { + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, options.signal); + const res = await api.post('files/write', { + signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + streamChannels: true, + count: options.length, + ...options + }), + ...await multipartRequest.multipartRequest([{ + content: input, + path: 'arg', + mode: modeToString.modeToString(options.mode), + mtime: parseMtime.parseMtime(options.mtime) + }], controller, options.headers) + }); + await res.text(); + } + return write; +}); + +exports.createWrite = createWrite; + + +/***/ }), + +/***/ 89338: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); + +const createGetEndpointConfig = configure.configure(api => { + return () => { + const url = new URL(api.opts.base || ''); + return { + host: url.hostname, + port: url.port, + protocol: url.protocol, + pathname: url.pathname, + 'api-path': url.pathname + }; + }; +}); + +exports.createGetEndpointConfig = createGetEndpointConfig; + + +/***/ }), + +/***/ 31471: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createGet = configure.configure(api => { + async function* get(path, options = {}) { + const opts = { + arg: `${ path instanceof Uint8Array ? cid.CID.decode(path) : path }`, + ...options + }; + if (opts.compressionLevel) { + opts['compression-level'] = opts.compressionLevel; + delete opts.compressionLevel; + } + const res = await api.post('get', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(opts), + headers: options.headers + }); + yield* res.iterator(); + } + return get; +}); + +exports.createGet = createGet; + + +/***/ }), + +/***/ 15192: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var multiaddr = __nccwpck_require__(78025); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createId = configure.configure(api => { + async function id(options = {}) { + const res = await api.post('id', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: options.peerId ? options.peerId.toString() : undefined, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + const output = { ...objectToCamel.objectToCamel(data) }; + if (output.addresses) { + output.addresses = output.addresses.map(ma => new multiaddr.Multiaddr(ma)); + } + return output; + } + return id; +}); + +exports.createId = createId; + + +/***/ }), + +/***/ 21719: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var multibases = __nccwpck_require__(61560); +var multicodecs = __nccwpck_require__(83319); +var multihashes = __nccwpck_require__(5529); +var dagPB = __nccwpck_require__(72532); +var dagCBOR = __nccwpck_require__(89778); +var dagJSON = __nccwpck_require__(46777); +var identity = __nccwpck_require__(53863); +var basics = __nccwpck_require__(42916); +var index = __nccwpck_require__(60138); +var index$1 = __nccwpck_require__(54826); +var index$2 = __nccwpck_require__(37723); +var index$3 = __nccwpck_require__(95499); +var index$4 = __nccwpck_require__(71168); +var index$5 = __nccwpck_require__(57135); +var index$6 = __nccwpck_require__(19433); +var index$7 = __nccwpck_require__(35976); +var index$8 = __nccwpck_require__(66007); +var index$9 = __nccwpck_require__(85077); +var index$a = __nccwpck_require__(8302); +var index$b = __nccwpck_require__(64980); +var index$c = __nccwpck_require__(1115); +var index$d = __nccwpck_require__(38248); +var index$e = __nccwpck_require__(50782); +var index$f = __nccwpck_require__(65381); +var index$g = __nccwpck_require__(39825); +var index$h = __nccwpck_require__(8697); +var add = __nccwpck_require__(26151); +var addAll = __nccwpck_require__(44713); +var cat = __nccwpck_require__(84000); +var commands = __nccwpck_require__(27154); +var dns = __nccwpck_require__(1503); +var getEndpointConfig = __nccwpck_require__(89338); +var get = __nccwpck_require__(31471); +var id = __nccwpck_require__(15192); +var isOnline = __nccwpck_require__(5426); +var ls = __nccwpck_require__(97506); +var mount = __nccwpck_require__(75785); +var ping = __nccwpck_require__(25466); +var resolve = __nccwpck_require__(38587); +var start = __nccwpck_require__(86476); +var stop = __nccwpck_require__(94121); +var version = __nccwpck_require__(93620); +var globSourceImport = __nccwpck_require__(23905); +var cid = __nccwpck_require__(24247); +var multiaddr = __nccwpck_require__(78025); +var urlSource_js = __nccwpck_require__(74676); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } + }); + } + n["default"] = e; + return Object.freeze(n); +} + +var dagPB__namespace = /*#__PURE__*/_interopNamespace(dagPB); +var dagCBOR__namespace = /*#__PURE__*/_interopNamespace(dagCBOR); +var dagJSON__namespace = /*#__PURE__*/_interopNamespace(dagJSON); +var globSourceImport__default = /*#__PURE__*/_interopDefaultLegacy(globSourceImport); +var urlSource_js__default = /*#__PURE__*/_interopDefaultLegacy(urlSource_js); + +function create(options = {}) { + const id$1 = { + name: identity.identity.name, + code: identity.identity.code, + encode: id => id, + decode: id => id + }; + const multibaseCodecs = Object.values(basics.bases); + (options.ipld && options.ipld.bases ? options.ipld.bases : []).forEach(base => multibaseCodecs.push(base)); + const multibases$1 = new multibases.Multibases({ + bases: multibaseCodecs, + loadBase: options.ipld && options.ipld.loadBase + }); + const blockCodecs = Object.values(basics.codecs); + [ + dagPB__namespace, + dagCBOR__namespace, + dagJSON__namespace, + id$1 + ].concat(options.ipld && options.ipld.codecs || []).forEach(codec => blockCodecs.push(codec)); + const multicodecs$1 = new multicodecs.Multicodecs({ + codecs: blockCodecs, + loadCodec: options.ipld && options.ipld.loadCodec + }); + const multihashHashers = Object.values(basics.hashes); + (options.ipld && options.ipld.hashers ? options.ipld.hashers : []).forEach(hasher => multihashHashers.push(hasher)); + const multihashes$1 = new multihashes.Multihashes({ + hashers: multihashHashers, + loadHasher: options.ipld && options.ipld.loadHasher + }); + const client = { + add: add.createAdd(options), + addAll: addAll.createAddAll(options), + bitswap: index.createBitswap(options), + block: index$1.createBlock(options), + bootstrap: index$2.createBootstrap(options), + cat: cat.createCat(options), + commands: commands.createCommands(options), + config: index$3.createConfig(options), + dag: index$4.createDag(multicodecs$1, options), + dht: index$5.createDht(options), + diag: index$6.createDiag(options), + dns: dns.createDns(options), + files: index$7.createFiles(options), + get: get.createGet(options), + getEndpointConfig: getEndpointConfig.createGetEndpointConfig(options), + id: id.createId(options), + isOnline: isOnline.createIsOnline(options), + key: index$8.createKey(options), + log: index$9.createLog(options), + ls: ls.createLs(options), + mount: mount.createMount(options), + name: index$a.createName(options), + object: index$b.createObject(multicodecs$1, options), + pin: index$c.createPin(options), + ping: ping.createPing(options), + pubsub: index$d.createPubsub(options), + refs: index$e.createRefs(options), + repo: index$f.createRepo(options), + resolve: resolve.createResolve(options), + start: start.createStart(options), + stats: index$g.createStats(options), + stop: stop.createStop(options), + swarm: index$h.createSwarm(options), + version: version.createVersion(options), + bases: multibases$1, + codecs: multicodecs$1, + hashers: multihashes$1 + }; + return client; +} +const globSource = globSourceImport__default["default"]; + +Object.defineProperty(exports, "CID", ({ + enumerable: true, + get: function () { return cid.CID; } +})); +Object.defineProperty(exports, "multiaddr", ({ + enumerable: true, + get: function () { return multiaddr.Multiaddr; } +})); +Object.defineProperty(exports, "urlSource", ({ + enumerable: true, + get: function () { return urlSource_js__default["default"]; } +})); +exports.create = create; +exports.globSource = globSource; + + +/***/ }), + +/***/ 5426: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var id = __nccwpck_require__(15192); + +const createIsOnline = options => { + const id$1 = id.createId(options); + async function isOnline(options = {}) { + const res = await id$1(options); + return Boolean(res && res.addresses && res.addresses.length); + } + return isOnline; +}; + +exports.createIsOnline = createIsOnline; + + +/***/ }), + +/***/ 89160: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var errCode = __nccwpck_require__(5822); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +const createExport = configure.configure(api => { + const exportKey = async (name, password, options = {}) => { + throw errCode__default["default"](new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED'); + }; + return exportKey; +}); + +exports.createExport = createExport; + + +/***/ }), + +/***/ 22932: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createGen = configure.configure(api => { + async function gen(name, options = { + type: 'rsa', + size: 2048 + }) { + const res = await api.post('key/gen', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: name, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return objectToCamel.objectToCamel(data); + } + return gen; +}); + +exports.createGen = createGen; + + +/***/ }), + +/***/ 11031: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createImport = configure.configure(api => { + async function importKey(name, pem, password, options = {}) { + const res = await api.post('key/import', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: name, + pem, + password, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return objectToCamel.objectToCamel(data); + } + return importKey; +}); + +exports.createImport = createImport; + + +/***/ }), + +/***/ 66007: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var _export = __nccwpck_require__(89160); +var gen = __nccwpck_require__(22932); +var _import = __nccwpck_require__(11031); +var info = __nccwpck_require__(99925); +var list = __nccwpck_require__(98360); +var rename = __nccwpck_require__(47172); +var rm = __nccwpck_require__(94585); + +function createKey(config) { + return { + export: _export.createExport(config), + gen: gen.createGen(config), + import: _import.createImport(config), + info: info.createInfo(config), + list: list.createList(config), + rename: rename.createRename(config), + rm: rm.createRm(config) + }; +} + +exports.createKey = createKey; + + +/***/ }), + +/***/ 99925: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var errCode = __nccwpck_require__(5822); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +const createInfo = configure.configure(api => { + const info = async (name, options = {}) => { + throw errCode__default["default"](new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED'); + }; + return info; +}); + +exports.createInfo = createInfo; + + +/***/ }), + +/***/ 98360: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createList = configure.configure(api => { + async function list(options = {}) { + const res = await api.post('key/list', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + const data = await res.json(); + return (data.Keys || []).map(k => objectToCamel.objectToCamel(k)); + } + return list; +}); + +exports.createList = createList; + + +/***/ }), + +/***/ 47172: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createRename = configure.configure(api => { + async function rename(oldName, newName, options = {}) { + const res = await api.post('key/rename', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: [ + oldName, + newName + ], + ...options + }), + headers: options.headers + }); + return objectToCamel.objectToCamel(await res.json()); + } + return rename; +}); + +exports.createRename = createRename; + + +/***/ }), + +/***/ 94585: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createRm = configure.configure(api => { + async function rm(name, options = {}) { + const res = await api.post('key/rm', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: name, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return objectToCamel.objectToCamel(data.Keys[0]); + } + return rm; +}); + +exports.createRm = createRm; + + +/***/ }), + +/***/ 14594: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var anySignal = __nccwpck_require__(65618); + +function filter(signals) { + return signals.filter(Boolean); +} +function abortSignal(...signals) { + return anySignal.anySignal(filter(signals)); +} + +exports.abortSignal = abortSignal; + + +/***/ }), + +/***/ 31775: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var core = __nccwpck_require__(66212); + +const configure = fn => { + return options => { + return fn(new core.Client(options), options); + }; +}; + +exports.configure = configure; + + +/***/ }), + +/***/ 66212: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var multiaddr = __nccwpck_require__(78025); +var env_js = __nccwpck_require__(48488); +var parseDuration = __nccwpck_require__(35632); +var debug = __nccwpck_require__(58923); +var HTTP = __nccwpck_require__(24335); +var mergeOpts = __nccwpck_require__(79139); +var toUrlString = __nccwpck_require__(4037); +var getAgent = __nccwpck_require__(34290); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var parseDuration__default = /*#__PURE__*/_interopDefaultLegacy(parseDuration); +var debug__default = /*#__PURE__*/_interopDefaultLegacy(debug); +var HTTP__default = /*#__PURE__*/_interopDefaultLegacy(HTTP); +var mergeOpts__default = /*#__PURE__*/_interopDefaultLegacy(mergeOpts); +var getAgent__default = /*#__PURE__*/_interopDefaultLegacy(getAgent); + +const log = debug__default["default"]('ipfs-http-client:lib:error-handler'); +const merge = mergeOpts__default["default"].bind({ ignoreUndefined: true }); +const DEFAULT_PROTOCOL = env_js.isBrowser || env_js.isWebWorker ? location.protocol : 'http'; +const DEFAULT_HOST = env_js.isBrowser || env_js.isWebWorker ? location.hostname : 'localhost'; +const DEFAULT_PORT = env_js.isBrowser || env_js.isWebWorker ? location.port : '5001'; +const normalizeOptions = (options = {}) => { + let url; + let opts = {}; + let agent; + if (typeof options === 'string' || multiaddr.Multiaddr.isMultiaddr(options)) { + url = new URL(toUrlString.toUrlString(options)); + } else if (options instanceof URL) { + url = options; + } else if (typeof options.url === 'string' || multiaddr.Multiaddr.isMultiaddr(options.url)) { + url = new URL(toUrlString.toUrlString(options.url)); + opts = options; + } else if (options.url instanceof URL) { + url = options.url; + opts = options; + } else { + opts = options || {}; + const protocol = (opts.protocol || DEFAULT_PROTOCOL).replace(':', ''); + const host = (opts.host || DEFAULT_HOST).split(':')[0]; + const port = opts.port || DEFAULT_PORT; + url = new URL(`${ protocol }://${ host }:${ port }`); + } + if (opts.apiPath) { + url.pathname = opts.apiPath; + } else if (url.pathname === '/' || url.pathname === undefined) { + url.pathname = 'api/v0'; + } + if (env_js.isNode) { + const Agent = getAgent__default["default"](url); + agent = opts.agent || new Agent({ + keepAlive: true, + maxSockets: 6 + }); + } + return { + ...opts, + host: url.host, + protocol: url.protocol.replace(':', ''), + port: Number(url.port), + apiPath: url.pathname, + url, + agent + }; +}; +const errorHandler = async response => { + let msg; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + try { + while (true) { + const result = await reader.read() + + if (result.done) { + return + } + +<<<<<<< HEAD + yield result.value +======= +exports.Client = Client; +exports.HTTPError = HTTPError; +exports.errorHandler = errorHandler; + + +/***/ }), + +/***/ 29208: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var fromString = __nccwpck_require__(39451); +var toString = __nccwpck_require__(2771); +var base64 = __nccwpck_require__(98197); + +const rpcArrayToTextArray = strings => { + if (Array.isArray(strings)) { + return strings.map(rpcToText); + } + return strings; +}; +const rpcToText = mb => toString.toString(rpcToBytes(mb)); +const rpcToBytes = mb => base64.base64url.decode(mb); +const textToUrlSafeRpc = text => base64.base64url.encode(fromString.fromString(text)); + +exports.rpcArrayToTextArray = rpcArrayToTextArray; +exports.rpcToBytes = rpcToBytes; +exports.rpcToText = rpcToText; +exports.textToUrlSafeRpc = textToUrlSafeRpc; + + +/***/ }), + +/***/ 87513: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function modeToString(mode) { + if (mode == null) { + return undefined; + } + if (typeof mode === 'string') { + return mode; + } + return mode.toString(8).padStart(4, '0'); +} + +exports.modeToString = modeToString; + + +/***/ }), + +/***/ 28060: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); + +function objectToCamelWithMetadata(entry) { + const file = objectToCamel.objectToCamel(entry); + if (Object.prototype.hasOwnProperty.call(file, 'mode')) { + file.mode = parseInt(file.mode, 8); + } + if (Object.prototype.hasOwnProperty.call(file, 'mtime')) { + file.mtime = { + secs: file.mtime, + nsecs: file.mtimeNsecs || 0 + }; + delete file.mtimeNsecs; + } + return file; +} + +exports.objectToCamelWithMetadata = objectToCamelWithMetadata; + + +/***/ }), + +/***/ 62268: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function objectToCamel(obj) { + if (obj == null) { + return obj; + } + const caps = /^[A-Z]+$/; + const output = {}; + return Object.keys(obj).reduce((camelObj, k) => { + if (caps.test(k)) { + camelObj[k.toLowerCase()] = obj[k]; + } else if (caps.test(k[0])) { + camelObj[k[0].toLowerCase() + k.slice(1)] = obj[k]; + } else { + camelObj[k] = obj[k]; + } + return camelObj; + }, output); +} + +exports.objectToCamel = objectToCamel; + + +/***/ }), + +/***/ 68414: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errCode = __nccwpck_require__(5822); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +function parseMtime(input) { + if (input == null) { + return undefined; + } + let mtime; + if (input.secs != null) { + mtime = { + secs: input.secs, + nsecs: input.nsecs + }; + } + if (input.Seconds != null) { + mtime = { + secs: input.Seconds, + nsecs: input.FractionalNanoseconds + }; + } + if (Array.isArray(input)) { + mtime = { + secs: input[0], + nsecs: input[1] + }; + } + if (input instanceof Date) { + const ms = input.getTime(); + const secs = Math.floor(ms / 1000); + mtime = { + secs: secs, + nsecs: (ms - secs * 1000) * 1000 + }; + } + if (!Object.prototype.hasOwnProperty.call(mtime, 'secs')) { + return undefined; + } + if (mtime != null && mtime.nsecs != null && (mtime.nsecs < 0 || mtime.nsecs > 999999999)) { + throw errCode__default["default"](new Error('mtime-nsecs must be within the range [0,999999999]'), 'ERR_INVALID_MTIME_NSECS'); + } + return mtime; +} + +exports.parseMtime = parseMtime; + + +/***/ }), + +/***/ 51788: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var errCode = __nccwpck_require__(5822); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +async function* resolve(cid$1, path, codecs, getBlock, options) { + const load = async cid => { + const codec = await codecs.getCodec(cid.code); + const block = await getBlock(cid, options); + return codec.decode(block); + }; + const parts = path.split('/').filter(Boolean); + let value = await load(cid$1); + let lastCid = cid$1; + while (parts.length) { + const key = parts.shift(); + if (!key) { + throw errCode__default["default"](new Error(`Could not resolve path "${ path }"`), 'ERR_INVALID_PATH'); + } + if (Object.prototype.hasOwnProperty.call(value, key)) { + value = value[key]; + yield { + value, + remainderPath: parts.join('/') + }; + } else { + throw errCode__default["default"](new Error(`no link named "${ key }" under ${ lastCid }`), 'ERR_NO_LINK'); + } + const cid$1 = cid.CID.asCID(value); + if (cid$1) { + lastCid = cid$1; + value = await load(value); + } + } + yield { + value, + remainderPath: '' + }; +} + +exports.resolve = resolve; + + +/***/ }), + +/***/ 52836: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var modeToString = __nccwpck_require__(87513); +var parseMtime = __nccwpck_require__(68414); + +function toUrlSearchParams({arg, searchParams, hashAlg, mtime, mode, ...options} = {}) { + if (searchParams) { + options = { + ...options, + ...searchParams + }; + } + if (hashAlg) { + options.hash = hashAlg; + } + if (mtime != null) { + mtime = parseMtime.parseMtime(mtime); + options.mtime = mtime.secs; + options.mtimeNsecs = mtime.nsecs; + } + if (mode != null) { + options.mode = modeToString.modeToString(mode); + } + if (options.timeout && !isNaN(options.timeout)) { + options.timeout = `${ options.timeout }ms`; + } + if (arg === undefined || arg === null) { + arg = []; + } else if (!Array.isArray(arg)) { + arg = [arg]; + } + const urlSearchParams = new URLSearchParams(options); + arg.forEach(arg => urlSearchParams.append('arg', arg)); + return urlSearchParams; +} + +exports.toUrlSearchParams = toUrlSearchParams; + + +/***/ }), + +/***/ 85077: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var level = __nccwpck_require__(84685); +var ls = __nccwpck_require__(17150); +var tail = __nccwpck_require__(17214); + +function createLog(config) { + return { + level: level.createLevel(config), + ls: ls.createLs(config), + tail: tail.createTail(config) + }; +} + +exports.createLog = createLog; + + +/***/ }), + +/***/ 84685: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createLevel = configure.configure(api => { + async function level(subsystem, level, options = {}) { + const res = await api.post('log/level', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: [ + subsystem, + level + ], + ...options + }), + headers: options.headers + }); + return objectToCamel.objectToCamel(await res.json()); + } + return level; +}); + +exports.createLevel = createLevel; + + +/***/ }), + +/***/ 17150: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createLs = configure.configure(api => { + async function ls(options = {}) { + const res = await api.post('log/ls', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + const data = await res.json(); + return data.Strings; + } + return ls; +}); + +exports.createLs = createLs; + + +/***/ }), + +/***/ 17214: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createTail = configure.configure(api => { + async function* tail(options = {}) { + const res = await api.post('log/tail', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + yield* res.ndjson(); + } + return tail; +}); + +exports.createTail = createTail; + + +/***/ }), + +/***/ 97506: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var stat = __nccwpck_require__(74168); + +const createLs = configure.configure((api, opts) => { + async function* ls(path, options = {}) { + const pathStr = `${ path instanceof Uint8Array ? cid.CID.decode(path) : path }`; + async function mapLink(link) { + let hash = link.Hash; + if (hash.includes('/')) { + const ipfsPath = hash.startsWith('/ipfs/') ? hash : `/ipfs/${ hash }`; + const stats = await stat.createStat(opts)(ipfsPath); + hash = stats.cid; + } else { + hash = cid.CID.parse(hash); + } + const entry = { + name: link.Name, + path: pathStr + (link.Name ? `/${ link.Name }` : ''), + size: link.Size, + cid: hash, + type: typeOf(link) + }; + if (link.Mode) { + entry.mode = parseInt(link.Mode, 8); + } + if (link.Mtime !== undefined && link.Mtime !== null) { + entry.mtime = { secs: link.Mtime }; + if (link.MtimeNsecs !== undefined && link.MtimeNsecs !== null) { + entry.mtime.nsecs = link.MtimeNsecs; + } + } + return entry; + } + const res = await api.post('ls', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: pathStr, + ...options + }), + headers: options.headers + }); + for await (let result of res.ndjson()) { + result = result.Objects; + if (!result) { + throw new Error('expected .Objects in results'); + } + result = result[0]; + if (!result) { + throw new Error('expected one array in results.Objects'); + } + const links = result.Links; + if (!Array.isArray(links)) { + throw new Error('expected one array in results.Objects[0].Links'); + } + if (!links.length) { + yield mapLink(result); + return; + } + yield* links.map(mapLink); + } + } + return ls; +}); +function typeOf(link) { + switch (link.Type) { + case 1: + case 5: + return 'dir'; + case 2: + return 'file'; + default: + return 'file'; + } +} + +exports.createLs = createLs; + + +/***/ }), + +/***/ 75785: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createMount = configure.configure(api => { + async function mount(options = {}) { + const res = await api.post('dns', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + return objectToCamel.objectToCamel(await res.json()); + } + return mount; +}); + +exports.createMount = createMount; + + +/***/ }), + +/***/ 8302: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var publish = __nccwpck_require__(29576); +var resolve = __nccwpck_require__(49726); +var index = __nccwpck_require__(98473); + +function createName(config) { + return { + publish: publish.createPublish(config), + resolve: resolve.createResolve(config), + pubsub: index.createPubsub(config) + }; +} + +exports.createName = createName; + + +/***/ }), + +/***/ 29576: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createPublish = configure.configure(api => { + async function publish(path, options = {}) { + const res = await api.post('name/publish', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: `${ path }`, + ...options + }), + headers: options.headers + }); + return objectToCamel.objectToCamel(await res.json()); + } + return publish; +}); + +exports.createPublish = createPublish; + + +/***/ }), + +/***/ 59820: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createCancel = configure.configure(api => { + async function cancel(name, options = {}) { + const res = await api.post('name/pubsub/cancel', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: name, + ...options + }), + headers: options.headers + }); + return objectToCamel.objectToCamel(await res.json()); + } + return cancel; +}); + +exports.createCancel = createCancel; + + +/***/ }), + +/***/ 98473: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cancel = __nccwpck_require__(59820); +var state = __nccwpck_require__(68347); +var subs = __nccwpck_require__(79481); + +function createPubsub(config) { + return { + cancel: cancel.createCancel(config), + state: state.createState(config), + subs: subs.createSubs(config) + }; +} + +exports.createPubsub = createPubsub; + + +/***/ }), + +/***/ 68347: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createState = configure.configure(api => { + async function state(options = {}) { + const res = await api.post('name/pubsub/state', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + return objectToCamel.objectToCamel(await res.json()); + } + return state; +}); + +exports.createState = createState; + + +/***/ }), + +/***/ 79481: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createSubs = configure.configure(api => { + async function subs(options = {}) { + const res = await api.post('name/pubsub/subs', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + const data = await res.json(); + return data.Strings || []; + } + return subs; +}); + +exports.createSubs = createSubs; + + +/***/ }), + +/***/ 49726: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createResolve = configure.configure(api => { + async function* resolve(path, options = {}) { + const res = await api.post('name/resolve', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + stream: true, + ...options + }), + headers: options.headers + }); + for await (const result of res.ndjson()) { + yield result.Path; + } + } + return resolve; +}); + +exports.createResolve = createResolve; + + +/***/ }), + +/***/ 47257: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createData = configure.configure(api => { + async function data(cid$1, options = {}) { + const res = await api.post('object/data', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: `${ cid$1 instanceof Uint8Array ? cid.CID.decode(cid$1) : cid$1 }`, + ...options + }), + headers: options.headers + }); + const data = await res.arrayBuffer(); + return new Uint8Array(data, 0, data.byteLength); + } + return data; +}); + +exports.createData = createData; + + +/***/ }), + +/***/ 55651: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var fromString = __nccwpck_require__(39451); + +const createGet = configure.configure(api => { + async function get(cid$1, options = {}) { + const res = await api.post('object/get', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: `${ cid$1 instanceof Uint8Array ? cid.CID.decode(cid$1) : cid$1 }`, + dataEncoding: 'base64', + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return { + Data: fromString.fromString(data.Data, 'base64pad'), + Links: (data.Links || []).map(link => ({ + Name: link.Name, + Hash: cid.CID.parse(link.Hash), + Tsize: link.Size + })) + }; + } + return get; +}); + +exports.createGet = createGet; + + +/***/ }), + +/***/ 64980: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var data = __nccwpck_require__(47257); +var get = __nccwpck_require__(55651); +var links = __nccwpck_require__(56797); +var _new = __nccwpck_require__(4050); +var put = __nccwpck_require__(35217); +var stat = __nccwpck_require__(46969); +var index = __nccwpck_require__(94482); + +function createObject(codecs, config) { + return { + data: data.createData(config), + get: get.createGet(config), + links: links.createLinks(config), + new: _new.createNew(config), + put: put.createPut(codecs, config), + stat: stat.createStat(config), + patch: index.createPatch(config) + }; +} + +exports.createObject = createObject; + + +/***/ }), + +/***/ 56797: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createLinks = configure.configure(api => { + async function links(cid$1, options = {}) { + const res = await api.post('object/links', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: `${ cid$1 instanceof Uint8Array ? cid.CID.decode(cid$1) : cid$1 }`, + ...options + }), + headers: options.headers + }); + const data = await res.json(); + return (data.Links || []).map(l => ({ + Name: l.Name, + Tsize: l.Size, + Hash: cid.CID.parse(l.Hash) + })); + } + return links; +}); + +exports.createLinks = createLinks; + + +/***/ }), + +/***/ 4050: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createNew = configure.configure(api => { + async function newObject(options = {}) { + const res = await api.post('object/new', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: options.template, + ...options + }), + headers: options.headers + }); + const {Hash} = await res.json(); + return cid.CID.parse(Hash); + } + return newObject; +}); + +exports.createNew = createNew; + + +/***/ }), + +/***/ 23641: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createAddLink = configure.configure(api => { + async function addLink(cid$1, dLink, options = {}) { + const res = await api.post('object/patch/add-link', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: [ + `${ cid$1 }`, + dLink.Name || dLink.name || '', + (dLink.Hash || dLink.cid || '').toString() || null + ], + ...options + }), + headers: options.headers + }); + const {Hash} = await res.json(); + return cid.CID.parse(Hash); + } + return addLink; +}); + +exports.createAddLink = createAddLink; + + +/***/ }), + +/***/ 16432: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var multipartRequest = __nccwpck_require__(87527); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var abortSignal = __nccwpck_require__(14594); +var nativeAbortController = __nccwpck_require__(43586); + +const createAppendData = configure.configure(api => { + async function appendData(cid$1, data, options = {}) { + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, options.signal); + const res = await api.post('object/patch/append-data', { + signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: `${ cid$1 }`, + ...options + }), + ...await multipartRequest.multipartRequest([data], controller, options.headers) + }); + const {Hash} = await res.json(); + return cid.CID.parse(Hash); + } + return appendData; +}); + +exports.createAppendData = createAppendData; + + +/***/ }), + +/***/ 94482: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var addLink = __nccwpck_require__(23641); +var appendData = __nccwpck_require__(16432); +var rmLink = __nccwpck_require__(86253); +var setData = __nccwpck_require__(89010); + +function createPatch(config) { + return { + addLink: addLink.createAddLink(config), + appendData: appendData.createAppendData(config), + rmLink: rmLink.createRmLink(config), + setData: setData.createSetData(config) + }; +} + +exports.createPatch = createPatch; + + +/***/ }), + +/***/ 86253: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createRmLink = configure.configure(api => { + async function rmLink(cid$1, dLink, options = {}) { + const res = await api.post('object/patch/rm-link', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: [ + `${ cid$1 }`, + dLink.Name || dLink.name || null + ], + ...options + }), + headers: options.headers + }); + const {Hash} = await res.json(); + return cid.CID.parse(Hash); + } + return rmLink; +}); + +exports.createRmLink = createRmLink; + + +/***/ }), + +/***/ 89010: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var multipartRequest = __nccwpck_require__(87527); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var abortSignal = __nccwpck_require__(14594); +var nativeAbortController = __nccwpck_require__(43586); + +const createSetData = configure.configure(api => { + async function setData(cid$1, data, options = {}) { + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, options.signal); + const res = await api.post('object/patch/set-data', { + signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: [`${ cid$1 }`], + ...options + }), + ...await multipartRequest.multipartRequest([data], controller, options.headers) + }); + const {Hash} = await res.json(); + return cid.CID.parse(Hash); + } + return setData; +}); + +exports.createSetData = createSetData; + + +/***/ }), + +/***/ 35217: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var put = __nccwpck_require__(79631); + +const createPut = (codecs, options) => { + const fn = configure.configure(api => { + const dagPut = put.createPut(codecs, options); + async function put$1(obj, options = {}) { + return dagPut(obj, { + ...options, + storeCodec: 'dag-pb', + hashAlg: 'sha2-256', + version: 1 + }); + } + return put$1; + }); + return fn(options); +}; + +exports.createPut = createPut; + + +/***/ }), + +/***/ 46969: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createStat = configure.configure(api => { + async function stat(cid$1, options = {}) { + const res = await api.post('object/stat', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: `${ cid$1 }`, + ...options + }), + headers: options.headers + }); + const output = await res.json(); + return { + ...output, + Hash: cid.CID.parse(output.Hash) + }; + } + return stat; +}); + +exports.createStat = createStat; + + +/***/ }), + +/***/ 95440: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var normaliseInput = __nccwpck_require__(44956); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createAddAll = configure.configure(api => { + async function* addAll(source, options = {}) { + for await (const {path, recursive, metadata} of normaliseInput.normaliseInput(source)) { + const res = await api.post('pin/add', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + ...options, + arg: path, + recursive, + metadata: metadata ? JSON.stringify(metadata) : undefined, + stream: true + }), + headers: options.headers + }); + for await (const pin of res.ndjson()) { + if (pin.Pins) { + for (const cid$1 of pin.Pins) { + yield cid.CID.parse(cid$1); + } + continue; + } + yield cid.CID.parse(pin); + } + } + } + return addAll; +}); + +exports.createAddAll = createAddAll; + + +/***/ }), + +/***/ 52127: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var addAll = __nccwpck_require__(95440); +var last = __nccwpck_require__(28741); +var configure = __nccwpck_require__(31775); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var last__default = /*#__PURE__*/_interopDefaultLegacy(last); + +function createAdd(config) { + const all = addAll.createAddAll(config); + return configure.configure(() => { + async function add(path, options = {}) { + return last__default["default"](all([{ + path, + ...options + }], options)); + } + return add; + })(config); +} + +exports.createAdd = createAdd; + + +/***/ }), + +/***/ 1115: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var addAll = __nccwpck_require__(95440); +var add = __nccwpck_require__(52127); +var ls = __nccwpck_require__(17454); +var rmAll = __nccwpck_require__(56863); +var rm = __nccwpck_require__(73805); +var index = __nccwpck_require__(69617); + +function createPin(config) { + return { + addAll: addAll.createAddAll(config), + add: add.createAdd(config), + ls: ls.createLs(config), + rmAll: rmAll.createRmAll(config), + rm: rm.createRm(config), + remote: index.createRemote(config) + }; +} + +exports.createPin = createPin; + + +/***/ }), + +/***/ 17454: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +function toPin(type, cid$1, metadata) { + const pin = { + type, + cid: cid.CID.parse(cid$1) + }; + if (metadata) { + pin.metadata = metadata; + } + return pin; +} +const createLs = configure.configure(api => { + async function* ls(options = {}) { + let paths = []; + if (options.paths) { + paths = Array.isArray(options.paths) ? options.paths : [options.paths]; + } + const res = await api.post('pin/ls', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + ...options, + arg: paths.map(path => `${ path }`), + stream: true + }), + headers: options.headers + }); + for await (const pin of res.ndjson()) { + if (pin.Keys) { + for (const cid of Object.keys(pin.Keys)) { + yield toPin(pin.Keys[cid].Type, cid, pin.Keys[cid].Metadata); + } + return; + } + yield toPin(pin.Type, pin.Cid, pin.Metadata); + } + } + return ls; +}); + +exports.createLs = createLs; + + +/***/ }), + +/***/ 96668: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var utils = __nccwpck_require__(21292); + +function createAdd(client) { + async function add(cid, {timeout, signal, headers, ...query}) { + const response = await client.post('pin/remote/add', { + timeout, + signal, + headers, + searchParams: utils.encodeAddParams({ + cid, + ...query + }) + }); + return utils.decodePin(await response.json()); + } + return add; +} + +exports.createAdd = createAdd; + + +/***/ }), + +/***/ 69617: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var core = __nccwpck_require__(66212); +var add = __nccwpck_require__(96668); +var ls = __nccwpck_require__(94900); +var rm = __nccwpck_require__(51590); +var rmAll = __nccwpck_require__(79654); +var index = __nccwpck_require__(94954); + +function createRemote(config) { + const client = new core.Client(config); + return { + add: add.createAdd(client), + ls: ls.createLs(client), + rm: rm.createRm(client), + rmAll: rmAll.createRmAll(client), + service: index.createService(config) + }; +} + +exports.createRemote = createRemote; + + +/***/ }), + +/***/ 94900: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var utils = __nccwpck_require__(21292); + +function createLs(client) { + async function* ls({timeout, signal, headers, ...query}) { + const response = await client.post('pin/remote/ls', { + timeout, + signal, + headers, + searchParams: utils.encodeQuery(query) + }); + for await (const pin of response.ndjson()) { + yield utils.decodePin(pin); + } + } + return ls; +} + +exports.createLs = createLs; + + +/***/ }), + +/***/ 79654: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var utils = __nccwpck_require__(21292); + +function createRmAll(client) { + async function rmAll({timeout, signal, headers, ...query}) { + await client.post('pin/remote/rm', { + timeout, + signal, + headers, + searchParams: utils.encodeQuery({ + ...query, + all: true + }) + }); + } + return rmAll; +} + +exports.createRmAll = createRmAll; + + +/***/ }), + +/***/ 51590: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var utils = __nccwpck_require__(21292); + +function createRm(client) { + async function rm({timeout, signal, headers, ...query}) { + await client.post('pin/remote/rm', { + timeout, + signal, + headers, + searchParams: utils.encodeQuery({ + ...query, + all: false + }) + }); + } + return rm; +} + +exports.createRm = createRm; + + +/***/ }), + +/***/ 93865: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var toUrlSearchParams = __nccwpck_require__(52836); +var utils = __nccwpck_require__(73125); + +function createAdd(client) { + async function add(name, options) { + const {endpoint, key, headers, timeout, signal} = options; + await client.post('pin/remote/service/add', { + timeout, + signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: [ + name, + utils.encodeEndpoint(endpoint), + key + ] + }), + headers + }); + } + return add; +} + +exports.createAdd = createAdd; + + +/***/ }), + +/***/ 94954: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var core = __nccwpck_require__(66212); +var add = __nccwpck_require__(93865); +var ls = __nccwpck_require__(85974); +var rm = __nccwpck_require__(21021); + +function createService(config) { + const client = new core.Client(config); + return { + add: add.createAdd(client), + ls: ls.createLs(client), + rm: rm.createRm(client) + }; +} + +exports.createService = createService; + + +/***/ }), + +/***/ 85974: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var toUrlSearchParams = __nccwpck_require__(52836); +var utils = __nccwpck_require__(73125); + +function createLs(client) { + async function ls(options = {}) { + const {stat, headers, timeout, signal} = options; + const response = await client.post('pin/remote/service/ls', { + timeout, + signal, + headers, + searchParams: stat === true ? toUrlSearchParams.toUrlSearchParams({ stat }) : undefined + }); + const {RemoteServices} = await response.json(); + return RemoteServices.map(utils.decodeRemoteService); + } + return ls; +} + +exports.createLs = createLs; + + +/***/ }), + +/***/ 21021: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var toUrlSearchParams = __nccwpck_require__(52836); + +function createRm(client) { + async function rm(name, options = {}) { + await client.post('pin/remote/service/rm', { + signal: options.signal, + headers: options.headers, + searchParams: toUrlSearchParams.toUrlSearchParams({ arg: name }) + }); + } + return rm; +} + +exports.createRm = createRm; + + +/***/ }), + +/***/ 73125: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function encodeEndpoint(url) { + const href = String(url); + if (href === 'undefined') { + throw Error('endpoint is required'); + } + return href[href.length - 1] === '/' ? href.slice(0, -1) : href; +} +function decodeRemoteService(json) { + return { + service: json.Service, + endpoint: new URL(json.ApiEndpoint), + ...json.Stat && { stat: decodeStat(json.Stat) } + }; +} +function decodeStat(json) { + switch (json.Status) { + case 'valid': { + const {Pinning, Pinned, Queued, Failed} = json.PinCount; + return { + status: 'valid', + pinCount: { + queued: Queued, + pinning: Pinning, + pinned: Pinned, + failed: Failed + } + }; + } + case 'invalid': { + return { status: 'invalid' }; + } + default: { + return { status: json.Status }; + } + } +} + +exports.decodeRemoteService = decodeRemoteService; +exports.decodeStat = decodeStat; +exports.encodeEndpoint = encodeEndpoint; + + +/***/ }), + +/***/ 21292: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var toUrlSearchParams = __nccwpck_require__(52836); + +const decodePin = ({ + Name: name, + Status: status, + Cid: cid$1 +}) => { + return { + cid: cid.CID.parse(cid$1), + name, + status + }; +}; +const encodeService = service => { + if (typeof service === 'string' && service !== '') { + return service; + } else { + throw new TypeError('service name must be passed'); + } +}; +const encodeCID = cid$1 => { + if (cid.CID.asCID(cid$1)) { + return cid$1.toString(); + } else { + throw new TypeError(`CID instance expected instead of ${ typeof cid$1 }`); + } +}; +const encodeQuery = ({service, cid, name, status, all}) => { + const query = toUrlSearchParams.toUrlSearchParams({ + service: encodeService(service), + name, + force: all ? true : undefined + }); + if (cid) { + for (const value of cid) { + query.append('cid', encodeCID(value)); + } + } + if (status) { + for (const value of status) { + query.append('status', value); + } + } + return query; +}; +const encodeAddParams = ({cid, service, background, name, origins}) => { + const params = toUrlSearchParams.toUrlSearchParams({ + arg: encodeCID(cid), + service: encodeService(service), + name, + background: background ? true : undefined + }); + if (origins) { + for (const origin of origins) { + params.append('origin', origin.toString()); + } + } + return params; +}; + +exports.decodePin = decodePin; +exports.encodeAddParams = encodeAddParams; +exports.encodeCID = encodeCID; +exports.encodeQuery = encodeQuery; +exports.encodeService = encodeService; + + +/***/ }), + +/***/ 56863: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var normaliseInput = __nccwpck_require__(44956); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createRmAll = configure.configure(api => { + async function* rmAll(source, options = {}) { + for await (const {path, recursive} of normaliseInput.normaliseInput(source)) { + const searchParams = new URLSearchParams(options.searchParams); + searchParams.append('arg', `${ path }`); + if (recursive != null) + searchParams.set('recursive', String(recursive)); + const res = await api.post('pin/rm', { + signal: options.signal, + headers: options.headers, + searchParams: toUrlSearchParams.toUrlSearchParams({ + ...options, + arg: `${ path }`, + recursive + }) + }); + for await (const pin of res.ndjson()) { + if (pin.Pins) { + yield* pin.Pins.map(cid$1 => cid.CID.parse(cid$1)); + continue; + } + yield cid.CID.parse(pin); + } + } + } + return rmAll; +}); + +exports.createRmAll = createRmAll; + + +/***/ }), + +/***/ 73805: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var rmAll = __nccwpck_require__(56863); +var last = __nccwpck_require__(28741); +var configure = __nccwpck_require__(31775); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var last__default = /*#__PURE__*/_interopDefaultLegacy(last); + +const createRm = config => { + const all = rmAll.createRmAll(config); + return configure.configure(() => { + async function rm(path, options = {}) { + return last__default["default"](all([{ + path, + ...options + }], options)); + } + return rm; + })(config); +}; + +exports.createRm = createRm; + + +/***/ }), + +/***/ 25466: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createPing = configure.configure(api => { + async function* ping(peerId, options = {}) { + const res = await api.post('ping', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: `${ peerId }`, + ...options + }), + headers: options.headers, + transform: objectToCamel.objectToCamel + }); + yield* res.ndjson(); + } + return ping; +}); + +exports.createPing = createPing; + + +/***/ }), + +/***/ 38248: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var ls = __nccwpck_require__(16114); +var peers = __nccwpck_require__(47504); +var publish = __nccwpck_require__(39969); +var subscribe = __nccwpck_require__(13073); +var unsubscribe = __nccwpck_require__(20939); +var subscriptionTracker = __nccwpck_require__(34690); + +function createPubsub(config) { + const subscriptionTracker$1 = new subscriptionTracker.SubscriptionTracker(); + return { + ls: ls.createLs(config), + peers: peers.createPeers(config), + publish: publish.createPublish(config), + subscribe: subscribe.createSubscribe(config, subscriptionTracker$1), + unsubscribe: unsubscribe.createUnsubscribe(config, subscriptionTracker$1) + }; +} + +exports.createPubsub = createPubsub; + + +/***/ }), + +/***/ 16114: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var httpRpcWireFormat = __nccwpck_require__(29208); + +const createLs = configure.configure(api => { + async function ls(options = {}) { + const {Strings} = await (await api.post('pubsub/ls', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + })).json(); + return httpRpcWireFormat.rpcArrayToTextArray(Strings) || []; + } + return ls; +}); + +exports.createLs = createLs; + + +/***/ }), + +/***/ 47504: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var httpRpcWireFormat = __nccwpck_require__(29208); + +const createPeers = configure.configure(api => { + async function peers(topic, options = {}) { + const res = await api.post('pubsub/peers', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: httpRpcWireFormat.textToUrlSafeRpc(topic), + ...options + }), + headers: options.headers + }); + const {Strings} = await res.json(); + return Strings || []; + } + return peers; +}); + +exports.createPeers = createPeers; + + +/***/ }), + +/***/ 39969: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var multipartRequest = __nccwpck_require__(87527); +var abortSignal = __nccwpck_require__(14594); +var httpRpcWireFormat = __nccwpck_require__(29208); +var nativeAbortController = __nccwpck_require__(43586); + +const createPublish = configure.configure(api => { + async function publish(topic, data, options = {}) { + const searchParams = toUrlSearchParams.toUrlSearchParams({ + arg: httpRpcWireFormat.textToUrlSafeRpc(topic), + ...options + }); + const controller = new nativeAbortController.AbortController(); + const signal = abortSignal.abortSignal(controller.signal, options.signal); + const res = await api.post('pubsub/pub', { + signal, + searchParams, + ...await multipartRequest.multipartRequest([data], controller, options.headers) + }); + await res.text(); + } + return publish; +}); + +exports.createPublish = createPublish; + + +/***/ }), + +/***/ 13073: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var debug = __nccwpck_require__(58923); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var httpRpcWireFormat = __nccwpck_require__(29208); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var debug__default = /*#__PURE__*/_interopDefaultLegacy(debug); + +const log = debug__default["default"]('ipfs-http-client:pubsub:subscribe'); +const createSubscribe = (options, subsTracker) => { + return configure.configure(api => { + async function subscribe(topic, handler, options = {}) { + options.signal = subsTracker.subscribe(topic, handler, options.signal); + let done; + let fail; + const result = new Promise((resolve, reject) => { + done = resolve; + fail = reject; + }); + const ffWorkaround = setTimeout(() => done(), 1000); + api.post('pubsub/sub', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: httpRpcWireFormat.textToUrlSafeRpc(topic), + ...options + }), + headers: options.headers + }).catch(err => { + subsTracker.unsubscribe(topic, handler); + fail(err); + }).then(response => { + clearTimeout(ffWorkaround); + if (!response) { + return; + } + readMessages(response, { + onMessage: handler, + onEnd: () => subsTracker.unsubscribe(topic, handler), + onError: options.onError + }); + done(); + }); + return result; + } + return subscribe; + })(options); +}; +async function readMessages(response, {onMessage, onEnd, onError}) { + onError = onError || log; + try { + for await (const msg of response.ndjson()) { + try { + if (!msg.from) { + continue; + } + onMessage({ + from: msg.from, + data: httpRpcWireFormat.rpcToBytes(msg.data), + seqno: httpRpcWireFormat.rpcToBytes(msg.seqno), + topicIDs: httpRpcWireFormat.rpcArrayToTextArray(msg.topicIDs) + }); + } catch (err) { + err.message = `Failed to parse pubsub message: ${ err.message }`; + onError(err, false, msg); + } + } + } catch (err) { + if (!isAbortError(err)) { + onError(err, true); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + } + } finally { + if (options.preventCancel !== true) { + reader.cancel() + } + + reader.releaseLock() + } +} + +module.exports = browserReadableStreamToIt + + +/***/ }), + +<<<<<<< HEAD +/***/ 72871: +======= +/***/ 34690: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var nativeAbortController = __nccwpck_require__(43586); + +class SubscriptionTracker { + constructor() { + this._subs = new Map(); + } + subscribe(topic, handler, signal) { + const topicSubs = this._subs.get(topic) || []; + if (topicSubs.find(s => s.handler === handler)) { + throw new Error(`Already subscribed to ${ topic } with this handler`); + } + const controller = new nativeAbortController.AbortController(); + this._subs.set(topic, [{ + handler, + controller + }].concat(topicSubs)); + if (signal) { + signal.addEventListener('abort', () => this.unsubscribe(topic, handler)); + } + return controller.signal; + } + unsubscribe(topic, handler) { + const subs = this._subs.get(topic) || []; + let unsubs; + if (handler) { + this._subs.set(topic, subs.filter(s => s.handler !== handler)); + unsubs = subs.filter(s => s.handler === handler); + } else { + this._subs.set(topic, []); + unsubs = subs; + } + if (!(this._subs.get(topic) || []).length) { + this._subs.delete(topic); + } + unsubs.forEach(s => s.controller.abort()); + } +} + +exports.SubscriptionTracker = SubscriptionTracker; + + +/***/ }), + +/***/ 20939: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const createUnsubscribe = (options, subsTracker) => { + async function unsubscribe(topic, handler) { + subsTracker.unsubscribe(topic, handler); + } + return unsubscribe; +}; + +exports.createUnsubscribe = createUnsubscribe; + + +/***/ }), + +/***/ 50782: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); +var local = __nccwpck_require__(77565); + +const createRefs = configure.configure((api, opts) => { + const refs = async function* (args, options = {}) { + const argsArr = Array.isArray(args) ? args : [args]; + const res = await api.post('refs', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: argsArr.map(arg => `${ arg instanceof Uint8Array ? cid.CID.decode(arg) : arg }`), + ...options + }), + headers: options.headers, + transform: objectToCamel.objectToCamel + }); + yield* res.ndjson(); + }; + return Object.assign(refs, { local: local.createLocal(opts) }); +}); + +exports.createRefs = createRefs; + + +/***/ }), + +/***/ 77565: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createLocal = configure.configure(api => { + async function* refsLocal(options = {}) { + const res = await api.post('refs/local', { + signal: options.signal, + transform: objectToCamel.objectToCamel, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + yield* res.ndjson(); + } + return refsLocal; +}); + +exports.createLocal = createLocal; + + +/***/ }), + +/***/ 51417: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var cid = __nccwpck_require__(24247); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createGc = configure.configure(api => { + async function* gc(options = {}) { + const res = await api.post('repo/gc', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers, + transform: res => { + return { + err: res.Error ? new Error(res.Error) : null, + cid: (res.Key || {})['/'] ? cid.CID.parse(res.Key['/']) : null + }; + } + }); + yield* res.ndjson(); + } + return gc; +}); + +exports.createGc = createGc; + + +/***/ }), + +/***/ 65381: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var gc = __nccwpck_require__(51417); +var stat = __nccwpck_require__(48097); +var version = __nccwpck_require__(74956); + +function createRepo(config) { + return { + gc: gc.createGc(config), + stat: stat.createStat(config), + version: version.createVersion(config) + }; +} + +exports.createRepo = createRepo; + + +/***/ }), + +/***/ 48097: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createStat = configure.configure(api => { + async function stat(options = {}) { + const res = await api.post('repo/stat', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + const data = await res.json(); + return { + numObjects: BigInt(data.NumObjects), + repoSize: BigInt(data.RepoSize), + repoPath: data.RepoPath, + version: data.Version, + storageMax: BigInt(data.StorageMax) + }; + } + return stat; +}); + +exports.createStat = createStat; + + +/***/ }), + +/***/ 74956: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createVersion = configure.configure(api => { + async function version(options = {}) { + const res = await (await api.post('repo/version', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + })).json(); + return res.Version; + } + return version; +}); + +exports.createVersion = createVersion; + + +/***/ }), + +/***/ 38587: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createResolve = configure.configure(api => { + async function resolve(path, options = {}) { + const res = await api.post('resolve', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }); + const {Path} = await res.json(); + return Path; + } + return resolve; +}); + +exports.createResolve = createResolve; + + +/***/ }), + +/***/ 86476: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var errCode = __nccwpck_require__(5822); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +const createStart = configure.configure(api => { + const start = async (options = {}) => { + throw errCode__default["default"](new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED'); + }; + return start; +}); + +exports.createStart = createStart; + + +/***/ }), + +/***/ 14486: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createBw = configure.configure(api => { + async function* bw(options = {}) { + const res = await api.post('stats/bw', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers, + transform: stats => ({ + totalIn: BigInt(stats.TotalIn), + totalOut: BigInt(stats.TotalOut), + rateIn: parseFloat(stats.RateIn), + rateOut: parseFloat(stats.RateOut) + }) + }); + yield* res.ndjson(); + } + return bw; +}); + +exports.createBw = createBw; + + +/***/ }), + +/***/ 39825: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var stat = __nccwpck_require__(70104); +var stat$1 = __nccwpck_require__(48097); +var bw = __nccwpck_require__(14486); + +function createStats(config) { + return { + bitswap: stat.createStat(config), + repo: stat$1.createStat(config), + bw: bw.createBw(config) + }; +} + +exports.createStats = createStats; + + +/***/ }), + +/***/ 94121: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createStop = configure.configure(api => { + async function stop(options = {}) { + const res = await api.post('shutdown', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + await res.text(); + } + return stop; +}); + +exports.createStop = createStop; + + +/***/ }), + +/***/ 34779: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var multiaddr = __nccwpck_require__(78025); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createAddrs = configure.configure(api => { + async function addrs(options = {}) { + const res = await api.post('swarm/addrs', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + const {Addrs} = await res.json(); + return Object.keys(Addrs).map(id => ({ + id, + addrs: (Addrs[id] || []).map(a => new multiaddr.Multiaddr(a)) + })); + } + return addrs; +}); + +exports.createAddrs = createAddrs; + + +/***/ }), + +/***/ 45988: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createConnect = configure.configure(api => { + async function connect(addr, options = {}) { + const res = await api.post('swarm/connect', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: addr, + ...options + }), + headers: options.headers + }); + const {Strings} = await res.json(); + return Strings || []; + } + return connect; +}); + +exports.createConnect = createConnect; + + +/***/ }), + +/***/ 83865: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createDisconnect = configure.configure(api => { + async function disconnect(addr, options = {}) { + const res = await api.post('swarm/disconnect', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams({ + arg: addr, + ...options + }), + headers: options.headers + }); + const {Strings} = await res.json(); + return Strings || []; + } + return disconnect; +}); + +exports.createDisconnect = createDisconnect; + + +/***/ }), + +/***/ 8697: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var addrs = __nccwpck_require__(34779); +var connect = __nccwpck_require__(45988); +var disconnect = __nccwpck_require__(83865); +var localAddrs = __nccwpck_require__(27815); +var peers = __nccwpck_require__(78953); + +function createSwarm(config) { + return { + addrs: addrs.createAddrs(config), + connect: connect.createConnect(config), + disconnect: disconnect.createDisconnect(config), + localAddrs: localAddrs.createLocalAddrs(config), + peers: peers.createPeers(config) + }; +} + +exports.createSwarm = createSwarm; + + +/***/ }), + +/***/ 27815: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var multiaddr = __nccwpck_require__(78025); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createLocalAddrs = configure.configure(api => { + async function localAddrs(options = {}) { + const res = await api.post('swarm/addrs/local', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + const {Strings} = await res.json(); + return (Strings || []).map(a => new multiaddr.Multiaddr(a)); + } + return localAddrs; +}); + +exports.createLocalAddrs = createLocalAddrs; + + +/***/ }), + +/***/ 78953: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var multiaddr = __nccwpck_require__(78025); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createPeers = configure.configure(api => { + async function peers(options = {}) { + const res = await api.post('swarm/peers', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + const {Peers} = await res.json(); + return (Peers || []).map(peer => { + return { + addr: new multiaddr.Multiaddr(peer.Addr), + peer: peer.Peer, + muxer: peer.Muxer, + latency: peer.Latency, + streams: peer.Streams, + direction: peer.Direction == null ? undefined : peer.Direction === 0 ? 'inbound' : 'outbound' + }; + }); + } + return peers; +}); + +exports.createPeers = createPeers; + + +/***/ }), + +/***/ 93620: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var objectToCamel = __nccwpck_require__(62268); +var configure = __nccwpck_require__(31775); +var toUrlSearchParams = __nccwpck_require__(52836); + +const createVersion = configure.configure(api => { + async function version(options = {}) { + const res = await api.post('version', { + signal: options.signal, + searchParams: toUrlSearchParams.toUrlSearchParams(options), + headers: options.headers + }); + return { + ...objectToCamel.objectToCamel(await res.json()), + 'ipfs-http-client': '1.0.0' + }; + } + return version; +}); + +exports.createVersion = createVersion; + + +/***/ }), + +/***/ 38050: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const convert = __nccwpck_require__(74954) +const protocols = __nccwpck_require__(46015) +const varint = __nccwpck_require__(9280) +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) + +// export codec +module.exports = { + stringToStringTuples, + stringTuplesToString, + + tuplesToStringTuples, + stringTuplesToTuples, + + bytesToTuples, + tuplesToBytes, + + bytesToString, + stringToBytes, + + fromString, + fromBytes, + validateBytes, + isValidBytes, + cleanPath, + + ParseError, + protoFromTuple, + + sizeForAddr +} + +// string -> [[str name, str addr]... ] +/** + * @param {string} str + */ +function stringToStringTuples (str) { + const tuples = [] + const parts = str.split('/').slice(1) // skip first empty elem + if (parts.length === 1 && parts[0] === '') { + return [] + } + + for (let p = 0; p < parts.length; p++) { + const part = parts[p] + const proto = protocols(part) + + if (proto.size === 0) { + tuples.push([part]) + continue + } + + p++ // advance addr part + if (p >= parts.length) { + throw ParseError('invalid address: ' + str) + } + + // if it's a path proto, take the rest + if (proto.path) { + tuples.push([ + part, + // TODO: should we need to check each path part to see if it's a proto? + // This would allow for other protocols to be added after a unix path, + // however it would have issues if the path had a protocol name in the path + cleanPath(parts.slice(p).join('/')) + ]) + break + } + + tuples.push([part, parts[p]]) + } + + return tuples +} + +// [[str name, str addr]... ] -> string +/** + * @param {[number, string?][]} tuples + */ +function stringTuplesToString (tuples) { + /** @type {Array} */ + const parts = [] + tuples.map((tup) => { + const proto = protoFromTuple(tup) + parts.push(proto.name) + if (tup.length > 1) { + parts.push(tup[1]) + } + return null + }) + + return cleanPath(parts.join('/')) +} + +// [[str name, str addr]... ] -> [[int code, Uint8Array]... ] +/** + * @param {Array} tuples + * @returns {[number , Uint8Array?][]} + */ +function stringTuplesToTuples (tuples) { + return tuples.map((tup) => { + if (!Array.isArray(tup)) { + tup = [tup] + } + const proto = protoFromTuple(tup) + if (tup.length > 1) { + return [proto.code, convert.toBytes(proto.code, tup[1])] + } + return [proto.code] + }) +} + +/** + * Convert tuples to string tuples + * + * [[int code, Uint8Array]... ] -> [[int code, str addr]... ] + * + * @param {Array<[number, Uint8Array?]>} tuples + * @returns {Array<[number, string?]>} + */ + +function tuplesToStringTuples (tuples) { + return tuples.map(tup => { + const proto = protoFromTuple(tup) + if (tup[1]) { + return [proto.code, convert.toString(proto.code, tup[1])] + } + return [proto.code] + }) +} + +// [[int code, Uint8Array ]... ] -> Uint8Array +/** + * @param {[number, Uint8Array?][]} tuples + */ +function tuplesToBytes (tuples) { + return fromBytes(uint8ArrayConcat(tuples.map((/** @type {any[]} */ tup) => { + const proto = protoFromTuple(tup) + let buf = Uint8Array.from(varint.encode(proto.code)) + + if (tup.length > 1) { + buf = uint8ArrayConcat([buf, tup[1]]) // add address buffer + } + + return buf + }))) +} + +/** + * @param {import("./types").Protocol} p + * @param {Uint8Array | number[]} addr + */ +function sizeForAddr (p, addr) { + if (p.size > 0) { + return p.size / 8 + } else if (p.size === 0) { + return 0 + } else { + const size = varint.decode(addr) + return size + varint.decode.bytes + } +} + +/** + * + * @param {Uint8Array} buf + * @returns {Array<[number, Uint8Array?]>} + */ +function bytesToTuples (buf) { + /** @type {Array<[number, Uint8Array?]>} */ + const tuples = [] + let i = 0 + while (i < buf.length) { + const code = varint.decode(buf, i) + const n = varint.decode.bytes + + const p = protocols(code) + + const size = sizeForAddr(p, buf.slice(i + n)) + + if (size === 0) { + tuples.push([code]) + i += n + continue + } + + const addr = buf.slice(i + n, i + n + size) + + i += (size + n) + + if (i > buf.length) { // did not end _exactly_ at buffer.length + throw ParseError('Invalid address Uint8Array: ' + uint8ArrayToString(buf, 'base16')) + } + + // ok, tuple seems good. + tuples.push([code, addr]) + } + + return tuples +} + +// Uint8Array -> String +/** + * @param {Uint8Array} buf + */ +function bytesToString (buf) { + const a = bytesToTuples(buf) + const b = tuplesToStringTuples(a) + return stringTuplesToString(b) +} + +// String -> Uint8Array +/** + * @param {string} str + */ +function stringToBytes (str) { + str = cleanPath(str) + const a = stringToStringTuples(str) + const b = stringTuplesToTuples(a) + + return tuplesToBytes(b) +} + +// String -> Uint8Array +/** + * @param {string} str + */ +function fromString (str) { + return stringToBytes(str) +} + +// Uint8Array -> Uint8Array +/** + * @param {Uint8Array} buf + */ +function fromBytes (buf) { + const err = validateBytes(buf) + if (err) throw err + return Uint8Array.from(buf) // copy +} + +/** + * @param {Uint8Array} buf + */ +function validateBytes (buf) { + try { + bytesToTuples(buf) // try to parse. will throw if breaks + } catch (err) { + return err + } +} + +/** + * @param {Uint8Array} buf + */ +function isValidBytes (buf) { + return validateBytes(buf) === undefined +} + +/** + * @param {string} str + */ +function cleanPath (str) { + return '/' + str.trim().split('/').filter((/** @type {any} */ a) => a).join('/') +} + +/** + * @param {string} str + */ +function ParseError (str) { + return new Error('Error parsing address: ' + str) +} + +/** + * @param {any[]} tup + */ +function protoFromTuple (tup) { + const proto = protocols(tup[0]) + return proto +} + + +/***/ }), + +/***/ 74954: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const ip = __nccwpck_require__(48239) +const protocols = __nccwpck_require__(46015) +const { CID } = __nccwpck_require__(24247) +const { base32 } = __nccwpck_require__(70784) +const { base58btc } = __nccwpck_require__(49108) +const Digest = __nccwpck_require__(81168) +const varint = __nccwpck_require__(9280) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) + +module.exports = Convert + +// converts (serializes) addresses +/** + * @param {string} proto + * @param {string | Uint8Array} a + */ +function Convert (proto, a) { + if (a instanceof Uint8Array) { + return Convert.toString(proto, a) + } else { + return Convert.toBytes(proto, a) + } +} + +/** + * Convert [code,Uint8Array] to string + * + * @param {number|string} proto + * @param {Uint8Array} buf + * @returns {string} + */ +Convert.toString = function convertToString (proto, buf) { + const protocol = protocols(proto) + switch (protocol.code) { + case 4: // ipv4 + case 41: // ipv6 + return bytes2ip(buf) + + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return bytes2port(buf).toString() + + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 777: // memory + return bytes2str(buf) + + case 421: // ipfs + return bytes2mh(buf) + case 444: // onion + return bytes2onion(buf) + case 445: // onion3 + return bytes2onion(buf) + default: + return uint8ArrayToString(buf, 'base16') // no clue. convert to hex + } +} + +Convert.toBytes = function convertToBytes (/** @type {string | number } */ proto, /** @type {string} */ str) { + const protocol = protocols(proto) + switch (protocol.code) { + case 4: // ipv4 + return ip2bytes(str) + case 41: // ipv6 + return ip2bytes(str) + + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return port2bytes(parseInt(str, 10)) + + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 777: // memory + return str2bytes(str) + + case 421: // ipfs + return mh2bytes(str) + case 444: // onion + return onion2bytes(str) + case 445: // onion3 + return onion32bytes(str) + default: + return uint8ArrayFromString(str, 'base16') // no clue. convert from hex + } +} + +/** + * @param {string} ipString + */ +function ip2bytes (ipString) { + if (!ip.isIP(ipString)) { + throw new Error('invalid ip address') + } + return ip.toBytes(ipString) +} + +/** + * @param {Uint8Array} ipBuff + */ +function bytes2ip (ipBuff) { + const ipString = ip.toString(ipBuff) + if (!ipString || !ip.isIP(ipString)) { + throw new Error('invalid ip address') + } + return ipString +} + +/** + * @param {number} port + */ +function port2bytes (port) { + const buf = new ArrayBuffer(2) + const view = new DataView(buf) + view.setUint16(0, port) + + return new Uint8Array(buf) +} + +/** + * @param {Uint8Array} buf + */ +function bytes2port (buf) { + const view = new DataView(buf.buffer) + return view.getUint16(buf.byteOffset) +} + +/** + * @param {string} str + */ +function str2bytes (str) { + const buf = uint8ArrayFromString(str) + const size = Uint8Array.from(varint.encode(buf.length)) + return uint8ArrayConcat([size, buf], size.length + buf.length) +} + +/** + * @param {Uint8Array} buf + */ +function bytes2str (buf) { + const size = varint.decode(buf) + buf = buf.slice(varint.decode.bytes) + + if (buf.length !== size) { + throw new Error('inconsistent lengths') + } + + return uint8ArrayToString(buf) +} + +/** + * @param {string} hash - base58btc string + */ +function mh2bytes (hash) { + let mh + + if (hash[0] === 'Q' || hash[0] === '1') { + mh = Digest.decode(base58btc.decode(`z${hash}`)).bytes + } else { + mh = CID.parse(hash).multihash.bytes + } + + // the address is a varint prefixed multihash string representation + const size = Uint8Array.from(varint.encode(mh.length)) + return uint8ArrayConcat([size, mh], size.length + mh.length) +} + +/** + * Converts bytes to bas58btc string + * + * @param {Uint8Array} buf + * @returns {string} base58btc string + */ +function bytes2mh (buf) { + const size = varint.decode(buf) + const address = buf.slice(varint.decode.bytes) + + if (address.length !== size) { + throw new Error('inconsistent lengths') + } + + return uint8ArrayToString(address, 'base58btc') +} + +/** + * @param {string} str + */ +function onion2bytes (str) { + const addr = str.split(':') + if (addr.length !== 2) { + throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') + } + if (addr[0].length !== 16) { + throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion address.') + } + + // onion addresses do not include the multibase prefix, add it before decoding + const buf = base32.decode('b' + addr[0]) + + // onion port number + const port = parseInt(addr[1], 10) + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)') + } + const portBuf = port2bytes(port) + return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) +} + +/** + * @param {string} str + */ +function onion32bytes (str) { + const addr = str.split(':') + if (addr.length !== 2) { + throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') + } + if (addr[0].length !== 56) { + throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion3 address.') + } + // onion addresses do not include the multibase prefix, add it before decoding + const buf = base32.decode('b' + addr[0]) + + // onion port number + const port = parseInt(addr[1], 10) + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)') + } + const portBuf = port2bytes(port) + return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) +} + +/** + * @param {Uint8Array} buf + */ +function bytes2onion (buf) { + const addrBytes = buf.slice(0, buf.length - 2) + const portBytes = buf.slice(buf.length - 2) + const addr = uint8ArrayToString(addrBytes, 'base32') + const port = bytes2port(portBytes) + return addr + ':' + port +} + + +/***/ }), + +/***/ 78025: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const codec = __nccwpck_require__(38050) +const protocols = __nccwpck_require__(46015) +const varint = __nccwpck_require__(9280) +const { CID } = __nccwpck_require__(24247) +const { base58btc } = __nccwpck_require__(49108) +const errCode = __nccwpck_require__(5822) +const inspect = Symbol.for('nodejs.util.inspect.custom') +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) + +/** + * @typedef {(addr: Multiaddr) => Promise} Resolver + * @typedef {string | Multiaddr | Uint8Array | null} MultiaddrInput + * @typedef {import('./types').MultiaddrObject} MultiaddrObject + * @typedef {import('./types').Protocol} Protocol + */ + +/** @type {Map} */ +const resolvers = new Map() +const symbol = Symbol.for('@multiformats/js-multiaddr/multiaddr') + +/** + * Creates a [multiaddr](https://github.com/multiformats/multiaddr) from + * a Uint8Array, String or another Multiaddr instance + * public key. + * + */ +class Multiaddr { + /** + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * ``` + * + * @param {MultiaddrInput} [addr] - If String or Uint8Array, needs to adhere to the address format of a [multiaddr](https://github.com/multiformats/multiaddr#string-format) + */ + constructor (addr) { + // default + if (addr == null) { + addr = '' + } + + // Define symbol + Object.defineProperty(this, symbol, { value: true }) + + if (addr instanceof Uint8Array) { + /** @type {Uint8Array} - The raw bytes representing this multiaddress */ + this.bytes = codec.fromBytes(addr) + } else if (typeof addr === 'string') { + if (addr.length > 0 && addr.charAt(0) !== '/') { + throw new Error(`multiaddr "${addr}" must start with a "/"`) + } + this.bytes = codec.fromString(addr) + } else if (Multiaddr.isMultiaddr(addr)) { // Multiaddr + this.bytes = codec.fromBytes(addr.bytes) // validate + copy buffer + } else { + throw new Error('addr must be a string, Buffer, or another Multiaddr') + } + } + + /** + * Returns Multiaddr as a String + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toString() + * // '/ip4/127.0.0.1/tcp/4001' + * ``` + */ + toString () { + return codec.bytesToString(this.bytes) + } + + /** + * Returns Multiaddr as a JSON encoded object + * + * @example + * ```js + * JSON.stringify(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) + * // '/ip4/127.0.0.1/tcp/4001' + * ``` + */ + toJSON () { + return this.toString() + } + + /** + * Returns Multiaddr as a convinient options object to be used with net.createConnection + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toOptions() + * // { family: 4, host: '127.0.0.1', transport: 'tcp', port: 4001 } + * ``` + */ + toOptions () { + /** @type {MultiaddrObject} */ + const opts = {} + const parsed = this.toString().split('/') + opts.family = parsed[1] === 'ip4' ? 4 : 6 + opts.host = parsed[2] + opts.transport = parsed[3] + opts.port = parseInt(parsed[4]) + return opts + } + + /** + * Returns the protocols the Multiaddr is defined with, as an array of objects, in + * left-to-right order. Each object contains the protocol code, protocol name, + * and the size of its address space in bits. + * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protos() + * // [ { code: 4, size: 32, name: 'ip4' }, + * // { code: 6, size: 16, name: 'tcp' } ] + * ``` + * + * @returns {Protocol[]} protocols - All the protocols the address is composed of + */ + protos () { + return this.protoCodes().map(code => Object.assign({}, protocols(code))) + } + + /** + * Returns the codes of the protocols in left-to-right order. + * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) + * + * @example + * ```js + * Multiaddr('/ip4/127.0.0.1/tcp/4001').protoCodes() + * // [ 4, 6 ] + * ``` + * + * @returns {number[]} protocol codes + */ + protoCodes () { + const codes = [] + const buf = this.bytes + let i = 0 + while (i < buf.length) { + const code = varint.decode(buf, i) + const n = varint.decode.bytes + + const p = protocols(code) + const size = codec.sizeForAddr(p, buf.slice(i + n)) + + i += (size + n) + codes.push(code) + } + + return codes + } + + /** + * Returns the names of the protocols in left-to-right order. + * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protoNames() + * // [ 'ip4', 'tcp' ] + * ``` + * + * @returns {string[]} protocol names + */ + protoNames () { + return this.protos().map(proto => proto.name) + } + + /** + * Returns a tuple of parts + * + * @example + * ```js + * new Multiaddr("/ip4/127.0.0.1/tcp/4001").tuples() + * // [ [ 4, ], [ 6, ] ] + * ``` + */ + tuples () { + return codec.bytesToTuples(this.bytes) + } + + /** + * Returns a tuple of string/number parts + * - tuples[][0] = code of protocol + * - tuples[][1] = contents of address + * + * @example + * ```js + * new Multiaddr("/ip4/127.0.0.1/tcp/4001").stringTuples() + * // [ [ 4, '127.0.0.1' ], [ 6, '4001' ] ] + * ``` + */ + stringTuples () { + const t = codec.bytesToTuples(this.bytes) + return codec.tuplesToStringTuples(t) + } + + /** + * Encapsulates a Multiaddr in another Multiaddr + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') + * // + * + * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * + * const mh3 = mh1.encapsulate(mh2) + * // + * + * mh3.toString() + * // '/ip4/8.8.8.8/tcp/1080/ip4/127.0.0.1/tcp/4001' + * ``` + * + * @param {MultiaddrInput} addr - Multiaddr to add into this Multiaddr + */ + encapsulate (addr) { + addr = new Multiaddr(addr) + return new Multiaddr(this.toString() + addr.toString()) + } + + /** + * Decapsulates a Multiaddr from another Multiaddr + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') + * // + * + * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * + * const mh3 = mh1.encapsulate(mh2) + * // + * + * mh3.decapsulate(mh2).toString() + * // '/ip4/8.8.8.8/tcp/1080' + * ``` + * + * @param {Multiaddr | string} addr - Multiaddr to remove from this Multiaddr + * @returns {Multiaddr} + */ + decapsulate (addr) { + const addrString = addr.toString() + const s = this.toString() + const i = s.lastIndexOf(addrString) + if (i < 0) { + throw new Error('Address ' + this + ' does not contain subaddress: ' + addr) + } + return new Multiaddr(s.slice(0, i)) + } + + /** + * A more reliable version of `decapsulate` if you are targeting a + * specific code, such as 421 (the `p2p` protocol code). The last index of the code + * will be removed from the `Multiaddr`, and a new instance will be returned. + * If the code is not present, the original `Multiaddr` is returned. + * + * @example + * ```js + * const addr = new Multiaddr('/ip4/0.0.0.0/tcp/8080/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC') + * // + * + * addr.decapsulateCode(421).toString() + * // '/ip4/0.0.0.0/tcp/8080' + * + * new Multiaddr('/ip4/127.0.0.1/tcp/8080').decapsulateCode(421).toString() + * // '/ip4/127.0.0.1/tcp/8080' + * ``` + * + * @param {number} code - The code of the protocol to decapsulate from this Multiaddr + * @returns {Multiaddr} + */ + decapsulateCode (code) { + const tuples = this.tuples() + for (let i = tuples.length - 1; i >= 0; i--) { + if (tuples[i][0] === code) { + return new Multiaddr(codec.tuplesToBytes(tuples.slice(0, i))) + } + } + return this + } + + /** + * Extract the peerId if the multiaddr contains one + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/ipfs/QmValidBase58string') + * // + * + * // should return QmValidBase58string or null if the id is missing or invalid + * const peerId = mh1.getPeerId() + * ``` + * + * @returns {string | null} peerId - The id of the peer or null if invalid or missing from the ma + */ + getPeerId () { + try { + const tuples = this.stringTuples().filter((tuple) => { + if (tuple[0] === protocols.names.ipfs.code) { + return true + } + return false + }) + + // Get the last ipfs tuple ['ipfs', 'peerid string'] + const tuple = tuples.pop() + if (tuple && tuple[1]) { + const peerIdStr = tuple[1] + + // peer id is base58btc encoded string but not multibase encoded so add the `z` + // prefix so we can validate that it is correctly encoded + if (peerIdStr[0] === 'Q' || peerIdStr[0] === '1') { + return uint8ArrayToString(base58btc.decode(`z${peerIdStr}`), 'base58btc') + } + + // try to parse peer id as CID + return uint8ArrayToString(CID.parse(peerIdStr).multihash.bytes, 'base58btc') + } + + return null + } catch (e) { + return null + } + } + + /** + * Extract the path if the multiaddr contains one + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/unix/tmp/p2p.sock') + * // + * + * // should return utf8 string or null if the id is missing or invalid + * const path = mh1.getPath() + * ```js + * + * @returns {string | null} path - The path of the multiaddr, or null if no path protocol is present + */ + getPath () { + let path = null + try { + path = this.stringTuples().filter((tuple) => { + const proto = protocols(tuple[0]) + if (proto.path) { + return true + } + return false + })[0][1] + + if (!path) { + path = null + } + } catch (e) { + path = null + } + return path + } + + /** + * Checks if two Multiaddrs are the same + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') + * // + * + * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * + * mh1.equals(mh1) + * // true + * + * mh1.equals(mh2) + * // false + * ``` + * + * @param {Multiaddr} addr + * @returns {boolean} + */ + equals (addr) { + return uint8ArrayEquals(this.bytes, addr.bytes) + } + + /** + * Resolve multiaddr if containing resolvable hostname. + * + * @example + * ```js + * Multiaddr.resolvers.set('dnsaddr', resolverFunction) + * const mh1 = new Multiaddr('/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb') + * const resolvedMultiaddrs = await mh1.resolve() + * // [ + * // , + * // , + * // + * // ] + * ``` + * + * @returns {Promise>} + */ + async resolve () { + const resolvableProto = this.protos().find((p) => p.resolvable) + + // Multiaddr is not resolvable? + if (!resolvableProto) { + return [this] + } + + const resolver = resolvers.get(resolvableProto.name) + if (!resolver) { + throw errCode(new Error(`no available resolver for ${resolvableProto.name}`), 'ERR_NO_AVAILABLE_RESOLVER') + } + + const addresses = await resolver(this) + return addresses.map((a) => new Multiaddr(a)) + } + + /** + * Gets a Multiaddrs node-friendly address object. Note that protocol information + * is left out: in Node (and most network systems) the protocol is unknowable + * given only the address. + * + * Has to be a ThinWaist Address, otherwise throws error + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').nodeAddress() + * // {family: 4, address: '127.0.0.1', port: 4001} + * ``` + * + * @returns {{family: 4 | 6, address: string, port: number}} + * @throws {Error} Throws error if Multiaddr is not a Thin Waist address + */ + nodeAddress () { + const codes = this.protoCodes() + const names = this.protoNames() + const parts = this.toString().split('/').slice(1) + + if (parts.length < 4) { + throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".') + } else if (codes[0] !== 4 && codes[0] !== 41 && codes[0] !== 54 && codes[0] !== 55) { + throw new Error(`no protocol with name: "'${names[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`) + } else if (parts[2] !== 'tcp' && parts[2] !== 'udp') { + throw new Error(`no protocol with name: "'${names[1]}'". Must have a valid transport protocol: "{tcp, udp}".`) + } + + return { + family: (codes[0] === 41 || codes[0] === 55) ? 6 : 4, + address: parts[1], + port: parseInt(parts[3]) // tcp or udp port + } + } + + /** + * Returns if a Multiaddr is a Thin Waist address or not. + * + * Thin Waist is if a Multiaddr adheres to the standard combination of: + * + * `{IPv4, IPv6}/{TCP, UDP}` + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * const mh2 = new Multiaddr('/ip4/192.168.2.1/tcp/5001') + * // + * const mh3 = mh1.encapsulate(mh2) + * // + * const mh4 = new Multiaddr('/ip4/127.0.0.1/tcp/2000/wss/p2p-webrtc-star/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSooo2a') + * // + * mh1.isThinWaistAddress() + * // true + * mh2.isThinWaistAddress() + * // true + * mh3.isThinWaistAddress() + * // false + * mh4.isThinWaistAddress() + * // false + * ``` + * + * @param {Multiaddr} [addr] - Defaults to using `this` instance + */ + isThinWaistAddress (addr) { + const protos = (addr || this).protos() + + if (protos.length !== 2) { + return false + } + + if (protos[0].code !== 4 && protos[0].code !== 41) { + return false + } + if (protos[1].code !== 6 && protos[1].code !== 273) { + return false + } + return true + } + + /** + * Creates a Multiaddr from a node-friendly address object + * + * @example + * ```js + * Multiaddr.fromNodeAddress({address: '127.0.0.1', port: '4001'}, 'tcp') + * // + * ``` + * + * @param {{family: 4 | 6, address: string, port: number}} addr + * @param {string} transport + */ + static fromNodeAddress (addr, transport) { + if (!addr) { throw new Error('requires node address object') } + if (!transport) { throw new Error('requires transport protocol') } + let ip + switch (addr.family) { + case 4: + ip = 'ip4' + break + case 6: + ip = 'ip6' + break + default: + throw Error(`Invalid addr family. Got '${addr.family}' instead of 4 or 6`) + } + return new Multiaddr('/' + [ip, addr.address, transport, addr.port].join('/')) + } + + /** + * Returns if something is a Multiaddr that is a name + * + * @param {Multiaddr} addr + * @returns {boolean} isName + */ + static isName (addr) { + if (!Multiaddr.isMultiaddr(addr)) { + return false + } + + // if a part of the multiaddr is resolvable, then return true + return addr.protos().some((proto) => proto.resolvable) + } + + /** + * Check if object is a CID instance + * + * @param {any} value + * @returns {value is Multiaddr} + */ + static isMultiaddr (value) { + return value instanceof Multiaddr || Boolean(value && value[symbol]) + } + + /** + * Returns Multiaddr as a human-readable string. + * For post Node.js v10.0.0. + * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect + * + * @example + * ```js + * console.log(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) + * // '' + * ``` + * + * @returns {string} + */ + [inspect] () { + return '' + } + + /** + * Returns Multiaddr as a human-readable string. + * Fallback for pre Node.js v10.0.0. + * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').inspect() + * // '' + * ``` + * + * @returns {string} + */ + inspect () { + return '' + } +} + +/** + * Object containing table, names and codes of all supported protocols. + * To get the protocol values from a Multiaddr, you can use + * [`.protos()`](#multiaddrprotos), + * [`.protoCodes()`](#multiaddrprotocodes) or + * [`.protoNames()`](#multiaddrprotonames) + * + * @returns {{table: Array, names: Object, codes: Object}} + */ +Multiaddr.protocols = protocols + +Multiaddr.resolvers = resolvers + +/** + * Static factory + * + * @param {MultiaddrInput} addr + */ +function multiaddr (addr) { + return new Multiaddr(addr) +} + +module.exports = { Multiaddr, multiaddr, protocols, resolvers } + + +/***/ }), + +/***/ 48239: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const isIp = __nccwpck_require__(89837) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) + +const isIP = isIp +const isV4 = isIp.v4 +const isV6 = isIp.v6 + +// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L7 +// @ts-ignore - this is copied from the link above better to keep it the same +const toBytes = function (ip, buff, offset) { + offset = ~~offset + + let result + + if (isV4(ip)) { + result = buff || new Uint8Array(offset + 4) + // @ts-ignore + // eslint-disable-next-line array-callback-return + ip.split(/\./g).map(function (byte) { + result[offset++] = parseInt(byte, 10) & 0xff + }) + } else if (isV6(ip)) { + const sections = ip.split(':', 8) + + let i + for (i = 0; i < sections.length; i++) { + const isv4 = isV4(sections[i]) + let v4Buffer + + if (isv4) { + v4Buffer = toBytes(sections[i]) + sections[i] = uint8ArrayToString(v4Buffer.slice(0, 2), 'base16') + } + + if (v4Buffer && ++i < 8) { + sections.splice(i, 0, uint8ArrayToString(v4Buffer.slice(2, 4), 'base16')) + } + } + + if (sections[0] === '') { + while (sections.length < 8) sections.unshift('0') + } else if (sections[sections.length - 1] === '') { + while (sections.length < 8) sections.push('0') + } else if (sections.length < 8) { + for (i = 0; i < sections.length && sections[i] !== ''; i++); + const argv = [i, '1'] + for (i = 9 - sections.length; i > 0; i--) { + argv.push('0') + } + sections.splice.apply(sections, argv) + } + + result = buff || new Uint8Array(offset + 16) + for (i = 0; i < sections.length; i++) { + const word = parseInt(sections[i], 16) + result[offset++] = (word >> 8) & 0xff + result[offset++] = word & 0xff + } + } + + if (!result) { + throw Error('Invalid ip address: ' + ip) + } + + return result +} + +// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63 +// @ts-ignore - this is copied from the link above better to keep it the same +const toString = function (buff, offset, length) { + offset = ~~offset + length = length || (buff.length - offset) + + const result = [] + let string + const view = new DataView(buff.buffer) + if (length === 4) { + // IPv4 + for (let i = 0; i < length; i++) { + result.push(buff[offset + i]) + } + string = result.join('.') + } else if (length === 16) { + // IPv6 + for (let i = 0; i < length; i += 2) { + result.push(view.getUint16(offset + i).toString(16)) + } + string = result.join(':') + string = string.replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3') + string = string.replace(/:{3,4}/, '::') + } + + return string +} + +module.exports = { + isIP, + isV4, + isV6, + toBytes, + toString +} + + +/***/ }), + +/***/ 46015: +/***/ ((module) => { + +"use strict"; + +/** @typedef {import("./types").Protocol} Protocol */ + +/** + * Protocols + * + * @param {number | string} proto + * @returns {Protocol} + */ +function Protocols (proto) { + if (typeof (proto) === 'number') { + if (Protocols.codes[proto]) { + return Protocols.codes[proto] + } + + throw new Error('no protocol with code: ' + proto) + } else if (typeof (proto) === 'string') { + if (Protocols.names[proto]) { + return Protocols.names[proto] + } + + throw new Error('no protocol with name: ' + proto) + } + + throw new Error('invalid protocol id type: ' + proto) +} + +const V = -1 +Protocols.lengthPrefixedVarSize = V +Protocols.V = V + +/** @type {Array<[number, number, string, (string|boolean)?, string?]>} */ +Protocols.table = [ + [4, 32, 'ip4'], + [6, 16, 'tcp'], + [33, 16, 'dccp'], + [41, 128, 'ip6'], + [42, V, 'ip6zone'], + [53, V, 'dns', 'resolvable'], + [54, V, 'dns4', 'resolvable'], + [55, V, 'dns6', 'resolvable'], + [56, V, 'dnsaddr', 'resolvable'], + [132, 16, 'sctp'], + [273, 16, 'udp'], + [275, 0, 'p2p-webrtc-star'], + [276, 0, 'p2p-webrtc-direct'], + [277, 0, 'p2p-stardust'], + [290, 0, 'p2p-circuit'], + [301, 0, 'udt'], + [302, 0, 'utp'], + [400, V, 'unix', false, 'path'], + // `ipfs` is added before `p2p` for legacy support. + // All text representations will default to `p2p`, but `ipfs` will + // still be supported + [421, V, 'ipfs'], + // `p2p` is the preferred name for 421, and is now the default + [421, V, 'p2p'], + [443, 0, 'https'], + [444, 96, 'onion'], + [445, 296, 'onion3'], + [446, V, 'garlic64'], + [460, 0, 'quic'], + [477, 0, 'ws'], + [478, 0, 'wss'], + [479, 0, 'p2p-websocket-star'], + [480, 0, 'http'], + [777, V, 'memory'] +] +/** @type {Record} */ +Protocols.names = {} +/** @type {Record} */ +Protocols.codes = {} + +// populate tables +Protocols.table.map(row => { + const proto = p.apply(null, row) + Protocols.codes[proto.code] = proto + Protocols.names[proto.name] = proto + return null +}) + +Protocols.object = p + +/** + * + * Create a protocol + * + * @param {number} code + * @param {number} size + * @param {string} name + * @param {any} [resolvable] + * @param {any} [path] + * @returns {Protocol} + */ +function p (code, size, name, resolvable, path) { + return { + code, + size, + name, + resolvable: Boolean(resolvable), + path: Boolean(path) + } +} + +module.exports = Protocols + + +/***/ }), + +/***/ 27914: +/***/ ((module) => { + +module.exports = read + +var MSB = 0x80 + , REST = 0x7F + +function read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length + + do { + if (counter >= l || shift > 49) { + read.bytes = 0 + throw new RangeError('Could not decode varint') + } + b = buf[counter++] + res += shift < 28 + ? (b & REST) << shift + : (b & REST) * Math.pow(2, shift) + shift += 7 + } while (b >= MSB) + + read.bytes = counter - offset + + return res +} + + +/***/ }), + +/***/ 95177: +/***/ ((module) => { + +module.exports = encode + +var MSB = 0x80 + , REST = 0x7F + , MSBALL = ~REST + , INT = Math.pow(2, 31) + +function encode(num, out, offset) { + if (Number.MAX_SAFE_INTEGER && num > Number.MAX_SAFE_INTEGER) { + encode.bytes = 0 + throw new RangeError('Could not encode varint') + } + out = out || [] + offset = offset || 0 + var oldOffset = offset + + while(num >= INT) { + out[offset++] = (num & 0xFF) | MSB + num /= 128 + } + while(num & MSBALL) { + out[offset++] = (num & 0xFF) | MSB + num >>>= 7 + } + out[offset] = num | 0 + + encode.bytes = offset - oldOffset + 1 + + return out +} + + +/***/ }), + +/***/ 9280: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + encode: __nccwpck_require__(95177) + , decode: __nccwpck_require__(27914) + , encodingLength: __nccwpck_require__(62841) +} + + +/***/ }), + +/***/ 62841: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +/** + * Collects all values from an (async) iterable into an array and returns it. + * + * @template T + * @param {AsyncIterable|Iterable} source + */ +const all = async (source) => { + const arr = [] + +<<<<<<< HEAD +======= + +/***/ }), + +/***/ 51949: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var BufferList = __nccwpck_require__(87455); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var BufferList__default = /*#__PURE__*/_interopDefaultLegacy(BufferList); + +async function* fixedSizeChunker(source, options) { + let bl = new BufferList__default["default"](); + let currentLength = 0; + let emitted = false; + const maxChunkSize = options.maxChunkSize; + for await (const buffer of source) { + bl.append(buffer); + currentLength += buffer.length; + while (currentLength >= maxChunkSize) { + yield bl.slice(0, maxChunkSize); + emitted = true; + if (maxChunkSize === bl.length) { + bl = new BufferList__default["default"](); + currentLength = 0; + } else { + const newBl = new BufferList__default["default"](); + newBl.append(bl.shallowSlice(maxChunkSize)); + bl = newBl; + currentLength -= maxChunkSize; + } + } + } + if (!emitted || currentLength) { + yield bl.slice(0, currentLength); + } +} + +module.exports = fixedSizeChunker; + + +/***/ }), + +/***/ 26682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var BufferList = __nccwpck_require__(87455); +var rabinWasm = __nccwpck_require__(41333); +var errCode = __nccwpck_require__(5822); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var BufferList__default = /*#__PURE__*/_interopDefaultLegacy(BufferList); +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +async function* rabinChunker(source, options) { + let min, max, avg; + if (options.minChunkSize && options.maxChunkSize && options.avgChunkSize) { + avg = options.avgChunkSize; + min = options.minChunkSize; + max = options.maxChunkSize; + } else if (!options.avgChunkSize) { + throw errCode__default["default"](new Error('please specify an average chunk size'), 'ERR_INVALID_AVG_CHUNK_SIZE'); + } else { + avg = options.avgChunkSize; + min = avg / 3; + max = avg + avg / 2; + } + if (min < 16) { + throw errCode__default["default"](new Error('rabin min must be greater than 16'), 'ERR_INVALID_MIN_CHUNK_SIZE'); + } + if (max < min) { + max = min; + } + if (avg < min) { + avg = min; + } + const sizepow = Math.floor(Math.log2(avg)); + for await (const chunk of rabin(source, { + min: min, + max: max, + bits: sizepow, + window: options.window, + polynomial: options.polynomial + })) { + yield chunk; + } +} +async function* rabin(source, options) { + const r = await rabinWasm.create(options.bits, options.min, options.max, options.window); + const buffers = new BufferList__default["default"](); + for await (const chunk of source) { + buffers.append(chunk); + const sizes = r.fingerprint(chunk); + for (let i = 0; i < sizes.length; i++) { + const size = sizes[i]; + const buf = buffers.slice(0, size); + buffers.consume(size); + yield buf; + } + } + if (buffers.length) { + yield buffers.slice(0); + } +} + +module.exports = rabinChunker; + + +/***/ }), + +/***/ 5662: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var ipfsUnixfs = __nccwpck_require__(24821); +var persist = __nccwpck_require__(57161); +var dagPb = __nccwpck_require__(72532); + +const dirBuilder = async (item, blockstore, options) => { + const unixfs = new ipfsUnixfs.UnixFS({ + type: 'directory', + mtime: item.mtime, + mode: item.mode + }); + const buffer = dagPb.encode(dagPb.prepare({ Data: unixfs.marshal() })); + const cid = await persist(buffer, blockstore, options); + const path = item.path; + return { + cid, + path, + unixfs, + size: buffer.length + }; +}; + +module.exports = dirBuilder; + + +/***/ }), + +/***/ 11011: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var batch = __nccwpck_require__(58611); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var batch__default = /*#__PURE__*/_interopDefaultLegacy(batch); + +function balanced(source, reduce, options) { + return reduceToParents(source, reduce, options); +} +async function reduceToParents(source, reduce, options) { + const roots = []; + for await (const chunked of batch__default["default"](source, options.maxChildrenPerNode)) { + roots.push(await reduce(chunked)); + } + if (roots.length > 1) { + return reduceToParents(roots, reduce, options); + } + return roots[0]; +} + +module.exports = balanced; + + +/***/ }), + +/***/ 96097: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var ipfsUnixfs = __nccwpck_require__(24821); +var persist = __nccwpck_require__(57161); +var dagPb = __nccwpck_require__(72532); +var rawCodec = __nccwpck_require__(4848); + +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } + }); + } + n["default"] = e; + return Object.freeze(n); +} + +var dagPb__namespace = /*#__PURE__*/_interopNamespace(dagPb); +var rawCodec__namespace = /*#__PURE__*/_interopNamespace(rawCodec); + +async function* bufferImporter(file, block, options) { + for await (let buffer of file.content) { + yield async () => { + options.progress(buffer.length, file.path); + let unixfs; + const opts = { + codec: dagPb__namespace, + cidVersion: options.cidVersion, + hasher: options.hasher, + onlyHash: options.onlyHash + }; + if (options.rawLeaves) { + opts.codec = rawCodec__namespace; + opts.cidVersion = 1; + } else { + unixfs = new ipfsUnixfs.UnixFS({ + type: options.leafType, + data: buffer + }); + buffer = dagPb__namespace.encode({ + Data: unixfs.marshal(), + Links: [] + }); + } + return { + cid: await persist(buffer, block, opts), + unixfs, + size: buffer.length + }; + }; + } +} + +module.exports = bufferImporter; + + +/***/ }), + +/***/ 84486: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var all = __nccwpck_require__(81172); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var all__default = /*#__PURE__*/_interopDefaultLegacy(all); + +async function flat(source, reduce) { + return reduce(await all__default["default"](source)); +} + +module.exports = flat; + + +/***/ }), + +/***/ 28484: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var errCode = __nccwpck_require__(5822); +var ipfsUnixfs = __nccwpck_require__(24821); +var persist = __nccwpck_require__(57161); +var dagPb = __nccwpck_require__(72532); +var parallelBatch = __nccwpck_require__(62898); +var rawCodec = __nccwpck_require__(4848); +var flat = __nccwpck_require__(84486); +var balanced = __nccwpck_require__(11011); +var trickle = __nccwpck_require__(27000); +var bufferImporter = __nccwpck_require__(96097); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } + }); + } + n["default"] = e; + return Object.freeze(n); +} + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); +var dagPb__namespace = /*#__PURE__*/_interopNamespace(dagPb); +var parallelBatch__default = /*#__PURE__*/_interopDefaultLegacy(parallelBatch); +var rawCodec__namespace = /*#__PURE__*/_interopNamespace(rawCodec); + +const dagBuilders = { + flat: flat, + balanced: balanced, + trickle: trickle +}; +async function* buildFileBatch(file, blockstore, options) { + let count = -1; + let previous; + let bufferImporter$1; + if (typeof options.bufferImporter === 'function') { + bufferImporter$1 = options.bufferImporter; + } else { + bufferImporter$1 = bufferImporter; + } + for await (const entry of parallelBatch__default["default"](bufferImporter$1(file, blockstore, options), options.blockWriteConcurrency)) { + count++; + if (count === 0) { + previous = entry; + continue; + } else if (count === 1 && previous) { + yield previous; + previous = null; + } + yield entry; + } + if (previous) { + previous.single = true; + yield previous; + } +} +const reduce = (file, blockstore, options) => { + async function reducer(leaves) { + if (leaves.length === 1 && leaves[0].single && options.reduceSingleLeafToSelf) { + const leaf = leaves[0]; + if (file.mtime !== undefined || file.mode !== undefined) { + let buffer = await blockstore.get(leaf.cid); + leaf.unixfs = new ipfsUnixfs.UnixFS({ + type: 'file', + mtime: file.mtime, + mode: file.mode, + data: buffer + }); + buffer = dagPb.encode(dagPb.prepare({ Data: leaf.unixfs.marshal() })); + leaf.cid = await persist(buffer, blockstore, { + ...options, + codec: dagPb__namespace, + hasher: options.hasher, + cidVersion: options.cidVersion + }); + leaf.size = buffer.length; + } + return { + cid: leaf.cid, + path: file.path, + unixfs: leaf.unixfs, + size: leaf.size + }; + } + const f = new ipfsUnixfs.UnixFS({ + type: 'file', + mtime: file.mtime, + mode: file.mode + }); + const links = leaves.filter(leaf => { + if (leaf.cid.code === rawCodec__namespace.code && leaf.size) { + return true; + } + if (leaf.unixfs && !leaf.unixfs.data && leaf.unixfs.fileSize()) { + return true; + } + return Boolean(leaf.unixfs && leaf.unixfs.data && leaf.unixfs.data.length); + }).map(leaf => { + if (leaf.cid.code === rawCodec__namespace.code) { + f.addBlockSize(leaf.size); + return { + Name: '', + Tsize: leaf.size, + Hash: leaf.cid + }; + } + if (!leaf.unixfs || !leaf.unixfs.data) { + f.addBlockSize(leaf.unixfs && leaf.unixfs.fileSize() || 0); + } else { + f.addBlockSize(leaf.unixfs.data.length); + } + return { + Name: '', + Tsize: leaf.size, + Hash: leaf.cid + }; + }); + const node = { + Data: f.marshal(), + Links: links + }; + const buffer = dagPb.encode(dagPb.prepare(node)); + const cid = await persist(buffer, blockstore, options); + return { + cid, + path: file.path, + unixfs: f, + size: buffer.length + node.Links.reduce((acc, curr) => acc + curr.Tsize, 0) + }; + } + return reducer; +}; +function fileBuilder(file, block, options) { + const dagBuilder = dagBuilders[options.strategy]; + if (!dagBuilder) { + throw errCode__default["default"](new Error(`Unknown importer build strategy name: ${ options.strategy }`), 'ERR_BAD_STRATEGY'); + } + return dagBuilder(buildFileBatch(file, block, options), reduce(file, block, options), options); +} + +module.exports = fileBuilder; + + +/***/ }), + +/***/ 27000: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var batch = __nccwpck_require__(58611); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var batch__default = /*#__PURE__*/_interopDefaultLegacy(batch); + +async function trickleStream(source, reduce, options) { + const root = new Root(options.layerRepeat); + let iteration = 0; + let maxDepth = 1; + let subTree = root; + for await (const layer of batch__default["default"](source, options.maxChildrenPerNode)) { + if (subTree.isFull()) { + if (subTree !== root) { + root.addChild(await subTree.reduce(reduce)); + } + if (iteration && iteration % options.layerRepeat === 0) { + maxDepth++; + } + subTree = new SubTree(maxDepth, options.layerRepeat, iteration); + iteration++; + } + subTree.append(layer); + } + if (subTree && subTree !== root) { + root.addChild(await subTree.reduce(reduce)); + } + return root.reduce(reduce); +} +class SubTree { + constructor(maxDepth, layerRepeat, iteration = 0) { + this.maxDepth = maxDepth; + this.layerRepeat = layerRepeat; + this.currentDepth = 1; + this.iteration = iteration; + this.root = this.node = this.parent = { + children: [], + depth: this.currentDepth, + maxDepth, + maxChildren: (this.maxDepth - this.currentDepth) * this.layerRepeat + }; + } + isFull() { + if (!this.root.data) { + return false; + } + if (this.currentDepth < this.maxDepth && this.node.maxChildren) { + this._addNextNodeToParent(this.node); + return false; + } + const distantRelative = this._findParent(this.node, this.currentDepth); + if (distantRelative) { + this._addNextNodeToParent(distantRelative); + return false; + } + return true; + } + _addNextNodeToParent(parent) { + this.parent = parent; + const nextNode = { + children: [], + depth: parent.depth + 1, + parent, + maxDepth: this.maxDepth, + maxChildren: Math.floor(parent.children.length / this.layerRepeat) * this.layerRepeat + }; + parent.children.push(nextNode); + this.currentDepth = nextNode.depth; + this.node = nextNode; + } + append(layer) { + this.node.data = layer; + } + reduce(reduce) { + return this._reduce(this.root, reduce); + } + async _reduce(node, reduce) { + let children = []; + if (node.children.length) { + children = await Promise.all(node.children.filter(child => child.data).map(child => this._reduce(child, reduce))); + } + return reduce((node.data || []).concat(children)); + } + _findParent(node, depth) { + const parent = node.parent; + if (!parent || parent.depth === 0) { + return; + } + if (parent.children.length === parent.maxChildren || !parent.maxChildren) { + return this._findParent(parent, depth); + } + return parent; + } +} +class Root extends SubTree { + constructor(layerRepeat) { + super(0, layerRepeat); + this.root.depth = 0; + this.currentDepth = 1; + } + addChild(child) { + this.root.children.push(child); + } + reduce(reduce) { + return reduce((this.root.data || []).concat(this.root.children)); + } +} + +module.exports = trickleStream; + + +/***/ }), + +/***/ 59929: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var dir = __nccwpck_require__(5662); +var index = __nccwpck_require__(28484); +var errCode = __nccwpck_require__(5822); +var rabin = __nccwpck_require__(26682); +var fixedSize = __nccwpck_require__(51949); +var validateChunks = __nccwpck_require__(1843); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +function isIterable(thing) { + return Symbol.iterator in thing; +} +function isAsyncIterable(thing) { + return Symbol.asyncIterator in thing; +} +function contentAsAsyncIterable(content) { + try { + if (content instanceof Uint8Array) { + return async function* () { + yield content; + }(); + } else if (isIterable(content)) { + return async function* () { + yield* content; + }(); + } else if (isAsyncIterable(content)) { + return content; + } + } catch { + throw errCode__default["default"](new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); + } + throw errCode__default["default"](new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); +} +async function* dagBuilder(source, blockstore, options) { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + for await (const entry of source) { + arr.push(entry) + } + + return arr +} + +module.exports = all + + +/***/ }), + +<<<<<<< HEAD +/***/ 95462: +======= +/***/ 1843: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const fs = (__nccwpck_require__(57147).promises) +const path = __nccwpck_require__(71017) +const minimatch = __nccwpck_require__(10771) +======= +var errCode = __nccwpck_require__(5822); +var fromString = __nccwpck_require__(39451); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errCode__default = /*#__PURE__*/_interopDefaultLegacy(errCode); + +async function* validateChunks(source) { + for await (const content of source) { + if (content.length === undefined) { + throw errCode__default["default"](new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); + } + if (typeof content === 'string' || content instanceof String) { + yield fromString.fromString(content.toString()); + } else if (Array.isArray(content)) { + yield Uint8Array.from(content); + } else if (content instanceof Uint8Array) { + yield content; + } else { + throw errCode__default["default"](new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); + } + } +} + +module.exports = validateChunks; + + +/***/ }), + +/***/ 22728: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var dagPb = __nccwpck_require__(72532); +var ipfsUnixfs = __nccwpck_require__(24821); +var dir = __nccwpck_require__(86803); +var persist = __nccwpck_require__(57161); + +class DirFlat extends dir { + constructor(props, options) { + super(props, options); + this._children = {}; + } + async put(name, value) { + this.cid = undefined; + this.size = undefined; + this._children[name] = value; + } + get(name) { + return Promise.resolve(this._children[name]); + } + childCount() { + return Object.keys(this._children).length; + } + directChildrenCount() { + return this.childCount(); + } + onlyChild() { + return this._children[Object.keys(this._children)[0]]; + } + async *eachChildSeries() { + const keys = Object.keys(this._children); + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + yield { + key: key, + child: this._children[key] + }; + } + } + async *flush(block) { + const children = Object.keys(this._children); + const links = []; + for (let i = 0; i < children.length; i++) { + let child = this._children[children[i]]; + if (child instanceof dir) { + for await (const entry of child.flush(block)) { + child = entry; + yield child; + } + } + if (child.size != null && child.cid) { + links.push({ + Name: children[i], + Tsize: child.size, + Hash: child.cid + }); + } + } + const unixfs = new ipfsUnixfs.UnixFS({ + type: 'directory', + mtime: this.mtime, + mode: this.mode + }); + const node = { + Data: unixfs.marshal(), + Links: links + }; + const buffer = dagPb.encode(dagPb.prepare(node)); + const cid = await persist(buffer, block, this.options); + const size = buffer.length + node.Links.reduce((acc, curr) => acc + (curr.Tsize == null ? 0 : curr.Tsize), 0); + this.cid = cid; + this.size = size; + yield { + cid, + unixfs, + path: this.path, + size + }; + } +} + +module.exports = DirFlat; + + +/***/ }), + +/***/ 9967: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var dagPb = __nccwpck_require__(72532); +var ipfsUnixfs = __nccwpck_require__(24821); +var dir = __nccwpck_require__(86803); +var persist = __nccwpck_require__(57161); +var hamtSharding = __nccwpck_require__(78338); + +class DirSharded extends dir { + constructor(props, options) { + super(props, options); + this._bucket = hamtSharding.createHAMT({ + hashFn: options.hamtHashFn, + bits: options.hamtBucketBits + }); + } + async put(name, value) { + await this._bucket.put(name, value); + } + get(name) { + return this._bucket.get(name); + } + childCount() { + return this._bucket.leafCount(); + } + directChildrenCount() { + return this._bucket.childrenCount(); + } + onlyChild() { + return this._bucket.onlyChild(); + } + async *eachChildSeries() { + for await (const {key, value} of this._bucket.eachLeafSeries()) { + yield { + key, + child: value + }; + } + } + async *flush(blockstore) { + for await (const entry of flush(this._bucket, blockstore, this, this.options)) { + yield { + ...entry, + path: this.path + }; + } + } +} +async function* flush(bucket, blockstore, shardRoot, options) { + const children = bucket._children; + const links = []; + let childrenSize = 0; + for (let i = 0; i < children.length; i++) { + const child = children.get(i); + if (!child) { + continue; + } + const labelPrefix = i.toString(16).toUpperCase().padStart(2, '0'); + if (child instanceof hamtSharding.Bucket) { + let shard; + for await (const subShard of await flush(child, blockstore, null, options)) { + shard = subShard; + } + if (!shard) { + throw new Error('Could not flush sharded directory, no subshard found'); + } + links.push({ + Name: labelPrefix, + Tsize: shard.size, + Hash: shard.cid + }); + childrenSize += shard.size; + } else if (typeof child.value.flush === 'function') { + const dir = child.value; + let flushedDir; + for await (const entry of dir.flush(blockstore)) { + flushedDir = entry; + yield flushedDir; + } + const label = labelPrefix + child.key; + links.push({ + Name: label, + Tsize: flushedDir.size, + Hash: flushedDir.cid + }); + childrenSize += flushedDir.size; + } else { + const value = child.value; + if (!value.cid) { + continue; + } + const label = labelPrefix + child.key; + const size = value.size; + links.push({ + Name: label, + Tsize: size, + Hash: value.cid + }); + childrenSize += size; + } + } + const data = Uint8Array.from(children.bitField().reverse()); + const dir = new ipfsUnixfs.UnixFS({ + type: 'hamt-sharded-directory', + data, + fanout: bucket.tableSize(), + hashType: options.hamtHashCode, + mtime: shardRoot && shardRoot.mtime, + mode: shardRoot && shardRoot.mode + }); + const node = { + Data: dir.marshal(), + Links: links + }; + const buffer = dagPb.encode(dagPb.prepare(node)); + const cid = await persist(buffer, blockstore, options); + const size = buffer.length + childrenSize; + yield { + cid, + unixfs: dir, + size + }; +} + +module.exports = DirSharded; + + +/***/ }), + +/***/ 86803: +/***/ ((module) => { + +"use strict"; + + +class Dir { + constructor(props, options) { + this.options = options || {}; + this.root = props.root; + this.dir = props.dir; + this.path = props.path; + this.dirty = props.dirty; + this.flat = props.flat; + this.parent = props.parent; + this.parentKey = props.parentKey; + this.unixfs = props.unixfs; + this.mode = props.mode; + this.mtime = props.mtime; + this.cid = undefined; + this.size = undefined; + } + async put(name, value) { + } + get(name) { + return Promise.resolve(this); + } + async *eachChildSeries() { + } + async *flush(blockstore) { + } +} + +module.exports = Dir; + + +/***/ }), + +/***/ 72095: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var dirSharded = __nccwpck_require__(9967); +var dirFlat = __nccwpck_require__(22728); + +async function flatToShard(child, dir, threshold, options) { + let newDir = dir; + if (dir instanceof dirFlat && dir.directChildrenCount() >= threshold) { + newDir = await convertToShard(dir, options); + } + const parent = newDir.parent; + if (parent) { + if (newDir !== dir) { + if (child) { + child.parent = newDir; + } + if (!newDir.parentKey) { + throw new Error('No parent key found'); + } + await parent.put(newDir.parentKey, newDir); + } + return flatToShard(newDir, parent, threshold, options); + } + return newDir; +} +async function convertToShard(oldDir, options) { + const newDir = new dirSharded({ + root: oldDir.root, + dir: true, + parent: oldDir.parent, + parentKey: oldDir.parentKey, + path: oldDir.path, + dirty: oldDir.dirty, + flat: false, + mtime: oldDir.mtime, + mode: oldDir.mode + }, options); + for await (const {key, child} of oldDir.eachChildSeries()) { + await newDir.put(key, child); + } + return newDir; +} + +module.exports = flatToShard; + + +/***/ }), + +/***/ 17512: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var parallelBatch = __nccwpck_require__(62898); +var options = __nccwpck_require__(91534); +var index = __nccwpck_require__(59929); +var treeBuilder = __nccwpck_require__(65599); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var parallelBatch__default = /*#__PURE__*/_interopDefaultLegacy(parallelBatch); + +async function* importer(source, blockstore, options$1 = {}) { + const opts = options(options$1); + let dagBuilder; + if (typeof options$1.dagBuilder === 'function') { + dagBuilder = options$1.dagBuilder; + } else { + dagBuilder = index; + } + let treeBuilder$1; + if (typeof options$1.treeBuilder === 'function') { + treeBuilder$1 = options$1.treeBuilder; + } else { + treeBuilder$1 = treeBuilder; + } + let candidates; + if (Symbol.asyncIterator in source || Symbol.iterator in source) { + candidates = source; + } else { + candidates = [source]; + } + for await (const entry of treeBuilder$1(parallelBatch__default["default"](dagBuilder(candidates, blockstore, opts), opts.fileImportConcurrency), blockstore, opts)) { + yield { + cid: entry.cid, + path: entry.path, + unixfs: entry.unixfs, + size: entry.size + }; + } +} + +exports.importer = importer; + + +/***/ }), + +/***/ 91534: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var mergeOptions = __nccwpck_require__(79139); +var sha2 = __nccwpck_require__(80960); +var murmur3 = __nccwpck_require__(17422); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var mergeOptions__default = /*#__PURE__*/_interopDefaultLegacy(mergeOptions); + +async function hamtHashFn(buf) { + return (await murmur3.murmur3128.encode(buf)).slice(0, 8).reverse(); +} +const defaultOptions = { + chunker: 'fixed', + strategy: 'balanced', + rawLeaves: false, + onlyHash: false, + reduceSingleLeafToSelf: true, + hasher: sha2.sha256, + leafType: 'file', + cidVersion: 0, + progress: () => () => { + }, + shardSplitThreshold: 1000, + fileImportConcurrency: 50, + blockWriteConcurrency: 10, + minChunkSize: 262144, + maxChunkSize: 262144, + avgChunkSize: 262144, + window: 16, + polynomial: 17437180132763652, + maxChildrenPerNode: 174, + layerRepeat: 4, + wrapWithDirectory: false, + recursive: false, + hidden: false, + timeout: undefined, + hamtHashFn, + hamtHashCode: 34, + hamtBucketBits: 8 +}; +var defaultOptions$1 = (options = {}) => { + const defaults = mergeOptions__default["default"].bind({ ignoreUndefined: true }); + return defaults(defaultOptions, options); +}; + +module.exports = defaultOptions$1; + + +/***/ }), + +/***/ 65599: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var dirFlat = __nccwpck_require__(22728); +var flatToShard = __nccwpck_require__(72095); +var dir = __nccwpck_require__(86803); +var toPathComponents = __nccwpck_require__(22931); + +async function addToTree(elem, tree, options) { + const pathElems = toPathComponents(elem.path || ''); + const lastIndex = pathElems.length - 1; + let parent = tree; + let currentPath = ''; + for (let i = 0; i < pathElems.length; i++) { + const pathElem = pathElems[i]; + currentPath += `${ currentPath ? '/' : '' }${ pathElem }`; + const last = i === lastIndex; + parent.dirty = true; + parent.cid = undefined; + parent.size = undefined; + if (last) { + await parent.put(pathElem, elem); + tree = await flatToShard(null, parent, options.shardSplitThreshold, options); + } else { + let dir$1 = await parent.get(pathElem); + if (!dir$1 || !(dir$1 instanceof dir)) { + dir$1 = new dirFlat({ + root: false, + dir: true, + parent: parent, + parentKey: pathElem, + path: currentPath, + dirty: true, + flat: true, + mtime: dir$1 && dir$1.unixfs && dir$1.unixfs.mtime, + mode: dir$1 && dir$1.unixfs && dir$1.unixfs.mode + }, options); + } + await parent.put(pathElem, dir$1); + parent = dir$1; + } + } + return tree; +} +async function* flushAndYield(tree, blockstore) { + if (!(tree instanceof dir)) { + if (tree && tree.unixfs && tree.unixfs.isDirectory()) { + yield tree; + } + return; + } + yield* tree.flush(blockstore); +} +async function* treeBuilder(source, block, options) { + let tree = new dirFlat({ + root: true, + dir: true, + path: '', + dirty: true, + flat: true + }, options); + for await (const entry of source) { + if (!entry) { + continue; + } + tree = await addToTree(entry, tree, options); + if (!entry.unixfs || !entry.unixfs.isDirectory()) { + yield entry; + } + } + if (options.wrapWithDirectory) { + yield* flushAndYield(tree, block); + } else { + for await (const unwrapped of tree.eachChildSeries()) { + if (!unwrapped) { + continue; + } + yield* flushAndYield(unwrapped.child, block); + } + } +} + +module.exports = treeBuilder; + + +/***/ }), + +/***/ 57161: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var cid = __nccwpck_require__(24247); +var dagPb = __nccwpck_require__(72532); +var sha2 = __nccwpck_require__(80960); + +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } + }); + } + n["default"] = e; + return Object.freeze(n); +} + +var dagPb__namespace = /*#__PURE__*/_interopNamespace(dagPb); + +const persist = async (buffer, blockstore, options) => { + if (!options.codec) { + options.codec = dagPb__namespace; + } + if (!options.hasher) { + options.hasher = sha2.sha256; + } + if (options.cidVersion === undefined) { + options.cidVersion = 1; + } + if (options.codec === dagPb__namespace && options.hasher !== sha2.sha256) { + options.cidVersion = 1; + } + const multihash = await options.hasher.digest(buffer); + const cid$1 = cid.CID.create(options.cidVersion, options.codec.code, multihash); + if (!options.onlyHash) { + await blockstore.put(cid$1, buffer, { signal: options.signal }); + } + return cid$1; +}; + +module.exports = persist; + + +/***/ }), + +/***/ 22931: +/***/ ((module) => { + +"use strict"; + + +const toPathComponents = (path = '') => { + return (path.trim().match(/([^\\/]|\\\/)+/g) || []).filter(Boolean); +}; + +module.exports = toPathComponents; + + +/***/ }), + +/***/ 24821: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var errcode = __nccwpck_require__(5822); +var unixfs = __nccwpck_require__(81422); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var errcode__default = /*#__PURE__*/_interopDefaultLegacy(errcode); + +const PBData = unixfs.Data; +const types = [ + 'raw', + 'directory', + 'file', + 'metadata', + 'symlink', + 'hamt-sharded-directory' +]; +const dirTypes = [ + 'directory', + 'hamt-sharded-directory' +]; +const DEFAULT_FILE_MODE = parseInt('0644', 8); +const DEFAULT_DIRECTORY_MODE = parseInt('0755', 8); +function parseMode(mode) { + if (mode == null) { + return undefined; + } + if (typeof mode === 'number') { + return mode & 4095; + } + mode = mode.toString(); + if (mode.substring(0, 1) === '0') { + return parseInt(mode, 8) & 4095; + } + return parseInt(mode, 10) & 4095; +} +function parseMtime(input) { + if (input == null) { + return undefined; + } + let mtime; + if (input.secs != null) { + mtime = { + secs: input.secs, + nsecs: input.nsecs + }; + } + if (input.Seconds != null) { + mtime = { + secs: input.Seconds, + nsecs: input.FractionalNanoseconds + }; + } + if (Array.isArray(input)) { + mtime = { + secs: input[0], + nsecs: input[1] + }; + } + if (input instanceof Date) { + const ms = input.getTime(); + const secs = Math.floor(ms / 1000); + mtime = { + secs: secs, + nsecs: (ms - secs * 1000) * 1000 + }; + } + if (!Object.prototype.hasOwnProperty.call(mtime, 'secs')) { + return undefined; + } + if (mtime != null && mtime.nsecs != null && (mtime.nsecs < 0 || mtime.nsecs > 999999999)) { + throw errcode__default['default'](new Error('mtime-nsecs must be within the range [0,999999999]'), 'ERR_INVALID_MTIME_NSECS'); + } + return mtime; +} +class UnixFS { + static unmarshal(marshaled) { + const message = PBData.decode(marshaled); + const decoded = PBData.toObject(message, { + defaults: false, + arrays: true, + longs: Number, + objects: false + }); + const data = new UnixFS({ + type: types[decoded.Type], + data: decoded.Data, + blockSizes: decoded.blocksizes, + mode: decoded.mode, + mtime: decoded.mtime ? { + secs: decoded.mtime.Seconds, + nsecs: decoded.mtime.FractionalNanoseconds + } : undefined + }); + data._originalMode = decoded.mode || 0; + return data; + } + constructor(options = { type: 'file' }) { + const {type, data, blockSizes, hashType, fanout, mtime, mode} = options; + if (type && !types.includes(type)) { + throw errcode__default['default'](new Error('Type: ' + type + ' is not valid'), 'ERR_INVALID_TYPE'); + } + this.type = type || 'file'; + this.data = data; + this.hashType = hashType; + this.fanout = fanout; + this.blockSizes = blockSizes || []; + this._originalMode = 0; + this.mode = parseMode(mode); + if (mtime) { + this.mtime = parseMtime(mtime); + if (this.mtime && !this.mtime.nsecs) { + this.mtime.nsecs = 0; + } + } + } + set mode(mode) { + this._mode = this.isDirectory() ? DEFAULT_DIRECTORY_MODE : DEFAULT_FILE_MODE; + const parsedMode = parseMode(mode); + if (parsedMode !== undefined) { + this._mode = parsedMode; + } + } + get mode() { + return this._mode; + } + isDirectory() { + return Boolean(this.type && dirTypes.includes(this.type)); + } + addBlockSize(size) { + this.blockSizes.push(size); + } + removeBlockSize(index) { + this.blockSizes.splice(index, 1); + } + fileSize() { + if (this.isDirectory()) { + return 0; + } + let sum = 0; + this.blockSizes.forEach(size => { + sum += size; + }); + if (this.data) { + sum += this.data.length; + } + return sum; + } + marshal() { + let type; + switch (this.type) { + case 'raw': + type = PBData.DataType.Raw; + break; + case 'directory': + type = PBData.DataType.Directory; + break; + case 'file': + type = PBData.DataType.File; + break; + case 'metadata': + type = PBData.DataType.Metadata; + break; + case 'symlink': + type = PBData.DataType.Symlink; + break; + case 'hamt-sharded-directory': + type = PBData.DataType.HAMTShard; + break; + default: + throw errcode__default['default'](new Error('Type: ' + type + ' is not valid'), 'ERR_INVALID_TYPE'); + } + let data = this.data; + if (!this.data || !this.data.length) { + data = undefined; + } + let mode; + if (this.mode != null) { + mode = this._originalMode & 4294963200 | (parseMode(this.mode) || 0); + if (mode === DEFAULT_FILE_MODE && !this.isDirectory()) { + mode = undefined; + } + if (mode === DEFAULT_DIRECTORY_MODE && this.isDirectory()) { + mode = undefined; + } + } + let mtime; + if (this.mtime != null) { + const parsed = parseMtime(this.mtime); + if (parsed) { + mtime = { + Seconds: parsed.secs, + FractionalNanoseconds: parsed.nsecs + }; + if (mtime.FractionalNanoseconds === 0) { + delete mtime.FractionalNanoseconds; + } + } + } + const pbData = { + Type: type, + Data: data, + filesize: this.isDirectory() ? undefined : this.fileSize(), + blocksizes: this.blockSizes, + hashType: this.hashType, + fanout: this.fanout, + mode, + mtime + }; + return PBData.encode(pbData).finish(); + } +} + +exports.UnixFS = UnixFS; +exports.parseMode = parseMode; +exports.parseMtime = parseMtime; + + +/***/ }), + +/***/ 81422: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var $protobuf = __nccwpck_require__(63616); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var $protobuf__default = /*#__PURE__*/_interopDefaultLegacy($protobuf); + +const $Reader = $protobuf__default['default'].Reader, $Writer = $protobuf__default['default'].Writer, $util = $protobuf__default['default'].util; +const $root = $protobuf__default['default'].roots['ipfs-unixfs'] || ($protobuf__default['default'].roots['ipfs-unixfs'] = {}); +const Data = $root.Data = (() => { + function Data(p) { + this.blocksizes = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) + this[ks[i]] = p[ks[i]]; + } + Data.prototype.Type = 0; + Data.prototype.Data = $util.newBuffer([]); + Data.prototype.filesize = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + Data.prototype.blocksizes = $util.emptyArray; + Data.prototype.hashType = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + Data.prototype.fanout = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + Data.prototype.mode = 0; + Data.prototype.mtime = null; + Data.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + w.uint32(8).int32(m.Type); + if (m.Data != null && Object.hasOwnProperty.call(m, 'Data')) + w.uint32(18).bytes(m.Data); + if (m.filesize != null && Object.hasOwnProperty.call(m, 'filesize')) + w.uint32(24).uint64(m.filesize); + if (m.blocksizes != null && m.blocksizes.length) { + for (var i = 0; i < m.blocksizes.length; ++i) + w.uint32(32).uint64(m.blocksizes[i]); + } + if (m.hashType != null && Object.hasOwnProperty.call(m, 'hashType')) + w.uint32(40).uint64(m.hashType); + if (m.fanout != null && Object.hasOwnProperty.call(m, 'fanout')) + w.uint32(48).uint64(m.fanout); + if (m.mode != null && Object.hasOwnProperty.call(m, 'mode')) + w.uint32(56).uint32(m.mode); + if (m.mtime != null && Object.hasOwnProperty.call(m, 'mtime')) + $root.UnixTime.encode(m.mtime, w.uint32(66).fork()).ldelim(); + return w; + }; + Data.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.Data(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.Type = r.int32(); + break; + case 2: + m.Data = r.bytes(); + break; + case 3: + m.filesize = r.uint64(); + break; + case 4: + if (!(m.blocksizes && m.blocksizes.length)) + m.blocksizes = []; + if ((t & 7) === 2) { + var c2 = r.uint32() + r.pos; + while (r.pos < c2) + m.blocksizes.push(r.uint64()); + } else + m.blocksizes.push(r.uint64()); + break; + case 5: + m.hashType = r.uint64(); + break; + case 6: + m.fanout = r.uint64(); + break; + case 7: + m.mode = r.uint32(); + break; + case 8: + m.mtime = $root.UnixTime.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + if (!m.hasOwnProperty('Type')) + throw $util.ProtocolError('missing required \'Type\'', { instance: m }); + return m; + }; + Data.fromObject = function fromObject(d) { + if (d instanceof $root.Data) + return d; + var m = new $root.Data(); + switch (d.Type) { + case 'Raw': + case 0: + m.Type = 0; + break; + case 'Directory': + case 1: + m.Type = 1; + break; + case 'File': + case 2: + m.Type = 2; + break; + case 'Metadata': + case 3: + m.Type = 3; + break; + case 'Symlink': + case 4: + m.Type = 4; + break; + case 'HAMTShard': + case 5: + m.Type = 5; + break; + } + if (d.Data != null) { + if (typeof d.Data === 'string') + $util.base64.decode(d.Data, m.Data = $util.newBuffer($util.base64.length(d.Data)), 0); + else if (d.Data.length) + m.Data = d.Data; + } + if (d.filesize != null) { + if ($util.Long) + (m.filesize = $util.Long.fromValue(d.filesize)).unsigned = true; + else if (typeof d.filesize === 'string') + m.filesize = parseInt(d.filesize, 10); + else if (typeof d.filesize === 'number') + m.filesize = d.filesize; + else if (typeof d.filesize === 'object') + m.filesize = new $util.LongBits(d.filesize.low >>> 0, d.filesize.high >>> 0).toNumber(true); + } + if (d.blocksizes) { + if (!Array.isArray(d.blocksizes)) + throw TypeError('.Data.blocksizes: array expected'); + m.blocksizes = []; + for (var i = 0; i < d.blocksizes.length; ++i) { + if ($util.Long) + (m.blocksizes[i] = $util.Long.fromValue(d.blocksizes[i])).unsigned = true; + else if (typeof d.blocksizes[i] === 'string') + m.blocksizes[i] = parseInt(d.blocksizes[i], 10); + else if (typeof d.blocksizes[i] === 'number') + m.blocksizes[i] = d.blocksizes[i]; + else if (typeof d.blocksizes[i] === 'object') + m.blocksizes[i] = new $util.LongBits(d.blocksizes[i].low >>> 0, d.blocksizes[i].high >>> 0).toNumber(true); + } + } + if (d.hashType != null) { + if ($util.Long) + (m.hashType = $util.Long.fromValue(d.hashType)).unsigned = true; + else if (typeof d.hashType === 'string') + m.hashType = parseInt(d.hashType, 10); + else if (typeof d.hashType === 'number') + m.hashType = d.hashType; + else if (typeof d.hashType === 'object') + m.hashType = new $util.LongBits(d.hashType.low >>> 0, d.hashType.high >>> 0).toNumber(true); + } + if (d.fanout != null) { + if ($util.Long) + (m.fanout = $util.Long.fromValue(d.fanout)).unsigned = true; + else if (typeof d.fanout === 'string') + m.fanout = parseInt(d.fanout, 10); + else if (typeof d.fanout === 'number') + m.fanout = d.fanout; + else if (typeof d.fanout === 'object') + m.fanout = new $util.LongBits(d.fanout.low >>> 0, d.fanout.high >>> 0).toNumber(true); + } + if (d.mode != null) { + m.mode = d.mode >>> 0; + } + if (d.mtime != null) { + if (typeof d.mtime !== 'object') + throw TypeError('.Data.mtime: object expected'); + m.mtime = $root.UnixTime.fromObject(d.mtime); + } + return m; + }; + Data.toObject = function toObject(m, o) { + if (!o) + o = {}; + var d = {}; + if (o.arrays || o.defaults) { + d.blocksizes = []; + } + if (o.defaults) { + d.Type = o.enums === String ? 'Raw' : 0; + if (o.bytes === String) + d.Data = ''; + else { + d.Data = []; + if (o.bytes !== Array) + d.Data = $util.newBuffer(d.Data); + } + if ($util.Long) { + var n = new $util.Long(0, 0, true); + d.filesize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; + } else + d.filesize = o.longs === String ? '0' : 0; + if ($util.Long) { + var n = new $util.Long(0, 0, true); + d.hashType = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; + } else + d.hashType = o.longs === String ? '0' : 0; + if ($util.Long) { + var n = new $util.Long(0, 0, true); + d.fanout = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; + } else + d.fanout = o.longs === String ? '0' : 0; + d.mode = 0; + d.mtime = null; + } + if (m.Type != null && m.hasOwnProperty('Type')) { + d.Type = o.enums === String ? $root.Data.DataType[m.Type] : m.Type; + } + if (m.Data != null && m.hasOwnProperty('Data')) { + d.Data = o.bytes === String ? $util.base64.encode(m.Data, 0, m.Data.length) : o.bytes === Array ? Array.prototype.slice.call(m.Data) : m.Data; + } + if (m.filesize != null && m.hasOwnProperty('filesize')) { + if (typeof m.filesize === 'number') + d.filesize = o.longs === String ? String(m.filesize) : m.filesize; + else + d.filesize = o.longs === String ? $util.Long.prototype.toString.call(m.filesize) : o.longs === Number ? new $util.LongBits(m.filesize.low >>> 0, m.filesize.high >>> 0).toNumber(true) : m.filesize; + } + if (m.blocksizes && m.blocksizes.length) { + d.blocksizes = []; + for (var j = 0; j < m.blocksizes.length; ++j) { + if (typeof m.blocksizes[j] === 'number') + d.blocksizes[j] = o.longs === String ? String(m.blocksizes[j]) : m.blocksizes[j]; + else + d.blocksizes[j] = o.longs === String ? $util.Long.prototype.toString.call(m.blocksizes[j]) : o.longs === Number ? new $util.LongBits(m.blocksizes[j].low >>> 0, m.blocksizes[j].high >>> 0).toNumber(true) : m.blocksizes[j]; + } + } + if (m.hashType != null && m.hasOwnProperty('hashType')) { + if (typeof m.hashType === 'number') + d.hashType = o.longs === String ? String(m.hashType) : m.hashType; + else + d.hashType = o.longs === String ? $util.Long.prototype.toString.call(m.hashType) : o.longs === Number ? new $util.LongBits(m.hashType.low >>> 0, m.hashType.high >>> 0).toNumber(true) : m.hashType; + } + if (m.fanout != null && m.hasOwnProperty('fanout')) { + if (typeof m.fanout === 'number') + d.fanout = o.longs === String ? String(m.fanout) : m.fanout; + else + d.fanout = o.longs === String ? $util.Long.prototype.toString.call(m.fanout) : o.longs === Number ? new $util.LongBits(m.fanout.low >>> 0, m.fanout.high >>> 0).toNumber(true) : m.fanout; + } + if (m.mode != null && m.hasOwnProperty('mode')) { + d.mode = m.mode; + } + if (m.mtime != null && m.hasOwnProperty('mtime')) { + d.mtime = $root.UnixTime.toObject(m.mtime, o); + } + return d; + }; + Data.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf__default['default'].util.toJSONOptions); + }; + Data.DataType = function () { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = 'Raw'] = 0; + values[valuesById[1] = 'Directory'] = 1; + values[valuesById[2] = 'File'] = 2; + values[valuesById[3] = 'Metadata'] = 3; + values[valuesById[4] = 'Symlink'] = 4; + values[valuesById[5] = 'HAMTShard'] = 5; + return values; + }(); + return Data; +})(); +const UnixTime = $root.UnixTime = (() => { + function UnixTime(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) + this[ks[i]] = p[ks[i]]; + } + UnixTime.prototype.Seconds = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; + UnixTime.prototype.FractionalNanoseconds = 0; + UnixTime.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + w.uint32(8).int64(m.Seconds); + if (m.FractionalNanoseconds != null && Object.hasOwnProperty.call(m, 'FractionalNanoseconds')) + w.uint32(21).fixed32(m.FractionalNanoseconds); + return w; + }; + UnixTime.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.UnixTime(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.Seconds = r.int64(); + break; + case 2: + m.FractionalNanoseconds = r.fixed32(); + break; + default: + r.skipType(t & 7); + break; + } + } + if (!m.hasOwnProperty('Seconds')) + throw $util.ProtocolError('missing required \'Seconds\'', { instance: m }); + return m; + }; + UnixTime.fromObject = function fromObject(d) { + if (d instanceof $root.UnixTime) + return d; + var m = new $root.UnixTime(); + if (d.Seconds != null) { + if ($util.Long) + (m.Seconds = $util.Long.fromValue(d.Seconds)).unsigned = false; + else if (typeof d.Seconds === 'string') + m.Seconds = parseInt(d.Seconds, 10); + else if (typeof d.Seconds === 'number') + m.Seconds = d.Seconds; + else if (typeof d.Seconds === 'object') + m.Seconds = new $util.LongBits(d.Seconds.low >>> 0, d.Seconds.high >>> 0).toNumber(); + } + if (d.FractionalNanoseconds != null) { + m.FractionalNanoseconds = d.FractionalNanoseconds >>> 0; + } + return m; + }; + UnixTime.toObject = function toObject(m, o) { + if (!o) + o = {}; + var d = {}; + if (o.defaults) { + if ($util.Long) { + var n = new $util.Long(0, 0, false); + d.Seconds = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; + } else + d.Seconds = o.longs === String ? '0' : 0; + d.FractionalNanoseconds = 0; + } + if (m.Seconds != null && m.hasOwnProperty('Seconds')) { + if (typeof m.Seconds === 'number') + d.Seconds = o.longs === String ? String(m.Seconds) : m.Seconds; + else + d.Seconds = o.longs === String ? $util.Long.prototype.toString.call(m.Seconds) : o.longs === Number ? new $util.LongBits(m.Seconds.low >>> 0, m.Seconds.high >>> 0).toNumber() : m.Seconds; + } + if (m.FractionalNanoseconds != null && m.hasOwnProperty('FractionalNanoseconds')) { + d.FractionalNanoseconds = m.FractionalNanoseconds; + } + return d; + }; + UnixTime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf__default['default'].util.toJSONOptions); + }; + return UnixTime; +})(); +const Metadata = $root.Metadata = (() => { + function Metadata(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) + this[ks[i]] = p[ks[i]]; + } + Metadata.prototype.MimeType = ''; + Metadata.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.MimeType != null && Object.hasOwnProperty.call(m, 'MimeType')) + w.uint32(10).string(m.MimeType); + return w; + }; + Metadata.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.Metadata(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.MimeType = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + Metadata.fromObject = function fromObject(d) { + if (d instanceof $root.Metadata) + return d; + var m = new $root.Metadata(); + if (d.MimeType != null) { + m.MimeType = String(d.MimeType); + } + return m; + }; + Metadata.toObject = function toObject(m, o) { + if (!o) + o = {}; + var d = {}; + if (o.defaults) { + d.MimeType = ''; + } + if (m.MimeType != null && m.hasOwnProperty('MimeType')) { + d.MimeType = m.MimeType; + } + return d; + }; + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf__default['default'].util.toJSONOptions); + }; + return Metadata; +})(); + +exports.Data = Data; +exports.Metadata = Metadata; +exports.UnixTime = UnixTime; +exports["default"] = $root; + + +/***/ }), + +/***/ 58529: +/***/ ((module) => { + +const { AbortController } = globalThis +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * @typedef {string} Glob + * @typedef {object} OptionsExt + * @property {string} [cwd=process.cwd()] + * @property {boolean} [absolute=false] - If true produces absolute paths + * @property {boolean} [nodir] - If true yields file paths and skip directories + * + * @typedef {OptionsExt & minimatch.IOptions} Options + */ + +/** + * Async iterable filename pattern matcher + * + * @param {string} dir + * @param {string} pattern + * @param {Options} [options] + * @returns {AsyncIterable} + */ +async function * glob (dir, pattern, options = {}) { + const absoluteDir = path.resolve(dir) + const relativeDir = path.relative(options.cwd || process.cwd(), dir) + + const stats = await fs.stat(absoluteDir) + + if (stats.isDirectory()) { + for await (const entry of _glob(absoluteDir, '', pattern, options)) { + yield entry + } + + return + } + + if (minimatch(relativeDir, pattern, options)) { + yield options.absolute ? absoluteDir : relativeDir + } +} + +/** + * @param {string} base + * @param {string} dir + * @param {Glob} pattern + * @param {Options} options + * @returns {AsyncIterable} + */ +async function * _glob (base, dir, pattern, options) { + for await (const entry of await fs.opendir(path.join(base, dir))) { + const relativeEntryPath = path.join(dir, entry.name) + const absoluteEntryPath = path.join(base, dir, entry.name) + + let match = minimatch(relativeEntryPath, pattern, options) + + const isDirectory = entry.isDirectory() + + if (isDirectory && options.nodir) { + match = false + } + + if (match) { + yield options.absolute ? absoluteEntryPath : relativeEntryPath + } + + if (isDirectory) { + yield * _glob(base, relativeEntryPath, pattern, options) + } + } +} + +module.exports = glob + + +/***/ }), + +<<<<<<< HEAD +/***/ 75062: +======= +/***/ 48488: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +<<<<<<< HEAD +const isElectron = __nccwpck_require__(53957) +======= +const isElectron = __nccwpck_require__(78002) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const IS_ENV_WITH_DOM = typeof window === 'object' && typeof document === 'object' && document.nodeType === 9 +// @ts-ignore +const IS_ELECTRON = isElectron() +const IS_BROWSER = IS_ENV_WITH_DOM && !IS_ELECTRON +const IS_ELECTRON_MAIN = IS_ELECTRON && !IS_ENV_WITH_DOM +const IS_ELECTRON_RENDERER = IS_ELECTRON && IS_ENV_WITH_DOM +const IS_NODE = true && typeof process !== 'undefined' && typeof process.release !== 'undefined' && process.release.name === 'node' && !IS_ELECTRON +// @ts-ignore - we either ignore worker scope or dom scope +const IS_WEBWORKER = typeof importScripts === 'function' && typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope +const IS_TEST = typeof process !== 'undefined' && typeof process.env !== 'undefined' && process.env.NODE_ENV === 'test' +const IS_REACT_NATIVE = typeof navigator !== 'undefined' && navigator.product === 'ReactNative' + +module.exports = { + isTest: IS_TEST, + isElectron: IS_ELECTRON, + isElectronMain: IS_ELECTRON_MAIN, + isElectronRenderer: IS_ELECTRON_RENDERER, + isNode: IS_NODE, + /** + * Detects browser main thread **NOT** web worker or service worker + */ + isBrowser: IS_BROWSER, + isWebWorker: IS_WEBWORKER, + isEnvWithDom: IS_ENV_WITH_DOM, + isReactNative: IS_REACT_NATIVE +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 98396: +======= +/***/ 48448: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +/** + * @typedef {globalThis.Headers} Headers + * @typedef {globalThis.Request} Request + * @typedef {globalThis.Response} Response + */ + +const { isElectronMain } = __nccwpck_require__(75062) + +// use window.fetch if it is available, fall back to node-fetch if not +let impl = 'native-fetch' + +if (isElectronMain) { + impl = 'electron-fetch' +======= +const { isElectronMain } = __nccwpck_require__(48488) + +if (isElectronMain) { + module.exports = __nccwpck_require__(8281) +} else { +// use window.fetch if it is available, fall back to node-fetch if not + module.exports = __nccwpck_require__(96357) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +} + +module.exports = __nccwpck_require__(37647) + + +/***/ }), + +<<<<<<< HEAD +/***/ 83447: +======= +/***/ 23905: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const fsp = (__nccwpck_require__(57147).promises) +const fs = __nccwpck_require__(57147) +<<<<<<< HEAD +const glob = __nccwpck_require__(95462) +const Path = __nccwpck_require__(71017) +const errCode = __nccwpck_require__(22077) +======= +const glob = __nccwpck_require__(3332) +const Path = __nccwpck_require__(71017) +const errCode = __nccwpck_require__(5822) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * Create an async iterator that yields paths that match requested glob pattern + * + * @param {string} cwd - The directory to start matching the pattern in + * @param {string} pattern - Glob pattern to match + * @param {import('../types').GlobSourceOptions} [options] - Optional options + * @returns {AsyncGenerator} File objects that match glob + */ +module.exports = async function * globSource (cwd, pattern, options) { + options = options || {} + + if (typeof pattern !== 'string') { + throw errCode( + new Error('Pattern must be a string'), + 'ERR_INVALID_PATH', + { pattern } + ) + } + + if (!Path.isAbsolute(cwd)) { + cwd = Path.resolve(process.cwd(), cwd) + } + + const globOptions = Object.assign({}, { + nodir: false, + realpath: false, + absolute: true, + dot: Boolean(options.hidden), + follow: options.followSymlinks != null ? options.followSymlinks : true + }) + + for await (const p of glob(cwd, pattern, globOptions)) { + const stat = await fsp.stat(p) + + let mode = options.mode + + if (options.preserveMode) { + mode = stat.mode + } + + let mtime = options.mtime + + if (options.preserveMtime) { + mtime = stat.mtime + } + + yield { + path: toPosix(p.replace(cwd, '')), + content: stat.isFile() ? fs.createReadStream(p) : undefined, + mode, + mtime + } + } +} + +/** + * @param {string} path + */ +const toPosix = path => path.replace(/\\/g, '/') + + +/***/ }), + +<<<<<<< HEAD +/***/ 6846: +======= +/***/ 74676: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const HTTP = __nccwpck_require__(8530) +======= +const HTTP = __nccwpck_require__(24335) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * + * @param {string} url + * @param {import("../types").HTTPOptions} [options] + * @returns {{ path: string; content?: AsyncIterable }} + */ +const urlSource = (url, options) => { + return { + path: decodeURIComponent(new URL(url).pathname.split('/').pop() || ''), + content: readURLContent(url, options) + } +} + +/** + * + * @param {string} url + * @param {import("../types").HTTPOptions} [options] + * @returns {AsyncIterable} + */ +async function * readURLContent (url, options) { + const http = new HTTP() + const response = await http.get(url, options) + + yield * response.iterator() +} + +module.exports = urlSource + + +/***/ }), + +<<<<<<< HEAD +/***/ 8530: +======= +/***/ 24335: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable no-undef */ + + +<<<<<<< HEAD +const { fetch, Request, Headers } = __nccwpck_require__(3658) +const { TimeoutError, HTTPError } = __nccwpck_require__(65654) +const merge = (__nccwpck_require__(67270).bind)({ ignoreUndefined: true }) +const { URL, URLSearchParams } = __nccwpck_require__(3728) +const anySignal = __nccwpck_require__(28332) +const browserReableStreamToIt = __nccwpck_require__(59759) +const { isBrowser, isWebWorker } = __nccwpck_require__(75062) +const all = __nccwpck_require__(72871) +======= +const { fetch, Request, Headers } = __nccwpck_require__(12302) +const { TimeoutError, HTTPError } = __nccwpck_require__(56330) +const merge = (__nccwpck_require__(79139).bind)({ ignoreUndefined: true }) +const { URL, URLSearchParams } = __nccwpck_require__(2003) +const anySignal = __nccwpck_require__(58529) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * @typedef {import('stream').Readable} NodeReadableStream + * @typedef {import('./types').HTTPOptions} HTTPOptions + * @typedef {import('./types').ExtendedResponse} ExtendedResponse + */ + +/** + * @template TResponse + * @param {Promise} promise + * @param {number | undefined} ms + * @param {AbortController} abortController + * @returns {Promise} + */ +const timeout = (promise, ms, abortController) => { + if (ms === undefined) { + return promise + } + + const start = Date.now() + + const timedOut = () => { + const time = Date.now() - start + + return time >= ms + } + + return new Promise((resolve, reject) => { + const timeoutID = setTimeout(() => { + if (timedOut()) { + reject(new TimeoutError()) + abortController.abort() + } + }, ms) + + /** + * @param {(value: any) => void } next + */ + const after = (next) => { + /** + * @param {any} res + */ + const fn = (res) => { + clearTimeout(timeoutID) + + if (timedOut()) { + reject(new TimeoutError()) + return + } + + next(res) + } + return fn + } + + promise + .then(after(resolve), after(reject)) + }) +} + +const defaults = { + throwHttpErrors: true, + credentials: 'same-origin' +} + +class HTTP { + /** + * + * @param {HTTPOptions} options + */ + constructor (options = {}) { + /** @type {HTTPOptions} */ + this.opts = merge(defaults, options) + } + + /** + * Fetch + * + * @param {string | Request} resource + * @param {HTTPOptions} options + * @returns {Promise} + */ + async fetch (resource, options = {}) { + /** @type {HTTPOptions} */ + const opts = merge(this.opts, options) + // @ts-expect-error + const headers = new Headers(opts.headers) + + // validate resource type + // @ts-expect-error + if (typeof resource !== 'string' && !(resource instanceof URL || resource instanceof Request)) { + throw new TypeError('`resource` must be a string, URL, or Request') + } + + const url = new URL(resource.toString(), opts.base) + + const { + searchParams, + transformSearchParams, + json + } = opts + + if (searchParams) { + if (typeof transformSearchParams === 'function') { + // @ts-ignore + url.search = transformSearchParams(new URLSearchParams(opts.searchParams)) + } else { + // @ts-ignore + url.search = new URLSearchParams(opts.searchParams) + } + } + + if (json) { + opts.body = JSON.stringify(opts.json) + headers.set('content-type', 'application/json') + } + + const abortController = new AbortController() + // @ts-ignore + const signal = anySignal([abortController.signal, opts.signal]) + + if (globalThis.ReadableStream != null && opts.body instanceof globalThis.ReadableStream && (isBrowser || isWebWorker)) { + // https://bugzilla.mozilla.org/show_bug.cgi?id=1387483 + opts.body = new Blob(await all(browserReableStreamToIt(opts.body))) + } + + /** @type {ExtendedResponse} */ + // @ts-expect-error additional fields are assigned below + const response = await timeout( + fetch( + url.toString(), + { + ...opts, + signal, + // @ts-expect-error non-browser fetch implementations may take extra options + timeout: undefined, + headers, + + // https://fetch.spec.whatwg.org/#dom-requestinit-duplex + // https://github.com/whatwg/fetch/issues/1254 + duplex: 'half' + } + ), + opts.timeout, + abortController + ) + + if (!response.ok && opts.throwHttpErrors) { + if (opts.handleError) { + await opts.handleError(response) + } + throw new HTTPError(response) + } + + response.iterator = async function * () { + yield * fromStream(response.body) + } + + response.ndjson = async function * () { + for await (const chunk of ndjson(response.iterator())) { + if (options.transform) { + yield options.transform(chunk) + } else { + yield chunk + } + } + } + + return response + } + + /** + * @param {string | Request} resource + * @param {HTTPOptions} options + */ + post (resource, options = {}) { + return this.fetch(resource, { ...options, method: 'POST' }) + } + + /** + * @param {string | Request} resource + * @param {HTTPOptions} options + */ + get (resource, options = {}) { + return this.fetch(resource, { ...options, method: 'GET' }) + } + + /** + * @param {string | Request} resource + * @param {HTTPOptions} options + */ + put (resource, options = {}) { + return this.fetch(resource, { ...options, method: 'PUT' }) + } + + /** + * @param {string | Request} resource + * @param {HTTPOptions} options + */ + delete (resource, options = {}) { + return this.fetch(resource, { ...options, method: 'DELETE' }) + } + + /** + * @param {string | Request} resource + * @param {HTTPOptions} options + */ + options (resource, options = {}) { + return this.fetch(resource, { ...options, method: 'OPTIONS' }) + } +} + +/** + * Parses NDJSON chunks from an iterator + * + * @param {AsyncIterable} source + * @returns {AsyncIterable} + */ +const ndjson = async function * (source) { + const decoder = new TextDecoder() + let buf = '' + + for await (const chunk of source) { + buf += decoder.decode(chunk, { stream: true }) + const lines = buf.split(/\r?\n/) + + for (let i = 0; i < lines.length - 1; i++) { + const l = lines[i].trim() + if (l.length > 0) { + yield JSON.parse(l) + } + } + buf = lines[lines.length - 1] + } + buf += decoder.decode() + buf = buf.trim() + if (buf.length !== 0) { + yield JSON.parse(buf) + } +} + +/** + * Stream to AsyncIterable + * + * @template TChunk + * @param {ReadableStream | NodeReadableStream | null} source + * @returns {AsyncIterable} + */ +const fromStream = (source) => { + if (isAsyncIterable(source)) { + return source + } + + // Workaround for https://github.com/node-fetch/node-fetch/issues/766 + if (isNodeReadableStream(source)) { + const iter = source[Symbol.asyncIterator]() + return { + [Symbol.asyncIterator] () { + return { + next: iter.next.bind(iter), + return (value) { + source.destroy() + if (typeof iter.return === 'function') { + return iter.return() + } + return Promise.resolve({ done: true, value }) + } + } + } + } + } + + if (isWebReadableStream(source)) { + const reader = source.getReader() + return (async function * () { + try { + while (true) { + // Read from the stream + const { done, value } = await reader.read() + // Exit if we're done + if (done) return + // Else yield the chunk + if (value) { + yield value + } + } + } finally { + reader.releaseLock() + } + })() + } + + throw new TypeError('Body can\'t be converted to AsyncIterable') +} + +/** + * Check if it's an AsyncIterable + * + * @template {unknown} TChunk + * @template {any} Other + * @param {Other|AsyncIterable} value + * @returns {value is AsyncIterable} + */ +const isAsyncIterable = (value) => { + return typeof value === 'object' && + value !== null && + typeof /** @type {any} */(value)[Symbol.asyncIterator] === 'function' +} + +/** + * Check for web readable stream + * + * @template {unknown} TChunk + * @template {any} Other + * @param {Other|ReadableStream} value + * @returns {value is ReadableStream} + */ +const isWebReadableStream = (value) => { + return value && typeof /** @type {any} */(value).getReader === 'function' +} + +/** + * @param {any} value + * @returns {value is NodeReadableStream} + */ +const isNodeReadableStream = (value) => + Object.prototype.hasOwnProperty.call(value, 'readable') && + Object.prototype.hasOwnProperty.call(value, 'writable') + +HTTP.HTTPError = HTTPError +HTTP.TimeoutError = TimeoutError +HTTP.streamToAsyncIterator = fromStream + +/** + * @param {string | Request} resource + * @param {HTTPOptions} [options] + */ +HTTP.post = (resource, options) => new HTTP(options).post(resource, options) + +/** + * @param {string | Request} resource + * @param {HTTPOptions} [options] + */ +HTTP.get = (resource, options) => new HTTP(options).get(resource, options) + +/** + * @param {string | Request} resource + * @param {HTTPOptions} [options] + */ +HTTP.put = (resource, options) => new HTTP(options).put(resource, options) + +/** + * @param {string | Request} resource + * @param {HTTPOptions} [options] + */ +HTTP.delete = (resource, options) => new HTTP(options).delete(resource, options) + +/** + * @param {string | Request} resource + * @param {HTTPOptions} [options] + */ +HTTP.options = (resource, options) => new HTTP(options).options(resource, options) + +module.exports = HTTP + + +/***/ }), + +<<<<<<< HEAD +/***/ 65654: +======= +/***/ 56330: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +class TimeoutError extends Error { + constructor (message = 'Request timed out') { + super(message) + this.name = 'TimeoutError' + } +} +exports.TimeoutError = TimeoutError + +class AbortError extends Error { + constructor (message = 'The operation was aborted.') { + super(message) + this.name = 'AbortError' + } +} +exports.AbortError = AbortError + +class HTTPError extends Error { + /** + * @param {Response} response + */ + constructor (response) { + super(response.statusText) + this.name = 'HTTPError' + this.response = response + } +} +exports.HTTPError = HTTPError + + +/***/ }), + +<<<<<<< HEAD +/***/ 2885: +======= +/***/ 97355: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const { TimeoutError, AbortError } = __nccwpck_require__(65654) +// @ts-expect-error +const { Response, Request, Headers, default: fetch } = __nccwpck_require__(98396) +======= +const { TimeoutError, AbortError } = __nccwpck_require__(56330) +const { Response, Request, Headers, default: fetch } = __nccwpck_require__(48448) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * @typedef {import('../types').FetchOptions} FetchOptions + * @typedef {import('../types').ProgressFn} ProgressFn + */ + +/** + * Fetch with progress + * + * @param {string | Request} url + * @param {FetchOptions} [options] + * @returns {Promise} + */ +const fetchWithProgress = (url, options = {}) => { + const request = new XMLHttpRequest() + request.open(options.method || 'GET', url.toString(), true) + + const { timeout, headers } = options + + if (timeout && timeout > 0 && timeout < Infinity) { + request.timeout = timeout + } + + if (options.overrideMimeType != null) { + request.overrideMimeType(options.overrideMimeType) + } + + if (headers) { + for (const [name, value] of new Headers(headers)) { + request.setRequestHeader(name, value) + } + } + + if (options.signal) { + options.signal.onabort = () => request.abort() + } + + if (options.onUploadProgress) { + request.upload.onprogress = options.onUploadProgress + } + + // Note: Need to use `arraybuffer` here instead of `blob` because `Blob` + // instances coming from JSDOM are not compatible with `Response` from + // node-fetch (which is the setup we get when testing with jest because + // it uses JSDOM which does not provide a global fetch + // https://github.com/jsdom/jsdom/issues/1724) + request.responseType = 'arraybuffer' + + return new Promise((resolve, reject) => { + /** + * @param {Event} event + */ + const handleEvent = (event) => { + switch (event.type) { + case 'error': { + resolve(Response.error()) + break + } + case 'load': { + resolve( + new ResponseWithURL(request.responseURL, request.response, { + status: request.status, + statusText: request.statusText, + headers: parseHeaders(request.getAllResponseHeaders()) + }) + ) + break + } + case 'timeout': { + reject(new TimeoutError()) + break + } + case 'abort': { + reject(new AbortError()) + break + } + default: { + break + } + } + } + request.onerror = handleEvent + request.onload = handleEvent + request.ontimeout = handleEvent + request.onabort = handleEvent + + // @ts-expect-error options.body can be a node readable stream, which isn't compatible with XHR, but this + // file is a browser override so you won't get a node readable stream so ignore the error + request.send(options.body) + }) +} + +const fetchWithStreaming = fetch + +/** + * @param {string | Request} url + * @param {FetchOptions} options + */ +const fetchWith = (url, options = {}) => + (options.onUploadProgress != null) + ? fetchWithProgress(url, options) + : fetchWithStreaming(url, options) + +/** + * Parse Headers from a XMLHttpRequest + * + * @param {string} input + * @returns {Headers} + */ +const parseHeaders = (input) => { + const headers = new Headers() + for (const line of input.trim().split(/[\r\n]+/)) { + const index = line.indexOf(': ') + if (index > 0) { + headers.set(line.slice(0, index), line.slice(index + 1)) + } + } + + return headers +} + +class ResponseWithURL extends Response { + /** + * @param {string} url + * @param {BodyInit} body + * @param {ResponseInit} options + */ + constructor (url, body, options) { + super(body, options) + Object.defineProperty(this, 'url', { value: url }) + } +} + +module.exports = { + fetch: fetchWith, + Request, + Headers +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 3658: +======= +/***/ 12302: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +/** + * @typedef {object} fetchImpl + * @property {globalThis.fetch} fetchImpl.fetch + * @property {globalThis.Request} fetchImpl.Request + * @property {globalThis.Response} fetchImpl.Response + * @property {globalThis.Headers} fetchImpl.Headers + */ + +let implName = './fetch.node' + +if (typeof XMLHttpRequest === 'function') { + // Electron has `XMLHttpRequest` and should get the browser implementation + // instead of node. +<<<<<<< HEAD + implName = './fetch.browser' +======= + module.exports = __nccwpck_require__(97355) +} else { + module.exports = __nccwpck_require__(38606) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +} + +/** @type {fetchImpl} */ +const fetch = __nccwpck_require__(2885) + +module.exports = fetch + + +/***/ }), + +<<<<<<< HEAD +/***/ 53957: +======= +/***/ 38606: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const { Request, Response, Headers, default: nativeFetch } = __nccwpck_require__(48448) +// @ts-ignore +const toStream = __nccwpck_require__(28186) +const { Buffer } = __nccwpck_require__(14300) +/** + * @typedef {import('stream').Readable} NodeReadableStream + * + * @typedef {import('../types').FetchOptions} FetchOptions + * @typedef {import('../types').ProgressFn} ProgressFn + */ + +/** + * @param {string|Request} url + * @param {FetchOptions} [options] + * @returns {Promise} + */ +const fetch = (url, options = {}) => + // @ts-ignore + nativeFetch(url, withUploadProgress(options)) + +/** + * Takes fetch options and wraps request body to track upload progress if + * `onUploadProgress` is supplied. Otherwise returns options as is. + * + * @param {FetchOptions} options + * @returns {FetchOptions} + */ +const withUploadProgress = (options) => { + const { onUploadProgress, body } = options + if (onUploadProgress && body) { + // This works around the fact that electron-fetch serializes `Uint8Array`s + // and `ArrayBuffer`s to strings. + const content = normalizeBody(body) + + const rsp = new Response(content) + const source = iterateBodyWithProgress(/** @type {NodeReadableStream} */(rsp.body), onUploadProgress) + return { + ...options, + body: toStream.readable(source) + } + } else { + return options + } +} + +/** + * @param {BodyInit | NodeReadableStream} input + */ +const normalizeBody = (input) => { + if (input instanceof ArrayBuffer) { + return Buffer.from(input) + } else if (ArrayBuffer.isView(input)) { + return Buffer.from(input.buffer, input.byteOffset, input.byteLength) + } else if (typeof input === 'string') { + return Buffer.from(input) + } + return input +} + +/** + * Takes body from native-fetch response as body and `onUploadProgress` handler + * and returns async iterable that emits body chunks and emits + * `onUploadProgress`. + * + * @param {NodeReadableStream | null} body + * @param {ProgressFn} onUploadProgress + * @returns {AsyncIterable} + */ +const iterateBodyWithProgress = async function * (body, onUploadProgress) { + if (body == null) { + onUploadProgress({ total: 0, loaded: 0, lengthComputable: true }) + } else if (Buffer.isBuffer(body)) { + const total = body.byteLength + const lengthComputable = true + yield body + onUploadProgress({ total, loaded: total, lengthComputable }) + } else { + const total = 0 + const lengthComputable = false + let loaded = 0 + for await (const chunk of body) { + loaded += chunk.byteLength + yield chunk + onUploadProgress({ total, loaded, lengthComputable }) + } + } +} + +module.exports = { + fetch, + Request, + Headers +} + + +/***/ }), + +/***/ 78002: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +// https://github.com/electron/electron/issues/2288 +function isElectron() { + // Renderer process + if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') { + return true; + } + + // Main process + if (typeof process !== 'undefined' && typeof process.versions === 'object' && !!process.versions.electron) { + return true; + } + + // Detect the user agent when the `nodeIntegration` option is set to false + if (typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Electron') >= 0) { + return true; + } + + return false; +} + +module.exports = isElectron; + + +/***/ }), + +<<<<<<< HEAD +/***/ 94978: +======= +/***/ 89837: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const ipRegex = __nccwpck_require__(94807); + +const isIp = string => ipRegex({exact: true}).test(string); +isIp.v4 = string => ipRegex.v4({exact: true}).test(string); +isIp.v6 = string => ipRegex.v6({exact: true}).test(string); +isIp.version = string => isIp(string) ? (isIp.v4(string) ? 4 : 6) : undefined; + +module.exports = isIp; + + +/***/ }), + +/***/ 87873: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +module.exports = value => { + if (Object.prototype.toString.call(value) !== '[object Object]') { + return false; + } + + const prototype = Object.getPrototypeOf(value); + return prototype === null || prototype === Object.prototype; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 27419: +======= +/***/ 9551: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */ + +function isObject(o) { + return Object.prototype.toString.call(o) === '[object Object]'; +} + +function isPlainObject(o) { + var ctor,prot; + + if (isObject(o) === false) return false; + + // If has modified constructor + ctor = o.constructor; + if (ctor === undefined) return true; + + // If has modified prototype + prot = ctor.prototype; + if (isObject(prot) === false) return false; + + // If constructor does not have an Object-specific method + if (prot.hasOwnProperty('isPrototypeOf') === false) { + return false; + } + + // Most likely a plain Object + return true; +} + +exports.isPlainObject = isPlainObject; + + +/***/ }), + +/***/ 51252: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { randomBytes } = __nccwpck_require__(6113) + +module.exports = randomBytes + + +/***/ }), + +<<<<<<< HEAD +/***/ 3728: +======= +/***/ 2003: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { + URLWithLegacySupport, + format, + URLSearchParams, + defaultBase +<<<<<<< HEAD +} = __nccwpck_require__(83799) +const relative = __nccwpck_require__(99047) +======= +} = __nccwpck_require__(3197) +const relative = __nccwpck_require__(37043) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = { + URL: URLWithLegacySupport, + URLSearchParams, + format, + relative, + defaultBase +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 99047: +======= +/***/ 37043: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const { URLWithLegacySupport, format } = __nccwpck_require__(83799) +======= +const { URLWithLegacySupport, format } = __nccwpck_require__(3197) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * @param {string | undefined} url + * @param {any} [location] + * @param {any} [protocolMap] + * @param {any} [defaultProtocol] + */ +module.exports = (url, location = {}, protocolMap = {}, defaultProtocol) => { + let protocol = location.protocol + ? location.protocol.replace(':', '') + : 'http' + + // Check protocol map + protocol = (protocolMap[protocol] || defaultProtocol || protocol) + ':' + let urlParsed + + try { + urlParsed = new URLWithLegacySupport(url) + } catch (err) { + urlParsed = {} + } + + const base = Object.assign({}, location, { + protocol: protocol || urlParsed.protocol, + host: location.host || urlParsed.host + }) + + return new URLWithLegacySupport(url, format(base)).toString() +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 83799: +======= +/***/ 3197: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { URL, URLSearchParams, format } = __nccwpck_require__(57310) + +// https://github.com/nodejs/node/issues/12682 +const defaultBase = 'http://localhost' + +class URLWithLegacySupport extends URL { + constructor (url = '', base = defaultBase) { + super(url, base) + this.path = this.pathname + this.search + this.auth = + this.username && this.password + ? this.username + ':' + this.password + : null + this.query = + this.search && this.search.startsWith('?') + ? this.search.slice(1) + : null + } + + format () { + return this.toString() + } +} + +module.exports = { + URLWithLegacySupport, + URLSearchParams, + format, + defaultBase +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 45048: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { Readable, Writable, Duplex } = __nccwpck_require__(12781) +const getIterator = __nccwpck_require__(50481) +const Fifo = __nccwpck_require__(57911) +======= +/***/ 81172: +/***/ ((module) => { + +"use strict"; + + +/** + * Collects all values from an (async) iterable into an array and returns it. + * + * @template T + * @param {AsyncIterable|Iterable} source + */ +const all = async (source) => { + const arr = [] + + for await (const entry of source) { + arr.push(entry) + } + + return arr +} + +module.exports = all + + +/***/ }), + +/***/ 58611: +/***/ ((module) => { + +"use strict"; + + +/** + * Takes an (async) iterable that emits things and returns an async iterable that + * emits those things in fixed-sized batches. + * + * @template T + * @param {AsyncIterable|Iterable} source + * @param {number} [size=1] + * @returns {AsyncIterable} + */ +async function * batch (source, size = 1) { + /** @type {T[]} */ + let things = [] + + if (size < 1) { + size = 1 + } + + for await (const thing of source) { + things.push(thing) + + while (things.length >= size) { + yield things.slice(0, size) + + things = things.slice(size) + } + } + + while (things.length) { + yield things.slice(0, size) + + things = things.slice(size) + } +} + +module.exports = batch + + +/***/ }), + +/***/ 85041: +/***/ ((module) => { + +"use strict"; + + +/** + * Drains an (async) iterable discarding its' content and does not return + * anything. + * + * @template T + * @param {AsyncIterable|Iterable} source + * @returns {Promise} + */ +const drain = async (source) => { + for await (const _ of source) { } // eslint-disable-line no-unused-vars,no-empty +} + +module.exports = drain + + +/***/ }), + +/***/ 78883: +/***/ ((module) => { + +"use strict"; + + +/** + * Filters the passed (async) iterable by using the filter function + * + * @template T + * @param {AsyncIterable|Iterable} source + * @param {function(T):boolean|Promise} fn + */ +const filter = async function * (source, fn) { + for await (const entry of source) { + if (await fn(entry)) { + yield entry + } + } +} + +module.exports = filter + + +/***/ }), + +/***/ 84103: +/***/ ((module) => { + +"use strict"; + + +/** + * Returns the first result from an (async) iterable, unless empty, in which + * case returns `undefined`. + * + * @template T + * @param {AsyncIterable|Iterable} source + */ +const first = async (source) => { + for await (const entry of source) { // eslint-disable-line no-unreachable-loop + return entry + } + + return undefined +} + +module.exports = first + + +/***/ }), + +/***/ 3332: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const fs = (__nccwpck_require__(57147).promises) +const path = __nccwpck_require__(71017) +const minimatch = __nccwpck_require__(71111) + +/** + * @typedef {string} Glob + * @typedef {object} OptionsExt + * @property {string} [cwd=process.cwd()] + * @property {boolean} [absolute=false] - If true produces absolute paths + * @property {boolean} [nodir] - If true yields file paths and skip directories + * + * @typedef {OptionsExt & minimatch.IOptions} Options + */ + +/** + * Async iterable filename pattern matcher + * + * @param {string} dir + * @param {string} pattern + * @param {Options} [options] + * @returns {AsyncIterable} + */ +async function * glob (dir, pattern, options = {}) { + const absoluteDir = path.resolve(dir) + const relativeDir = path.relative(options.cwd || process.cwd(), dir) + + const stats = await fs.stat(absoluteDir) + + if (stats.isDirectory()) { + for await (const entry of _glob(absoluteDir, '', pattern, options)) { + yield entry + } + + return + } + + if (minimatch(relativeDir, pattern, options)) { + yield options.absolute ? absoluteDir : relativeDir + } +} + +/** + * @param {string} base + * @param {string} dir + * @param {Glob} pattern + * @param {Options} options + * @returns {AsyncIterable} + */ +async function * _glob (base, dir, pattern, options) { + for await (const entry of await fs.opendir(path.join(base, dir))) { + const relativeEntryPath = path.join(dir, entry.name) + const absoluteEntryPath = path.join(base, dir, entry.name) + + let match = minimatch(relativeEntryPath, pattern, options) + + const isDirectory = entry.isDirectory() + + if (isDirectory && options.nodir) { + match = false + } + + if (match) { + yield options.absolute ? absoluteEntryPath : relativeEntryPath + } + + if (isDirectory) { + yield * _glob(base, relativeEntryPath, pattern, options) + } + } +} + +module.exports = glob + + +/***/ }), + +/***/ 28741: +/***/ ((module) => { + +"use strict"; + + +/** + * Returns the last item of an (async) iterable, unless empty, in which case + * return `undefined`. + * + * @template T + * @param {AsyncIterable|Iterable} source + */ +const last = async (source) => { + let res + + for await (const entry of source) { + res = entry + } + + return res +} + +module.exports = last + + +/***/ }), + +/***/ 6305: +/***/ ((module) => { + +"use strict"; + + +/** + * Takes an (async) iterable and returns one with each item mapped by the passed + * function. + * + * @template I,O + * @param {AsyncIterable|Iterable} source + * @param {function(I):O|Promise} func + * @returns {AsyncIterable} + */ +const map = async function * (source, func) { + for await (const val of source) { + yield func(val) + } +} + +module.exports = map + + +/***/ }), + +/***/ 62898: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const batch = __nccwpck_require__(58611) + +/** + * @template T + * @typedef {{ok:true, value:T}} Success + */ + +/** + * @typedef {{ok:false, err:Error}} Failure + */ + +/** + * Takes an (async) iterator that emits promise-returning functions, + * invokes them in parallel and emits the results as they become available but + * in the same order as the input + * + * @template T + * @param {AsyncIterable<() => Promise>} source + * @param {number} [size=1] + * @returns {AsyncIterable} + */ +async function * parallelBatch (source, size = 1) { + for await (const tasks of batch(source, size)) { + /** @type {Promise|Failure>[]} */ + const things = tasks.map( + /** + * @param {() => Promise} p + */ + p => { + return p().then(value => ({ ok: true, value }), err => ({ ok: false, err })) + }) + + for (let i = 0; i < things.length; i++) { + const result = await things[i] + + if (result.ok) { + yield result.value + } else { + throw result.err + } + } + } +} + +module.exports = parallelBatch + + +/***/ }), + +/***/ 66140: +/***/ ((module) => { + +"use strict"; + + +/** + * @template T + * @typedef {Object} Peek + * @property {() => IteratorResult} peek + */ + +/** + * @template T + * @typedef {Object} AsyncPeek + * @property {() => Promise>} peek + */ + +/** + * @template T + * @typedef {Object} Push + * @property {(value:T) => void} push + */ + +/** + * @template T + * @typedef {Iterable & Peek & Push & Iterator} Peekable + */ + +/** + * @template T + * @typedef {AsyncIterable & AsyncPeek & Push & AsyncIterator} AsyncPeekable + */ + +/** + * @template {Iterable | AsyncIterable} I + * @param {I} iterable + * @returns {I extends Iterable + * ? Peekable + * : I extends AsyncIterable + * ? AsyncPeekable + * : never + * } + */ +function peekableIterator (iterable) { + // @ts-ignore + const [iterator, symbol] = iterable[Symbol.asyncIterator] + // @ts-ignore + ? [iterable[Symbol.asyncIterator](), Symbol.asyncIterator] + // @ts-ignore + : [iterable[Symbol.iterator](), Symbol.iterator] + + /** @type {any[]} */ + const queue = [] + + // @ts-ignore + return { + peek: () => { + return iterator.next() + }, + push: (value) => { + queue.push(value) + }, + next: () => { + if (queue.length) { + return { + done: false, + value: queue.shift() + } + } + + return iterator.next() + }, + [symbol] () { + return this + } + } +} + +module.exports = peekableIterator + + +/***/ }), + +/***/ 74824: +/***/ ((module) => { + +const rawPipe = (...fns) => { + let res + while (fns.length) { + res = fns.shift()(res) + } + return res +} + +const isIterable = obj => obj && ( + typeof obj[Symbol.asyncIterator] === 'function' || + typeof obj[Symbol.iterator] === 'function' || + typeof obj.next === 'function' // Probably, right? +) + +const isDuplex = obj => obj && typeof obj.sink === 'function' && isIterable(obj.source) + +const duplexPipelineFn = duplex => source => { + duplex.sink(source) // TODO: error on sink side is unhandled rejection - this is the same as pull streams + return duplex.source +} + +const pipe = (...fns) => { + // Duplex at start: wrap in function and return duplex source + if (isDuplex(fns[0])) { + const duplex = fns[0] + fns[0] = () => duplex.source + // Iterable at start: wrap in function + } else if (isIterable(fns[0])) { + const source = fns[0] + fns[0] = () => source + } + + if (fns.length > 1) { + // Duplex at end: use duplex sink + if (isDuplex(fns[fns.length - 1])) { + fns[fns.length - 1] = fns[fns.length - 1].sink + } + } + + if (fns.length > 2) { + // Duplex in the middle, consume source with duplex sink and return duplex source + for (let i = 1; i < fns.length - 1; i++) { + if (isDuplex(fns[i])) { + fns[i] = duplexPipelineFn(fns[i]) + } + } + } + + return rawPipe(...fns) +} + +module.exports = pipe +module.exports.pipe = pipe +module.exports.rawPipe = rawPipe +module.exports.isIterable = isIterable +module.exports.isDuplex = isDuplex + + +/***/ }), + +/***/ 16346: +/***/ ((module) => { + +"use strict"; + + +/** + * Stop iteration after n items have been received. + * + * @template T + * @param {AsyncIterable|Iterable} source + * @param {number} limit + * @returns {AsyncIterable} + */ +const take = async function * (source, limit) { + let items = 0 + + if (limit < 1) { + return + } + + for await (const entry of source) { + yield entry + + items++ + + if (items === limit) { + return + } + } +} + +module.exports = take + + +/***/ }), + +/***/ 17188: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { Readable, Writable, Duplex } = __nccwpck_require__(12781) +const getIterator = __nccwpck_require__(26805) +const Fifo = __nccwpck_require__(93963) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +const { Buffer } = __nccwpck_require__(14300) +const END_CHUNK = Buffer.alloc(0) + +module.exports = function toDuplex (duplex, options) { + options = options || {} + + let reading = false + const fifo = new Fifo() + + duplex = { + sink: duplex.sink, + source: duplex.source ? getIterator(duplex.source) : null + } + + let Stream = Duplex + if (!duplex.source) { + Stream = Writable + } else if (!duplex.sink) { + Stream = Readable + } + + let readable + if (duplex.source) { + readable = { + async read (size) { + if (reading) return + reading = true + + try { + while (true) { + const { value, done } = await duplex.source.next(size) + if (done) return this.push(null) + if (!this.push(value)) break + } + } catch (err) { + this.emit('error', err) + } finally { + reading = false + } + } + } + } + + let writable + if (duplex.sink) { + writable = { + write (chunk, enc, cb) { + fifo.push(chunk).then(() => cb(), cb) + }, + final (cb) { + fifo.push(END_CHUNK).then(() => cb(), cb) + } + } + } + + Object.assign(options, readable, writable) + + const stream = new Stream(options) + + if (duplex.sink) { + duplex.sink({ + [Symbol.asyncIterator] () { + return this + }, + async next () { + const chunk = await fifo.shift() + return chunk === END_CHUNK ? { done: true } : { value: chunk } + }, + async throw (err) { + stream.destroy(err) + return { done: true } + }, + async return () { + stream.destroy() + return { done: true } + } + }) + } + + return stream +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 79620: +======= +/***/ 28186: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const toTransform = __nccwpck_require__(99896) +const toDuplex = __nccwpck_require__(45048) +======= +const toTransform = __nccwpck_require__(63688) +const toDuplex = __nccwpck_require__(17188) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function toReadable (source, options) { + return toDuplex({ source }, options) +} + +function toWritable (sink, options) { + return toDuplex({ sink }, options) +} + +module.exports = toReadable +module.exports.readable = toReadable +module.exports.writable = toWritable +module.exports.transform = toTransform +module.exports.duplex = toDuplex + + +/***/ }), + +<<<<<<< HEAD +/***/ 99896: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const toDuplex = __nccwpck_require__(45048) +const defer = __nccwpck_require__(35750) +======= +/***/ 63688: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const toDuplex = __nccwpck_require__(17188) +const defer = __nccwpck_require__(31368) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = function toTransform (transform, options) { + const { promise, resolve } = defer() + + const source = (async function * () { + const it = await promise + for await (const chunk of it) yield chunk + })() + + return toDuplex({ sink: s => resolve(transform(s)), source }, options) +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 8614: +======= +/***/ 66405: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const crypto = __nccwpck_require__(6113) +<<<<<<< HEAD +const { concat: uint8ArrayConcat } = __nccwpck_require__(64010) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(31277) +======= +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// Based off of code from https://github.com/luke-park/SecureCompatibleEncryptionExamples + +/** + * + * @param {object} [options] + * @param {number} [options.algorithmTagLength=16] + * @param {number} [options.nonceLength=12] + * @param {number} [options.keyLength=16] + * @param {string} [options.digest=sha256] + * @param {number} [options.saltLength=16] + * @param {number} [options.iterations=32767] + * @returns {*} + */ +function create ({ + algorithmTagLength = 16, + nonceLength = 12, + keyLength = 16, + digest = 'sha256', + saltLength = 16, + iterations = 32767 +} = {}) { + const algorithm = 'aes-128-gcm' + /** + * + * @private + * @param {Uint8Array} data + * @param {Uint8Array} key + * @returns {Promise} + */ + async function encryptWithKey (data, key) { // eslint-disable-line require-await + const nonce = crypto.randomBytes(nonceLength) + + // Create the cipher instance. + const cipher = crypto.createCipheriv(algorithm, key, nonce) + + // Encrypt and prepend nonce. + const ciphertext = uint8ArrayConcat([cipher.update(data), cipher.final()]) + + return uint8ArrayConcat([nonce, ciphertext, cipher.getAuthTag()]) + } + + /** + * Uses the provided password to derive a pbkdf2 key. The key + * will then be used to encrypt the data. + * + * @param {Uint8Array} data - The data to decrypt + * @param {string|Uint8Array} password - A plain password + * @returns {Promise} + */ + async function encrypt (data, password) { // eslint-disable-line require-await + // Generate a 128-bit salt using a CSPRNG. + const salt = crypto.randomBytes(saltLength) + + if (typeof password === 'string' || password instanceof String) { + password = uint8ArrayFromString(password) + } + + // Derive a key using PBKDF2. + const key = crypto.pbkdf2Sync(password, salt, iterations, keyLength, digest) + + // Encrypt and prepend salt. + return uint8ArrayConcat([salt, await encryptWithKey(Uint8Array.from(data), key)]) + } + + /** + * Decrypts the given cipher text with the provided key. The `key` should + * be a cryptographically safe key and not a plaintext password. To use + * a plaintext password, use `decrypt`. The options used to create + * this decryption cipher must be the same as those used to create + * the encryption cipher. + * + * @private + * @param {Uint8Array} ciphertextAndNonce - The data to decrypt + * @param {Uint8Array} key + * @returns {Promise} + */ + async function decryptWithKey (ciphertextAndNonce, key) { // eslint-disable-line require-await + // Create Uint8Arrays of nonce, ciphertext and tag. + const nonce = ciphertextAndNonce.slice(0, nonceLength) + const ciphertext = ciphertextAndNonce.slice(nonceLength, ciphertextAndNonce.length - algorithmTagLength) + const tag = ciphertextAndNonce.slice(ciphertext.length + nonceLength) + + // Create the cipher instance. + const cipher = crypto.createDecipheriv(algorithm, key, nonce) + + // Decrypt and return result. + cipher.setAuthTag(tag) + return uint8ArrayConcat([cipher.update(ciphertext), cipher.final()]) + } + + /** + * Uses the provided password to derive a pbkdf2 key. The key + * will then be used to decrypt the data. The options used to create + * this decryption cipher must be the same as those used to create + * the encryption cipher. + * + * @param {Uint8Array} data - The data to decrypt + * @param {string|Uint8Array} password - A plain password + */ + async function decrypt (data, password) { // eslint-disable-line require-await + // Create Uint8Arrays of salt and ciphertextAndNonce. + const salt = data.slice(0, saltLength) + const ciphertextAndNonce = data.slice(saltLength) + + if (typeof password === 'string' || password instanceof String) { + password = uint8ArrayFromString(password) + } + + // Derive the key using PBKDF2. + const key = crypto.pbkdf2Sync(password, salt, iterations, keyLength, digest) + + // Decrypt and return result. + return decryptWithKey(ciphertextAndNonce, key) + } + + return { + encrypt, + decrypt + } +} + +module.exports = { + create +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 69260: +======= +/***/ 82744: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +const crypto = __nccwpck_require__(6113) +<<<<<<< HEAD +const lengths = __nccwpck_require__(17250) +======= +const lengths = __nccwpck_require__(31481) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +exports.create = async function (hash, secret) { // eslint-disable-line require-await + const res = { + async digest (data) { // eslint-disable-line require-await + const hmac = crypto.createHmac(hash.toLowerCase(), secret) + hmac.update(data) + return hmac.digest() + }, + length: lengths[hash] + } + + return res +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 17250: +======= +/***/ 31481: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +module.exports = { + SHA1: 20, + SHA256: 32, + SHA512: 64 +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 83124: +======= +/***/ 28051: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +const crypto = __nccwpck_require__(6113) +<<<<<<< HEAD +const validateCurveType = __nccwpck_require__(82432) +======= +const validateCurveType = __nccwpck_require__(52410) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const curves = { + 'P-256': 'prime256v1', + 'P-384': 'secp384r1', + 'P-521': 'secp521r1' +} + +exports.generateEphmeralKeyPair = async function (curve) { // eslint-disable-line require-await + validateCurveType(Object.keys(curves), curve) + + const ecdh = crypto.createECDH(curves[curve]) + ecdh.generateKeys() + + return { + key: ecdh.getPublicKey(), + async genSharedKey (theirPub, forcePrivate) { // eslint-disable-line require-await + if (forcePrivate) { + ecdh.setPrivateKey(forcePrivate.private) + } + + return ecdh.computeSecret(theirPub) + } + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 94462: +======= +/***/ 8452: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const errcode = __nccwpck_require__(22077) +const { equals: uint8ArrayEquals } = __nccwpck_require__(12667) +const { sha256 } = __nccwpck_require__(65484) +const { base58btc } = __nccwpck_require__(50119) +const { identity } = __nccwpck_require__(14733) +const crypto = __nccwpck_require__(35079) +const pbm = __nccwpck_require__(20040) +const exporter = __nccwpck_require__(26048) +======= +const errcode = __nccwpck_require__(5822) +const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) +const { sha256 } = __nccwpck_require__(80960) +const { base58btc } = __nccwpck_require__(49108) +const { identity } = __nccwpck_require__(53863) +const crypto = __nccwpck_require__(90716) +const pbm = __nccwpck_require__(72826) +const exporter = __nccwpck_require__(76630) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +class Ed25519PublicKey { + constructor (key) { + this._key = ensureKey(key, crypto.publicKeyLength) + } + + async verify (data, sig) { // eslint-disable-line require-await + return crypto.hashAndVerify(this._key, sig, data) + } + + marshal () { + return this._key + } + + get bytes () { + return pbm.PublicKey.encode({ + Type: pbm.KeyType.Ed25519, + Data: this.marshal() + }).finish() + } + + equals (key) { + return uint8ArrayEquals(this.bytes, key.bytes) + } + + async hash () { + const { bytes } = await sha256.digest(this.bytes) + + return bytes + } +} + +class Ed25519PrivateKey { + // key - 64 byte Uint8Array containing private key + // publicKey - 32 byte Uint8Array containing public key + constructor (key, publicKey) { + this._key = ensureKey(key, crypto.privateKeyLength) + this._publicKey = ensureKey(publicKey, crypto.publicKeyLength) + } + + async sign (message) { // eslint-disable-line require-await + return crypto.hashAndSign(this._key, message) + } + + get public () { + return new Ed25519PublicKey(this._publicKey) + } + + marshal () { + return this._key + } + + get bytes () { + return pbm.PrivateKey.encode({ + Type: pbm.KeyType.Ed25519, + Data: this.marshal() + }).finish() + } + + equals (key) { + return uint8ArrayEquals(this.bytes, key.bytes) + } + + async hash () { + const { bytes } = await sha256.digest(this.bytes) + + return bytes + } + + /** + * Gets the ID of the key. + * + * The key id is the base58 encoding of the identity multihash containing its public key. + * The public key is a protobuf encoding containing a type and the DER encoding + * of the PKCS SubjectPublicKeyInfo. + * + * @returns {Promise} + */ + async id () { + const encoding = await identity.digest(this.public.bytes) + return base58btc.encode(encoding.bytes).substring(1) + } + + /** + * Exports the key into a password protected `format` + * + * @param {string} password - The password to encrypt the key + * @param {string} [format=libp2p-key] - The format in which to export as + * @returns {Promise} The encrypted private key + */ + async export (password, format = 'libp2p-key') { // eslint-disable-line require-await + if (format === 'libp2p-key') { + return exporter.export(this.bytes, password) + } else { + throw errcode(new Error(`export format '${format}' is not supported`), 'ERR_INVALID_EXPORT_FORMAT') + } + } +} + +function unmarshalEd25519PrivateKey (bytes) { + // Try the old, redundant public key version + if (bytes.length > crypto.privateKeyLength) { + bytes = ensureKey(bytes, crypto.privateKeyLength + crypto.publicKeyLength) + const privateKeyBytes = bytes.slice(0, crypto.privateKeyLength) + const publicKeyBytes = bytes.slice(crypto.privateKeyLength, bytes.length) + return new Ed25519PrivateKey(privateKeyBytes, publicKeyBytes) + } + + bytes = ensureKey(bytes, crypto.privateKeyLength) + const privateKeyBytes = bytes.slice(0, crypto.privateKeyLength) + const publicKeyBytes = bytes.slice(crypto.publicKeyLength) + return new Ed25519PrivateKey(privateKeyBytes, publicKeyBytes) +} + +function unmarshalEd25519PublicKey (bytes) { + bytes = ensureKey(bytes, crypto.publicKeyLength) + return new Ed25519PublicKey(bytes) +} + +async function generateKeyPair () { + const { privateKey, publicKey } = await crypto.generateKey() + return new Ed25519PrivateKey(privateKey, publicKey) +} + +async function generateKeyPairFromSeed (seed) { + const { privateKey, publicKey } = await crypto.generateKeyFromSeed(seed) + return new Ed25519PrivateKey(privateKey, publicKey) +} + +function ensureKey (key, length) { + key = Uint8Array.from(key || []) + if (key.length !== length) { + throw errcode(new Error(`Key must be a Uint8Array of length ${length}, got ${key.length}`), 'ERR_INVALID_KEY_TYPE') + } + return key +} + +module.exports = { + Ed25519PublicKey, + Ed25519PrivateKey, + unmarshalEd25519PrivateKey, + unmarshalEd25519PublicKey, + generateKeyPair, + generateKeyPairFromSeed +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 35079: +======= +/***/ 90716: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const ed = __nccwpck_require__(72426) +======= +const ed = __nccwpck_require__(27766) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const PUBLIC_KEY_BYTE_LENGTH = 32 +const PRIVATE_KEY_BYTE_LENGTH = 64 // private key is actually 32 bytes but for historical reasons we concat private and public keys +const KEYS_BYTE_LENGTH = 32 + +exports.publicKeyLength = PUBLIC_KEY_BYTE_LENGTH +exports.privateKeyLength = PRIVATE_KEY_BYTE_LENGTH + +exports.generateKey = async function () { + // the actual private key (32 bytes) + const privateKeyRaw = ed.utils.randomPrivateKey() + const publicKey = await ed.getPublicKey(privateKeyRaw) + + // concatenated the public key to the private key + const privateKey = concatKeys(privateKeyRaw, publicKey) + + return { + privateKey, + publicKey + } +} + +/** + * Generate keypair from a seed + * + * @param {Uint8Array} seed - seed should be a 32 byte uint8array + * @returns + */ +exports.generateKeyFromSeed = async function (seed) { + if (seed.length !== KEYS_BYTE_LENGTH) { + throw new TypeError('"seed" must be 32 bytes in length.') + } else if (!(seed instanceof Uint8Array)) { + throw new TypeError('"seed" must be a node.js Buffer, or Uint8Array.') + } + + // based on node forges algorithm, the seed is used directly as private key + const privateKeyRaw = seed + const publicKey = await ed.getPublicKey(privateKeyRaw) + + const privateKey = concatKeys(privateKeyRaw, publicKey) + + return { + privateKey, + publicKey + } +} + +exports.hashAndSign = function (privateKey, msg) { + const privateKeyRaw = privateKey.slice(0, KEYS_BYTE_LENGTH) + + return ed.sign(msg, privateKeyRaw) +} + +exports.hashAndVerify = function (publicKey, sig, msg) { + return ed.verify(sig, msg, publicKey) +} + +function concatKeys (privateKeyRaw, publicKey) { + const privateKey = new Uint8Array(exports.privateKeyLength) + for (let i = 0; i < KEYS_BYTE_LENGTH; i++) { + privateKey[i] = privateKeyRaw[i] + privateKey[KEYS_BYTE_LENGTH + i] = publicKey[i] + } + return privateKey +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 19241: +======= +/***/ 48831: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const ecdh = __nccwpck_require__(83124) +======= +const ecdh = __nccwpck_require__(28051) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// Generates an ephemeral public key and returns a function that will compute +// the shared secret key. +// +// Focuses only on ECDH now, but can be made more general in the future. +module.exports = async (curve) => ecdh.generateEphmeralKeyPair(curve) // eslint-disable-line require-await + + +/***/ }), + +<<<<<<< HEAD +/***/ 26048: +======= +/***/ 76630: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const { base64 } = __nccwpck_require__(25631) +const ciphers = __nccwpck_require__(8614) +======= +const { base64 } = __nccwpck_require__(98197) +const ciphers = __nccwpck_require__(66405) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = { + /** + * Exports the given PrivateKey as a base64 encoded string. + * The PrivateKey is encrypted via a password derived PBKDF2 key + * leveraging the aes-gcm cipher algorithm. + * + * @param {Uint8Array} privateKey - The PrivateKey protobuf + * @param {string} password + * @returns {Promise} A base64 encoded string + */ + export: async function (privateKey, password) { + const cipher = ciphers.create() + const encryptedKey = await cipher.encrypt(privateKey, password) + return base64.encode(encryptedKey) + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 90918: +======= +/***/ 22940: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const { base64 } = __nccwpck_require__(25631) +const ciphers = __nccwpck_require__(8614) +======= +const { base64 } = __nccwpck_require__(98197) +const ciphers = __nccwpck_require__(66405) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = { + /** + * Attempts to decrypt a base64 encoded PrivateKey string + * with the given password. The privateKey must have been exported + * using the same password and underlying cipher (aes-gcm) + * + * @param {string} privateKey - A base64 encoded encrypted key + * @param {string} password + * @returns {Promise} The private key protobuf + */ + import: async function (privateKey, password) { + const encryptedKey = base64.decode(privateKey) + const cipher = ciphers.create() + return await cipher.decrypt(encryptedKey, password) + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 55848: +======= +/***/ 13041: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const keysPBM = __nccwpck_require__(20040) +__nccwpck_require__(1571) +__nccwpck_require__(60075) +const forge = __nccwpck_require__(72177) +const errcode = __nccwpck_require__(22077) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(31277) + +const importer = __nccwpck_require__(90918) + +const supportedKeys = { + rsa: __nccwpck_require__(53075), + ed25519: __nccwpck_require__(94462), + secp256k1: __nccwpck_require__(56976)(keysPBM, __nccwpck_require__(34388)) +======= +const keysPBM = __nccwpck_require__(72826) +__nccwpck_require__(69197) +__nccwpck_require__(87861) +const forge = __nccwpck_require__(96630) +const errcode = __nccwpck_require__(5822) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) + +const importer = __nccwpck_require__(22940) + +const supportedKeys = { + rsa: __nccwpck_require__(91667), + ed25519: __nccwpck_require__(8452), + secp256k1: __nccwpck_require__(84968)(keysPBM, __nccwpck_require__(26409)) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +} + +const ErrMissingSecp256K1 = { + message: 'secp256k1 support requires libp2p-crypto-secp256k1 package', + code: 'ERR_MISSING_PACKAGE' +} + +function typeToKey (type) { + const key = supportedKeys[type.toLowerCase()] + if (!key) { + const supported = Object.keys(supportedKeys).join(' / ') + throw errcode(new Error(`invalid or unsupported key type ${type}. Must be ${supported}`), 'ERR_UNSUPPORTED_KEY_TYPE') + } + return key +} + +// Generates a keypair of the given type and bitsize +const generateKeyPair = async (type, bits) => { // eslint-disable-line require-await + return typeToKey(type).generateKeyPair(bits) +} + +// Generates a keypair of the given type and bitsize +// seed is a 32 byte uint8array +const generateKeyPairFromSeed = async (type, seed, bits) => { // eslint-disable-line require-await + const key = typeToKey(type) + if (type.toLowerCase() !== 'ed25519') { + throw errcode(new Error('Seed key derivation is unimplemented for RSA or secp256k1'), 'ERR_UNSUPPORTED_KEY_DERIVATION_TYPE') + } + return key.generateKeyPairFromSeed(seed, bits) +} + +// Converts a protobuf serialized public key into its +// representative object +const unmarshalPublicKey = (buf) => { + const decoded = keysPBM.PublicKey.decode(buf) + const data = decoded.Data + + switch (decoded.Type) { + case keysPBM.KeyType.RSA: + return supportedKeys.rsa.unmarshalRsaPublicKey(data) + case keysPBM.KeyType.Ed25519: + return supportedKeys.ed25519.unmarshalEd25519PublicKey(data) + case keysPBM.KeyType.Secp256k1: + if (supportedKeys.secp256k1) { + return supportedKeys.secp256k1.unmarshalSecp256k1PublicKey(data) + } else { + throw errcode(new Error(ErrMissingSecp256K1.message), ErrMissingSecp256K1.code) + } + default: + typeToKey(decoded.Type) // throws because type is not supported + } +} + +// Converts a public key object into a protobuf serialized public key +const marshalPublicKey = (key, type) => { + type = (type || 'rsa').toLowerCase() + typeToKey(type) // check type + return key.bytes +} + +// Converts a protobuf serialized private key into its +// representative object +const unmarshalPrivateKey = async (buf) => { // eslint-disable-line require-await + const decoded = keysPBM.PrivateKey.decode(buf) + const data = decoded.Data + + switch (decoded.Type) { + case keysPBM.KeyType.RSA: + return supportedKeys.rsa.unmarshalRsaPrivateKey(data) + case keysPBM.KeyType.Ed25519: + return supportedKeys.ed25519.unmarshalEd25519PrivateKey(data) + case keysPBM.KeyType.Secp256k1: + if (supportedKeys.secp256k1) { + return supportedKeys.secp256k1.unmarshalSecp256k1PrivateKey(data) + } else { + throw errcode(new Error(ErrMissingSecp256K1.message), ErrMissingSecp256K1.code) + } + default: + typeToKey(decoded.Type) // throws because type is not supported + } +} + +// Converts a private key object into a protobuf serialized private key +const marshalPrivateKey = (key, type) => { + type = (type || 'rsa').toLowerCase() + typeToKey(type) // check type + return key.bytes +} + +/** + * + * @param {string} encryptedKey + * @param {string} password + */ +const importKey = async (encryptedKey, password) => { // eslint-disable-line require-await + try { + const key = await importer.import(encryptedKey, password) + return unmarshalPrivateKey(key) + } catch (_) { + // Ignore and try the old pem decrypt + } + + // Only rsa supports pem right now + const key = forge.pki.decryptRsaPrivateKey(encryptedKey, password) + if (key === null) { + throw errcode(new Error('Cannot read the key, most likely the password is wrong or not a RSA key'), 'ERR_CANNOT_DECRYPT_PEM') + } + let der = forge.asn1.toDer(forge.pki.privateKeyToAsn1(key)) + der = uint8ArrayFromString(der.getBytes(), 'ascii') + return supportedKeys.rsa.unmarshalRsaPrivateKey(der) +} + +module.exports = { + supportedKeys, + keysPBM, +<<<<<<< HEAD + keyStretcher: __nccwpck_require__(92418), + generateEphemeralKeyPair: __nccwpck_require__(19241), +======= + keyStretcher: __nccwpck_require__(88595), + generateEphemeralKeyPair: __nccwpck_require__(48831), +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + generateKeyPair, + generateKeyPairFromSeed, + unmarshalPublicKey, + marshalPublicKey, + unmarshalPrivateKey, + marshalPrivateKey, + import: importKey +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 92418: +======= +/***/ 88595: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const errcode = __nccwpck_require__(22077) +const { concat: uint8ArrayConcat } = __nccwpck_require__(64010) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(31277) +const hmac = __nccwpck_require__(69260) +======= +const errcode = __nccwpck_require__(5822) +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) +const hmac = __nccwpck_require__(82744) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const cipherMap = { + 'AES-128': { + ivSize: 16, + keySize: 16 + }, + 'AES-256': { + ivSize: 16, + keySize: 32 + }, + Blowfish: { + ivSize: 8, + cipherKeySize: 32 + } +} + +// Generates a set of keys for each party by stretching the shared key. +// (myIV, theirIV, myCipherKey, theirCipherKey, myMACKey, theirMACKey) +module.exports = async (cipherType, hash, secret) => { + const cipher = cipherMap[cipherType] + + if (!cipher) { + const allowed = Object.keys(cipherMap).join(' / ') + throw errcode(new Error(`unknown cipher type '${cipherType}'. Must be ${allowed}`), 'ERR_INVALID_CIPHER_TYPE') + } + + if (!hash) { + throw errcode(new Error('missing hash type'), 'ERR_MISSING_HASH_TYPE') + } + + const cipherKeySize = cipher.keySize + const ivSize = cipher.ivSize + const hmacKeySize = 20 + const seed = uint8ArrayFromString('key expansion') + const resultLength = 2 * (ivSize + cipherKeySize + hmacKeySize) + + const m = await hmac.create(hash, secret) + let a = await m.digest(seed) + + const result = [] + let j = 0 + + while (j < resultLength) { + const b = await m.digest(uint8ArrayConcat([a, seed])) + let todo = b.length + + if (j + todo > resultLength) { + todo = resultLength - j + } + + result.push(b) + j += todo + a = await m.digest(a) + } + + const half = resultLength / 2 + const resultBuffer = uint8ArrayConcat(result) + const r1 = resultBuffer.slice(0, half) + const r2 = resultBuffer.slice(half, resultLength) + + const createKey = (res) => ({ + iv: res.slice(0, ivSize), + cipherKey: res.slice(ivSize, ivSize + cipherKeySize), + macKey: res.slice(ivSize + cipherKeySize) + }) + + return { + k1: createKey(r1), + k2: createKey(r2) + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 20040: +======= +/***/ 72826: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*eslint-disable*/ + + +<<<<<<< HEAD +var $protobuf = __nccwpck_require__(20606); +======= +var $protobuf = __nccwpck_require__(63616); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +var $root = $protobuf.roots["libp2p-crypto-keys"] || ($protobuf.roots["libp2p-crypto-keys"] = {}); + +/** + * KeyType enum. + * @exports KeyType + * @enum {number} + * @property {number} RSA=0 RSA value + * @property {number} Ed25519=1 Ed25519 value + * @property {number} Secp256k1=2 Secp256k1 value + */ +$root.KeyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RSA"] = 0; + values[valuesById[1] = "Ed25519"] = 1; + values[valuesById[2] = "Secp256k1"] = 2; + return values; +})(); + +$root.PublicKey = (function() { + + /** + * Properties of a PublicKey. + * @exports IPublicKey + * @interface IPublicKey + * @property {KeyType} Type PublicKey Type + * @property {Uint8Array} Data PublicKey Data + */ + + /** + * Constructs a new PublicKey. + * @exports PublicKey + * @classdesc Represents a PublicKey. + * @implements IPublicKey + * @constructor + * @param {IPublicKey=} [p] Properties to set + */ + function PublicKey(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) + this[ks[i]] = p[ks[i]]; + } + + /** + * PublicKey Type. + * @member {KeyType} Type + * @memberof PublicKey + * @instance + */ + PublicKey.prototype.Type = 0; + + /** + * PublicKey Data. + * @member {Uint8Array} Data + * @memberof PublicKey + * @instance + */ + PublicKey.prototype.Data = $util.newBuffer([]); + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link PublicKey.verify|verify} messages. + * @function encode + * @memberof PublicKey + * @static + * @param {IPublicKey} m PublicKey message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + w.uint32(8).int32(m.Type); + w.uint32(18).bytes(m.Data); + return w; + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @function decode + * @memberof PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.PublicKey(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.Type = r.int32(); + break; + case 2: + m.Data = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + if (!m.hasOwnProperty("Type")) + throw $util.ProtocolError("missing required 'Type'", { instance: m }); + if (!m.hasOwnProperty("Data")) + throw $util.ProtocolError("missing required 'Data'", { instance: m }); + return m; + }; + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof PublicKey + * @static + * @param {Object.} d Plain object + * @returns {PublicKey} PublicKey + */ + PublicKey.fromObject = function fromObject(d) { + if (d instanceof $root.PublicKey) + return d; + var m = new $root.PublicKey(); + switch (d.Type) { + case "RSA": + case 0: + m.Type = 0; + break; + case "Ed25519": + case 1: + m.Type = 1; + break; + case "Secp256k1": + case 2: + m.Type = 2; + break; + } + if (d.Data != null) { + if (typeof d.Data === "string") + $util.base64.decode(d.Data, m.Data = $util.newBuffer($util.base64.length(d.Data)), 0); + else if (d.Data.length) + m.Data = d.Data; + } + return m; + }; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @function toObject + * @memberof PublicKey + * @static + * @param {PublicKey} m PublicKey + * @param {$protobuf.IConversionOptions} [o] Conversion options + * @returns {Object.} Plain object + */ + PublicKey.toObject = function toObject(m, o) { + if (!o) + o = {}; + var d = {}; + if (o.defaults) { + d.Type = o.enums === String ? "RSA" : 0; + if (o.bytes === String) + d.Data = ""; + else { + d.Data = []; + if (o.bytes !== Array) + d.Data = $util.newBuffer(d.Data); + } + } + if (m.Type != null && m.hasOwnProperty("Type")) { + d.Type = o.enums === String ? $root.KeyType[m.Type] : m.Type; + } + if (m.Data != null && m.hasOwnProperty("Data")) { + d.Data = o.bytes === String ? $util.base64.encode(m.Data, 0, m.Data.length) : o.bytes === Array ? Array.prototype.slice.call(m.Data) : m.Data; + } + return d; + }; + + /** + * Converts this PublicKey to JSON. + * @function toJSON + * @memberof PublicKey + * @instance + * @returns {Object.} JSON object + */ + PublicKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PublicKey; +})(); + +$root.PrivateKey = (function() { + + /** + * Properties of a PrivateKey. + * @exports IPrivateKey + * @interface IPrivateKey + * @property {KeyType} Type PrivateKey Type + * @property {Uint8Array} Data PrivateKey Data + */ + + /** + * Constructs a new PrivateKey. + * @exports PrivateKey + * @classdesc Represents a PrivateKey. + * @implements IPrivateKey + * @constructor + * @param {IPrivateKey=} [p] Properties to set + */ + function PrivateKey(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) + this[ks[i]] = p[ks[i]]; + } + + /** + * PrivateKey Type. + * @member {KeyType} Type + * @memberof PrivateKey + * @instance + */ + PrivateKey.prototype.Type = 0; + + /** + * PrivateKey Data. + * @member {Uint8Array} Data + * @memberof PrivateKey + * @instance + */ + PrivateKey.prototype.Data = $util.newBuffer([]); + + /** + * Encodes the specified PrivateKey message. Does not implicitly {@link PrivateKey.verify|verify} messages. + * @function encode + * @memberof PrivateKey + * @static + * @param {IPrivateKey} m PrivateKey message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateKey.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + w.uint32(8).int32(m.Type); + w.uint32(18).bytes(m.Data); + return w; + }; + + /** + * Decodes a PrivateKey message from the specified reader or buffer. + * @function decode + * @memberof PrivateKey + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {PrivateKey} PrivateKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateKey.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.PrivateKey(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.Type = r.int32(); + break; + case 2: + m.Data = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + if (!m.hasOwnProperty("Type")) + throw $util.ProtocolError("missing required 'Type'", { instance: m }); + if (!m.hasOwnProperty("Data")) + throw $util.ProtocolError("missing required 'Data'", { instance: m }); + return m; + }; + + /** + * Creates a PrivateKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof PrivateKey + * @static + * @param {Object.} d Plain object + * @returns {PrivateKey} PrivateKey + */ + PrivateKey.fromObject = function fromObject(d) { + if (d instanceof $root.PrivateKey) + return d; + var m = new $root.PrivateKey(); + switch (d.Type) { + case "RSA": + case 0: + m.Type = 0; + break; + case "Ed25519": + case 1: + m.Type = 1; + break; + case "Secp256k1": + case 2: + m.Type = 2; + break; + } + if (d.Data != null) { + if (typeof d.Data === "string") + $util.base64.decode(d.Data, m.Data = $util.newBuffer($util.base64.length(d.Data)), 0); + else if (d.Data.length) + m.Data = d.Data; + } + return m; + }; + + /** + * Creates a plain object from a PrivateKey message. Also converts values to other types if specified. + * @function toObject + * @memberof PrivateKey + * @static + * @param {PrivateKey} m PrivateKey + * @param {$protobuf.IConversionOptions} [o] Conversion options + * @returns {Object.} Plain object + */ + PrivateKey.toObject = function toObject(m, o) { + if (!o) + o = {}; + var d = {}; + if (o.defaults) { + d.Type = o.enums === String ? "RSA" : 0; + if (o.bytes === String) + d.Data = ""; + else { + d.Data = []; + if (o.bytes !== Array) + d.Data = $util.newBuffer(d.Data); + } + } + if (m.Type != null && m.hasOwnProperty("Type")) { + d.Type = o.enums === String ? $root.KeyType[m.Type] : m.Type; + } + if (m.Data != null && m.hasOwnProperty("Data")) { + d.Data = o.bytes === String ? $util.base64.encode(m.Data, 0, m.Data.length) : o.bytes === Array ? Array.prototype.slice.call(m.Data) : m.Data; + } + return d; + }; + + /** + * Converts this PrivateKey to JSON. + * @function toJSON + * @memberof PrivateKey + * @instance + * @returns {Object.} JSON object + */ + PrivateKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PrivateKey; +})(); + +module.exports = $root; + + +/***/ }), + +<<<<<<< HEAD +/***/ 53075: +======= +/***/ 91667: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const { sha256 } = __nccwpck_require__(65484) +const errcode = __nccwpck_require__(22077) +const { equals: uint8ArrayEquals } = __nccwpck_require__(12667) +const { toString: uint8ArrayToString } = __nccwpck_require__(34163) + +__nccwpck_require__(5388) +const forge = __nccwpck_require__(72177) + +const crypto = __nccwpck_require__(51937) +const pbm = __nccwpck_require__(20040) +const exporter = __nccwpck_require__(26048) +======= +const { sha256 } = __nccwpck_require__(80960) +const errcode = __nccwpck_require__(5822) +const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) + +__nccwpck_require__(34531) +const forge = __nccwpck_require__(96630) + +const crypto = __nccwpck_require__(23882) +const pbm = __nccwpck_require__(72826) +const exporter = __nccwpck_require__(76630) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +class RsaPublicKey { + constructor (key) { + this._key = key + } + + async verify (data, sig) { // eslint-disable-line require-await + return crypto.hashAndVerify(this._key, sig, data) + } + + marshal () { + return crypto.utils.jwkToPkix(this._key) + } + + get bytes () { + return pbm.PublicKey.encode({ + Type: pbm.KeyType.RSA, + Data: this.marshal() + }).finish() + } + + encrypt (bytes) { + return crypto.encrypt(this._key, bytes) + } + + equals (key) { + return uint8ArrayEquals(this.bytes, key.bytes) + } + + async hash () { + const { bytes } = await sha256.digest(this.bytes) + + return bytes + } +} + +class RsaPrivateKey { + // key - Object of the jwk format + // publicKey - Uint8Array of the spki format + constructor (key, publicKey) { + this._key = key + this._publicKey = publicKey + } + + genSecret () { + return crypto.getRandomValues(16) + } + + async sign (message) { // eslint-disable-line require-await + return crypto.hashAndSign(this._key, message) + } + + get public () { + if (!this._publicKey) { + throw errcode(new Error('public key not provided'), 'ERR_PUBKEY_NOT_PROVIDED') + } + + return new RsaPublicKey(this._publicKey) + } + + decrypt (bytes) { + return crypto.decrypt(this._key, bytes) + } + + marshal () { + return crypto.utils.jwkToPkcs1(this._key) + } + + get bytes () { + return pbm.PrivateKey.encode({ + Type: pbm.KeyType.RSA, + Data: this.marshal() + }).finish() + } + + equals (key) { + return uint8ArrayEquals(this.bytes, key.bytes) + } + + async hash () { + const { bytes } = await sha256.digest(this.bytes) + + return bytes + } + + /** + * Gets the ID of the key. + * + * The key id is the base58 encoding of the SHA-256 multihash of its public key. + * The public key is a protobuf encoding containing a type and the DER encoding + * of the PKCS SubjectPublicKeyInfo. + * + * @returns {Promise} + */ + async id () { + const hash = await this.public.hash() + return uint8ArrayToString(hash, 'base58btc') + } + + /** + * Exports the key into a password protected PEM format + * + * @param {string} password - The password to read the encrypted PEM + * @param {string} [format=pkcs-8] - The format in which to export as + */ + async export (password, format = 'pkcs-8') { // eslint-disable-line require-await + if (format === 'pkcs-8') { + const buffer = new forge.util.ByteBuffer(this.marshal()) + const asn1 = forge.asn1.fromDer(buffer) + const privateKey = forge.pki.privateKeyFromAsn1(asn1) + + const options = { + algorithm: 'aes256', + count: 10000, + saltSize: 128 / 8, + prfAlgorithm: 'sha512' + } + return forge.pki.encryptRsaPrivateKey(privateKey, password, options) + } else if (format === 'libp2p-key') { + return exporter.export(this.bytes, password) + } else { + throw errcode(new Error(`export format '${format}' is not supported`), 'ERR_INVALID_EXPORT_FORMAT') + } + } +} + +async function unmarshalRsaPrivateKey (bytes) { + const jwk = crypto.utils.pkcs1ToJwk(bytes) + const keys = await crypto.unmarshalPrivateKey(jwk) + return new RsaPrivateKey(keys.privateKey, keys.publicKey) +} + +function unmarshalRsaPublicKey (bytes) { + const jwk = crypto.utils.pkixToJwk(bytes) + return new RsaPublicKey(jwk) +} + +async function fromJwk (jwk) { + const keys = await crypto.unmarshalPrivateKey(jwk) + return new RsaPrivateKey(keys.privateKey, keys.publicKey) +} + +async function generateKeyPair (bits) { + const keys = await crypto.generateKey(bits) + return new RsaPrivateKey(keys.privateKey, keys.publicKey) +} + +module.exports = { + RsaPublicKey, + RsaPrivateKey, + unmarshalRsaPublicKey, + unmarshalRsaPrivateKey, + generateKeyPair, + fromJwk +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 15590: +======= +/***/ 34219: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +__nccwpck_require__(1571) +__nccwpck_require__(62646) +const forge = __nccwpck_require__(72177) +const { bigIntegerToUintBase64url, base64urlToBigInteger } = __nccwpck_require__(44257) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(31277) +const { toString: uint8ArrayToString } = __nccwpck_require__(34163) +======= +__nccwpck_require__(69197) +__nccwpck_require__(79626) +const forge = __nccwpck_require__(96630) +const { bigIntegerToUintBase64url, base64urlToBigInteger } = __nccwpck_require__(85216) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// Convert a PKCS#1 in ASN1 DER format to a JWK key +exports.pkcs1ToJwk = function (bytes) { + const asn1 = forge.asn1.fromDer(uint8ArrayToString(bytes, 'ascii')) + const privateKey = forge.pki.privateKeyFromAsn1(asn1) + + // https://tools.ietf.org/html/rfc7518#section-6.3.1 + return { + kty: 'RSA', + n: bigIntegerToUintBase64url(privateKey.n), + e: bigIntegerToUintBase64url(privateKey.e), + d: bigIntegerToUintBase64url(privateKey.d), + p: bigIntegerToUintBase64url(privateKey.p), + q: bigIntegerToUintBase64url(privateKey.q), + dp: bigIntegerToUintBase64url(privateKey.dP), + dq: bigIntegerToUintBase64url(privateKey.dQ), + qi: bigIntegerToUintBase64url(privateKey.qInv), + alg: 'RS256', + kid: '2011-04-29' + } +} + +// Convert a JWK key into PKCS#1 in ASN1 DER format +exports.jwkToPkcs1 = function (jwk) { + const asn1 = forge.pki.privateKeyToAsn1({ + n: base64urlToBigInteger(jwk.n), + e: base64urlToBigInteger(jwk.e), + d: base64urlToBigInteger(jwk.d), + p: base64urlToBigInteger(jwk.p), + q: base64urlToBigInteger(jwk.q), + dP: base64urlToBigInteger(jwk.dp), + dQ: base64urlToBigInteger(jwk.dq), + qInv: base64urlToBigInteger(jwk.qi) + }) + + return uint8ArrayFromString(forge.asn1.toDer(asn1).getBytes(), 'ascii') +} + +// Convert a PKCIX in ASN1 DER format to a JWK key +exports.pkixToJwk = function (bytes) { + const asn1 = forge.asn1.fromDer(uint8ArrayToString(bytes, 'ascii')) + const publicKey = forge.pki.publicKeyFromAsn1(asn1) + + return { + kty: 'RSA', + n: bigIntegerToUintBase64url(publicKey.n), + e: bigIntegerToUintBase64url(publicKey.e), + alg: 'RS256', + kid: '2011-04-29' + } +} + +// Convert a JWK key to PKCIX in ASN1 DER format +exports.jwkToPkix = function (jwk) { + const asn1 = forge.pki.publicKeyToAsn1({ + n: base64urlToBigInteger(jwk.n), + e: base64urlToBigInteger(jwk.e) + }) + + return uint8ArrayFromString(forge.asn1.toDer(asn1).getBytes(), 'ascii') +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 51937: +======= +/***/ 23882: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +const crypto = __nccwpck_require__(6113) +const promisify = (__nccwpck_require__(73837).promisify) +<<<<<<< HEAD +const errcode = __nccwpck_require__(22077) +const randomBytes = __nccwpck_require__(34388) +const keypair = promisify(crypto.generateKeyPair) + +exports.utils = __nccwpck_require__(15590) +======= +const errcode = __nccwpck_require__(5822) +const randomBytes = __nccwpck_require__(26409) +const keypair = promisify(crypto.generateKeyPair) + +exports.utils = __nccwpck_require__(34219) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +exports.generateKey = async function (bits) { // eslint-disable-line require-await + const key = await keypair('rsa', { + modulusLength: bits, + publicKeyEncoding: { type: 'pkcs1', format: 'jwk' }, + privateKeyEncoding: { type: 'pkcs1', format: 'jwk' } + }) + + return { + privateKey: key.privateKey, + publicKey: key.publicKey + } +} + +// Takes a jwk key +exports.unmarshalPrivateKey = async function (key) { // eslint-disable-line require-await + if (!key) { + throw errcode(new Error('Missing key parameter'), 'ERR_MISSING_KEY') + } + return { + privateKey: key, + publicKey: { + kty: key.kty, + n: key.n, + e: key.e + } + } +} + +exports.getRandomValues = randomBytes + +exports.hashAndSign = async function (key, msg) { // eslint-disable-line require-await + return crypto.createSign('RSA-SHA256') + .update(msg) + .sign({ format: 'jwk', key: key }) +} + +exports.hashAndVerify = async function (key, sig, msg) { // eslint-disable-line require-await + return crypto.createVerify('RSA-SHA256') + .update(msg) + .verify({ format: 'jwk', key: key }, sig) +} + +const padding = crypto.constants.RSA_PKCS1_PADDING + +exports.encrypt = function (key, bytes) { + return crypto.publicEncrypt({ format: 'jwk', key, padding }, bytes) +} + +exports.decrypt = function (key, bytes) { + return crypto.privateDecrypt({ format: 'jwk', key, padding }, bytes) +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 56976: +======= +/***/ 84968: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const { sha256 } = __nccwpck_require__(65484) +const errcode = __nccwpck_require__(22077) +const { equals: uint8ArrayEquals } = __nccwpck_require__(12667) +const { toString: uint8ArrayToString } = __nccwpck_require__(34163) + +const exporter = __nccwpck_require__(26048) + +module.exports = (keysProtobuf, randomBytes, crypto) => { + crypto = crypto || __nccwpck_require__(31753)() +======= +const { sha256 } = __nccwpck_require__(80960) +const errcode = __nccwpck_require__(5822) +const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) + +const exporter = __nccwpck_require__(76630) + +module.exports = (keysProtobuf, randomBytes, crypto) => { + crypto = crypto || __nccwpck_require__(22831)() +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + class Secp256k1PublicKey { + constructor (key) { + crypto.validatePublicKey(key) + this._key = key + } + + verify (data, sig) { + return crypto.hashAndVerify(this._key, sig, data) + } + + marshal () { + return crypto.compressPublicKey(this._key) + } + + get bytes () { + return keysProtobuf.PublicKey.encode({ + Type: keysProtobuf.KeyType.Secp256k1, + Data: this.marshal() + }).finish() + } + + equals (key) { + return uint8ArrayEquals(this.bytes, key.bytes) + } + + async hash () { + const { bytes } = await sha256.digest(this.bytes) + + return bytes + } + } + + class Secp256k1PrivateKey { + constructor (key, publicKey) { + this._key = key + this._publicKey = publicKey || crypto.computePublicKey(key) + crypto.validatePrivateKey(this._key) + crypto.validatePublicKey(this._publicKey) + } + + sign (message) { + return crypto.hashAndSign(this._key, message) + } + + get public () { + return new Secp256k1PublicKey(this._publicKey) + } + + marshal () { + return this._key + } + + get bytes () { + return keysProtobuf.PrivateKey.encode({ + Type: keysProtobuf.KeyType.Secp256k1, + Data: this.marshal() + }).finish() + } + + equals (key) { + return uint8ArrayEquals(this.bytes, key.bytes) + } + + async hash () { + const { bytes } = await sha256.digest(this.bytes) + + return bytes + } + + /** + * Gets the ID of the key. + * + * The key id is the base58 encoding of the SHA-256 multihash of its public key. + * The public key is a protobuf encoding containing a type and the DER encoding + * of the PKCS SubjectPublicKeyInfo. + * + * @returns {Promise} + */ + async id () { + const hash = await this.public.hash() + return uint8ArrayToString(hash, 'base58btc') + } + + /** + * Exports the key into a password protected `format` + * + * @param {string} password - The password to encrypt the key + * @param {string} [format=libp2p-key] - The format in which to export as + * @returns {Promise} The encrypted private key + */ + async export (password, format = 'libp2p-key') { // eslint-disable-line require-await + if (format === 'libp2p-key') { + return exporter.export(this.bytes, password) + } else { + throw errcode(new Error(`export format '${format}' is not supported`), 'ERR_INVALID_EXPORT_FORMAT') + } + } + } + + function unmarshalSecp256k1PrivateKey (bytes) { + return new Secp256k1PrivateKey(bytes) + } + + function unmarshalSecp256k1PublicKey (bytes) { + return new Secp256k1PublicKey(bytes) + } + + async function generateKeyPair () { + const privateKeyBytes = await crypto.generateKey() + return new Secp256k1PrivateKey(privateKeyBytes) + } + + return { + Secp256k1PublicKey, + Secp256k1PrivateKey, + unmarshalSecp256k1PrivateKey, + unmarshalSecp256k1PublicKey, + generateKeyPair + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 31753: +======= +/***/ 22831: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const errcode = __nccwpck_require__(22077) +const secp = __nccwpck_require__(14681) +const { sha256 } = __nccwpck_require__(65484) +======= +const errcode = __nccwpck_require__(5822) +const secp = __nccwpck_require__(61163) +const { sha256 } = __nccwpck_require__(80960) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = () => { + const privateKeyLength = 32 + + function generateKey () { + return secp.utils.randomPrivateKey() + } + + /** + * Hash and sign message with private key + * + * @param {number | bigint | (string | Uint8Array)} key + * @param {Uint8Array} msg + */ + async function hashAndSign (key, msg) { + const { digest } = await sha256.digest(msg) + try { + return await secp.sign(digest, key) + } catch (err) { + throw errcode(err, 'ERR_INVALID_INPUT') + } + } + + /** + * Hash message and verify signature with public key + * + * @param {secp.Point | (string | Uint8Array)} key + * @param {(string | Uint8Array) | secp.Signature} sig + * @param {Uint8Array} msg + */ + async function hashAndVerify (key, sig, msg) { + try { + const { digest } = await sha256.digest(msg) + return secp.verify(sig, digest, key) + } catch (err) { + throw errcode(err, 'ERR_INVALID_INPUT') + } + } + + function compressPublicKey (key) { + const point = secp.Point.fromHex(key).toRawBytes(true) + return point + } + + function decompressPublicKey (key) { + const point = secp.Point.fromHex(key).toRawBytes(false) + return point + } + + function validatePrivateKey (key) { + try { + secp.getPublicKey(key, true) + } catch (err) { + throw errcode(err, 'ERR_INVALID_PRIVATE_KEY') + } + } + + function validatePublicKey (key) { + try { + secp.Point.fromHex(key) + } catch (err) { + throw errcode(err, 'ERR_INVALID_PUBLIC_KEY') + } + } + + function computePublicKey (privateKey) { + try { + return secp.getPublicKey(privateKey, true) + } catch (err) { + throw errcode(err, 'ERR_INVALID_PRIVATE_KEY') + } + } + + return { + generateKey, + privateKeyLength, + hashAndSign, + hashAndVerify, + compressPublicKey, + decompressPublicKey, + validatePrivateKey, + validatePublicKey, + computePublicKey + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 82432: +======= +/***/ 52410: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +const errcode = __nccwpck_require__(22077) +======= +const errcode = __nccwpck_require__(5822) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = function (curveTypes, type) { + if (!curveTypes.includes(type)) { + const names = curveTypes.join(' / ') + throw errcode(new Error(`Unknown curve: ${type}. Must be ${names}`), 'ERR_INVALID_CURVE') + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 34388: +======= +/***/ 26409: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +<<<<<<< HEAD +const randomBytes = __nccwpck_require__(27419) +const errcode = __nccwpck_require__(22077) +======= +const randomBytes = __nccwpck_require__(51252) +const errcode = __nccwpck_require__(5822) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = function (length) { + if (isNaN(length) || length <= 0) { + throw errcode(new Error('random bytes length must be a Number bigger than 0'), 'ERR_INVALID_LENGTH') + } + return randomBytes(length) +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 44257: +======= +/***/ 85216: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +__nccwpck_require__(19239) +__nccwpck_require__(21686) +const forge = __nccwpck_require__(72177) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(31277) +const { toString: uint8ArrayToString } = __nccwpck_require__(34163) +const { concat: uint8ArrayConcat } = __nccwpck_require__(64010) +======= +__nccwpck_require__(36536) +__nccwpck_require__(121) +const forge = __nccwpck_require__(96630) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +exports.bigIntegerToUintBase64url = (num, len) => { + // Call `.abs()` to convert to unsigned + let buf = Uint8Array.from(num.abs().toByteArray()) // toByteArray converts to big endian + + // toByteArray() gives us back a signed array, which will include a leading 0 + // byte if the most significant bit of the number is 1: + // https://docs.microsoft.com/en-us/windows/win32/seccertenroll/about-integer + // Our number will always be positive so we should remove the leading padding. + buf = buf[0] === 0 ? buf.slice(1) : buf + + if (len != null) { + if (buf.length > len) throw new Error('byte array longer than desired length') + buf = uint8ArrayConcat([new Uint8Array(len - buf.length), buf]) + } + + return uint8ArrayToString(buf, 'base64url') +} + +// Convert a base64url encoded string to a BigInteger +exports.base64urlToBigInteger = str => { + const buf = exports.base64urlToBuffer(str) + return new forge.jsbn.BigInteger(uint8ArrayToString(buf, 'base16'), 16) +} + +exports.base64urlToBuffer = (str, len) => { + let buf = uint8ArrayFromString(str, 'base64urlpad') + + if (len != null) { + if (buf.length > len) throw new Error('byte array longer than desired length') + buf = uint8ArrayConcat([new Uint8Array(len - buf.length), buf]) + } + + return buf +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 67270: +======= +/***/ 79139: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { + + +<<<<<<< HEAD +const isOptionObject = __nccwpck_require__(94978); +======= +const isOptionObject = __nccwpck_require__(87873); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const {hasOwnProperty} = Object.prototype; +const {propertyIsEnumerable} = Object; +const defineProperty = (object, name, value) => Object.defineProperty(object, name, { + value, + writable: true, + enumerable: true, + configurable: true +}); + +const globalThis = this; +const defaultMergeOptions = { + concatArrays: false, + ignoreUndefined: false +}; + +const getEnumerableOwnPropertyKeys = value => { + const keys = []; + + for (const key in value) { + if (hasOwnProperty.call(value, key)) { + keys.push(key); + } + } + + /* istanbul ignore else */ + if (Object.getOwnPropertySymbols) { + const symbols = Object.getOwnPropertySymbols(value); + + for (const symbol of symbols) { + if (propertyIsEnumerable.call(value, symbol)) { + keys.push(symbol); + } + } + } + + return keys; +}; + +function clone(value) { + if (Array.isArray(value)) { + return cloneArray(value); + } + + if (isOptionObject(value)) { + return cloneOptionObject(value); + } + + return value; +} + +function cloneArray(array) { + const result = array.slice(0, 0); + + getEnumerableOwnPropertyKeys(array).forEach(key => { + defineProperty(result, key, clone(array[key])); + }); + + return result; +} + +function cloneOptionObject(object) { + const result = Object.getPrototypeOf(object) === null ? Object.create(null) : {}; + + getEnumerableOwnPropertyKeys(object).forEach(key => { + defineProperty(result, key, clone(object[key])); + }); + + return result; +} + +/** + * @param {*} merged already cloned + * @param {*} source something to merge + * @param {string[]} keys keys to merge + * @param {Object} config Config Object + * @returns {*} cloned Object + */ +const mergeKeys = (merged, source, keys, config) => { + keys.forEach(key => { + if (typeof source[key] === 'undefined' && config.ignoreUndefined) { + return; + } + + // Do not recurse into prototype chain of merged + if (key in merged && merged[key] !== Object.getPrototypeOf(merged)) { + defineProperty(merged, key, merge(merged[key], source[key], config)); + } else { + defineProperty(merged, key, clone(source[key])); + } + }); + + return merged; +}; + +/** + * @param {*} merged already cloned + * @param {*} source something to merge + * @param {Object} config Config Object + * @returns {*} cloned Object + * + * see [Array.prototype.concat ( ...arguments )](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.concat) + */ +const concatArrays = (merged, source, config) => { + let result = merged.slice(0, 0); + let resultIndex = 0; + + [merged, source].forEach(array => { + const indices = []; + + // `result.concat(array)` with cloning + for (let k = 0; k < array.length; k++) { + if (!hasOwnProperty.call(array, k)) { + continue; + } + + indices.push(String(k)); + + if (array === merged) { + // Already cloned + defineProperty(result, resultIndex++, array[k]); + } else { + defineProperty(result, resultIndex++, clone(array[k])); + } + } + + // Merge non-index keys + result = mergeKeys(result, array, getEnumerableOwnPropertyKeys(array).filter(key => !indices.includes(key)), config); + }); + + return result; +}; + +/** + * @param {*} merged already cloned + * @param {*} source something to merge + * @param {Object} config Config Object + * @returns {*} cloned Object + */ +function merge(merged, source, config) { + if (config.concatArrays && Array.isArray(merged) && Array.isArray(source)) { + return concatArrays(merged, source, config); + } + + if (!isOptionObject(source) || !isOptionObject(merged)) { + return clone(source); + } + + return mergeKeys(merged, source, getEnumerableOwnPropertyKeys(source), config); +} + +module.exports = function (...options) { + const config = merge(clone(defaultMergeOptions), (this !== globalThis && this) || {}, defaultMergeOptions); + let merged = {_: {}}; + + for (const option of options) { + if (option === undefined) { + continue; + } + + if (!isOptionObject(option)) { + throw new TypeError('`' + option + '` is not an Option Object'); + } + + merged = merge(merged, {_: option}, config); + } + + return merged._; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 26676: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ + +/** + * Module exports. + */ + +module.exports = __nccwpck_require__(53765) + + +/***/ }), + +/***/ 21919: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + + + +/** + * Module dependencies. + * @private + */ + +var db = __nccwpck_require__(26676) +var extname = (__nccwpck_require__(71017).extname) + +/** + * Module variables. + * @private + */ + +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i + +/** + * Module exports. + * @public + */ + +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) + +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) + +/** + * Get the default charset for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] + + if (mime && mime.charset) { + return mime.charset + } + + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } + + return false +} + +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ + +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } + + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str + + if (!mime) { + return false + } + + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } + + return mime +} + +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ + +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } + + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] + + if (!exts || !exts.length) { + return false + } + + return exts[0] +} + +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ + +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } + + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) + + if (!extension) { + return false + } + + return exports.types[extension] || false +} + +/** + * Populate the extensions and types maps. + * @private + */ + +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] + + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions + + if (!exts || !exts.length) { + return + } + + // mime -> extensions + extensions[type] = exts + + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] + + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) + + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } + + // set the extension -> mime + types[extension] = type + } + }) +} + + +/***/ }), + +/***/ 10771: +======= +/***/ 71111: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = minimatch +minimatch.Minimatch = Minimatch + +var path = (function () { try { return __nccwpck_require__(71017) } catch (e) {}}()) || { + sep: '/' +} +minimatch.sep = path.sep + +var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} +<<<<<<< HEAD +var expand = __nccwpck_require__(3263) +======= +var expand = __nccwpck_require__(73594) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var plTypes = { + '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, + '?': { open: '(?:', close: ')?' }, + '+': { open: '(?:', close: ')+' }, + '*': { open: '(?:', close: ')*' }, + '@': { open: '(?:', close: ')' } +} + +// any single thing other than / +// don't need to escape / when using new RegExp() +var qmark = '[^/]' + +// * => any number of characters +var star = qmark + '*?' + +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' + +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' + +// characters that need to be escaped in RegExp. +var reSpecials = charSet('().*{}+?[]^$\\!') + +// "abc" -> { a:true, b:true, c:true } +function charSet (s) { + return s.split('').reduce(function (set, c) { + set[c] = true + return set + }, {}) +} + +// normalizes slashes. +var slashSplit = /\/+/ + +minimatch.filter = filter +function filter (pattern, options) { + options = options || {} + return function (p, i, list) { + return minimatch(p, pattern, options) + } +} + +function ext (a, b) { + b = b || {} + var t = {} + Object.keys(a).forEach(function (k) { + t[k] = a[k] + }) + Object.keys(b).forEach(function (k) { + t[k] = b[k] + }) + return t +} + +minimatch.defaults = function (def) { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return minimatch + } + + var orig = minimatch + + var m = function minimatch (p, pattern, options) { + return orig(p, pattern, ext(def, options)) + } + + m.Minimatch = function Minimatch (pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)) + } + m.Minimatch.defaults = function defaults (options) { + return orig.defaults(ext(def, options)).Minimatch + } + + m.filter = function filter (pattern, options) { + return orig.filter(pattern, ext(def, options)) + } + + m.defaults = function defaults (options) { + return orig.defaults(ext(def, options)) + } + + m.makeRe = function makeRe (pattern, options) { + return orig.makeRe(pattern, ext(def, options)) + } + + m.braceExpand = function braceExpand (pattern, options) { + return orig.braceExpand(pattern, ext(def, options)) + } + + m.match = function (list, pattern, options) { + return orig.match(list, pattern, ext(def, options)) + } + + return m +} + +Minimatch.defaults = function (def) { + return minimatch.defaults(def).Minimatch +} + +function minimatch (p, pattern, options) { + assertValidPattern(pattern) + + if (!options) options = {} + + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + return false + } + + return new Minimatch(pattern, options).match(p) +} + +function Minimatch (pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options) + } + + assertValidPattern(pattern) + + if (!options) options = {} + + pattern = pattern.trim() + + // windows support: need to use /, not \ + if (!options.allowWindowsEscape && path.sep !== '/') { + pattern = pattern.split(path.sep).join('/') + } + + this.options = options + this.set = [] + this.pattern = pattern + this.regexp = null + this.negate = false + this.comment = false + this.empty = false + this.partial = !!options.partial + + // make the set of regexps etc. + this.make() +} + +Minimatch.prototype.debug = function () {} + +Minimatch.prototype.make = make +function make () { + var pattern = this.pattern + var options = this.options + + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true + return + } + if (!pattern) { + this.empty = true + return + } + + // step 1: figure out negation, etc. + this.parseNegate() + + // step 2: expand braces + var set = this.globSet = this.braceExpand() + + if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } + + this.debug(this.pattern, set) + + // step 3: now we have a set, so turn each one into a series of path-portion + // matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + set = this.globParts = set.map(function (s) { + return s.split(slashSplit) + }) + + this.debug(this.pattern, set) + + // glob --> regexps + set = set.map(function (s, si, set) { + return s.map(this.parse, this) + }, this) + + this.debug(this.pattern, set) + + // filter out everything that didn't compile properly. + set = set.filter(function (s) { + return s.indexOf(false) === -1 + }) + + this.debug(this.pattern, set) + + this.set = set +} + +Minimatch.prototype.parseNegate = parseNegate +function parseNegate () { + var pattern = this.pattern + var negate = false + var options = this.options + var negateOffset = 0 + + if (options.nonegate) return + + for (var i = 0, l = pattern.length + ; i < l && pattern.charAt(i) === '!' + ; i++) { + negate = !negate + negateOffset++ + } + + if (negateOffset) this.pattern = pattern.substr(negateOffset) + this.negate = negate +} + +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +minimatch.braceExpand = function (pattern, options) { + return braceExpand(pattern, options) +} + +Minimatch.prototype.braceExpand = braceExpand + +function braceExpand (pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options + } else { + options = {} + } + } + + pattern = typeof pattern === 'undefined' + ? this.pattern : pattern + + assertValidPattern(pattern) + + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern] + } + + return expand(pattern) +} + +var MAX_PATTERN_LENGTH = 1024 * 64 +var assertValidPattern = function (pattern) { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern') + } + + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long') + } +} + +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +Minimatch.prototype.parse = parse +var SUBPARSE = {} +function parse (pattern, isSub) { + assertValidPattern(pattern) + + var options = this.options + + // shortcuts + if (pattern === '**') { + if (!options.noglobstar) + return GLOBSTAR + else + pattern = '*' + } + if (pattern === '') return '' + + var re = '' + var hasMagic = !!options.nocase + var escaping = false + // ? => one single character + var patternListStack = [] + var negativeLists = [] + var stateChar + var inClass = false + var reClassStart = -1 + var classStart = -1 + // . and .. never match anything that doesn't start with ., + // even when options.dot is set. + var patternStart = pattern.charAt(0) === '.' ? '' // anything + // not (start or / followed by . or .. followed by / or end) + : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' + : '(?!\\.)' + var self = this + + function clearStateChar () { + if (stateChar) { + // we had some state-tracking character + // that wasn't consumed by this pass. + switch (stateChar) { + case '*': + re += star + hasMagic = true + break + case '?': + re += qmark + hasMagic = true + break + default: + re += '\\' + stateChar + break + } + self.debug('clearStateChar %j %j', stateChar, re) + stateChar = false + } + } + + for (var i = 0, len = pattern.length, c + ; (i < len) && (c = pattern.charAt(i)) + ; i++) { + this.debug('%s\t%s %s %j', pattern, i, re, c) + + // skip over any that are escaped. + if (escaping && reSpecials[c]) { + re += '\\' + c + escaping = false + continue + } + + switch (c) { + /* istanbul ignore next */ + case '/': { + // completely not allowed, even escaped. + // Should already be path-split by now. + return false + } + + case '\\': + clearStateChar() + escaping = true + continue + + // the various stateChar values + // for the "extglob" stuff. + case '?': + case '*': + case '+': + case '@': + case '!': + this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) + + // all of those are literals inside a class, except that + // the glob [!a] means [^a] in regexp + if (inClass) { + this.debug(' in class') + if (c === '!' && i === classStart + 1) c = '^' + re += c + continue + } + + // if we already have a stateChar, then it means + // that there was something like ** or +? in there. + // Handle the stateChar, then proceed with this one. + self.debug('call clearStateChar %j', stateChar) + clearStateChar() + stateChar = c + // if extglob is disabled, then +(asdf|foo) isn't a thing. + // just clear the statechar *now*, rather than even diving into + // the patternList stuff. + if (options.noext) clearStateChar() + continue + + case '(': + if (inClass) { + re += '(' + continue + } + + if (!stateChar) { + re += '\\(' + continue + } + + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }) + // negation is (?:(?!js)[^/]*) + re += stateChar === '!' ? '(?:(?!(?:' : '(?:' + this.debug('plType %j %j', stateChar, re) + stateChar = false + continue + + case ')': + if (inClass || !patternListStack.length) { + re += '\\)' + continue + } + + clearStateChar() + hasMagic = true + var pl = patternListStack.pop() + // negation is (?:(?!js)[^/]*) + // The others are (?:) + re += pl.close + if (pl.type === '!') { + negativeLists.push(pl) + } + pl.reEnd = re.length + continue + + case '|': + if (inClass || !patternListStack.length || escaping) { + re += '\\|' + escaping = false + continue + } + + clearStateChar() + re += '|' + continue + + // these are mostly the same in regexp and glob + case '[': + // swallow any state-tracking char before the [ + clearStateChar() + + if (inClass) { + re += '\\' + c + continue + } + + inClass = true + classStart = i + reClassStart = re.length + re += c + continue + + case ']': + // a right bracket shall lose its special + // meaning and represent itself in + // a bracket expression if it occurs + // first in the list. -- POSIX.2 2.8.3.2 + if (i === classStart + 1 || !inClass) { + re += '\\' + c + escaping = false + continue + } + + // handle the case where we left a class open. + // "[z-a]" is valid, equivalent to "\[z-a\]" + // split where the last [ was, make sure we don't have + // an invalid re. if so, re-walk the contents of the + // would-be class to re-translate any characters that + // were passed through as-is + // TODO: It would probably be faster to determine this + // without a try/catch and a new RegExp, but it's tricky + // to do safely. For now, this is safe and works. + var cs = pattern.substring(classStart + 1, i) + try { + RegExp('[' + cs + ']') + } catch (er) { + // not a valid class! + var sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' + hasMagic = hasMagic || sp[1] + inClass = false + continue + } + + // finish up the class. + hasMagic = true + inClass = false + re += c + continue + + default: + // swallow any state char that wasn't consumed + clearStateChar() + + if (escaping) { + // no need + escaping = false + } else if (reSpecials[c] + && !(c === '^' && inClass)) { + re += '\\' + } + + re += c + + } // switch + } // for + + // handle the case where we left a class open. + // "[abc" is valid, equivalent to "\[abc" + if (inClass) { + // split where the last [ was, and escape it + // this is a huge pita. We now have to re-walk + // the contents of the would-be class to re-translate + // any characters that were passed through as-is + cs = pattern.substr(classStart + 1) + sp = this.parse(cs, SUBPARSE) + re = re.substr(0, reClassStart) + '\\[' + sp[0] + hasMagic = hasMagic || sp[1] + } + + // handle the case where we had a +( thing at the *end* + // of the pattern. + // each pattern list stack adds 3 chars, and we need to go through + // and escape any | chars that were passed through as-is for the regexp. + // Go through and escape them, taking care not to double-escape any + // | chars that were already escaped. + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length) + this.debug('setting tail', re, pl) + // maybe some even number of \, then maybe 1 \, followed by a | + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { + if (!$2) { + // the | isn't already escaped, so escape it. + $2 = '\\' + } + + // need to escape all those slashes *again*, without escaping the + // one that we need for escaping the | character. As it works out, + // escaping an even number of slashes can be done by simply repeating + // it exactly after itself. That's why this trick works. + // + // I am sorry that you have to see this. + return $1 + $1 + $2 + '|' + }) + + this.debug('tail=%j\n %s', tail, tail, pl, re) + var t = pl.type === '*' ? star + : pl.type === '?' ? qmark + : '\\' + pl.type + + hasMagic = true + re = re.slice(0, pl.reStart) + t + '\\(' + tail + } + + // handle trailing things that only matter at the very end. + clearStateChar() + if (escaping) { + // trailing \\ + re += '\\\\' + } + + // only need to apply the nodot start if the re starts with + // something that could conceivably capture a dot + var addPatternStart = false + switch (re.charAt(0)) { + case '[': case '.': case '(': addPatternStart = true + } + + // Hack to work around lack of negative lookbehind in JS + // A pattern like: *.!(x).!(y|z) needs to ensure that a name + // like 'a.xyz.yz' doesn't match. So, the first negative + // lookahead, has to look ALL the way ahead, to the end of + // the pattern. + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n] + + var nlBefore = re.slice(0, nl.reStart) + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + var nlAfter = re.slice(nl.reEnd) + + nlLast += nlAfter + + // Handle nested stuff like *(*.js|!(*.json)), where open parens + // mean that we should *not* include the ) in the bit that is considered + // "after" the negated section. + var openParensBefore = nlBefore.split('(').length - 1 + var cleanAfter = nlAfter + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') + } + nlAfter = cleanAfter + + var dollar = '' + if (nlAfter === '' && isSub !== SUBPARSE) { + dollar = '$' + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast + re = newRe + } + + // if the re is not "" at this point, then we need to make sure + // it doesn't match against an empty path part. + // Otherwise a/* will match a/, which it should not. + if (re !== '' && hasMagic) { + re = '(?=.)' + re + } + + if (addPatternStart) { + re = patternStart + re + } + + // parsing just a piece of a larger pattern. + if (isSub === SUBPARSE) { + return [re, hasMagic] + } + + // skip the regexp for non-magical patterns + // unescape anything in it, though, so that it'll be + // an exact match against a file etc. + if (!hasMagic) { + return globUnescape(pattern) + } + + var flags = options.nocase ? 'i' : '' + try { + var regExp = new RegExp('^' + re + '$', flags) + } catch (er) /* istanbul ignore next - should be impossible */ { + // If it was an invalid regular expression, then it can't match + // anything. This trick looks for a character after the end of + // the string, which is of course impossible, except in multi-line + // mode, but it's not a /m regex. + return new RegExp('$.') + } + + regExp._glob = pattern + regExp._src = re + + return regExp +} + +minimatch.makeRe = function (pattern, options) { + return new Minimatch(pattern, options || {}).makeRe() +} + +Minimatch.prototype.makeRe = makeRe +function makeRe () { + if (this.regexp || this.regexp === false) return this.regexp + + // at this point, this.set is a 2d array of partial + // pattern strings, or "**". + // + // It's better to use .match(). This function shouldn't + // be used, really, but it's pretty convenient sometimes, + // when you just want to work with a regex. + var set = this.set + + if (!set.length) { + this.regexp = false + return this.regexp + } + var options = this.options + + var twoStar = options.noglobstar ? star + : options.dot ? twoStarDot + : twoStarNoDot + var flags = options.nocase ? 'i' : '' + + var re = set.map(function (pattern) { + return pattern.map(function (p) { + return (p === GLOBSTAR) ? twoStar + : (typeof p === 'string') ? regExpEscape(p) + : p._src + }).join('\\\/') + }).join('|') + + // must match entire pattern + // ending in a * or ** will make it less strict. + re = '^(?:' + re + ')$' + + // can match anything, as long as it's not this. + if (this.negate) re = '^(?!' + re + ').*$' + + try { + this.regexp = new RegExp(re, flags) + } catch (ex) /* istanbul ignore next - should be impossible */ { + this.regexp = false + } + return this.regexp +} + +minimatch.match = function (list, pattern, options) { + options = options || {} + var mm = new Minimatch(pattern, options) + list = list.filter(function (f) { + return mm.match(f) + }) + if (mm.options.nonull && !list.length) { + list.push(pattern) + } + return list +} + +Minimatch.prototype.match = function match (f, partial) { + if (typeof partial === 'undefined') partial = this.partial + this.debug('match', f, this.pattern) + // short-circuit in the case of busted things. + // comments, etc. + if (this.comment) return false + if (this.empty) return f === '' + + if (f === '/' && partial) return true + + var options = this.options + + // windows: need to use /, not \ + if (path.sep !== '/') { + f = f.split(path.sep).join('/') + } + + // treat the test path as a set of pathparts. + f = f.split(slashSplit) + this.debug(this.pattern, 'split', f) + + // just ONE of the pattern sets in this.set needs to match + // in order for it to be valid. If negating, then just one + // match means that we have failed. + // Either way, return on the first hit. + + var set = this.set + this.debug(this.pattern, 'set', set) + + // Find the basename of the path by looking for the last non-empty segment + var filename + var i + for (i = f.length - 1; i >= 0; i--) { + filename = f[i] + if (filename) break + } + + for (i = 0; i < set.length; i++) { + 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 (options.flipNegate) return true + return !this.negate + } + } + + // didn't get any hits. this is success if it's a negative + // pattern, failure otherwise. + if (options.flipNegate) return false + return this.negate +} + +// set partial to true to test if, for example, +// "/a/b" matches the start of "/*/b/*/d" +// Partial means, if you run out of file before you run +// out of pattern, then that's fine, as long as all +// the parts match. +Minimatch.prototype.matchOne = function (file, pattern, partial) { + var options = this.options + + this.debug('matchOne', + { 'this': this, file: file, pattern: pattern }) + + this.debug('matchOne', file.length, pattern.length) + + for (var fi = 0, + pi = 0, + fl = file.length, + pl = pattern.length + ; (fi < fl) && (pi < pl) + ; fi++, pi++) { + this.debug('matchOne loop') + var p = pattern[pi] + var f = file[fi] + + this.debug(pattern, p, f) + + // should be impossible. + // some invalid regexp stuff in the set. + /* istanbul ignore if */ + if (p === false) return false + + if (p === GLOBSTAR) { + this.debug('GLOBSTAR', [pattern, p, f]) + + // "**" + // a/**/b/**/c would match the following: + // a/b/x/y/z/c + // a/x/y/z/b/c + // a/b/x/b/x/c + // a/b/c + // To do this, take the rest of the pattern after + // the **, and see if it would match the file remainder. + // If so, return success. + // If not, the ** "swallows" a segment, and try again. + // This is recursively awful. + // + // a/**/b/**/c matching a/b/x/y/z/c + // - a matches a + // - doublestar + // - matchOne(b/x/y/z/c, b/**/c) + // - b matches b + // - doublestar + // - matchOne(x/y/z/c, c) -> no + // - matchOne(y/z/c, c) -> no + // - matchOne(z/c, c) -> no + // - matchOne(c, c) yes, hit + var fr = fi + var pr = pi + 1 + if (pr === pl) { + this.debug('** at the end') + // a ** at the end will just swallow the rest. + // We have found a match. + // however, it will not swallow /.x, unless + // options.dot is set. + // . and .. are *never* matched by **, for explosively + // exponential reasons. + for (; fi < fl; fi++) { + if (file[fi] === '.' || file[fi] === '..' || + (!options.dot && file[fi].charAt(0) === '.')) return false + } + return true + } + + // ok, let's see if we can swallow whatever we can. + while (fr < fl) { + var swallowee = file[fr] + + this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) + + // XXX remove this slice. Just pass the start index. + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug('globstar found match!', fr, fl, swallowee) + // found a match. + return true + } else { + // can't swallow "." or ".." ever. + // can only swallow ".foo" when explicitly asked. + if (swallowee === '.' || swallowee === '..' || + (!options.dot && swallowee.charAt(0) === '.')) { + this.debug('dot detected!', file, fr, pattern, pr) + break + } + + // ** swallows a segment, and continue. + this.debug('globstar swallow a segment, and continue') + fr++ + } + } + + // no match was found. + // However, in partial mode, we can't say this is necessarily over. + // If there's more *pattern* left, then + /* istanbul ignore if */ + if (partial) { + // ran out of file + this.debug('\n>>> no match, partial?', file, fr, pattern, pr) + if (fr === fl) return true + } + return false + } + + // something other than ** + // non-magic patterns just have to match exactly + // patterns with magic have been turned into regexps. + var hit + if (typeof p === 'string') { + hit = f === p + this.debug('string match', p, f, hit) + } else { + hit = f.match(p) + this.debug('pattern match', p, f, hit) + } + + if (!hit) return false + } + + // Note: ending in / means that we'll get a final "" + // at the end of the pattern. This can only match a + // corresponding "" at the end of the file. + // If the file ends in /, then it can only match a + // a pattern that ends in /, unless the pattern just + // doesn't have any more for it. But, a/b/ should *not* + // match "a/b/*", even though "" matches against the + // [^/]*? pattern, except in partial mode, where it might + // simply not be reached yet. + // However, a/b/ should still satisfy a/* + + // now either we fell off the end of the pattern, or we're done. + if (fi === fl && pi === pl) { + // ran out of pattern and filename at the same time. + // an exact hit! + return true + } else if (fi === fl) { + // ran out of file, but still had pattern left. + // this is ok if we're doing the match as part of + // a glob fs traversal. + return partial + } else /* istanbul ignore else */ if (pi === pl) { + // ran out of pattern, still have file left. + // this is only acceptable if we're on the very last + // empty segment of a file with a trailing slash. + // a/* should match a/b/ + return (fi === fl - 1) && (file[fi] === '') + } + + // should be unreachable. + /* istanbul ignore next */ + throw new Error('wtf?') +} + +// replace stuff like \* with * +function globUnescape (s) { + return s.replace(/\\(.)/g, '$1') +} + +function regExpEscape (s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 20603: +======= +/***/ 3562: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +/** + * Helpers. + */ + +var s = 1000; +var m = s * 60; +var h = m * 60; +var d = h * 24; +var w = d * 7; +var y = d * 365.25; + +/** + * Parse or format the given `val`. + * + * Options: + * + * - `long` verbose formatting [false] + * + * @param {String|Number} val + * @param {Object} [options] + * @throws {Error} throw an error if val is not a non-empty string or a number + * @return {String|Number} + * @api public + */ + +module.exports = function(val, options) { + options = options || {}; + var type = typeof 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) + ); +}; + +/** + * Parse the given `str` and return milliseconds. + * + * @param {String} str + * @return {Number} + * @api private + */ + +function parse(str) { + str = String(str); + if (str.length > 100) { + return; + } + 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]); + var type = (match[2] || 'ms').toLowerCase(); + switch (type) { + case 'years': + case 'year': + case 'yrs': + case 'yr': + case 'y': + return n * y; + case 'weeks': + case 'week': + case 'w': + return n * w; + case 'days': + case 'day': + case 'd': + return n * d; + case 'hours': + case 'hour': + case 'hrs': + case 'hr': + case 'h': + return n * h; + case 'minutes': + case 'minute': + case 'mins': + case 'min': + case 'm': + return n * m; + case 'seconds': + case 'second': + case 'secs': + case 'sec': + case 's': + return n * s; + case 'milliseconds': + case 'millisecond': + case 'msecs': + case 'msec': + case 'ms': + return n; + default: + return undefined; + } +} + +/** + * Short format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtShort(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return Math.round(ms / d) + 'd'; + } + if (msAbs >= h) { + return Math.round(ms / h) + 'h'; + } + if (msAbs >= m) { + return Math.round(ms / m) + 'm'; + } + if (msAbs >= s) { + return Math.round(ms / s) + 's'; + } + return ms + 'ms'; +} + +/** + * Long format for `ms`. + * + * @param {Number} ms + * @return {String} + * @api private + */ + +function fmtLong(ms) { + var msAbs = Math.abs(ms); + if (msAbs >= d) { + return plural(ms, msAbs, d, 'day'); + } + if (msAbs >= h) { + return plural(ms, msAbs, h, 'hour'); + } + if (msAbs >= m) { + return plural(ms, msAbs, m, 'minute'); + } + if (msAbs >= s) { + return plural(ms, msAbs, s, 'second'); + } + return ms + ' ms'; +} + +/** + * Pluralization helper. + */ + +function plural(ms, msAbs, n, name) { + var isPlural = msAbs >= n * 1.5; + return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 91809: +======= +/***/ 6211: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { Multiaddr } = __nccwpck_require__(17907) + +const reduceValue = (_, v) => v +const tcpUri = (str, port, parts, opts) => { + // return tcp when explicitly requested + if (opts && opts.assumeHttp === false) return `tcp://${str}:${port}` + // check if tcp is the last protocol in multiaddr + let protocol = 'tcp' + let explicitPort = `:${port}` + const last = parts[parts.length - 1] + if (last.protocol === 'tcp') { + // assume http and produce clean urls + protocol = port === '443' ? 'https' : 'http' + explicitPort = port === '443' || port === '80' ? '' : explicitPort + } + return `${protocol}://${str}${explicitPort}` +} + +const Reducers = { + ip4: reduceValue, + ip6: (str, content, i, parts) => ( + parts.length === 1 && parts[0].protocol === 'ip6' + ? content + : `[${content}]` + ), + tcp: (str, content, i, parts, opts) => ( + parts.some(p => ['http', 'https', 'ws', 'wss'].includes(p.protocol)) + ? `${str}:${content}` + : tcpUri(str, content, parts, opts) + ), + udp: (str, content) => `udp://${str}:${content}`, + dnsaddr: reduceValue, + dns4: reduceValue, + dns6: reduceValue, + ipfs: (str, content) => `${str}/ipfs/${content}`, + p2p: (str, content) => `${str}/p2p/${content}`, + http: str => `http://${str}`, + https: str => `https://${str}`, + ws: str => `ws://${str}`, + wss: str => `wss://${str}`, + 'p2p-websocket-star': str => `${str}/p2p-websocket-star`, + 'p2p-webrtc-star': str => `${str}/p2p-webrtc-star`, + 'p2p-webrtc-direct': str => `${str}/p2p-webrtc-direct` +} + +module.exports = (multiaddr, opts) => { + const ma = new Multiaddr(multiaddr) + const parts = multiaddr.toString().split('/').slice(1) + return ma + .tuples() + .map(tuple => ({ + protocol: parts.shift(), + content: tuple[1] ? parts.shift() : null + })) + .reduce((str, part, i, parts) => { + const reduce = Reducers[part.protocol] + if (!reduce) throw new Error(`Unsupported protocol ${part.protocol}`) + return reduce(str, part.content, i, parts, opts) + }, '') +} + + +/***/ }), + +/***/ 41437: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const convert = __nccwpck_require__(73095) +const protocols = __nccwpck_require__(17046) +const varint = __nccwpck_require__(52865) +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) + +// export codec +module.exports = { + stringToStringTuples, + stringTuplesToString, + + tuplesToStringTuples, + stringTuplesToTuples, + + bytesToTuples, + tuplesToBytes, + + bytesToString, + stringToBytes, + + fromString, + fromBytes, + validateBytes, + isValidBytes, + cleanPath, + + ParseError, + protoFromTuple, + + sizeForAddr +} + +// string -> [[str name, str addr]... ] +/** + * @param {string} str + */ +function stringToStringTuples (str) { + const tuples = [] + const parts = str.split('/').slice(1) // skip first empty elem + if (parts.length === 1 && parts[0] === '') { + return [] + } + + for (let p = 0; p < parts.length; p++) { + const part = parts[p] + const proto = protocols(part) + + if (proto.size === 0) { + tuples.push([part]) + continue + } + + p++ // advance addr part + if (p >= parts.length) { + throw ParseError('invalid address: ' + str) + } + + // if it's a path proto, take the rest + if (proto.path) { + tuples.push([ + part, + // TODO: should we need to check each path part to see if it's a proto? + // This would allow for other protocols to be added after a unix path, + // however it would have issues if the path had a protocol name in the path + cleanPath(parts.slice(p).join('/')) + ]) + break + } + + tuples.push([part, parts[p]]) + } + + return tuples +} + +// [[str name, str addr]... ] -> string +/** + * @param {[number, string?][]} tuples + */ +function stringTuplesToString (tuples) { + /** @type {Array} */ + const parts = [] + tuples.map((tup) => { + const proto = protoFromTuple(tup) + parts.push(proto.name) + if (tup.length > 1) { + parts.push(tup[1]) + } + return null + }) + + return cleanPath(parts.join('/')) +} + +// [[str name, str addr]... ] -> [[int code, Uint8Array]... ] +/** + * @param {Array} tuples + * @returns {[number , Uint8Array?][]} + */ +function stringTuplesToTuples (tuples) { + return tuples.map((tup) => { + if (!Array.isArray(tup)) { + tup = [tup] + } + const proto = protoFromTuple(tup) + if (tup.length > 1) { + return [proto.code, convert.toBytes(proto.code, tup[1])] + } + return [proto.code] + }) +} + +/** + * Convert tuples to string tuples + * + * [[int code, Uint8Array]... ] -> [[int code, str addr]... ] + * + * @param {Array<[number, Uint8Array?]>} tuples + * @returns {Array<[number, string?]>} + */ + +function tuplesToStringTuples (tuples) { + return tuples.map(tup => { + const proto = protoFromTuple(tup) + if (tup[1]) { + return [proto.code, convert.toString(proto.code, tup[1])] + } + return [proto.code] + }) +} + +// [[int code, Uint8Array ]... ] -> Uint8Array +/** + * @param {[number, Uint8Array?][]} tuples + */ +function tuplesToBytes (tuples) { + return fromBytes(uint8ArrayConcat(tuples.map((/** @type {any[]} */ tup) => { + const proto = protoFromTuple(tup) + let buf = Uint8Array.from(varint.encode(proto.code)) + + if (tup.length > 1) { + buf = uint8ArrayConcat([buf, tup[1]]) // add address buffer + } + + return buf + }))) +} + +/** + * @param {import("./types").Protocol} p + * @param {Uint8Array | number[]} addr + */ +function sizeForAddr (p, addr) { + if (p.size > 0) { + return p.size / 8 + } else if (p.size === 0) { + return 0 + } else { + const size = varint.decode(addr) + return size + varint.decode.bytes + } +} + +/** + * + * @param {Uint8Array} buf + * @returns {Array<[number, Uint8Array?]>} + */ +function bytesToTuples (buf) { + /** @type {Array<[number, Uint8Array?]>} */ + const tuples = [] + let i = 0 + while (i < buf.length) { + const code = varint.decode(buf, i) + const n = varint.decode.bytes + + const p = protocols(code) + + const size = sizeForAddr(p, buf.slice(i + n)) + + if (size === 0) { + tuples.push([code]) + i += n + continue + } + + const addr = buf.slice(i + n, i + n + size) + + i += (size + n) + + if (i > buf.length) { // did not end _exactly_ at buffer.length + throw ParseError('Invalid address Uint8Array: ' + uint8ArrayToString(buf, 'base16')) + } + + // ok, tuple seems good. + tuples.push([code, addr]) + } + + return tuples +} + +// Uint8Array -> String +/** + * @param {Uint8Array} buf + */ +function bytesToString (buf) { + const a = bytesToTuples(buf) + const b = tuplesToStringTuples(a) + return stringTuplesToString(b) +} + +// String -> Uint8Array +/** + * @param {string} str + */ +function stringToBytes (str) { + str = cleanPath(str) + const a = stringToStringTuples(str) + const b = stringTuplesToTuples(a) + + return tuplesToBytes(b) +} + +// String -> Uint8Array +/** + * @param {string} str + */ +function fromString (str) { + return stringToBytes(str) +} + +// Uint8Array -> Uint8Array +/** + * @param {Uint8Array} buf + */ +function fromBytes (buf) { + const err = validateBytes(buf) + if (err) throw err + return Uint8Array.from(buf) // copy +} + +/** + * @param {Uint8Array} buf + */ +function validateBytes (buf) { + try { + bytesToTuples(buf) // try to parse. will throw if breaks + } catch (err) { + return err + } +} + +/** + * @param {Uint8Array} buf + */ +function isValidBytes (buf) { + return validateBytes(buf) === undefined +} + +/** + * @param {string} str + */ +function cleanPath (str) { + return '/' + str.trim().split('/').filter((/** @type {any} */ a) => a).join('/') +} + +/** + * @param {string} str + */ +function ParseError (str) { + return new Error('Error parsing address: ' + str) +} + +/** + * @param {any[]} tup + */ +function protoFromTuple (tup) { + const proto = protocols(tup[0]) + return proto +} + + +/***/ }), + +/***/ 73095: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const ip = __nccwpck_require__(95416) +const protocols = __nccwpck_require__(17046) +const { CID } = __nccwpck_require__(24247) +const { base32 } = __nccwpck_require__(70784) +const { base58btc } = __nccwpck_require__(49108) +const Digest = __nccwpck_require__(81168) +const varint = __nccwpck_require__(52865) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) +const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) + +module.exports = Convert + +// converts (serializes) addresses +/** + * @param {string} proto + * @param {string | Uint8Array} a + */ +function Convert (proto, a) { + if (a instanceof Uint8Array) { + return Convert.toString(proto, a) + } else { + return Convert.toBytes(proto, a) + } +} + +/** + * Convert [code,Uint8Array] to string + * + * @param {number|string} proto + * @param {Uint8Array} buf + * @returns {string} + */ +Convert.toString = function convertToString (proto, buf) { + const protocol = protocols(proto) + switch (protocol.code) { + case 4: // ipv4 + case 41: // ipv6 + return bytes2ip(buf) + + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return bytes2port(buf).toString() + + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 777: // memory + return bytes2str(buf) + + case 421: // ipfs + return bytes2mh(buf) + case 444: // onion + return bytes2onion(buf) + case 445: // onion3 + return bytes2onion(buf) + default: + return uint8ArrayToString(buf, 'base16') // no clue. convert to hex + } +} + +Convert.toBytes = function convertToBytes (/** @type {string | number } */ proto, /** @type {string} */ str) { + const protocol = protocols(proto) + switch (protocol.code) { + case 4: // ipv4 + return ip2bytes(str) + case 41: // ipv6 + return ip2bytes(str) + + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return port2bytes(parseInt(str, 10)) + + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 777: // memory + return str2bytes(str) + + case 421: // ipfs + return mh2bytes(str) + case 444: // onion + return onion2bytes(str) + case 445: // onion3 + return onion32bytes(str) + default: + return uint8ArrayFromString(str, 'base16') // no clue. convert from hex + } +} + +/** + * @param {string} ipString + */ +function ip2bytes (ipString) { + if (!ip.isIP(ipString)) { + throw new Error('invalid ip address') + } + return ip.toBytes(ipString) +} + +/** + * @param {Uint8Array} ipBuff + */ +function bytes2ip (ipBuff) { + const ipString = ip.toString(ipBuff) + if (!ipString || !ip.isIP(ipString)) { + throw new Error('invalid ip address') + } + return ipString +} + +/** + * @param {number} port + */ +function port2bytes (port) { + const buf = new ArrayBuffer(2) + const view = new DataView(buf) + view.setUint16(0, port) + + return new Uint8Array(buf) +} + +/** + * @param {Uint8Array} buf + */ +function bytes2port (buf) { + const view = new DataView(buf.buffer) + return view.getUint16(buf.byteOffset) +} + +/** + * @param {string} str + */ +function str2bytes (str) { + const buf = uint8ArrayFromString(str) + const size = Uint8Array.from(varint.encode(buf.length)) + return uint8ArrayConcat([size, buf], size.length + buf.length) +} + +/** + * @param {Uint8Array} buf + */ +function bytes2str (buf) { + const size = varint.decode(buf) + buf = buf.slice(varint.decode.bytes) + + if (buf.length !== size) { + throw new Error('inconsistent lengths') + } + + return uint8ArrayToString(buf) +} + +/** + * @param {string} hash - base58btc string + */ +function mh2bytes (hash) { + let mh + + if (hash[0] === 'Q' || hash[0] === '1') { + mh = Digest.decode(base58btc.decode(`z${hash}`)).bytes + } else { + mh = CID.parse(hash).multihash.bytes + } + + // the address is a varint prefixed multihash string representation + const size = Uint8Array.from(varint.encode(mh.length)) + return uint8ArrayConcat([size, mh], size.length + mh.length) +} + +/** + * Converts bytes to bas58btc string + * + * @param {Uint8Array} buf + * @returns {string} base58btc string + */ +function bytes2mh (buf) { + const size = varint.decode(buf) + const address = buf.slice(varint.decode.bytes) + + if (address.length !== size) { + throw new Error('inconsistent lengths') + } + + return uint8ArrayToString(address, 'base58btc') +} + +/** + * @param {string} str + */ +function onion2bytes (str) { + const addr = str.split(':') + if (addr.length !== 2) { + throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') + } + if (addr[0].length !== 16) { + throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion address.') + } + + // onion addresses do not include the multibase prefix, add it before decoding + const buf = base32.decode('b' + addr[0]) + + // onion port number + const port = parseInt(addr[1], 10) + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)') + } + const portBuf = port2bytes(port) + return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) +} + +/** + * @param {string} str + */ +function onion32bytes (str) { + const addr = str.split(':') + if (addr.length !== 2) { + throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') + } + if (addr[0].length !== 56) { + throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion3 address.') + } + // onion addresses do not include the multibase prefix, add it before decoding + const buf = base32.decode('b' + addr[0]) + + // onion port number + const port = parseInt(addr[1], 10) + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)') + } + const portBuf = port2bytes(port) + return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) +} + +/** + * @param {Uint8Array} buf + */ +function bytes2onion (buf) { + const addrBytes = buf.slice(0, buf.length - 2) + const portBytes = buf.slice(buf.length - 2) + const addr = uint8ArrayToString(addrBytes, 'base32') + const port = bytes2port(portBytes) + return addr + ':' + port +} + + +/***/ }), + +/***/ 17907: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const codec = __nccwpck_require__(41437) +const protocols = __nccwpck_require__(17046) +const varint = __nccwpck_require__(52865) +const { CID } = __nccwpck_require__(24247) +const { base58btc } = __nccwpck_require__(49108) +const errCode = __nccwpck_require__(5822) +const inspect = Symbol.for('nodejs.util.inspect.custom') +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) + +/** + * @typedef {(addr: Multiaddr) => Promise} Resolver + * @typedef {string | Multiaddr | Uint8Array | null} MultiaddrInput + * @typedef {import('./types').MultiaddrObject} MultiaddrObject + * @typedef {import('./types').Protocol} Protocol + */ + +/** @type {Map} */ +const resolvers = new Map() +const symbol = Symbol.for('@multiformats/js-multiaddr/multiaddr') + +/** + * Creates a [multiaddr](https://github.com/multiformats/multiaddr) from + * a Uint8Array, String or another Multiaddr instance + * public key. + * + */ +class Multiaddr { + /** + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * ``` + * + * @param {MultiaddrInput} [addr] - If String or Uint8Array, needs to adhere to the address format of a [multiaddr](https://github.com/multiformats/multiaddr#string-format) + */ + constructor (addr) { + // default + if (addr == null) { + addr = '' + } + + // Define symbol + Object.defineProperty(this, symbol, { value: true }) + + if (addr instanceof Uint8Array) { + /** @type {Uint8Array} - The raw bytes representing this multiaddress */ + this.bytes = codec.fromBytes(addr) + } else if (typeof addr === 'string') { + if (addr.length > 0 && addr.charAt(0) !== '/') { + throw new Error(`multiaddr "${addr}" must start with a "/"`) + } + this.bytes = codec.fromString(addr) + } else if (Multiaddr.isMultiaddr(addr)) { // Multiaddr + this.bytes = codec.fromBytes(addr.bytes) // validate + copy buffer + } else { + throw new Error('addr must be a string, Buffer, or another Multiaddr') + } + } + + /** + * Returns Multiaddr as a String + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toString() + * // '/ip4/127.0.0.1/tcp/4001' + * ``` + */ + toString () { + return codec.bytesToString(this.bytes) + } + + /** + * Returns Multiaddr as a JSON encoded object + * + * @example + * ```js + * JSON.stringify(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) + * // '/ip4/127.0.0.1/tcp/4001' + * ``` + */ + toJSON () { + return this.toString() + } + + /** + * Returns Multiaddr as a convinient options object to be used with net.createConnection + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toOptions() + * // { family: 4, host: '127.0.0.1', transport: 'tcp', port: 4001 } + * ``` + */ + toOptions () { + /** @type {MultiaddrObject} */ + const opts = {} + const parsed = this.toString().split('/') + opts.family = parsed[1] === 'ip4' ? 4 : 6 + opts.host = parsed[2] + opts.transport = parsed[3] + opts.port = parseInt(parsed[4]) + return opts + } + + /** + * Returns the protocols the Multiaddr is defined with, as an array of objects, in + * left-to-right order. Each object contains the protocol code, protocol name, + * and the size of its address space in bits. + * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protos() + * // [ { code: 4, size: 32, name: 'ip4' }, + * // { code: 6, size: 16, name: 'tcp' } ] + * ``` + * + * @returns {Protocol[]} protocols - All the protocols the address is composed of + */ + protos () { + return this.protoCodes().map(code => Object.assign({}, protocols(code))) + } + + /** + * Returns the codes of the protocols in left-to-right order. + * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) + * + * @example + * ```js + * Multiaddr('/ip4/127.0.0.1/tcp/4001').protoCodes() + * // [ 4, 6 ] + * ``` + * + * @returns {number[]} protocol codes + */ + protoCodes () { + const codes = [] + const buf = this.bytes + let i = 0 + while (i < buf.length) { + const code = varint.decode(buf, i) + const n = varint.decode.bytes + + const p = protocols(code) + const size = codec.sizeForAddr(p, buf.slice(i + n)) + + i += (size + n) + codes.push(code) + } + + return codes + } + + /** + * Returns the names of the protocols in left-to-right order. + * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protoNames() + * // [ 'ip4', 'tcp' ] + * ``` + * + * @returns {string[]} protocol names + */ + protoNames () { + return this.protos().map(proto => proto.name) + } + + /** + * Returns a tuple of parts + * + * @example + * ```js + * new Multiaddr("/ip4/127.0.0.1/tcp/4001").tuples() + * // [ [ 4, ], [ 6, ] ] + * ``` + */ + tuples () { + return codec.bytesToTuples(this.bytes) + } + + /** + * Returns a tuple of string/number parts + * - tuples[][0] = code of protocol + * - tuples[][1] = contents of address + * + * @example + * ```js + * new Multiaddr("/ip4/127.0.0.1/tcp/4001").stringTuples() + * // [ [ 4, '127.0.0.1' ], [ 6, '4001' ] ] + * ``` + */ + stringTuples () { + const t = codec.bytesToTuples(this.bytes) + return codec.tuplesToStringTuples(t) + } + + /** + * Encapsulates a Multiaddr in another Multiaddr + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') + * // + * + * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * + * const mh3 = mh1.encapsulate(mh2) + * // + * + * mh3.toString() + * // '/ip4/8.8.8.8/tcp/1080/ip4/127.0.0.1/tcp/4001' + * ``` + * + * @param {MultiaddrInput} addr - Multiaddr to add into this Multiaddr + */ + encapsulate (addr) { + addr = new Multiaddr(addr) + return new Multiaddr(this.toString() + addr.toString()) + } + + /** + * Decapsulates a Multiaddr from another Multiaddr + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') + * // + * + * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * + * const mh3 = mh1.encapsulate(mh2) + * // + * + * mh3.decapsulate(mh2).toString() + * // '/ip4/8.8.8.8/tcp/1080' + * ``` + * + * @param {Multiaddr | string} addr - Multiaddr to remove from this Multiaddr + * @returns {Multiaddr} + */ + decapsulate (addr) { + const addrString = addr.toString() + const s = this.toString() + const i = s.lastIndexOf(addrString) + if (i < 0) { + throw new Error('Address ' + this + ' does not contain subaddress: ' + addr) + } + return new Multiaddr(s.slice(0, i)) + } + + /** + * A more reliable version of `decapsulate` if you are targeting a + * specific code, such as 421 (the `p2p` protocol code). The last index of the code + * will be removed from the `Multiaddr`, and a new instance will be returned. + * If the code is not present, the original `Multiaddr` is returned. + * + * @example + * ```js + * const addr = new Multiaddr('/ip4/0.0.0.0/tcp/8080/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC') + * // + * + * addr.decapsulateCode(421).toString() + * // '/ip4/0.0.0.0/tcp/8080' + * + * new Multiaddr('/ip4/127.0.0.1/tcp/8080').decapsulateCode(421).toString() + * // '/ip4/127.0.0.1/tcp/8080' + * ``` + * + * @param {number} code - The code of the protocol to decapsulate from this Multiaddr + * @returns {Multiaddr} + */ + decapsulateCode (code) { + const tuples = this.tuples() + for (let i = tuples.length - 1; i >= 0; i--) { + if (tuples[i][0] === code) { + return new Multiaddr(codec.tuplesToBytes(tuples.slice(0, i))) + } + } + return this + } + + /** + * Extract the peerId if the multiaddr contains one + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/ipfs/QmValidBase58string') + * // + * + * // should return QmValidBase58string or null if the id is missing or invalid + * const peerId = mh1.getPeerId() + * ``` + * + * @returns {string | null} peerId - The id of the peer or null if invalid or missing from the ma + */ + getPeerId () { + try { + const tuples = this.stringTuples().filter((tuple) => { + if (tuple[0] === protocols.names.ipfs.code) { + return true + } + return false + }) + + // Get the last ipfs tuple ['ipfs', 'peerid string'] + const tuple = tuples.pop() + if (tuple && tuple[1]) { + const peerIdStr = tuple[1] + + // peer id is base58btc encoded string but not multibase encoded so add the `z` + // prefix so we can validate that it is correctly encoded + if (peerIdStr[0] === 'Q' || peerIdStr[0] === '1') { + return uint8ArrayToString(base58btc.decode(`z${peerIdStr}`), 'base58btc') + } + + // try to parse peer id as CID + return uint8ArrayToString(CID.parse(peerIdStr).multihash.bytes, 'base58btc') + } + + return null + } catch (e) { + return null + } + } + + /** + * Extract the path if the multiaddr contains one + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/unix/tmp/p2p.sock') + * // + * + * // should return utf8 string or null if the id is missing or invalid + * const path = mh1.getPath() + * ```js + * + * @returns {string | null} path - The path of the multiaddr, or null if no path protocol is present + */ + getPath () { + let path = null + try { + path = this.stringTuples().filter((tuple) => { + const proto = protocols(tuple[0]) + if (proto.path) { + return true + } + return false + })[0][1] + + if (!path) { + path = null + } + } catch (e) { + path = null + } + return path + } + + /** + * Checks if two Multiaddrs are the same + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') + * // + * + * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * + * mh1.equals(mh1) + * // true + * + * mh1.equals(mh2) + * // false + * ``` + * + * @param {Multiaddr} addr + * @returns {boolean} + */ + equals (addr) { + return uint8ArrayEquals(this.bytes, addr.bytes) + } + + /** + * Resolve multiaddr if containing resolvable hostname. + * + * @example + * ```js + * Multiaddr.resolvers.set('dnsaddr', resolverFunction) + * const mh1 = new Multiaddr('/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb') + * const resolvedMultiaddrs = await mh1.resolve() + * // [ + * // , + * // , + * // + * // ] + * ``` + * + * @returns {Promise>} + */ + async resolve () { + const resolvableProto = this.protos().find((p) => p.resolvable) + + // Multiaddr is not resolvable? + if (!resolvableProto) { + return [this] + } + + const resolver = resolvers.get(resolvableProto.name) + if (!resolver) { + throw errCode(new Error(`no available resolver for ${resolvableProto.name}`), 'ERR_NO_AVAILABLE_RESOLVER') + } + + const addresses = await resolver(this) + return addresses.map((a) => new Multiaddr(a)) + } + + /** + * Gets a Multiaddrs node-friendly address object. Note that protocol information + * is left out: in Node (and most network systems) the protocol is unknowable + * given only the address. + * + * Has to be a ThinWaist Address, otherwise throws error + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').nodeAddress() + * // {family: 4, address: '127.0.0.1', port: 4001} + * ``` + * + * @returns {{family: 4 | 6, address: string, port: number}} + * @throws {Error} Throws error if Multiaddr is not a Thin Waist address + */ + nodeAddress () { + const codes = this.protoCodes() + const names = this.protoNames() + const parts = this.toString().split('/').slice(1) + + if (parts.length < 4) { + throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".') + } else if (codes[0] !== 4 && codes[0] !== 41 && codes[0] !== 54 && codes[0] !== 55) { + throw new Error(`no protocol with name: "'${names[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`) + } else if (parts[2] !== 'tcp' && parts[2] !== 'udp') { + throw new Error(`no protocol with name: "'${names[1]}'". Must have a valid transport protocol: "{tcp, udp}".`) + } + + return { + family: (codes[0] === 41 || codes[0] === 55) ? 6 : 4, + address: parts[1], + port: parseInt(parts[3]) // tcp or udp port + } + } + + /** + * Returns if a Multiaddr is a Thin Waist address or not. + * + * Thin Waist is if a Multiaddr adheres to the standard combination of: + * + * `{IPv4, IPv6}/{TCP, UDP}` + * + * @example + * ```js + * const mh1 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') + * // + * const mh2 = new Multiaddr('/ip4/192.168.2.1/tcp/5001') + * // + * const mh3 = mh1.encapsulate(mh2) + * // + * const mh4 = new Multiaddr('/ip4/127.0.0.1/tcp/2000/wss/p2p-webrtc-star/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSooo2a') + * // + * mh1.isThinWaistAddress() + * // true + * mh2.isThinWaistAddress() + * // true + * mh3.isThinWaistAddress() + * // false + * mh4.isThinWaistAddress() + * // false + * ``` + * + * @param {Multiaddr} [addr] - Defaults to using `this` instance + */ + isThinWaistAddress (addr) { + const protos = (addr || this).protos() + + if (protos.length !== 2) { + return false + } + + if (protos[0].code !== 4 && protos[0].code !== 41) { + return false + } + if (protos[1].code !== 6 && protos[1].code !== 273) { + return false + } + return true + } + + /** + * Creates a Multiaddr from a node-friendly address object + * + * @example + * ```js + * Multiaddr.fromNodeAddress({address: '127.0.0.1', port: '4001'}, 'tcp') + * // + * ``` + * + * @param {{family: 4 | 6, address: string, port: number}} addr + * @param {string} transport + */ + static fromNodeAddress (addr, transport) { + if (!addr) { throw new Error('requires node address object') } + if (!transport) { throw new Error('requires transport protocol') } + let ip + switch (addr.family) { + case 4: + ip = 'ip4' + break + case 6: + ip = 'ip6' + break + default: + throw Error(`Invalid addr family. Got '${addr.family}' instead of 4 or 6`) + } + return new Multiaddr('/' + [ip, addr.address, transport, addr.port].join('/')) + } + + /** + * Returns if something is a Multiaddr that is a name + * + * @param {Multiaddr} addr + * @returns {boolean} isName + */ + static isName (addr) { + if (!Multiaddr.isMultiaddr(addr)) { + return false + } + + // if a part of the multiaddr is resolvable, then return true + return addr.protos().some((proto) => proto.resolvable) + } + + /** + * Check if object is a CID instance + * + * @param {any} value + * @returns {value is Multiaddr} + */ + static isMultiaddr (value) { + return value instanceof Multiaddr || Boolean(value && value[symbol]) + } + + /** + * Returns Multiaddr as a human-readable string. + * For post Node.js v10.0.0. + * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect + * + * @example + * ```js + * console.log(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) + * // '' + * ``` + * + * @returns {string} + */ + [inspect] () { + return '' + } + + /** + * Returns Multiaddr as a human-readable string. + * Fallback for pre Node.js v10.0.0. + * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect + * + * @example + * ```js + * new Multiaddr('/ip4/127.0.0.1/tcp/4001').inspect() + * // '' + * ``` + * + * @returns {string} + */ + inspect () { + return '' + } +} + +/** + * Object containing table, names and codes of all supported protocols. + * To get the protocol values from a Multiaddr, you can use + * [`.protos()`](#multiaddrprotos), + * [`.protoCodes()`](#multiaddrprotocodes) or + * [`.protoNames()`](#multiaddrprotonames) + * + * @returns {{table: Array, names: Object, codes: Object}} + */ +Multiaddr.protocols = protocols + +Multiaddr.resolvers = resolvers + +/** + * Static factory + * + * @param {MultiaddrInput} addr + */ +function multiaddr (addr) { + return new Multiaddr(addr) +} + +module.exports = { Multiaddr, multiaddr, protocols, resolvers } + + +/***/ }), + +/***/ 95416: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const isIp = __nccwpck_require__(89837) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) + +const isIP = isIp +const isV4 = isIp.v4 +const isV6 = isIp.v6 + +// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L7 +// @ts-ignore - this is copied from the link above better to keep it the same +const toBytes = function (ip, buff, offset) { + offset = ~~offset + + let result + + if (isV4(ip)) { + result = buff || new Uint8Array(offset + 4) + // @ts-ignore + // eslint-disable-next-line array-callback-return + ip.split(/\./g).map(function (byte) { + result[offset++] = parseInt(byte, 10) & 0xff + }) + } else if (isV6(ip)) { + const sections = ip.split(':', 8) + + let i + for (i = 0; i < sections.length; i++) { + const isv4 = isV4(sections[i]) + let v4Buffer + + if (isv4) { + v4Buffer = toBytes(sections[i]) + sections[i] = uint8ArrayToString(v4Buffer.slice(0, 2), 'base16') + } + + if (v4Buffer && ++i < 8) { + sections.splice(i, 0, uint8ArrayToString(v4Buffer.slice(2, 4), 'base16')) + } + } + + if (sections[0] === '') { + while (sections.length < 8) sections.unshift('0') + } else if (sections[sections.length - 1] === '') { + while (sections.length < 8) sections.push('0') + } else if (sections.length < 8) { + for (i = 0; i < sections.length && sections[i] !== ''; i++); + const argv = [i, '1'] + for (i = 9 - sections.length; i > 0; i--) { + argv.push('0') + } + sections.splice.apply(sections, argv) + } + + result = buff || new Uint8Array(offset + 16) + for (i = 0; i < sections.length; i++) { + const word = parseInt(sections[i], 16) + result[offset++] = (word >> 8) & 0xff + result[offset++] = word & 0xff + } + } + + if (!result) { + throw Error('Invalid ip address: ' + ip) + } + + return result +} + +// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63 +// @ts-ignore - this is copied from the link above better to keep it the same +const toString = function (buff, offset, length) { + offset = ~~offset + length = length || (buff.length - offset) + + const result = [] + let string + const view = new DataView(buff.buffer) + if (length === 4) { + // IPv4 + for (let i = 0; i < length; i++) { + result.push(buff[offset + i]) + } + string = result.join('.') + } else if (length === 16) { + // IPv6 + for (let i = 0; i < length; i += 2) { + result.push(view.getUint16(offset + i).toString(16)) + } + string = result.join(':') + string = string.replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3') + string = string.replace(/:{3,4}/, '::') + } + + return string +} + +module.exports = { + isIP, + isV4, + isV6, + toBytes, + toString +} + + +/***/ }), + +/***/ 17046: +/***/ ((module) => { + +"use strict"; + +/** @typedef {import("./types").Protocol} Protocol */ + +/** + * Protocols + * + * @param {number | string} proto + * @returns {Protocol} + */ +function Protocols (proto) { + if (typeof (proto) === 'number') { + if (Protocols.codes[proto]) { + return Protocols.codes[proto] + } + + throw new Error('no protocol with code: ' + proto) + } else if (typeof (proto) === 'string') { + if (Protocols.names[proto]) { + return Protocols.names[proto] + } + + throw new Error('no protocol with name: ' + proto) + } + + throw new Error('invalid protocol id type: ' + proto) +} + +const V = -1 +Protocols.lengthPrefixedVarSize = V +Protocols.V = V + +/** @type {Array<[number, number, string, (string|boolean)?, string?]>} */ +Protocols.table = [ + [4, 32, 'ip4'], + [6, 16, 'tcp'], + [33, 16, 'dccp'], + [41, 128, 'ip6'], + [42, V, 'ip6zone'], + [53, V, 'dns', 'resolvable'], + [54, V, 'dns4', 'resolvable'], + [55, V, 'dns6', 'resolvable'], + [56, V, 'dnsaddr', 'resolvable'], + [132, 16, 'sctp'], + [273, 16, 'udp'], + [275, 0, 'p2p-webrtc-star'], + [276, 0, 'p2p-webrtc-direct'], + [277, 0, 'p2p-stardust'], + [290, 0, 'p2p-circuit'], + [301, 0, 'udt'], + [302, 0, 'utp'], + [400, V, 'unix', false, 'path'], + // `ipfs` is added before `p2p` for legacy support. + // All text representations will default to `p2p`, but `ipfs` will + // still be supported + [421, V, 'ipfs'], + // `p2p` is the preferred name for 421, and is now the default + [421, V, 'p2p'], + [443, 0, 'https'], + [444, 96, 'onion'], + [445, 296, 'onion3'], + [446, V, 'garlic64'], + [460, 0, 'quic'], + [477, 0, 'ws'], + [478, 0, 'wss'], + [479, 0, 'p2p-websocket-star'], + [480, 0, 'http'], + [777, V, 'memory'] +] +/** @type {Record} */ +Protocols.names = {} +/** @type {Record} */ +Protocols.codes = {} + +// populate tables +Protocols.table.map(row => { + const proto = p.apply(null, row) + Protocols.codes[proto.code] = proto + Protocols.names[proto.name] = proto + return null +}) + +Protocols.object = p + +/** + * + * Create a protocol + * + * @param {number} code + * @param {number} size + * @param {string} name + * @param {any} [resolvable] + * @param {any} [path] + * @returns {Protocol} + */ +function p (code, size, name, resolvable, path) { + return { + code, + size, + name, + resolvable: Boolean(resolvable), + path: Boolean(path) + } +} + +module.exports = Protocols + + +/***/ }), + +/***/ 76975: +/***/ ((module) => { + +module.exports = read + +var MSB = 0x80 + , REST = 0x7F + +function read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length + + do { + if (counter >= l || shift > 49) { + read.bytes = 0 + throw new RangeError('Could not decode varint') + } + b = buf[counter++] + res += shift < 28 + ? (b & REST) << shift + : (b & REST) * Math.pow(2, shift) + shift += 7 + } while (b >= MSB) + + read.bytes = counter - offset + + return res +} + + +/***/ }), + +/***/ 32291: +/***/ ((module) => { + +module.exports = encode + +var MSB = 0x80 + , REST = 0x7F + , MSBALL = ~REST + , INT = Math.pow(2, 31) + +function encode(num, out, offset) { + if (Number.MAX_SAFE_INTEGER && num > Number.MAX_SAFE_INTEGER) { + encode.bytes = 0 + throw new RangeError('Could not encode varint') + } + out = out || [] + offset = offset || 0 + var oldOffset = offset + + while(num >= INT) { + out[offset++] = (num & 0xFF) | MSB + num /= 128 + } + while(num & MSBALL) { + out[offset++] = (num & 0xFF) | MSB + num >>>= 7 + } + out[offset] = num | 0 + + encode.bytes = offset - oldOffset + 1 + + return out +} + + +/***/ }), + +/***/ 52865: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = { + encode: __nccwpck_require__(32291) + , decode: __nccwpck_require__(76975) + , encodingLength: __nccwpck_require__(52845) +} + + +/***/ }), + +/***/ 52845: +/***/ ((module) => { + + +var N1 = Math.pow(2, 7) +var N2 = Math.pow(2, 14) +var N3 = Math.pow(2, 21) +var N4 = Math.pow(2, 28) +var N5 = Math.pow(2, 35) +var N6 = Math.pow(2, 42) +var N7 = Math.pow(2, 49) +var N8 = Math.pow(2, 56) +var N9 = Math.pow(2, 63) + +module.exports = function (value) { + return ( + value < N1 ? 1 + : value < N2 ? 2 + : value < N3 ? 3 + : value < N4 ? 4 + : value < N5 ? 5 + : value < N6 ? 6 + : value < N7 ? 7 + : value < N8 ? 8 + : value < N9 ? 9 + : 10 + ) +} + + +/***/ }), + +/***/ 16924: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var baseX$1 = __nccwpck_require__(33033); +var bytes = __nccwpck_require__(87450); +======= +var baseX$1 = __nccwpck_require__(21357); +var bytes = __nccwpck_require__(16570); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +class Encoder { + constructor(name, prefix, baseEncode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + } + encode(bytes) { + if (bytes instanceof Uint8Array) { + return `${ this.prefix }${ this.baseEncode(bytes) }`; + } else { + throw Error('Unknown type, must be binary type'); + } + } +} +class Decoder { + constructor(name, prefix, baseDecode) { + this.name = name; + this.prefix = prefix; + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character'); + } + this.prefixCodePoint = prefix.codePointAt(0); + this.baseDecode = baseDecode; + } + decode(text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${ JSON.stringify(text) }, ${ this.name } decoder only supports inputs prefixed with ${ this.prefix }`); + } + return this.baseDecode(text.slice(this.prefix.length)); + } else { + throw Error('Can only multibase decode strings'); + } + } + or(decoder) { + return or(this, decoder); + } +} +class ComposedDecoder { + constructor(decoders) { + this.decoders = decoders; + } + or(decoder) { + return or(this, decoder); + } + decode(input) { + const prefix = input[0]; + const decoder = this.decoders[prefix]; + if (decoder) { + return decoder.decode(input); + } else { + throw RangeError(`Unable to decode multibase string ${ JSON.stringify(input) }, only inputs prefixed with ${ Object.keys(this.decoders) } are supported`); + } + } +} +const or = (left, right) => new ComposedDecoder({ + ...left.decoders || { [left.prefix]: left }, + ...right.decoders || { [right.prefix]: right } +}); +class Codec { + constructor(name, prefix, baseEncode, baseDecode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + this.baseDecode = baseDecode; + this.encoder = new Encoder(name, prefix, baseEncode); + this.decoder = new Decoder(name, prefix, baseDecode); + } + encode(input) { + return this.encoder.encode(input); + } + decode(input) { + return this.decoder.decode(input); + } +} +const from = ({name, prefix, encode, decode}) => new Codec(name, prefix, encode, decode); +const baseX = ({prefix, name, alphabet}) => { + const {encode, decode} = baseX$1(alphabet, name); + return from({ + prefix, + name, + encode, + decode: text => bytes.coerce(decode(text)) + }); +}; +const decode = (string, alphabet, bitsPerChar, name) => { + const codes = {}; + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i; + } + let end = string.length; + while (string[end - 1] === '=') { + --end; + } + const out = new Uint8Array(end * bitsPerChar / 8 | 0); + let bits = 0; + let buffer = 0; + let written = 0; + for (let i = 0; i < end; ++i) { + const value = codes[string[i]]; + if (value === undefined) { + throw new SyntaxError(`Non-${ name } character`); + } + buffer = buffer << bitsPerChar | value; + bits += bitsPerChar; + if (bits >= 8) { + bits -= 8; + out[written++] = 255 & buffer >> bits; + } + } + if (bits >= bitsPerChar || 255 & buffer << 8 - bits) { + throw new SyntaxError('Unexpected end of data'); + } + return out; +}; +const encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '='; + const mask = (1 << bitsPerChar) - 1; + let out = ''; + let bits = 0; + let buffer = 0; + for (let i = 0; i < data.length; ++i) { + buffer = buffer << 8 | data[i]; + bits += 8; + while (bits > bitsPerChar) { + bits -= bitsPerChar; + out += alphabet[mask & buffer >> bits]; + } + } + if (bits) { + out += alphabet[mask & buffer << bitsPerChar - bits]; + } + if (pad) { + while (out.length * bitsPerChar & 7) { + out += '='; + } + } + return out; +}; +const rfc4648 = ({name, prefix, bitsPerChar, alphabet}) => { + return from({ + prefix, + name, + encode(input) { + return encode(input, alphabet, bitsPerChar); + }, + decode(input) { + return decode(input, alphabet, bitsPerChar, name); + } + }); +}; + +exports.Codec = Codec; +exports.baseX = baseX; +exports.from = from; +exports.or = or; +exports.rfc4648 = rfc4648; + + +/***/ }), + +<<<<<<< HEAD +/***/ 93174: +======= +/***/ 86007: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +======= +var base = __nccwpck_require__(16924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const base10 = base.baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}); + +exports.base10 = base10; + + +/***/ }), + +<<<<<<< HEAD +/***/ 35654: +======= +/***/ 98085: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +======= +var base = __nccwpck_require__(16924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const base16 = base.rfc4648({ + prefix: 'f', + name: 'base16', + alphabet: '0123456789abcdef', + bitsPerChar: 4 +}); +const base16upper = base.rfc4648({ + prefix: 'F', + name: 'base16upper', + alphabet: '0123456789ABCDEF', + bitsPerChar: 4 +}); + +exports.base16 = base16; +exports.base16upper = base16upper; + + +/***/ }), + +<<<<<<< HEAD +/***/ 11527: +======= +/***/ 16721: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +======= +var base = __nccwpck_require__(16924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const base2 = base.rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}); + +exports.base2 = base2; + + +/***/ }), + +<<<<<<< HEAD +/***/ 44001: +======= +/***/ 40411: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +======= +var base = __nccwpck_require__(16924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const alphabet = Array.from('\uD83D\uDE80\uD83E\uDE90\u2604\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09\u2600\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02\u2764\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09\u263A\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E\u270C\u2728\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D\u2763\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33\u270B\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13\u2B50\u2705\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6\u2714\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90\u2639\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20\u261D\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B\u26BD\uD83E\uDD19\u2615\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81\u26A1\uD83C\uDF1E\uD83C\uDF88\u274C\u270A\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C\u2708\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74\u25B6\u27A1\u2753\uD83D\uDC8E\uD83D\uDCB8\u2B07\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A\u26A0\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37\u260E\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51\u2744\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42'); +const alphabetBytesToChars = alphabet.reduce((p, c, i) => { + p[i] = c; + return p; +}, []); +const alphabetCharsToBytes = alphabet.reduce((p, c, i) => { + p[c.codePointAt(0)] = i; + return p; +}, []); +function encode(data) { + return data.reduce((p, c) => { + p += alphabetBytesToChars[c]; + return p; + }, ''); +} +function decode(str) { + const byts = []; + for (const char of str) { + const byt = alphabetCharsToBytes[char.codePointAt(0)]; + if (byt === undefined) { + throw new Error(`Non-base256emoji character: ${ char }`); + } + byts.push(byt); + } + return new Uint8Array(byts); +} +const base256emoji = base.from({ + prefix: '\uD83D\uDE80', + name: 'base256emoji', + encode, + decode +}); + +exports.base256emoji = base256emoji; + + +/***/ }), + +<<<<<<< HEAD +/***/ 14637: +======= +/***/ 70784: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +======= +var base = __nccwpck_require__(16924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const base32 = base.rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}); +const base32upper = base.rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}); +const base32pad = base.rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}); +const base32padupper = base.rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}); +const base32hex = base.rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}); +const base32hexupper = base.rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}); +const base32hexpad = base.rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}); +const base32hexpadupper = base.rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}); +const base32z = base.rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}); + +exports.base32 = base32; +exports.base32hex = base32hex; +exports.base32hexpad = base32hexpad; +exports.base32hexpadupper = base32hexpadupper; +exports.base32hexupper = base32hexupper; +exports.base32pad = base32pad; +exports.base32padupper = base32padupper; +exports.base32upper = base32upper; +exports.base32z = base32z; + + +/***/ }), + +<<<<<<< HEAD +/***/ 66800: +======= +/***/ 76443: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +======= +var base = __nccwpck_require__(16924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const base36 = base.baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}); +const base36upper = base.baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}); + +exports.base36 = base36; +exports.base36upper = base36upper; + + +/***/ }), + +<<<<<<< HEAD +/***/ 50119: +======= +/***/ 49108: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +======= +var base = __nccwpck_require__(16924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const base58btc = base.baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}); +const base58flickr = base.baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}); + +exports.base58btc = base58btc; +exports.base58flickr = base58flickr; + + +/***/ }), + +<<<<<<< HEAD +/***/ 25631: +======= +/***/ 98197: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +======= +var base = __nccwpck_require__(16924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const base64 = base.rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}); +const base64pad = base.rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}); +const base64url = base.rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}); +const base64urlpad = base.rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}); + +exports.base64 = base64; +exports.base64pad = base64pad; +exports.base64url = base64url; +exports.base64urlpad = base64urlpad; + + +/***/ }), + +<<<<<<< HEAD +/***/ 14075: +======= +/***/ 3529: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +======= +var base = __nccwpck_require__(16924); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const base8 = base.rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}); + +exports.base8 = base8; + + +/***/ }), + +<<<<<<< HEAD +/***/ 79697: +======= +/***/ 28380: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var base = __nccwpck_require__(91809); +var bytes = __nccwpck_require__(87450); +======= +var base = __nccwpck_require__(16924); +var bytes = __nccwpck_require__(16570); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const identity = base.from({ + prefix: '\0', + name: 'identity', + encode: buf => bytes.toString(buf), + decode: str => bytes.fromString(str) +}); + +exports.identity = identity; + + +/***/ }), + +<<<<<<< HEAD +/***/ 22965: +======= +/***/ 42916: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var identity = __nccwpck_require__(79697); +var base2 = __nccwpck_require__(11527); +var base8 = __nccwpck_require__(14075); +var base10 = __nccwpck_require__(93174); +var base16 = __nccwpck_require__(35654); +var base32 = __nccwpck_require__(14637); +var base36 = __nccwpck_require__(66800); +var base58 = __nccwpck_require__(50119); +var base64 = __nccwpck_require__(25631); +var base256emoji = __nccwpck_require__(44001); +var sha2 = __nccwpck_require__(65484); +var identity$1 = __nccwpck_require__(14733); +var raw = __nccwpck_require__(55137); +var json = __nccwpck_require__(94633); +__nccwpck_require__(3992); +var cid = __nccwpck_require__(33862); +var hasher = __nccwpck_require__(83296); +var digest = __nccwpck_require__(65957); +var varint = __nccwpck_require__(3959); +var bytes = __nccwpck_require__(87450); +======= +var identity = __nccwpck_require__(28380); +var base2 = __nccwpck_require__(16721); +var base8 = __nccwpck_require__(3529); +var base10 = __nccwpck_require__(86007); +var base16 = __nccwpck_require__(98085); +var base32 = __nccwpck_require__(70784); +var base36 = __nccwpck_require__(76443); +var base58 = __nccwpck_require__(49108); +var base64 = __nccwpck_require__(98197); +var base256emoji = __nccwpck_require__(40411); +var sha2 = __nccwpck_require__(80960); +var identity$1 = __nccwpck_require__(53863); +var raw = __nccwpck_require__(4848); +var json = __nccwpck_require__(81245); +__nccwpck_require__(27331); +var cid = __nccwpck_require__(24247); +var hasher = __nccwpck_require__(62030); +var digest = __nccwpck_require__(81168); +var varint = __nccwpck_require__(55687); +var bytes = __nccwpck_require__(16570); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const bases = { + ...identity, + ...base2, + ...base8, + ...base10, + ...base16, + ...base32, + ...base36, + ...base58, + ...base64, + ...base256emoji +}; +const hashes = { + ...sha2, + ...identity$1 +}; +const codecs = { + raw, + json +}; + +exports.CID = cid.CID; +exports.hasher = hasher; +exports.digest = digest; +exports.varint = varint; +exports.bytes = bytes; +exports.bases = bases; +exports.codecs = codecs; +exports.hashes = hashes; + + +/***/ }), + +<<<<<<< HEAD +/***/ 87450: +======= +/***/ 44748: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +__nccwpck_require__(27331); +var cid = __nccwpck_require__(24247); +var bytes = __nccwpck_require__(16570); + +const readonly = ({enumerable = true, configurable = false} = {}) => ({ + enumerable, + configurable, + writable: false +}); +const links = function* (source, base) { + if (source == null) + return; + if (source instanceof Uint8Array) + return; + for (const [key, value] of Object.entries(source)) { + const path = [ + ...base, + key + ]; + if (value != null && typeof value === 'object') { + if (Array.isArray(value)) { + for (const [index, element] of value.entries()) { + const elementPath = [ + ...path, + index + ]; + const cid$1 = cid.CID.asCID(element); + if (cid$1) { + yield [ + elementPath.join('/'), + cid$1 + ]; + } else if (typeof element === 'object') { + yield* links(element, elementPath); + } + } + } else { + const cid$1 = cid.CID.asCID(value); + if (cid$1) { + yield [ + path.join('/'), + cid$1 + ]; + } else { + yield* links(value, path); + } + } + } + } +}; +const tree = function* (source, base) { + if (source == null) + return; + for (const [key, value] of Object.entries(source)) { + const path = [ + ...base, + key + ]; + yield path.join('/'); + if (value != null && !(value instanceof Uint8Array) && typeof value === 'object' && !cid.CID.asCID(value)) { + if (Array.isArray(value)) { + for (const [index, element] of value.entries()) { + const elementPath = [ + ...path, + index + ]; + yield elementPath.join('/'); + if (typeof element === 'object' && !cid.CID.asCID(element)) { + yield* tree(element, elementPath); + } + } + } else { + yield* tree(value, path); + } + } + } +}; +const get = (source, path) => { + let node = source; + for (const [index, key] of path.entries()) { + node = node[key]; + if (node == null) { + throw new Error(`Object has no property at ${ path.slice(0, index + 1).map(part => `[${ JSON.stringify(part) }]`).join('') }`); + } + const cid$1 = cid.CID.asCID(node); + if (cid$1) { + return { + value: cid$1, + remaining: path.slice(index + 1).join('/') + }; + } + } + return { value: node }; +}; +class Block { + constructor({cid, bytes, value}) { + if (!cid || !bytes || typeof value === 'undefined') + throw new Error('Missing required argument'); + this.cid = cid; + this.bytes = bytes; + this.value = value; + this.asBlock = this; + Object.defineProperties(this, { + cid: readonly(), + bytes: readonly(), + value: readonly(), + asBlock: readonly() + }); + } + links() { + return links(this.value, []); + } + tree() { + return tree(this.value, []); + } + get(path = '/') { + return get(this.value, path.split('/').filter(Boolean)); + } +} +const encode = async ({value, codec, hasher}) => { + if (typeof value === 'undefined') + throw new Error('Missing required argument "value"'); + if (!codec || !hasher) + throw new Error('Missing required argument: codec or hasher'); + const bytes = codec.encode(value); + const hash = await hasher.digest(bytes); + const cid$1 = cid.CID.create(1, codec.code, hash); + return new Block({ + value, + bytes, + cid: cid$1 + }); +}; +const decode = async ({bytes, codec, hasher}) => { + if (!bytes) + throw new Error('Missing required argument "bytes"'); + if (!codec || !hasher) + throw new Error('Missing required argument: codec or hasher'); + const value = codec.decode(bytes); + const hash = await hasher.digest(bytes); + const cid$1 = cid.CID.create(1, codec.code, hash); + return new Block({ + value, + bytes, + cid: cid$1 + }); +}; +const createUnsafe = ({ + bytes, + cid, + value: maybeValue, + codec +}) => { + const value = maybeValue !== undefined ? maybeValue : codec && codec.decode(bytes); + if (value === undefined) + throw new Error('Missing required argument, must either provide "value" or "codec"'); + return new Block({ + cid, + bytes, + value + }); +}; +const create = async ({bytes: bytes$1, cid, hasher, codec}) => { + if (!bytes$1) + throw new Error('Missing required argument "bytes"'); + if (!hasher) + throw new Error('Missing required argument "hasher"'); + const value = codec.decode(bytes$1); + const hash = await hasher.digest(bytes$1); + if (!bytes.equals(cid.multihash.bytes, hash.bytes)) { + throw new Error('CID hash does not match bytes'); + } + return createUnsafe({ + bytes: bytes$1, + cid, + value, + codec + }); +}; + +exports.Block = Block; +exports.create = create; +exports.createUnsafe = createUnsafe; +exports.decode = decode; +exports.encode = encode; + + +/***/ }), + +/***/ 16570: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const empty = new Uint8Array(0); +const toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), ''); +const fromHex = hex => { + const hexes = hex.match(/../g); + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : empty; +}; +const equals = (aa, bb) => { + if (aa === bb) + return true; + if (aa.byteLength !== bb.byteLength) { + return false; + } + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false; + } + } + return true; +}; +const coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') + return o; + if (o instanceof ArrayBuffer) + return new Uint8Array(o); + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength); + } + throw new Error('Unknown type, must be binary type'); +}; +const isBinary = o => o instanceof ArrayBuffer || ArrayBuffer.isView(o); +const fromString = str => new TextEncoder().encode(str); +const toString = b => new TextDecoder().decode(b); + +exports.coerce = coerce; +exports.empty = empty; +exports.equals = equals; +exports.fromHex = fromHex; +exports.fromString = fromString; +exports.isBinary = isBinary; +exports.toHex = toHex; +exports.toString = toString; + + +/***/ }), + +<<<<<<< HEAD +/***/ 33862: +======= +/***/ 24247: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var varint = __nccwpck_require__(3959); +var digest = __nccwpck_require__(65957); +var base58 = __nccwpck_require__(50119); +var base32 = __nccwpck_require__(14637); +var bytes = __nccwpck_require__(87450); +======= +var varint = __nccwpck_require__(55687); +var digest = __nccwpck_require__(81168); +var base58 = __nccwpck_require__(49108); +var base32 = __nccwpck_require__(70784); +var bytes = __nccwpck_require__(16570); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +class CID { + constructor(version, code, multihash, bytes) { + this.code = code; + this.version = version; + this.multihash = multihash; + this.bytes = bytes; + this.byteOffset = bytes.byteOffset; + this.byteLength = bytes.byteLength; + this.asCID = this; + this._baseCache = new Map(); + Object.defineProperties(this, { + byteOffset: hidden, + byteLength: hidden, + code: readonly, + version: readonly, + multihash: readonly, + bytes: readonly, + _baseCache: hidden, + asCID: hidden + }); + } + toV0() { + switch (this.version) { + case 0: { + return this; + } + default: { + const {code, multihash} = this; + if (code !== DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0'); + } + if (multihash.code !== SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0'); + } + return CID.createV0(multihash); + } + } + } + toV1() { + switch (this.version) { + case 0: { + const {code, digest: digest$1} = this.multihash; + const multihash = digest.create(code, digest$1); + return CID.createV1(this.code, multihash); + } + case 1: { + return this; + } + default: { + throw Error(`Can not convert CID version ${ this.version } to version 0. This is a bug please report`); + } + } + } + equals(other) { + return other && this.code === other.code && this.version === other.version && digest.equals(this.multihash, other.multihash); + } + toString(base) { + const {bytes, version, _baseCache} = this; + switch (version) { + case 0: + return toStringV0(bytes, _baseCache, base || base58.base58btc.encoder); + default: + return toStringV1(bytes, _baseCache, base || base32.base32.encoder); + } + } + toJSON() { + return { + code: this.code, + version: this.version, + hash: this.multihash.bytes + }; + } + get [Symbol.toStringTag]() { + return 'CID'; + } + [Symbol.for('nodejs.util.inspect.custom')]() { + return 'CID(' + this.toString() + ')'; + } + static isCID(value) { + deprecate(/^0\.0/, IS_CID_DEPRECATION); + return !!(value && (value[cidSymbol] || value.asCID === value)); + } + get toBaseEncodedString() { + throw new Error('Deprecated, use .toString()'); + } + get codec() { + throw new Error('"codec" property is deprecated, use integer "code" property instead'); + } + get buffer() { + throw new Error('Deprecated .buffer property, use .bytes to get Uint8Array instead'); + } + get multibaseName() { + throw new Error('"multibaseName" property is deprecated'); + } + get prefix() { + throw new Error('"prefix" property is deprecated'); + } + static asCID(value) { + if (value instanceof CID) { + return value; + } else if (value != null && value.asCID === value) { + const {version, code, multihash, bytes} = value; + return new CID(version, code, multihash, bytes || encodeCID(version, code, multihash.bytes)); + } else if (value != null && value[cidSymbol] === true) { + const {version, multihash, code} = value; + const digest$1 = digest.decode(multihash); + return CID.create(version, code, digest$1); + } else { + return null; + } + } + static create(version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported'); + } + switch (version) { + case 0: { + if (code !== DAG_PB_CODE) { + throw new Error(`Version 0 CID must use dag-pb (code: ${ DAG_PB_CODE }) block encoding`); + } else { + return new CID(version, code, digest, digest.bytes); + } + } + case 1: { + const bytes = encodeCID(version, code, digest.bytes); + return new CID(version, code, digest, bytes); + } + default: { + throw new Error('Invalid version'); + } + } + } + static createV0(digest) { + return CID.create(0, DAG_PB_CODE, digest); + } + static createV1(code, digest) { + return CID.create(1, code, digest); + } + static decode(bytes) { + const [cid, remainder] = CID.decodeFirst(bytes); + if (remainder.length) { + throw new Error('Incorrect length'); + } + return cid; + } + static decodeFirst(bytes$1) { + const specs = CID.inspectBytes(bytes$1); + const prefixSize = specs.size - specs.multihashSize; + const multihashBytes = bytes.coerce(bytes$1.subarray(prefixSize, prefixSize + specs.multihashSize)); + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length'); + } + const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize); + const digest$1 = new digest.Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes); + const cid = specs.version === 0 ? CID.createV0(digest$1) : CID.createV1(specs.codec, digest$1); + return [ + cid, + bytes$1.subarray(specs.size) + ]; + } + static inspectBytes(initialBytes) { + let offset = 0; + const next = () => { + const [i, length] = varint.decode(initialBytes.subarray(offset)); + offset += length; + return i; + }; + let version = next(); + let codec = DAG_PB_CODE; + if (version === 18) { + version = 0; + offset = 0; + } else if (version === 1) { + codec = next(); + } + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${ version }`); + } + const prefixSize = offset; + const multihashCode = next(); + const digestSize = next(); + const size = offset + digestSize; + const multihashSize = size - prefixSize; + return { + version, + codec, + multihashCode, + digestSize, + multihashSize, + size + }; + } + static parse(source, base) { + const [prefix, bytes] = parseCIDtoBytes(source, base); + const cid = CID.decode(bytes); + cid._baseCache.set(prefix, source); + return cid; + } +} +const parseCIDtoBytes = (source, base) => { + switch (source[0]) { + case 'Q': { + const decoder = base || base58.base58btc; + return [ + base58.base58btc.prefix, + decoder.decode(`${ base58.base58btc.prefix }${ source }`) + ]; + } + case base58.base58btc.prefix: { + const decoder = base || base58.base58btc; + return [ + base58.base58btc.prefix, + decoder.decode(source) + ]; + } + case base32.base32.prefix: { + const decoder = base || base32.base32; + return [ + base32.base32.prefix, + decoder.decode(source) + ]; + } + default: { + if (base == null) { + throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided'); + } + return [ + source[0], + base.decode(source) + ]; + } + } +}; +const toStringV0 = (bytes, cache, base) => { + const {prefix} = base; + if (prefix !== base58.base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${ base.name } encoding`); + } + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes).slice(1); + cache.set(prefix, cid); + return cid; + } else { + return cid; + } +}; +const toStringV1 = (bytes, cache, base) => { + const {prefix} = base; + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes); + cache.set(prefix, cid); + return cid; + } else { + return cid; + } +}; +const DAG_PB_CODE = 112; +const SHA_256_CODE = 18; +const encodeCID = (version, code, multihash) => { + const codeOffset = varint.encodingLength(version); + const hashOffset = codeOffset + varint.encodingLength(code); + const bytes = new Uint8Array(hashOffset + multihash.byteLength); + varint.encodeTo(version, bytes, 0); + varint.encodeTo(code, bytes, codeOffset); + bytes.set(multihash, hashOffset); + return bytes; +}; +const cidSymbol = Symbol.for('@ipld/js-cid/CID'); +const readonly = { + writable: false, + configurable: false, + enumerable: true +}; +const hidden = { + writable: false, + enumerable: false, + configurable: false +}; +const version = '0.0.0-dev'; +const deprecate = (range, message) => { + if (range.test(version)) { + console.warn(message); + } else { + throw new Error(message); + } +}; +const IS_CID_DEPRECATION = `CID.isCID(v) is deprecated and will be removed in the next major release. +Following code pattern: + +if (CID.isCID(value)) { + doSomethingWithCID(value) +} + +Is replaced with: + +const cid = CID.asCID(value) +if (cid) { + // Make sure to use cid instead of value + doSomethingWithCID(cid) +} +`; + +exports.CID = CID; + + +/***/ }), + +<<<<<<< HEAD +/***/ 94633: +======= +/***/ 81245: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +const textEncoder = new TextEncoder(); +const textDecoder = new TextDecoder(); +const name = 'json'; +const code = 512; +const encode = node => textEncoder.encode(JSON.stringify(node)); +const decode = data => JSON.parse(textDecoder.decode(data)); + +exports.code = code; +exports.decode = decode; +exports.encode = encode; +exports.name = name; + + +/***/ }), + +<<<<<<< HEAD +/***/ 55137: +======= +/***/ 4848: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var bytes = __nccwpck_require__(87450); +======= +var bytes = __nccwpck_require__(16570); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const name = 'raw'; +const code = 85; +const encode = node => bytes.coerce(node); +const decode = data => bytes.coerce(data); + +exports.code = code; +exports.decode = decode; +exports.encode = encode; +exports.name = name; + + +/***/ }), + +<<<<<<< HEAD +/***/ 65957: +======= +/***/ 81168: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var bytes = __nccwpck_require__(87450); +var varint = __nccwpck_require__(3959); +======= +var bytes = __nccwpck_require__(16570); +var varint = __nccwpck_require__(55687); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const create = (code, digest) => { + const size = digest.byteLength; + const sizeOffset = varint.encodingLength(code); + const digestOffset = sizeOffset + varint.encodingLength(size); + const bytes = new Uint8Array(digestOffset + size); + varint.encodeTo(code, bytes, 0); + varint.encodeTo(size, bytes, sizeOffset); + bytes.set(digest, digestOffset); + return new Digest(code, size, digest, bytes); +}; +const decode = multihash => { + const bytes$1 = bytes.coerce(multihash); + const [code, sizeOffset] = varint.decode(bytes$1); + const [size, digestOffset] = varint.decode(bytes$1.subarray(sizeOffset)); + const digest = bytes$1.subarray(sizeOffset + digestOffset); + if (digest.byteLength !== size) { + throw new Error('Incorrect length'); + } + return new Digest(code, size, digest, bytes$1); +}; +const equals = (a, b) => { + if (a === b) { + return true; + } else { + return a.code === b.code && a.size === b.size && bytes.equals(a.bytes, b.bytes); + } +}; +class Digest { + constructor(code, size, digest, bytes) { + this.code = code; + this.size = size; + this.digest = digest; + this.bytes = bytes; + } +} + +exports.Digest = Digest; +exports.create = create; +exports.decode = decode; +exports.equals = equals; + + +/***/ }), + +<<<<<<< HEAD +/***/ 83296: +======= +/***/ 62030: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var digest = __nccwpck_require__(65957); +======= +var digest = __nccwpck_require__(81168); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const from = ({name, code, encode}) => new Hasher(name, code, encode); +class Hasher { + constructor(name, code, encode) { + this.name = name; + this.code = code; + this.encode = encode; + } + digest(input) { + if (input instanceof Uint8Array) { + const result = this.encode(input); + return result instanceof Uint8Array ? digest.create(this.code, result) : result.then(digest$1 => digest.create(this.code, digest$1)); + } else { + throw Error('Unknown type, must be binary type'); + } + } +} + +exports.Hasher = Hasher; +exports.from = from; + + +/***/ }), + +<<<<<<< HEAD +/***/ 14733: +======= +/***/ 53863: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var bytes = __nccwpck_require__(87450); +var digest$1 = __nccwpck_require__(65957); +======= +var bytes = __nccwpck_require__(16570); +var digest$1 = __nccwpck_require__(81168); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const code = 0; +const name = 'identity'; +const encode = bytes.coerce; +const digest = input => digest$1.create(code, encode(input)); +const identity = { + code, + name, + encode, + digest +}; + +exports.identity = identity; + + +/***/ }), + +<<<<<<< HEAD +/***/ 65484: +======= +/***/ 80960: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +var crypto = __nccwpck_require__(6113); +<<<<<<< HEAD +var hasher = __nccwpck_require__(83296); +var bytes = __nccwpck_require__(87450); +======= +var hasher = __nccwpck_require__(62030); +var bytes = __nccwpck_require__(16570); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto); + +const sha256 = hasher.from({ + name: 'sha2-256', + code: 18, + encode: input => bytes.coerce(crypto__default["default"].createHash('sha256').update(input).digest()) +}); +const sha512 = hasher.from({ + name: 'sha2-512', + code: 19, + encode: input => bytes.coerce(crypto__default["default"].createHash('sha512').update(input).digest()) +}); + +exports.sha256 = sha256; +exports.sha512 = sha512; + + +/***/ }), + +<<<<<<< HEAD +/***/ 3992: +======= +/***/ 27331: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var cid = __nccwpck_require__(33862); +var varint = __nccwpck_require__(3959); +var bytes = __nccwpck_require__(87450); +var hasher = __nccwpck_require__(83296); +var digest = __nccwpck_require__(65957); +======= +var cid = __nccwpck_require__(24247); +var varint = __nccwpck_require__(55687); +var bytes = __nccwpck_require__(16570); +var hasher = __nccwpck_require__(62030); +var digest = __nccwpck_require__(81168); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + + +exports.CID = cid.CID; +exports.varint = varint; +exports.bytes = bytes; +exports.hasher = hasher; +exports.digest = digest; + + +/***/ }), + +<<<<<<< HEAD +/***/ 3959: +======= +/***/ 55687: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var varint$1 = __nccwpck_require__(22038); +======= +var varint$1 = __nccwpck_require__(55250); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const decode = data => { + const code = varint$1.decode(data); + return [ + code, + varint$1.decode.bytes + ]; +}; +const encodeTo = (int, target, offset = 0) => { + varint$1.encode(int, target, offset); + return target; +}; +const encodingLength = int => { + return varint$1.encodingLength(int); +}; + +exports.decode = decode; +exports.encodeTo = encodeTo; +exports.encodingLength = encodingLength; + + +/***/ }), + +<<<<<<< HEAD +/***/ 33033: +======= +/***/ 21357: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +function base(ALPHABET, name) { + if (ALPHABET.length >= 255) { + throw new TypeError('Alphabet too long'); + } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { + throw new TypeError(x + ' is ambiguous'); + } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); + var iFACTOR = Math.log(256) / Math.log(BASE); + function encode(source) { + if (source instanceof Uint8Array); + else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { + throw new TypeError('Expected Uint8Array'); + } + if (source.length === 0) { + return ''; + } + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + var size = (pend - pbegin) * iFACTOR + 1 >>> 0; + var b58 = new Uint8Array(size); + while (pbegin !== pend) { + var carry = source[pbegin]; + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && it1 !== -1; it1--, i++) { + carry += 256 * b58[it1] >>> 0; + b58[it1] = carry % BASE >>> 0; + carry = carry / BASE >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + pbegin++; + } + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { + str += ALPHABET.charAt(b58[it2]); + } + return str; + } + function decodeUnsafe(source) { + if (typeof source !== 'string') { + throw new TypeError('Expected String'); + } + if (source.length === 0) { + return new Uint8Array(); + } + var psz = 0; + if (source[psz] === ' ') { + return; + } + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + var size = (source.length - psz) * FACTOR + 1 >>> 0; + var b256 = new Uint8Array(size); + while (source[psz]) { + var carry = BASE_MAP[source.charCodeAt(psz)]; + if (carry === 255) { + return; + } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && it3 !== -1; it3--, i++) { + carry += BASE * b256[it3] >>> 0; + b256[it3] = carry % 256 >>> 0; + carry = carry / 256 >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + psz++; + } + if (source[psz] === ' ') { + return; + } + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch; + } + function decode(string) { + var buffer = decodeUnsafe(string); + if (buffer) { + return buffer; + } + throw new Error(`Non-${ name } character`); + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + }; +} +var src = base; +var _brrp__multiformats_scope_baseX = src; + +module.exports = _brrp__multiformats_scope_baseX; + + +/***/ }), + +<<<<<<< HEAD +/***/ 22038: +======= +/***/ 55250: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +var encode_1 = encode; +var MSB = 128, REST = 127, MSBALL = ~REST, INT = Math.pow(2, 31); +function encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while (num >= INT) { + out[offset++] = num & 255 | MSB; + num /= 128; + } + while (num & MSBALL) { + out[offset++] = num & 255 | MSB; + num >>>= 7; + } + out[offset] = num | 0; + encode.bytes = offset - oldOffset + 1; + return out; +} +var decode = read; +var MSB$1 = 128, REST$1 = 127; +function read(buf, offset) { + var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + do { + if (counter >= l) { + read.bytes = 0; + throw new RangeError('Could not decode varint'); + } + b = buf[counter++]; + res += shift < 28 ? (b & REST$1) << shift : (b & REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= MSB$1); + read.bytes = counter - offset; + return res; +} +var N1 = Math.pow(2, 7); +var N2 = Math.pow(2, 14); +var N3 = Math.pow(2, 21); +var N4 = Math.pow(2, 28); +var N5 = Math.pow(2, 35); +var N6 = Math.pow(2, 42); +var N7 = Math.pow(2, 49); +var N8 = Math.pow(2, 56); +var N9 = Math.pow(2, 63); +var length = function (value) { + return value < N1 ? 1 : value < N2 ? 2 : value < N3 ? 3 : value < N4 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10; +}; +var varint = { + encode: encode_1, + decode: decode, + encodingLength: length +}; +var _brrp_varint = varint; +var varint$1 = _brrp_varint; + +module.exports = varint$1; + + +/***/ }), + +<<<<<<< HEAD +/***/ 16665: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(59985); +======= +/***/ 32924: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(62027); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/***/ }), + +<<<<<<< HEAD +/***/ 59985: +======= +/***/ 62027: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ (function(module, exports) { + +/* jshint -W086: true */ +// +----------------------------------------------------------------------+ +// | murmurHash3js.js v3.0.1 // https://github.com/pid/murmurHash3js +// | A javascript implementation of MurmurHash3's x86 hashing algorithms. | +// |----------------------------------------------------------------------| +// | Copyright (c) 2012-2015 Karan Lyons | +// | https://github.com/karanlyons/murmurHash3.js/blob/c1778f75792abef7bdd74bc85d2d4e1a3d25cfe9/murmurHash3.js | +// | Freely distributable under the MIT license. | +// +----------------------------------------------------------------------+ + +;(function (root, undefined) { + 'use strict'; + + // Create a local object that'll be exported or referenced globally. + var library = { + 'version': '3.0.0', + 'x86': {}, + 'x64': {}, + 'inputValidation': true + }; + + // PRIVATE FUNCTIONS + // ----------------- + + function _validBytes(bytes) { + // check the input is an array or a typed array + if (!Array.isArray(bytes) && !ArrayBuffer.isView(bytes)) { + return false; + } + + // check all bytes are actually bytes + for (var i = 0; i < bytes.length; i++) { + if (!Number.isInteger(bytes[i]) || bytes[i] < 0 || bytes[i] > 255) { + return false; + } + } + return true; + } + + function _x86Multiply(m, n) { + // + // Given two 32bit ints, returns the two multiplied together as a + // 32bit int. + // + + return ((m & 0xffff) * n) + ((((m >>> 16) * n) & 0xffff) << 16); + } + + function _x86Rotl(m, n) { + // + // Given a 32bit int and an int representing a number of bit positions, + // returns the 32bit int rotated left by that number of positions. + // + + return (m << n) | (m >>> (32 - n)); + } + + function _x86Fmix(h) { + // + // Given a block, returns murmurHash3's final x86 mix of that block. + // + + h ^= h >>> 16; + h = _x86Multiply(h, 0x85ebca6b); + h ^= h >>> 13; + h = _x86Multiply(h, 0xc2b2ae35); + h ^= h >>> 16; + + return h; + } + + function _x64Add(m, n) { + // + // Given two 64bit ints (as an array of two 32bit ints) returns the two + // added together as a 64bit int (as an array of two 32bit ints). + // + + m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]; + n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]; + var o = [0, 0, 0, 0]; + + o[3] += m[3] + n[3]; + o[2] += o[3] >>> 16; + o[3] &= 0xffff; + + o[2] += m[2] + n[2]; + o[1] += o[2] >>> 16; + o[2] &= 0xffff; + + o[1] += m[1] + n[1]; + o[0] += o[1] >>> 16; + o[1] &= 0xffff; + + o[0] += m[0] + n[0]; + o[0] &= 0xffff; + + return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]; + } + + function _x64Multiply(m, n) { + // + // Given two 64bit ints (as an array of two 32bit ints) returns the two + // multiplied together as a 64bit int (as an array of two 32bit ints). + // + + m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]; + n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]; + var o = [0, 0, 0, 0]; + + o[3] += m[3] * n[3]; + o[2] += o[3] >>> 16; + o[3] &= 0xffff; + + o[2] += m[2] * n[3]; + o[1] += o[2] >>> 16; + o[2] &= 0xffff; + + o[2] += m[3] * n[2]; + o[1] += o[2] >>> 16; + o[2] &= 0xffff; + + o[1] += m[1] * n[3]; + o[0] += o[1] >>> 16; + o[1] &= 0xffff; + + o[1] += m[2] * n[2]; + o[0] += o[1] >>> 16; + o[1] &= 0xffff; + + o[1] += m[3] * n[1]; + o[0] += o[1] >>> 16; + o[1] &= 0xffff; + + o[0] += (m[0] * n[3]) + (m[1] * n[2]) + (m[2] * n[1]) + (m[3] * n[0]); + o[0] &= 0xffff; + + return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]; + } + + function _x64Rotl(m, n) { + // + // Given a 64bit int (as an array of two 32bit ints) and an int + // representing a number of bit positions, returns the 64bit int (as an + // array of two 32bit ints) rotated left by that number of positions. + // + + n %= 64; + + if (n === 32) { + return [m[1], m[0]]; + } else if (n < 32) { + return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]; + } else { + n -= 32; + return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]; + } + } + + function _x64LeftShift(m, n) { + // + // Given a 64bit int (as an array of two 32bit ints) and an int + // representing a number of bit positions, returns the 64bit int (as an + // array of two 32bit ints) shifted left by that number of positions. + // + + n %= 64; + + if (n === 0) { + return m; + } else if (n < 32) { + return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n]; + } else { + return [m[1] << (n - 32), 0]; + } + } + + function _x64Xor(m, n) { + // + // Given two 64bit ints (as an array of two 32bit ints) returns the two + // xored together as a 64bit int (as an array of two 32bit ints). + // + + return [m[0] ^ n[0], m[1] ^ n[1]]; + } + + function _x64Fmix(h) { + // + // Given a block, returns murmurHash3's final x64 mix of that block. + // (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the + // only place where we need to right shift 64bit ints.) + // + + h = _x64Xor(h, [0, h[0] >>> 1]); + h = _x64Multiply(h, [0xff51afd7, 0xed558ccd]); + h = _x64Xor(h, [0, h[0] >>> 1]); + h = _x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53]); + h = _x64Xor(h, [0, h[0] >>> 1]); + + return h; + } + + // PUBLIC FUNCTIONS + // ---------------- + + library.x86.hash32 = function (bytes, seed) { + // + // Given a string and an optional seed as an int, returns a 32 bit hash + // using the x86 flavor of MurmurHash3, as an unsigned int. + // + if (library.inputValidation && !_validBytes(bytes)) { + return undefined; + } + seed = seed || 0; + + var remainder = bytes.length % 4; + var blocks = bytes.length - remainder; + + var h1 = seed; + + var k1 = 0; + + var c1 = 0xcc9e2d51; + var c2 = 0x1b873593; + + for (var i = 0; i < blocks; i = i + 4) { + k1 = (bytes[i]) | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24); + + k1 = _x86Multiply(k1, c1); + k1 = _x86Rotl(k1, 15); + k1 = _x86Multiply(k1, c2); + + h1 ^= k1; + h1 = _x86Rotl(h1, 13); + h1 = _x86Multiply(h1, 5) + 0xe6546b64; + } + + k1 = 0; + + switch (remainder) { + case 3: + k1 ^= bytes[i + 2] << 16; + + case 2: + k1 ^= bytes[i + 1] << 8; + + case 1: + k1 ^= bytes[i]; + k1 = _x86Multiply(k1, c1); + k1 = _x86Rotl(k1, 15); + k1 = _x86Multiply(k1, c2); + h1 ^= k1; + } + + h1 ^= bytes.length; + h1 = _x86Fmix(h1); + + return h1 >>> 0; + }; + + library.x86.hash128 = function (bytes, seed) { + // + // Given a string and an optional seed as an int, returns a 128 bit + // hash using the x86 flavor of MurmurHash3, as an unsigned hex. + // + if (library.inputValidation && !_validBytes(bytes)) { + return undefined; + } + + seed = seed || 0; + var remainder = bytes.length % 16; + var blocks = bytes.length - remainder; + + var h1 = seed; + var h2 = seed; + var h3 = seed; + var h4 = seed; + + var k1 = 0; + var k2 = 0; + var k3 = 0; + var k4 = 0; + + var c1 = 0x239b961b; + var c2 = 0xab0e9789; + var c3 = 0x38b34ae5; + var c4 = 0xa1e38b93; + + for (var i = 0; i < blocks; i = i + 16) { + k1 = (bytes[i]) | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24); + k2 = (bytes[i + 4]) | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24); + k3 = (bytes[i + 8]) | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24); + k4 = (bytes[i + 12]) | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24); + + k1 = _x86Multiply(k1, c1); + k1 = _x86Rotl(k1, 15); + k1 = _x86Multiply(k1, c2); + h1 ^= k1; + + h1 = _x86Rotl(h1, 19); + h1 += h2; + h1 = _x86Multiply(h1, 5) + 0x561ccd1b; + + k2 = _x86Multiply(k2, c2); + k2 = _x86Rotl(k2, 16); + k2 = _x86Multiply(k2, c3); + h2 ^= k2; + + h2 = _x86Rotl(h2, 17); + h2 += h3; + h2 = _x86Multiply(h2, 5) + 0x0bcaa747; + + k3 = _x86Multiply(k3, c3); + k3 = _x86Rotl(k3, 17); + k3 = _x86Multiply(k3, c4); + h3 ^= k3; + + h3 = _x86Rotl(h3, 15); + h3 += h4; + h3 = _x86Multiply(h3, 5) + 0x96cd1c35; + + k4 = _x86Multiply(k4, c4); + k4 = _x86Rotl(k4, 18); + k4 = _x86Multiply(k4, c1); + h4 ^= k4; + + h4 = _x86Rotl(h4, 13); + h4 += h1; + h4 = _x86Multiply(h4, 5) + 0x32ac3b17; + } + + k1 = 0; + k2 = 0; + k3 = 0; + k4 = 0; + + switch (remainder) { + case 15: + k4 ^= bytes[i + 14] << 16; + + case 14: + k4 ^= bytes[i + 13] << 8; + + case 13: + k4 ^= bytes[i + 12]; + k4 = _x86Multiply(k4, c4); + k4 = _x86Rotl(k4, 18); + k4 = _x86Multiply(k4, c1); + h4 ^= k4; + + case 12: + k3 ^= bytes[i + 11] << 24; + + case 11: + k3 ^= bytes[i + 10] << 16; + + case 10: + k3 ^= bytes[i + 9] << 8; + + case 9: + k3 ^= bytes[i + 8]; + k3 = _x86Multiply(k3, c3); + k3 = _x86Rotl(k3, 17); + k3 = _x86Multiply(k3, c4); + h3 ^= k3; + + case 8: + k2 ^= bytes[i + 7] << 24; + + case 7: + k2 ^= bytes[i + 6] << 16; + + case 6: + k2 ^= bytes[i + 5] << 8; + + case 5: + k2 ^= bytes[i + 4]; + k2 = _x86Multiply(k2, c2); + k2 = _x86Rotl(k2, 16); + k2 = _x86Multiply(k2, c3); + h2 ^= k2; + + case 4: + k1 ^= bytes[i + 3] << 24; + + case 3: + k1 ^= bytes[i + 2] << 16; + + case 2: + k1 ^= bytes[i + 1] << 8; + + case 1: + k1 ^= bytes[i]; + k1 = _x86Multiply(k1, c1); + k1 = _x86Rotl(k1, 15); + k1 = _x86Multiply(k1, c2); + h1 ^= k1; + } + + h1 ^= bytes.length; + h2 ^= bytes.length; + h3 ^= bytes.length; + h4 ^= bytes.length; + + h1 += h2; + h1 += h3; + h1 += h4; + h2 += h1; + h3 += h1; + h4 += h1; + + h1 = _x86Fmix(h1); + h2 = _x86Fmix(h2); + h3 = _x86Fmix(h3); + h4 = _x86Fmix(h4); + + h1 += h2; + h1 += h3; + h1 += h4; + h2 += h1; + h3 += h1; + h4 += h1; + + return ("00000000" + (h1 >>> 0).toString(16)).slice(-8) + ("00000000" + (h2 >>> 0).toString(16)).slice(-8) + ("00000000" + (h3 >>> 0).toString(16)).slice(-8) + ("00000000" + (h4 >>> 0).toString(16)).slice(-8); + }; + + library.x64.hash128 = function (bytes, seed) { + // + // Given a string and an optional seed as an int, returns a 128 bit + // hash using the x64 flavor of MurmurHash3, as an unsigned hex. + // + if (library.inputValidation && !_validBytes(bytes)) { + return undefined; + } + seed = seed || 0; + + var remainder = bytes.length % 16; + var blocks = bytes.length - remainder; + + var h1 = [0, seed]; + var h2 = [0, seed]; + + var k1 = [0, 0]; + var k2 = [0, 0]; + + var c1 = [0x87c37b91, 0x114253d5]; + var c2 = [0x4cf5ad43, 0x2745937f]; + + for (var i = 0; i < blocks; i = i + 16) { + k1 = [(bytes[i + 4]) | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24), (bytes[i]) | + (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24)]; + k2 = [(bytes[i + 12]) | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24), (bytes[i + 8]) | + (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24)]; + + k1 = _x64Multiply(k1, c1); + k1 = _x64Rotl(k1, 31); + k1 = _x64Multiply(k1, c2); + h1 = _x64Xor(h1, k1); + + h1 = _x64Rotl(h1, 27); + h1 = _x64Add(h1, h2); + h1 = _x64Add(_x64Multiply(h1, [0, 5]), [0, 0x52dce729]); + + k2 = _x64Multiply(k2, c2); + k2 = _x64Rotl(k2, 33); + k2 = _x64Multiply(k2, c1); + h2 = _x64Xor(h2, k2); + + h2 = _x64Rotl(h2, 31); + h2 = _x64Add(h2, h1); + h2 = _x64Add(_x64Multiply(h2, [0, 5]), [0, 0x38495ab5]); + } + + k1 = [0, 0]; + k2 = [0, 0]; + + switch (remainder) { + case 15: + k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 14]], 48)); + + case 14: + k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 13]], 40)); + + case 13: + k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 12]], 32)); + + case 12: + k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 11]], 24)); + + case 11: + k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 10]], 16)); + + case 10: + k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 9]], 8)); + + case 9: + k2 = _x64Xor(k2, [0, bytes[i + 8]]); + k2 = _x64Multiply(k2, c2); + k2 = _x64Rotl(k2, 33); + k2 = _x64Multiply(k2, c1); + h2 = _x64Xor(h2, k2); + + case 8: + k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 7]], 56)); + + case 7: + k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 6]], 48)); + + case 6: + k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 5]], 40)); + + case 5: + k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 4]], 32)); + + case 4: + k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 3]], 24)); + + case 3: + k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 2]], 16)); + + case 2: + k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 1]], 8)); + + case 1: + k1 = _x64Xor(k1, [0, bytes[i]]); + k1 = _x64Multiply(k1, c1); + k1 = _x64Rotl(k1, 31); + k1 = _x64Multiply(k1, c2); + h1 = _x64Xor(h1, k1); + } + + h1 = _x64Xor(h1, [0, bytes.length]); + h2 = _x64Xor(h2, [0, bytes.length]); + + h1 = _x64Add(h1, h2); + h2 = _x64Add(h2, h1); + + h1 = _x64Fmix(h1); + h2 = _x64Fmix(h2); + + h1 = _x64Add(h1, h2); + h2 = _x64Add(h2, h1); + + return ("00000000" + (h1[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h1[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[1] >>> 0).toString(16)).slice(-8); + }; + + // INITIALIZATION + // -------------- + + // Export murmurHash3 for CommonJS, either as an AMD module or just as part + // of the global object. + if (true) { + + if ( true && module.exports) { + exports = module.exports = library; + } + + exports.murmurHash3 = library; + + } else {} +})(this); + + +/***/ }), + +<<<<<<< HEAD +/***/ 25706: +======= +/***/ 43586: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +let impl + +if (globalThis.AbortController && globalThis.AbortSignal) { + impl = globalThis +} else { + impl = __nccwpck_require__(67022) +} + +module.exports.AbortSignal = impl.AbortSignal +module.exports.AbortController = impl.AbortController + + +/***/ }), + +/***/ 96357: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +if (globalThis.fetch && globalThis.Headers && globalThis.Request && globalThis.Response) { + module.exports = { + default: globalThis.fetch, + Headers: globalThis.Headers, + Request: globalThis.Request, + Response: globalThis.Response + } +} else { + module.exports = { + default: (__nccwpck_require__(66471)["default"]), + Headers: (__nccwpck_require__(66471).Headers), + Request: (__nccwpck_require__(66471).Request), + Response: (__nccwpck_require__(66471).Response) + } +} + + +/***/ }), + +/***/ 66471: +/***/ ((module, exports, __nccwpck_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var Stream = _interopDefault(__nccwpck_require__(12781)); +var http = _interopDefault(__nccwpck_require__(13685)); +var Url = _interopDefault(__nccwpck_require__(57310)); +var whatwgUrl = _interopDefault(__nccwpck_require__(73323)); +var https = _interopDefault(__nccwpck_require__(95687)); +var zlib = _interopDefault(__nccwpck_require__(59796)); + +// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + +// fix for "Readable" isn't a named export issue +const Readable = Stream.Readable; + +const BUFFER = Symbol('buffer'); +const TYPE = Symbol('type'); + +class Blob { + constructor() { + this[TYPE] = ''; + + const blobParts = arguments[0]; + const options = arguments[1]; + + const buffers = []; + let size = 0; + + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === 'string' ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + + this[BUFFER] = Buffer.concat(buffers); + + let type = options && options.type !== undefined && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function () {}; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return '[object Blob]'; + } + slice() { + const size = this.size; + + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === undefined) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === undefined) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } +} + +Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } +}); + +Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: 'Blob', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * fetch-error.js + * + * FetchError interface for operational errors + */ + +/** + * Create FetchError instance + * + * @param String message Error message for human + * @param String type Error type for machine + * @param String systemError For Node.js system error + * @return FetchError + */ +function FetchError(message, type, systemError) { + Error.call(this, message); + + this.message = message; + this.type = type; + + // when err.type is `system`, err.code contains system error code + if (systemError) { + this.code = this.errno = systemError.code; + } + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +FetchError.prototype = Object.create(Error.prototype); +FetchError.prototype.constructor = FetchError; +FetchError.prototype.name = 'FetchError'; + +let convert; +try { + convert = (__nccwpck_require__(73931).convert); +} catch (e) {} + +const INTERNALS = Symbol('Body internals'); + +// fix an issue where "PassThrough" isn't a named export for node <10 +const PassThrough = Stream.PassThrough; + +/** + * Body mixin + * + * Ref: https://fetch.spec.whatwg.org/#body + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +function Body(body) { + var _this = this; + + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$size = _ref.size; + + let size = _ref$size === undefined ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + + if (body == null) { + // body is undefined or null + body = null; + } else if (isURLSearchParams(body)) { + // body is a URLSearchParams + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { + // body is ArrayBuffer + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + // body is ArrayBufferView + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; else { + // none of the above + // coerce to string then buffer + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + + if (body instanceof Stream) { + body.on('error', function (err) { + const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); + _this[INTERNALS].error = error; + }); + } +} + +Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function (buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get('content-type') || ''; + return consumeBody.call(this).then(function (buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), { + [BUFFER]: buf + }); + }); + }, + + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + + return consumeBody.call(this).then(function (buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); + } + }); + }, + + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function (buffer) { + return buffer.toString(); + }); + }, + + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + + return consumeBody.call(this).then(function (buffer) { + return convertBody(buffer, _this3.headers); + }); + } +}; + +// In browsers, all properties are enumerable. +Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } +}); + +Body.mixIn = function (proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + // istanbul ignore else: future proof + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } +}; + +/** + * Consume and convert an entire Body to a Buffer. + * + * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * + * @return Promise + */ +function consumeBody() { + var _this4 = this; + + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + + this[INTERNALS].disturbed = true; + + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + + let body = this.body; + + // body is null + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is blob + if (isBlob(body)) { + body = body.stream(); + } + + // body is buffer + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + + // istanbul ignore if: should never happen + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + + // body is stream + // get ready to actually consume the body + let accum = []; + let accumBytes = 0; + let abort = false; + + return new Body.Promise(function (resolve, reject) { + let resTimeout; + + // allow timeout on slow response body + if (_this4.timeout) { + resTimeout = setTimeout(function () { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); + }, _this4.timeout); + } + + // handle stream errors + body.on('error', function (err) { + if (err.name === 'AbortError') { + // if the request was aborted, reject with this Error + abort = true; + reject(err); + } else { + // other errors, such as incorrect content-encoding + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + + body.on('data', function (chunk) { + if (abort || chunk === null) { + return; + } + + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); + return; + } + + accumBytes += chunk.length; + accum.push(chunk); + }); + + body.on('end', function () { + if (abort) { + return; + } + + clearTimeout(resTimeout); + + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + // handle streams that have accumulated too much data (issue #414) + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); + } + }); + }); +} + +/** + * Detect buffer encoding and convert to target encoding + * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding + * + * @param Buffer buffer Incoming buffer + * @param String encoding Target encoding + * @return String + */ +function convertBody(buffer, headers) { + if (typeof convert !== 'function') { + throw new Error('The package `encoding` must be installed to use the textConverted() function'); + } + + const ct = headers.get('content-type'); + let charset = 'utf-8'; + let res, str; + + // header + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + + // no charset in content type, peek at response body for at most 1024 bytes + str = buffer.slice(0, 1024).toString(); + + // html5 + if (!res && str) { + res = / 0 && arguments[0] !== undefined ? arguments[0] : undefined; + + this[MAP] = Object.create(null); + + if (init instanceof Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + + return; + } + + // We don't worry about converting prop to ByteString here as append() + // will handle it. + if (init == null) ; else if (typeof init === 'object') { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== 'function') { + throw new TypeError('Header pairs must be iterable'); + } + + // sequence> + // Note: per spec we have to first exhaust the lists then process them + const pairs = []; + for (const pair of init) { + if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { + throw new TypeError('Each header pair must be iterable'); + } + pairs.push(Array.from(pair)); + } + + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError('Each header pair must be a name/value tuple'); + } + this.append(pair[0], pair[1]); + } + } else { + // record + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError('Provided initializer must be an object'); + } + } + + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === undefined) { + return null; + } + + return this[MAP][key].join(', '); + } + + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], + value = _pairs$i[1]; + + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== undefined ? key : name] = [value]; + } + + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== undefined) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== undefined; + } + + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== undefined) { + delete this[MAP][key]; + } + } + + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, 'key'); + } + + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, 'value'); + } + + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, 'key+value'); + } +} +Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + +Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: 'Headers', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } +}); + +function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === 'key' ? function (k) { + return k.toLowerCase(); + } : kind === 'value' ? function (k) { + return headers[MAP][k].join(', '); + } : function (k) { + return [k.toLowerCase(), headers[MAP][k].join(', ')]; + }); +} + +const INTERNAL = Symbol('internal'); + +function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; +} + +const HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + // istanbul ignore if + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError('Value of `this` is not a HeadersIterator'); + } + + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, + kind = _INTERNAL.kind, + index = _INTERNAL.index; + + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: undefined, + done: true + }; + } + + this[INTERNAL].index = index + 1; + + return { + value: values[index], + done: false + }; + } +}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + +Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: 'HeadersIterator', + writable: false, + enumerable: false, + configurable: true +}); + +/** + * Export the Headers object in a form that Node.js can consume. + * + * @param Headers headers + * @return Object + */ +function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + + // http.request() only supports string as Host header. This hack makes + // specifying custom Host header possible. + const hostHeaderKey = find(headers[MAP], 'Host'); + if (hostHeaderKey !== undefined) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + + return obj; +} + +/** + * Create a Headers object from an object of headers, ignoring those that do + * not conform to HTTP grammar productions. + * + * @param Object obj Object of headers + * @return Headers + */ +function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === undefined) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; +} + +const INTERNALS$1 = Symbol('Response internals'); + +// fix an issue where "STATUS_CODES" aren't a named export for node <10 +const STATUS_CODES = http.STATUS_CODES; + +/** + * Response class + * + * @param Stream body Readable stream + * @param Object opts Response options + * @return Void + */ +class Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + Body.call(this, body, opts); + + const status = opts.status || 200; + const headers = new Headers(opts.headers); + + if (body != null && !headers.has('Content-Type')) { + const contentType = extractContentType(body); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + + get url() { + return this[INTERNALS$1].url || ''; + } + + get status() { + return this[INTERNALS$1].status; + } + + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + + get redirected() { + return this[INTERNALS$1].counter > 0; + } + + get statusText() { + return this[INTERNALS$1].statusText; + } + + get headers() { + return this[INTERNALS$1].headers; + } + + /** + * Clone this response + * + * @return Response + */ + clone() { + return new Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } +} + +Body.mixIn(Response.prototype); + +Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } +}); + +Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: 'Response', + writable: false, + enumerable: false, + configurable: true +}); + +const INTERNALS$2 = Symbol('Request internals'); +const URL = Url.URL || whatwgUrl.URL; + +// fix an issue where "format", "parse" aren't a named export for node <10 +const parse_url = Url.parse; +const format_url = Url.format; + +/** + * Wrapper around `new URL` to handle arbitrary URLs + * + * @param {string} urlStr + * @return {void} + */ +function parseURL(urlStr) { + /* + Check whether the URL is absolute or not + Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 + Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 + */ + if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { + urlStr = new URL(urlStr).toString(); + } + + // Fallback to old implementation for arbitrary URLs + return parse_url(urlStr); +} + +const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; + +/** + * Check if a value is an instance of Request. + * + * @param Mixed input + * @return Boolean + */ +function isRequest(input) { + return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +} + +function isAbortSignal(signal) { + const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === 'AbortSignal'); +} + +/** + * Request class + * + * @param Mixed input Url or Request instance + * @param Object init Custom options + * @return Void + */ +class Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + let parsedURL; + + // normalize input + if (!isRequest(input)) { + if (input && input.href) { + // in order to support Node.js' Url objects; though WHATWG's URL objects + // will fall into this branch also (since their `toString()` will return + // `href` property anyway) + parsedURL = parseURL(input.href); + } else { + // coerce input to a string before attempting to parse + parsedURL = parseURL(`${input}`); + } + input = {}; + } else { + parsedURL = parseURL(input.url); + } + + let method = init.method || input.method || 'GET'; + method = method.toUpperCase(); + + if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { + throw new TypeError('Request with GET/HEAD method cannot have body'); + } + + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + + const headers = new Headers(init.headers || input.headers || {}); + + if (inputBody != null && !headers.has('Content-Type')) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append('Content-Type', contentType); + } + } + + let signal = isRequest(input) ? input.signal : null; + if ('signal' in init) signal = init.signal; + + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError('Expected signal to be an instanceof AbortSignal'); + } + + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || 'follow', + headers, + parsedURL, + signal + }; + + // node-fetch-only options + this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; + this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + + get method() { + return this[INTERNALS$2].method; + } + + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + + get headers() { + return this[INTERNALS$2].headers; + } + + get redirect() { + return this[INTERNALS$2].redirect; + } + + get signal() { + return this[INTERNALS$2].signal; + } + + /** + * Clone this request + * + * @return Request + */ + clone() { + return new Request(this); + } +} + +Body.mixIn(Request.prototype); + +Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: 'Request', + writable: false, + enumerable: false, + configurable: true +}); + +Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } +}); + +/** + * Convert a Request to Node.js http request options. + * + * @param Request A Request instance + * @return Object The options object to be passed to http.request + */ +function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + + // fetch step 1.3 + if (!headers.has('Accept')) { + headers.set('Accept', '*/*'); + } + + // Basic fetch + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError('Only absolute URLs are supported'); + } + + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError('Only HTTP(S) protocols are supported'); + } + + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); + } + + // HTTP-network-or-cache fetch steps 2.4-2.7 + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = '0'; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === 'number') { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set('Content-Length', contentLengthValue); + } + + // HTTP-network-or-cache fetch step 2.11 + if (!headers.has('User-Agent')) { + headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); + } + + // HTTP-network-or-cache fetch step 2.15 + if (request.compress && !headers.has('Accept-Encoding')) { + headers.set('Accept-Encoding', 'gzip,deflate'); + } + + let agent = request.agent; + if (typeof agent === 'function') { + agent = agent(parsedURL); + } + + if (!headers.has('Connection') && !agent) { + headers.set('Connection', 'close'); + } + + // HTTP-network fetch step 4.2 + // chunked encoding is handled by Node.js + + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); +} + +/** + * abort-error.js + * + * AbortError interface for cancelled requests + */ + +/** + * Create AbortError instance + * + * @param String message Error message for human + * @return AbortError + */ +function AbortError(message) { + Error.call(this, message); + + this.type = 'aborted'; + this.message = message; + + // hide custom error implementation details from end-users + Error.captureStackTrace(this, this.constructor); +} + +AbortError.prototype = Object.create(Error.prototype); +AbortError.prototype.constructor = AbortError; +AbortError.prototype.name = 'AbortError'; + +const URL$1 = Url.URL || whatwgUrl.URL; + +// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 +const PassThrough$1 = Stream.PassThrough; + +const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { + const orig = new URL$1(original).hostname; + const dest = new URL$1(destination).hostname; + + return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); +}; + +/** + * Fetch function + * + * @param Mixed url Absolute url or Request instance + * @param Object opts Fetch options + * @return Promise + */ +function fetch(url, opts) { + + // allow custom promise + if (!fetch.Promise) { + throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); + } + + Body.Promise = fetch.Promise; + + // wrap http.request into fetch + return new fetch.Promise(function (resolve, reject) { + // build request object + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + + const send = (options.protocol === 'https:' ? https : http).request; + const signal = request.signal; + + let response = null; + + const abort = function abort() { + let error = new AbortError('The user aborted a request.'); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit('error', error); + }; + + if (signal && signal.aborted) { + abort(); + return; + } + + const abortAndFinalize = function abortAndFinalize() { + abort(); + finalize(); + }; + + // send request + const req = send(options); + let reqTimeout; + + if (signal) { + signal.addEventListener('abort', abortAndFinalize); + } + + function finalize() { + req.abort(); + if (signal) signal.removeEventListener('abort', abortAndFinalize); + clearTimeout(reqTimeout); + } + + if (request.timeout) { + req.once('socket', function (socket) { + reqTimeout = setTimeout(function () { + reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); + finalize(); + }, request.timeout); + }); + } + + req.on('error', function (err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); + finalize(); + }); + + req.on('response', function (res) { + clearTimeout(reqTimeout); + + const headers = createHeadersLenient(res.headers); + + // HTTP fetch step 5 + if (fetch.isRedirect(res.statusCode)) { + // HTTP fetch step 5.2 + const location = headers.get('Location'); + + // HTTP fetch step 5.3 + let locationURL = null; + try { + locationURL = location === null ? null : new URL$1(location, request.url).toString(); + } catch (err) { + // error here can only be invalid URL in Location: header + // do not throw when options.redirect == manual + // let the user extract the errorneous redirect URL + if (request.redirect !== 'manual') { + reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); + finalize(); + return; + } + } + + // HTTP fetch step 5.5 + switch (request.redirect) { + case 'error': + reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); + finalize(); + return; + case 'manual': + // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. + if (locationURL !== null) { + // handle corrupted header + try { + headers.set('Location', locationURL); + } catch (err) { + // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request + reject(err); + } + } + break; + case 'follow': + // HTTP-redirect fetch step 2 + if (locationURL === null) { + break; + } + + // HTTP-redirect fetch step 5 + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 6 (counter increment) + // Create a new Request object. + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout, + size: request.size + }; + + if (!isDomainOrSubdomain(request.url, locationURL)) { + for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { + requestOpts.headers.delete(name); + } + } + + // HTTP-redirect fetch step 9 + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); + finalize(); + return; + } + + // HTTP-redirect fetch step 11 + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { + requestOpts.method = 'GET'; + requestOpts.body = undefined; + requestOpts.headers.delete('content-length'); + } + + // HTTP-redirect fetch step 15 + resolve(fetch(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + + // prepare response + res.once('end', function () { + if (signal) signal.removeEventListener('abort', abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers: headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + + // HTTP-network fetch step 12.1.1.3 + const codings = headers.get('Content-Encoding'); + + // HTTP-network fetch step 12.1.1.4: handle content codings + + // in following scenarios we ignore compression support + // 1. compression support is disabled + // 2. HEAD request + // 3. no Content-Encoding header + // 4. no content response (204) + // 5. content not modified response (304) + if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + + // For Node v6+ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + + // for gzip + if (codings == 'gzip' || codings == 'x-gzip') { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + + // for deflate + if (codings == 'deflate' || codings == 'x-deflate') { + // handle the infamous raw deflate response from old servers + // a hack for old IIS and Apache servers + const raw = res.pipe(new PassThrough$1()); + raw.once('data', function (chunk) { + // see http://stackoverflow.com/questions/37519828 + if ((chunk[0] & 0x0F) === 0x08) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + + // for br + if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + + // otherwise, use response as-is + response = new Response(body, response_options); + resolve(response); + }); + + writeToStream(req, request); + }); +} +/** + * Redirect code matching + * + * @param Number code Status code + * @return Boolean + */ +fetch.isRedirect = function (code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; +}; + +// expose Promise +fetch.Promise = global.Promise; + +module.exports = exports = fetch; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports["default"] = exports; +exports.Headers = Headers; +exports.Request = Request; +exports.Response = Response; +exports.FetchError = FetchError; + + +/***/ }), + +/***/ 48026: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var punycode = __nccwpck_require__(85477); +var mappingTable = __nccwpck_require__(1907); + +var PROCESSING_OPTIONS = { + TRANSITIONAL: 0, + NONTRANSITIONAL: 1 +}; + +function normalize(str) { // fix bug in v8 + return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000'); +} + +function findStatus(val) { + var start = 0; + var end = mappingTable.length - 1; + + while (start <= end) { + var mid = Math.floor((start + end) / 2); + + var target = mappingTable[mid]; + if (target[0][0] <= val && target[0][1] >= val) { + return target; + } else if (target[0][0] > val) { + end = mid - 1; + } else { + start = mid + 1; + } + } + + return null; +} + +var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; + +function countSymbols(string) { + return string + // replace every surrogate pair with a BMP symbol + .replace(regexAstralSymbols, '_') + // then get the length + .length; +} + +function mapChars(domain_name, useSTD3, processing_option) { + var hasError = false; + var processed = ""; + + var len = countSymbols(domain_name); + for (var i = 0; i < len; ++i) { + var codePoint = domain_name.codePointAt(i); + var status = findStatus(codePoint); + + switch (status[1]) { + case "disallowed": + hasError = true; + processed += String.fromCodePoint(codePoint); + break; + case "ignored": + break; + case "mapped": + processed += String.fromCodePoint.apply(String, status[2]); + break; + case "deviation": + if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) { + processed += String.fromCodePoint.apply(String, status[2]); + } else { + processed += String.fromCodePoint(codePoint); + } + break; + case "valid": + processed += String.fromCodePoint(codePoint); + break; + case "disallowed_STD3_mapped": + if (useSTD3) { + hasError = true; + processed += String.fromCodePoint(codePoint); + } else { + processed += String.fromCodePoint.apply(String, status[2]); + } + break; + case "disallowed_STD3_valid": + if (useSTD3) { + hasError = true; + } + + processed += String.fromCodePoint(codePoint); + break; + } + } + + return { + string: processed, + error: hasError + }; +} + +var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/; + +function validateLabel(label, processing_option) { + if (label.substr(0, 4) === "xn--") { + label = punycode.toUnicode(label); + processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; + } + + var error = false; + + if (normalize(label) !== label || + (label[3] === "-" && label[4] === "-") || + label[0] === "-" || label[label.length - 1] === "-" || + label.indexOf(".") !== -1 || + label.search(combiningMarksRegex) === 0) { + error = true; + } + + var len = countSymbols(label); + for (var i = 0; i < len; ++i) { + var status = findStatus(label.codePointAt(i)); + if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") || + (processing === PROCESSING_OPTIONS.NONTRANSITIONAL && + status[1] !== "valid" && status[1] !== "deviation")) { + error = true; + break; + } + } + + return { + label: label, + error: error + }; +} + +function processing(domain_name, useSTD3, processing_option) { + var result = mapChars(domain_name, useSTD3, processing_option); + result.string = normalize(result.string); + + var labels = result.string.split("."); + for (var i = 0; i < labels.length; ++i) { + try { + var validation = validateLabel(labels[i]); + labels[i] = validation.label; + result.error = result.error || validation.error; + } catch(e) { + result.error = true; + } + } + + return { + string: labels.join("."), + error: result.error + }; +} + +module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { + var result = processing(domain_name, useSTD3, processing_option); + var labels = result.string.split("."); + labels = labels.map(function(l) { + try { + return punycode.toASCII(l); + } catch(e) { + result.error = true; + return l; + } + }); + + if (verifyDnsLength) { + var total = labels.slice(0, labels.length - 1).join(".").length; + if (total.length > 253 || total.length === 0) { + result.error = true; + } + + for (var i=0; i < labels.length; ++i) { + if (labels.length > 63 || labels.length === 0) { + result.error = true; + break; + } + } + } + + if (result.error) return null; + return labels.join("."); +}; + +module.exports.toUnicode = function(domain_name, useSTD3) { + var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL); + + return { + domain: result.string, + error: result.error + }; +}; + +module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; + + +/***/ }), + +/***/ 40487: +/***/ ((module) => { + +"use strict"; + + +var conversions = {}; +module.exports = conversions; + +function sign(x) { + return x < 0 ? -1 : 1; +} + +function evenRound(x) { + // Round x to the nearest integer, choosing the even integer if it lies halfway between two. + if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor) + return Math.floor(x); + } else { + return Math.round(x); + } +} + +function createNumberConversion(bitLength, typeOpts) { + if (!typeOpts.unsigned) { + --bitLength; + } + const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength); + const upperBound = Math.pow(2, bitLength) - 1; + + const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength); + const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1); + + return function(V, opts) { + if (!opts) opts = {}; + + let x = +V; + + if (opts.enforceRange) { + if (!Number.isFinite(x)) { + throw new TypeError("Argument is not a finite number"); + } + + x = sign(x) * Math.floor(Math.abs(x)); + if (x < lowerBound || x > upperBound) { + throw new TypeError("Argument is not in byte range"); + } + + return x; + } + + if (!isNaN(x) && opts.clamp) { + x = evenRound(x); + + if (x < lowerBound) x = lowerBound; + if (x > upperBound) x = upperBound; + return x; + } + + if (!Number.isFinite(x) || x === 0) { + return 0; + } + + x = sign(x) * Math.floor(Math.abs(x)); + x = x % moduloVal; + + if (!typeOpts.unsigned && x >= moduloBound) { + return x - moduloVal; + } else if (typeOpts.unsigned) { + if (x < 0) { + x += moduloVal; + } else if (x === -0) { // don't return negative zero + return 0; + } + } + + return x; + } +} + +conversions["void"] = function () { + return undefined; +}; + +conversions["boolean"] = function (val) { + return !!val; +}; + +conversions["byte"] = createNumberConversion(8, { unsigned: false }); +conversions["octet"] = createNumberConversion(8, { unsigned: true }); + +conversions["short"] = createNumberConversion(16, { unsigned: false }); +conversions["unsigned short"] = createNumberConversion(16, { unsigned: true }); + +conversions["long"] = createNumberConversion(32, { unsigned: false }); +conversions["unsigned long"] = createNumberConversion(32, { unsigned: true }); + +conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 }); +conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 }); + +conversions["double"] = function (V) { + const x = +V; + + if (!Number.isFinite(x)) { + throw new TypeError("Argument is not a finite floating-point value"); + } + + return x; +}; + +conversions["unrestricted double"] = function (V) { + const x = +V; + + if (isNaN(x)) { + throw new TypeError("Argument is NaN"); + } + + return x; +}; + +// not quite valid, but good enough for JS +conversions["float"] = conversions["double"]; +conversions["unrestricted float"] = conversions["unrestricted double"]; + +conversions["DOMString"] = function (V, opts) { + if (!opts) opts = {}; + + if (opts.treatNullAsEmptyString && V === null) { + return ""; + } + + return String(V); +}; + +conversions["ByteString"] = function (V, opts) { + const x = String(V); + let c = undefined; + for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { + if (c > 255) { + throw new TypeError("Argument is not a valid bytestring"); + } + } + + return x; +}; + +conversions["USVString"] = function (V) { + const S = String(V); + const n = S.length; + const U = []; + for (let i = 0; i < n; ++i) { + const c = S.charCodeAt(i); + if (c < 0xD800 || c > 0xDFFF) { + U.push(String.fromCodePoint(c)); + } else if (0xDC00 <= c && c <= 0xDFFF) { + U.push(String.fromCodePoint(0xFFFD)); + } else { + if (i === n - 1) { + U.push(String.fromCodePoint(0xFFFD)); + } else { + const d = S.charCodeAt(i + 1); + if (0xDC00 <= d && d <= 0xDFFF) { + const a = c & 0x3FF; + const b = d & 0x3FF; + U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b)); + ++i; + } else { + U.push(String.fromCodePoint(0xFFFD)); + } + } + } + } + + return U.join(''); +}; + +conversions["Date"] = function (V, opts) { + if (!(V instanceof Date)) { + throw new TypeError("Argument is not a Date object"); + } + if (isNaN(V)) { + return undefined; + } + + return V; +}; + +conversions["RegExp"] = function (V, opts) { + if (!(V instanceof RegExp)) { + V = new RegExp(V); + } + + return V; +}; + + +/***/ }), + +/***/ 79722: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +const usm = __nccwpck_require__(40402); + +exports.implementation = class URLImpl { + constructor(constructorArgs) { + const url = constructorArgs[0]; + const base = constructorArgs[1]; + + let parsedBase = null; + if (base !== undefined) { + parsedBase = usm.basicURLParse(base); + if (parsedBase === "failure") { + throw new TypeError("Invalid base URL"); + } + } + + const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); + if (parsedURL === "failure") { + throw new TypeError("Invalid URL"); + } + + this._url = parsedURL; + + // TODO: query stuff + } + + get href() { + return usm.serializeURL(this._url); + } + + set href(v) { + const parsedURL = usm.basicURLParse(v); + if (parsedURL === "failure") { + throw new TypeError("Invalid URL"); + } + + this._url = parsedURL; + } + + get origin() { + return usm.serializeURLOrigin(this._url); + } + + get protocol() { + return this._url.scheme + ":"; + } + + set protocol(v) { + usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" }); + } + + get username() { + return this._url.username; + } + + set username(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } + + usm.setTheUsername(this._url, v); + } + + get password() { + return this._url.password; + } + + set password(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } + + usm.setThePassword(this._url, v); + } + + get host() { + const url = this._url; + + if (url.host === null) { + return ""; + } + + if (url.port === null) { + return usm.serializeHost(url.host); + } + + return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); + } + + set host(v) { + if (this._url.cannotBeABaseURL) { + return; + } + + usm.basicURLParse(v, { url: this._url, stateOverride: "host" }); + } + + get hostname() { + if (this._url.host === null) { + return ""; + } + + return usm.serializeHost(this._url.host); + } + + set hostname(v) { + if (this._url.cannotBeABaseURL) { + return; + } + + usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" }); + } + + get port() { + if (this._url.port === null) { + return ""; + } + + return usm.serializeInteger(this._url.port); + } + + set port(v) { + if (usm.cannotHaveAUsernamePasswordPort(this._url)) { + return; + } + + if (v === "") { + this._url.port = null; + } else { + usm.basicURLParse(v, { url: this._url, stateOverride: "port" }); + } + } + + get pathname() { + if (this._url.cannotBeABaseURL) { + return this._url.path[0]; + } + + if (this._url.path.length === 0) { + return ""; + } + + return "/" + this._url.path.join("/"); + } + + set pathname(v) { + if (this._url.cannotBeABaseURL) { + return; + } + + this._url.path = []; + usm.basicURLParse(v, { url: this._url, stateOverride: "path start" }); + } + + get search() { + if (this._url.query === null || this._url.query === "") { + return ""; + } + + return "?" + this._url.query; + } + + set search(v) { + // TODO: query stuff + + const url = this._url; + + if (v === "") { + url.query = null; + return; + } + + const input = v[0] === "?" ? v.substring(1) : v; + url.query = ""; + usm.basicURLParse(input, { url, stateOverride: "query" }); + } + + get hash() { + if (this._url.fragment === null || this._url.fragment === "") { + return ""; + } + + return "#" + this._url.fragment; + } + + set hash(v) { + if (v === "") { + this._url.fragment = null; + return; + } + + const input = v[0] === "#" ? v.substring(1) : v; + this._url.fragment = ""; + usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); + } + + toJSON() { + return this.href; + } +}; + + +/***/ }), + +/***/ 45724: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +const conversions = __nccwpck_require__(40487); +const utils = __nccwpck_require__(59468); +const Impl = __nccwpck_require__(79722); + +const impl = utils.implSymbol; + +function URL(url) { + if (!this || this[impl] || !(this instanceof URL)) { + throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); + } + if (arguments.length < 1) { + throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present."); + } + const args = []; + for (let i = 0; i < arguments.length && i < 2; ++i) { + args[i] = arguments[i]; + } + args[0] = conversions["USVString"](args[0]); + if (args[1] !== undefined) { + args[1] = conversions["USVString"](args[1]); + } + + module.exports.setup(this, args); +} + +URL.prototype.toJSON = function toJSON() { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); + } + const args = []; + for (let i = 0; i < arguments.length && i < 0; ++i) { + args[i] = arguments[i]; + } + return this[impl].toJSON.apply(this[impl], args); +}; +Object.defineProperty(URL.prototype, "href", { + get() { + return this[impl].href; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].href = V; + }, + enumerable: true, + configurable: true +}); + +URL.prototype.toString = function () { + if (!this || !module.exports.is(this)) { + throw new TypeError("Illegal invocation"); + } + return this.href; +}; + +Object.defineProperty(URL.prototype, "origin", { + get() { + return this[impl].origin; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "protocol", { + get() { + return this[impl].protocol; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].protocol = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "username", { + get() { + return this[impl].username; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].username = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "password", { + get() { + return this[impl].password; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].password = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "host", { + get() { + return this[impl].host; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].host = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "hostname", { + get() { + return this[impl].hostname; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].hostname = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "port", { + get() { + return this[impl].port; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].port = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "pathname", { + get() { + return this[impl].pathname; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].pathname = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "search", { + get() { + return this[impl].search; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].search = V; + }, + enumerable: true, + configurable: true +}); + +Object.defineProperty(URL.prototype, "hash", { + get() { + return this[impl].hash; + }, + set(V) { + V = conversions["USVString"](V); + this[impl].hash = V; + }, + enumerable: true, + configurable: true +}); + + +module.exports = { + is(obj) { + return !!obj && obj[impl] instanceof Impl.implementation; + }, + create(constructorArgs, privateData) { + let obj = Object.create(URL.prototype); + this.setup(obj, constructorArgs, privateData); + return obj; + }, + setup(obj, constructorArgs, privateData) { + if (!privateData) privateData = {}; + privateData.wrapper = obj; + + obj[impl] = new Impl.implementation(constructorArgs, privateData); + obj[impl][utils.wrapperSymbol] = obj; + }, + interface: URL, + expose: { + Window: { URL: URL }, + Worker: { URL: URL } + } +}; + + + +/***/ }), + +/***/ 73323: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +exports.URL = __nccwpck_require__(45724)["interface"]; +exports.serializeURL = __nccwpck_require__(40402).serializeURL; +exports.serializeURLOrigin = __nccwpck_require__(40402).serializeURLOrigin; +exports.basicURLParse = __nccwpck_require__(40402).basicURLParse; +exports.setTheUsername = __nccwpck_require__(40402).setTheUsername; +exports.setThePassword = __nccwpck_require__(40402).setThePassword; +exports.serializeHost = __nccwpck_require__(40402).serializeHost; +exports.serializeInteger = __nccwpck_require__(40402).serializeInteger; +exports.parseURL = __nccwpck_require__(40402).parseURL; + + +/***/ }), + +/***/ 40402: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +const punycode = __nccwpck_require__(85477); +const tr46 = __nccwpck_require__(48026); + +const specialSchemes = { + ftp: 21, + file: null, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443 +}; + +const failure = Symbol("failure"); + +function countSymbols(str) { + return punycode.ucs2.decode(str).length; +} + +function at(input, idx) { + const c = input[idx]; + return isNaN(c) ? undefined : String.fromCodePoint(c); +} + +function isASCIIDigit(c) { + return c >= 0x30 && c <= 0x39; +} + +function isASCIIAlpha(c) { + return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); +} + +function isASCIIAlphanumeric(c) { + return isASCIIAlpha(c) || isASCIIDigit(c); +} + +function isASCIIHex(c) { + return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); +} + +function isSingleDot(buffer) { + return buffer === "." || buffer.toLowerCase() === "%2e"; +} + +function isDoubleDot(buffer) { + buffer = buffer.toLowerCase(); + return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; +} + +function isWindowsDriveLetterCodePoints(cp1, cp2) { + return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); +} + +function isWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); +} + +function isNormalizedWindowsDriveLetterString(string) { + return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; +} + +function containsForbiddenHostCodePoint(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; +} + +function containsForbiddenHostCodePointExcludingPercent(string) { + return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; +} + +function isSpecialScheme(scheme) { + return specialSchemes[scheme] !== undefined; +} + +function isSpecial(url) { + return isSpecialScheme(url.scheme); +} + +function defaultPort(scheme) { + return specialSchemes[scheme]; +} + +function percentEncode(c) { + let hex = c.toString(16).toUpperCase(); + if (hex.length === 1) { + hex = "0" + hex; + } + + return "%" + hex; +} + +function utf8PercentEncode(c) { + const buf = new Buffer(c); + + let str = ""; + + for (let i = 0; i < buf.length; ++i) { + str += percentEncode(buf[i]); + } + + return str; +} + +function utf8PercentDecode(str) { + const input = new Buffer(str); + const output = []; + for (let i = 0; i < input.length; ++i) { + if (input[i] !== 37) { + output.push(input[i]); + } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { + output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); + i += 2; + } else { + output.push(input[i]); + } + } + return new Buffer(output).toString(); +} + +function isC0ControlPercentEncode(c) { + return c <= 0x1F || c > 0x7E; +} + +const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); +function isPathPercentEncode(c) { + return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); +} + +const extraUserinfoPercentEncodeSet = + new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); +function isUserinfoPercentEncode(c) { + return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); +} + +function percentEncodeChar(c, encodeSetPredicate) { + const cStr = String.fromCodePoint(c); + + if (encodeSetPredicate(c)) { + return utf8PercentEncode(cStr); + } + + return cStr; +} + +function parseIPv4Number(input) { + let R = 10; + + if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { + input = input.substring(2); + R = 16; + } else if (input.length >= 2 && input.charAt(0) === "0") { + input = input.substring(1); + R = 8; + } + + if (input === "") { + return 0; + } + + const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); + if (regex.test(input)) { + return failure; + } + + return parseInt(input, R); +} + +function parseIPv4(input) { + const parts = input.split("."); + if (parts[parts.length - 1] === "") { + if (parts.length > 1) { + parts.pop(); + } + } + + if (parts.length > 4) { + return input; + } + + const numbers = []; + for (const part of parts) { + if (part === "") { + return input; + } + const n = parseIPv4Number(part); + if (n === failure) { + return input; + } + + numbers.push(n); + } + + for (let i = 0; i < numbers.length - 1; ++i) { + if (numbers[i] > 255) { + return failure; + } + } + if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { + return failure; + } + + let ipv4 = numbers.pop(); + let counter = 0; + + for (const n of numbers) { + ipv4 += n * Math.pow(256, 3 - counter); + ++counter; + } + + return ipv4; +} + +function serializeIPv4(address) { + let output = ""; + let n = address; + + for (let i = 1; i <= 4; ++i) { + output = String(n % 256) + output; + if (i !== 4) { + output = "." + output; + } + n = Math.floor(n / 256); + } + + return output; +} + +function parseIPv6(input) { + const address = [0, 0, 0, 0, 0, 0, 0, 0]; + let pieceIndex = 0; + let compress = null; + let pointer = 0; + + input = punycode.ucs2.decode(input); + + if (input[pointer] === 58) { + if (input[pointer + 1] !== 58) { + return failure; + } + + pointer += 2; + ++pieceIndex; + compress = pieceIndex; + } + + while (pointer < input.length) { + if (pieceIndex === 8) { + return failure; + } + + if (input[pointer] === 58) { + if (compress !== null) { + return failure; + } + ++pointer; + ++pieceIndex; + compress = pieceIndex; + continue; + } + + let value = 0; + let length = 0; + + while (length < 4 && isASCIIHex(input[pointer])) { + value = value * 0x10 + parseInt(at(input, pointer), 16); + ++pointer; + ++length; + } + + if (input[pointer] === 46) { + if (length === 0) { + return failure; + } + + pointer -= length; + + if (pieceIndex > 6) { + return failure; + } + + let numbersSeen = 0; + + while (input[pointer] !== undefined) { + let ipv4Piece = null; + + if (numbersSeen > 0) { + if (input[pointer] === 46 && numbersSeen < 4) { + ++pointer; + } else { + return failure; + } + } + + if (!isASCIIDigit(input[pointer])) { + return failure; + } + + while (isASCIIDigit(input[pointer])) { + const number = parseInt(at(input, pointer)); + if (ipv4Piece === null) { + ipv4Piece = number; + } else if (ipv4Piece === 0) { + return failure; + } else { + ipv4Piece = ipv4Piece * 10 + number; + } + if (ipv4Piece > 255) { + return failure; + } + ++pointer; + } + + address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; + + ++numbersSeen; + + if (numbersSeen === 2 || numbersSeen === 4) { + ++pieceIndex; + } + } + + if (numbersSeen !== 4) { + return failure; + } + + break; + } else if (input[pointer] === 58) { + ++pointer; + if (input[pointer] === undefined) { + return failure; + } + } else if (input[pointer] !== undefined) { + return failure; + } + + address[pieceIndex] = value; + ++pieceIndex; + } + + if (compress !== null) { + let swaps = pieceIndex - compress; + pieceIndex = 7; + while (pieceIndex !== 0 && swaps > 0) { + const temp = address[compress + swaps - 1]; + address[compress + swaps - 1] = address[pieceIndex]; + address[pieceIndex] = temp; + --pieceIndex; + --swaps; + } + } else if (compress === null && pieceIndex !== 8) { + return failure; + } + + return address; +} + +function serializeIPv6(address) { + let output = ""; + const seqResult = findLongestZeroSequence(address); + const compress = seqResult.idx; + let ignore0 = false; + + for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { + if (ignore0 && address[pieceIndex] === 0) { + continue; + } else if (ignore0) { + ignore0 = false; + } + + if (compress === pieceIndex) { + const separator = pieceIndex === 0 ? "::" : ":"; + output += separator; + ignore0 = true; + continue; + } + + output += address[pieceIndex].toString(16); + + if (pieceIndex !== 7) { + output += ":"; + } + } + + return output; +} + +function parseHost(input, isSpecialArg) { + if (input[0] === "[") { + if (input[input.length - 1] !== "]") { + return failure; + } + + return parseIPv6(input.substring(1, input.length - 1)); + } + + if (!isSpecialArg) { + return parseOpaqueHost(input); + } + + const domain = utf8PercentDecode(input); + const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); + if (asciiDomain === null) { + return failure; + } + + if (containsForbiddenHostCodePoint(asciiDomain)) { + return failure; + } + + const ipv4Host = parseIPv4(asciiDomain); + if (typeof ipv4Host === "number" || ipv4Host === failure) { + return ipv4Host; + } + + return asciiDomain; +} + +function parseOpaqueHost(input) { + if (containsForbiddenHostCodePointExcludingPercent(input)) { + return failure; + } + + let output = ""; + const decoded = punycode.ucs2.decode(input); + for (let i = 0; i < decoded.length; ++i) { + output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); + } + return output; +} + +function findLongestZeroSequence(arr) { + let maxIdx = null; + let maxLen = 1; // only find elements > 1 + let currStart = null; + let currLen = 0; + + for (let i = 0; i < arr.length; ++i) { + if (arr[i] !== 0) { + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } + + currStart = null; + currLen = 0; + } else { + if (currStart === null) { + currStart = i; + } + ++currLen; + } + } + + // if trailing zeros + if (currLen > maxLen) { + maxIdx = currStart; + maxLen = currLen; + } + + return { + idx: maxIdx, + len: maxLen + }; +} + +function serializeHost(host) { + if (typeof host === "number") { + return serializeIPv4(host); + } + + // IPv6 serializer + if (host instanceof Array) { + return "[" + serializeIPv6(host) + "]"; + } + + return host; +} + +function trimControlChars(url) { + return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); +} + +function trimTabAndNewline(url) { + return url.replace(/\u0009|\u000A|\u000D/g, ""); +} + +function shortenPath(url) { + const path = url.path; + if (path.length === 0) { + return; + } + if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { + return; + } + + path.pop(); +} + +function includesCredentials(url) { + return url.username !== "" || url.password !== ""; +} + +function cannotHaveAUsernamePasswordPort(url) { + return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; +} + +function isNormalizedWindowsDriveLetter(string) { + return /^[A-Za-z]:$/.test(string); +} + +function URLStateMachine(input, base, encodingOverride, url, stateOverride) { + this.pointer = 0; + this.input = input; + this.base = base || null; + this.encodingOverride = encodingOverride || "utf-8"; + this.stateOverride = stateOverride; + this.url = url; + this.failure = false; + this.parseError = false; + + if (!this.url) { + this.url = { + scheme: "", + username: "", + password: "", + host: null, + port: null, + path: [], + query: null, + fragment: null, + + cannotBeABaseURL: false + }; + + const res = trimControlChars(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; + } + + const res = trimTabAndNewline(this.input); + if (res !== this.input) { + this.parseError = true; + } + this.input = res; + + this.state = stateOverride || "scheme start"; + + this.buffer = ""; + this.atFlag = false; + this.arrFlag = false; + this.passwordTokenSeenFlag = false; + + this.input = punycode.ucs2.decode(this.input); + + for (; this.pointer <= this.input.length; ++this.pointer) { + const c = this.input[this.pointer]; + const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); + + // exec state machine + const ret = this["parse " + this.state](c, cStr); + if (!ret) { + break; // terminate algorithm + } else if (ret === failure) { + this.failure = true; + break; + } + } +} + +URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { + if (isASCIIAlpha(c)) { + this.buffer += cStr.toLowerCase(); + this.state = "scheme"; + } else if (!this.stateOverride) { + this.state = "no scheme"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { + if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { + this.buffer += cStr.toLowerCase(); + } else if (c === 58) { + if (this.stateOverride) { + if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { + return false; + } + + if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { + return false; + } + + if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { + return false; + } + + if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { + return false; + } + } + this.url.scheme = this.buffer; + this.buffer = ""; + if (this.stateOverride) { + return false; + } + if (this.url.scheme === "file") { + if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { + this.parseError = true; + } + this.state = "file"; + } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { + this.state = "special relative or authority"; + } else if (isSpecial(this.url)) { + this.state = "special authority slashes"; + } else if (this.input[this.pointer + 1] === 47) { + this.state = "path or authority"; + ++this.pointer; + } else { + this.url.cannotBeABaseURL = true; + this.url.path.push(""); + this.state = "cannot-be-a-base-URL path"; + } + } else if (!this.stateOverride) { + this.buffer = ""; + this.state = "no scheme"; + this.pointer = -1; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { + if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { + return failure; + } else if (this.base.cannotBeABaseURL && c === 35) { + this.url.scheme = this.base.scheme; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.url.cannotBeABaseURL = true; + this.state = "fragment"; + } else if (this.base.scheme === "file") { + this.state = "file"; + --this.pointer; + } else { + this.state = "relative"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "relative"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { + if (c === 47) { + this.state = "authority"; + } else { + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse relative"] = function parseRelative(c) { + this.url.scheme = this.base.scheme; + if (isNaN(c)) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 47) { + this.state = "relative slash"; + } else if (c === 63) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else if (isSpecial(this.url) && c === 92) { + this.parseError = true; + this.state = "relative slash"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.url.path = this.base.path.slice(0, this.base.path.length - 1); + + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { + if (isSpecial(this.url) && (c === 47 || c === 92)) { + if (c === 92) { + this.parseError = true; + } + this.state = "special authority ignore slashes"; + } else if (c === 47) { + this.state = "authority"; + } else { + this.url.username = this.base.username; + this.url.password = this.base.password; + this.url.host = this.base.host; + this.url.port = this.base.port; + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { + if (c === 47 && this.input[this.pointer + 1] === 47) { + this.state = "special authority ignore slashes"; + ++this.pointer; + } else { + this.parseError = true; + this.state = "special authority ignore slashes"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { + if (c !== 47 && c !== 92) { + this.state = "authority"; + --this.pointer; + } else { + this.parseError = true; + } + + return true; +}; + +URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { + if (c === 64) { + this.parseError = true; + if (this.atFlag) { + this.buffer = "%40" + this.buffer; + } + this.atFlag = true; + + // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars + const len = countSymbols(this.buffer); + for (let pointer = 0; pointer < len; ++pointer) { + const codePoint = this.buffer.codePointAt(pointer); + + if (codePoint === 58 && !this.passwordTokenSeenFlag) { + this.passwordTokenSeenFlag = true; + continue; + } + const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); + if (this.passwordTokenSeenFlag) { + this.url.password += encodedCodePoints; + } else { + this.url.username += encodedCodePoints; + } + } + this.buffer = ""; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + if (this.atFlag && this.buffer === "") { + this.parseError = true; + return failure; + } + this.pointer -= countSymbols(this.buffer) + 1; + this.buffer = ""; + this.state = "host"; + } else { + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse hostname"] = +URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { + if (this.stateOverride && this.url.scheme === "file") { + --this.pointer; + this.state = "file host"; + } else if (c === 58 && !this.arrFlag) { + if (this.buffer === "") { + this.parseError = true; + return failure; + } + + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + + this.url.host = host; + this.buffer = ""; + this.state = "port"; + if (this.stateOverride === "hostname") { + return false; + } + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92)) { + --this.pointer; + if (isSpecial(this.url) && this.buffer === "") { + this.parseError = true; + return failure; + } else if (this.stateOverride && this.buffer === "" && + (includesCredentials(this.url) || this.url.port !== null)) { + this.parseError = true; + return false; + } + + const host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + + this.url.host = host; + this.buffer = ""; + this.state = "path start"; + if (this.stateOverride) { + return false; + } + } else { + if (c === 91) { + this.arrFlag = true; + } else if (c === 93) { + this.arrFlag = false; + } + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { + if (isASCIIDigit(c)) { + this.buffer += cStr; + } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || + (isSpecial(this.url) && c === 92) || + this.stateOverride) { + if (this.buffer !== "") { + const port = parseInt(this.buffer); + if (port > Math.pow(2, 16) - 1) { + this.parseError = true; + return failure; + } + this.url.port = port === defaultPort(this.url.scheme) ? null : port; + this.buffer = ""; + } + if (this.stateOverride) { + return false; + } + this.state = "path start"; + --this.pointer; + } else { + this.parseError = true; + return failure; + } + + return true; +}; + +const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); + +URLStateMachine.prototype["parse file"] = function parseFile(c) { + this.url.scheme = "file"; + + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file slash"; + } else if (this.base !== null && this.base.scheme === "file") { + if (isNaN(c)) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + } else if (c === 63) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + this.url.query = this.base.query; + this.url.fragment = ""; + this.state = "fragment"; + } else { + if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points + !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || + (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points + !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { + this.url.host = this.base.host; + this.url.path = this.base.path.slice(); + shortenPath(this.url); + } else { + this.parseError = true; + } + + this.state = "path"; + --this.pointer; + } + } else { + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { + if (c === 47 || c === 92) { + if (c === 92) { + this.parseError = true; + } + this.state = "file host"; + } else { + if (this.base !== null && this.base.scheme === "file") { + if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { + this.url.path.push(this.base.path[0]); + } else { + this.url.host = this.base.host; + } + } + this.state = "path"; + --this.pointer; + } + + return true; +}; + +URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { + if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { + --this.pointer; + if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { + this.parseError = true; + this.state = "path"; + } else if (this.buffer === "") { + this.url.host = ""; + if (this.stateOverride) { + return false; + } + this.state = "path start"; + } else { + let host = parseHost(this.buffer, isSpecial(this.url)); + if (host === failure) { + return failure; + } + if (host === "localhost") { + host = ""; + } + this.url.host = host; + + if (this.stateOverride) { + return false; + } + + this.buffer = ""; + this.state = "path start"; + } + } else { + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { + if (isSpecial(this.url)) { + if (c === 92) { + this.parseError = true; + } + this.state = "path"; + + if (c !== 47 && c !== 92) { + --this.pointer; + } + } else if (!this.stateOverride && c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (!this.stateOverride && c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else if (c !== undefined) { + this.state = "path"; + if (c !== 47) { + --this.pointer; + } + } + + return true; +}; + +URLStateMachine.prototype["parse path"] = function parsePath(c) { + if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || + (!this.stateOverride && (c === 63 || c === 35))) { + if (isSpecial(this.url) && c === 92) { + this.parseError = true; + } + + if (isDoubleDot(this.buffer)) { + shortenPath(this.url); + if (c !== 47 && !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } + } else if (isSingleDot(this.buffer) && c !== 47 && + !(isSpecial(this.url) && c === 92)) { + this.url.path.push(""); + } else if (!isSingleDot(this.buffer)) { + if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { + if (this.url.host !== "" && this.url.host !== null) { + this.parseError = true; + this.url.host = ""; + } + this.buffer = this.buffer[0] + ":"; + } + this.url.path.push(this.buffer); + } + this.buffer = ""; + if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { + while (this.url.path.length > 1 && this.url.path[0] === "") { + this.parseError = true; + this.url.path.shift(); + } + } + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.buffer += percentEncodeChar(c, isPathPercentEncode); + } + + return true; +}; + +URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { + if (c === 63) { + this.url.query = ""; + this.state = "query"; + } else if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } else { + // TODO: Add: not a URL code point + if (!isNaN(c) && c !== 37) { + this.parseError = true; + } + + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + if (!isNaN(c)) { + this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); + } + } + + return true; +}; + +URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { + if (isNaN(c) || (!this.stateOverride && c === 35)) { + if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { + this.encodingOverride = "utf-8"; + } + + const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead + for (let i = 0; i < buffer.length; ++i) { + if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || + buffer[i] === 0x3C || buffer[i] === 0x3E) { + this.url.query += percentEncode(buffer[i]); + } else { + this.url.query += String.fromCodePoint(buffer[i]); + } + } + + this.buffer = ""; + if (c === 35) { + this.url.fragment = ""; + this.state = "fragment"; + } + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.buffer += cStr; + } + + return true; +}; + +URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { + if (isNaN(c)) { // do nothing + } else if (c === 0x0) { + this.parseError = true; + } else { + // TODO: If c is not a URL code point and not "%", parse error. + if (c === 37 && + (!isASCIIHex(this.input[this.pointer + 1]) || + !isASCIIHex(this.input[this.pointer + 2]))) { + this.parseError = true; + } + + this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); + } + + return true; +}; + +function serializeURL(url, excludeFragment) { + let output = url.scheme + ":"; + if (url.host !== null) { + output += "//"; + + if (url.username !== "" || url.password !== "") { + output += url.username; + if (url.password !== "") { + output += ":" + url.password; + } + output += "@"; + } + + output += serializeHost(url.host); + + if (url.port !== null) { + output += ":" + url.port; + } + } else if (url.host === null && url.scheme === "file") { + output += "//"; + } + + if (url.cannotBeABaseURL) { + output += url.path[0]; + } else { + for (const string of url.path) { + output += "/" + string; + } + } + + if (url.query !== null) { + output += "?" + url.query; + } + + if (!excludeFragment && url.fragment !== null) { + output += "#" + url.fragment; + } + + return output; +} + +function serializeOrigin(tuple) { + let result = tuple.scheme + "://"; + result += serializeHost(tuple.host); + + if (tuple.port !== null) { + result += ":" + tuple.port; + } + + return result; +} + +module.exports.serializeURL = serializeURL; + +module.exports.serializeURLOrigin = function (url) { + // https://url.spec.whatwg.org/#concept-url-origin + switch (url.scheme) { + case "blob": + try { + return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); + } catch (e) { + // serializing an opaque origin returns "null" + return "null"; + } + case "ftp": + case "gopher": + case "http": + case "https": + case "ws": + case "wss": + return serializeOrigin({ + scheme: url.scheme, + host: url.host, + port: url.port + }); + case "file": + // spec says "exercise to the reader", chrome says "file://" + return "file://"; + default: + // serializing an opaque origin returns "null" + return "null"; + } +}; + +module.exports.basicURLParse = function (input, options) { + if (options === undefined) { + options = {}; + } + + const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); + if (usm.failure) { + return "failure"; + } + + return usm.url; +}; + +module.exports.setTheUsername = function (url, username) { + url.username = ""; + const decoded = punycode.ucs2.decode(username); + for (let i = 0; i < decoded.length; ++i) { + url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.setThePassword = function (url, password) { + url.password = ""; + const decoded = punycode.ucs2.decode(password); + for (let i = 0; i < decoded.length; ++i) { + url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + } +}; + +module.exports.serializeHost = serializeHost; + +module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; + +module.exports.serializeInteger = function (integer) { + return String(integer); +}; + +module.exports.parseURL = function (input, options) { + if (options === undefined) { + options = {}; + } + + // We don't handle blobs, so this just delegates: + return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); +}; + + +/***/ }), + +/***/ 59468: +/***/ ((module) => { + +"use strict"; + + +module.exports.mixin = function mixin(target, source) { + const keys = Object.getOwnPropertyNames(source); + for (let i = 0; i < keys.length; ++i) { + Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); + } +}; + +module.exports.wrapperSymbol = Symbol("wrapper"); +module.exports.implSymbol = Symbol("impl"); + +module.exports.wrapperForImpl = function (impl) { + return impl[module.exports.wrapperSymbol]; +}; + +module.exports.implForWrapper = function (wrapper) { + return wrapper[module.exports.implSymbol]; +}; + + + +/***/ }), + +/***/ 16606: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Advanced Encryption Standard (AES) implementation. + * + * This implementation is based on the public domain library 'jscrypto' which + * was written by: + * + * Emily Stark (estark@stanford.edu) + * Mike Hamburg (mhamburg@stanford.edu) + * Dan Boneh (dabo@cs.stanford.edu) + * + * Parts of this code are based on the OpenSSL implementation of AES: + * http://www.openssl.org + * + * @author Dave Longley + * + * Copyright (c) 2010-2014 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(21477); +__nccwpck_require__(23540); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(27883); +__nccwpck_require__(70857); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/* AES API */ +module.exports = forge.aes = forge.aes || {}; + +/** + * Deprecated. Instead, use: + * + * var cipher = forge.cipher.createCipher('AES-', key); + * cipher.start({iv: iv}); + * + * Creates an AES cipher object to encrypt data using the given symmetric key. + * The output will be stored in the 'output' member of the returned cipher. + * + * The key and iv may be given as a string of bytes, an array of bytes, + * a byte buffer, or an array of 32-bit words. + * + * @param key the symmetric key to use. + * @param iv the initialization vector to use. + * @param output the buffer to write to, null to create one. + * @param mode the cipher mode to use (default: 'CBC'). + * + * @return the cipher. + */ +forge.aes.startEncrypting = function(key, iv, output, mode) { + var cipher = _createCipher({ + key: key, + output: output, + decrypt: false, + mode: mode + }); + cipher.start(iv); + return cipher; +}; + +/** + * Deprecated. Instead, use: + * + * var cipher = forge.cipher.createCipher('AES-', key); + * + * Creates an AES cipher object to encrypt data using the given symmetric key. + * + * The key may be given as a string of bytes, an array of bytes, a + * byte buffer, or an array of 32-bit words. + * + * @param key the symmetric key to use. + * @param mode the cipher mode to use (default: 'CBC'). + * + * @return the cipher. + */ +forge.aes.createEncryptionCipher = function(key, mode) { + return _createCipher({ + key: key, + output: null, + decrypt: false, + mode: mode + }); +}; + +/** + * Deprecated. Instead, use: + * + * var decipher = forge.cipher.createDecipher('AES-', key); + * decipher.start({iv: iv}); + * + * Creates an AES cipher object to decrypt data using the given symmetric key. + * The output will be stored in the 'output' member of the returned cipher. + * + * The key and iv may be given as a string of bytes, an array of bytes, + * a byte buffer, or an array of 32-bit words. + * + * @param key the symmetric key to use. + * @param iv the initialization vector to use. + * @param output the buffer to write to, null to create one. + * @param mode the cipher mode to use (default: 'CBC'). + * + * @return the cipher. + */ +forge.aes.startDecrypting = function(key, iv, output, mode) { + var cipher = _createCipher({ + key: key, + output: output, + decrypt: true, + mode: mode + }); + cipher.start(iv); + return cipher; +}; + +/** + * Deprecated. Instead, use: + * + * var decipher = forge.cipher.createDecipher('AES-', key); + * + * Creates an AES cipher object to decrypt data using the given symmetric key. + * + * The key may be given as a string of bytes, an array of bytes, a + * byte buffer, or an array of 32-bit words. + * + * @param key the symmetric key to use. + * @param mode the cipher mode to use (default: 'CBC'). + * + * @return the cipher. + */ +forge.aes.createDecryptionCipher = function(key, mode) { + return _createCipher({ + key: key, + output: null, + decrypt: true, + mode: mode + }); +}; + +/** + * Creates a new AES cipher algorithm object. + * + * @param name the name of the algorithm. + * @param mode the mode factory function. + * + * @return the AES algorithm object. + */ +forge.aes.Algorithm = function(name, mode) { + if(!init) { + initialize(); + } + var self = this; + self.name = name; + self.mode = new mode({ + blockSize: 16, + cipher: { + encrypt: function(inBlock, outBlock) { + return _updateBlock(self._w, inBlock, outBlock, false); + }, + decrypt: function(inBlock, outBlock) { + return _updateBlock(self._w, inBlock, outBlock, true); + } + } + }); + self._init = false; +}; + +/** + * Initializes this AES algorithm by expanding its key. + * + * @param options the options to use. + * key the key to use with this algorithm. + * decrypt true if the algorithm should be initialized for decryption, + * false for encryption. + */ +forge.aes.Algorithm.prototype.initialize = function(options) { + if(this._init) { + return; + } + + var key = options.key; + var tmp; + + /* Note: The key may be a string of bytes, an array of bytes, a byte + buffer, or an array of 32-bit integers. If the key is in bytes, then + it must be 16, 24, or 32 bytes in length. If it is in 32-bit + integers, it must be 4, 6, or 8 integers long. */ + + if(typeof key === 'string' && + (key.length === 16 || key.length === 24 || key.length === 32)) { + // convert key string into byte buffer + key = forge.util.createBuffer(key); + } else if(forge.util.isArray(key) && + (key.length === 16 || key.length === 24 || key.length === 32)) { + // convert key integer array into byte buffer + tmp = key; + key = forge.util.createBuffer(); + for(var i = 0; i < tmp.length; ++i) { + key.putByte(tmp[i]); + } + } + + // convert key byte buffer into 32-bit integer array + if(!forge.util.isArray(key)) { + tmp = key; + key = []; + + // key lengths of 16, 24, 32 bytes allowed + var len = tmp.length(); + if(len === 16 || len === 24 || len === 32) { + len = len >>> 2; + for(var i = 0; i < len; ++i) { + key.push(tmp.getInt32()); + } + } + } + + // key must be an array of 32-bit integers by now + if(!forge.util.isArray(key) || + !(key.length === 4 || key.length === 6 || key.length === 8)) { + throw new Error('Invalid key parameter.'); + } + + // encryption operation is always used for these modes + var mode = this.mode.name; + var encryptOp = (['CFB', 'OFB', 'CTR', 'GCM'].indexOf(mode) !== -1); + + // do key expansion + this._w = _expandKey(key, options.decrypt && !encryptOp); + this._init = true; +}; + +/** + * Expands a key. Typically only used for testing. + * + * @param key the symmetric key to expand, as an array of 32-bit words. + * @param decrypt true to expand for decryption, false for encryption. + * + * @return the expanded key. + */ +forge.aes._expandKey = function(key, decrypt) { + if(!init) { + initialize(); + } + return _expandKey(key, decrypt); +}; + +/** + * Updates a single block. Typically only used for testing. + * + * @param w the expanded key to use. + * @param input an array of block-size 32-bit words. + * @param output an array of block-size 32-bit words. + * @param decrypt true to decrypt, false to encrypt. + */ +forge.aes._updateBlock = _updateBlock; + +/** Register AES algorithms **/ + +registerAlgorithm('AES-ECB', forge.cipher.modes.ecb); +registerAlgorithm('AES-CBC', forge.cipher.modes.cbc); +registerAlgorithm('AES-CFB', forge.cipher.modes.cfb); +registerAlgorithm('AES-OFB', forge.cipher.modes.ofb); +registerAlgorithm('AES-CTR', forge.cipher.modes.ctr); +registerAlgorithm('AES-GCM', forge.cipher.modes.gcm); + +function registerAlgorithm(name, mode) { + var factory = function() { + return new forge.aes.Algorithm(name, mode); + }; + forge.cipher.registerAlgorithm(name, factory); +} + +/** AES implementation **/ + +var init = false; // not yet initialized +var Nb = 4; // number of words comprising the state (AES = 4) +var sbox; // non-linear substitution table used in key expansion +var isbox; // inversion of sbox +var rcon; // round constant word array +var mix; // mix-columns table +var imix; // inverse mix-columns table + +/** + * Performs initialization, ie: precomputes tables to optimize for speed. + * + * One way to understand how AES works is to imagine that 'addition' and + * 'multiplication' are interfaces that require certain mathematical + * properties to hold true (ie: they are associative) but they might have + * different implementations and produce different kinds of results ... + * provided that their mathematical properties remain true. AES defines + * its own methods of addition and multiplication but keeps some important + * properties the same, ie: associativity and distributivity. The + * explanation below tries to shed some light on how AES defines addition + * and multiplication of bytes and 32-bit words in order to perform its + * encryption and decryption algorithms. + * + * The basics: + * + * The AES algorithm views bytes as binary representations of polynomials + * that have either 1 or 0 as the coefficients. It defines the addition + * or subtraction of two bytes as the XOR operation. It also defines the + * multiplication of two bytes as a finite field referred to as GF(2^8) + * (Note: 'GF' means "Galois Field" which is a field that contains a finite + * number of elements so GF(2^8) has 256 elements). + * + * This means that any two bytes can be represented as binary polynomials; + * when they multiplied together and modularly reduced by an irreducible + * polynomial of the 8th degree, the results are the field GF(2^8). The + * specific irreducible polynomial that AES uses in hexadecimal is 0x11b. + * This multiplication is associative with 0x01 as the identity: + * + * (b * 0x01 = GF(b, 0x01) = b). + * + * The operation GF(b, 0x02) can be performed at the byte level by left + * shifting b once and then XOR'ing it (to perform the modular reduction) + * with 0x11b if b is >= 128. Repeated application of the multiplication + * of 0x02 can be used to implement the multiplication of any two bytes. + * + * For instance, multiplying 0x57 and 0x13, denoted as GF(0x57, 0x13), can + * be performed by factoring 0x13 into 0x01, 0x02, and 0x10. Then these + * factors can each be multiplied by 0x57 and then added together. To do + * the multiplication, values for 0x57 multiplied by each of these 3 factors + * can be precomputed and stored in a table. To add them, the values from + * the table are XOR'd together. + * + * AES also defines addition and multiplication of words, that is 4-byte + * numbers represented as polynomials of 3 degrees where the coefficients + * are the values of the bytes. + * + * The word [a0, a1, a2, a3] is a polynomial a3x^3 + a2x^2 + a1x + a0. + * + * Addition is performed by XOR'ing like powers of x. Multiplication + * is performed in two steps, the first is an algebriac expansion as + * you would do normally (where addition is XOR). But the result is + * a polynomial larger than 3 degrees and thus it cannot fit in a word. So + * next the result is modularly reduced by an AES-specific polynomial of + * degree 4 which will always produce a polynomial of less than 4 degrees + * such that it will fit in a word. In AES, this polynomial is x^4 + 1. + * + * The modular product of two polynomials 'a' and 'b' is thus: + * + * d(x) = d3x^3 + d2x^2 + d1x + d0 + * with + * d0 = GF(a0, b0) ^ GF(a3, b1) ^ GF(a2, b2) ^ GF(a1, b3) + * d1 = GF(a1, b0) ^ GF(a0, b1) ^ GF(a3, b2) ^ GF(a2, b3) + * d2 = GF(a2, b0) ^ GF(a1, b1) ^ GF(a0, b2) ^ GF(a3, b3) + * d3 = GF(a3, b0) ^ GF(a2, b1) ^ GF(a1, b2) ^ GF(a0, b3) + * + * As a matrix: + * + * [d0] = [a0 a3 a2 a1][b0] + * [d1] [a1 a0 a3 a2][b1] + * [d2] [a2 a1 a0 a3][b2] + * [d3] [a3 a2 a1 a0][b3] + * + * Special polynomials defined by AES (0x02 == {02}): + * a(x) = {03}x^3 + {01}x^2 + {01}x + {02} + * a^-1(x) = {0b}x^3 + {0d}x^2 + {09}x + {0e}. + * + * These polynomials are used in the MixColumns() and InverseMixColumns() + * operations, respectively, to cause each element in the state to affect + * the output (referred to as diffusing). + * + * RotWord() uses: a0 = a1 = a2 = {00} and a3 = {01}, which is the + * polynomial x3. + * + * The ShiftRows() method modifies the last 3 rows in the state (where + * the state is 4 words with 4 bytes per word) by shifting bytes cyclically. + * The 1st byte in the second row is moved to the end of the row. The 1st + * and 2nd bytes in the third row are moved to the end of the row. The 1st, + * 2nd, and 3rd bytes are moved in the fourth row. + * + * More details on how AES arithmetic works: + * + * In the polynomial representation of binary numbers, XOR performs addition + * and subtraction and multiplication in GF(2^8) denoted as GF(a, b) + * corresponds with the multiplication of polynomials modulo an irreducible + * polynomial of degree 8. In other words, for AES, GF(a, b) will multiply + * polynomial 'a' with polynomial 'b' and then do a modular reduction by + * an AES-specific irreducible polynomial of degree 8. + * + * A polynomial is irreducible if its only divisors are one and itself. For + * the AES algorithm, this irreducible polynomial is: + * + * m(x) = x^8 + x^4 + x^3 + x + 1, + * + * or {01}{1b} in hexadecimal notation, where each coefficient is a bit: + * 100011011 = 283 = 0x11b. + * + * For example, GF(0x57, 0x83) = 0xc1 because + * + * 0x57 = 87 = 01010111 = x^6 + x^4 + x^2 + x + 1 + * 0x85 = 131 = 10000101 = x^7 + x + 1 + * + * (x^6 + x^4 + x^2 + x + 1) * (x^7 + x + 1) + * = x^13 + x^11 + x^9 + x^8 + x^7 + + * x^7 + x^5 + x^3 + x^2 + x + + * x^6 + x^4 + x^2 + x + 1 + * = x^13 + x^11 + x^9 + x^8 + x^6 + x^5 + x^4 + x^3 + 1 = y + * y modulo (x^8 + x^4 + x^3 + x + 1) + * = x^7 + x^6 + 1. + * + * The modular reduction by m(x) guarantees the result will be a binary + * polynomial of less than degree 8, so that it can fit in a byte. + * + * The operation to multiply a binary polynomial b with x (the polynomial + * x in binary representation is 00000010) is: + * + * b_7x^8 + b_6x^7 + b_5x^6 + b_4x^5 + b_3x^4 + b_2x^3 + b_1x^2 + b_0x^1 + * + * To get GF(b, x) we must reduce that by m(x). If b_7 is 0 (that is the + * most significant bit is 0 in b) then the result is already reduced. If + * it is 1, then we can reduce it by subtracting m(x) via an XOR. + * + * It follows that multiplication by x (00000010 or 0x02) can be implemented + * by performing a left shift followed by a conditional bitwise XOR with + * 0x1b. This operation on bytes is denoted by xtime(). Multiplication by + * higher powers of x can be implemented by repeated application of xtime(). + * + * By adding intermediate results, multiplication by any constant can be + * implemented. For instance: + * + * GF(0x57, 0x13) = 0xfe because: + * + * xtime(b) = (b & 128) ? (b << 1 ^ 0x11b) : (b << 1) + * + * Note: We XOR with 0x11b instead of 0x1b because in javascript our + * datatype for b can be larger than 1 byte, so a left shift will not + * automatically eliminate bits that overflow a byte ... by XOR'ing the + * overflow bit with 1 (the extra one from 0x11b) we zero it out. + * + * GF(0x57, 0x02) = xtime(0x57) = 0xae + * GF(0x57, 0x04) = xtime(0xae) = 0x47 + * GF(0x57, 0x08) = xtime(0x47) = 0x8e + * GF(0x57, 0x10) = xtime(0x8e) = 0x07 + * + * GF(0x57, 0x13) = GF(0x57, (0x01 ^ 0x02 ^ 0x10)) + * + * And by the distributive property (since XOR is addition and GF() is + * multiplication): + * + * = GF(0x57, 0x01) ^ GF(0x57, 0x02) ^ GF(0x57, 0x10) + * = 0x57 ^ 0xae ^ 0x07 + * = 0xfe. + */ +function initialize() { + init = true; + + /* Populate the Rcon table. These are the values given by + [x^(i-1),{00},{00},{00}] where x^(i-1) are powers of x (and x = 0x02) + in the field of GF(2^8), where i starts at 1. + + rcon[0] = [0x00, 0x00, 0x00, 0x00] + rcon[1] = [0x01, 0x00, 0x00, 0x00] 2^(1-1) = 2^0 = 1 + rcon[2] = [0x02, 0x00, 0x00, 0x00] 2^(2-1) = 2^1 = 2 + ... + rcon[9] = [0x1B, 0x00, 0x00, 0x00] 2^(9-1) = 2^8 = 0x1B + rcon[10] = [0x36, 0x00, 0x00, 0x00] 2^(10-1) = 2^9 = 0x36 + + We only store the first byte because it is the only one used. + */ + rcon = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36]; + + // compute xtime table which maps i onto GF(i, 0x02) + var xtime = new Array(256); + for(var i = 0; i < 128; ++i) { + xtime[i] = i << 1; + xtime[i + 128] = (i + 128) << 1 ^ 0x11B; + } + + // compute all other tables + sbox = new Array(256); + isbox = new Array(256); + mix = new Array(4); + imix = new Array(4); + for(var i = 0; i < 4; ++i) { + mix[i] = new Array(256); + imix[i] = new Array(256); + } + var e = 0, ei = 0, e2, e4, e8, sx, sx2, me, ime; + for(var i = 0; i < 256; ++i) { + /* We need to generate the SubBytes() sbox and isbox tables so that + we can perform byte substitutions. This requires us to traverse + all of the elements in GF, find their multiplicative inverses, + and apply to each the following affine transformation: + + bi' = bi ^ b(i + 4) mod 8 ^ b(i + 5) mod 8 ^ b(i + 6) mod 8 ^ + b(i + 7) mod 8 ^ ci + for 0 <= i < 8, where bi is the ith bit of the byte, and ci is the + ith bit of a byte c with the value {63} or {01100011}. + + It is possible to traverse every possible value in a Galois field + using what is referred to as a 'generator'. There are many + generators (128 out of 256): 3,5,6,9,11,82 to name a few. To fully + traverse GF we iterate 255 times, multiplying by our generator + each time. + + On each iteration we can determine the multiplicative inverse for + the current element. + + Suppose there is an element in GF 'e'. For a given generator 'g', + e = g^x. The multiplicative inverse of e is g^(255 - x). It turns + out that if use the inverse of a generator as another generator + it will produce all of the corresponding multiplicative inverses + at the same time. For this reason, we choose 5 as our inverse + generator because it only requires 2 multiplies and 1 add and its + inverse, 82, requires relatively few operations as well. + + In order to apply the affine transformation, the multiplicative + inverse 'ei' of 'e' can be repeatedly XOR'd (4 times) with a + bit-cycling of 'ei'. To do this 'ei' is first stored in 's' and + 'x'. Then 's' is left shifted and the high bit of 's' is made the + low bit. The resulting value is stored in 's'. Then 'x' is XOR'd + with 's' and stored in 'x'. On each subsequent iteration the same + operation is performed. When 4 iterations are complete, 'x' is + XOR'd with 'c' (0x63) and the transformed value is stored in 'x'. + For example: + + s = 01000001 + x = 01000001 + + iteration 1: s = 10000010, x ^= s + iteration 2: s = 00000101, x ^= s + iteration 3: s = 00001010, x ^= s + iteration 4: s = 00010100, x ^= s + x ^= 0x63 + + This can be done with a loop where s = (s << 1) | (s >> 7). However, + it can also be done by using a single 16-bit (in this case 32-bit) + number 'sx'. Since XOR is an associative operation, we can set 'sx' + to 'ei' and then XOR it with 'sx' left-shifted 1,2,3, and 4 times. + The most significant bits will flow into the high 8 bit positions + and be correctly XOR'd with one another. All that remains will be + to cycle the high 8 bits by XOR'ing them all with the lower 8 bits + afterwards. + + At the same time we're populating sbox and isbox we can precompute + the multiplication we'll need to do to do MixColumns() later. + */ + + // apply affine transformation + sx = ei ^ (ei << 1) ^ (ei << 2) ^ (ei << 3) ^ (ei << 4); + sx = (sx >> 8) ^ (sx & 255) ^ 0x63; + + // update tables + sbox[e] = sx; + isbox[sx] = e; + + /* Mixing columns is done using matrix multiplication. The columns + that are to be mixed are each a single word in the current state. + The state has Nb columns (4 columns). Therefore each column is a + 4 byte word. So to mix the columns in a single column 'c' where + its rows are r0, r1, r2, and r3, we use the following matrix + multiplication: + + [2 3 1 1]*[r0,c]=[r'0,c] + [1 2 3 1] [r1,c] [r'1,c] + [1 1 2 3] [r2,c] [r'2,c] + [3 1 1 2] [r3,c] [r'3,c] + + r0, r1, r2, and r3 are each 1 byte of one of the words in the + state (a column). To do matrix multiplication for each mixed + column c' we multiply the corresponding row from the left matrix + with the corresponding column from the right matrix. In total, we + get 4 equations: + + r0,c' = 2*r0,c + 3*r1,c + 1*r2,c + 1*r3,c + r1,c' = 1*r0,c + 2*r1,c + 3*r2,c + 1*r3,c + r2,c' = 1*r0,c + 1*r1,c + 2*r2,c + 3*r3,c + r3,c' = 3*r0,c + 1*r1,c + 1*r2,c + 2*r3,c + + As usual, the multiplication is as previously defined and the + addition is XOR. In order to optimize mixing columns we can store + the multiplication results in tables. If you think of the whole + column as a word (it might help to visualize by mentally rotating + the equations above by counterclockwise 90 degrees) then you can + see that it would be useful to map the multiplications performed on + each byte (r0, r1, r2, r3) onto a word as well. For instance, we + could map 2*r0,1*r0,1*r0,3*r0 onto a word by storing 2*r0 in the + highest 8 bits and 3*r0 in the lowest 8 bits (with the other two + respectively in the middle). This means that a table can be + constructed that uses r0 as an index to the word. We can do the + same with r1, r2, and r3, creating a total of 4 tables. + + To construct a full c', we can just look up each byte of c in + their respective tables and XOR the results together. + + Also, to build each table we only have to calculate the word + for 2,1,1,3 for every byte ... which we can do on each iteration + of this loop since we will iterate over every byte. After we have + calculated 2,1,1,3 we can get the results for the other tables + by cycling the byte at the end to the beginning. For instance + we can take the result of table 2,1,1,3 and produce table 3,2,1,1 + by moving the right most byte to the left most position just like + how you can imagine the 3 moved out of 2,1,1,3 and to the front + to produce 3,2,1,1. + + There is another optimization in that the same multiples of + the current element we need in order to advance our generator + to the next iteration can be reused in performing the 2,1,1,3 + calculation. We also calculate the inverse mix column tables, + with e,9,d,b being the inverse of 2,1,1,3. + + When we're done, and we need to actually mix columns, the first + byte of each state word should be put through mix[0] (2,1,1,3), + the second through mix[1] (3,2,1,1) and so forth. Then they should + be XOR'd together to produce the fully mixed column. + */ + + // calculate mix and imix table values + sx2 = xtime[sx]; + e2 = xtime[e]; + e4 = xtime[e2]; + e8 = xtime[e4]; + me = + (sx2 << 24) ^ // 2 + (sx << 16) ^ // 1 + (sx << 8) ^ // 1 + (sx ^ sx2); // 3 + ime = + (e2 ^ e4 ^ e8) << 24 ^ // E (14) + (e ^ e8) << 16 ^ // 9 + (e ^ e4 ^ e8) << 8 ^ // D (13) + (e ^ e2 ^ e8); // B (11) + // produce each of the mix tables by rotating the 2,1,1,3 value + for(var n = 0; n < 4; ++n) { + mix[n][e] = me; + imix[n][sx] = ime; + // cycle the right most byte to the left most position + // ie: 2,1,1,3 becomes 3,2,1,1 + me = me << 24 | me >>> 8; + ime = ime << 24 | ime >>> 8; + } + + // get next element and inverse + if(e === 0) { + // 1 is the inverse of 1 + e = ei = 1; + } else { + // e = 2e + 2*2*2*(10e)) = multiply e by 82 (chosen generator) + // ei = ei + 2*2*ei = multiply ei by 5 (inverse generator) + e = e2 ^ xtime[xtime[xtime[e2 ^ e8]]]; + ei ^= xtime[xtime[ei]]; + } + } +} + +/** + * Generates a key schedule using the AES key expansion algorithm. + * + * The AES algorithm takes the Cipher Key, K, and performs a Key Expansion + * routine to generate a key schedule. The Key Expansion generates a total + * of Nb*(Nr + 1) words: the algorithm requires an initial set of Nb words, + * and each of the Nr rounds requires Nb words of key data. The resulting + * key schedule consists of a linear array of 4-byte words, denoted [wi ], + * with i in the range 0 <= i < Nb(Nr + 1). + * + * KeyExpansion(byte key[4*Nk], word w[Nb*(Nr+1)], Nk) + * AES-128 (Nb=4, Nk=4, Nr=10) + * AES-192 (Nb=4, Nk=6, Nr=12) + * AES-256 (Nb=4, Nk=8, Nr=14) + * Note: Nr=Nk+6. + * + * Nb is the number of columns (32-bit words) comprising the State (or + * number of bytes in a block). For AES, Nb=4. + * + * @param key the key to schedule (as an array of 32-bit words). + * @param decrypt true to modify the key schedule to decrypt, false not to. + * + * @return the generated key schedule. + */ +function _expandKey(key, decrypt) { + // copy the key's words to initialize the key schedule + var w = key.slice(0); + + /* RotWord() will rotate a word, moving the first byte to the last + byte's position (shifting the other bytes left). + + We will be getting the value of Rcon at i / Nk. 'i' will iterate + from Nk to (Nb * Nr+1). Nk = 4 (4 byte key), Nb = 4 (4 words in + a block), Nr = Nk + 6 (10). Therefore 'i' will iterate from + 4 to 44 (exclusive). Each time we iterate 4 times, i / Nk will + increase by 1. We use a counter iNk to keep track of this. + */ + + // go through the rounds expanding the key + var temp, iNk = 1; + var Nk = w.length; + var Nr1 = Nk + 6 + 1; + var end = Nb * Nr1; + for(var i = Nk; i < end; ++i) { + temp = w[i - 1]; + if(i % Nk === 0) { + // temp = SubWord(RotWord(temp)) ^ Rcon[i / Nk] + temp = + sbox[temp >>> 16 & 255] << 24 ^ + sbox[temp >>> 8 & 255] << 16 ^ + sbox[temp & 255] << 8 ^ + sbox[temp >>> 24] ^ (rcon[iNk] << 24); + iNk++; + } else if(Nk > 6 && (i % Nk === 4)) { + // temp = SubWord(temp) + temp = + sbox[temp >>> 24] << 24 ^ + sbox[temp >>> 16 & 255] << 16 ^ + sbox[temp >>> 8 & 255] << 8 ^ + sbox[temp & 255]; + } + w[i] = w[i - Nk] ^ temp; + } + + /* When we are updating a cipher block we always use the code path for + encryption whether we are decrypting or not (to shorten code and + simplify the generation of look up tables). However, because there + are differences in the decryption algorithm, other than just swapping + in different look up tables, we must transform our key schedule to + account for these changes: + + 1. The decryption algorithm gets its key rounds in reverse order. + 2. The decryption algorithm adds the round key before mixing columns + instead of afterwards. + + We don't need to modify our key schedule to handle the first case, + we can just traverse the key schedule in reverse order when decrypting. + + The second case requires a little work. + + The tables we built for performing rounds will take an input and then + perform SubBytes() and MixColumns() or, for the decrypt version, + InvSubBytes() and InvMixColumns(). But the decrypt algorithm requires + us to AddRoundKey() before InvMixColumns(). This means we'll need to + apply some transformations to the round key to inverse-mix its columns + so they'll be correct for moving AddRoundKey() to after the state has + had its columns inverse-mixed. + + To inverse-mix the columns of the state when we're decrypting we use a + lookup table that will apply InvSubBytes() and InvMixColumns() at the + same time. However, the round key's bytes are not inverse-substituted + in the decryption algorithm. To get around this problem, we can first + substitute the bytes in the round key so that when we apply the + transformation via the InvSubBytes()+InvMixColumns() table, it will + undo our substitution leaving us with the original value that we + want -- and then inverse-mix that value. + + This change will correctly alter our key schedule so that we can XOR + each round key with our already transformed decryption state. This + allows us to use the same code path as the encryption algorithm. + + We make one more change to the decryption key. Since the decryption + algorithm runs in reverse from the encryption algorithm, we reverse + the order of the round keys to avoid having to iterate over the key + schedule backwards when running the encryption algorithm later in + decryption mode. In addition to reversing the order of the round keys, + we also swap each round key's 2nd and 4th rows. See the comments + section where rounds are performed for more details about why this is + done. These changes are done inline with the other substitution + described above. + */ + if(decrypt) { + var tmp; + var m0 = imix[0]; + var m1 = imix[1]; + var m2 = imix[2]; + var m3 = imix[3]; + var wnew = w.slice(0); + end = w.length; + for(var i = 0, wi = end - Nb; i < end; i += Nb, wi -= Nb) { + // do not sub the first or last round key (round keys are Nb + // words) as no column mixing is performed before they are added, + // but do change the key order + if(i === 0 || i === (end - Nb)) { + wnew[i] = w[wi]; + wnew[i + 1] = w[wi + 3]; + wnew[i + 2] = w[wi + 2]; + wnew[i + 3] = w[wi + 1]; + } else { + // substitute each round key byte because the inverse-mix + // table will inverse-substitute it (effectively cancel the + // substitution because round key bytes aren't sub'd in + // decryption mode) and swap indexes 3 and 1 + for(var n = 0; n < Nb; ++n) { + tmp = w[wi + n]; + wnew[i + (3&-n)] = + m0[sbox[tmp >>> 24]] ^ + m1[sbox[tmp >>> 16 & 255]] ^ + m2[sbox[tmp >>> 8 & 255]] ^ + m3[sbox[tmp & 255]]; + } + } + } + w = wnew; + } + + return w; +} + +/** + * Updates a single block (16 bytes) using AES. The update will either + * encrypt or decrypt the block. + * + * @param w the key schedule. + * @param input the input block (an array of 32-bit words). + * @param output the updated output block. + * @param decrypt true to decrypt the block, false to encrypt it. + */ +function _updateBlock(w, input, output, decrypt) { + /* + Cipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)]) + begin + byte state[4,Nb] + state = in + AddRoundKey(state, w[0, Nb-1]) + for round = 1 step 1 to Nr-1 + SubBytes(state) + ShiftRows(state) + MixColumns(state) + AddRoundKey(state, w[round*Nb, (round+1)*Nb-1]) + end for + SubBytes(state) + ShiftRows(state) + AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) + out = state + end + + InvCipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)]) + begin + byte state[4,Nb] + state = in + AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) + for round = Nr-1 step -1 downto 1 + InvShiftRows(state) + InvSubBytes(state) + AddRoundKey(state, w[round*Nb, (round+1)*Nb-1]) + InvMixColumns(state) + end for + InvShiftRows(state) + InvSubBytes(state) + AddRoundKey(state, w[0, Nb-1]) + out = state + end + */ + + // Encrypt: AddRoundKey(state, w[0, Nb-1]) + // Decrypt: AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) + var Nr = w.length / 4 - 1; + var m0, m1, m2, m3, sub; + if(decrypt) { + m0 = imix[0]; + m1 = imix[1]; + m2 = imix[2]; + m3 = imix[3]; + sub = isbox; + } else { + m0 = mix[0]; + m1 = mix[1]; + m2 = mix[2]; + m3 = mix[3]; + sub = sbox; + } + var a, b, c, d, a2, b2, c2; + a = input[0] ^ w[0]; + b = input[decrypt ? 3 : 1] ^ w[1]; + c = input[2] ^ w[2]; + d = input[decrypt ? 1 : 3] ^ w[3]; + var i = 3; + + /* In order to share code we follow the encryption algorithm when both + encrypting and decrypting. To account for the changes required in the + decryption algorithm, we use different lookup tables when decrypting + and use a modified key schedule to account for the difference in the + order of transformations applied when performing rounds. We also get + key rounds in reverse order (relative to encryption). */ + for(var round = 1; round < Nr; ++round) { + /* As described above, we'll be using table lookups to perform the + column mixing. Each column is stored as a word in the state (the + array 'input' has one column as a word at each index). In order to + mix a column, we perform these transformations on each row in c, + which is 1 byte in each word. The new column for c0 is c'0: + + m0 m1 m2 m3 + r0,c'0 = 2*r0,c0 + 3*r1,c0 + 1*r2,c0 + 1*r3,c0 + r1,c'0 = 1*r0,c0 + 2*r1,c0 + 3*r2,c0 + 1*r3,c0 + r2,c'0 = 1*r0,c0 + 1*r1,c0 + 2*r2,c0 + 3*r3,c0 + r3,c'0 = 3*r0,c0 + 1*r1,c0 + 1*r2,c0 + 2*r3,c0 + + So using mix tables where c0 is a word with r0 being its upper + 8 bits and r3 being its lower 8 bits: + + m0[c0 >> 24] will yield this word: [2*r0,1*r0,1*r0,3*r0] + ... + m3[c0 & 255] will yield this word: [1*r3,1*r3,3*r3,2*r3] + + Therefore to mix the columns in each word in the state we + do the following (& 255 omitted for brevity): + c'0,r0 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] + c'0,r1 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] + c'0,r2 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] + c'0,r3 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] + + However, before mixing, the algorithm requires us to perform + ShiftRows(). The ShiftRows() transformation cyclically shifts the + last 3 rows of the state over different offsets. The first row + (r = 0) is not shifted. + + s'_r,c = s_r,(c + shift(r, Nb) mod Nb + for 0 < r < 4 and 0 <= c < Nb and + shift(1, 4) = 1 + shift(2, 4) = 2 + shift(3, 4) = 3. + + This causes the first byte in r = 1 to be moved to the end of + the row, the first 2 bytes in r = 2 to be moved to the end of + the row, the first 3 bytes in r = 3 to be moved to the end of + the row: + + r1: [c0 c1 c2 c3] => [c1 c2 c3 c0] + r2: [c0 c1 c2 c3] [c2 c3 c0 c1] + r3: [c0 c1 c2 c3] [c3 c0 c1 c2] + + We can make these substitutions inline with our column mixing to + generate an updated set of equations to produce each word in the + state (note the columns have changed positions): + + c0 c1 c2 c3 => c0 c1 c2 c3 + c0 c1 c2 c3 c1 c2 c3 c0 (cycled 1 byte) + c0 c1 c2 c3 c2 c3 c0 c1 (cycled 2 bytes) + c0 c1 c2 c3 c3 c0 c1 c2 (cycled 3 bytes) + + Therefore: + + c'0 = 2*r0,c0 + 3*r1,c1 + 1*r2,c2 + 1*r3,c3 + c'0 = 1*r0,c0 + 2*r1,c1 + 3*r2,c2 + 1*r3,c3 + c'0 = 1*r0,c0 + 1*r1,c1 + 2*r2,c2 + 3*r3,c3 + c'0 = 3*r0,c0 + 1*r1,c1 + 1*r2,c2 + 2*r3,c3 + + c'1 = 2*r0,c1 + 3*r1,c2 + 1*r2,c3 + 1*r3,c0 + c'1 = 1*r0,c1 + 2*r1,c2 + 3*r2,c3 + 1*r3,c0 + c'1 = 1*r0,c1 + 1*r1,c2 + 2*r2,c3 + 3*r3,c0 + c'1 = 3*r0,c1 + 1*r1,c2 + 1*r2,c3 + 2*r3,c0 + + ... and so forth for c'2 and c'3. The important distinction is + that the columns are cycling, with c0 being used with the m0 + map when calculating c0, but c1 being used with the m0 map when + calculating c1 ... and so forth. + + When performing the inverse we transform the mirror image and + skip the bottom row, instead of the top one, and move upwards: + + c3 c2 c1 c0 => c0 c3 c2 c1 (cycled 3 bytes) *same as encryption + c3 c2 c1 c0 c1 c0 c3 c2 (cycled 2 bytes) + c3 c2 c1 c0 c2 c1 c0 c3 (cycled 1 byte) *same as encryption + c3 c2 c1 c0 c3 c2 c1 c0 + + If you compare the resulting matrices for ShiftRows()+MixColumns() + and for InvShiftRows()+InvMixColumns() the 2nd and 4th columns are + different (in encrypt mode vs. decrypt mode). So in order to use + the same code to handle both encryption and decryption, we will + need to do some mapping. + + If in encryption mode we let a=c0, b=c1, c=c2, d=c3, and r be + a row number in the state, then the resulting matrix in encryption + mode for applying the above transformations would be: + + r1: a b c d + r2: b c d a + r3: c d a b + r4: d a b c + + If we did the same in decryption mode we would get: + + r1: a d c b + r2: b a d c + r3: c b a d + r4: d c b a + + If instead we swap d and b (set b=c3 and d=c1), then we get: + + r1: a b c d + r2: d a b c + r3: c d a b + r4: b c d a + + Now the 1st and 3rd rows are the same as the encryption matrix. All + we need to do then to make the mapping exactly the same is to swap + the 2nd and 4th rows when in decryption mode. To do this without + having to do it on each iteration, we swapped the 2nd and 4th rows + in the decryption key schedule. We also have to do the swap above + when we first pull in the input and when we set the final output. */ + a2 = + m0[a >>> 24] ^ + m1[b >>> 16 & 255] ^ + m2[c >>> 8 & 255] ^ + m3[d & 255] ^ w[++i]; + b2 = + m0[b >>> 24] ^ + m1[c >>> 16 & 255] ^ + m2[d >>> 8 & 255] ^ + m3[a & 255] ^ w[++i]; + c2 = + m0[c >>> 24] ^ + m1[d >>> 16 & 255] ^ + m2[a >>> 8 & 255] ^ + m3[b & 255] ^ w[++i]; + d = + m0[d >>> 24] ^ + m1[a >>> 16 & 255] ^ + m2[b >>> 8 & 255] ^ + m3[c & 255] ^ w[++i]; + a = a2; + b = b2; + c = c2; + } + + /* + Encrypt: + SubBytes(state) + ShiftRows(state) + AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) + + Decrypt: + InvShiftRows(state) + InvSubBytes(state) + AddRoundKey(state, w[0, Nb-1]) + */ + // Note: rows are shifted inline + output[0] = + (sub[a >>> 24] << 24) ^ + (sub[b >>> 16 & 255] << 16) ^ + (sub[c >>> 8 & 255] << 8) ^ + (sub[d & 255]) ^ w[++i]; + output[decrypt ? 3 : 1] = + (sub[b >>> 24] << 24) ^ + (sub[c >>> 16 & 255] << 16) ^ + (sub[d >>> 8 & 255] << 8) ^ + (sub[a & 255]) ^ w[++i]; + output[2] = + (sub[c >>> 24] << 24) ^ + (sub[d >>> 16 & 255] << 16) ^ + (sub[a >>> 8 & 255] << 8) ^ + (sub[b & 255]) ^ w[++i]; + output[decrypt ? 1 : 3] = + (sub[d >>> 24] << 24) ^ + (sub[a >>> 16 & 255] << 16) ^ + (sub[b >>> 8 & 255] << 8) ^ + (sub[c & 255]) ^ w[++i]; +} + +/** + * Deprecated. Instead, use: + * + * forge.cipher.createCipher('AES-', key); + * forge.cipher.createDecipher('AES-', key); + * + * Creates a deprecated AES cipher object. This object's mode will default to + * CBC (cipher-block-chaining). + * + * The key and iv may be given as a string of bytes, an array of bytes, a + * byte buffer, or an array of 32-bit words. + * + * @param options the options to use. + * key the symmetric key to use. + * output the buffer to write to. + * decrypt true for decryption, false for encryption. + * mode the cipher mode to use (default: 'CBC'). + * + * @return the cipher. + */ +function _createCipher(options) { + options = options || {}; + var mode = (options.mode || 'CBC').toUpperCase(); + var algorithm = 'AES-' + mode; + + var cipher; + if(options.decrypt) { + cipher = forge.cipher.createDecipher(algorithm, options.key); + } else { + cipher = forge.cipher.createCipher(algorithm, options.key); + } + + // backwards compatible start API + var start = cipher.start; + cipher.start = function(iv, options) { + // backwards compatibility: support second arg as output buffer + var output = null; + if(options instanceof forge.util.ByteBuffer) { + output = options; + options = {}; + } + options = options || {}; + options.output = output; + options.iv = iv; + start.call(cipher, options); + }; + + return cipher; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 1571: +======= +/***/ 69197: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Javascript implementation of Abstract Syntax Notation Number One. + * + * @author Dave Longley + * + * Copyright (c) 2010-2015 Digital Bazaar, Inc. + * + * An API for storing data using the Abstract Syntax Notation Number One + * format using DER (Distinguished Encoding Rules) encoding. This encoding is + * commonly used to store data for PKI, i.e. X.509 Certificates, and this + * implementation exists for that purpose. + * + * Abstract Syntax Notation Number One (ASN.1) is used to define the abstract + * syntax of information without restricting the way the information is encoded + * for transmission. It provides a standard that allows for open systems + * communication. ASN.1 defines the syntax of information data and a number of + * simple data types as well as a notation for describing them and specifying + * values for them. + * + * The RSA algorithm creates public and private keys that are often stored in + * X.509 or PKCS#X formats -- which use ASN.1 (encoded in DER format). This + * class provides the most basic functionality required to store and load DSA + * keys that are encoded according to ASN.1. + * + * The most common binary encodings for ASN.1 are BER (Basic Encoding Rules) + * and DER (Distinguished Encoding Rules). DER is just a subset of BER that + * has stricter requirements for how data must be encoded. + * + * Each ASN.1 structure has a tag (a byte identifying the ASN.1 structure type) + * and a byte array for the value of this ASN1 structure which may be data or a + * list of ASN.1 structures. + * + * Each ASN.1 structure using BER is (Tag-Length-Value): + * + * | byte 0 | bytes X | bytes Y | + * |--------|---------|---------- + * | tag | length | value | + * + * ASN.1 allows for tags to be of "High-tag-number form" which allows a tag to + * be two or more octets, but that is not supported by this class. A tag is + * only 1 byte. Bits 1-5 give the tag number (ie the data type within a + * particular 'class'), 6 indicates whether or not the ASN.1 value is + * constructed from other ASN.1 values, and bits 7 and 8 give the 'class'. If + * bits 7 and 8 are both zero, the class is UNIVERSAL. If only bit 7 is set, + * then the class is APPLICATION. If only bit 8 is set, then the class is + * CONTEXT_SPECIFIC. If both bits 7 and 8 are set, then the class is PRIVATE. + * The tag numbers for the data types for the class UNIVERSAL are listed below: + * + * UNIVERSAL 0 Reserved for use by the encoding rules + * UNIVERSAL 1 Boolean type + * UNIVERSAL 2 Integer type + * UNIVERSAL 3 Bitstring type + * UNIVERSAL 4 Octetstring type + * UNIVERSAL 5 Null type + * UNIVERSAL 6 Object identifier type + * UNIVERSAL 7 Object descriptor type + * UNIVERSAL 8 External type and Instance-of type + * UNIVERSAL 9 Real type + * UNIVERSAL 10 Enumerated type + * UNIVERSAL 11 Embedded-pdv type + * UNIVERSAL 12 UTF8String type + * UNIVERSAL 13 Relative object identifier type + * UNIVERSAL 14-15 Reserved for future editions + * UNIVERSAL 16 Sequence and Sequence-of types + * UNIVERSAL 17 Set and Set-of types + * UNIVERSAL 18-22, 25-30 Character string types + * UNIVERSAL 23-24 Time types + * + * The length of an ASN.1 structure is specified after the tag identifier. + * There is a definite form and an indefinite form. The indefinite form may + * be used if the encoding is constructed and not all immediately available. + * The indefinite form is encoded using a length byte with only the 8th bit + * set. The end of the constructed object is marked using end-of-contents + * octets (two zero bytes). + * + * The definite form looks like this: + * + * The length may take up 1 or more bytes, it depends on the length of the + * value of the ASN.1 structure. DER encoding requires that if the ASN.1 + * structure has a value that has a length greater than 127, more than 1 byte + * will be used to store its length, otherwise just one byte will be used. + * This is strict. + * + * In the case that the length of the ASN.1 value is less than 127, 1 octet + * (byte) is used to store the "short form" length. The 8th bit has a value of + * 0 indicating the length is "short form" and not "long form" and bits 7-1 + * give the length of the data. (The 8th bit is the left-most, most significant + * bit: also known as big endian or network format). + * + * In the case that the length of the ASN.1 value is greater than 127, 2 to + * 127 octets (bytes) are used to store the "long form" length. The first + * byte's 8th bit is set to 1 to indicate the length is "long form." Bits 7-1 + * give the number of additional octets. All following octets are in base 256 + * with the most significant digit first (typical big-endian binary unsigned + * integer storage). So, for instance, if the length of a value was 257, the + * first byte would be set to: + * + * 10000010 = 130 = 0x82. + * + * This indicates there are 2 octets (base 256) for the length. The second and + * third bytes (the octets just mentioned) would store the length in base 256: + * + * octet 2: 00000001 = 1 * 256^1 = 256 + * octet 3: 00000001 = 1 * 256^0 = 1 + * total = 257 + * + * The algorithm for converting a js integer value of 257 to base-256 is: + * + * var value = 257; + * var bytes = []; + * bytes[0] = (value >>> 8) & 0xFF; // most significant byte first + * bytes[1] = value & 0xFF; // least significant byte last + * + * On the ASN.1 UNIVERSAL Object Identifier (OID) type: + * + * An OID can be written like: "value1.value2.value3...valueN" + * + * The DER encoding rules: + * + * The first byte has the value 40 * value1 + value2. + * The following bytes, if any, encode the remaining values. Each value is + * encoded in base 128, most significant digit first (big endian), with as + * few digits as possible, and the most significant bit of each byte set + * to 1 except the last in each value's encoding. For example: Given the + * OID "1.2.840.113549", its DER encoding is (remember each byte except the + * last one in each encoding is OR'd with 0x80): + * + * byte 1: 40 * 1 + 2 = 42 = 0x2A. + * bytes 2-3: 128 * 6 + 72 = 840 = 6 72 = 6 72 = 0x0648 = 0x8648 + * bytes 4-6: 16384 * 6 + 128 * 119 + 13 = 6 119 13 = 0x06770D = 0x86F70D + * + * The final value is: 0x2A864886F70D. + * The full OID (including ASN.1 tag and length of 6 bytes) is: + * 0x06062A864886F70D + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(19239); +__nccwpck_require__(40876); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(36536); +__nccwpck_require__(11750); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/* ASN.1 API */ +var asn1 = module.exports = forge.asn1 = forge.asn1 || {}; + +/** + * ASN.1 classes. + */ +asn1.Class = { + UNIVERSAL: 0x00, + APPLICATION: 0x40, + CONTEXT_SPECIFIC: 0x80, + PRIVATE: 0xC0 +}; + +/** + * ASN.1 types. Not all types are supported by this implementation, only + * those necessary to implement a simple PKI are implemented. + */ +asn1.Type = { + NONE: 0, + BOOLEAN: 1, + INTEGER: 2, + BITSTRING: 3, + OCTETSTRING: 4, + NULL: 5, + OID: 6, + ODESC: 7, + EXTERNAL: 8, + REAL: 9, + ENUMERATED: 10, + EMBEDDED: 11, + UTF8: 12, + ROID: 13, + SEQUENCE: 16, + SET: 17, + PRINTABLESTRING: 19, + IA5STRING: 22, + UTCTIME: 23, + GENERALIZEDTIME: 24, + BMPSTRING: 30 +}; + +/** + * Creates a new asn1 object. + * + * @param tagClass the tag class for the object. + * @param type the data type (tag number) for the object. + * @param constructed true if the asn1 object is in constructed form. + * @param value the value for the object, if it is not constructed. + * @param [options] the options to use: + * [bitStringContents] the plain BIT STRING content including padding + * byte. + * + * @return the asn1 object. + */ +asn1.create = function(tagClass, type, constructed, value, options) { + /* An asn1 object has a tagClass, a type, a constructed flag, and a + value. The value's type depends on the constructed flag. If + constructed, it will contain a list of other asn1 objects. If not, + it will contain the ASN.1 value as an array of bytes formatted + according to the ASN.1 data type. */ + + // remove undefined values + if(forge.util.isArray(value)) { + var tmp = []; + for(var i = 0; i < value.length; ++i) { + if(value[i] !== undefined) { + tmp.push(value[i]); + } + } + value = tmp; + } + + var obj = { + tagClass: tagClass, + type: type, + constructed: constructed, + composed: constructed || forge.util.isArray(value), + value: value + }; + if(options && 'bitStringContents' in options) { + // TODO: copy byte buffer if it's a buffer not a string + obj.bitStringContents = options.bitStringContents; + // TODO: add readonly flag to avoid this overhead + // save copy to detect changes + obj.original = asn1.copy(obj); + } + return obj; +}; + +/** + * Copies an asn1 object. + * + * @param obj the asn1 object. + * @param [options] copy options: + * [excludeBitStringContents] true to not copy bitStringContents + * + * @return the a copy of the asn1 object. + */ +asn1.copy = function(obj, options) { + var copy; + + if(forge.util.isArray(obj)) { + copy = []; + for(var i = 0; i < obj.length; ++i) { + copy.push(asn1.copy(obj[i], options)); + } + return copy; + } + + if(typeof obj === 'string') { + // TODO: copy byte buffer if it's a buffer not a string + return obj; + } + + copy = { + tagClass: obj.tagClass, + type: obj.type, + constructed: obj.constructed, + composed: obj.composed, + value: asn1.copy(obj.value, options) + }; + if(options && !options.excludeBitStringContents) { + // TODO: copy byte buffer if it's a buffer not a string + copy.bitStringContents = obj.bitStringContents; + } + return copy; +}; + +/** + * Compares asn1 objects for equality. + * + * Note this function does not run in constant time. + * + * @param obj1 the first asn1 object. + * @param obj2 the second asn1 object. + * @param [options] compare options: + * [includeBitStringContents] true to compare bitStringContents + * + * @return true if the asn1 objects are equal. + */ +asn1.equals = function(obj1, obj2, options) { + if(forge.util.isArray(obj1)) { + if(!forge.util.isArray(obj2)) { + return false; + } + if(obj1.length !== obj2.length) { + return false; + } + for(var i = 0; i < obj1.length; ++i) { + if(!asn1.equals(obj1[i], obj2[i])) { + return false; + } + } + return true; + } + + if(typeof obj1 !== typeof obj2) { + return false; + } + + if(typeof obj1 === 'string') { + return obj1 === obj2; + } + + var equal = obj1.tagClass === obj2.tagClass && + obj1.type === obj2.type && + obj1.constructed === obj2.constructed && + obj1.composed === obj2.composed && + asn1.equals(obj1.value, obj2.value); + if(options && options.includeBitStringContents) { + equal = equal && (obj1.bitStringContents === obj2.bitStringContents); + } + + return equal; +}; + +/** + * Gets the length of a BER-encoded ASN.1 value. + * + * In case the length is not specified, undefined is returned. + * + * @param b the BER-encoded ASN.1 byte buffer, starting with the first + * length byte. + * + * @return the length of the BER-encoded ASN.1 value or undefined. + */ +asn1.getBerValueLength = function(b) { + // TODO: move this function and related DER/BER functions to a der.js + // file; better abstract ASN.1 away from der/ber. + var b2 = b.getByte(); + if(b2 === 0x80) { + return undefined; + } + + // see if the length is "short form" or "long form" (bit 8 set) + var length; + var longForm = b2 & 0x80; + if(!longForm) { + // length is just the first byte + length = b2; + } else { + // the number of bytes the length is specified in bits 7 through 1 + // and each length byte is in big-endian base-256 + length = b.getInt((b2 & 0x7F) << 3); + } + return length; +}; + +/** + * Check if the byte buffer has enough bytes. Throws an Error if not. + * + * @param bytes the byte buffer to parse from. + * @param remaining the bytes remaining in the current parsing state. + * @param n the number of bytes the buffer must have. + */ +function _checkBufferLength(bytes, remaining, n) { + if(n > remaining) { + var error = new Error('Too few bytes to parse DER.'); + error.available = bytes.length(); + error.remaining = remaining; + error.requested = n; + throw error; + } +} + +/** + * Gets the length of a BER-encoded ASN.1 value. + * + * In case the length is not specified, undefined is returned. + * + * @param bytes the byte buffer to parse from. + * @param remaining the bytes remaining in the current parsing state. + * + * @return the length of the BER-encoded ASN.1 value or undefined. + */ +var _getValueLength = function(bytes, remaining) { + // TODO: move this function and related DER/BER functions to a der.js + // file; better abstract ASN.1 away from der/ber. + // fromDer already checked that this byte exists + var b2 = bytes.getByte(); + remaining--; + if(b2 === 0x80) { + return undefined; + } + + // see if the length is "short form" or "long form" (bit 8 set) + var length; + var longForm = b2 & 0x80; + if(!longForm) { + // length is just the first byte + length = b2; + } else { + // the number of bytes the length is specified in bits 7 through 1 + // and each length byte is in big-endian base-256 + var longFormBytes = b2 & 0x7F; + _checkBufferLength(bytes, remaining, longFormBytes); + length = bytes.getInt(longFormBytes << 3); + } + // FIXME: this will only happen for 32 bit getInt with high bit set + if(length < 0) { + throw new Error('Negative length: ' + length); + } + return length; +}; + +/** + * Parses an asn1 object from a byte buffer in DER format. + * + * @param bytes the byte buffer to parse from. + * @param [strict] true to be strict when checking value lengths, false to + * allow truncated values (default: true). + * @param [options] object with options or boolean strict flag + * [strict] true to be strict when checking value lengths, false to + * allow truncated values (default: true). + * [parseAllBytes] true to ensure all bytes are parsed + * (default: true) + * [decodeBitStrings] true to attempt to decode the content of + * BIT STRINGs (not OCTET STRINGs) using strict mode. Note that + * without schema support to understand the data context this can + * erroneously decode values that happen to be valid ASN.1. This + * flag will be deprecated or removed as soon as schema support is + * available. (default: true) + * + * @throws Will throw an error for various malformed input conditions. + * + * @return the parsed asn1 object. + */ +asn1.fromDer = function(bytes, options) { + if(options === undefined) { + options = { + strict: true, + parseAllBytes: true, + decodeBitStrings: true + }; + } + if(typeof options === 'boolean') { + options = { + strict: options, + parseAllBytes: true, + decodeBitStrings: true + }; + } + if(!('strict' in options)) { + options.strict = true; + } + if(!('parseAllBytes' in options)) { + options.parseAllBytes = true; + } + if(!('decodeBitStrings' in options)) { + options.decodeBitStrings = true; + } + + // wrap in buffer if needed + if(typeof bytes === 'string') { + bytes = forge.util.createBuffer(bytes); + } + + var byteCount = bytes.length(); + var value = _fromDer(bytes, bytes.length(), 0, options); + if(options.parseAllBytes && bytes.length() !== 0) { + var error = new Error('Unparsed DER bytes remain after ASN.1 parsing.'); + error.byteCount = byteCount; + error.remaining = bytes.length(); + throw error; + } + return value; +}; + +/** + * Internal function to parse an asn1 object from a byte buffer in DER format. + * + * @param bytes the byte buffer to parse from. + * @param remaining the number of bytes remaining for this chunk. + * @param depth the current parsing depth. + * @param options object with same options as fromDer(). + * + * @return the parsed asn1 object. + */ +function _fromDer(bytes, remaining, depth, options) { + // temporary storage for consumption calculations + var start; + + // minimum length for ASN.1 DER structure is 2 + _checkBufferLength(bytes, remaining, 2); + + // get the first byte + var b1 = bytes.getByte(); + // consumed one byte + remaining--; + + // get the tag class + var tagClass = (b1 & 0xC0); + + // get the type (bits 1-5) + var type = b1 & 0x1F; + + // get the variable value length and adjust remaining bytes + start = bytes.length(); + var length = _getValueLength(bytes, remaining); + remaining -= start - bytes.length(); + + // ensure there are enough bytes to get the value + if(length !== undefined && length > remaining) { + if(options.strict) { + var error = new Error('Too few bytes to read ASN.1 value.'); + error.available = bytes.length(); + error.remaining = remaining; + error.requested = length; + throw error; + } + // Note: be lenient with truncated values and use remaining state bytes + length = remaining; + } + + // value storage + var value; + // possible BIT STRING contents storage + var bitStringContents; + + // constructed flag is bit 6 (32 = 0x20) of the first byte + var constructed = ((b1 & 0x20) === 0x20); + if(constructed) { + // parse child asn1 objects from the value + value = []; + if(length === undefined) { + // asn1 object of indefinite length, read until end tag + for(;;) { + _checkBufferLength(bytes, remaining, 2); + if(bytes.bytes(2) === String.fromCharCode(0, 0)) { + bytes.getBytes(2); + remaining -= 2; + break; + } + start = bytes.length(); + value.push(_fromDer(bytes, remaining, depth + 1, options)); + remaining -= start - bytes.length(); + } + } else { + // parsing asn1 object of definite length + while(length > 0) { + start = bytes.length(); + value.push(_fromDer(bytes, length, depth + 1, options)); + remaining -= start - bytes.length(); + length -= start - bytes.length(); + } + } + } + + // if a BIT STRING, save the contents including padding + if(value === undefined && tagClass === asn1.Class.UNIVERSAL && + type === asn1.Type.BITSTRING) { + bitStringContents = bytes.bytes(length); + } + + // determine if a non-constructed value should be decoded as a composed + // value that contains other ASN.1 objects. BIT STRINGs (and OCTET STRINGs) + // can be used this way. + if(value === undefined && options.decodeBitStrings && + tagClass === asn1.Class.UNIVERSAL && + // FIXME: OCTET STRINGs not yet supported here + // .. other parts of forge expect to decode OCTET STRINGs manually + (type === asn1.Type.BITSTRING /*|| type === asn1.Type.OCTETSTRING*/) && + length > 1) { + // save read position + var savedRead = bytes.read; + var savedRemaining = remaining; + var unused = 0; + if(type === asn1.Type.BITSTRING) { + /* The first octet gives the number of bits by which the length of the + bit string is less than the next multiple of eight (this is called + the "number of unused bits"). + + The second and following octets give the value of the bit string + converted to an octet string. */ + _checkBufferLength(bytes, remaining, 1); + unused = bytes.getByte(); + remaining--; + } + // if all bits are used, maybe the BIT/OCTET STRING holds ASN.1 objs + if(unused === 0) { + try { + // attempt to parse child asn1 object from the value + // (stored in array to signal composed value) + start = bytes.length(); + var subOptions = { + // enforce strict mode to avoid parsing ASN.1 from plain data + strict: true, + decodeBitStrings: true + }; + var composed = _fromDer(bytes, remaining, depth + 1, subOptions); + var used = start - bytes.length(); + remaining -= used; + if(type == asn1.Type.BITSTRING) { + used++; + } + + // if the data all decoded and the class indicates UNIVERSAL or + // CONTEXT_SPECIFIC then assume we've got an encapsulated ASN.1 object + var tc = composed.tagClass; + if(used === length && + (tc === asn1.Class.UNIVERSAL || tc === asn1.Class.CONTEXT_SPECIFIC)) { + value = [composed]; + } + } catch(ex) { + } + } + if(value === undefined) { + // restore read position + bytes.read = savedRead; + remaining = savedRemaining; + } + } + + if(value === undefined) { + // asn1 not constructed or composed, get raw value + // TODO: do DER to OID conversion and vice-versa in .toDer? + + if(length === undefined) { + if(options.strict) { + throw new Error('Non-constructed ASN.1 object of indefinite length.'); + } + // be lenient and use remaining state bytes + length = remaining; + } + + if(type === asn1.Type.BMPSTRING) { + value = ''; + for(; length > 0; length -= 2) { + _checkBufferLength(bytes, remaining, 2); + value += String.fromCharCode(bytes.getInt16()); + remaining -= 2; + } + } else { + value = bytes.getBytes(length); + remaining -= length; + } + } + + // add BIT STRING contents if available + var asn1Options = bitStringContents === undefined ? null : { + bitStringContents: bitStringContents + }; + + // create and return asn1 object + return asn1.create(tagClass, type, constructed, value, asn1Options); +} + +/** + * Converts the given asn1 object to a buffer of bytes in DER format. + * + * @param asn1 the asn1 object to convert to bytes. + * + * @return the buffer of bytes. + */ +asn1.toDer = function(obj) { + var bytes = forge.util.createBuffer(); + + // build the first byte + var b1 = obj.tagClass | obj.type; + + // for storing the ASN.1 value + var value = forge.util.createBuffer(); + + // use BIT STRING contents if available and data not changed + var useBitStringContents = false; + if('bitStringContents' in obj) { + useBitStringContents = true; + if(obj.original) { + useBitStringContents = asn1.equals(obj, obj.original); + } + } + + if(useBitStringContents) { + value.putBytes(obj.bitStringContents); + } else if(obj.composed) { + // if composed, use each child asn1 object's DER bytes as value + // turn on 6th bit (0x20 = 32) to indicate asn1 is constructed + // from other asn1 objects + if(obj.constructed) { + b1 |= 0x20; + } else { + // type is a bit string, add unused bits of 0x00 + value.putByte(0x00); + } + + // add all of the child DER bytes together + for(var i = 0; i < obj.value.length; ++i) { + if(obj.value[i] !== undefined) { + value.putBuffer(asn1.toDer(obj.value[i])); + } + } + } else { + // use asn1.value directly + if(obj.type === asn1.Type.BMPSTRING) { + for(var i = 0; i < obj.value.length; ++i) { + value.putInt16(obj.value.charCodeAt(i)); + } + } else { + // ensure integer is minimally-encoded + // TODO: should all leading bytes be stripped vs just one? + // .. ex '00 00 01' => '01'? + if(obj.type === asn1.Type.INTEGER && + obj.value.length > 1 && + // leading 0x00 for positive integer + ((obj.value.charCodeAt(0) === 0 && + (obj.value.charCodeAt(1) & 0x80) === 0) || + // leading 0xFF for negative integer + (obj.value.charCodeAt(0) === 0xFF && + (obj.value.charCodeAt(1) & 0x80) === 0x80))) { + value.putBytes(obj.value.substr(1)); + } else { + value.putBytes(obj.value); + } + } + } + + // add tag byte + bytes.putByte(b1); + + // use "short form" encoding + if(value.length() <= 127) { + // one byte describes the length + // bit 8 = 0 and bits 7-1 = length + bytes.putByte(value.length() & 0x7F); + } else { + // use "long form" encoding + // 2 to 127 bytes describe the length + // first byte: bit 8 = 1 and bits 7-1 = # of additional bytes + // other bytes: length in base 256, big-endian + var len = value.length(); + var lenBytes = ''; + do { + lenBytes += String.fromCharCode(len & 0xFF); + len = len >>> 8; + } while(len > 0); + + // set first byte to # bytes used to store the length and turn on + // bit 8 to indicate long-form length is used + bytes.putByte(lenBytes.length | 0x80); + + // concatenate length bytes in reverse since they were generated + // little endian and we need big endian + for(var i = lenBytes.length - 1; i >= 0; --i) { + bytes.putByte(lenBytes.charCodeAt(i)); + } + } + + // concatenate value bytes + bytes.putBuffer(value); + return bytes; +}; + +/** + * Converts an OID dot-separated string to a byte buffer. The byte buffer + * contains only the DER-encoded value, not any tag or length bytes. + * + * @param oid the OID dot-separated string. + * + * @return the byte buffer. + */ +asn1.oidToDer = function(oid) { + // split OID into individual values + var values = oid.split('.'); + var bytes = forge.util.createBuffer(); + + // first byte is 40 * value1 + value2 + bytes.putByte(40 * parseInt(values[0], 10) + parseInt(values[1], 10)); + // other bytes are each value in base 128 with 8th bit set except for + // the last byte for each value + var last, valueBytes, value, b; + for(var i = 2; i < values.length; ++i) { + // produce value bytes in reverse because we don't know how many + // bytes it will take to store the value + last = true; + valueBytes = []; + value = parseInt(values[i], 10); + do { + b = value & 0x7F; + value = value >>> 7; + // if value is not last, then turn on 8th bit + if(!last) { + b |= 0x80; + } + valueBytes.push(b); + last = false; + } while(value > 0); + + // add value bytes in reverse (needs to be in big endian) + for(var n = valueBytes.length - 1; n >= 0; --n) { + bytes.putByte(valueBytes[n]); + } + } + + return bytes; +}; + +/** + * Converts a DER-encoded byte buffer to an OID dot-separated string. The + * byte buffer should contain only the DER-encoded value, not any tag or + * length bytes. + * + * @param bytes the byte buffer. + * + * @return the OID dot-separated string. + */ +asn1.derToOid = function(bytes) { + var oid; + + // wrap in buffer if needed + if(typeof bytes === 'string') { + bytes = forge.util.createBuffer(bytes); + } + + // first byte is 40 * value1 + value2 + var b = bytes.getByte(); + oid = Math.floor(b / 40) + '.' + (b % 40); + + // other bytes are each value in base 128 with 8th bit set except for + // the last byte for each value + var value = 0; + while(bytes.length() > 0) { + b = bytes.getByte(); + value = value << 7; + // not the last byte for the value + if(b & 0x80) { + value += b & 0x7F; + } else { + // last byte + oid += '.' + (value + b); + value = 0; + } + } + + return oid; +}; + +/** + * Converts a UTCTime value to a date. + * + * Note: GeneralizedTime has 4 digits for the year and is used for X.509 + * dates past 2049. Parsing that structure hasn't been implemented yet. + * + * @param utc the UTCTime value to convert. + * + * @return the date. + */ +asn1.utcTimeToDate = function(utc) { + /* The following formats can be used: + + YYMMDDhhmmZ + YYMMDDhhmm+hh'mm' + YYMMDDhhmm-hh'mm' + YYMMDDhhmmssZ + YYMMDDhhmmss+hh'mm' + YYMMDDhhmmss-hh'mm' + + Where: + + YY is the least significant two digits of the year + MM is the month (01 to 12) + DD is the day (01 to 31) + hh is the hour (00 to 23) + mm are the minutes (00 to 59) + ss are the seconds (00 to 59) + Z indicates that local time is GMT, + indicates that local time is + later than GMT, and - indicates that local time is earlier than GMT + hh' is the absolute value of the offset from GMT in hours + mm' is the absolute value of the offset from GMT in minutes */ + var date = new Date(); + + // if YY >= 50 use 19xx, if YY < 50 use 20xx + var year = parseInt(utc.substr(0, 2), 10); + year = (year >= 50) ? 1900 + year : 2000 + year; + var MM = parseInt(utc.substr(2, 2), 10) - 1; // use 0-11 for month + var DD = parseInt(utc.substr(4, 2), 10); + var hh = parseInt(utc.substr(6, 2), 10); + var mm = parseInt(utc.substr(8, 2), 10); + var ss = 0; + + // not just YYMMDDhhmmZ + if(utc.length > 11) { + // get character after minutes + var c = utc.charAt(10); + var end = 10; + + // see if seconds are present + if(c !== '+' && c !== '-') { + // get seconds + ss = parseInt(utc.substr(10, 2), 10); + end += 2; + } + } + + // update date + date.setUTCFullYear(year, MM, DD); + date.setUTCHours(hh, mm, ss, 0); + + if(end) { + // get +/- after end of time + c = utc.charAt(end); + if(c === '+' || c === '-') { + // get hours+minutes offset + var hhoffset = parseInt(utc.substr(end + 1, 2), 10); + var mmoffset = parseInt(utc.substr(end + 4, 2), 10); + + // calculate offset in milliseconds + var offset = hhoffset * 60 + mmoffset; + offset *= 60000; + + // apply offset + if(c === '+') { + date.setTime(+date - offset); + } else { + date.setTime(+date + offset); + } + } + } + + return date; +}; + +/** + * Converts a GeneralizedTime value to a date. + * + * @param gentime the GeneralizedTime value to convert. + * + * @return the date. + */ +asn1.generalizedTimeToDate = function(gentime) { + /* The following formats can be used: + + YYYYMMDDHHMMSS + YYYYMMDDHHMMSS.fff + YYYYMMDDHHMMSSZ + YYYYMMDDHHMMSS.fffZ + YYYYMMDDHHMMSS+hh'mm' + YYYYMMDDHHMMSS.fff+hh'mm' + YYYYMMDDHHMMSS-hh'mm' + YYYYMMDDHHMMSS.fff-hh'mm' + + Where: + + YYYY is the year + MM is the month (01 to 12) + DD is the day (01 to 31) + hh is the hour (00 to 23) + mm are the minutes (00 to 59) + ss are the seconds (00 to 59) + .fff is the second fraction, accurate to three decimal places + Z indicates that local time is GMT, + indicates that local time is + later than GMT, and - indicates that local time is earlier than GMT + hh' is the absolute value of the offset from GMT in hours + mm' is the absolute value of the offset from GMT in minutes */ + var date = new Date(); + + var YYYY = parseInt(gentime.substr(0, 4), 10); + var MM = parseInt(gentime.substr(4, 2), 10) - 1; // use 0-11 for month + var DD = parseInt(gentime.substr(6, 2), 10); + var hh = parseInt(gentime.substr(8, 2), 10); + var mm = parseInt(gentime.substr(10, 2), 10); + var ss = parseInt(gentime.substr(12, 2), 10); + var fff = 0; + var offset = 0; + var isUTC = false; + + if(gentime.charAt(gentime.length - 1) === 'Z') { + isUTC = true; + } + + var end = gentime.length - 5, c = gentime.charAt(end); + if(c === '+' || c === '-') { + // get hours+minutes offset + var hhoffset = parseInt(gentime.substr(end + 1, 2), 10); + var mmoffset = parseInt(gentime.substr(end + 4, 2), 10); + + // calculate offset in milliseconds + offset = hhoffset * 60 + mmoffset; + offset *= 60000; + + // apply offset + if(c === '+') { + offset *= -1; + } + + isUTC = true; + } + + // check for second fraction + if(gentime.charAt(14) === '.') { + fff = parseFloat(gentime.substr(14), 10) * 1000; + } + + if(isUTC) { + date.setUTCFullYear(YYYY, MM, DD); + date.setUTCHours(hh, mm, ss, fff); + + // apply offset + date.setTime(+date + offset); + } else { + date.setFullYear(YYYY, MM, DD); + date.setHours(hh, mm, ss, fff); + } + + return date; +}; + +/** + * Converts a date to a UTCTime value. + * + * Note: GeneralizedTime has 4 digits for the year and is used for X.509 + * dates past 2049. Converting to a GeneralizedTime hasn't been + * implemented yet. + * + * @param date the date to convert. + * + * @return the UTCTime value. + */ +asn1.dateToUtcTime = function(date) { + // TODO: validate; currently assumes proper format + if(typeof date === 'string') { + return date; + } + + var rval = ''; + + // create format YYMMDDhhmmssZ + var format = []; + format.push(('' + date.getUTCFullYear()).substr(2)); + format.push('' + (date.getUTCMonth() + 1)); + format.push('' + date.getUTCDate()); + format.push('' + date.getUTCHours()); + format.push('' + date.getUTCMinutes()); + format.push('' + date.getUTCSeconds()); + + // ensure 2 digits are used for each format entry + for(var i = 0; i < format.length; ++i) { + if(format[i].length < 2) { + rval += '0'; + } + rval += format[i]; + } + rval += 'Z'; + + return rval; +}; + +/** + * Converts a date to a GeneralizedTime value. + * + * @param date the date to convert. + * + * @return the GeneralizedTime value as a string. + */ +asn1.dateToGeneralizedTime = function(date) { + // TODO: validate; currently assumes proper format + if(typeof date === 'string') { + return date; + } + + var rval = ''; + + // create format YYYYMMDDHHMMSSZ + var format = []; + format.push('' + date.getUTCFullYear()); + format.push('' + (date.getUTCMonth() + 1)); + format.push('' + date.getUTCDate()); + format.push('' + date.getUTCHours()); + format.push('' + date.getUTCMinutes()); + format.push('' + date.getUTCSeconds()); + + // ensure 2 digits are used for each format entry + for(var i = 0; i < format.length; ++i) { + if(format[i].length < 2) { + rval += '0'; + } + rval += format[i]; + } + rval += 'Z'; + + return rval; +}; + +/** + * Converts a javascript integer to a DER-encoded byte buffer to be used + * as the value for an INTEGER type. + * + * @param x the integer. + * + * @return the byte buffer. + */ +asn1.integerToDer = function(x) { + var rval = forge.util.createBuffer(); + if(x >= -0x80 && x < 0x80) { + return rval.putSignedInt(x, 8); + } + if(x >= -0x8000 && x < 0x8000) { + return rval.putSignedInt(x, 16); + } + if(x >= -0x800000 && x < 0x800000) { + return rval.putSignedInt(x, 24); + } + if(x >= -0x80000000 && x < 0x80000000) { + return rval.putSignedInt(x, 32); + } + var error = new Error('Integer too large; max is 32-bits.'); + error.integer = x; + throw error; +}; + +/** + * Converts a DER-encoded byte buffer to a javascript integer. This is + * typically used to decode the value of an INTEGER type. + * + * @param bytes the byte buffer. + * + * @return the integer. + */ +asn1.derToInteger = function(bytes) { + // wrap in buffer if needed + if(typeof bytes === 'string') { + bytes = forge.util.createBuffer(bytes); + } + + var n = bytes.length() * 8; + if(n > 32) { + throw new Error('Integer too large; max is 32-bits.'); + } + return bytes.getSignedInt(n); +}; + +/** + * Validates that the given ASN.1 object is at least a super set of the + * given ASN.1 structure. Only tag classes and types are checked. An + * optional map may also be provided to capture ASN.1 values while the + * structure is checked. + * + * To capture an ASN.1 value, set an object in the validator's 'capture' + * parameter to the key to use in the capture map. To capture the full + * ASN.1 object, specify 'captureAsn1'. To capture BIT STRING bytes, including + * the leading unused bits counter byte, specify 'captureBitStringContents'. + * To capture BIT STRING bytes, without the leading unused bits counter byte, + * specify 'captureBitStringValue'. + * + * Objects in the validator may set a field 'optional' to true to indicate + * that it isn't necessary to pass validation. + * + * @param obj the ASN.1 object to validate. + * @param v the ASN.1 structure validator. + * @param capture an optional map to capture values in. + * @param errors an optional array for storing validation errors. + * + * @return true on success, false on failure. + */ +asn1.validate = function(obj, v, capture, errors) { + var rval = false; + + // ensure tag class and type are the same if specified + if((obj.tagClass === v.tagClass || typeof(v.tagClass) === 'undefined') && + (obj.type === v.type || typeof(v.type) === 'undefined')) { + // ensure constructed flag is the same if specified + if(obj.constructed === v.constructed || + typeof(v.constructed) === 'undefined') { + rval = true; + + // handle sub values + if(v.value && forge.util.isArray(v.value)) { + var j = 0; + for(var i = 0; rval && i < v.value.length; ++i) { + rval = v.value[i].optional || false; + if(obj.value[j]) { + rval = asn1.validate(obj.value[j], v.value[i], capture, errors); + if(rval) { + ++j; + } else if(v.value[i].optional) { + rval = true; + } + } + if(!rval && errors) { + errors.push( + '[' + v.name + '] ' + + 'Tag class "' + v.tagClass + '", type "' + + v.type + '" expected value length "' + + v.value.length + '", got "' + + obj.value.length + '"'); + } + } + } + + if(rval && capture) { + if(v.capture) { + capture[v.capture] = obj.value; + } + if(v.captureAsn1) { + capture[v.captureAsn1] = obj; + } + if(v.captureBitStringContents && 'bitStringContents' in obj) { + capture[v.captureBitStringContents] = obj.bitStringContents; + } + if(v.captureBitStringValue && 'bitStringContents' in obj) { + var value; + if(obj.bitStringContents.length < 2) { + capture[v.captureBitStringValue] = ''; + } else { + // FIXME: support unused bits with data shifting + var unused = obj.bitStringContents.charCodeAt(0); + if(unused !== 0) { + throw new Error( + 'captureBitStringValue only supported for zero unused bits'); + } + capture[v.captureBitStringValue] = obj.bitStringContents.slice(1); + } + } + } + } else if(errors) { + errors.push( + '[' + v.name + '] ' + + 'Expected constructed "' + v.constructed + '", got "' + + obj.constructed + '"'); + } + } else if(errors) { + if(obj.tagClass !== v.tagClass) { + errors.push( + '[' + v.name + '] ' + + 'Expected tag class "' + v.tagClass + '", got "' + + obj.tagClass + '"'); + } + if(obj.type !== v.type) { + errors.push( + '[' + v.name + '] ' + + 'Expected type "' + v.type + '", got "' + obj.type + '"'); + } + } + return rval; +}; + +// regex for testing for non-latin characters +var _nonLatinRegex = /[^\\u0000-\\u00ff]/; + +/** + * Pretty prints an ASN.1 object to a string. + * + * @param obj the object to write out. + * @param level the level in the tree. + * @param indentation the indentation to use. + * + * @return the string. + */ +asn1.prettyPrint = function(obj, level, indentation) { + var rval = ''; + + // set default level and indentation + level = level || 0; + indentation = indentation || 2; + + // start new line for deep levels + if(level > 0) { + rval += '\n'; + } + + // create indent + var indent = ''; + for(var i = 0; i < level * indentation; ++i) { + indent += ' '; + } + + // print class:type + rval += indent + 'Tag: '; + switch(obj.tagClass) { + case asn1.Class.UNIVERSAL: + rval += 'Universal:'; + break; + case asn1.Class.APPLICATION: + rval += 'Application:'; + break; + case asn1.Class.CONTEXT_SPECIFIC: + rval += 'Context-Specific:'; + break; + case asn1.Class.PRIVATE: + rval += 'Private:'; + break; + } + + if(obj.tagClass === asn1.Class.UNIVERSAL) { + rval += obj.type; + + // known types + switch(obj.type) { + case asn1.Type.NONE: + rval += ' (None)'; + break; + case asn1.Type.BOOLEAN: + rval += ' (Boolean)'; + break; + case asn1.Type.INTEGER: + rval += ' (Integer)'; + break; + case asn1.Type.BITSTRING: + rval += ' (Bit string)'; + break; + case asn1.Type.OCTETSTRING: + rval += ' (Octet string)'; + break; + case asn1.Type.NULL: + rval += ' (Null)'; + break; + case asn1.Type.OID: + rval += ' (Object Identifier)'; + break; + case asn1.Type.ODESC: + rval += ' (Object Descriptor)'; + break; + case asn1.Type.EXTERNAL: + rval += ' (External or Instance of)'; + break; + case asn1.Type.REAL: + rval += ' (Real)'; + break; + case asn1.Type.ENUMERATED: + rval += ' (Enumerated)'; + break; + case asn1.Type.EMBEDDED: + rval += ' (Embedded PDV)'; + break; + case asn1.Type.UTF8: + rval += ' (UTF8)'; + break; + case asn1.Type.ROID: + rval += ' (Relative Object Identifier)'; + break; + case asn1.Type.SEQUENCE: + rval += ' (Sequence)'; + break; + case asn1.Type.SET: + rval += ' (Set)'; + break; + case asn1.Type.PRINTABLESTRING: + rval += ' (Printable String)'; + break; + case asn1.Type.IA5String: + rval += ' (IA5String (ASCII))'; + break; + case asn1.Type.UTCTIME: + rval += ' (UTC time)'; + break; + case asn1.Type.GENERALIZEDTIME: + rval += ' (Generalized time)'; + break; + case asn1.Type.BMPSTRING: + rval += ' (BMP String)'; + break; + } + } else { + rval += obj.type; + } + + rval += '\n'; + rval += indent + 'Constructed: ' + obj.constructed + '\n'; + + if(obj.composed) { + var subvalues = 0; + var sub = ''; + for(var i = 0; i < obj.value.length; ++i) { + if(obj.value[i] !== undefined) { + subvalues += 1; + sub += asn1.prettyPrint(obj.value[i], level + 1, indentation); + if((i + 1) < obj.value.length) { + sub += ','; + } + } + } + rval += indent + 'Sub values: ' + subvalues + sub; + } else { + rval += indent + 'Value: '; + if(obj.type === asn1.Type.OID) { + var oid = asn1.derToOid(obj.value); + rval += oid; + if(forge.pki && forge.pki.oids) { + if(oid in forge.pki.oids) { + rval += ' (' + forge.pki.oids[oid] + ') '; + } + } + } + if(obj.type === asn1.Type.INTEGER) { + try { + rval += asn1.derToInteger(obj.value); + } catch(ex) { + rval += '0x' + forge.util.bytesToHex(obj.value); + } + } else if(obj.type === asn1.Type.BITSTRING) { + // TODO: shift bits as needed to display without padding + if(obj.value.length > 1) { + // remove unused bits field + rval += '0x' + forge.util.bytesToHex(obj.value.slice(1)); + } else { + rval += '(none)'; + } + // show unused bit count + if(obj.value.length > 0) { + var unused = obj.value.charCodeAt(0); + if(unused == 1) { + rval += ' (1 unused bit shown)'; + } else if(unused > 1) { + rval += ' (' + unused + ' unused bits shown)'; + } + } + } else if(obj.type === asn1.Type.OCTETSTRING) { + if(!_nonLatinRegex.test(obj.value)) { + rval += '(' + obj.value + ') '; + } + rval += '0x' + forge.util.bytesToHex(obj.value); + } else if(obj.type === asn1.Type.UTF8) { + try { + rval += forge.util.decodeUtf8(obj.value); + } catch(e) { + if(e.message === 'URI malformed') { + rval += + '0x' + forge.util.bytesToHex(obj.value) + ' (malformed UTF8)'; + } else { + throw e; + } + } + } else if(obj.type === asn1.Type.PRINTABLESTRING || + obj.type === asn1.Type.IA5String) { + rval += obj.value; + } else if(_nonLatinRegex.test(obj.value)) { + rval += '0x' + forge.util.bytesToHex(obj.value); + } else if(obj.value.length === 0) { + rval += '[null]'; + } else { + rval += obj.value; + } + } + + return rval; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 56845: +======= +/***/ 12390: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +/** + * Base-N/Base-X encoding/decoding functions. + * + * Original implementation from base-x: + * https://github.com/cryptocoinjs/base-x + * + * Which is MIT licensed: + * + * The MIT License (MIT) + * + * Copyright base-x contributors (c) 2016 + * + * 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. + */ +var api = {}; +module.exports = api; + +// baseN alphabet indexes +var _reverseAlphabets = {}; + +/** + * BaseN-encodes a Uint8Array using the given alphabet. + * + * @param input the Uint8Array to encode. + * @param maxline the maximum number of encoded characters per line to use, + * defaults to none. + * + * @return the baseN-encoded output string. + */ +api.encode = function(input, alphabet, maxline) { + if(typeof alphabet !== 'string') { + throw new TypeError('"alphabet" must be a string.'); + } + if(maxline !== undefined && typeof maxline !== 'number') { + throw new TypeError('"maxline" must be a number.'); + } + + var output = ''; + + if(!(input instanceof Uint8Array)) { + // assume forge byte buffer + output = _encodeWithByteBuffer(input, alphabet); + } else { + var i = 0; + var base = alphabet.length; + var first = alphabet.charAt(0); + var digits = [0]; + for(i = 0; i < input.length; ++i) { + for(var j = 0, carry = input[i]; j < digits.length; ++j) { + carry += digits[j] << 8; + digits[j] = carry % base; + carry = (carry / base) | 0; + } + + while(carry > 0) { + digits.push(carry % base); + carry = (carry / base) | 0; + } + } + + // deal with leading zeros + for(i = 0; input[i] === 0 && i < input.length - 1; ++i) { + output += first; + } + // convert digits to a string + for(i = digits.length - 1; i >= 0; --i) { + output += alphabet[digits[i]]; + } + } + + if(maxline) { + var regex = new RegExp('.{1,' + maxline + '}', 'g'); + output = output.match(regex).join('\r\n'); + } + + return output; +}; + +/** + * Decodes a baseN-encoded (using the given alphabet) string to a + * Uint8Array. + * + * @param input the baseN-encoded input string. + * + * @return the Uint8Array. + */ +api.decode = function(input, alphabet) { + if(typeof input !== 'string') { + throw new TypeError('"input" must be a string.'); + } + if(typeof alphabet !== 'string') { + throw new TypeError('"alphabet" must be a string.'); + } + + var table = _reverseAlphabets[alphabet]; + if(!table) { + // compute reverse alphabet + table = _reverseAlphabets[alphabet] = []; + for(var i = 0; i < alphabet.length; ++i) { + table[alphabet.charCodeAt(i)] = i; + } + } + + // remove whitespace characters + input = input.replace(/\s/g, ''); + + var base = alphabet.length; + var first = alphabet.charAt(0); + var bytes = [0]; + for(var i = 0; i < input.length; i++) { + var value = table[input.charCodeAt(i)]; + if(value === undefined) { + return; + } + + for(var j = 0, carry = value; j < bytes.length; ++j) { + carry += bytes[j] * base; + bytes[j] = carry & 0xff; + carry >>= 8; + } + + while(carry > 0) { + bytes.push(carry & 0xff); + carry >>= 8; + } + } + + // deal with leading zeros + for(var k = 0; input[k] === first && k < input.length - 1; ++k) { + bytes.push(0); + } + + if(typeof Buffer !== 'undefined') { + return Buffer.from(bytes.reverse()); + } + + return new Uint8Array(bytes.reverse()); +}; + +function _encodeWithByteBuffer(input, alphabet) { + var i = 0; + var base = alphabet.length; + var first = alphabet.charAt(0); + var digits = [0]; + for(i = 0; i < input.length(); ++i) { + for(var j = 0, carry = input.at(i); j < digits.length; ++j) { + carry += digits[j] << 8; + digits[j] = carry % base; + carry = (carry / base) | 0; + } + + while(carry > 0) { + digits.push(carry % base); + carry = (carry / base) | 0; + } + } + + var output = ''; + + // deal with leading zeros + for(i = 0; input.at(i) === 0 && i < input.length() - 1; ++i) { + output += first; + } + // convert digits to a string + for(i = digits.length - 1; i >= 0; --i) { + output += alphabet[digits[i]]; + } + + return output; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 21477: +======= +/***/ 27883: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Cipher base API. + * + * @author Dave Longley + * + * Copyright (c) 2010-2014 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = forge.cipher = forge.cipher || {}; + +// registered algorithms +forge.cipher.algorithms = forge.cipher.algorithms || {}; + +/** + * Creates a cipher object that can be used to encrypt data using the given + * algorithm and key. The algorithm may be provided as a string value for a + * previously registered algorithm or it may be given as a cipher algorithm + * API object. + * + * @param algorithm the algorithm to use, either a string or an algorithm API + * object. + * @param key the key to use, as a binary-encoded string of bytes or a + * byte buffer. + * + * @return the cipher. + */ +forge.cipher.createCipher = function(algorithm, key) { + var api = algorithm; + if(typeof api === 'string') { + api = forge.cipher.getAlgorithm(api); + if(api) { + api = api(); + } + } + if(!api) { + throw new Error('Unsupported algorithm: ' + algorithm); + } + + // assume block cipher + return new forge.cipher.BlockCipher({ + algorithm: api, + key: key, + decrypt: false + }); +}; + +/** + * Creates a decipher object that can be used to decrypt data using the given + * algorithm and key. The algorithm may be provided as a string value for a + * previously registered algorithm or it may be given as a cipher algorithm + * API object. + * + * @param algorithm the algorithm to use, either a string or an algorithm API + * object. + * @param key the key to use, as a binary-encoded string of bytes or a + * byte buffer. + * + * @return the cipher. + */ +forge.cipher.createDecipher = function(algorithm, key) { + var api = algorithm; + if(typeof api === 'string') { + api = forge.cipher.getAlgorithm(api); + if(api) { + api = api(); + } + } + if(!api) { + throw new Error('Unsupported algorithm: ' + algorithm); + } + + // assume block cipher + return new forge.cipher.BlockCipher({ + algorithm: api, + key: key, + decrypt: true + }); +}; + +/** + * Registers an algorithm by name. If the name was already registered, the + * algorithm API object will be overwritten. + * + * @param name the name of the algorithm. + * @param algorithm the algorithm API object. + */ +forge.cipher.registerAlgorithm = function(name, algorithm) { + name = name.toUpperCase(); + forge.cipher.algorithms[name] = algorithm; +}; + +/** + * Gets a registered algorithm by name. + * + * @param name the name of the algorithm. + * + * @return the algorithm, if found, null if not. + */ +forge.cipher.getAlgorithm = function(name) { + name = name.toUpperCase(); + if(name in forge.cipher.algorithms) { + return forge.cipher.algorithms[name]; + } + return null; +}; + +var BlockCipher = forge.cipher.BlockCipher = function(options) { + this.algorithm = options.algorithm; + this.mode = this.algorithm.mode; + this.blockSize = this.mode.blockSize; + this._finish = false; + this._input = null; + this.output = null; + this._op = options.decrypt ? this.mode.decrypt : this.mode.encrypt; + this._decrypt = options.decrypt; + this.algorithm.initialize(options); +}; + +/** + * Starts or restarts the encryption or decryption process, whichever + * was previously configured. + * + * For non-GCM mode, the IV may be a binary-encoded string of bytes, an array + * of bytes, a byte buffer, or an array of 32-bit integers. If the IV is in + * bytes, then it must be Nb (16) bytes in length. If the IV is given in as + * 32-bit integers, then it must be 4 integers long. + * + * Note: an IV is not required or used in ECB mode. + * + * For GCM-mode, the IV must be given as a binary-encoded string of bytes or + * a byte buffer. The number of bytes should be 12 (96 bits) as recommended + * by NIST SP-800-38D but another length may be given. + * + * @param options the options to use: + * iv the initialization vector to use as a binary-encoded string of + * bytes, null to reuse the last ciphered block from a previous + * update() (this "residue" method is for legacy support only). + * additionalData additional authentication data as a binary-encoded + * string of bytes, for 'GCM' mode, (default: none). + * tagLength desired length of authentication tag, in bits, for + * 'GCM' mode (0-128, default: 128). + * tag the authentication tag to check if decrypting, as a + * binary-encoded string of bytes. + * output the output the buffer to write to, null to create one. + */ +BlockCipher.prototype.start = function(options) { + options = options || {}; + var opts = {}; + for(var key in options) { + opts[key] = options[key]; + } + opts.decrypt = this._decrypt; + this._finish = false; + this._input = forge.util.createBuffer(); + this.output = options.output || forge.util.createBuffer(); + this.mode.start(opts); +}; + +/** + * Updates the next block according to the cipher mode. + * + * @param input the buffer to read from. + */ +BlockCipher.prototype.update = function(input) { + if(input) { + // input given, so empty it into the input buffer + this._input.putBuffer(input); + } + + // do cipher operation until it needs more input and not finished + while(!this._op.call(this.mode, this._input, this.output, this._finish) && + !this._finish) {} + + // free consumed memory from input buffer + this._input.compact(); +}; + +/** + * Finishes encrypting or decrypting. + * + * @param pad a padding function to use in CBC mode, null for default, + * signature(blockSize, buffer, decrypt). + * + * @return true if successful, false on error. + */ +BlockCipher.prototype.finish = function(pad) { + // backwards-compatibility w/deprecated padding API + // Note: will overwrite padding functions even after another start() call + if(pad && (this.mode.name === 'ECB' || this.mode.name === 'CBC')) { + this.mode.pad = function(input) { + return pad(this.blockSize, input, false); + }; + this.mode.unpad = function(output) { + return pad(this.blockSize, output, true); + }; + } + + // build options for padding and afterFinish functions + var options = {}; + options.decrypt = this._decrypt; + + // get # of bytes that won't fill a block + options.overflow = this._input.length() % this.blockSize; + + if(!this._decrypt && this.mode.pad) { + if(!this.mode.pad(this._input, options)) { + return false; + } + } + + // do final update + this._finish = true; + this.update(); + + if(this._decrypt && this.mode.unpad) { + if(!this.mode.unpad(this.output, options)) { + return false; + } + } + + if(this.mode.afterFinish) { + if(!this.mode.afterFinish(this.output, options)) { + return false; + } + } + + return true; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 23540: +======= +/***/ 70857: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Supported cipher modes. + * + * @author Dave Longley + * + * Copyright (c) 2010-2014 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +forge.cipher = forge.cipher || {}; + +// supported cipher modes +var modes = module.exports = forge.cipher.modes = forge.cipher.modes || {}; + +/** Electronic codebook (ECB) (Don't use this; it's not secure) **/ + +modes.ecb = function(options) { + options = options || {}; + this.name = 'ECB'; + this.cipher = options.cipher; + this.blockSize = options.blockSize || 16; + this._ints = this.blockSize / 4; + this._inBlock = new Array(this._ints); + this._outBlock = new Array(this._ints); +}; + +modes.ecb.prototype.start = function(options) {}; + +modes.ecb.prototype.encrypt = function(input, output, finish) { + // not enough input to encrypt + if(input.length() < this.blockSize && !(finish && input.length() > 0)) { + return true; + } + + // get next block + for(var i = 0; i < this._ints; ++i) { + this._inBlock[i] = input.getInt32(); + } + + // encrypt block + this.cipher.encrypt(this._inBlock, this._outBlock); + + // write output + for(var i = 0; i < this._ints; ++i) { + output.putInt32(this._outBlock[i]); + } +}; + +modes.ecb.prototype.decrypt = function(input, output, finish) { + // not enough input to decrypt + if(input.length() < this.blockSize && !(finish && input.length() > 0)) { + return true; + } + + // get next block + for(var i = 0; i < this._ints; ++i) { + this._inBlock[i] = input.getInt32(); + } + + // decrypt block + this.cipher.decrypt(this._inBlock, this._outBlock); + + // write output + for(var i = 0; i < this._ints; ++i) { + output.putInt32(this._outBlock[i]); + } +}; + +modes.ecb.prototype.pad = function(input, options) { + // add PKCS#7 padding to block (each pad byte is the + // value of the number of pad bytes) + var padding = (input.length() === this.blockSize ? + this.blockSize : (this.blockSize - input.length())); + input.fillWithByte(padding, padding); + return true; +}; + +modes.ecb.prototype.unpad = function(output, options) { + // check for error: input data not a multiple of blockSize + if(options.overflow > 0) { + return false; + } + + // ensure padding byte count is valid + var len = output.length(); + var count = output.at(len - 1); + if(count > (this.blockSize << 2)) { + return false; + } + + // trim off padding bytes + output.truncate(count); + return true; +}; + +/** Cipher-block Chaining (CBC) **/ + +modes.cbc = function(options) { + options = options || {}; + this.name = 'CBC'; + this.cipher = options.cipher; + this.blockSize = options.blockSize || 16; + this._ints = this.blockSize / 4; + this._inBlock = new Array(this._ints); + this._outBlock = new Array(this._ints); +}; + +modes.cbc.prototype.start = function(options) { + // Note: legacy support for using IV residue (has security flaws) + // if IV is null, reuse block from previous processing + if(options.iv === null) { + // must have a previous block + if(!this._prev) { + throw new Error('Invalid IV parameter.'); + } + this._iv = this._prev.slice(0); + } else if(!('iv' in options)) { + throw new Error('Invalid IV parameter.'); + } else { + // save IV as "previous" block + this._iv = transformIV(options.iv, this.blockSize); + this._prev = this._iv.slice(0); + } +}; + +modes.cbc.prototype.encrypt = function(input, output, finish) { + // not enough input to encrypt + if(input.length() < this.blockSize && !(finish && input.length() > 0)) { + return true; + } + + // get next block + // CBC XOR's IV (or previous block) with plaintext + for(var i = 0; i < this._ints; ++i) { + this._inBlock[i] = this._prev[i] ^ input.getInt32(); + } + + // encrypt block + this.cipher.encrypt(this._inBlock, this._outBlock); + + // write output, save previous block + for(var i = 0; i < this._ints; ++i) { + output.putInt32(this._outBlock[i]); + } + this._prev = this._outBlock; +}; + +modes.cbc.prototype.decrypt = function(input, output, finish) { + // not enough input to decrypt + if(input.length() < this.blockSize && !(finish && input.length() > 0)) { + return true; + } + + // get next block + for(var i = 0; i < this._ints; ++i) { + this._inBlock[i] = input.getInt32(); + } + + // decrypt block + this.cipher.decrypt(this._inBlock, this._outBlock); + + // write output, save previous ciphered block + // CBC XOR's IV (or previous block) with ciphertext + for(var i = 0; i < this._ints; ++i) { + output.putInt32(this._prev[i] ^ this._outBlock[i]); + } + this._prev = this._inBlock.slice(0); +}; + +modes.cbc.prototype.pad = function(input, options) { + // add PKCS#7 padding to block (each pad byte is the + // value of the number of pad bytes) + var padding = (input.length() === this.blockSize ? + this.blockSize : (this.blockSize - input.length())); + input.fillWithByte(padding, padding); + return true; +}; + +modes.cbc.prototype.unpad = function(output, options) { + // check for error: input data not a multiple of blockSize + if(options.overflow > 0) { + return false; + } + + // ensure padding byte count is valid + var len = output.length(); + var count = output.at(len - 1); + if(count > (this.blockSize << 2)) { + return false; + } + + // trim off padding bytes + output.truncate(count); + return true; +}; + +/** Cipher feedback (CFB) **/ + +modes.cfb = function(options) { + options = options || {}; + this.name = 'CFB'; + this.cipher = options.cipher; + this.blockSize = options.blockSize || 16; + this._ints = this.blockSize / 4; + this._inBlock = null; + this._outBlock = new Array(this._ints); + this._partialBlock = new Array(this._ints); + this._partialOutput = forge.util.createBuffer(); + this._partialBytes = 0; +}; + +modes.cfb.prototype.start = function(options) { + if(!('iv' in options)) { + throw new Error('Invalid IV parameter.'); + } + // use IV as first input + this._iv = transformIV(options.iv, this.blockSize); + this._inBlock = this._iv.slice(0); + this._partialBytes = 0; +}; + +modes.cfb.prototype.encrypt = function(input, output, finish) { + // not enough input to encrypt + var inputLength = input.length(); + if(inputLength === 0) { + return true; + } + + // encrypt block + this.cipher.encrypt(this._inBlock, this._outBlock); + + // handle full block + if(this._partialBytes === 0 && inputLength >= this.blockSize) { + // XOR input with output, write input as output + for(var i = 0; i < this._ints; ++i) { + this._inBlock[i] = input.getInt32() ^ this._outBlock[i]; + output.putInt32(this._inBlock[i]); + } + return; + } + + // handle partial block + var partialBytes = (this.blockSize - inputLength) % this.blockSize; + if(partialBytes > 0) { + partialBytes = this.blockSize - partialBytes; + } + + // XOR input with output, write input as partial output + this._partialOutput.clear(); + for(var i = 0; i < this._ints; ++i) { + this._partialBlock[i] = input.getInt32() ^ this._outBlock[i]; + this._partialOutput.putInt32(this._partialBlock[i]); + } + + if(partialBytes > 0) { + // block still incomplete, restore input buffer + input.read -= this.blockSize; + } else { + // block complete, update input block + for(var i = 0; i < this._ints; ++i) { + this._inBlock[i] = this._partialBlock[i]; + } + } + + // skip any previous partial bytes + if(this._partialBytes > 0) { + this._partialOutput.getBytes(this._partialBytes); + } + + if(partialBytes > 0 && !finish) { + output.putBytes(this._partialOutput.getBytes( + partialBytes - this._partialBytes)); + this._partialBytes = partialBytes; + return true; + } + + output.putBytes(this._partialOutput.getBytes( + inputLength - this._partialBytes)); + this._partialBytes = 0; +}; + +modes.cfb.prototype.decrypt = function(input, output, finish) { + // not enough input to decrypt + var inputLength = input.length(); + if(inputLength === 0) { + return true; + } + + // encrypt block (CFB always uses encryption mode) + this.cipher.encrypt(this._inBlock, this._outBlock); + + // handle full block + if(this._partialBytes === 0 && inputLength >= this.blockSize) { + // XOR input with output, write input as output + for(var i = 0; i < this._ints; ++i) { + this._inBlock[i] = input.getInt32(); + output.putInt32(this._inBlock[i] ^ this._outBlock[i]); + } + return; + } + + // handle partial block + var partialBytes = (this.blockSize - inputLength) % this.blockSize; + if(partialBytes > 0) { + partialBytes = this.blockSize - partialBytes; + } + + // XOR input with output, write input as partial output + this._partialOutput.clear(); + for(var i = 0; i < this._ints; ++i) { + this._partialBlock[i] = input.getInt32(); + this._partialOutput.putInt32(this._partialBlock[i] ^ this._outBlock[i]); + } + + if(partialBytes > 0) { + // block still incomplete, restore input buffer + input.read -= this.blockSize; + } else { + // block complete, update input block + for(var i = 0; i < this._ints; ++i) { + this._inBlock[i] = this._partialBlock[i]; + } + } + + // skip any previous partial bytes + if(this._partialBytes > 0) { + this._partialOutput.getBytes(this._partialBytes); + } + + if(partialBytes > 0 && !finish) { + output.putBytes(this._partialOutput.getBytes( + partialBytes - this._partialBytes)); + this._partialBytes = partialBytes; + return true; + } + + output.putBytes(this._partialOutput.getBytes( + inputLength - this._partialBytes)); + this._partialBytes = 0; +}; + +/** Output feedback (OFB) **/ + +modes.ofb = function(options) { + options = options || {}; + this.name = 'OFB'; + this.cipher = options.cipher; + this.blockSize = options.blockSize || 16; + this._ints = this.blockSize / 4; + this._inBlock = null; + this._outBlock = new Array(this._ints); + this._partialOutput = forge.util.createBuffer(); + this._partialBytes = 0; +}; + +modes.ofb.prototype.start = function(options) { + if(!('iv' in options)) { + throw new Error('Invalid IV parameter.'); + } + // use IV as first input + this._iv = transformIV(options.iv, this.blockSize); + this._inBlock = this._iv.slice(0); + this._partialBytes = 0; +}; + +modes.ofb.prototype.encrypt = function(input, output, finish) { + // not enough input to encrypt + var inputLength = input.length(); + if(input.length() === 0) { + return true; + } + + // encrypt block (OFB always uses encryption mode) + this.cipher.encrypt(this._inBlock, this._outBlock); + + // handle full block + if(this._partialBytes === 0 && inputLength >= this.blockSize) { + // XOR input with output and update next input + for(var i = 0; i < this._ints; ++i) { + output.putInt32(input.getInt32() ^ this._outBlock[i]); + this._inBlock[i] = this._outBlock[i]; + } + return; + } + + // handle partial block + var partialBytes = (this.blockSize - inputLength) % this.blockSize; + if(partialBytes > 0) { + partialBytes = this.blockSize - partialBytes; + } + + // XOR input with output + this._partialOutput.clear(); + for(var i = 0; i < this._ints; ++i) { + this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]); + } + + if(partialBytes > 0) { + // block still incomplete, restore input buffer + input.read -= this.blockSize; + } else { + // block complete, update input block + for(var i = 0; i < this._ints; ++i) { + this._inBlock[i] = this._outBlock[i]; + } + } + + // skip any previous partial bytes + if(this._partialBytes > 0) { + this._partialOutput.getBytes(this._partialBytes); + } + + if(partialBytes > 0 && !finish) { + output.putBytes(this._partialOutput.getBytes( + partialBytes - this._partialBytes)); + this._partialBytes = partialBytes; + return true; + } + + output.putBytes(this._partialOutput.getBytes( + inputLength - this._partialBytes)); + this._partialBytes = 0; +}; + +modes.ofb.prototype.decrypt = modes.ofb.prototype.encrypt; + +/** Counter (CTR) **/ + +modes.ctr = function(options) { + options = options || {}; + this.name = 'CTR'; + this.cipher = options.cipher; + this.blockSize = options.blockSize || 16; + this._ints = this.blockSize / 4; + this._inBlock = null; + this._outBlock = new Array(this._ints); + this._partialOutput = forge.util.createBuffer(); + this._partialBytes = 0; +}; + +modes.ctr.prototype.start = function(options) { + if(!('iv' in options)) { + throw new Error('Invalid IV parameter.'); + } + // use IV as first input + this._iv = transformIV(options.iv, this.blockSize); + this._inBlock = this._iv.slice(0); + this._partialBytes = 0; +}; + +modes.ctr.prototype.encrypt = function(input, output, finish) { + // not enough input to encrypt + var inputLength = input.length(); + if(inputLength === 0) { + return true; + } + + // encrypt block (CTR always uses encryption mode) + this.cipher.encrypt(this._inBlock, this._outBlock); + + // handle full block + if(this._partialBytes === 0 && inputLength >= this.blockSize) { + // XOR input with output + for(var i = 0; i < this._ints; ++i) { + output.putInt32(input.getInt32() ^ this._outBlock[i]); + } + } else { + // handle partial block + var partialBytes = (this.blockSize - inputLength) % this.blockSize; + if(partialBytes > 0) { + partialBytes = this.blockSize - partialBytes; + } + + // XOR input with output + this._partialOutput.clear(); + for(var i = 0; i < this._ints; ++i) { + this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]); + } + + if(partialBytes > 0) { + // block still incomplete, restore input buffer + input.read -= this.blockSize; + } + + // skip any previous partial bytes + if(this._partialBytes > 0) { + this._partialOutput.getBytes(this._partialBytes); + } + + if(partialBytes > 0 && !finish) { + output.putBytes(this._partialOutput.getBytes( + partialBytes - this._partialBytes)); + this._partialBytes = partialBytes; + return true; + } + + output.putBytes(this._partialOutput.getBytes( + inputLength - this._partialBytes)); + this._partialBytes = 0; + } + + // block complete, increment counter (input block) + inc32(this._inBlock); +}; + +modes.ctr.prototype.decrypt = modes.ctr.prototype.encrypt; + +/** Galois/Counter Mode (GCM) **/ + +modes.gcm = function(options) { + options = options || {}; + this.name = 'GCM'; + this.cipher = options.cipher; + this.blockSize = options.blockSize || 16; + this._ints = this.blockSize / 4; + this._inBlock = new Array(this._ints); + this._outBlock = new Array(this._ints); + this._partialOutput = forge.util.createBuffer(); + this._partialBytes = 0; + + // R is actually this value concatenated with 120 more zero bits, but + // we only XOR against R so the other zeros have no effect -- we just + // apply this value to the first integer in a block + this._R = 0xE1000000; +}; + +modes.gcm.prototype.start = function(options) { + if(!('iv' in options)) { + throw new Error('Invalid IV parameter.'); + } + // ensure IV is a byte buffer + var iv = forge.util.createBuffer(options.iv); + + // no ciphered data processed yet + this._cipherLength = 0; + + // default additional data is none + var additionalData; + if('additionalData' in options) { + additionalData = forge.util.createBuffer(options.additionalData); + } else { + additionalData = forge.util.createBuffer(); + } + + // default tag length is 128 bits + if('tagLength' in options) { + this._tagLength = options.tagLength; + } else { + this._tagLength = 128; + } + + // if tag is given, ensure tag matches tag length + this._tag = null; + if(options.decrypt) { + // save tag to check later + this._tag = forge.util.createBuffer(options.tag).getBytes(); + if(this._tag.length !== (this._tagLength / 8)) { + throw new Error('Authentication tag does not match tag length.'); + } + } + + // create tmp storage for hash calculation + this._hashBlock = new Array(this._ints); + + // no tag generated yet + this.tag = null; + + // generate hash subkey + // (apply block cipher to "zero" block) + this._hashSubkey = new Array(this._ints); + this.cipher.encrypt([0, 0, 0, 0], this._hashSubkey); + + // generate table M + // use 4-bit tables (32 component decomposition of a 16 byte value) + // 8-bit tables take more space and are known to have security + // vulnerabilities (in native implementations) + this.componentBits = 4; + this._m = this.generateHashTable(this._hashSubkey, this.componentBits); + + // Note: support IV length different from 96 bits? (only supporting + // 96 bits is recommended by NIST SP-800-38D) + // generate J_0 + var ivLength = iv.length(); + if(ivLength === 12) { + // 96-bit IV + this._j0 = [iv.getInt32(), iv.getInt32(), iv.getInt32(), 1]; + } else { + // IV is NOT 96-bits + this._j0 = [0, 0, 0, 0]; + while(iv.length() > 0) { + this._j0 = this.ghash( + this._hashSubkey, this._j0, + [iv.getInt32(), iv.getInt32(), iv.getInt32(), iv.getInt32()]); + } + this._j0 = this.ghash( + this._hashSubkey, this._j0, [0, 0].concat(from64To32(ivLength * 8))); + } + + // generate ICB (initial counter block) + this._inBlock = this._j0.slice(0); + inc32(this._inBlock); + this._partialBytes = 0; + + // consume authentication data + additionalData = forge.util.createBuffer(additionalData); + // save additional data length as a BE 64-bit number + this._aDataLength = from64To32(additionalData.length() * 8); + // pad additional data to 128 bit (16 byte) block size + var overflow = additionalData.length() % this.blockSize; + if(overflow) { + additionalData.fillWithByte(0, this.blockSize - overflow); + } + this._s = [0, 0, 0, 0]; + while(additionalData.length() > 0) { + this._s = this.ghash(this._hashSubkey, this._s, [ + additionalData.getInt32(), + additionalData.getInt32(), + additionalData.getInt32(), + additionalData.getInt32() + ]); + } +}; + +modes.gcm.prototype.encrypt = function(input, output, finish) { + // not enough input to encrypt + var inputLength = input.length(); + if(inputLength === 0) { + return true; + } + + // encrypt block + this.cipher.encrypt(this._inBlock, this._outBlock); + + // handle full block + if(this._partialBytes === 0 && inputLength >= this.blockSize) { + // XOR input with output + for(var i = 0; i < this._ints; ++i) { + output.putInt32(this._outBlock[i] ^= input.getInt32()); + } + this._cipherLength += this.blockSize; + } else { + // handle partial block + var partialBytes = (this.blockSize - inputLength) % this.blockSize; + if(partialBytes > 0) { + partialBytes = this.blockSize - partialBytes; + } + + // XOR input with output + this._partialOutput.clear(); + for(var i = 0; i < this._ints; ++i) { + this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]); + } + + if(partialBytes <= 0 || finish) { + // handle overflow prior to hashing + if(finish) { + // get block overflow + var overflow = inputLength % this.blockSize; + this._cipherLength += overflow; + // truncate for hash function + this._partialOutput.truncate(this.blockSize - overflow); + } else { + this._cipherLength += this.blockSize; + } + + // get output block for hashing + for(var i = 0; i < this._ints; ++i) { + this._outBlock[i] = this._partialOutput.getInt32(); + } + this._partialOutput.read -= this.blockSize; + } + + // skip any previous partial bytes + if(this._partialBytes > 0) { + this._partialOutput.getBytes(this._partialBytes); + } + + if(partialBytes > 0 && !finish) { + // block still incomplete, restore input buffer, get partial output, + // and return early + input.read -= this.blockSize; + output.putBytes(this._partialOutput.getBytes( + partialBytes - this._partialBytes)); + this._partialBytes = partialBytes; + return true; + } + + output.putBytes(this._partialOutput.getBytes( + inputLength - this._partialBytes)); + this._partialBytes = 0; + } + + // update hash block S + this._s = this.ghash(this._hashSubkey, this._s, this._outBlock); + + // increment counter (input block) + inc32(this._inBlock); +}; + +modes.gcm.prototype.decrypt = function(input, output, finish) { + // not enough input to decrypt + var inputLength = input.length(); + if(inputLength < this.blockSize && !(finish && inputLength > 0)) { + return true; + } + + // encrypt block (GCM always uses encryption mode) + this.cipher.encrypt(this._inBlock, this._outBlock); + + // increment counter (input block) + inc32(this._inBlock); + + // update hash block S + this._hashBlock[0] = input.getInt32(); + this._hashBlock[1] = input.getInt32(); + this._hashBlock[2] = input.getInt32(); + this._hashBlock[3] = input.getInt32(); + this._s = this.ghash(this._hashSubkey, this._s, this._hashBlock); + + // XOR hash input with output + for(var i = 0; i < this._ints; ++i) { + output.putInt32(this._outBlock[i] ^ this._hashBlock[i]); + } + + // increment cipher data length + if(inputLength < this.blockSize) { + this._cipherLength += inputLength % this.blockSize; + } else { + this._cipherLength += this.blockSize; + } +}; + +modes.gcm.prototype.afterFinish = function(output, options) { + var rval = true; + + // handle overflow + if(options.decrypt && options.overflow) { + output.truncate(this.blockSize - options.overflow); + } + + // handle authentication tag + this.tag = forge.util.createBuffer(); + + // concatenate additional data length with cipher length + var lengths = this._aDataLength.concat(from64To32(this._cipherLength * 8)); + + // include lengths in hash + this._s = this.ghash(this._hashSubkey, this._s, lengths); + + // do GCTR(J_0, S) + var tag = []; + this.cipher.encrypt(this._j0, tag); + for(var i = 0; i < this._ints; ++i) { + this.tag.putInt32(this._s[i] ^ tag[i]); + } + + // trim tag to length + this.tag.truncate(this.tag.length() % (this._tagLength / 8)); + + // check authentication tag + if(options.decrypt && this.tag.bytes() !== this._tag) { + rval = false; + } + + return rval; +}; + +/** + * See NIST SP-800-38D 6.3 (Algorithm 1). This function performs Galois + * field multiplication. The field, GF(2^128), is defined by the polynomial: + * + * x^128 + x^7 + x^2 + x + 1 + * + * Which is represented in little-endian binary form as: 11100001 (0xe1). When + * the value of a coefficient is 1, a bit is set. The value R, is the + * concatenation of this value and 120 zero bits, yielding a 128-bit value + * which matches the block size. + * + * This function will multiply two elements (vectors of bytes), X and Y, in + * the field GF(2^128). The result is initialized to zero. For each bit of + * X (out of 128), x_i, if x_i is set, then the result is multiplied (XOR'd) + * by the current value of Y. For each bit, the value of Y will be raised by + * a power of x (multiplied by the polynomial x). This can be achieved by + * shifting Y once to the right. If the current value of Y, prior to being + * multiplied by x, has 0 as its LSB, then it is a 127th degree polynomial. + * Otherwise, we must divide by R after shifting to find the remainder. + * + * @param x the first block to multiply by the second. + * @param y the second block to multiply by the first. + * + * @return the block result of the multiplication. + */ +modes.gcm.prototype.multiply = function(x, y) { + var z_i = [0, 0, 0, 0]; + var v_i = y.slice(0); + + // calculate Z_128 (block has 128 bits) + for(var i = 0; i < 128; ++i) { + // if x_i is 0, Z_{i+1} = Z_i (unchanged) + // else Z_{i+1} = Z_i ^ V_i + // get x_i by finding 32-bit int position, then left shift 1 by remainder + var x_i = x[(i / 32) | 0] & (1 << (31 - i % 32)); + if(x_i) { + z_i[0] ^= v_i[0]; + z_i[1] ^= v_i[1]; + z_i[2] ^= v_i[2]; + z_i[3] ^= v_i[3]; + } + + // if LSB(V_i) is 1, V_i = V_i >> 1 + // else V_i = (V_i >> 1) ^ R + this.pow(v_i, v_i); + } + + return z_i; +}; + +modes.gcm.prototype.pow = function(x, out) { + // if LSB(x) is 1, x = x >>> 1 + // else x = (x >>> 1) ^ R + var lsb = x[3] & 1; + + // always do x >>> 1: + // starting with the rightmost integer, shift each integer to the right + // one bit, pulling in the bit from the integer to the left as its top + // most bit (do this for the last 3 integers) + for(var i = 3; i > 0; --i) { + out[i] = (x[i] >>> 1) | ((x[i - 1] & 1) << 31); + } + // shift the first integer normally + out[0] = x[0] >>> 1; + + // if lsb was not set, then polynomial had a degree of 127 and doesn't + // need to divided; otherwise, XOR with R to find the remainder; we only + // need to XOR the first integer since R technically ends w/120 zero bits + if(lsb) { + out[0] ^= this._R; + } +}; + +modes.gcm.prototype.tableMultiply = function(x) { + // assumes 4-bit tables are used + var z = [0, 0, 0, 0]; + for(var i = 0; i < 32; ++i) { + var idx = (i / 8) | 0; + var x_i = (x[idx] >>> ((7 - (i % 8)) * 4)) & 0xF; + var ah = this._m[i][x_i]; + z[0] ^= ah[0]; + z[1] ^= ah[1]; + z[2] ^= ah[2]; + z[3] ^= ah[3]; + } + return z; +}; + +/** + * A continuing version of the GHASH algorithm that operates on a single + * block. The hash block, last hash value (Ym) and the new block to hash + * are given. + * + * @param h the hash block. + * @param y the previous value for Ym, use [0, 0, 0, 0] for a new hash. + * @param x the block to hash. + * + * @return the hashed value (Ym). + */ +modes.gcm.prototype.ghash = function(h, y, x) { + y[0] ^= x[0]; + y[1] ^= x[1]; + y[2] ^= x[2]; + y[3] ^= x[3]; + return this.tableMultiply(y); + //return this.multiply(y, h); +}; + +/** + * Precomputes a table for multiplying against the hash subkey. This + * mechanism provides a substantial speed increase over multiplication + * performed without a table. The table-based multiplication this table is + * for solves X * H by multiplying each component of X by H and then + * composing the results together using XOR. + * + * This function can be used to generate tables with different bit sizes + * for the components, however, this implementation assumes there are + * 32 components of X (which is a 16 byte vector), therefore each component + * takes 4-bits (so the table is constructed with bits=4). + * + * @param h the hash subkey. + * @param bits the bit size for a component. + */ +modes.gcm.prototype.generateHashTable = function(h, bits) { + // TODO: There are further optimizations that would use only the + // first table M_0 (or some variant) along with a remainder table; + // this can be explored in the future + var multiplier = 8 / bits; + var perInt = 4 * multiplier; + var size = 16 * multiplier; + var m = new Array(size); + for(var i = 0; i < size; ++i) { + var tmp = [0, 0, 0, 0]; + var idx = (i / perInt) | 0; + var shft = ((perInt - 1 - (i % perInt)) * bits); + tmp[idx] = (1 << (bits - 1)) << shft; + m[i] = this.generateSubHashTable(this.multiply(tmp, h), bits); + } + return m; +}; + +/** + * Generates a table for multiplying against the hash subkey for one + * particular component (out of all possible component values). + * + * @param mid the pre-multiplied value for the middle key of the table. + * @param bits the bit size for a component. + */ +modes.gcm.prototype.generateSubHashTable = function(mid, bits) { + // compute the table quickly by minimizing the number of + // POW operations -- they only need to be performed for powers of 2, + // all other entries can be composed from those powers using XOR + var size = 1 << bits; + var half = size >>> 1; + var m = new Array(size); + m[half] = mid.slice(0); + var i = half >>> 1; + while(i > 0) { + // raise m0[2 * i] and store in m0[i] + this.pow(m[2 * i], m[i] = []); + i >>= 1; + } + i = 2; + while(i < half) { + for(var j = 1; j < i; ++j) { + var m_i = m[i]; + var m_j = m[j]; + m[i + j] = [ + m_i[0] ^ m_j[0], + m_i[1] ^ m_j[1], + m_i[2] ^ m_j[2], + m_i[3] ^ m_j[3] + ]; + } + i *= 2; + } + m[0] = [0, 0, 0, 0]; + /* Note: We could avoid storing these by doing composition during multiply + calculate top half using composition by speed is preferred. */ + for(i = half + 1; i < size; ++i) { + var c = m[i ^ half]; + m[i] = [mid[0] ^ c[0], mid[1] ^ c[1], mid[2] ^ c[2], mid[3] ^ c[3]]; + } + return m; +}; + +/** Utility functions */ + +function transformIV(iv, blockSize) { + if(typeof iv === 'string') { + // convert iv string into byte buffer + iv = forge.util.createBuffer(iv); + } + + if(forge.util.isArray(iv) && iv.length > 4) { + // convert iv byte array into byte buffer + var tmp = iv; + iv = forge.util.createBuffer(); + for(var i = 0; i < tmp.length; ++i) { + iv.putByte(tmp[i]); + } + } + + if(iv.length() < blockSize) { + throw new Error( + 'Invalid IV length; got ' + iv.length() + + ' bytes and expected ' + blockSize + ' bytes.'); + } + + if(!forge.util.isArray(iv)) { + // convert iv byte buffer into 32-bit integer array + var ints = []; + var blocks = blockSize / 4; + for(var i = 0; i < blocks; ++i) { + ints.push(iv.getInt32()); + } + iv = ints; + } + + return iv; +} + +function inc32(block) { + // increment last 32 bits of block only + block[block.length - 1] = (block[block.length - 1] + 1) & 0xFFFFFFFF; +} + +function from64To32(num) { + // convert 64-bit number to two BE Int32s + return [(num / 0x100000000) | 0, num & 0xFFFFFFFF]; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 53436: +======= +/***/ 16855: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * DES (Data Encryption Standard) implementation. + * + * This implementation supports DES as well as 3DES-EDE in ECB and CBC mode. + * It is based on the BSD-licensed implementation by Paul Tero: + * + * Paul Tero, July 2001 + * http://www.tero.co.uk/des/ + * + * Optimised for performance with large blocks by + * Michael Hayworth, November 2001 + * http://www.netdealing.com + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @author Stefan Siegl + * @author Dave Longley + * + * Copyright (c) 2012 Stefan Siegl + * Copyright (c) 2012-2014 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(21477); +__nccwpck_require__(23540); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(27883); +__nccwpck_require__(70857); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/* DES API */ +module.exports = forge.des = forge.des || {}; + +/** + * Deprecated. Instead, use: + * + * var cipher = forge.cipher.createCipher('DES-', key); + * cipher.start({iv: iv}); + * + * Creates an DES cipher object to encrypt data using the given symmetric key. + * The output will be stored in the 'output' member of the returned cipher. + * + * The key and iv may be given as binary-encoded strings of bytes or + * byte buffers. + * + * @param key the symmetric key to use (64 or 192 bits). + * @param iv the initialization vector to use. + * @param output the buffer to write to, null to create one. + * @param mode the cipher mode to use (default: 'CBC' if IV is + * given, 'ECB' if null). + * + * @return the cipher. + */ +forge.des.startEncrypting = function(key, iv, output, mode) { + var cipher = _createCipher({ + key: key, + output: output, + decrypt: false, + mode: mode || (iv === null ? 'ECB' : 'CBC') + }); + cipher.start(iv); + return cipher; +}; + +/** + * Deprecated. Instead, use: + * + * var cipher = forge.cipher.createCipher('DES-', key); + * + * Creates an DES cipher object to encrypt data using the given symmetric key. + * + * The key may be given as a binary-encoded string of bytes or a byte buffer. + * + * @param key the symmetric key to use (64 or 192 bits). + * @param mode the cipher mode to use (default: 'CBC'). + * + * @return the cipher. + */ +forge.des.createEncryptionCipher = function(key, mode) { + return _createCipher({ + key: key, + output: null, + decrypt: false, + mode: mode + }); +}; + +/** + * Deprecated. Instead, use: + * + * var decipher = forge.cipher.createDecipher('DES-', key); + * decipher.start({iv: iv}); + * + * Creates an DES cipher object to decrypt data using the given symmetric key. + * The output will be stored in the 'output' member of the returned cipher. + * + * The key and iv may be given as binary-encoded strings of bytes or + * byte buffers. + * + * @param key the symmetric key to use (64 or 192 bits). + * @param iv the initialization vector to use. + * @param output the buffer to write to, null to create one. + * @param mode the cipher mode to use (default: 'CBC' if IV is + * given, 'ECB' if null). + * + * @return the cipher. + */ +forge.des.startDecrypting = function(key, iv, output, mode) { + var cipher = _createCipher({ + key: key, + output: output, + decrypt: true, + mode: mode || (iv === null ? 'ECB' : 'CBC') + }); + cipher.start(iv); + return cipher; +}; + +/** + * Deprecated. Instead, use: + * + * var decipher = forge.cipher.createDecipher('DES-', key); + * + * Creates an DES cipher object to decrypt data using the given symmetric key. + * + * The key may be given as a binary-encoded string of bytes or a byte buffer. + * + * @param key the symmetric key to use (64 or 192 bits). + * @param mode the cipher mode to use (default: 'CBC'). + * + * @return the cipher. + */ +forge.des.createDecryptionCipher = function(key, mode) { + return _createCipher({ + key: key, + output: null, + decrypt: true, + mode: mode + }); +}; + +/** + * Creates a new DES cipher algorithm object. + * + * @param name the name of the algorithm. + * @param mode the mode factory function. + * + * @return the DES algorithm object. + */ +forge.des.Algorithm = function(name, mode) { + var self = this; + self.name = name; + self.mode = new mode({ + blockSize: 8, + cipher: { + encrypt: function(inBlock, outBlock) { + return _updateBlock(self._keys, inBlock, outBlock, false); + }, + decrypt: function(inBlock, outBlock) { + return _updateBlock(self._keys, inBlock, outBlock, true); + } + } + }); + self._init = false; +}; + +/** + * Initializes this DES algorithm by expanding its key. + * + * @param options the options to use. + * key the key to use with this algorithm. + * decrypt true if the algorithm should be initialized for decryption, + * false for encryption. + */ +forge.des.Algorithm.prototype.initialize = function(options) { + if(this._init) { + return; + } + + var key = forge.util.createBuffer(options.key); + if(this.name.indexOf('3DES') === 0) { + if(key.length() !== 24) { + throw new Error('Invalid Triple-DES key size: ' + key.length() * 8); + } + } + + // do key expansion to 16 or 48 subkeys (single or triple DES) + this._keys = _createKeys(key); + this._init = true; +}; + +/** Register DES algorithms **/ + +registerAlgorithm('DES-ECB', forge.cipher.modes.ecb); +registerAlgorithm('DES-CBC', forge.cipher.modes.cbc); +registerAlgorithm('DES-CFB', forge.cipher.modes.cfb); +registerAlgorithm('DES-OFB', forge.cipher.modes.ofb); +registerAlgorithm('DES-CTR', forge.cipher.modes.ctr); + +registerAlgorithm('3DES-ECB', forge.cipher.modes.ecb); +registerAlgorithm('3DES-CBC', forge.cipher.modes.cbc); +registerAlgorithm('3DES-CFB', forge.cipher.modes.cfb); +registerAlgorithm('3DES-OFB', forge.cipher.modes.ofb); +registerAlgorithm('3DES-CTR', forge.cipher.modes.ctr); + +function registerAlgorithm(name, mode) { + var factory = function() { + return new forge.des.Algorithm(name, mode); + }; + forge.cipher.registerAlgorithm(name, factory); +} + +/** DES implementation **/ + +var spfunction1 = [0x1010400,0,0x10000,0x1010404,0x1010004,0x10404,0x4,0x10000,0x400,0x1010400,0x1010404,0x400,0x1000404,0x1010004,0x1000000,0x4,0x404,0x1000400,0x1000400,0x10400,0x10400,0x1010000,0x1010000,0x1000404,0x10004,0x1000004,0x1000004,0x10004,0,0x404,0x10404,0x1000000,0x10000,0x1010404,0x4,0x1010000,0x1010400,0x1000000,0x1000000,0x400,0x1010004,0x10000,0x10400,0x1000004,0x400,0x4,0x1000404,0x10404,0x1010404,0x10004,0x1010000,0x1000404,0x1000004,0x404,0x10404,0x1010400,0x404,0x1000400,0x1000400,0,0x10004,0x10400,0,0x1010004]; +var spfunction2 = [-0x7fef7fe0,-0x7fff8000,0x8000,0x108020,0x100000,0x20,-0x7fefffe0,-0x7fff7fe0,-0x7fffffe0,-0x7fef7fe0,-0x7fef8000,-0x80000000,-0x7fff8000,0x100000,0x20,-0x7fefffe0,0x108000,0x100020,-0x7fff7fe0,0,-0x80000000,0x8000,0x108020,-0x7ff00000,0x100020,-0x7fffffe0,0,0x108000,0x8020,-0x7fef8000,-0x7ff00000,0x8020,0,0x108020,-0x7fefffe0,0x100000,-0x7fff7fe0,-0x7ff00000,-0x7fef8000,0x8000,-0x7ff00000,-0x7fff8000,0x20,-0x7fef7fe0,0x108020,0x20,0x8000,-0x80000000,0x8020,-0x7fef8000,0x100000,-0x7fffffe0,0x100020,-0x7fff7fe0,-0x7fffffe0,0x100020,0x108000,0,-0x7fff8000,0x8020,-0x80000000,-0x7fefffe0,-0x7fef7fe0,0x108000]; +var spfunction3 = [0x208,0x8020200,0,0x8020008,0x8000200,0,0x20208,0x8000200,0x20008,0x8000008,0x8000008,0x20000,0x8020208,0x20008,0x8020000,0x208,0x8000000,0x8,0x8020200,0x200,0x20200,0x8020000,0x8020008,0x20208,0x8000208,0x20200,0x20000,0x8000208,0x8,0x8020208,0x200,0x8000000,0x8020200,0x8000000,0x20008,0x208,0x20000,0x8020200,0x8000200,0,0x200,0x20008,0x8020208,0x8000200,0x8000008,0x200,0,0x8020008,0x8000208,0x20000,0x8000000,0x8020208,0x8,0x20208,0x20200,0x8000008,0x8020000,0x8000208,0x208,0x8020000,0x20208,0x8,0x8020008,0x20200]; +var spfunction4 = [0x802001,0x2081,0x2081,0x80,0x802080,0x800081,0x800001,0x2001,0,0x802000,0x802000,0x802081,0x81,0,0x800080,0x800001,0x1,0x2000,0x800000,0x802001,0x80,0x800000,0x2001,0x2080,0x800081,0x1,0x2080,0x800080,0x2000,0x802080,0x802081,0x81,0x800080,0x800001,0x802000,0x802081,0x81,0,0,0x802000,0x2080,0x800080,0x800081,0x1,0x802001,0x2081,0x2081,0x80,0x802081,0x81,0x1,0x2000,0x800001,0x2001,0x802080,0x800081,0x2001,0x2080,0x800000,0x802001,0x80,0x800000,0x2000,0x802080]; +var spfunction5 = [0x100,0x2080100,0x2080000,0x42000100,0x80000,0x100,0x40000000,0x2080000,0x40080100,0x80000,0x2000100,0x40080100,0x42000100,0x42080000,0x80100,0x40000000,0x2000000,0x40080000,0x40080000,0,0x40000100,0x42080100,0x42080100,0x2000100,0x42080000,0x40000100,0,0x42000000,0x2080100,0x2000000,0x42000000,0x80100,0x80000,0x42000100,0x100,0x2000000,0x40000000,0x2080000,0x42000100,0x40080100,0x2000100,0x40000000,0x42080000,0x2080100,0x40080100,0x100,0x2000000,0x42080000,0x42080100,0x80100,0x42000000,0x42080100,0x2080000,0,0x40080000,0x42000000,0x80100,0x2000100,0x40000100,0x80000,0,0x40080000,0x2080100,0x40000100]; +var spfunction6 = [0x20000010,0x20400000,0x4000,0x20404010,0x20400000,0x10,0x20404010,0x400000,0x20004000,0x404010,0x400000,0x20000010,0x400010,0x20004000,0x20000000,0x4010,0,0x400010,0x20004010,0x4000,0x404000,0x20004010,0x10,0x20400010,0x20400010,0,0x404010,0x20404000,0x4010,0x404000,0x20404000,0x20000000,0x20004000,0x10,0x20400010,0x404000,0x20404010,0x400000,0x4010,0x20000010,0x400000,0x20004000,0x20000000,0x4010,0x20000010,0x20404010,0x404000,0x20400000,0x404010,0x20404000,0,0x20400010,0x10,0x4000,0x20400000,0x404010,0x4000,0x400010,0x20004010,0,0x20404000,0x20000000,0x400010,0x20004010]; +var spfunction7 = [0x200000,0x4200002,0x4000802,0,0x800,0x4000802,0x200802,0x4200800,0x4200802,0x200000,0,0x4000002,0x2,0x4000000,0x4200002,0x802,0x4000800,0x200802,0x200002,0x4000800,0x4000002,0x4200000,0x4200800,0x200002,0x4200000,0x800,0x802,0x4200802,0x200800,0x2,0x4000000,0x200800,0x4000000,0x200800,0x200000,0x4000802,0x4000802,0x4200002,0x4200002,0x2,0x200002,0x4000000,0x4000800,0x200000,0x4200800,0x802,0x200802,0x4200800,0x802,0x4000002,0x4200802,0x4200000,0x200800,0,0x2,0x4200802,0,0x200802,0x4200000,0x800,0x4000002,0x4000800,0x800,0x200002]; +var spfunction8 = [0x10001040,0x1000,0x40000,0x10041040,0x10000000,0x10001040,0x40,0x10000000,0x40040,0x10040000,0x10041040,0x41000,0x10041000,0x41040,0x1000,0x40,0x10040000,0x10000040,0x10001000,0x1040,0x41000,0x40040,0x10040040,0x10041000,0x1040,0,0,0x10040040,0x10000040,0x10001000,0x41040,0x40000,0x41040,0x40000,0x10041000,0x1000,0x40,0x10040040,0x1000,0x41040,0x10001000,0x40,0x10000040,0x10040000,0x10040040,0x10000000,0x40000,0x10001040,0,0x10041040,0x40040,0x10000040,0x10040000,0x10001000,0x10001040,0,0x10041040,0x41000,0x41000,0x1040,0x1040,0x40040,0x10000000,0x10041000]; + +/** + * Create necessary sub keys. + * + * @param key the 64-bit or 192-bit key. + * + * @return the expanded keys. + */ +function _createKeys(key) { + var pc2bytes0 = [0,0x4,0x20000000,0x20000004,0x10000,0x10004,0x20010000,0x20010004,0x200,0x204,0x20000200,0x20000204,0x10200,0x10204,0x20010200,0x20010204], + pc2bytes1 = [0,0x1,0x100000,0x100001,0x4000000,0x4000001,0x4100000,0x4100001,0x100,0x101,0x100100,0x100101,0x4000100,0x4000101,0x4100100,0x4100101], + pc2bytes2 = [0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808,0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808], + pc2bytes3 = [0,0x200000,0x8000000,0x8200000,0x2000,0x202000,0x8002000,0x8202000,0x20000,0x220000,0x8020000,0x8220000,0x22000,0x222000,0x8022000,0x8222000], + pc2bytes4 = [0,0x40000,0x10,0x40010,0,0x40000,0x10,0x40010,0x1000,0x41000,0x1010,0x41010,0x1000,0x41000,0x1010,0x41010], + pc2bytes5 = [0,0x400,0x20,0x420,0,0x400,0x20,0x420,0x2000000,0x2000400,0x2000020,0x2000420,0x2000000,0x2000400,0x2000020,0x2000420], + pc2bytes6 = [0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002,0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002], + pc2bytes7 = [0,0x10000,0x800,0x10800,0x20000000,0x20010000,0x20000800,0x20010800,0x20000,0x30000,0x20800,0x30800,0x20020000,0x20030000,0x20020800,0x20030800], + pc2bytes8 = [0,0x40000,0,0x40000,0x2,0x40002,0x2,0x40002,0x2000000,0x2040000,0x2000000,0x2040000,0x2000002,0x2040002,0x2000002,0x2040002], + pc2bytes9 = [0,0x10000000,0x8,0x10000008,0,0x10000000,0x8,0x10000008,0x400,0x10000400,0x408,0x10000408,0x400,0x10000400,0x408,0x10000408], + pc2bytes10 = [0,0x20,0,0x20,0x100000,0x100020,0x100000,0x100020,0x2000,0x2020,0x2000,0x2020,0x102000,0x102020,0x102000,0x102020], + pc2bytes11 = [0,0x1000000,0x200,0x1000200,0x200000,0x1200000,0x200200,0x1200200,0x4000000,0x5000000,0x4000200,0x5000200,0x4200000,0x5200000,0x4200200,0x5200200], + pc2bytes12 = [0,0x1000,0x8000000,0x8001000,0x80000,0x81000,0x8080000,0x8081000,0x10,0x1010,0x8000010,0x8001010,0x80010,0x81010,0x8080010,0x8081010], + pc2bytes13 = [0,0x4,0x100,0x104,0,0x4,0x100,0x104,0x1,0x5,0x101,0x105,0x1,0x5,0x101,0x105]; + + // how many iterations (1 for des, 3 for triple des) + // changed by Paul 16/6/2007 to use Triple DES for 9+ byte keys + var iterations = key.length() > 8 ? 3 : 1; + + // stores the return keys + var keys = []; + + // now define the left shifts which need to be done + var shifts = [0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0]; + + var n = 0, tmp; + for(var j = 0; j < iterations; j++) { + var left = key.getInt32(); + var right = key.getInt32(); + + tmp = ((left >>> 4) ^ right) & 0x0f0f0f0f; + right ^= tmp; + left ^= (tmp << 4); + + tmp = ((right >>> -16) ^ left) & 0x0000ffff; + left ^= tmp; + right ^= (tmp << -16); + + tmp = ((left >>> 2) ^ right) & 0x33333333; + right ^= tmp; + left ^= (tmp << 2); + + tmp = ((right >>> -16) ^ left) & 0x0000ffff; + left ^= tmp; + right ^= (tmp << -16); + + tmp = ((left >>> 1) ^ right) & 0x55555555; + right ^= tmp; + left ^= (tmp << 1); + + tmp = ((right >>> 8) ^ left) & 0x00ff00ff; + left ^= tmp; + right ^= (tmp << 8); + + tmp = ((left >>> 1) ^ right) & 0x55555555; + right ^= tmp; + left ^= (tmp << 1); + + // right needs to be shifted and OR'd with last four bits of left + tmp = (left << 8) | ((right >>> 20) & 0x000000f0); + + // left needs to be put upside down + left = ((right << 24) | ((right << 8) & 0xff0000) | + ((right >>> 8) & 0xff00) | ((right >>> 24) & 0xf0)); + right = tmp; + + // now go through and perform these shifts on the left and right keys + for(var i = 0; i < shifts.length; ++i) { + //shift the keys either one or two bits to the left + if(shifts[i]) { + left = (left << 2) | (left >>> 26); + right = (right << 2) | (right >>> 26); + } else { + left = (left << 1) | (left >>> 27); + right = (right << 1) | (right >>> 27); + } + left &= -0xf; + right &= -0xf; + + // now apply PC-2, in such a way that E is easier when encrypting or + // decrypting this conversion will look like PC-2 except only the last 6 + // bits of each byte are used rather than 48 consecutive bits and the + // order of lines will be according to how the S selection functions will + // be applied: S2, S4, S6, S8, S1, S3, S5, S7 + var lefttmp = ( + pc2bytes0[left >>> 28] | pc2bytes1[(left >>> 24) & 0xf] | + pc2bytes2[(left >>> 20) & 0xf] | pc2bytes3[(left >>> 16) & 0xf] | + pc2bytes4[(left >>> 12) & 0xf] | pc2bytes5[(left >>> 8) & 0xf] | + pc2bytes6[(left >>> 4) & 0xf]); + var righttmp = ( + pc2bytes7[right >>> 28] | pc2bytes8[(right >>> 24) & 0xf] | + pc2bytes9[(right >>> 20) & 0xf] | pc2bytes10[(right >>> 16) & 0xf] | + pc2bytes11[(right >>> 12) & 0xf] | pc2bytes12[(right >>> 8) & 0xf] | + pc2bytes13[(right >>> 4) & 0xf]); + tmp = ((righttmp >>> 16) ^ lefttmp) & 0x0000ffff; + keys[n++] = lefttmp ^ tmp; + keys[n++] = righttmp ^ (tmp << 16); + } + } + + return keys; +} + +/** + * Updates a single block (1 byte) using DES. The update will either + * encrypt or decrypt the block. + * + * @param keys the expanded keys. + * @param input the input block (an array of 32-bit words). + * @param output the updated output block. + * @param decrypt true to decrypt the block, false to encrypt it. + */ +function _updateBlock(keys, input, output, decrypt) { + // set up loops for single or triple DES + var iterations = keys.length === 32 ? 3 : 9; + var looping; + if(iterations === 3) { + looping = decrypt ? [30, -2, -2] : [0, 32, 2]; + } else { + looping = (decrypt ? + [94, 62, -2, 32, 64, 2, 30, -2, -2] : + [0, 32, 2, 62, 30, -2, 64, 96, 2]); + } + + var tmp; + + var left = input[0]; + var right = input[1]; + + // first each 64 bit chunk of the message must be permuted according to IP + tmp = ((left >>> 4) ^ right) & 0x0f0f0f0f; + right ^= tmp; + left ^= (tmp << 4); + + tmp = ((left >>> 16) ^ right) & 0x0000ffff; + right ^= tmp; + left ^= (tmp << 16); + + tmp = ((right >>> 2) ^ left) & 0x33333333; + left ^= tmp; + right ^= (tmp << 2); + + tmp = ((right >>> 8) ^ left) & 0x00ff00ff; + left ^= tmp; + right ^= (tmp << 8); + + tmp = ((left >>> 1) ^ right) & 0x55555555; + right ^= tmp; + left ^= (tmp << 1); + + // rotate left 1 bit + left = ((left << 1) | (left >>> 31)); + right = ((right << 1) | (right >>> 31)); + + for(var j = 0; j < iterations; j += 3) { + var endloop = looping[j + 1]; + var loopinc = looping[j + 2]; + + // now go through and perform the encryption or decryption + for(var i = looping[j]; i != endloop; i += loopinc) { + var right1 = right ^ keys[i]; + var right2 = ((right >>> 4) | (right << 28)) ^ keys[i + 1]; + + // passing these bytes through the S selection functions + tmp = left; + left = right; + right = tmp ^ ( + spfunction2[(right1 >>> 24) & 0x3f] | + spfunction4[(right1 >>> 16) & 0x3f] | + spfunction6[(right1 >>> 8) & 0x3f] | + spfunction8[right1 & 0x3f] | + spfunction1[(right2 >>> 24) & 0x3f] | + spfunction3[(right2 >>> 16) & 0x3f] | + spfunction5[(right2 >>> 8) & 0x3f] | + spfunction7[right2 & 0x3f]); + } + // unreverse left and right + tmp = left; + left = right; + right = tmp; + } + + // rotate right 1 bit + left = ((left >>> 1) | (left << 31)); + right = ((right >>> 1) | (right << 31)); + + // now perform IP-1, which is IP in the opposite direction + tmp = ((left >>> 1) ^ right) & 0x55555555; + right ^= tmp; + left ^= (tmp << 1); + + tmp = ((right >>> 8) ^ left) & 0x00ff00ff; + left ^= tmp; + right ^= (tmp << 8); + + tmp = ((right >>> 2) ^ left) & 0x33333333; + left ^= tmp; + right ^= (tmp << 2); + + tmp = ((left >>> 16) ^ right) & 0x0000ffff; + right ^= tmp; + left ^= (tmp << 16); + + tmp = ((left >>> 4) ^ right) & 0x0f0f0f0f; + right ^= tmp; + left ^= (tmp << 4); + + output[0] = left; + output[1] = right; +} + +/** + * Deprecated. Instead, use: + * + * forge.cipher.createCipher('DES-', key); + * forge.cipher.createDecipher('DES-', key); + * + * Creates a deprecated DES cipher object. This object's mode will default to + * CBC (cipher-block-chaining). + * + * The key may be given as a binary-encoded string of bytes or a byte buffer. + * + * @param options the options to use. + * key the symmetric key to use (64 or 192 bits). + * output the buffer to write to. + * decrypt true for decryption, false for encryption. + * mode the cipher mode to use (default: 'CBC'). + * + * @return the cipher. + */ +function _createCipher(options) { + options = options || {}; + var mode = (options.mode || 'CBC').toUpperCase(); + var algorithm = 'DES-' + mode; + + var cipher; + if(options.decrypt) { + cipher = forge.cipher.createDecipher(algorithm, options.key); + } else { + cipher = forge.cipher.createCipher(algorithm, options.key); + } + + // backwards compatible start API + var start = cipher.start; + cipher.start = function(iv, options) { + // backwards compatibility: support second arg as output buffer + var output = null; + if(options instanceof forge.util.ByteBuffer) { + output = options; + options = {}; + } + options = options || {}; + options.output = output; + options.iv = iv; + start.call(cipher, options); + }; + + return cipher; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 72177: +======= +/***/ 96630: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +/** + * Node.js module for Forge. + * + * @author Dave Longley + * + * Copyright 2011-2016 Digital Bazaar, Inc. + */ +module.exports = { + // default options + options: { + usePureJavaScript: false + } +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 8209: +======= +/***/ 46773: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Hash-based Message Authentication Code implementation. Requires a message + * digest object that can be obtained, for example, from forge.md.sha1 or + * forge.md.md5. + * + * @author Dave Longley + * + * Copyright (c) 2010-2012 Digital Bazaar, Inc. All rights reserved. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(2439); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(80554); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/* HMAC API */ +var hmac = module.exports = forge.hmac = forge.hmac || {}; + +/** + * Creates an HMAC object that uses the given message digest object. + * + * @return an HMAC object. + */ +hmac.create = function() { + // the hmac key to use + var _key = null; + + // the message digest to use + var _md = null; + + // the inner padding + var _ipadding = null; + + // the outer padding + var _opadding = null; + + // hmac context + var ctx = {}; + + /** + * Starts or restarts the HMAC with the given key and message digest. + * + * @param md the message digest to use, null to reuse the previous one, + * a string to use builtin 'sha1', 'md5', 'sha256'. + * @param key the key to use as a string, array of bytes, byte buffer, + * or null to reuse the previous key. + */ + ctx.start = function(md, key) { + if(md !== null) { + if(typeof md === 'string') { + // create builtin message digest + md = md.toLowerCase(); + if(md in forge.md.algorithms) { + _md = forge.md.algorithms[md].create(); + } else { + throw new Error('Unknown hash algorithm "' + md + '"'); + } + } else { + // store message digest + _md = md; + } + } + + if(key === null) { + // reuse previous key + key = _key; + } else { + if(typeof key === 'string') { + // convert string into byte buffer + key = forge.util.createBuffer(key); + } else if(forge.util.isArray(key)) { + // convert byte array into byte buffer + var tmp = key; + key = forge.util.createBuffer(); + for(var i = 0; i < tmp.length; ++i) { + key.putByte(tmp[i]); + } + } + + // if key is longer than blocksize, hash it + var keylen = key.length(); + if(keylen > _md.blockLength) { + _md.start(); + _md.update(key.bytes()); + key = _md.digest(); + } + + // mix key into inner and outer padding + // ipadding = [0x36 * blocksize] ^ key + // opadding = [0x5C * blocksize] ^ key + _ipadding = forge.util.createBuffer(); + _opadding = forge.util.createBuffer(); + keylen = key.length(); + for(var i = 0; i < keylen; ++i) { + var tmp = key.at(i); + _ipadding.putByte(0x36 ^ tmp); + _opadding.putByte(0x5C ^ tmp); + } + + // if key is shorter than blocksize, add additional padding + if(keylen < _md.blockLength) { + var tmp = _md.blockLength - keylen; + for(var i = 0; i < tmp; ++i) { + _ipadding.putByte(0x36); + _opadding.putByte(0x5C); + } + } + _key = key; + _ipadding = _ipadding.bytes(); + _opadding = _opadding.bytes(); + } + + // digest is done like so: hash(opadding | hash(ipadding | message)) + + // prepare to do inner hash + // hash(ipadding | message) + _md.start(); + _md.update(_ipadding); + }; + + /** + * Updates the HMAC with the given message bytes. + * + * @param bytes the bytes to update with. + */ + ctx.update = function(bytes) { + _md.update(bytes); + }; + + /** + * Produces the Message Authentication Code (MAC). + * + * @return a byte buffer containing the digest value. + */ + ctx.getMac = function() { + // digest is done like so: hash(opadding | hash(ipadding | message)) + // here we do the outer hashing + var inner = _md.digest().bytes(); + _md.start(); + _md.update(_opadding); + _md.update(inner); + return _md.digest(); + }; + // alias for getMac + ctx.digest = ctx.getMac; + + return ctx; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 21686: +======= +/***/ 121: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Copyright (c) 2005 Tom Wu +// All Rights Reserved. +// See "LICENSE" for details. + +// Basic JavaScript BN library - subset useful for RSA encryption. + +/* +Licensing (LICENSE) +------------------- + +This software is covered under the following copyright: +*/ +/* + * Copyright (c) 2003-2005 Tom Wu + * All Rights Reserved. + * + * 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" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, + * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF + * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT + * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * In addition, the following condition applies: + * + * All redistributions must retain an intact copy of this copyright notice + * and disclaimer. + */ +/* +Address all questions regarding this license to: + + Tom Wu + tjw@cs.Stanford.EDU +*/ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +======= +var forge = __nccwpck_require__(96630); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = forge.jsbn = forge.jsbn || {}; + +// Bits per digit +var dbits; + +// JavaScript engine analysis +var canary = 0xdeadbeefcafe; +var j_lm = ((canary&0xffffff)==0xefcafe); + +// (public) Constructor +function BigInteger(a,b,c) { + this.data = []; + if(a != null) + if("number" == typeof a) this.fromNumber(a,b,c); + else if(b == null && "string" != typeof a) this.fromString(a,256); + else this.fromString(a,b); +} +forge.jsbn.BigInteger = BigInteger; + +// return new, unset BigInteger +function nbi() { return new BigInteger(null); } + +// am: Compute w_j += (x*this_i), propagate carries, +// c is initial carry, returns final carry. +// c < 3*dvalue, x < 2*dvalue, this_i < dvalue +// We need to select the fastest one that works in this environment. + +// am1: use a single mult and divide to get the high bits, +// max digit bits should be 26 because +// max internal value = 2*dvalue^2-2*dvalue (< 2^53) +function am1(i,x,w,j,c,n) { + while(--n >= 0) { + var v = x*this.data[i++]+w.data[j]+c; + c = Math.floor(v/0x4000000); + w.data[j++] = v&0x3ffffff; + } + return c; +} +// am2 avoids a big mult-and-extract completely. +// Max digit bits should be <= 30 because we do bitwise ops +// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) +function am2(i,x,w,j,c,n) { + var xl = x&0x7fff, xh = x>>15; + while(--n >= 0) { + var l = this.data[i]&0x7fff; + var h = this.data[i++]>>15; + var m = xh*l+h*xl; + l = xl*l+((m&0x7fff)<<15)+w.data[j]+(c&0x3fffffff); + c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); + w.data[j++] = l&0x3fffffff; + } + return c; +} +// Alternately, set max digit bits to 28 since some +// browsers slow down when dealing with 32-bit numbers. +function am3(i,x,w,j,c,n) { + var xl = x&0x3fff, xh = x>>14; + while(--n >= 0) { + var l = this.data[i]&0x3fff; + var h = this.data[i++]>>14; + var m = xh*l+h*xl; + l = xl*l+((m&0x3fff)<<14)+w.data[j]+c; + c = (l>>28)+(m>>14)+xh*h; + w.data[j++] = l&0xfffffff; + } + return c; +} + +// node.js (no browser) +if(typeof(navigator) === 'undefined') +{ + BigInteger.prototype.am = am3; + dbits = 28; +} else if(j_lm && (navigator.appName == "Microsoft Internet Explorer")) { + BigInteger.prototype.am = am2; + dbits = 30; +} else if(j_lm && (navigator.appName != "Netscape")) { + BigInteger.prototype.am = am1; + dbits = 26; +} else { // Mozilla/Netscape seems to prefer am3 + BigInteger.prototype.am = am3; + dbits = 28; +} + +BigInteger.prototype.DB = dbits; +BigInteger.prototype.DM = ((1<= 0; --i) r.data[i] = this.data[i]; + r.t = this.t; + r.s = this.s; +} + +// (protected) set from integer value x, -DV <= x < DV +function bnpFromInt(x) { + this.t = 1; + this.s = (x<0)?-1:0; + if(x > 0) this.data[0] = x; + else if(x < -1) this.data[0] = x+this.DV; + else this.t = 0; +} + +// return bigint initialized to value +function nbv(i) { var r = nbi(); r.fromInt(i); return r; } + +// (protected) set from string and radix +function bnpFromString(s,b) { + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 256) k = 8; // byte array + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else { this.fromRadix(s,b); return; } + this.t = 0; + this.s = 0; + var i = s.length, mi = false, sh = 0; + while(--i >= 0) { + var x = (k==8)?s[i]&0xff:intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-") mi = true; + continue; + } + mi = false; + if(sh == 0) + this.data[this.t++] = x; + else if(sh+k > this.DB) { + this.data[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); + } else + this.data[this.t-1] |= x<= this.DB) sh -= this.DB; + } + if(k == 8 && (s[0]&0x80) != 0) { + this.s = -1; + if(sh > 0) this.data[this.t-1] |= ((1<<(this.DB-sh))-1)< 0 && this.data[this.t-1] == c) --this.t; +} + +// (public) return string representation in given radix +function bnToString(b) { + if(this.s < 0) return "-"+this.negate().toString(b); + var k; + if(b == 16) k = 4; + else if(b == 8) k = 3; + else if(b == 2) k = 1; + else if(b == 32) k = 5; + else if(b == 4) k = 2; + else return this.toRadix(b); + var km = (1< 0) { + if(p < this.DB && (d = this.data[i]>>p) > 0) { m = true; r = int2char(d); } + while(i >= 0) { + if(p < k) { + d = (this.data[i]&((1<>(p+=this.DB-k); + } else { + d = (this.data[i]>>(p-=k))&km; + if(p <= 0) { p += this.DB; --i; } + } + if(d > 0) m = true; + if(m) r += int2char(d); + } + } + return m?r:"0"; +} + +// (public) -this +function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } + +// (public) |this| +function bnAbs() { return (this.s<0)?this.negate():this; } + +// (public) return + if this > a, - if this < a, 0 if equal +function bnCompareTo(a) { + var r = this.s-a.s; + if(r != 0) return r; + var i = this.t; + r = i-a.t; + if(r != 0) return (this.s<0)?-r:r; + while(--i >= 0) if((r=this.data[i]-a.data[i]) != 0) return r; + return 0; +} + +// returns bit length of the integer x +function nbits(x) { + var r = 1, t; + if((t=x>>>16) != 0) { x = t; r += 16; } + if((t=x>>8) != 0) { x = t; r += 8; } + if((t=x>>4) != 0) { x = t; r += 4; } + if((t=x>>2) != 0) { x = t; r += 2; } + if((t=x>>1) != 0) { x = t; r += 1; } + return r; +} + +// (public) return the number of bits in "this" +function bnBitLength() { + if(this.t <= 0) return 0; + return this.DB*(this.t-1)+nbits(this.data[this.t-1]^(this.s&this.DM)); +} + +// (protected) r = this << n*DB +function bnpDLShiftTo(n,r) { + var i; + for(i = this.t-1; i >= 0; --i) r.data[i+n] = this.data[i]; + for(i = n-1; i >= 0; --i) r.data[i] = 0; + r.t = this.t+n; + r.s = this.s; +} + +// (protected) r = this >> n*DB +function bnpDRShiftTo(n,r) { + for(var i = n; i < this.t; ++i) r.data[i-n] = this.data[i]; + r.t = Math.max(this.t-n,0); + r.s = this.s; +} + +// (protected) r = this << n +function bnpLShiftTo(n,r) { + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<= 0; --i) { + r.data[i+ds+1] = (this.data[i]>>cbs)|c; + c = (this.data[i]&bm)<= 0; --i) r.data[i] = 0; + r.data[ds] = c; + r.t = this.t+ds+1; + r.s = this.s; + r.clamp(); +} + +// (protected) r = this >> n +function bnpRShiftTo(n,r) { + r.s = this.s; + var ds = Math.floor(n/this.DB); + if(ds >= this.t) { r.t = 0; return; } + var bs = n%this.DB; + var cbs = this.DB-bs; + var bm = (1<>bs; + for(var i = ds+1; i < this.t; ++i) { + r.data[i-ds-1] |= (this.data[i]&bm)<>bs; + } + if(bs > 0) r.data[this.t-ds-1] |= (this.s&bm)<>= this.DB; + } + if(a.t < this.t) { + c -= a.s; + while(i < this.t) { + c += this.data[i]; + r.data[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; + } else { + c += this.s; + while(i < a.t) { + c -= a.data[i]; + r.data[i++] = c&this.DM; + c >>= this.DB; + } + c -= a.s; + } + r.s = (c<0)?-1:0; + if(c < -1) r.data[i++] = this.DV+c; + else if(c > 0) r.data[i++] = c; + r.t = i; + r.clamp(); +} + +// (protected) r = this * a, r != this,a (HAC 14.12) +// "this" should be the larger one if appropriate. +function bnpMultiplyTo(a,r) { + var x = this.abs(), y = a.abs(); + var i = x.t; + r.t = i+y.t; + while(--i >= 0) r.data[i] = 0; + for(i = 0; i < y.t; ++i) r.data[i+x.t] = x.am(0,y.data[i],r,i,0,x.t); + r.s = 0; + r.clamp(); + if(this.s != a.s) BigInteger.ZERO.subTo(r,r); +} + +// (protected) r = this^2, r != this (HAC 14.16) +function bnpSquareTo(r) { + var x = this.abs(); + var i = r.t = 2*x.t; + while(--i >= 0) r.data[i] = 0; + for(i = 0; i < x.t-1; ++i) { + var c = x.am(i,x.data[i],r,2*i,0,1); + if((r.data[i+x.t]+=x.am(i+1,2*x.data[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { + r.data[i+x.t] -= x.DV; + r.data[i+x.t+1] = 1; + } + } + if(r.t > 0) r.data[r.t-1] += x.am(i,x.data[i],r,2*i,0,1); + r.s = 0; + r.clamp(); +} + +// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) +// r != q, this != m. q or r may be null. +function bnpDivRemTo(m,q,r) { + var pm = m.abs(); + if(pm.t <= 0) return; + var pt = this.abs(); + if(pt.t < pm.t) { + if(q != null) q.fromInt(0); + if(r != null) this.copyTo(r); + return; + } + if(r == null) r = nbi(); + var y = nbi(), ts = this.s, ms = m.s; + var nsh = this.DB-nbits(pm.data[pm.t-1]); // normalize modulus + if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } else { pm.copyTo(y); pt.copyTo(r); } + var ys = y.t; + var y0 = y.data[ys-1]; + if(y0 == 0) return; + var yt = y0*(1<1)?y.data[ys-2]>>this.F2:0); + var d1 = this.FV/yt, d2 = (1<= 0) { + r.data[r.t++] = 1; + r.subTo(t,r); + } + BigInteger.ONE.dlShiftTo(ys,t); + t.subTo(y,y); // "negative" y so we can replace sub with am later + while(y.t < ys) y.data[y.t++] = 0; + while(--j >= 0) { + // Estimate quotient digit + var qd = (r.data[--i]==y0)?this.DM:Math.floor(r.data[i]*d1+(r.data[i-1]+e)*d2); + if((r.data[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out + y.dlShiftTo(j,t); + r.subTo(t,r); + while(r.data[i] < --qd) r.subTo(t,r); + } + } + if(q != null) { + r.drShiftTo(ys,q); + if(ts != ms) BigInteger.ZERO.subTo(q,q); + } + r.t = ys; + r.clamp(); + if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder + if(ts < 0) BigInteger.ZERO.subTo(r,r); +} + +// (public) this mod a +function bnMod(a) { + var r = nbi(); + this.abs().divRemTo(a,null,r); + if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); + return r; +} + +// Modular reduction using "classic" algorithm +function Classic(m) { this.m = m; } +function cConvert(x) { + if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); + else return x; +} +function cRevert(x) { return x; } +function cReduce(x) { x.divRemTo(this.m,null,x); } +function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } +function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + +Classic.prototype.convert = cConvert; +Classic.prototype.revert = cRevert; +Classic.prototype.reduce = cReduce; +Classic.prototype.mulTo = cMulTo; +Classic.prototype.sqrTo = cSqrTo; + +// (protected) return "-1/this % 2^DB"; useful for Mont. reduction +// justification: +// xy == 1 (mod m) +// xy = 1+km +// xy(2-xy) = (1+km)(1-km) +// x[y(2-xy)] = 1-k^2m^2 +// x[y(2-xy)] == 1 (mod m^2) +// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 +// should reduce x and y(2-xy) by m^2 at each step to keep size bounded. +// JS multiply "overflows" differently from C/C++, so care is needed here. +function bnpInvDigit() { + if(this.t < 1) return 0; + var x = this.data[0]; + if((x&1) == 0) return 0; + var y = x&3; // y == 1/x mod 2^2 + y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 + y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 + y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 + // last step - calculate inverse mod DV directly; + // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints + y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits + // we really want the negative inverse, and -DV < y < DV + return (y>0)?this.DV-y:-y; +} + +// Montgomery reduction +function Montgomery(m) { + this.m = m; + this.mp = m.invDigit(); + this.mpl = this.mp&0x7fff; + this.mph = this.mp>>15; + this.um = (1<<(m.DB-15))-1; + this.mt2 = 2*m.t; +} + +// xR mod m +function montConvert(x) { + var r = nbi(); + x.abs().dlShiftTo(this.m.t,r); + r.divRemTo(this.m,null,r); + if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); + return r; +} + +// x/R mod m +function montRevert(x) { + var r = nbi(); + x.copyTo(r); + this.reduce(r); + return r; +} + +// x = x/R mod m (HAC 14.32) +function montReduce(x) { + while(x.t <= this.mt2) // pad x so am has enough room later + x.data[x.t++] = 0; + for(var i = 0; i < this.m.t; ++i) { + // faster way of calculating u0 = x.data[i]*mp mod DV + var j = x.data[i]&0x7fff; + var u0 = (j*this.mpl+(((j*this.mph+(x.data[i]>>15)*this.mpl)&this.um)<<15))&x.DM; + // use am to combine the multiply-shift-add into one call + j = i+this.m.t; + x.data[j] += this.m.am(0,u0,x,i,0,this.m.t); + // propagate carry + while(x.data[j] >= x.DV) { x.data[j] -= x.DV; x.data[++j]++; } + } + x.clamp(); + x.drShiftTo(this.m.t,x); + if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); +} + +// r = "x^2/R mod m"; x != r +function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + +// r = "xy/R mod m"; x,y != r +function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + +Montgomery.prototype.convert = montConvert; +Montgomery.prototype.revert = montRevert; +Montgomery.prototype.reduce = montReduce; +Montgomery.prototype.mulTo = montMulTo; +Montgomery.prototype.sqrTo = montSqrTo; + +// (protected) true iff this is even +function bnpIsEven() { return ((this.t>0)?(this.data[0]&1):this.s) == 0; } + +// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) +function bnpExp(e,z) { + if(e > 0xffffffff || e < 1) return BigInteger.ONE; + var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; + g.copyTo(r); + while(--i >= 0) { + z.sqrTo(r,r2); + if((e&(1< 0) z.mulTo(r2,g,r); + else { var t = r; r = r2; r2 = t; } + } + return z.revert(r); +} + +// (public) this^e % m, 0 <= e < 2^32 +function bnModPowInt(e,m) { + var z; + if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); + return this.exp(e,z); +} + +// protected +BigInteger.prototype.copyTo = bnpCopyTo; +BigInteger.prototype.fromInt = bnpFromInt; +BigInteger.prototype.fromString = bnpFromString; +BigInteger.prototype.clamp = bnpClamp; +BigInteger.prototype.dlShiftTo = bnpDLShiftTo; +BigInteger.prototype.drShiftTo = bnpDRShiftTo; +BigInteger.prototype.lShiftTo = bnpLShiftTo; +BigInteger.prototype.rShiftTo = bnpRShiftTo; +BigInteger.prototype.subTo = bnpSubTo; +BigInteger.prototype.multiplyTo = bnpMultiplyTo; +BigInteger.prototype.squareTo = bnpSquareTo; +BigInteger.prototype.divRemTo = bnpDivRemTo; +BigInteger.prototype.invDigit = bnpInvDigit; +BigInteger.prototype.isEven = bnpIsEven; +BigInteger.prototype.exp = bnpExp; + +// public +BigInteger.prototype.toString = bnToString; +BigInteger.prototype.negate = bnNegate; +BigInteger.prototype.abs = bnAbs; +BigInteger.prototype.compareTo = bnCompareTo; +BigInteger.prototype.bitLength = bnBitLength; +BigInteger.prototype.mod = bnMod; +BigInteger.prototype.modPowInt = bnModPowInt; + +// "constants" +BigInteger.ZERO = nbv(0); +BigInteger.ONE = nbv(1); + +// jsbn2 lib + +//Copyright (c) 2005-2009 Tom Wu +//All Rights Reserved. +//See "LICENSE" for details (See jsbn.js for LICENSE). + +//Extended JavaScript BN functions, required for RSA private ops. + +//Version 1.1: new BigInteger("0", 10) returns "proper" zero + +//(public) +function bnClone() { var r = nbi(); this.copyTo(r); return r; } + +//(public) return value as integer +function bnIntValue() { +if(this.s < 0) { + if(this.t == 1) return this.data[0]-this.DV; + else if(this.t == 0) return -1; +} else if(this.t == 1) return this.data[0]; +else if(this.t == 0) return 0; +// assumes 16 < DB < 32 +return ((this.data[1]&((1<<(32-this.DB))-1))<>24; } + +//(public) return value as short (assumes DB>=16) +function bnShortValue() { return (this.t==0)?this.s:(this.data[0]<<16)>>16; } + +//(protected) return x s.t. r^x < DV +function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } + +//(public) 0 if this == 0, 1 if this > 0 +function bnSigNum() { +if(this.s < 0) return -1; +else if(this.t <= 0 || (this.t == 1 && this.data[0] <= 0)) return 0; +else return 1; +} + +//(protected) convert to radix string +function bnpToRadix(b) { +if(b == null) b = 10; +if(this.signum() == 0 || b < 2 || b > 36) return "0"; +var cs = this.chunkSize(b); +var a = Math.pow(b,cs); +var d = nbv(a), y = nbi(), z = nbi(), r = ""; +this.divRemTo(d,y,z); +while(y.signum() > 0) { + r = (a+z.intValue()).toString(b).substr(1) + r; + y.divRemTo(d,y,z); +} +return z.intValue().toString(b) + r; +} + +//(protected) convert from radix string +function bnpFromRadix(s,b) { +this.fromInt(0); +if(b == null) b = 10; +var cs = this.chunkSize(b); +var d = Math.pow(b,cs), mi = false, j = 0, w = 0; +for(var i = 0; i < s.length; ++i) { + var x = intAt(s,i); + if(x < 0) { + if(s.charAt(i) == "-" && this.signum() == 0) mi = true; + continue; + } + w = b*w+x; + if(++j >= cs) { + this.dMultiply(d); + this.dAddOffset(w,0); + j = 0; + w = 0; + } +} +if(j > 0) { + this.dMultiply(Math.pow(b,j)); + this.dAddOffset(w,0); +} +if(mi) BigInteger.ZERO.subTo(this,this); +} + +//(protected) alternate constructor +function bnpFromNumber(a,b,c) { +if("number" == typeof b) { + // new BigInteger(int,int,RNG) + if(a < 2) this.fromInt(1); + else { + this.fromNumber(a,c); + if(!this.testBit(a-1)) // force MSB set + this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); + if(this.isEven()) this.dAddOffset(1,0); // force odd + while(!this.isProbablePrime(b)) { + this.dAddOffset(2,0); + if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); + } + } +} else { + // new BigInteger(int,RNG) + var x = new Array(), t = a&7; + x.length = (a>>3)+1; + b.nextBytes(x); + if(t > 0) x[0] &= ((1< 0) { + if(p < this.DB && (d = this.data[i]>>p) != (this.s&this.DM)>>p) + r[k++] = d|(this.s<<(this.DB-p)); + while(i >= 0) { + if(p < 8) { + d = (this.data[i]&((1<>(p+=this.DB-8); + } else { + d = (this.data[i]>>(p-=8))&0xff; + if(p <= 0) { p += this.DB; --i; } + } + if((d&0x80) != 0) d |= -256; + if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; + if(k > 0 || d != this.s) r[k++] = d; + } +} +return r; +} + +function bnEquals(a) { return(this.compareTo(a)==0); } +function bnMin(a) { return(this.compareTo(a)<0)?this:a; } +function bnMax(a) { return(this.compareTo(a)>0)?this:a; } + +//(protected) r = this op a (bitwise) +function bnpBitwiseTo(a,op,r) { +var i, f, m = Math.min(a.t,this.t); +for(i = 0; i < m; ++i) r.data[i] = op(this.data[i],a.data[i]); +if(a.t < this.t) { + f = a.s&this.DM; + for(i = m; i < this.t; ++i) r.data[i] = op(this.data[i],f); + r.t = this.t; +} else { + f = this.s&this.DM; + for(i = m; i < a.t; ++i) r.data[i] = op(f,a.data[i]); + r.t = a.t; +} +r.s = op(this.s,a.s); +r.clamp(); +} + +//(public) this & a +function op_and(x,y) { return x&y; } +function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } + +//(public) this | a +function op_or(x,y) { return x|y; } +function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } + +//(public) this ^ a +function op_xor(x,y) { return x^y; } +function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } + +//(public) this & ~a +function op_andnot(x,y) { return x&~y; } +function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } + +//(public) ~this +function bnNot() { +var r = nbi(); +for(var i = 0; i < this.t; ++i) r.data[i] = this.DM&~this.data[i]; +r.t = this.t; +r.s = ~this.s; +return r; +} + +//(public) this << n +function bnShiftLeft(n) { +var r = nbi(); +if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); +return r; +} + +//(public) this >> n +function bnShiftRight(n) { +var r = nbi(); +if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); +return r; +} + +//return index of lowest 1-bit in x, x < 2^31 +function lbit(x) { +if(x == 0) return -1; +var r = 0; +if((x&0xffff) == 0) { x >>= 16; r += 16; } +if((x&0xff) == 0) { x >>= 8; r += 8; } +if((x&0xf) == 0) { x >>= 4; r += 4; } +if((x&3) == 0) { x >>= 2; r += 2; } +if((x&1) == 0) ++r; +return r; +} + +//(public) returns index of lowest 1-bit (or -1 if none) +function bnGetLowestSetBit() { +for(var i = 0; i < this.t; ++i) + if(this.data[i] != 0) return i*this.DB+lbit(this.data[i]); +if(this.s < 0) return this.t*this.DB; +return -1; +} + +//return number of 1 bits in x +function cbit(x) { +var r = 0; +while(x != 0) { x &= x-1; ++r; } +return r; +} + +//(public) return number of set bits +function bnBitCount() { +var r = 0, x = this.s&this.DM; +for(var i = 0; i < this.t; ++i) r += cbit(this.data[i]^x); +return r; +} + +//(public) true iff nth bit is set +function bnTestBit(n) { +var j = Math.floor(n/this.DB); +if(j >= this.t) return(this.s!=0); +return((this.data[j]&(1<<(n%this.DB)))!=0); +} + +//(protected) this op (1<>= this.DB; +} +if(a.t < this.t) { + c += a.s; + while(i < this.t) { + c += this.data[i]; + r.data[i++] = c&this.DM; + c >>= this.DB; + } + c += this.s; +} else { + c += this.s; + while(i < a.t) { + c += a.data[i]; + r.data[i++] = c&this.DM; + c >>= this.DB; + } + c += a.s; +} +r.s = (c<0)?-1:0; +if(c > 0) r.data[i++] = c; +else if(c < -1) r.data[i++] = this.DV+c; +r.t = i; +r.clamp(); +} + +//(public) this + a +function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } + +//(public) this - a +function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } + +//(public) this * a +function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } + +//(public) this / a +function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } + +//(public) this % a +function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } + +//(public) [this/a,this%a] +function bnDivideAndRemainder(a) { +var q = nbi(), r = nbi(); +this.divRemTo(a,q,r); +return new Array(q,r); +} + +//(protected) this *= n, this >= 0, 1 < n < DV +function bnpDMultiply(n) { +this.data[this.t] = this.am(0,n-1,this,0,0,this.t); +++this.t; +this.clamp(); +} + +//(protected) this += n << w words, this >= 0 +function bnpDAddOffset(n,w) { +if(n == 0) return; +while(this.t <= w) this.data[this.t++] = 0; +this.data[w] += n; +while(this.data[w] >= this.DV) { + this.data[w] -= this.DV; + if(++w >= this.t) this.data[this.t++] = 0; + ++this.data[w]; +} +} + +//A "null" reducer +function NullExp() {} +function nNop(x) { return x; } +function nMulTo(x,y,r) { x.multiplyTo(y,r); } +function nSqrTo(x,r) { x.squareTo(r); } + +NullExp.prototype.convert = nNop; +NullExp.prototype.revert = nNop; +NullExp.prototype.mulTo = nMulTo; +NullExp.prototype.sqrTo = nSqrTo; + +//(public) this^e +function bnPow(e) { return this.exp(e,new NullExp()); } + +//(protected) r = lower n words of "this * a", a.t <= n +//"this" should be the larger one if appropriate. +function bnpMultiplyLowerTo(a,n,r) { +var i = Math.min(this.t+a.t,n); +r.s = 0; // assumes a,this >= 0 +r.t = i; +while(i > 0) r.data[--i] = 0; +var j; +for(j = r.t-this.t; i < j; ++i) r.data[i+this.t] = this.am(0,a.data[i],r,i,0,this.t); +for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a.data[i],r,i,0,n-i); +r.clamp(); +} + +//(protected) r = "this * a" without lower n words, n > 0 +//"this" should be the larger one if appropriate. +function bnpMultiplyUpperTo(a,n,r) { +--n; +var i = r.t = this.t+a.t-n; +r.s = 0; // assumes a,this >= 0 +while(--i >= 0) r.data[i] = 0; +for(i = Math.max(n-this.t,0); i < a.t; ++i) + r.data[this.t+i-n] = this.am(n-i,a.data[i],r,0,0,this.t+i-n); +r.clamp(); +r.drShiftTo(1,r); +} + +//Barrett modular reduction +function Barrett(m) { +// setup Barrett +this.r2 = nbi(); +this.q3 = nbi(); +BigInteger.ONE.dlShiftTo(2*m.t,this.r2); +this.mu = this.r2.divide(m); +this.m = m; +} + +function barrettConvert(x) { +if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); +else if(x.compareTo(this.m) < 0) return x; +else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } +} + +function barrettRevert(x) { return x; } + +//x = x mod m (HAC 14.42) +function barrettReduce(x) { +x.drShiftTo(this.m.t-1,this.r2); +if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } +this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); +this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); +while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); +x.subTo(this.r2,x); +while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); +} + +//r = x^2 mod m; x != r +function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + +//r = x*y mod m; x,y != r +function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } + +Barrett.prototype.convert = barrettConvert; +Barrett.prototype.revert = barrettRevert; +Barrett.prototype.reduce = barrettReduce; +Barrett.prototype.mulTo = barrettMulTo; +Barrett.prototype.sqrTo = barrettSqrTo; + +//(public) this^e % m (HAC 14.85) +function bnModPow(e,m) { +var i = e.bitLength(), k, r = nbv(1), z; +if(i <= 0) return r; +else if(i < 18) k = 1; +else if(i < 48) k = 3; +else if(i < 144) k = 4; +else if(i < 768) k = 5; +else k = 6; +if(i < 8) + z = new Classic(m); +else if(m.isEven()) + z = new Barrett(m); +else + z = new Montgomery(m); + +// precomputation +var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { + var g2 = nbi(); + z.sqrTo(g[1],g2); + while(n <= km) { + g[n] = nbi(); + z.mulTo(g2,g[n-2],g[n]); + n += 2; + } +} + +var j = e.t-1, w, is1 = true, r2 = nbi(), t; +i = nbits(e.data[j])-1; +while(j >= 0) { + if(i >= k1) w = (e.data[j]>>(i-k1))&km; + else { + w = (e.data[j]&((1<<(i+1))-1))<<(k1-i); + if(j > 0) w |= e.data[j-1]>>(this.DB+i-k1); + } + + n = k; + while((w&1) == 0) { w >>= 1; --n; } + if((i -= n) < 0) { i += this.DB; --j; } + if(is1) { // ret == 1, don't bother squaring or multiplying it + g[w].copyTo(r); + is1 = false; + } else { + while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } + if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } + z.mulTo(r2,g[w],r); + } + + while(j >= 0 && (e.data[j]&(1< 0) { + x.rShiftTo(g,x); + y.rShiftTo(g,y); +} +while(x.signum() > 0) { + if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); + if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); + if(x.compareTo(y) >= 0) { + x.subTo(y,x); + x.rShiftTo(1,x); + } else { + y.subTo(x,y); + y.rShiftTo(1,y); + } +} +if(g > 0) y.lShiftTo(g,y); +return y; +} + +//(protected) this % n, n < 2^26 +function bnpModInt(n) { +if(n <= 0) return 0; +var d = this.DV%n, r = (this.s<0)?n-1:0; +if(this.t > 0) + if(d == 0) r = this.data[0]%n; + else for(var i = this.t-1; i >= 0; --i) r = (d*r+this.data[i])%n; +return r; +} + +//(public) 1/this % m (HAC 14.61) +function bnModInverse(m) { +var ac = m.isEven(); +if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; +var u = m.clone(), v = this.clone(); +var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); +while(u.signum() != 0) { + while(u.isEven()) { + u.rShiftTo(1,u); + if(ac) { + if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } + a.rShiftTo(1,a); + } else if(!b.isEven()) b.subTo(m,b); + b.rShiftTo(1,b); + } + while(v.isEven()) { + v.rShiftTo(1,v); + if(ac) { + if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } + c.rShiftTo(1,c); + } else if(!d.isEven()) d.subTo(m,d); + d.rShiftTo(1,d); + } + if(u.compareTo(v) >= 0) { + u.subTo(v,u); + if(ac) a.subTo(c,a); + b.subTo(d,b); + } else { + v.subTo(u,v); + if(ac) c.subTo(a,c); + d.subTo(b,d); + } +} +if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; +if(d.compareTo(m) >= 0) return d.subtract(m); +if(d.signum() < 0) d.addTo(m,d); else return d; +if(d.signum() < 0) return d.add(m); else return d; +} + +var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509]; +var lplim = (1<<26)/lowprimes[lowprimes.length-1]; + +//(public) test primality with certainty >= 1-.5^t +function bnIsProbablePrime(t) { +var i, x = this.abs(); +if(x.t == 1 && x.data[0] <= lowprimes[lowprimes.length-1]) { + for(i = 0; i < lowprimes.length; ++i) + if(x.data[0] == lowprimes[i]) return true; + return false; +} +if(x.isEven()) return false; +i = 1; +while(i < lowprimes.length) { + var m = lowprimes[i], j = i+1; + while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; + m = x.modInt(m); + while(i < j) if(m%lowprimes[i++] == 0) return false; +} +return x.millerRabin(t); +} + +//(protected) true if probably prime (HAC 4.24, Miller-Rabin) +function bnpMillerRabin(t) { +var n1 = this.subtract(BigInteger.ONE); +var k = n1.getLowestSetBit(); +if(k <= 0) return false; +var r = n1.shiftRight(k); +var prng = bnGetPrng(); +var a; +for(var i = 0; i < t; ++i) { + // select witness 'a' at random from between 1 and n1 + do { + a = new BigInteger(this.bitLength(), prng); + } + while(a.compareTo(BigInteger.ONE) <= 0 || a.compareTo(n1) >= 0); + var y = a.modPow(r,this); + if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { + var j = 1; + while(j++ < k && y.compareTo(n1) != 0) { + y = y.modPowInt(2,this); + if(y.compareTo(BigInteger.ONE) == 0) return false; + } + if(y.compareTo(n1) != 0) return false; + } +} +return true; +} + +// get pseudo random number generator +function bnGetPrng() { + // create prng with api that matches BigInteger secure random + return { + // x is an array to fill with bytes + nextBytes: function(x) { + for(var i = 0; i < x.length; ++i) { + x[i] = Math.floor(Math.random() * 0x0100); + } + } + }; +} + +//protected +BigInteger.prototype.chunkSize = bnpChunkSize; +BigInteger.prototype.toRadix = bnpToRadix; +BigInteger.prototype.fromRadix = bnpFromRadix; +BigInteger.prototype.fromNumber = bnpFromNumber; +BigInteger.prototype.bitwiseTo = bnpBitwiseTo; +BigInteger.prototype.changeBit = bnpChangeBit; +BigInteger.prototype.addTo = bnpAddTo; +BigInteger.prototype.dMultiply = bnpDMultiply; +BigInteger.prototype.dAddOffset = bnpDAddOffset; +BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; +BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; +BigInteger.prototype.modInt = bnpModInt; +BigInteger.prototype.millerRabin = bnpMillerRabin; + +//public +BigInteger.prototype.clone = bnClone; +BigInteger.prototype.intValue = bnIntValue; +BigInteger.prototype.byteValue = bnByteValue; +BigInteger.prototype.shortValue = bnShortValue; +BigInteger.prototype.signum = bnSigNum; +BigInteger.prototype.toByteArray = bnToByteArray; +BigInteger.prototype.equals = bnEquals; +BigInteger.prototype.min = bnMin; +BigInteger.prototype.max = bnMax; +BigInteger.prototype.and = bnAnd; +BigInteger.prototype.or = bnOr; +BigInteger.prototype.xor = bnXor; +BigInteger.prototype.andNot = bnAndNot; +BigInteger.prototype.not = bnNot; +BigInteger.prototype.shiftLeft = bnShiftLeft; +BigInteger.prototype.shiftRight = bnShiftRight; +BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; +BigInteger.prototype.bitCount = bnBitCount; +BigInteger.prototype.testBit = bnTestBit; +BigInteger.prototype.setBit = bnSetBit; +BigInteger.prototype.clearBit = bnClearBit; +BigInteger.prototype.flipBit = bnFlipBit; +BigInteger.prototype.add = bnAdd; +BigInteger.prototype.subtract = bnSubtract; +BigInteger.prototype.multiply = bnMultiply; +BigInteger.prototype.divide = bnDivide; +BigInteger.prototype.remainder = bnRemainder; +BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; +BigInteger.prototype.modPow = bnModPow; +BigInteger.prototype.modInverse = bnModInverse; +BigInteger.prototype.pow = bnPow; +BigInteger.prototype.gcd = bnGCD; +BigInteger.prototype.isProbablePrime = bnIsProbablePrime; + +//BigInteger interfaces not implemented in jsbn: + +//BigInteger(int signum, byte[] magnitude) +//double doubleValue() +//float floatValue() +//int hashCode() +//long longValue() +//static BigInteger valueOf(long val) + + +/***/ }), + +<<<<<<< HEAD +/***/ 2439: +======= +/***/ 80554: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Node.js module for Forge message digests. + * + * @author Dave Longley + * + * Copyright 2011-2017 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +======= +var forge = __nccwpck_require__(96630); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = forge.md = forge.md || {}; +forge.md.algorithms = forge.md.algorithms || {}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 40876: +======= +/***/ 11750: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Object IDs for ASN.1. + * + * @author Dave Longley + * + * Copyright (c) 2010-2013 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +======= +var forge = __nccwpck_require__(96630); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +forge.pki = forge.pki || {}; +var oids = module.exports = forge.pki.oids = forge.oids = forge.oids || {}; + +// set id to name mapping and name to id mapping +function _IN(id, name) { + oids[id] = name; + oids[name] = id; +} +// set id to name mapping only +function _I_(id, name) { + oids[id] = name; +} + +// algorithm OIDs +_IN('1.2.840.113549.1.1.1', 'rsaEncryption'); +// Note: md2 & md4 not implemented +//_IN('1.2.840.113549.1.1.2', 'md2WithRSAEncryption'); +//_IN('1.2.840.113549.1.1.3', 'md4WithRSAEncryption'); +_IN('1.2.840.113549.1.1.4', 'md5WithRSAEncryption'); +_IN('1.2.840.113549.1.1.5', 'sha1WithRSAEncryption'); +_IN('1.2.840.113549.1.1.7', 'RSAES-OAEP'); +_IN('1.2.840.113549.1.1.8', 'mgf1'); +_IN('1.2.840.113549.1.1.9', 'pSpecified'); +_IN('1.2.840.113549.1.1.10', 'RSASSA-PSS'); +_IN('1.2.840.113549.1.1.11', 'sha256WithRSAEncryption'); +_IN('1.2.840.113549.1.1.12', 'sha384WithRSAEncryption'); +_IN('1.2.840.113549.1.1.13', 'sha512WithRSAEncryption'); +// Edwards-curve Digital Signature Algorithm (EdDSA) Ed25519 +_IN('1.3.101.112', 'EdDSA25519'); + +_IN('1.2.840.10040.4.3', 'dsa-with-sha1'); + +_IN('1.3.14.3.2.7', 'desCBC'); + +_IN('1.3.14.3.2.26', 'sha1'); +// Deprecated equivalent of sha1WithRSAEncryption +_IN('1.3.14.3.2.29', 'sha1WithRSASignature'); +_IN('2.16.840.1.101.3.4.2.1', 'sha256'); +_IN('2.16.840.1.101.3.4.2.2', 'sha384'); +_IN('2.16.840.1.101.3.4.2.3', 'sha512'); +_IN('2.16.840.1.101.3.4.2.4', 'sha224'); +_IN('2.16.840.1.101.3.4.2.5', 'sha512-224'); +_IN('2.16.840.1.101.3.4.2.6', 'sha512-256'); +_IN('1.2.840.113549.2.2', 'md2'); +_IN('1.2.840.113549.2.5', 'md5'); + +// pkcs#7 content types +_IN('1.2.840.113549.1.7.1', 'data'); +_IN('1.2.840.113549.1.7.2', 'signedData'); +_IN('1.2.840.113549.1.7.3', 'envelopedData'); +_IN('1.2.840.113549.1.7.4', 'signedAndEnvelopedData'); +_IN('1.2.840.113549.1.7.5', 'digestedData'); +_IN('1.2.840.113549.1.7.6', 'encryptedData'); + +// pkcs#9 oids +_IN('1.2.840.113549.1.9.1', 'emailAddress'); +_IN('1.2.840.113549.1.9.2', 'unstructuredName'); +_IN('1.2.840.113549.1.9.3', 'contentType'); +_IN('1.2.840.113549.1.9.4', 'messageDigest'); +_IN('1.2.840.113549.1.9.5', 'signingTime'); +_IN('1.2.840.113549.1.9.6', 'counterSignature'); +_IN('1.2.840.113549.1.9.7', 'challengePassword'); +_IN('1.2.840.113549.1.9.8', 'unstructuredAddress'); +_IN('1.2.840.113549.1.9.14', 'extensionRequest'); + +_IN('1.2.840.113549.1.9.20', 'friendlyName'); +_IN('1.2.840.113549.1.9.21', 'localKeyId'); +_IN('1.2.840.113549.1.9.22.1', 'x509Certificate'); + +// pkcs#12 safe bags +_IN('1.2.840.113549.1.12.10.1.1', 'keyBag'); +_IN('1.2.840.113549.1.12.10.1.2', 'pkcs8ShroudedKeyBag'); +_IN('1.2.840.113549.1.12.10.1.3', 'certBag'); +_IN('1.2.840.113549.1.12.10.1.4', 'crlBag'); +_IN('1.2.840.113549.1.12.10.1.5', 'secretBag'); +_IN('1.2.840.113549.1.12.10.1.6', 'safeContentsBag'); + +// password-based-encryption for pkcs#12 +_IN('1.2.840.113549.1.5.13', 'pkcs5PBES2'); +_IN('1.2.840.113549.1.5.12', 'pkcs5PBKDF2'); + +_IN('1.2.840.113549.1.12.1.1', 'pbeWithSHAAnd128BitRC4'); +_IN('1.2.840.113549.1.12.1.2', 'pbeWithSHAAnd40BitRC4'); +_IN('1.2.840.113549.1.12.1.3', 'pbeWithSHAAnd3-KeyTripleDES-CBC'); +_IN('1.2.840.113549.1.12.1.4', 'pbeWithSHAAnd2-KeyTripleDES-CBC'); +_IN('1.2.840.113549.1.12.1.5', 'pbeWithSHAAnd128BitRC2-CBC'); +_IN('1.2.840.113549.1.12.1.6', 'pbewithSHAAnd40BitRC2-CBC'); + +// hmac OIDs +_IN('1.2.840.113549.2.7', 'hmacWithSHA1'); +_IN('1.2.840.113549.2.8', 'hmacWithSHA224'); +_IN('1.2.840.113549.2.9', 'hmacWithSHA256'); +_IN('1.2.840.113549.2.10', 'hmacWithSHA384'); +_IN('1.2.840.113549.2.11', 'hmacWithSHA512'); + +// symmetric key algorithm oids +_IN('1.2.840.113549.3.7', 'des-EDE3-CBC'); +_IN('2.16.840.1.101.3.4.1.2', 'aes128-CBC'); +_IN('2.16.840.1.101.3.4.1.22', 'aes192-CBC'); +_IN('2.16.840.1.101.3.4.1.42', 'aes256-CBC'); + +// certificate issuer/subject OIDs +_IN('2.5.4.3', 'commonName'); +_IN('2.5.4.4', 'surname'); +_IN('2.5.4.5', 'serialNumber'); +_IN('2.5.4.6', 'countryName'); +_IN('2.5.4.7', 'localityName'); +_IN('2.5.4.8', 'stateOrProvinceName'); +_IN('2.5.4.9', 'streetAddress'); +_IN('2.5.4.10', 'organizationName'); +_IN('2.5.4.11', 'organizationalUnitName'); +_IN('2.5.4.12', 'title'); +_IN('2.5.4.13', 'description'); +_IN('2.5.4.15', 'businessCategory'); +_IN('2.5.4.17', 'postalCode'); +_IN('2.5.4.42', 'givenName'); +_IN('1.3.6.1.4.1.311.60.2.1.2', 'jurisdictionOfIncorporationStateOrProvinceName'); +_IN('1.3.6.1.4.1.311.60.2.1.3', 'jurisdictionOfIncorporationCountryName'); + +// X.509 extension OIDs +_IN('2.16.840.1.113730.1.1', 'nsCertType'); +_IN('2.16.840.1.113730.1.13', 'nsComment'); // deprecated in theory; still widely used +_I_('2.5.29.1', 'authorityKeyIdentifier'); // deprecated, use .35 +_I_('2.5.29.2', 'keyAttributes'); // obsolete use .37 or .15 +_I_('2.5.29.3', 'certificatePolicies'); // deprecated, use .32 +_I_('2.5.29.4', 'keyUsageRestriction'); // obsolete use .37 or .15 +_I_('2.5.29.5', 'policyMapping'); // deprecated use .33 +_I_('2.5.29.6', 'subtreesConstraint'); // obsolete use .30 +_I_('2.5.29.7', 'subjectAltName'); // deprecated use .17 +_I_('2.5.29.8', 'issuerAltName'); // deprecated use .18 +_I_('2.5.29.9', 'subjectDirectoryAttributes'); +_I_('2.5.29.10', 'basicConstraints'); // deprecated use .19 +_I_('2.5.29.11', 'nameConstraints'); // deprecated use .30 +_I_('2.5.29.12', 'policyConstraints'); // deprecated use .36 +_I_('2.5.29.13', 'basicConstraints'); // deprecated use .19 +_IN('2.5.29.14', 'subjectKeyIdentifier'); +_IN('2.5.29.15', 'keyUsage'); +_I_('2.5.29.16', 'privateKeyUsagePeriod'); +_IN('2.5.29.17', 'subjectAltName'); +_IN('2.5.29.18', 'issuerAltName'); +_IN('2.5.29.19', 'basicConstraints'); +_I_('2.5.29.20', 'cRLNumber'); +_I_('2.5.29.21', 'cRLReason'); +_I_('2.5.29.22', 'expirationDate'); +_I_('2.5.29.23', 'instructionCode'); +_I_('2.5.29.24', 'invalidityDate'); +_I_('2.5.29.25', 'cRLDistributionPoints'); // deprecated use .31 +_I_('2.5.29.26', 'issuingDistributionPoint'); // deprecated use .28 +_I_('2.5.29.27', 'deltaCRLIndicator'); +_I_('2.5.29.28', 'issuingDistributionPoint'); +_I_('2.5.29.29', 'certificateIssuer'); +_I_('2.5.29.30', 'nameConstraints'); +_IN('2.5.29.31', 'cRLDistributionPoints'); +_IN('2.5.29.32', 'certificatePolicies'); +_I_('2.5.29.33', 'policyMappings'); +_I_('2.5.29.34', 'policyConstraints'); // deprecated use .36 +_IN('2.5.29.35', 'authorityKeyIdentifier'); +_I_('2.5.29.36', 'policyConstraints'); +_IN('2.5.29.37', 'extKeyUsage'); +_I_('2.5.29.46', 'freshestCRL'); +_I_('2.5.29.54', 'inhibitAnyPolicy'); + +// extKeyUsage purposes +_IN('1.3.6.1.4.1.11129.2.4.2', 'timestampList'); +_IN('1.3.6.1.5.5.7.1.1', 'authorityInfoAccess'); +_IN('1.3.6.1.5.5.7.3.1', 'serverAuth'); +_IN('1.3.6.1.5.5.7.3.2', 'clientAuth'); +_IN('1.3.6.1.5.5.7.3.3', 'codeSigning'); +_IN('1.3.6.1.5.5.7.3.4', 'emailProtection'); +_IN('1.3.6.1.5.5.7.3.8', 'timeStamping'); + + +/***/ }), + +<<<<<<< HEAD +/***/ 60075: +======= +/***/ 87861: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Password-based encryption functions. + * + * @author Dave Longley + * @author Stefan Siegl + * + * Copyright (c) 2010-2013 Digital Bazaar, Inc. + * Copyright (c) 2012 Stefan Siegl + * + * An EncryptedPrivateKeyInfo: + * + * EncryptedPrivateKeyInfo ::= SEQUENCE { + * encryptionAlgorithm EncryptionAlgorithmIdentifier, + * encryptedData EncryptedData } + * + * EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier + * + * EncryptedData ::= OCTET STRING + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(25706); +__nccwpck_require__(1571); +__nccwpck_require__(53436); +__nccwpck_require__(2439); +__nccwpck_require__(40876); +__nccwpck_require__(90577); +__nccwpck_require__(44214); +__nccwpck_require__(35283); +__nccwpck_require__(21828); +__nccwpck_require__(62646); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(16606); +__nccwpck_require__(69197); +__nccwpck_require__(16855); +__nccwpck_require__(80554); +__nccwpck_require__(11750); +__nccwpck_require__(84418); +__nccwpck_require__(57334); +__nccwpck_require__(68737); +__nccwpck_require__(87938); +__nccwpck_require__(79626); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +if(typeof BigInteger === 'undefined') { + var BigInteger = forge.jsbn.BigInteger; +} + +// shortcut for asn.1 API +var asn1 = forge.asn1; + +/* Password-based encryption implementation. */ +var pki = forge.pki = forge.pki || {}; +module.exports = pki.pbe = forge.pbe = forge.pbe || {}; +var oids = pki.oids; + +// validator for an EncryptedPrivateKeyInfo structure +// Note: Currently only works w/algorithm params +var encryptedPrivateKeyValidator = { + name: 'EncryptedPrivateKeyInfo', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'EncryptedPrivateKeyInfo.encryptionAlgorithm', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'AlgorithmIdentifier.algorithm', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OID, + constructed: false, + capture: 'encryptionOid' + }, { + name: 'AlgorithmIdentifier.parameters', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + captureAsn1: 'encryptionParams' + }] + }, { + // encryptedData + name: 'EncryptedPrivateKeyInfo.encryptedData', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OCTETSTRING, + constructed: false, + capture: 'encryptedData' + }] +}; + +// validator for a PBES2Algorithms structure +// Note: Currently only works w/PBKDF2 + AES encryption schemes +var PBES2AlgorithmsValidator = { + name: 'PBES2Algorithms', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'PBES2Algorithms.keyDerivationFunc', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'PBES2Algorithms.keyDerivationFunc.oid', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OID, + constructed: false, + capture: 'kdfOid' + }, { + name: 'PBES2Algorithms.params', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'PBES2Algorithms.params.salt', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OCTETSTRING, + constructed: false, + capture: 'kdfSalt' + }, { + name: 'PBES2Algorithms.params.iterationCount', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'kdfIterationCount' + }, { + name: 'PBES2Algorithms.params.keyLength', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + optional: true, + capture: 'keyLength' + }, { + // prf + name: 'PBES2Algorithms.params.prf', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + optional: true, + value: [{ + name: 'PBES2Algorithms.params.prf.algorithm', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OID, + constructed: false, + capture: 'prfOid' + }] + }] + }] + }, { + name: 'PBES2Algorithms.encryptionScheme', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'PBES2Algorithms.encryptionScheme.oid', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OID, + constructed: false, + capture: 'encOid' + }, { + name: 'PBES2Algorithms.encryptionScheme.iv', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OCTETSTRING, + constructed: false, + capture: 'encIv' + }] + }] +}; + +var pkcs12PbeParamsValidator = { + name: 'pkcs-12PbeParams', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'pkcs-12PbeParams.salt', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OCTETSTRING, + constructed: false, + capture: 'salt' + }, { + name: 'pkcs-12PbeParams.iterations', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'iterations' + }] +}; + +/** + * Encrypts a ASN.1 PrivateKeyInfo object, producing an EncryptedPrivateKeyInfo. + * + * PBES2Algorithms ALGORITHM-IDENTIFIER ::= + * { {PBES2-params IDENTIFIED BY id-PBES2}, ...} + * + * id-PBES2 OBJECT IDENTIFIER ::= {pkcs-5 13} + * + * PBES2-params ::= SEQUENCE { + * keyDerivationFunc AlgorithmIdentifier {{PBES2-KDFs}}, + * encryptionScheme AlgorithmIdentifier {{PBES2-Encs}} + * } + * + * PBES2-KDFs ALGORITHM-IDENTIFIER ::= + * { {PBKDF2-params IDENTIFIED BY id-PBKDF2}, ... } + * + * PBES2-Encs ALGORITHM-IDENTIFIER ::= { ... } + * + * PBKDF2-params ::= SEQUENCE { + * salt CHOICE { + * specified OCTET STRING, + * otherSource AlgorithmIdentifier {{PBKDF2-SaltSources}} + * }, + * iterationCount INTEGER (1..MAX), + * keyLength INTEGER (1..MAX) OPTIONAL, + * prf AlgorithmIdentifier {{PBKDF2-PRFs}} DEFAULT algid-hmacWithSHA1 + * } + * + * @param obj the ASN.1 PrivateKeyInfo object. + * @param password the password to encrypt with. + * @param options: + * algorithm the encryption algorithm to use + * ('aes128', 'aes192', 'aes256', '3des'), defaults to 'aes128'. + * count the iteration count to use. + * saltSize the salt size to use. + * prfAlgorithm the PRF message digest algorithm to use + * ('sha1', 'sha224', 'sha256', 'sha384', 'sha512') + * + * @return the ASN.1 EncryptedPrivateKeyInfo. + */ +pki.encryptPrivateKeyInfo = function(obj, password, options) { + // set default options + options = options || {}; + options.saltSize = options.saltSize || 8; + options.count = options.count || 2048; + options.algorithm = options.algorithm || 'aes128'; + options.prfAlgorithm = options.prfAlgorithm || 'sha1'; + + // generate PBE params + var salt = forge.random.getBytesSync(options.saltSize); + var count = options.count; + var countBytes = asn1.integerToDer(count); + var dkLen; + var encryptionAlgorithm; + var encryptedData; + if(options.algorithm.indexOf('aes') === 0 || options.algorithm === 'des') { + // do PBES2 + var ivLen, encOid, cipherFn; + switch(options.algorithm) { + case 'aes128': + dkLen = 16; + ivLen = 16; + encOid = oids['aes128-CBC']; + cipherFn = forge.aes.createEncryptionCipher; + break; + case 'aes192': + dkLen = 24; + ivLen = 16; + encOid = oids['aes192-CBC']; + cipherFn = forge.aes.createEncryptionCipher; + break; + case 'aes256': + dkLen = 32; + ivLen = 16; + encOid = oids['aes256-CBC']; + cipherFn = forge.aes.createEncryptionCipher; + break; + case 'des': + dkLen = 8; + ivLen = 8; + encOid = oids['desCBC']; + cipherFn = forge.des.createEncryptionCipher; + break; + default: + var error = new Error('Cannot encrypt private key. Unknown encryption algorithm.'); + error.algorithm = options.algorithm; + throw error; + } + + // get PRF message digest + var prfAlgorithm = 'hmacWith' + options.prfAlgorithm.toUpperCase(); + var md = prfAlgorithmToMessageDigest(prfAlgorithm); + + // encrypt private key using pbe SHA-1 and AES/DES + var dk = forge.pkcs5.pbkdf2(password, salt, count, dkLen, md); + var iv = forge.random.getBytesSync(ivLen); + var cipher = cipherFn(dk); + cipher.start(iv); + cipher.update(asn1.toDer(obj)); + cipher.finish(); + encryptedData = cipher.output.getBytes(); + + // get PBKDF2-params + var params = createPbkdf2Params(salt, countBytes, dkLen, prfAlgorithm); + + encryptionAlgorithm = asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, + asn1.oidToDer(oids['pkcs5PBES2']).getBytes()), + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // keyDerivationFunc + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, + asn1.oidToDer(oids['pkcs5PBKDF2']).getBytes()), + // PBKDF2-params + params + ]), + // encryptionScheme + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, + asn1.oidToDer(encOid).getBytes()), + // iv + asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, iv) + ]) + ]) + ]); + } else if(options.algorithm === '3des') { + // Do PKCS12 PBE + dkLen = 24; + + var saltBytes = new forge.util.ByteBuffer(salt); + var dk = pki.pbe.generatePkcs12Key(password, saltBytes, 1, count, dkLen); + var iv = pki.pbe.generatePkcs12Key(password, saltBytes, 2, count, dkLen); + var cipher = forge.des.createEncryptionCipher(dk); + cipher.start(iv); + cipher.update(asn1.toDer(obj)); + cipher.finish(); + encryptedData = cipher.output.getBytes(); + + encryptionAlgorithm = asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, + asn1.oidToDer(oids['pbeWithSHAAnd3-KeyTripleDES-CBC']).getBytes()), + // pkcs-12PbeParams + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // salt + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, salt), + // iteration count + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + countBytes.getBytes()) + ]) + ]); + } else { + var error = new Error('Cannot encrypt private key. Unknown encryption algorithm.'); + error.algorithm = options.algorithm; + throw error; + } + + // EncryptedPrivateKeyInfo + var rval = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // encryptionAlgorithm + encryptionAlgorithm, + // encryptedData + asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, encryptedData) + ]); + return rval; +}; + +/** + * Decrypts a ASN.1 PrivateKeyInfo object. + * + * @param obj the ASN.1 EncryptedPrivateKeyInfo object. + * @param password the password to decrypt with. + * + * @return the ASN.1 PrivateKeyInfo on success, null on failure. + */ +pki.decryptPrivateKeyInfo = function(obj, password) { + var rval = null; + + // get PBE params + var capture = {}; + var errors = []; + if(!asn1.validate(obj, encryptedPrivateKeyValidator, capture, errors)) { + var error = new Error('Cannot read encrypted private key. ' + + 'ASN.1 object is not a supported EncryptedPrivateKeyInfo.'); + error.errors = errors; + throw error; + } + + // get cipher + var oid = asn1.derToOid(capture.encryptionOid); + var cipher = pki.pbe.getCipher(oid, capture.encryptionParams, password); + + // get encrypted data + var encrypted = forge.util.createBuffer(capture.encryptedData); + + cipher.update(encrypted); + if(cipher.finish()) { + rval = asn1.fromDer(cipher.output); + } + + return rval; +}; + +/** + * Converts a EncryptedPrivateKeyInfo to PEM format. + * + * @param epki the EncryptedPrivateKeyInfo. + * @param maxline the maximum characters per line, defaults to 64. + * + * @return the PEM-formatted encrypted private key. + */ +pki.encryptedPrivateKeyToPem = function(epki, maxline) { + // convert to DER, then PEM-encode + var msg = { + type: 'ENCRYPTED PRIVATE KEY', + body: asn1.toDer(epki).getBytes() + }; + return forge.pem.encode(msg, {maxline: maxline}); +}; + +/** + * Converts a PEM-encoded EncryptedPrivateKeyInfo to ASN.1 format. Decryption + * is not performed. + * + * @param pem the EncryptedPrivateKeyInfo in PEM-format. + * + * @return the ASN.1 EncryptedPrivateKeyInfo. + */ +pki.encryptedPrivateKeyFromPem = function(pem) { + var msg = forge.pem.decode(pem)[0]; + + if(msg.type !== 'ENCRYPTED PRIVATE KEY') { + var error = new Error('Could not convert encrypted private key from PEM; ' + + 'PEM header type is "ENCRYPTED PRIVATE KEY".'); + error.headerType = msg.type; + throw error; + } + if(msg.procType && msg.procType.type === 'ENCRYPTED') { + throw new Error('Could not convert encrypted private key from PEM; ' + + 'PEM is encrypted.'); + } + + // convert DER to ASN.1 object + return asn1.fromDer(msg.body); +}; + +/** + * Encrypts an RSA private key. By default, the key will be wrapped in + * a PrivateKeyInfo and encrypted to produce a PKCS#8 EncryptedPrivateKeyInfo. + * This is the standard, preferred way to encrypt a private key. + * + * To produce a non-standard PEM-encrypted private key that uses encapsulated + * headers to indicate the encryption algorithm (old-style non-PKCS#8 OpenSSL + * private key encryption), set the 'legacy' option to true. Note: Using this + * option will cause the iteration count to be forced to 1. + * + * Note: The 'des' algorithm is supported, but it is not considered to be + * secure because it only uses a single 56-bit key. If possible, it is highly + * recommended that a different algorithm be used. + * + * @param rsaKey the RSA key to encrypt. + * @param password the password to use. + * @param options: + * algorithm: the encryption algorithm to use + * ('aes128', 'aes192', 'aes256', '3des', 'des'). + * count: the iteration count to use. + * saltSize: the salt size to use. + * legacy: output an old non-PKCS#8 PEM-encrypted+encapsulated + * headers (DEK-Info) private key. + * + * @return the PEM-encoded ASN.1 EncryptedPrivateKeyInfo. + */ +pki.encryptRsaPrivateKey = function(rsaKey, password, options) { + // standard PKCS#8 + options = options || {}; + if(!options.legacy) { + // encrypt PrivateKeyInfo + var rval = pki.wrapRsaPrivateKey(pki.privateKeyToAsn1(rsaKey)); + rval = pki.encryptPrivateKeyInfo(rval, password, options); + return pki.encryptedPrivateKeyToPem(rval); + } + + // legacy non-PKCS#8 + var algorithm; + var iv; + var dkLen; + var cipherFn; + switch(options.algorithm) { + case 'aes128': + algorithm = 'AES-128-CBC'; + dkLen = 16; + iv = forge.random.getBytesSync(16); + cipherFn = forge.aes.createEncryptionCipher; + break; + case 'aes192': + algorithm = 'AES-192-CBC'; + dkLen = 24; + iv = forge.random.getBytesSync(16); + cipherFn = forge.aes.createEncryptionCipher; + break; + case 'aes256': + algorithm = 'AES-256-CBC'; + dkLen = 32; + iv = forge.random.getBytesSync(16); + cipherFn = forge.aes.createEncryptionCipher; + break; + case '3des': + algorithm = 'DES-EDE3-CBC'; + dkLen = 24; + iv = forge.random.getBytesSync(8); + cipherFn = forge.des.createEncryptionCipher; + break; + case 'des': + algorithm = 'DES-CBC'; + dkLen = 8; + iv = forge.random.getBytesSync(8); + cipherFn = forge.des.createEncryptionCipher; + break; + default: + var error = new Error('Could not encrypt RSA private key; unsupported ' + + 'encryption algorithm "' + options.algorithm + '".'); + error.algorithm = options.algorithm; + throw error; + } + + // encrypt private key using OpenSSL legacy key derivation + var dk = forge.pbe.opensslDeriveBytes(password, iv.substr(0, 8), dkLen); + var cipher = cipherFn(dk); + cipher.start(iv); + cipher.update(asn1.toDer(pki.privateKeyToAsn1(rsaKey))); + cipher.finish(); + + var msg = { + type: 'RSA PRIVATE KEY', + procType: { + version: '4', + type: 'ENCRYPTED' + }, + dekInfo: { + algorithm: algorithm, + parameters: forge.util.bytesToHex(iv).toUpperCase() + }, + body: cipher.output.getBytes() + }; + return forge.pem.encode(msg); +}; + +/** + * Decrypts an RSA private key. + * + * @param pem the PEM-formatted EncryptedPrivateKeyInfo to decrypt. + * @param password the password to use. + * + * @return the RSA key on success, null on failure. + */ +pki.decryptRsaPrivateKey = function(pem, password) { + var rval = null; + + var msg = forge.pem.decode(pem)[0]; + + if(msg.type !== 'ENCRYPTED PRIVATE KEY' && + msg.type !== 'PRIVATE KEY' && + msg.type !== 'RSA PRIVATE KEY') { + var error = new Error('Could not convert private key from PEM; PEM header type ' + + 'is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'); + error.headerType = error; + throw error; + } + + if(msg.procType && msg.procType.type === 'ENCRYPTED') { + var dkLen; + var cipherFn; + switch(msg.dekInfo.algorithm) { + case 'DES-CBC': + dkLen = 8; + cipherFn = forge.des.createDecryptionCipher; + break; + case 'DES-EDE3-CBC': + dkLen = 24; + cipherFn = forge.des.createDecryptionCipher; + break; + case 'AES-128-CBC': + dkLen = 16; + cipherFn = forge.aes.createDecryptionCipher; + break; + case 'AES-192-CBC': + dkLen = 24; + cipherFn = forge.aes.createDecryptionCipher; + break; + case 'AES-256-CBC': + dkLen = 32; + cipherFn = forge.aes.createDecryptionCipher; + break; + case 'RC2-40-CBC': + dkLen = 5; + cipherFn = function(key) { + return forge.rc2.createDecryptionCipher(key, 40); + }; + break; + case 'RC2-64-CBC': + dkLen = 8; + cipherFn = function(key) { + return forge.rc2.createDecryptionCipher(key, 64); + }; + break; + case 'RC2-128-CBC': + dkLen = 16; + cipherFn = function(key) { + return forge.rc2.createDecryptionCipher(key, 128); + }; + break; + default: + var error = new Error('Could not decrypt private key; unsupported ' + + 'encryption algorithm "' + msg.dekInfo.algorithm + '".'); + error.algorithm = msg.dekInfo.algorithm; + throw error; + } + + // use OpenSSL legacy key derivation + var iv = forge.util.hexToBytes(msg.dekInfo.parameters); + var dk = forge.pbe.opensslDeriveBytes(password, iv.substr(0, 8), dkLen); + var cipher = cipherFn(dk); + cipher.start(iv); + cipher.update(forge.util.createBuffer(msg.body)); + if(cipher.finish()) { + rval = cipher.output.getBytes(); + } else { + return rval; + } + } else { + rval = msg.body; + } + + if(msg.type === 'ENCRYPTED PRIVATE KEY') { + rval = pki.decryptPrivateKeyInfo(asn1.fromDer(rval), password); + } else { + // decryption already performed above + rval = asn1.fromDer(rval); + } + + if(rval !== null) { + rval = pki.privateKeyFromAsn1(rval); + } + + return rval; +}; + +/** + * Derives a PKCS#12 key. + * + * @param password the password to derive the key material from, null or + * undefined for none. + * @param salt the salt, as a ByteBuffer, to use. + * @param id the PKCS#12 ID byte (1 = key material, 2 = IV, 3 = MAC). + * @param iter the iteration count. + * @param n the number of bytes to derive from the password. + * @param md the message digest to use, defaults to SHA-1. + * + * @return a ByteBuffer with the bytes derived from the password. + */ +pki.pbe.generatePkcs12Key = function(password, salt, id, iter, n, md) { + var j, l; + + if(typeof md === 'undefined' || md === null) { + if(!('sha1' in forge.md)) { + throw new Error('"sha1" hash algorithm unavailable.'); + } + md = forge.md.sha1.create(); + } + + var u = md.digestLength; + var v = md.blockLength; + var result = new forge.util.ByteBuffer(); + + /* Convert password to Unicode byte buffer + trailing 0-byte. */ + var passBuf = new forge.util.ByteBuffer(); + if(password !== null && password !== undefined) { + for(l = 0; l < password.length; l++) { + passBuf.putInt16(password.charCodeAt(l)); + } + passBuf.putInt16(0); + } + + /* Length of salt and password in BYTES. */ + var p = passBuf.length(); + var s = salt.length(); + + /* 1. Construct a string, D (the "diversifier"), by concatenating + v copies of ID. */ + var D = new forge.util.ByteBuffer(); + D.fillWithByte(id, v); + + /* 2. Concatenate copies of the salt together to create a string S of length + v * ceil(s / v) bytes (the final copy of the salt may be trunacted + to create S). + Note that if the salt is the empty string, then so is S. */ + var Slen = v * Math.ceil(s / v); + var S = new forge.util.ByteBuffer(); + for(l = 0; l < Slen; l++) { + S.putByte(salt.at(l % s)); + } + + /* 3. Concatenate copies of the password together to create a string P of + length v * ceil(p / v) bytes (the final copy of the password may be + truncated to create P). + Note that if the password is the empty string, then so is P. */ + var Plen = v * Math.ceil(p / v); + var P = new forge.util.ByteBuffer(); + for(l = 0; l < Plen; l++) { + P.putByte(passBuf.at(l % p)); + } + + /* 4. Set I=S||P to be the concatenation of S and P. */ + var I = S; + I.putBuffer(P); + + /* 5. Set c=ceil(n / u). */ + var c = Math.ceil(n / u); + + /* 6. For i=1, 2, ..., c, do the following: */ + for(var i = 1; i <= c; i++) { + /* a) Set Ai=H^r(D||I). (l.e. the rth hash of D||I, H(H(H(...H(D||I)))) */ + var buf = new forge.util.ByteBuffer(); + buf.putBytes(D.bytes()); + buf.putBytes(I.bytes()); + for(var round = 0; round < iter; round++) { + md.start(); + md.update(buf.getBytes()); + buf = md.digest(); + } + + /* b) Concatenate copies of Ai to create a string B of length v bytes (the + final copy of Ai may be truncated to create B). */ + var B = new forge.util.ByteBuffer(); + for(l = 0; l < v; l++) { + B.putByte(buf.at(l % u)); + } + + /* c) Treating I as a concatenation I0, I1, ..., Ik-1 of v-byte blocks, + where k=ceil(s / v) + ceil(p / v), modify I by setting + Ij=(Ij+B+1) mod 2v for each j. */ + var k = Math.ceil(s / v) + Math.ceil(p / v); + var Inew = new forge.util.ByteBuffer(); + for(j = 0; j < k; j++) { + var chunk = new forge.util.ByteBuffer(I.getBytes(v)); + var x = 0x1ff; + for(l = B.length() - 1; l >= 0; l--) { + x = x >> 8; + x += B.at(l) + chunk.at(l); + chunk.setAt(l, x & 0xff); + } + Inew.putBuffer(chunk); + } + I = Inew; + + /* Add Ai to A. */ + result.putBuffer(buf); + } + + result.truncate(result.length() - n); + return result; +}; + +/** + * Get new Forge cipher object instance. + * + * @param oid the OID (in string notation). + * @param params the ASN.1 params object. + * @param password the password to decrypt with. + * + * @return new cipher object instance. + */ +pki.pbe.getCipher = function(oid, params, password) { + switch(oid) { + case pki.oids['pkcs5PBES2']: + return pki.pbe.getCipherForPBES2(oid, params, password); + + case pki.oids['pbeWithSHAAnd3-KeyTripleDES-CBC']: + case pki.oids['pbewithSHAAnd40BitRC2-CBC']: + return pki.pbe.getCipherForPKCS12PBE(oid, params, password); + + default: + var error = new Error('Cannot read encrypted PBE data block. Unsupported OID.'); + error.oid = oid; + error.supportedOids = [ + 'pkcs5PBES2', + 'pbeWithSHAAnd3-KeyTripleDES-CBC', + 'pbewithSHAAnd40BitRC2-CBC' + ]; + throw error; + } +}; + +/** + * Get new Forge cipher object instance according to PBES2 params block. + * + * The returned cipher instance is already started using the IV + * from PBES2 parameter block. + * + * @param oid the PKCS#5 PBKDF2 OID (in string notation). + * @param params the ASN.1 PBES2-params object. + * @param password the password to decrypt with. + * + * @return new cipher object instance. + */ +pki.pbe.getCipherForPBES2 = function(oid, params, password) { + // get PBE params + var capture = {}; + var errors = []; + if(!asn1.validate(params, PBES2AlgorithmsValidator, capture, errors)) { + var error = new Error('Cannot read password-based-encryption algorithm ' + + 'parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.'); + error.errors = errors; + throw error; + } + + // check oids + oid = asn1.derToOid(capture.kdfOid); + if(oid !== pki.oids['pkcs5PBKDF2']) { + var error = new Error('Cannot read encrypted private key. ' + + 'Unsupported key derivation function OID.'); + error.oid = oid; + error.supportedOids = ['pkcs5PBKDF2']; + throw error; + } + oid = asn1.derToOid(capture.encOid); + if(oid !== pki.oids['aes128-CBC'] && + oid !== pki.oids['aes192-CBC'] && + oid !== pki.oids['aes256-CBC'] && + oid !== pki.oids['des-EDE3-CBC'] && + oid !== pki.oids['desCBC']) { + var error = new Error('Cannot read encrypted private key. ' + + 'Unsupported encryption scheme OID.'); + error.oid = oid; + error.supportedOids = [ + 'aes128-CBC', 'aes192-CBC', 'aes256-CBC', 'des-EDE3-CBC', 'desCBC']; + throw error; + } + + // set PBE params + var salt = capture.kdfSalt; + var count = forge.util.createBuffer(capture.kdfIterationCount); + count = count.getInt(count.length() << 3); + var dkLen; + var cipherFn; + switch(pki.oids[oid]) { + case 'aes128-CBC': + dkLen = 16; + cipherFn = forge.aes.createDecryptionCipher; + break; + case 'aes192-CBC': + dkLen = 24; + cipherFn = forge.aes.createDecryptionCipher; + break; + case 'aes256-CBC': + dkLen = 32; + cipherFn = forge.aes.createDecryptionCipher; + break; + case 'des-EDE3-CBC': + dkLen = 24; + cipherFn = forge.des.createDecryptionCipher; + break; + case 'desCBC': + dkLen = 8; + cipherFn = forge.des.createDecryptionCipher; + break; + } + + // get PRF message digest + var md = prfOidToMessageDigest(capture.prfOid); + + // decrypt private key using pbe with chosen PRF and AES/DES + var dk = forge.pkcs5.pbkdf2(password, salt, count, dkLen, md); + var iv = capture.encIv; + var cipher = cipherFn(dk); + cipher.start(iv); + + return cipher; +}; + +/** + * Get new Forge cipher object instance for PKCS#12 PBE. + * + * The returned cipher instance is already started using the key & IV + * derived from the provided password and PKCS#12 PBE salt. + * + * @param oid The PKCS#12 PBE OID (in string notation). + * @param params The ASN.1 PKCS#12 PBE-params object. + * @param password The password to decrypt with. + * + * @return the new cipher object instance. + */ +pki.pbe.getCipherForPKCS12PBE = function(oid, params, password) { + // get PBE params + var capture = {}; + var errors = []; + if(!asn1.validate(params, pkcs12PbeParamsValidator, capture, errors)) { + var error = new Error('Cannot read password-based-encryption algorithm ' + + 'parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.'); + error.errors = errors; + throw error; + } + + var salt = forge.util.createBuffer(capture.salt); + var count = forge.util.createBuffer(capture.iterations); + count = count.getInt(count.length() << 3); + + var dkLen, dIvLen, cipherFn; + switch(oid) { + case pki.oids['pbeWithSHAAnd3-KeyTripleDES-CBC']: + dkLen = 24; + dIvLen = 8; + cipherFn = forge.des.startDecrypting; + break; + + case pki.oids['pbewithSHAAnd40BitRC2-CBC']: + dkLen = 5; + dIvLen = 8; + cipherFn = function(key, iv) { + var cipher = forge.rc2.createDecryptionCipher(key, 40); + cipher.start(iv, null); + return cipher; + }; + break; + + default: + var error = new Error('Cannot read PKCS #12 PBE data block. Unsupported OID.'); + error.oid = oid; + throw error; + } + + // get PRF message digest + var md = prfOidToMessageDigest(capture.prfOid); + var key = pki.pbe.generatePkcs12Key(password, salt, 1, count, dkLen, md); + md.start(); + var iv = pki.pbe.generatePkcs12Key(password, salt, 2, count, dIvLen, md); + + return cipherFn(key, iv); +}; + +/** + * OpenSSL's legacy key derivation function. + * + * See: http://www.openssl.org/docs/crypto/EVP_BytesToKey.html + * + * @param password the password to derive the key from. + * @param salt the salt to use, null for none. + * @param dkLen the number of bytes needed for the derived key. + * @param [options] the options to use: + * [md] an optional message digest object to use. + */ +pki.pbe.opensslDeriveBytes = function(password, salt, dkLen, md) { + if(typeof md === 'undefined' || md === null) { + if(!('md5' in forge.md)) { + throw new Error('"md5" hash algorithm unavailable.'); + } + md = forge.md.md5.create(); + } + if(salt === null) { + salt = ''; + } + var digests = [hash(md, password + salt)]; + for(var length = 16, i = 1; length < dkLen; ++i, length += 16) { + digests.push(hash(md, digests[i - 1] + password + salt)); + } + return digests.join('').substr(0, dkLen); +}; + +function hash(md, bytes) { + return md.start().update(bytes).digest().getBytes(); +} + +function prfOidToMessageDigest(prfOid) { + // get PRF algorithm, default to SHA-1 + var prfAlgorithm; + if(!prfOid) { + prfAlgorithm = 'hmacWithSHA1'; + } else { + prfAlgorithm = pki.oids[asn1.derToOid(prfOid)]; + if(!prfAlgorithm) { + var error = new Error('Unsupported PRF OID.'); + error.oid = prfOid; + error.supported = [ + 'hmacWithSHA1', 'hmacWithSHA224', 'hmacWithSHA256', 'hmacWithSHA384', + 'hmacWithSHA512']; + throw error; + } + } + return prfAlgorithmToMessageDigest(prfAlgorithm); +} + +function prfAlgorithmToMessageDigest(prfAlgorithm) { + var factory = forge.md; + switch(prfAlgorithm) { + case 'hmacWithSHA224': + factory = forge.md.sha512; + case 'hmacWithSHA1': + case 'hmacWithSHA256': + case 'hmacWithSHA384': + case 'hmacWithSHA512': + prfAlgorithm = prfAlgorithm.substr(8).toLowerCase(); + break; + default: + var error = new Error('Unsupported PRF algorithm.'); + error.algorithm = prfAlgorithm; + error.supported = [ + 'hmacWithSHA1', 'hmacWithSHA224', 'hmacWithSHA256', 'hmacWithSHA384', + 'hmacWithSHA512']; + throw error; + } + if(!factory || !(prfAlgorithm in factory)) { + throw new Error('Unknown hash algorithm: ' + prfAlgorithm); + } + return factory[prfAlgorithm].create(); +} + +function createPbkdf2Params(salt, countBytes, dkLen, prfAlgorithm) { + var params = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // salt + asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, salt), + // iteration count + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + countBytes.getBytes()) + ]); + // when PRF algorithm is not SHA-1 default, add key length and PRF algorithm + if(prfAlgorithm !== 'hmacWithSHA1') { + params.value.push( + // key length + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + forge.util.hexToBytes(dkLen.toString(16))), + // AlgorithmIdentifier + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // algorithm + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, + asn1.oidToDer(pki.oids[prfAlgorithm]).getBytes()), + // parameters (null) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '') + ])); + } + return params; +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 90577: +======= +/***/ 84418: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Password-Based Key-Derivation Function #2 implementation. + * + * See RFC 2898 for details. + * + * @author Dave Longley + * + * Copyright (c) 2010-2013 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(8209); +__nccwpck_require__(2439); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(46773); +__nccwpck_require__(80554); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var pkcs5 = forge.pkcs5 = forge.pkcs5 || {}; + +var crypto; +if(forge.util.isNodejs && !forge.options.usePureJavaScript) { + crypto = __nccwpck_require__(6113); +} + +/** + * Derives a key from a password. + * + * @param p the password as a binary-encoded string of bytes. + * @param s the salt as a binary-encoded string of bytes. + * @param c the iteration count, a positive integer. + * @param dkLen the intended length, in bytes, of the derived key, + * (max: 2^32 - 1) * hash length of the PRF. + * @param [md] the message digest (or algorithm identifier as a string) to use + * in the PRF, defaults to SHA-1. + * @param [callback(err, key)] presence triggers asynchronous version, called + * once the operation completes. + * + * @return the derived key, as a binary-encoded string of bytes, for the + * synchronous version (if no callback is specified). + */ +module.exports = forge.pbkdf2 = pkcs5.pbkdf2 = function( + p, s, c, dkLen, md, callback) { + if(typeof md === 'function') { + callback = md; + md = null; + } + + // use native implementation if possible and not disabled, note that + // some node versions only support SHA-1, others allow digest to be changed + if(forge.util.isNodejs && !forge.options.usePureJavaScript && + crypto.pbkdf2 && (md === null || typeof md !== 'object') && + (crypto.pbkdf2Sync.length > 4 || (!md || md === 'sha1'))) { + if(typeof md !== 'string') { + // default prf to SHA-1 + md = 'sha1'; + } + p = Buffer.from(p, 'binary'); + s = Buffer.from(s, 'binary'); + if(!callback) { + if(crypto.pbkdf2Sync.length === 4) { + return crypto.pbkdf2Sync(p, s, c, dkLen).toString('binary'); + } + return crypto.pbkdf2Sync(p, s, c, dkLen, md).toString('binary'); + } + if(crypto.pbkdf2Sync.length === 4) { + return crypto.pbkdf2(p, s, c, dkLen, function(err, key) { + if(err) { + return callback(err); + } + callback(null, key.toString('binary')); + }); + } + return crypto.pbkdf2(p, s, c, dkLen, md, function(err, key) { + if(err) { + return callback(err); + } + callback(null, key.toString('binary')); + }); + } + + if(typeof md === 'undefined' || md === null) { + // default prf to SHA-1 + md = 'sha1'; + } + if(typeof md === 'string') { + if(!(md in forge.md.algorithms)) { + throw new Error('Unknown hash algorithm: ' + md); + } + md = forge.md[md].create(); + } + + var hLen = md.digestLength; + + /* 1. If dkLen > (2^32 - 1) * hLen, output "derived key too long" and + stop. */ + if(dkLen > (0xFFFFFFFF * hLen)) { + var err = new Error('Derived key is too long.'); + if(callback) { + return callback(err); + } + throw err; + } + + /* 2. Let len be the number of hLen-octet blocks in the derived key, + rounding up, and let r be the number of octets in the last + block: + + len = CEIL(dkLen / hLen), + r = dkLen - (len - 1) * hLen. */ + var len = Math.ceil(dkLen / hLen); + var r = dkLen - (len - 1) * hLen; + + /* 3. For each block of the derived key apply the function F defined + below to the password P, the salt S, the iteration count c, and + the block index to compute the block: + + T_1 = F(P, S, c, 1), + T_2 = F(P, S, c, 2), + ... + T_len = F(P, S, c, len), + + where the function F is defined as the exclusive-or sum of the + first c iterates of the underlying pseudorandom function PRF + applied to the password P and the concatenation of the salt S + and the block index i: + + F(P, S, c, i) = u_1 XOR u_2 XOR ... XOR u_c + + where + + u_1 = PRF(P, S || INT(i)), + u_2 = PRF(P, u_1), + ... + u_c = PRF(P, u_{c-1}). + + Here, INT(i) is a four-octet encoding of the integer i, most + significant octet first. */ + var prf = forge.hmac.create(); + prf.start(md, p); + var dk = ''; + var xor, u_c, u_c1; + + // sync version + if(!callback) { + for(var i = 1; i <= len; ++i) { + // PRF(P, S || INT(i)) (first iteration) + prf.start(null, null); + prf.update(s); + prf.update(forge.util.int32ToBytes(i)); + xor = u_c1 = prf.digest().getBytes(); + + // PRF(P, u_{c-1}) (other iterations) + for(var j = 2; j <= c; ++j) { + prf.start(null, null); + prf.update(u_c1); + u_c = prf.digest().getBytes(); + // F(p, s, c, i) + xor = forge.util.xorBytes(xor, u_c, hLen); + u_c1 = u_c; + } + + /* 4. Concatenate the blocks and extract the first dkLen octets to + produce a derived key DK: + + DK = T_1 || T_2 || ... || T_len<0..r-1> */ + dk += (i < len) ? xor : xor.substr(0, r); + } + /* 5. Output the derived key DK. */ + return dk; + } + + // async version + var i = 1, j; + function outer() { + if(i > len) { + // done + return callback(null, dk); + } + + // PRF(P, S || INT(i)) (first iteration) + prf.start(null, null); + prf.update(s); + prf.update(forge.util.int32ToBytes(i)); + xor = u_c1 = prf.digest().getBytes(); + + // PRF(P, u_{c-1}) (other iterations) + j = 2; + inner(); + } + + function inner() { + if(j <= c) { + prf.start(null, null); + prf.update(u_c1); + u_c = prf.digest().getBytes(); + // F(p, s, c, i) + xor = forge.util.xorBytes(xor, u_c, hLen); + u_c1 = u_c; + ++j; + return forge.util.setImmediate(inner); + } + + /* 4. Concatenate the blocks and extract the first dkLen octets to + produce a derived key DK: + + DK = T_1 || T_2 || ... || T_len<0..r-1> */ + dk += (i < len) ? xor : xor.substr(0, r); + + ++i; + outer(); + } + + outer(); +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 44214: +======= +/***/ 57334: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Javascript implementation of basic PEM (Privacy Enhanced Mail) algorithms. + * + * See: RFC 1421. + * + * @author Dave Longley + * + * Copyright (c) 2013-2014 Digital Bazaar, Inc. + * + * A Forge PEM object has the following fields: + * + * type: identifies the type of message (eg: "RSA PRIVATE KEY"). + * + * procType: identifies the type of processing performed on the message, + * it has two subfields: version and type, eg: 4,ENCRYPTED. + * + * contentDomain: identifies the type of content in the message, typically + * only uses the value: "RFC822". + * + * dekInfo: identifies the message encryption algorithm and mode and includes + * any parameters for the algorithm, it has two subfields: algorithm and + * parameters, eg: DES-CBC,F8143EDE5960C597. + * + * headers: contains all other PEM encapsulated headers -- where order is + * significant (for pairing data like recipient ID + key info). + * + * body: the binary-encoded body. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// shortcut for pem API +var pem = module.exports = forge.pem = forge.pem || {}; + +/** + * Encodes (serializes) the given PEM object. + * + * @param msg the PEM message object to encode. + * @param options the options to use: + * maxline the maximum characters per line for the body, (default: 64). + * + * @return the PEM-formatted string. + */ +pem.encode = function(msg, options) { + options = options || {}; + var rval = '-----BEGIN ' + msg.type + '-----\r\n'; + + // encode special headers + var header; + if(msg.procType) { + header = { + name: 'Proc-Type', + values: [String(msg.procType.version), msg.procType.type] + }; + rval += foldHeader(header); + } + if(msg.contentDomain) { + header = {name: 'Content-Domain', values: [msg.contentDomain]}; + rval += foldHeader(header); + } + if(msg.dekInfo) { + header = {name: 'DEK-Info', values: [msg.dekInfo.algorithm]}; + if(msg.dekInfo.parameters) { + header.values.push(msg.dekInfo.parameters); + } + rval += foldHeader(header); + } + + if(msg.headers) { + // encode all other headers + for(var i = 0; i < msg.headers.length; ++i) { + rval += foldHeader(msg.headers[i]); + } + } + + // terminate header + if(msg.procType) { + rval += '\r\n'; + } + + // add body + rval += forge.util.encode64(msg.body, options.maxline || 64) + '\r\n'; + + rval += '-----END ' + msg.type + '-----\r\n'; + return rval; +}; + +/** + * Decodes (deserializes) all PEM messages found in the given string. + * + * @param str the PEM-formatted string to decode. + * + * @return the PEM message objects in an array. + */ +pem.decode = function(str) { + var rval = []; + + // split string into PEM messages (be lenient w/EOF on BEGIN line) + var rMessage = /\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g; + var rHeader = /([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/; + var rCRLF = /\r?\n/; + var match; + while(true) { + match = rMessage.exec(str); + if(!match) { + break; + } + + // accept "NEW CERTIFICATE REQUEST" as "CERTIFICATE REQUEST" + // https://datatracker.ietf.org/doc/html/rfc7468#section-7 + var type = match[1]; + if(type === 'NEW CERTIFICATE REQUEST') { + type = 'CERTIFICATE REQUEST'; + } + + var msg = { + type: type, + procType: null, + contentDomain: null, + dekInfo: null, + headers: [], + body: forge.util.decode64(match[3]) + }; + rval.push(msg); + + // no headers + if(!match[2]) { + continue; + } + + // parse headers + var lines = match[2].split(rCRLF); + var li = 0; + while(match && li < lines.length) { + // get line, trim any rhs whitespace + var line = lines[li].replace(/\s+$/, ''); + + // RFC2822 unfold any following folded lines + for(var nl = li + 1; nl < lines.length; ++nl) { + var next = lines[nl]; + if(!/\s/.test(next[0])) { + break; + } + line += next; + li = nl; + } + + // parse header + match = line.match(rHeader); + if(match) { + var header = {name: match[1], values: []}; + var values = match[2].split(','); + for(var vi = 0; vi < values.length; ++vi) { + header.values.push(ltrim(values[vi])); + } + + // Proc-Type must be the first header + if(!msg.procType) { + if(header.name !== 'Proc-Type') { + throw new Error('Invalid PEM formatted message. The first ' + + 'encapsulated header must be "Proc-Type".'); + } else if(header.values.length !== 2) { + throw new Error('Invalid PEM formatted message. The "Proc-Type" ' + + 'header must have two subfields.'); + } + msg.procType = {version: values[0], type: values[1]}; + } else if(!msg.contentDomain && header.name === 'Content-Domain') { + // special-case Content-Domain + msg.contentDomain = values[0] || ''; + } else if(!msg.dekInfo && header.name === 'DEK-Info') { + // special-case DEK-Info + if(header.values.length === 0) { + throw new Error('Invalid PEM formatted message. The "DEK-Info" ' + + 'header must have at least one subfield.'); + } + msg.dekInfo = {algorithm: values[0], parameters: values[1] || null}; + } else { + msg.headers.push(header); + } + } + + ++li; + } + + if(msg.procType === 'ENCRYPTED' && !msg.dekInfo) { + throw new Error('Invalid PEM formatted message. The "DEK-Info" ' + + 'header must be present if "Proc-Type" is "ENCRYPTED".'); + } + } + + if(rval.length === 0) { + throw new Error('Invalid PEM formatted message.'); + } + + return rval; +}; + +function foldHeader(header) { + var rval = header.name + ': '; + + // ensure values with CRLF are folded + var values = []; + var insertSpace = function(match, $1) { + return ' ' + $1; + }; + for(var i = 0; i < header.values.length; ++i) { + values.push(header.values[i].replace(/^(\S+\r\n)/, insertSpace)); + } + rval += values.join(',') + '\r\n'; + + // do folding + var length = 0; + var candidate = -1; + for(var i = 0; i < rval.length; ++i, ++length) { + if(length > 65 && candidate !== -1) { + var insert = rval[candidate]; + if(insert === ',') { + ++candidate; + rval = rval.substr(0, candidate) + '\r\n ' + rval.substr(candidate); + } else { + rval = rval.substr(0, candidate) + + '\r\n' + insert + rval.substr(candidate + 1); + } + length = (i - candidate - 1); + candidate = -1; + ++i; + } else if(rval[i] === ' ' || rval[i] === '\t' || rval[i] === ',') { + candidate = i; + } + } + + return rval; +} + +function ltrim(str) { + return str.replace(/^\s+/, ''); +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 96096: +======= +/***/ 39703: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Partial implementation of PKCS#1 v2.2: RSA-OEAP + * + * Modified but based on the following MIT and BSD licensed code: + * + * https://github.com/kjur/jsjws/blob/master/rsa.js: + * + * The 'jsjws'(JSON Web Signature JavaScript Library) License + * + * Copyright (c) 2012 Kenji Urushima + * + * 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. + * + * http://webrsa.cvs.sourceforge.net/viewvc/webrsa/Client/RSAES-OAEP.js?content-type=text%2Fplain: + * + * RSAES-OAEP.js + * $Id: RSAES-OAEP.js,v 1.1.1.1 2003/03/19 15:37:20 ellispritchard Exp $ + * JavaScript Implementation of PKCS #1 v2.1 RSA CRYPTOGRAPHY STANDARD (RSA Laboratories, June 14, 2002) + * Copyright (C) Ellis Pritchard, Guardian Unlimited 2003. + * Contact: ellis@nukinetics.com + * Distributed under the BSD License. + * + * Official documentation: http://www.rsa.com/rsalabs/node.asp?id=2125 + * + * @author Evan Jones (http://evanjones.ca/) + * @author Dave Longley + * + * Copyright (c) 2013-2014 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(19239); +__nccwpck_require__(35283); +__nccwpck_require__(69970); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(36536); +__nccwpck_require__(68737); +__nccwpck_require__(41447); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// shortcut for PKCS#1 API +var pkcs1 = module.exports = forge.pkcs1 = forge.pkcs1 || {}; + +/** + * Encode the given RSAES-OAEP message (M) using key, with optional label (L) + * and seed. + * + * This method does not perform RSA encryption, it only encodes the message + * using RSAES-OAEP. + * + * @param key the RSA key to use. + * @param message the message to encode. + * @param options the options to use: + * label an optional label to use. + * seed the seed to use. + * md the message digest object to use, undefined for SHA-1. + * mgf1 optional mgf1 parameters: + * md the message digest object to use for MGF1. + * + * @return the encoded message bytes. + */ +pkcs1.encode_rsa_oaep = function(key, message, options) { + // parse arguments + var label; + var seed; + var md; + var mgf1Md; + // legacy args (label, seed, md) + if(typeof options === 'string') { + label = options; + seed = arguments[3] || undefined; + md = arguments[4] || undefined; + } else if(options) { + label = options.label || undefined; + seed = options.seed || undefined; + md = options.md || undefined; + if(options.mgf1 && options.mgf1.md) { + mgf1Md = options.mgf1.md; + } + } + + // default OAEP to SHA-1 message digest + if(!md) { + md = forge.md.sha1.create(); + } else { + md.start(); + } + + // default MGF-1 to same as OAEP + if(!mgf1Md) { + mgf1Md = md; + } + + // compute length in bytes and check output + var keyLength = Math.ceil(key.n.bitLength() / 8); + var maxLength = keyLength - 2 * md.digestLength - 2; + if(message.length > maxLength) { + var error = new Error('RSAES-OAEP input message length is too long.'); + error.length = message.length; + error.maxLength = maxLength; + throw error; + } + + if(!label) { + label = ''; + } + md.update(label, 'raw'); + var lHash = md.digest(); + + var PS = ''; + var PS_length = maxLength - message.length; + for(var i = 0; i < PS_length; i++) { + PS += '\x00'; + } + + var DB = lHash.getBytes() + PS + '\x01' + message; + + if(!seed) { + seed = forge.random.getBytes(md.digestLength); + } else if(seed.length !== md.digestLength) { + var error = new Error('Invalid RSAES-OAEP seed. The seed length must ' + + 'match the digest length.'); + error.seedLength = seed.length; + error.digestLength = md.digestLength; + throw error; + } + + var dbMask = rsa_mgf1(seed, keyLength - md.digestLength - 1, mgf1Md); + var maskedDB = forge.util.xorBytes(DB, dbMask, DB.length); + + var seedMask = rsa_mgf1(maskedDB, md.digestLength, mgf1Md); + var maskedSeed = forge.util.xorBytes(seed, seedMask, seed.length); + + // return encoded message + return '\x00' + maskedSeed + maskedDB; +}; + +/** + * Decode the given RSAES-OAEP encoded message (EM) using key, with optional + * label (L). + * + * This method does not perform RSA decryption, it only decodes the message + * using RSAES-OAEP. + * + * @param key the RSA key to use. + * @param em the encoded message to decode. + * @param options the options to use: + * label an optional label to use. + * md the message digest object to use for OAEP, undefined for SHA-1. + * mgf1 optional mgf1 parameters: + * md the message digest object to use for MGF1. + * + * @return the decoded message bytes. + */ +pkcs1.decode_rsa_oaep = function(key, em, options) { + // parse args + var label; + var md; + var mgf1Md; + // legacy args + if(typeof options === 'string') { + label = options; + md = arguments[3] || undefined; + } else if(options) { + label = options.label || undefined; + md = options.md || undefined; + if(options.mgf1 && options.mgf1.md) { + mgf1Md = options.mgf1.md; + } + } + + // compute length in bytes + var keyLength = Math.ceil(key.n.bitLength() / 8); + + if(em.length !== keyLength) { + var error = new Error('RSAES-OAEP encoded message length is invalid.'); + error.length = em.length; + error.expectedLength = keyLength; + throw error; + } + + // default OAEP to SHA-1 message digest + if(md === undefined) { + md = forge.md.sha1.create(); + } else { + md.start(); + } + + // default MGF-1 to same as OAEP + if(!mgf1Md) { + mgf1Md = md; + } + + if(keyLength < 2 * md.digestLength + 2) { + throw new Error('RSAES-OAEP key is too short for the hash function.'); + } + + if(!label) { + label = ''; + } + md.update(label, 'raw'); + var lHash = md.digest().getBytes(); + + // split the message into its parts + var y = em.charAt(0); + var maskedSeed = em.substring(1, md.digestLength + 1); + var maskedDB = em.substring(1 + md.digestLength); + + var seedMask = rsa_mgf1(maskedDB, md.digestLength, mgf1Md); + var seed = forge.util.xorBytes(maskedSeed, seedMask, maskedSeed.length); + + var dbMask = rsa_mgf1(seed, keyLength - md.digestLength - 1, mgf1Md); + var db = forge.util.xorBytes(maskedDB, dbMask, maskedDB.length); + + var lHashPrime = db.substring(0, md.digestLength); + + // constant time check that all values match what is expected + var error = (y !== '\x00'); + + // constant time check lHash vs lHashPrime + for(var i = 0; i < md.digestLength; ++i) { + error |= (lHash.charAt(i) !== lHashPrime.charAt(i)); + } + + // "constant time" find the 0x1 byte separating the padding (zeros) from the + // message + // TODO: It must be possible to do this in a better/smarter way? + var in_ps = 1; + var index = md.digestLength; + for(var j = md.digestLength; j < db.length; j++) { + var code = db.charCodeAt(j); + + var is_0 = (code & 0x1) ^ 0x1; + + // non-zero if not 0 or 1 in the ps section + var error_mask = in_ps ? 0xfffe : 0x0000; + error |= (code & error_mask); + + // latch in_ps to zero after we find 0x1 + in_ps = in_ps & is_0; + index += in_ps; + } + + if(error || db.charCodeAt(index) !== 0x1) { + throw new Error('Invalid RSAES-OAEP padding.'); + } + + return db.substring(index + 1); +}; + +function rsa_mgf1(seed, maskLength, hash) { + // default to SHA-1 message digest + if(!hash) { + hash = forge.md.sha1.create(); + } + var t = ''; + var count = Math.ceil(maskLength / hash.digestLength); + for(var i = 0; i < count; ++i) { + var c = String.fromCharCode( + (i >> 24) & 0xFF, (i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF); + hash.start(); + hash.update(seed + c); + t += hash.digest().getBytes(); + } + return t.substring(0, maskLength); +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 22679: +======= +/***/ 93254: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Prime number generation API. + * + * @author Dave Longley + * + * Copyright (c) 2014 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(19239); +__nccwpck_require__(21686); +__nccwpck_require__(35283); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(36536); +__nccwpck_require__(121); +__nccwpck_require__(68737); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +(function() { + +// forge.prime already defined +if(forge.prime) { + module.exports = forge.prime; + return; +} + +/* PRIME API */ +var prime = module.exports = forge.prime = forge.prime || {}; + +var BigInteger = forge.jsbn.BigInteger; + +// primes are 30k+i for i = 1, 7, 11, 13, 17, 19, 23, 29 +var GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2]; +var THIRTY = new BigInteger(null); +THIRTY.fromInt(30); +var op_or = function(x, y) {return x|y;}; + +/** + * Generates a random probable prime with the given number of bits. + * + * Alternative algorithms can be specified by name as a string or as an + * object with custom options like so: + * + * { + * name: 'PRIMEINC', + * options: { + * maxBlockTime: , + * millerRabinTests: , + * workerScript: , + * workers: . + * workLoad: the size of the work load, ie: number of possible prime + * numbers for each web worker to check per work assignment, + * (default: 100). + * } + * } + * + * @param bits the number of bits for the prime number. + * @param options the options to use. + * [algorithm] the algorithm to use (default: 'PRIMEINC'). + * [prng] a custom crypto-secure pseudo-random number generator to use, + * that must define "getBytesSync". + * + * @return callback(err, num) called once the operation completes. + */ +prime.generateProbablePrime = function(bits, options, callback) { + if(typeof options === 'function') { + callback = options; + options = {}; + } + options = options || {}; + + // default to PRIMEINC algorithm + var algorithm = options.algorithm || 'PRIMEINC'; + if(typeof algorithm === 'string') { + algorithm = {name: algorithm}; + } + algorithm.options = algorithm.options || {}; + + // create prng with api that matches BigInteger secure random + var prng = options.prng || forge.random; + var rng = { + // x is an array to fill with bytes + nextBytes: function(x) { + var b = prng.getBytesSync(x.length); + for(var i = 0; i < x.length; ++i) { + x[i] = b.charCodeAt(i); + } + } + }; + + if(algorithm.name === 'PRIMEINC') { + return primeincFindPrime(bits, rng, algorithm.options, callback); + } + + throw new Error('Invalid prime generation algorithm: ' + algorithm.name); +}; + +function primeincFindPrime(bits, rng, options, callback) { + if('workers' in options) { + return primeincFindPrimeWithWorkers(bits, rng, options, callback); + } + return primeincFindPrimeWithoutWorkers(bits, rng, options, callback); +} + +function primeincFindPrimeWithoutWorkers(bits, rng, options, callback) { + // initialize random number + var num = generateRandom(bits, rng); + + /* Note: All primes are of the form 30k+i for i < 30 and gcd(30, i)=1. The + number we are given is always aligned at 30k + 1. Each time the number is + determined not to be prime we add to get to the next 'i', eg: if the number + was at 30k + 1 we add 6. */ + var deltaIdx = 0; + + // get required number of MR tests + var mrTests = getMillerRabinTests(num.bitLength()); + if('millerRabinTests' in options) { + mrTests = options.millerRabinTests; + } + + // find prime nearest to 'num' for maxBlockTime ms + // 10 ms gives 5ms of leeway for other calculations before dropping + // below 60fps (1000/60 == 16.67), but in reality, the number will + // likely be higher due to an 'atomic' big int modPow + var maxBlockTime = 10; + if('maxBlockTime' in options) { + maxBlockTime = options.maxBlockTime; + } + + _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback); +} + +function _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback) { + var start = +new Date(); + do { + // overflow, regenerate random number + if(num.bitLength() > bits) { + num = generateRandom(bits, rng); + } + // do primality test + if(num.isProbablePrime(mrTests)) { + return callback(null, num); + } + // get next potential prime + num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0); + } while(maxBlockTime < 0 || (+new Date() - start < maxBlockTime)); + + // keep trying later + forge.util.setImmediate(function() { + _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback); + }); +} + +// NOTE: This algorithm is indeterminate in nature because workers +// run in parallel looking at different segments of numbers. Even if this +// algorithm is run twice with the same input from a predictable RNG, it +// may produce different outputs. +function primeincFindPrimeWithWorkers(bits, rng, options, callback) { + // web workers unavailable + if(typeof Worker === 'undefined') { + return primeincFindPrimeWithoutWorkers(bits, rng, options, callback); + } + + // initialize random number + var num = generateRandom(bits, rng); + + // use web workers to generate keys + var numWorkers = options.workers; + var workLoad = options.workLoad || 100; + var range = workLoad * 30 / 8; + var workerScript = options.workerScript || 'forge/prime.worker.js'; + if(numWorkers === -1) { + return forge.util.estimateCores(function(err, cores) { + if(err) { + // default to 2 + cores = 2; + } + numWorkers = cores - 1; + generate(); + }); + } + generate(); + + function generate() { + // require at least 1 worker + numWorkers = Math.max(1, numWorkers); + + // TODO: consider optimizing by starting workers outside getPrime() ... + // note that in order to clean up they will have to be made internally + // asynchronous which may actually be slower + + // start workers immediately + var workers = []; + for(var i = 0; i < numWorkers; ++i) { + // FIXME: fix path or use blob URLs + workers[i] = new Worker(workerScript); + } + var running = numWorkers; + + // listen for requests from workers and assign ranges to find prime + for(var i = 0; i < numWorkers; ++i) { + workers[i].addEventListener('message', workerMessage); + } + + /* Note: The distribution of random numbers is unknown. Therefore, each + web worker is continuously allocated a range of numbers to check for a + random number until one is found. + + Every 30 numbers will be checked just 8 times, because prime numbers + have the form: + + 30k+i, for i < 30 and gcd(30, i)=1 (there are 8 values of i for this) + + Therefore, if we want a web worker to run N checks before asking for + a new range of numbers, each range must contain N*30/8 numbers. + + For 100 checks (workLoad), this is a range of 375. */ + + var found = false; + function workerMessage(e) { + // ignore message, prime already found + if(found) { + return; + } + + --running; + var data = e.data; + if(data.found) { + // terminate all workers + for(var i = 0; i < workers.length; ++i) { + workers[i].terminate(); + } + found = true; + return callback(null, new BigInteger(data.prime, 16)); + } + + // overflow, regenerate random number + if(num.bitLength() > bits) { + num = generateRandom(bits, rng); + } + + // assign new range to check + var hex = num.toString(16); + + // start prime search + e.target.postMessage({ + hex: hex, + workLoad: workLoad + }); + + num.dAddOffset(range, 0); + } + } +} + +/** + * Generates a random number using the given number of bits and RNG. + * + * @param bits the number of bits for the number. + * @param rng the random number generator to use. + * + * @return the random number. + */ +function generateRandom(bits, rng) { + var num = new BigInteger(bits, rng); + // force MSB set + var bits1 = bits - 1; + if(!num.testBit(bits1)) { + num.bitwiseTo(BigInteger.ONE.shiftLeft(bits1), op_or, num); + } + // align number on 30k+1 boundary + num.dAddOffset(31 - num.mod(THIRTY).byteValue(), 0); + return num; +} + +/** + * Returns the required number of Miller-Rabin tests to generate a + * prime with an error probability of (1/2)^80. + * + * See Handbook of Applied Cryptography Chapter 4, Table 4.4. + * + * @param bits the bit size. + * + * @return the required number of iterations. + */ +function getMillerRabinTests(bits) { + if(bits <= 100) return 27; + if(bits <= 150) return 18; + if(bits <= 200) return 15; + if(bits <= 250) return 12; + if(bits <= 300) return 9; + if(bits <= 350) return 8; + if(bits <= 400) return 7; + if(bits <= 500) return 6; + if(bits <= 600) return 5; + if(bits <= 800) return 4; + if(bits <= 1250) return 3; + return 2; +} + +})(); + + +/***/ }), + +<<<<<<< HEAD +/***/ 26866: +======= +/***/ 37747: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * A javascript implementation of a cryptographically-secure + * Pseudo Random Number Generator (PRNG). The Fortuna algorithm is followed + * here though the use of SHA-256 is not enforced; when generating an + * a PRNG context, the hashing algorithm and block cipher used for + * the generator are specified via a plugin. + * + * @author Dave Longley + * + * Copyright (c) 2010-2014 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var _crypto = null; +if(forge.util.isNodejs && !forge.options.usePureJavaScript && + !process.versions['node-webkit']) { + _crypto = __nccwpck_require__(6113); +} + +/* PRNG API */ +var prng = module.exports = forge.prng = forge.prng || {}; + +/** + * Creates a new PRNG context. + * + * A PRNG plugin must be passed in that will provide: + * + * 1. A function that initializes the key and seed of a PRNG context. It + * will be given a 16 byte key and a 16 byte seed. Any key expansion + * or transformation of the seed from a byte string into an array of + * integers (or similar) should be performed. + * 2. The cryptographic function used by the generator. It takes a key and + * a seed. + * 3. A seed increment function. It takes the seed and returns seed + 1. + * 4. An api to create a message digest. + * + * For an example, see random.js. + * + * @param plugin the PRNG plugin to use. + */ +prng.create = function(plugin) { + var ctx = { + plugin: plugin, + key: null, + seed: null, + time: null, + // number of reseeds so far + reseeds: 0, + // amount of data generated so far + generated: 0, + // no initial key bytes + keyBytes: '' + }; + + // create 32 entropy pools (each is a message digest) + var md = plugin.md; + var pools = new Array(32); + for(var i = 0; i < 32; ++i) { + pools[i] = md.create(); + } + ctx.pools = pools; + + // entropy pools are written to cyclically, starting at index 0 + ctx.pool = 0; + + /** + * Generates random bytes. The bytes may be generated synchronously or + * asynchronously. Web workers must use the asynchronous interface or + * else the behavior is undefined. + * + * @param count the number of random bytes to generate. + * @param [callback(err, bytes)] called once the operation completes. + * + * @return count random bytes as a string. + */ + ctx.generate = function(count, callback) { + // do synchronously + if(!callback) { + return ctx.generateSync(count); + } + + // simple generator using counter-based CBC + var cipher = ctx.plugin.cipher; + var increment = ctx.plugin.increment; + var formatKey = ctx.plugin.formatKey; + var formatSeed = ctx.plugin.formatSeed; + var b = forge.util.createBuffer(); + + // paranoid deviation from Fortuna: + // reset key for every request to protect previously + // generated random bytes should the key be discovered; + // there is no 100ms based reseeding because of this + // forced reseed for every `generate` call + ctx.key = null; + + generate(); + + function generate(err) { + if(err) { + return callback(err); + } + + // sufficient bytes generated + if(b.length() >= count) { + return callback(null, b.getBytes(count)); + } + + // if amount of data generated is greater than 1 MiB, trigger reseed + if(ctx.generated > 0xfffff) { + ctx.key = null; + } + + if(ctx.key === null) { + // prevent stack overflow + return forge.util.nextTick(function() { + _reseed(generate); + }); + } + + // generate the random bytes + var bytes = cipher(ctx.key, ctx.seed); + ctx.generated += bytes.length; + b.putBytes(bytes); + + // generate bytes for a new key and seed + ctx.key = formatKey(cipher(ctx.key, increment(ctx.seed))); + ctx.seed = formatSeed(cipher(ctx.key, ctx.seed)); + + forge.util.setImmediate(generate); + } + }; + + /** + * Generates random bytes synchronously. + * + * @param count the number of random bytes to generate. + * + * @return count random bytes as a string. + */ + ctx.generateSync = function(count) { + // simple generator using counter-based CBC + var cipher = ctx.plugin.cipher; + var increment = ctx.plugin.increment; + var formatKey = ctx.plugin.formatKey; + var formatSeed = ctx.plugin.formatSeed; + + // paranoid deviation from Fortuna: + // reset key for every request to protect previously + // generated random bytes should the key be discovered; + // there is no 100ms based reseeding because of this + // forced reseed for every `generateSync` call + ctx.key = null; + + var b = forge.util.createBuffer(); + while(b.length() < count) { + // if amount of data generated is greater than 1 MiB, trigger reseed + if(ctx.generated > 0xfffff) { + ctx.key = null; + } + + if(ctx.key === null) { + _reseedSync(); + } + + // generate the random bytes + var bytes = cipher(ctx.key, ctx.seed); + ctx.generated += bytes.length; + b.putBytes(bytes); + + // generate bytes for a new key and seed + ctx.key = formatKey(cipher(ctx.key, increment(ctx.seed))); + ctx.seed = formatSeed(cipher(ctx.key, ctx.seed)); + } + + return b.getBytes(count); + }; + + /** + * Private function that asynchronously reseeds a generator. + * + * @param callback(err) called once the operation completes. + */ + function _reseed(callback) { + if(ctx.pools[0].messageLength >= 32) { + _seed(); + return callback(); + } + // not enough seed data... + var needed = (32 - ctx.pools[0].messageLength) << 5; + ctx.seedFile(needed, function(err, bytes) { + if(err) { + return callback(err); + } + ctx.collect(bytes); + _seed(); + callback(); + }); + } + + /** + * Private function that synchronously reseeds a generator. + */ + function _reseedSync() { + if(ctx.pools[0].messageLength >= 32) { + return _seed(); + } + // not enough seed data... + var needed = (32 - ctx.pools[0].messageLength) << 5; + ctx.collect(ctx.seedFileSync(needed)); + _seed(); + } + + /** + * Private function that seeds a generator once enough bytes are available. + */ + function _seed() { + // update reseed count + ctx.reseeds = (ctx.reseeds === 0xffffffff) ? 0 : ctx.reseeds + 1; + + // goal is to update `key` via: + // key = hash(key + s) + // where 's' is all collected entropy from selected pools, then... + + // create a plugin-based message digest + var md = ctx.plugin.md.create(); + + // consume current key bytes + md.update(ctx.keyBytes); + + // digest the entropy of pools whose index k meet the + // condition 'n mod 2^k == 0' where n is the number of reseeds + var _2powK = 1; + for(var k = 0; k < 32; ++k) { + if(ctx.reseeds % _2powK === 0) { + md.update(ctx.pools[k].digest().getBytes()); + ctx.pools[k].start(); + } + _2powK = _2powK << 1; + } + + // get digest for key bytes + ctx.keyBytes = md.digest().getBytes(); + + // paranoid deviation from Fortuna: + // update `seed` via `seed = hash(key)` + // instead of initializing to zero once and only + // ever incrementing it + md.start(); + md.update(ctx.keyBytes); + var seedBytes = md.digest().getBytes(); + + // update state + ctx.key = ctx.plugin.formatKey(ctx.keyBytes); + ctx.seed = ctx.plugin.formatSeed(seedBytes); + ctx.generated = 0; + } + + /** + * The built-in default seedFile. This seedFile is used when entropy + * is needed immediately. + * + * @param needed the number of bytes that are needed. + * + * @return the random bytes. + */ + function defaultSeedFile(needed) { + // use window.crypto.getRandomValues strong source of entropy if available + var getRandomValues = null; + var globalScope = forge.util.globalScope; + var _crypto = globalScope.crypto || globalScope.msCrypto; + if(_crypto && _crypto.getRandomValues) { + getRandomValues = function(arr) { + return _crypto.getRandomValues(arr); + }; + } + + var b = forge.util.createBuffer(); + if(getRandomValues) { + while(b.length() < needed) { + // max byte length is 65536 before QuotaExceededError is thrown + // http://www.w3.org/TR/WebCryptoAPI/#RandomSource-method-getRandomValues + var count = Math.max(1, Math.min(needed - b.length(), 65536) / 4); + var entropy = new Uint32Array(Math.floor(count)); + try { + getRandomValues(entropy); + for(var i = 0; i < entropy.length; ++i) { + b.putInt32(entropy[i]); + } + } catch(e) { + /* only ignore QuotaExceededError */ + if(!(typeof QuotaExceededError !== 'undefined' && + e instanceof QuotaExceededError)) { + throw e; + } + } + } + } + + // be sad and add some weak random data + if(b.length() < needed) { + /* Draws from Park-Miller "minimal standard" 31 bit PRNG, + implemented with David G. Carta's optimization: with 32 bit math + and without division (Public Domain). */ + var hi, lo, next; + var seed = Math.floor(Math.random() * 0x010000); + while(b.length() < needed) { + lo = 16807 * (seed & 0xFFFF); + hi = 16807 * (seed >> 16); + lo += (hi & 0x7FFF) << 16; + lo += hi >> 15; + lo = (lo & 0x7FFFFFFF) + (lo >> 31); + seed = lo & 0xFFFFFFFF; + + // consume lower 3 bytes of seed + for(var i = 0; i < 3; ++i) { + // throw in more pseudo random + next = seed >>> (i << 3); + next ^= Math.floor(Math.random() * 0x0100); + b.putByte(next & 0xFF); + } + } + } + + return b.getBytes(needed); + } + // initialize seed file APIs + if(_crypto) { + // use nodejs async API + ctx.seedFile = function(needed, callback) { + _crypto.randomBytes(needed, function(err, bytes) { + if(err) { + return callback(err); + } + callback(null, bytes.toString()); + }); + }; + // use nodejs sync API + ctx.seedFileSync = function(needed) { + return _crypto.randomBytes(needed).toString(); + }; + } else { + ctx.seedFile = function(needed, callback) { + try { + callback(null, defaultSeedFile(needed)); + } catch(e) { + callback(e); + } + }; + ctx.seedFileSync = defaultSeedFile; + } + + /** + * Adds entropy to a prng ctx's accumulator. + * + * @param bytes the bytes of entropy as a string. + */ + ctx.collect = function(bytes) { + // iterate over pools distributing entropy cyclically + var count = bytes.length; + for(var i = 0; i < count; ++i) { + ctx.pools[ctx.pool].update(bytes.substr(i, 1)); + ctx.pool = (ctx.pool === 31) ? 0 : ctx.pool + 1; + } + }; + + /** + * Collects an integer of n bits. + * + * @param i the integer entropy. + * @param n the number of bits in the integer. + */ + ctx.collectInt = function(i, n) { + var bytes = ''; + for(var x = 0; x < n; x += 8) { + bytes += String.fromCharCode((i >> x) & 0xFF); + } + ctx.collect(bytes); + }; + + /** + * Registers a Web Worker to receive immediate entropy from the main thread. + * This method is required until Web Workers can access the native crypto + * API. This method should be called twice for each created worker, once in + * the main thread, and once in the worker itself. + * + * @param worker the worker to register. + */ + ctx.registerWorker = function(worker) { + // worker receives random bytes + if(worker === self) { + ctx.seedFile = function(needed, callback) { + function listener(e) { + var data = e.data; + if(data.forge && data.forge.prng) { + self.removeEventListener('message', listener); + callback(data.forge.prng.err, data.forge.prng.bytes); + } + } + self.addEventListener('message', listener); + self.postMessage({forge: {prng: {needed: needed}}}); + }; + } else { + // main thread sends random bytes upon request + var listener = function(e) { + var data = e.data; + if(data.forge && data.forge.prng) { + ctx.seedFile(data.forge.prng.needed, function(err, bytes) { + worker.postMessage({forge: {prng: {err: err, bytes: bytes}}}); + }); + } + }; + // TODO: do we need to remove the event listener when the worker dies? + worker.addEventListener('message', listener); + } + }; + + return ctx; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 35283: +======= +/***/ 68737: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * An API for getting cryptographically-secure random bytes. The bytes are + * generated using the Fortuna algorithm devised by Bruce Schneier and + * Niels Ferguson. + * + * Getting strong random bytes is not yet easy to do in javascript. The only + * truish random entropy that can be collected is from the mouse, keyboard, or + * from timing with respect to page loads, etc. This generator makes a poor + * attempt at providing random bytes when those sources haven't yet provided + * enough entropy to initially seed or to reseed the PRNG. + * + * @author Dave Longley + * + * Copyright (c) 2009-2014 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(25706); +__nccwpck_require__(13809); +__nccwpck_require__(26866); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(16606); +__nccwpck_require__(3241); +__nccwpck_require__(37747); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +(function() { + +// forge.random already defined +if(forge.random && forge.random.getBytes) { + module.exports = forge.random; + return; +} + +(function(jQuery) { + +// the default prng plugin, uses AES-128 +var prng_aes = {}; +var _prng_aes_output = new Array(4); +var _prng_aes_buffer = forge.util.createBuffer(); +prng_aes.formatKey = function(key) { + // convert the key into 32-bit integers + var tmp = forge.util.createBuffer(key); + key = new Array(4); + key[0] = tmp.getInt32(); + key[1] = tmp.getInt32(); + key[2] = tmp.getInt32(); + key[3] = tmp.getInt32(); + + // return the expanded key + return forge.aes._expandKey(key, false); +}; +prng_aes.formatSeed = function(seed) { + // convert seed into 32-bit integers + var tmp = forge.util.createBuffer(seed); + seed = new Array(4); + seed[0] = tmp.getInt32(); + seed[1] = tmp.getInt32(); + seed[2] = tmp.getInt32(); + seed[3] = tmp.getInt32(); + return seed; +}; +prng_aes.cipher = function(key, seed) { + forge.aes._updateBlock(key, seed, _prng_aes_output, false); + _prng_aes_buffer.putInt32(_prng_aes_output[0]); + _prng_aes_buffer.putInt32(_prng_aes_output[1]); + _prng_aes_buffer.putInt32(_prng_aes_output[2]); + _prng_aes_buffer.putInt32(_prng_aes_output[3]); + return _prng_aes_buffer.getBytes(); +}; +prng_aes.increment = function(seed) { + // FIXME: do we care about carry or signed issues? + ++seed[3]; + return seed; +}; +prng_aes.md = forge.md.sha256; + +/** + * Creates a new PRNG. + */ +function spawnPrng() { + var ctx = forge.prng.create(prng_aes); + + /** + * Gets random bytes. If a native secure crypto API is unavailable, this + * method tries to make the bytes more unpredictable by drawing from data that + * can be collected from the user of the browser, eg: mouse movement. + * + * If a callback is given, this method will be called asynchronously. + * + * @param count the number of random bytes to get. + * @param [callback(err, bytes)] called once the operation completes. + * + * @return the random bytes in a string. + */ + ctx.getBytes = function(count, callback) { + return ctx.generate(count, callback); + }; + + /** + * Gets random bytes asynchronously. If a native secure crypto API is + * unavailable, this method tries to make the bytes more unpredictable by + * drawing from data that can be collected from the user of the browser, + * eg: mouse movement. + * + * @param count the number of random bytes to get. + * + * @return the random bytes in a string. + */ + ctx.getBytesSync = function(count) { + return ctx.generate(count); + }; + + return ctx; +} + +// create default prng context +var _ctx = spawnPrng(); + +// add other sources of entropy only if window.crypto.getRandomValues is not +// available -- otherwise this source will be automatically used by the prng +var getRandomValues = null; +var globalScope = forge.util.globalScope; +var _crypto = globalScope.crypto || globalScope.msCrypto; +if(_crypto && _crypto.getRandomValues) { + getRandomValues = function(arr) { + return _crypto.getRandomValues(arr); + }; +} + +if(forge.options.usePureJavaScript || + (!forge.util.isNodejs && !getRandomValues)) { + // if this is a web worker, do not use weak entropy, instead register to + // receive strong entropy asynchronously from the main thread + if(typeof window === 'undefined' || window.document === undefined) { + // FIXME: + } + + // get load time entropy + _ctx.collectInt(+new Date(), 32); + + // add some entropy from navigator object + if(typeof(navigator) !== 'undefined') { + var _navBytes = ''; + for(var key in navigator) { + try { + if(typeof(navigator[key]) == 'string') { + _navBytes += navigator[key]; + } + } catch(e) { + /* Some navigator keys might not be accessible, e.g. the geolocation + attribute throws an exception if touched in Mozilla chrome:// + context. + + Silently ignore this and just don't use this as a source of + entropy. */ + } + } + _ctx.collect(_navBytes); + _navBytes = null; + } + + // add mouse and keyboard collectors if jquery is available + if(jQuery) { + // set up mouse entropy capture + jQuery().mousemove(function(e) { + // add mouse coords + _ctx.collectInt(e.clientX, 16); + _ctx.collectInt(e.clientY, 16); + }); + + // set up keyboard entropy capture + jQuery().keypress(function(e) { + _ctx.collectInt(e.charCode, 8); + }); + } +} + +/* Random API */ +if(!forge.random) { + forge.random = _ctx; +} else { + // extend forge.random with _ctx + for(var key in _ctx) { + forge.random[key] = _ctx[key]; + } +} + +// expose spawn PRNG +forge.random.createInstance = spawnPrng; + +module.exports = forge.random; + +})(typeof(jQuery) !== 'undefined' ? jQuery : null); + +})(); + + +/***/ }), + +<<<<<<< HEAD +/***/ 21828: +======= +/***/ 87938: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * RC2 implementation. + * + * @author Stefan Siegl + * + * Copyright (c) 2012 Stefan Siegl + * + * Information on the RC2 cipher is available from RFC #2268, + * http://www.ietf.org/rfc/rfc2268.txt + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var piTable = [ + 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d, + 0xc6, 0x7e, 0x37, 0x83, 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, 0xfb, 0xa2, + 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32, + 0xbd, 0x8f, 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, 0x5c, 0x6b, 0x4e, 0x82, + 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0xa7, 0x8c, 0xf1, 0xdc, + 0x12, 0x75, 0xca, 0x1f, 0x3b, 0xbe, 0xe4, 0xd1, 0x42, 0x3d, 0xd4, 0x30, 0xa3, 0x3c, 0xb6, 0x26, + 0x6f, 0xbf, 0x0e, 0xda, 0x46, 0x69, 0x07, 0x57, 0x27, 0xf2, 0x1d, 0x9b, 0xbc, 0x94, 0x43, 0x03, + 0xf8, 0x11, 0xc7, 0xf6, 0x90, 0xef, 0x3e, 0xe7, 0x06, 0xc3, 0xd5, 0x2f, 0xc8, 0x66, 0x1e, 0xd7, + 0x08, 0xe8, 0xea, 0xde, 0x80, 0x52, 0xee, 0xf7, 0x84, 0xaa, 0x72, 0xac, 0x35, 0x4d, 0x6a, 0x2a, + 0x96, 0x1a, 0xd2, 0x71, 0x5a, 0x15, 0x49, 0x74, 0x4b, 0x9f, 0xd0, 0x5e, 0x04, 0x18, 0xa4, 0xec, + 0xc2, 0xe0, 0x41, 0x6e, 0x0f, 0x51, 0xcb, 0xcc, 0x24, 0x91, 0xaf, 0x50, 0xa1, 0xf4, 0x70, 0x39, + 0x99, 0x7c, 0x3a, 0x85, 0x23, 0xb8, 0xb4, 0x7a, 0xfc, 0x02, 0x36, 0x5b, 0x25, 0x55, 0x97, 0x31, + 0x2d, 0x5d, 0xfa, 0x98, 0xe3, 0x8a, 0x92, 0xae, 0x05, 0xdf, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9, + 0xd3, 0x00, 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, 0x58, 0xe2, 0x89, 0xa9, + 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e, + 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad +]; + +var s = [1, 2, 3, 5]; + +/** + * Rotate a word left by given number of bits. + * + * Bits that are shifted out on the left are put back in on the right + * hand side. + * + * @param word The word to shift left. + * @param bits The number of bits to shift by. + * @return The rotated word. + */ +var rol = function(word, bits) { + return ((word << bits) & 0xffff) | ((word & 0xffff) >> (16 - bits)); +}; + +/** + * Rotate a word right by given number of bits. + * + * Bits that are shifted out on the right are put back in on the left + * hand side. + * + * @param word The word to shift right. + * @param bits The number of bits to shift by. + * @return The rotated word. + */ +var ror = function(word, bits) { + return ((word & 0xffff) >> bits) | ((word << (16 - bits)) & 0xffff); +}; + +/* RC2 API */ +module.exports = forge.rc2 = forge.rc2 || {}; + +/** + * Perform RC2 key expansion as per RFC #2268, section 2. + * + * @param key variable-length user key (between 1 and 128 bytes) + * @param effKeyBits number of effective key bits (default: 128) + * @return the expanded RC2 key (ByteBuffer of 128 bytes) + */ +forge.rc2.expandKey = function(key, effKeyBits) { + if(typeof key === 'string') { + key = forge.util.createBuffer(key); + } + effKeyBits = effKeyBits || 128; + + /* introduce variables that match the names used in RFC #2268 */ + var L = key; + var T = key.length(); + var T1 = effKeyBits; + var T8 = Math.ceil(T1 / 8); + var TM = 0xff >> (T1 & 0x07); + var i; + + for(i = T; i < 128; i++) { + L.putByte(piTable[(L.at(i - 1) + L.at(i - T)) & 0xff]); + } + + L.setAt(128 - T8, piTable[L.at(128 - T8) & TM]); + + for(i = 127 - T8; i >= 0; i--) { + L.setAt(i, piTable[L.at(i + 1) ^ L.at(i + T8)]); + } + + return L; +}; + +/** + * Creates a RC2 cipher object. + * + * @param key the symmetric key to use (as base for key generation). + * @param bits the number of effective key bits. + * @param encrypt false for decryption, true for encryption. + * + * @return the cipher. + */ +var createCipher = function(key, bits, encrypt) { + var _finish = false, _input = null, _output = null, _iv = null; + var mixRound, mashRound; + var i, j, K = []; + + /* Expand key and fill into K[] Array */ + key = forge.rc2.expandKey(key, bits); + for(i = 0; i < 64; i++) { + K.push(key.getInt16Le()); + } + + if(encrypt) { + /** + * Perform one mixing round "in place". + * + * @param R Array of four words to perform mixing on. + */ + mixRound = function(R) { + for(i = 0; i < 4; i++) { + R[i] += K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) + + ((~R[(i + 3) % 4]) & R[(i + 1) % 4]); + R[i] = rol(R[i], s[i]); + j++; + } + }; + + /** + * Perform one mashing round "in place". + * + * @param R Array of four words to perform mashing on. + */ + mashRound = function(R) { + for(i = 0; i < 4; i++) { + R[i] += K[R[(i + 3) % 4] & 63]; + } + }; + } else { + /** + * Perform one r-mixing round "in place". + * + * @param R Array of four words to perform mixing on. + */ + mixRound = function(R) { + for(i = 3; i >= 0; i--) { + R[i] = ror(R[i], s[i]); + R[i] -= K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) + + ((~R[(i + 3) % 4]) & R[(i + 1) % 4]); + j--; + } + }; + + /** + * Perform one r-mashing round "in place". + * + * @param R Array of four words to perform mashing on. + */ + mashRound = function(R) { + for(i = 3; i >= 0; i--) { + R[i] -= K[R[(i + 3) % 4] & 63]; + } + }; + } + + /** + * Run the specified cipher execution plan. + * + * This function takes four words from the input buffer, applies the IV on + * it (if requested) and runs the provided execution plan. + * + * The plan must be put together in form of a array of arrays. Where the + * outer one is simply a list of steps to perform and the inner one needs + * to have two elements: the first one telling how many rounds to perform, + * the second one telling what to do (i.e. the function to call). + * + * @param {Array} plan The plan to execute. + */ + var runPlan = function(plan) { + var R = []; + + /* Get data from input buffer and fill the four words into R */ + for(i = 0; i < 4; i++) { + var val = _input.getInt16Le(); + + if(_iv !== null) { + if(encrypt) { + /* We're encrypting, apply the IV first. */ + val ^= _iv.getInt16Le(); + } else { + /* We're decryption, keep cipher text for next block. */ + _iv.putInt16Le(val); + } + } + + R.push(val & 0xffff); + } + + /* Reset global "j" variable as per spec. */ + j = encrypt ? 0 : 63; + + /* Run execution plan. */ + for(var ptr = 0; ptr < plan.length; ptr++) { + for(var ctr = 0; ctr < plan[ptr][0]; ctr++) { + plan[ptr][1](R); + } + } + + /* Write back result to output buffer. */ + for(i = 0; i < 4; i++) { + if(_iv !== null) { + if(encrypt) { + /* We're encrypting in CBC-mode, feed back encrypted bytes into + IV buffer to carry it forward to next block. */ + _iv.putInt16Le(R[i]); + } else { + R[i] ^= _iv.getInt16Le(); + } + } + + _output.putInt16Le(R[i]); + } + }; + + /* Create cipher object */ + var cipher = null; + cipher = { + /** + * Starts or restarts the encryption or decryption process, whichever + * was previously configured. + * + * To use the cipher in CBC mode, iv may be given either as a string + * of bytes, or as a byte buffer. For ECB mode, give null as iv. + * + * @param iv the initialization vector to use, null for ECB mode. + * @param output the output the buffer to write to, null to create one. + */ + start: function(iv, output) { + if(iv) { + /* CBC mode */ + if(typeof iv === 'string') { + iv = forge.util.createBuffer(iv); + } + } + + _finish = false; + _input = forge.util.createBuffer(); + _output = output || new forge.util.createBuffer(); + _iv = iv; + + cipher.output = _output; + }, + + /** + * Updates the next block. + * + * @param input the buffer to read from. + */ + update: function(input) { + if(!_finish) { + // not finishing, so fill the input buffer with more input + _input.putBuffer(input); + } + + while(_input.length() >= 8) { + runPlan([ + [ 5, mixRound ], + [ 1, mashRound ], + [ 6, mixRound ], + [ 1, mashRound ], + [ 5, mixRound ] + ]); + } + }, + + /** + * Finishes encrypting or decrypting. + * + * @param pad a padding function to use, null for PKCS#7 padding, + * signature(blockSize, buffer, decrypt). + * + * @return true if successful, false on error. + */ + finish: function(pad) { + var rval = true; + + if(encrypt) { + if(pad) { + rval = pad(8, _input, !encrypt); + } else { + // add PKCS#7 padding to block (each pad byte is the + // value of the number of pad bytes) + var padding = (_input.length() === 8) ? 8 : (8 - _input.length()); + _input.fillWithByte(padding, padding); + } + } + + if(rval) { + // do final update + _finish = true; + cipher.update(); + } + + if(!encrypt) { + // check for error: input data not a multiple of block size + rval = (_input.length() === 0); + if(rval) { + if(pad) { + rval = pad(8, _output, !encrypt); + } else { + // ensure padding byte count is valid + var len = _output.length(); + var count = _output.at(len - 1); + + if(count > len) { + rval = false; + } else { + // trim off padding bytes + _output.truncate(count); + } + } + } + } + + return rval; + } + }; + + return cipher; +}; + +/** + * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the + * given symmetric key. The output will be stored in the 'output' member + * of the returned cipher. + * + * The key and iv may be given as a string of bytes or a byte buffer. + * The cipher is initialized to use 128 effective key bits. + * + * @param key the symmetric key to use. + * @param iv the initialization vector to use. + * @param output the buffer to write to, null to create one. + * + * @return the cipher. + */ +forge.rc2.startEncrypting = function(key, iv, output) { + var cipher = forge.rc2.createEncryptionCipher(key, 128); + cipher.start(iv, output); + return cipher; +}; + +/** + * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the + * given symmetric key. + * + * The key may be given as a string of bytes or a byte buffer. + * + * To start encrypting call start() on the cipher with an iv and optional + * output buffer. + * + * @param key the symmetric key to use. + * + * @return the cipher. + */ +forge.rc2.createEncryptionCipher = function(key, bits) { + return createCipher(key, bits, true); +}; + +/** + * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the + * given symmetric key. The output will be stored in the 'output' member + * of the returned cipher. + * + * The key and iv may be given as a string of bytes or a byte buffer. + * The cipher is initialized to use 128 effective key bits. + * + * @param key the symmetric key to use. + * @param iv the initialization vector to use. + * @param output the buffer to write to, null to create one. + * + * @return the cipher. + */ +forge.rc2.startDecrypting = function(key, iv, output) { + var cipher = forge.rc2.createDecryptionCipher(key, 128); + cipher.start(iv, output); + return cipher; +}; + +/** + * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the + * given symmetric key. + * + * The key may be given as a string of bytes or a byte buffer. + * + * To start decrypting call start() on the cipher with an iv and optional + * output buffer. + * + * @param key the symmetric key to use. + * + * @return the cipher. + */ +forge.rc2.createDecryptionCipher = function(key, bits) { + return createCipher(key, bits, false); +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 62646: +======= +/***/ 79626: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Javascript implementation of basic RSA algorithms. + * + * @author Dave Longley + * + * Copyright (c) 2010-2014 Digital Bazaar, Inc. + * + * The only algorithm currently supported for PKI is RSA. + * + * An RSA key is often stored in ASN.1 DER format. The SubjectPublicKeyInfo + * ASN.1 structure is composed of an algorithm of type AlgorithmIdentifier + * and a subjectPublicKey of type bit string. + * + * The AlgorithmIdentifier contains an Object Identifier (OID) and parameters + * for the algorithm, if any. In the case of RSA, there aren't any. + * + * SubjectPublicKeyInfo ::= SEQUENCE { + * algorithm AlgorithmIdentifier, + * subjectPublicKey BIT STRING + * } + * + * AlgorithmIdentifer ::= SEQUENCE { + * algorithm OBJECT IDENTIFIER, + * parameters ANY DEFINED BY algorithm OPTIONAL + * } + * + * For an RSA public key, the subjectPublicKey is: + * + * RSAPublicKey ::= SEQUENCE { + * modulus INTEGER, -- n + * publicExponent INTEGER -- e + * } + * + * PrivateKeyInfo ::= SEQUENCE { + * version Version, + * privateKeyAlgorithm PrivateKeyAlgorithmIdentifier, + * privateKey PrivateKey, + * attributes [0] IMPLICIT Attributes OPTIONAL + * } + * + * Version ::= INTEGER + * PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier + * PrivateKey ::= OCTET STRING + * Attributes ::= SET OF Attribute + * + * An RSA private key as the following structure: + * + * RSAPrivateKey ::= SEQUENCE { + * version Version, + * modulus INTEGER, -- n + * publicExponent INTEGER, -- e + * privateExponent INTEGER, -- d + * prime1 INTEGER, -- p + * prime2 INTEGER, -- q + * exponent1 INTEGER, -- d mod (p-1) + * exponent2 INTEGER, -- d mod (q-1) + * coefficient INTEGER -- (inverse of q) mod p + * } + * + * Version ::= INTEGER + * + * The OID for the RSA key algorithm is: 1.2.840.113549.1.1.1 + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(1571); +__nccwpck_require__(21686); +__nccwpck_require__(40876); +__nccwpck_require__(96096); +__nccwpck_require__(22679); +__nccwpck_require__(35283); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(69197); +__nccwpck_require__(121); +__nccwpck_require__(11750); +__nccwpck_require__(39703); +__nccwpck_require__(93254); +__nccwpck_require__(68737); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +if(typeof BigInteger === 'undefined') { + var BigInteger = forge.jsbn.BigInteger; +} + +var _crypto = forge.util.isNodejs ? __nccwpck_require__(6113) : null; + +// shortcut for asn.1 API +var asn1 = forge.asn1; + +// shortcut for util API +var util = forge.util; + +/* + * RSA encryption and decryption, see RFC 2313. + */ +forge.pki = forge.pki || {}; +module.exports = forge.pki.rsa = forge.rsa = forge.rsa || {}; +var pki = forge.pki; + +// for finding primes, which are 30k+i for i = 1, 7, 11, 13, 17, 19, 23, 29 +var GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2]; + +// validator for a PrivateKeyInfo structure +var privateKeyValidator = { + // PrivateKeyInfo + name: 'PrivateKeyInfo', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + // Version (INTEGER) + name: 'PrivateKeyInfo.version', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyVersion' + }, { + // privateKeyAlgorithm + name: 'PrivateKeyInfo.privateKeyAlgorithm', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'AlgorithmIdentifier.algorithm', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OID, + constructed: false, + capture: 'privateKeyOid' + }] + }, { + // PrivateKey + name: 'PrivateKeyInfo', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OCTETSTRING, + constructed: false, + capture: 'privateKey' + }] +}; + +// validator for an RSA private key +var rsaPrivateKeyValidator = { + // RSAPrivateKey + name: 'RSAPrivateKey', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + // Version (INTEGER) + name: 'RSAPrivateKey.version', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyVersion' + }, { + // modulus (n) + name: 'RSAPrivateKey.modulus', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyModulus' + }, { + // publicExponent (e) + name: 'RSAPrivateKey.publicExponent', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyPublicExponent' + }, { + // privateExponent (d) + name: 'RSAPrivateKey.privateExponent', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyPrivateExponent' + }, { + // prime1 (p) + name: 'RSAPrivateKey.prime1', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyPrime1' + }, { + // prime2 (q) + name: 'RSAPrivateKey.prime2', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyPrime2' + }, { + // exponent1 (d mod (p-1)) + name: 'RSAPrivateKey.exponent1', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyExponent1' + }, { + // exponent2 (d mod (q-1)) + name: 'RSAPrivateKey.exponent2', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyExponent2' + }, { + // coefficient ((inverse of q) mod p) + name: 'RSAPrivateKey.coefficient', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'privateKeyCoefficient' + }] +}; + +// validator for an RSA public key +var rsaPublicKeyValidator = { + // RSAPublicKey + name: 'RSAPublicKey', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + // modulus (n) + name: 'RSAPublicKey.modulus', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'publicKeyModulus' + }, { + // publicExponent (e) + name: 'RSAPublicKey.exponent', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.INTEGER, + constructed: false, + capture: 'publicKeyExponent' + }] +}; + +// validator for an SubjectPublicKeyInfo structure +// Note: Currently only works with an RSA public key +var publicKeyValidator = forge.pki.rsa.publicKeyValidator = { + name: 'SubjectPublicKeyInfo', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + captureAsn1: 'subjectPublicKeyInfo', + value: [{ + name: 'SubjectPublicKeyInfo.AlgorithmIdentifier', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'AlgorithmIdentifier.algorithm', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OID, + constructed: false, + capture: 'publicKeyOid' + }] + }, { + // subjectPublicKey + name: 'SubjectPublicKeyInfo.subjectPublicKey', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.BITSTRING, + constructed: false, + value: [{ + // RSAPublicKey + name: 'SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + optional: true, + captureAsn1: 'rsaPublicKey' + }] + }] +}; + +// validator for a DigestInfo structure +var digestInfoValidator = { + name: 'DigestInfo', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'DigestInfo.DigestAlgorithm', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.SEQUENCE, + constructed: true, + value: [{ + name: 'DigestInfo.DigestAlgorithm.algorithmIdentifier', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OID, + constructed: false, + capture: 'algorithmIdentifier' + }, { + // NULL paramters + name: 'DigestInfo.DigestAlgorithm.parameters', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.NULL, + // captured only to check existence for md2 and md5 + capture: 'parameters', + optional: true, + constructed: false + }] + }, { + // digest + name: 'DigestInfo.digest', + tagClass: asn1.Class.UNIVERSAL, + type: asn1.Type.OCTETSTRING, + constructed: false, + capture: 'digest' + }] +}; + +/** + * Wrap digest in DigestInfo object. + * + * This function implements EMSA-PKCS1-v1_5-ENCODE as per RFC 3447. + * + * DigestInfo ::= SEQUENCE { + * digestAlgorithm DigestAlgorithmIdentifier, + * digest Digest + * } + * + * DigestAlgorithmIdentifier ::= AlgorithmIdentifier + * Digest ::= OCTET STRING + * + * @param md the message digest object with the hash to sign. + * + * @return the encoded message (ready for RSA encrytion) + */ +var emsaPkcs1v15encode = function(md) { + // get the oid for the algorithm + var oid; + if(md.algorithm in pki.oids) { + oid = pki.oids[md.algorithm]; + } else { + var error = new Error('Unknown message digest algorithm.'); + error.algorithm = md.algorithm; + throw error; + } + var oidBytes = asn1.oidToDer(oid).getBytes(); + + // create the digest info + var digestInfo = asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []); + var digestAlgorithm = asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []); + digestAlgorithm.value.push(asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.OID, false, oidBytes)); + digestAlgorithm.value.push(asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')); + var digest = asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, + false, md.digest().getBytes()); + digestInfo.value.push(digestAlgorithm); + digestInfo.value.push(digest); + + // encode digest info + return asn1.toDer(digestInfo).getBytes(); +}; + +/** + * Performs x^c mod n (RSA encryption or decryption operation). + * + * @param x the number to raise and mod. + * @param key the key to use. + * @param pub true if the key is public, false if private. + * + * @return the result of x^c mod n. + */ +var _modPow = function(x, key, pub) { + if(pub) { + return x.modPow(key.e, key.n); + } + + if(!key.p || !key.q) { + // allow calculation without CRT params (slow) + return x.modPow(key.d, key.n); + } + + // pre-compute dP, dQ, and qInv if necessary + if(!key.dP) { + key.dP = key.d.mod(key.p.subtract(BigInteger.ONE)); + } + if(!key.dQ) { + key.dQ = key.d.mod(key.q.subtract(BigInteger.ONE)); + } + if(!key.qInv) { + key.qInv = key.q.modInverse(key.p); + } + + /* Chinese remainder theorem (CRT) states: + + Suppose n1, n2, ..., nk are positive integers which are pairwise + coprime (n1 and n2 have no common factors other than 1). For any + integers x1, x2, ..., xk there exists an integer x solving the + system of simultaneous congruences (where ~= means modularly + congruent so a ~= b mod n means a mod n = b mod n): + + x ~= x1 mod n1 + x ~= x2 mod n2 + ... + x ~= xk mod nk + + This system of congruences has a single simultaneous solution x + between 0 and n - 1. Furthermore, each xk solution and x itself + is congruent modulo the product n = n1*n2*...*nk. + So x1 mod n = x2 mod n = xk mod n = x mod n. + + The single simultaneous solution x can be solved with the following + equation: + + x = sum(xi*ri*si) mod n where ri = n/ni and si = ri^-1 mod ni. + + Where x is less than n, xi = x mod ni. + + For RSA we are only concerned with k = 2. The modulus n = pq, where + p and q are coprime. The RSA decryption algorithm is: + + y = x^d mod n + + Given the above: + + x1 = x^d mod p + r1 = n/p = q + s1 = q^-1 mod p + x2 = x^d mod q + r2 = n/q = p + s2 = p^-1 mod q + + So y = (x1r1s1 + x2r2s2) mod n + = ((x^d mod p)q(q^-1 mod p) + (x^d mod q)p(p^-1 mod q)) mod n + + According to Fermat's Little Theorem, if the modulus P is prime, + for any integer A not evenly divisible by P, A^(P-1) ~= 1 mod P. + Since A is not divisible by P it follows that if: + N ~= M mod (P - 1), then A^N mod P = A^M mod P. Therefore: + + A^N mod P = A^(M mod (P - 1)) mod P. (The latter takes less effort + to calculate). In order to calculate x^d mod p more quickly the + exponent d mod (p - 1) is stored in the RSA private key (the same + is done for x^d mod q). These values are referred to as dP and dQ + respectively. Therefore we now have: + + y = ((x^dP mod p)q(q^-1 mod p) + (x^dQ mod q)p(p^-1 mod q)) mod n + + Since we'll be reducing x^dP by modulo p (same for q) we can also + reduce x by p (and q respectively) before hand. Therefore, let + + xp = ((x mod p)^dP mod p), and + xq = ((x mod q)^dQ mod q), yielding: + + y = (xp*q*(q^-1 mod p) + xq*p*(p^-1 mod q)) mod n + + This can be further reduced to a simple algorithm that only + requires 1 inverse (the q inverse is used) to be used and stored. + The algorithm is called Garner's algorithm. If qInv is the + inverse of q, we simply calculate: + + y = (qInv*(xp - xq) mod p) * q + xq + + However, there are two further complications. First, we need to + ensure that xp > xq to prevent signed BigIntegers from being used + so we add p until this is true (since we will be mod'ing with + p anyway). Then, there is a known timing attack on algorithms + using the CRT. To mitigate this risk, "cryptographic blinding" + should be used. This requires simply generating a random number r + between 0 and n-1 and its inverse and multiplying x by r^e before + calculating y and then multiplying y by r^-1 afterwards. Note that + r must be coprime with n (gcd(r, n) === 1) in order to have an + inverse. + */ + + // cryptographic blinding + var r; + do { + r = new BigInteger( + forge.util.bytesToHex(forge.random.getBytes(key.n.bitLength() / 8)), + 16); + } while(r.compareTo(key.n) >= 0 || !r.gcd(key.n).equals(BigInteger.ONE)); + x = x.multiply(r.modPow(key.e, key.n)).mod(key.n); + + // calculate xp and xq + var xp = x.mod(key.p).modPow(key.dP, key.p); + var xq = x.mod(key.q).modPow(key.dQ, key.q); + + // xp must be larger than xq to avoid signed bit usage + while(xp.compareTo(xq) < 0) { + xp = xp.add(key.p); + } + + // do last step + var y = xp.subtract(xq) + .multiply(key.qInv).mod(key.p) + .multiply(key.q).add(xq); + + // remove effect of random for cryptographic blinding + y = y.multiply(r.modInverse(key.n)).mod(key.n); + + return y; +}; + +/** + * NOTE: THIS METHOD IS DEPRECATED, use 'sign' on a private key object or + * 'encrypt' on a public key object instead. + * + * Performs RSA encryption. + * + * The parameter bt controls whether to put padding bytes before the + * message passed in. Set bt to either true or false to disable padding + * completely (in order to handle e.g. EMSA-PSS encoding seperately before), + * signaling whether the encryption operation is a public key operation + * (i.e. encrypting data) or not, i.e. private key operation (data signing). + * + * For PKCS#1 v1.5 padding pass in the block type to use, i.e. either 0x01 + * (for signing) or 0x02 (for encryption). The key operation mode (private + * or public) is derived from this flag in that case). + * + * @param m the message to encrypt as a byte string. + * @param key the RSA key to use. + * @param bt for PKCS#1 v1.5 padding, the block type to use + * (0x01 for private key, 0x02 for public), + * to disable padding: true = public key, false = private key. + * + * @return the encrypted bytes as a string. + */ +pki.rsa.encrypt = function(m, key, bt) { + var pub = bt; + var eb; + + // get the length of the modulus in bytes + var k = Math.ceil(key.n.bitLength() / 8); + + if(bt !== false && bt !== true) { + // legacy, default to PKCS#1 v1.5 padding + pub = (bt === 0x02); + eb = _encodePkcs1_v1_5(m, key, bt); + } else { + eb = forge.util.createBuffer(); + eb.putBytes(m); + } + + // load encryption block as big integer 'x' + // FIXME: hex conversion inefficient, get BigInteger w/byte strings + var x = new BigInteger(eb.toHex(), 16); + + // do RSA encryption + var y = _modPow(x, key, pub); + + // convert y into the encrypted data byte string, if y is shorter in + // bytes than k, then prepend zero bytes to fill up ed + // FIXME: hex conversion inefficient, get BigInteger w/byte strings + var yhex = y.toString(16); + var ed = forge.util.createBuffer(); + var zeros = k - Math.ceil(yhex.length / 2); + while(zeros > 0) { + ed.putByte(0x00); + --zeros; + } + ed.putBytes(forge.util.hexToBytes(yhex)); + return ed.getBytes(); +}; + +/** + * NOTE: THIS METHOD IS DEPRECATED, use 'decrypt' on a private key object or + * 'verify' on a public key object instead. + * + * Performs RSA decryption. + * + * The parameter ml controls whether to apply PKCS#1 v1.5 padding + * or not. Set ml = false to disable padding removal completely + * (in order to handle e.g. EMSA-PSS later on) and simply pass back + * the RSA encryption block. + * + * @param ed the encrypted data to decrypt in as a byte string. + * @param key the RSA key to use. + * @param pub true for a public key operation, false for private. + * @param ml the message length, if known, false to disable padding. + * + * @return the decrypted message as a byte string. + */ +pki.rsa.decrypt = function(ed, key, pub, ml) { + // get the length of the modulus in bytes + var k = Math.ceil(key.n.bitLength() / 8); + + // error if the length of the encrypted data ED is not k + if(ed.length !== k) { + var error = new Error('Encrypted message length is invalid.'); + error.length = ed.length; + error.expected = k; + throw error; + } + + // convert encrypted data into a big integer + // FIXME: hex conversion inefficient, get BigInteger w/byte strings + var y = new BigInteger(forge.util.createBuffer(ed).toHex(), 16); + + // y must be less than the modulus or it wasn't the result of + // a previous mod operation (encryption) using that modulus + if(y.compareTo(key.n) >= 0) { + throw new Error('Encrypted message is invalid.'); + } + + // do RSA decryption + var x = _modPow(y, key, pub); + + // create the encryption block, if x is shorter in bytes than k, then + // prepend zero bytes to fill up eb + // FIXME: hex conversion inefficient, get BigInteger w/byte strings + var xhex = x.toString(16); + var eb = forge.util.createBuffer(); + var zeros = k - Math.ceil(xhex.length / 2); + while(zeros > 0) { + eb.putByte(0x00); + --zeros; + } + eb.putBytes(forge.util.hexToBytes(xhex)); + + if(ml !== false) { + // legacy, default to PKCS#1 v1.5 padding + return _decodePkcs1_v1_5(eb.getBytes(), key, pub); + } + + // return message + return eb.getBytes(); +}; + +/** + * Creates an RSA key-pair generation state object. It is used to allow + * key-generation to be performed in steps. It also allows for a UI to + * display progress updates. + * + * @param bits the size for the private key in bits, defaults to 2048. + * @param e the public exponent to use, defaults to 65537 (0x10001). + * @param [options] the options to use. + * prng a custom crypto-secure pseudo-random number generator to use, + * that must define "getBytesSync". + * algorithm the algorithm to use (default: 'PRIMEINC'). + * + * @return the state object to use to generate the key-pair. + */ +pki.rsa.createKeyPairGenerationState = function(bits, e, options) { + // TODO: migrate step-based prime generation code to forge.prime + + // set default bits + if(typeof(bits) === 'string') { + bits = parseInt(bits, 10); + } + bits = bits || 2048; + + // create prng with api that matches BigInteger secure random + options = options || {}; + var prng = options.prng || forge.random; + var rng = { + // x is an array to fill with bytes + nextBytes: function(x) { + var b = prng.getBytesSync(x.length); + for(var i = 0; i < x.length; ++i) { + x[i] = b.charCodeAt(i); + } + } + }; + + var algorithm = options.algorithm || 'PRIMEINC'; + + // create PRIMEINC algorithm state + var rval; + if(algorithm === 'PRIMEINC') { + rval = { + algorithm: algorithm, + state: 0, + bits: bits, + rng: rng, + eInt: e || 65537, + e: new BigInteger(null), + p: null, + q: null, + qBits: bits >> 1, + pBits: bits - (bits >> 1), + pqState: 0, + num: null, + keys: null + }; + rval.e.fromInt(rval.eInt); + } else { + throw new Error('Invalid key generation algorithm: ' + algorithm); + } + + return rval; +}; + +/** + * Attempts to runs the key-generation algorithm for at most n seconds + * (approximately) using the given state. When key-generation has completed, + * the keys will be stored in state.keys. + * + * To use this function to update a UI while generating a key or to prevent + * causing browser lockups/warnings, set "n" to a value other than 0. A + * simple pattern for generating a key and showing a progress indicator is: + * + * var state = pki.rsa.createKeyPairGenerationState(2048); + * var step = function() { + * // step key-generation, run algorithm for 100 ms, repeat + * if(!forge.pki.rsa.stepKeyPairGenerationState(state, 100)) { + * setTimeout(step, 1); + * } else { + * // key-generation complete + * // TODO: turn off progress indicator here + * // TODO: use the generated key-pair in "state.keys" + * } + * }; + * // TODO: turn on progress indicator here + * setTimeout(step, 0); + * + * @param state the state to use. + * @param n the maximum number of milliseconds to run the algorithm for, 0 + * to run the algorithm to completion. + * + * @return true if the key-generation completed, false if not. + */ +pki.rsa.stepKeyPairGenerationState = function(state, n) { + // set default algorithm if not set + if(!('algorithm' in state)) { + state.algorithm = 'PRIMEINC'; + } + + // TODO: migrate step-based prime generation code to forge.prime + // TODO: abstract as PRIMEINC algorithm + + // do key generation (based on Tom Wu's rsa.js, see jsbn.js license) + // with some minor optimizations and designed to run in steps + + // local state vars + var THIRTY = new BigInteger(null); + THIRTY.fromInt(30); + var deltaIdx = 0; + var op_or = function(x, y) {return x | y;}; + + // keep stepping until time limit is reached or done + var t1 = +new Date(); + var t2; + var total = 0; + while(state.keys === null && (n <= 0 || total < n)) { + // generate p or q + if(state.state === 0) { + /* Note: All primes are of the form: + + 30k+i, for i < 30 and gcd(30, i)=1, where there are 8 values for i + + When we generate a random number, we always align it at 30k + 1. Each + time the number is determined not to be prime we add to get to the + next 'i', eg: if the number was at 30k + 1 we add 6. */ + var bits = (state.p === null) ? state.pBits : state.qBits; + var bits1 = bits - 1; + + // get a random number + if(state.pqState === 0) { + state.num = new BigInteger(bits, state.rng); + // force MSB set + if(!state.num.testBit(bits1)) { + state.num.bitwiseTo( + BigInteger.ONE.shiftLeft(bits1), op_or, state.num); + } + // align number on 30k+1 boundary + state.num.dAddOffset(31 - state.num.mod(THIRTY).byteValue(), 0); + deltaIdx = 0; + + ++state.pqState; + } else if(state.pqState === 1) { + // try to make the number a prime + if(state.num.bitLength() > bits) { + // overflow, try again + state.pqState = 0; + // do primality test + } else if(state.num.isProbablePrime( + _getMillerRabinTests(state.num.bitLength()))) { + ++state.pqState; + } else { + // get next potential prime + state.num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0); + } + } else if(state.pqState === 2) { + // ensure number is coprime with e + state.pqState = + (state.num.subtract(BigInteger.ONE).gcd(state.e) + .compareTo(BigInteger.ONE) === 0) ? 3 : 0; + } else if(state.pqState === 3) { + // store p or q + state.pqState = 0; + if(state.p === null) { + state.p = state.num; + } else { + state.q = state.num; + } + + // advance state if both p and q are ready + if(state.p !== null && state.q !== null) { + ++state.state; + } + state.num = null; + } + } else if(state.state === 1) { + // ensure p is larger than q (swap them if not) + if(state.p.compareTo(state.q) < 0) { + state.num = state.p; + state.p = state.q; + state.q = state.num; + } + ++state.state; + } else if(state.state === 2) { + // compute phi: (p - 1)(q - 1) (Euler's totient function) + state.p1 = state.p.subtract(BigInteger.ONE); + state.q1 = state.q.subtract(BigInteger.ONE); + state.phi = state.p1.multiply(state.q1); + ++state.state; + } else if(state.state === 3) { + // ensure e and phi are coprime + if(state.phi.gcd(state.e).compareTo(BigInteger.ONE) === 0) { + // phi and e are coprime, advance + ++state.state; + } else { + // phi and e aren't coprime, so generate a new p and q + state.p = null; + state.q = null; + state.state = 0; + } + } else if(state.state === 4) { + // create n, ensure n is has the right number of bits + state.n = state.p.multiply(state.q); + + // ensure n is right number of bits + if(state.n.bitLength() === state.bits) { + // success, advance + ++state.state; + } else { + // failed, get new q + state.q = null; + state.state = 0; + } + } else if(state.state === 5) { + // set keys + var d = state.e.modInverse(state.phi); + state.keys = { + privateKey: pki.rsa.setPrivateKey( + state.n, state.e, d, state.p, state.q, + d.mod(state.p1), d.mod(state.q1), + state.q.modInverse(state.p)), + publicKey: pki.rsa.setPublicKey(state.n, state.e) + }; + } + + // update timing + t2 = +new Date(); + total += t2 - t1; + t1 = t2; + } + + return state.keys !== null; +}; + +/** + * Generates an RSA public-private key pair in a single call. + * + * To generate a key-pair in steps (to allow for progress updates and to + * prevent blocking or warnings in slow browsers) then use the key-pair + * generation state functions. + * + * To generate a key-pair asynchronously (either through web-workers, if + * available, or by breaking up the work on the main thread), pass a + * callback function. + * + * @param [bits] the size for the private key in bits, defaults to 2048. + * @param [e] the public exponent to use, defaults to 65537. + * @param [options] options for key-pair generation, if given then 'bits' + * and 'e' must *not* be given: + * bits the size for the private key in bits, (default: 2048). + * e the public exponent to use, (default: 65537 (0x10001)). + * workerScript the worker script URL. + * workers the number of web workers (if supported) to use, + * (default: 2). + * workLoad the size of the work load, ie: number of possible prime + * numbers for each web worker to check per work assignment, + * (default: 100). + * prng a custom crypto-secure pseudo-random number generator to use, + * that must define "getBytesSync". Disables use of native APIs. + * algorithm the algorithm to use (default: 'PRIMEINC'). + * @param [callback(err, keypair)] called once the operation completes. + * + * @return an object with privateKey and publicKey properties. + */ +pki.rsa.generateKeyPair = function(bits, e, options, callback) { + // (bits), (options), (callback) + if(arguments.length === 1) { + if(typeof bits === 'object') { + options = bits; + bits = undefined; + } else if(typeof bits === 'function') { + callback = bits; + bits = undefined; + } + } else if(arguments.length === 2) { + // (bits, e), (bits, options), (bits, callback), (options, callback) + if(typeof bits === 'number') { + if(typeof e === 'function') { + callback = e; + e = undefined; + } else if(typeof e !== 'number') { + options = e; + e = undefined; + } + } else { + options = bits; + callback = e; + bits = undefined; + e = undefined; + } + } else if(arguments.length === 3) { + // (bits, e, options), (bits, e, callback), (bits, options, callback) + if(typeof e === 'number') { + if(typeof options === 'function') { + callback = options; + options = undefined; + } + } else { + callback = options; + options = e; + e = undefined; + } + } + options = options || {}; + if(bits === undefined) { + bits = options.bits || 2048; + } + if(e === undefined) { + e = options.e || 0x10001; + } + + // use native code if permitted, available, and parameters are acceptable + if(!forge.options.usePureJavaScript && !options.prng && + bits >= 256 && bits <= 16384 && (e === 0x10001 || e === 3)) { + if(callback) { + // try native async + if(_detectNodeCrypto('generateKeyPair')) { + return _crypto.generateKeyPair('rsa', { + modulusLength: bits, + publicExponent: e, + publicKeyEncoding: { + type: 'spki', + format: 'pem' + }, + privateKeyEncoding: { + type: 'pkcs8', + format: 'pem' + } + }, function(err, pub, priv) { + if(err) { + return callback(err); + } + callback(null, { + privateKey: pki.privateKeyFromPem(priv), + publicKey: pki.publicKeyFromPem(pub) + }); + }); + } + if(_detectSubtleCrypto('generateKey') && + _detectSubtleCrypto('exportKey')) { + // use standard native generateKey + return util.globalScope.crypto.subtle.generateKey({ + name: 'RSASSA-PKCS1-v1_5', + modulusLength: bits, + publicExponent: _intToUint8Array(e), + hash: {name: 'SHA-256'} + }, true /* key can be exported*/, ['sign', 'verify']) + .then(function(pair) { + return util.globalScope.crypto.subtle.exportKey( + 'pkcs8', pair.privateKey); + // avoiding catch(function(err) {...}) to support IE <= 8 + }).then(undefined, function(err) { + callback(err); + }).then(function(pkcs8) { + if(pkcs8) { + var privateKey = pki.privateKeyFromAsn1( + asn1.fromDer(forge.util.createBuffer(pkcs8))); + callback(null, { + privateKey: privateKey, + publicKey: pki.setRsaPublicKey(privateKey.n, privateKey.e) + }); + } + }); + } + if(_detectSubtleMsCrypto('generateKey') && + _detectSubtleMsCrypto('exportKey')) { + var genOp = util.globalScope.msCrypto.subtle.generateKey({ + name: 'RSASSA-PKCS1-v1_5', + modulusLength: bits, + publicExponent: _intToUint8Array(e), + hash: {name: 'SHA-256'} + }, true /* key can be exported*/, ['sign', 'verify']); + genOp.oncomplete = function(e) { + var pair = e.target.result; + var exportOp = util.globalScope.msCrypto.subtle.exportKey( + 'pkcs8', pair.privateKey); + exportOp.oncomplete = function(e) { + var pkcs8 = e.target.result; + var privateKey = pki.privateKeyFromAsn1( + asn1.fromDer(forge.util.createBuffer(pkcs8))); + callback(null, { + privateKey: privateKey, + publicKey: pki.setRsaPublicKey(privateKey.n, privateKey.e) + }); + }; + exportOp.onerror = function(err) { + callback(err); + }; + }; + genOp.onerror = function(err) { + callback(err); + }; + return; + } + } else { + // try native sync + if(_detectNodeCrypto('generateKeyPairSync')) { + var keypair = _crypto.generateKeyPairSync('rsa', { + modulusLength: bits, + publicExponent: e, + publicKeyEncoding: { + type: 'spki', + format: 'pem' + }, + privateKeyEncoding: { + type: 'pkcs8', + format: 'pem' + } + }); + return { + privateKey: pki.privateKeyFromPem(keypair.privateKey), + publicKey: pki.publicKeyFromPem(keypair.publicKey) + }; + } + } + } + + // use JavaScript implementation + var state = pki.rsa.createKeyPairGenerationState(bits, e, options); + if(!callback) { + pki.rsa.stepKeyPairGenerationState(state, 0); + return state.keys; + } + _generateKeyPair(state, options, callback); +}; + +/** + * Sets an RSA public key from BigIntegers modulus and exponent. + * + * @param n the modulus. + * @param e the exponent. + * + * @return the public key. + */ +pki.setRsaPublicKey = pki.rsa.setPublicKey = function(n, e) { + var key = { + n: n, + e: e + }; + + /** + * Encrypts the given data with this public key. Newer applications + * should use the 'RSA-OAEP' decryption scheme, 'RSAES-PKCS1-V1_5' is for + * legacy applications. + * + * @param data the byte string to encrypt. + * @param scheme the encryption scheme to use: + * 'RSAES-PKCS1-V1_5' (default), + * 'RSA-OAEP', + * 'RAW', 'NONE', or null to perform raw RSA encryption, + * an object with an 'encode' property set to a function + * with the signature 'function(data, key)' that returns + * a binary-encoded string representing the encoded data. + * @param schemeOptions any scheme-specific options. + * + * @return the encrypted byte string. + */ + key.encrypt = function(data, scheme, schemeOptions) { + if(typeof scheme === 'string') { + scheme = scheme.toUpperCase(); + } else if(scheme === undefined) { + scheme = 'RSAES-PKCS1-V1_5'; + } + + if(scheme === 'RSAES-PKCS1-V1_5') { + scheme = { + encode: function(m, key, pub) { + return _encodePkcs1_v1_5(m, key, 0x02).getBytes(); + } + }; + } else if(scheme === 'RSA-OAEP' || scheme === 'RSAES-OAEP') { + scheme = { + encode: function(m, key) { + return forge.pkcs1.encode_rsa_oaep(key, m, schemeOptions); + } + }; + } else if(['RAW', 'NONE', 'NULL', null].indexOf(scheme) !== -1) { + scheme = {encode: function(e) {return e;}}; + } else if(typeof scheme === 'string') { + throw new Error('Unsupported encryption scheme: "' + scheme + '".'); + } + + // do scheme-based encoding then rsa encryption + var e = scheme.encode(data, key, true); + return pki.rsa.encrypt(e, key, true); + }; + + /** + * Verifies the given signature against the given digest. + * + * PKCS#1 supports multiple (currently two) signature schemes: + * RSASSA-PKCS1-V1_5 and RSASSA-PSS. + * + * By default this implementation uses the "old scheme", i.e. + * RSASSA-PKCS1-V1_5, in which case once RSA-decrypted, the + * signature is an OCTET STRING that holds a DigestInfo. + * + * DigestInfo ::= SEQUENCE { + * digestAlgorithm DigestAlgorithmIdentifier, + * digest Digest + * } + * DigestAlgorithmIdentifier ::= AlgorithmIdentifier + * Digest ::= OCTET STRING + * + * To perform PSS signature verification, provide an instance + * of Forge PSS object as the scheme parameter. + * + * @param digest the message digest hash to compare against the signature, + * as a binary-encoded string. + * @param signature the signature to verify, as a binary-encoded string. + * @param scheme signature verification scheme to use: + * 'RSASSA-PKCS1-V1_5' or undefined for RSASSA PKCS#1 v1.5, + * a Forge PSS object for RSASSA-PSS, + * 'NONE' or null for none, DigestInfo will not be expected, but + * PKCS#1 v1.5 padding will still be used. + * @param options optional verify options + * _parseAllDigestBytes testing flag to control parsing of all + * digest bytes. Unsupported and not for general usage. + * (default: true) + * + * @return true if the signature was verified, false if not. + */ + key.verify = function(digest, signature, scheme, options) { + if(typeof scheme === 'string') { + scheme = scheme.toUpperCase(); + } else if(scheme === undefined) { + scheme = 'RSASSA-PKCS1-V1_5'; + } + if(options === undefined) { + options = { + _parseAllDigestBytes: true + }; + } + if(!('_parseAllDigestBytes' in options)) { + options._parseAllDigestBytes = true; + } + + if(scheme === 'RSASSA-PKCS1-V1_5') { + scheme = { + verify: function(digest, d) { + // remove padding + d = _decodePkcs1_v1_5(d, key, true); + // d is ASN.1 BER-encoded DigestInfo + var obj = asn1.fromDer(d, { + parseAllBytes: options._parseAllDigestBytes + }); + + // validate DigestInfo + var capture = {}; + var errors = []; + if(!asn1.validate(obj, digestInfoValidator, capture, errors)) { + var error = new Error( + 'ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 ' + + 'DigestInfo value.'); + error.errors = errors; + throw error; + } + // check hash algorithm identifier + // see PKCS1-v1-5DigestAlgorithms in RFC 8017 + // FIXME: add support to vaidator for strict value choices + var oid = asn1.derToOid(capture.algorithmIdentifier); + if(!(oid === forge.oids.md2 || + oid === forge.oids.md5 || + oid === forge.oids.sha1 || + oid === forge.oids.sha224 || + oid === forge.oids.sha256 || + oid === forge.oids.sha384 || + oid === forge.oids.sha512 || + oid === forge.oids['sha512-224'] || + oid === forge.oids['sha512-256'])) { + var error = new Error( + 'Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.'); + error.oid = oid; + throw error; + } + + // special check for md2 and md5 that NULL parameters exist + if(oid === forge.oids.md2 || oid === forge.oids.md5) { + if(!('parameters' in capture)) { + throw new Error( + 'ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 ' + + 'DigestInfo value. ' + + 'Missing algorithm identifer NULL parameters.'); + } + } + + // compare the given digest to the decrypted one + return digest === capture.digest; + } + }; + } else if(scheme === 'NONE' || scheme === 'NULL' || scheme === null) { + scheme = { + verify: function(digest, d) { + // remove padding + d = _decodePkcs1_v1_5(d, key, true); + return digest === d; + } + }; + } + + // do rsa decryption w/o any decoding, then verify -- which does decoding + var d = pki.rsa.decrypt(signature, key, true, false); + return scheme.verify(digest, d, key.n.bitLength()); + }; + + return key; +}; + +/** + * Sets an RSA private key from BigIntegers modulus, exponent, primes, + * prime exponents, and modular multiplicative inverse. + * + * @param n the modulus. + * @param e the public exponent. + * @param d the private exponent ((inverse of e) mod n). + * @param p the first prime. + * @param q the second prime. + * @param dP exponent1 (d mod (p-1)). + * @param dQ exponent2 (d mod (q-1)). + * @param qInv ((inverse of q) mod p) + * + * @return the private key. + */ +pki.setRsaPrivateKey = pki.rsa.setPrivateKey = function( + n, e, d, p, q, dP, dQ, qInv) { + var key = { + n: n, + e: e, + d: d, + p: p, + q: q, + dP: dP, + dQ: dQ, + qInv: qInv + }; + + /** + * Decrypts the given data with this private key. The decryption scheme + * must match the one used to encrypt the data. + * + * @param data the byte string to decrypt. + * @param scheme the decryption scheme to use: + * 'RSAES-PKCS1-V1_5' (default), + * 'RSA-OAEP', + * 'RAW', 'NONE', or null to perform raw RSA decryption. + * @param schemeOptions any scheme-specific options. + * + * @return the decrypted byte string. + */ + key.decrypt = function(data, scheme, schemeOptions) { + if(typeof scheme === 'string') { + scheme = scheme.toUpperCase(); + } else if(scheme === undefined) { + scheme = 'RSAES-PKCS1-V1_5'; + } + + // do rsa decryption w/o any decoding + var d = pki.rsa.decrypt(data, key, false, false); + + if(scheme === 'RSAES-PKCS1-V1_5') { + scheme = {decode: _decodePkcs1_v1_5}; + } else if(scheme === 'RSA-OAEP' || scheme === 'RSAES-OAEP') { + scheme = { + decode: function(d, key) { + return forge.pkcs1.decode_rsa_oaep(key, d, schemeOptions); + } + }; + } else if(['RAW', 'NONE', 'NULL', null].indexOf(scheme) !== -1) { + scheme = {decode: function(d) {return d;}}; + } else { + throw new Error('Unsupported encryption scheme: "' + scheme + '".'); + } + + // decode according to scheme + return scheme.decode(d, key, false); + }; + + /** + * Signs the given digest, producing a signature. + * + * PKCS#1 supports multiple (currently two) signature schemes: + * RSASSA-PKCS1-V1_5 and RSASSA-PSS. + * + * By default this implementation uses the "old scheme", i.e. + * RSASSA-PKCS1-V1_5. In order to generate a PSS signature, provide + * an instance of Forge PSS object as the scheme parameter. + * + * @param md the message digest object with the hash to sign. + * @param scheme the signature scheme to use: + * 'RSASSA-PKCS1-V1_5' or undefined for RSASSA PKCS#1 v1.5, + * a Forge PSS object for RSASSA-PSS, + * 'NONE' or null for none, DigestInfo will not be used but + * PKCS#1 v1.5 padding will still be used. + * + * @return the signature as a byte string. + */ + key.sign = function(md, scheme) { + /* Note: The internal implementation of RSA operations is being + transitioned away from a PKCS#1 v1.5 hard-coded scheme. Some legacy + code like the use of an encoding block identifier 'bt' will eventually + be removed. */ + + // private key operation + var bt = false; + + if(typeof scheme === 'string') { + scheme = scheme.toUpperCase(); + } + + if(scheme === undefined || scheme === 'RSASSA-PKCS1-V1_5') { + scheme = {encode: emsaPkcs1v15encode}; + bt = 0x01; + } else if(scheme === 'NONE' || scheme === 'NULL' || scheme === null) { + scheme = {encode: function() {return md;}}; + bt = 0x01; + } + + // encode and then encrypt + var d = scheme.encode(md, key.n.bitLength()); + return pki.rsa.encrypt(d, key, bt); + }; + + return key; +}; + +/** + * Wraps an RSAPrivateKey ASN.1 object in an ASN.1 PrivateKeyInfo object. + * + * @param rsaKey the ASN.1 RSAPrivateKey. + * + * @return the ASN.1 PrivateKeyInfo. + */ +pki.wrapRsaPrivateKey = function(rsaKey) { + // PrivateKeyInfo + return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // version (0) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + asn1.integerToDer(0).getBytes()), + // privateKeyAlgorithm + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + asn1.create( + asn1.Class.UNIVERSAL, asn1.Type.OID, false, + asn1.oidToDer(pki.oids.rsaEncryption).getBytes()), + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '') + ]), + // PrivateKey + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, + asn1.toDer(rsaKey).getBytes()) + ]); +}; + +/** + * Converts a private key from an ASN.1 object. + * + * @param obj the ASN.1 representation of a PrivateKeyInfo containing an + * RSAPrivateKey or an RSAPrivateKey. + * + * @return the private key. + */ +pki.privateKeyFromAsn1 = function(obj) { + // get PrivateKeyInfo + var capture = {}; + var errors = []; + if(asn1.validate(obj, privateKeyValidator, capture, errors)) { + obj = asn1.fromDer(forge.util.createBuffer(capture.privateKey)); + } + + // get RSAPrivateKey + capture = {}; + errors = []; + if(!asn1.validate(obj, rsaPrivateKeyValidator, capture, errors)) { + var error = new Error('Cannot read private key. ' + + 'ASN.1 object does not contain an RSAPrivateKey.'); + error.errors = errors; + throw error; + } + + // Note: Version is currently ignored. + // capture.privateKeyVersion + // FIXME: inefficient, get a BigInteger that uses byte strings + var n, e, d, p, q, dP, dQ, qInv; + n = forge.util.createBuffer(capture.privateKeyModulus).toHex(); + e = forge.util.createBuffer(capture.privateKeyPublicExponent).toHex(); + d = forge.util.createBuffer(capture.privateKeyPrivateExponent).toHex(); + p = forge.util.createBuffer(capture.privateKeyPrime1).toHex(); + q = forge.util.createBuffer(capture.privateKeyPrime2).toHex(); + dP = forge.util.createBuffer(capture.privateKeyExponent1).toHex(); + dQ = forge.util.createBuffer(capture.privateKeyExponent2).toHex(); + qInv = forge.util.createBuffer(capture.privateKeyCoefficient).toHex(); + + // set private key + return pki.setRsaPrivateKey( + new BigInteger(n, 16), + new BigInteger(e, 16), + new BigInteger(d, 16), + new BigInteger(p, 16), + new BigInteger(q, 16), + new BigInteger(dP, 16), + new BigInteger(dQ, 16), + new BigInteger(qInv, 16)); +}; + +/** + * Converts a private key to an ASN.1 RSAPrivateKey. + * + * @param key the private key. + * + * @return the ASN.1 representation of an RSAPrivateKey. + */ +pki.privateKeyToAsn1 = pki.privateKeyToRSAPrivateKey = function(key) { + // RSAPrivateKey + return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // version (0 = only 2 primes, 1 multiple primes) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + asn1.integerToDer(0).getBytes()), + // modulus (n) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.n)), + // publicExponent (e) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.e)), + // privateExponent (d) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.d)), + // privateKeyPrime1 (p) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.p)), + // privateKeyPrime2 (q) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.q)), + // privateKeyExponent1 (dP) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.dP)), + // privateKeyExponent2 (dQ) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.dQ)), + // coefficient (qInv) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.qInv)) + ]); +}; + +/** + * Converts a public key from an ASN.1 SubjectPublicKeyInfo or RSAPublicKey. + * + * @param obj the asn1 representation of a SubjectPublicKeyInfo or RSAPublicKey. + * + * @return the public key. + */ +pki.publicKeyFromAsn1 = function(obj) { + // get SubjectPublicKeyInfo + var capture = {}; + var errors = []; + if(asn1.validate(obj, publicKeyValidator, capture, errors)) { + // get oid + var oid = asn1.derToOid(capture.publicKeyOid); + if(oid !== pki.oids.rsaEncryption) { + var error = new Error('Cannot read public key. Unknown OID.'); + error.oid = oid; + throw error; + } + obj = capture.rsaPublicKey; + } + + // get RSA params + errors = []; + if(!asn1.validate(obj, rsaPublicKeyValidator, capture, errors)) { + var error = new Error('Cannot read public key. ' + + 'ASN.1 object does not contain an RSAPublicKey.'); + error.errors = errors; + throw error; + } + + // FIXME: inefficient, get a BigInteger that uses byte strings + var n = forge.util.createBuffer(capture.publicKeyModulus).toHex(); + var e = forge.util.createBuffer(capture.publicKeyExponent).toHex(); + + // set public key + return pki.setRsaPublicKey( + new BigInteger(n, 16), + new BigInteger(e, 16)); +}; + +/** + * Converts a public key to an ASN.1 SubjectPublicKeyInfo. + * + * @param key the public key. + * + * @return the asn1 representation of a SubjectPublicKeyInfo. + */ +pki.publicKeyToAsn1 = pki.publicKeyToSubjectPublicKeyInfo = function(key) { + // SubjectPublicKeyInfo + return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // AlgorithmIdentifier + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // algorithm + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, + asn1.oidToDer(pki.oids.rsaEncryption).getBytes()), + // parameters (null) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '') + ]), + // subjectPublicKey + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, [ + pki.publicKeyToRSAPublicKey(key) + ]) + ]); +}; + +/** + * Converts a public key to an ASN.1 RSAPublicKey. + * + * @param key the public key. + * + * @return the asn1 representation of a RSAPublicKey. + */ +pki.publicKeyToRSAPublicKey = function(key) { + // RSAPublicKey + return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ + // modulus (n) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.n)), + // publicExponent (e) + asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, + _bnToBytes(key.e)) + ]); +}; + +/** + * Encodes a message using PKCS#1 v1.5 padding. + * + * @param m the message to encode. + * @param key the RSA key to use. + * @param bt the block type to use, i.e. either 0x01 (for signing) or 0x02 + * (for encryption). + * + * @return the padded byte buffer. + */ +function _encodePkcs1_v1_5(m, key, bt) { + var eb = forge.util.createBuffer(); + + // get the length of the modulus in bytes + var k = Math.ceil(key.n.bitLength() / 8); + + /* use PKCS#1 v1.5 padding */ + if(m.length > (k - 11)) { + var error = new Error('Message is too long for PKCS#1 v1.5 padding.'); + error.length = m.length; + error.max = k - 11; + throw error; + } + + /* A block type BT, a padding string PS, and the data D shall be + formatted into an octet string EB, the encryption block: + + EB = 00 || BT || PS || 00 || D + + The block type BT shall be a single octet indicating the structure of + the encryption block. For this version of the document it shall have + value 00, 01, or 02. For a private-key operation, the block type + shall be 00 or 01. For a public-key operation, it shall be 02. + + The padding string PS shall consist of k-3-||D|| octets. For block + type 00, the octets shall have value 00; for block type 01, they + shall have value FF; and for block type 02, they shall be + pseudorandomly generated and nonzero. This makes the length of the + encryption block EB equal to k. */ + + // build the encryption block + eb.putByte(0x00); + eb.putByte(bt); + + // create the padding + var padNum = k - 3 - m.length; + var padByte; + // private key op + if(bt === 0x00 || bt === 0x01) { + padByte = (bt === 0x00) ? 0x00 : 0xFF; + for(var i = 0; i < padNum; ++i) { + eb.putByte(padByte); + } + } else { + // public key op + // pad with random non-zero values + while(padNum > 0) { + var numZeros = 0; + var padBytes = forge.random.getBytes(padNum); + for(var i = 0; i < padNum; ++i) { + padByte = padBytes.charCodeAt(i); + if(padByte === 0) { + ++numZeros; + } else { + eb.putByte(padByte); + } + } + padNum = numZeros; + } + } + + // zero followed by message + eb.putByte(0x00); + eb.putBytes(m); + + return eb; +} + +/** + * Decodes a message using PKCS#1 v1.5 padding. + * + * @param em the message to decode. + * @param key the RSA key to use. + * @param pub true if the key is a public key, false if it is private. + * @param ml the message length, if specified. + * + * @return the decoded bytes. + */ +function _decodePkcs1_v1_5(em, key, pub, ml) { + // get the length of the modulus in bytes + var k = Math.ceil(key.n.bitLength() / 8); + + /* It is an error if any of the following conditions occurs: + + 1. The encryption block EB cannot be parsed unambiguously. + 2. The padding string PS consists of fewer than eight octets + or is inconsisent with the block type BT. + 3. The decryption process is a public-key operation and the block + type BT is not 00 or 01, or the decryption process is a + private-key operation and the block type is not 02. + */ + + // parse the encryption block + var eb = forge.util.createBuffer(em); + var first = eb.getByte(); + var bt = eb.getByte(); + if(first !== 0x00 || + (pub && bt !== 0x00 && bt !== 0x01) || + (!pub && bt != 0x02) || + (pub && bt === 0x00 && typeof(ml) === 'undefined')) { + throw new Error('Encryption block is invalid.'); + } + + var padNum = 0; + if(bt === 0x00) { + // check all padding bytes for 0x00 + padNum = k - 3 - ml; + for(var i = 0; i < padNum; ++i) { + if(eb.getByte() !== 0x00) { + throw new Error('Encryption block is invalid.'); + } + } + } else if(bt === 0x01) { + // find the first byte that isn't 0xFF, should be after all padding + padNum = 0; + while(eb.length() > 1) { + if(eb.getByte() !== 0xFF) { + --eb.read; + break; + } + ++padNum; + } + } else if(bt === 0x02) { + // look for 0x00 byte + padNum = 0; + while(eb.length() > 1) { + if(eb.getByte() === 0x00) { + --eb.read; + break; + } + ++padNum; + } + } + + // zero must be 0x00 and padNum must be (k - 3 - message length) + var zero = eb.getByte(); + if(zero !== 0x00 || padNum !== (k - 3 - eb.length())) { + throw new Error('Encryption block is invalid.'); + } + + return eb.getBytes(); +} + +/** + * Runs the key-generation algorithm asynchronously, either in the background + * via Web Workers, or using the main thread and setImmediate. + * + * @param state the key-pair generation state. + * @param [options] options for key-pair generation: + * workerScript the worker script URL. + * workers the number of web workers (if supported) to use, + * (default: 2, -1 to use estimated cores minus one). + * workLoad the size of the work load, ie: number of possible prime + * numbers for each web worker to check per work assignment, + * (default: 100). + * @param callback(err, keypair) called once the operation completes. + */ +function _generateKeyPair(state, options, callback) { + if(typeof options === 'function') { + callback = options; + options = {}; + } + options = options || {}; + + var opts = { + algorithm: { + name: options.algorithm || 'PRIMEINC', + options: { + workers: options.workers || 2, + workLoad: options.workLoad || 100, + workerScript: options.workerScript + } + } + }; + if('prng' in options) { + opts.prng = options.prng; + } + + generate(); + + function generate() { + // find p and then q (done in series to simplify) + getPrime(state.pBits, function(err, num) { + if(err) { + return callback(err); + } + state.p = num; + if(state.q !== null) { + return finish(err, state.q); + } + getPrime(state.qBits, finish); + }); + } + + function getPrime(bits, callback) { + forge.prime.generateProbablePrime(bits, opts, callback); + } + + function finish(err, num) { + if(err) { + return callback(err); + } + + // set q + state.q = num; + + // ensure p is larger than q (swap them if not) + if(state.p.compareTo(state.q) < 0) { + var tmp = state.p; + state.p = state.q; + state.q = tmp; + } + + // ensure p is coprime with e + if(state.p.subtract(BigInteger.ONE).gcd(state.e) + .compareTo(BigInteger.ONE) !== 0) { + state.p = null; + generate(); + return; + } + + // ensure q is coprime with e + if(state.q.subtract(BigInteger.ONE).gcd(state.e) + .compareTo(BigInteger.ONE) !== 0) { + state.q = null; + getPrime(state.qBits, finish); + return; + } + + // compute phi: (p - 1)(q - 1) (Euler's totient function) + state.p1 = state.p.subtract(BigInteger.ONE); + state.q1 = state.q.subtract(BigInteger.ONE); + state.phi = state.p1.multiply(state.q1); + + // ensure e and phi are coprime + if(state.phi.gcd(state.e).compareTo(BigInteger.ONE) !== 0) { + // phi and e aren't coprime, so generate a new p and q + state.p = state.q = null; + generate(); + return; + } + + // create n, ensure n is has the right number of bits + state.n = state.p.multiply(state.q); + if(state.n.bitLength() !== state.bits) { + // failed, get new q + state.q = null; + getPrime(state.qBits, finish); + return; + } + + // set keys + var d = state.e.modInverse(state.phi); + state.keys = { + privateKey: pki.rsa.setPrivateKey( + state.n, state.e, d, state.p, state.q, + d.mod(state.p1), d.mod(state.q1), + state.q.modInverse(state.p)), + publicKey: pki.rsa.setPublicKey(state.n, state.e) + }; + + callback(null, state.keys); + } +} + +/** + * Converts a positive BigInteger into 2's-complement big-endian bytes. + * + * @param b the big integer to convert. + * + * @return the bytes. + */ +function _bnToBytes(b) { + // prepend 0x00 if first byte >= 0x80 + var hex = b.toString(16); + if(hex[0] >= '8') { + hex = '00' + hex; + } + var bytes = forge.util.hexToBytes(hex); + + // ensure integer is minimally-encoded + if(bytes.length > 1 && + // leading 0x00 for positive integer + ((bytes.charCodeAt(0) === 0 && + (bytes.charCodeAt(1) & 0x80) === 0) || + // leading 0xFF for negative integer + (bytes.charCodeAt(0) === 0xFF && + (bytes.charCodeAt(1) & 0x80) === 0x80))) { + return bytes.substr(1); + } + return bytes; +} + +/** + * Returns the required number of Miller-Rabin tests to generate a + * prime with an error probability of (1/2)^80. + * + * See Handbook of Applied Cryptography Chapter 4, Table 4.4. + * + * @param bits the bit size. + * + * @return the required number of iterations. + */ +function _getMillerRabinTests(bits) { + if(bits <= 100) return 27; + if(bits <= 150) return 18; + if(bits <= 200) return 15; + if(bits <= 250) return 12; + if(bits <= 300) return 9; + if(bits <= 350) return 8; + if(bits <= 400) return 7; + if(bits <= 500) return 6; + if(bits <= 600) return 5; + if(bits <= 800) return 4; + if(bits <= 1250) return 3; + return 2; +} + +/** + * Performs feature detection on the Node crypto interface. + * + * @param fn the feature (function) to detect. + * + * @return true if detected, false if not. + */ +function _detectNodeCrypto(fn) { + return forge.util.isNodejs && typeof _crypto[fn] === 'function'; +} + +/** + * Performs feature detection on the SubtleCrypto interface. + * + * @param fn the feature (function) to detect. + * + * @return true if detected, false if not. + */ +function _detectSubtleCrypto(fn) { + return (typeof util.globalScope !== 'undefined' && + typeof util.globalScope.crypto === 'object' && + typeof util.globalScope.crypto.subtle === 'object' && + typeof util.globalScope.crypto.subtle[fn] === 'function'); +} + +/** + * Performs feature detection on the deprecated Microsoft Internet Explorer + * outdated SubtleCrypto interface. This function should only be used after + * checking for the modern, standard SubtleCrypto interface. + * + * @param fn the feature (function) to detect. + * + * @return true if detected, false if not. + */ +function _detectSubtleMsCrypto(fn) { + return (typeof util.globalScope !== 'undefined' && + typeof util.globalScope.msCrypto === 'object' && + typeof util.globalScope.msCrypto.subtle === 'object' && + typeof util.globalScope.msCrypto.subtle[fn] === 'function'); +} + +function _intToUint8Array(x) { + var bytes = forge.util.hexToBytes(x.toString(16)); + var buffer = new Uint8Array(bytes.length); + for(var i = 0; i < bytes.length; ++i) { + buffer[i] = bytes.charCodeAt(i); + } + return buffer; +} + +function _privateKeyFromJwk(jwk) { + if(jwk.kty !== 'RSA') { + throw new Error( + 'Unsupported key algorithm "' + jwk.kty + '"; algorithm must be "RSA".'); + } + return pki.setRsaPrivateKey( + _base64ToBigInt(jwk.n), + _base64ToBigInt(jwk.e), + _base64ToBigInt(jwk.d), + _base64ToBigInt(jwk.p), + _base64ToBigInt(jwk.q), + _base64ToBigInt(jwk.dp), + _base64ToBigInt(jwk.dq), + _base64ToBigInt(jwk.qi)); +} + +function _publicKeyFromJwk(jwk) { + if(jwk.kty !== 'RSA') { + throw new Error('Key algorithm must be "RSA".'); + } + return pki.setRsaPublicKey( + _base64ToBigInt(jwk.n), + _base64ToBigInt(jwk.e)); +} + +function _base64ToBigInt(b64) { + return new BigInteger(forge.util.bytesToHex(forge.util.decode64(b64)), 16); +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 69970: +======= +/***/ 41447: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Secure Hash Algorithm with 160-bit digest (SHA-1) implementation. + * + * @author Dave Longley + * + * Copyright (c) 2010-2015 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(2439); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(80554); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var sha1 = module.exports = forge.sha1 = forge.sha1 || {}; +forge.md.sha1 = forge.md.algorithms.sha1 = sha1; + +/** + * Creates a SHA-1 message digest object. + * + * @return a message digest object. + */ +sha1.create = function() { + // do initialization as necessary + if(!_initialized) { + _init(); + } + + // SHA-1 state contains five 32-bit integers + var _state = null; + + // input buffer + var _input = forge.util.createBuffer(); + + // used for word storage + var _w = new Array(80); + + // message digest object + var md = { + algorithm: 'sha1', + blockLength: 64, + digestLength: 20, + // 56-bit length of message so far (does not including padding) + messageLength: 0, + // true message length + fullMessageLength: null, + // size of message length in bytes + messageLengthSize: 8 + }; + + /** + * Starts the digest. + * + * @return this digest object. + */ + md.start = function() { + // up to 56-bit message length for convenience + md.messageLength = 0; + + // full message length (set md.messageLength64 for backwards-compatibility) + md.fullMessageLength = md.messageLength64 = []; + var int32s = md.messageLengthSize / 4; + for(var i = 0; i < int32s; ++i) { + md.fullMessageLength.push(0); + } + _input = forge.util.createBuffer(); + _state = { + h0: 0x67452301, + h1: 0xEFCDAB89, + h2: 0x98BADCFE, + h3: 0x10325476, + h4: 0xC3D2E1F0 + }; + return md; + }; + // start digest automatically for first time + md.start(); + + /** + * Updates the digest with the given message input. The given input can + * treated as raw input (no encoding will be applied) or an encoding of + * 'utf8' maybe given to encode the input using UTF-8. + * + * @param msg the message input to update with. + * @param encoding the encoding to use (default: 'raw', other: 'utf8'). + * + * @return this digest object. + */ + md.update = function(msg, encoding) { + if(encoding === 'utf8') { + msg = forge.util.encodeUtf8(msg); + } + + // update message length + var len = msg.length; + md.messageLength += len; + len = [(len / 0x100000000) >>> 0, len >>> 0]; + for(var i = md.fullMessageLength.length - 1; i >= 0; --i) { + md.fullMessageLength[i] += len[1]; + len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0); + md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0; + len[0] = ((len[1] / 0x100000000) >>> 0); + } + + // add bytes to input buffer + _input.putBytes(msg); + + // process bytes + _update(_state, _w, _input); + + // compact input buffer every 2K or if empty + if(_input.read > 2048 || _input.length() === 0) { + _input.compact(); + } + + return md; + }; + + /** + * Produces the digest. + * + * @return a byte buffer containing the digest value. + */ + md.digest = function() { + /* Note: Here we copy the remaining bytes in the input buffer and + add the appropriate SHA-1 padding. Then we do the final update + on a copy of the state so that if the user wants to get + intermediate digests they can do so. */ + + /* Determine the number of bytes that must be added to the message + to ensure its length is congruent to 448 mod 512. In other words, + the data to be digested must be a multiple of 512 bits (or 128 bytes). + This data includes the message, some padding, and the length of the + message. Since the length of the message will be encoded as 8 bytes (64 + bits), that means that the last segment of the data must have 56 bytes + (448 bits) of message and padding. Therefore, the length of the message + plus the padding must be congruent to 448 mod 512 because + 512 - 128 = 448. + + In order to fill up the message length it must be filled with + padding that begins with 1 bit followed by all 0 bits. Padding + must *always* be present, so if the message length is already + congruent to 448 mod 512, then 512 padding bits must be added. */ + + var finalBlock = forge.util.createBuffer(); + finalBlock.putBytes(_input.bytes()); + + // compute remaining size to be digested (include message length size) + var remaining = ( + md.fullMessageLength[md.fullMessageLength.length - 1] + + md.messageLengthSize); + + // add padding for overflow blockSize - overflow + // _padding starts with 1 byte with first bit is set (byte value 128), then + // there may be up to (blockSize - 1) other pad bytes + var overflow = remaining & (md.blockLength - 1); + finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow)); + + // serialize message length in bits in big-endian order; since length + // is stored in bytes we multiply by 8 and add carry from next int + var next, carry; + var bits = md.fullMessageLength[0] * 8; + for(var i = 0; i < md.fullMessageLength.length - 1; ++i) { + next = md.fullMessageLength[i + 1] * 8; + carry = (next / 0x100000000) >>> 0; + bits += carry; + finalBlock.putInt32(bits >>> 0); + bits = next >>> 0; + } + finalBlock.putInt32(bits); + + var s2 = { + h0: _state.h0, + h1: _state.h1, + h2: _state.h2, + h3: _state.h3, + h4: _state.h4 + }; + _update(s2, _w, finalBlock); + var rval = forge.util.createBuffer(); + rval.putInt32(s2.h0); + rval.putInt32(s2.h1); + rval.putInt32(s2.h2); + rval.putInt32(s2.h3); + rval.putInt32(s2.h4); + return rval; + }; + + return md; +}; + +// sha-1 padding bytes not initialized yet +var _padding = null; +var _initialized = false; + +/** + * Initializes the constant tables. + */ +function _init() { + // create padding + _padding = String.fromCharCode(128); + _padding += forge.util.fillString(String.fromCharCode(0x00), 64); + + // now initialized + _initialized = true; +} + +/** + * Updates a SHA-1 state with the given byte buffer. + * + * @param s the SHA-1 state to update. + * @param w the array to use to store words. + * @param bytes the byte buffer to update with. + */ +function _update(s, w, bytes) { + // consume 512 bit (64 byte) chunks + var t, a, b, c, d, e, f, i; + var len = bytes.length(); + while(len >= 64) { + // the w array will be populated with sixteen 32-bit big-endian words + // and then extended into 80 32-bit words according to SHA-1 algorithm + // and for 32-79 using Max Locktyukhin's optimization + + // initialize hash value for this chunk + a = s.h0; + b = s.h1; + c = s.h2; + d = s.h3; + e = s.h4; + + // round 1 + for(i = 0; i < 16; ++i) { + t = bytes.getInt32(); + w[i] = t; + f = d ^ (b & (c ^ d)); + t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t; + e = d; + d = c; + // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug + c = ((b << 30) | (b >>> 2)) >>> 0; + b = a; + a = t; + } + for(; i < 20; ++i) { + t = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]); + t = (t << 1) | (t >>> 31); + w[i] = t; + f = d ^ (b & (c ^ d)); + t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t; + e = d; + d = c; + // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug + c = ((b << 30) | (b >>> 2)) >>> 0; + b = a; + a = t; + } + // round 2 + for(; i < 32; ++i) { + t = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]); + t = (t << 1) | (t >>> 31); + w[i] = t; + f = b ^ c ^ d; + t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t; + e = d; + d = c; + // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug + c = ((b << 30) | (b >>> 2)) >>> 0; + b = a; + a = t; + } + for(; i < 40; ++i) { + t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]); + t = (t << 2) | (t >>> 30); + w[i] = t; + f = b ^ c ^ d; + t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t; + e = d; + d = c; + // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug + c = ((b << 30) | (b >>> 2)) >>> 0; + b = a; + a = t; + } + // round 3 + for(; i < 60; ++i) { + t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]); + t = (t << 2) | (t >>> 30); + w[i] = t; + f = (b & c) | (d & (b ^ c)); + t = ((a << 5) | (a >>> 27)) + f + e + 0x8F1BBCDC + t; + e = d; + d = c; + // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug + c = ((b << 30) | (b >>> 2)) >>> 0; + b = a; + a = t; + } + // round 4 + for(; i < 80; ++i) { + t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]); + t = (t << 2) | (t >>> 30); + w[i] = t; + f = b ^ c ^ d; + t = ((a << 5) | (a >>> 27)) + f + e + 0xCA62C1D6 + t; + e = d; + d = c; + // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug + c = ((b << 30) | (b >>> 2)) >>> 0; + b = a; + a = t; + } + + // update hash state + s.h0 = (s.h0 + a) | 0; + s.h1 = (s.h1 + b) | 0; + s.h2 = (s.h2 + c) | 0; + s.h3 = (s.h3 + d) | 0; + s.h4 = (s.h4 + e) | 0; + + len -= 64; + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 13809: +======= +/***/ 3241: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Secure Hash Algorithm with 256-bit digest (SHA-256) implementation. + * + * See FIPS 180-2 for details. + * + * @author Dave Longley + * + * Copyright (c) 2010-2015 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(2439); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(80554); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var sha256 = module.exports = forge.sha256 = forge.sha256 || {}; +forge.md.sha256 = forge.md.algorithms.sha256 = sha256; + +/** + * Creates a SHA-256 message digest object. + * + * @return a message digest object. + */ +sha256.create = function() { + // do initialization as necessary + if(!_initialized) { + _init(); + } + + // SHA-256 state contains eight 32-bit integers + var _state = null; + + // input buffer + var _input = forge.util.createBuffer(); + + // used for word storage + var _w = new Array(64); + + // message digest object + var md = { + algorithm: 'sha256', + blockLength: 64, + digestLength: 32, + // 56-bit length of message so far (does not including padding) + messageLength: 0, + // true message length + fullMessageLength: null, + // size of message length in bytes + messageLengthSize: 8 + }; + + /** + * Starts the digest. + * + * @return this digest object. + */ + md.start = function() { + // up to 56-bit message length for convenience + md.messageLength = 0; + + // full message length (set md.messageLength64 for backwards-compatibility) + md.fullMessageLength = md.messageLength64 = []; + var int32s = md.messageLengthSize / 4; + for(var i = 0; i < int32s; ++i) { + md.fullMessageLength.push(0); + } + _input = forge.util.createBuffer(); + _state = { + h0: 0x6A09E667, + h1: 0xBB67AE85, + h2: 0x3C6EF372, + h3: 0xA54FF53A, + h4: 0x510E527F, + h5: 0x9B05688C, + h6: 0x1F83D9AB, + h7: 0x5BE0CD19 + }; + return md; + }; + // start digest automatically for first time + md.start(); + + /** + * Updates the digest with the given message input. The given input can + * treated as raw input (no encoding will be applied) or an encoding of + * 'utf8' maybe given to encode the input using UTF-8. + * + * @param msg the message input to update with. + * @param encoding the encoding to use (default: 'raw', other: 'utf8'). + * + * @return this digest object. + */ + md.update = function(msg, encoding) { + if(encoding === 'utf8') { + msg = forge.util.encodeUtf8(msg); + } + + // update message length + var len = msg.length; + md.messageLength += len; + len = [(len / 0x100000000) >>> 0, len >>> 0]; + for(var i = md.fullMessageLength.length - 1; i >= 0; --i) { + md.fullMessageLength[i] += len[1]; + len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0); + md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0; + len[0] = ((len[1] / 0x100000000) >>> 0); + } + + // add bytes to input buffer + _input.putBytes(msg); + + // process bytes + _update(_state, _w, _input); + + // compact input buffer every 2K or if empty + if(_input.read > 2048 || _input.length() === 0) { + _input.compact(); + } + + return md; + }; + + /** + * Produces the digest. + * + * @return a byte buffer containing the digest value. + */ + md.digest = function() { + /* Note: Here we copy the remaining bytes in the input buffer and + add the appropriate SHA-256 padding. Then we do the final update + on a copy of the state so that if the user wants to get + intermediate digests they can do so. */ + + /* Determine the number of bytes that must be added to the message + to ensure its length is congruent to 448 mod 512. In other words, + the data to be digested must be a multiple of 512 bits (or 128 bytes). + This data includes the message, some padding, and the length of the + message. Since the length of the message will be encoded as 8 bytes (64 + bits), that means that the last segment of the data must have 56 bytes + (448 bits) of message and padding. Therefore, the length of the message + plus the padding must be congruent to 448 mod 512 because + 512 - 128 = 448. + + In order to fill up the message length it must be filled with + padding that begins with 1 bit followed by all 0 bits. Padding + must *always* be present, so if the message length is already + congruent to 448 mod 512, then 512 padding bits must be added. */ + + var finalBlock = forge.util.createBuffer(); + finalBlock.putBytes(_input.bytes()); + + // compute remaining size to be digested (include message length size) + var remaining = ( + md.fullMessageLength[md.fullMessageLength.length - 1] + + md.messageLengthSize); + + // add padding for overflow blockSize - overflow + // _padding starts with 1 byte with first bit is set (byte value 128), then + // there may be up to (blockSize - 1) other pad bytes + var overflow = remaining & (md.blockLength - 1); + finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow)); + + // serialize message length in bits in big-endian order; since length + // is stored in bytes we multiply by 8 and add carry from next int + var next, carry; + var bits = md.fullMessageLength[0] * 8; + for(var i = 0; i < md.fullMessageLength.length - 1; ++i) { + next = md.fullMessageLength[i + 1] * 8; + carry = (next / 0x100000000) >>> 0; + bits += carry; + finalBlock.putInt32(bits >>> 0); + bits = next >>> 0; + } + finalBlock.putInt32(bits); + + var s2 = { + h0: _state.h0, + h1: _state.h1, + h2: _state.h2, + h3: _state.h3, + h4: _state.h4, + h5: _state.h5, + h6: _state.h6, + h7: _state.h7 + }; + _update(s2, _w, finalBlock); + var rval = forge.util.createBuffer(); + rval.putInt32(s2.h0); + rval.putInt32(s2.h1); + rval.putInt32(s2.h2); + rval.putInt32(s2.h3); + rval.putInt32(s2.h4); + rval.putInt32(s2.h5); + rval.putInt32(s2.h6); + rval.putInt32(s2.h7); + return rval; + }; + + return md; +}; + +// sha-256 padding bytes not initialized yet +var _padding = null; +var _initialized = false; + +// table of constants +var _k = null; + +/** + * Initializes the constant tables. + */ +function _init() { + // create padding + _padding = String.fromCharCode(128); + _padding += forge.util.fillString(String.fromCharCode(0x00), 64); + + // create K table for SHA-256 + _k = [ + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]; + + // now initialized + _initialized = true; +} + +/** + * Updates a SHA-256 state with the given byte buffer. + * + * @param s the SHA-256 state to update. + * @param w the array to use to store words. + * @param bytes the byte buffer to update with. + */ +function _update(s, w, bytes) { + // consume 512 bit (64 byte) chunks + var t1, t2, s0, s1, ch, maj, i, a, b, c, d, e, f, g, h; + var len = bytes.length(); + while(len >= 64) { + // the w array will be populated with sixteen 32-bit big-endian words + // and then extended into 64 32-bit words according to SHA-256 + for(i = 0; i < 16; ++i) { + w[i] = bytes.getInt32(); + } + for(; i < 64; ++i) { + // XOR word 2 words ago rot right 17, rot right 19, shft right 10 + t1 = w[i - 2]; + t1 = + ((t1 >>> 17) | (t1 << 15)) ^ + ((t1 >>> 19) | (t1 << 13)) ^ + (t1 >>> 10); + // XOR word 15 words ago rot right 7, rot right 18, shft right 3 + t2 = w[i - 15]; + t2 = + ((t2 >>> 7) | (t2 << 25)) ^ + ((t2 >>> 18) | (t2 << 14)) ^ + (t2 >>> 3); + // sum(t1, word 7 ago, t2, word 16 ago) modulo 2^32 + w[i] = (t1 + w[i - 7] + t2 + w[i - 16]) | 0; + } + + // initialize hash value for this chunk + a = s.h0; + b = s.h1; + c = s.h2; + d = s.h3; + e = s.h4; + f = s.h5; + g = s.h6; + h = s.h7; + + // round function + for(i = 0; i < 64; ++i) { + // Sum1(e) + s1 = + ((e >>> 6) | (e << 26)) ^ + ((e >>> 11) | (e << 21)) ^ + ((e >>> 25) | (e << 7)); + // Ch(e, f, g) (optimized the same way as SHA-1) + ch = g ^ (e & (f ^ g)); + // Sum0(a) + s0 = + ((a >>> 2) | (a << 30)) ^ + ((a >>> 13) | (a << 19)) ^ + ((a >>> 22) | (a << 10)); + // Maj(a, b, c) (optimized the same way as SHA-1) + maj = (a & b) | (c & (a ^ b)); + + // main algorithm + t1 = h + s1 + ch + _k[i] + w[i]; + t2 = s0 + maj; + h = g; + g = f; + f = e; + // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug + // can't truncate with `| 0` + e = (d + t1) >>> 0; + d = c; + c = b; + b = a; + // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug + // can't truncate with `| 0` + a = (t1 + t2) >>> 0; + } + + // update hash state + s.h0 = (s.h0 + a) | 0; + s.h1 = (s.h1 + b) | 0; + s.h2 = (s.h2 + c) | 0; + s.h3 = (s.h3 + d) | 0; + s.h4 = (s.h4 + e) | 0; + s.h5 = (s.h5 + f) | 0; + s.h6 = (s.h6 + g) | 0; + s.h7 = (s.h7 + h) | 0; + len -= 64; + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 5388: +======= +/***/ 34531: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Secure Hash Algorithm with a 1024-bit block size implementation. + * + * This includes: SHA-512, SHA-384, SHA-512/224, and SHA-512/256. For + * SHA-256 (block size 512 bits), see sha256.js. + * + * See FIPS 180-4 for details. + * + * @author Dave Longley + * + * Copyright (c) 2014-2015 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +__nccwpck_require__(2439); +__nccwpck_require__(19239); +======= +var forge = __nccwpck_require__(96630); +__nccwpck_require__(80554); +__nccwpck_require__(36536); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var sha512 = module.exports = forge.sha512 = forge.sha512 || {}; + +// SHA-512 +forge.md.sha512 = forge.md.algorithms.sha512 = sha512; + +// SHA-384 +var sha384 = forge.sha384 = forge.sha512.sha384 = forge.sha512.sha384 || {}; +sha384.create = function() { + return sha512.create('SHA-384'); +}; +forge.md.sha384 = forge.md.algorithms.sha384 = sha384; + +// SHA-512/256 +forge.sha512.sha256 = forge.sha512.sha256 || { + create: function() { + return sha512.create('SHA-512/256'); + } +}; +forge.md['sha512/256'] = forge.md.algorithms['sha512/256'] = + forge.sha512.sha256; + +// SHA-512/224 +forge.sha512.sha224 = forge.sha512.sha224 || { + create: function() { + return sha512.create('SHA-512/224'); + } +}; +forge.md['sha512/224'] = forge.md.algorithms['sha512/224'] = + forge.sha512.sha224; + +/** + * Creates a SHA-2 message digest object. + * + * @param algorithm the algorithm to use (SHA-512, SHA-384, SHA-512/224, + * SHA-512/256). + * + * @return a message digest object. + */ +sha512.create = function(algorithm) { + // do initialization as necessary + if(!_initialized) { + _init(); + } + + if(typeof algorithm === 'undefined') { + algorithm = 'SHA-512'; + } + + if(!(algorithm in _states)) { + throw new Error('Invalid SHA-512 algorithm: ' + algorithm); + } + + // SHA-512 state contains eight 64-bit integers (each as two 32-bit ints) + var _state = _states[algorithm]; + var _h = null; + + // input buffer + var _input = forge.util.createBuffer(); + + // used for 64-bit word storage + var _w = new Array(80); + for(var wi = 0; wi < 80; ++wi) { + _w[wi] = new Array(2); + } + + // determine digest length by algorithm name (default) + var digestLength = 64; + switch(algorithm) { + case 'SHA-384': + digestLength = 48; + break; + case 'SHA-512/256': + digestLength = 32; + break; + case 'SHA-512/224': + digestLength = 28; + break; + } + + // message digest object + var md = { + // SHA-512 => sha512 + algorithm: algorithm.replace('-', '').toLowerCase(), + blockLength: 128, + digestLength: digestLength, + // 56-bit length of message so far (does not including padding) + messageLength: 0, + // true message length + fullMessageLength: null, + // size of message length in bytes + messageLengthSize: 16 + }; + + /** + * Starts the digest. + * + * @return this digest object. + */ + md.start = function() { + // up to 56-bit message length for convenience + md.messageLength = 0; + + // full message length (set md.messageLength128 for backwards-compatibility) + md.fullMessageLength = md.messageLength128 = []; + var int32s = md.messageLengthSize / 4; + for(var i = 0; i < int32s; ++i) { + md.fullMessageLength.push(0); + } + _input = forge.util.createBuffer(); + _h = new Array(_state.length); + for(var i = 0; i < _state.length; ++i) { + _h[i] = _state[i].slice(0); + } + return md; + }; + // start digest automatically for first time + md.start(); + + /** + * Updates the digest with the given message input. The given input can + * treated as raw input (no encoding will be applied) or an encoding of + * 'utf8' maybe given to encode the input using UTF-8. + * + * @param msg the message input to update with. + * @param encoding the encoding to use (default: 'raw', other: 'utf8'). + * + * @return this digest object. + */ + md.update = function(msg, encoding) { + if(encoding === 'utf8') { + msg = forge.util.encodeUtf8(msg); + } + + // update message length + var len = msg.length; + md.messageLength += len; + len = [(len / 0x100000000) >>> 0, len >>> 0]; + for(var i = md.fullMessageLength.length - 1; i >= 0; --i) { + md.fullMessageLength[i] += len[1]; + len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0); + md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0; + len[0] = ((len[1] / 0x100000000) >>> 0); + } + + // add bytes to input buffer + _input.putBytes(msg); + + // process bytes + _update(_h, _w, _input); + + // compact input buffer every 2K or if empty + if(_input.read > 2048 || _input.length() === 0) { + _input.compact(); + } + + return md; + }; + + /** + * Produces the digest. + * + * @return a byte buffer containing the digest value. + */ + md.digest = function() { + /* Note: Here we copy the remaining bytes in the input buffer and + add the appropriate SHA-512 padding. Then we do the final update + on a copy of the state so that if the user wants to get + intermediate digests they can do so. */ + + /* Determine the number of bytes that must be added to the message + to ensure its length is congruent to 896 mod 1024. In other words, + the data to be digested must be a multiple of 1024 bits (or 128 bytes). + This data includes the message, some padding, and the length of the + message. Since the length of the message will be encoded as 16 bytes (128 + bits), that means that the last segment of the data must have 112 bytes + (896 bits) of message and padding. Therefore, the length of the message + plus the padding must be congruent to 896 mod 1024 because + 1024 - 128 = 896. + + In order to fill up the message length it must be filled with + padding that begins with 1 bit followed by all 0 bits. Padding + must *always* be present, so if the message length is already + congruent to 896 mod 1024, then 1024 padding bits must be added. */ + + var finalBlock = forge.util.createBuffer(); + finalBlock.putBytes(_input.bytes()); + + // compute remaining size to be digested (include message length size) + var remaining = ( + md.fullMessageLength[md.fullMessageLength.length - 1] + + md.messageLengthSize); + + // add padding for overflow blockSize - overflow + // _padding starts with 1 byte with first bit is set (byte value 128), then + // there may be up to (blockSize - 1) other pad bytes + var overflow = remaining & (md.blockLength - 1); + finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow)); + + // serialize message length in bits in big-endian order; since length + // is stored in bytes we multiply by 8 and add carry from next int + var next, carry; + var bits = md.fullMessageLength[0] * 8; + for(var i = 0; i < md.fullMessageLength.length - 1; ++i) { + next = md.fullMessageLength[i + 1] * 8; + carry = (next / 0x100000000) >>> 0; + bits += carry; + finalBlock.putInt32(bits >>> 0); + bits = next >>> 0; + } + finalBlock.putInt32(bits); + + var h = new Array(_h.length); + for(var i = 0; i < _h.length; ++i) { + h[i] = _h[i].slice(0); + } + _update(h, _w, finalBlock); + var rval = forge.util.createBuffer(); + var hlen; + if(algorithm === 'SHA-512') { + hlen = h.length; + } else if(algorithm === 'SHA-384') { + hlen = h.length - 2; + } else { + hlen = h.length - 4; + } + for(var i = 0; i < hlen; ++i) { + rval.putInt32(h[i][0]); + if(i !== hlen - 1 || algorithm !== 'SHA-512/224') { + rval.putInt32(h[i][1]); + } + } + return rval; + }; + + return md; +}; + +// sha-512 padding bytes not initialized yet +var _padding = null; +var _initialized = false; + +// table of constants +var _k = null; + +// initial hash states +var _states = null; + +/** + * Initializes the constant tables. + */ +function _init() { + // create padding + _padding = String.fromCharCode(128); + _padding += forge.util.fillString(String.fromCharCode(0x00), 128); + + // create K table for SHA-512 + _k = [ + [0x428a2f98, 0xd728ae22], [0x71374491, 0x23ef65cd], + [0xb5c0fbcf, 0xec4d3b2f], [0xe9b5dba5, 0x8189dbbc], + [0x3956c25b, 0xf348b538], [0x59f111f1, 0xb605d019], + [0x923f82a4, 0xaf194f9b], [0xab1c5ed5, 0xda6d8118], + [0xd807aa98, 0xa3030242], [0x12835b01, 0x45706fbe], + [0x243185be, 0x4ee4b28c], [0x550c7dc3, 0xd5ffb4e2], + [0x72be5d74, 0xf27b896f], [0x80deb1fe, 0x3b1696b1], + [0x9bdc06a7, 0x25c71235], [0xc19bf174, 0xcf692694], + [0xe49b69c1, 0x9ef14ad2], [0xefbe4786, 0x384f25e3], + [0x0fc19dc6, 0x8b8cd5b5], [0x240ca1cc, 0x77ac9c65], + [0x2de92c6f, 0x592b0275], [0x4a7484aa, 0x6ea6e483], + [0x5cb0a9dc, 0xbd41fbd4], [0x76f988da, 0x831153b5], + [0x983e5152, 0xee66dfab], [0xa831c66d, 0x2db43210], + [0xb00327c8, 0x98fb213f], [0xbf597fc7, 0xbeef0ee4], + [0xc6e00bf3, 0x3da88fc2], [0xd5a79147, 0x930aa725], + [0x06ca6351, 0xe003826f], [0x14292967, 0x0a0e6e70], + [0x27b70a85, 0x46d22ffc], [0x2e1b2138, 0x5c26c926], + [0x4d2c6dfc, 0x5ac42aed], [0x53380d13, 0x9d95b3df], + [0x650a7354, 0x8baf63de], [0x766a0abb, 0x3c77b2a8], + [0x81c2c92e, 0x47edaee6], [0x92722c85, 0x1482353b], + [0xa2bfe8a1, 0x4cf10364], [0xa81a664b, 0xbc423001], + [0xc24b8b70, 0xd0f89791], [0xc76c51a3, 0x0654be30], + [0xd192e819, 0xd6ef5218], [0xd6990624, 0x5565a910], + [0xf40e3585, 0x5771202a], [0x106aa070, 0x32bbd1b8], + [0x19a4c116, 0xb8d2d0c8], [0x1e376c08, 0x5141ab53], + [0x2748774c, 0xdf8eeb99], [0x34b0bcb5, 0xe19b48a8], + [0x391c0cb3, 0xc5c95a63], [0x4ed8aa4a, 0xe3418acb], + [0x5b9cca4f, 0x7763e373], [0x682e6ff3, 0xd6b2b8a3], + [0x748f82ee, 0x5defb2fc], [0x78a5636f, 0x43172f60], + [0x84c87814, 0xa1f0ab72], [0x8cc70208, 0x1a6439ec], + [0x90befffa, 0x23631e28], [0xa4506ceb, 0xde82bde9], + [0xbef9a3f7, 0xb2c67915], [0xc67178f2, 0xe372532b], + [0xca273ece, 0xea26619c], [0xd186b8c7, 0x21c0c207], + [0xeada7dd6, 0xcde0eb1e], [0xf57d4f7f, 0xee6ed178], + [0x06f067aa, 0x72176fba], [0x0a637dc5, 0xa2c898a6], + [0x113f9804, 0xbef90dae], [0x1b710b35, 0x131c471b], + [0x28db77f5, 0x23047d84], [0x32caab7b, 0x40c72493], + [0x3c9ebe0a, 0x15c9bebc], [0x431d67c4, 0x9c100d4c], + [0x4cc5d4be, 0xcb3e42b6], [0x597f299c, 0xfc657e2a], + [0x5fcb6fab, 0x3ad6faec], [0x6c44198c, 0x4a475817] + ]; + + // initial hash states + _states = {}; + _states['SHA-512'] = [ + [0x6a09e667, 0xf3bcc908], + [0xbb67ae85, 0x84caa73b], + [0x3c6ef372, 0xfe94f82b], + [0xa54ff53a, 0x5f1d36f1], + [0x510e527f, 0xade682d1], + [0x9b05688c, 0x2b3e6c1f], + [0x1f83d9ab, 0xfb41bd6b], + [0x5be0cd19, 0x137e2179] + ]; + _states['SHA-384'] = [ + [0xcbbb9d5d, 0xc1059ed8], + [0x629a292a, 0x367cd507], + [0x9159015a, 0x3070dd17], + [0x152fecd8, 0xf70e5939], + [0x67332667, 0xffc00b31], + [0x8eb44a87, 0x68581511], + [0xdb0c2e0d, 0x64f98fa7], + [0x47b5481d, 0xbefa4fa4] + ]; + _states['SHA-512/256'] = [ + [0x22312194, 0xFC2BF72C], + [0x9F555FA3, 0xC84C64C2], + [0x2393B86B, 0x6F53B151], + [0x96387719, 0x5940EABD], + [0x96283EE2, 0xA88EFFE3], + [0xBE5E1E25, 0x53863992], + [0x2B0199FC, 0x2C85B8AA], + [0x0EB72DDC, 0x81C52CA2] + ]; + _states['SHA-512/224'] = [ + [0x8C3D37C8, 0x19544DA2], + [0x73E19966, 0x89DCD4D6], + [0x1DFAB7AE, 0x32FF9C82], + [0x679DD514, 0x582F9FCF], + [0x0F6D2B69, 0x7BD44DA8], + [0x77E36F73, 0x04C48942], + [0x3F9D85A8, 0x6A1D36C8], + [0x1112E6AD, 0x91D692A1] + ]; + + // now initialized + _initialized = true; +} + +/** + * Updates a SHA-512 state with the given byte buffer. + * + * @param s the SHA-512 state to update. + * @param w the array to use to store words. + * @param bytes the byte buffer to update with. + */ +function _update(s, w, bytes) { + // consume 512 bit (128 byte) chunks + var t1_hi, t1_lo; + var t2_hi, t2_lo; + var s0_hi, s0_lo; + var s1_hi, s1_lo; + var ch_hi, ch_lo; + var maj_hi, maj_lo; + var a_hi, a_lo; + var b_hi, b_lo; + var c_hi, c_lo; + var d_hi, d_lo; + var e_hi, e_lo; + var f_hi, f_lo; + var g_hi, g_lo; + var h_hi, h_lo; + var i, hi, lo, w2, w7, w15, w16; + var len = bytes.length(); + while(len >= 128) { + // the w array will be populated with sixteen 64-bit big-endian words + // and then extended into 64 64-bit words according to SHA-512 + for(i = 0; i < 16; ++i) { + w[i][0] = bytes.getInt32() >>> 0; + w[i][1] = bytes.getInt32() >>> 0; + } + for(; i < 80; ++i) { + // for word 2 words ago: ROTR 19(x) ^ ROTR 61(x) ^ SHR 6(x) + w2 = w[i - 2]; + hi = w2[0]; + lo = w2[1]; + + // high bits + t1_hi = ( + ((hi >>> 19) | (lo << 13)) ^ // ROTR 19 + ((lo >>> 29) | (hi << 3)) ^ // ROTR 61/(swap + ROTR 29) + (hi >>> 6)) >>> 0; // SHR 6 + // low bits + t1_lo = ( + ((hi << 13) | (lo >>> 19)) ^ // ROTR 19 + ((lo << 3) | (hi >>> 29)) ^ // ROTR 61/(swap + ROTR 29) + ((hi << 26) | (lo >>> 6))) >>> 0; // SHR 6 + + // for word 15 words ago: ROTR 1(x) ^ ROTR 8(x) ^ SHR 7(x) + w15 = w[i - 15]; + hi = w15[0]; + lo = w15[1]; + + // high bits + t2_hi = ( + ((hi >>> 1) | (lo << 31)) ^ // ROTR 1 + ((hi >>> 8) | (lo << 24)) ^ // ROTR 8 + (hi >>> 7)) >>> 0; // SHR 7 + // low bits + t2_lo = ( + ((hi << 31) | (lo >>> 1)) ^ // ROTR 1 + ((hi << 24) | (lo >>> 8)) ^ // ROTR 8 + ((hi << 25) | (lo >>> 7))) >>> 0; // SHR 7 + + // sum(t1, word 7 ago, t2, word 16 ago) modulo 2^64 (carry lo overflow) + w7 = w[i - 7]; + w16 = w[i - 16]; + lo = (t1_lo + w7[1] + t2_lo + w16[1]); + w[i][0] = (t1_hi + w7[0] + t2_hi + w16[0] + + ((lo / 0x100000000) >>> 0)) >>> 0; + w[i][1] = lo >>> 0; + } + + // initialize hash value for this chunk + a_hi = s[0][0]; + a_lo = s[0][1]; + b_hi = s[1][0]; + b_lo = s[1][1]; + c_hi = s[2][0]; + c_lo = s[2][1]; + d_hi = s[3][0]; + d_lo = s[3][1]; + e_hi = s[4][0]; + e_lo = s[4][1]; + f_hi = s[5][0]; + f_lo = s[5][1]; + g_hi = s[6][0]; + g_lo = s[6][1]; + h_hi = s[7][0]; + h_lo = s[7][1]; + + // round function + for(i = 0; i < 80; ++i) { + // Sum1(e) = ROTR 14(e) ^ ROTR 18(e) ^ ROTR 41(e) + s1_hi = ( + ((e_hi >>> 14) | (e_lo << 18)) ^ // ROTR 14 + ((e_hi >>> 18) | (e_lo << 14)) ^ // ROTR 18 + ((e_lo >>> 9) | (e_hi << 23))) >>> 0; // ROTR 41/(swap + ROTR 9) + s1_lo = ( + ((e_hi << 18) | (e_lo >>> 14)) ^ // ROTR 14 + ((e_hi << 14) | (e_lo >>> 18)) ^ // ROTR 18 + ((e_lo << 23) | (e_hi >>> 9))) >>> 0; // ROTR 41/(swap + ROTR 9) + + // Ch(e, f, g) (optimized the same way as SHA-1) + ch_hi = (g_hi ^ (e_hi & (f_hi ^ g_hi))) >>> 0; + ch_lo = (g_lo ^ (e_lo & (f_lo ^ g_lo))) >>> 0; + + // Sum0(a) = ROTR 28(a) ^ ROTR 34(a) ^ ROTR 39(a) + s0_hi = ( + ((a_hi >>> 28) | (a_lo << 4)) ^ // ROTR 28 + ((a_lo >>> 2) | (a_hi << 30)) ^ // ROTR 34/(swap + ROTR 2) + ((a_lo >>> 7) | (a_hi << 25))) >>> 0; // ROTR 39/(swap + ROTR 7) + s0_lo = ( + ((a_hi << 4) | (a_lo >>> 28)) ^ // ROTR 28 + ((a_lo << 30) | (a_hi >>> 2)) ^ // ROTR 34/(swap + ROTR 2) + ((a_lo << 25) | (a_hi >>> 7))) >>> 0; // ROTR 39/(swap + ROTR 7) + + // Maj(a, b, c) (optimized the same way as SHA-1) + maj_hi = ((a_hi & b_hi) | (c_hi & (a_hi ^ b_hi))) >>> 0; + maj_lo = ((a_lo & b_lo) | (c_lo & (a_lo ^ b_lo))) >>> 0; + + // main algorithm + // t1 = (h + s1 + ch + _k[i] + _w[i]) modulo 2^64 (carry lo overflow) + lo = (h_lo + s1_lo + ch_lo + _k[i][1] + w[i][1]); + t1_hi = (h_hi + s1_hi + ch_hi + _k[i][0] + w[i][0] + + ((lo / 0x100000000) >>> 0)) >>> 0; + t1_lo = lo >>> 0; + + // t2 = s0 + maj modulo 2^64 (carry lo overflow) + lo = s0_lo + maj_lo; + t2_hi = (s0_hi + maj_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + t2_lo = lo >>> 0; + + h_hi = g_hi; + h_lo = g_lo; + + g_hi = f_hi; + g_lo = f_lo; + + f_hi = e_hi; + f_lo = e_lo; + + // e = (d + t1) modulo 2^64 (carry lo overflow) + lo = d_lo + t1_lo; + e_hi = (d_hi + t1_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + e_lo = lo >>> 0; + + d_hi = c_hi; + d_lo = c_lo; + + c_hi = b_hi; + c_lo = b_lo; + + b_hi = a_hi; + b_lo = a_lo; + + // a = (t1 + t2) modulo 2^64 (carry lo overflow) + lo = t1_lo + t2_lo; + a_hi = (t1_hi + t2_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + a_lo = lo >>> 0; + } + + // update hash state (additional modulo 2^64) + lo = s[0][1] + a_lo; + s[0][0] = (s[0][0] + a_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + s[0][1] = lo >>> 0; + + lo = s[1][1] + b_lo; + s[1][0] = (s[1][0] + b_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + s[1][1] = lo >>> 0; + + lo = s[2][1] + c_lo; + s[2][0] = (s[2][0] + c_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + s[2][1] = lo >>> 0; + + lo = s[3][1] + d_lo; + s[3][0] = (s[3][0] + d_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + s[3][1] = lo >>> 0; + + lo = s[4][1] + e_lo; + s[4][0] = (s[4][0] + e_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + s[4][1] = lo >>> 0; + + lo = s[5][1] + f_lo; + s[5][0] = (s[5][0] + f_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + s[5][1] = lo >>> 0; + + lo = s[6][1] + g_lo; + s[6][0] = (s[6][0] + g_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + s[6][1] = lo >>> 0; + + lo = s[7][1] + h_lo; + s[7][0] = (s[7][0] + h_hi + ((lo / 0x100000000) >>> 0)) >>> 0; + s[7][1] = lo >>> 0; + + len -= 128; + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 19239: +======= +/***/ 36536: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/** + * Utility functions for web applications. + * + * @author Dave Longley + * + * Copyright (c) 2010-2018 Digital Bazaar, Inc. + */ +<<<<<<< HEAD +var forge = __nccwpck_require__(72177); +var baseN = __nccwpck_require__(56845); +======= +var forge = __nccwpck_require__(96630); +var baseN = __nccwpck_require__(12390); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/* Utilities API */ +var util = module.exports = forge.util = forge.util || {}; + +// define setImmediate and nextTick +(function() { + // use native nextTick (unless we're in webpack) + // webpack (or better node-libs-browser polyfill) sets process.browser. + // this way we can detect webpack properly + if(typeof process !== 'undefined' && process.nextTick && !process.browser) { + util.nextTick = process.nextTick; + if(typeof setImmediate === 'function') { + util.setImmediate = setImmediate; + } else { + // polyfill setImmediate with nextTick, older versions of node + // (those w/o setImmediate) won't totally starve IO + util.setImmediate = util.nextTick; + } + return; + } + + // polyfill nextTick with native setImmediate + if(typeof setImmediate === 'function') { + util.setImmediate = function() { return setImmediate.apply(undefined, arguments); }; + util.nextTick = function(callback) { + return setImmediate(callback); + }; + return; + } + + /* Note: A polyfill upgrade pattern is used here to allow combining + polyfills. For example, MutationObserver is fast, but blocks UI updates, + so it needs to allow UI updates periodically, so it falls back on + postMessage or setTimeout. */ + + // polyfill with setTimeout + util.setImmediate = function(callback) { + setTimeout(callback, 0); + }; + + // upgrade polyfill to use postMessage + if(typeof window !== 'undefined' && + typeof window.postMessage === 'function') { + var msg = 'forge.setImmediate'; + var callbacks = []; + util.setImmediate = function(callback) { + callbacks.push(callback); + // only send message when one hasn't been sent in + // the current turn of the event loop + if(callbacks.length === 1) { + window.postMessage(msg, '*'); + } + }; + function handler(event) { + if(event.source === window && event.data === msg) { + event.stopPropagation(); + var copy = callbacks.slice(); + callbacks.length = 0; + copy.forEach(function(callback) { + callback(); + }); + } + } + window.addEventListener('message', handler, true); + } + + // upgrade polyfill to use MutationObserver + if(typeof MutationObserver !== 'undefined') { + // polyfill with MutationObserver + var now = Date.now(); + var attr = true; + var div = document.createElement('div'); + var callbacks = []; + new MutationObserver(function() { + var copy = callbacks.slice(); + callbacks.length = 0; + copy.forEach(function(callback) { + callback(); + }); + }).observe(div, {attributes: true}); + var oldSetImmediate = util.setImmediate; + util.setImmediate = function(callback) { + if(Date.now() - now > 15) { + now = Date.now(); + oldSetImmediate(callback); + } else { + callbacks.push(callback); + // only trigger observer when it hasn't been triggered in + // the current turn of the event loop + if(callbacks.length === 1) { + div.setAttribute('a', attr = !attr); + } + } + }; + } + + util.nextTick = util.setImmediate; +})(); + +// check if running under Node.js +util.isNodejs = + typeof process !== 'undefined' && process.versions && process.versions.node; + + +// 'self' will also work in Web Workers (instance of WorkerGlobalScope) while +// it will point to `window` in the main thread. +// To remain compatible with older browsers, we fall back to 'window' if 'self' +// is not available. +util.globalScope = (function() { + if(util.isNodejs) { + return global; + } + + return typeof self === 'undefined' ? window : self; +})(); + +// define isArray +util.isArray = Array.isArray || function(x) { + return Object.prototype.toString.call(x) === '[object Array]'; +}; + +// define isArrayBuffer +util.isArrayBuffer = function(x) { + return typeof ArrayBuffer !== 'undefined' && x instanceof ArrayBuffer; +}; + +// define isArrayBufferView +util.isArrayBufferView = function(x) { + return x && util.isArrayBuffer(x.buffer) && x.byteLength !== undefined; +}; + +/** + * Ensure a bits param is 8, 16, 24, or 32. Used to validate input for + * algorithms where bit manipulation, JavaScript limitations, and/or algorithm + * design only allow for byte operations of a limited size. + * + * @param n number of bits. + * + * Throw Error if n invalid. + */ +function _checkBitsParam(n) { + if(!(n === 8 || n === 16 || n === 24 || n === 32)) { + throw new Error('Only 8, 16, 24, or 32 bits supported: ' + n); + } +} + +// TODO: set ByteBuffer to best available backing +util.ByteBuffer = ByteStringBuffer; + +/** Buffer w/BinaryString backing */ + +/** + * Constructor for a binary string backed byte buffer. + * + * @param [b] the bytes to wrap (either encoded as string, one byte per + * character, or as an ArrayBuffer or Typed Array). + */ +function ByteStringBuffer(b) { + // TODO: update to match DataBuffer API + + // the data in this buffer + this.data = ''; + // the pointer for reading from this buffer + this.read = 0; + + if(typeof b === 'string') { + this.data = b; + } else if(util.isArrayBuffer(b) || util.isArrayBufferView(b)) { + if(typeof Buffer !== 'undefined' && b instanceof Buffer) { + this.data = b.toString('binary'); + } else { + // convert native buffer to forge buffer + // FIXME: support native buffers internally instead + var arr = new Uint8Array(b); + try { + this.data = String.fromCharCode.apply(null, arr); + } catch(e) { + for(var i = 0; i < arr.length; ++i) { + this.putByte(arr[i]); + } + } + } + } else if(b instanceof ByteStringBuffer || + (typeof b === 'object' && typeof b.data === 'string' && + typeof b.read === 'number')) { + // copy existing buffer + this.data = b.data; + this.read = b.read; + } + + // used for v8 optimization + this._constructedStringLength = 0; +} +util.ByteStringBuffer = ByteStringBuffer; + +/* Note: This is an optimization for V8-based browsers. When V8 concatenates + a string, the strings are only joined logically using a "cons string" or + "constructed/concatenated string". These containers keep references to one + another and can result in very large memory usage. For example, if a 2MB + string is constructed by concatenating 4 bytes together at a time, the + memory usage will be ~44MB; so ~22x increase. The strings are only joined + together when an operation requiring their joining takes place, such as + substr(). This function is called when adding data to this buffer to ensure + these types of strings are periodically joined to reduce the memory + footprint. */ +var _MAX_CONSTRUCTED_STRING_LENGTH = 4096; +util.ByteStringBuffer.prototype._optimizeConstructedString = function(x) { + this._constructedStringLength += x; + if(this._constructedStringLength > _MAX_CONSTRUCTED_STRING_LENGTH) { + // this substr() should cause the constructed string to join + this.data.substr(0, 1); + this._constructedStringLength = 0; + } +}; + +/** + * Gets the number of bytes in this buffer. + * + * @return the number of bytes in this buffer. + */ +util.ByteStringBuffer.prototype.length = function() { + return this.data.length - this.read; +}; + +/** + * Gets whether or not this buffer is empty. + * + * @return true if this buffer is empty, false if not. + */ +util.ByteStringBuffer.prototype.isEmpty = function() { + return this.length() <= 0; +}; + +/** + * Puts a byte in this buffer. + * + * @param b the byte to put. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putByte = function(b) { + return this.putBytes(String.fromCharCode(b)); +}; + +/** + * Puts a byte in this buffer N times. + * + * @param b the byte to put. + * @param n the number of bytes of value b to put. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.fillWithByte = function(b, n) { + b = String.fromCharCode(b); + var d = this.data; + while(n > 0) { + if(n & 1) { + d += b; + } + n >>>= 1; + if(n > 0) { + b += b; + } + } + this.data = d; + this._optimizeConstructedString(n); + return this; +}; + +/** + * Puts bytes in this buffer. + * + * @param bytes the bytes (as a binary encoded string) to put. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putBytes = function(bytes) { + this.data += bytes; + this._optimizeConstructedString(bytes.length); + return this; +}; + +/** + * Puts a UTF-16 encoded string into this buffer. + * + * @param str the string to put. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putString = function(str) { + return this.putBytes(util.encodeUtf8(str)); +}; + +/** + * Puts a 16-bit integer in this buffer in big-endian order. + * + * @param i the 16-bit integer. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putInt16 = function(i) { + return this.putBytes( + String.fromCharCode(i >> 8 & 0xFF) + + String.fromCharCode(i & 0xFF)); +}; + +/** + * Puts a 24-bit integer in this buffer in big-endian order. + * + * @param i the 24-bit integer. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putInt24 = function(i) { + return this.putBytes( + String.fromCharCode(i >> 16 & 0xFF) + + String.fromCharCode(i >> 8 & 0xFF) + + String.fromCharCode(i & 0xFF)); +}; + +/** + * Puts a 32-bit integer in this buffer in big-endian order. + * + * @param i the 32-bit integer. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putInt32 = function(i) { + return this.putBytes( + String.fromCharCode(i >> 24 & 0xFF) + + String.fromCharCode(i >> 16 & 0xFF) + + String.fromCharCode(i >> 8 & 0xFF) + + String.fromCharCode(i & 0xFF)); +}; + +/** + * Puts a 16-bit integer in this buffer in little-endian order. + * + * @param i the 16-bit integer. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putInt16Le = function(i) { + return this.putBytes( + String.fromCharCode(i & 0xFF) + + String.fromCharCode(i >> 8 & 0xFF)); +}; + +/** + * Puts a 24-bit integer in this buffer in little-endian order. + * + * @param i the 24-bit integer. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putInt24Le = function(i) { + return this.putBytes( + String.fromCharCode(i & 0xFF) + + String.fromCharCode(i >> 8 & 0xFF) + + String.fromCharCode(i >> 16 & 0xFF)); +}; + +/** + * Puts a 32-bit integer in this buffer in little-endian order. + * + * @param i the 32-bit integer. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putInt32Le = function(i) { + return this.putBytes( + String.fromCharCode(i & 0xFF) + + String.fromCharCode(i >> 8 & 0xFF) + + String.fromCharCode(i >> 16 & 0xFF) + + String.fromCharCode(i >> 24 & 0xFF)); +}; + +/** + * Puts an n-bit integer in this buffer in big-endian order. + * + * @param i the n-bit integer. + * @param n the number of bits in the integer (8, 16, 24, or 32). + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putInt = function(i, n) { + _checkBitsParam(n); + var bytes = ''; + do { + n -= 8; + bytes += String.fromCharCode((i >> n) & 0xFF); + } while(n > 0); + return this.putBytes(bytes); +}; + +/** + * Puts a signed n-bit integer in this buffer in big-endian order. Two's + * complement representation is used. + * + * @param i the n-bit integer. + * @param n the number of bits in the integer (8, 16, 24, or 32). + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putSignedInt = function(i, n) { + // putInt checks n + if(i < 0) { + i += 2 << (n - 1); + } + return this.putInt(i, n); +}; + +/** + * Puts the given buffer into this buffer. + * + * @param buffer the buffer to put into this one. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.putBuffer = function(buffer) { + return this.putBytes(buffer.getBytes()); +}; + +/** + * Gets a byte from this buffer and advances the read pointer by 1. + * + * @return the byte. + */ +util.ByteStringBuffer.prototype.getByte = function() { + return this.data.charCodeAt(this.read++); +}; + +/** + * Gets a uint16 from this buffer in big-endian order and advances the read + * pointer by 2. + * + * @return the uint16. + */ +util.ByteStringBuffer.prototype.getInt16 = function() { + var rval = ( + this.data.charCodeAt(this.read) << 8 ^ + this.data.charCodeAt(this.read + 1)); + this.read += 2; + return rval; +}; + +/** + * Gets a uint24 from this buffer in big-endian order and advances the read + * pointer by 3. + * + * @return the uint24. + */ +util.ByteStringBuffer.prototype.getInt24 = function() { + var rval = ( + this.data.charCodeAt(this.read) << 16 ^ + this.data.charCodeAt(this.read + 1) << 8 ^ + this.data.charCodeAt(this.read + 2)); + this.read += 3; + return rval; +}; + +/** + * Gets a uint32 from this buffer in big-endian order and advances the read + * pointer by 4. + * + * @return the word. + */ +util.ByteStringBuffer.prototype.getInt32 = function() { + var rval = ( + this.data.charCodeAt(this.read) << 24 ^ + this.data.charCodeAt(this.read + 1) << 16 ^ + this.data.charCodeAt(this.read + 2) << 8 ^ + this.data.charCodeAt(this.read + 3)); + this.read += 4; + return rval; +}; + +/** + * Gets a uint16 from this buffer in little-endian order and advances the read + * pointer by 2. + * + * @return the uint16. + */ +util.ByteStringBuffer.prototype.getInt16Le = function() { + var rval = ( + this.data.charCodeAt(this.read) ^ + this.data.charCodeAt(this.read + 1) << 8); + this.read += 2; + return rval; +}; + +/** + * Gets a uint24 from this buffer in little-endian order and advances the read + * pointer by 3. + * + * @return the uint24. + */ +util.ByteStringBuffer.prototype.getInt24Le = function() { + var rval = ( + this.data.charCodeAt(this.read) ^ + this.data.charCodeAt(this.read + 1) << 8 ^ + this.data.charCodeAt(this.read + 2) << 16); + this.read += 3; + return rval; +}; + +/** + * Gets a uint32 from this buffer in little-endian order and advances the read + * pointer by 4. + * + * @return the word. + */ +util.ByteStringBuffer.prototype.getInt32Le = function() { + var rval = ( + this.data.charCodeAt(this.read) ^ + this.data.charCodeAt(this.read + 1) << 8 ^ + this.data.charCodeAt(this.read + 2) << 16 ^ + this.data.charCodeAt(this.read + 3) << 24); + this.read += 4; + return rval; +}; + +/** + * Gets an n-bit integer from this buffer in big-endian order and advances the + * read pointer by ceil(n/8). + * + * @param n the number of bits in the integer (8, 16, 24, or 32). + * + * @return the integer. + */ +util.ByteStringBuffer.prototype.getInt = function(n) { + _checkBitsParam(n); + var rval = 0; + do { + // TODO: Use (rval * 0x100) if adding support for 33 to 53 bits. + rval = (rval << 8) + this.data.charCodeAt(this.read++); + n -= 8; + } while(n > 0); + return rval; +}; + +/** + * Gets a signed n-bit integer from this buffer in big-endian order, using + * two's complement, and advances the read pointer by n/8. + * + * @param n the number of bits in the integer (8, 16, 24, or 32). + * + * @return the integer. + */ +util.ByteStringBuffer.prototype.getSignedInt = function(n) { + // getInt checks n + var x = this.getInt(n); + var max = 2 << (n - 2); + if(x >= max) { + x -= max << 1; + } + return x; +}; + +/** + * Reads bytes out as a binary encoded string and clears them from the + * buffer. Note that the resulting string is binary encoded (in node.js this + * encoding is referred to as `binary`, it is *not* `utf8`). + * + * @param count the number of bytes to read, undefined or null for all. + * + * @return a binary encoded string of bytes. + */ +util.ByteStringBuffer.prototype.getBytes = function(count) { + var rval; + if(count) { + // read count bytes + count = Math.min(this.length(), count); + rval = this.data.slice(this.read, this.read + count); + this.read += count; + } else if(count === 0) { + rval = ''; + } else { + // read all bytes, optimize to only copy when needed + rval = (this.read === 0) ? this.data : this.data.slice(this.read); + this.clear(); + } + return rval; +}; + +/** + * Gets a binary encoded string of the bytes from this buffer without + * modifying the read pointer. + * + * @param count the number of bytes to get, omit to get all. + * + * @return a string full of binary encoded characters. + */ +util.ByteStringBuffer.prototype.bytes = function(count) { + return (typeof(count) === 'undefined' ? + this.data.slice(this.read) : + this.data.slice(this.read, this.read + count)); +}; + +/** + * Gets a byte at the given index without modifying the read pointer. + * + * @param i the byte index. + * + * @return the byte. + */ +util.ByteStringBuffer.prototype.at = function(i) { + return this.data.charCodeAt(this.read + i); +}; + +/** + * Puts a byte at the given index without modifying the read pointer. + * + * @param i the byte index. + * @param b the byte to put. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.setAt = function(i, b) { + this.data = this.data.substr(0, this.read + i) + + String.fromCharCode(b) + + this.data.substr(this.read + i + 1); + return this; +}; + +/** + * Gets the last byte without modifying the read pointer. + * + * @return the last byte. + */ +util.ByteStringBuffer.prototype.last = function() { + return this.data.charCodeAt(this.data.length - 1); +}; + +/** + * Creates a copy of this buffer. + * + * @return the copy. + */ +util.ByteStringBuffer.prototype.copy = function() { + var c = util.createBuffer(this.data); + c.read = this.read; + return c; +}; + +/** + * Compacts this buffer. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.compact = function() { + if(this.read > 0) { + this.data = this.data.slice(this.read); + this.read = 0; + } + return this; +}; + +/** + * Clears this buffer. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.clear = function() { + this.data = ''; + this.read = 0; + return this; +}; + +/** + * Shortens this buffer by triming bytes off of the end of this buffer. + * + * @param count the number of bytes to trim off. + * + * @return this buffer. + */ +util.ByteStringBuffer.prototype.truncate = function(count) { + var len = Math.max(0, this.length() - count); + this.data = this.data.substr(this.read, len); + this.read = 0; + return this; +}; + +/** + * Converts this buffer to a hexadecimal string. + * + * @return a hexadecimal string. + */ +util.ByteStringBuffer.prototype.toHex = function() { + var rval = ''; + for(var i = this.read; i < this.data.length; ++i) { + var b = this.data.charCodeAt(i); + if(b < 16) { + rval += '0'; + } + rval += b.toString(16); + } + return rval; +}; + +/** + * Converts this buffer to a UTF-16 string (standard JavaScript string). + * + * @return a UTF-16 string. + */ +util.ByteStringBuffer.prototype.toString = function() { + return util.decodeUtf8(this.bytes()); +}; + +/** End Buffer w/BinaryString backing */ + +/** Buffer w/UInt8Array backing */ + +/** + * FIXME: Experimental. Do not use yet. + * + * Constructor for an ArrayBuffer-backed byte buffer. + * + * The buffer may be constructed from a string, an ArrayBuffer, DataView, or a + * TypedArray. + * + * If a string is given, its encoding should be provided as an option, + * otherwise it will default to 'binary'. A 'binary' string is encoded such + * that each character is one byte in length and size. + * + * If an ArrayBuffer, DataView, or TypedArray is given, it will be used + * *directly* without any copying. Note that, if a write to the buffer requires + * more space, the buffer will allocate a new backing ArrayBuffer to + * accommodate. The starting read and write offsets for the buffer may be + * given as options. + * + * @param [b] the initial bytes for this buffer. + * @param options the options to use: + * [readOffset] the starting read offset to use (default: 0). + * [writeOffset] the starting write offset to use (default: the + * length of the first parameter). + * [growSize] the minimum amount, in bytes, to grow the buffer by to + * accommodate writes (default: 1024). + * [encoding] the encoding ('binary', 'utf8', 'utf16', 'hex') for the + * first parameter, if it is a string (default: 'binary'). + */ +function DataBuffer(b, options) { + // default options + options = options || {}; + + // pointers for read from/write to buffer + this.read = options.readOffset || 0; + this.growSize = options.growSize || 1024; + + var isArrayBuffer = util.isArrayBuffer(b); + var isArrayBufferView = util.isArrayBufferView(b); + if(isArrayBuffer || isArrayBufferView) { + // use ArrayBuffer directly + if(isArrayBuffer) { + this.data = new DataView(b); + } else { + // TODO: adjust read/write offset based on the type of view + // or specify that this must be done in the options ... that the + // offsets are byte-based + this.data = new DataView(b.buffer, b.byteOffset, b.byteLength); + } + this.write = ('writeOffset' in options ? + options.writeOffset : this.data.byteLength); + return; + } + + // initialize to empty array buffer and add any given bytes using putBytes + this.data = new DataView(new ArrayBuffer(0)); + this.write = 0; + + if(b !== null && b !== undefined) { + this.putBytes(b); + } + + if('writeOffset' in options) { + this.write = options.writeOffset; + } +} +util.DataBuffer = DataBuffer; + +/** + * Gets the number of bytes in this buffer. + * + * @return the number of bytes in this buffer. + */ +util.DataBuffer.prototype.length = function() { + return this.write - this.read; +}; + +/** + * Gets whether or not this buffer is empty. + * + * @return true if this buffer is empty, false if not. + */ +util.DataBuffer.prototype.isEmpty = function() { + return this.length() <= 0; +}; + +/** + * Ensures this buffer has enough empty space to accommodate the given number + * of bytes. An optional parameter may be given that indicates a minimum + * amount to grow the buffer if necessary. If the parameter is not given, + * the buffer will be grown by some previously-specified default amount + * or heuristic. + * + * @param amount the number of bytes to accommodate. + * @param [growSize] the minimum amount, in bytes, to grow the buffer by if + * necessary. + */ +util.DataBuffer.prototype.accommodate = function(amount, growSize) { + if(this.length() >= amount) { + return this; + } + growSize = Math.max(growSize || this.growSize, amount); + + // grow buffer + var src = new Uint8Array( + this.data.buffer, this.data.byteOffset, this.data.byteLength); + var dst = new Uint8Array(this.length() + growSize); + dst.set(src); + this.data = new DataView(dst.buffer); + + return this; +}; + +/** + * Puts a byte in this buffer. + * + * @param b the byte to put. + * + * @return this buffer. + */ +util.DataBuffer.prototype.putByte = function(b) { + this.accommodate(1); + this.data.setUint8(this.write++, b); + return this; +}; + +/** + * Puts a byte in this buffer N times. + * + * @param b the byte to put. + * @param n the number of bytes of value b to put. + * + * @return this buffer. + */ +util.DataBuffer.prototype.fillWithByte = function(b, n) { + this.accommodate(n); + for(var i = 0; i < n; ++i) { + this.data.setUint8(b); + } + return this; +}; + +/** + * Puts bytes in this buffer. The bytes may be given as a string, an + * ArrayBuffer, a DataView, or a TypedArray. + * + * @param bytes the bytes to put. + * @param [encoding] the encoding for the first parameter ('binary', 'utf8', + * 'utf16', 'hex'), if it is a string (default: 'binary'). + * + * @return this buffer. + */ +util.DataBuffer.prototype.putBytes = function(bytes, encoding) { + if(util.isArrayBufferView(bytes)) { + var src = new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength); + var len = src.byteLength - src.byteOffset; + this.accommodate(len); + var dst = new Uint8Array(this.data.buffer, this.write); + dst.set(src); + this.write += len; + return this; + } + + if(util.isArrayBuffer(bytes)) { + var src = new Uint8Array(bytes); + this.accommodate(src.byteLength); + var dst = new Uint8Array(this.data.buffer); + dst.set(src, this.write); + this.write += src.byteLength; + return this; + } + + // bytes is a util.DataBuffer or equivalent + if(bytes instanceof util.DataBuffer || + (typeof bytes === 'object' && + typeof bytes.read === 'number' && typeof bytes.write === 'number' && + util.isArrayBufferView(bytes.data))) { + var src = new Uint8Array(bytes.data.byteLength, bytes.read, bytes.length()); + this.accommodate(src.byteLength); + var dst = new Uint8Array(bytes.data.byteLength, this.write); + dst.set(src); + this.write += src.byteLength; + return this; + } + + if(bytes instanceof util.ByteStringBuffer) { + // copy binary string and process as the same as a string parameter below + bytes = bytes.data; + encoding = 'binary'; + } + + // string conversion + encoding = encoding || 'binary'; + if(typeof bytes === 'string') { + var view; + + // decode from string + if(encoding === 'hex') { + this.accommodate(Math.ceil(bytes.length / 2)); + view = new Uint8Array(this.data.buffer, this.write); + this.write += util.binary.hex.decode(bytes, view, this.write); + return this; + } + if(encoding === 'base64') { + this.accommodate(Math.ceil(bytes.length / 4) * 3); + view = new Uint8Array(this.data.buffer, this.write); + this.write += util.binary.base64.decode(bytes, view, this.write); + return this; + } + + // encode text as UTF-8 bytes + if(encoding === 'utf8') { + // encode as UTF-8 then decode string as raw binary + bytes = util.encodeUtf8(bytes); + encoding = 'binary'; + } + + // decode string as raw binary + if(encoding === 'binary' || encoding === 'raw') { + // one byte per character + this.accommodate(bytes.length); + view = new Uint8Array(this.data.buffer, this.write); + this.write += util.binary.raw.decode(view); + return this; + } + + // encode text as UTF-16 bytes + if(encoding === 'utf16') { + // two bytes per character + this.accommodate(bytes.length * 2); + view = new Uint16Array(this.data.buffer, this.write); + this.write += util.text.utf16.encode(view); + return this; + } + + throw new Error('Invalid encoding: ' + encoding); + } + + throw Error('Invalid parameter: ' + bytes); +}; + +/** + * Puts the given buffer into this buffer. + * + * @param buffer the buffer to put into this one. + * + * @return this buffer. + */ +util.DataBuffer.prototype.putBuffer = function(buffer) { + this.putBytes(buffer); + buffer.clear(); + return this; +}; + +/** + * Puts a string into this buffer. + * + * @param str the string to put. + * @param [encoding] the encoding for the string (default: 'utf16'). + * + * @return this buffer. + */ +util.DataBuffer.prototype.putString = function(str) { + return this.putBytes(str, 'utf16'); +}; + +/** + * Puts a 16-bit integer in this buffer in big-endian order. + * + * @param i the 16-bit integer. + * + * @return this buffer. + */ +util.DataBuffer.prototype.putInt16 = function(i) { + this.accommodate(2); + this.data.setInt16(this.write, i); + this.write += 2; + return this; +}; + +/** + * Puts a 24-bit integer in this buffer in big-endian order. + * + * @param i the 24-bit integer. + * + * @return this buffer. + */ +util.DataBuffer.prototype.putInt24 = function(i) { + this.accommodate(3); + this.data.setInt16(this.write, i >> 8 & 0xFFFF); + this.data.setInt8(this.write, i >> 16 & 0xFF); + this.write += 3; + return this; +}; + +/** + * Puts a 32-bit integer in this buffer in big-endian order. + * + * @param i the 32-bit integer. + * + * @return this buffer. + */ +util.DataBuffer.prototype.putInt32 = function(i) { + this.accommodate(4); + this.data.setInt32(this.write, i); + this.write += 4; + return this; +}; + +/** + * Puts a 16-bit integer in this buffer in little-endian order. + * + * @param i the 16-bit integer. + * + * @return this buffer. + */ +util.DataBuffer.prototype.putInt16Le = function(i) { + this.accommodate(2); + this.data.setInt16(this.write, i, true); + this.write += 2; + return this; +}; + +/** + * Puts a 24-bit integer in this buffer in little-endian order. + * + * @param i the 24-bit integer. + * + * @return this buffer. + */ +util.DataBuffer.prototype.putInt24Le = function(i) { + this.accommodate(3); + this.data.setInt8(this.write, i >> 16 & 0xFF); + this.data.setInt16(this.write, i >> 8 & 0xFFFF, true); + this.write += 3; + return this; +}; + +/** + * Puts a 32-bit integer in this buffer in little-endian order. + * + * @param i the 32-bit integer. + * + * @return this buffer. + */ +util.DataBuffer.prototype.putInt32Le = function(i) { + this.accommodate(4); + this.data.setInt32(this.write, i, true); + this.write += 4; + return this; +}; + +/** + * Puts an n-bit integer in this buffer in big-endian order. + * + * @param i the n-bit integer. + * @param n the number of bits in the integer (8, 16, 24, or 32). + * + * @return this buffer. + */ +util.DataBuffer.prototype.putInt = function(i, n) { + _checkBitsParam(n); + this.accommodate(n / 8); + do { + n -= 8; + this.data.setInt8(this.write++, (i >> n) & 0xFF); + } while(n > 0); + return this; +}; + +/** + * Puts a signed n-bit integer in this buffer in big-endian order. Two's + * complement representation is used. + * + * @param i the n-bit integer. + * @param n the number of bits in the integer. + * + * @return this buffer. + */ +util.DataBuffer.prototype.putSignedInt = function(i, n) { + _checkBitsParam(n); + this.accommodate(n / 8); + if(i < 0) { + i += 2 << (n - 1); + } + return this.putInt(i, n); +}; + +/** + * Gets a byte from this buffer and advances the read pointer by 1. + * + * @return the byte. + */ +util.DataBuffer.prototype.getByte = function() { + return this.data.getInt8(this.read++); +}; + +/** + * Gets a uint16 from this buffer in big-endian order and advances the read + * pointer by 2. + * + * @return the uint16. + */ +util.DataBuffer.prototype.getInt16 = function() { + var rval = this.data.getInt16(this.read); + this.read += 2; + return rval; +}; + +/** + * Gets a uint24 from this buffer in big-endian order and advances the read + * pointer by 3. + * + * @return the uint24. + */ +util.DataBuffer.prototype.getInt24 = function() { + var rval = ( + this.data.getInt16(this.read) << 8 ^ + this.data.getInt8(this.read + 2)); + this.read += 3; + return rval; +}; + +/** + * Gets a uint32 from this buffer in big-endian order and advances the read + * pointer by 4. + * + * @return the word. + */ +util.DataBuffer.prototype.getInt32 = function() { + var rval = this.data.getInt32(this.read); + this.read += 4; + return rval; +}; + +/** + * Gets a uint16 from this buffer in little-endian order and advances the read + * pointer by 2. + * + * @return the uint16. + */ +util.DataBuffer.prototype.getInt16Le = function() { + var rval = this.data.getInt16(this.read, true); + this.read += 2; + return rval; +}; + +/** + * Gets a uint24 from this buffer in little-endian order and advances the read + * pointer by 3. + * + * @return the uint24. + */ +util.DataBuffer.prototype.getInt24Le = function() { + var rval = ( + this.data.getInt8(this.read) ^ + this.data.getInt16(this.read + 1, true) << 8); + this.read += 3; + return rval; +}; + +/** + * Gets a uint32 from this buffer in little-endian order and advances the read + * pointer by 4. + * + * @return the word. + */ +util.DataBuffer.prototype.getInt32Le = function() { + var rval = this.data.getInt32(this.read, true); + this.read += 4; + return rval; +}; + +/** + * Gets an n-bit integer from this buffer in big-endian order and advances the + * read pointer by n/8. + * + * @param n the number of bits in the integer (8, 16, 24, or 32). + * + * @return the integer. + */ +util.DataBuffer.prototype.getInt = function(n) { + _checkBitsParam(n); + var rval = 0; + do { + // TODO: Use (rval * 0x100) if adding support for 33 to 53 bits. + rval = (rval << 8) + this.data.getInt8(this.read++); + n -= 8; + } while(n > 0); + return rval; +}; + +/** + * Gets a signed n-bit integer from this buffer in big-endian order, using + * two's complement, and advances the read pointer by n/8. + * + * @param n the number of bits in the integer (8, 16, 24, or 32). + * + * @return the integer. + */ +util.DataBuffer.prototype.getSignedInt = function(n) { + // getInt checks n + var x = this.getInt(n); + var max = 2 << (n - 2); + if(x >= max) { + x -= max << 1; + } + return x; +}; + +/** + * Reads bytes out as a binary encoded string and clears them from the + * buffer. + * + * @param count the number of bytes to read, undefined or null for all. + * + * @return a binary encoded string of bytes. + */ +util.DataBuffer.prototype.getBytes = function(count) { + // TODO: deprecate this method, it is poorly named and + // this.toString('binary') replaces it + // add a toTypedArray()/toArrayBuffer() function + var rval; + if(count) { + // read count bytes + count = Math.min(this.length(), count); + rval = this.data.slice(this.read, this.read + count); + this.read += count; + } else if(count === 0) { + rval = ''; + } else { + // read all bytes, optimize to only copy when needed + rval = (this.read === 0) ? this.data : this.data.slice(this.read); + this.clear(); + } + return rval; +}; + +/** + * Gets a binary encoded string of the bytes from this buffer without + * modifying the read pointer. + * + * @param count the number of bytes to get, omit to get all. + * + * @return a string full of binary encoded characters. + */ +util.DataBuffer.prototype.bytes = function(count) { + // TODO: deprecate this method, it is poorly named, add "getString()" + return (typeof(count) === 'undefined' ? + this.data.slice(this.read) : + this.data.slice(this.read, this.read + count)); +}; + +/** + * Gets a byte at the given index without modifying the read pointer. + * + * @param i the byte index. + * + * @return the byte. + */ +util.DataBuffer.prototype.at = function(i) { + return this.data.getUint8(this.read + i); +}; + +/** + * Puts a byte at the given index without modifying the read pointer. + * + * @param i the byte index. + * @param b the byte to put. + * + * @return this buffer. + */ +util.DataBuffer.prototype.setAt = function(i, b) { + this.data.setUint8(i, b); + return this; +}; + +/** + * Gets the last byte without modifying the read pointer. + * + * @return the last byte. + */ +util.DataBuffer.prototype.last = function() { + return this.data.getUint8(this.write - 1); +}; + +/** + * Creates a copy of this buffer. + * + * @return the copy. + */ +util.DataBuffer.prototype.copy = function() { + return new util.DataBuffer(this); +}; + +/** + * Compacts this buffer. + * + * @return this buffer. + */ +util.DataBuffer.prototype.compact = function() { + if(this.read > 0) { + var src = new Uint8Array(this.data.buffer, this.read); + var dst = new Uint8Array(src.byteLength); + dst.set(src); + this.data = new DataView(dst); + this.write -= this.read; + this.read = 0; + } + return this; +}; + +/** + * Clears this buffer. + * + * @return this buffer. + */ +util.DataBuffer.prototype.clear = function() { + this.data = new DataView(new ArrayBuffer(0)); + this.read = this.write = 0; + return this; +}; + +/** + * Shortens this buffer by triming bytes off of the end of this buffer. + * + * @param count the number of bytes to trim off. + * + * @return this buffer. + */ +util.DataBuffer.prototype.truncate = function(count) { + this.write = Math.max(0, this.length() - count); + this.read = Math.min(this.read, this.write); + return this; +}; + +/** + * Converts this buffer to a hexadecimal string. + * + * @return a hexadecimal string. + */ +util.DataBuffer.prototype.toHex = function() { + var rval = ''; + for(var i = this.read; i < this.data.byteLength; ++i) { + var b = this.data.getUint8(i); + if(b < 16) { + rval += '0'; + } + rval += b.toString(16); + } + return rval; +}; + +/** + * Converts this buffer to a string, using the given encoding. If no + * encoding is given, 'utf8' (UTF-8) is used. + * + * @param [encoding] the encoding to use: 'binary', 'utf8', 'utf16', 'hex', + * 'base64' (default: 'utf8'). + * + * @return a string representation of the bytes in this buffer. + */ +util.DataBuffer.prototype.toString = function(encoding) { + var view = new Uint8Array(this.data, this.read, this.length()); + encoding = encoding || 'utf8'; + + // encode to string + if(encoding === 'binary' || encoding === 'raw') { + return util.binary.raw.encode(view); + } + if(encoding === 'hex') { + return util.binary.hex.encode(view); + } + if(encoding === 'base64') { + return util.binary.base64.encode(view); + } + + // decode to text + if(encoding === 'utf8') { + return util.text.utf8.decode(view); + } + if(encoding === 'utf16') { + return util.text.utf16.decode(view); + } + + throw new Error('Invalid encoding: ' + encoding); +}; + +/** End Buffer w/UInt8Array backing */ + +/** + * Creates a buffer that stores bytes. A value may be given to populate the + * buffer with data. This value can either be string of encoded bytes or a + * regular string of characters. When passing a string of binary encoded + * bytes, the encoding `raw` should be given. This is also the default. When + * passing a string of characters, the encoding `utf8` should be given. + * + * @param [input] a string with encoded bytes to store in the buffer. + * @param [encoding] (default: 'raw', other: 'utf8'). + */ +util.createBuffer = function(input, encoding) { + // TODO: deprecate, use new ByteBuffer() instead + encoding = encoding || 'raw'; + if(input !== undefined && encoding === 'utf8') { + input = util.encodeUtf8(input); + } + return new util.ByteBuffer(input); +}; + +/** + * Fills a string with a particular value. If you want the string to be a byte + * string, pass in String.fromCharCode(theByte). + * + * @param c the character to fill the string with, use String.fromCharCode + * to fill the string with a byte value. + * @param n the number of characters of value c to fill with. + * + * @return the filled string. + */ +util.fillString = function(c, n) { + var s = ''; + while(n > 0) { + if(n & 1) { + s += c; + } + n >>>= 1; + if(n > 0) { + c += c; + } + } + return s; +}; + +/** + * Performs a per byte XOR between two byte strings and returns the result as a + * string of bytes. + * + * @param s1 first string of bytes. + * @param s2 second string of bytes. + * @param n the number of bytes to XOR. + * + * @return the XOR'd result. + */ +util.xorBytes = function(s1, s2, n) { + var s3 = ''; + var b = ''; + var t = ''; + var i = 0; + var c = 0; + for(; n > 0; --n, ++i) { + b = s1.charCodeAt(i) ^ s2.charCodeAt(i); + if(c >= 10) { + s3 += t; + t = ''; + c = 0; + } + t += String.fromCharCode(b); + ++c; + } + s3 += t; + return s3; +}; + +/** + * Converts a hex string into a 'binary' encoded string of bytes. + * + * @param hex the hexadecimal string to convert. + * + * @return the binary-encoded string of bytes. + */ +util.hexToBytes = function(hex) { + // TODO: deprecate: "Deprecated. Use util.binary.hex.decode instead." + var rval = ''; + var i = 0; + if(hex.length & 1 == 1) { + // odd number of characters, convert first character alone + i = 1; + rval += String.fromCharCode(parseInt(hex[0], 16)); + } + // convert 2 characters (1 byte) at a time + for(; i < hex.length; i += 2) { + rval += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); + } + return rval; +}; + +/** + * Converts a 'binary' encoded string of bytes to hex. + * + * @param bytes the byte string to convert. + * + * @return the string of hexadecimal characters. + */ +util.bytesToHex = function(bytes) { + // TODO: deprecate: "Deprecated. Use util.binary.hex.encode instead." + return util.createBuffer(bytes).toHex(); +}; + +/** + * Converts an 32-bit integer to 4-big-endian byte string. + * + * @param i the integer. + * + * @return the byte string. + */ +util.int32ToBytes = function(i) { + return ( + String.fromCharCode(i >> 24 & 0xFF) + + String.fromCharCode(i >> 16 & 0xFF) + + String.fromCharCode(i >> 8 & 0xFF) + + String.fromCharCode(i & 0xFF)); +}; + +// base64 characters, reverse mapping +var _base64 = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; +var _base64Idx = [ +/*43 -43 = 0*/ +/*'+', 1, 2, 3,'/' */ + 62, -1, -1, -1, 63, + +/*'0','1','2','3','4','5','6','7','8','9' */ + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + +/*15, 16, 17,'=', 19, 20, 21 */ + -1, -1, -1, 64, -1, -1, -1, + +/*65 - 43 = 22*/ +/*'A','B','C','D','E','F','G','H','I','J','K','L','M', */ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + +/*'N','O','P','Q','R','S','T','U','V','W','X','Y','Z' */ + 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + +/*91 - 43 = 48 */ +/*48, 49, 50, 51, 52, 53 */ + -1, -1, -1, -1, -1, -1, + +/*97 - 43 = 54*/ +/*'a','b','c','d','e','f','g','h','i','j','k','l','m' */ + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, + +/*'n','o','p','q','r','s','t','u','v','w','x','y','z' */ + 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 +]; + +// base58 characters (Bitcoin alphabet) +var _base58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; + +/** + * Base64 encodes a 'binary' encoded string of bytes. + * + * @param input the binary encoded string of bytes to base64-encode. + * @param maxline the maximum number of encoded characters per line to use, + * defaults to none. + * + * @return the base64-encoded output. + */ +util.encode64 = function(input, maxline) { + // TODO: deprecate: "Deprecated. Use util.binary.base64.encode instead." + var line = ''; + var output = ''; + var chr1, chr2, chr3; + var i = 0; + while(i < input.length) { + chr1 = input.charCodeAt(i++); + chr2 = input.charCodeAt(i++); + chr3 = input.charCodeAt(i++); + + // encode 4 character group + line += _base64.charAt(chr1 >> 2); + line += _base64.charAt(((chr1 & 3) << 4) | (chr2 >> 4)); + if(isNaN(chr2)) { + line += '=='; + } else { + line += _base64.charAt(((chr2 & 15) << 2) | (chr3 >> 6)); + line += isNaN(chr3) ? '=' : _base64.charAt(chr3 & 63); + } + + if(maxline && line.length > maxline) { + output += line.substr(0, maxline) + '\r\n'; + line = line.substr(maxline); + } + } + output += line; + return output; +}; + +/** + * Base64 decodes a string into a 'binary' encoded string of bytes. + * + * @param input the base64-encoded input. + * + * @return the binary encoded string. + */ +util.decode64 = function(input) { + // TODO: deprecate: "Deprecated. Use util.binary.base64.decode instead." + + // remove all non-base64 characters + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); + + var output = ''; + var enc1, enc2, enc3, enc4; + var i = 0; + + while(i < input.length) { + enc1 = _base64Idx[input.charCodeAt(i++) - 43]; + enc2 = _base64Idx[input.charCodeAt(i++) - 43]; + enc3 = _base64Idx[input.charCodeAt(i++) - 43]; + enc4 = _base64Idx[input.charCodeAt(i++) - 43]; + + output += String.fromCharCode((enc1 << 2) | (enc2 >> 4)); + if(enc3 !== 64) { + // decoded at least 2 bytes + output += String.fromCharCode(((enc2 & 15) << 4) | (enc3 >> 2)); + if(enc4 !== 64) { + // decoded 3 bytes + output += String.fromCharCode(((enc3 & 3) << 6) | enc4); + } + } + } + + return output; +}; + +/** + * Encodes the given string of characters (a standard JavaScript + * string) as a binary encoded string where the bytes represent + * a UTF-8 encoded string of characters. Non-ASCII characters will be + * encoded as multiple bytes according to UTF-8. + * + * @param str a standard string of characters to encode. + * + * @return the binary encoded string. + */ +util.encodeUtf8 = function(str) { + return unescape(encodeURIComponent(str)); +}; + +/** + * Decodes a binary encoded string that contains bytes that + * represent a UTF-8 encoded string of characters -- into a + * string of characters (a standard JavaScript string). + * + * @param str the binary encoded string to decode. + * + * @return the resulting standard string of characters. + */ +util.decodeUtf8 = function(str) { + return decodeURIComponent(escape(str)); +}; + +// binary encoding/decoding tools +// FIXME: Experimental. Do not use yet. +util.binary = { + raw: {}, + hex: {}, + base64: {}, + base58: {}, + baseN : { + encode: baseN.encode, + decode: baseN.decode + } +}; + +/** + * Encodes a Uint8Array as a binary-encoded string. This encoding uses + * a value between 0 and 255 for each character. + * + * @param bytes the Uint8Array to encode. + * + * @return the binary-encoded string. + */ +util.binary.raw.encode = function(bytes) { + return String.fromCharCode.apply(null, bytes); +}; + +/** + * Decodes a binary-encoded string to a Uint8Array. This encoding uses + * a value between 0 and 255 for each character. + * + * @param str the binary-encoded string to decode. + * @param [output] an optional Uint8Array to write the output to; if it + * is too small, an exception will be thrown. + * @param [offset] the start offset for writing to the output (default: 0). + * + * @return the Uint8Array or the number of bytes written if output was given. + */ +util.binary.raw.decode = function(str, output, offset) { + var out = output; + if(!out) { + out = new Uint8Array(str.length); + } + offset = offset || 0; + var j = offset; + for(var i = 0; i < str.length; ++i) { + out[j++] = str.charCodeAt(i); + } + return output ? (j - offset) : out; +}; + +/** + * Encodes a 'binary' string, ArrayBuffer, DataView, TypedArray, or + * ByteBuffer as a string of hexadecimal characters. + * + * @param bytes the bytes to convert. + * + * @return the string of hexadecimal characters. + */ +util.binary.hex.encode = util.bytesToHex; + +/** + * Decodes a hex-encoded string to a Uint8Array. + * + * @param hex the hexadecimal string to convert. + * @param [output] an optional Uint8Array to write the output to; if it + * is too small, an exception will be thrown. + * @param [offset] the start offset for writing to the output (default: 0). + * + * @return the Uint8Array or the number of bytes written if output was given. + */ +util.binary.hex.decode = function(hex, output, offset) { + var out = output; + if(!out) { + out = new Uint8Array(Math.ceil(hex.length / 2)); + } + offset = offset || 0; + var i = 0, j = offset; + if(hex.length & 1) { + // odd number of characters, convert first character alone + i = 1; + out[j++] = parseInt(hex[0], 16); + } + // convert 2 characters (1 byte) at a time + for(; i < hex.length; i += 2) { + out[j++] = parseInt(hex.substr(i, 2), 16); + } + return output ? (j - offset) : out; +}; + +/** + * Base64-encodes a Uint8Array. + * + * @param input the Uint8Array to encode. + * @param maxline the maximum number of encoded characters per line to use, + * defaults to none. + * + * @return the base64-encoded output string. + */ +util.binary.base64.encode = function(input, maxline) { + var line = ''; + var output = ''; + var chr1, chr2, chr3; + var i = 0; + while(i < input.byteLength) { + chr1 = input[i++]; + chr2 = input[i++]; + chr3 = input[i++]; + + // encode 4 character group + line += _base64.charAt(chr1 >> 2); + line += _base64.charAt(((chr1 & 3) << 4) | (chr2 >> 4)); + if(isNaN(chr2)) { + line += '=='; + } else { + line += _base64.charAt(((chr2 & 15) << 2) | (chr3 >> 6)); + line += isNaN(chr3) ? '=' : _base64.charAt(chr3 & 63); + } + + if(maxline && line.length > maxline) { + output += line.substr(0, maxline) + '\r\n'; + line = line.substr(maxline); + } + } + output += line; + return output; +}; + +/** + * Decodes a base64-encoded string to a Uint8Array. + * + * @param input the base64-encoded input string. + * @param [output] an optional Uint8Array to write the output to; if it + * is too small, an exception will be thrown. + * @param [offset] the start offset for writing to the output (default: 0). + * + * @return the Uint8Array or the number of bytes written if output was given. + */ +util.binary.base64.decode = function(input, output, offset) { + var out = output; + if(!out) { + out = new Uint8Array(Math.ceil(input.length / 4) * 3); + } + + // remove all non-base64 characters + input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); + + offset = offset || 0; + var enc1, enc2, enc3, enc4; + var i = 0, j = offset; + + while(i < input.length) { + enc1 = _base64Idx[input.charCodeAt(i++) - 43]; + enc2 = _base64Idx[input.charCodeAt(i++) - 43]; + enc3 = _base64Idx[input.charCodeAt(i++) - 43]; + enc4 = _base64Idx[input.charCodeAt(i++) - 43]; + + out[j++] = (enc1 << 2) | (enc2 >> 4); + if(enc3 !== 64) { + // decoded at least 2 bytes + out[j++] = ((enc2 & 15) << 4) | (enc3 >> 2); + if(enc4 !== 64) { + // decoded 3 bytes + out[j++] = ((enc3 & 3) << 6) | enc4; + } + } + } + + // make sure result is the exact decoded length + return output ? (j - offset) : out.subarray(0, j); +}; + +// add support for base58 encoding/decoding with Bitcoin alphabet +util.binary.base58.encode = function(input, maxline) { + return util.binary.baseN.encode(input, _base58, maxline); +}; +util.binary.base58.decode = function(input, maxline) { + return util.binary.baseN.decode(input, _base58, maxline); +}; + +// text encoding/decoding tools +// FIXME: Experimental. Do not use yet. +util.text = { + utf8: {}, + utf16: {} +}; + +/** + * Encodes the given string as UTF-8 in a Uint8Array. + * + * @param str the string to encode. + * @param [output] an optional Uint8Array to write the output to; if it + * is too small, an exception will be thrown. + * @param [offset] the start offset for writing to the output (default: 0). + * + * @return the Uint8Array or the number of bytes written if output was given. + */ +util.text.utf8.encode = function(str, output, offset) { + str = util.encodeUtf8(str); + var out = output; + if(!out) { + out = new Uint8Array(str.length); + } + offset = offset || 0; + var j = offset; + for(var i = 0; i < str.length; ++i) { + out[j++] = str.charCodeAt(i); + } + return output ? (j - offset) : out; +}; + +/** + * Decodes the UTF-8 contents from a Uint8Array. + * + * @param bytes the Uint8Array to decode. + * + * @return the resulting string. + */ +util.text.utf8.decode = function(bytes) { + return util.decodeUtf8(String.fromCharCode.apply(null, bytes)); +}; + +/** + * Encodes the given string as UTF-16 in a Uint8Array. + * + * @param str the string to encode. + * @param [output] an optional Uint8Array to write the output to; if it + * is too small, an exception will be thrown. + * @param [offset] the start offset for writing to the output (default: 0). + * + * @return the Uint8Array or the number of bytes written if output was given. + */ +util.text.utf16.encode = function(str, output, offset) { + var out = output; + if(!out) { + out = new Uint8Array(str.length * 2); + } + var view = new Uint16Array(out.buffer); + offset = offset || 0; + var j = offset; + var k = offset; + for(var i = 0; i < str.length; ++i) { + view[k++] = str.charCodeAt(i); + j += 2; + } + return output ? (j - offset) : out; +}; + +/** + * Decodes the UTF-16 contents from a Uint8Array. + * + * @param bytes the Uint8Array to decode. + * + * @return the resulting string. + */ +util.text.utf16.decode = function(bytes) { + return String.fromCharCode.apply(null, new Uint16Array(bytes.buffer)); +}; + +/** + * Deflates the given data using a flash interface. + * + * @param api the flash interface. + * @param bytes the data. + * @param raw true to return only raw deflate data, false to include zlib + * header and trailer. + * + * @return the deflated data as a string. + */ +util.deflate = function(api, bytes, raw) { + bytes = util.decode64(api.deflate(util.encode64(bytes)).rval); + + // strip zlib header and trailer if necessary + if(raw) { + // zlib header is 2 bytes (CMF,FLG) where FLG indicates that + // there is a 4-byte DICT (alder-32) block before the data if + // its 5th bit is set + var start = 2; + var flg = bytes.charCodeAt(1); + if(flg & 0x20) { + start = 6; + } + // zlib trailer is 4 bytes of adler-32 + bytes = bytes.substring(start, bytes.length - 4); + } + + return bytes; +}; + +/** + * Inflates the given data using a flash interface. + * + * @param api the flash interface. + * @param bytes the data. + * @param raw true if the incoming data has no zlib header or trailer and is + * raw DEFLATE data. + * + * @return the inflated data as a string, null on error. + */ +util.inflate = function(api, bytes, raw) { + // TODO: add zlib header and trailer if necessary/possible + var rval = api.inflate(util.encode64(bytes)).rval; + return (rval === null) ? null : util.decode64(rval); +}; + +/** + * Sets a storage object. + * + * @param api the storage interface. + * @param id the storage ID to use. + * @param obj the storage object, null to remove. + */ +var _setStorageObject = function(api, id, obj) { + if(!api) { + throw new Error('WebStorage not available.'); + } + + var rval; + if(obj === null) { + rval = api.removeItem(id); + } else { + // json-encode and base64-encode object + obj = util.encode64(JSON.stringify(obj)); + rval = api.setItem(id, obj); + } + + // handle potential flash error + if(typeof(rval) !== 'undefined' && rval.rval !== true) { + var error = new Error(rval.error.message); + error.id = rval.error.id; + error.name = rval.error.name; + throw error; + } +}; + +/** + * Gets a storage object. + * + * @param api the storage interface. + * @param id the storage ID to use. + * + * @return the storage object entry or null if none exists. + */ +var _getStorageObject = function(api, id) { + if(!api) { + throw new Error('WebStorage not available.'); + } + + // get the existing entry + var rval = api.getItem(id); + + /* Note: We check api.init because we can't do (api == localStorage) + on IE because of "Class doesn't support Automation" exception. Only + the flash api has an init method so this works too, but we need a + better solution in the future. */ + + // flash returns item wrapped in an object, handle special case + if(api.init) { + if(rval.rval === null) { + if(rval.error) { + var error = new Error(rval.error.message); + error.id = rval.error.id; + error.name = rval.error.name; + throw error; + } + // no error, but also no item + rval = null; + } else { + rval = rval.rval; + } + } + + // handle decoding + if(rval !== null) { + // base64-decode and json-decode data + rval = JSON.parse(util.decode64(rval)); + } + + return rval; +}; + +/** + * Stores an item in local storage. + * + * @param api the storage interface. + * @param id the storage ID to use. + * @param key the key for the item. + * @param data the data for the item (any javascript object/primitive). + */ +var _setItem = function(api, id, key, data) { + // get storage object + var obj = _getStorageObject(api, id); + if(obj === null) { + // create a new storage object + obj = {}; + } + // update key + obj[key] = data; + + // set storage object + _setStorageObject(api, id, obj); +}; + +/** + * Gets an item from local storage. + * + * @param api the storage interface. + * @param id the storage ID to use. + * @param key the key for the item. + * + * @return the item. + */ +var _getItem = function(api, id, key) { + // get storage object + var rval = _getStorageObject(api, id); + if(rval !== null) { + // return data at key + rval = (key in rval) ? rval[key] : null; + } + + return rval; +}; + +/** + * Removes an item from local storage. + * + * @param api the storage interface. + * @param id the storage ID to use. + * @param key the key for the item. + */ +var _removeItem = function(api, id, key) { + // get storage object + var obj = _getStorageObject(api, id); + if(obj !== null && key in obj) { + // remove key + delete obj[key]; + + // see if entry has no keys remaining + var empty = true; + for(var prop in obj) { + empty = false; + break; + } + if(empty) { + // remove entry entirely if no keys are left + obj = null; + } + + // set storage object + _setStorageObject(api, id, obj); + } +}; + +/** + * Clears the local disk storage identified by the given ID. + * + * @param api the storage interface. + * @param id the storage ID to use. + */ +var _clearItems = function(api, id) { + _setStorageObject(api, id, null); +}; + +/** + * Calls a storage function. + * + * @param func the function to call. + * @param args the arguments for the function. + * @param location the location argument. + * + * @return the return value from the function. + */ +var _callStorageFunction = function(func, args, location) { + var rval = null; + + // default storage types + if(typeof(location) === 'undefined') { + location = ['web', 'flash']; + } + + // apply storage types in order of preference + var type; + var done = false; + var exception = null; + for(var idx in location) { + type = location[idx]; + try { + if(type === 'flash' || type === 'both') { + if(args[0] === null) { + throw new Error('Flash local storage not available.'); + } + rval = func.apply(this, args); + done = (type === 'flash'); + } + if(type === 'web' || type === 'both') { + args[0] = localStorage; + rval = func.apply(this, args); + done = true; + } + } catch(ex) { + exception = ex; + } + if(done) { + break; + } + } + + if(!done) { + throw exception; + } + + return rval; +}; + +/** + * Stores an item on local disk. + * + * The available types of local storage include 'flash', 'web', and 'both'. + * + * The type 'flash' refers to flash local storage (SharedObject). In order + * to use flash local storage, the 'api' parameter must be valid. The type + * 'web' refers to WebStorage, if supported by the browser. The type 'both' + * refers to storing using both 'flash' and 'web', not just one or the + * other. + * + * The location array should list the storage types to use in order of + * preference: + * + * ['flash']: flash only storage + * ['web']: web only storage + * ['both']: try to store in both + * ['flash','web']: store in flash first, but if not available, 'web' + * ['web','flash']: store in web first, but if not available, 'flash' + * + * The location array defaults to: ['web', 'flash'] + * + * @param api the flash interface, null to use only WebStorage. + * @param id the storage ID to use. + * @param key the key for the item. + * @param data the data for the item (any javascript object/primitive). + * @param location an array with the preferred types of storage to use. + */ +util.setItem = function(api, id, key, data, location) { + _callStorageFunction(_setItem, arguments, location); +}; + +/** + * Gets an item on local disk. + * + * Set setItem() for details on storage types. + * + * @param api the flash interface, null to use only WebStorage. + * @param id the storage ID to use. + * @param key the key for the item. + * @param location an array with the preferred types of storage to use. + * + * @return the item. + */ +util.getItem = function(api, id, key, location) { + return _callStorageFunction(_getItem, arguments, location); +}; + +/** + * Removes an item on local disk. + * + * Set setItem() for details on storage types. + * + * @param api the flash interface. + * @param id the storage ID to use. + * @param key the key for the item. + * @param location an array with the preferred types of storage to use. + */ +util.removeItem = function(api, id, key, location) { + _callStorageFunction(_removeItem, arguments, location); +}; + +/** + * Clears the local disk storage identified by the given ID. + * + * Set setItem() for details on storage types. + * + * @param api the flash interface if flash is available. + * @param id the storage ID to use. + * @param location an array with the preferred types of storage to use. + */ +util.clearItems = function(api, id, location) { + _callStorageFunction(_clearItems, arguments, location); +}; + +/** + * Check if an object is empty. + * + * Taken from: + * http://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object-from-json/679937#679937 + * + * @param object the object to check. + */ +util.isEmpty = function(obj) { + for(var prop in obj) { + if(obj.hasOwnProperty(prop)) { + return false; + } + } + return true; +}; + +/** + * Format with simple printf-style interpolation. + * + * %%: literal '%' + * %s,%o: convert next argument into a string. + * + * @param format the string to format. + * @param ... arguments to interpolate into the format string. + */ +util.format = function(format) { + var re = /%./g; + // current match + var match; + // current part + var part; + // current arg index + var argi = 0; + // collected parts to recombine later + var parts = []; + // last index found + var last = 0; + // loop while matches remain + while((match = re.exec(format))) { + part = format.substring(last, re.lastIndex - 2); + // don't add empty strings (ie, parts between %s%s) + if(part.length > 0) { + parts.push(part); + } + last = re.lastIndex; + // switch on % code + var code = match[0][1]; + switch(code) { + case 's': + case 'o': + // check if enough arguments were given + if(argi < arguments.length) { + parts.push(arguments[argi++ + 1]); + } else { + parts.push(''); + } + break; + // FIXME: do proper formating for numbers, etc + //case 'f': + //case 'd': + case '%': + parts.push('%'); + break; + default: + parts.push('<%' + code + '?>'); + } + } + // add trailing part of format string + parts.push(format.substring(last)); + return parts.join(''); +}; + +/** + * Formats a number. + * + * http://snipplr.com/view/5945/javascript-numberformat--ported-from-php/ + */ +util.formatNumber = function(number, decimals, dec_point, thousands_sep) { + // http://kevin.vanzonneveld.net + // + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com) + // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // + bugfix by: Michael White (http://crestidg.com) + // + bugfix by: Benjamin Lupton + // + bugfix by: Allan Jensen (http://www.winternet.no) + // + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com) + // * example 1: number_format(1234.5678, 2, '.', ''); + // * returns 1: 1234.57 + + var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals; + var d = dec_point === undefined ? ',' : dec_point; + var t = thousands_sep === undefined ? + '.' : thousands_sep, s = n < 0 ? '-' : ''; + var i = parseInt((n = Math.abs(+n || 0).toFixed(c)), 10) + ''; + var j = (i.length > 3) ? i.length % 3 : 0; + return s + (j ? i.substr(0, j) + t : '') + + i.substr(j).replace(/(\d{3})(?=\d)/g, '$1' + t) + + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ''); +}; + +/** + * Formats a byte size. + * + * http://snipplr.com/view/5949/format-humanize-file-byte-size-presentation-in-javascript/ + */ +util.formatSize = function(size) { + if(size >= 1073741824) { + size = util.formatNumber(size / 1073741824, 2, '.', '') + ' GiB'; + } else if(size >= 1048576) { + size = util.formatNumber(size / 1048576, 2, '.', '') + ' MiB'; + } else if(size >= 1024) { + size = util.formatNumber(size / 1024, 0) + ' KiB'; + } else { + size = util.formatNumber(size, 0) + ' bytes'; + } + return size; +}; + +/** + * Converts an IPv4 or IPv6 string representation into bytes (in network order). + * + * @param ip the IPv4 or IPv6 address to convert. + * + * @return the 4-byte IPv6 or 16-byte IPv6 address or null if the address can't + * be parsed. + */ +util.bytesFromIP = function(ip) { + if(ip.indexOf('.') !== -1) { + return util.bytesFromIPv4(ip); + } + if(ip.indexOf(':') !== -1) { + return util.bytesFromIPv6(ip); + } + return null; +}; + +/** + * Converts an IPv4 string representation into bytes (in network order). + * + * @param ip the IPv4 address to convert. + * + * @return the 4-byte address or null if the address can't be parsed. + */ +util.bytesFromIPv4 = function(ip) { + ip = ip.split('.'); + if(ip.length !== 4) { + return null; + } + var b = util.createBuffer(); + for(var i = 0; i < ip.length; ++i) { + var num = parseInt(ip[i], 10); + if(isNaN(num)) { + return null; + } + b.putByte(num); + } + return b.getBytes(); +}; + +/** + * Converts an IPv6 string representation into bytes (in network order). + * + * @param ip the IPv6 address to convert. + * + * @return the 16-byte address or null if the address can't be parsed. + */ +util.bytesFromIPv6 = function(ip) { + var blanks = 0; + ip = ip.split(':').filter(function(e) { + if(e.length === 0) ++blanks; + return true; + }); + var zeros = (8 - ip.length + blanks) * 2; + var b = util.createBuffer(); + for(var i = 0; i < 8; ++i) { + if(!ip[i] || ip[i].length === 0) { + b.fillWithByte(0, zeros); + zeros = 0; + continue; + } + var bytes = util.hexToBytes(ip[i]); + if(bytes.length < 2) { + b.putByte(0); + } + b.putBytes(bytes); + } + return b.getBytes(); +}; + +/** + * Converts 4-bytes into an IPv4 string representation or 16-bytes into + * an IPv6 string representation. The bytes must be in network order. + * + * @param bytes the bytes to convert. + * + * @return the IPv4 or IPv6 string representation if 4 or 16 bytes, + * respectively, are given, otherwise null. + */ +util.bytesToIP = function(bytes) { + if(bytes.length === 4) { + return util.bytesToIPv4(bytes); + } + if(bytes.length === 16) { + return util.bytesToIPv6(bytes); + } + return null; +}; + +/** + * Converts 4-bytes into an IPv4 string representation. The bytes must be + * in network order. + * + * @param bytes the bytes to convert. + * + * @return the IPv4 string representation or null for an invalid # of bytes. + */ +util.bytesToIPv4 = function(bytes) { + if(bytes.length !== 4) { + return null; + } + var ip = []; + for(var i = 0; i < bytes.length; ++i) { + ip.push(bytes.charCodeAt(i)); + } + return ip.join('.'); +}; + +/** + * Converts 16-bytes into an IPv16 string representation. The bytes must be + * in network order. + * + * @param bytes the bytes to convert. + * + * @return the IPv16 string representation or null for an invalid # of bytes. + */ +util.bytesToIPv6 = function(bytes) { + if(bytes.length !== 16) { + return null; + } + var ip = []; + var zeroGroups = []; + var zeroMaxGroup = 0; + for(var i = 0; i < bytes.length; i += 2) { + var hex = util.bytesToHex(bytes[i] + bytes[i + 1]); + // canonicalize zero representation + while(hex[0] === '0' && hex !== '0') { + hex = hex.substr(1); + } + if(hex === '0') { + var last = zeroGroups[zeroGroups.length - 1]; + var idx = ip.length; + if(!last || idx !== last.end + 1) { + zeroGroups.push({start: idx, end: idx}); + } else { + last.end = idx; + if((last.end - last.start) > + (zeroGroups[zeroMaxGroup].end - zeroGroups[zeroMaxGroup].start)) { + zeroMaxGroup = zeroGroups.length - 1; + } + } + } + ip.push(hex); + } + if(zeroGroups.length > 0) { + var group = zeroGroups[zeroMaxGroup]; + // only shorten group of length > 0 + if(group.end - group.start > 0) { + ip.splice(group.start, group.end - group.start + 1, ''); + if(group.start === 0) { + ip.unshift(''); + } + if(group.end === 7) { + ip.push(''); + } + } + } + return ip.join(':'); +}; + +/** + * Estimates the number of processes that can be run concurrently. If + * creating Web Workers, keep in mind that the main JavaScript process needs + * its own core. + * + * @param options the options to use: + * update true to force an update (not use the cached value). + * @param callback(err, max) called once the operation completes. + */ +util.estimateCores = function(options, callback) { + if(typeof options === 'function') { + callback = options; + options = {}; + } + options = options || {}; + if('cores' in util && !options.update) { + return callback(null, util.cores); + } + if(typeof navigator !== 'undefined' && + 'hardwareConcurrency' in navigator && + navigator.hardwareConcurrency > 0) { + util.cores = navigator.hardwareConcurrency; + return callback(null, util.cores); + } + if(typeof Worker === 'undefined') { + // workers not available + util.cores = 1; + return callback(null, util.cores); + } + if(typeof Blob === 'undefined') { + // can't estimate, default to 2 + util.cores = 2; + return callback(null, util.cores); + } + + // create worker concurrency estimation code as blob + var blobUrl = URL.createObjectURL(new Blob(['(', + function() { + self.addEventListener('message', function(e) { + // run worker for 4 ms + var st = Date.now(); + var et = st + 4; + while(Date.now() < et); + self.postMessage({st: st, et: et}); + }); + }.toString(), + ')()'], {type: 'application/javascript'})); + + // take 5 samples using 16 workers + sample([], 5, 16); + + function sample(max, samples, numWorkers) { + if(samples === 0) { + // get overlap average + var avg = Math.floor(max.reduce(function(avg, x) { + return avg + x; + }, 0) / max.length); + util.cores = Math.max(1, avg); + URL.revokeObjectURL(blobUrl); + return callback(null, util.cores); + } + map(numWorkers, function(err, results) { + max.push(reduce(numWorkers, results)); + sample(max, samples - 1, numWorkers); + }); + } + + function map(numWorkers, callback) { + var workers = []; + var results = []; + for(var i = 0; i < numWorkers; ++i) { + var worker = new Worker(blobUrl); + worker.addEventListener('message', function(e) { + results.push(e.data); + if(results.length === numWorkers) { + for(var i = 0; i < numWorkers; ++i) { + workers[i].terminate(); + } + callback(null, results); + } + }); + workers.push(worker); + } + for(var i = 0; i < numWorkers; ++i) { + workers[i].postMessage(i); + } + } + + function reduce(numWorkers, results) { + // find overlapping time windows + var overlaps = []; + for(var n = 0; n < numWorkers; ++n) { + var r1 = results[n]; + var overlap = overlaps[n] = []; + for(var i = 0; i < numWorkers; ++i) { + if(n === i) { + continue; + } + var r2 = results[i]; + if((r1.st > r2.st && r1.st < r2.et) || + (r2.st > r1.st && r2.st < r1.et)) { + overlap.push(i); + } + } + } + // get maximum overlaps ... don't include overlapping worker itself + // as the main JS process was also being scheduled during the work and + // would have to be subtracted from the estimate anyway + return overlaps.reduce(function(max, overlap) { + return Math.max(max, overlap.length); + }, 0); + } +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 56939: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(8909) +======= +/***/ 57175: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var wrappy = __nccwpck_require__(79019) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +module.exports = wrappy(once) +module.exports.strict = wrappy(onceStrict) + +once.proto = once(function () { + Object.defineProperty(Function.prototype, 'once', { + value: function () { + return once(this) + }, + configurable: true + }) + + Object.defineProperty(Function.prototype, 'onceStrict', { + value: function () { + return onceStrict(this) + }, + configurable: true + }) +}) + +function once (fn) { + var f = function () { + if (f.called) return f.value + f.called = true + return f.value = fn.apply(this, arguments) + } + f.called = false + return f +} + +function onceStrict (fn) { + var f = function () { + if (f.called) + throw new Error(f.onceError) + f.called = true + return f.value = fn.apply(this, arguments) + } + var name = fn.name || 'Function wrapped with `once`' + f.onceError = name + " shouldn't be called more than once" + f.called = false + return f +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 35750: +======= +/***/ 31368: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +const pDefer = () => { + const deferred = {}; + + deferred.promise = new Promise((resolve, reject) => { + deferred.resolve = resolve; + deferred.reject = reject; + }); + + return deferred; +}; + +module.exports = pDefer; + + +/***/ }), + +<<<<<<< HEAD +/***/ 57911: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Fifo = __nccwpck_require__(98761) +const defer = __nccwpck_require__(35750) +======= +/***/ 93963: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Fifo = __nccwpck_require__(20375) +const defer = __nccwpck_require__(31368) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +module.exports = class PFifo { + constructor () { + this._buffer = new Fifo() + this._waitingConsumers = new Fifo() + } + + push (chunk) { + const { promise, resolve } = defer() + this._buffer.push({ chunk, resolve }) + this._consume() + return promise + } + + _consume () { + while (!this._waitingConsumers.isEmpty() && !this._buffer.isEmpty()) { + const nextConsumer = this._waitingConsumers.shift() + const nextChunk = this._buffer.shift() + nextConsumer.resolve(nextChunk.chunk) + nextChunk.resolve() + } + } + + shift () { + const { promise, resolve } = defer() + this._waitingConsumers.push({ resolve }) + this._consume() + return promise + } + + isEmpty () { + return this._buffer.isEmpty() + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 65459: +======= +/***/ 35632: +/***/ ((module) => { + +"use strict"; + + +var durationRE = /(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([\p{L}]*)/uig + +module.exports = parse +// enable default import syntax in typescript +module.exports["default"] = parse + +/** + * conversion ratios + */ + +parse.nanosecond = +parse.ns = 1 / 1e6 + +parse['µs'] = +parse['μs'] = +parse.us = +parse.microsecond = 1 / 1e3 + +parse.millisecond = +parse.ms = +parse[''] = 1 + +parse.second = +parse.sec = +parse.s = parse.ms * 1000 + +parse.minute = +parse.min = +parse.m = parse.s * 60 + +parse.hour = +parse.hr = +parse.h = parse.m * 60 + +parse.day = +parse.d = parse.h * 24 + +parse.week = +parse.wk = +parse.w = parse.d * 7 + +parse.month = +parse.b = +parse.d * (365.25 / 12) + +parse.year = +parse.yr = +parse.y = parse.d * 365.25 + +/** + * convert `str` to ms + * + * @param {String} str + * @param {String} format + * @return {Number} + */ + +function parse(str='', format='ms'){ + var result = null + // ignore commas/placeholders + str = (str+'').replace(/(\d)[,_](\d)/g, '$1$2') + str.replace(durationRE, function(_, n, units){ + units = unitRatio(units) + if (units) result = (result || 0) + parseFloat(n, 10) * units + }) + + return result && (result / (unitRatio(format) || 1)) +} + +function unitRatio(str) { + return parse[str] || parse[str.toLowerCase().replace(/s$/, '')] +} + + +/***/ }), + +/***/ 63923: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, exports, __nccwpck_require__) => { + +/* + * Id is an object representation of a peer Id. a peer Id is a multihash + */ + + + +<<<<<<< HEAD +const { CID } = __nccwpck_require__(33862) +const b32 = __nccwpck_require__(14637) +const b36 = __nccwpck_require__(66800) +const b58 = __nccwpck_require__(50119) +const b64 = __nccwpck_require__(25631) +const { base58btc } = __nccwpck_require__(50119) +const { base32 } = __nccwpck_require__(14637) +const { base16 } = __nccwpck_require__(35654) +const Digest = __nccwpck_require__(65957) +const cryptoKeys = __nccwpck_require__(55848) +const withIs = __nccwpck_require__(82677) +const { PeerIdProto } = __nccwpck_require__(17804) +const { equals: uint8ArrayEquals } = __nccwpck_require__(12667) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(31277) +const { toString: uint8ArrayToString } = __nccwpck_require__(34163) +const { identity } = __nccwpck_require__(14733) +======= +const { CID } = __nccwpck_require__(24247) +const b32 = __nccwpck_require__(70784) +const b36 = __nccwpck_require__(76443) +const b58 = __nccwpck_require__(49108) +const b64 = __nccwpck_require__(98197) +const { base58btc } = __nccwpck_require__(49108) +const { base32 } = __nccwpck_require__(70784) +const { base16 } = __nccwpck_require__(98085) +const Digest = __nccwpck_require__(81168) +const cryptoKeys = __nccwpck_require__(13041) +const withIs = __nccwpck_require__(86421) +const { PeerIdProto } = __nccwpck_require__(42656) +const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) +const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) +const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +const { identity } = __nccwpck_require__(53863) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const bases = { + ...b32, + ...b36, + ...b58, + ...b64 +} +const baseDecoder = Object.keys(bases).reduce( + (acc, curr) => acc.or(bases[curr]), + base32.decoder +) + +// these values are from https://github.com/multiformats/multicodec/blob/master/table.csv +const DAG_PB_CODE = 0x70 +const LIBP2P_KEY_CODE = 0x72 + +class PeerId { + constructor (id, privKey, pubKey) { + if (!(id instanceof Uint8Array)) { + throw new Error('invalid id provided') + } + + if (privKey && pubKey && !uint8ArrayEquals(privKey.public.bytes, pubKey.bytes)) { + throw new Error('inconsistent arguments') + } + + this._id = id + this._idB58String = base58btc.encode(this.id).substring(1) + this._privKey = privKey + this._pubKey = pubKey + } + + get id () { + return this._id + } + + set id (val) { + throw new Error('Id is immutable') + } + + get privKey () { + return this._privKey + } + + set privKey (privKey) { + this._privKey = privKey + } + + get pubKey () { + if (this._pubKey) { + return this._pubKey + } + + if (this._privKey) { + return this._privKey.public + } + + try { + const decoded = Digest.decode(this.id) + + if (decoded.code === identity.code) { + this._pubKey = cryptoKeys.unmarshalPublicKey(decoded.digest) + } + } catch (_) { + // Ignore, there is no valid public key + } + + return this._pubKey + } + + set pubKey (pubKey) { + this._pubKey = pubKey + } + + // Return the protobuf version of the public key, matching go ipfs formatting + marshalPubKey () { + if (this.pubKey) { + return cryptoKeys.marshalPublicKey(this.pubKey) + } + } + + // Return the protobuf version of the private key, matching go ipfs formatting + marshalPrivKey () { + if (this.privKey) { + return cryptoKeys.marshalPrivateKey(this.privKey) + } + } + + // Return the protobuf version of the peer-id + marshal (excludePriv) { + return PeerIdProto.encode({ + id: this.toBytes(), + pubKey: this.marshalPubKey(), + privKey: excludePriv ? null : this.marshalPrivKey() + }).finish() + } + + toPrint () { + let pid = this.toB58String() + // All sha256 nodes start with Qm + // We can skip the Qm to make the peer.ID more useful + if (pid.startsWith('Qm')) { + pid = pid.slice(2) + } + let maxRunes = 6 + if (pid.length < maxRunes) { + maxRunes = pid.length + } + + return '' + } + + // return the jsonified version of the key, matching the formatting + // of go-ipfs for its config file + toJSON () { + return { + id: this.toB58String(), + privKey: toB64Opt(this.marshalPrivKey()), + pubKey: toB64Opt(this.marshalPubKey()) + } + } + + // encode/decode functions + toHexString () { + return base16.encode(this.id).substring(1) + } + + toBytes () { + return this.id + } + + toB58String () { + return this._idB58String + } + + // return self-describing String representation + // in default format from RFC 0001: https://github.com/libp2p/specs/pull/209 + toString () { + if (!this._idCIDString) { + const cid = CID.createV1(LIBP2P_KEY_CODE, Digest.decode(this.id)) + + Object.defineProperty(this, '_idCIDString', { + value: cid.toString(), + enumerable: false + }) + } + return this._idCIDString + } + + /** + * Checks the equality of `this` peer against a given PeerId. + * + * @param {Uint8Array|PeerId} id + * @returns {boolean} + */ + equals (id) { + if (id instanceof Uint8Array) { + return uint8ArrayEquals(this.id, id) + } else if (id.id) { + return uint8ArrayEquals(this.id, id.id) + } else { + throw new Error('not valid Id') + } + } + + /** + * Checks the equality of `this` peer against a given PeerId. + * + * @deprecated Use `.equals` + * @param {Uint8Array|PeerId} id + * @returns {boolean} + */ + isEqual (id) { + return this.equals(id) + } + + /* + * Check if this PeerId instance is valid (privKey -> pubKey -> Id) + */ + isValid () { + // TODO: needs better checking + return Boolean(this.privKey && + this.privKey.public && + this.privKey.public.bytes && + this.pubKey.bytes instanceof Uint8Array && + uint8ArrayEquals(this.privKey.public.bytes, this.pubKey.bytes)) + } + + /** + * Check if the PeerId has an inline public key. + * + * @returns {boolean} + */ + hasInlinePublicKey () { + try { + const decoded = Digest.decode(this.id) + + if (decoded.code === identity.code) { + return true + } + } catch (_) { + // Ignore, there is no valid public key + } + + return false + } +} + +const PeerIdWithIs = withIs(PeerId, { + className: 'PeerId', + symbolName: '@libp2p/js-peer-id/PeerId' +}) + +exports = module.exports = PeerIdWithIs + +const computeDigest = (pubKey) => { + if (pubKey.bytes.length <= 42) { + return Digest.create(identity.code, pubKey.bytes).bytes + } else { + return pubKey.hash() + } +} + +const computePeerId = async (privKey, pubKey) => { + const digest = await computeDigest(pubKey) + return new PeerIdWithIs(digest, privKey, pubKey) +} + +// generation +exports.create = async (opts) => { + opts = opts || {} + opts.bits = opts.bits || 2048 + opts.keyType = opts.keyType || 'RSA' + + const key = await cryptoKeys.generateKeyPair(opts.keyType, opts.bits) + return computePeerId(key, key.public) +} + +exports.createFromHexString = (str) => { + return new PeerIdWithIs(base16.decode('f' + str)) +} + +exports.createFromBytes = (buf) => { + try { + const cid = CID.decode(buf) + + if (!validMulticodec(cid)) { + throw new Error('Supplied PeerID CID is invalid') + } + + return exports.createFromCID(cid) + } catch { + const digest = Digest.decode(buf) + + if (digest.code !== identity.code) { + throw new Error('Supplied PeerID CID is invalid') + } + + return new PeerIdWithIs(buf) + } +} + +exports.createFromB58String = (str) => { + return exports.createFromBytes(base58btc.decode('z' + str)) +} + +const validMulticodec = (cid) => { + // supported: 'libp2p-key' (CIDv1) and 'dag-pb' (CIDv0 converted to CIDv1) + return cid.code === LIBP2P_KEY_CODE || cid.code === DAG_PB_CODE +} + +exports.createFromCID = (cid) => { + cid = CID.asCID(cid) + + if (!cid || !validMulticodec(cid)) { + throw new Error('Supplied PeerID CID is invalid') + } + + return new PeerIdWithIs(cid.multihash.bytes) +} + +// Public Key input will be a Uint8Array +exports.createFromPubKey = async (key) => { + let buf = key + + if (typeof buf === 'string') { + buf = uint8ArrayFromString(key, 'base64pad') + } + + if (!(buf instanceof Uint8Array)) { + throw new Error('Supplied key is neither a base64 string nor a Uint8Array') + } + + const pubKey = await cryptoKeys.unmarshalPublicKey(buf) + return computePeerId(undefined, pubKey) +} + +// Private key input will be a string +exports.createFromPrivKey = async (key) => { + if (typeof key === 'string') { + key = uint8ArrayFromString(key, 'base64pad') + } + + if (!(key instanceof Uint8Array)) { + throw new Error('Supplied key is neither a base64 string nor a Uint8Array') + } + + const privKey = await cryptoKeys.unmarshalPrivateKey(key) + return computePeerId(privKey, privKey.public) +} + +exports.createFromJSON = async (obj) => { + const id = base58btc.decode('z' + obj.id) + const rawPrivKey = obj.privKey && uint8ArrayFromString(obj.privKey, 'base64pad') + const rawPubKey = obj.pubKey && uint8ArrayFromString(obj.pubKey, 'base64pad') + const pub = rawPubKey && await cryptoKeys.unmarshalPublicKey(rawPubKey) + + if (!rawPrivKey) { + return new PeerIdWithIs(id, undefined, pub) + } + + const privKey = await cryptoKeys.unmarshalPrivateKey(rawPrivKey) + const privDigest = await computeDigest(privKey.public) + + let pubDigest + + if (pub) { + pubDigest = await computeDigest(pub) + } + + if (pub && !uint8ArrayEquals(privDigest, pubDigest)) { + throw new Error('Public and private key do not match') + } + + if (id && !uint8ArrayEquals(privDigest, id)) { + throw new Error('Id and private key do not match') + } + + return new PeerIdWithIs(id, privKey, pub) +} + +exports.createFromProtobuf = async (buf) => { + if (typeof buf === 'string') { + buf = uint8ArrayFromString(buf, 'base16') + } + + let { id, privKey, pubKey } = PeerIdProto.decode(buf) + + privKey = privKey ? await cryptoKeys.unmarshalPrivateKey(privKey) : false + pubKey = pubKey ? await cryptoKeys.unmarshalPublicKey(pubKey) : false + + let pubDigest + let privDigest + + if (privKey) { + privDigest = await computeDigest(privKey.public) + } + + if (pubKey) { + pubDigest = await computeDigest(pubKey) + } + + if (privKey) { + if (pubKey) { + if (!uint8ArrayEquals(privDigest, pubDigest)) { + throw new Error('Public and private key do not match') + } + } + return new PeerIdWithIs(privDigest, privKey, privKey.public) + } + + // TODO: val id and pubDigest + + if (pubKey) { + return new PeerIdWithIs(pubDigest, undefined, pubKey) + } + + if (id) { + return new PeerIdWithIs(id) + } + + throw new Error('Protobuf did not contain any usable key material') +} + +exports.parse = (str) => { + if (str.charAt(0) === '1' || str.charAt(0) === 'Q') { + // identity hash ed25519 key or sha2-256 hash of rsa public key + // base58btc encoded either way + str = `z${str}` + } + + return exports.createFromBytes(baseDecoder.decode(str)) +} + +exports.isPeerId = (peerId) => { + return Boolean(typeof peerId === 'object' && + peerId._id && + peerId._idB58String) +} + +function toB64Opt (val) { + if (val) { + return uint8ArrayToString(val, 'base64pad') + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 17804: +======= +/***/ 42656: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/*eslint-disable*/ + + +<<<<<<< HEAD +var $protobuf = __nccwpck_require__(20606); +======= +var $protobuf = __nccwpck_require__(63616); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +var $root = $protobuf.roots["libp2p-peer-id"] || ($protobuf.roots["libp2p-peer-id"] = {}); + +$root.PeerIdProto = (function() { + + /** + * Properties of a PeerIdProto. + * @exports IPeerIdProto + * @interface IPeerIdProto + * @property {Uint8Array} id PeerIdProto id + * @property {Uint8Array|null} [pubKey] PeerIdProto pubKey + * @property {Uint8Array|null} [privKey] PeerIdProto privKey + */ + + /** + * Constructs a new PeerIdProto. + * @exports PeerIdProto + * @classdesc Represents a PeerIdProto. + * @implements IPeerIdProto + * @constructor + * @param {IPeerIdProto=} [p] Properties to set + */ + function PeerIdProto(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) + this[ks[i]] = p[ks[i]]; + } + + /** + * PeerIdProto id. + * @member {Uint8Array} id + * @memberof PeerIdProto + * @instance + */ + PeerIdProto.prototype.id = $util.newBuffer([]); + + /** + * PeerIdProto pubKey. + * @member {Uint8Array} pubKey + * @memberof PeerIdProto + * @instance + */ + PeerIdProto.prototype.pubKey = $util.newBuffer([]); + + /** + * PeerIdProto privKey. + * @member {Uint8Array} privKey + * @memberof PeerIdProto + * @instance + */ + PeerIdProto.prototype.privKey = $util.newBuffer([]); + + /** + * Encodes the specified PeerIdProto message. Does not implicitly {@link PeerIdProto.verify|verify} messages. + * @function encode + * @memberof PeerIdProto + * @static + * @param {IPeerIdProto} m PeerIdProto message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeerIdProto.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + w.uint32(10).bytes(m.id); + if (m.pubKey != null && Object.hasOwnProperty.call(m, "pubKey")) + w.uint32(18).bytes(m.pubKey); + if (m.privKey != null && Object.hasOwnProperty.call(m, "privKey")) + w.uint32(26).bytes(m.privKey); + return w; + }; + + /** + * Decodes a PeerIdProto message from the specified reader or buffer. + * @function decode + * @memberof PeerIdProto + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {PeerIdProto} PeerIdProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeerIdProto.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.PeerIdProto(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.id = r.bytes(); + break; + case 2: + m.pubKey = r.bytes(); + break; + case 3: + m.privKey = r.bytes(); + break; + default: + r.skipType(t & 7); + break; + } + } + if (!m.hasOwnProperty("id")) + throw $util.ProtocolError("missing required 'id'", { instance: m }); + return m; + }; + + /** + * Creates a PeerIdProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof PeerIdProto + * @static + * @param {Object.} d Plain object + * @returns {PeerIdProto} PeerIdProto + */ + PeerIdProto.fromObject = function fromObject(d) { + if (d instanceof $root.PeerIdProto) + return d; + var m = new $root.PeerIdProto(); + if (d.id != null) { + if (typeof d.id === "string") + $util.base64.decode(d.id, m.id = $util.newBuffer($util.base64.length(d.id)), 0); + else if (d.id.length) + m.id = d.id; + } + if (d.pubKey != null) { + if (typeof d.pubKey === "string") + $util.base64.decode(d.pubKey, m.pubKey = $util.newBuffer($util.base64.length(d.pubKey)), 0); + else if (d.pubKey.length) + m.pubKey = d.pubKey; + } + if (d.privKey != null) { + if (typeof d.privKey === "string") + $util.base64.decode(d.privKey, m.privKey = $util.newBuffer($util.base64.length(d.privKey)), 0); + else if (d.privKey.length) + m.privKey = d.privKey; + } + return m; + }; + + /** + * Creates a plain object from a PeerIdProto message. Also converts values to other types if specified. + * @function toObject + * @memberof PeerIdProto + * @static + * @param {PeerIdProto} m PeerIdProto + * @param {$protobuf.IConversionOptions} [o] Conversion options + * @returns {Object.} Plain object + */ + PeerIdProto.toObject = function toObject(m, o) { + if (!o) + o = {}; + var d = {}; + if (o.defaults) { + if (o.bytes === String) + d.id = ""; + else { + d.id = []; + if (o.bytes !== Array) + d.id = $util.newBuffer(d.id); + } + if (o.bytes === String) + d.pubKey = ""; + else { + d.pubKey = []; + if (o.bytes !== Array) + d.pubKey = $util.newBuffer(d.pubKey); + } + if (o.bytes === String) + d.privKey = ""; + else { + d.privKey = []; + if (o.bytes !== Array) + d.privKey = $util.newBuffer(d.privKey); + } + } + if (m.id != null && m.hasOwnProperty("id")) { + d.id = o.bytes === String ? $util.base64.encode(m.id, 0, m.id.length) : o.bytes === Array ? Array.prototype.slice.call(m.id) : m.id; + } + if (m.pubKey != null && m.hasOwnProperty("pubKey")) { + d.pubKey = o.bytes === String ? $util.base64.encode(m.pubKey, 0, m.pubKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.pubKey) : m.pubKey; + } + if (m.privKey != null && m.hasOwnProperty("privKey")) { + d.privKey = o.bytes === String ? $util.base64.encode(m.privKey, 0, m.privKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.privKey) : m.privKey; + } + return d; + }; + + /** + * Converts this PeerIdProto to JSON. + * @function toJSON + * @memberof PeerIdProto + * @instance + * @returns {Object.} JSON object + */ + PeerIdProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PeerIdProto; +})(); + +module.exports = $root; + + +/***/ }), + +<<<<<<< HEAD +/***/ 20606: +======= +/***/ 63616: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// minimal library entry point. + + +<<<<<<< HEAD +module.exports = __nccwpck_require__(25251); +======= +module.exports = __nccwpck_require__(18828); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/***/ }), + +<<<<<<< HEAD +/***/ 25251: +======= +/***/ 18828: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +var protobuf = exports; + +/** + * Build type, one of `"full"`, `"light"` or `"minimal"`. + * @name build + * @type {string} + * @const + */ +protobuf.build = "minimal"; + +// Serialization +<<<<<<< HEAD +protobuf.Writer = __nccwpck_require__(26372); +protobuf.BufferWriter = __nccwpck_require__(47767); +protobuf.Reader = __nccwpck_require__(91890); +protobuf.BufferReader = __nccwpck_require__(98861); + +// Utility +protobuf.util = __nccwpck_require__(29902); +protobuf.rpc = __nccwpck_require__(77733); +protobuf.roots = __nccwpck_require__(17065); +======= +protobuf.Writer = __nccwpck_require__(64693); +protobuf.BufferWriter = __nccwpck_require__(42788); +protobuf.Reader = __nccwpck_require__(37994); +protobuf.BufferReader = __nccwpck_require__(18940); + +// Utility +protobuf.util = __nccwpck_require__(39807); +protobuf.rpc = __nccwpck_require__(46688); +protobuf.roots = __nccwpck_require__(20563); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +protobuf.configure = configure; + +/* istanbul ignore next */ +/** + * Reconfigures the library according to the environment. + * @returns {undefined} + */ +function configure() { + protobuf.util._configure(); + protobuf.Writer._configure(protobuf.BufferWriter); + protobuf.Reader._configure(protobuf.BufferReader); +} + +// Set up buffer utility according to the environment +configure(); + + +/***/ }), + +<<<<<<< HEAD +/***/ 91890: +======= +/***/ 37994: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = Reader; + +<<<<<<< HEAD +var util = __nccwpck_require__(29902); +======= +var util = __nccwpck_require__(39807); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var BufferReader; // cyclic + +var LongBits = util.LongBits, + utf8 = util.utf8; + +/* istanbul ignore next */ +function indexOutOfRange(reader, writeLength) { + return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); +} + +/** + * Constructs a new reader instance using the specified buffer. + * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. + * @constructor + * @param {Uint8Array} buffer Buffer to read from + */ +function Reader(buffer) { + + /** + * Read buffer. + * @type {Uint8Array} + */ + this.buf = buffer; + + /** + * Read buffer position. + * @type {number} + */ + this.pos = 0; + + /** + * Read buffer length. + * @type {number} + */ + this.len = buffer.length; +} + +var create_array = typeof Uint8Array !== "undefined" + ? function create_typed_array(buffer) { + if (buffer instanceof Uint8Array || Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + } + /* istanbul ignore next */ + : function create_array(buffer) { + if (Array.isArray(buffer)) + return new Reader(buffer); + throw Error("illegal buffer"); + }; + +var create = function create() { + return util.Buffer + ? function create_buffer_setup(buffer) { + return (Reader.create = function create_buffer(buffer) { + return util.Buffer.isBuffer(buffer) + ? new BufferReader(buffer) + /* istanbul ignore next */ + : create_array(buffer); + })(buffer); + } + /* istanbul ignore next */ + : create_array; +}; + +/** + * Creates a new reader using the specified buffer. + * @function + * @param {Uint8Array|Buffer} buffer Buffer to read from + * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} + * @throws {Error} If `buffer` is not a valid buffer + */ +Reader.create = create(); + +Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; + +/** + * Reads a varint as an unsigned 32 bit value. + * @function + * @returns {number} Value read + */ +Reader.prototype.uint32 = (function read_uint32_setup() { + var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) + return function read_uint32() { + value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; + value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; + + /* istanbul ignore if */ + if ((this.pos += 5) > this.len) { + this.pos = this.len; + throw indexOutOfRange(this, 10); + } + return value; + }; +})(); + +/** + * Reads a varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.int32 = function read_int32() { + return this.uint32() | 0; +}; + +/** + * Reads a zig-zag encoded varint as a signed 32 bit value. + * @returns {number} Value read + */ +Reader.prototype.sint32 = function read_sint32() { + var value = this.uint32(); + return value >>> 1 ^ -(value & 1) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readLongVarint() { + // tends to deopt with local vars for octet etc. + var bits = new LongBits(0, 0); + var i = 0; + if (this.len - this.pos > 4) { // fast route (lo) + for (; i < 4; ++i) { + // 1st..4th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 5th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; + bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + i = 0; + } else { + for (; i < 3; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 1st..3th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + // 4th + bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; + return bits; + } + if (this.len - this.pos > 4) { // fast route (hi) + for (; i < 5; ++i) { + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } else { + for (; i < 5; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) + return bits; + } + } + /* istanbul ignore next */ + throw Error("invalid varint encoding"); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads a varint as a signed 64 bit value. + * @name Reader#int64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as an unsigned 64 bit value. + * @name Reader#uint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a zig-zag encoded varint as a signed 64 bit value. + * @name Reader#sint64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a varint as a boolean. + * @returns {boolean} Value read + */ +Reader.prototype.bool = function read_bool() { + return this.uint32() !== 0; +}; + +function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` + return (buf[end - 4] + | buf[end - 3] << 8 + | buf[end - 2] << 16 + | buf[end - 1] << 24) >>> 0; +} + +/** + * Reads fixed 32 bits as an unsigned 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.fixed32 = function read_fixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4); +}; + +/** + * Reads fixed 32 bits as a signed 32 bit integer. + * @returns {number} Value read + */ +Reader.prototype.sfixed32 = function read_sfixed32() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + return readFixed32_end(this.buf, this.pos += 4) | 0; +}; + +/* eslint-disable no-invalid-this */ + +function readFixed64(/* this: Reader */) { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 8); + + return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); +} + +/* eslint-enable no-invalid-this */ + +/** + * Reads fixed 64 bits. + * @name Reader#fixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads zig-zag encoded fixed 64 bits. + * @name Reader#sfixed64 + * @function + * @returns {Long} Value read + */ + +/** + * Reads a float (32 bit) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.float = function read_float() { + + /* istanbul ignore if */ + if (this.pos + 4 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readFloatLE(this.buf, this.pos); + this.pos += 4; + return value; +}; + +/** + * Reads a double (64 bit float) as a number. + * @function + * @returns {number} Value read + */ +Reader.prototype.double = function read_double() { + + /* istanbul ignore if */ + if (this.pos + 8 > this.len) + throw indexOutOfRange(this, 4); + + var value = util.float.readDoubleLE(this.buf, this.pos); + this.pos += 8; + return value; +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @returns {Uint8Array} Value read + */ +Reader.prototype.bytes = function read_bytes() { + var length = this.uint32(), + start = this.pos, + end = this.pos + length; + + /* istanbul ignore if */ + if (end > this.len) + throw indexOutOfRange(this, length); + + this.pos += length; + if (Array.isArray(this.buf)) // plain array + return this.buf.slice(start, end); + return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1 + ? new this.buf.constructor(0) + : this._slice.call(this.buf, start, end); +}; + +/** + * Reads a string preceeded by its byte length as a varint. + * @returns {string} Value read + */ +Reader.prototype.string = function read_string() { + var bytes = this.bytes(); + return utf8.read(bytes, 0, bytes.length); +}; + +/** + * Skips the specified number of bytes if specified, otherwise skips a varint. + * @param {number} [length] Length if known, otherwise a varint is assumed + * @returns {Reader} `this` + */ +Reader.prototype.skip = function skip(length) { + if (typeof length === "number") { + /* istanbul ignore if */ + if (this.pos + length > this.len) + throw indexOutOfRange(this, length); + this.pos += length; + } else { + do { + /* istanbul ignore if */ + if (this.pos >= this.len) + throw indexOutOfRange(this); + } while (this.buf[this.pos++] & 128); + } + return this; +}; + +/** + * Skips the next element of the specified wire type. + * @param {number} wireType Wire type received + * @returns {Reader} `this` + */ +Reader.prototype.skipType = function(wireType) { + switch (wireType) { + case 0: + this.skip(); + break; + case 1: + this.skip(8); + break; + case 2: + this.skip(this.uint32()); + break; + case 3: + while ((wireType = this.uint32() & 7) !== 4) { + this.skipType(wireType); + } + break; + case 5: + this.skip(4); + break; + + /* istanbul ignore next */ + default: + throw Error("invalid wire type " + wireType + " at offset " + this.pos); + } + return this; +}; + +Reader._configure = function(BufferReader_) { + BufferReader = BufferReader_; + Reader.create = create(); + BufferReader._configure(); + + var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; + util.merge(Reader.prototype, { + + int64: function read_int64() { + return readLongVarint.call(this)[fn](false); + }, + + uint64: function read_uint64() { + return readLongVarint.call(this)[fn](true); + }, + + sint64: function read_sint64() { + return readLongVarint.call(this).zzDecode()[fn](false); + }, + + fixed64: function read_fixed64() { + return readFixed64.call(this)[fn](true); + }, + + sfixed64: function read_sfixed64() { + return readFixed64.call(this)[fn](false); + } + + }); +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 98861: +======= +/***/ 18940: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = BufferReader; + +// extends Reader +<<<<<<< HEAD +var Reader = __nccwpck_require__(91890); +(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; + +var util = __nccwpck_require__(29902); +======= +var Reader = __nccwpck_require__(37994); +(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; + +var util = __nccwpck_require__(39807); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * Constructs a new buffer reader instance. + * @classdesc Wire format reader using node buffers. + * @extends Reader + * @constructor + * @param {Buffer} buffer Buffer to read from + */ +function BufferReader(buffer) { + Reader.call(this, buffer); + + /** + * Read buffer. + * @name BufferReader#buf + * @type {Buffer} + */ +} + +BufferReader._configure = function () { + /* istanbul ignore else */ + if (util.Buffer) + BufferReader.prototype._slice = util.Buffer.prototype.slice; +}; + + +/** + * @override + */ +BufferReader.prototype.string = function read_string_buffer() { + var len = this.uint32(); // modifies pos + return this.buf.utf8Slice + ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) + : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); +}; + +/** + * Reads a sequence of bytes preceeded by its length as a varint. + * @name BufferReader#bytes + * @function + * @returns {Buffer} Value read + */ + +BufferReader._configure(); + + +/***/ }), + +<<<<<<< HEAD +/***/ 17065: +======= +/***/ 20563: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + +module.exports = {}; + +/** + * Named roots. + * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). + * Can also be used manually to make roots available accross modules. + * @name roots + * @type {Object.} + * @example + * // pbjs -r myroot -o compiled.js ... + * + * // in another module: + * require("./compiled.js"); + * + * // in any subsequent module: + * var root = protobuf.roots["myroot"]; + */ + + +/***/ }), + +<<<<<<< HEAD +/***/ 77733: +======= +/***/ 46688: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +/** + * Streaming RPC helpers. + * @namespace + */ +var rpc = exports; + +/** + * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. + * @typedef RPCImpl + * @type {function} + * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called + * @param {Uint8Array} requestData Request data + * @param {RPCImplCallback} callback Callback function + * @returns {undefined} + * @example + * function rpcImpl(method, requestData, callback) { + * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code + * throw Error("no such method"); + * asynchronouslyObtainAResponse(requestData, function(err, responseData) { + * callback(err, responseData); + * }); + * } + */ + +/** + * Node-style callback as used by {@link RPCImpl}. + * @typedef RPCImplCallback + * @type {function} + * @param {Error|null} error Error, if any, otherwise `null` + * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error + * @returns {undefined} + */ + +<<<<<<< HEAD +rpc.Service = __nccwpck_require__(64579); +======= +rpc.Service = __nccwpck_require__(80063); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/***/ }), + +<<<<<<< HEAD +/***/ 64579: +======= +/***/ 80063: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = Service; + +<<<<<<< HEAD +var util = __nccwpck_require__(29902); +======= +var util = __nccwpck_require__(39807); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +// Extends EventEmitter +(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; + +/** + * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. + * + * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. + * @typedef rpc.ServiceMethodCallback + * @template TRes extends Message + * @type {function} + * @param {Error|null} error Error, if any + * @param {TRes} [response] Response message + * @returns {undefined} + */ + +/** + * A service method part of a {@link rpc.Service} as created by {@link Service.create}. + * @typedef rpc.ServiceMethod + * @template TReq extends Message + * @template TRes extends Message + * @type {function} + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message + * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` + */ + +/** + * Constructs a new RPC service instance. + * @classdesc An RPC service as returned by {@link Service#create}. + * @exports rpc.Service + * @extends util.EventEmitter + * @constructor + * @param {RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ +function Service(rpcImpl, requestDelimited, responseDelimited) { + + if (typeof rpcImpl !== "function") + throw TypeError("rpcImpl must be a function"); + + util.EventEmitter.call(this); + + /** + * RPC implementation. Becomes `null` once the service is ended. + * @type {RPCImpl|null} + */ + this.rpcImpl = rpcImpl; + + /** + * Whether requests are length-delimited. + * @type {boolean} + */ + this.requestDelimited = Boolean(requestDelimited); + + /** + * Whether responses are length-delimited. + * @type {boolean} + */ + this.responseDelimited = Boolean(responseDelimited); +} + +/** + * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. + * @param {Method|rpc.ServiceMethod} method Reflected or static method + * @param {Constructor} requestCtor Request constructor + * @param {Constructor} responseCtor Response constructor + * @param {TReq|Properties} request Request message or plain object + * @param {rpc.ServiceMethodCallback} callback Service callback + * @returns {undefined} + * @template TReq extends Message + * @template TRes extends Message + */ +Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { + + if (!request) + throw TypeError("request must be specified"); + + var self = this; + if (!callback) + return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); + + if (!self.rpcImpl) { + setTimeout(function() { callback(Error("already ended")); }, 0); + return undefined; + } + + try { + return self.rpcImpl( + method, + requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), + function rpcCallback(err, response) { + + if (err) { + self.emit("error", err, method); + return callback(err); + } + + if (response === null) { + self.end(/* endedByRPC */ true); + return undefined; + } + + if (!(response instanceof responseCtor)) { + try { + response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); + } catch (err) { + self.emit("error", err, method); + return callback(err); + } + } + + self.emit("data", response, method); + return callback(null, response); + } + ); + } catch (err) { + self.emit("error", err, method); + setTimeout(function() { callback(err); }, 0); + return undefined; + } +}; + +/** + * Ends this service and emits the `end` event. + * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. + * @returns {rpc.Service} `this` + */ +Service.prototype.end = function end(endedByRPC) { + if (this.rpcImpl) { + if (!endedByRPC) // signal end to rpcImpl + this.rpcImpl(null, null, null); + this.rpcImpl = null; + this.emit("end").off(); + } + return this; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 81883: +======= +/***/ 67489: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = LongBits; + +<<<<<<< HEAD +var util = __nccwpck_require__(29902); +======= +var util = __nccwpck_require__(39807); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * Constructs new long bits. + * @classdesc Helper class for working with the low and high bits of a 64 bit value. + * @memberof util + * @constructor + * @param {number} lo Low 32 bits, unsigned + * @param {number} hi High 32 bits, unsigned + */ +function LongBits(lo, hi) { + + // note that the casts below are theoretically unnecessary as of today, but older statically + // generated converter code might still call the ctor with signed 32bits. kept for compat. + + /** + * Low bits. + * @type {number} + */ + this.lo = lo >>> 0; + + /** + * High bits. + * @type {number} + */ + this.hi = hi >>> 0; +} + +/** + * Zero bits. + * @memberof util.LongBits + * @type {util.LongBits} + */ +var zero = LongBits.zero = new LongBits(0, 0); + +zero.toNumber = function() { return 0; }; +zero.zzEncode = zero.zzDecode = function() { return this; }; +zero.length = function() { return 1; }; + +/** + * Zero hash. + * @memberof util.LongBits + * @type {string} + */ +var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; + +/** + * Constructs new long bits from the specified number. + * @param {number} value Value + * @returns {util.LongBits} Instance + */ +LongBits.fromNumber = function fromNumber(value) { + if (value === 0) + return zero; + var sign = value < 0; + if (sign) + value = -value; + var lo = value >>> 0, + hi = (value - lo) / 4294967296 >>> 0; + if (sign) { + hi = ~hi >>> 0; + lo = ~lo >>> 0; + if (++lo > 4294967295) { + lo = 0; + if (++hi > 4294967295) + hi = 0; + } + } + return new LongBits(lo, hi); +}; + +/** + * Constructs new long bits from a number, long or string. + * @param {Long|number|string} value Value + * @returns {util.LongBits} Instance + */ +LongBits.from = function from(value) { + if (typeof value === "number") + return LongBits.fromNumber(value); + if (util.isString(value)) { + /* istanbul ignore else */ + if (util.Long) + value = util.Long.fromString(value); + else + return LongBits.fromNumber(parseInt(value, 10)); + } + return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; +}; + +/** + * Converts this long bits to a possibly unsafe JavaScript number. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {number} Possibly unsafe number + */ +LongBits.prototype.toNumber = function toNumber(unsigned) { + if (!unsigned && this.hi >>> 31) { + var lo = ~this.lo + 1 >>> 0, + hi = ~this.hi >>> 0; + if (!lo) + hi = hi + 1 >>> 0; + return -(lo + hi * 4294967296); + } + return this.lo + this.hi * 4294967296; +}; + +/** + * Converts this long bits to a long. + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long} Long + */ +LongBits.prototype.toLong = function toLong(unsigned) { + return util.Long + ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) + /* istanbul ignore next */ + : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; +}; + +var charCodeAt = String.prototype.charCodeAt; + +/** + * Constructs new long bits from the specified 8 characters long hash. + * @param {string} hash Hash + * @returns {util.LongBits} Bits + */ +LongBits.fromHash = function fromHash(hash) { + if (hash === zeroHash) + return zero; + return new LongBits( + ( charCodeAt.call(hash, 0) + | charCodeAt.call(hash, 1) << 8 + | charCodeAt.call(hash, 2) << 16 + | charCodeAt.call(hash, 3) << 24) >>> 0 + , + ( charCodeAt.call(hash, 4) + | charCodeAt.call(hash, 5) << 8 + | charCodeAt.call(hash, 6) << 16 + | charCodeAt.call(hash, 7) << 24) >>> 0 + ); +}; + +/** + * Converts this long bits to a 8 characters long hash. + * @returns {string} Hash + */ +LongBits.prototype.toHash = function toHash() { + return String.fromCharCode( + this.lo & 255, + this.lo >>> 8 & 255, + this.lo >>> 16 & 255, + this.lo >>> 24 , + this.hi & 255, + this.hi >>> 8 & 255, + this.hi >>> 16 & 255, + this.hi >>> 24 + ); +}; + +/** + * Zig-zag encodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzEncode = function zzEncode() { + var mask = this.hi >> 31; + this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; + this.lo = ( this.lo << 1 ^ mask) >>> 0; + return this; +}; + +/** + * Zig-zag decodes this long bits. + * @returns {util.LongBits} `this` + */ +LongBits.prototype.zzDecode = function zzDecode() { + var mask = -(this.lo & 1); + this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; + this.hi = ( this.hi >>> 1 ^ mask) >>> 0; + return this; +}; + +/** + * Calculates the length of this longbits when encoded as a varint. + * @returns {number} Length + */ +LongBits.prototype.length = function length() { + var part0 = this.lo, + part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, + part2 = this.hi >>> 24; + return part2 === 0 + ? part1 === 0 + ? part0 < 16384 + ? part0 < 128 ? 1 : 2 + : part0 < 2097152 ? 3 : 4 + : part1 < 16384 + ? part1 < 128 ? 5 : 6 + : part1 < 2097152 ? 7 : 8 + : part2 < 128 ? 9 : 10; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 29902: +======= +/***/ 39807: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { + + +var util = exports; + +// used to return a Promise where callback is omitted +<<<<<<< HEAD +util.asPromise = __nccwpck_require__(40488); + +// converts to / from base64 encoded strings +util.base64 = __nccwpck_require__(81246); + +// base class of rpc.Service +util.EventEmitter = __nccwpck_require__(85885); + +// float handling accross browsers +util.float = __nccwpck_require__(26666); + +// requires modules optionally and hides the call from bundlers +util.inquire = __nccwpck_require__(62798); + +// converts to / from utf8 encoded strings +util.utf8 = __nccwpck_require__(30105); + +// provides a node-like buffer pool in the browser +util.pool = __nccwpck_require__(45350); + +// utility to work with the low and high bits of a 64 bit value +util.LongBits = __nccwpck_require__(81883); +======= +util.asPromise = __nccwpck_require__(66619); + +// converts to / from base64 encoded strings +util.base64 = __nccwpck_require__(37366); + +// base class of rpc.Service +util.EventEmitter = __nccwpck_require__(98873); + +// float handling accross browsers +util.float = __nccwpck_require__(13001); + +// requires modules optionally and hides the call from bundlers +util.inquire = __nccwpck_require__(74097); + +// converts to / from utf8 encoded strings +util.utf8 = __nccwpck_require__(42114); + +// provides a node-like buffer pool in the browser +util.pool = __nccwpck_require__(15177); + +// utility to work with the low and high bits of a 64 bit value +util.LongBits = __nccwpck_require__(67489); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * Whether running within node or not. + * @memberof util + * @type {boolean} + */ +util.isNode = Boolean(typeof global !== "undefined" + && global + && global.process + && global.process.versions + && global.process.versions.node); + +/** + * Global object reference. + * @memberof util + * @type {Object} + */ +util.global = util.isNode && global + || typeof window !== "undefined" && window + || typeof self !== "undefined" && self + || this; // eslint-disable-line no-invalid-this + +/** + * An immuable empty array. + * @memberof util + * @type {Array.<*>} + * @const + */ +util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes + +/** + * An immutable empty object. + * @type {Object} + * @const + */ +util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes + +/** + * Tests if the specified value is an integer. + * @function + * @param {*} value Value to test + * @returns {boolean} `true` if the value is an integer + */ +util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { + return typeof value === "number" && isFinite(value) && Math.floor(value) === value; +}; + +/** + * Tests if the specified value is a string. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a string + */ +util.isString = function isString(value) { + return typeof value === "string" || value instanceof String; +}; + +/** + * Tests if the specified value is a non-null object. + * @param {*} value Value to test + * @returns {boolean} `true` if the value is a non-null object + */ +util.isObject = function isObject(value) { + return value && typeof value === "object"; +}; + +/** + * Checks if a property on a message is considered to be present. + * This is an alias of {@link util.isSet}. + * @function + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isset = + +/** + * Checks if a property on a message is considered to be present. + * @param {Object} obj Plain object or message instance + * @param {string} prop Property name + * @returns {boolean} `true` if considered to be present, otherwise `false` + */ +util.isSet = function isSet(obj, prop) { + var value = obj[prop]; + if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins + return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; + return false; +}; + +/** + * Any compatible Buffer instance. + * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. + * @interface Buffer + * @extends Uint8Array + */ + +/** + * Node's Buffer class if available. + * @type {Constructor} + */ +util.Buffer = (function() { + try { + var Buffer = util.inquire("buffer").Buffer; + // refuse to use non-node buffers if not explicitly assigned (perf reasons): + return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; + } catch (e) { + /* istanbul ignore next */ + return null; + } +})(); + +// Internal alias of or polyfull for Buffer.from. +util._Buffer_from = null; + +// Internal alias of or polyfill for Buffer.allocUnsafe. +util._Buffer_allocUnsafe = null; + +/** + * Creates a new buffer of whatever type supported by the environment. + * @param {number|number[]} [sizeOrArray=0] Buffer size or number array + * @returns {Uint8Array|Buffer} Buffer + */ +util.newBuffer = function newBuffer(sizeOrArray) { + /* istanbul ignore next */ + return typeof sizeOrArray === "number" + ? util.Buffer + ? util._Buffer_allocUnsafe(sizeOrArray) + : new util.Array(sizeOrArray) + : util.Buffer + ? util._Buffer_from(sizeOrArray) + : typeof Uint8Array === "undefined" + ? sizeOrArray + : new Uint8Array(sizeOrArray); +}; + +/** + * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. + * @type {Constructor} + */ +util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; + +/** + * Any compatible Long instance. + * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. + * @interface Long + * @property {number} low Low bits + * @property {number} high High bits + * @property {boolean} unsigned Whether unsigned or not + */ + +/** + * Long.js's Long class if available. + * @type {Constructor} + */ +util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long + || /* istanbul ignore next */ util.global.Long + || util.inquire("long"); + +/** + * Regular expression used to verify 2 bit (`bool`) map keys. + * @type {RegExp} + * @const + */ +util.key2Re = /^true|false|0|1$/; + +/** + * Regular expression used to verify 32 bit (`int32` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; + +/** + * Regular expression used to verify 64 bit (`int64` etc.) map keys. + * @type {RegExp} + * @const + */ +util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; + +/** + * Converts a number or long to an 8 characters long hash string. + * @param {Long|number} value Value to convert + * @returns {string} Hash + */ +util.longToHash = function longToHash(value) { + return value + ? util.LongBits.from(value).toHash() + : util.LongBits.zeroHash; +}; + +/** + * Converts an 8 characters long hash string to a long or number. + * @param {string} hash Hash + * @param {boolean} [unsigned=false] Whether unsigned or not + * @returns {Long|number} Original value + */ +util.longFromHash = function longFromHash(hash, unsigned) { + var bits = util.LongBits.fromHash(hash); + if (util.Long) + return util.Long.fromBits(bits.lo, bits.hi, unsigned); + return bits.toNumber(Boolean(unsigned)); +}; + +/** + * Merges the properties of the source object into the destination object. + * @memberof util + * @param {Object.} dst Destination object + * @param {Object.} src Source object + * @param {boolean} [ifNotSet=false] Merges only if the key is not already set + * @returns {Object.} Destination object + */ +function merge(dst, src, ifNotSet) { // used by converters + for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) + if (dst[keys[i]] === undefined || !ifNotSet) + dst[keys[i]] = src[keys[i]]; + return dst; +} + +util.merge = merge; + +/** + * Converts the first character of a string to lower case. + * @param {string} str String to convert + * @returns {string} Converted string + */ +util.lcFirst = function lcFirst(str) { + return str.charAt(0).toLowerCase() + str.substring(1); +}; + +/** + * Creates a custom error constructor. + * @memberof util + * @param {string} name Error name + * @returns {Constructor} Custom error constructor + */ +function newError(name) { + + function CustomError(message, properties) { + + if (!(this instanceof CustomError)) + return new CustomError(message, properties); + + // Error.call(this, message); + // ^ just returns a new error instance because the ctor can be called as a function + + Object.defineProperty(this, "message", { get: function() { return message; } }); + + /* istanbul ignore next */ + if (Error.captureStackTrace) // node + Error.captureStackTrace(this, CustomError); + else + Object.defineProperty(this, "stack", { value: new Error().stack || "" }); + + if (properties) + merge(this, properties); + } + + (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError; + + Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } }); + + CustomError.prototype.toString = function toString() { + return this.name + ": " + this.message; + }; + + return CustomError; +} + +util.newError = newError; + +/** + * Constructs a new protocol error. + * @classdesc Error subclass indicating a protocol specifc error. + * @memberof util + * @extends Error + * @template T extends Message + * @constructor + * @param {string} message Error message + * @param {Object.} [properties] Additional properties + * @example + * try { + * MyMessage.decode(someBuffer); // throws if required fields are missing + * } catch (e) { + * if (e instanceof ProtocolError && e.instance) + * console.log("decoded so far: " + JSON.stringify(e.instance)); + * } + */ +util.ProtocolError = newError("ProtocolError"); + +/** + * So far decoded message instance. + * @name util.ProtocolError#instance + * @type {Message} + */ + +/** + * A OneOf getter as returned by {@link util.oneOfGetter}. + * @typedef OneOfGetter + * @type {function} + * @returns {string|undefined} Set field name, if any + */ + +/** + * Builds a getter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfGetter} Unbound getter + */ +util.oneOfGetter = function getOneOf(fieldNames) { + var fieldMap = {}; + for (var i = 0; i < fieldNames.length; ++i) + fieldMap[fieldNames[i]] = 1; + + /** + * @returns {string|undefined} Set field name, if any + * @this Object + * @ignore + */ + return function() { // eslint-disable-line consistent-return + for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) + if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) + return keys[i]; + }; +}; + +/** + * A OneOf setter as returned by {@link util.oneOfSetter}. + * @typedef OneOfSetter + * @type {function} + * @param {string|undefined} value Field name + * @returns {undefined} + */ + +/** + * Builds a setter for a oneof's present field name. + * @param {string[]} fieldNames Field names + * @returns {OneOfSetter} Unbound setter + */ +util.oneOfSetter = function setOneOf(fieldNames) { + + /** + * @param {string} name Field name + * @returns {undefined} + * @this Object + * @ignore + */ + return function(name) { + for (var i = 0; i < fieldNames.length; ++i) + if (fieldNames[i] !== name) + delete this[fieldNames[i]]; + }; +}; + +/** + * Default conversion options used for {@link Message#toJSON} implementations. + * + * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: + * + * - Longs become strings + * - Enums become string keys + * - Bytes become base64 encoded strings + * - (Sub-)Messages become plain objects + * - Maps become plain objects with all string keys + * - Repeated fields become arrays + * - NaN and Infinity for float and double fields become strings + * + * @type {IConversionOptions} + * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json + */ +util.toJSONOptions = { + longs: String, + enums: String, + bytes: String, + json: true +}; + +// Sets up buffer utility according to the environment (called in index-minimal) +util._configure = function() { + var Buffer = util.Buffer; + /* istanbul ignore if */ + if (!Buffer) { + util._Buffer_from = util._Buffer_allocUnsafe = null; + return; + } + // because node 4.x buffers are incompatible & immutable + // see: https://github.com/dcodeIO/protobuf.js/pull/665 + util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || + /* istanbul ignore next */ + function Buffer_from(value, encoding) { + return new Buffer(value, encoding); + }; + util._Buffer_allocUnsafe = Buffer.allocUnsafe || + /* istanbul ignore next */ + function Buffer_allocUnsafe(size) { + return new Buffer(size); + }; +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 26372: +======= +/***/ 64693: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = Writer; + +<<<<<<< HEAD +var util = __nccwpck_require__(29902); +======= +var util = __nccwpck_require__(39807); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +var BufferWriter; // cyclic + +var LongBits = util.LongBits, + base64 = util.base64, + utf8 = util.utf8; + +/** + * Constructs a new writer operation instance. + * @classdesc Scheduled writer operation. + * @constructor + * @param {function(*, Uint8Array, number)} fn Function to call + * @param {number} len Value byte length + * @param {*} val Value to write + * @ignore + */ +function Op(fn, len, val) { + + /** + * Function to call. + * @type {function(Uint8Array, number, *)} + */ + this.fn = fn; + + /** + * Value byte length. + * @type {number} + */ + this.len = len; + + /** + * Next operation. + * @type {Writer.Op|undefined} + */ + this.next = undefined; + + /** + * Value to write. + * @type {*} + */ + this.val = val; // type varies +} + +/* istanbul ignore next */ +function noop() {} // eslint-disable-line no-empty-function + +/** + * Constructs a new writer state instance. + * @classdesc Copied writer state. + * @memberof Writer + * @constructor + * @param {Writer} writer Writer to copy state from + * @ignore + */ +function State(writer) { + + /** + * Current head. + * @type {Writer.Op} + */ + this.head = writer.head; + + /** + * Current tail. + * @type {Writer.Op} + */ + this.tail = writer.tail; + + /** + * Current buffer length. + * @type {number} + */ + this.len = writer.len; + + /** + * Next state. + * @type {State|null} + */ + this.next = writer.states; +} + +/** + * Constructs a new writer instance. + * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. + * @constructor + */ +function Writer() { + + /** + * Current length. + * @type {number} + */ + this.len = 0; + + /** + * Operations head. + * @type {Object} + */ + this.head = new Op(noop, 0, 0); + + /** + * Operations tail + * @type {Object} + */ + this.tail = this.head; + + /** + * Linked forked states. + * @type {Object|null} + */ + this.states = null; + + // When a value is written, the writer calculates its byte length and puts it into a linked + // list of operations to perform when finish() is called. This both allows us to allocate + // buffers of the exact required size and reduces the amount of work we have to do compared + // to first calculating over objects and then encoding over objects. In our case, the encoding + // part is just a linked list walk calling operations with already prepared values. +} + +var create = function create() { + return util.Buffer + ? function create_buffer_setup() { + return (Writer.create = function create_buffer() { + return new BufferWriter(); + })(); + } + /* istanbul ignore next */ + : function create_array() { + return new Writer(); + }; +}; + +/** + * Creates a new writer. + * @function + * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} + */ +Writer.create = create(); + +/** + * Allocates a buffer of the specified size. + * @param {number} size Buffer size + * @returns {Uint8Array} Buffer + */ +Writer.alloc = function alloc(size) { + return new util.Array(size); +}; + +// Use Uint8Array buffer pool in the browser, just like node does with buffers +/* istanbul ignore else */ +if (util.Array !== Array) + Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); + +/** + * Pushes a new operation to the queue. + * @param {function(Uint8Array, number, *)} fn Function to call + * @param {number} len Value byte length + * @param {number} val Value to write + * @returns {Writer} `this` + * @private + */ +Writer.prototype._push = function push(fn, len, val) { + this.tail = this.tail.next = new Op(fn, len, val); + this.len += len; + return this; +}; + +function writeByte(val, buf, pos) { + buf[pos] = val & 255; +} + +function writeVarint32(val, buf, pos) { + while (val > 127) { + buf[pos++] = val & 127 | 128; + val >>>= 7; + } + buf[pos] = val; +} + +/** + * Constructs a new varint writer operation instance. + * @classdesc Scheduled varint writer operation. + * @extends Op + * @constructor + * @param {number} len Value byte length + * @param {number} val Value to write + * @ignore + */ +function VarintOp(len, val) { + this.len = len; + this.next = undefined; + this.val = val; +} + +VarintOp.prototype = Object.create(Op.prototype); +VarintOp.prototype.fn = writeVarint32; + +/** + * Writes an unsigned 32 bit value as a varint. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.uint32 = function write_uint32(value) { + // here, the call to this.push has been inlined and a varint specific Op subclass is used. + // uint32 is by far the most frequently used operation and benefits significantly from this. + this.len += (this.tail = this.tail.next = new VarintOp( + (value = value >>> 0) + < 128 ? 1 + : value < 16384 ? 2 + : value < 2097152 ? 3 + : value < 268435456 ? 4 + : 5, + value)).len; + return this; +}; + +/** + * Writes a signed 32 bit value as a varint. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.int32 = function write_int32(value) { + return value < 0 + ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec + : this.uint32(value); +}; + +/** + * Writes a 32 bit value as a varint, zig-zag encoded. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sint32 = function write_sint32(value) { + return this.uint32((value << 1 ^ value >> 31) >>> 0); +}; + +function writeVarint64(val, buf, pos) { + while (val.hi) { + buf[pos++] = val.lo & 127 | 128; + val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; + val.hi >>>= 7; + } + while (val.lo > 127) { + buf[pos++] = val.lo & 127 | 128; + val.lo = val.lo >>> 7; + } + buf[pos++] = val.lo; +} + +/** + * Writes an unsigned 64 bit value as a varint. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.uint64 = function write_uint64(value) { + var bits = LongBits.from(value); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a signed 64 bit value as a varint. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.int64 = Writer.prototype.uint64; + +/** + * Writes a signed 64 bit value as a varint, zig-zag encoded. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sint64 = function write_sint64(value) { + var bits = LongBits.from(value).zzEncode(); + return this._push(writeVarint64, bits.length(), bits); +}; + +/** + * Writes a boolish value as a varint. + * @param {boolean} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.bool = function write_bool(value) { + return this._push(writeByte, 1, value ? 1 : 0); +}; + +function writeFixed32(val, buf, pos) { + buf[pos ] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} + +/** + * Writes an unsigned 32 bit value as fixed 32 bits. + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.fixed32 = function write_fixed32(value) { + return this._push(writeFixed32, 4, value >>> 0); +}; + +/** + * Writes a signed 32 bit value as fixed 32 bits. + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.sfixed32 = Writer.prototype.fixed32; + +/** + * Writes an unsigned 64 bit value as fixed 64 bits. + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.fixed64 = function write_fixed64(value) { + var bits = LongBits.from(value); + return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); +}; + +/** + * Writes a signed 64 bit value as fixed 64 bits. + * @function + * @param {Long|number|string} value Value to write + * @returns {Writer} `this` + * @throws {TypeError} If `value` is a string and no long library is present. + */ +Writer.prototype.sfixed64 = Writer.prototype.fixed64; + +/** + * Writes a float (32 bit). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.float = function write_float(value) { + return this._push(util.float.writeFloatLE, 4, value); +}; + +/** + * Writes a double (64 bit float). + * @function + * @param {number} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.double = function write_double(value) { + return this._push(util.float.writeDoubleLE, 8, value); +}; + +var writeBytes = util.Array.prototype.set + ? function writeBytes_set(val, buf, pos) { + buf.set(val, pos); // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytes_for(val, buf, pos) { + for (var i = 0; i < val.length; ++i) + buf[pos + i] = val[i]; + }; + +/** + * Writes a sequence of bytes. + * @param {Uint8Array|string} value Buffer or base64 encoded string to write + * @returns {Writer} `this` + */ +Writer.prototype.bytes = function write_bytes(value) { + var len = value.length >>> 0; + if (!len) + return this._push(writeByte, 1, 0); + if (util.isString(value)) { + var buf = Writer.alloc(len = base64.length(value)); + base64.decode(value, buf, 0); + value = buf; + } + return this.uint32(len)._push(writeBytes, len, value); +}; + +/** + * Writes a string. + * @param {string} value Value to write + * @returns {Writer} `this` + */ +Writer.prototype.string = function write_string(value) { + var len = utf8.length(value); + return len + ? this.uint32(len)._push(utf8.write, len, value) + : this._push(writeByte, 1, 0); +}; + +/** + * Forks this writer's state by pushing it to a stack. + * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. + * @returns {Writer} `this` + */ +Writer.prototype.fork = function fork() { + this.states = new State(this); + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + return this; +}; + +/** + * Resets this instance to the last state. + * @returns {Writer} `this` + */ +Writer.prototype.reset = function reset() { + if (this.states) { + this.head = this.states.head; + this.tail = this.states.tail; + this.len = this.states.len; + this.states = this.states.next; + } else { + this.head = this.tail = new Op(noop, 0, 0); + this.len = 0; + } + return this; +}; + +/** + * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. + * @returns {Writer} `this` + */ +Writer.prototype.ldelim = function ldelim() { + var head = this.head, + tail = this.tail, + len = this.len; + this.reset().uint32(len); + if (len) { + this.tail.next = head.next; // skip noop + this.tail = tail; + this.len += len; + } + return this; +}; + +/** + * Finishes the write operation. + * @returns {Uint8Array} Finished buffer + */ +Writer.prototype.finish = function finish() { + var head = this.head.next, // skip noop + buf = this.constructor.alloc(this.len), + pos = 0; + while (head) { + head.fn(head.val, buf, pos); + pos += head.len; + head = head.next; + } + // this.head = this.tail = null; + return buf; +}; + +Writer._configure = function(BufferWriter_) { + BufferWriter = BufferWriter_; + Writer.create = create(); + BufferWriter._configure(); +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 47767: +======= +/***/ 42788: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +module.exports = BufferWriter; + +// extends Writer +<<<<<<< HEAD +var Writer = __nccwpck_require__(26372); +(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; + +var util = __nccwpck_require__(29902); +======= +var Writer = __nccwpck_require__(64693); +(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; + +var util = __nccwpck_require__(39807); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +/** + * Constructs a new buffer writer instance. + * @classdesc Wire format writer using node buffers. + * @extends Writer + * @constructor + */ +function BufferWriter() { + Writer.call(this); +} + +BufferWriter._configure = function () { + /** + * Allocates a buffer of the specified size. + * @function + * @param {number} size Buffer size + * @returns {Buffer} Buffer + */ + BufferWriter.alloc = util._Buffer_allocUnsafe; + + BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" + ? function writeBytesBuffer_set(val, buf, pos) { + buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) + // also works for plain array values + } + /* istanbul ignore next */ + : function writeBytesBuffer_copy(val, buf, pos) { + if (val.copy) // Buffer values + val.copy(buf, pos, 0, val.length); + else for (var i = 0; i < val.length;) // plain array values + buf[pos++] = val[i++]; + }; +}; + + +/** + * @override + */ +BufferWriter.prototype.bytes = function write_bytes_buffer(value) { + if (util.isString(value)) + value = util._Buffer_from(value, "base64"); + var len = value.length >>> 0; + this.uint32(len); + if (len) + this._push(BufferWriter.writeBytesBuffer, len, value); + return this; +}; + +function writeStringBuffer(val, buf, pos) { + if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) + util.utf8.write(val, buf, pos); + else if (buf.utf8Write) + buf.utf8Write(val, pos); + else + buf.write(val, pos); +} + +/** + * @override + */ +BufferWriter.prototype.string = function write_string_buffer(value) { + var len = util.Buffer.byteLength(value); + this.uint32(len); + if (len) + this._push(writeStringBuffer, len, value); + return this; +}; + + +/** + * Finishes the write operation. + * @name BufferWriter#finish + * @function + * @returns {Buffer} Finished buffer + */ + +BufferWriter._configure(); + + +/***/ }), + +<<<<<<< HEAD +/***/ 72946: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +var parseUrl = (__nccwpck_require__(57310).parse); + +var DEFAULT_PORTS = { + ftp: 21, + gopher: 70, + http: 80, + https: 443, + ws: 80, + wss: 443, +}; + +var stringEndsWith = String.prototype.endsWith || function(s) { + return s.length <= this.length && + this.indexOf(s, this.length - s.length) !== -1; +}; + +/** + * @param {string|object} url - The URL, or the result from url.parse. + * @return {string} The URL of the proxy that should handle the request to the + * given URL. If no proxy is set, this will be an empty string. + */ +function getProxyForUrl(url) { + var parsedUrl = typeof url === 'string' ? parseUrl(url) : url || {}; + var proto = parsedUrl.protocol; + var hostname = parsedUrl.host; + var port = parsedUrl.port; + if (typeof hostname !== 'string' || !hostname || typeof proto !== 'string') { + return ''; // Don't proxy URLs without a valid scheme or host. + } + + proto = proto.split(':', 1)[0]; + // Stripping ports in this way instead of using parsedUrl.hostname to make + // sure that the brackets around IPv6 addresses are kept. + hostname = hostname.replace(/:\d*$/, ''); + port = parseInt(port) || DEFAULT_PORTS[proto] || 0; + if (!shouldProxy(hostname, port)) { + return ''; // Don't proxy URLs that match NO_PROXY. + } + + var proxy = + getEnv('npm_config_' + proto + '_proxy') || + getEnv(proto + '_proxy') || + getEnv('npm_config_proxy') || + getEnv('all_proxy'); + if (proxy && proxy.indexOf('://') === -1) { + // Missing scheme in proxy, default to the requested URL's scheme. + proxy = proto + '://' + proxy; + } + return proxy; +} + +/** + * Determines whether a given URL should be proxied. + * + * @param {string} hostname - The host name of the URL. + * @param {number} port - The effective port of the URL. + * @returns {boolean} Whether the given URL should be proxied. + * @private + */ +function shouldProxy(hostname, port) { + var NO_PROXY = + (getEnv('npm_config_no_proxy') || getEnv('no_proxy')).toLowerCase(); + if (!NO_PROXY) { + return true; // Always proxy if NO_PROXY is not set. + } + if (NO_PROXY === '*') { + return false; // Never proxy if wildcard is set. + } + + return NO_PROXY.split(/[,\s]/).every(function(proxy) { + if (!proxy) { + return true; // Skip zero-length hosts. + } + var parsedProxy = proxy.match(/^(.+):(\d+)$/); + var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy; + var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0; + if (parsedProxyPort && parsedProxyPort !== port) { + return true; // Skip if ports don't match. + } + + if (!/^[.*]/.test(parsedProxyHostname)) { + // No wildcards, so stop proxying if there is an exact match. + return hostname !== parsedProxyHostname; + } + + if (parsedProxyHostname.charAt(0) === '*') { + // Remove leading wildcard. + parsedProxyHostname = parsedProxyHostname.slice(1); + } + // Stop proxying if the hostname ends with the no_proxy host. + return !stringEndsWith.call(hostname, parsedProxyHostname); + }); +} + +/** + * Get the value for an environment variable. + * + * @param {string} key - The name of the environment variable. + * @return {string} The value of the environment variable. + * @private + */ +function getEnv(key) { + return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || ''; +} + +exports.j = getProxyForUrl; + + +/***/ }), + +/***/ 30517: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +const { instantiateSync } = __nccwpck_require__(84181); +======= +/***/ 2682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +const { instantiateSync } = __nccwpck_require__(63088); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +const fs = __nccwpck_require__(57147) + +loadWebAssembly.supported = typeof WebAssembly !== 'undefined' + +async function loadWebAssembly (imp = {}) { + if (!loadWebAssembly.supported) return null + + return instantiateSync(fs.readFileSync(__nccwpck_require__.ab + "rabin.wasm"), imp); +} +module.exports = loadWebAssembly + + +/***/ }), + +<<<<<<< HEAD +/***/ 55340: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Rabin = __nccwpck_require__(83005) +const getRabin = __nccwpck_require__(30517) +======= +/***/ 41333: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const Rabin = __nccwpck_require__(91098) +const getRabin = __nccwpck_require__(2682) +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const create = async (avg, min, max, windowSize, polynomial) => { + const compiled = await getRabin() + return new Rabin(compiled, avg, min, max, windowSize, polynomial) +} + +module.exports = { + Rabin, + create +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 83005: +======= +/***/ 91098: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +/** + * Rabin fingerprinting + * + * @class Rabin + */ +class Rabin { + /** + * Creates an instance of Rabin. + * @param { import("./../dist/rabin-wasm") } asModule + * @param {number} [bits=12] + * @param {number} [min=8 * 1024] + * @param {number} [max=32 * 1024] + * @param {number} polynomial + * @memberof Rabin + */ + constructor(asModule, bits = 12, min = 8 * 1024, max = 32 * 1024, windowSize = 64, polynomial) { + this.bits = bits + this.min = min + this.max = max + this.asModule = asModule + this.rabin = new asModule.Rabin(bits, min, max, windowSize, polynomial) + this.polynomial = polynomial + } + + /** + * Fingerprints the buffer + * + * @param {Uint8Array} buf + * @returns {Array} + * @memberof Rabin + */ + fingerprint(buf) { + const { + __retain, + __release, + __allocArray, + __getInt32Array, + Int32Array_ID, + Uint8Array_ID + } = this.asModule + + const lengths = new Int32Array(Math.ceil(buf.length/this.min)) + const lengthsPtr = __retain(__allocArray(Int32Array_ID, lengths)) + const pointer = __retain(__allocArray(Uint8Array_ID, buf)) + + const out = this.rabin.fingerprint(pointer, lengthsPtr) + const processed = __getInt32Array(out) + + __release(pointer) + __release(lengthsPtr) + + const end = processed.indexOf(0); + return end >= 0 ? processed.subarray(0, end) : processed; + } +} + +module.exports = Rabin + +/***/ }), + +<<<<<<< HEAD +/***/ 95944: +======= +/***/ 25213: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable node/no-deprecated-api */ + + + +var buffer = __nccwpck_require__(14300) +var Buffer = buffer.Buffer + +var safer = {} + +var key + +for (key in buffer) { + if (!buffer.hasOwnProperty(key)) continue + if (key === 'SlowBuffer' || key === 'Buffer') continue + safer[key] = buffer[key] +} + +var Safer = safer.Buffer = {} +for (key in Buffer) { + if (!Buffer.hasOwnProperty(key)) continue + if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue + Safer[key] = Buffer[key] +} + +safer.Buffer.prototype = Buffer.prototype + +if (!Safer.from || Safer.from === Uint8Array.from) { + Safer.from = function (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) + } + if (value && typeof value.length === 'undefined') { + throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) + } + return Buffer(value, encodingOrOffset, length) + } +} + +if (!Safer.alloc) { + Safer.alloc = function (size, fill, encoding) { + if (typeof size !== 'number') { + throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) + } + if (size < 0 || size >= 2 * (1 << 30)) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } + var buf = Buffer(size) + if (!fill || fill.length === 0) { + buf.fill(0) + } else if (typeof encoding === 'string') { + buf.fill(fill, encoding) + } else { + buf.fill(fill) + } + return buf + } +} + +if (!safer.kStringMaxLength) { + try { + safer.kStringMaxLength = process.binding('buffer').kStringMaxLength + } catch (e) { + // we can't determine kStringMaxLength in environments where process.binding + // is unsupported, so let's not set it + } +} + +if (!safer.constants) { + safer.constants = { + MAX_LENGTH: safer.kMaxLength + } + if (safer.kStringMaxLength) { + safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength + } +} + +module.exports = safer + + +/***/ }), + +<<<<<<< HEAD +/***/ 59969: +======= +/***/ 447: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + + + +// JS treats subjects of bitwise operators as SIGNED 32 bit numbers, +// which means the maximum amount of bits we can store inside each byte +// is 7.. +const BITS_PER_BYTE = 7 + +module.exports = class SparseArray { + constructor () { + this._bitArrays = [] + this._data = [] + this._length = 0 + this._changedLength = false + this._changedData = false + } + + set (index, value) { + let pos = this._internalPositionFor(index, false) + if (value === undefined) { + // unsetting + if (pos !== -1) { + // remove item from bit array and array itself + this._unsetInternalPos(pos) + this._unsetBit(index) + this._changedLength = true + this._changedData = true + } + } else { + let needsSort = false + if (pos === -1) { + pos = this._data.length + this._setBit(index) + this._changedData = true + } else { + needsSort = true + } + this._setInternalPos(pos, index, value, needsSort) + this._changedLength = true + } + } + + unset (index) { + this.set(index, undefined) + } + + get (index) { + this._sortData() + const pos = this._internalPositionFor(index, true) + if (pos === -1) { + return undefined + } + return this._data[pos][1] + } + + push (value) { + this.set(this.length, value) + return this.length + } + + get length () { + this._sortData() + if (this._changedLength) { + const last = this._data[this._data.length - 1] + this._length = last ? last[0] + 1 : 0 + this._changedLength = false + } + return this._length + } + + forEach (iterator) { + let i = 0 + while(i < this.length) { + iterator(this.get(i), i, this) + i++ + } + } + + map (iterator) { + let i = 0 + let mapped = new Array(this.length) + while(i < this.length) { + mapped[i] = iterator(this.get(i), i, this) + i++ + } + return mapped + } + + reduce (reducer, initialValue) { + let i = 0 + let acc = initialValue + while(i < this.length) { + const value = this.get(i) + acc = reducer(acc, value, i) + i++ + } + return acc + } + + find (finder) { + let i = 0, found, last + while ((i < this.length) && !found) { + last = this.get(i) + found = finder(last) + i++ + } + return found ? last : undefined + } + + _internalPositionFor (index, noCreate) { + const bytePos = this._bytePosFor(index, noCreate) + if (bytePos >= this._bitArrays.length) { + return -1 + } + const byte = this._bitArrays[bytePos] + const bitPos = index - bytePos * BITS_PER_BYTE + const exists = (byte & (1 << bitPos)) > 0 + if (!exists) { + return -1 + } + const previousPopCount = this._bitArrays.slice(0, bytePos).reduce(popCountReduce, 0) + + const mask = ~(0xffffffff << (bitPos + 1)) + const bytePopCount = popCount(byte & mask) + const arrayPos = previousPopCount + bytePopCount - 1 + return arrayPos + } + + _bytePosFor (index, noCreate) { + const bytePos = Math.floor(index / BITS_PER_BYTE) + const targetLength = bytePos + 1 + while (!noCreate && this._bitArrays.length < targetLength) { + this._bitArrays.push(0) + } + return bytePos + } + + _setBit (index) { + const bytePos = this._bytePosFor(index, false) + this._bitArrays[bytePos] |= (1 << (index - (bytePos * BITS_PER_BYTE))) + } + + _unsetBit(index) { + const bytePos = this._bytePosFor(index, false) + this._bitArrays[bytePos] &= ~(1 << (index - (bytePos * BITS_PER_BYTE))) + } + + _setInternalPos(pos, index, value, needsSort) { + const data =this._data + const elem = [index, value] + if (needsSort) { + this._sortData() + data[pos] = elem + } else { + // new element. just shove it into the array + // but be nice about where we shove it + // in order to make sorting it later easier + if (data.length) { + if (data[data.length - 1][0] >= index) { + data.push(elem) + } else if (data[0][0] <= index) { + data.unshift(elem) + } else { + const randomIndex = Math.round(data.length / 2) + this._data = data.slice(0, randomIndex).concat(elem).concat(data.slice(randomIndex)) + } + } else { + this._data.push(elem) + } + this._changedData = true + this._changedLength = true + } + } + + _unsetInternalPos (pos) { + this._data.splice(pos, 1) + } + + _sortData () { + if (this._changedData) { + this._data.sort(sortInternal) + } + + this._changedData = false + } + + bitField () { + const bytes = [] + let pendingBitsForResultingByte = 8 + let pendingBitsForNewByte = 0 + let resultingByte = 0 + let newByte + const pending = this._bitArrays.slice() + while (pending.length || pendingBitsForNewByte) { + if (pendingBitsForNewByte === 0) { + newByte = pending.shift() + pendingBitsForNewByte = 7 + } + + const usingBits = Math.min(pendingBitsForNewByte, pendingBitsForResultingByte) + const mask = ~(0b11111111 << usingBits) + const masked = newByte & mask + resultingByte |= masked << (8 - pendingBitsForResultingByte) + newByte = newByte >>> usingBits + pendingBitsForNewByte -= usingBits + pendingBitsForResultingByte -= usingBits + + if (!pendingBitsForResultingByte || (!pendingBitsForNewByte && !pending.length)) { + bytes.push(resultingByte) + resultingByte = 0 + pendingBitsForResultingByte = 8 + } + } + + // remove trailing zeroes + for(var i = bytes.length - 1; i > 0; i--) { + const value = bytes[i] + if (value === 0) { + bytes.pop() + } else { + break + } + } + + return bytes + } + + compactArray () { + this._sortData() + return this._data.map(valueOnly) + } +} + +function popCountReduce (count, byte) { + return count + popCount(byte) +} + +function popCount(_v) { + let v = _v + v = v - ((v >> 1) & 0x55555555) // reuse input as temporary + v = (v & 0x33333333) + ((v >> 2) & 0x33333333) // temp + return ((v + (v >> 4) & 0xF0F0F0F) * 0x1010101) >> 24 +} + +function sortInternal (a, b) { + return a[0] - b[0] +} + +function valueOnly (elem) { + return elem[1] +} + +/***/ }), + +<<<<<<< HEAD +/***/ 6581: +======= +/***/ 79546: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +module.exports = readable => { + // Node.js stream + if (readable[Symbol.asyncIterator]) return readable + + // Browser ReadableStream + if (readable.getReader) { + return (async function * () { + const reader = readable.getReader() + + try { + while (true) { + const { done, value } = await reader.read() + if (done) return + yield value + } + } finally { + reader.releaseLock() + } + })() + } + + throw new Error('unknown stream') +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 88828: +/***/ ((module) => { + +const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/; +const numRegex = /^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/; +// const octRegex = /0x[a-z0-9]+/; +// const binRegex = /0x[a-z0-9]+/; + + +//polyfill +if (!Number.parseInt && window.parseInt) { + Number.parseInt = window.parseInt; +} +if (!Number.parseFloat && window.parseFloat) { + Number.parseFloat = window.parseFloat; +} + + +const consider = { + hex : true, + leadingZeros: true, + decimalPoint: "\.", + eNotation: true + //skipLike: /regex/ +}; + +function toNumber(str, options = {}){ + // const options = Object.assign({}, consider); + // if(opt.leadingZeros === false){ + // options.leadingZeros = false; + // }else if(opt.hex === false){ + // options.hex = false; + // } + + options = Object.assign({}, consider, options ); + if(!str || typeof str !== "string" ) return str; + + let trimmedStr = str.trim(); + // if(trimmedStr === "0.0") return 0; + // else if(trimmedStr === "+0.0") return 0; + // else if(trimmedStr === "-0.0") return -0; + + if(options.skipLike !== undefined && options.skipLike.test(trimmedStr)) return str; + else if (options.hex && hexRegex.test(trimmedStr)) { + return Number.parseInt(trimmedStr, 16); + // } else if (options.parseOct && octRegex.test(str)) { + // return Number.parseInt(val, 8); + // }else if (options.parseBin && binRegex.test(str)) { + // return Number.parseInt(val, 2); + }else{ + //separate negative sign, leading zeros, and rest number + const match = numRegex.exec(trimmedStr); + if(match){ + const sign = match[1]; + const leadingZeros = match[2]; + let numTrimmedByZeros = trimZeros(match[3]); //complete num without leading zeros + //trim ending zeros for floating number + + const eNotation = match[4] || match[6]; + if(!options.leadingZeros && leadingZeros.length > 0 && sign && trimmedStr[2] !== ".") return str; //-0123 + else if(!options.leadingZeros && leadingZeros.length > 0 && !sign && trimmedStr[1] !== ".") return str; //0123 + else{//no leading zeros or leading zeros are allowed + const num = Number(trimmedStr); + const numStr = "" + num; + if(numStr.search(/[eE]/) !== -1){ //given number is long and parsed to eNotation + if(options.eNotation) return num; + else return str; + }else if(eNotation){ //given number has enotation + if(options.eNotation) return num; + else return str; + }else if(trimmedStr.indexOf(".") !== -1){ //floating number + // const decimalPart = match[5].substr(1); + // const intPart = trimmedStr.substr(0,trimmedStr.indexOf(".")); + + + // const p = numStr.indexOf("."); + // const givenIntPart = numStr.substr(0,p); + // const givenDecPart = numStr.substr(p+1); + if(numStr === "0" && (numTrimmedByZeros === "") ) return num; //0.0 + else if(numStr === numTrimmedByZeros) return num; //0.456. 0.79000 + else if( sign && numStr === "-"+numTrimmedByZeros) return num; + else return str; + } + + if(leadingZeros){ + // if(numTrimmedByZeros === numStr){ + // if(options.leadingZeros) return num; + // else return str; + // }else return str; + if(numTrimmedByZeros === numStr) return num; + else if(sign+numTrimmedByZeros === numStr) return num; + else return str; + } + + if(trimmedStr === numStr) return num; + else if(trimmedStr === sign+numStr) return num; + // else{ + // //number with +/- sign + // trimmedStr.test(/[-+][0-9]); + + // } + return str; + } + // else if(!eNotation && trimmedStr && trimmedStr !== Number(trimmedStr) ) return str; + + }else{ //non-numeric string + return str; + } + } +} + +/** + * + * @param {string} numStr without leading zeros + * @returns + */ +function trimZeros(numStr){ + if(numStr && numStr.indexOf(".") !== -1){//float + numStr = numStr.replace(/0+$/, ""); //remove ending zeros + if(numStr === ".") numStr = "0"; + else if(numStr[0] === ".") numStr = "0"+numStr; + else if(numStr[numStr.length-1] === ".") numStr = numStr.substr(0,numStr.length-1); + return numStr; + } + return numStr; +} +module.exports = toNumber + + +/***/ }), + +/***/ 4147: +======= +/***/ 76463: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + +const os = __nccwpck_require__(22037); +<<<<<<< HEAD +const hasFlag = __nccwpck_require__(55392); +======= +const hasFlag = __nccwpck_require__(24099); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +const env = process.env; + +let forceColor; +if (hasFlag('no-color') || + hasFlag('no-colors') || + hasFlag('color=false')) { + forceColor = false; +} else if (hasFlag('color') || + hasFlag('colors') || + hasFlag('color=true') || + hasFlag('color=always')) { + forceColor = true; +} +if ('FORCE_COLOR' in env) { + forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; +} + +function translateLevel(level) { + if (level === 0) { + return false; + } + + return { + level, + hasBasic: true, + has256: level >= 2, + has16m: level >= 3 + }; +} + +function supportsColor(stream) { + if (forceColor === false) { + return 0; + } + + if (hasFlag('color=16m') || + hasFlag('color=full') || + hasFlag('color=truecolor')) { + return 3; + } + + if (hasFlag('color=256')) { + return 2; + } + + if (stream && !stream.isTTY && forceColor !== true) { + return 0; + } + + const min = forceColor ? 1 : 0; + + if (process.platform === 'win32') { + // Node.js 7.5.0 is the first version of Node.js to include a patch to + // libuv that enables 256 color output on Windows. Anything earlier and it + // won't work. However, here we target Node.js 8 at minimum as it is an LTS + // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows + // release that supports 256 colors. Windows 10 build 14931 is the first release + // that supports 16m/TrueColor. + const osRelease = os.release().split('.'); + if ( + Number(process.versions.node.split('.')[0]) >= 8 && + Number(osRelease[0]) >= 10 && + Number(osRelease[2]) >= 10586 + ) { + return Number(osRelease[2]) >= 14931 ? 3 : 2; + } + + return 1; + } + + if ('CI' in env) { + if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { + return 1; + } + + return min; + } + + if ('TEAMCITY_VERSION' in env) { + return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; + } + + if (env.COLORTERM === 'truecolor') { + return 3; + } + + if ('TERM_PROGRAM' in env) { + const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); + + switch (env.TERM_PROGRAM) { + case 'iTerm.app': + return version >= 3 ? 3 : 2; + case 'Apple_Terminal': + return 2; + // No default + } + } + + if (/-256(color)?$/i.test(env.TERM)) { + return 2; + } + + if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { + return 1; + } + + if ('COLORTERM' in env) { + return 1; + } + + if (env.TERM === 'dumb') { + return min; + } + + return min; +} + +function getSupportLevel(stream) { + const level = supportsColor(stream); + return translateLevel(level); +} + +module.exports = { + supportsColor: getSupportLevel, + stdout: getSupportLevel(process.stdout), + stderr: getSupportLevel(process.stderr) +}; + + +/***/ }), + +<<<<<<< HEAD +/***/ 62098: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(15451); +======= +/***/ 16563: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(63918); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/***/ }), + +<<<<<<< HEAD +/***/ 15451: +======= +/***/ 63918: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +var net = __nccwpck_require__(41808); +var tls = __nccwpck_require__(24404); +var http = __nccwpck_require__(13685); +var https = __nccwpck_require__(95687); +var events = __nccwpck_require__(82361); +var assert = __nccwpck_require__(39491); +var util = __nccwpck_require__(73837); + + +exports.httpOverHttp = httpOverHttp; +exports.httpsOverHttp = httpsOverHttp; +exports.httpOverHttps = httpOverHttps; +exports.httpsOverHttps = httpsOverHttps; + + +function httpOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + return agent; +} + +function httpsOverHttp(options) { + var agent = new TunnelingAgent(options); + agent.request = http.request; + agent.createSocket = createSecureSocket; + agent.defaultPort = 443; + return agent; +} + +function httpOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.request; + return agent; +} + +function httpsOverHttps(options) { + var agent = new TunnelingAgent(options); + agent.request = https.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.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) { + // Detect the request to connect same origin server, + // reuse the connection. + self.requests.splice(i, 1); + pending.request.onSocket(socket); + return; + } + } + socket.destroy(); + self.removeSocket(socket); + }); +} +util.inherits(TunnelingAgent, events.EventEmitter); + +TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { + var self = this; + var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); + + if (self.sockets.length >= this.maxSockets) { + // We are over limit so we'll add it to the queue. + self.requests.push(options); + return; + } + + // If we are under maxSockets create a new one. + 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; // for v0.6 + connectReq.once('response', onResponse); // for v0.6 + connectReq.once('upgrade', onUpgrade); // for v0.6 + connectReq.once('connect', onConnect); // for v0.7 or later + connectReq.once('error', onError); + connectReq.end(); + + function onResponse(res) { + // Very hacky. This is necessary to avoid http-parser leaks. + res.upgrade = true; + } + + function onUpgrade(res, socket, head) { + // Hacky. + 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 = 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 = 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 = 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) { + // If we have pending requests and a socket gets closed a new one + // needs to be created to take over in the pool for the one that closed. + 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: socket, + servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host + }); + + // 0 is dummy port for v0.6 + var secureSocket = tls.connect(0, tlsOptions); + self.sockets[self.sockets.indexOf(socket)] = secureSocket; + cb(secureSocket); + }); +} + + +function toOptions(host, port, localAddress) { + if (typeof host === 'string') { // since v0.10 + return { + host: host, + port: port, + localAddress: localAddress + }; + } + return host; // for v0.11 or later +} + +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] !== undefined) { + 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; // for test + + +/***/ }), + +<<<<<<< HEAD +/***/ 64010: +======= +/***/ 17225: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function concat(arrays, length) { + if (!length) { + length = arrays.reduce((acc, curr) => acc + curr.length, 0); + } + const output = new Uint8Array(length); + let offset = 0; + for (const arr of arrays) { + output.set(arr, offset); + offset += arr.length; + } + return output; +} + +exports.concat = concat; + + +/***/ }), + +<<<<<<< HEAD +/***/ 12667: +======= +/***/ 94646: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function equals(a, b) { + if (a === b) { + return true; + } + if (a.byteLength !== b.byteLength) { + return false; + } + for (let i = 0; i < a.byteLength; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; +} + +exports.equals = equals; + + +/***/ }), + +<<<<<<< HEAD +/***/ 31277: +======= +/***/ 39451: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var bases = __nccwpck_require__(4710); +======= +var bases = __nccwpck_require__(91476); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function fromString(string, encoding = 'utf8') { + const base = bases[encoding]; + if (!base) { + throw new Error(`Unsupported encoding "${ encoding }"`); + } + return base.decoder.decode(`${ base.prefix }${ string }`); +} + +exports.fromString = fromString; + + +/***/ }), + +<<<<<<< HEAD +/***/ 34163: +======= +/***/ 2771: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +<<<<<<< HEAD +var bases = __nccwpck_require__(4710); +======= +var bases = __nccwpck_require__(91476); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function toString(array, encoding = 'utf8') { + const base = bases[encoding]; + if (!base) { + throw new Error(`Unsupported encoding "${ encoding }"`); + } + return base.encoder.encode(array).substring(1); +} + +exports.toString = toString; + + +/***/ }), + +<<<<<<< HEAD +/***/ 4710: +======= +/***/ 91476: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +<<<<<<< HEAD +var basics = __nccwpck_require__(22965); +======= +var basics = __nccwpck_require__(42916); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function createCodec(name, prefix, encode, decode) { + return { + name, + prefix, + encoder: { + name, + prefix, + encode + }, + decoder: { decode } + }; +} +const string = createCodec('utf8', 'u', buf => { + const decoder = new TextDecoder('utf8'); + return 'u' + decoder.decode(buf); +}, str => { + const encoder = new TextEncoder(); + return encoder.encode(str.substring(1)); +}); +const ascii = createCodec('ascii', 'a', buf => { + let string = 'a'; + for (let i = 0; i < buf.length; i++) { + string += String.fromCharCode(buf[i]); + } + return string; +}, str => { + str = str.substring(1); + const buf = new Uint8Array(str.length); + for (let i = 0; i < str.length; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}); +const BASES = { + utf8: string, + 'utf-8': string, + hex: basics.bases.base16, + latin1: ascii, + ascii: ascii, + binary: ascii, + ...basics.bases +}; + +module.exports = BASES; + + +/***/ }), + +<<<<<<< HEAD +/***/ 40992: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const Client = __nccwpck_require__(52463) +const Dispatcher = __nccwpck_require__(73272) +const errors = __nccwpck_require__(46339) +const Pool = __nccwpck_require__(85186) +const BalancedPool = __nccwpck_require__(8926) +const Agent = __nccwpck_require__(97464) +const util = __nccwpck_require__(67468) +const { InvalidArgumentError } = errors +const api = __nccwpck_require__(69938) +const buildConnector = __nccwpck_require__(2209) +const MockClient = __nccwpck_require__(52905) +const MockAgent = __nccwpck_require__(21627) +const MockPool = __nccwpck_require__(28511) +const mockErrors = __nccwpck_require__(31816) +const ProxyAgent = __nccwpck_require__(44417) +const RetryHandler = __nccwpck_require__(74989) +const { getGlobalDispatcher, setGlobalDispatcher } = __nccwpck_require__(29102) +const DecoratorHandler = __nccwpck_require__(68640) +const RedirectHandler = __nccwpck_require__(59660) +const createRedirectInterceptor = __nccwpck_require__(72509) + +let hasCrypto +try { + __nccwpck_require__(6113) + 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 = 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 + +if (util.nodeMajor > 16 || (util.nodeMajor === 16 && util.nodeMinor >= 8)) { + let fetchImpl = null + module.exports.fetch = async function fetch (resource) { + if (!fetchImpl) { + fetchImpl = (__nccwpck_require__(72748).fetch) + } + + try { + return await fetchImpl(...arguments) + } catch (err) { + if (typeof err === 'object') { + Error.captureStackTrace(err, this) + } + + throw err + } + } + module.exports.Headers = __nccwpck_require__(23245).Headers + module.exports.Response = __nccwpck_require__(58846).Response + module.exports.Request = __nccwpck_require__(7288).Request + module.exports.FormData = __nccwpck_require__(12692).FormData + module.exports.File = __nccwpck_require__(96670).File + module.exports.FileReader = __nccwpck_require__(8317).FileReader + + const { setGlobalOrigin, getGlobalOrigin } = __nccwpck_require__(64110) + + module.exports.setGlobalOrigin = setGlobalOrigin + module.exports.getGlobalOrigin = getGlobalOrigin + + const { CacheStorage } = __nccwpck_require__(26419) + const { kConstruct } = __nccwpck_require__(69668) + + // Cache & CacheStorage are tightly coupled with fetch. Even if it may run + // in an older version of Node, it doesn't have any use without fetch. + module.exports.caches = new CacheStorage(kConstruct) +} + +if (util.nodeMajor >= 16) { + const { deleteCookie, getCookies, getSetCookies, setCookie } = __nccwpck_require__(15389) + + module.exports.deleteCookie = deleteCookie + module.exports.getCookies = getCookies + module.exports.getSetCookies = getSetCookies + module.exports.setCookie = setCookie + + const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(50096) + + module.exports.parseMIMEType = parseMIMEType + module.exports.serializeAMimeType = serializeAMimeType +} + +if (util.nodeMajor >= 18 && hasCrypto) { + const { WebSocket } = __nccwpck_require__(53726) + + module.exports.WebSocket = WebSocket +} + +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 + + +/***/ }), + +/***/ 97464: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { InvalidArgumentError } = __nccwpck_require__(46339) +const { kClients, kRunning, kClose, kDestroy, kDispatch, kInterceptors } = __nccwpck_require__(48039) +const DispatcherBase = __nccwpck_require__(32426) +const Pool = __nccwpck_require__(85186) +const Client = __nccwpck_require__(52463) +const util = __nccwpck_require__(67468) +const createRedirectInterceptor = __nccwpck_require__(72509) +const { WeakRef, FinalizationRegistry } = __nccwpck_require__(71744)() + +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 kFinalizer = Symbol('finalizer') +const kOptions = Symbol('options') + +function defaultFactory (origin, opts) { + return opts && opts.connections === 1 + ? new Client(origin, opts) + : new Pool(origin, opts) +} + +class Agent 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 && 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 } + : undefined + this[kMaxRedirections] = maxRedirections + this[kFactory] = factory + this[kClients] = new Map() + this[kFinalizer] = new FinalizationRegistry(/* istanbul ignore next: gc is undeterministic */ key => { + const ref = this[kClients].get(key) + if (ref !== undefined && ref.deref() === undefined) { + this[kClients].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].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('opts.origin must be a non-empty string or URL.') + } + + const ref = this[kClients].get(key) + + let dispatcher = ref ? ref.deref() : null + 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, new WeakRef(dispatcher)) + this[kFinalizer].register(dispatcher, key) + } + + return dispatcher.dispatch(opts, handler) + } + + async [kClose] () { + const closePromises = [] + for (const ref of this[kClients].values()) { + const client = ref.deref() + /* istanbul ignore else: gc is undeterministic */ + if (client) { + closePromises.push(client.close()) + } + } + + await Promise.all(closePromises) + } + + async [kDestroy] (err) { + const destroyPromises = [] + for (const ref of this[kClients].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 + + +/***/ }), + +/***/ 6242: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { addAbortListener } = __nccwpck_require__(67468) +const { RequestAbortedError } = __nccwpck_require__(46339) + +const kListener = Symbol('kListener') +const kSignal = Symbol('kSignal') + +function abort (self) { + if (self.abort) { + self.abort() + } else { + self.onError(new RequestAbortedError()) + } +} + +function addSignal (self, signal) { + 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 +} + + +/***/ }), + +/***/ 35473: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { AsyncResource } = __nccwpck_require__(50852) +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(46339) +const util = __nccwpck_require__(67468) +const { addSignal, removeSignal } = __nccwpck_require__(6242) + +class ConnectHandler 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.callback) { + throw new RequestAbortedError() + } + + 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 + // Indicates is an HTTP2Session + 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 === undefined) { + 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 + + +/***/ }), + +/***/ 81627: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { + Readable, + Duplex, + PassThrough +} = __nccwpck_require__(12781) +const { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError +} = __nccwpck_require__(46339) +const util = __nccwpck_require__(67468) +const { AsyncResource } = __nccwpck_require__(50852) +const { addSignal, removeSignal } = __nccwpck_require__(6242) +const assert = __nccwpck_require__(39491) + +const kResume = Symbol('resume') + +class PipelineRequest extends Readable { + 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) + } +} + +class PipelineResponse extends Readable { + constructor (resume) { + super({ autoDestroy: true }) + this[kResume] = resume + } + + _read () { + this[kResume]() + } + + _destroy (err, callback) { + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError() + } + + callback(err) + } +} + +class PipelineHandler extends AsyncResource { + 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 && 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 + + // Node < 15 does not call _final in same tick. + req.push(null) + }) + + this.res = null + + addSignal(this, signal) + } + + onConnect (abort, context) { + const { ret, res } = this + + assert(!res, 'pipeline cannot be retried') + + if (ret.destroyed) { + throw new RequestAbortedError() + } + + 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 + + +/***/ }), + +/***/ 66945: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const Readable = __nccwpck_require__(7601) +const { + InvalidArgumentError, + RequestAbortedError +} = __nccwpck_require__(46339) +const util = __nccwpck_require__(67468) +const { getResolveErrorBodyCallback } = __nccwpck_require__(2977) +const { AsyncResource } = __nccwpck_require__(50852) +const { addSignal, removeSignal } = __nccwpck_require__(6242) + +class RequestHandler extends AsyncResource { + 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.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.isStream(body)) { + body.on('error', (err) => { + this.onError(err) + }) + } + + addSignal(this, signal) + } + + onConnect (abort, context) { + if (!this.callback) { + throw new RequestAbortedError() + } + + 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 body = new Readable({ resume, abort, contentType, highWaterMark }) + + this.callback = null + this.res = body + if (callback !== null) { + if (this.throwOnError && statusCode >= 400) { + this.runInAsyncScope(getResolveErrorBodyCallback, 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(this) + + util.parseHeaders(trailers, this.trailers) + + res.push(null) + } + + onError (err) { + const { res, callback, body, opaque } = this + + removeSignal(this) + + if (callback) { + // TODO: Does this need queueMicrotask? + this.callback = null + queueMicrotask(() => { + this.runInAsyncScope(callback, null, err, { opaque }) + }) + } + + if (res) { + this.res = null + // Ensure all queued handlers are invoked before destroying res. + queueMicrotask(() => { + util.destroy(res, err) + }) + } + + if (body) { + this.body = null + util.destroy(body, err) + } + } +} + +function request (opts, callback) { + if (callback === undefined) { + 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 + + +/***/ }), + +/***/ 42849: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { finished, PassThrough } = __nccwpck_require__(12781) +const { + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError +} = __nccwpck_require__(46339) +const util = __nccwpck_require__(67468) +const { getResolveErrorBodyCallback } = __nccwpck_require__(2977) +const { AsyncResource } = __nccwpck_require__(50852) +const { addSignal, removeSignal } = __nccwpck_require__(6242) + +class StreamHandler extends AsyncResource { + 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.callback) { + throw new RequestAbortedError() + } + + 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 parsedHeaders = responseHeaders === 'raw' ? util.parseHeaders(rawHeaders) : headers + const contentType = parsedHeaders['content-type'] + res = new PassThrough() + + 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') + } + + // TODO: Avoid finished. It registers an unnecessary amount of listeners. + finished(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 + + const needDrain = res.writableNeedDrain !== undefined + ? 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(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 === undefined) { + 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 + + +/***/ }), + +/***/ 8882: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { InvalidArgumentError, RequestAbortedError, SocketError } = __nccwpck_require__(46339) +const { AsyncResource } = __nccwpck_require__(50852) +const util = __nccwpck_require__(67468) +const { addSignal, removeSignal } = __nccwpck_require__(6242) +const assert = __nccwpck_require__(39491) + +class UpgradeHandler 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_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.callback) { + throw new RequestAbortedError() + } + + this.abort = abort + this.context = null + } + + onHeaders () { + throw new SocketError('bad upgrade', null) + } + + onUpgrade (statusCode, rawHeaders, socket) { + const { callback, opaque, context } = this + + assert.strictEqual(statusCode, 101) + + 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 === undefined) { + 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 + + +/***/ }), + +/***/ 69938: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +module.exports.request = __nccwpck_require__(66945) +module.exports.stream = __nccwpck_require__(42849) +module.exports.pipeline = __nccwpck_require__(81627) +module.exports.upgrade = __nccwpck_require__(8882) +module.exports.connect = __nccwpck_require__(35473) + + +/***/ }), + +/***/ 7601: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// Ported from https://github.com/nodejs/undici/pull/907 + + + +const assert = __nccwpck_require__(39491) +const { Readable } = __nccwpck_require__(12781) +const { RequestAbortedError, NotSupportedError, InvalidArgumentError } = __nccwpck_require__(46339) +const util = __nccwpck_require__(67468) +const { ReadableStreamFrom, toUSVString } = __nccwpck_require__(67468) + +let Blob + +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 { + constructor ({ + resume, + abort, + contentType = '', + highWaterMark = 64 * 1024 // Same as nodejs fs streams. + }) { + super({ + autoDestroy: true, + read: resume, + highWaterMark + }) + + this._readableState.dataEmitted = false + + this[kAbort] = abort + this[kConsume] = null + this[kBody] = null + this[kContentType] = contentType + + // Is stream being consumed through Readable API? + // This is an optimization so that we avoid checking + // for 'data' and 'readable' listeners in the hot path + // inside push(). + this[kReading] = false + } + + destroy (err) { + if (this.destroyed) { + // Node < 16 + return this + } + + if (!err && !this._readableState.endEmitted) { + err = new RequestAbortedError() + } + + if (err) { + this[kAbort]() + } + + return super.destroy(err) + } + + emit (ev, ...args) { + if (ev === 'data') { + // Node < 16.7 + this._readableState.dataEmitted = true + } else if (ev === 'error') { + // Node < 16 + 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) + } + + // https://fetch.spec.whatwg.org/#dom-body-text + async text () { + return consume(this, 'text') + } + + // https://fetch.spec.whatwg.org/#dom-body-json + async json () { + return consume(this, 'json') + } + + // https://fetch.spec.whatwg.org/#dom-body-blob + async blob () { + return consume(this, 'blob') + } + + // https://fetch.spec.whatwg.org/#dom-body-arraybuffer + async arrayBuffer () { + return consume(this, 'arrayBuffer') + } + + // https://fetch.spec.whatwg.org/#dom-body-formdata + async formData () { + // TODO: Implement. + throw new NotSupportedError() + } + + // https://fetch.spec.whatwg.org/#dom-body-bodyused + get bodyUsed () { + return util.isDisturbed(this) + } + + // https://fetch.spec.whatwg.org/#dom-body-body + get body () { + if (!this[kBody]) { + this[kBody] = ReadableStreamFrom(this) + if (this[kConsume]) { + // TODO: Is this the best way to force a lock? + this[kBody].getReader() // Ensure stream is locked. + assert(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('signal must be an AbortSignal') + } + util.throwIfAborted(signal) + } catch (err) { + return Promise.reject(err) + } + } + + if (this.closed) { + return Promise.resolve(null) + } + + return new Promise((resolve, reject) => { + const signalListenerCleanup = signal + ? util.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() + }) + } +} + +// https://streams.spec.whatwg.org/#readablestream-locked +function isLocked (self) { + // Consume is an implicit lock. + return (self[kBody] && self[kBody].locked === true) || self[kConsume] +} + +// https://fetch.spec.whatwg.org/#body-unusable +function isUnusable (self) { + return util.isDisturbed(self) || isLocked(self) +} + +async function consume (stream, type) { + if (isUnusable(stream)) { + throw new TypeError('unusable') + } + + assert(!stream[kConsume]) + + return new Promise((resolve, reject) => { + 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()) + } + }) + + process.nextTick(consumeStart, stream[kConsume]) + }) +} + +function consumeStart (consume) { + if (consume.body === null) { + return + } + + const { _readableState: state } = consume.stream + + 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) { + // Loop + } +} + +function consumeEnd (consume) { + const { type, body, resolve, stream, length } = consume + + try { + if (type === 'text') { + resolve(toUSVString(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) { + Blob = (__nccwpck_require__(14300).Blob) + } + resolve(new Blob(body, { type: stream[kContentType] })) + } + + 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 +} + + +/***/ }), + +/***/ 2977: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const assert = __nccwpck_require__(39491) +const { + ResponseStatusCodeError +} = __nccwpck_require__(46339) +const { toUSVString } = __nccwpck_require__(67468) + +async function getResolveErrorBodyCallback ({ callback, body, contentType, statusCode, statusMessage, headers }) { + assert(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 in a fallback if error + } + + process.nextTick(callback, new ResponseStatusCodeError(`Response status code ${statusCode}${statusMessage ? `: ${statusMessage}` : ''}`, statusCode, headers)) +} + +module.exports = { getResolveErrorBodyCallback } + + +/***/ }), + +/***/ 8926: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { + BalancedPoolMissingUpstreamError, + InvalidArgumentError +} = __nccwpck_require__(46339) +const { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kRemoveClient, + kGetDispatcher +} = __nccwpck_require__(68504) +const Pool = __nccwpck_require__(85186) +const { kUrl, kInterceptors } = __nccwpck_require__(48039) +const { parseOrigin } = __nccwpck_require__(67468) +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') + +function getGreatestCommonDivisor (a, b) { + if (b === 0) return a + return getGreatestCommonDivisor(b, a % b) +} + +function defaultFactory (origin, opts) { + return new Pool(origin, opts) +} + +class BalancedPool 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 && 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') { + // decrease the weight of the pool. + 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 () { + this[kGreatestCommonDivisor] = this[kClients].map(p => p[kWeight]).reduce(getGreatestCommonDivisor, 0) + } + + 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] () { + // We validate that pools is greater than 0, + // otherwise we would have to wait until an upstream + // is added, which might never happen. + if (this[kClients].length === 0) { + throw new BalancedPoolMissingUpstreamError() + } + + const dispatcher = this[kClients].find(dispatcher => ( + !dispatcher[kNeedDrain] && + dispatcher.closed !== true && + dispatcher.destroyed !== true + )) + + if (!dispatcher) { + return + } + + const allClientsBusy = this[kClients].map(pool => pool[kNeedDrain]).reduce((a, b) => a && b, true) + + if (allClientsBusy) { + 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]] + + // find pool index with the largest weight + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { + maxWeightIndex = this[kIndex] + } + + // decrease the current weight every `this[kClients].length`. + if (this[kIndex] === 0) { + // Set the current weight to the next lower weight. + 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 + + +/***/ }), + +/***/ 10468: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { kConstruct } = __nccwpck_require__(69668) +const { urlEquals, fieldValues: getFieldValues } = __nccwpck_require__(12862) +const { kEnumerableProperty, isDisturbed } = __nccwpck_require__(67468) +const { kHeadersList } = __nccwpck_require__(48039) +const { webidl } = __nccwpck_require__(96138) +const { Response, cloneResponse } = __nccwpck_require__(58846) +const { Request } = __nccwpck_require__(7288) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(46938) +const { fetching } = __nccwpck_require__(72748) +const { urlIsHttpHttpsScheme, createDeferredPromise, readAllBytes } = __nccwpck_require__(79453) +const assert = __nccwpck_require__(39491) +const { getGlobalDispatcher } = __nccwpck_require__(29102) + +/** + * @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 + */ + +class Cache { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-request-response-list + * @type {requestResponseList} + */ + #relevantRequestResponseList + + constructor () { + if (arguments[0] !== kConstruct) { + webidl.illegalConstructor() + } + + this.#relevantRequestResponseList = arguments[1] + } + + async match (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.match' }) + + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + const p = await this.matchAll(request, options) + + if (p.length === 0) { + return + } + + return p[0] + } + + async matchAll (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) + + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + // 1. + let r = null + + // 2. + if (request !== undefined) { + if (request instanceof Request) { + // 2.1.1 + r = request[kState] + + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] + } + } else if (typeof request === 'string') { + // 2.2.1 + r = new Request(request)[kState] + } + } + + // 5. + // 5.1 + const responses = [] + + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + responses.push(requestResponse[1]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) + + // 5.3.2 + for (const requestResponse of requestResponses) { + responses.push(requestResponse[1]) + } + } + + // 5.4 + // We don't implement CORs so we don't need to loop over the responses, yay! + + // 5.5.1 + const responseList = [] + + // 5.5.2 + for (const response of responses) { + // 5.5.2.1 + const responseObject = new Response(response.body?.source ?? null) + const body = responseObject[kState].body + responseObject[kState] = response + responseObject[kState].body = body + responseObject[kHeaders][kHeadersList] = response.headersList + responseObject[kHeaders][kGuard] = 'immutable' + + responseList.push(responseObject) + } + + // 6. + return Object.freeze(responseList) + } + + async add (request) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.add' }) + + request = webidl.converters.RequestInfo(request) + + // 1. + const requests = [request] + + // 2. + const responseArrayPromise = this.addAll(requests) + + // 3. + return await responseArrayPromise + } + + async addAll (requests) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.addAll' }) + + requests = webidl.converters['sequence'](requests) + + // 1. + const responsePromises = [] + + // 2. + const requestList = [] + + // 3. + for (const request of requests) { + if (typeof request === 'string') { + continue + } + + // 3.1 + const r = request[kState] + + // 3.2 + if (!urlIsHttpHttpsScheme(r.url) || r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme when method is not GET.' + }) + } + } + + // 4. + /** @type {ReturnType[]} */ + const fetchControllers = [] + + // 5. + for (const request of requests) { + // 5.1 + const r = new Request(request)[kState] + + // 5.2 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.addAll', + message: 'Expected http/s scheme.' + }) + } + + // 5.4 + r.initiator = 'fetch' + r.destination = 'subresource' + + // 5.5 + requestList.push(r) + + // 5.6 + const responsePromise = createDeferredPromise() + + // 5.7 + fetchControllers.push(fetching({ + request: r, + dispatcher: getGlobalDispatcher(), + processResponse (response) { + // 1. + 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')) { // 2. + // 2.1 + const fieldValues = getFieldValues(response.headersList.get('vary')) + + // 2.2 + for (const fieldValue of fieldValues) { + // 2.2.1 + 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) { + // 1. + if (response.aborted) { + responsePromise.reject(new DOMException('aborted', 'AbortError')) + return + } + + // 2. + responsePromise.resolve(response) + } + })) + + // 5.8 + responsePromises.push(responsePromise.promise) + } + + // 6. + const p = Promise.all(responsePromises) + + // 7. + const responses = await p + + // 7.1 + const operations = [] + + // 7.2 + let index = 0 + + // 7.3 + for (const response of responses) { + // 7.3.1 + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 7.3.2 + request: requestList[index], // 7.3.3 + response // 7.3.4 + } + + operations.push(operation) // 7.3.5 + + index++ // 7.3.6 + } + + // 7.5 + const cacheJobPromise = createDeferredPromise() + + // 7.6.1 + let errorData = null + + // 7.6.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } + + // 7.6.3 + queueMicrotask(() => { + // 7.6.3.1 + if (errorData === null) { + cacheJobPromise.resolve(undefined) + } else { + // 7.6.3.2 + cacheJobPromise.reject(errorData) + } + }) + + // 7.7 + return cacheJobPromise.promise + } + + async put (request, response) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 2, { header: 'Cache.put' }) + + request = webidl.converters.RequestInfo(request) + response = webidl.converters.Response(response) + + // 1. + let innerRequest = null + + // 2. + if (request instanceof Request) { + innerRequest = request[kState] + } else { // 3. + innerRequest = new Request(request)[kState] + } + + // 4. + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Expected an http/s scheme when method is not GET' + }) + } + + // 5. + const innerResponse = response[kState] + + // 6. + if (innerResponse.status === 206) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got 206 status' + }) + } + + // 7. + if (innerResponse.headersList.contains('vary')) { + // 7.1. + const fieldValues = getFieldValues(innerResponse.headersList.get('vary')) + + // 7.2. + for (const fieldValue of fieldValues) { + // 7.2.1 + if (fieldValue === '*') { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Got * vary field value' + }) + } + } + } + + // 8. + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { + throw webidl.errors.exception({ + header: 'Cache.put', + message: 'Response body is locked or disturbed' + }) + } + + // 9. + const clonedResponse = cloneResponse(innerResponse) + + // 10. + const bodyReadPromise = createDeferredPromise() + + // 11. + if (innerResponse.body != null) { + // 11.1 + const stream = innerResponse.body.stream + + // 11.2 + const reader = stream.getReader() + + // 11.3 + readAllBytes(reader).then(bodyReadPromise.resolve, bodyReadPromise.reject) + } else { + bodyReadPromise.resolve(undefined) + } + + // 12. + /** @type {CacheBatchOperation[]} */ + const operations = [] + + // 13. + /** @type {CacheBatchOperation} */ + const operation = { + type: 'put', // 14. + request: innerRequest, // 15. + response: clonedResponse // 16. + } + + // 17. + operations.push(operation) + + // 19. + const bytes = await bodyReadPromise.promise + + if (clonedResponse.body != null) { + clonedResponse.body.source = bytes + } + + // 19.1 + const cacheJobPromise = createDeferredPromise() + + // 19.2.1 + let errorData = null + + // 19.2.2 + try { + this.#batchCacheOperations(operations) + } catch (e) { + errorData = e + } + + // 19.2.3 + queueMicrotask(() => { + // 19.2.3.1 + if (errorData === null) { + cacheJobPromise.resolve() + } else { // 19.2.3.2 + cacheJobPromise.reject(errorData) + } + }) + + return cacheJobPromise.promise + } + + async delete (request, options = {}) { + webidl.brandCheck(this, Cache) + webidl.argumentLengthCheck(arguments, 1, { header: 'Cache.delete' }) + + request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + /** + * @type {Request} + */ + let r = null + + if (request instanceof Request) { + r = request[kState] + + if (r.method !== 'GET' && !options.ignoreMethod) { + return false + } + } else { + assert(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 {readonly Request[]} + */ + async keys (request = undefined, options = {}) { + webidl.brandCheck(this, Cache) + + if (request !== undefined) request = webidl.converters.RequestInfo(request) + options = webidl.converters.CacheQueryOptions(options) + + // 1. + let r = null + + // 2. + if (request !== undefined) { + // 2.1 + if (request instanceof Request) { + // 2.1.1 + r = request[kState] + + // 2.1.2 + if (r.method !== 'GET' && !options.ignoreMethod) { + return [] + } + } else if (typeof request === 'string') { // 2.2 + r = new Request(request)[kState] + } + } + + // 4. + const promise = createDeferredPromise() + + // 5. + // 5.1 + const requests = [] + + // 5.2 + if (request === undefined) { + // 5.2.1 + for (const requestResponse of this.#relevantRequestResponseList) { + // 5.2.1.1 + requests.push(requestResponse[0]) + } + } else { // 5.3 + // 5.3.1 + const requestResponses = this.#queryCache(r, options) + + // 5.3.2 + for (const requestResponse of requestResponses) { + // 5.3.2.1 + requests.push(requestResponse[0]) + } + } + + // 5.4 + queueMicrotask(() => { + // 5.4.1 + const requestList = [] + + // 5.4.2 + for (const request of requests) { + const requestObject = new Request('https://a') + requestObject[kState] = request + requestObject[kHeaders][kHeadersList] = request.headersList + requestObject[kHeaders][kGuard] = 'immutable' + requestObject[kRealm] = request.client + + // 5.4.2.1 + requestList.push(requestObject) + } + + // 5.4.3 + 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) { + // 1. + const cache = this.#relevantRequestResponseList + + // 2. + const backupCache = [...cache] + + // 3. + const addedItems = [] + + // 4.1 + const resultList = [] + + try { + // 4.2 + for (const operation of operations) { + // 4.2.1 + if (operation.type !== 'delete' && operation.type !== 'put') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'operation type does not match "delete" or "put"' + }) + } + + // 4.2.2 + if (operation.type === 'delete' && operation.response != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'delete operation should not have an associated response' + }) + } + + // 4.2.3 + if (this.#queryCache(operation.request, operation.options, addedItems).length) { + throw new DOMException('???', 'InvalidStateError') + } + + // 4.2.4 + let requestResponses + + // 4.2.5 + if (operation.type === 'delete') { + // 4.2.5.1 + requestResponses = this.#queryCache(operation.request, operation.options) + + // TODO: the spec is wrong, this is needed to pass WPTs + if (requestResponses.length === 0) { + return [] + } + + // 4.2.5.2 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) + + // 4.2.5.2.1 + cache.splice(idx, 1) + } + } else if (operation.type === 'put') { // 4.2.6 + // 4.2.6.1 + if (operation.response == null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'put operation should have an associated response' + }) + } + + // 4.2.6.2 + const r = operation.request + + // 4.2.6.3 + if (!urlIsHttpHttpsScheme(r.url)) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'expected http or https scheme' + }) + } + + // 4.2.6.4 + if (r.method !== 'GET') { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'not get method' + }) + } + + // 4.2.6.5 + if (operation.options != null) { + throw webidl.errors.exception({ + header: 'Cache.#batchCacheOperations', + message: 'options must not be defined' + }) + } + + // 4.2.6.6 + requestResponses = this.#queryCache(operation.request) + + // 4.2.6.7 + for (const requestResponse of requestResponses) { + const idx = cache.indexOf(requestResponse) + assert(idx !== -1) + + // 4.2.6.7.1 + cache.splice(idx, 1) + } + + // 4.2.6.8 + cache.push([operation.request, operation.response]) + + // 4.2.6.10 + addedItems.push([operation.request, operation.response]) + } + + // 4.2.7 + resultList.push([operation.request, operation.response]) + } + + // 4.3 + return resultList + } catch (e) { // 5. + // 5.1 + this.#relevantRequestResponseList.length = 0 + + // 5.2 + this.#relevantRequestResponseList = backupCache + + // 5.3 + 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) { + // if (options?.ignoreMethod === false && request.method === 'GET') { + // return false + // } + + 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 + } + + const requestValue = request.headersList.get(fieldValue) + const queryValue = requestQuery.headersList.get(fieldValue) + + // If one has the header and the other doesn't, or one has + // a different value than the other, return false + if (requestValue !== queryValue) { + return false + } + } + + return true + } +} + +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 +} + + +/***/ }), + +/***/ 26419: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { kConstruct } = __nccwpck_require__(69668) +const { Cache } = __nccwpck_require__(10468) +const { webidl } = __nccwpck_require__(96138) +const { kEnumerableProperty } = __nccwpck_require__(67468) + +class CacheStorage { + /** + * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map + * @type {Map} + */ + async has (cacheName) { + webidl.brandCheck(this, CacheStorage) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.has' }) + + cacheName = webidl.converters.DOMString(cacheName) + + // 2.1.1 + // 2.2 + 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) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.open' }) + + cacheName = webidl.converters.DOMString(cacheName) + + // 2.1 + if (this.#caches.has(cacheName)) { + // await caches.open('v1') !== await caches.open('v1') + + // 2.1.1 + const cache = this.#caches.get(cacheName) + + // 2.1.1.1 + return new Cache(kConstruct, cache) + } + + // 2.2 + const cache = [] + + // 2.3 + this.#caches.set(cacheName, cache) + + // 2.4 + 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) + webidl.argumentLengthCheck(arguments, 1, { header: 'CacheStorage.delete' }) + + cacheName = webidl.converters.DOMString(cacheName) + + return this.#caches.delete(cacheName) + } + + /** + * @see https://w3c.github.io/ServiceWorker/#cache-storage-keys + * @returns {string[]} + */ + async keys () { + webidl.brandCheck(this, CacheStorage) + + // 2.1 + const keys = this.#caches.keys() + + // 2.2 + return [...keys] + } +} + +Object.defineProperties(CacheStorage.prototype, { + [Symbol.toStringTag]: { + value: 'CacheStorage', + configurable: true + }, + match: kEnumerableProperty, + has: kEnumerableProperty, + open: kEnumerableProperty, + delete: kEnumerableProperty, + keys: kEnumerableProperty +}) + +module.exports = { + CacheStorage +} + + +/***/ }), + +/***/ 69668: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +module.exports = { + kConstruct: (__nccwpck_require__(48039).kConstruct) +} + + +/***/ }), + +/***/ 12862: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const assert = __nccwpck_require__(39491) +const { URLSerializer } = __nccwpck_require__(50096) +const { isValidHeaderName } = __nccwpck_require__(79453) + +/** + * @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) { + const serializedA = URLSerializer(A, excludeFragment) + + const serializedB = URLSerializer(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(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, + fieldValues +} + + +/***/ }), + +/***/ 52463: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// @ts-check + + + +/* global WebAssembly */ + +const assert = __nccwpck_require__(39491) +const net = __nccwpck_require__(41808) +const http = __nccwpck_require__(13685) +const { pipeline } = __nccwpck_require__(12781) +const util = __nccwpck_require__(67468) +const timers = __nccwpck_require__(38965) +const Request = __nccwpck_require__(38325) +const DispatcherBase = __nccwpck_require__(32426) +const { + RequestContentLengthMismatchError, + ResponseContentLengthMismatchError, + InvalidArgumentError, + RequestAbortedError, + HeadersTimeoutError, + HeadersOverflowError, + SocketError, + InformationalError, + BodyTimeoutError, + HTTPParserError, + ResponseExceededMaxSizeError, + ClientDestroyedError +} = __nccwpck_require__(46339) +const buildConnector = __nccwpck_require__(2209) +const { + kUrl, + kReset, + kServerName, + kClient, + kBusy, + kParser, + kConnect, + kBlocking, + kResuming, + kRunning, + kPending, + kSize, + kWriting, + kQueue, + kConnected, + kConnecting, + kNeedDrain, + kNoRef, + kKeepAliveDefaultTimeout, + kHostHeader, + kPendingIdx, + kRunningIdx, + kError, + kPipelining, + kSocket, + kKeepAliveTimeoutValue, + kMaxHeadersSize, + kKeepAliveMaxTimeout, + kKeepAliveTimeoutThreshold, + kHeadersTimeout, + kBodyTimeout, + kStrictContentLength, + kConnector, + kMaxRedirections, + kMaxRequests, + kCounter, + kClose, + kDestroy, + kDispatch, + kInterceptors, + kLocalAddress, + kMaxResponseSize, + kHTTPConnVersion, + // HTTP2 + kHost, + kHTTP2Session, + kHTTP2SessionState, + kHTTP2BuildRequest, + kHTTP2CopyHeaders, + kHTTP1BuildRequest +} = __nccwpck_require__(48039) + +/** @type {import('http2')} */ +let http2 +try { + http2 = __nccwpck_require__(85158) +} catch { + // @ts-ignore + 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 + +// Experimental +let h2ExperimentalWarned = false + +const FastBuffer = Buffer[Symbol.species] + +const kClosedResolve = Symbol('kClosedResolve') + +const channels = {} + +try { + const diagnosticsChannel = __nccwpck_require__(67643) + channels.sendHeaders = diagnosticsChannel.channel('undici:client:sendHeaders') + channels.beforeConnect = diagnosticsChannel.channel('undici:client:beforeConnect') + channels.connectError = diagnosticsChannel.channel('undici:client:connectError') + channels.connected = diagnosticsChannel.channel('undici:client:connected') +} catch { + channels.sendHeaders = { hasSubscribers: false } + channels.beforeConnect = { hasSubscribers: false } + channels.connectError = { hasSubscribers: false } + channels.connected = { hasSubscribers: false } +} + +/** + * @type {import('../types/client').default} + */ +class Client extends DispatcherBase { + /** + * + * @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, + strictContentLength, + maxCachedSessions, + maxRedirections, + connect, + maxRequestsPerClient, + localAddress, + maxResponseSize, + autoSelectFamily, + autoSelectFamilyAttemptTimeout, + // h2 + allowH2, + maxConcurrentStreams + } = {}) { + super() + + if (keepAlive !== undefined) { + throw new InvalidArgumentError('unsupported keepAlive, use pipelining=0 instead') + } + + if (socketTimeout !== undefined) { + throw new InvalidArgumentError('unsupported socketTimeout, use headersTimeout & bodyTimeout instead') + } + + if (requestTimeout !== undefined) { + throw new InvalidArgumentError('unsupported requestTimeout, use headersTimeout & bodyTimeout instead') + } + + if (idleTimeout !== undefined) { + throw new InvalidArgumentError('unsupported idleTimeout, use keepAliveTimeout instead') + } + + if (maxKeepAliveTimeout !== undefined) { + 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') + } + + // h2 + 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 possitive integer, greater than 0') + } + + if (typeof connect !== 'function') { + connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...connect + }) + } + + this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) + ? interceptors.Client + : [createRedirectInterceptor({ maxRedirections })] + this[kUrl] = util.parseOrigin(url) + this[kConnector] = connect + this[kSocket] = null + this[kPipelining] = pipelining != null ? pipelining : 1 + this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize + this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout + this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout + this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold + this[kKeepAliveTimeoutValue] = this[kKeepAliveDefaultTimeout] + this[kServerName] = null + this[kLocalAddress] = localAddress != null ? localAddress : null + this[kResuming] = 0 // 0, idle, 1, scheduled, 2 resuming + this[kNeedDrain] = 0 // 0, idle, 1, scheduled, 2 resuming + this[kHostHeader] = `host: ${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}\r\n` + this[kBodyTimeout] = bodyTimeout != null ? bodyTimeout : 300e3 + this[kHeadersTimeout] = headersTimeout != null ? headersTimeout : 300e3 + this[kStrictContentLength] = strictContentLength == null ? true : strictContentLength + this[kMaxRedirections] = maxRedirections + this[kMaxRequests] = maxRequestsPerClient + this[kClosedResolve] = null + this[kMaxResponseSize] = maxResponseSize > -1 ? maxResponseSize : -1 + this[kHTTPConnVersion] = 'h1' + + // HTTP/2 + this[kHTTP2Session] = null + this[kHTTP2SessionState] = !allowH2 + ? null + : { + // streams: null, // Fixed queue of streams - For future support of `push` + openStreams: 0, // Keep track of them to decide wether or not unref the session + maxConcurrentStreams: maxConcurrentStreams != null ? maxConcurrentStreams : 100 // Max peerConcurrentStreams for a Node h2 server + } + this[kHost] = `${this[kUrl].hostname}${this[kUrl].port ? `:${this[kUrl].port}` : ''}` + + // kQueue is built up of 3 sections separated by + // the kRunningIdx and kPendingIdx indices. + // | complete | running | pending | + // ^ kRunningIdx ^ kPendingIdx ^ kQueue.length + // kRunningIdx points to the first running element. + // kPendingIdx points to the first pending element. + // This implements a fast queue with an amortized + // time of O(1). + + this[kQueue] = [] + this[kRunningIdx] = 0 + this[kPendingIdx] = 0 + } + + get pipelining () { + return this[kPipelining] + } + + set pipelining (value) { + this[kPipelining] = value + resume(this, 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[kSocket] && !this[kConnecting] && !this[kSocket].destroyed + } + + get [kBusy] () { + const socket = this[kSocket] + return ( + (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) || + (this[kSize] >= (this[kPipelining] || 1)) || + this[kPending] > 0 + ) + } + + /* istanbul ignore: only used for test */ + [kConnect] (cb) { + connect(this) + this.once('connect', cb) + } + + [kDispatch] (opts, handler) { + const origin = opts.origin || this[kUrl].origin + + const request = this[kHTTPConnVersion] === 'h2' + ? Request[kHTTP2BuildRequest](origin, opts, handler) + : Request[kHTTP1BuildRequest](origin, opts, handler) + + this[kQueue].push(request) + if (this[kResuming]) { + // Do nothing. + } else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { + // Wait a tick in case stream/iterator is ended in the same tick. + this[kResuming] = 1 + process.nextTick(resume, this) + } else { + resume(this, true) + } + + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { + this[kNeedDrain] = 2 + } + + return this[kNeedDrain] < 2 + } + + async [kClose] () { + // TODO: for H2 we need to gracefully flush the remaining enqueued + // request and close each stream. + return new Promise((resolve) => { + if (!this[kSize]) { + resolve(null) + } else { + this[kClosedResolve] = resolve + } + }) + } + + 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] + errorRequest(this, request, err) + } + + const callback = () => { + if (this[kClosedResolve]) { + // TODO (fix): Should we error here with ClientDestroyedError? + this[kClosedResolve]() + this[kClosedResolve] = null + } + resolve() + } + + if (this[kHTTP2Session] != null) { + util.destroy(this[kHTTP2Session], err) + this[kHTTP2Session] = null + this[kHTTP2SessionState] = null + } + + if (!this[kSocket]) { + queueMicrotask(callback) + } else { + util.destroy(this[kSocket].on('close', callback), err) + } + + resume(this) + }) + } +} + +function onHttp2SessionError (err) { + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + + this[kSocket][kError] = err + + onError(this[kClient], err) +} + +function onHttp2FrameError (type, code, id) { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) + + if (id === 0) { + this[kSocket][kError] = err + onError(this[kClient], err) + } +} + +function onHttp2SessionEnd () { + util.destroy(this, new SocketError('other side closed')) + util.destroy(this[kSocket], new SocketError('other side closed')) +} + +function onHTTP2GoAway (code) { + const client = this[kClient] + const err = new InformationalError(`HTTP/2: "GOAWAY" frame received with code ${code}`) + client[kSocket] = null + client[kHTTP2Session] = null + + if (client.destroyed) { + assert(this[kPending] === 0) + + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(this, request, err) + } + } else if (client[kRunning] > 0) { + // Fail head of pipeline. + const request = client[kQueue][client[kRunningIdx]] + client[kQueue][client[kRunningIdx]++] = null + + errorRequest(client, request, err) + } + + client[kPendingIdx] = client[kRunningIdx] + + assert(client[kRunning] === 0) + + client.emit('disconnect', + client[kUrl], + [client], + err + ) + + resume(client) +} + +const constants = __nccwpck_require__(49614) +const createRedirectInterceptor = __nccwpck_require__(72509) +const EMPTY_BUF = Buffer.alloc(0) + +async function lazyllhttp () { + const llhttpWasmData = process.env.JEST_WORKER_ID ? __nccwpck_require__(35099) : undefined + + let mod + try { + mod = await WebAssembly.compile(Buffer.from(__nccwpck_require__(43315), 'base64')) + } catch (e) { + /* istanbul ignore next */ + + // We could check if the error was caused by the simd option not + // being enabled, but the occurring of this other error + // * https://github.com/emscripten-core/emscripten/issues/11495 + // got me to remove that check to avoid breaking Node 12. + mod = await WebAssembly.compile(Buffer.from(llhttpWasmData || __nccwpck_require__(35099), 'base64')) + } + + return await WebAssembly.instantiate(mod, { + env: { + /* eslint-disable camelcase */ + + wasm_on_url: (p, at, len) => { + /* istanbul ignore next */ + return 0 + }, + wasm_on_status: (p, at, len) => { + assert.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.strictEqual(currentParser.ptr, p) + return currentParser.onMessageBegin() || 0 + }, + wasm_on_header_field: (p, at, len) => { + assert.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.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, shouldKeepAlive) => { + assert.strictEqual(currentParser.ptr, p) + return currentParser.onHeadersComplete(statusCode, Boolean(upgrade), Boolean(shouldKeepAlive)) || 0 + }, + wasm_on_body: (p, at, len) => { + assert.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.strictEqual(currentParser.ptr, p) + return currentParser.onMessageComplete() || 0 + } + + /* eslint-enable camelcase */ + } + }) +} + +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 + +class Parser { + constructor (client, socket, { exports }) { + assert(Number.isFinite(client[kMaxHeadersSize]) && client[kMaxHeadersSize] > 0) + + this.llhttp = exports + 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(this.ptr != null) + assert(currentParser == null) + + this.llhttp.llhttp_resume(this.ptr) + + assert(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) // Flush parser. + this.readMore() + } + + readMore () { + while (!this.paused && this.ptr) { + const chunk = this.socket.read() + if (chunk === null) { + break + } + this.execute(chunk) + } + } + + execute (data) { + assert(this.ptr != null) + assert(currentParser == null) + assert(!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) + + // Call `execute` on the wasm parser. + // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data, + // and finally the length of bytes to parse. + // The return value is an error code or `constants.ERROR.OK`. + try { + let ret + + try { + currentBufferRef = data + currentParser = this + ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, data.length) + /* eslint-disable-next-line no-useless-catch */ + } 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(this.ptr != null) + assert(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 = client[kQueue][client[kRunningIdx]] + if (!request) { + 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.destroy(this.socket, new HeadersOverflowError()) + } + } + + onUpgrade (head) { + const { upgrade, client, socket, headers, statusCode } = this + + assert(upgrade) + + const request = client[kQueue][client[kRunningIdx]] + assert(request) + + assert(!socket.destroyed) + assert(socket === client[kSocket]) + assert(!this.paused) + assert(request.upgrade || request.method === 'CONNECT') + + this.statusCode = null + this.statusText = '' + this.shouldKeepAlive = null + + assert(this.headers.length % 2 === 0) + this.headers = [] + this.headersSize = 0 + + socket.unshift(head) + + socket[kParser].destroy() + socket[kParser] = null + + socket[kClient] = null + socket[kError] = null + socket + .removeListener('error', onSocketError) + .removeListener('readable', onSocketReadable) + .removeListener('end', onSocketEnd) + .removeListener('close', onSocketClose) + + client[kSocket] = 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) + } + + resume(client) + } + + 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(!this.upgrade) + assert(this.statusCode < 200) + + if (statusCode === 100) { + util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket))) + return -1 + } + + /* this can only happen if server is misbehaving */ + if (upgrade && !request.upgrade) { + util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket))) + return -1 + } + + assert.strictEqual(this.timeoutType, TIMEOUT_HEADERS) + + this.statusCode = statusCode + this.shouldKeepAlive = ( + shouldKeepAlive || + // Override llhttp value which does not allow keepAlive for HEAD. + (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(client[kRunning] === 1) + this.upgrade = true + return 2 + } + + if (upgrade) { + assert(client[kRunning] === 1) + this.upgrade = true + return 2 + } + + assert(this.headers.length % 2 === 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 { + // Stop more requests from being dispatched. + 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 + resume(client) + } + + 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(request) + + assert.strictEqual(this.timeoutType, TIMEOUT_BODY) + if (this.timeout) { + // istanbul ignore else: only for jest + if (this.timeout.refresh) { + this.timeout.refresh() + } + } + + assert(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 + } + + const request = client[kQueue][client[kRunningIdx]] + assert(request) + + assert(statusCode >= 100) + + this.statusCode = null + this.statusText = '' + this.bytesRead = 0 + this.contentLength = '' + this.keepAlive = '' + this.connection = '' + + assert(this.headers.length % 2 === 0) + 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.strictEqual(client[kRunning], 0) + // Response completed before request. + 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) { + // Destroy socket once all requests have completed. + // The request at the tail of the pipeline is the one + // that requested reset and no further requests should + // have been queued since then. + util.destroy(socket, new InformationalError('reset')) + return constants.ERROR.PAUSED + } else if (client[kPipelining] === 1) { + // We must wait a full event loop cycle to reuse this socket to make sure + // that non-spec compliant servers are not closing the connection even if they + // said they won't. + 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] > 1) { + assert(!parser.paused, 'cannot be paused while waiting for headers') + util.destroy(socket, new HeadersTimeoutError()) + } + } else if (timeoutType === TIMEOUT_BODY) { + if (!parser.paused) { + util.destroy(socket, new BodyTimeoutError()) + } + } else if (timeoutType === TIMEOUT_IDLE) { + assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]) + util.destroy(socket, new InformationalError('socket idle timeout')) + } +} + +function onSocketReadable () { + const { [kParser]: parser } = this + if (parser) { + parser.readMore() + } +} + +function onSocketError (err) { + const { [kClient]: client, [kParser]: parser } = this + + assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID') + + if (client[kHTTPConnVersion] !== 'h2') { + // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded + // to the user. + if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so for as a valid response. + parser.onMessageComplete() + return + } + } + + this[kError] = err + + onError(this[kClient], err) +} + +function onError (client, err) { + if ( + client[kRunning] === 0 && + err.code !== 'UND_ERR_INFO' && + err.code !== 'UND_ERR_SOCKET' + ) { + // Error is not caused by running request and not a recoverable + // socket error. + + assert(client[kPendingIdx] === client[kRunningIdx]) + + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(client, request, err) + } + assert(client[kSize] === 0) + } +} + +function onSocketEnd () { + const { [kParser]: parser, [kClient]: client } = this + + if (client[kHTTPConnVersion] !== 'h2') { + if (parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + return + } + } + + util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this))) +} + +function onSocketClose () { + const { [kClient]: client, [kParser]: parser } = this + + if (client[kHTTPConnVersion] === 'h1' && parser) { + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { + // We treat all incoming data so far as a valid response. + parser.onMessageComplete() + } + + this[kParser].destroy() + this[kParser] = null + } + + const err = this[kError] || new SocketError('closed', util.getSocketInfo(this)) + + client[kSocket] = null + + if (client.destroyed) { + assert(client[kPending] === 0) + + // Fail entire queue. + const requests = client[kQueue].splice(client[kRunningIdx]) + for (let i = 0; i < requests.length; i++) { + const request = requests[i] + errorRequest(client, request, err) + } + } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') { + // Fail head of pipeline. + const request = client[kQueue][client[kRunningIdx]] + client[kQueue][client[kRunningIdx]++] = null + + errorRequest(client, request, err) + } + + client[kPendingIdx] = client[kRunningIdx] + + assert(client[kRunning] === 0) + + client.emit('disconnect', client[kUrl], [client], err) + + resume(client) +} + +async function connect (client) { + assert(!client[kConnecting]) + assert(!client[kSocket]) + + let { host, hostname, protocol, port } = client[kUrl] + + // Resolve ipv6 + if (hostname[0] === '[') { + const idx = hostname.indexOf(']') + + assert(idx !== -1) + const ip = hostname.substring(1, idx) + + assert(net.isIP(ip)) + hostname = ip + } + + client[kConnecting] = true + + if (channels.beforeConnect.hasSubscribers) { + channels.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) => { + if (err) { + reject(err) + } else { + resolve(socket) + } + }) + }) + + if (client.destroyed) { + util.destroy(socket.on('error', () => {}), new ClientDestroyedError()) + return + } + + client[kConnecting] = false + + assert(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], { + createConnection: () => socket, + peerMaxConcurrentStreams: client[kHTTP2SessionState].maxConcurrentStreams + }) + + client[kHTTPConnVersion] = 'h2' + session[kClient] = client + session[kSocket] = socket + session.on('error', onHttp2SessionError) + session.on('frameError', onHttp2FrameError) + session.on('end', onHttp2SessionEnd) + session.on('goaway', onHTTP2GoAway) + session.on('close', onSocketClose) + 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] = client + socket[kError] = null + + socket + .on('error', onSocketError) + .on('readable', onSocketReadable) + .on('end', onSocketEnd) + .on('close', onSocketClose) + + client[kSocket] = socket + + if (channels.connected.hasSubscribers) { + channels.connected.publish({ + connectParams: { + host, + hostname, + protocol, + port, + 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, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }) + } + + if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { + assert(client[kRunning] === 0) + while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { + const request = client[kQueue][client[kPendingIdx]++] + errorRequest(client, request, err) + } + } else { + onError(client, err) + } + + client.emit('connectionError', client[kUrl], [client], err) + } + + resume(client) +} + +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(client[kPending] === 0) + return + } + + if (client[kClosedResolve] && !client[kSize]) { + client[kClosedResolve]() + client[kClosedResolve] = null + return + } + + const socket = client[kSocket] + + if (socket && !socket.destroyed && socket.alpnProtocol !== 'h2') { + 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_IDLE) { + socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_IDLE) + } + } 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) + } + } + } + + if (client[kBusy]) { + client[kNeedDrain] = 2 + } else if (client[kNeedDrain] === 2) { + if (sync) { + client[kNeedDrain] = 1 + process.nextTick(emitDrain, client) + } else { + emitDrain(client) + } + continue + } + + if (client[kPending] === 0) { + return + } + + if (client[kRunning] >= (client[kPipelining] || 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 + + if (socket && socket.servername !== request.servername) { + util.destroy(socket, new InformationalError('servername changed')) + return + } + } + + if (client[kConnecting]) { + return + } + + if (!socket && !client[kHTTP2Session]) { + connect(client) + return + } + + if (socket.destroyed || socket[kWriting] || socket[kReset] || socket[kBlocking]) { + return + } + + if (client[kRunning] > 0 && !request.idempotent) { + // Non-idempotent request cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return + } + + if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) { + // Don't dispatch an upgrade until all preceding requests have completed. + // A misbehaving server might upgrade the connection before all pipelined + // request has completed. + return + } + + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && + (util.isStream(request.body) || util.isAsyncIterable(request.body))) { + // Request with stream or iterator body can error while other requests + // are inflight and indirectly error those as well. + // Ensure this doesn't happen by waiting for inflight + // to complete before dispatching. + + // Request with stream or iterator body cannot be retried. + // Ensure that no other requests are inflight and + // could cause failure. + return + } + + if (!request.aborted && write(client, request)) { + client[kPendingIdx]++ + } else { + client[kQueue].splice(client[kPendingIdx], 1) + } + } +} + +// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 +function shouldSendContentLength (method) { + return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' +} + +function write (client, request) { + if (client[kHTTPConnVersion] === 'h2') { + writeH2(client, client[kHTTP2Session], request) + return + } + + const { body, method, path, host, upgrade, headers, blocking, reset } = request + + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + + const expectsPayload = ( + method === 'PUT' || + method === 'POST' || + method === 'PATCH' + ) + + if (body && typeof body.read === 'function') { + // Try to read EOF in order to get length. + body.read(0) + } + + const bodyLength = util.bodyLength(body) + + let contentLength = bodyLength + + if (contentLength === null) { + contentLength = request.contentLength + } + + if (contentLength === 0 && !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + + contentLength = null + } + + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request, new RequestContentLengthMismatchError()) + return false + } + + process.emitWarning(new RequestContentLengthMismatchError()) + } + + const socket = client[kSocket] + + try { + request.onConnect((err) => { + if (request.aborted || request.completed) { + return + } + + errorRequest(client, request, err || new RequestAbortedError()) + + util.destroy(socket, new InformationalError('aborted')) + }) + } catch (err) { + errorRequest(client, request, err) + } + + if (request.aborted) { + return false + } + + if (method === 'HEAD') { + // https://github.com/mcollina/undici/issues/258 + // Close after a HEAD request to interop with misbehaving servers + // that may send a body in the response. + + socket[kReset] = true + } + + if (upgrade || method === 'CONNECT') { + // On CONNECT or upgrade, block pipeline from dispatching further + // requests on this connection. + + 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 (headers) { + header += headers + } + + if (channels.sendHeaders.hasSubscribers) { + channels.sendHeaders.publish({ request, headers: header, socket }) + } + + /* istanbul ignore else: assertion */ + if (!body || bodyLength === 0) { + if (contentLength === 0) { + socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') + } else { + assert(contentLength === null, 'no body must not have content length') + socket.write(`${header}\r\n`, 'latin1') + } + request.onRequestSent() + } else if (util.isBuffer(body)) { + assert(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) + request.onRequestSent() + if (!expectsPayload) { + socket[kReset] = true + } + } else if (util.isBlobLike(body)) { + if (typeof body.stream === 'function') { + writeIterable({ body: body.stream(), client, request, socket, contentLength, header, expectsPayload }) + } else { + writeBlob({ body, client, request, socket, contentLength, header, expectsPayload }) + } + } else if (util.isStream(body)) { + writeStream({ body, client, request, socket, contentLength, header, expectsPayload }) + } else if (util.isIterable(body)) { + writeIterable({ body, client, request, socket, contentLength, header, expectsPayload }) + } else { + assert(false) + } + + return true +} + +function writeH2 (client, session, request) { + const { body, method, path, host, upgrade, expectContinue, signal, headers: reqHeaders } = request + + let headers + if (typeof reqHeaders === 'string') headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()) + else headers = reqHeaders + + if (upgrade) { + errorRequest(client, request, new Error('Upgrade not supported for H2')) + return false + } + + try { + // TODO(HTTP/2): Should we call onConnect immediately or on stream ready event? + request.onConnect((err) => { + if (request.aborted || request.completed) { + return + } + + errorRequest(client, request, err || new RequestAbortedError()) + }) + } catch (err) { + errorRequest(client, request, err) + } + + if (request.aborted) { + return false + } + + /** @type {import('node:http2').ClientHttp2Stream} */ + let stream + const h2State = client[kHTTP2SessionState] + + headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost] + headers[HTTP2_HEADER_METHOD] = method + + if (method === 'CONNECT') { + session.ref() + // we are already connected, streams are pending, first request + // will create a new stream. We trigger a request to create the stream and wait until + // `ready` event is triggered + // We disabled endStream to allow the user to write to the stream + stream = session.request(headers, { endStream: false, signal }) + + if (stream.id && !stream.pending) { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + } else { + stream.once('ready', () => { + request.onUpgrade(null, null, stream) + ++h2State.openStreams + }) + } + + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) session.unref() + }) + + return true + } + + // https://tools.ietf.org/html/rfc7540#section-8.3 + // :path and :scheme headers must be omited when sending CONNECT + + headers[HTTP2_HEADER_PATH] = path + headers[HTTP2_HEADER_SCHEME] = 'https' + + // https://tools.ietf.org/html/rfc7231#section-4.3.1 + // https://tools.ietf.org/html/rfc7231#section-4.3.2 + // https://tools.ietf.org/html/rfc7231#section-4.3.5 + + // Sending a payload body on a request that does not + // expect it can cause undefined behavior on some + // servers and corrupt connection state. Do not + // re-use the connection for further requests. + + const expectsPayload = ( + method === 'PUT' || + method === 'POST' || + method === 'PATCH' + ) + + if (body && typeof body.read === 'function') { + // Try to read EOF in order to get length. + body.read(0) + } + + let contentLength = util.bodyLength(body) + + if (contentLength == null) { + contentLength = request.contentLength + } + + if (contentLength === 0 || !expectsPayload) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD NOT send a Content-Length header field when + // the request message does not contain a payload body and the method + // semantics do not anticipate such a body. + + contentLength = null + } + + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { + if (client[kStrictContentLength]) { + errorRequest(client, request, new RequestContentLengthMismatchError()) + return false + } + + process.emitWarning(new RequestContentLengthMismatchError()) + } + + if (contentLength != null) { + assert(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 = session.request(headers, { endStream: shouldEndStream, signal }) + + stream.once('continue', writeBodyH2) + } else { + stream = session.request(headers, { + endStream: shouldEndStream, + signal + }) + writeBodyH2() + } + + // Increment counter as we have new several streams open + ++h2State.openStreams + + stream.once('response', headers => { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers + + if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) { + stream.pause() + } + }) + + stream.once('end', () => { + request.onComplete([]) + }) + + stream.on('data', (chunk) => { + if (request.onData(chunk) === false) { + stream.pause() + } + }) + + stream.once('close', () => { + h2State.openStreams -= 1 + // TODO(HTTP/2): unref only if current streams count is 0 + if (h2State.openStreams === 0) { + session.unref() + } + }) + + stream.once('error', function (err) { + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) + } + }) + + stream.once('frameError', (type, code) => { + const err = new InformationalError(`HTTP/2: "frameError" received - type ${type}, code ${code}`) + errorRequest(client, request, err) + + if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { + h2State.streams -= 1 + util.destroy(stream, err) + } + }) + + // stream.on('aborted', () => { + // // TODO(HTTP/2): Support aborted + // }) + + // stream.on('timeout', () => { + // // TODO(HTTP/2): Support timeout + // }) + + // stream.on('push', headers => { + // // TODO(HTTP/2): Suppor push + // }) + + // stream.on('trailers', headers => { + // // TODO(HTTP/2): Support trailers + // }) + + return true + + function writeBodyH2 () { + /* istanbul ignore else: assertion */ + if (!body) { + request.onRequestSent() + } else if (util.isBuffer(body)) { + assert(contentLength === body.byteLength, 'buffer body must have content length') + stream.cork() + stream.write(body) + stream.uncork() + stream.end() + request.onBodySent(body) + request.onRequestSent() + } else if (util.isBlobLike(body)) { + if (typeof body.stream === 'function') { + writeIterable({ + client, + request, + contentLength, + h2stream: stream, + expectsPayload, + body: body.stream(), + socket: client[kSocket], + header: '' + }) + } else { + writeBlob({ + body, + client, + request, + contentLength, + expectsPayload, + h2stream: stream, + header: '', + socket: client[kSocket] + }) + } + } else if (util.isStream(body)) { + writeStream({ + body, + client, + request, + contentLength, + expectsPayload, + socket: client[kSocket], + h2stream: stream, + header: '' + }) + } else if (util.isIterable(body)) { + writeIterable({ + body, + client, + request, + contentLength, + expectsPayload, + header: '', + h2stream: stream, + socket: client[kSocket] + }) + } else { + assert(false) + } + } +} + +function writeStream ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined') + + if (client[kHTTPConnVersion] === 'h2') { + // For HTTP/2, is enough to pipe the stream + const pipe = pipeline( + body, + h2stream, + (err) => { + if (err) { + util.destroy(body, err) + util.destroy(h2stream, err) + } else { + request.onRequestSent() + } + } + ) + + pipe.on('data', onPipeData) + pipe.once('end', () => { + pipe.removeListener('data', onPipeData) + util.destroy(pipe) + }) + + function onPipeData (chunk) { + request.onBodySent(chunk) + } + + return + } + + let finished = false + + const writer = new AsyncWriter({ 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 onAbort = function () { + if (finished) { + return + } + const err = new RequestAbortedError() + queueMicrotask(() => onFinished(err)) + } + const onFinished = function (err) { + if (finished) { + return + } + + finished = true + + assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 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.destroy(body, err) + } else { + util.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, socket, contentLength, header, expectsPayload }) { + assert(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.onBodySent(buffer) + request.onRequestSent() + + if (!expectsPayload) { + socket[kReset] = true + } + + resume(client) + } catch (err) { + util.destroy(isH2 ? h2stream : socket, err) + } +} + +async function writeIterable ({ h2stream, body, client, request, socket, contentLength, header, expectsPayload }) { + assert(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(callback === null) + + if (socket[kError]) { + reject(socket[kError]) + } else { + callback = resolve + } + }) + + if (client[kHTTPConnVersion] === 'h2') { + h2stream + .on('close', onDrain) + .on('drain', onDrain) + + try { + // It's up to the user to somehow abort the async iterable. + for await (const chunk of body) { + if (socket[kError]) { + throw socket[kError] + } + + const res = h2stream.write(chunk) + request.onBodySent(chunk) + if (!res) { + await waitForDrain() + } + } + } catch (err) { + h2stream.destroy(err) + } finally { + request.onRequestSent() + h2stream.end() + h2stream + .off('close', onDrain) + .off('drain', onDrain) + } + + return + } + + socket + .on('close', onDrain) + .on('drain', onDrain) + + const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }) + try { + // It's up to the user to somehow abort the async iterable. + 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) + } +} + +class AsyncWriter { + constructor ({ 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 + + 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 + } + + // We should defer writing chunks. + 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.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) { + // https://tools.ietf.org/html/rfc7230#section-3.3.2 + // A user agent SHOULD send a Content-Length in a request message when + // no Transfer-Encoding is sent and the request method defines a meaning + // for an enclosed payload body. + + 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(client[kRunning] <= 1, 'pipeline should only contain this request') + util.destroy(socket, err) + } + } +} + +function errorRequest (client, request, err) { + try { + request.onError(err) + assert(request.aborted) + } catch (err) { + client.emit('error', err) + } +} + +module.exports = Client + + +/***/ }), + +/***/ 71744: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +/* istanbul ignore file: only for Node 12 */ + +const { kConnected, kSize } = __nccwpck_require__(48039) + +class CompatWeakRef { + constructor (value) { + this.value = value + } + + deref () { + return this.value[kConnected] === 0 && this.value[kSize] === 0 + ? undefined + : this.value + } +} + +class CompatFinalizer { + constructor (finalizer) { + this.finalizer = finalizer + } + + register (dispatcher, key) { + if (dispatcher.on) { + dispatcher.on('disconnect', () => { + if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { + this.finalizer(key) + } + }) + } + } +} + +module.exports = function () { + // FIXME: remove workaround when the Node bug is fixed + // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 + if (process.env.NODE_V8_COVERAGE) { + return { + WeakRef: CompatWeakRef, + FinalizationRegistry: CompatFinalizer + } + } + return { + WeakRef: global.WeakRef || CompatWeakRef, + FinalizationRegistry: global.FinalizationRegistry || CompatFinalizer + } +} + + +/***/ }), + +/***/ 84014: +/***/ ((module) => { + + + +// https://wicg.github.io/cookie-store/#cookie-maximum-attribute-value-size +const maxAttributeValueSize = 1024 + +// https://wicg.github.io/cookie-store/#cookie-maximum-name-value-pair-size +const maxNameValuePairSize = 4096 + +module.exports = { + maxAttributeValueSize, + maxNameValuePairSize +} + + +/***/ }), + +/***/ 15389: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { parseSetCookie } = __nccwpck_require__(32849) +const { stringify, getHeadersList } = __nccwpck_require__(30733) +const { webidl } = __nccwpck_require__(96138) +const { Headers } = __nccwpck_require__(23245) + +/** + * @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, { header: '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.argumentLengthCheck(arguments, 2, { header: 'deleteCookie' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + name = webidl.converters.DOMString(name) + attributes = webidl.converters.DeleteCookieAttributes(attributes) + + // Matches behavior of + // https://github.com/denoland/deno_std/blob/63827b16330b82489a04614027c33b7904e08be5/http/cookie.ts#L278 + setCookie(headers, { + name, + value: '', + expires: new Date(0), + ...attributes + }) +} + +/** + * @param {Headers} headers + * @returns {Cookie[]} + */ +function getSetCookies (headers) { + webidl.argumentLengthCheck(arguments, 1, { header: 'getSetCookies' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + const cookies = getHeadersList(headers).cookies + + if (!cookies) { + return [] + } + + // In older versions of undici, cookies is a list of name:value. + return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) +} + +/** + * @param {Headers} headers + * @param {Cookie} cookie + * @returns {void} + */ +function setCookie (headers, cookie) { + webidl.argumentLengthCheck(arguments, 2, { header: 'setCookie' }) + + webidl.brandCheck(headers, Headers, { strict: false }) + + cookie = webidl.converters.Cookie(cookie) + + const str = stringify(cookie) + + if (str) { + headers.append('Set-Cookie', stringify(cookie)) + } +} + +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: [] + } +]) + +module.exports = { + getCookies, + deleteCookie, + getSetCookies, + setCookie +} + + +/***/ }), + +/***/ 32849: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { maxNameValuePairSize, maxAttributeValueSize } = __nccwpck_require__(84014) +const { isCTLExcludingHtab } = __nccwpck_require__(30733) +const { collectASequenceOfCodePointsFast } = __nccwpck_require__(50096) +const assert = __nccwpck_require__(39491) + +/** + * @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) { + // 1. If the set-cookie-string contains a %x00-08 / %x0A-1F / %x7F + // character (CTL characters excluding HTAB): Abort these steps and + // ignore the set-cookie-string entirely. + if (isCTLExcludingHtab(header)) { + return null + } + + let nameValuePair = '' + let unparsedAttributes = '' + let name = '' + let value = '' + + // 2. If the set-cookie-string contains a %x3B (";") character: + if (header.includes(';')) { + // 1. The name-value-pair string consists of the characters up to, + // but not including, the first %x3B (";"), and the unparsed- + // attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question). + const position = { position: 0 } + + nameValuePair = collectASequenceOfCodePointsFast(';', header, position) + unparsedAttributes = header.slice(position.position) + } else { + // Otherwise: + + // 1. The name-value-pair string consists of all the characters + // contained in the set-cookie-string, and the unparsed- + // attributes is the empty string. + nameValuePair = header + } + + // 3. If the name-value-pair string lacks a %x3D ("=") character, then + // the name string is empty, and the value string is the value of + // name-value-pair. + if (!nameValuePair.includes('=')) { + value = nameValuePair + } else { + // Otherwise, the name string consists of the characters up to, but + // not including, the first %x3D ("=") character, and the (possibly + // empty) value string consists of the characters after the first + // %x3D ("=") character. + const position = { position: 0 } + name = collectASequenceOfCodePointsFast( + '=', + nameValuePair, + position + ) + value = nameValuePair.slice(position.position + 1) + } + + // 4. Remove any leading or trailing WSP characters from the name + // string and the value string. + name = name.trim() + value = value.trim() + + // 5. If the sum of the lengths of the name string and the value string + // is more than 4096 octets, abort these steps and ignore the set- + // cookie-string entirely. + if (name.length + value.length > maxNameValuePairSize) { + return null + } + + // 6. The cookie-name is the name string, and the cookie-value is the + // value string. + 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 = {}) { + // 1. If the unparsed-attributes string is empty, skip the rest of + // these steps. + if (unparsedAttributes.length === 0) { + return cookieAttributeList + } + + // 2. Discard the first character of the unparsed-attributes (which + // will be a %x3B (";") character). + assert(unparsedAttributes[0] === ';') + unparsedAttributes = unparsedAttributes.slice(1) + + let cookieAv = '' + + // 3. If the remaining unparsed-attributes contains a %x3B (";") + // character: + if (unparsedAttributes.includes(';')) { + // 1. Consume the characters of the unparsed-attributes up to, but + // not including, the first %x3B (";") character. + cookieAv = collectASequenceOfCodePointsFast( + ';', + unparsedAttributes, + { position: 0 } + ) + unparsedAttributes = unparsedAttributes.slice(cookieAv.length) + } else { + // Otherwise: + + // 1. Consume the remainder of the unparsed-attributes. + cookieAv = unparsedAttributes + unparsedAttributes = '' + } + + // Let the cookie-av string be the characters consumed in this step. + + let attributeName = '' + let attributeValue = '' + + // 4. If the cookie-av string contains a %x3D ("=") character: + if (cookieAv.includes('=')) { + // 1. The (possibly empty) attribute-name string consists of the + // characters up to, but not including, the first %x3D ("=") + // character, and the (possibly empty) attribute-value string + // consists of the characters after the first %x3D ("=") + // character. + const position = { position: 0 } + + attributeName = collectASequenceOfCodePointsFast( + '=', + cookieAv, + position + ) + attributeValue = cookieAv.slice(position.position + 1) + } else { + // Otherwise: + + // 1. The attribute-name string consists of the entire cookie-av + // string, and the attribute-value string is empty. + attributeName = cookieAv + } + + // 5. Remove any leading or trailing WSP characters from the attribute- + // name string and the attribute-value string. + attributeName = attributeName.trim() + attributeValue = attributeValue.trim() + + // 6. If the attribute-value is longer than 1024 octets, ignore the + // cookie-av string and return to Step 1 of this algorithm. + if (attributeValue.length > maxAttributeValueSize) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 7. Process the attribute-name and attribute-value according to the + // requirements in the following subsections. (Notice that + // attributes with unrecognized attribute-names are ignored.) + const attributeNameLowercase = attributeName.toLowerCase() + + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.1 + // If the attribute-name case-insensitively matches the string + // "Expires", the user agent MUST process the cookie-av as follows. + if (attributeNameLowercase === 'expires') { + // 1. Let the expiry-time be the result of parsing the attribute-value + // as cookie-date (see Section 5.1.1). + const expiryTime = new Date(attributeValue) + + // 2. If the attribute-value failed to parse as a cookie date, ignore + // the cookie-av. + + cookieAttributeList.expires = expiryTime + } else if (attributeNameLowercase === 'max-age') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.2 + // If the attribute-name case-insensitively matches the string "Max- + // Age", the user agent MUST process the cookie-av as follows. + + // 1. If the first character of the attribute-value is not a DIGIT or a + // "-" character, ignore the cookie-av. + const charCode = attributeValue.charCodeAt(0) + + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== '-') { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 2. If the remainder of attribute-value contains a non-DIGIT + // character, ignore the cookie-av. + if (!/^\d+$/.test(attributeValue)) { + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) + } + + // 3. Let delta-seconds be the attribute-value converted to an integer. + const deltaSeconds = Number(attributeValue) + + // 4. Let cookie-age-limit be the maximum age of the cookie (which + // SHOULD be 400 days or less, see Section 4.1.2.2). + + // 5. Set delta-seconds to the smaller of its present value and cookie- + // age-limit. + // deltaSeconds = Math.min(deltaSeconds * 1000, maxExpiresMs) + + // 6. If delta-seconds is less than or equal to zero (0), let expiry- + // time be the earliest representable date and time. Otherwise, let + // the expiry-time be the current date and time plus delta-seconds + // seconds. + // const expiryTime = deltaSeconds <= 0 ? Date.now() : Date.now() + deltaSeconds + + // 7. Append an attribute to the cookie-attribute-list with an + // attribute-name of Max-Age and an attribute-value of expiry-time. + cookieAttributeList.maxAge = deltaSeconds + } else if (attributeNameLowercase === 'domain') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.3 + // If the attribute-name case-insensitively matches the string "Domain", + // the user agent MUST process the cookie-av as follows. + + // 1. Let cookie-domain be the attribute-value. + let cookieDomain = attributeValue + + // 2. If cookie-domain starts with %x2E ("."), let cookie-domain be + // cookie-domain without its leading %x2E ("."). + if (cookieDomain[0] === '.') { + cookieDomain = cookieDomain.slice(1) + } + + // 3. Convert the cookie-domain to lower case. + cookieDomain = cookieDomain.toLowerCase() + + // 4. Append an attribute to the cookie-attribute-list with an + // attribute-name of Domain and an attribute-value of cookie-domain. + cookieAttributeList.domain = cookieDomain + } else if (attributeNameLowercase === 'path') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.4 + // If the attribute-name case-insensitively matches the string "Path", + // the user agent MUST process the cookie-av as follows. + + // 1. If the attribute-value is empty or if the first character of the + // attribute-value is not %x2F ("/"): + let cookiePath = '' + if (attributeValue.length === 0 || attributeValue[0] !== '/') { + // 1. Let cookie-path be the default-path. + cookiePath = '/' + } else { + // Otherwise: + + // 1. Let cookie-path be the attribute-value. + cookiePath = attributeValue + } + + // 2. Append an attribute to the cookie-attribute-list with an + // attribute-name of Path and an attribute-value of cookie-path. + cookieAttributeList.path = cookiePath + } else if (attributeNameLowercase === 'secure') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.5 + // If the attribute-name case-insensitively matches the string "Secure", + // the user agent MUST append an attribute to the cookie-attribute-list + // with an attribute-name of Secure and an empty attribute-value. + + cookieAttributeList.secure = true + } else if (attributeNameLowercase === 'httponly') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.6 + // If the attribute-name case-insensitively matches the string + // "HttpOnly", the user agent MUST append an attribute to the cookie- + // attribute-list with an attribute-name of HttpOnly and an empty + // attribute-value. + + cookieAttributeList.httpOnly = true + } else if (attributeNameLowercase === 'samesite') { + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis#section-5.4.7 + // If the attribute-name case-insensitively matches the string + // "SameSite", the user agent MUST process the cookie-av as follows: + + // 1. Let enforcement be "Default". + let enforcement = 'Default' + + const attributeValueLowercase = attributeValue.toLowerCase() + // 2. If cookie-av's attribute-value is a case-insensitive match for + // "None", set enforcement to "None". + if (attributeValueLowercase.includes('none')) { + enforcement = 'None' + } + + // 3. If cookie-av's attribute-value is a case-insensitive match for + // "Strict", set enforcement to "Strict". + if (attributeValueLowercase.includes('strict')) { + enforcement = 'Strict' + } + + // 4. If cookie-av's attribute-value is a case-insensitive match for + // "Lax", set enforcement to "Lax". + if (attributeValueLowercase.includes('lax')) { + enforcement = 'Lax' + } + + // 5. Append an attribute to the cookie-attribute-list with an + // attribute-name of "SameSite" and an attribute-value of + // enforcement. + cookieAttributeList.sameSite = enforcement + } else { + cookieAttributeList.unparsed ??= [] + + cookieAttributeList.unparsed.push(`${attributeName}=${attributeValue}`) + } + + // 8. Return to Step 1 of this algorithm. + return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList) +} + +module.exports = { + parseSetCookie, + parseUnparsedAttributes +} + + +/***/ }), + +/***/ 30733: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const assert = __nccwpck_require__(39491) +const { kHeadersList } = __nccwpck_require__(48039) + +function isCTLExcludingHtab (value) { + if (value.length === 0) { + return false + } + + for (const char of value) { + const code = char.charCodeAt(0) + + if ( + (code >= 0x00 || code <= 0x08) || + (code >= 0x0A || code <= 0x1F) || + code === 0x7F + ) { + 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 <= 0x20 || code > 0x7F) || + 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 < 0x21 || // exclude CTLs (0-31) + code === 0x22 || + code === 0x2C || + code === 0x3B || + code === 0x5C || + code > 0x7E // non-ascii + ) { + throw new Error('Invalid header value') + } + } +} + +/** + * path-value = + * @param {string} path + */ +function validateCookiePath (path) { + for (const char of path) { + const code = char.charCodeAt(0) + + if (code < 0x21 || 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 (cookie) { + if (cookie.name.length === 0) { + return null + } + + validateCookieName(cookie.name) + validateCookieValue(cookie.value) + + const out = [`${cookie.name}=${cookie.value}`] + + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.1 + // https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-cookie-prefixes-00#section-3.2 + 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('; ') +} + +let kHeadersListNode + +function getHeadersList (headers) { + if (headers[kHeadersList]) { + return headers[kHeadersList] + } + + if (!kHeadersListNode) { + kHeadersListNode = Object.getOwnPropertySymbols(headers).find( + (symbol) => symbol.description === 'headers list' + ) + + assert(kHeadersListNode, 'Headers cannot be parsed') + } + + const headersList = headers[kHeadersListNode] + assert(headersList) + + return headersList +} + +module.exports = { + isCTLExcludingHtab, + stringify, + getHeadersList +} + + +/***/ }), + +/***/ 2209: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const net = __nccwpck_require__(41808) +const assert = __nccwpck_require__(39491) +const util = __nccwpck_require__(67468) +const { InvalidArgumentError, ConnectTimeoutError } = __nccwpck_require__(46339) + +let tls // include tls conditionally since it is not always available + +// TODO: session re-use does not wait for the first +// connection to resolve the session and might therefore +// resolve the same servername multiple times even when +// re-use is enabled. + +let SessionCache +// FIXME: remove workaround when the Node bug is fixed +// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 +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 !== undefined && ref.deref() === undefined) { + 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) { + // remove the oldest session + const { value: oldestKey } = this._sessionCache.keys().next() + this._sessionCache.delete(oldestKey) + } + + this._sessionCache.set(sessionKey, session) + } + } +} + +function buildConnector ({ allowH2, maxCachedSessions, socketPath, timeout, ...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 ? 10e3 : 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 = __nccwpck_require__(24404) + } + servername = servername || options.servername || util.getServerName(host) || null + + const sessionKey = servername || hostname + const session = sessionCache.get(sessionKey) || null + + assert(sessionKey) + + socket = tls.connect({ + highWaterMark: 16384, // TLS in node can't have bigger HWM anyway... + ...options, + servername, + session, + localAddress, + // TODO(HTTP/2): Add support for h2c + ALPNProtocols: allowH2 ? ['http/1.1', 'h2'] : ['http/1.1'], + socket: httpSocket, // upgrade socket connection + port: port || 443, + host: hostname + }) + + socket + .on('session', function (session) { + // TODO (fix): Can a session become invalid once established? Don't think so? + sessionCache.set(sessionKey, session) + }) + } else { + assert(!httpSocket, 'httpSocket can only be sent on TLS update') + socket = net.connect({ + highWaterMark: 64 * 1024, // Same as nodejs fs streams. + ...options, + localAddress, + port: port || 80, + host: hostname + }) + } + + // Set TCP keep alive options on the socket here instead of in connect() for the case of assigning the socket + if (options.keepAlive == null || options.keepAlive) { + const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 60e3 : 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, timeout) { + if (!timeout) { + return () => {} + } + + let s1 = null + let s2 = null + const timeoutId = setTimeout(() => { + // setImmediate is added to make sure that we priotorise socket error events over timeouts + s1 = setImmediate(() => { + if (process.platform === 'win32') { + // Windows needs an extra setImmediate probably due to implementation differences in the socket logic + s2 = setImmediate(() => onConnectTimeout()) + } else { + onConnectTimeout() + } + }) + }, timeout) + return () => { + clearTimeout(timeoutId) + clearImmediate(s1) + clearImmediate(s2) + } +} + +function onConnectTimeout (socket) { + util.destroy(socket, new ConnectTimeoutError()) +} + +module.exports = buildConnector + + +/***/ }), + +/***/ 46339: +/***/ ((module) => { + + + +class UndiciError extends Error { + constructor (message) { + super(message) + this.name = 'UndiciError' + this.code = 'UND_ERR' + } +} + +class ConnectTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ConnectTimeoutError) + this.name = 'ConnectTimeoutError' + this.message = message || 'Connect Timeout Error' + this.code = 'UND_ERR_CONNECT_TIMEOUT' + } +} + +class HeadersTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, HeadersTimeoutError) + this.name = 'HeadersTimeoutError' + this.message = message || 'Headers Timeout Error' + this.code = 'UND_ERR_HEADERS_TIMEOUT' + } +} + +class HeadersOverflowError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, HeadersOverflowError) + this.name = 'HeadersOverflowError' + this.message = message || 'Headers Overflow Error' + this.code = 'UND_ERR_HEADERS_OVERFLOW' + } +} + +class BodyTimeoutError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, BodyTimeoutError) + this.name = 'BodyTimeoutError' + this.message = message || 'Body Timeout Error' + this.code = 'UND_ERR_BODY_TIMEOUT' + } +} + +class ResponseStatusCodeError extends UndiciError { + constructor (message, statusCode, headers, body) { + super(message) + Error.captureStackTrace(this, ResponseStatusCodeError) + 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 + } +} + +class InvalidArgumentError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InvalidArgumentError) + this.name = 'InvalidArgumentError' + this.message = message || 'Invalid Argument Error' + this.code = 'UND_ERR_INVALID_ARG' + } +} + +class InvalidReturnValueError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InvalidReturnValueError) + this.name = 'InvalidReturnValueError' + this.message = message || 'Invalid Return Value Error' + this.code = 'UND_ERR_INVALID_RETURN_VALUE' + } +} + +class RequestAbortedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, RequestAbortedError) + this.name = 'AbortError' + this.message = message || 'Request aborted' + this.code = 'UND_ERR_ABORTED' + } +} + +class InformationalError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, InformationalError) + this.name = 'InformationalError' + this.message = message || 'Request information' + this.code = 'UND_ERR_INFO' + } +} + +class RequestContentLengthMismatchError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, RequestContentLengthMismatchError) + this.name = 'RequestContentLengthMismatchError' + this.message = message || 'Request body length does not match content-length header' + this.code = 'UND_ERR_REQ_CONTENT_LENGTH_MISMATCH' + } +} + +class ResponseContentLengthMismatchError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ResponseContentLengthMismatchError) + this.name = 'ResponseContentLengthMismatchError' + this.message = message || 'Response body length does not match content-length header' + this.code = 'UND_ERR_RES_CONTENT_LENGTH_MISMATCH' + } +} + +class ClientDestroyedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ClientDestroyedError) + this.name = 'ClientDestroyedError' + this.message = message || 'The client is destroyed' + this.code = 'UND_ERR_DESTROYED' + } +} + +class ClientClosedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ClientClosedError) + this.name = 'ClientClosedError' + this.message = message || 'The client is closed' + this.code = 'UND_ERR_CLOSED' + } +} + +class SocketError extends UndiciError { + constructor (message, socket) { + super(message) + Error.captureStackTrace(this, SocketError) + this.name = 'SocketError' + this.message = message || 'Socket error' + this.code = 'UND_ERR_SOCKET' + this.socket = socket + } +} + +class NotSupportedError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, NotSupportedError) + this.name = 'NotSupportedError' + this.message = message || 'Not supported error' + this.code = 'UND_ERR_NOT_SUPPORTED' + } +} + +class BalancedPoolMissingUpstreamError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, NotSupportedError) + this.name = 'MissingUpstreamError' + this.message = message || 'No upstream has been added to the BalancedPool' + this.code = 'UND_ERR_BPL_MISSING_UPSTREAM' + } +} + +class HTTPParserError extends Error { + constructor (message, code, data) { + super(message) + Error.captureStackTrace(this, HTTPParserError) + this.name = 'HTTPParserError' + this.code = code ? `HPE_${code}` : undefined + this.data = data ? data.toString() : undefined + } +} + +class ResponseExceededMaxSizeError extends UndiciError { + constructor (message) { + super(message) + Error.captureStackTrace(this, ResponseExceededMaxSizeError) + this.name = 'ResponseExceededMaxSizeError' + this.message = message || 'Response content exceeded max size' + this.code = 'UND_ERR_RES_EXCEEDED_MAX_SIZE' + } +} + +class RequestRetryError extends UndiciError { + constructor (message, code, { headers, data }) { + super(message) + Error.captureStackTrace(this, RequestRetryError) + 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, + UndiciError, + HeadersTimeoutError, + HeadersOverflowError, + BodyTimeoutError, + RequestContentLengthMismatchError, + ConnectTimeoutError, + ResponseStatusCodeError, + InvalidArgumentError, + InvalidReturnValueError, + RequestAbortedError, + ClientDestroyedError, + ClientClosedError, + InformationalError, + SocketError, + NotSupportedError, + ResponseContentLengthMismatchError, + BalancedPoolMissingUpstreamError, + ResponseExceededMaxSizeError, + RequestRetryError +} + + +/***/ }), + +/***/ 38325: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { + InvalidArgumentError, + NotSupportedError +} = __nccwpck_require__(46339) +const assert = __nccwpck_require__(39491) +const { kHTTP2BuildRequest, kHTTP2CopyHeaders, kHTTP1BuildRequest } = __nccwpck_require__(48039) +const util = __nccwpck_require__(67468) + +// tokenRegExp and headerCharRegex have been lifted from +// https://github.com/nodejs/node/blob/main/lib/_http_common.js + +/** + * 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]/ + +// Verifies that a given path is valid does not contain control chars \x00 to \x20 +const invalidPathRegex = /[^\u0021-\u00ff]/ + +const kHandler = Symbol('handler') + +const channels = {} + +let extractBody + +try { + const diagnosticsChannel = __nccwpck_require__(67643) + channels.create = diagnosticsChannel.channel('undici:request:create') + channels.bodySent = diagnosticsChannel.channel('undici:request:bodySent') + channels.headers = diagnosticsChannel.channel('undici:request:headers') + channels.trailers = diagnosticsChannel.channel('undici:request:trailers') + channels.error = diagnosticsChannel.channel('undici:request:error') +} catch { + channels.create = { hasSubscribers: false } + channels.bodySent = { hasSubscribers: false } + channels.headers = { hasSubscribers: false } + channels.trailers = { hasSubscribers: false } + channels.error = { hasSubscribers: false } +} + +class Request { + constructor (origin, { + path, + method, + body, + headers, + query, + idempotent, + blocking, + upgrade, + headersTimeout, + bodyTimeout, + reset, + throwOnError, + expectContinue + }, 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.exec(path) !== null) { + throw new InvalidArgumentError('invalid request path') + } + + if (typeof method !== 'string') { + throw new InvalidArgumentError('method must be a string') + } else if (tokenRegExp.exec(method) === null) { + 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 (util.isStream(body)) { + this.body = body + + const rState = this.body._readableState + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy () { + util.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.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.isFormDataLike(body) || util.isIterable(body) || util.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 ? util.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 = '' + + // Only for H2 + 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') { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + processHeader(this, key, headers[key]) + } + } else if (headers != null) { + throw new InvalidArgumentError('headers must be an object or an array') + } + + if (util.isFormDataLike(this.body)) { + if (util.nodeMajor < 16 || (util.nodeMajor === 16 && util.nodeMinor < 8)) { + throw new InvalidArgumentError('Form-Data bodies are only supported in node v16.8 and newer.') + } + + if (!extractBody) { + extractBody = (__nccwpck_require__(62494).extractBody) + } + + const [bodyStream, contentType] = extractBody(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.isBlobLike(body) && this.contentType == null && body.type) { + this.contentType = body.type + this.headers += `content-type: ${body.type}\r\n` + } + + util.validateHandler(handler, method, upgrade) + + this.servername = util.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(!this.aborted) + assert(!this.completed) + + if (this.error) { + abort(this.error) + } else { + this.abort = abort + return this[kHandler].onConnect(abort) + } + } + + onHeaders (statusCode, headers, resume, statusText) { + assert(!this.aborted) + assert(!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(!this.aborted) + assert(!this.completed) + + try { + return this[kHandler].onData(chunk) + } catch (err) { + this.abort(err) + return false + } + } + + onUpgrade (statusCode, headers, socket) { + assert(!this.aborted) + assert(!this.completed) + + return this[kHandler].onUpgrade(statusCode, headers, socket) + } + + onComplete (trailers) { + this.onFinally() + + assert(!this.aborted) + + this.completed = true + if (channels.trailers.hasSubscribers) { + channels.trailers.publish({ request: this, trailers }) + } + + try { + return this[kHandler].onComplete(trailers) + } catch (err) { + // TODO (fix): This might be a bad idea? + 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 + } + } + + // TODO: adjust to support H2 + addHeader (key, value) { + processHeader(this, key, value) + return this + } + + static [kHTTP1BuildRequest] (origin, opts, handler) { + // TODO: Migrate header parsing here, to make Requests + // HTTP agnostic + return new Request(origin, opts, handler) + } + + static [kHTTP2BuildRequest] (origin, opts, handler) { + const headers = opts.headers + opts = { ...opts, headers: null } + + const request = new Request(origin, opts, handler) + + request.headers = {} + + 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(request, headers[i], headers[i + 1], true) + } + } else if (headers && typeof headers === 'object') { + const keys = Object.keys(headers) + for (let i = 0; i < keys.length; i++) { + const key = keys[i] + processHeader(request, key, headers[key], true) + } + } else if (headers != null) { + throw new InvalidArgumentError('headers must be an object or an array') + } + + return request + } + + static [kHTTP2CopyHeaders] (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(`invalid ${key} header`) + } + + val = val != null ? `${val}` : '' + + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) + } + + return skipAppend ? val : `${key}: ${val}\r\n` +} + +function processHeader (request, key, val, skipAppend = false) { + if (val && (typeof val === 'object' && !Array.isArray(val))) { + throw new InvalidArgumentError(`invalid ${key} header`) + } else if (val === undefined) { + return + } + + if ( + request.host === null && + key.length === 4 && + key.toLowerCase() === 'host' + ) { + if (headerCharRegex.exec(val) !== null) { + throw new InvalidArgumentError(`invalid ${key} header`) + } + // Consumed by Client + request.host = val + } else if ( + request.contentLength === null && + key.length === 14 && + key.toLowerCase() === 'content-length' + ) { + request.contentLength = parseInt(val, 10) + if (!Number.isFinite(request.contentLength)) { + throw new InvalidArgumentError('invalid content-length header') + } + } else if ( + request.contentType === null && + key.length === 12 && + key.toLowerCase() === 'content-type' + ) { + request.contentType = val + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) + } else if ( + key.length === 17 && + key.toLowerCase() === 'transfer-encoding' + ) { + throw new InvalidArgumentError('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('invalid connection header') + } else if (value === 'close') { + request.reset = true + } + } else if ( + key.length === 10 && + key.toLowerCase() === 'keep-alive' + ) { + throw new InvalidArgumentError('invalid keep-alive header') + } else if ( + key.length === 7 && + key.toLowerCase() === 'upgrade' + ) { + throw new InvalidArgumentError('invalid upgrade header') + } else if ( + key.length === 6 && + key.toLowerCase() === 'expect' + ) { + throw new NotSupportedError('expect header not supported') + } else if (tokenRegExp.exec(key) === null) { + throw new InvalidArgumentError('invalid header key') + } else { + if (Array.isArray(val)) { + for (let i = 0; i < val.length; i++) { + if (skipAppend) { + if (request.headers[key]) request.headers[key] += `,${processHeaderValue(key, val[i], skipAppend)}` + else request.headers[key] = processHeaderValue(key, val[i], skipAppend) + } else { + request.headers += processHeaderValue(key, val[i]) + } + } + } else { + if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend) + else request.headers += processHeaderValue(key, val) + } + } +} + +module.exports = Request + + +/***/ }), + +/***/ 48039: +/***/ ((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') +} + + +/***/ }), + +/***/ 67468: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const assert = __nccwpck_require__(39491) +const { kDestroyed, kBodyUsed } = __nccwpck_require__(48039) +const { IncomingMessage } = __nccwpck_require__(13685) +const stream = __nccwpck_require__(12781) +const net = __nccwpck_require__(41808) +const { InvalidArgumentError } = __nccwpck_require__(46339) +const { Blob } = __nccwpck_require__(14300) +const nodeUtil = __nccwpck_require__(73837) +const { stringify } = __nccwpck_require__(63477) + +const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v)) + +function nop () {} + +function isStream (obj) { + return obj && typeof obj === 'object' && typeof obj.pipe === 'function' && typeof obj.on === 'function' +} + +// based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) +function isBlobLike (object) { + return (Blob && object instanceof Blob) || ( + object && + typeof object === 'object' && + (typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function') && + /^(Blob|File)$/.test(object[Symbol.toStringTag]) + ) +} + +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 parseURL (url) { + if (typeof url === 'string') { + url = new URL(url) + + if (!/^https?:/.test(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 (!/^https?:/.test(url.origin || url.protocol)) { + throw new InvalidArgumentError('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('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.') + } + + 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.endsWith('/')) { + origin = origin.substring(0, origin.length - 1) + } + + if (path && !path.startsWith('/')) { + path = `/${path}` + } + // new URL(path, origin) is unsafe when `path` contains an absolute URL + // From https://developer.mozilla.org/en-US/docs/Web/API/URL/URL: + // If first parameter is a relative URL, second param is required, and will be used as the base URL. + // If first parameter is an absolute URL, a given second param will be ignored. + url = new URL(origin + path) + } + + 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(idx !== -1) + return host.substring(1, idx) + } + + 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 +function getServerName (host) { + if (!host) { + return null + } + + assert.strictEqual(typeof host, 'string') + + const servername = getHostname(host) + if (net.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 (stream) { + return !stream || !!(stream.destroyed || stream[kDestroyed]) +} + +function isReadableAborted (stream) { + const state = stream && stream._readableState + return isDestroyed(stream) && state && !state.endEmitted +} + +function destroy (stream, err) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) { + return + } + + if (typeof stream.destroy === 'function') { + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { + // See: https://github.com/nodejs/node/pull/38505/files + stream.socket = null + } + + stream.destroy(err) + } else if (err) { + process.nextTick((stream, err) => { + stream.emit('error', err) + }, stream, 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) * 1000 : null +} + +function parseHeaders (headers, obj = {}) { + // For H2 support + if (!Array.isArray(headers)) return headers + + for (let i = 0; i < headers.length; i += 2) { + const key = headers[i].toString().toLowerCase() + let val = obj[key] + + if (!val) { + if (Array.isArray(headers[i + 1])) { + obj[key] = headers[i + 1].map(x => x.toString('utf8')) + } else { + obj[key] = headers[i + 1].toString('utf8') + } + } else { + if (!Array.isArray(val)) { + val = [val] + obj[key] = val + } + val.push(headers[i + 1].toString('utf8')) + } + } + + // See https://github.com/nodejs/node/pull/46528 + 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) + } + } + + // See https://github.com/nodejs/node/pull/46528 + if (hasContentLength && contentDispositionIdx !== -1) { + ret[contentDispositionIdx] = Buffer.from(ret[contentDispositionIdx]).toString('latin1') + } + + return ret +} + +function isBuffer (buffer) { + // See, https://github.com/mcollina/undici/pull/319 + 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 !== undefined) { + 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') + } + } +} + +// A body is disturbed if it has been read from and it cannot +// be re-used without losing state or data. +function isDisturbed (body) { + return !!(body && ( + stream.isDisturbed + ? stream.isDisturbed(body) || body[kBodyUsed] // TODO (fix): Why is body[kBodyUsed] needed? + : body[kBodyUsed] || + body.readableDidRead || + (body._readableState && body._readableState.dataEmitted) || + isReadableAborted(body) + )) +} + +function isErrored (body) { + return !!(body && ( + stream.isErrored + ? stream.isErrored(body) + : /state: 'errored'/.test(nodeUtil.inspect(body) + ))) +} + +function isReadable (body) { + return !!(body && ( + stream.isReadable + ? stream.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 +function ReadableStreamFrom (iterable) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } + + if (ReadableStream.from) { + return ReadableStream.from(convertIterableToBuffer(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() + }) + } 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 + ) +} + +// The chunk should be a FormData instance and contains +// all the required methods. +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 (signal) { + if (!signal) { return } + if (typeof signal.throwIfAborted === 'function') { + signal.throwIfAborted() + } else { + if (signal.aborted) { + // DOMException not available < v17.0.0 + const err = new Error('The operation was aborted') + err.name = 'AbortError' + throw err + } + } +} + +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 = !!String.prototype.toWellFormed + +/** + * @param {string} val + */ +function toUSVString (val) { + if (hasToWellFormed) { + return `${val}`.toWellFormed() + } else if (nodeUtil.toUSVString) { + return nodeUtil.toUSVString(val) + } + + return `${val}` +} + +// Parsed accordingly to RFC 9110 +// https://www.rfc-editor.org/rfc/rfc9110#field.content-range +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 +} + +const kEnumerableProperty = Object.create(null) +kEnumerableProperty.enumerable = true + +module.exports = { + kEnumerableProperty, + nop, + isDisturbed, + isErrored, + isReadable, + toUSVString, + isReadableAborted, + isBlobLike, + parseOrigin, + parseURL, + getServerName, + isStream, + isIterable, + isAsyncIterable, + isDestroyed, + parseRawHeaders, + parseHeaders, + parseKeepAliveTimeout, + destroy, + bodyLength, + deepClone, + ReadableStreamFrom, + isBuffer, + validateHandler, + getSocketInfo, + isFormDataLike, + buildURL, + throwIfAborted, + addAbortListener, + parseRangeHeader, + nodeMajor, + nodeMinor, + nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), + safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] +} + + +/***/ }), + +/***/ 32426: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const Dispatcher = __nccwpck_require__(73272) +const { + ClientDestroyedError, + ClientClosedError, + InvalidArgumentError +} = __nccwpck_require__(46339) +const { kDestroy, kClose, kDispatch, kInterceptors } = __nccwpck_require__(48039) + +const kDestroyed = Symbol('destroyed') +const kClosed = Symbol('closed') +const kOnDestroyed = Symbol('onDestroyed') +const kOnClosed = Symbol('onClosed') +const kInterceptedDispatch = Symbol('Intercepted Dispatch') + +class DispatcherBase 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--) { + const interceptor = this[kInterceptors][i] + if (typeof interceptor !== 'function') { + throw new InvalidArgumentError('interceptor must be an function') + } + } + } + + this[kInterceptors] = newInterceptors + } + + close (callback) { + if (callback === undefined) { + 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) + } + } + + // Should not error. + this[kClose]() + .then(() => this.destroy()) + .then(() => { + queueMicrotask(onClosed) + }) + } + + destroy (err, callback) { + if (typeof err === 'function') { + callback = err + err = null + } + + if (callback === undefined) { + return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? /* istanbul ignore next: should never error */ 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) + } + } + + // Should not error. + 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 + + +/***/ }), + +/***/ 73272: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const EventEmitter = __nccwpck_require__(82361) + +class Dispatcher extends EventEmitter { + dispatch () { + throw new Error('not implemented') + } + + close () { + throw new Error('not implemented') + } + + destroy () { + throw new Error('not implemented') + } +} + +module.exports = Dispatcher + + +/***/ }), + +/***/ 62494: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const Busboy = __nccwpck_require__(52612) +const util = __nccwpck_require__(67468) +const { + ReadableStreamFrom, + isBlobLike, + isReadableStreamLike, + readableStreamClose, + createDeferredPromise, + fullyReadBody +} = __nccwpck_require__(79453) +const { FormData } = __nccwpck_require__(12692) +const { kState } = __nccwpck_require__(46938) +const { webidl } = __nccwpck_require__(96138) +const { DOMException, structuredClone } = __nccwpck_require__(93541) +const { Blob, File: NativeFile } = __nccwpck_require__(14300) +const { kBodyUsed } = __nccwpck_require__(48039) +const assert = __nccwpck_require__(39491) +const { isErrored } = __nccwpck_require__(67468) +const { isUint8Array, isArrayBuffer } = __nccwpck_require__(29830) +const { File: UndiciFile } = __nccwpck_require__(96670) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(50096) + +let ReadableStream = globalThis.ReadableStream + +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile +const textEncoder = new TextEncoder() +const textDecoder = new TextDecoder() + +// https://fetch.spec.whatwg.org/#concept-bodyinit-extract +function extractBody (object, keepalive = false) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } + + // 1. Let stream be null. + let stream = null + + // 2. If object is a ReadableStream object, then set stream to object. + if (object instanceof ReadableStream) { + stream = object + } else if (isBlobLike(object)) { + // 3. Otherwise, if object is a Blob object, set stream to the + // result of running object’s get stream. + stream = object.stream() + } else { + // 4. Otherwise, set stream to a new ReadableStream object, and set + // up stream. + stream = new ReadableStream({ + async pull (controller) { + controller.enqueue( + typeof source === 'string' ? textEncoder.encode(source) : source + ) + queueMicrotask(() => readableStreamClose(controller)) + }, + start () {}, + type: undefined + }) + } + + // 5. Assert: stream is a ReadableStream object. + assert(isReadableStreamLike(stream)) + + // 6. Let action be null. + let action = null + + // 7. Let source be null. + let source = null + + // 8. Let length be null. + let length = null + + // 9. Let type be null. + let type = null + + // 10. Switch on object: + if (typeof object === 'string') { + // Set source to the UTF-8 encoding of object. + // Note: setting source to a Uint8Array here breaks some mocking assumptions. + source = object + + // Set type to `text/plain;charset=UTF-8`. + type = 'text/plain;charset=UTF-8' + } else if (object instanceof URLSearchParams) { + // URLSearchParams + + // spec says to run application/x-www-form-urlencoded on body.list + // this is implemented in Node.js as apart of an URLSearchParams instance toString method + // See: https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L490 + // and https://github.com/nodejs/node/blob/e46c680bf2b211bbd52cf959ca17ee98c7f657f5/lib/internal/url.js#L1100 + + // Set source to the result of running the application/x-www-form-urlencoded serializer with object’s list. + source = object.toString() + + // Set type to `application/x-www-form-urlencoded;charset=UTF-8`. + type = 'application/x-www-form-urlencoded;charset=UTF-8' + } else if (isArrayBuffer(object)) { + // BufferSource/ArrayBuffer + + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.slice()) + } else if (ArrayBuffer.isView(object)) { + // BufferSource/ArrayBufferView + + // Set source to a copy of the bytes held by object. + source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) + } else if (util.isFormDataLike(object)) { + const boundary = `----formdata-undici-0${`${Math.floor(Math.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') + + // Set action to this step: run the multipart/form-data + // encoding algorithm, with object’s entry list and UTF-8. + // - This ensures that the body is immutable and can't be changed afterwords + // - That the content-length is calculated in advance. + // - And that all parts are pre-encoded and ready to be sent. + + const blobParts = [] + const rn = new Uint8Array([13, 10]) // '\r\n' + 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\n' + + `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}--`) + blobParts.push(chunk) + length += chunk.byteLength + if (hasUnknownSizeValue) { + length = null + } + + // Set source to object. + source = object + + action = async function * () { + for (const part of blobParts) { + if (part.stream) { + yield * part.stream() + } else { + yield part + } + } + } + + // Set type to `multipart/form-data; boundary=`, + // followed by the multipart/form-data boundary string generated + // by the multipart/form-data encoding algorithm. + type = 'multipart/form-data; boundary=' + boundary + } else if (isBlobLike(object)) { + // Blob + + // Set source to object. + source = object + + // Set length to object’s size. + length = object.size + + // If object’s type attribute is not the empty byte sequence, set + // type to its value. + if (object.type) { + type = object.type + } + } else if (typeof object[Symbol.asyncIterator] === 'function') { + // If keepalive is true, then throw a TypeError. + if (keepalive) { + throw new TypeError('keepalive') + } + + // If object is disturbed or locked, then throw a TypeError. + 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) + } + + // 11. If source is a byte sequence, then set action to a + // step that returns source and length to source’s length. + if (typeof source === 'string' || util.isBuffer(source)) { + length = Buffer.byteLength(source) + } + + // 12. If action is non-null, then run these steps in in parallel: + if (action != null) { + // Run action. + let iterator + stream = new ReadableStream({ + async start () { + iterator = action(object)[Symbol.asyncIterator]() + }, + async pull (controller) { + const { value, done } = await iterator.next() + if (done) { + // When running action is done, close stream. + queueMicrotask(() => { + controller.close() + }) + } else { + // Whenever one or more bytes are available and stream is not errored, + // enqueue a Uint8Array wrapping an ArrayBuffer containing the available + // bytes into stream. + if (!isErrored(stream)) { + controller.enqueue(new Uint8Array(value)) + } + } + return controller.desiredSize > 0 + }, + async cancel (reason) { + await iterator.return() + }, + type: undefined + }) + } + + // 13. Let body be a body whose stream is stream, source is source, + // and length is length. + const body = { stream, source, length } + + // 14. Return (body, type). + return [body, type] +} + +// https://fetch.spec.whatwg.org/#bodyinit-safely-extract +function safelyExtractBody (object, keepalive = false) { + if (!ReadableStream) { + // istanbul ignore next + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } + + // To safely extract a body and a `Content-Type` value from + // a byte sequence or BodyInit object object, run these steps: + + // 1. If object is a ReadableStream object, then: + if (object instanceof ReadableStream) { + // Assert: object is neither disturbed nor locked. + // istanbul ignore next + assert(!util.isDisturbed(object), 'The body has already been consumed.') + // istanbul ignore next + assert(!object.locked, 'The stream is locked.') + } + + // 2. Return the results of extracting object. + return extractBody(object, keepalive) +} + +function cloneBody (body) { + // To clone a body body, run these steps: + + // https://fetch.spec.whatwg.org/#concept-body-clone + + // 1. Let « out1, out2 » be the result of teeing body’s stream. + const [out1, out2] = body.stream.tee() + const out2Clone = structuredClone(out2, { transfer: [out2] }) + // This, for whatever reasons, unrefs out2Clone which allows + // the process to exit by itself. + const [, finalClone] = out2Clone.tee() + + // 2. Set body’s stream to out1. + body.stream = out1 + + // 3. Return a body whose stream is out2 and other members are copied from body. + return { + stream: finalClone, + length: body.length, + source: body.source + } +} + +async function * consumeBody (body) { + if (body) { + if (isUint8Array(body)) { + yield body + } else { + const stream = body.stream + + if (util.isDisturbed(stream)) { + throw new TypeError('The body has already been consumed.') + } + + if (stream.locked) { + throw new TypeError('The stream is locked.') + } + + // Compat. + stream[kBodyUsed] = true + + yield * stream + } + } +} + +function throwIfAborted (state) { + if (state.aborted) { + throw new DOMException('The operation was aborted.', 'AbortError') + } +} + +function bodyMixinMethods (instance) { + const methods = { + blob () { + // The blob() method steps are to return the result of + // running consume body with this and the following step + // given a byte sequence bytes: return a Blob whose + // contents are bytes and whose type attribute is this’s + // MIME type. + return specConsumeBody(this, (bytes) => { + let mimeType = bodyMimeType(this) + + if (mimeType === 'failure') { + mimeType = '' + } else if (mimeType) { + mimeType = serializeAMimeType(mimeType) + } + + // Return a Blob whose contents are bytes and type attribute + // is mimeType. + return new Blob([bytes], { type: mimeType }) + }, instance) + }, + + arrayBuffer () { + // The arrayBuffer() method steps are to return the result + // of running consume body with this and the following step + // given a byte sequence bytes: return a new ArrayBuffer + // whose contents are bytes. + return specConsumeBody(this, (bytes) => { + return new Uint8Array(bytes).buffer + }, instance) + }, + + text () { + // The text() method steps are to return the result of running + // consume body with this and UTF-8 decode. + return specConsumeBody(this, utf8DecodeBytes, instance) + }, + + json () { + // The json() method steps are to return the result of running + // consume body with this and parse JSON from bytes. + return specConsumeBody(this, parseJSONFromBytes, instance) + }, + + async formData () { + webidl.brandCheck(this, instance) + + throwIfAborted(this[kState]) + + const contentType = this.headers.get('Content-Type') + + // If mimeType’s essence is "multipart/form-data", then: + if (/multipart\/form-data/.test(contentType)) { + const headers = {} + for (const [key, value] of this.headers) headers[key.toLowerCase()] = value + + const responseFormData = new FormData() + + let busboy + + try { + busboy = new Busboy({ + headers, + preservePath: true + }) + } catch (err) { + throw new DOMException(`${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].body)) busboy.write(chunk) + busboy.end() + await busboyResolve + + return responseFormData + } else if (/application\/x-www-form-urlencoded/.test(contentType)) { + // Otherwise, if mimeType’s essence is "application/x-www-form-urlencoded", then: + + // 1. Let entries be the result of parsing bytes. + let entries + try { + let text = '' + // application/x-www-form-urlencoded parser will keep the BOM. + // https://url.spec.whatwg.org/#concept-urlencoded-parser + // Note that streaming decoder is stateful and cannot be reused + const streamingDecoder = new TextDecoder('utf-8', { ignoreBOM: true }) + + for await (const chunk of consumeBody(this[kState].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. + // 2. If entries is failure, then throw a TypeError. + throw Object.assign(new TypeError(), { cause: err }) + } + + // 3. Return a new FormData object whose entries are entries. + const formData = new FormData() + for (const [name, value] of entries) { + formData.append(name, value) + } + return formData + } else { + // Wait a tick before checking if the request has been aborted. + // Otherwise, a TypeError can be thrown when an AbortError should. + await Promise.resolve() + + throwIfAborted(this[kState]) + + // Otherwise, throw a TypeError. + throw webidl.errors.exception({ + header: `${instance.name}.formData`, + message: 'Could not parse content as FormData.' + }) + } + } + } + + return methods +} + +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 specConsumeBody (object, convertBytesToJSValue, instance) { + webidl.brandCheck(object, instance) + + throwIfAborted(object[kState]) + + // 1. If object is unusable, then return a promise rejected + // with a TypeError. + if (bodyUnusable(object[kState].body)) { + throw new TypeError('Body is unusable') + } + + // 2. Let promise be a new promise. + const promise = createDeferredPromise() + + // 3. Let errorSteps given error be to reject promise with error. + const errorSteps = (error) => promise.reject(error) + + // 4. Let successSteps given a byte sequence data be to resolve + // promise with the result of running convertBytesToJSValue + // with data. If that threw an exception, then run errorSteps + // with that exception. + const successSteps = (data) => { + try { + promise.resolve(convertBytesToJSValue(data)) + } catch (e) { + errorSteps(e) + } + } + + // 5. If object’s body is null, then run successSteps with an + // empty byte sequence. + if (object[kState].body == null) { + successSteps(new Uint8Array()) + return promise.promise + } + + // 6. Otherwise, fully read object’s body given successSteps, + // errorSteps, and object’s relevant global object. + await fullyReadBody(object[kState].body, successSteps, errorSteps) + + // 7. Return promise. + return promise.promise +} + +// https://fetch.spec.whatwg.org/#body-unusable +function bodyUnusable (body) { + // An object including the Body interface mixin is + // said to be unusable if its body is non-null and + // its body’s stream is disturbed or locked. + return body != null && (body.stream.locked || util.isDisturbed(body.stream)) +} + +/** + * @see https://encoding.spec.whatwg.org/#utf-8-decode + * @param {Buffer} buffer + */ +function utf8DecodeBytes (buffer) { + if (buffer.length === 0) { + return '' + } + + // 1. Let buffer be the result of peeking three bytes from + // ioQueue, converted to a byte sequence. + + // 2. If buffer is 0xEF 0xBB 0xBF, then read three + // bytes from ioQueue. (Do nothing with those bytes.) + if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { + buffer = buffer.subarray(3) + } + + // 3. Process a queue with an instance of UTF-8’s + // decoder, ioQueue, output, and "replacement". + const output = textDecoder.decode(buffer) + + // 4. Return output. + 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] + const contentType = headersList.get('content-type') + + if (contentType === null) { + return 'failure' + } + + return parseMIMEType(contentType) +} + +module.exports = { + extractBody, + safelyExtractBody, + cloneBody, + mixinBody +} + + +/***/ }), + +/***/ 93541: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { MessageChannel, receiveMessageOnPort } = __nccwpck_require__(71267) + +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) + +// 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', '5060', '5061', '6000', '6566', '6665', '6666', '6667', '6668', '6669', '6697', + '10080' +] + +const badPortsSet = new Set(badPorts) + +// 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' +] + +// https://fetch.spec.whatwg.org/#request-body-header-name +const requestBodyHeader = [ + 'content-encoding', + 'content-language', + 'content-location', + 'content-type', + // See https://github.com/nodejs/undici/issues/2021 + // 'Content-Length' is a forbidden header name, which is typically + // removed in the Headers implementation. However, undici doesn't + // filter out headers, so we add it here. + 'content-length' +] + +// https://fetch.spec.whatwg.org/#enumdef-requestduplex +const requestDuplex = [ + 'half' +] + +// 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) + +/** @type {globalThis['DOMException']} */ +const DOMException = globalThis.DOMException ?? (() => { + // DOMException was only made a global in Node v17.0.0, + // but fetch supports >= v16.8. + try { + atob('~') + } catch (err) { + return Object.getPrototypeOf(err).constructor + } +})() + +let channel + +/** @type {globalThis['structuredClone']} */ +const structuredClone = + globalThis.structuredClone ?? + // https://github.com/nodejs/node/blob/b27ae24dcc4251bad726d9d84baf678d1f707fed/lib/internal/structured_clone.js + // structuredClone was added in v17.0.0, but fetch supports v16.8 + function structuredClone (value, options = undefined) { + 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, + structuredClone, + subresource, + forbiddenMethods, + requestBodyHeader, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + redirectStatus, + corsSafeListedMethods, + nullBodyStatus, + safeMethods, + badPorts, + requestDuplex, + subresourceSet, + badPortsSet, + redirectStatusSet, + corsSafeListedMethodsSet, + safeMethodsSet, + forbiddenMethodsSet, + referrerPolicySet +} + + +/***/ }), + +/***/ 50096: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const assert = __nccwpck_require__(39491) +const { atob } = __nccwpck_require__(14300) +const { isomorphicDecode } = __nccwpck_require__(79453) + +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)/ // eslint-disable-line +/** + * @see https://mimesniff.spec.whatwg.org/#http-quoted-string-token-code-point + */ +const HTTP_QUOTED_STRING_TOKENS = /[\u0009|\u0020-\u007E|\u0080-\u00FF]/ // eslint-disable-line + +// https://fetch.spec.whatwg.org/#data-url-processor +/** @param {URL} dataURL */ +function dataURLProcessor (dataURL) { + // 1. Assert: dataURL’s scheme is "data". + assert(dataURL.protocol === 'data:') + + // 2. Let input be the result of running the URL + // serializer on dataURL with exclude fragment + // set to true. + let input = URLSerializer(dataURL, true) + + // 3. Remove the leading "data:" string from input. + input = input.slice(5) + + // 4. Let position point at the start of input. + const position = { position: 0 } + + // 5. Let mimeType be the result of collecting a + // sequence of code points that are not equal + // to U+002C (,), given position. + let mimeType = collectASequenceOfCodePointsFast( + ',', + input, + position + ) + + // 6. Strip leading and trailing ASCII whitespace + // from mimeType. + // Undici implementation note: we need to store the + // length because if the mimetype has spaces removed, + // the wrong amount will be sliced from the input in + // step #9 + const mimeTypeLength = mimeType.length + mimeType = removeASCIIWhitespace(mimeType, true, true) + + // 7. If position is past the end of input, then + // return failure + if (position.position >= input.length) { + return 'failure' + } + + // 8. Advance position by 1. + position.position++ + + // 9. Let encodedBody be the remainder of input. + const encodedBody = input.slice(mimeTypeLength + 1) + + // 10. Let body be the percent-decoding of encodedBody. + let body = stringPercentDecode(encodedBody) + + // 11. If mimeType ends with U+003B (;), followed by + // zero or more U+0020 SPACE, followed by an ASCII + // case-insensitive match for "base64", then: + if (/;(\u0020){0,}base64$/i.test(mimeType)) { + // 1. Let stringBody be the isomorphic decode of body. + const stringBody = isomorphicDecode(body) + + // 2. Set body to the forgiving-base64 decode of + // stringBody. + body = forgivingBase64(stringBody) + + // 3. If body is failure, then return failure. + if (body === 'failure') { + return 'failure' + } + + // 4. Remove the last 6 code points from mimeType. + mimeType = mimeType.slice(0, -6) + + // 5. Remove trailing U+0020 SPACE code points from mimeType, + // if any. + mimeType = mimeType.replace(/(\u0020)+$/, '') + + // 6. Remove the last U+003B (;) code point from mimeType. + mimeType = mimeType.slice(0, -1) + } + + // 12. If mimeType starts with U+003B (;), then prepend + // "text/plain" to mimeType. + if (mimeType.startsWith(';')) { + mimeType = 'text/plain' + mimeType + } + + // 13. Let mimeTypeRecord be the result of parsing + // mimeType. + let mimeTypeRecord = parseMIMEType(mimeType) + + // 14. If mimeTypeRecord is failure, then set + // mimeTypeRecord to text/plain;charset=US-ASCII. + if (mimeTypeRecord === 'failure') { + mimeTypeRecord = parseMIMEType('text/plain;charset=US-ASCII') + } + + // 15. Return a new data: URL struct whose MIME + // type is mimeTypeRecord and body is body. + // https://fetch.spec.whatwg.org/#data-url-struct + return { mimeType: mimeTypeRecord, body } +} + +// https://url.spec.whatwg.org/#concept-url-serializer +/** + * @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 + + return hashLength === 0 ? href : href.substring(0, href.length - hashLength) +} + +// https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points +/** + * @param {(char: string) => boolean} condition + * @param {string} input + * @param {{ position: number }} position + */ +function collectASequenceOfCodePoints (condition, input, position) { + // 1. Let result be the empty string. + let result = '' + + // 2. While position doesn’t point past the end of input and the + // code point at position within input meets the condition condition: + while (position.position < input.length && condition(input[position.position])) { + // 1. Append that code point to the end of result. + result += input[position.position] + + // 2. Advance position by 1. + position.position++ + } + + // 3. Return result. + 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) +} + +// https://url.spec.whatwg.org/#string-percent-decode +/** @param {string} input */ +function stringPercentDecode (input) { + // 1. Let bytes be the UTF-8 encoding of input. + const bytes = encoder.encode(input) + + // 2. Return the percent-decoding of bytes. + return percentDecode(bytes) +} + +// https://url.spec.whatwg.org/#percent-decode +/** @param {Uint8Array} input */ +function percentDecode (input) { + // 1. Let output be an empty byte sequence. + /** @type {number[]} */ + const output = [] + + // 2. For each byte byte in input: + for (let i = 0; i < input.length; i++) { + const byte = input[i] + + // 1. If byte is not 0x25 (%), then append byte to output. + if (byte !== 0x25) { + output.push(byte) + + // 2. Otherwise, if byte is 0x25 (%) and the next two bytes + // after byte in input are not in the ranges + // 0x30 (0) to 0x39 (9), 0x41 (A) to 0x46 (F), + // and 0x61 (a) to 0x66 (f), all inclusive, append byte + // to output. + } else if ( + byte === 0x25 && + !/^[0-9A-Fa-f]{2}$/i.test(String.fromCharCode(input[i + 1], input[i + 2])) + ) { + output.push(0x25) + + // 3. Otherwise: + } else { + // 1. Let bytePoint be the two bytes after byte in input, + // decoded, and then interpreted as hexadecimal number. + const nextTwoBytes = String.fromCharCode(input[i + 1], input[i + 2]) + const bytePoint = Number.parseInt(nextTwoBytes, 16) + + // 2. Append a byte whose value is bytePoint to output. + output.push(bytePoint) + + // 3. Skip the next two bytes in input. + i += 2 + } + } + + // 3. Return output. + return Uint8Array.from(output) +} + +// https://mimesniff.spec.whatwg.org/#parse-a-mime-type +/** @param {string} input */ +function parseMIMEType (input) { + // 1. Remove any leading and trailing HTTP whitespace + // from input. + input = removeHTTPWhitespace(input, true, true) + + // 2. Let position be a position variable for input, + // initially pointing at the start of input. + const position = { position: 0 } + + // 3. Let type be the result of collecting a sequence + // of code points that are not U+002F (/) from + // input, given position. + const type = collectASequenceOfCodePointsFast( + '/', + input, + position + ) + + // 4. If type is the empty string or does not solely + // contain HTTP token code points, then return failure. + // https://mimesniff.spec.whatwg.org/#http-token-code-point + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { + return 'failure' + } + + // 5. If position is past the end of input, then return + // failure + if (position.position > input.length) { + return 'failure' + } + + // 6. Advance position by 1. (This skips past U+002F (/).) + position.position++ + + // 7. Let subtype be the result of collecting a sequence of + // code points that are not U+003B (;) from input, given + // position. + let subtype = collectASequenceOfCodePointsFast( + ';', + input, + position + ) + + // 8. Remove any trailing HTTP whitespace from subtype. + subtype = removeHTTPWhitespace(subtype, false, true) + + // 9. If subtype is the empty string or does not solely + // contain HTTP token code points, then return failure. + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { + return 'failure' + } + + const typeLowercase = type.toLowerCase() + const subtypeLowercase = subtype.toLowerCase() + + // 10. Let mimeType be a new MIME type record whose type + // is type, in ASCII lowercase, and subtype is subtype, + // in ASCII lowercase. + // https://mimesniff.spec.whatwg.org/#mime-type + const mimeType = { + type: typeLowercase, + subtype: subtypeLowercase, + /** @type {Map} */ + parameters: new Map(), + // https://mimesniff.spec.whatwg.org/#mime-type-essence + essence: `${typeLowercase}/${subtypeLowercase}` + } + + // 11. While position is not past the end of input: + while (position.position < input.length) { + // 1. Advance position by 1. (This skips past U+003B (;).) + position.position++ + + // 2. Collect a sequence of code points that are HTTP + // whitespace from input given position. + collectASequenceOfCodePoints( + // https://fetch.spec.whatwg.org/#http-whitespace + char => HTTP_WHITESPACE_REGEX.test(char), + input, + position + ) + + // 3. Let parameterName be the result of collecting a + // sequence of code points that are not U+003B (;) + // or U+003D (=) from input, given position. + let parameterName = collectASequenceOfCodePoints( + (char) => char !== ';' && char !== '=', + input, + position + ) + + // 4. Set parameterName to parameterName, in ASCII + // lowercase. + parameterName = parameterName.toLowerCase() + + // 5. If position is not past the end of input, then: + if (position.position < input.length) { + // 1. If the code point at position within input is + // U+003B (;), then continue. + if (input[position.position] === ';') { + continue + } + + // 2. Advance position by 1. (This skips past U+003D (=).) + position.position++ + } + + // 6. If position is past the end of input, then break. + if (position.position > input.length) { + break + } + + // 7. Let parameterValue be null. + let parameterValue = null + + // 8. If the code point at position within input is + // U+0022 ("), then: + if (input[position.position] === '"') { + // 1. Set parameterValue to the result of collecting + // an HTTP quoted string from input, given position + // and the extract-value flag. + parameterValue = collectAnHTTPQuotedString(input, position, true) + + // 2. Collect a sequence of code points that are not + // U+003B (;) from input, given position. + collectASequenceOfCodePointsFast( + ';', + input, + position + ) + + // 9. Otherwise: + } else { + // 1. Set parameterValue to the result of collecting + // a sequence of code points that are not U+003B (;) + // from input, given position. + parameterValue = collectASequenceOfCodePointsFast( + ';', + input, + position + ) + + // 2. Remove any trailing HTTP whitespace from parameterValue. + parameterValue = removeHTTPWhitespace(parameterValue, false, true) + + // 3. If parameterValue is the empty string, then continue. + if (parameterValue.length === 0) { + continue + } + } + + // 10. If all of the following are true + // - parameterName is not the empty string + // - parameterName solely contains HTTP token code points + // - parameterValue solely contains HTTP quoted-string token code points + // - mimeType’s parameters[parameterName] does not exist + // then set mimeType’s parameters[parameterName] to parameterValue. + 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) + } + } + + // 12. Return mimeType. + return mimeType +} + +// https://infra.spec.whatwg.org/#forgiving-base64-decode +/** @param {string} data */ +function forgivingBase64 (data) { + // 1. Remove all ASCII whitespace from data. + data = data.replace(/[\u0009\u000A\u000C\u000D\u0020]/g, '') // eslint-disable-line + + // 2. If data’s code point length divides by 4 leaving + // no remainder, then: + if (data.length % 4 === 0) { + // 1. If data ends with one or two U+003D (=) code points, + // then remove them from data. + data = data.replace(/=?=$/, '') + } + + // 3. If data’s code point length divides by 4 leaving + // a remainder of 1, then return failure. + if (data.length % 4 === 1) { + return 'failure' + } + + // 4. If data contains a code point that is not one of + // U+002B (+) + // U+002F (/) + // ASCII alphanumeric + // then return failure. + if (/[^+/0-9A-Za-z]/.test(data)) { + return 'failure' + } + + const binary = atob(data) + const bytes = new Uint8Array(binary.length) + + for (let byte = 0; byte < binary.length; byte++) { + bytes[byte] = binary.charCodeAt(byte) + } + + return bytes +} + +// https://fetch.spec.whatwg.org/#collect-an-http-quoted-string +// tests: https://fetch.spec.whatwg.org/#example-http-quoted-string +/** + * @param {string} input + * @param {{ position: number }} position + * @param {boolean?} extractValue + */ +function collectAnHTTPQuotedString (input, position, extractValue) { + // 1. Let positionStart be position. + const positionStart = position.position + + // 2. Let value be the empty string. + let value = '' + + // 3. Assert: the code point at position within input + // is U+0022 ("). + assert(input[position.position] === '"') + + // 4. Advance position by 1. + position.position++ + + // 5. While true: + while (true) { + // 1. Append the result of collecting a sequence of code points + // that are not U+0022 (") or U+005C (\) from input, given + // position, to value. + value += collectASequenceOfCodePoints( + (char) => char !== '"' && char !== '\\', + input, + position + ) + + // 2. If position is past the end of input, then break. + if (position.position >= input.length) { + break + } + + // 3. Let quoteOrBackslash be the code point at position within + // input. + const quoteOrBackslash = input[position.position] + + // 4. Advance position by 1. + position.position++ + + // 5. If quoteOrBackslash is U+005C (\), then: + if (quoteOrBackslash === '\\') { + // 1. If position is past the end of input, then append + // U+005C (\) to value and break. + if (position.position >= input.length) { + value += '\\' + break + } + + // 2. Append the code point at position within input to value. + value += input[position.position] + + // 3. Advance position by 1. + position.position++ + + // 6. Otherwise: + } else { + // 1. Assert: quoteOrBackslash is U+0022 ("). + assert(quoteOrBackslash === '"') + + // 2. Break. + break + } + } + + // 6. If the extract-value flag is set, then return value. + if (extractValue) { + return value + } + + // 7. Return the code points from positionStart to position, + // inclusive, within input. + return input.slice(positionStart, position.position) +} + +/** + * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type + */ +function serializeAMimeType (mimeType) { + assert(mimeType !== 'failure') + const { parameters, essence } = mimeType + + // 1. Let serialization be the concatenation of mimeType’s + // type, U+002F (/), and mimeType’s subtype. + let serialization = essence + + // 2. For each name → value of mimeType’s parameters: + for (let [name, value] of parameters.entries()) { + // 1. Append U+003B (;) to serialization. + serialization += ';' + + // 2. Append name to serialization. + serialization += name + + // 3. Append U+003D (=) to serialization. + serialization += '=' + + // 4. If value does not solely contain HTTP token code + // points or value is the empty string, then: + if (!HTTP_TOKEN_CODEPOINTS.test(value)) { + // 1. Precede each occurence of U+0022 (") or + // U+005C (\) in value with U+005C (\). + value = value.replace(/(\\|")/g, '\\$1') + + // 2. Prepend U+0022 (") to value. + value = '"' + value + + // 3. Append U+0022 (") to value. + value += '"' + } + + // 5. Append value to serialization. + serialization += value + } + + // 3. Return serialization. + return serialization +} + +/** + * @see https://fetch.spec.whatwg.org/#http-whitespace + * @param {string} char + */ +function isHTTPWhiteSpace (char) { + return char === '\r' || char === '\n' || char === '\t' || 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 === '\t' || 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, + URLSerializer, + collectASequenceOfCodePoints, + collectASequenceOfCodePointsFast, + stringPercentDecode, + parseMIMEType, + collectAnHTTPQuotedString, + serializeAMimeType +} + + +/***/ }), + +/***/ 96670: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { Blob, File: NativeFile } = __nccwpck_require__(14300) +const { types } = __nccwpck_require__(73837) +const { kState } = __nccwpck_require__(46938) +const { isBlobLike } = __nccwpck_require__(79453) +const { webidl } = __nccwpck_require__(96138) +const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(50096) +const { kEnumerableProperty } = __nccwpck_require__(67468) +const encoder = new TextEncoder() + +class File extends Blob { + constructor (fileBits, fileName, options = {}) { + // The File constructor is invoked with two or three parameters, depending + // on whether the optional dictionary parameter is used. When the File() + // constructor is invoked, user agents must run the following steps: + webidl.argumentLengthCheck(arguments, 2, { header: 'File constructor' }) + + fileBits = webidl.converters['sequence'](fileBits) + fileName = webidl.converters.USVString(fileName) + options = webidl.converters.FilePropertyBag(options) + + // 1. Let bytes be the result of processing blob parts given fileBits and + // options. + // Note: Blob handles this for us + + // 2. Let n be the fileName argument to the constructor. + const n = fileName + + // 3. Process FilePropertyBag dictionary argument by running the following + // substeps: + + // 1. If the type member is provided and is not the empty string, let t + // be set to the type dictionary member. If t contains any characters + // outside the range U+0020 to U+007E, then set t to the empty string + // and return from these substeps. + // 2. Convert every character in t to ASCII lowercase. + let t = options.type + let d + + // eslint-disable-next-line no-labels + substep: { + if (t) { + t = parseMIMEType(t) + + if (t === 'failure') { + t = '' + // eslint-disable-next-line no-labels + break substep + } + + t = serializeAMimeType(t).toLowerCase() + } + + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + d = options.lastModified + } + + // 4. Return a new File object F such that: + // F refers to the bytes byte sequence. + // F.size is set to the number of total bytes in bytes. + // F.name is set to n. + // F.type is set to t. + // F.lastModified is set to d. + + super(processBlobParts(fileBits, options), { type: t }) + this[kState] = { + name: n, + lastModified: d, + type: t + } + } + + get name () { + webidl.brandCheck(this, File) + + return this[kState].name + } + + get lastModified () { + webidl.brandCheck(this, File) + + return this[kState].lastModified + } + + get type () { + webidl.brandCheck(this, File) + + return this[kState].type + } +} + +class FileLike { + constructor (blobLike, fileName, options = {}) { + // TODO: argument idl type check + + // The File constructor is invoked with two or three parameters, depending + // on whether the optional dictionary parameter is used. When the File() + // constructor is invoked, user agents must run the following steps: + + // 1. Let bytes be the result of processing blob parts given fileBits and + // options. + + // 2. Let n be the fileName argument to the constructor. + const n = fileName + + // 3. Process FilePropertyBag dictionary argument by running the following + // substeps: + + // 1. If the type member is provided and is not the empty string, let t + // be set to the type dictionary member. If t contains any characters + // outside the range U+0020 to U+007E, then set t to the empty string + // and return from these substeps. + // TODO + const t = options.type + + // 2. Convert every character in t to ASCII lowercase. + // TODO + + // 3. If the lastModified member is provided, let d be set to the + // lastModified dictionary member. If it is not provided, set d to the + // current date and time represented as the number of milliseconds since + // the Unix Epoch (which is the equivalent of Date.now() [ECMA-262]). + const d = options.lastModified ?? Date.now() + + // 4. Return a new File object F such that: + // F refers to the bytes byte sequence. + // F.size is set to the number of total bytes in bytes. + // F.name is set to n. + // F.type is set to t. + // F.lastModified is set to d. + + this[kState] = { + blobLike, + name: n, + type: t, + lastModified: d + } + } + + 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' + } +} + +Object.defineProperties(File.prototype, { + [Symbol.toStringTag]: { + value: 'File', + configurable: true + }, + name: kEnumerableProperty, + lastModified: kEnumerableProperty +}) + +webidl.converters.Blob = webidl.interfaceConverter(Blob) + +webidl.converters.BlobPart = function (V, opts) { + 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, opts) + } + } + + return webidl.converters.USVString(V, opts) +} + +webidl.converters['sequence'] = webidl.sequenceConverter( + webidl.converters.BlobPart +) + +// https://www.w3.org/TR/FileAPI/#dfn-FilePropertyBag +webidl.converters.FilePropertyBag = webidl.dictionaryConverter([ + { + key: 'lastModified', + converter: webidl.converters['long long'], + get defaultValue () { + return Date.now() + } + }, + { + key: 'type', + converter: webidl.converters.DOMString, + defaultValue: '' + }, + { + key: 'endings', + converter: (value) => { + value = webidl.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) { + // 1. Let bytes be an empty sequence of bytes. + /** @type {NodeJS.TypedArray[]} */ + const bytes = [] + + // 2. For each element in parts: + for (const element of parts) { + // 1. If element is a USVString, run the following substeps: + if (typeof element === 'string') { + // 1. Let s be element. + let s = element + + // 2. If the endings member of options is "native", set s + // to the result of converting line endings to native + // of element. + if (options.endings === 'native') { + s = convertLineEndingsNative(s) + } + + // 3. Append the result of UTF-8 encoding s to bytes. + bytes.push(encoder.encode(s)) + } else if ( + types.isAnyArrayBuffer(element) || + types.isTypedArray(element) + ) { + // 2. If element is a BufferSource, get a copy of the + // bytes held by the buffer source, and append those + // bytes to bytes. + if (!element.buffer) { // ArrayBuffer + bytes.push(new Uint8Array(element)) + } else { + bytes.push( + new Uint8Array(element.buffer, element.byteOffset, element.byteLength) + ) + } + } else if (isBlobLike(element)) { + // 3. If element is a Blob, append the bytes it represents + // to bytes. + bytes.push(element) + } + } + + // 3. Return bytes. + return bytes +} + +/** + * @see https://www.w3.org/TR/FileAPI/#convert-line-endings-to-native + * @param {string} s + */ +function convertLineEndingsNative (s) { + // 1. Let native line ending be be the code point U+000A LF. + let nativeLineEnding = '\n' + + // 2. If the underlying platform’s conventions are to + // represent newlines as a carriage return and line feed + // sequence, set native line ending to the code point + // U+000D CR followed by the code point U+000A LF. + if (process.platform === 'win32') { + nativeLineEnding = '\r\n' + } + + return s.replace(/\r?\n/g, nativeLineEnding) +} + +// If this function is moved to ./util.js, some tools (such as +// rollup) will warn about circular dependencies. See: +// https://github.com/nodejs/undici/issues/1629 +function isFileLike (object) { + return ( + (NativeFile && object instanceof NativeFile) || + object instanceof File || ( + object && + (typeof object.stream === 'function' || + typeof object.arrayBuffer === 'function') && + object[Symbol.toStringTag] === 'File' + ) + ) +} + +module.exports = { File, FileLike, isFileLike } + + +/***/ }), + +/***/ 12692: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { isBlobLike, toUSVString, makeIterator } = __nccwpck_require__(79453) +const { kState } = __nccwpck_require__(46938) +const { File: UndiciFile, FileLike, isFileLike } = __nccwpck_require__(96670) +const { webidl } = __nccwpck_require__(96138) +const { Blob, File: NativeFile } = __nccwpck_require__(14300) + +/** @type {globalThis['File']} */ +const File = NativeFile ?? UndiciFile + +// https://xhr.spec.whatwg.org/#formdata +class FormData { + constructor (form) { + if (form !== undefined) { + throw webidl.errors.conversionFailed({ + prefix: 'FormData constructor', + argument: 'Argument 1', + types: ['undefined'] + }) + } + + this[kState] = [] + } + + append (name, value, filename = undefined) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.append' }) + + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'" + ) + } + + // 1. Let value be value if given; otherwise blobValue. + + name = webidl.converters.USVString(name) + value = isBlobLike(value) + ? webidl.converters.Blob(value, { strict: false }) + : webidl.converters.USVString(value) + filename = arguments.length === 3 + ? webidl.converters.USVString(filename) + : undefined + + // 2. Let entry be the result of creating an entry with + // name, value, and filename if given. + const entry = makeEntry(name, value, filename) + + // 3. Append entry to this’s entry list. + this[kState].push(entry) + } + + delete (name) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.delete' }) + + name = webidl.converters.USVString(name) + + // The delete(name) method steps are to remove all entries whose name + // is name from this’s entry list. + this[kState] = this[kState].filter(entry => entry.name !== name) + } + + get (name) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.get' }) + + name = webidl.converters.USVString(name) + + // 1. If there is no entry whose name is name in this’s entry list, + // then return null. + const idx = this[kState].findIndex((entry) => entry.name === name) + if (idx === -1) { + return null + } + + // 2. Return the value of the first entry whose name is name from + // this’s entry list. + return this[kState][idx].value + } + + getAll (name) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.getAll' }) + + name = webidl.converters.USVString(name) + + // 1. If there is no entry whose name is name in this’s entry list, + // then return the empty list. + // 2. Return the values of all entries whose name is name, in order, + // from this’s entry list. + return this[kState] + .filter((entry) => entry.name === name) + .map((entry) => entry.value) + } + + has (name) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FormData.has' }) + + name = webidl.converters.USVString(name) + + // The has(name) method steps are to return true if there is an entry + // whose name is name in this’s entry list; otherwise false. + return this[kState].findIndex((entry) => entry.name === name) !== -1 + } + + set (name, value, filename = undefined) { + webidl.brandCheck(this, FormData) + + webidl.argumentLengthCheck(arguments, 2, { header: 'FormData.set' }) + + if (arguments.length === 3 && !isBlobLike(value)) { + throw new TypeError( + "Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'" + ) + } + + // The set(name, value) and set(name, blobValue, filename) method steps + // are: + + // 1. Let value be value if given; otherwise blobValue. + + name = webidl.converters.USVString(name) + value = isBlobLike(value) + ? webidl.converters.Blob(value, { strict: false }) + : webidl.converters.USVString(value) + filename = arguments.length === 3 + ? toUSVString(filename) + : undefined + + // 2. Let entry be the result of creating an entry with name, value, and + // filename if given. + const entry = makeEntry(name, value, filename) + + // 3. If there are entries in this’s entry list whose name is name, then + // replace the first such entry with entry and remove the others. + 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 { + // 4. Otherwise, append entry to this’s entry list. + this[kState].push(entry) + } + } + + entries () { + webidl.brandCheck(this, FormData) + + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key+value' + ) + } + + keys () { + webidl.brandCheck(this, FormData) + + return makeIterator( + () => this[kState].map(pair => [pair.name, pair.value]), + 'FormData', + 'key' + ) + } + + values () { + webidl.brandCheck(this, FormData) + + return makeIterator( + () => this[kState].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.brandCheck(this, FormData) + + webidl.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.prototype[Symbol.iterator] = FormData.prototype.entries + +Object.defineProperties(FormData.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) { + // 1. Set name to the result of converting name into a scalar value string. + // "To convert a string into a scalar value string, replace any surrogates + // with U+FFFD." + // see: https://nodejs.org/dist/latest-v18.x/docs/api/buffer.html#buftostringencoding-start-end + name = Buffer.from(name).toString('utf8') + + // 2. If value is a string, then set value to the result of converting + // value into a scalar value string. + if (typeof value === 'string') { + value = Buffer.from(value).toString('utf8') + } else { + // 3. Otherwise: + + // 1. If value is not a File object, then set value to a new File object, + // representing the same bytes, whose name attribute value is "blob" + if (!isFileLike(value)) { + value = value instanceof Blob + ? new File([value], 'blob', { type: value.type }) + : new FileLike(value, 'blob', { type: value.type }) + } + + // 2. If filename is given, then set value to a new File object, + // representing the same bytes, whose name attribute is filename. + if (filename !== undefined) { + /** @type {FilePropertyBag} */ + const options = { + type: value.type, + lastModified: value.lastModified + } + + value = (NativeFile && value instanceof NativeFile) || value instanceof UndiciFile + ? new File([value], filename, options) + : new FileLike(value, filename, options) + } + } + + // 4. Return an entry whose name is name and whose value is value. + return { name, value } +} + +module.exports = { FormData } + + +/***/ }), + +/***/ 64110: +/***/ ((module) => { + + + +// In case of breaking changes, increase the version +// number to avoid conflicts. +const globalOrigin = Symbol.for('undici.globalOrigin.1') + +function getGlobalOrigin () { + return globalThis[globalOrigin] +} + +function setGlobalOrigin (newOrigin) { + if (newOrigin === undefined) { + Object.defineProperty(globalThis, globalOrigin, { + value: undefined, + 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 +} + + +/***/ }), + +/***/ 23245: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// https://github.com/Ethan-Arrowood/undici-fetch + + + +const { kHeadersList, kConstruct } = __nccwpck_require__(48039) +const { kGuard } = __nccwpck_require__(46938) +const { kEnumerableProperty } = __nccwpck_require__(67468) +const { + makeIterator, + isValidHeaderName, + isValidHeaderValue +} = __nccwpck_require__(79453) +const { webidl } = __nccwpck_require__(96138) +const assert = __nccwpck_require__(39491) + +const kHeadersMap = Symbol('headers map') +const kHeadersSortedMap = Symbol('headers map sorted') + +/** + * @param {number} code + */ +function isHTTPWhiteSpaceCharCode (code) { + return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 +} + +/** + * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize + * @param {string} potentialValue + */ +function headerValueNormalize (potentialValue) { + // To normalize a byte sequence potentialValue, remove + // any leading and trailing HTTP whitespace bytes from + // 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) { + // To fill a Headers object headers with a given object object, run these steps: + + // 1. If object is a sequence, then for each header in object: + // Note: webidl conversion to array has already been done. + if (Array.isArray(object)) { + for (let i = 0; i < object.length; ++i) { + const header = object[i] + // 1. If header does not contain exactly two items, then throw a TypeError. + if (header.length !== 2) { + throw webidl.errors.exception({ + header: 'Headers constructor', + message: `expected name/value pair to be length 2, found ${header.length}.` + }) + } + + // 2. Append (header’s first item, header’s second item) to headers. + appendHeader(headers, header[0], header[1]) + } + } else if (typeof object === 'object' && object !== null) { + // Note: null should throw + + // 2. Otherwise, object is a record, then for each key → value in object, + // append (key, value) to headers + 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) { + // 1. Normalize value. + value = headerValueNormalize(value) + + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + 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' + }) + } + + // 3. If headers’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if headers’s guard is "request" and name is a + // forbidden header name, return. + // Note: undici does not implement forbidden header names + if (headers[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (headers[kGuard] === 'request-no-cors') { + // 5. Otherwise, if headers’s guard is "request-no-cors": + // TODO + } + + // 6. Otherwise, if headers’s guard is "response" and name is a + // forbidden response-header name, return. + + // 7. Append (name, value) to headers’s header list. + return headers[kHeadersList].append(name, value) + + // 8. If headers’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from headers +} + +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 + } + } + + // https://fetch.spec.whatwg.org/#header-list-contains + contains (name) { + // A header list list contains a header name name if list + // contains a header whose name is a byte-case-insensitive + // match for name. + name = name.toLowerCase() + + return this[kHeadersMap].has(name) + } + + clear () { + this[kHeadersMap].clear() + this[kHeadersSortedMap] = null + this.cookies = null + } + + // https://fetch.spec.whatwg.org/#concept-header-list-append + append (name, value) { + this[kHeadersSortedMap] = null + + // 1. If list contains name, then set name to the first such + // header’s name. + const lowercaseName = name.toLowerCase() + const exists = this[kHeadersMap].get(lowercaseName) + + // 2. Append (name, value) to list. + 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 ??= [] + this.cookies.push(value) + } + } + + // https://fetch.spec.whatwg.org/#concept-header-list-set + set (name, value) { + this[kHeadersSortedMap] = null + const lowercaseName = name.toLowerCase() + + if (lowercaseName === 'set-cookie') { + this.cookies = [value] + } + + // 1. If list contains name, then set the value of + // the first such header to value and remove the + // others. + // 2. Otherwise, append header (name, value) to list. + this[kHeadersMap].set(lowercaseName, { name, value }) + } + + // https://fetch.spec.whatwg.org/#concept-header-list-delete + delete (name) { + this[kHeadersSortedMap] = null + + name = name.toLowerCase() + + if (name === 'set-cookie') { + this.cookies = null + } + + this[kHeadersMap].delete(name) + } + + // https://fetch.spec.whatwg.org/#concept-header-list-get + get (name) { + const value = this[kHeadersMap].get(name.toLowerCase()) + + // 1. If list does not contain name, then return null. + // 2. Return the values of all headers in list whose name + // is a byte-case-insensitive match for name, + // separated from each other by 0x2C 0x20, in order. + return value === undefined ? null : value.value + } + + * [Symbol.iterator] () { + // use the lowercased name + 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 + } +} + +// https://fetch.spec.whatwg.org/#headers-class +class Headers { + constructor (init = undefined) { + if (init === kConstruct) { + return + } + this[kHeadersList] = new HeadersList() + + // The new Headers(init) constructor steps are: + + // 1. Set this’s guard to "none". + this[kGuard] = 'none' + + // 2. If init is given, then fill this with init. + if (init !== undefined) { + init = webidl.converters.HeadersInit(init) + fill(this, init) + } + } + + // https://fetch.spec.whatwg.org/#dom-headers-append + append (name, value) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.append' }) + + name = webidl.converters.ByteString(name) + value = webidl.converters.ByteString(value) + + return appendHeader(this, name, value) + } + + // https://fetch.spec.whatwg.org/#dom-headers-delete + delete (name) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.delete' }) + + name = webidl.converters.ByteString(name) + + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.delete', + value: name, + type: 'header name' + }) + } + + // 2. If this’s guard is "immutable", then throw a TypeError. + // 3. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 4. Otherwise, if this’s guard is "request-no-cors", name + // is not a no-CORS-safelisted request-header name, and + // name is not a privileged no-CORS request-header name, + // return. + // 5. Otherwise, if this’s guard is "response" and name is + // a forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (this[kGuard] === 'request-no-cors') { + // TODO + } + + // 6. If this’s header list does not contain name, then + // return. + if (!this[kHeadersList].contains(name)) { + return + } + + // 7. Delete name from this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this. + this[kHeadersList].delete(name) + } + + // https://fetch.spec.whatwg.org/#dom-headers-get + get (name) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.get' }) + + name = webidl.converters.ByteString(name) + + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.get', + value: name, + type: 'header name' + }) + } + + // 2. Return the result of getting name from this’s header + // list. + return this[kHeadersList].get(name) + } + + // https://fetch.spec.whatwg.org/#dom-headers-has + has (name) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 1, { header: 'Headers.has' }) + + name = webidl.converters.ByteString(name) + + // 1. If name is not a header name, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.has', + value: name, + type: 'header name' + }) + } + + // 2. Return true if this’s header list contains name; + // otherwise false. + return this[kHeadersList].contains(name) + } + + // https://fetch.spec.whatwg.org/#dom-headers-set + set (name, value) { + webidl.brandCheck(this, Headers) + + webidl.argumentLengthCheck(arguments, 2, { header: 'Headers.set' }) + + name = webidl.converters.ByteString(name) + value = webidl.converters.ByteString(value) + + // 1. Normalize value. + value = headerValueNormalize(value) + + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.set', + value: name, + type: 'header name' + }) + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.set', + value, + type: 'header value' + }) + } + + // 3. If this’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if this’s guard is "request" and name is a + // forbidden header name, return. + // 5. Otherwise, if this’s guard is "request-no-cors" and + // name/value is not a no-CORS-safelisted request-header, + // return. + // 6. Otherwise, if this’s guard is "response" and name is a + // forbidden response-header name, return. + // Note: undici does not implement forbidden header names + if (this[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (this[kGuard] === 'request-no-cors') { + // TODO + } + + // 7. Set (name, value) in this’s header list. + // 8. If this’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from this + this[kHeadersList].set(name, value) + } + + // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie + getSetCookie () { + webidl.brandCheck(this, Headers) + + // 1. If this’s header list does not contain `Set-Cookie`, then return « ». + // 2. Return the values of all headers in this’s header list whose name is + // a byte-case-insensitive match for `Set-Cookie`, in order. + + const list = this[kHeadersList].cookies + + if (list) { + return [...list] + } + + return [] + } + + // https://fetch.spec.whatwg.org/#concept-header-list-sort-and-combine + get [kHeadersSortedMap] () { + if (this[kHeadersList][kHeadersSortedMap]) { + return this[kHeadersList][kHeadersSortedMap] + } + + // 1. Let headers be an empty list of headers with the key being the name + // and value the value. + const headers = [] + + // 2. Let names be the result of convert header names to a sorted-lowercase + // set with all the names of the headers in list. + const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1) + const cookies = this[kHeadersList].cookies + + // 3. For each name of names: + for (let i = 0; i < names.length; ++i) { + const [name, value] = names[i] + // 1. If name is `set-cookie`, then: + if (name === 'set-cookie') { + // 1. Let values be a list of all values of headers in list whose name + // is a byte-case-insensitive match for name, in order. + + // 2. For each value of values: + // 1. Append (name, value) to headers. + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]) + } + } else { + // 2. Otherwise: + + // 1. Let value be the result of getting name from list. + + // 2. Assert: value is non-null. + assert(value !== null) + + // 3. Append (name, value) to headers. + headers.push([name, value]) + } + } + + this[kHeadersList][kHeadersSortedMap] = headers + + // 4. Return headers. + return headers + } + + keys () { + webidl.brandCheck(this, Headers) + + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key') + } + + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'key' + ) + } + + values () { + webidl.brandCheck(this, Headers) + + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'value') + } + + return makeIterator( + () => [...this[kHeadersSortedMap].values()], + 'Headers', + 'value' + ) + } + + entries () { + webidl.brandCheck(this, Headers) + + if (this[kGuard] === '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.brandCheck(this, Headers) + + webidl.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.brandCheck(this, Headers) + + return this[kHeadersList] + } +} + +Headers.prototype[Symbol.iterator] = Headers.prototype.entries + +Object.defineProperties(Headers.prototype, { + append: kEnumerableProperty, + delete: kEnumerableProperty, + get: kEnumerableProperty, + has: kEnumerableProperty, + set: kEnumerableProperty, + getSetCookie: kEnumerableProperty, + keys: kEnumerableProperty, + values: kEnumerableProperty, + entries: kEnumerableProperty, + forEach: kEnumerableProperty, + [Symbol.iterator]: { enumerable: false }, + [Symbol.toStringTag]: { + value: 'Headers', + configurable: true + } +}) + +webidl.converters.HeadersInit = function (V) { + if (webidl.util.Type(V) === 'Object') { + if (V[Symbol.iterator]) { + return webidl.converters['sequence>'](V) + } + + return webidl.converters['record'](V) + } + + throw webidl.errors.conversionFailed({ + prefix: 'Headers constructor', + argument: 'Argument 1', + types: ['sequence>', 'record'] + }) +} + +module.exports = { + fill, + Headers, + HeadersList +} + + +/***/ }), + +/***/ 72748: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// https://github.com/Ethan-Arrowood/undici-fetch + + + +const { + Response, + makeNetworkError, + makeAppropriateNetworkError, + filterResponse, + makeResponse +} = __nccwpck_require__(58846) +const { Headers } = __nccwpck_require__(23245) +const { Request, makeRequest } = __nccwpck_require__(7288) +const zlib = __nccwpck_require__(59796) +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 +} = __nccwpck_require__(79453) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(46938) +const assert = __nccwpck_require__(39491) +const { safelyExtractBody } = __nccwpck_require__(62494) +const { + redirectStatusSet, + nullBodyStatus, + safeMethodsSet, + requestBodyHeader, + subresourceSet, + DOMException +} = __nccwpck_require__(93541) +const { kHeadersList } = __nccwpck_require__(48039) +const EE = __nccwpck_require__(82361) +const { Readable, pipeline } = __nccwpck_require__(12781) +const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = __nccwpck_require__(67468) +const { dataURLProcessor, serializeAMimeType } = __nccwpck_require__(50096) +const { TransformStream } = __nccwpck_require__(35356) +const { getGlobalDispatcher } = __nccwpck_require__(29102) +const { webidl } = __nccwpck_require__(96138) +const { STATUS_CODES } = __nccwpck_require__(13685) +const GET_OR_HEAD = ['GET', 'HEAD'] + +/** @type {import('buffer').resolveObjectURL} */ +let resolveObjectURL +let ReadableStream = globalThis.ReadableStream + +class Fetch extends EE { + constructor (dispatcher) { + super() + + this.dispatcher = dispatcher + this.connection = null + this.dump = false + this.state = 'ongoing' + // 2 terminated listeners get added per request, + // but only 1 gets removed. If there are 20 redirects, + // 21 listeners will be added. + // See https://github.com/nodejs/undici/issues/1711 + // TODO (fix): Find and fix root cause for leaked listener. + this.setMaxListeners(21) + } + + terminate (reason) { + if (this.state !== 'ongoing') { + return + } + + this.state = 'terminated' + this.connection?.destroy(reason) + this.emit('terminated', reason) + } + + // https://fetch.spec.whatwg.org/#fetch-controller-abort + abort (error) { + if (this.state !== 'ongoing') { + return + } + + // 1. Set controller’s state to "aborted". + this.state = 'aborted' + + // 2. Let fallbackError be an "AbortError" DOMException. + // 3. Set error to fallbackError if it is not given. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') + } + + // 4. Let serializedError be StructuredSerialize(error). + // If that threw an exception, catch it, and let + // serializedError be StructuredSerialize(fallbackError). + + // 5. Set controller’s serialized abort reason to serializedError. + this.serializedAbortReason = error + + this.connection?.destroy(error) + this.emit('terminated', error) + } +} + +// https://fetch.spec.whatwg.org/#fetch-method +function fetch (input, init = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'globalThis.fetch' }) + + // 1. Let p be a new promise. + const p = createDeferredPromise() + + // 2. Let requestObject be the result of invoking the initial value of + // Request as constructor with input and init as arguments. If this throws + // an exception, reject p with it and return p. + let requestObject + + try { + requestObject = new Request(input, init) + } catch (e) { + p.reject(e) + return p.promise + } + + // 3. Let request be requestObject’s request. + const request = requestObject[kState] + + // 4. If requestObject’s signal’s aborted flag is set, then: + if (requestObject.signal.aborted) { + // 1. Abort the fetch() call with p, request, null, and + // requestObject’s signal’s abort reason. + abortFetch(p, request, null, requestObject.signal.reason) + + // 2. Return p. + return p.promise + } + + // 5. Let globalObject be request’s client’s global object. + const globalObject = request.client.globalObject + + // 6. If globalObject is a ServiceWorkerGlobalScope object, then set + // request’s service-workers mode to "none". + if (globalObject?.constructor?.name === 'ServiceWorkerGlobalScope') { + request.serviceWorkers = 'none' + } + + // 7. Let responseObject be null. + let responseObject = null + + // 8. Let relevantRealm be this’s relevant Realm. + const relevantRealm = null + + // 9. Let locallyAborted be false. + let locallyAborted = false + + // 10. Let controller be null. + let controller = null + + // 11. Add the following abort steps to requestObject’s signal: + addAbortListener( + requestObject.signal, + () => { + // 1. Set locallyAborted to true. + locallyAborted = true + + // 2. Assert: controller is non-null. + assert(controller != null) + + // 3. Abort controller with requestObject’s signal’s abort reason. + controller.abort(requestObject.signal.reason) + + // 4. Abort the fetch() call with p, request, responseObject, + // and requestObject’s signal’s abort reason. + abortFetch(p, request, responseObject, requestObject.signal.reason) + } + ) + + // 12. Let handleFetchDone given response response be to finalize and + // report timing with response, globalObject, and "fetch". + const handleFetchDone = (response) => + finalizeAndReportTiming(response, 'fetch') + + // 13. Set controller to the result of calling fetch given request, + // with processResponseEndOfBody set to handleFetchDone, and processResponse + // given response being these substeps: + + const processResponse = (response) => { + // 1. If locallyAborted is true, terminate these substeps. + if (locallyAborted) { + return Promise.resolve() + } + + // 2. If response’s aborted flag is set, then: + if (response.aborted) { + // 1. Let deserializedError be the result of deserialize a serialized + // abort reason given controller’s serialized abort reason and + // relevantRealm. + + // 2. Abort the fetch() call with p, request, responseObject, and + // deserializedError. + + abortFetch(p, request, responseObject, controller.serializedAbortReason) + return Promise.resolve() + } + + // 3. If response is a network error, then reject p with a TypeError + // and terminate these substeps. + if (response.type === 'error') { + p.reject( + Object.assign(new TypeError('fetch failed'), { cause: response.error }) + ) + return Promise.resolve() + } + + // 4. Set responseObject to the result of creating a Response object, + // given response, "immutable", and relevantRealm. + responseObject = new Response() + responseObject[kState] = response + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kHeadersList] = response.headersList + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm + + // 5. Resolve p with responseObject. + p.resolve(responseObject) + } + + controller = fetching({ + request, + processResponseEndOfBody: handleFetchDone, + processResponse, + dispatcher: init.dispatcher ?? getGlobalDispatcher() // undici + }) + + // 14. Return p. + return p.promise +} + +// https://fetch.spec.whatwg.org/#finalize-and-report-timing +function finalizeAndReportTiming (response, initiatorType = 'other') { + // 1. If response is an aborted network error, then return. + if (response.type === 'error' && response.aborted) { + return + } + + // 2. If response’s URL list is null or empty, then return. + if (!response.urlList?.length) { + return + } + + // 3. Let originalURL be response’s URL list[0]. + const originalURL = response.urlList[0] + + // 4. Let timingInfo be response’s timing info. + let timingInfo = response.timingInfo + + // 5. Let cacheState be response’s cache state. + let cacheState = response.cacheState + + // 6. If originalURL’s scheme is not an HTTP(S) scheme, then return. + if (!urlIsHttpHttpsScheme(originalURL)) { + return + } + + // 7. If timingInfo is null, then return. + if (timingInfo === null) { + return + } + + // 8. If response’s timing allow passed flag is not set, then: + if (!response.timingAllowPassed) { + // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. + timingInfo = createOpaqueTimingInfo({ + startTime: timingInfo.startTime + }) + + // 2. Set cacheState to the empty string. + cacheState = '' + } + + // 9. Set timingInfo’s end time to the coarsened shared current time + // given global’s relevant settings object’s cross-origin isolated + // capability. + // TODO: given global’s relevant settings object’s cross-origin isolated + // capability? + timingInfo.endTime = coarsenedSharedCurrentTime() + + // 10. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo + + // 11. Mark resource timing for timingInfo, originalURL, initiatorType, + // global, and cacheState. + markResourceTiming( + timingInfo, + originalURL, + initiatorType, + globalThis, + cacheState + ) +} + +// https://w3c.github.io/resource-timing/#dfn-mark-resource-timing +function markResourceTiming (timingInfo, originalURL, initiatorType, globalThis, cacheState) { + if (nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 2)) { + performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis, cacheState) + } +} + +// https://fetch.spec.whatwg.org/#abort-fetch +function abortFetch (p, request, responseObject, error) { + // Note: AbortSignal.reason was added in node v17.2.0 + // which would give us an undefined error to reject with. + // Remove this once node v16 is no longer supported. + if (!error) { + error = new DOMException('The operation was aborted.', 'AbortError') + } + + // 1. Reject promise with error. + p.reject(error) + + // 2. If request’s body is not null and is readable, then cancel request’s + // body with error. + if (request.body != null && isReadable(request.body?.stream)) { + request.body.stream.cancel(error).catch((err) => { + if (err.code === 'ERR_INVALID_STATE') { + // Node bug? + return + } + throw err + }) + } + + // 3. If responseObject is null, then return. + if (responseObject == null) { + return + } + + // 4. Let response be responseObject’s response. + const response = responseObject[kState] + + // 5. If response’s body is not null and is readable, then error response’s + // body with error. + if (response.body != null && isReadable(response.body?.stream)) { + response.body.stream.cancel(error).catch((err) => { + if (err.code === 'ERR_INVALID_STATE') { + // Node bug? + return + } + throw err + }) + } +} + +// https://fetch.spec.whatwg.org/#fetching +function fetching ({ + request, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseEndOfBody, + processResponseConsumeBody, + useParallelQueue = false, + dispatcher // undici +}) { + // 1. Let taskDestination be null. + let taskDestination = null + + // 2. Let crossOriginIsolatedCapability be false. + let crossOriginIsolatedCapability = false + + // 3. If request’s client is non-null, then: + if (request.client != null) { + // 1. Set taskDestination to request’s client’s global object. + taskDestination = request.client.globalObject + + // 2. Set crossOriginIsolatedCapability to request’s client’s cross-origin + // isolated capability. + crossOriginIsolatedCapability = + request.client.crossOriginIsolatedCapability + } + + // 4. If useParallelQueue is true, then set taskDestination to the result of + // starting a new parallel queue. + // TODO + + // 5. Let timingInfo be a new fetch timing info whose start time and + // post-redirect start time are the coarsened shared current time given + // crossOriginIsolatedCapability. + const currenTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability) + const timingInfo = createOpaqueTimingInfo({ + startTime: currenTime + }) + + // 6. Let fetchParams be a new fetch params whose + // request is request, + // timing info is timingInfo, + // process request body chunk length is processRequestBodyChunkLength, + // process request end-of-body is processRequestEndOfBody, + // process response is processResponse, + // process response consume body is processResponseConsumeBody, + // process response end-of-body is processResponseEndOfBody, + // task destination is taskDestination, + // and cross-origin isolated capability is crossOriginIsolatedCapability. + const fetchParams = { + controller: new Fetch(dispatcher), + request, + timingInfo, + processRequestBodyChunkLength, + processRequestEndOfBody, + processResponse, + processResponseConsumeBody, + processResponseEndOfBody, + taskDestination, + crossOriginIsolatedCapability + } + + // 7. If request’s body is a byte sequence, then set request’s body to + // request’s body as a body. + // NOTE: Since fetching is only called from fetch, body should already be + // extracted. + assert(!request.body || request.body.stream) + + // 8. If request’s window is "client", then set request’s window to request’s + // client, if request’s client’s global object is a Window object; otherwise + // "no-window". + if (request.window === 'client') { + // TODO: What if request.client is null? + request.window = + request.client?.globalObject?.constructor?.name === 'Window' + ? request.client + : 'no-window' + } + + // 9. If request’s origin is "client", then set request’s origin to request’s + // client’s origin. + if (request.origin === 'client') { + // TODO: What if request.client is null? + request.origin = request.client?.origin + } + + // 10. If all of the following conditions are true: + // TODO + + // 11. If request’s policy container is "client", then: + if (request.policyContainer === 'client') { + // 1. If request’s client is non-null, then set request’s policy + // container to a clone of request’s client’s policy container. [HTML] + if (request.client != null) { + request.policyContainer = clonePolicyContainer( + request.client.policyContainer + ) + } else { + // 2. Otherwise, set request’s policy container to a new policy + // container. + request.policyContainer = makePolicyContainer() + } + } + + // 12. If request’s header list does not contain `Accept`, then: + if (!request.headersList.contains('accept')) { + // 1. Let value be `*/*`. + const value = '*/*' + + // 2. A user agent should set value to the first matching statement, if + // any, switching on request’s destination: + // "document" + // "frame" + // "iframe" + // `text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8` + // "image" + // `image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5` + // "style" + // `text/css,*/*;q=0.1` + // TODO + + // 3. Append `Accept`/value to request’s header list. + request.headersList.append('accept', value) + } + + // 13. If request’s header list does not contain `Accept-Language`, then + // user agents should append `Accept-Language`/an appropriate value to + // request’s header list. + if (!request.headersList.contains('accept-language')) { + request.headersList.append('accept-language', '*') + } + + // 14. If request’s priority is null, then use request’s initiator and + // destination appropriately in setting request’s priority to a + // user-agent-defined object. + if (request.priority === null) { + // TODO + } + + // 15. If request is a subresource request, then: + if (subresourceSet.has(request.destination)) { + // TODO + } + + // 16. Run main fetch given fetchParams. + mainFetch(fetchParams) + .catch(err => { + fetchParams.controller.terminate(err) + }) + + // 17. Return fetchParam's controller + return fetchParams.controller +} + +// https://fetch.spec.whatwg.org/#concept-main-fetch +async function mainFetch (fetchParams, recursive = false) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let response be null. + let response = null + + // 3. If request’s local-URLs-only flag is set and request’s current URL is + // not local, then set response to a network error. + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { + response = makeNetworkError('local URLs only') + } + + // 4. Run report Content Security Policy violations for request. + // TODO + + // 5. Upgrade request to a potentially trustworthy URL, if appropriate. + tryUpgradeRequestToAPotentiallyTrustworthyURL(request) + + // 6. If should request be blocked due to a bad port, should fetching request + // be blocked as mixed content, or should request be blocked by Content + // Security Policy returns blocked, then set response to a network error. + if (requestBadPort(request) === 'blocked') { + response = makeNetworkError('bad port') + } + // TODO: should fetching request be blocked as mixed content? + // TODO: should request be blocked by Content Security Policy? + + // 7. If request’s referrer policy is the empty string, then set request’s + // referrer policy to request’s policy container’s referrer policy. + if (request.referrerPolicy === '') { + request.referrerPolicy = request.policyContainer.referrerPolicy + } + + // 8. If request’s referrer is not "no-referrer", then set request’s + // referrer to the result of invoking determine request’s referrer. + if (request.referrer !== 'no-referrer') { + request.referrer = determineRequestsReferrer(request) + } + + // 9. Set request’s current URL’s scheme to "https" if all of the following + // conditions are true: + // - request’s current URL’s scheme is "http" + // - request’s current URL’s host is a domain + // - Matching request’s current URL’s host per Known HSTS Host Domain Name + // Matching results in either a superdomain match with an asserted + // includeSubDomains directive or a congruent match (with or without an + // asserted includeSubDomains directive). [HSTS] + // TODO + + // 10. If recursive is false, then run the remaining steps in parallel. + // TODO + + // 11. If response is null, then set response to the result of running + // the steps corresponding to the first matching statement: + if (response === null) { + response = await (async () => { + const currentURL = requestCurrentURL(request) + + if ( + // - request’s current URL’s origin is same origin with request’s origin, + // and request’s response tainting is "basic" + (sameOrigin(currentURL, request.url) && request.responseTainting === 'basic') || + // request’s current URL’s scheme is "data" + (currentURL.protocol === 'data:') || + // - request’s mode is "navigate" or "websocket" + (request.mode === 'navigate' || request.mode === 'websocket') + ) { + // 1. Set request’s response tainting to "basic". + request.responseTainting = 'basic' + + // 2. Return the result of running scheme fetch given fetchParams. + return await schemeFetch(fetchParams) + } + + // request’s mode is "same-origin" + if (request.mode === 'same-origin') { + // 1. Return a network error. + return makeNetworkError('request mode cannot be "same-origin"') + } + + // request’s mode is "no-cors" + if (request.mode === 'no-cors') { + // 1. If request’s redirect mode is not "follow", then return a network + // error. + if (request.redirect !== 'follow') { + return makeNetworkError( + 'redirect mode cannot be "follow" for "no-cors" request' + ) + } + + // 2. Set request’s response tainting to "opaque". + request.responseTainting = 'opaque' + + // 3. Return the result of running scheme fetch given fetchParams. + return await schemeFetch(fetchParams) + } + + // request’s current URL’s scheme is not an HTTP(S) scheme + if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { + // Return a network error. + return makeNetworkError('URL scheme must be a HTTP(S) scheme') + } + + // - request’s use-CORS-preflight flag is set + // - request’s unsafe-request flag is set and either request’s method is + // not a CORS-safelisted method or CORS-unsafe request-header names with + // request’s header list is not empty + // 1. Set request’s response tainting to "cors". + // 2. Let corsWithPreflightResponse be the result of running HTTP fetch + // given fetchParams and true. + // 3. If corsWithPreflightResponse is a network error, then clear cache + // entries using request. + // 4. Return corsWithPreflightResponse. + // TODO + + // Otherwise + // 1. Set request’s response tainting to "cors". + request.responseTainting = 'cors' + + // 2. Return the result of running HTTP fetch given fetchParams. + return await httpFetch(fetchParams) + })() + } + + // 12. If recursive is true, then return response. + if (recursive) { + return response + } + + // 13. If response is not a network error and response is not a filtered + // response, then: + if (response.status !== 0 && !response.internalResponse) { + // If request’s response tainting is "cors", then: + if (request.responseTainting === 'cors') { + // 1. Let headerNames be the result of extracting header list values + // given `Access-Control-Expose-Headers` and response’s header list. + // TODO + // 2. If request’s credentials mode is not "include" and headerNames + // contains `*`, then set response’s CORS-exposed header-name list to + // all unique header names in response’s header list. + // TODO + // 3. Otherwise, if headerNames is not null or failure, then set + // response’s CORS-exposed header-name list to headerNames. + // TODO + } + + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + 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(false) + } + } + + // 14. Let internalResponse be response, if response is a network error, + // and response’s internal response otherwise. + let internalResponse = + response.status === 0 ? response : response.internalResponse + + // 15. If internalResponse’s URL list is empty, then set it to a clone of + // request’s URL list. + if (internalResponse.urlList.length === 0) { + internalResponse.urlList.push(...request.urlList) + } + + // 16. If request’s timing allow failed flag is unset, then set + // internalResponse’s timing allow passed flag. + if (!request.timingAllowFailed) { + response.timingAllowPassed = true + } + + // 17. If response is not a network error and any of the following returns + // blocked + // - should internalResponse to request be blocked as mixed content + // - should internalResponse to request be blocked by Content Security Policy + // - should internalResponse to request be blocked due to its MIME type + // - should internalResponse to request be blocked due to nosniff + // TODO + + // 18. If response’s type is "opaque", internalResponse’s status is 206, + // internalResponse’s range-requested flag is set, and request’s header + // list does not contain `Range`, then set response and internalResponse + // to a network error. + if ( + response.type === 'opaque' && + internalResponse.status === 206 && + internalResponse.rangeRequested && + !request.headers.contains('range') + ) { + response = internalResponse = makeNetworkError() + } + + // 19. If response is not a network error and either request’s method is + // `HEAD` or `CONNECT`, or internalResponse’s status is a null body status, + // set internalResponse’s body to null and disregard any enqueuing toward + // it (if any). + if ( + response.status !== 0 && + (request.method === 'HEAD' || + request.method === 'CONNECT' || + nullBodyStatus.includes(internalResponse.status)) + ) { + internalResponse.body = null + fetchParams.controller.dump = true + } + + // 20. If request’s integrity metadata is not the empty string, then: + if (request.integrity) { + // 1. Let processBodyError be this step: run fetch finale given fetchParams + // and a network error. + const processBodyError = (reason) => + fetchFinale(fetchParams, makeNetworkError(reason)) + + // 2. If request’s response tainting is "opaque", or response’s body is null, + // then run processBodyError and abort these steps. + if (request.responseTainting === 'opaque' || response.body == null) { + processBodyError(response.error) + return + } + + // 3. Let processBody given bytes be these steps: + const processBody = (bytes) => { + // 1. If bytes do not match request’s integrity metadata, + // then run processBodyError and abort these steps. [SRI] + if (!bytesMatch(bytes, request.integrity)) { + processBodyError('integrity mismatch') + return + } + + // 2. Set response’s body to bytes as a body. + response.body = safelyExtractBody(bytes)[0] + + // 3. Run fetch finale given fetchParams and response. + fetchFinale(fetchParams, response) + } + + // 4. Fully read response’s body given processBody and processBodyError. + await fullyReadBody(response.body, processBody, processBodyError) + } else { + // 21. Otherwise, run fetch finale given fetchParams and response. + fetchFinale(fetchParams, response) + } +} + +// https://fetch.spec.whatwg.org/#concept-scheme-fetch +// given a fetch params fetchParams +function schemeFetch (fetchParams) { + // Note: since the connection is destroyed on redirect, which sets fetchParams to a + // cancelled state, we do not want this condition to trigger *unless* there have been + // no redirects. See https://github.com/nodejs/undici/issues/1776 + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { + return Promise.resolve(makeAppropriateNetworkError(fetchParams)) + } + + // 2. Let request be fetchParams’s request. + const { request } = fetchParams + + const { protocol: scheme } = requestCurrentURL(request) + + // 3. Switch on request’s current URL’s scheme and run the associated steps: + switch (scheme) { + case 'about:': { + // If request’s current URL’s path is the string "blank", then return a new response + // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) », + // and body is the empty byte sequence as a body. + + // Otherwise, return a network error. + return Promise.resolve(makeNetworkError('about scheme is not supported')) + } + case 'blob:': { + if (!resolveObjectURL) { + resolveObjectURL = (__nccwpck_require__(14300).resolveObjectURL) + } + + // 1. Let blobURLEntry be request’s current URL’s blob URL entry. + const blobURLEntry = requestCurrentURL(request) + + // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56 + // Buffer.resolveObjectURL does not ignore URL queries. + if (blobURLEntry.search.length !== 0) { + return Promise.resolve(makeNetworkError('NetworkError when attempting to fetch resource.')) + } + + const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString()) + + // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s + // object is not a Blob object, then return a network error. + if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) { + return Promise.resolve(makeNetworkError('invalid method')) + } + + // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object. + const bodyWithType = safelyExtractBody(blobURLEntryObject) + + // 4. Let body be bodyWithType’s body. + const body = bodyWithType[0] + + // 5. Let length be body’s length, serialized and isomorphic encoded. + const length = isomorphicEncode(`${body.length}`) + + // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence. + const type = bodyWithType[1] ?? '' + + // 7. Return a new response whose status message is `OK`, header list is + // « (`Content-Length`, length), (`Content-Type`, type) », and body is body. + 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:': { + // 1. Let dataURLStruct be the result of running the + // data: URL processor on request’s current URL. + const currentURL = requestCurrentURL(request) + const dataURLStruct = dataURLProcessor(currentURL) + + // 2. If dataURLStruct is failure, then return a + // network error. + if (dataURLStruct === 'failure') { + return Promise.resolve(makeNetworkError('failed to fetch the data URL')) + } + + // 3. Let mimeType be dataURLStruct’s MIME type, serialized. + const mimeType = serializeAMimeType(dataURLStruct.mimeType) + + // 4. Return a response whose status message is `OK`, + // header list is « (`Content-Type`, mimeType) », + // and body is dataURLStruct’s body as a body. + return Promise.resolve(makeResponse({ + statusText: 'OK', + headersList: [ + ['content-type', { name: 'Content-Type', value: mimeType }] + ], + body: safelyExtractBody(dataURLStruct.body)[0] + })) + } + case 'file:': { + // For now, unfortunate as it is, file URLs are left as an exercise for the reader. + // When in doubt, return a network error. + return Promise.resolve(makeNetworkError('not implemented... yet...')) + } + case 'http:': + case 'https:': { + // Return the result of running HTTP fetch given fetchParams. + + return httpFetch(fetchParams) + .catch((err) => makeNetworkError(err)) + } + default: { + return Promise.resolve(makeNetworkError('unknown scheme')) + } + } +} + +// https://fetch.spec.whatwg.org/#finalize-response +function finalizeResponse (fetchParams, response) { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true + + // 2, If fetchParams’s process response done is not null, then queue a fetch + // task to run fetchParams’s process response done given response, with + // fetchParams’s task destination. + if (fetchParams.processResponseDone != null) { + queueMicrotask(() => fetchParams.processResponseDone(response)) + } +} + +// https://fetch.spec.whatwg.org/#fetch-finale +function fetchFinale (fetchParams, response) { + // 1. If response is a network error, then: + if (response.type === 'error') { + // 1. Set response’s URL list to « fetchParams’s request’s URL list[0] ». + response.urlList = [fetchParams.request.urlList[0]] + + // 2. Set response’s timing info to the result of creating an opaque timing + // info for fetchParams’s timing info. + response.timingInfo = createOpaqueTimingInfo({ + startTime: fetchParams.timingInfo.startTime + }) + } + + // 2. Let processResponseEndOfBody be the following steps: + const processResponseEndOfBody = () => { + // 1. Set fetchParams’s request’s done flag. + fetchParams.request.done = true + + // If fetchParams’s process response end-of-body is not null, + // then queue a fetch task to run fetchParams’s process response + // end-of-body given response with fetchParams’s task destination. + if (fetchParams.processResponseEndOfBody != null) { + queueMicrotask(() => fetchParams.processResponseEndOfBody(response)) + } + } + + // 3. If fetchParams’s process response is non-null, then queue a fetch task + // to run fetchParams’s process response given response, with fetchParams’s + // task destination. + if (fetchParams.processResponse != null) { + queueMicrotask(() => fetchParams.processResponse(response)) + } + + // 4. If response’s body is null, then run processResponseEndOfBody. + if (response.body == null) { + processResponseEndOfBody() + } else { + // 5. Otherwise: + + // 1. Let transformStream be a new a TransformStream. + + // 2. Let identityTransformAlgorithm be an algorithm which, given chunk, + // enqueues chunk in transformStream. + const identityTransformAlgorithm = (chunk, controller) => { + controller.enqueue(chunk) + } + + // 3. Set up transformStream with transformAlgorithm set to identityTransformAlgorithm + // and flushAlgorithm set to processResponseEndOfBody. + const transformStream = new TransformStream({ + start () {}, + transform: identityTransformAlgorithm, + flush: processResponseEndOfBody + }, { + size () { + return 1 + } + }, { + size () { + return 1 + } + }) + + // 4. Set response’s body to the result of piping response’s body through transformStream. + response.body = { stream: response.body.stream.pipeThrough(transformStream) } + } + + // 6. If fetchParams’s process response consume body is non-null, then: + if (fetchParams.processResponseConsumeBody != null) { + // 1. Let processBody given nullOrBytes be this step: run fetchParams’s + // process response consume body given response and nullOrBytes. + const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes) + + // 2. Let processBodyError be this step: run fetchParams’s process + // response consume body given response and failure. + const processBodyError = (failure) => fetchParams.processResponseConsumeBody(response, failure) + + // 3. If response’s body is null, then queue a fetch task to run processBody + // given null, with fetchParams’s task destination. + if (response.body == null) { + queueMicrotask(() => processBody(null)) + } else { + // 4. Otherwise, fully read response’s body given processBody, processBodyError, + // and fetchParams’s task destination. + return fullyReadBody(response.body, processBody, processBodyError) + } + return Promise.resolve() + } +} + +// https://fetch.spec.whatwg.org/#http-fetch +async function httpFetch (fetchParams) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let response be null. + let response = null + + // 3. Let actualResponse be null. + let actualResponse = null + + // 4. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo + + // 5. If request’s service-workers mode is "all", then: + if (request.serviceWorkers === 'all') { + // TODO + } + + // 6. If response is null, then: + if (response === null) { + // 1. If makeCORSPreflight is true and one of these conditions is true: + // TODO + + // 2. If request’s redirect mode is "follow", then set request’s + // service-workers mode to "none". + if (request.redirect === 'follow') { + request.serviceWorkers = 'none' + } + + // 3. Set response and actualResponse to the result of running + // HTTP-network-or-cache fetch given fetchParams. + actualResponse = response = await httpNetworkOrCacheFetch(fetchParams) + + // 4. If request’s response tainting is "cors" and a CORS check + // for request and response returns failure, then return a network error. + if ( + request.responseTainting === 'cors' && + corsCheck(request, response) === 'failure' + ) { + return makeNetworkError('cors failure') + } + + // 5. If the TAO check for request and response returns failure, then set + // request’s timing allow failed flag. + if (TAOCheck(request, response) === 'failure') { + request.timingAllowFailed = true + } + } + + // 7. If either request’s response tainting or response’s type + // is "opaque", and the cross-origin resource policy check with + // request’s origin, request’s client, request’s destination, + // and actualResponse returns blocked, then return a network error. + if ( + (request.responseTainting === 'opaque' || response.type === 'opaque') && + crossOriginResourcePolicyCheck( + request.origin, + request.client, + request.destination, + actualResponse + ) === 'blocked' + ) { + return makeNetworkError('blocked') + } + + // 8. If actualResponse’s status is a redirect status, then: + if (redirectStatusSet.has(actualResponse.status)) { + // 1. If actualResponse’s status is not 303, request’s body is not null, + // and the connection uses HTTP/2, then user agents may, and are even + // encouraged to, transmit an RST_STREAM frame. + // See, https://github.com/whatwg/fetch/issues/1288 + if (request.redirect !== 'manual') { + fetchParams.controller.connection.destroy() + } + + // 2. Switch on request’s redirect mode: + if (request.redirect === 'error') { + // Set response to a network error. + response = makeNetworkError('unexpected redirect') + } else if (request.redirect === 'manual') { + // Set response to an opaque-redirect filtered response whose internal + // response is actualResponse. + // NOTE(spec): On the web this would return an `opaqueredirect` response, + // but that doesn't make sense server side. + // See https://github.com/nodejs/undici/issues/1193. + response = actualResponse + } else if (request.redirect === 'follow') { + // Set response to the result of running HTTP-redirect fetch given + // fetchParams and response. + response = await httpRedirectFetch(fetchParams, response) + } else { + assert(false) + } + } + + // 9. Set response’s timing info to timingInfo. + response.timingInfo = timingInfo + + // 10. Return response. + return response +} + +// https://fetch.spec.whatwg.org/#http-redirect-fetch +function httpRedirectFetch (fetchParams, response) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let actualResponse be response, if response is not a filtered response, + // and response’s internal response otherwise. + const actualResponse = response.internalResponse + ? response.internalResponse + : response + + // 3. Let locationURL be actualResponse’s location URL given request’s current + // URL’s fragment. + let locationURL + + try { + locationURL = responseLocationURL( + actualResponse, + requestCurrentURL(request).hash + ) + + // 4. If locationURL is null, then return response. + if (locationURL == null) { + return response + } + } catch (err) { + // 5. If locationURL is failure, then return a network error. + return Promise.resolve(makeNetworkError(err)) + } + + // 6. If locationURL’s scheme is not an HTTP(S) scheme, then return a network + // error. + if (!urlIsHttpHttpsScheme(locationURL)) { + return Promise.resolve(makeNetworkError('URL scheme must be a HTTP(S) scheme')) + } + + // 7. If request’s redirect count is 20, then return a network error. + if (request.redirectCount === 20) { + return Promise.resolve(makeNetworkError('redirect count exceeded')) + } + + // 8. Increase request’s redirect count by 1. + request.redirectCount += 1 + + // 9. If request’s mode is "cors", locationURL includes credentials, and + // request’s origin is not same origin with locationURL’s origin, then return + // a network error. + if ( + request.mode === 'cors' && + (locationURL.username || locationURL.password) && + !sameOrigin(request, locationURL) + ) { + return Promise.resolve(makeNetworkError('cross origin not allowed for request mode "cors"')) + } + + // 10. If request’s response tainting is "cors" and locationURL includes + // credentials, then return a network error. + if ( + request.responseTainting === 'cors' && + (locationURL.username || locationURL.password) + ) { + return Promise.resolve(makeNetworkError( + 'URL cannot contain credentials for request mode "cors"' + )) + } + + // 11. If actualResponse’s status is not 303, request’s body is non-null, + // and request’s body’s source is null, then return a network error. + if ( + actualResponse.status !== 303 && + request.body != null && + request.body.source == null + ) { + return Promise.resolve(makeNetworkError()) + } + + // 12. If one of the following is true + // - actualResponse’s status is 301 or 302 and request’s method is `POST` + // - actualResponse’s status is 303 and request’s method is not `GET` or `HEAD` + if ( + ([301, 302].includes(actualResponse.status) && request.method === 'POST') || + (actualResponse.status === 303 && + !GET_OR_HEAD.includes(request.method)) + ) { + // then: + // 1. Set request’s method to `GET` and request’s body to null. + request.method = 'GET' + request.body = null + + // 2. For each headerName of request-body-header name, delete headerName from + // request’s header list. + for (const headerName of requestBodyHeader) { + request.headersList.delete(headerName) + } + } + + // 13. If request’s current URL’s origin is not same origin with locationURL’s + // origin, then for each headerName of CORS non-wildcard request-header name, + // delete headerName from request’s header list. + if (!sameOrigin(requestCurrentURL(request), locationURL)) { + // https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name + request.headersList.delete('authorization') + + // "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement. + request.headersList.delete('cookie') + request.headersList.delete('host') + } + + // 14. If request’s body is non-null, then set request’s body to the first return + // value of safely extracting request’s body’s source. + if (request.body != null) { + assert(request.body.source != null) + request.body = safelyExtractBody(request.body.source)[0] + } + + // 15. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo + + // 16. Set timingInfo’s redirect end time and post-redirect start time to the + // coarsened shared current time given fetchParams’s cross-origin isolated + // capability. + timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = + coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability) + + // 17. If timingInfo’s redirect start time is 0, then set timingInfo’s + // redirect start time to timingInfo’s start time. + if (timingInfo.redirectStartTime === 0) { + timingInfo.redirectStartTime = timingInfo.startTime + } + + // 18. Append locationURL to request’s URL list. + request.urlList.push(locationURL) + + // 19. Invoke set request’s referrer policy on redirect on request and + // actualResponse. + setRequestReferrerPolicyOnRedirect(request, actualResponse) + + // 20. Return the result of running main fetch given fetchParams and true. + return mainFetch(fetchParams, true) +} + +// https://fetch.spec.whatwg.org/#http-network-or-cache-fetch +async function httpNetworkOrCacheFetch ( + fetchParams, + isAuthenticationFetch = false, + isNewConnectionFetch = false +) { + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let httpFetchParams be null. + let httpFetchParams = null + + // 3. Let httpRequest be null. + let httpRequest = null + + // 4. Let response be null. + let response = null + + // 5. Let storedResponse be null. + // TODO: cache + + // 6. Let httpCache be null. + const httpCache = null + + // 7. Let the revalidatingFlag be unset. + const revalidatingFlag = false + + // 8. Run these steps, but abort when the ongoing fetch is terminated: + + // 1. If request’s window is "no-window" and request’s redirect mode is + // "error", then set httpFetchParams to fetchParams and httpRequest to + // request. + if (request.window === 'no-window' && request.redirect === 'error') { + httpFetchParams = fetchParams + httpRequest = request + } else { + // Otherwise: + + // 1. Set httpRequest to a clone of request. + httpRequest = makeRequest(request) + + // 2. Set httpFetchParams to a copy of fetchParams. + httpFetchParams = { ...fetchParams } + + // 3. Set httpFetchParams’s request to httpRequest. + httpFetchParams.request = httpRequest + } + + // 3. Let includeCredentials be true if one of + const includeCredentials = + request.credentials === 'include' || + (request.credentials === 'same-origin' && + request.responseTainting === 'basic') + + // 4. Let contentLength be httpRequest’s body’s length, if httpRequest’s + // body is non-null; otherwise null. + const contentLength = httpRequest.body ? httpRequest.body.length : null + + // 5. Let contentLengthHeaderValue be null. + let contentLengthHeaderValue = null + + // 6. If httpRequest’s body is null and httpRequest’s method is `POST` or + // `PUT`, then set contentLengthHeaderValue to `0`. + if ( + httpRequest.body == null && + ['POST', 'PUT'].includes(httpRequest.method) + ) { + contentLengthHeaderValue = '0' + } + + // 7. If contentLength is non-null, then set contentLengthHeaderValue to + // contentLength, serialized and isomorphic encoded. + if (contentLength != null) { + contentLengthHeaderValue = isomorphicEncode(`${contentLength}`) + } + + // 8. If contentLengthHeaderValue is non-null, then append + // `Content-Length`/contentLengthHeaderValue to httpRequest’s header + // list. + if (contentLengthHeaderValue != null) { + httpRequest.headersList.append('content-length', contentLengthHeaderValue) + } + + // 9. If contentLengthHeaderValue is non-null, then append (`Content-Length`, + // contentLengthHeaderValue) to httpRequest’s header list. + + // 10. If contentLength is non-null and httpRequest’s keepalive is true, + // then: + if (contentLength != null && httpRequest.keepalive) { + // NOTE: keepalive is a noop outside of browser context. + } + + // 11. If httpRequest’s referrer is a URL, then append + // `Referer`/httpRequest’s referrer, serialized and isomorphic encoded, + // to httpRequest’s header list. + if (httpRequest.referrer instanceof URL) { + httpRequest.headersList.append('referer', isomorphicEncode(httpRequest.referrer.href)) + } + + // 12. Append a request `Origin` header for httpRequest. + appendRequestOriginHeader(httpRequest) + + // 13. Append the Fetch metadata headers for httpRequest. [FETCH-METADATA] + appendFetchMetadata(httpRequest) + + // 14. If httpRequest’s header list does not contain `User-Agent`, then + // user agents should append `User-Agent`/default `User-Agent` value to + // httpRequest’s header list. + if (!httpRequest.headersList.contains('user-agent')) { + httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node') + } + + // 15. If httpRequest’s cache mode is "default" and httpRequest’s header + // list contains `If-Modified-Since`, `If-None-Match`, + // `If-Unmodified-Since`, `If-Match`, or `If-Range`, then set + // httpRequest’s cache mode to "no-store". + 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' + } + + // 16. If httpRequest’s cache mode is "no-cache", httpRequest’s prevent + // no-cache cache-control header modification flag is unset, and + // httpRequest’s header list does not contain `Cache-Control`, then append + // `Cache-Control`/`max-age=0` to httpRequest’s header list. + if ( + httpRequest.cache === 'no-cache' && + !httpRequest.preventNoCacheCacheControlHeaderModification && + !httpRequest.headersList.contains('cache-control') + ) { + httpRequest.headersList.append('cache-control', 'max-age=0') + } + + // 17. If httpRequest’s cache mode is "no-store" or "reload", then: + if (httpRequest.cache === 'no-store' || httpRequest.cache === 'reload') { + // 1. If httpRequest’s header list does not contain `Pragma`, then append + // `Pragma`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('pragma')) { + httpRequest.headersList.append('pragma', 'no-cache') + } + + // 2. If httpRequest’s header list does not contain `Cache-Control`, + // then append `Cache-Control`/`no-cache` to httpRequest’s header list. + if (!httpRequest.headersList.contains('cache-control')) { + httpRequest.headersList.append('cache-control', 'no-cache') + } + } + + // 18. If httpRequest’s header list contains `Range`, then append + // `Accept-Encoding`/`identity` to httpRequest’s header list. + if (httpRequest.headersList.contains('range')) { + httpRequest.headersList.append('accept-encoding', 'identity') + } + + // 19. Modify httpRequest’s header list per HTTP. Do not append a given + // header if httpRequest’s header list contains that header’s name. + // TODO: https://github.com/whatwg/fetch/issues/1285#issuecomment-896560129 + 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') + + // 20. If includeCredentials is true, then: + if (includeCredentials) { + // 1. If the user agent is not configured to block cookies for httpRequest + // (see section 7 of [COOKIES]), then: + // TODO: credentials + // 2. If httpRequest’s header list does not contain `Authorization`, then: + // TODO: credentials + } + + // 21. If there’s a proxy-authentication entry, use it as appropriate. + // TODO: proxy-authentication + + // 22. Set httpCache to the result of determining the HTTP cache + // partition, given httpRequest. + // TODO: cache + + // 23. If httpCache is null, then set httpRequest’s cache mode to + // "no-store". + if (httpCache == null) { + httpRequest.cache = 'no-store' + } + + // 24. If httpRequest’s cache mode is neither "no-store" nor "reload", + // then: + if (httpRequest.mode !== 'no-store' && httpRequest.mode !== 'reload') { + // TODO: cache + } + + // 9. If aborted, then return the appropriate network error for fetchParams. + // TODO + + // 10. If response is null, then: + if (response == null) { + // 1. If httpRequest’s cache mode is "only-if-cached", then return a + // network error. + if (httpRequest.mode === 'only-if-cached') { + return makeNetworkError('only if cached') + } + + // 2. Let forwardResponse be the result of running HTTP-network fetch + // given httpFetchParams, includeCredentials, and isNewConnectionFetch. + const forwardResponse = await httpNetworkFetch( + httpFetchParams, + includeCredentials, + isNewConnectionFetch + ) + + // 3. If httpRequest’s method is unsafe and forwardResponse’s status is + // in the range 200 to 399, inclusive, invalidate appropriate stored + // responses in httpCache, as per the "Invalidation" chapter of HTTP + // Caching, and set storedResponse to null. [HTTP-CACHING] + if ( + !safeMethodsSet.has(httpRequest.method) && + forwardResponse.status >= 200 && + forwardResponse.status <= 399 + ) { + // TODO: cache + } + + // 4. If the revalidatingFlag is set and forwardResponse’s status is 304, + // then: + if (revalidatingFlag && forwardResponse.status === 304) { + // TODO: cache + } + + // 5. If response is null, then: + if (response == null) { + // 1. Set response to forwardResponse. + response = forwardResponse + + // 2. Store httpRequest and forwardResponse in httpCache, as per the + // "Storing Responses in Caches" chapter of HTTP Caching. [HTTP-CACHING] + // TODO: cache + } + } + + // 11. Set response’s URL list to a clone of httpRequest’s URL list. + response.urlList = [...httpRequest.urlList] + + // 12. If httpRequest’s header list contains `Range`, then set response’s + // range-requested flag. + if (httpRequest.headersList.contains('range')) { + response.rangeRequested = true + } + + // 13. Set response’s request-includes-credentials to includeCredentials. + response.requestIncludesCredentials = includeCredentials + + // 14. If response’s status is 401, httpRequest’s response tainting is not + // "cors", includeCredentials is true, and request’s window is an environment + // settings object, then: + // TODO + + // 15. If response’s status is 407, then: + if (response.status === 407) { + // 1. If request’s window is "no-window", then return a network error. + if (request.window === 'no-window') { + return makeNetworkError() + } + + // 2. ??? + + // 3. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams) + } + + // 4. Prompt the end user as appropriate in request’s window and store + // the result as a proxy-authentication entry. [HTTP-AUTH] + // TODO: Invoke some kind of callback? + + // 5. Set response to the result of running HTTP-network-or-cache fetch given + // fetchParams. + // TODO + return makeNetworkError('proxy authentication required') + } + + // 16. If all of the following are true + if ( + // response’s status is 421 + response.status === 421 && + // isNewConnectionFetch is false + !isNewConnectionFetch && + // request’s body is null, or request’s body is non-null and request’s body’s source is non-null + (request.body == null || request.body.source != null) + ) { + // then: + + // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams. + if (isCancelled(fetchParams)) { + return makeAppropriateNetworkError(fetchParams) + } + + // 2. Set response to the result of running HTTP-network-or-cache + // fetch given fetchParams, isAuthenticationFetch, and true. + + // TODO (spec): The spec doesn't specify this but we need to cancel + // the active response before we can start a new one. + // https://github.com/whatwg/fetch/issues/1293 + fetchParams.controller.connection.destroy() + + response = await httpNetworkOrCacheFetch( + fetchParams, + isAuthenticationFetch, + true + ) + } + + // 17. If isAuthenticationFetch is true, then create an authentication entry + if (isAuthenticationFetch) { + // TODO + } + + // 18. Return response. + return response +} + +// https://fetch.spec.whatwg.org/#http-network-fetch +async function httpNetworkFetch ( + fetchParams, + includeCredentials = false, + forceNewConnection = false +) { + assert(!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('The operation was aborted.', 'AbortError')) + } + } + } + + // 1. Let request be fetchParams’s request. + const request = fetchParams.request + + // 2. Let response be null. + let response = null + + // 3. Let timingInfo be fetchParams’s timing info. + const timingInfo = fetchParams.timingInfo + + // 4. Let httpCache be the result of determining the HTTP cache partition, + // given request. + // TODO: cache + const httpCache = null + + // 5. If httpCache is null, then set request’s cache mode to "no-store". + if (httpCache == null) { + request.cache = 'no-store' + } + + // 6. Let networkPartitionKey be the result of determining the network + // partition key given request. + // TODO + + // 7. Let newConnection be "yes" if forceNewConnection is true; otherwise + // "no". + const newConnection = forceNewConnection ? 'yes' : 'no' // eslint-disable-line no-unused-vars + + // 8. Switch on request’s mode: + if (request.mode === 'websocket') { + // Let connection be the result of obtaining a WebSocket connection, + // given request’s current URL. + // TODO + } else { + // Let connection be the result of obtaining a connection, given + // networkPartitionKey, request’s current URL’s origin, + // includeCredentials, and forceNewConnection. + // TODO + } + + // 9. Run these steps, but abort when the ongoing fetch is terminated: + + // 1. If connection is failure, then return a network error. + + // 2. Set timingInfo’s final connection timing info to the result of + // calling clamp and coarsen connection timing info with connection’s + // timing info, timingInfo’s post-redirect start time, and fetchParams’s + // cross-origin isolated capability. + + // 3. If connection is not an HTTP/2 connection, request’s body is non-null, + // and request’s body’s source is null, then append (`Transfer-Encoding`, + // `chunked`) to request’s header list. + + // 4. Set timingInfo’s final network-request start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated + // capability. + + // 5. Set response to the result of making an HTTP request over connection + // using request with the following caveats: + + // - Follow the relevant requirements from HTTP. [HTTP] [HTTP-SEMANTICS] + // [HTTP-COND] [HTTP-CACHING] [HTTP-AUTH] + + // - If request’s body is non-null, and request’s body’s source is null, + // then the user agent may have a buffer of up to 64 kibibytes and store + // a part of request’s body in that buffer. If the user agent reads from + // request’s body beyond that buffer’s size and the user agent needs to + // resend request, then instead return a network error. + + // - Set timingInfo’s final network-response start time to the coarsened + // shared current time given fetchParams’s cross-origin isolated capability, + // immediately after the user agent’s HTTP parser receives the first byte + // of the response (e.g., frame header bytes for HTTP/2 or response status + // line for HTTP/1.x). + + // - Wait until all the headers are transmitted. + + // - Any responses whose status is in the range 100 to 199, inclusive, + // and is not 101, are to be ignored, except for the purposes of setting + // timingInfo’s final network-response start time above. + + // - If request’s header list contains `Transfer-Encoding`/`chunked` and + // response is transferred via HTTP/1.0 or older, then return a network + // error. + + // - If the HTTP request results in a TLS client certificate dialog, then: + + // 1. If request’s window is an environment settings object, make the + // dialog available in request’s window. + + // 2. Otherwise, return a network error. + + // To transmit request’s body body, run these steps: + let requestBody = null + // 1. If body is null and fetchParams’s process request end-of-body is + // non-null, then queue a fetch task given fetchParams’s process request + // end-of-body and fetchParams’s task destination. + if (request.body == null && fetchParams.processRequestEndOfBody) { + queueMicrotask(() => fetchParams.processRequestEndOfBody()) + } else if (request.body != null) { + // 2. Otherwise, if body is non-null: + + // 1. Let processBodyChunk given bytes be these steps: + const processBodyChunk = async function * (bytes) { + // 1. If the ongoing fetch is terminated, then abort these steps. + if (isCancelled(fetchParams)) { + return + } + + // 2. Run this step in parallel: transmit bytes. + yield bytes + + // 3. If fetchParams’s process request body is non-null, then run + // fetchParams’s process request body given bytes’s length. + fetchParams.processRequestBodyChunkLength?.(bytes.byteLength) + } + + // 2. Let processEndOfBody be these steps: + const processEndOfBody = () => { + // 1. If fetchParams is canceled, then abort these steps. + if (isCancelled(fetchParams)) { + return + } + + // 2. If fetchParams’s process request end-of-body is non-null, + // then run fetchParams’s process request end-of-body. + if (fetchParams.processRequestEndOfBody) { + fetchParams.processRequestEndOfBody() + } + } + + // 3. Let processBodyError given e be these steps: + const processBodyError = (e) => { + // 1. If fetchParams is canceled, then abort these steps. + if (isCancelled(fetchParams)) { + return + } + + // 2. If e is an "AbortError" DOMException, then abort fetchParams’s controller. + if (e.name === 'AbortError') { + fetchParams.controller.abort() + } else { + fetchParams.controller.terminate(e) + } + } + + // 4. Incrementally read request’s body given processBodyChunk, processEndOfBody, + // processBodyError, and fetchParams’s task destination. + requestBody = (async function * () { + try { + for await (const bytes of request.body.stream) { + yield * processBodyChunk(bytes) + } + processEndOfBody() + } catch (err) { + processBodyError(err) + } + })() + } + + try { + // socket is only provided for websockets + 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) { + // 10. If aborted, then: + if (err.name === 'AbortError') { + // 1. If connection uses HTTP/2, then transmit an RST_STREAM frame. + fetchParams.controller.connection.destroy() + + // 2. Return the appropriate network error for fetchParams. + return makeAppropriateNetworkError(fetchParams, err) + } + + return makeNetworkError(err) + } + + // 11. Let pullAlgorithm be an action that resumes the ongoing fetch + // if it is suspended. + const pullAlgorithm = () => { + fetchParams.controller.resume() + } + + // 12. Let cancelAlgorithm be an algorithm that aborts fetchParams’s + // controller with reason, given reason. + const cancelAlgorithm = (reason) => { + fetchParams.controller.abort(reason) + } + + // 13. Let highWaterMark be a non-negative, non-NaN number, chosen by + // the user agent. + // TODO + + // 14. Let sizeAlgorithm be an algorithm that accepts a chunk object + // and returns a non-negative, non-NaN, non-infinite number, chosen by the user agent. + // TODO + + // 15. Let stream be a new ReadableStream. + // 16. Set up stream with pullAlgorithm set to pullAlgorithm, + // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to + // highWaterMark, and sizeAlgorithm set to sizeAlgorithm. + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } + + const stream = 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 + } + } + ) + + // 17. Run these steps, but abort when the ongoing fetch is terminated: + + // 1. Set response’s body to a new body whose stream is stream. + response.body = { stream } + + // 2. If response is not a network error and request’s cache mode is + // not "no-store", then update response in httpCache for request. + // TODO + + // 3. If includeCredentials is true and the user agent is not configured + // to block cookies for request (see section 7 of [COOKIES]), then run the + // "set-cookie-string" parsing algorithm (see section 5.2 of [COOKIES]) on + // the value of each header whose name is a byte-case-insensitive match for + // `Set-Cookie` in response’s header list, if any, and request’s current URL. + // TODO + + // 18. If aborted, then: + // TODO + + // 19. Run these steps in parallel: + + // 1. Run these steps, but abort when fetchParams is canceled: + fetchParams.controller.on('terminated', onAborted) + fetchParams.controller.resume = async () => { + // 1. While true + while (true) { + // 1-3. See onData... + + // 4. Set bytes to the result of handling content codings given + // codings and bytes. + let bytes + let isFailure + try { + const { done, value } = await fetchParams.controller.next() + + if (isAborted(fetchParams)) { + break + } + + bytes = done ? undefined : value + } catch (err) { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { + // zlib doesn't like empty streams. + bytes = undefined + } else { + bytes = err + + // err may be propagated from the result of calling readablestream.cancel, + // which might not be an error. https://github.com/nodejs/undici/issues/2009 + isFailure = true + } + } + + if (bytes === undefined) { + // 2. Otherwise, if the bytes transmission for response’s message + // body is done normally and stream is readable, then close + // stream, finalize response for fetchParams and response, and + // abort these in-parallel steps. + readableStreamClose(fetchParams.controller.controller) + + finalizeResponse(fetchParams, response) + + return + } + + // 5. Increase timingInfo’s decoded body size by bytes’s length. + timingInfo.decodedBodySize += bytes?.byteLength ?? 0 + + // 6. If bytes is failure, then terminate fetchParams’s controller. + if (isFailure) { + fetchParams.controller.terminate(bytes) + return + } + + // 7. Enqueue a Uint8Array wrapping an ArrayBuffer containing bytes + // into stream. + fetchParams.controller.controller.enqueue(new Uint8Array(bytes)) + + // 8. If stream is errored, then terminate the ongoing fetch. + if (isErrored(stream)) { + fetchParams.controller.terminate() + return + } + + // 9. If stream doesn’t need more data ask the user agent to suspend + // the ongoing fetch. + if (!fetchParams.controller.controller.desiredSize) { + return + } + } + } + + // 2. If aborted, then: + function onAborted (reason) { + // 2. If fetchParams is aborted, then: + if (isAborted(fetchParams)) { + // 1. Set response’s aborted flag. + response.aborted = true + + // 2. If stream is readable, then error stream with the result of + // deserialize a serialized abort reason given fetchParams’s + // controller’s serialized abort reason and an + // implementation-defined realm. + if (isReadable(stream)) { + fetchParams.controller.controller.error( + fetchParams.controller.serializedAbortReason + ) + } + } else { + // 3. Otherwise, if stream is readable, error stream with a TypeError. + if (isReadable(stream)) { + fetchParams.controller.controller.error(new TypeError('terminated', { + cause: isErrorLike(reason) ? reason : undefined + })) + } + } + + // 4. If connection uses HTTP/2, then transmit an RST_STREAM frame. + // 5. Otherwise, the user agent should close connection unless it would be bad for performance to do so. + fetchParams.controller.connection.destroy() + } + + // 20. Return response. + return response + + async 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: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, + headers: request.headersList.entries, + maxRedirections: 0, + upgrade: request.mode === 'websocket' ? 'websocket' : undefined + }, + { + body: null, + abort: null, + + onConnect (abort) { + // TODO (fix): Do we need connection here? + const { connection } = fetchParams.controller + + if (connection.destroyed) { + abort(new DOMException('The operation was aborted.', 'AbortError')) + } else { + fetchParams.controller.on('terminated', abort) + this.abort = connection.abort = abort + } + }, + + onHeaders (status, headersList, resume, statusText) { + if (status < 200) { + return + } + + let codings = [] + let location = '' + + const headers = new Headers() + + // For H2, the headers are a plain JS object + // We distinguish between them and iterate accordingly + 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') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()) + } else if (key.toLowerCase() === 'location') { + location = val + } + + headers[kHeadersList].append(key, val) + } + } else { + const keys = Object.keys(headersList) + for (const key of keys) { + const val = headersList[key] + if (key.toLowerCase() === 'content-encoding') { + // https://www.rfc-editor.org/rfc/rfc7231#section-3.1.2.1 + // "All content-coding values are case-insensitive..." + codings = val.toLowerCase().split(',').map((x) => x.trim()).reverse() + } else if (key.toLowerCase() === 'location') { + location = val + } + + headers[kHeadersList].append(key, val) + } + } + + this.body = new Readable({ read: resume }) + + const decoders = [] + + const willFollow = request.redirect === 'follow' && + location && + redirectStatusSet.has(status) + + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding + if (request.method !== 'HEAD' && request.method !== 'CONNECT' && !nullBodyStatus.includes(status) && !willFollow) { + for (const coding of codings) { + // https://www.rfc-editor.org/rfc/rfc9112.html#section-7.2 + if (coding === 'x-gzip' || coding === 'gzip') { + decoders.push(zlib.createGunzip({ + // Be less strict when decoding compressed responses, since sometimes + // servers send slightly invalid responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + flush: zlib.constants.Z_SYNC_FLUSH, + finishFlush: zlib.constants.Z_SYNC_FLUSH + })) + } else if (coding === 'deflate') { + decoders.push(zlib.createInflate()) + } else if (coding === 'br') { + decoders.push(zlib.createBrotliDecompress()) + } else { + decoders.length = 0 + break + } + } + } + + resolve({ + status, + statusText, + headersList: headers[kHeadersList], + body: decoders.length + ? pipeline(this.body, ...decoders, () => { }) + : this.body.on('error', () => {}) + }) + + return true + }, + + onData (chunk) { + if (fetchParams.controller.dump) { + return + } + + // 1. If one or more bytes have been transmitted from response’s + // message body, then: + + // 1. Let bytes be the transmitted bytes. + const bytes = chunk + + // 2. Let codings be the result of extracting header list values + // given `Content-Encoding` and response’s header list. + // See pullAlgorithm. + + // 3. Increase timingInfo’s encoded body size by bytes’s length. + timingInfo.encodedBodySize += bytes.byteLength + + // 4. See pullAlgorithm... + + 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, headersList, socket) { + if (status !== 101) { + return + } + + const headers = new Headers() + + 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].append(key, val) + } + + resolve({ + status, + statusText: STATUS_CODES[status], + headersList: headers[kHeadersList], + socket + }) + + return true + } + } + )) + } +} + +module.exports = { + fetch, + Fetch, + fetching, + finalizeAndReportTiming +} + + +/***/ }), + +/***/ 7288: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* globals AbortController */ + + + +const { extractBody, mixinBody, cloneBody } = __nccwpck_require__(62494) +const { Headers, fill: fillHeaders, HeadersList } = __nccwpck_require__(23245) +const { FinalizationRegistry } = __nccwpck_require__(71744)() +const util = __nccwpck_require__(67468) +const { + isValidHTTPToken, + sameOrigin, + normalizeMethod, + makePolicyContainer, + normalizeMethodRecord +} = __nccwpck_require__(79453) +const { + forbiddenMethodsSet, + corsSafeListedMethodsSet, + referrerPolicy, + requestRedirect, + requestMode, + requestCredentials, + requestCache, + requestDuplex +} = __nccwpck_require__(93541) +const { kEnumerableProperty } = util +const { kHeaders, kSignal, kState, kGuard, kRealm } = __nccwpck_require__(46938) +const { webidl } = __nccwpck_require__(96138) +const { getGlobalOrigin } = __nccwpck_require__(64110) +const { URLSerializer } = __nccwpck_require__(50096) +const { kHeadersList, kConstruct } = __nccwpck_require__(48039) +const assert = __nccwpck_require__(39491) +const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = __nccwpck_require__(82361) + +let TransformStream = globalThis.TransformStream + +const kAbortController = Symbol('abortController') + +const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { + signal.removeEventListener('abort', abort) +}) + +// https://fetch.spec.whatwg.org/#request-class +class Request { + // https://fetch.spec.whatwg.org/#dom-request + constructor (input, init = {}) { + if (input === kConstruct) { + return + } + + webidl.argumentLengthCheck(arguments, 1, { header: 'Request constructor' }) + + input = webidl.converters.RequestInfo(input) + init = webidl.converters.RequestInit(init) + + // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object + this[kRealm] = { + settingsObject: { + baseUrl: getGlobalOrigin(), + get origin () { + return this.baseUrl?.origin + }, + policyContainer: makePolicyContainer() + } + } + + // 1. Let request be null. + let request = null + + // 2. Let fallbackMode be null. + let fallbackMode = null + + // 3. Let baseURL be this’s relevant settings object’s API base URL. + const baseUrl = this[kRealm].settingsObject.baseUrl + + // 4. Let signal be null. + let signal = null + + // 5. If input is a string, then: + if (typeof input === 'string') { + // 1. Let parsedURL be the result of parsing input with baseURL. + // 2. If parsedURL is failure, then throw a TypeError. + let parsedURL + try { + parsedURL = new URL(input, baseUrl) + } catch (err) { + throw new TypeError('Failed to parse URL from ' + input, { cause: err }) + } + + // 3. If parsedURL includes credentials, then throw a TypeError. + if (parsedURL.username || parsedURL.password) { + throw new TypeError( + 'Request cannot be constructed from a URL that includes credentials: ' + + input + ) + } + + // 4. Set request to a new request whose URL is parsedURL. + request = makeRequest({ urlList: [parsedURL] }) + + // 5. Set fallbackMode to "cors". + fallbackMode = 'cors' + } else { + // 6. Otherwise: + + // 7. Assert: input is a Request object. + assert(input instanceof Request) + + // 8. Set request to input’s request. + request = input[kState] + + // 9. Set signal to input’s signal. + signal = input[kSignal] + } + + // 7. Let origin be this’s relevant settings object’s origin. + const origin = this[kRealm].settingsObject.origin + + // 8. Let window be "client". + let window = 'client' + + // 9. If request’s window is an environment settings object and its origin + // is same origin with origin, then set window to request’s window. + if ( + request.window?.constructor?.name === 'EnvironmentSettingsObject' && + sameOrigin(request.window, origin) + ) { + window = request.window + } + + // 10. If init["window"] exists and is non-null, then throw a TypeError. + if (init.window != null) { + throw new TypeError(`'window' option '${window}' must be null`) + } + + // 11. If init["window"] exists, then set window to "no-window". + if ('window' in init) { + window = 'no-window' + } + + // 12. Set request to a new request with the following properties: + request = makeRequest({ + // URL request’s URL. + // undici implementation note: this is set as the first item in request's urlList in makeRequest + // method request’s method. + method: request.method, + // header list A copy of request’s header list. + // undici implementation note: headersList is cloned in makeRequest + headersList: request.headersList, + // unsafe-request flag Set. + unsafeRequest: request.unsafeRequest, + // client This’s relevant settings object. + client: this[kRealm].settingsObject, + // window window. + window, + // priority request’s priority. + priority: request.priority, + // origin request’s origin. The propagation of the origin is only significant for navigation requests + // being handled by a service worker. In this scenario a request can have an origin that is different + // from the current client. + origin: request.origin, + // referrer request’s referrer. + referrer: request.referrer, + // referrer policy request’s referrer policy. + referrerPolicy: request.referrerPolicy, + // mode request’s mode. + mode: request.mode, + // credentials mode request’s credentials mode. + credentials: request.credentials, + // cache mode request’s cache mode. + cache: request.cache, + // redirect mode request’s redirect mode. + redirect: request.redirect, + // integrity metadata request’s integrity metadata. + integrity: request.integrity, + // keepalive request’s keepalive. + keepalive: request.keepalive, + // reload-navigation flag request’s reload-navigation flag. + reloadNavigation: request.reloadNavigation, + // history-navigation flag request’s history-navigation flag. + historyNavigation: request.historyNavigation, + // URL list A clone of request’s URL list. + urlList: [...request.urlList] + }) + + const initHasKey = Object.keys(init).length !== 0 + + // 13. If init is not empty, then: + if (initHasKey) { + // 1. If request’s mode is "navigate", then set it to "same-origin". + if (request.mode === 'navigate') { + request.mode = 'same-origin' + } + + // 2. Unset request’s reload-navigation flag. + request.reloadNavigation = false + + // 3. Unset request’s history-navigation flag. + request.historyNavigation = false + + // 4. Set request’s origin to "client". + request.origin = 'client' + + // 5. Set request’s referrer to "client" + request.referrer = 'client' + + // 6. Set request’s referrer policy to the empty string. + request.referrerPolicy = '' + + // 7. Set request’s URL to request’s current URL. + request.url = request.urlList[request.urlList.length - 1] + + // 8. Set request’s URL list to « request’s URL ». + request.urlList = [request.url] + } + + // 14. If init["referrer"] exists, then: + if (init.referrer !== undefined) { + // 1. Let referrer be init["referrer"]. + const referrer = init.referrer + + // 2. If referrer is the empty string, then set request’s referrer to "no-referrer". + if (referrer === '') { + request.referrer = 'no-referrer' + } else { + // 1. Let parsedReferrer be the result of parsing referrer with + // baseURL. + // 2. If parsedReferrer is failure, then throw a TypeError. + let parsedReferrer + try { + parsedReferrer = new URL(referrer, baseUrl) + } catch (err) { + throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }) + } + + // 3. If one of the following is true + // - parsedReferrer’s scheme is "about" and path is the string "client" + // - parsedReferrer’s origin is not same origin with origin + // then set request’s referrer to "client". + if ( + (parsedReferrer.protocol === 'about:' && parsedReferrer.hostname === 'client') || + (origin && !sameOrigin(parsedReferrer, this[kRealm].settingsObject.baseUrl)) + ) { + request.referrer = 'client' + } else { + // 4. Otherwise, set request’s referrer to parsedReferrer. + request.referrer = parsedReferrer + } + } + } + + // 15. If init["referrerPolicy"] exists, then set request’s referrer policy + // to it. + if (init.referrerPolicy !== undefined) { + request.referrerPolicy = init.referrerPolicy + } + + // 16. Let mode be init["mode"] if it exists, and fallbackMode otherwise. + let mode + if (init.mode !== undefined) { + mode = init.mode + } else { + mode = fallbackMode + } + + // 17. If mode is "navigate", then throw a TypeError. + if (mode === 'navigate') { + throw webidl.errors.exception({ + header: 'Request constructor', + message: 'invalid request mode navigate.' + }) + } + + // 18. If mode is non-null, set request’s mode to mode. + if (mode != null) { + request.mode = mode + } + + // 19. If init["credentials"] exists, then set request’s credentials mode + // to it. + if (init.credentials !== undefined) { + request.credentials = init.credentials + } + + // 18. If init["cache"] exists, then set request’s cache mode to it. + if (init.cache !== undefined) { + request.cache = init.cache + } + + // 21. If request’s cache mode is "only-if-cached" and request’s mode is + // not "same-origin", then throw a TypeError. + if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') { + throw new TypeError( + "'only-if-cached' can be set only with 'same-origin' mode" + ) + } + + // 22. If init["redirect"] exists, then set request’s redirect mode to it. + if (init.redirect !== undefined) { + request.redirect = init.redirect + } + + // 23. If init["integrity"] exists, then set request’s integrity metadata to it. + if (init.integrity != null) { + request.integrity = String(init.integrity) + } + + // 24. If init["keepalive"] exists, then set request’s keepalive to it. + if (init.keepalive !== undefined) { + request.keepalive = Boolean(init.keepalive) + } + + // 25. If init["method"] exists, then: + if (init.method !== undefined) { + // 1. Let method be init["method"]. + let method = init.method + + // 2. If method is not a method or method is a forbidden method, then + // throw a TypeError. + 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.`) + } + + // 3. Normalize method. + method = normalizeMethodRecord[method] ?? normalizeMethod(method) + + // 4. Set request’s method to method. + request.method = method + } + + // 26. If init["signal"] exists, then set signal to it. + if (init.signal !== undefined) { + signal = init.signal + } + + // 27. Set this’s request to request. + this[kState] = request + + // 28. Set this’s signal to a new AbortSignal object with this’s relevant + // Realm. + // TODO: could this be simplified with AbortSignal.any + // (https://dom.spec.whatwg.org/#dom-abortsignal-any) + const ac = new AbortController() + this[kSignal] = ac.signal + this[kSignal][kRealm] = this[kRealm] + + // 29. If signal is not null, then make this’s signal follow 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 { + // Keep a strong ref to ac while request object + // is alive. This is needed to prevent AbortController + // from being prematurely garbage collected. + // See, https://github.com/nodejs/undici/issues/1926. + this[kAbortController] = ac + + const acRef = new WeakRef(ac) + const abort = function () { + const ac = acRef.deref() + if (ac !== undefined) { + ac.abort(this.reason) + } + } + + // Third-party AbortControllers may not work with these. + // See, https://github.com/nodejs/undici/pull/1910#issuecomment-1464495619. + try { + // If the max amount of listeners is equal to the default, increase it + // This is only available in node >= v19.9.0 + if (typeof getMaxListeners === 'function' && getMaxListeners(signal) === defaultMaxListeners) { + setMaxListeners(100, signal) + } else if (getEventListeners(signal, 'abort').length >= defaultMaxListeners) { + setMaxListeners(100, signal) + } + } catch {} + + util.addAbortListener(signal, abort) + requestFinalizer.register(ac, { signal, abort }) + } + } + + // 30. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is request’s header list and guard is + // "request". + this[kHeaders] = new Headers(kConstruct) + this[kHeaders][kHeadersList] = request.headersList + this[kHeaders][kGuard] = 'request' + this[kHeaders][kRealm] = this[kRealm] + + // 31. If this’s request’s mode is "no-cors", then: + if (mode === 'no-cors') { + // 1. If this’s request’s method is not a CORS-safelisted method, + // then throw a TypeError. + if (!corsSafeListedMethodsSet.has(request.method)) { + throw new TypeError( + `'${request.method} is unsupported in no-cors mode.` + ) + } + + // 2. Set this’s headers’s guard to "request-no-cors". + this[kHeaders][kGuard] = 'request-no-cors' + } + + // 32. If init is not empty, then: + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = this[kHeaders][kHeadersList] + // 1. Let headers be a copy of this’s headers and its associated header + // list. + // 2. If init["headers"] exists, then set headers to init["headers"]. + const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) + + // 3. Empty this’s headers’s header list. + headersList.clear() + + // 4. If headers is a Headers object, then for each header in its header + // list, append header’s name/header’s value to this’s headers. + if (headers instanceof HeadersList) { + for (const [key, val] of headers) { + headersList.append(key, val) + } + // Note: Copy the `set-cookie` meta-data. + headersList.cookies = headers.cookies + } else { + // 5. Otherwise, fill this’s headers with headers. + fillHeaders(this[kHeaders], headers) + } + } + + // 33. Let inputBody be input’s request’s body if input is a Request + // object; otherwise null. + const inputBody = input instanceof Request ? input[kState].body : null + + // 34. If either init["body"] exists and is non-null or inputBody is + // non-null, and request’s method is `GET` or `HEAD`, then throw a + // TypeError. + if ( + (init.body != null || inputBody != null) && + (request.method === 'GET' || request.method === 'HEAD') + ) { + throw new TypeError('Request with GET/HEAD method cannot have body.') + } + + // 35. Let initBody be null. + let initBody = null + + // 36. If init["body"] exists and is non-null, then: + if (init.body != null) { + // 1. Let Content-Type be null. + // 2. Set initBody and Content-Type to the result of extracting + // init["body"], with keepalive set to request’s keepalive. + const [extractedBody, contentType] = extractBody( + init.body, + request.keepalive + ) + initBody = extractedBody + + // 3, If Content-Type is non-null and this’s headers’s header list does + // not contain `Content-Type`, then append `Content-Type`/Content-Type to + // this’s headers. + if (contentType && !this[kHeaders][kHeadersList].contains('content-type')) { + this[kHeaders].append('content-type', contentType) + } + } + + // 37. Let inputOrInitBody be initBody if it is non-null; otherwise + // inputBody. + const inputOrInitBody = initBody ?? inputBody + + // 38. If inputOrInitBody is non-null and inputOrInitBody’s source is + // null, then: + if (inputOrInitBody != null && inputOrInitBody.source == null) { + // 1. If initBody is non-null and init["duplex"] does not exist, + // then throw a TypeError. + if (initBody != null && init.duplex == null) { + throw new TypeError('RequestInit: duplex option is required when sending a body.') + } + + // 2. If this’s request’s mode is neither "same-origin" nor "cors", + // then throw a TypeError. + if (request.mode !== 'same-origin' && request.mode !== 'cors') { + throw new TypeError( + 'If request is made from ReadableStream, mode should be "same-origin" or "cors"' + ) + } + + // 3. Set this’s request’s use-CORS-preflight flag. + request.useCORSPreflightFlag = true + } + + // 39. Let finalBody be inputOrInitBody. + let finalBody = inputOrInitBody + + // 40. If initBody is null and inputBody is non-null, then: + if (initBody == null && inputBody != null) { + // 1. If input is unusable, then throw a TypeError. + if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) { + throw new TypeError( + 'Cannot construct a Request with a Request object that has already been used.' + ) + } + + // 2. Set finalBody to the result of creating a proxy for inputBody. + if (!TransformStream) { + TransformStream = (__nccwpck_require__(35356).TransformStream) + } + + // https://streams.spec.whatwg.org/#readablestream-create-a-proxy + const identityTransform = new TransformStream() + inputBody.stream.pipeThrough(identityTransform) + finalBody = { + source: inputBody.source, + length: inputBody.length, + stream: identityTransform.readable + } + } + + // 41. Set this’s request’s body to finalBody. + this[kState].body = finalBody + } + + // Returns request’s HTTP method, which is "GET" by default. + get method () { + webidl.brandCheck(this, Request) + + // The method getter steps are to return this’s request’s method. + return this[kState].method + } + + // Returns the URL of request as a string. + get url () { + webidl.brandCheck(this, Request) + + // The url getter steps are to return this’s request’s URL, serialized. + return URLSerializer(this[kState].url) + } + + // Returns a Headers object consisting of the headers associated with request. + // Note that headers added in the network layer by the user agent will not + // be accounted for in this object, e.g., the "Host" header. + get headers () { + webidl.brandCheck(this, Request) + + // The headers getter steps are to return this’s headers. + return this[kHeaders] + } + + // Returns the kind of resource requested by request, e.g., "document" + // or "script". + get destination () { + webidl.brandCheck(this, Request) + + // The destination getter are to return this’s request’s destination. + return this[kState].destination + } + + // Returns the referrer of request. Its value can be a same-origin URL if + // explicitly set in init, the empty string to indicate no referrer, and + // "about:client" when defaulting to the global’s default. This is used + // during fetching to determine the value of the `Referer` header of the + // request being made. + get referrer () { + webidl.brandCheck(this, Request) + + // 1. If this’s request’s referrer is "no-referrer", then return the + // empty string. + if (this[kState].referrer === 'no-referrer') { + return '' + } + + // 2. If this’s request’s referrer is "client", then return + // "about:client". + if (this[kState].referrer === 'client') { + return 'about:client' + } + + // Return this’s request’s referrer, serialized. + return this[kState].referrer.toString() + } + + // Returns the referrer policy associated with request. + // This is used during fetching to compute the value of the request’s + // referrer. + get referrerPolicy () { + webidl.brandCheck(this, Request) + + // The referrerPolicy getter steps are to return this’s request’s referrer policy. + return this[kState].referrerPolicy + } + + // Returns the mode associated with request, which is a string indicating + // whether the request will use CORS, or will be restricted to same-origin + // URLs. + get mode () { + webidl.brandCheck(this, Request) + + // The mode getter steps are to return this’s request’s mode. + return this[kState].mode + } + + // Returns the credentials mode associated with request, + // which is a string indicating whether credentials will be sent with the + // request always, never, or only when sent to a same-origin URL. + get credentials () { + // The credentials getter steps are to return this’s request’s credentials mode. + return this[kState].credentials + } + + // Returns the cache mode associated with request, + // which is a string indicating how the request will + // interact with the browser’s cache when fetching. + get cache () { + webidl.brandCheck(this, Request) + + // The cache getter steps are to return this’s request’s cache mode. + return this[kState].cache + } + + // Returns the redirect mode associated with request, + // which is a string indicating how redirects for the + // request will be handled during fetching. A request + // will follow redirects by default. + get redirect () { + webidl.brandCheck(this, Request) + + // The redirect getter steps are to return this’s request’s redirect mode. + return this[kState].redirect + } + + // Returns request’s subresource integrity metadata, which is a + // cryptographic hash of the resource being fetched. Its value + // consists of multiple hashes separated by whitespace. [SRI] + get integrity () { + webidl.brandCheck(this, Request) + + // The integrity getter steps are to return this’s request’s integrity + // metadata. + return this[kState].integrity + } + + // Returns a boolean indicating whether or not request can outlive the + // global in which it was created. + get keepalive () { + webidl.brandCheck(this, Request) + + // The keepalive getter steps are to return this’s request’s keepalive. + return this[kState].keepalive + } + + // Returns a boolean indicating whether or not request is for a reload + // navigation. + get isReloadNavigation () { + webidl.brandCheck(this, Request) + + // The isReloadNavigation getter steps are to return true if this’s + // request’s reload-navigation flag is set; otherwise false. + return this[kState].reloadNavigation + } + + // Returns a boolean indicating whether or not request is for a history + // navigation (a.k.a. back-foward navigation). + get isHistoryNavigation () { + webidl.brandCheck(this, Request) + + // The isHistoryNavigation getter steps are to return true if this’s request’s + // history-navigation flag is set; otherwise false. + return this[kState].historyNavigation + } + + // Returns the signal associated with request, which is an AbortSignal + // object indicating whether or not request has been aborted, and its + // abort event handler. + get signal () { + webidl.brandCheck(this, Request) + + // The signal getter steps are to return this’s signal. + 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' + } + + // Returns a clone of request. + clone () { + webidl.brandCheck(this, Request) + + // 1. If this is unusable, then throw a TypeError. + if (this.bodyUsed || this.body?.locked) { + throw new TypeError('unusable') + } + + // 2. Let clonedRequest be the result of cloning this’s request. + const clonedRequest = cloneRequest(this[kState]) + + // 3. Let clonedRequestObject be the result of creating a Request object, + // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. + const clonedRequestObject = new Request(kConstruct) + clonedRequestObject[kState] = clonedRequest + clonedRequestObject[kRealm] = this[kRealm] + clonedRequestObject[kHeaders] = new Headers(kConstruct) + clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList + clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard] + clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm] + + // 4. Make clonedRequestObject’s signal follow this’s signal. + const ac = new AbortController() + if (this.signal.aborted) { + ac.abort(this.signal.reason) + } else { + util.addAbortListener( + this.signal, + () => { + ac.abort(this.signal.reason) + } + ) + } + clonedRequestObject[kSignal] = ac.signal + + // 4. Return clonedRequestObject. + return clonedRequestObject + } +} + +mixinBody(Request) + +function makeRequest (init) { + // https://fetch.spec.whatwg.org/#requests + const request = { + 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.url = request.urlList[0] + return request +} + +// https://fetch.spec.whatwg.org/#concept-request-clone +function cloneRequest (request) { + // To clone a request request, run these steps: + + // 1. Let newRequest be a copy of request, except for its body. + const newRequest = makeRequest({ ...request, body: null }) + + // 2. If request’s body is non-null, set newRequest’s body to the + // result of cloning request’s body. + if (request.body != null) { + newRequest.body = cloneBody(request.body) + } + + // 3. Return newRequest. + return newRequest +} + +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 +) + +// https://fetch.spec.whatwg.org/#requestinfo +webidl.converters.RequestInfo = function (V) { + if (typeof V === 'string') { + return webidl.converters.USVString(V) + } + + if (V instanceof Request) { + return webidl.converters.Request(V) + } + + return webidl.converters.USVString(V) +} + +webidl.converters.AbortSignal = webidl.interfaceConverter( + AbortSignal +) + +// https://fetch.spec.whatwg.org/#requestinit +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, + // https://w3c.github.io/webappsec-referrer-policy/#referrer-policy + allowedValues: referrerPolicy + }, + { + key: 'mode', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#concept-request-mode + allowedValues: requestMode + }, + { + key: 'credentials', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcredentials + allowedValues: requestCredentials + }, + { + key: 'cache', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestcache + allowedValues: requestCache + }, + { + key: 'redirect', + converter: webidl.converters.DOMString, + // https://fetch.spec.whatwg.org/#requestredirect + allowedValues: requestRedirect + }, + { + key: 'integrity', + converter: webidl.converters.DOMString + }, + { + key: 'keepalive', + converter: webidl.converters.boolean + }, + { + key: 'signal', + converter: webidl.nullableConverter( + (signal) => webidl.converters.AbortSignal( + signal, + { strict: false } + ) + ) + }, + { + key: 'window', + converter: webidl.converters.any + }, + { + key: 'duplex', + converter: webidl.converters.DOMString, + allowedValues: requestDuplex + } +]) + +module.exports = { Request, makeRequest } + + +/***/ }), + +/***/ 58846: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { Headers, HeadersList, fill } = __nccwpck_require__(23245) +const { extractBody, cloneBody, mixinBody } = __nccwpck_require__(62494) +const util = __nccwpck_require__(67468) +const { kEnumerableProperty } = util +const { + isValidReasonPhrase, + isCancelled, + isAborted, + isBlobLike, + serializeJavascriptValueToJSONString, + isErrorLike, + isomorphicEncode +} = __nccwpck_require__(79453) +const { + redirectStatusSet, + nullBodyStatus, + DOMException +} = __nccwpck_require__(93541) +const { kState, kHeaders, kGuard, kRealm } = __nccwpck_require__(46938) +const { webidl } = __nccwpck_require__(96138) +const { FormData } = __nccwpck_require__(12692) +const { getGlobalOrigin } = __nccwpck_require__(64110) +const { URLSerializer } = __nccwpck_require__(50096) +const { kHeadersList, kConstruct } = __nccwpck_require__(48039) +const assert = __nccwpck_require__(39491) +const { types } = __nccwpck_require__(73837) + +const ReadableStream = globalThis.ReadableStream || (__nccwpck_require__(35356).ReadableStream) +const textEncoder = new TextEncoder('utf-8') + +// https://fetch.spec.whatwg.org/#response-class +class Response { + // Creates network error Response. + static error () { + // TODO + const relevantRealm = { settingsObject: {} } + + // The static error() method steps are to return the result of creating a + // Response object, given a new network error, "immutable", and this’s + // relevant Realm. + const responseObject = new Response() + responseObject[kState] = makeNetworkError() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm + return responseObject + } + + // https://fetch.spec.whatwg.org/#dom-response-json + static json (data, init = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.json' }) + + if (init !== null) { + init = webidl.converters.ResponseInit(init) + } + + // 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data. + const bytes = textEncoder.encode( + serializeJavascriptValueToJSONString(data) + ) + + // 2. Let body be the result of extracting bytes. + const body = extractBody(bytes) + + // 3. Let responseObject be the result of creating a Response object, given a new response, + // "response", and this’s relevant Realm. + const relevantRealm = { settingsObject: {} } + const responseObject = new Response() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kGuard] = 'response' + responseObject[kHeaders][kRealm] = relevantRealm + + // 4. Perform initialize a response given responseObject, init, and (body, "application/json"). + initializeResponse(responseObject, init, { body: body[0], type: 'application/json' }) + + // 5. Return responseObject. + return responseObject + } + + // Creates a redirect Response that redirects to url with status status. + static redirect (url, status = 302) { + const relevantRealm = { settingsObject: {} } + + webidl.argumentLengthCheck(arguments, 1, { header: 'Response.redirect' }) + + url = webidl.converters.USVString(url) + status = webidl.converters['unsigned short'](status) + + // 1. Let parsedURL be the result of parsing url with current settings + // object’s API base URL. + // 2. If parsedURL is failure, then throw a TypeError. + // TODO: base-URL? + let parsedURL + try { + parsedURL = new URL(url, getGlobalOrigin()) + } catch (err) { + throw Object.assign(new TypeError('Failed to parse URL from ' + url), { + cause: err + }) + } + + // 3. If status is not a redirect status, then throw a RangeError. + if (!redirectStatusSet.has(status)) { + throw new RangeError('Invalid status code ' + status) + } + + // 4. Let responseObject be the result of creating a Response object, + // given a new response, "immutable", and this’s relevant Realm. + const responseObject = new Response() + responseObject[kRealm] = relevantRealm + responseObject[kHeaders][kGuard] = 'immutable' + responseObject[kHeaders][kRealm] = relevantRealm + + // 5. Set responseObject’s response’s status to status. + responseObject[kState].status = status + + // 6. Let value be parsedURL, serialized and isomorphic encoded. + const value = isomorphicEncode(URLSerializer(parsedURL)) + + // 7. Append `Location`/value to responseObject’s response’s header list. + responseObject[kState].headersList.append('location', value) + + // 8. Return responseObject. + return responseObject + } + + // https://fetch.spec.whatwg.org/#dom-response + constructor (body = null, init = {}) { + if (body !== null) { + body = webidl.converters.BodyInit(body) + } + + init = webidl.converters.ResponseInit(init) + + // TODO + this[kRealm] = { settingsObject: {} } + + // 1. Set this’s response to a new response. + this[kState] = makeResponse({}) + + // 2. Set this’s headers to a new Headers object with this’s relevant + // Realm, whose header list is this’s response’s header list and guard + // is "response". + this[kHeaders] = new Headers(kConstruct) + this[kHeaders][kGuard] = 'response' + this[kHeaders][kHeadersList] = this[kState].headersList + this[kHeaders][kRealm] = this[kRealm] + + // 3. Let bodyWithType be null. + let bodyWithType = null + + // 4. If body is non-null, then set bodyWithType to the result of extracting body. + if (body != null) { + const [extractedBody, type] = extractBody(body) + bodyWithType = { body: extractedBody, type } + } + + // 5. Perform initialize a response given this, init, and bodyWithType. + initializeResponse(this, init, bodyWithType) + } + + // Returns response’s type, e.g., "cors". + get type () { + webidl.brandCheck(this, Response) + + // The type getter steps are to return this’s response’s type. + return this[kState].type + } + + // Returns response’s URL, if it has one; otherwise the empty string. + get url () { + webidl.brandCheck(this, Response) + + const urlList = this[kState].urlList + + // The url getter steps are to return the empty string if this’s + // response’s URL is null; otherwise this’s response’s URL, + // serialized with exclude fragment set to true. + const url = urlList[urlList.length - 1] ?? null + + if (url === null) { + return '' + } + + return URLSerializer(url, true) + } + + // Returns whether response was obtained through a redirect. + get redirected () { + webidl.brandCheck(this, Response) + + // The redirected getter steps are to return true if this’s response’s URL + // list has more than one item; otherwise false. + return this[kState].urlList.length > 1 + } + + // Returns response’s status. + get status () { + webidl.brandCheck(this, Response) + + // The status getter steps are to return this’s response’s status. + return this[kState].status + } + + // Returns whether response’s status is an ok status. + get ok () { + webidl.brandCheck(this, Response) + + // The ok getter steps are to return true if this’s response’s status is an + // ok status; otherwise false. + return this[kState].status >= 200 && this[kState].status <= 299 + } + + // Returns response’s status message. + get statusText () { + webidl.brandCheck(this, Response) + + // The statusText getter steps are to return this’s response’s status + // message. + return this[kState].statusText + } + + // Returns response’s headers as Headers. + get headers () { + webidl.brandCheck(this, Response) + + // The headers getter steps are to return this’s headers. + 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) + } + + // Returns a clone of response. + clone () { + webidl.brandCheck(this, Response) + + // 1. If this is unusable, then throw a TypeError. + if (this.bodyUsed || (this.body && this.body.locked)) { + throw webidl.errors.exception({ + header: 'Response.clone', + message: 'Body has already been consumed.' + }) + } + + // 2. Let clonedResponse be the result of cloning this’s response. + const clonedResponse = cloneResponse(this[kState]) + + // 3. Return the result of creating a Response object, given + // clonedResponse, this’s headers’s guard, and this’s relevant Realm. + const clonedResponseObject = new Response() + clonedResponseObject[kState] = clonedResponse + clonedResponseObject[kRealm] = this[kRealm] + clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList + clonedResponseObject[kHeaders][kGuard] = this[kHeaders][kGuard] + clonedResponseObject[kHeaders][kRealm] = this[kHeaders][kRealm] + + return clonedResponseObject + } +} + +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 +}) + +// https://fetch.spec.whatwg.org/#concept-response-clone +function cloneResponse (response) { + // To clone a response response, run these steps: + + // 1. If response is a filtered response, then return a new identical + // filtered response whose internal response is a clone of response’s + // internal response. + if (response.internalResponse) { + return filterResponse( + cloneResponse(response.internalResponse), + response.type + ) + } + + // 2. Let newResponse be a copy of response, except for its body. + const newResponse = makeResponse({ ...response, body: null }) + + // 3. If response’s body is non-null, then set newResponse’s body to the + // result of cloning response’s body. + if (response.body != null) { + newResponse.body = cloneBody(response.body) + } + + // 4. Return newResponse. + 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) { + const isError = isErrorLike(reason) + return makeResponse({ + 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(!(p in state)) + target[p] = value + return true + } + }) +} + +// https://fetch.spec.whatwg.org/#concept-filtered-response +function filterResponse (response, type) { + // Set response to the following filtered response with response as its + // internal response, depending on request’s response tainting: + if (type === 'basic') { + // A basic filtered response is a filtered response whose type is "basic" + // and header list excludes any headers in internal response’s header list + // whose name is a forbidden response-header name. + + // Note: undici does not implement forbidden response-header names + return makeFilteredResponse(response, { + type: 'basic', + headersList: response.headersList + }) + } else if (type === 'cors') { + // A CORS filtered response is a filtered response whose type is "cors" + // and header list excludes any headers in internal response’s header + // list whose name is not a CORS-safelisted response-header name, given + // internal response’s CORS-exposed header-name list. + + // Note: undici does not implement CORS-safelisted response-header names + return makeFilteredResponse(response, { + type: 'cors', + headersList: response.headersList + }) + } else if (type === 'opaque') { + // An opaque filtered response is a filtered response whose type is + // "opaque", URL list is the empty list, status is 0, status message + // is the empty byte sequence, header list is empty, and body is null. + + return makeFilteredResponse(response, { + type: 'opaque', + urlList: Object.freeze([]), + status: 0, + statusText: '', + body: null + }) + } else if (type === 'opaqueredirect') { + // An opaque-redirect filtered response is a filtered response whose type + // is "opaqueredirect", status is 0, status message is the empty byte + // sequence, header list is empty, and body is null. + + return makeFilteredResponse(response, { + type: 'opaqueredirect', + status: 0, + statusText: '', + headersList: [], + body: null + }) + } else { + assert(false) + } +} + +// https://fetch.spec.whatwg.org/#appropriate-network-error +function makeAppropriateNetworkError (fetchParams, err = null) { + // 1. Assert: fetchParams is canceled. + assert(isCancelled(fetchParams)) + + // 2. Return an aborted network error if fetchParams is aborted; + // otherwise return a network error. + 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 })) +} + +// https://whatpr.org/fetch/1392.html#initialize-a-response +function initializeResponse (response, init, body) { + // 1. If init["status"] is not in the range 200 to 599, inclusive, then + // throw a RangeError. + 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.') + } + + // 2. If init["statusText"] does not match the reason-phrase token production, + // then throw a TypeError. + if ('statusText' in init && init.statusText != null) { + // See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2: + // reason-phrase = *( HTAB / SP / VCHAR / obs-text ) + if (!isValidReasonPhrase(String(init.statusText))) { + throw new TypeError('Invalid statusText') + } + } + + // 3. Set response’s response’s status to init["status"]. + if ('status' in init && init.status != null) { + response[kState].status = init.status + } + + // 4. Set response’s response’s status message to init["statusText"]. + if ('statusText' in init && init.statusText != null) { + response[kState].statusText = init.statusText + } + + // 5. If init["headers"] exists, then fill response’s headers with init["headers"]. + if ('headers' in init && init.headers != null) { + fill(response[kHeaders], init.headers) + } + + // 6. If body was given, then: + if (body) { + // 1. If response's status is a null body status, then throw a TypeError. + if (nullBodyStatus.includes(response.status)) { + throw webidl.errors.exception({ + header: 'Response constructor', + message: 'Invalid response status code ' + response.status + }) + } + + // 2. Set response's body to body's body. + response[kState].body = body.body + + // 3. If body's type is non-null and response's header list does not contain + // `Content-Type`, then append (`Content-Type`, body's type) to response's header list. + if (body.type != null && !response[kState].headersList.contains('Content-Type')) { + response[kState].headersList.append('content-type', body.type) + } + } +} + +webidl.converters.ReadableStream = webidl.interfaceConverter( + ReadableStream +) + +webidl.converters.FormData = webidl.interfaceConverter( + FormData +) + +webidl.converters.URLSearchParams = webidl.interfaceConverter( + URLSearchParams +) + +// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit +webidl.converters.XMLHttpRequestBodyInit = function (V) { + if (typeof V === 'string') { + return webidl.converters.USVString(V) + } + + if (isBlobLike(V)) { + return webidl.converters.Blob(V, { strict: false }) + } + + if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { + return webidl.converters.BufferSource(V) + } + + if (util.isFormDataLike(V)) { + return webidl.converters.FormData(V, { strict: false }) + } + + if (V instanceof URLSearchParams) { + return webidl.converters.URLSearchParams(V) + } + + return webidl.converters.DOMString(V) +} + +// https://fetch.spec.whatwg.org/#bodyinit +webidl.converters.BodyInit = function (V) { + if (V instanceof ReadableStream) { + return webidl.converters.ReadableStream(V) + } + + // Note: the spec doesn't include async iterables, + // this is an undici extension. + if (V?.[Symbol.asyncIterator]) { + return V + } + + return webidl.converters.XMLHttpRequestBodyInit(V) +} + +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 = { + makeNetworkError, + makeResponse, + makeAppropriateNetworkError, + filterResponse, + Response, + cloneResponse +} + + +/***/ }), + +/***/ 46938: +/***/ ((module) => { + + + +module.exports = { + kUrl: Symbol('url'), + kHeaders: Symbol('headers'), + kSignal: Symbol('signal'), + kState: Symbol('state'), + kGuard: Symbol('guard'), + kRealm: Symbol('realm') +} + + +/***/ }), + +/***/ 79453: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { redirectStatusSet, referrerPolicySet: referrerPolicyTokens, badPortsSet } = __nccwpck_require__(93541) +const { getGlobalOrigin } = __nccwpck_require__(64110) +const { performance } = __nccwpck_require__(4074) +const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(67468) +const assert = __nccwpck_require__(39491) +const { isUint8Array } = __nccwpck_require__(29830) + +// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable +/** @type {import('crypto')|undefined} */ +let crypto + +try { + crypto = __nccwpck_require__(6113) +} catch { + +} + +function responseURL (response) { + // https://fetch.spec.whatwg.org/#responses + // A response has an associated URL. It is a pointer to the last URL + // in response’s URL list and null if response’s URL list is empty. + const urlList = response.urlList + const length = urlList.length + return length === 0 ? null : urlList[length - 1].toString() +} + +// https://fetch.spec.whatwg.org/#concept-response-location-url +function responseLocationURL (response, requestFragment) { + // 1. If response’s status is not a redirect status, then return null. + if (!redirectStatusSet.has(response.status)) { + return null + } + + // 2. Let location be the result of extracting header list values given + // `Location` and response’s header list. + let location = response.headersList.get('location') + + // 3. If location is a header value, then set location to the result of + // parsing location with response’s URL. + if (location !== null && isValidHeaderValue(location)) { + location = new URL(location, responseURL(response)) + } + + // 4. If location is a URL whose fragment is null, then set location’s + // fragment to requestFragment. + if (location && !location.hash) { + location.hash = requestFragment + } + + // 5. Return location. + return location +} + +/** @returns {URL} */ +function requestCurrentURL (request) { + return request.urlList[request.urlList.length - 1] +} + +function requestBadPort (request) { + // 1. Let url be request’s current URL. + const url = requestCurrentURL(request) + + // 2. If url’s scheme is an HTTP(S) scheme and url’s port is a bad port, + // then return blocked. + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + return 'blocked' + } + + // 3. Return allowed. + return 'allowed' +} + +function isErrorLike (object) { + return object instanceof Error || ( + object?.constructor?.name === 'Error' || + object?.constructor?.name === 'DOMException' + ) +} + +// Check whether |statusText| is a ByteString and +// matches the Reason-Phrase token production. +// RFC 2616: https://tools.ietf.org/html/rfc2616 +// RFC 7230: https://tools.ietf.org/html/rfc7230 +// "reason-phrase = *( HTAB / SP / VCHAR / obs-text )" +// https://github.com/chromium/chromium/blob/94.0.4604.1/third_party/blink/renderer/core/fetch/response.cc#L116 +function isValidReasonPhrase (statusText) { + for (let i = 0; i < statusText.length; ++i) { + const c = statusText.charCodeAt(i) + if ( + !( + ( + c === 0x09 || // HTAB + (c >= 0x20 && c <= 0x7e) || // SP / VCHAR + (c >= 0x80 && c <= 0xff) + ) // obs-text + ) + ) { + return false + } + } + return true +} + +/** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ +function isTokenCharCode (c) { + switch (c) { + case 0x22: + case 0x28: + case 0x29: + case 0x2c: + case 0x2f: + case 0x3a: + case 0x3b: + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + case 0x40: + case 0x5b: + case 0x5c: + case 0x5d: + case 0x7b: + case 0x7d: + // DQUOTE and "(),/:;<=>?@[\]{}" + return false + default: + // VCHAR %x21-7E + return c >= 0x21 && c <= 0x7e + } +} + +/** + * @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 +} + +/** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ +function isValidHeaderName (potentialValue) { + return isValidHTTPToken(potentialValue) +} + +/** + * @see https://fetch.spec.whatwg.org/#header-value + * @param {string} potentialValue + */ +function isValidHeaderValue (potentialValue) { + // - Has no leading or trailing HTTP tab or space bytes. + // - Contains no 0x00 (NUL) or HTTP newline bytes. + if ( + potentialValue.startsWith('\t') || + potentialValue.startsWith(' ') || + potentialValue.endsWith('\t') || + potentialValue.endsWith(' ') + ) { + return false + } + + if ( + potentialValue.includes('\0') || + potentialValue.includes('\r') || + potentialValue.includes('\n') + ) { + return false + } + + return true +} + +// https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect +function setRequestReferrerPolicyOnRedirect (request, actualResponse) { + // 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. + + // 1. Let policy be the result of executing § 8.1 Parse a referrer policy + // from a Referrer-Policy header on actualResponse. + + // 8.1 Parse a referrer policy from a Referrer-Policy header + // 1. Let policy-tokens be the result of extracting header list values given `Referrer-Policy` and response’s header list. + const { headersList } = actualResponse + // 2. Let policy be the empty string. + // 3. For each token in policy-tokens, if token is a referrer policy and token is not the empty string, then set policy to token. + // 4. Return policy. + const policyHeader = (headersList.get('referrer-policy') ?? '').split(',') + + // Note: As the referrer-policy can contain multiple policies + // separated by comma, we need to loop through all of them + // and pick the first valid one. + // Ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#specify_a_fallback_policy + let policy = '' + if (policyHeader.length > 0) { + // The right-most policy takes precedence. + // The left-most policy is the fallback. + for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim() + if (referrerPolicyTokens.has(token)) { + policy = token + break + } + } + } + + // 2. If policy is not the empty string, then set request’s referrer policy to policy. + if (policy !== '') { + request.referrerPolicy = policy + } +} + +// https://fetch.spec.whatwg.org/#cross-origin-resource-policy-check +function crossOriginResourcePolicyCheck () { + // TODO + return 'allowed' +} + +// https://fetch.spec.whatwg.org/#concept-cors-check +function corsCheck () { + // TODO + return 'success' +} + +// https://fetch.spec.whatwg.org/#concept-tao-check +function TAOCheck () { + // TODO + return 'success' +} + +function appendFetchMetadata (httpRequest) { + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-dest-header + // TODO + + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-mode-header + + // 1. Assert: r’s url is a potentially trustworthy URL. + // TODO + + // 2. Let header be a Structured Header whose value is a token. + let header = null + + // 3. Set header’s value to r’s mode. + header = httpRequest.mode + + // 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list. + httpRequest.headersList.set('sec-fetch-mode', header) + + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header + // TODO + + // https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-user-header + // TODO +} + +// https://fetch.spec.whatwg.org/#append-a-request-origin-header +function appendRequestOriginHeader (request) { + // 1. Let serializedOrigin be the result of byte-serializing a request origin with request. + let serializedOrigin = request.origin + + // 2. If request’s response tainting is "cors" or request’s mode is "websocket", then append (`Origin`, serializedOrigin) to request’s header list. + if (request.responseTainting === 'cors' || request.mode === 'websocket') { + if (serializedOrigin) { + request.headersList.append('origin', serializedOrigin) + } + + // 3. Otherwise, if request’s method is neither `GET` nor `HEAD`, then: + } else if (request.method !== 'GET' && request.method !== 'HEAD') { + // 1. Switch on request’s referrer policy: + switch (request.referrerPolicy) { + case 'no-referrer': + // Set serializedOrigin to `null`. + serializedOrigin = null + break + case 'no-referrer-when-downgrade': + case 'strict-origin': + case 'strict-origin-when-cross-origin': + // If request’s origin is a tuple origin, its scheme is "https", and request’s current URL’s scheme is not "https", then set serializedOrigin to `null`. + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { + serializedOrigin = null + } + break + case 'same-origin': + // If request’s origin is not same origin with request’s current URL’s origin, then set serializedOrigin to `null`. + if (!sameOrigin(request, requestCurrentURL(request))) { + serializedOrigin = null + } + break + default: + // Do nothing. + } + + if (serializedOrigin) { + // 2. Append (`Origin`, serializedOrigin) to request’s header list. + request.headersList.append('origin', serializedOrigin) + } + } +} + +function coarsenedSharedCurrentTime (crossOriginIsolatedCapability) { + // TODO + return performance.now() +} + +// https://fetch.spec.whatwg.org/#create-an-opaque-timing-info +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 + } +} + +// https://html.spec.whatwg.org/multipage/origin.html#policy-container +function makePolicyContainer () { + // Note: the fetch spec doesn't make use of embedder policy or CSP list + return { + referrerPolicy: 'strict-origin-when-cross-origin' + } +} + +// https://html.spec.whatwg.org/multipage/origin.html#clone-a-policy-container +function clonePolicyContainer (policyContainer) { + return { + referrerPolicy: policyContainer.referrerPolicy + } +} + +// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer +function determineRequestsReferrer (request) { + // 1. Let policy be request's referrer policy. + const policy = request.referrerPolicy + + // Note: policy cannot (shouldn't) be null or an empty string. + assert(policy) + + // 2. Let environment be request’s client. + + let referrerSource = null + + // 3. Switch on request’s referrer: + if (request.referrer === 'client') { + // Note: node isn't a browser and doesn't implement document/iframes, + // so we bypass this step and replace it with our own. + + const globalOrigin = getGlobalOrigin() + + if (!globalOrigin || globalOrigin.origin === 'null') { + return 'no-referrer' + } + + // note: we need to clone it as it's mutated + referrerSource = new URL(globalOrigin) + } else if (request.referrer instanceof URL) { + // Let referrerSource be request’s referrer. + referrerSource = request.referrer + } + + // 4. Let request’s referrerURL be the result of stripping referrerSource for + // use as a referrer. + let referrerURL = stripURLForReferrer(referrerSource) + + // 5. Let referrerOrigin be the result of stripping referrerSource for use as + // a referrer, with the origin-only flag set to true. + const referrerOrigin = stripURLForReferrer(referrerSource, true) + + // 6. If the result of serializing referrerURL is a string whose length is + // greater than 4096, set referrerURL to referrerOrigin. + if (referrerURL.toString().length > 4096) { + referrerURL = referrerOrigin + } + + const areSameOrigin = sameOrigin(request, referrerURL) + const isNonPotentiallyTrustWorthy = isURLPotentiallyTrustworthy(referrerURL) && + !isURLPotentiallyTrustworthy(request.url) + + // 8. Execute the switch statements corresponding to the value of policy: + 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) + + // 1. If the origin of referrerURL and the origin of request’s current + // URL are the same, then return referrerURL. + if (sameOrigin(referrerURL, currentURL)) { + return referrerURL + } + + // 2. If referrerURL is a potentially trustworthy URL and request’s + // current URL is not a potentially trustworthy URL, then return no + // referrer. + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { + return 'no-referrer' + } + + // 3. Return referrerOrigin. + return referrerOrigin + } + case 'strict-origin': // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + case 'no-referrer-when-downgrade': // eslint-disable-line + /** + * 1. If referrerURL is a potentially trustworthy URL and + * request’s current URL is not a potentially trustworthy URL, + * then return no referrer. + * 2. Return referrerOrigin + */ + + default: // eslint-disable-line + 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) { + // 1. Assert: url is a URL. + assert(url instanceof URL) + + // 2. If url’s scheme is a local scheme, then return no referrer. + if (url.protocol === 'file:' || url.protocol === 'about:' || url.protocol === 'blank:') { + return 'no-referrer' + } + + // 3. Set url’s username to the empty string. + url.username = '' + + // 4. Set url’s password to the empty string. + url.password = '' + + // 5. Set url’s fragment to null. + url.hash = '' + + // 6. If the origin-only flag is true, then: + if (originOnly) { + // 1. Set url’s path to « the empty string ». + url.pathname = '' + + // 2. Set url’s query to null. + url.search = '' + } + + // 7. Return url. + return url +} + +function isURLPotentiallyTrustworthy (url) { + if (!(url instanceof URL)) { + return false + } + + // If child of about, return true + if (url.href === 'about:blank' || url.href === 'about:srcdoc') { + return true + } + + // If scheme is data, return true + if (url.protocol === 'data:') return true + + // If file, return true + if (url.protocol === 'file:') return true + + return isOriginPotentiallyTrustworthy(url.origin) + + function isOriginPotentiallyTrustworthy (origin) { + // If origin is explicitly null, return false + if (origin == null || origin === 'null') return false + + const originAsURL = new URL(origin) + + // If secure, return true + if (originAsURL.protocol === 'https:' || originAsURL.protocol === 'wss:') { + return true + } + + // If localhost or variants, 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 + } + + // If any other, return false + return false + } +} + +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#does-response-match-metadatalist + * @param {Uint8Array} bytes + * @param {string} metadataList + */ +function bytesMatch (bytes, metadataList) { + // If node is not built with OpenSSL support, we cannot check + // a request's integrity, so allow it by default (the spec will + // allow requests if an invalid hash is given, as precedence). + /* istanbul ignore if: only if node is built with --without-ssl */ + if (crypto === undefined) { + return true + } + + // 1. Let parsedMetadata be the result of parsing metadataList. + const parsedMetadata = parseMetadata(metadataList) + + // 2. If parsedMetadata is no metadata, return true. + if (parsedMetadata === 'no metadata') { + return true + } + + // 3. If parsedMetadata is the empty set, return true. + if (parsedMetadata.length === 0) { + return true + } + + // 4. Let metadata be the result of getting the strongest + // metadata from parsedMetadata. + const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo)) + // get the strongest algorithm + const strongest = list[0].algo + // get all entries that use the strongest algorithm; ignore weaker + const metadata = list.filter((item) => item.algo === strongest) + + // 5. For each item in metadata: + for (const item of metadata) { + // 1. Let algorithm be the alg component of item. + const algorithm = item.algo + + // 2. Let expectedValue be the val component of item. + let expectedValue = item.hash + + // See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e + // "be liberal with padding". This is annoying, and it's not even in the spec. + + if (expectedValue.endsWith('==')) { + expectedValue = expectedValue.slice(0, -2) + } + + // 3. Let actualValue be the result of applying algorithm to bytes. + let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64') + + if (actualValue.endsWith('==')) { + actualValue = actualValue.slice(0, -2) + } + + // 4. If actualValue is a case-sensitive match for expectedValue, + // return true. + if (actualValue === expectedValue) { + return true + } + + let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest('base64url') + + if (actualBase64URL.endsWith('==')) { + actualBase64URL = actualBase64URL.slice(0, -2) + } + + if (actualBase64URL === expectedValue) { + return true + } + } + + // 6. Return false. + return false +} + +// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options +// https://www.w3.org/TR/CSP2/#source-list-syntax +// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 +const parseHashWithOptions = /((?sha256|sha384|sha512)-(?[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i + +/** + * @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata + * @param {string} metadata + */ +function parseMetadata (metadata) { + // 1. Let result be the empty set. + /** @type {{ algo: string, hash: string }[]} */ + const result = [] + + // 2. Let empty be equal to true. + let empty = true + + const supportedHashes = crypto.getHashes() + + // 3. For each token returned by splitting metadata on spaces: + for (const token of metadata.split(' ')) { + // 1. Set empty to false. + empty = false + + // 2. Parse token as a hash-with-options. + const parsedToken = parseHashWithOptions.exec(token) + + // 3. If token does not parse, continue to the next token. + if (parsedToken === null || parsedToken.groups === undefined) { + // Note: Chromium blocks the request at this point, but Firefox + // gives a warning that an invalid integrity was given. The + // correct behavior is to ignore these, and subsequently not + // check the integrity of the resource. + continue + } + + // 4. Let algorithm be the hash-algo component of token. + const algorithm = parsedToken.groups.algo + + // 5. If algorithm is a hash function recognized by the user + // agent, add the parsed token to result. + if (supportedHashes.includes(algorithm.toLowerCase())) { + result.push(parsedToken.groups) + } + } + + // 4. Return no metadata if empty is true, otherwise return result. + if (empty === true) { + return 'no metadata' + } + + return result +} + +// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request +function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) { + // TODO +} + +/** + * @link {https://html.spec.whatwg.org/multipage/origin.html#same-origin} + * @param {URL} A + * @param {URL} B + */ +function sameOrigin (A, B) { + // 1. If A and B are the same opaque origin, then return true. + if (A.origin === B.origin && A.origin === 'null') { + return true + } + + // 2. If A and B are both tuple origins and their schemes, + // hosts, and port are identical, then return true. + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { + return true + } + + // 3. Return false. + return false +} + +function createDeferredPromise () { + let res + let rej + const promise = new Promise((resolve, reject) => { + res = resolve + rej = reject + }) + + return { promise, resolve: res, reject: rej } +} + +function isAborted (fetchParams) { + return fetchParams.controller.state === 'aborted' +} + +function isCancelled (fetchParams) { + return fetchParams.controller.state === 'aborted' || + fetchParams.controller.state === 'terminated' +} + +const normalizeMethodRecord = { + delete: 'DELETE', + DELETE: 'DELETE', + get: 'GET', + GET: 'GET', + head: 'HEAD', + HEAD: 'HEAD', + options: 'OPTIONS', + OPTIONS: 'OPTIONS', + post: 'POST', + POST: 'POST', + put: 'PUT', + PUT: 'PUT' +} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(normalizeMethodRecord, null) + +/** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ +function normalizeMethod (method) { + return normalizeMethodRecord[method.toLowerCase()] ?? method +} + +// https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string +function serializeJavascriptValueToJSONString (value) { + // 1. Let result be ? Call(%JSON.stringify%, undefined, « value »). + const result = JSON.stringify(value) + + // 2. If result is undefined, then throw a TypeError. + if (result === undefined) { + throw new TypeError('Value is not JSON serializable') + } + + // 3. Assert: result is a string. + assert(typeof result === 'string') + + // 4. Return result. + return result +} + +// https://tc39.es/ecma262/#sec-%25iteratorprototype%25-object +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 (iterator, name, kind) { + const object = { + index: 0, + kind, + target: iterator + } + + const i = { + next () { + // 1. Let interface be the interface for which the iterator prototype object exists. + + // 2. Let thisValue be the this value. + + // 3. Let object be ? ToObject(thisValue). + + // 4. If object is a platform object, then perform a security + // check, passing: + + // 5. If object is not a default iterator object for interface, + // then throw a TypeError. + if (Object.getPrototypeOf(this) !== i) { + throw new TypeError( + `'next' called on an object that does not implement interface ${name} Iterator.` + ) + } + + // 6. Let index be object’s index. + // 7. Let kind be object’s kind. + // 8. Let values be object’s target's value pairs to iterate over. + const { index, kind, target } = object + const values = target() + + // 9. Let len be the length of values. + const len = values.length + + // 10. If index is greater than or equal to len, then return + // CreateIterResultObject(undefined, true). + if (index >= len) { + return { value: undefined, done: true } + } + + // 11. Let pair be the entry in values at index index. + const pair = values[index] + + // 12. Set object’s index to index + 1. + object.index = index + 1 + + // 13. Return the iterator result for pair and kind. + return iteratorResult(pair, kind) + }, + // The class string of an iterator prototype object for a given interface is the + // result of concatenating the identifier of the interface and the string " Iterator". + [Symbol.toStringTag]: `${name} Iterator` + } + + // The [[Prototype]] internal slot of an iterator prototype object must be %IteratorPrototype%. + Object.setPrototypeOf(i, esIteratorPrototype) + // esIteratorPrototype needs to be the prototype of i + // which is the prototype of an empty object. Yes, it's confusing. + return Object.setPrototypeOf({}, i) +} + +// https://webidl.spec.whatwg.org/#iterator-result +function iteratorResult (pair, kind) { + let result + + // 1. Let result be a value determined by the value of kind: + switch (kind) { + case 'key': { + // 1. Let idlKey be pair’s key. + // 2. Let key be the result of converting idlKey to an + // ECMAScript value. + // 3. result is key. + result = pair[0] + break + } + case 'value': { + // 1. Let idlValue be pair’s value. + // 2. Let value be the result of converting idlValue to + // an ECMAScript value. + // 3. result is value. + result = pair[1] + break + } + case 'key+value': { + // 1. Let idlKey be pair’s key. + // 2. Let idlValue be pair’s value. + // 3. Let key be the result of converting idlKey to an + // ECMAScript value. + // 4. Let value be the result of converting idlValue to + // an ECMAScript value. + // 5. Let array be ! ArrayCreate(2). + // 6. Call ! CreateDataProperty(array, "0", key). + // 7. Call ! CreateDataProperty(array, "1", value). + // 8. result is array. + result = pair + break + } + } + + // 2. Return CreateIterResultObject(result, false). + return { value: result, done: false } +} + +/** + * @see https://fetch.spec.whatwg.org/#body-fully-read + */ +async function fullyReadBody (body, processBody, processBodyError) { + // 1. If taskDestination is null, then set taskDestination to + // the result of starting a new parallel queue. + + // 2. Let successSteps given a byte sequence bytes be to queue a + // fetch task to run processBody given bytes, with taskDestination. + const successSteps = processBody + + // 3. Let errorSteps be to queue a fetch task to run processBodyError, + // with taskDestination. + const errorSteps = processBodyError + + // 4. Let reader be the result of getting a reader for body’s stream. + // If that threw an exception, then run errorSteps with that + // exception and return. + let reader + + try { + reader = body.stream.getReader() + } catch (e) { + errorSteps(e) + return + } + + // 5. Read all bytes from reader, given successSteps and errorSteps. + try { + const result = await readAllBytes(reader) + successSteps(result) + } catch (e) { + errorSteps(e) + } +} + +/** @type {ReadableStream} */ +let ReadableStream = globalThis.ReadableStream + +function isReadableStreamLike (stream) { + if (!ReadableStream) { + ReadableStream = (__nccwpck_require__(35356).ReadableStream) + } + + return stream instanceof ReadableStream || ( + stream[Symbol.toStringTag] === 'ReadableStream' && + typeof stream.tee === 'function' + ) +} + +const MAXIMUM_ARGUMENT_LENGTH = 65535 + +/** + * @see https://infra.spec.whatwg.org/#isomorphic-decode + * @param {number[]|Uint8Array} input + */ +function isomorphicDecode (input) { + // 1. To isomorphic decode a byte sequence input, return a string whose code point + // length is equal to input’s length and whose code points have the same values + // as the values of input’s bytes, in the same order. + + if (input.length < MAXIMUM_ARGUMENT_LENGTH) { + return String.fromCharCode(...input) + } + + return input.reduce((previous, current) => previous + String.fromCharCode(current), '') +} + +/** + * @param {ReadableStreamController} controller + */ +function readableStreamClose (controller) { + try { + controller.close() + } catch (err) { + // TODO: add comment explaining why this error occurs. + if (!err.message.includes('Controller is already closed')) { + throw err + } + } +} + +/** + * @see https://infra.spec.whatwg.org/#isomorphic-encode + * @param {string} input + */ +function isomorphicEncode (input) { + // 1. Assert: input contains no code points greater than U+00FF. + for (let i = 0; i < input.length; i++) { + assert(input.charCodeAt(i) <= 0xFF) + } + + // 2. Return a byte sequence whose length is equal to input’s code + // point length and whose bytes have the same values as the + // values of input’s code points, in the same order + 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) { + // 1. Call successSteps with bytes. + return Buffer.concat(bytes, byteLength) + } + + // 1. If chunk is not a Uint8Array object, call failureSteps + // with a TypeError and abort these steps. + if (!isUint8Array(chunk)) { + throw new TypeError('Received non-Uint8Array chunk') + } + + // 2. Append the bytes represented by chunk to bytes. + bytes.push(chunk) + byteLength += chunk.length + + // 3. Read-loop given reader, bytes, successSteps, and failureSteps. + } +} + +/** + * @see https://fetch.spec.whatwg.org/#is-local + * @param {URL} url + */ +function urlIsLocal (url) { + assert('protocol' in url) // ensure it's a url object + + const protocol = url.protocol + + return protocol === 'about:' || protocol === 'blob:' || protocol === 'data:' +} + +/** + * @param {string|URL} url + */ +function urlHasHttpsScheme (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 (url) { + assert('protocol' in url) // ensure it's a url object + + 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 = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)) + +module.exports = { + isAborted, + isCancelled, + createDeferredPromise, + ReadableStreamFrom, + toUSVString, + tryUpgradeRequestToAPotentiallyTrustworthyURL, + coarsenedSharedCurrentTime, + determineRequestsReferrer, + makePolicyContainer, + clonePolicyContainer, + appendFetchMetadata, + appendRequestOriginHeader, + TAOCheck, + corsCheck, + crossOriginResourcePolicyCheck, + createOpaqueTimingInfo, + setRequestReferrerPolicyOnRedirect, + isValidHTTPToken, + requestBadPort, + requestCurrentURL, + responseURL, + responseLocationURL, + isBlobLike, + isURLPotentiallyTrustworthy, + isValidReasonPhrase, + sameOrigin, + normalizeMethod, + serializeJavascriptValueToJSONString, + makeIterator, + isValidHeaderName, + isValidHeaderValue, + hasOwn, + isErrorLike, + fullyReadBody, + bytesMatch, + isReadableStreamLike, + readableStreamClose, + isomorphicEncode, + isomorphicDecode, + urlIsLocal, + urlHasHttpsScheme, + urlIsHttpHttpsScheme, + readAllBytes, + normalizeMethodRecord +} + + +/***/ }), + +/***/ 96138: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { types } = __nccwpck_require__(73837) +const { hasOwn, toUSVString } = __nccwpck_require__(79453) + +/** @type {import('../../types/webidl').Webidl} */ +const webidl = {} +webidl.converters = {} +webidl.util = {} +webidl.errors = {} + +webidl.errors.exception = function (message) { + return 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}.` + }) +} + +// https://webidl.spec.whatwg.org/#implements +webidl.brandCheck = function (V, I, opts = undefined) { + if (opts?.strict !== false && !(V instanceof I)) { + throw new TypeError('Illegal invocation') + } else { + return V?.[Symbol.toStringTag] === I.prototype[Symbol.toStringTag] + } +} + +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.`, + ...ctx + }) + } +} + +webidl.illegalConstructor = function () { + throw webidl.errors.exception({ + header: 'TypeError', + message: 'Illegal constructor' + }) +} + +// https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values +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' + } + } +} + +// https://webidl.spec.whatwg.org/#abstract-opdef-converttoint +webidl.util.ConvertToInt = function (V, bitLength, signedness, opts = {}) { + let upperBound + let lowerBound + + // 1. If bitLength is 64, then: + if (bitLength === 64) { + // 1. Let upperBound be 2^53 − 1. + upperBound = Math.pow(2, 53) - 1 + + // 2. If signedness is "unsigned", then let lowerBound be 0. + if (signedness === 'unsigned') { + lowerBound = 0 + } else { + // 3. Otherwise let lowerBound be −2^53 + 1. + lowerBound = Math.pow(-2, 53) + 1 + } + } else if (signedness === 'unsigned') { + // 2. Otherwise, if signedness is "unsigned", then: + + // 1. Let lowerBound be 0. + lowerBound = 0 + + // 2. Let upperBound be 2^bitLength − 1. + upperBound = Math.pow(2, bitLength) - 1 + } else { + // 3. Otherwise: + + // 1. Let lowerBound be -2^bitLength − 1. + lowerBound = Math.pow(-2, bitLength) - 1 + + // 2. Let upperBound be 2^bitLength − 1 − 1. + upperBound = Math.pow(2, bitLength - 1) - 1 + } + + // 4. Let x be ? ToNumber(V). + let x = Number(V) + + // 5. If x is −0, then set x to +0. + if (x === 0) { + x = 0 + } + + // 6. If the conversion is to an IDL type associated + // with the [EnforceRange] extended attribute, then: + if (opts.enforceRange === true) { + // 1. If x is NaN, +∞, or −∞, then throw a TypeError. + if ( + Number.isNaN(x) || + x === Number.POSITIVE_INFINITY || + x === Number.NEGATIVE_INFINITY + ) { + throw webidl.errors.exception({ + header: 'Integer conversion', + message: `Could not convert ${V} to an integer.` + }) + } + + // 2. Set x to IntegerPart(x). + x = webidl.util.IntegerPart(x) + + // 3. If x < lowerBound or x > upperBound, then + // throw a TypeError. + if (x < lowerBound || x > upperBound) { + throw webidl.errors.exception({ + header: 'Integer conversion', + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }) + } + + // 4. Return x. + return x + } + + // 7. If x is not NaN and the conversion is to an IDL + // type associated with the [Clamp] extended + // attribute, then: + if (!Number.isNaN(x) && opts.clamp === true) { + // 1. Set x to min(max(x, lowerBound), upperBound). + x = Math.min(Math.max(x, lowerBound), upperBound) + + // 2. Round x to the nearest integer, choosing the + // even integer if it lies halfway between two, + // and choosing +0 rather than −0. + if (Math.floor(x) % 2 === 0) { + x = Math.floor(x) + } else { + x = Math.ceil(x) + } + + // 3. Return x. + return x + } + + // 8. If x is NaN, +0, +∞, or −∞, then return +0. + if ( + Number.isNaN(x) || + (x === 0 && Object.is(0, x)) || + x === Number.POSITIVE_INFINITY || + x === Number.NEGATIVE_INFINITY + ) { + return 0 + } + + // 9. Set x to IntegerPart(x). + x = webidl.util.IntegerPart(x) + + // 10. Set x to x modulo 2^bitLength. + x = x % Math.pow(2, bitLength) + + // 11. If signedness is "signed" and x ≥ 2^bitLength − 1, + // then return x − 2^bitLength. + if (signedness === 'signed' && x >= Math.pow(2, bitLength) - 1) { + return x - Math.pow(2, bitLength) + } + + // 12. Otherwise, return x. + return x +} + +// https://webidl.spec.whatwg.org/#abstract-opdef-integerpart +webidl.util.IntegerPart = function (n) { + // 1. Let r be floor(abs(n)). + const r = Math.floor(Math.abs(n)) + + // 2. If n < 0, then return -1 × r. + if (n < 0) { + return -1 * r + } + + // 3. Otherwise, return r. + return r +} + +// https://webidl.spec.whatwg.org/#es-sequence +webidl.sequenceConverter = function (converter) { + return (V) => { + // 1. If Type(V) is not Object, throw a TypeError. + if (webidl.util.Type(V) !== 'Object') { + throw webidl.errors.exception({ + header: 'Sequence', + message: `Value of type ${webidl.util.Type(V)} is not an Object.` + }) + } + + // 2. Let method be ? GetMethod(V, @@iterator). + /** @type {Generator} */ + const method = V?.[Symbol.iterator]?.() + const seq = [] + + // 3. If method is undefined, throw a TypeError. + if ( + method === undefined || + typeof method.next !== 'function' + ) { + throw webidl.errors.exception({ + header: 'Sequence', + message: 'Object is not an iterator.' + }) + } + + // https://webidl.spec.whatwg.org/#create-sequence-from-iterable + while (true) { + const { done, value } = method.next() + + if (done) { + break + } + + seq.push(converter(value)) + } + + return seq + } +} + +// https://webidl.spec.whatwg.org/#es-to-record +webidl.recordConverter = function (keyConverter, valueConverter) { + return (O) => { + // 1. If Type(O) is not Object, throw a TypeError. + if (webidl.util.Type(O) !== 'Object') { + throw webidl.errors.exception({ + header: 'Record', + message: `Value of type ${webidl.util.Type(O)} is not an Object.` + }) + } + + // 2. Let result be a new empty instance of record. + const result = {} + + if (!types.isProxy(O)) { + // Object.keys only returns enumerable properties + const keys = Object.keys(O) + + for (const key of keys) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) + + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) + + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue + } + + // 5. Return result. + return result + } + + // 3. Let keys be ? O.[[OwnPropertyKeys]](). + const keys = Reflect.ownKeys(O) + + // 4. For each key of keys. + for (const key of keys) { + // 1. Let desc be ? O.[[GetOwnProperty]](key). + const desc = Reflect.getOwnPropertyDescriptor(O, key) + + // 2. If desc is not undefined and desc.[[Enumerable]] is true: + if (desc?.enumerable) { + // 1. Let typedKey be key converted to an IDL value of type K. + const typedKey = keyConverter(key) + + // 2. Let value be ? Get(O, key). + // 3. Let typedValue be value converted to an IDL value of type V. + const typedValue = valueConverter(O[key]) + + // 4. Set result[typedKey] to typedValue. + result[typedKey] = typedValue + } + } + + // 5. Return result. + return result + } +} + +webidl.interfaceConverter = function (i) { + return (V, opts = {}) => { + if (opts.strict !== false && !(V instanceof i)) { + throw webidl.errors.exception({ + header: i.name, + message: `Expected ${V} to be an instance of ${i.name}.` + }) + } + + return V + } +} + +webidl.dictionaryConverter = function (converters) { + return (dictionary) => { + const type = webidl.util.Type(dictionary) + const dict = {} + + if (type === 'Null' || type === 'Undefined') { + return dict + } else if (type !== 'Object') { + throw webidl.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.errors.exception({ + header: 'Dictionary', + message: `Missing required key "${key}".` + }) + } + } + + let value = dictionary[key] + const hasDefault = hasOwn(options, 'defaultValue') + + // Only use defaultValue if value is undefined and + // a defaultValue options was provided. + if (hasDefault && value !== null) { + value = value ?? defaultValue + } + + // A key can be optional and have no default value. + // When this happens, do not perform a conversion, + // and do not assign the key a value. + if (required || hasDefault || value !== undefined) { + value = converter(value) + + if ( + options.allowedValues && + !options.allowedValues.includes(value) + ) { + throw webidl.errors.exception({ + header: 'Dictionary', + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(', ')}.` + }) + } + + dict[key] = value + } + } + + return dict + } +} + +webidl.nullableConverter = function (converter) { + return (V) => { + if (V === null) { + return V + } + + return converter(V) + } +} + +// https://webidl.spec.whatwg.org/#es-DOMString +webidl.converters.DOMString = function (V, opts = {}) { + // 1. If V is null and the conversion is to an IDL type + // associated with the [LegacyNullToEmptyString] + // extended attribute, then return the DOMString value + // that represents the empty string. + if (V === null && opts.legacyNullToEmptyString) { + return '' + } + + // 2. Let x be ? ToString(V). + if (typeof V === 'symbol') { + throw new TypeError('Could not convert argument of type symbol to string.') + } + + // 3. Return the IDL DOMString value that represents the + // same sequence of code units as the one the + // ECMAScript String value x represents. + return String(V) +} + +// https://webidl.spec.whatwg.org/#es-ByteString +webidl.converters.ByteString = function (V) { + // 1. Let x be ? ToString(V). + // Note: DOMString converter perform ? ToString(V) + const x = webidl.converters.DOMString(V) + + // 2. If the value of any element of x is greater than + // 255, then throw a TypeError. + 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.` + ) + } + } + + // 3. Return an IDL ByteString value whose length is the + // length of x, and where the value of each element is + // the value of the corresponding element of x. + return x +} + +// https://webidl.spec.whatwg.org/#es-USVString +webidl.converters.USVString = toUSVString + +// https://webidl.spec.whatwg.org/#es-boolean +webidl.converters.boolean = function (V) { + // 1. Let x be the result of computing ToBoolean(V). + const x = Boolean(V) + + // 2. Return the IDL boolean value that is the one that represents + // the same truth value as the ECMAScript Boolean value x. + return x +} + +// https://webidl.spec.whatwg.org/#es-any +webidl.converters.any = function (V) { + return V +} + +// https://webidl.spec.whatwg.org/#es-long-long +webidl.converters['long long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 64, "signed"). + const x = webidl.util.ConvertToInt(V, 64, 'signed') + + // 2. Return the IDL long long value that represents + // the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#es-unsigned-long-long +webidl.converters['unsigned long long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 64, "unsigned"). + const x = webidl.util.ConvertToInt(V, 64, 'unsigned') + + // 2. Return the IDL unsigned long long value that + // represents the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#es-unsigned-long +webidl.converters['unsigned long'] = function (V) { + // 1. Let x be ? ConvertToInt(V, 32, "unsigned"). + const x = webidl.util.ConvertToInt(V, 32, 'unsigned') + + // 2. Return the IDL unsigned long value that + // represents the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#es-unsigned-short +webidl.converters['unsigned short'] = function (V, opts) { + // 1. Let x be ? ConvertToInt(V, 16, "unsigned"). + const x = webidl.util.ConvertToInt(V, 16, 'unsigned', opts) + + // 2. Return the IDL unsigned short value that represents + // the same numeric value as x. + return x +} + +// https://webidl.spec.whatwg.org/#idl-ArrayBuffer +webidl.converters.ArrayBuffer = function (V, opts = {}) { + // 1. If Type(V) is not Object, or V does not have an + // [[ArrayBufferData]] internal slot, then throw a + // TypeError. + // see: https://tc39.es/ecma262/#sec-properties-of-the-arraybuffer-instances + // see: https://tc39.es/ecma262/#sec-properties-of-the-sharedarraybuffer-instances + if ( + webidl.util.Type(V) !== 'Object' || + !types.isAnyArrayBuffer(V) + ) { + throw webidl.errors.conversionFailed({ + prefix: `${V}`, + argument: `${V}`, + types: ['ArrayBuffer'] + }) + } + + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V) is true, then throw a + // TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) + } + + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V) is true, then throw a + // TypeError. + // Note: resizable ArrayBuffers are currently a proposal. + + // 4. Return the IDL ArrayBuffer value that is a + // reference to the same object as V. + return V +} + +webidl.converters.TypedArray = function (V, T, opts = {}) { + // 1. Let T be the IDL type V is being converted to. + + // 2. If Type(V) is not Object, or V does not have a + // [[TypedArrayName]] internal slot with a value + // equal to T’s name, then throw a TypeError. + if ( + webidl.util.Type(V) !== 'Object' || + !types.isTypedArray(V) || + V.constructor.name !== T.name + ) { + throw webidl.errors.conversionFailed({ + prefix: `${T.name}`, + argument: `${V}`, + types: [T.name] + }) + } + + // 3. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) + } + + // 4. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + // Note: resizable array buffers are currently a proposal + + // 5. Return the IDL value of type T that is a reference + // to the same object as V. + return V +} + +webidl.converters.DataView = function (V, opts = {}) { + // 1. If Type(V) is not Object, or V does not have a + // [[DataView]] internal slot, then throw a TypeError. + if (webidl.util.Type(V) !== 'Object' || !types.isDataView(V)) { + throw webidl.errors.exception({ + header: 'DataView', + message: 'Object is not a DataView.' + }) + } + + // 2. If the conversion is not to an IDL type associated + // with the [AllowShared] extended attribute, and + // IsSharedArrayBuffer(V.[[ViewedArrayBuffer]]) is true, + // then throw a TypeError. + if (opts.allowShared === false && types.isSharedArrayBuffer(V.buffer)) { + throw webidl.errors.exception({ + header: 'ArrayBuffer', + message: 'SharedArrayBuffer is not allowed.' + }) + } + + // 3. If the conversion is not to an IDL type associated + // with the [AllowResizable] extended attribute, and + // IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is + // true, then throw a TypeError. + // Note: resizable ArrayBuffers are currently a proposal + + // 4. Return the IDL DataView value that is a reference + // to the same object as V. + return V +} + +// https://webidl.spec.whatwg.org/#BufferSource +webidl.converters.BufferSource = function (V, opts = {}) { + if (types.isAnyArrayBuffer(V)) { + return webidl.converters.ArrayBuffer(V, opts) + } + + if (types.isTypedArray(V)) { + return webidl.converters.TypedArray(V, V.constructor) + } + + if (types.isDataView(V)) { + return webidl.converters.DataView(V, opts) + } + + throw new TypeError(`Could not convert ${V} to a 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 +} + + +/***/ }), + +/***/ 71282: +/***/ ((module) => { + + + +/** + * @see https://encoding.spec.whatwg.org/#concept-encoding-get + * @param {string|undefined} label + */ +function getEncoding (label) { + if (!label) { + return 'failure' + } + + // 1. Remove any leading and trailing ASCII whitespace from label. + // 2. If label is an ASCII case-insensitive match for any of the + // labels listed in the table below, then return the + // corresponding encoding; otherwise 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 +} + + +/***/ }), + +/***/ 8317: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { + staticPropertyDescriptors, + readOperation, + fireAProgressEvent +} = __nccwpck_require__(47859) +const { + kState, + kError, + kResult, + kEvents, + kAborted +} = __nccwpck_require__(13816) +const { webidl } = __nccwpck_require__(96138) +const { kEnumerableProperty } = __nccwpck_require__(67468) + +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, { header: 'FileReader.readAsArrayBuffer' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + // The readAsArrayBuffer(blob) method, when invoked, + // must initiate a read operation for blob with ArrayBuffer. + 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, { header: 'FileReader.readAsBinaryString' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + // The readAsBinaryString(blob) method, when invoked, + // must initiate a read operation for blob with BinaryString. + readOperation(this, blob, 'BinaryString') + } + + /** + * @see https://w3c.github.io/FileAPI/#readAsDataText + * @param {import('buffer').Blob} blob + * @param {string?} encoding + */ + readAsText (blob, encoding = undefined) { + webidl.brandCheck(this, FileReader) + + webidl.argumentLengthCheck(arguments, 1, { header: 'FileReader.readAsText' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + if (encoding !== undefined) { + encoding = webidl.converters.DOMString(encoding) + } + + // The readAsText(blob, encoding) method, when invoked, + // must initiate a read operation for blob with Text and 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, { header: 'FileReader.readAsDataURL' }) + + blob = webidl.converters.Blob(blob, { strict: false }) + + // The readAsDataURL(blob) method, when invoked, must + // initiate a read operation for blob with DataURL. + readOperation(this, blob, 'DataURL') + } + + /** + * @see https://w3c.github.io/FileAPI/#dfn-abort + */ + abort () { + // 1. If this's state is "empty" or if this's state is + // "done" set this's result to null and terminate + // this algorithm. + if (this[kState] === 'empty' || this[kState] === 'done') { + this[kResult] = null + return + } + + // 2. If this's state is "loading" set this's state to + // "done" and set this's result to null. + if (this[kState] === 'loading') { + this[kState] = 'done' + this[kResult] = null + } + + // 3. If there are any tasks from this on the file reading + // task source in an affiliated task queue, then remove + // those tasks from that task queue. + this[kAborted] = true + + // 4. Terminate the algorithm for the read method being processed. + // TODO + + // 5. Fire a progress event called abort at this. + fireAProgressEvent('abort', this) + + // 6. If this's state is not "loading", fire a progress + // event called loadend at 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) + + // The result attribute’s getter, when invoked, must return + // this's result. + return this[kResult] + } + + /** + * @see https://w3c.github.io/FileAPI/#dom-filereader-error + */ + get error () { + webidl.brandCheck(this, FileReader) + + // The error attribute’s getter, when invoked, must return + // this's error. + 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 + } + } +} + +// https://w3c.github.io/FileAPI/#dom-filereader-empty +FileReader.EMPTY = FileReader.prototype.EMPTY = 0 +// https://w3c.github.io/FileAPI/#dom-filereader-loading +FileReader.LOADING = FileReader.prototype.LOADING = 1 +// https://w3c.github.io/FileAPI/#dom-filereader-done +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 +} + + +/***/ }), + +/***/ 92987: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { webidl } = __nccwpck_require__(96138) + +const kState = Symbol('ProgressEvent state') + +/** + * @see https://xhr.spec.whatwg.org/#progressevent + */ +class ProgressEvent extends Event { + constructor (type, eventInitDict = {}) { + type = webidl.converters.DOMString(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 +} + + +/***/ }), + +/***/ 13816: +/***/ ((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') +} + + +/***/ }), + +/***/ 47859: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { + kState, + kError, + kResult, + kAborted, + kLastProgressEventFired +} = __nccwpck_require__(13816) +const { ProgressEvent } = __nccwpck_require__(92987) +const { getEncoding } = __nccwpck_require__(71282) +const { DOMException } = __nccwpck_require__(93541) +const { serializeAMimeType, parseMIMEType } = __nccwpck_require__(50096) +const { types } = __nccwpck_require__(73837) +const { StringDecoder } = __nccwpck_require__(71576) +const { btoa } = __nccwpck_require__(14300) + +/** @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) { + // 1. If fr’s state is "loading", throw an InvalidStateError + // DOMException. + if (fr[kState] === 'loading') { + throw new DOMException('Invalid state', 'InvalidStateError') + } + + // 2. Set fr’s state to "loading". + fr[kState] = 'loading' + + // 3. Set fr’s result to null. + fr[kResult] = null + + // 4. Set fr’s error to null. + fr[kError] = null + + // 5. Let stream be the result of calling get stream on blob. + /** @type {import('stream/web').ReadableStream} */ + const stream = blob.stream() + + // 6. Let reader be the result of getting a reader from stream. + const reader = stream.getReader() + + // 7. Let bytes be an empty byte sequence. + /** @type {Uint8Array[]} */ + const bytes = [] + + // 8. Let chunkPromise be the result of reading a chunk from + // stream with reader. + let chunkPromise = reader.read() + + // 9. Let isFirstChunk be true. + let isFirstChunk = true + + // 10. In parallel, while true: + // Note: "In parallel" just means non-blocking + // Note 2: readOperation itself cannot be async as double + // reading the body would then reject the promise, instead + // of throwing an error. + ;(async () => { + while (!fr[kAborted]) { + // 1. Wait for chunkPromise to be fulfilled or rejected. + try { + const { done, value } = await chunkPromise + + // 2. If chunkPromise is fulfilled, and isFirstChunk is + // true, queue a task to fire a progress event called + // loadstart at fr. + if (isFirstChunk && !fr[kAborted]) { + queueMicrotask(() => { + fireAProgressEvent('loadstart', fr) + }) + } + + // 3. Set isFirstChunk to false. + isFirstChunk = false + + // 4. If chunkPromise is fulfilled with an object whose + // done property is false and whose value property is + // a Uint8Array object, run these steps: + if (!done && types.isUint8Array(value)) { + // 1. Let bs be the byte sequence represented by the + // Uint8Array object. + + // 2. Append bs to bytes. + bytes.push(value) + + // 3. If roughly 50ms have passed since these steps + // were last invoked, queue a task to fire a + // progress event called progress at fr. + if ( + ( + fr[kLastProgressEventFired] === undefined || + Date.now() - fr[kLastProgressEventFired] >= 50 + ) && + !fr[kAborted] + ) { + fr[kLastProgressEventFired] = Date.now() + queueMicrotask(() => { + fireAProgressEvent('progress', fr) + }) + } + + // 4. Set chunkPromise to the result of reading a + // chunk from stream with reader. + chunkPromise = reader.read() + } else if (done) { + // 5. Otherwise, if chunkPromise is fulfilled with an + // object whose done property is true, queue a task + // to run the following steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' + + // 2. Let result be the result of package data given + // bytes, type, blob’s type, and encodingName. + try { + const result = packageData(bytes, type, blob.type, encodingName) + + // 4. Else: + + if (fr[kAborted]) { + return + } + + // 1. Set fr’s result to result. + fr[kResult] = result + + // 2. Fire a progress event called load at the fr. + fireAProgressEvent('load', fr) + } catch (error) { + // 3. If package data threw an exception error: + + // 1. Set fr’s error to error. + fr[kError] = error + + // 2. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) + } + + // 5. If fr’s state is not "loading", fire a progress + // event called loadend at the fr. + if (fr[kState] !== 'loading') { + fireAProgressEvent('loadend', fr) + } + }) + + break + } + } catch (error) { + if (fr[kAborted]) { + return + } + + // 6. Otherwise, if chunkPromise is rejected with an + // error error, queue a task to run the following + // steps and abort this algorithm: + queueMicrotask(() => { + // 1. Set fr’s state to "done". + fr[kState] = 'done' + + // 2. Set fr’s error to error. + fr[kError] = error + + // 3. Fire a progress event called error at fr. + fireAProgressEvent('error', fr) + + // 4. If fr’s state is not "loading", fire a progress + // event called loadend at 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) { + // The progress event e does not bubble. e.bubbles must be false + // The progress event e is NOT cancelable. e.cancelable must be false + 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) { + // 1. A Blob has an associated package data algorithm, given + // bytes, a type, a optional mimeType, and a optional + // encodingName, which switches on type and runs the + // associated steps: + + switch (type) { + case 'DataURL': { + // 1. Return bytes as a DataURL [RFC2397] subject to + // the considerations below: + // * Use mimeType as part of the Data URL if it is + // available in keeping with the Data URL + // specification [RFC2397]. + // * If mimeType is not available return a Data URL + // without a media-type. [RFC2397]. + + // https://datatracker.ietf.org/doc/html/rfc2397#section-3 + // dataurl := "data:" [ mediatype ] [ ";base64" ] "," data + // mediatype := [ type "/" subtype ] *( ";" parameter ) + // data := *urlchar + // parameter := attribute "=" value + 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': { + // 1. Let encoding be failure + let encoding = 'failure' + + // 2. If the encodingName is present, set encoding to the + // result of getting an encoding from encodingName. + if (encodingName) { + encoding = getEncoding(encodingName) + } + + // 3. If encoding is failure, and mimeType is present: + if (encoding === 'failure' && mimeType) { + // 1. Let type be the result of parse a MIME type + // given mimeType. + const type = parseMIMEType(mimeType) + + // 2. If type is not failure, set encoding to the result + // of getting an encoding from type’s parameters["charset"]. + if (type !== 'failure') { + encoding = getEncoding(type.parameters.get('charset')) + } + } + + // 4. If encoding is failure, then set encoding to UTF-8. + if (encoding === 'failure') { + encoding = 'UTF-8' + } + + // 5. Decode bytes using fallback encoding encoding, and + // return the result. + return decode(bytes, encoding) + } + case 'ArrayBuffer': { + // Return a new ArrayBuffer whose contents are bytes. + const sequence = combineByteSequences(bytes) + + return sequence.buffer + } + case 'BinaryString': { + // Return bytes as a binary string, in which every byte + // is represented by a code unit of equal value [0..255]. + 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) + + // 1. Let BOMEncoding be the result of BOM sniffing ioQueue. + const BOMEncoding = BOMSniffing(bytes) + + let slice = 0 + + // 2. If BOMEncoding is non-null: + if (BOMEncoding !== null) { + // 1. Set encoding to BOMEncoding. + encoding = BOMEncoding + + // 2. Read three bytes from ioQueue, if BOMEncoding is + // UTF-8; otherwise read two bytes. + // (Do nothing with those bytes.) + slice = BOMEncoding === 'UTF-8' ? 3 : 2 + } + + // 3. Process a queue with an instance of encoding’s + // decoder, ioQueue, output, and "replacement". + + // 4. Return output. + + 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) { + // 1. Let BOM be the result of peeking 3 bytes from ioQueue, + // converted to a byte sequence. + const [a, b, c] = ioQueue + + // 2. For each of the rows in the table below, starting with + // the first one and going down, if BOM starts with the + // bytes given in the first column, then return the + // encoding given in the cell in the second column of that + // row. Otherwise, return null. + if (a === 0xEF && b === 0xBB && c === 0xBF) { + return 'UTF-8' + } else if (a === 0xFE && b === 0xFF) { + return 'UTF-16BE' + } else if (a === 0xFF && b === 0xFE) { + 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 +} + + +/***/ }), + +/***/ 29102: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +// We include a version number for the Dispatcher API. In case of breaking changes, +// this version number must be increased to avoid conflicts. +const globalDispatcher = Symbol.for('undici.globalDispatcher.1') +const { InvalidArgumentError } = __nccwpck_require__(46339) +const Agent = __nccwpck_require__(97464) + +if (getGlobalDispatcher() === undefined) { + 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 +} + + +/***/ }), + +/***/ 68640: +/***/ ((module) => { + + + +module.exports = class DecoratorHandler { + 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) + } +} + + +/***/ }), + +/***/ 59660: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const util = __nccwpck_require__(67468) +const { kBodyUsed } = __nccwpck_require__(48039) +const assert = __nccwpck_require__(39491) +const { InvalidArgumentError } = __nccwpck_require__(46339) +const EE = __nccwpck_require__(82361) + +const redirectableStatusCodes = [300, 301, 302, 303, 307, 308] + +const kBody = Symbol('body') + +class BodyAsyncIterable { + constructor (body) { + this[kBody] = body + this[kBodyUsed] = false + } + + async * [Symbol.asyncIterator] () { + assert(!this[kBodyUsed], 'disturbed') + this[kBodyUsed] = true + yield * this[kBody] + } +} + +class RedirectHandler { + 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 } // opts must be a copy + this.maxRedirections = maxRedirections + this.handler = handler + this.history = [] + + if (util.isStream(this.opts.body)) { + // TODO (fix): Provide some way for the user to cache the file to e.g. /tmp + // so that it can be dispatched again? + // TODO (fix): Do we need 100-expect support to provide a way to do this properly? + if (util.bodyLength(this.opts.body) === 0) { + this.opts.body + .on('data', function () { + assert(false) + }) + } + + if (typeof this.opts.body.readableDidRead !== 'boolean') { + this.opts.body[kBodyUsed] = false + EE.prototype.on.call(this.opts.body, 'data', function () { + this[kBodyUsed] = true + }) + } + } else if (this.opts.body && typeof this.opts.body.pipeTo === 'function') { + // TODO (fix): We can't access ReadableStream internal state + // to determine whether or not it has been disturbed. This is just + // a workaround. + 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) + ) { + // TODO: Should we allow re-using iterable if !this.opts.idempotent + // or through some other flag? + 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.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 + + // Remove headers referring to the original URL. + // By default it is Host only, unless it's a 303 (see below), which removes also all Content-* headers. + // https://tools.ietf.org/html/rfc7231#section-6.4 + 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 + + // https://tools.ietf.org/html/rfc7231#section-6.4.4 + // In case of HTTP 303, always replace method to be either HEAD or GET + if (statusCode === 303 && this.opts.method !== 'HEAD') { + this.opts.method = 'GET' + this.opts.body = null + } + } + + onData (chunk) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 + + TLDR: undici always ignores 3xx response bodies. + + Redirection is used to serve the requested resource from another URL, so it is assumes that + no body is generated (and thus can be ignored). Even though generating a body is not prohibited. + + For status 301, 302, 303, 307 and 308 (the latter from RFC 7238), the specs mention that the body usually + (which means it's optional and not mandated) contain just an hyperlink to the value of + the Location response header, so the body can be ignored safely. + + For status 300, which is "Multiple Choices", the spec mentions both generating a Location + response header AND a response body with the other possible location to follow. + Since the spec explicitily chooses not to specify a format for such body and leave it to + servers and browsers implementors, we ignore the body as there is no specified way to eventually parse it. + */ + } else { + return this.handler.onData(chunk) + } + } + + onComplete (trailers) { + if (this.location) { + /* + https://tools.ietf.org/html/rfc7231#section-6.4 + + TLDR: undici always ignores 3xx response trailers as they are not expected in case of redirections + and neither are useful if present. + + See comment on onData method above for more detailed informations. + */ + + 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].toString().toLowerCase() === 'location') { + return headers[i + 1] + } + } +} + +// https://tools.ietf.org/html/rfc7231#section-6.4.4 +function shouldRemoveHeader (header, removeContent, unknownOrigin) { + return ( + (header.length === 4 && header.toString().toLowerCase() === 'host') || + (removeContent && header.toString().toLowerCase().indexOf('content-') === 0) || + (unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') || + (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie') + ) +} + +// https://tools.ietf.org/html/rfc7231#section-6.4 +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(headers == null, 'headers must be an object or an array') + } + return ret +} + +module.exports = RedirectHandler + + +/***/ }), + +/***/ 74989: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const assert = __nccwpck_require__(39491) + +const { kRetryHandlerDefaultRetry } = __nccwpck_require__(48039) +const { RequestRetryError } = __nccwpck_require__(46339) +const { isDisturbed, parseHeaders, parseRangeHeader } = __nccwpck_require__(67468) + +function calculateRetryAfterHeader (retryAfter) { + const current = Date.now() + const diff = new Date(retryAfter).getTime() - current + + return diff +} + +class RetryHandler { + constructor (opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + 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[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1000, // 30s, + timeout: minTimeout ?? 500, // .5s + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + // What errors we should retry + methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + // Indicates which errors to retry + statusCodes: statusCodes ?? [500, 502, 503, 504, 429], + // List of errors to retry + 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 + + // Handle possible onConnect duplication + 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, + timeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods + } = retryOptions + let { counter, currentTimeout } = state + + currentTimeout = + currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout + + // Any code that is not a Undici's originated and allowed to retry + if ( + code && + code !== 'UND_ERR_REQ_RETRY' && + code !== 'UND_ERR_SOCKET' && + !errorCodes.includes(code) + ) { + cb(err) + return + } + + // If a set of method are provided and the current method is not in the list + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err) + return + } + + // If a set of status code are provided and the current status code is not in the list + if ( + statusCode != null && + Array.isArray(statusCodes) && + !statusCodes.includes(statusCode) + ) { + cb(err) + return + } + + // If we reached the max number of retries + 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 // Retry-After is in seconds + } + + 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, statusMessage) { + const headers = parseHeaders(rawHeaders) + + this.retryCount += 1 + + if (statusCode >= 300) { + this.abort( + new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + // Checkpoint for resume from where we left it + if (this.resume != null) { + this.resume = null + + if (statusCode !== 206) { + return true + } + + const contentRange = parseRangeHeader(headers['content-range']) + // If no content range + if (!contentRange) { + this.abort( + new RequestRetryError('Content-Range mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + // Let's start with a weak etag check + 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(this.start === start, 'content-range mismatch') + assert(this.end == null || this.end === end, 'content-range mismatch') + + this.resume = resume + return true + } + + if (this.end == null) { + if (statusCode === 206) { + // First time we receive 206 + const range = parseRangeHeader(headers['content-range']) + + if (range == null) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) + } + + const { start, size, end = size } = range + + assert( + start != null && Number.isFinite(start) && this.start !== start, + 'content-range mismatch' + ) + assert(Number.isFinite(start)) + assert( + end != null && Number.isFinite(end) && this.end !== end, + 'invalid content-length' + ) + + this.start = start + this.end = end + } + + // We make our best to checkpoint the body for further range headers + if (this.end == null) { + const contentLength = headers['content-length'] + this.end = contentLength != null ? Number(contentLength) : null + } + + assert(Number.isFinite(this.start)) + assert( + this.end == null || Number.isFinite(this.end), + 'invalid content-length' + ) + + this.resume = resume + this.etag = headers.etag != null ? headers.etag : null + + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + 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(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) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) + } + + 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) { + this.handler.onError(err) + } + } + } +} + +module.exports = RetryHandler + + +/***/ }), + +/***/ 72509: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const RedirectHandler = __nccwpck_require__(59660) + +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 } // Stop sub dispatcher from also redirecting. + return dispatch(opts, redirectHandler) + } + } +} + +module.exports = createRedirectInterceptor + + +/***/ }), + +/***/ 49614: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + +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 = __nccwpck_require__(29451); +// C headers +var ERROR; +(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"; +})(ERROR = exports.ERROR || (exports.ERROR = {})); +var TYPE; +(function (TYPE) { + TYPE[TYPE["BOTH"] = 0] = "BOTH"; + TYPE[TYPE["REQUEST"] = 1] = "REQUEST"; + TYPE[TYPE["RESPONSE"] = 2] = "RESPONSE"; +})(TYPE = exports.TYPE || (exports.TYPE = {})); +var FLAGS; +(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"; + // 1 << 8 is unused + FLAGS[FLAGS["TRANSFER_ENCODING"] = 512] = "TRANSFER_ENCODING"; +})(FLAGS = exports.FLAGS || (exports.FLAGS = {})); +var LENIENT_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"; +})(LENIENT_FLAGS = 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"; + /* pathological */ + METHODS[METHODS["CONNECT"] = 5] = "CONNECT"; + METHODS[METHODS["OPTIONS"] = 6] = "OPTIONS"; + METHODS[METHODS["TRACE"] = 7] = "TRACE"; + /* WebDAV */ + 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"; + /* subversion */ + METHODS[METHODS["REPORT"] = 20] = "REPORT"; + METHODS[METHODS["MKACTIVITY"] = 21] = "MKACTIVITY"; + METHODS[METHODS["CHECKOUT"] = 22] = "CHECKOUT"; + METHODS[METHODS["MERGE"] = 23] = "MERGE"; + /* upnp */ + METHODS[METHODS["M-SEARCH"] = 24] = "M-SEARCH"; + METHODS[METHODS["NOTIFY"] = 25] = "NOTIFY"; + METHODS[METHODS["SUBSCRIBE"] = 26] = "SUBSCRIBE"; + METHODS[METHODS["UNSUBSCRIBE"] = 27] = "UNSUBSCRIBE"; + /* RFC-5789 */ + METHODS[METHODS["PATCH"] = 28] = "PATCH"; + METHODS[METHODS["PURGE"] = 29] = "PURGE"; + /* CalDAV */ + METHODS[METHODS["MKCALENDAR"] = 30] = "MKCALENDAR"; + /* RFC-2068, section 19.6.1.2 */ + METHODS[METHODS["LINK"] = 31] = "LINK"; + METHODS[METHODS["UNLINK"] = 32] = "UNLINK"; + /* icecast */ + METHODS[METHODS["SOURCE"] = 33] = "SOURCE"; + /* RFC-7540, section 11.6 */ + METHODS[METHODS["PRI"] = 34] = "PRI"; + /* RFC-2326 RTSP */ + 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"; + /* RAOP */ + 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, + // TODO(indutny): should we allow it with HTTP? + 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, + // For AirPlay + 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]; + } +}); +var FINISH; +(function (FINISH) { + FINISH[FINISH["SAFE"] = 0] = "SAFE"; + FINISH[FINISH["SAFE_WITH_CB"] = 1] = "SAFE_WITH_CB"; + FINISH[FINISH["UNSAFE"] = 2] = "UNSAFE"; +})(FINISH = exports.FINISH || (exports.FINISH = {})); +exports.ALPHA = []; +for (let i = 'A'.charCodeAt(0); i <= 'Z'.charCodeAt(0); i++) { + // Upper case + exports.ALPHA.push(String.fromCharCode(i)); + // Lower case + exports.ALPHA.push(String.fromCharCode(i + 0x20)); +} +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: 0XA, B: 0XB, C: 0XC, D: 0XD, E: 0XE, F: 0XF, + a: 0xa, b: 0xb, c: 0xc, d: 0xd, e: 0xe, f: 0xf, +}; +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(['%', ';', ':', '&', '=', '+', '$', ',']); +// TODO(indutny): use RFC +exports.STRICT_URL_CHAR = [ + '!', '"', '$', '%', '&', '\'', + '(', ')', '*', '+', ',', '-', '.', '/', + ':', ';', '<', '=', '>', + '@', '[', '\\', ']', '^', '_', + '`', + '{', '|', '}', '~', +].concat(exports.ALPHANUM); +exports.URL_CHAR = exports.STRICT_URL_CHAR + .concat(['\t', '\f']); +// All characters with 0x80 bit set to 1 +for (let i = 0x80; i <= 0xff; i++) { + exports.URL_CHAR.push(i); +} +exports.HEX = exports.NUM.concat(['a', 'b', 'c', 'd', 'e', 'f', 'A', 'B', 'C', 'D', 'E', 'F']); +/* Tokens as defined by rfc 2616. Also lowercases them. + * token = 1* + * separators = "(" | ")" | "<" | ">" | "@" + * | "," | ";" | ":" | "\" | <"> + * | "/" | "[" | "]" | "?" | "=" + * | "{" | "}" | SP | HT + */ +exports.STRICT_TOKEN = [ + '!', '#', '$', '%', '&', '\'', + '*', '+', '-', '.', + '^', '_', '`', + '|', '~', +].concat(exports.ALPHANUM); +exports.TOKEN = exports.STRICT_TOKEN.concat([' ']); +/* + * Verify that a char is a valid visible (printable) US-ASCII + * character or %x80-FF + */ +exports.HEADER_CHARS = ['\t']; +for (let i = 32; i <= 255; i++) { + if (i !== 127) { + exports.HEADER_CHARS.push(i); + } +} +// ',' = \x44 +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, +}; +//# sourceMappingURL=constants.js.map + +/***/ }), + +/***/ 35099: +/***/ ((module) => { + +module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCsLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC1kAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEHdATYCHEEAC3sBAX8CQCAAKAIMIgMNAAJAIAAoAgRFDQAgACABNgIECwJAIAAgASACEMSAgIAAIgMNACAAKAIMDwsgACADNgIcQQAhAyAAKAIEIgFFDQAgACABIAIgACgCCBGBgICAAAAiAUUNACAAIAI2AhQgACABNgIMIAEhAwsgAwvk8wEDDn8DfgR/I4CAgIAAQRBrIgMkgICAgAAgASEEIAEhBSABIQYgASEHIAEhCCABIQkgASEKIAEhCyABIQwgASENIAEhDiABIQ8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgACgCHCIQQX9qDt0B2gEB2QECAwQFBgcICQoLDA0O2AEPENcBERLWARMUFRYXGBkaG+AB3wEcHR7VAR8gISIjJCXUASYnKCkqKyzTAdIBLS7RAdABLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVG2wFHSElKzwHOAUvNAUzMAU1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4ABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwHLAcoBuAHJAbkByAG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAQDcAQtBACEQDMYBC0EOIRAMxQELQQ0hEAzEAQtBDyEQDMMBC0EQIRAMwgELQRMhEAzBAQtBFCEQDMABC0EVIRAMvwELQRYhEAy+AQtBFyEQDL0BC0EYIRAMvAELQRkhEAy7AQtBGiEQDLoBC0EbIRAMuQELQRwhEAy4AQtBCCEQDLcBC0EdIRAMtgELQSAhEAy1AQtBHyEQDLQBC0EHIRAMswELQSEhEAyyAQtBIiEQDLEBC0EeIRAMsAELQSMhEAyvAQtBEiEQDK4BC0ERIRAMrQELQSQhEAysAQtBJSEQDKsBC0EmIRAMqgELQSchEAypAQtBwwEhEAyoAQtBKSEQDKcBC0ErIRAMpgELQSwhEAylAQtBLSEQDKQBC0EuIRAMowELQS8hEAyiAQtBxAEhEAyhAQtBMCEQDKABC0E0IRAMnwELQQwhEAyeAQtBMSEQDJ0BC0EyIRAMnAELQTMhEAybAQtBOSEQDJoBC0E1IRAMmQELQcUBIRAMmAELQQshEAyXAQtBOiEQDJYBC0E2IRAMlQELQQohEAyUAQtBNyEQDJMBC0E4IRAMkgELQTwhEAyRAQtBOyEQDJABC0E9IRAMjwELQQkhEAyOAQtBKCEQDI0BC0E+IRAMjAELQT8hEAyLAQtBwAAhEAyKAQtBwQAhEAyJAQtBwgAhEAyIAQtBwwAhEAyHAQtBxAAhEAyGAQtBxQAhEAyFAQtBxgAhEAyEAQtBKiEQDIMBC0HHACEQDIIBC0HIACEQDIEBC0HJACEQDIABC0HKACEQDH8LQcsAIRAMfgtBzQAhEAx9C0HMACEQDHwLQc4AIRAMewtBzwAhEAx6C0HQACEQDHkLQdEAIRAMeAtB0gAhEAx3C0HTACEQDHYLQdQAIRAMdQtB1gAhEAx0C0HVACEQDHMLQQYhEAxyC0HXACEQDHELQQUhEAxwC0HYACEQDG8LQQQhEAxuC0HZACEQDG0LQdoAIRAMbAtB2wAhEAxrC0HcACEQDGoLQQMhEAxpC0HdACEQDGgLQd4AIRAMZwtB3wAhEAxmC0HhACEQDGULQeAAIRAMZAtB4gAhEAxjC0HjACEQDGILQQIhEAxhC0HkACEQDGALQeUAIRAMXwtB5gAhEAxeC0HnACEQDF0LQegAIRAMXAtB6QAhEAxbC0HqACEQDFoLQesAIRAMWQtB7AAhEAxYC0HtACEQDFcLQe4AIRAMVgtB7wAhEAxVC0HwACEQDFQLQfEAIRAMUwtB8gAhEAxSC0HzACEQDFELQfQAIRAMUAtB9QAhEAxPC0H2ACEQDE4LQfcAIRAMTQtB+AAhEAxMC0H5ACEQDEsLQfoAIRAMSgtB+wAhEAxJC0H8ACEQDEgLQf0AIRAMRwtB/gAhEAxGC0H/ACEQDEULQYABIRAMRAtBgQEhEAxDC0GCASEQDEILQYMBIRAMQQtBhAEhEAxAC0GFASEQDD8LQYYBIRAMPgtBhwEhEAw9C0GIASEQDDwLQYkBIRAMOwtBigEhEAw6C0GLASEQDDkLQYwBIRAMOAtBjQEhEAw3C0GOASEQDDYLQY8BIRAMNQtBkAEhEAw0C0GRASEQDDMLQZIBIRAMMgtBkwEhEAwxC0GUASEQDDALQZUBIRAMLwtBlgEhEAwuC0GXASEQDC0LQZgBIRAMLAtBmQEhEAwrC0GaASEQDCoLQZsBIRAMKQtBnAEhEAwoC0GdASEQDCcLQZ4BIRAMJgtBnwEhEAwlC0GgASEQDCQLQaEBIRAMIwtBogEhEAwiC0GjASEQDCELQaQBIRAMIAtBpQEhEAwfC0GmASEQDB4LQacBIRAMHQtBqAEhEAwcC0GpASEQDBsLQaoBIRAMGgtBqwEhEAwZC0GsASEQDBgLQa0BIRAMFwtBrgEhEAwWC0EBIRAMFQtBrwEhEAwUC0GwASEQDBMLQbEBIRAMEgtBswEhEAwRC0GyASEQDBALQbQBIRAMDwtBtQEhEAwOC0G2ASEQDA0LQbcBIRAMDAtBuAEhEAwLC0G5ASEQDAoLQboBIRAMCQtBuwEhEAwIC0HGASEQDAcLQbwBIRAMBgtBvQEhEAwFC0G+ASEQDAQLQb8BIRAMAwtBwAEhEAwCC0HCASEQDAELQcEBIRALA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQDscBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxweHyAhIyUoP0BBREVGR0hJSktMTU9QUVJT3gNXWVtcXWBiZWZnaGlqa2xtb3BxcnN0dXZ3eHl6e3x9foABggGFAYYBhwGJAYsBjAGNAY4BjwGQAZEBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAc8B0AHRAdIB0wHUAdUB1gHXAdgB2QHaAdsB3AHdAd4B4AHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAZkCpAKwAv4C/gILIAEiBCACRw3zAUHdASEQDP8DCyABIhAgAkcN3QFBwwEhEAz+AwsgASIBIAJHDZABQfcAIRAM/QMLIAEiASACRw2GAUHvACEQDPwDCyABIgEgAkcNf0HqACEQDPsDCyABIgEgAkcNe0HoACEQDPoDCyABIgEgAkcNeEHmACEQDPkDCyABIgEgAkcNGkEYIRAM+AMLIAEiASACRw0UQRIhEAz3AwsgASIBIAJHDVlBxQAhEAz2AwsgASIBIAJHDUpBPyEQDPUDCyABIgEgAkcNSEE8IRAM9AMLIAEiASACRw1BQTEhEAzzAwsgAC0ALkEBRg3rAwyHAgsgACABIgEgAhDAgICAAEEBRw3mASAAQgA3AyAM5wELIAAgASIBIAIQtICAgAAiEA3nASABIQEM9QILAkAgASIBIAJHDQBBBiEQDPADCyAAIAFBAWoiASACELuAgIAAIhAN6AEgASEBDDELIABCADcDIEESIRAM1QMLIAEiECACRw0rQR0hEAztAwsCQCABIgEgAkYNACABQQFqIQFBECEQDNQDC0EHIRAM7AMLIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN5QFBCCEQDOsDCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEUIRAM0gMLQQkhEAzqAwsgASEBIAApAyBQDeQBIAEhAQzyAgsCQCABIgEgAkcNAEELIRAM6QMLIAAgAUEBaiIBIAIQtoCAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3lASABIQEM8gILIAAgASIBIAIQuICAgAAiEA3mASABIQEMDQsgACABIgEgAhC6gICAACIQDecBIAEhAQzwAgsCQCABIgEgAkcNAEEPIRAM5QMLIAEtAAAiEEE7Rg0IIBBBDUcN6AEgAUEBaiEBDO8CCyAAIAEiASACELqAgIAAIhAN6AEgASEBDPICCwNAAkAgAS0AAEHwtYCAAGotAAAiEEEBRg0AIBBBAkcN6wEgACgCBCEQIABBADYCBCAAIBAgAUEBaiIBELmAgIAAIhAN6gEgASEBDPQCCyABQQFqIgEgAkcNAAtBEiEQDOIDCyAAIAEiASACELqAgIAAIhAN6QEgASEBDAoLIAEiASACRw0GQRshEAzgAwsCQCABIgEgAkcNAEEWIRAM4AMLIABBioCAgAA2AgggACABNgIEIAAgASACELiAgIAAIhAN6gEgASEBQSAhEAzGAwsCQCABIgEgAkYNAANAAkAgAS0AAEHwt4CAAGotAAAiEEECRg0AAkAgEEF/ag4E5QHsAQDrAewBCyABQQFqIQFBCCEQDMgDCyABQQFqIgEgAkcNAAtBFSEQDN8DC0EVIRAM3gMLA0ACQCABLQAAQfC5gIAAai0AACIQQQJGDQAgEEF/ag4E3gHsAeAB6wHsAQsgAUEBaiIBIAJHDQALQRghEAzdAwsCQCABIgEgAkYNACAAQYuAgIAANgIIIAAgATYCBCABIQFBByEQDMQDC0EZIRAM3AMLIAFBAWohAQwCCwJAIAEiFCACRw0AQRohEAzbAwsgFCEBAkAgFC0AAEFzag4U3QLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gIA7gILQQAhECAAQQA2AhwgAEGvi4CAADYCECAAQQI2AgwgACAUQQFqNgIUDNoDCwJAIAEtAAAiEEE7Rg0AIBBBDUcN6AEgAUEBaiEBDOUCCyABQQFqIQELQSIhEAy/AwsCQCABIhAgAkcNAEEcIRAM2AMLQgAhESAQIQEgEC0AAEFQag435wHmAQECAwQFBgcIAAAAAAAAAAkKCwwNDgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADxAREhMUAAtBHiEQDL0DC0ICIREM5QELQgMhEQzkAQtCBCERDOMBC0IFIREM4gELQgYhEQzhAQtCByERDOABC0IIIREM3wELQgkhEQzeAQtCCiERDN0BC0ILIREM3AELQgwhEQzbAQtCDSERDNoBC0IOIREM2QELQg8hEQzYAQtCCiERDNcBC0ILIREM1gELQgwhEQzVAQtCDSERDNQBC0IOIREM0wELQg8hEQzSAQtCACERAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAQLQAAQVBqDjflAeQBAAECAwQFBgfmAeYB5gHmAeYB5gHmAQgJCgsMDeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gEODxAREhPmAQtCAiERDOQBC0IDIREM4wELQgQhEQziAQtCBSERDOEBC0IGIREM4AELQgchEQzfAQtCCCERDN4BC0IJIREM3QELQgohEQzcAQtCCyERDNsBC0IMIREM2gELQg0hEQzZAQtCDiERDNgBC0IPIREM1wELQgohEQzWAQtCCyERDNUBC0IMIREM1AELQg0hEQzTAQtCDiERDNIBC0IPIREM0QELIABCACAAKQMgIhEgAiABIhBrrSISfSITIBMgEVYbNwMgIBEgElYiFEUN0gFBHyEQDMADCwJAIAEiASACRg0AIABBiYCAgAA2AgggACABNgIEIAEhAUEkIRAMpwMLQSAhEAy/AwsgACABIhAgAhC+gICAAEF/ag4FtgEAxQIB0QHSAQtBESEQDKQDCyAAQQE6AC8gECEBDLsDCyABIgEgAkcN0gFBJCEQDLsDCyABIg0gAkcNHkHGACEQDLoDCyAAIAEiASACELKAgIAAIhAN1AEgASEBDLUBCyABIhAgAkcNJkHQACEQDLgDCwJAIAEiASACRw0AQSghEAy4AwsgAEEANgIEIABBjICAgAA2AgggACABIAEQsYCAgAAiEA3TASABIQEM2AELAkAgASIQIAJHDQBBKSEQDLcDCyAQLQAAIgFBIEYNFCABQQlHDdMBIBBBAWohAQwVCwJAIAEiASACRg0AIAFBAWohAQwXC0EqIRAMtQMLAkAgASIQIAJHDQBBKyEQDLUDCwJAIBAtAAAiAUEJRg0AIAFBIEcN1QELIAAtACxBCEYN0wEgECEBDJEDCwJAIAEiASACRw0AQSwhEAy0AwsgAS0AAEEKRw3VASABQQFqIQEMyQILIAEiDiACRw3VAUEvIRAMsgMLA0ACQCABLQAAIhBBIEYNAAJAIBBBdmoOBADcAdwBANoBCyABIQEM4AELIAFBAWoiASACRw0AC0ExIRAMsQMLQTIhECABIhQgAkYNsAMgAiAUayAAKAIAIgFqIRUgFCABa0EDaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfC7gIAAai0AAEcNAQJAIAFBA0cNAEEGIQEMlgMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLEDCyAAQQA2AgAgFCEBDNkBC0EzIRAgASIUIAJGDa8DIAIgFGsgACgCACIBaiEVIBQgAWtBCGohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUH0u4CAAGotAABHDQECQCABQQhHDQBBBSEBDJUDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAywAwsgAEEANgIAIBQhAQzYAQtBNCEQIAEiFCACRg2uAyACIBRrIAAoAgAiAWohFSAUIAFrQQVqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw0BAkAgAUEFRw0AQQchAQyUAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMrwMLIABBADYCACAUIQEM1wELAkAgASIBIAJGDQADQAJAIAEtAABBgL6AgABqLQAAIhBBAUYNACAQQQJGDQogASEBDN0BCyABQQFqIgEgAkcNAAtBMCEQDK4DC0EwIRAMrQMLAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AIBBBdmoOBNkB2gHaAdkB2gELIAFBAWoiASACRw0AC0E4IRAMrQMLQTghEAysAwsDQAJAIAEtAAAiEEEgRg0AIBBBCUcNAwsgAUEBaiIBIAJHDQALQTwhEAyrAwsDQAJAIAEtAAAiEEEgRg0AAkACQCAQQXZqDgTaAQEB2gEACyAQQSxGDdsBCyABIQEMBAsgAUEBaiIBIAJHDQALQT8hEAyqAwsgASEBDNsBC0HAACEQIAEiFCACRg2oAyACIBRrIAAoAgAiAWohFiAUIAFrQQZqIRcCQANAIBQtAABBIHIgAUGAwICAAGotAABHDQEgAUEGRg2OAyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAypAwsgAEEANgIAIBQhAQtBNiEQDI4DCwJAIAEiDyACRw0AQcEAIRAMpwMLIABBjICAgAA2AgggACAPNgIEIA8hASAALQAsQX9qDgTNAdUB1wHZAYcDCyABQQFqIQEMzAELAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgciAQIBBBv39qQf8BcUEaSRtB/wFxIhBBCUYNACAQQSBGDQACQAJAAkACQCAQQZ1/ag4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUExIRAMkQMLIAFBAWohAUEyIRAMkAMLIAFBAWohAUEzIRAMjwMLIAEhAQzQAQsgAUEBaiIBIAJHDQALQTUhEAylAwtBNSEQDKQDCwJAIAEiASACRg0AA0ACQCABLQAAQYC8gIAAai0AAEEBRg0AIAEhAQzTAQsgAUEBaiIBIAJHDQALQT0hEAykAwtBPSEQDKMDCyAAIAEiASACELCAgIAAIhAN1gEgASEBDAELIBBBAWohAQtBPCEQDIcDCwJAIAEiASACRw0AQcIAIRAMoAMLAkADQAJAIAEtAABBd2oOGAAC/gL+AoQD/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4CAP4CCyABQQFqIgEgAkcNAAtBwgAhEAygAwsgAUEBaiEBIAAtAC1BAXFFDb0BIAEhAQtBLCEQDIUDCyABIgEgAkcN0wFBxAAhEAydAwsDQAJAIAEtAABBkMCAgABqLQAAQQFGDQAgASEBDLcCCyABQQFqIgEgAkcNAAtBxQAhEAycAwsgDS0AACIQQSBGDbMBIBBBOkcNgQMgACgCBCEBIABBADYCBCAAIAEgDRCvgICAACIBDdABIA1BAWohAQyzAgtBxwAhECABIg0gAkYNmgMgAiANayAAKAIAIgFqIRYgDSABa0EFaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGQwoCAAGotAABHDYADIAFBBUYN9AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmgMLQcgAIRAgASINIAJGDZkDIAIgDWsgACgCACIBaiEWIA0gAWtBCWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBlsKAgABqLQAARw3/AgJAIAFBCUcNAEECIQEM9QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJkDCwJAIAEiDSACRw0AQckAIRAMmQMLAkACQCANLQAAIgFBIHIgASABQb9/akH/AXFBGkkbQf8BcUGSf2oOBwCAA4ADgAOAA4ADAYADCyANQQFqIQFBPiEQDIADCyANQQFqIQFBPyEQDP8CC0HKACEQIAEiDSACRg2XAyACIA1rIAAoAgAiAWohFiANIAFrQQFqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaDCgIAAai0AAEcN/QIgAUEBRg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyXAwtBywAhECABIg0gAkYNlgMgAiANayAAKAIAIgFqIRYgDSABa0EOaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGiwoCAAGotAABHDfwCIAFBDkYN8AIgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlgMLQcwAIRAgASINIAJGDZUDIAIgDWsgACgCACIBaiEWIA0gAWtBD2ohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBwMKAgABqLQAARw37AgJAIAFBD0cNAEEDIQEM8QILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJUDC0HNACEQIAEiDSACRg2UAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQdDCgIAAai0AAEcN+gICQCABQQVHDQBBBCEBDPACCyABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyUAwsCQCABIg0gAkcNAEHOACEQDJQDCwJAAkACQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZ1/ag4TAP0C/QL9Av0C/QL9Av0C/QL9Av0C/QL9AgH9Av0C/QICA/0CCyANQQFqIQFBwQAhEAz9AgsgDUEBaiEBQcIAIRAM/AILIA1BAWohAUHDACEQDPsCCyANQQFqIQFBxAAhEAz6AgsCQCABIgEgAkYNACAAQY2AgIAANgIIIAAgATYCBCABIQFBxQAhEAz6AgtBzwAhEAySAwsgECEBAkACQCAQLQAAQXZqDgQBqAKoAgCoAgsgEEEBaiEBC0EnIRAM+AILAkAgASIBIAJHDQBB0QAhEAyRAwsCQCABLQAAQSBGDQAgASEBDI0BCyABQQFqIQEgAC0ALUEBcUUNxwEgASEBDIwBCyABIhcgAkcNyAFB0gAhEAyPAwtB0wAhECABIhQgAkYNjgMgAiAUayAAKAIAIgFqIRYgFCABa0EBaiEXA0AgFC0AACABQdbCgIAAai0AAEcNzAEgAUEBRg3HASABQQFqIQEgFEEBaiIUIAJHDQALIAAgFjYCAAyOAwsCQCABIgEgAkcNAEHVACEQDI4DCyABLQAAQQpHDcwBIAFBAWohAQzHAQsCQCABIgEgAkcNAEHWACEQDI0DCwJAAkAgAS0AAEF2ag4EAM0BzQEBzQELIAFBAWohAQzHAQsgAUEBaiEBQcoAIRAM8wILIAAgASIBIAIQroCAgAAiEA3LASABIQFBzQAhEAzyAgsgAC0AKUEiRg2FAwymAgsCQCABIgEgAkcNAEHbACEQDIoDC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgAS0AAEFQag4K1AHTAQABAgMEBQYI1QELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMzAELQQkhEEEBIRRBACEXQQAhFgzLAQsCQCABIgEgAkcNAEHdACEQDIkDCyABLQAAQS5HDcwBIAFBAWohAQymAgsgASIBIAJHDcwBQd8AIRAMhwMLAkAgASIBIAJGDQAgAEGOgICAADYCCCAAIAE2AgQgASEBQdAAIRAM7gILQeAAIRAMhgMLQeEAIRAgASIBIAJGDYUDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHiwoCAAGotAABHDc0BIBRBA0YNzAEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhQMLQeIAIRAgASIBIAJGDYQDIAIgAWsgACgCACIUaiEWIAEgFGtBAmohFwNAIAEtAAAgFEHmwoCAAGotAABHDcwBIBRBAkYNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMhAMLQeMAIRAgASIBIAJGDYMDIAIgAWsgACgCACIUaiEWIAEgFGtBA2ohFwNAIAEtAAAgFEHpwoCAAGotAABHDcsBIBRBA0YNzgEgFEEBaiEUIAFBAWoiASACRw0ACyAAIBY2AgAMgwMLAkAgASIBIAJHDQBB5QAhEAyDAwsgACABQQFqIgEgAhCogICAACIQDc0BIAEhAUHWACEQDOkCCwJAIAEiASACRg0AA0ACQCABLQAAIhBBIEYNAAJAAkACQCAQQbh/ag4LAAHPAc8BzwHPAc8BzwHPAc8BAs8BCyABQQFqIQFB0gAhEAztAgsgAUEBaiEBQdMAIRAM7AILIAFBAWohAUHUACEQDOsCCyABQQFqIgEgAkcNAAtB5AAhEAyCAwtB5AAhEAyBAwsDQAJAIAEtAABB8MKAgABqLQAAIhBBAUYNACAQQX5qDgPPAdAB0QHSAQsgAUEBaiIBIAJHDQALQeYAIRAMgAMLAkAgASIBIAJGDQAgAUEBaiEBDAMLQecAIRAM/wILA0ACQCABLQAAQfDEgIAAai0AACIQQQFGDQACQCAQQX5qDgTSAdMB1AEA1QELIAEhAUHXACEQDOcCCyABQQFqIgEgAkcNAAtB6AAhEAz+AgsCQCABIgEgAkcNAEHpACEQDP4CCwJAIAEtAAAiEEF2ag4augHVAdUBvAHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHKAdUB1QEA0wELIAFBAWohAQtBBiEQDOMCCwNAAkAgAS0AAEHwxoCAAGotAABBAUYNACABIQEMngILIAFBAWoiASACRw0AC0HqACEQDPsCCwJAIAEiASACRg0AIAFBAWohAQwDC0HrACEQDPoCCwJAIAEiASACRw0AQewAIRAM+gILIAFBAWohAQwBCwJAIAEiASACRw0AQe0AIRAM+QILIAFBAWohAQtBBCEQDN4CCwJAIAEiFCACRw0AQe4AIRAM9wILIBQhAQJAAkACQCAULQAAQfDIgIAAai0AAEF/ag4H1AHVAdYBAJwCAQLXAQsgFEEBaiEBDAoLIBRBAWohAQzNAQtBACEQIABBADYCHCAAQZuSgIAANgIQIABBBzYCDCAAIBRBAWo2AhQM9gILAkADQAJAIAEtAABB8MiAgABqLQAAIhBBBEYNAAJAAkAgEEF/ag4H0gHTAdQB2QEABAHZAQsgASEBQdoAIRAM4AILIAFBAWohAUHcACEQDN8CCyABQQFqIgEgAkcNAAtB7wAhEAz2AgsgAUEBaiEBDMsBCwJAIAEiFCACRw0AQfAAIRAM9QILIBQtAABBL0cN1AEgFEEBaiEBDAYLAkAgASIUIAJHDQBB8QAhEAz0AgsCQCAULQAAIgFBL0cNACAUQQFqIQFB3QAhEAzbAgsgAUF2aiIEQRZLDdMBQQEgBHRBiYCAAnFFDdMBDMoCCwJAIAEiASACRg0AIAFBAWohAUHeACEQDNoCC0HyACEQDPICCwJAIAEiFCACRw0AQfQAIRAM8gILIBQhAQJAIBQtAABB8MyAgABqLQAAQX9qDgPJApQCANQBC0HhACEQDNgCCwJAIAEiFCACRg0AA0ACQCAULQAAQfDKgIAAai0AACIBQQNGDQACQCABQX9qDgLLAgDVAQsgFCEBQd8AIRAM2gILIBRBAWoiFCACRw0AC0HzACEQDPECC0HzACEQDPACCwJAIAEiASACRg0AIABBj4CAgAA2AgggACABNgIEIAEhAUHgACEQDNcCC0H1ACEQDO8CCwJAIAEiASACRw0AQfYAIRAM7wILIABBj4CAgAA2AgggACABNgIEIAEhAQtBAyEQDNQCCwNAIAEtAABBIEcNwwIgAUEBaiIBIAJHDQALQfcAIRAM7AILAkAgASIBIAJHDQBB+AAhEAzsAgsgAS0AAEEgRw3OASABQQFqIQEM7wELIAAgASIBIAIQrICAgAAiEA3OASABIQEMjgILAkAgASIEIAJHDQBB+gAhEAzqAgsgBC0AAEHMAEcN0QEgBEEBaiEBQRMhEAzPAQsCQCABIgQgAkcNAEH7ACEQDOkCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRADQCAELQAAIAFB8M6AgABqLQAARw3QASABQQVGDc4BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQfsAIRAM6AILAkAgASIEIAJHDQBB/AAhEAzoAgsCQAJAIAQtAABBvX9qDgwA0QHRAdEB0QHRAdEB0QHRAdEB0QEB0QELIARBAWohAUHmACEQDM8CCyAEQQFqIQFB5wAhEAzOAgsCQCABIgQgAkcNAEH9ACEQDOcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDc8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH9ACEQDOcCCyAAQQA2AgAgEEEBaiEBQRAhEAzMAQsCQCABIgQgAkcNAEH+ACEQDOYCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUH2zoCAAGotAABHDc4BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH+ACEQDOYCCyAAQQA2AgAgEEEBaiEBQRYhEAzLAQsCQCABIgQgAkcNAEH/ACEQDOUCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUH8zoCAAGotAABHDc0BIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEH/ACEQDOUCCyAAQQA2AgAgEEEBaiEBQQUhEAzKAQsCQCABIgQgAkcNAEGAASEQDOQCCyAELQAAQdkARw3LASAEQQFqIQFBCCEQDMkBCwJAIAEiBCACRw0AQYEBIRAM4wILAkACQCAELQAAQbJ/ag4DAMwBAcwBCyAEQQFqIQFB6wAhEAzKAgsgBEEBaiEBQewAIRAMyQILAkAgASIEIAJHDQBBggEhEAziAgsCQAJAIAQtAABBuH9qDggAywHLAcsBywHLAcsBAcsBCyAEQQFqIQFB6gAhEAzJAgsgBEEBaiEBQe0AIRAMyAILAkAgASIEIAJHDQBBgwEhEAzhAgsgAiAEayAAKAIAIgFqIRAgBCABa0ECaiEUAkADQCAELQAAIAFBgM+AgABqLQAARw3JASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBA2AgBBgwEhEAzhAgtBACEQIABBADYCACAUQQFqIQEMxgELAkAgASIEIAJHDQBBhAEhEAzgAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBg8+AgABqLQAARw3IASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhAEhEAzgAgsgAEEANgIAIBBBAWohAUEjIRAMxQELAkAgASIEIAJHDQBBhQEhEAzfAgsCQAJAIAQtAABBtH9qDggAyAHIAcgByAHIAcgBAcgBCyAEQQFqIQFB7wAhEAzGAgsgBEEBaiEBQfAAIRAMxQILAkAgASIEIAJHDQBBhgEhEAzeAgsgBC0AAEHFAEcNxQEgBEEBaiEBDIMCCwJAIAEiBCACRw0AQYcBIRAM3QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQYjPgIAAai0AAEcNxQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYcBIRAM3QILIABBADYCACAQQQFqIQFBLSEQDMIBCwJAIAEiBCACRw0AQYgBIRAM3AILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNxAEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYgBIRAM3AILIABBADYCACAQQQFqIQFBKSEQDMEBCwJAIAEiASACRw0AQYkBIRAM2wILQQEhECABLQAAQd8ARw3AASABQQFqIQEMgQILAkAgASIEIAJHDQBBigEhEAzaAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQA0AgBC0AACABQYzPgIAAai0AAEcNwQEgAUEBRg2vAiABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGKASEQDNkCCwJAIAEiBCACRw0AQYsBIRAM2QILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQY7PgIAAai0AAEcNwQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYsBIRAM2QILIABBADYCACAQQQFqIQFBAiEQDL4BCwJAIAEiBCACRw0AQYwBIRAM2AILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNwAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYwBIRAM2AILIABBADYCACAQQQFqIQFBHyEQDL0BCwJAIAEiBCACRw0AQY0BIRAM1wILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNvwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY0BIRAM1wILIABBADYCACAQQQFqIQFBCSEQDLwBCwJAIAEiBCACRw0AQY4BIRAM1gILAkACQCAELQAAQbd/ag4HAL8BvwG/Ab8BvwEBvwELIARBAWohAUH4ACEQDL0CCyAEQQFqIQFB+QAhEAy8AgsCQCABIgQgAkcNAEGPASEQDNUCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGRz4CAAGotAABHDb0BIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGPASEQDNUCCyAAQQA2AgAgEEEBaiEBQRghEAy6AQsCQCABIgQgAkcNAEGQASEQDNQCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUGXz4CAAGotAABHDbwBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGQASEQDNQCCyAAQQA2AgAgEEEBaiEBQRchEAy5AQsCQCABIgQgAkcNAEGRASEQDNMCCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUGaz4CAAGotAABHDbsBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGRASEQDNMCCyAAQQA2AgAgEEEBaiEBQRUhEAy4AQsCQCABIgQgAkcNAEGSASEQDNICCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGhz4CAAGotAABHDboBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGSASEQDNICCyAAQQA2AgAgEEEBaiEBQR4hEAy3AQsCQCABIgQgAkcNAEGTASEQDNECCyAELQAAQcwARw24ASAEQQFqIQFBCiEQDLYBCwJAIAQgAkcNAEGUASEQDNACCwJAAkAgBC0AAEG/f2oODwC5AbkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AQG5AQsgBEEBaiEBQf4AIRAMtwILIARBAWohAUH/ACEQDLYCCwJAIAQgAkcNAEGVASEQDM8CCwJAAkAgBC0AAEG/f2oOAwC4AQG4AQsgBEEBaiEBQf0AIRAMtgILIARBAWohBEGAASEQDLUCCwJAIAQgAkcNAEGWASEQDM4CCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUGnz4CAAGotAABHDbYBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGWASEQDM4CCyAAQQA2AgAgEEEBaiEBQQshEAyzAQsCQCAEIAJHDQBBlwEhEAzNAgsCQAJAAkACQCAELQAAQVNqDiMAuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AQG4AbgBuAG4AbgBArgBuAG4AQO4AQsgBEEBaiEBQfsAIRAMtgILIARBAWohAUH8ACEQDLUCCyAEQQFqIQRBgQEhEAy0AgsgBEEBaiEEQYIBIRAMswILAkAgBCACRw0AQZgBIRAMzAILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQanPgIAAai0AAEcNtAEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZgBIRAMzAILIABBADYCACAQQQFqIQFBGSEQDLEBCwJAIAQgAkcNAEGZASEQDMsCCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUGuz4CAAGotAABHDbMBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGZASEQDMsCCyAAQQA2AgAgEEEBaiEBQQYhEAywAQsCQCAEIAJHDQBBmgEhEAzKAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBtM+AgABqLQAARw2yASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmgEhEAzKAgsgAEEANgIAIBBBAWohAUEcIRAMrwELAkAgBCACRw0AQZsBIRAMyQILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbbPgIAAai0AAEcNsQEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZsBIRAMyQILIABBADYCACAQQQFqIQFBJyEQDK4BCwJAIAQgAkcNAEGcASEQDMgCCwJAAkAgBC0AAEGsf2oOAgABsQELIARBAWohBEGGASEQDK8CCyAEQQFqIQRBhwEhEAyuAgsCQCAEIAJHDQBBnQEhEAzHAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBuM+AgABqLQAARw2vASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBnQEhEAzHAgsgAEEANgIAIBBBAWohAUEmIRAMrAELAkAgBCACRw0AQZ4BIRAMxgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQbrPgIAAai0AAEcNrgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ4BIRAMxgILIABBADYCACAQQQFqIQFBAyEQDKsBCwJAIAQgAkcNAEGfASEQDMUCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDa0BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGfASEQDMUCCyAAQQA2AgAgEEEBaiEBQQwhEAyqAQsCQCAEIAJHDQBBoAEhEAzEAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBvM+AgABqLQAARw2sASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBoAEhEAzEAgsgAEEANgIAIBBBAWohAUENIRAMqQELAkAgBCACRw0AQaEBIRAMwwILAkACQCAELQAAQbp/ag4LAKwBrAGsAawBrAGsAawBrAGsAQGsAQsgBEEBaiEEQYsBIRAMqgILIARBAWohBEGMASEQDKkCCwJAIAQgAkcNAEGiASEQDMICCyAELQAAQdAARw2pASAEQQFqIQQM6QELAkAgBCACRw0AQaMBIRAMwQILAkACQCAELQAAQbd/ag4HAaoBqgGqAaoBqgEAqgELIARBAWohBEGOASEQDKgCCyAEQQFqIQFBIiEQDKYBCwJAIAQgAkcNAEGkASEQDMACCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHAz4CAAGotAABHDagBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGkASEQDMACCyAAQQA2AgAgEEEBaiEBQR0hEAylAQsCQCAEIAJHDQBBpQEhEAy/AgsCQAJAIAQtAABBrn9qDgMAqAEBqAELIARBAWohBEGQASEQDKYCCyAEQQFqIQFBBCEQDKQBCwJAIAQgAkcNAEGmASEQDL4CCwJAAkACQAJAAkAgBC0AAEG/f2oOFQCqAaoBqgGqAaoBqgGqAaoBqgGqAQGqAaoBAqoBqgEDqgGqAQSqAQsgBEEBaiEEQYgBIRAMqAILIARBAWohBEGJASEQDKcCCyAEQQFqIQRBigEhEAymAgsgBEEBaiEEQY8BIRAMpQILIARBAWohBEGRASEQDKQCCwJAIAQgAkcNAEGnASEQDL0CCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDaUBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGnASEQDL0CCyAAQQA2AgAgEEEBaiEBQREhEAyiAQsCQCAEIAJHDQBBqAEhEAy8AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBws+AgABqLQAARw2kASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqAEhEAy8AgsgAEEANgIAIBBBAWohAUEsIRAMoQELAkAgBCACRw0AQakBIRAMuwILIAIgBGsgACgCACIBaiEUIAQgAWtBBGohEAJAA0AgBC0AACABQcXPgIAAai0AAEcNowEgAUEERg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQakBIRAMuwILIABBADYCACAQQQFqIQFBKyEQDKABCwJAIAQgAkcNAEGqASEQDLoCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHKz4CAAGotAABHDaIBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGqASEQDLoCCyAAQQA2AgAgEEEBaiEBQRQhEAyfAQsCQCAEIAJHDQBBqwEhEAy5AgsCQAJAAkACQCAELQAAQb5/ag4PAAECpAGkAaQBpAGkAaQBpAGkAaQBpAGkAQOkAQsgBEEBaiEEQZMBIRAMogILIARBAWohBEGUASEQDKECCyAEQQFqIQRBlQEhEAygAgsgBEEBaiEEQZYBIRAMnwILAkAgBCACRw0AQawBIRAMuAILIAQtAABBxQBHDZ8BIARBAWohBAzgAQsCQCAEIAJHDQBBrQEhEAy3AgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBzc+AgABqLQAARw2fASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrQEhEAy3AgsgAEEANgIAIBBBAWohAUEOIRAMnAELAkAgBCACRw0AQa4BIRAMtgILIAQtAABB0ABHDZ0BIARBAWohAUElIRAMmwELAkAgBCACRw0AQa8BIRAMtQILIAIgBGsgACgCACIBaiEUIAQgAWtBCGohEAJAA0AgBC0AACABQdDPgIAAai0AAEcNnQEgAUEIRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQa8BIRAMtQILIABBADYCACAQQQFqIQFBKiEQDJoBCwJAIAQgAkcNAEGwASEQDLQCCwJAAkAgBC0AAEGrf2oOCwCdAZ0BnQGdAZ0BnQGdAZ0BnQEBnQELIARBAWohBEGaASEQDJsCCyAEQQFqIQRBmwEhEAyaAgsCQCAEIAJHDQBBsQEhEAyzAgsCQAJAIAQtAABBv39qDhQAnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBAZwBCyAEQQFqIQRBmQEhEAyaAgsgBEEBaiEEQZwBIRAMmQILAkAgBCACRw0AQbIBIRAMsgILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQdnPgIAAai0AAEcNmgEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbIBIRAMsgILIABBADYCACAQQQFqIQFBISEQDJcBCwJAIAQgAkcNAEGzASEQDLECCyACIARrIAAoAgAiAWohFCAEIAFrQQZqIRACQANAIAQtAAAgAUHdz4CAAGotAABHDZkBIAFBBkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGzASEQDLECCyAAQQA2AgAgEEEBaiEBQRohEAyWAQsCQCAEIAJHDQBBtAEhEAywAgsCQAJAAkAgBC0AAEG7f2oOEQCaAZoBmgGaAZoBmgGaAZoBmgEBmgGaAZoBmgGaAQKaAQsgBEEBaiEEQZ0BIRAMmAILIARBAWohBEGeASEQDJcCCyAEQQFqIQRBnwEhEAyWAgsCQCAEIAJHDQBBtQEhEAyvAgsgAiAEayAAKAIAIgFqIRQgBCABa0EFaiEQAkADQCAELQAAIAFB5M+AgABqLQAARw2XASABQQVGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtQEhEAyvAgsgAEEANgIAIBBBAWohAUEoIRAMlAELAkAgBCACRw0AQbYBIRAMrgILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQerPgIAAai0AAEcNlgEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbYBIRAMrgILIABBADYCACAQQQFqIQFBByEQDJMBCwJAIAQgAkcNAEG3ASEQDK0CCwJAAkAgBC0AAEG7f2oODgCWAZYBlgGWAZYBlgGWAZYBlgGWAZYBlgEBlgELIARBAWohBEGhASEQDJQCCyAEQQFqIQRBogEhEAyTAgsCQCAEIAJHDQBBuAEhEAysAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB7c+AgABqLQAARw2UASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuAEhEAysAgsgAEEANgIAIBBBAWohAUESIRAMkQELAkAgBCACRw0AQbkBIRAMqwILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfDPgIAAai0AAEcNkwEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbkBIRAMqwILIABBADYCACAQQQFqIQFBICEQDJABCwJAIAQgAkcNAEG6ASEQDKoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUHyz4CAAGotAABHDZIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG6ASEQDKoCCyAAQQA2AgAgEEEBaiEBQQ8hEAyPAQsCQCAEIAJHDQBBuwEhEAypAgsCQAJAIAQtAABBt39qDgcAkgGSAZIBkgGSAQGSAQsgBEEBaiEEQaUBIRAMkAILIARBAWohBEGmASEQDI8CCwJAIAQgAkcNAEG8ASEQDKgCCyACIARrIAAoAgAiAWohFCAEIAFrQQdqIRACQANAIAQtAAAgAUH0z4CAAGotAABHDZABIAFBB0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG8ASEQDKgCCyAAQQA2AgAgEEEBaiEBQRshEAyNAQsCQCAEIAJHDQBBvQEhEAynAgsCQAJAAkAgBC0AAEG+f2oOEgCRAZEBkQGRAZEBkQGRAZEBkQEBkQGRAZEBkQGRAZEBApEBCyAEQQFqIQRBpAEhEAyPAgsgBEEBaiEEQacBIRAMjgILIARBAWohBEGoASEQDI0CCwJAIAQgAkcNAEG+ASEQDKYCCyAELQAAQc4ARw2NASAEQQFqIQQMzwELAkAgBCACRw0AQb8BIRAMpQILAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgBC0AAEG/f2oOFQABAgOcAQQFBpwBnAGcAQcICQoLnAEMDQ4PnAELIARBAWohAUHoACEQDJoCCyAEQQFqIQFB6QAhEAyZAgsgBEEBaiEBQe4AIRAMmAILIARBAWohAUHyACEQDJcCCyAEQQFqIQFB8wAhEAyWAgsgBEEBaiEBQfYAIRAMlQILIARBAWohAUH3ACEQDJQCCyAEQQFqIQFB+gAhEAyTAgsgBEEBaiEEQYMBIRAMkgILIARBAWohBEGEASEQDJECCyAEQQFqIQRBhQEhEAyQAgsgBEEBaiEEQZIBIRAMjwILIARBAWohBEGYASEQDI4CCyAEQQFqIQRBoAEhEAyNAgsgBEEBaiEEQaMBIRAMjAILIARBAWohBEGqASEQDIsCCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEGrASEQDIsCC0HAASEQDKMCCyAAIAUgAhCqgICAACIBDYsBIAUhAQxcCwJAIAYgAkYNACAGQQFqIQUMjQELQcIBIRAMoQILA0ACQCAQLQAAQXZqDgSMAQAAjwEACyAQQQFqIhAgAkcNAAtBwwEhEAygAgsCQCAHIAJGDQAgAEGRgICAADYCCCAAIAc2AgQgByEBQQEhEAyHAgtBxAEhEAyfAgsCQCAHIAJHDQBBxQEhEAyfAgsCQAJAIActAABBdmoOBAHOAc4BAM4BCyAHQQFqIQYMjQELIAdBAWohBQyJAQsCQCAHIAJHDQBBxgEhEAyeAgsCQAJAIActAABBdmoOFwGPAY8BAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAQCPAQsgB0EBaiEHC0GwASEQDIQCCwJAIAggAkcNAEHIASEQDJ0CCyAILQAAQSBHDY0BIABBADsBMiAIQQFqIQFBswEhEAyDAgsgASEXAkADQCAXIgcgAkYNASAHLQAAQVBqQf8BcSIQQQpPDcwBAkAgAC8BMiIUQZkzSw0AIAAgFEEKbCIUOwEyIBBB//8DcyAUQf7/A3FJDQAgB0EBaiEXIAAgFCAQaiIQOwEyIBBB//8DcUHoB0kNAQsLQQAhECAAQQA2AhwgAEHBiYCAADYCECAAQQ02AgwgACAHQQFqNgIUDJwCC0HHASEQDJsCCyAAIAggAhCugICAACIQRQ3KASAQQRVHDYwBIABByAE2AhwgACAINgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAyaAgsCQCAJIAJHDQBBzAEhEAyaAgtBACEUQQEhF0EBIRZBACEQAkACQAJAAkACQAJAAkACQAJAIAktAABBUGoOCpYBlQEAAQIDBAUGCJcBC0ECIRAMBgtBAyEQDAULQQQhEAwEC0EFIRAMAwtBBiEQDAILQQchEAwBC0EIIRALQQAhF0EAIRZBACEUDI4BC0EJIRBBASEUQQAhF0EAIRYMjQELAkAgCiACRw0AQc4BIRAMmQILIAotAABBLkcNjgEgCkEBaiEJDMoBCyALIAJHDY4BQdABIRAMlwILAkAgCyACRg0AIABBjoCAgAA2AgggACALNgIEQbcBIRAM/gELQdEBIRAMlgILAkAgBCACRw0AQdIBIRAMlgILIAIgBGsgACgCACIQaiEUIAQgEGtBBGohCwNAIAQtAAAgEEH8z4CAAGotAABHDY4BIBBBBEYN6QEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB0gEhEAyVAgsgACAMIAIQrICAgAAiAQ2NASAMIQEMuAELAkAgBCACRw0AQdQBIRAMlAILIAIgBGsgACgCACIQaiEUIAQgEGtBAWohDANAIAQtAAAgEEGB0ICAAGotAABHDY8BIBBBAUYNjgEgEEEBaiEQIARBAWoiBCACRw0ACyAAIBQ2AgBB1AEhEAyTAgsCQCAEIAJHDQBB1gEhEAyTAgsgAiAEayAAKAIAIhBqIRQgBCAQa0ECaiELA0AgBC0AACAQQYPQgIAAai0AAEcNjgEgEEECRg2QASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHWASEQDJICCwJAIAQgAkcNAEHXASEQDJICCwJAAkAgBC0AAEG7f2oOEACPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAY8BCyAEQQFqIQRBuwEhEAz5AQsgBEEBaiEEQbwBIRAM+AELAkAgBCACRw0AQdgBIRAMkQILIAQtAABByABHDYwBIARBAWohBAzEAQsCQCAEIAJGDQAgAEGQgICAADYCCCAAIAQ2AgRBvgEhEAz3AQtB2QEhEAyPAgsCQCAEIAJHDQBB2gEhEAyPAgsgBC0AAEHIAEYNwwEgAEEBOgAoDLkBCyAAQQI6AC8gACAEIAIQpoCAgAAiEA2NAUHCASEQDPQBCyAALQAoQX9qDgK3AbkBuAELA0ACQCAELQAAQXZqDgQAjgGOAQCOAQsgBEEBaiIEIAJHDQALQd0BIRAMiwILIABBADoALyAALQAtQQRxRQ2EAgsgAEEAOgAvIABBAToANCABIQEMjAELIBBBFUYN2gEgAEEANgIcIAAgATYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMiAILAkAgACAQIAIQtICAgAAiBA0AIBAhAQyBAgsCQCAEQRVHDQAgAEEDNgIcIAAgEDYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMiAILIABBADYCHCAAIBA2AhQgAEGnjoCAADYCECAAQRI2AgxBACEQDIcCCyAQQRVGDdYBIABBADYCHCAAIAE2AhQgAEHajYCAADYCECAAQRQ2AgxBACEQDIYCCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNjQEgAEEHNgIcIAAgEDYCFCAAIBQ2AgxBACEQDIUCCyAAIAAvATBBgAFyOwEwIAEhAQtBKiEQDOoBCyAQQRVGDdEBIABBADYCHCAAIAE2AhQgAEGDjICAADYCECAAQRM2AgxBACEQDIICCyAQQRVGDc8BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDIECCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyNAQsgAEEMNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDIACCyAQQRVGDcwBIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDP8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyMAQsgAEENNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDP4BCyAQQRVGDckBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDP0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyLAQsgAEEONgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPwBCyAAQQA2AhwgACABNgIUIABBwJWAgAA2AhAgAEECNgIMQQAhEAz7AQsgEEEVRg3FASAAQQA2AhwgACABNgIUIABBxoyAgAA2AhAgAEEjNgIMQQAhEAz6AQsgAEEQNgIcIAAgATYCFCAAIBA2AgxBACEQDPkBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQzxAQsgAEERNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPgBCyAQQRVGDcEBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPcBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQuYCAgAAiEA0AIAFBAWohAQyIAQsgAEETNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPYBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQuYCAgAAiBA0AIAFBAWohAQztAQsgAEEUNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPUBCyAQQRVGDb0BIABBADYCHCAAIAE2AhQgAEGaj4CAADYCECAAQSI2AgxBACEQDPQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQt4CAgAAiEA0AIAFBAWohAQyGAQsgAEEWNgIcIAAgEDYCDCAAIAFBAWo2AhRBACEQDPMBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQt4CAgAAiBA0AIAFBAWohAQzpAQsgAEEXNgIcIAAgBDYCDCAAIAFBAWo2AhRBACEQDPIBCyAAQQA2AhwgACABNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzxAQtCASERCyAQQQFqIQECQCAAKQMgIhJC//////////8PVg0AIAAgEkIEhiARhDcDICABIQEMhAELIABBADYCHCAAIAE2AhQgAEGtiYCAADYCECAAQQw2AgxBACEQDO8BCyAAQQA2AhwgACAQNgIUIABBzZOAgAA2AhAgAEEMNgIMQQAhEAzuAQsgACgCBCEXIABBADYCBCAQIBGnaiIWIQEgACAXIBAgFiAUGyIQELWAgIAAIhRFDXMgAEEFNgIcIAAgEDYCFCAAIBQ2AgxBACEQDO0BCyAAQQA2AhwgACAQNgIUIABBqpyAgAA2AhAgAEEPNgIMQQAhEAzsAQsgACAQIAIQtICAgAAiAQ0BIBAhAQtBDiEQDNEBCwJAIAFBFUcNACAAQQI2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAzqAQsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAM6QELIAFBAWohEAJAIAAvATAiAUGAAXFFDQACQCAAIBAgAhC7gICAACIBDQAgECEBDHALIAFBFUcNugEgAEEFNgIcIAAgEDYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAM6QELAkAgAUGgBHFBoARHDQAgAC0ALUECcQ0AIABBADYCHCAAIBA2AhQgAEGWk4CAADYCECAAQQQ2AgxBACEQDOkBCyAAIBAgAhC9gICAABogECEBAkACQAJAAkACQCAAIBAgAhCzgICAAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIABBAToALgsgACAALwEwQcAAcjsBMCAQIQELQSYhEAzRAQsgAEEjNgIcIAAgEDYCFCAAQaWWgIAANgIQIABBFTYCDEEAIRAM6QELIABBADYCHCAAIBA2AhQgAEHVi4CAADYCECAAQRE2AgxBACEQDOgBCyAALQAtQQFxRQ0BQcMBIRAMzgELAkAgDSACRg0AA0ACQCANLQAAQSBGDQAgDSEBDMQBCyANQQFqIg0gAkcNAAtBJSEQDOcBC0ElIRAM5gELIAAoAgQhBCAAQQA2AgQgACAEIA0Qr4CAgAAiBEUNrQEgAEEmNgIcIAAgBDYCDCAAIA1BAWo2AhRBACEQDOUBCyAQQRVGDasBIABBADYCHCAAIAE2AhQgAEH9jYCAADYCECAAQR02AgxBACEQDOQBCyAAQSc2AhwgACABNgIUIAAgEDYCDEEAIRAM4wELIBAhAUEBIRQCQAJAAkACQAJAAkACQCAALQAsQX5qDgcGBQUDAQIABQsgACAALwEwQQhyOwEwDAMLQQIhFAwBC0EEIRQLIABBAToALCAAIAAvATAgFHI7ATALIBAhAQtBKyEQDMoBCyAAQQA2AhwgACAQNgIUIABBq5KAgAA2AhAgAEELNgIMQQAhEAziAQsgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDEEAIRAM4QELIABBADoALCAQIQEMvQELIBAhAUEBIRQCQAJAAkACQAJAIAAtACxBe2oOBAMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0EpIRAMxQELIABBADYCHCAAIAE2AhQgAEHwlICAADYCECAAQQM2AgxBACEQDN0BCwJAIA4tAABBDUcNACAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA5BAWohAQx1CyAAQSw2AhwgACABNgIMIAAgDkEBajYCFEEAIRAM3QELIAAtAC1BAXFFDQFBxAEhEAzDAQsCQCAOIAJHDQBBLSEQDNwBCwJAAkADQAJAIA4tAABBdmoOBAIAAAMACyAOQQFqIg4gAkcNAAtBLSEQDN0BCyAAKAIEIQEgAEEANgIEAkAgACABIA4QsYCAgAAiAQ0AIA4hAQx0CyAAQSw2AhwgACAONgIUIAAgATYCDEEAIRAM3AELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHMLIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzbAQsgACgCBCEEIABBADYCBCAAIAQgDhCxgICAACIEDaABIA4hAQzOAQsgEEEsRw0BIAFBAWohEEEBIQECQAJAAkACQAJAIAAtACxBe2oOBAMBAgQACyAQIQEMBAtBAiEBDAELQQQhAQsgAEEBOgAsIAAgAC8BMCABcjsBMCAQIQEMAQsgACAALwEwQQhyOwEwIBAhAQtBOSEQDL8BCyAAQQA6ACwgASEBC0E0IRAMvQELIAAgAC8BMEEgcjsBMCABIQEMAgsgACgCBCEEIABBADYCBAJAIAAgBCABELGAgIAAIgQNACABIQEMxwELIABBNzYCHCAAIAE2AhQgACAENgIMQQAhEAzUAQsgAEEIOgAsIAEhAQtBMCEQDLkBCwJAIAAtAChBAUYNACABIQEMBAsgAC0ALUEIcUUNkwEgASEBDAMLIAAtADBBIHENlAFBxQEhEAy3AQsCQCAPIAJGDQACQANAAkAgDy0AAEFQaiIBQf8BcUEKSQ0AIA8hAUE1IRAMugELIAApAyAiEUKZs+bMmbPmzBlWDQEgACARQgp+IhE3AyAgESABrUL/AYMiEkJ/hVYNASAAIBEgEnw3AyAgD0EBaiIPIAJHDQALQTkhEAzRAQsgACgCBCECIABBADYCBCAAIAIgD0EBaiIEELGAgIAAIgINlQEgBCEBDMMBC0E5IRAMzwELAkAgAC8BMCIBQQhxRQ0AIAAtAChBAUcNACAALQAtQQhxRQ2QAQsgACABQff7A3FBgARyOwEwIA8hAQtBNyEQDLQBCyAAIAAvATBBEHI7ATAMqwELIBBBFUYNiwEgAEEANgIcIAAgATYCFCAAQfCOgIAANgIQIABBHDYCDEEAIRAMywELIABBwwA2AhwgACABNgIMIAAgDUEBajYCFEEAIRAMygELAkAgAS0AAEE6Rw0AIAAoAgQhECAAQQA2AgQCQCAAIBAgARCvgICAACIQDQAgAUEBaiEBDGMLIABBwwA2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMygELIABBADYCHCAAIAE2AhQgAEGxkYCAADYCECAAQQo2AgxBACEQDMkBCyAAQQA2AhwgACABNgIUIABBoJmAgAA2AhAgAEEeNgIMQQAhEAzIAQsgAEEANgIACyAAQYASOwEqIAAgF0EBaiIBIAIQqICAgAAiEA0BIAEhAQtBxwAhEAysAQsgEEEVRw2DASAAQdEANgIcIAAgATYCFCAAQeOXgIAANgIQIABBFTYCDEEAIRAMxAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDF4LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMwwELIABBADYCHCAAIBQ2AhQgAEHBqICAADYCECAAQQc2AgwgAEEANgIAQQAhEAzCAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAzBAQtBACEQIABBADYCHCAAIAE2AhQgAEGAkYCAADYCECAAQQk2AgwMwAELIBBBFUYNfSAAQQA2AhwgACABNgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAy/AQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgAUEBaiEBAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBAJAIAAgECABEK2AgIAAIhANACABIQEMXAsgAEHYADYCHCAAIAE2AhQgACAQNgIMQQAhEAy+AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMrQELIABB2QA2AhwgACABNgIUIAAgBDYCDEEAIRAMvQELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKsBCyAAQdoANgIcIAAgATYCFCAAIAQ2AgxBACEQDLwBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQypAQsgAEHcADYCHCAAIAE2AhQgACAENgIMQQAhEAy7AQsCQCABLQAAQVBqIhBB/wFxQQpPDQAgACAQOgAqIAFBAWohAUHPACEQDKIBCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQynAQsgAEHeADYCHCAAIAE2AhQgACAENgIMQQAhEAy6AQsgAEEANgIAIBdBAWohAQJAIAAtAClBI08NACABIQEMWQsgAEEANgIcIAAgATYCFCAAQdOJgIAANgIQIABBCDYCDEEAIRAMuQELIABBADYCAAtBACEQIABBADYCHCAAIAE2AhQgAEGQs4CAADYCECAAQQg2AgwMtwELIABBADYCACAXQQFqIQECQCAALQApQSFHDQAgASEBDFYLIABBADYCHCAAIAE2AhQgAEGbioCAADYCECAAQQg2AgxBACEQDLYBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKSIQQV1qQQtPDQAgASEBDFULAkAgEEEGSw0AQQEgEHRBygBxRQ0AIAEhAQxVC0EAIRAgAEEANgIcIAAgATYCFCAAQfeJgIAANgIQIABBCDYCDAy1AQsgEEEVRg1xIABBADYCHCAAIAE2AhQgAEG5jYCAADYCECAAQRo2AgxBACEQDLQBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxUCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLMBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDLIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDLEBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxRCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDLABCyAAQQA2AhwgACABNgIUIABBxoqAgAA2AhAgAEEHNgIMQQAhEAyvAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAyuAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMSQsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAytAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMTQsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAysAQsgAEEANgIcIAAgATYCFCAAQdyIgIAANgIQIABBBzYCDEEAIRAMqwELIBBBP0cNASABQQFqIQELQQUhEAyQAQtBACEQIABBADYCHCAAIAE2AhQgAEH9koCAADYCECAAQQc2AgwMqAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMpwELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEILIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMpgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDEYLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMpQELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0gA2AhwgACAUNgIUIAAgATYCDEEAIRAMpAELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDD8LIABB0wA2AhwgACAUNgIUIAAgATYCDEEAIRAMowELIAAoAgQhASAAQQA2AgQCQCAAIAEgFBCngICAACIBDQAgFCEBDEMLIABB5QA2AhwgACAUNgIUIAAgATYCDEEAIRAMogELIABBADYCHCAAIBQ2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKEBCyAAQQA2AhwgACABNgIUIABBw4+AgAA2AhAgAEEHNgIMQQAhEAygAQtBACEQIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgwMnwELIABBADYCHCAAIBQ2AhQgAEGMnICAADYCECAAQQc2AgxBACEQDJ4BCyAAQQA2AhwgACAUNgIUIABB/pGAgAA2AhAgAEEHNgIMQQAhEAydAQsgAEEANgIcIAAgATYCFCAAQY6bgIAANgIQIABBBjYCDEEAIRAMnAELIBBBFUYNVyAAQQA2AhwgACABNgIUIABBzI6AgAA2AhAgAEEgNgIMQQAhEAybAQsgAEEANgIAIBBBAWohAUEkIRALIAAgEDoAKSAAKAIEIRAgAEEANgIEIAAgECABEKuAgIAAIhANVCABIQEMPgsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQfGbgIAANgIQIABBBjYCDAyXAQsgAUEVRg1QIABBADYCHCAAIAU2AhQgAEHwjICAADYCECAAQRs2AgxBACEQDJYBCyAAKAIEIQUgAEEANgIEIAAgBSAQEKmAgIAAIgUNASAQQQFqIQULQa0BIRAMewsgAEHBATYCHCAAIAU2AgwgACAQQQFqNgIUQQAhEAyTAQsgACgCBCEGIABBADYCBCAAIAYgEBCpgICAACIGDQEgEEEBaiEGC0GuASEQDHgLIABBwgE2AhwgACAGNgIMIAAgEEEBajYCFEEAIRAMkAELIABBADYCHCAAIAc2AhQgAEGXi4CAADYCECAAQQ02AgxBACEQDI8BCyAAQQA2AhwgACAINgIUIABB45CAgAA2AhAgAEEJNgIMQQAhEAyOAQsgAEEANgIcIAAgCDYCFCAAQZSNgIAANgIQIABBITYCDEEAIRAMjQELQQEhFkEAIRdBACEUQQEhEAsgACAQOgArIAlBAWohCAJAAkAgAC0ALUEQcQ0AAkACQAJAIAAtACoOAwEAAgQLIBZFDQMMAgsgFA0BDAILIBdFDQELIAAoAgQhECAAQQA2AgQgACAQIAgQrYCAgAAiEEUNPSAAQckBNgIcIAAgCDYCFCAAIBA2AgxBACEQDIwBCyAAKAIEIQQgAEEANgIEIAAgBCAIEK2AgIAAIgRFDXYgAEHKATYCHCAAIAg2AhQgACAENgIMQQAhEAyLAQsgACgCBCEEIABBADYCBCAAIAQgCRCtgICAACIERQ10IABBywE2AhwgACAJNgIUIAAgBDYCDEEAIRAMigELIAAoAgQhBCAAQQA2AgQgACAEIAoQrYCAgAAiBEUNciAAQc0BNgIcIAAgCjYCFCAAIAQ2AgxBACEQDIkBCwJAIAstAABBUGoiEEH/AXFBCk8NACAAIBA6ACogC0EBaiEKQbYBIRAMcAsgACgCBCEEIABBADYCBCAAIAQgCxCtgICAACIERQ1wIABBzwE2AhwgACALNgIUIAAgBDYCDEEAIRAMiAELIABBADYCHCAAIAQ2AhQgAEGQs4CAADYCECAAQQg2AgwgAEEANgIAQQAhEAyHAQsgAUEVRg0/IABBADYCHCAAIAw2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDIYBCyAAQYEEOwEoIAAoAgQhECAAQgA3AwAgACAQIAxBAWoiDBCrgICAACIQRQ04IABB0wE2AhwgACAMNgIUIAAgEDYCDEEAIRAMhQELIABBADYCAAtBACEQIABBADYCHCAAIAQ2AhQgAEHYm4CAADYCECAAQQg2AgwMgwELIAAoAgQhECAAQgA3AwAgACAQIAtBAWoiCxCrgICAACIQDQFBxgEhEAxpCyAAQQI6ACgMVQsgAEHVATYCHCAAIAs2AhQgACAQNgIMQQAhEAyAAQsgEEEVRg03IABBADYCHCAAIAQ2AhQgAEGkjICAADYCECAAQRA2AgxBACEQDH8LIAAtADRBAUcNNCAAIAQgAhC8gICAACIQRQ00IBBBFUcNNSAAQdwBNgIcIAAgBDYCFCAAQdWWgIAANgIQIABBFTYCDEEAIRAMfgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQMfQtBACEQDGMLQQIhEAxiC0ENIRAMYQtBDyEQDGALQSUhEAxfC0ETIRAMXgtBFSEQDF0LQRYhEAxcC0EXIRAMWwtBGCEQDFoLQRkhEAxZC0EaIRAMWAtBGyEQDFcLQRwhEAxWC0EdIRAMVQtBHyEQDFQLQSEhEAxTC0EjIRAMUgtBxgAhEAxRC0EuIRAMUAtBLyEQDE8LQTshEAxOC0E9IRAMTQtByAAhEAxMC0HJACEQDEsLQcsAIRAMSgtBzAAhEAxJC0HOACEQDEgLQdEAIRAMRwtB1QAhEAxGC0HYACEQDEULQdkAIRAMRAtB2wAhEAxDC0HkACEQDEILQeUAIRAMQQtB8QAhEAxAC0H0ACEQDD8LQY0BIRAMPgtBlwEhEAw9C0GpASEQDDwLQawBIRAMOwtBwAEhEAw6C0G5ASEQDDkLQa8BIRAMOAtBsQEhEAw3C0GyASEQDDYLQbQBIRAMNQtBtQEhEAw0C0G6ASEQDDMLQb0BIRAMMgtBvwEhEAwxC0HBASEQDDALIABBADYCHCAAIAQ2AhQgAEHpi4CAADYCECAAQR82AgxBACEQDEgLIABB2wE2AhwgACAENgIUIABB+paAgAA2AhAgAEEVNgIMQQAhEAxHCyAAQfgANgIcIAAgDDYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMRgsgAEHRADYCHCAAIAU2AhQgAEGwl4CAADYCECAAQRU2AgxBACEQDEULIABB+QA2AhwgACABNgIUIAAgEDYCDEEAIRAMRAsgAEH4ADYCHCAAIAE2AhQgAEHKmICAADYCECAAQRU2AgxBACEQDEMLIABB5AA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAxCCyAAQdcANgIcIAAgATYCFCAAQcmXgIAANgIQIABBFTYCDEEAIRAMQQsgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMQAsgAEHCADYCHCAAIAE2AhQgAEHjmICAADYCECAAQRU2AgxBACEQDD8LIABBADYCBCAAIA8gDxCxgICAACIERQ0BIABBOjYCHCAAIAQ2AgwgACAPQQFqNgIUQQAhEAw+CyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBEUNACAAQTs2AhwgACAENgIMIAAgAUEBajYCFEEAIRAMPgsgAUEBaiEBDC0LIA9BAWohAQwtCyAAQQA2AhwgACAPNgIUIABB5JKAgAA2AhAgAEEENgIMQQAhEAw7CyAAQTY2AhwgACAENgIUIAAgAjYCDEEAIRAMOgsgAEEuNgIcIAAgDjYCFCAAIAQ2AgxBACEQDDkLIABB0AA2AhwgACABNgIUIABBkZiAgAA2AhAgAEEVNgIMQQAhEAw4CyANQQFqIQEMLAsgAEEVNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMNgsgAEEbNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNQsgAEEPNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMNAsgAEELNgIcIAAgATYCFCAAQZGXgIAANgIQIABBFTYCDEEAIRAMMwsgAEEaNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMgsgAEELNgIcIAAgATYCFCAAQYKZgIAANgIQIABBFTYCDEEAIRAMMQsgAEEKNgIcIAAgATYCFCAAQeSWgIAANgIQIABBFTYCDEEAIRAMMAsgAEEeNgIcIAAgATYCFCAAQfmXgIAANgIQIABBFTYCDEEAIRAMLwsgAEEANgIcIAAgEDYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMLgsgAEEENgIcIAAgATYCFCAAQbCYgIAANgIQIABBFTYCDEEAIRAMLQsgAEEANgIAIAtBAWohCwtBuAEhEAwSCyAAQQA2AgAgEEEBaiEBQfUAIRAMEQsgASEBAkAgAC0AKUEFRw0AQeMAIRAMEQtB4gAhEAwQC0EAIRAgAEEANgIcIABB5JGAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAwoCyAAQQA2AgAgF0EBaiEBQcAAIRAMDgtBASEBCyAAIAE6ACwgAEEANgIAIBdBAWohAQtBKCEQDAsLIAEhAQtBOCEQDAkLAkAgASIPIAJGDQADQAJAIA8tAABBgL6AgABqLQAAIgFBAUYNACABQQJHDQMgD0EBaiEBDAQLIA9BAWoiDyACRw0AC0E+IRAMIgtBPiEQDCELIABBADoALCAPIQEMAQtBCyEQDAYLQTohEAwFCyABQQFqIQFBLSEQDAQLIAAgAToALCAAQQA2AgAgFkEBaiEBQQwhEAwDCyAAQQA2AgAgF0EBaiEBQQohEAwCCyAAQQA2AgALIABBADoALCANIQFBCSEQDAALC0EAIRAgAEEANgIcIAAgCzYCFCAAQc2QgIAANgIQIABBCTYCDAwXC0EAIRAgAEEANgIcIAAgCjYCFCAAQemKgIAANgIQIABBCTYCDAwWC0EAIRAgAEEANgIcIAAgCTYCFCAAQbeQgIAANgIQIABBCTYCDAwVC0EAIRAgAEEANgIcIAAgCDYCFCAAQZyRgIAANgIQIABBCTYCDAwUC0EAIRAgAEEANgIcIAAgATYCFCAAQc2QgIAANgIQIABBCTYCDAwTC0EAIRAgAEEANgIcIAAgATYCFCAAQemKgIAANgIQIABBCTYCDAwSC0EAIRAgAEEANgIcIAAgATYCFCAAQbeQgIAANgIQIABBCTYCDAwRC0EAIRAgAEEANgIcIAAgATYCFCAAQZyRgIAANgIQIABBCTYCDAwQC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwPC0EAIRAgAEEANgIcIAAgATYCFCAAQZeVgIAANgIQIABBDzYCDAwOC0EAIRAgAEEANgIcIAAgATYCFCAAQcCSgIAANgIQIABBCzYCDAwNC0EAIRAgAEEANgIcIAAgATYCFCAAQZWJgIAANgIQIABBCzYCDAwMC0EAIRAgAEEANgIcIAAgATYCFCAAQeGPgIAANgIQIABBCjYCDAwLC0EAIRAgAEEANgIcIAAgATYCFCAAQfuPgIAANgIQIABBCjYCDAwKC0EAIRAgAEEANgIcIAAgATYCFCAAQfGZgIAANgIQIABBAjYCDAwJC0EAIRAgAEEANgIcIAAgATYCFCAAQcSUgIAANgIQIABBAjYCDAwIC0EAIRAgAEEANgIcIAAgATYCFCAAQfKVgIAANgIQIABBAjYCDAwHCyAAQQI2AhwgACABNgIUIABBnJqAgAA2AhAgAEEWNgIMQQAhEAwGC0EBIRAMBQtB1AAhECABIgQgAkYNBCADQQhqIAAgBCACQdjCgIAAQQoQxYCAgAAgAygCDCEEIAMoAggOAwEEAgALEMqAgIAAAAsgAEEANgIcIABBtZqAgAA2AhAgAEEXNgIMIAAgBEEBajYCFEEAIRAMAgsgAEEANgIcIAAgBDYCFCAAQcqagIAANgIQIABBCTYCDEEAIRAMAQsCQCABIgQgAkcNAEEiIRAMAQsgAEGJgICAADYCCCAAIAQ2AgRBISEQCyADQRBqJICAgIAAIBALrwEBAn8gASgCACEGAkACQCACIANGDQAgBCAGaiEEIAYgA2ogAmshByACIAZBf3MgBWoiBmohBQNAAkAgAi0AACAELQAARg0AQQIhBAwDCwJAIAYNAEEAIQQgBSECDAMLIAZBf2ohBiAEQQFqIQQgAkEBaiICIANHDQALIAchBiADIQILIABBATYCACABIAY2AgAgACACNgIEDwsgAUEANgIAIAAgBDYCACAAIAI2AgQLCgAgABDHgICAAAvyNgELfyOAgICAAEEQayIBJICAgIAAAkBBACgCoNCAgAANAEEAEMuAgIAAQYDUhIAAayICQdkASQ0AQQAhAwJAQQAoAuDTgIAAIgQNAEEAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEIakFwcUHYqtWqBXMiBDYC4NOAgABBAEEANgL004CAAEEAQQA2AsTTgIAAC0EAIAI2AszTgIAAQQBBgNSEgAA2AsjTgIAAQQBBgNSEgAA2ApjQgIAAQQAgBDYCrNCAgABBAEF/NgKo0ICAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALQYDUhIAAQXhBgNSEgABrQQ9xQQBBgNSEgABBCGpBD3EbIgNqIgRBBGogAkFIaiIFIANrIgNBAXI2AgBBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAQYDUhIAAIAVqQTg2AgQLAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB7AFLDQACQEEAKAKI0ICAACIGQRAgAEETakFwcSAAQQtJGyICQQN2IgR2IgNBA3FFDQACQAJAIANBAXEgBHJBAXMiBUEDdCIEQbDQgIAAaiIDIARBuNCAgABqKAIAIgQoAggiAkcNAEEAIAZBfiAFd3E2AojQgIAADAELIAMgAjYCCCACIAM2AgwLIARBCGohAyAEIAVBA3QiBUEDcjYCBCAEIAVqIgQgBCgCBEEBcjYCBAwMCyACQQAoApDQgIAAIgdNDQECQCADRQ0AAkACQCADIAR0QQIgBHQiA0EAIANrcnEiA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqIgRBA3QiA0Gw0ICAAGoiBSADQbjQgIAAaigCACIDKAIIIgBHDQBBACAGQX4gBHdxIgY2AojQgIAADAELIAUgADYCCCAAIAU2AgwLIAMgAkEDcjYCBCADIARBA3QiBGogBCACayIFNgIAIAMgAmoiACAFQQFyNgIEAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQQCQAJAIAZBASAHQQN2dCIIcQ0AQQAgBiAIcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCAENgIMIAIgBDYCCCAEIAI2AgwgBCAINgIICyADQQhqIQNBACAANgKc0ICAAEEAIAU2ApDQgIAADAwLQQAoAozQgIAAIglFDQEgCUEAIAlrcUF/aiIDIANBDHZBEHEiA3YiBEEFdkEIcSIFIANyIAQgBXYiA0ECdkEEcSIEciADIAR2IgNBAXZBAnEiBHIgAyAEdiIDQQF2QQFxIgRyIAMgBHZqQQJ0QbjSgIAAaigCACIAKAIEQXhxIAJrIQQgACEFAkADQAJAIAUoAhAiAw0AIAVBFGooAgAiA0UNAgsgAygCBEF4cSACayIFIAQgBSAESSIFGyEEIAMgACAFGyEAIAMhBQwACwsgACgCGCEKAkAgACgCDCIIIABGDQAgACgCCCIDQQAoApjQgIAASRogCCADNgIIIAMgCDYCDAwLCwJAIABBFGoiBSgCACIDDQAgACgCECIDRQ0DIABBEGohBQsDQCAFIQsgAyIIQRRqIgUoAgAiAw0AIAhBEGohBSAIKAIQIgMNAAsgC0EANgIADAoLQX8hAiAAQb9/Sw0AIABBE2oiA0FwcSECQQAoAozQgIAAIgdFDQBBACELAkAgAkGAAkkNAEEfIQsgAkH///8HSw0AIANBCHYiAyADQYD+P2pBEHZBCHEiA3QiBCAEQYDgH2pBEHZBBHEiBHQiBSAFQYCAD2pBEHZBAnEiBXRBD3YgAyAEciAFcmsiA0EBdCACIANBFWp2QQFxckEcaiELC0EAIAJrIQQCQAJAAkACQCALQQJ0QbjSgIAAaigCACIFDQBBACEDQQAhCAwBC0EAIQMgAkEAQRkgC0EBdmsgC0EfRht0IQBBACEIA0ACQCAFKAIEQXhxIAJrIgYgBE8NACAGIQQgBSEIIAYNAEEAIQQgBSEIIAUhAwwDCyADIAVBFGooAgAiBiAGIAUgAEEddkEEcWpBEGooAgAiBUYbIAMgBhshAyAAQQF0IQAgBQ0ACwsCQCADIAhyDQBBACEIQQIgC3QiA0EAIANrciAHcSIDRQ0DIANBACADa3FBf2oiAyADQQx2QRBxIgN2IgVBBXZBCHEiACADciAFIAB2IgNBAnZBBHEiBXIgAyAFdiIDQQF2QQJxIgVyIAMgBXYiA0EBdkEBcSIFciADIAV2akECdEG40oCAAGooAgAhAwsgA0UNAQsDQCADKAIEQXhxIAJrIgYgBEkhAAJAIAMoAhAiBQ0AIANBFGooAgAhBQsgBiAEIAAbIQQgAyAIIAAbIQggBSEDIAUNAAsLIAhFDQAgBEEAKAKQ0ICAACACa08NACAIKAIYIQsCQCAIKAIMIgAgCEYNACAIKAIIIgNBACgCmNCAgABJGiAAIAM2AgggAyAANgIMDAkLAkAgCEEUaiIFKAIAIgMNACAIKAIQIgNFDQMgCEEQaiEFCwNAIAUhBiADIgBBFGoiBSgCACIDDQAgAEEQaiEFIAAoAhAiAw0ACyAGQQA2AgAMCAsCQEEAKAKQ0ICAACIDIAJJDQBBACgCnNCAgAAhBAJAAkAgAyACayIFQRBJDQAgBCACaiIAIAVBAXI2AgRBACAFNgKQ0ICAAEEAIAA2ApzQgIAAIAQgA2ogBTYCACAEIAJBA3I2AgQMAQsgBCADQQNyNgIEIAQgA2oiAyADKAIEQQFyNgIEQQBBADYCnNCAgABBAEEANgKQ0ICAAAsgBEEIaiEDDAoLAkBBACgClNCAgAAiACACTQ0AQQAoAqDQgIAAIgMgAmoiBCAAIAJrIgVBAXI2AgRBACAFNgKU0ICAAEEAIAQ2AqDQgIAAIAMgAkEDcjYCBCADQQhqIQMMCgsCQAJAQQAoAuDTgIAARQ0AQQAoAujTgIAAIQQMAQtBAEJ/NwLs04CAAEEAQoCAhICAgMAANwLk04CAAEEAIAFBDGpBcHFB2KrVqgVzNgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgABBgIAEIQQLQQAhAwJAIAQgAkHHAGoiB2oiBkEAIARrIgtxIgggAksNAEEAQTA2AvjTgIAADAoLAkBBACgCwNOAgAAiA0UNAAJAQQAoArjTgIAAIgQgCGoiBSAETQ0AIAUgA00NAQtBACEDQQBBMDYC+NOAgAAMCgtBAC0AxNOAgABBBHENBAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQAJAIAMoAgAiBSAESw0AIAUgAygCBGogBEsNAwsgAygCCCIDDQALC0EAEMuAgIAAIgBBf0YNBSAIIQYCQEEAKALk04CAACIDQX9qIgQgAHFFDQAgCCAAayAEIABqQQAgA2txaiEGCyAGIAJNDQUgBkH+////B0sNBQJAQQAoAsDTgIAAIgNFDQBBACgCuNOAgAAiBCAGaiIFIARNDQYgBSADSw0GCyAGEMuAgIAAIgMgAEcNAQwHCyAGIABrIAtxIgZB/v///wdLDQQgBhDLgICAACIAIAMoAgAgAygCBGpGDQMgACEDCwJAIANBf0YNACACQcgAaiAGTQ0AAkAgByAGa0EAKALo04CAACIEakEAIARrcSIEQf7///8HTQ0AIAMhAAwHCwJAIAQQy4CAgABBf0YNACAEIAZqIQYgAyEADAcLQQAgBmsQy4CAgAAaDAQLIAMhACADQX9HDQUMAwtBACEIDAcLQQAhAAwFCyAAQX9HDQILQQBBACgCxNOAgABBBHI2AsTTgIAACyAIQf7///8HSw0BIAgQy4CAgAAhAEEAEMuAgIAAIQMgAEF/Rg0BIANBf0YNASAAIANPDQEgAyAAayIGIAJBOGpNDQELQQBBACgCuNOAgAAgBmoiAzYCuNOAgAACQCADQQAoArzTgIAATQ0AQQAgAzYCvNOAgAALAkACQAJAAkBBACgCoNCAgAAiBEUNAEHI04CAACEDA0AgACADKAIAIgUgAygCBCIIakYNAiADKAIIIgMNAAwDCwsCQAJAQQAoApjQgIAAIgNFDQAgACADTw0BC0EAIAA2ApjQgIAAC0EAIQNBACAGNgLM04CAAEEAIAA2AsjTgIAAQQBBfzYCqNCAgABBAEEAKALg04CAADYCrNCAgABBAEEANgLU04CAAANAIANBxNCAgABqIANBuNCAgABqIgQ2AgAgBCADQbDQgIAAaiIFNgIAIANBvNCAgABqIAU2AgAgA0HM0ICAAGogA0HA0ICAAGoiBTYCACAFIAQ2AgAgA0HU0ICAAGogA0HI0ICAAGoiBDYCACAEIAU2AgAgA0HQ0ICAAGogBDYCACADQSBqIgNBgAJHDQALIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgQgBkFIaiIFIANrIgNBAXI2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAQ2AqDQgIAAIAAgBWpBODYCBAwCCyADLQAMQQhxDQAgBCAFSQ0AIAQgAE8NACAEQXggBGtBD3FBACAEQQhqQQ9xGyIFaiIAQQAoApTQgIAAIAZqIgsgBWsiBUEBcjYCBCADIAggBmo2AgRBAEEAKALw04CAADYCpNCAgABBACAFNgKU0ICAAEEAIAA2AqDQgIAAIAQgC2pBODYCBAwBCwJAIABBACgCmNCAgAAiCE8NAEEAIAA2ApjQgIAAIAAhCAsgACAGaiEFQcjTgIAAIQMCQAJAAkACQAJAAkACQANAIAMoAgAgBUYNASADKAIIIgMNAAwCCwsgAy0ADEEIcUUNAQtByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiIFIARLDQMLIAMoAgghAwwACwsgAyAANgIAIAMgAygCBCAGajYCBCAAQXggAGtBD3FBACAAQQhqQQ9xG2oiCyACQQNyNgIEIAVBeCAFa0EPcUEAIAVBCGpBD3EbaiIGIAsgAmoiAmshAwJAIAYgBEcNAEEAIAI2AqDQgIAAQQBBACgClNCAgAAgA2oiAzYClNCAgAAgAiADQQFyNgIEDAMLAkAgBkEAKAKc0ICAAEcNAEEAIAI2ApzQgIAAQQBBACgCkNCAgAAgA2oiAzYCkNCAgAAgAiADQQFyNgIEIAIgA2ogAzYCAAwDCwJAIAYoAgQiBEEDcUEBRw0AIARBeHEhBwJAAkAgBEH/AUsNACAGKAIIIgUgBEEDdiIIQQN0QbDQgIAAaiIARhoCQCAGKAIMIgQgBUcNAEEAQQAoAojQgIAAQX4gCHdxNgKI0ICAAAwCCyAEIABGGiAEIAU2AgggBSAENgIMDAELIAYoAhghCQJAAkAgBigCDCIAIAZGDQAgBigCCCIEIAhJGiAAIAQ2AgggBCAANgIMDAELAkAgBkEUaiIEKAIAIgUNACAGQRBqIgQoAgAiBQ0AQQAhAAwBCwNAIAQhCCAFIgBBFGoiBCgCACIFDQAgAEEQaiEEIAAoAhAiBQ0ACyAIQQA2AgALIAlFDQACQAJAIAYgBigCHCIFQQJ0QbjSgIAAaiIEKAIARw0AIAQgADYCACAADQFBAEEAKAKM0ICAAEF+IAV3cTYCjNCAgAAMAgsgCUEQQRQgCSgCECAGRhtqIAA2AgAgAEUNAQsgACAJNgIYAkAgBigCECIERQ0AIAAgBDYCECAEIAA2AhgLIAYoAhQiBEUNACAAQRRqIAQ2AgAgBCAANgIYCyAHIANqIQMgBiAHaiIGKAIEIQQLIAYgBEF+cTYCBCACIANqIAM2AgAgAiADQQFyNgIEAkAgA0H/AUsNACADQXhxQbDQgIAAaiEEAkACQEEAKAKI0ICAACIFQQEgA0EDdnQiA3ENAEEAIAUgA3I2AojQgIAAIAQhAwwBCyAEKAIIIQMLIAMgAjYCDCAEIAI2AgggAiAENgIMIAIgAzYCCAwDC0EfIQQCQCADQf///wdLDQAgA0EIdiIEIARBgP4/akEQdkEIcSIEdCIFIAVBgOAfakEQdkEEcSIFdCIAIABBgIAPakEQdkECcSIAdEEPdiAEIAVyIAByayIEQQF0IAMgBEEVanZBAXFyQRxqIQQLIAIgBDYCHCACQgA3AhAgBEECdEG40oCAAGohBQJAQQAoAozQgIAAIgBBASAEdCIIcQ0AIAUgAjYCAEEAIAAgCHI2AozQgIAAIAIgBTYCGCACIAI2AgggAiACNgIMDAMLIANBAEEZIARBAXZrIARBH0YbdCEEIAUoAgAhAANAIAAiBSgCBEF4cSADRg0CIARBHXYhACAEQQF0IQQgBSAAQQRxakEQaiIIKAIAIgANAAsgCCACNgIAIAIgBTYCGCACIAI2AgwgAiACNgIIDAILIABBeCAAa0EPcUEAIABBCGpBD3EbIgNqIgsgBkFIaiIIIANrIgNBAXI2AgQgACAIakE4NgIEIAQgBUE3IAVrQQ9xQQAgBUFJakEPcRtqQUFqIgggCCAEQRBqSRsiCEEjNgIEQQBBACgC8NOAgAA2AqTQgIAAQQAgAzYClNCAgABBACALNgKg0ICAACAIQRBqQQApAtDTgIAANwIAIAhBACkCyNOAgAA3AghBACAIQQhqNgLQ04CAAEEAIAY2AszTgIAAQQAgADYCyNOAgABBAEEANgLU04CAACAIQSRqIQMDQCADQQc2AgAgA0EEaiIDIAVJDQALIAggBEYNAyAIIAgoAgRBfnE2AgQgCCAIIARrIgA2AgAgBCAAQQFyNgIEAkAgAEH/AUsNACAAQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgAEEDdnQiAHENAEEAIAUgAHI2AojQgIAAIAMhBQwBCyADKAIIIQULIAUgBDYCDCADIAQ2AgggBCADNgIMIAQgBTYCCAwEC0EfIQMCQCAAQf///wdLDQAgAEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCIIIAhBgIAPakEQdkECcSIIdEEPdiADIAVyIAhyayIDQQF0IAAgA0EVanZBAXFyQRxqIQMLIAQgAzYCHCAEQgA3AhAgA0ECdEG40oCAAGohBQJAQQAoAozQgIAAIghBASADdCIGcQ0AIAUgBDYCAEEAIAggBnI2AozQgIAAIAQgBTYCGCAEIAQ2AgggBCAENgIMDAQLIABBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhCANAIAgiBSgCBEF4cSAARg0DIANBHXYhCCADQQF0IQMgBSAIQQRxakEQaiIGKAIAIggNAAsgBiAENgIAIAQgBTYCGCAEIAQ2AgwgBCAENgIIDAMLIAUoAggiAyACNgIMIAUgAjYCCCACQQA2AhggAiAFNgIMIAIgAzYCCAsgC0EIaiEDDAULIAUoAggiAyAENgIMIAUgBDYCCCAEQQA2AhggBCAFNgIMIAQgAzYCCAtBACgClNCAgAAiAyACTQ0AQQAoAqDQgIAAIgQgAmoiBSADIAJrIgNBAXI2AgRBACADNgKU0ICAAEEAIAU2AqDQgIAAIAQgAkEDcjYCBCAEQQhqIQMMAwtBACEDQQBBMDYC+NOAgAAMAgsCQCALRQ0AAkACQCAIIAgoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAA2AgAgAA0BQQAgB0F+IAV3cSIHNgKM0ICAAAwCCyALQRBBFCALKAIQIAhGG2ogADYCACAARQ0BCyAAIAs2AhgCQCAIKAIQIgNFDQAgACADNgIQIAMgADYCGAsgCEEUaigCACIDRQ0AIABBFGogAzYCACADIAA2AhgLAkACQCAEQQ9LDQAgCCAEIAJqIgNBA3I2AgQgCCADaiIDIAMoAgRBAXI2AgQMAQsgCCACaiIAIARBAXI2AgQgCCACQQNyNgIEIAAgBGogBDYCAAJAIARB/wFLDQAgBEF4cUGw0ICAAGohAwJAAkBBACgCiNCAgAAiBUEBIARBA3Z0IgRxDQBBACAFIARyNgKI0ICAACADIQQMAQsgAygCCCEECyAEIAA2AgwgAyAANgIIIAAgAzYCDCAAIAQ2AggMAQtBHyEDAkAgBEH///8HSw0AIARBCHYiAyADQYD+P2pBEHZBCHEiA3QiBSAFQYDgH2pBEHZBBHEiBXQiAiACQYCAD2pBEHZBAnEiAnRBD3YgAyAFciACcmsiA0EBdCAEIANBFWp2QQFxckEcaiEDCyAAIAM2AhwgAEIANwIQIANBAnRBuNKAgABqIQUCQCAHQQEgA3QiAnENACAFIAA2AgBBACAHIAJyNgKM0ICAACAAIAU2AhggACAANgIIIAAgADYCDAwBCyAEQQBBGSADQQF2ayADQR9GG3QhAyAFKAIAIQICQANAIAIiBSgCBEF4cSAERg0BIANBHXYhAiADQQF0IQMgBSACQQRxakEQaiIGKAIAIgINAAsgBiAANgIAIAAgBTYCGCAAIAA2AgwgACAANgIIDAELIAUoAggiAyAANgIMIAUgADYCCCAAQQA2AhggACAFNgIMIAAgAzYCCAsgCEEIaiEDDAELAkAgCkUNAAJAAkAgACAAKAIcIgVBAnRBuNKAgABqIgMoAgBHDQAgAyAINgIAIAgNAUEAIAlBfiAFd3E2AozQgIAADAILIApBEEEUIAooAhAgAEYbaiAINgIAIAhFDQELIAggCjYCGAJAIAAoAhAiA0UNACAIIAM2AhAgAyAINgIYCyAAQRRqKAIAIgNFDQAgCEEUaiADNgIAIAMgCDYCGAsCQAJAIARBD0sNACAAIAQgAmoiA0EDcjYCBCAAIANqIgMgAygCBEEBcjYCBAwBCyAAIAJqIgUgBEEBcjYCBCAAIAJBA3I2AgQgBSAEaiAENgIAAkAgB0UNACAHQXhxQbDQgIAAaiECQQAoApzQgIAAIQMCQAJAQQEgB0EDdnQiCCAGcQ0AQQAgCCAGcjYCiNCAgAAgAiEIDAELIAIoAgghCAsgCCADNgIMIAIgAzYCCCADIAI2AgwgAyAINgIIC0EAIAU2ApzQgIAAQQAgBDYCkNCAgAALIABBCGohAwsgAUEQaiSAgICAACADCwoAIAAQyYCAgAAL4g0BB38CQCAARQ0AIABBeGoiASAAQXxqKAIAIgJBeHEiAGohAwJAIAJBAXENACACQQNxRQ0BIAEgASgCACICayIBQQAoApjQgIAAIgRJDQEgAiAAaiEAAkAgAUEAKAKc0ICAAEYNAAJAIAJB/wFLDQAgASgCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgASgCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAwsgAiAGRhogAiAENgIIIAQgAjYCDAwCCyABKAIYIQcCQAJAIAEoAgwiBiABRg0AIAEoAggiAiAESRogBiACNgIIIAIgBjYCDAwBCwJAIAFBFGoiAigCACIEDQAgAUEQaiICKAIAIgQNAEEAIQYMAQsDQCACIQUgBCIGQRRqIgIoAgAiBA0AIAZBEGohAiAGKAIQIgQNAAsgBUEANgIACyAHRQ0BAkACQCABIAEoAhwiBEECdEG40oCAAGoiAigCAEcNACACIAY2AgAgBg0BQQBBACgCjNCAgABBfiAEd3E2AozQgIAADAMLIAdBEEEUIAcoAhAgAUYbaiAGNgIAIAZFDQILIAYgBzYCGAJAIAEoAhAiAkUNACAGIAI2AhAgAiAGNgIYCyABKAIUIgJFDQEgBkEUaiACNgIAIAIgBjYCGAwBCyADKAIEIgJBA3FBA0cNACADIAJBfnE2AgRBACAANgKQ0ICAACABIABqIAA2AgAgASAAQQFyNgIEDwsgASADTw0AIAMoAgQiAkEBcUUNAAJAAkAgAkECcQ0AAkAgA0EAKAKg0ICAAEcNAEEAIAE2AqDQgIAAQQBBACgClNCAgAAgAGoiADYClNCAgAAgASAAQQFyNgIEIAFBACgCnNCAgABHDQNBAEEANgKQ0ICAAEEAQQA2ApzQgIAADwsCQCADQQAoApzQgIAARw0AQQAgATYCnNCAgABBAEEAKAKQ0ICAACAAaiIANgKQ0ICAACABIABBAXI2AgQgASAAaiAANgIADwsgAkF4cSAAaiEAAkACQCACQf8BSw0AIAMoAggiBCACQQN2IgVBA3RBsNCAgABqIgZGGgJAIAMoAgwiAiAERw0AQQBBACgCiNCAgABBfiAFd3E2AojQgIAADAILIAIgBkYaIAIgBDYCCCAEIAI2AgwMAQsgAygCGCEHAkACQCADKAIMIgYgA0YNACADKAIIIgJBACgCmNCAgABJGiAGIAI2AgggAiAGNgIMDAELAkAgA0EUaiICKAIAIgQNACADQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQACQAJAIAMgAygCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAgsgB0EQQRQgBygCECADRhtqIAY2AgAgBkUNAQsgBiAHNgIYAkAgAygCECICRQ0AIAYgAjYCECACIAY2AhgLIAMoAhQiAkUNACAGQRRqIAI2AgAgAiAGNgIYCyABIABqIAA2AgAgASAAQQFyNgIEIAFBACgCnNCAgABHDQFBACAANgKQ0ICAAA8LIAMgAkF+cTYCBCABIABqIAA2AgAgASAAQQFyNgIECwJAIABB/wFLDQAgAEF4cUGw0ICAAGohAgJAAkBBACgCiNCAgAAiBEEBIABBA3Z0IgBxDQBBACAEIAByNgKI0ICAACACIQAMAQsgAigCCCEACyAAIAE2AgwgAiABNgIIIAEgAjYCDCABIAA2AggPC0EfIQICQCAAQf///wdLDQAgAEEIdiICIAJBgP4/akEQdkEIcSICdCIEIARBgOAfakEQdkEEcSIEdCIGIAZBgIAPakEQdkECcSIGdEEPdiACIARyIAZyayICQQF0IAAgAkEVanZBAXFyQRxqIQILIAEgAjYCHCABQgA3AhAgAkECdEG40oCAAGohBAJAAkBBACgCjNCAgAAiBkEBIAJ0IgNxDQAgBCABNgIAQQAgBiADcjYCjNCAgAAgASAENgIYIAEgATYCCCABIAE2AgwMAQsgAEEAQRkgAkEBdmsgAkEfRht0IQIgBCgCACEGAkADQCAGIgQoAgRBeHEgAEYNASACQR12IQYgAkEBdCECIAQgBkEEcWpBEGoiAygCACIGDQALIAMgATYCACABIAQ2AhggASABNgIMIAEgATYCCAwBCyAEKAIIIgAgATYCDCAEIAE2AgggAUEANgIYIAEgBDYCDCABIAA2AggLQQBBACgCqNCAgABBf2oiAUF/IAEbNgKo0ICAAAsLBAAAAAtOAAJAIAANAD8AQRB0DwsCQCAAQf//A3ENACAAQX9MDQACQCAAQRB2QAAiAEF/Rw0AQQBBMDYC+NOAgABBfw8LIABBEHQPCxDKgICAAAAL8gICA38BfgJAIAJFDQAgACABOgAAIAIgAGoiA0F/aiABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBfWogAToAACADQX5qIAE6AAAgAkEHSQ0AIAAgAToAAyADQXxqIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIFayICQSBJDQAgAa1CgYCAgBB+IQYgAyAFaiEBA0AgASAGNwMYIAEgBjcDECABIAY3AwggASAGNwMAIAFBIGohASACQWBqIgJBH0sNAAsLIAALC45IAQBBgAgLhkgBAAAAAgAAAAMAAAAAAAAAAAAAAAQAAAAFAAAAAAAAAAAAAAAGAAAABwAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEludmFsaWQgY2hhciBpbiB1cmwgcXVlcnkAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9ib2R5AENvbnRlbnQtTGVuZ3RoIG92ZXJmbG93AENodW5rIHNpemUgb3ZlcmZsb3cAUmVzcG9uc2Ugb3ZlcmZsb3cASW52YWxpZCBtZXRob2QgZm9yIEhUVFAveC54IHJlcXVlc3QASW52YWxpZCBtZXRob2QgZm9yIFJUU1AveC54IHJlcXVlc3QARXhwZWN0ZWQgU09VUkNFIG1ldGhvZCBmb3IgSUNFL3gueCByZXF1ZXN0AEludmFsaWQgY2hhciBpbiB1cmwgZnJhZ21lbnQgc3RhcnQARXhwZWN0ZWQgZG90AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fc3RhdHVzAEludmFsaWQgcmVzcG9uc2Ugc3RhdHVzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWVzc2FnZV9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX21ldGhvZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lYCBjYWxsYmFjayBlcnJvcgBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNlcnZlcgBJbnZhbGlkIGhlYWRlciB2YWx1ZSBjaGFyAEludmFsaWQgaGVhZGVyIGZpZWxkIGNoYXIAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl92ZXJzaW9uAEludmFsaWQgbWlub3IgdmVyc2lvbgBJbnZhbGlkIG1ham9yIHZlcnNpb24ARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgdmVyc2lvbgBFeHBlY3RlZCBDUkxGIGFmdGVyIHZlcnNpb24ASW52YWxpZCBIVFRQIHZlcnNpb24ASW52YWxpZCBoZWFkZXIgdG9rZW4AU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl91cmwASW52YWxpZCBjaGFyYWN0ZXJzIGluIHVybABVbmV4cGVjdGVkIHN0YXJ0IGNoYXIgaW4gdXJsAERvdWJsZSBAIGluIHVybABFbXB0eSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXJhY3RlciBpbiBDb250ZW50LUxlbmd0aABEdXBsaWNhdGUgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyIGluIHVybCBwYXRoAENvbnRlbnQtTGVuZ3RoIGNhbid0IGJlIHByZXNlbnQgd2l0aCBUcmFuc2Zlci1FbmNvZGluZwBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBzaXplAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX3ZhbHVlAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgdmFsdWUATWlzc2luZyBleHBlY3RlZCBMRiBhZnRlciBoZWFkZXIgdmFsdWUASW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIHF1b3RlIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fbmFtZQBJbnZhbGlkIGNoYXJhY3RlciBpbiBjaHVuayBleHRlbnNpb25zIG5hbWUAUGF1c2Ugb24gQ09OTkVDVC9VcGdyYWRlAFBhdXNlIG9uIFBSSS9VcGdyYWRlAEV4cGVjdGVkIEhUVFAvMiBDb25uZWN0aW9uIFByZWZhY2UAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9tZXRob2QARXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgbWV0aG9kAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25faGVhZGVyX2ZpZWxkAFBhdXNlZABJbnZhbGlkIHdvcmQgZW5jb3VudGVyZWQASW52YWxpZCBtZXRob2QgZW5jb3VudGVyZWQAVW5leHBlY3RlZCBjaGFyIGluIHVybCBzY2hlbWEAUmVxdWVzdCBoYXMgaW52YWxpZCBgVHJhbnNmZXItRW5jb2RpbmdgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX0NIVU5LX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX05BTUVfQ09NUExFVEUASFBFX0NCX01FU1NBR0VfQ09NUExFVEUASFBFX0NCX01FVEhPRF9DT01QTEVURQBIUEVfQ0JfSEVBREVSX0ZJRUxEX0NPTVBMRVRFAERFTEVURQBIUEVfSU5WQUxJRF9FT0ZfU1RBVEUASU5WQUxJRF9TU0xfQ0VSVElGSUNBVEUAUEFVU0UATk9fUkVTUE9OU0UAVU5TVVBQT1JURURfTUVESUFfVFlQRQBHT05FAE5PVF9BQ0NFUFRBQkxFAFNFUlZJQ0VfVU5BVkFJTEFCTEUAUkFOR0VfTk9UX1NBVElTRklBQkxFAE9SSUdJTl9JU19VTlJFQUNIQUJMRQBSRVNQT05TRV9JU19TVEFMRQBQVVJHRQBNRVJHRQBSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFAFJFUVVFU1RfSEVBREVSX1RPT19MQVJHRQBQQVlMT0FEX1RPT19MQVJHRQBJTlNVRkZJQ0lFTlRfU1RPUkFHRQBIUEVfUEFVU0VEX1VQR1JBREUASFBFX1BBVVNFRF9IMl9VUEdSQURFAFNPVVJDRQBBTk5PVU5DRQBUUkFDRQBIUEVfVU5FWFBFQ1RFRF9TUEFDRQBERVNDUklCRQBVTlNVQlNDUklCRQBSRUNPUkQASFBFX0lOVkFMSURfTUVUSE9EAE5PVF9GT1VORABQUk9QRklORABVTkJJTkQAUkVCSU5EAFVOQVVUSE9SSVpFRABNRVRIT0RfTk9UX0FMTE9XRUQASFRUUF9WRVJTSU9OX05PVF9TVVBQT1JURUQAQUxSRUFEWV9SRVBPUlRFRABBQ0NFUFRFRABOT1RfSU1QTEVNRU5URUQATE9PUF9ERVRFQ1RFRABIUEVfQ1JfRVhQRUNURUQASFBFX0xGX0VYUEVDVEVEAENSRUFURUQASU1fVVNFRABIUEVfUEFVU0VEAFRJTUVPVVRfT0NDVVJFRABQQVlNRU5UX1JFUVVJUkVEAFBSRUNPTkRJVElPTl9SRVFVSVJFRABQUk9YWV9BVVRIRU5USUNBVElPTl9SRVFVSVJFRABORVRXT1JLX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAExFTkdUSF9SRVFVSVJFRABTU0xfQ0VSVElGSUNBVEVfUkVRVUlSRUQAVVBHUkFERV9SRVFVSVJFRABQQUdFX0VYUElSRUQAUFJFQ09ORElUSU9OX0ZBSUxFRABFWFBFQ1RBVElPTl9GQUlMRUQAUkVWQUxJREFUSU9OX0ZBSUxFRABTU0xfSEFORFNIQUtFX0ZBSUxFRABMT0NLRUQAVFJBTlNGT1JNQVRJT05fQVBQTElFRABOT1RfTU9ESUZJRUQATk9UX0VYVEVOREVEAEJBTkRXSURUSF9MSU1JVF9FWENFRURFRABTSVRFX0lTX09WRVJMT0FERUQASEVBRABFeHBlY3RlZCBIVFRQLwAAXhMAACYTAAAwEAAA8BcAAJ0TAAAVEgAAORcAAPASAAAKEAAAdRIAAK0SAACCEwAATxQAAH8QAACgFQAAIxQAAIkSAACLFAAATRUAANQRAADPFAAAEBgAAMkWAADcFgAAwREAAOAXAAC7FAAAdBQAAHwVAADlFAAACBcAAB8QAABlFQAAoxQAACgVAAACFQAAmRUAACwQAACLGQAATw8AANQOAABqEAAAzhAAAAIXAACJDgAAbhMAABwTAABmFAAAVhcAAMETAADNEwAAbBMAAGgXAABmFwAAXxcAACITAADODwAAaQ4AANgOAABjFgAAyxMAAKoOAAAoFwAAJhcAAMUTAABdFgAA6BEAAGcTAABlEwAA8hYAAHMTAAAdFwAA+RYAAPMRAADPDgAAzhUAAAwSAACzEQAApREAAGEQAAAyFwAAuxMAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIDAgICAgIAAAICAAICAAICAgICAgICAgIABAAAAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAAICAgICAAACAgACAgACAgICAgICAgICAAMABAAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAbG9zZWVlcC1hbGl2ZQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBY2h1bmtlZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEAAAEBAAEBAAEBAQEBAQEBAQEAAAAAAAAAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AAAAAAAAAAAAAAAAAAAByYW5zZmVyLWVuY29kaW5ncGdyYWRlDQoNCg0KU00NCg0KVFRQL0NFL1RTUC8AAAAAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQIAAQMAAAAAAAAAAAAAAAAAAAAAAAAEAQEFAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAQAAAgAAAAAAAAAAAAAAAAAAAAAAAAMEAAAEBAQEBAQEBAQEBAUEBAQEBAQEBAQEBAQABAAGBwQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAABAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAIAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABOT1VOQ0VFQ0tPVVRORUNURVRFQ1JJQkVMVVNIRVRFQURTRUFSQ0hSR0VDVElWSVRZTEVOREFSVkVPVElGWVBUSU9OU0NIU0VBWVNUQVRDSEdFT1JESVJFQ1RPUlRSQ0hQQVJBTUVURVJVUkNFQlNDUklCRUFSRE9XTkFDRUlORE5LQ0tVQlNDUklCRUhUVFAvQURUUC8=' + + +/***/ }), + +/***/ 43315: +/***/ ((module) => { + +module.exports = 'AGFzbQEAAAABMAhgAX8Bf2ADf39/AX9gBH9/f38Bf2AAAGADf39/AGABfwBgAn9/AGAGf39/f39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQACA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAA0ZFAwMEAAAFAAAAAAAABQEFAAUFBQAABgAAAAAGBgYGAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAAABAQcAAAUFAwABBAUBcAESEgUDAQACBggBfwFBgNQECwfRBSIGbWVtb3J5AgALX2luaXRpYWxpemUACRlfX2luZGlyZWN0X2Z1bmN0aW9uX3RhYmxlAQALbGxodHRwX2luaXQAChhsbGh0dHBfc2hvdWxkX2tlZXBfYWxpdmUAQQxsbGh0dHBfYWxsb2MADAZtYWxsb2MARgtsbGh0dHBfZnJlZQANBGZyZWUASA9sbGh0dHBfZ2V0X3R5cGUADhVsbGh0dHBfZ2V0X2h0dHBfbWFqb3IADxVsbGh0dHBfZ2V0X2h0dHBfbWlub3IAEBFsbGh0dHBfZ2V0X21ldGhvZAARFmxsaHR0cF9nZXRfc3RhdHVzX2NvZGUAEhJsbGh0dHBfZ2V0X3VwZ3JhZGUAEwxsbGh0dHBfcmVzZXQAFA5sbGh0dHBfZXhlY3V0ZQAVFGxsaHR0cF9zZXR0aW5nc19pbml0ABYNbGxodHRwX2ZpbmlzaAAXDGxsaHR0cF9wYXVzZQAYDWxsaHR0cF9yZXN1bWUAGRtsbGh0dHBfcmVzdW1lX2FmdGVyX3VwZ3JhZGUAGhBsbGh0dHBfZ2V0X2Vycm5vABsXbGxodHRwX2dldF9lcnJvcl9yZWFzb24AHBdsbGh0dHBfc2V0X2Vycm9yX3JlYXNvbgAdFGxsaHR0cF9nZXRfZXJyb3JfcG9zAB4RbGxodHRwX2Vycm5vX25hbWUAHxJsbGh0dHBfbWV0aG9kX25hbWUAIBJsbGh0dHBfc3RhdHVzX25hbWUAIRpsbGh0dHBfc2V0X2xlbmllbnRfaGVhZGVycwAiIWxsaHR0cF9zZXRfbGVuaWVudF9jaHVua2VkX2xlbmd0aAAjHWxsaHR0cF9zZXRfbGVuaWVudF9rZWVwX2FsaXZlACQkbGxodHRwX3NldF9sZW5pZW50X3RyYW5zZmVyX2VuY29kaW5nACUYbGxodHRwX21lc3NhZ2VfbmVlZHNfZW9mAD8JFwEAQQELEQECAwQFCwYHNTk3MS8tJyspCrLgAkUCAAsIABCIgICAAAsZACAAEMKAgIAAGiAAIAI2AjggACABOgAoCxwAIAAgAC8BMiAALQAuIAAQwYCAgAAQgICAgAALKgEBf0HAABDGgICAACIBEMKAgIAAGiABQYCIgIAANgI4IAEgADoAKCABCwoAIAAQyICAgAALBwAgAC0AKAsHACAALQAqCwcAIAAtACsLBwAgAC0AKQsHACAALwEyCwcAIAAtAC4LRQEEfyAAKAIYIQEgAC0ALSECIAAtACghAyAAKAI4IQQgABDCgICAABogACAENgI4IAAgAzoAKCAAIAI6AC0gACABNgIYCxEAIAAgASABIAJqEMOAgIAACxAAIABBAEHcABDMgICAABoLZwEBf0EAIQECQCAAKAIMDQACQAJAAkACQCAALQAvDgMBAAMCCyAAKAI4IgFFDQAgASgCLCIBRQ0AIAAgARGAgICAAAAiAQ0DC0EADwsQyoCAgAAACyAAQcOWgIAANgIQQQ4hAQsgAQseAAJAIAAoAgwNACAAQdGbgIAANgIQIABBFTYCDAsLFgACQCAAKAIMQRVHDQAgAEEANgIMCwsWAAJAIAAoAgxBFkcNACAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsiAAJAIABBJEkNABDKgICAAAALIABBAnRBoLOAgABqKAIACyIAAkAgAEEuSQ0AEMqAgIAAAAsgAEECdEGwtICAAGooAgAL7gsBAX9B66iAgAAhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBnH9qDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0Hhp4CAAA8LQaShgIAADwtBy6yAgAAPC0H+sYCAAA8LQcCkgIAADwtBq6SAgAAPC0GNqICAAA8LQeKmgIAADwtBgLCAgAAPC0G5r4CAAA8LQdekgIAADwtB75+AgAAPC0Hhn4CAAA8LQfqfgIAADwtB8qCAgAAPC0Gor4CAAA8LQa6ygIAADwtBiLCAgAAPC0Hsp4CAAA8LQYKigIAADwtBjp2AgAAPC0HQroCAAA8LQcqjgIAADwtBxbKAgAAPC0HfnICAAA8LQdKcgIAADwtBxKCAgAAPC0HXoICAAA8LQaKfgIAADwtB7a6AgAAPC0GrsICAAA8LQdSlgIAADwtBzK6AgAAPC0H6roCAAA8LQfyrgIAADwtB0rCAgAAPC0HxnYCAAA8LQbuggIAADwtB96uAgAAPC0GQsYCAAA8LQdexgIAADwtBoq2AgAAPC0HUp4CAAA8LQeCrgIAADwtBn6yAgAAPC0HrsYCAAA8LQdWfgIAADwtByrGAgAAPC0HepYCAAA8LQdSegIAADwtB9JyAgAAPC0GnsoCAAA8LQbGdgIAADwtBoJ2AgAAPC0G5sYCAAA8LQbywgIAADwtBkqGAgAAPC0GzpoCAAA8LQemsgIAADwtBrJ6AgAAPC0HUq4CAAA8LQfemgIAADwtBgKaAgAAPC0GwoYCAAA8LQf6egIAADwtBjaOAgAAPC0GJrYCAAA8LQfeigIAADwtBoLGAgAAPC0Gun4CAAA8LQcalgIAADwtB6J6AgAAPC0GTooCAAA8LQcKvgIAADwtBw52AgAAPC0GLrICAAA8LQeGdgIAADwtBja+AgAAPC0HqoYCAAA8LQbStgIAADwtB0q+AgAAPC0HfsoCAAA8LQdKygIAADwtB8LCAgAAPC0GpooCAAA8LQfmjgIAADwtBmZ6AgAAPC0G1rICAAA8LQZuwgIAADwtBkrKAgAAPC0G2q4CAAA8LQcKigIAADwtB+LKAgAAPC0GepYCAAA8LQdCigIAADwtBup6AgAAPC0GBnoCAAA8LEMqAgIAAAAtB1qGAgAAhAQsgAQsWACAAIAAtAC1B/gFxIAFBAEdyOgAtCxkAIAAgAC0ALUH9AXEgAUEAR0EBdHI6AC0LGQAgACAALQAtQfsBcSABQQBHQQJ0cjoALQsZACAAIAAtAC1B9wFxIAFBAEdBA3RyOgAtCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAgAiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCBCIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQcaRgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIwIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAggiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2ioCAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCNCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIMIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZqAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAjgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCECIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZWQgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAI8IgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAhQiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEGqm4CAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCQCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIYIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABB7ZOAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCJCIERQ0AIAAgBBGAgICAAAAhAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIsIgRFDQAgACAEEYCAgIAAACEDCyADC0kBAn9BACEDAkAgACgCOCIERQ0AIAQoAigiBEUNACAAIAEgAiABayAEEYGAgIAAACIDQX9HDQAgAEH2iICAADYCEEEYIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCUCIERQ0AIAAgBBGAgICAAAAhAwsgAwtJAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAIcIgRFDQAgACABIAIgAWsgBBGBgICAAAAiA0F/Rw0AIABBwpmAgAA2AhBBGCEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAkgiBEUNACAAIAQRgICAgAAAIQMLIAMLSQECf0EAIQMCQCAAKAI4IgRFDQAgBCgCICIERQ0AIAAgASACIAFrIAQRgYCAgAAAIgNBf0cNACAAQZSUgIAANgIQQRghAwsgAwsuAQJ/QQAhAwJAIAAoAjgiBEUNACAEKAJMIgRFDQAgACAEEYCAgIAAACEDCyADCy4BAn9BACEDAkAgACgCOCIERQ0AIAQoAlQiBEUNACAAIAQRgICAgAAAIQMLIAMLLgECf0EAIQMCQCAAKAI4IgRFDQAgBCgCWCIERQ0AIAAgBBGAgICAAAAhAwsgAwtFAQF/AkACQCAALwEwQRRxQRRHDQBBASEDIAAtAChBAUYNASAALwEyQeUARiEDDAELIAAtAClBBUYhAwsgACADOgAuQQAL/gEBA39BASEDAkAgAC8BMCIEQQhxDQAgACkDIEIAUiEDCwJAAkAgAC0ALkUNAEEBIQUgAC0AKUEFRg0BQQEhBSAEQcAAcUUgA3FBAUcNAQtBACEFIARBwABxDQBBAiEFIARB//8DcSIDQQhxDQACQCADQYAEcUUNAAJAIAAtAChBAUcNACAALQAtQQpxDQBBBQ8LQQQPCwJAIANBIHENAAJAIAAtAChBAUYNACAALwEyQf//A3EiAEGcf2pB5ABJDQAgAEHMAUYNACAAQbACRg0AQQQhBSAEQShxRQ0CIANBiARxQYAERg0CC0EADwtBAEEDIAApAyBQGyEFCyAFC2IBAn9BACEBAkAgAC0AKEEBRg0AIAAvATJB//8DcSICQZx/akHkAEkNACACQcwBRg0AIAJBsAJGDQAgAC8BMCIAQcAAcQ0AQQEhASAAQYgEcUGABEYNACAAQShxRSEBCyABC6cBAQN/AkACQAJAIAAtACpFDQAgAC0AK0UNAEEAIQMgAC8BMCIEQQJxRQ0BDAILQQAhAyAALwEwIgRBAXFFDQELQQEhAyAALQAoQQFGDQAgAC8BMkH//wNxIgVBnH9qQeQASQ0AIAVBzAFGDQAgBUGwAkYNACAEQcAAcQ0AQQAhAyAEQYgEcUGABEYNACAEQShxQQBHIQMLIABBADsBMCAAQQA6AC8gAwuZAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQBBACEBIAAvATAiAkECcUUNAQwCC0EAIQEgAC8BMCICQQFxRQ0BC0EBIQEgAC0AKEEBRg0AIAAvATJB//8DcSIAQZx/akHkAEkNACAAQcwBRg0AIABBsAJGDQAgAkHAAHENAEEAIQEgAkGIBHFBgARGDQAgAkEocUEARyEBCyABC0kBAXsgAEEQav0MAAAAAAAAAAAAAAAAAAAAACIB/QsDACAAIAH9CwMAIABBMGogAf0LAwAgAEEgaiAB/QsDACAAQd0BNgIcQQALewEBfwJAIAAoAgwiAw0AAkAgACgCBEUNACAAIAE2AgQLAkAgACABIAIQxICAgAAiAw0AIAAoAgwPCyAAIAM2AhxBACEDIAAoAgQiAUUNACAAIAEgAiAAKAIIEYGAgIAAACIBRQ0AIAAgAjYCFCAAIAE2AgwgASEDCyADC+TzAQMOfwN+BH8jgICAgABBEGsiAySAgICAACABIQQgASEFIAEhBiABIQcgASEIIAEhCSABIQogASELIAEhDCABIQ0gASEOIAEhDwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAKAIcIhBBf2oO3QHaAQHZAQIDBAUGBwgJCgsMDQ7YAQ8Q1wEREtYBExQVFhcYGRob4AHfARwdHtUBHyAhIiMkJdQBJicoKSorLNMB0gEtLtEB0AEvMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUbbAUdISUrPAc4BS80BTMwBTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AcsBygG4AckBuQHIAboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBANwBC0EAIRAMxgELQQ4hEAzFAQtBDSEQDMQBC0EPIRAMwwELQRAhEAzCAQtBEyEQDMEBC0EUIRAMwAELQRUhEAy/AQtBFiEQDL4BC0EXIRAMvQELQRghEAy8AQtBGSEQDLsBC0EaIRAMugELQRshEAy5AQtBHCEQDLgBC0EIIRAMtwELQR0hEAy2AQtBICEQDLUBC0EfIRAMtAELQQchEAyzAQtBISEQDLIBC0EiIRAMsQELQR4hEAywAQtBIyEQDK8BC0ESIRAMrgELQREhEAytAQtBJCEQDKwBC0ElIRAMqwELQSYhEAyqAQtBJyEQDKkBC0HDASEQDKgBC0EpIRAMpwELQSshEAymAQtBLCEQDKUBC0EtIRAMpAELQS4hEAyjAQtBLyEQDKIBC0HEASEQDKEBC0EwIRAMoAELQTQhEAyfAQtBDCEQDJ4BC0ExIRAMnQELQTIhEAycAQtBMyEQDJsBC0E5IRAMmgELQTUhEAyZAQtBxQEhEAyYAQtBCyEQDJcBC0E6IRAMlgELQTYhEAyVAQtBCiEQDJQBC0E3IRAMkwELQTghEAySAQtBPCEQDJEBC0E7IRAMkAELQT0hEAyPAQtBCSEQDI4BC0EoIRAMjQELQT4hEAyMAQtBPyEQDIsBC0HAACEQDIoBC0HBACEQDIkBC0HCACEQDIgBC0HDACEQDIcBC0HEACEQDIYBC0HFACEQDIUBC0HGACEQDIQBC0EqIRAMgwELQccAIRAMggELQcgAIRAMgQELQckAIRAMgAELQcoAIRAMfwtBywAhEAx+C0HNACEQDH0LQcwAIRAMfAtBzgAhEAx7C0HPACEQDHoLQdAAIRAMeQtB0QAhEAx4C0HSACEQDHcLQdMAIRAMdgtB1AAhEAx1C0HWACEQDHQLQdUAIRAMcwtBBiEQDHILQdcAIRAMcQtBBSEQDHALQdgAIRAMbwtBBCEQDG4LQdkAIRAMbQtB2gAhEAxsC0HbACEQDGsLQdwAIRAMagtBAyEQDGkLQd0AIRAMaAtB3gAhEAxnC0HfACEQDGYLQeEAIRAMZQtB4AAhEAxkC0HiACEQDGMLQeMAIRAMYgtBAiEQDGELQeQAIRAMYAtB5QAhEAxfC0HmACEQDF4LQecAIRAMXQtB6AAhEAxcC0HpACEQDFsLQeoAIRAMWgtB6wAhEAxZC0HsACEQDFgLQe0AIRAMVwtB7gAhEAxWC0HvACEQDFULQfAAIRAMVAtB8QAhEAxTC0HyACEQDFILQfMAIRAMUQtB9AAhEAxQC0H1ACEQDE8LQfYAIRAMTgtB9wAhEAxNC0H4ACEQDEwLQfkAIRAMSwtB+gAhEAxKC0H7ACEQDEkLQfwAIRAMSAtB/QAhEAxHC0H+ACEQDEYLQf8AIRAMRQtBgAEhEAxEC0GBASEQDEMLQYIBIRAMQgtBgwEhEAxBC0GEASEQDEALQYUBIRAMPwtBhgEhEAw+C0GHASEQDD0LQYgBIRAMPAtBiQEhEAw7C0GKASEQDDoLQYsBIRAMOQtBjAEhEAw4C0GNASEQDDcLQY4BIRAMNgtBjwEhEAw1C0GQASEQDDQLQZEBIRAMMwtBkgEhEAwyC0GTASEQDDELQZQBIRAMMAtBlQEhEAwvC0GWASEQDC4LQZcBIRAMLQtBmAEhEAwsC0GZASEQDCsLQZoBIRAMKgtBmwEhEAwpC0GcASEQDCgLQZ0BIRAMJwtBngEhEAwmC0GfASEQDCULQaABIRAMJAtBoQEhEAwjC0GiASEQDCILQaMBIRAMIQtBpAEhEAwgC0GlASEQDB8LQaYBIRAMHgtBpwEhEAwdC0GoASEQDBwLQakBIRAMGwtBqgEhEAwaC0GrASEQDBkLQawBIRAMGAtBrQEhEAwXC0GuASEQDBYLQQEhEAwVC0GvASEQDBQLQbABIRAMEwtBsQEhEAwSC0GzASEQDBELQbIBIRAMEAtBtAEhEAwPC0G1ASEQDA4LQbYBIRAMDQtBtwEhEAwMC0G4ASEQDAsLQbkBIRAMCgtBugEhEAwJC0G7ASEQDAgLQcYBIRAMBwtBvAEhEAwGC0G9ASEQDAULQb4BIRAMBAtBvwEhEAwDC0HAASEQDAILQcIBIRAMAQtBwQEhEAsDQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAOxwEAAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB4fICEjJSg/QEFERUZHSElKS0xNT1BRUlPeA1dZW1xdYGJlZmdoaWprbG1vcHFyc3R1dnd4eXp7fH1+gAGCAYUBhgGHAYkBiwGMAY0BjgGPAZABkQGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNAc4BzwHQAdEB0gHTAdQB1QHWAdcB2AHZAdoB2wHcAd0B3gHgAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMBmQKkArAC/gL+AgsgASIEIAJHDfMBQd0BIRAM/wMLIAEiECACRw3dAUHDASEQDP4DCyABIgEgAkcNkAFB9wAhEAz9AwsgASIBIAJHDYYBQe8AIRAM/AMLIAEiASACRw1/QeoAIRAM+wMLIAEiASACRw17QegAIRAM+gMLIAEiASACRw14QeYAIRAM+QMLIAEiASACRw0aQRghEAz4AwsgASIBIAJHDRRBEiEQDPcDCyABIgEgAkcNWUHFACEQDPYDCyABIgEgAkcNSkE/IRAM9QMLIAEiASACRw1IQTwhEAz0AwsgASIBIAJHDUFBMSEQDPMDCyAALQAuQQFGDesDDIcCCyAAIAEiASACEMCAgIAAQQFHDeYBIABCADcDIAznAQsgACABIgEgAhC0gICAACIQDecBIAEhAQz1AgsCQCABIgEgAkcNAEEGIRAM8AMLIAAgAUEBaiIBIAIQu4CAgAAiEA3oASABIQEMMQsgAEIANwMgQRIhEAzVAwsgASIQIAJHDStBHSEQDO0DCwJAIAEiASACRg0AIAFBAWohAUEQIRAM1AMLQQchEAzsAwsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3lAUEIIRAM6wMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQRQhEAzSAwtBCSEQDOoDCyABIQEgACkDIFAN5AEgASEBDPICCwJAIAEiASACRw0AQQshEAzpAwsgACABQQFqIgEgAhC2gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeUBIAEhAQzyAgsgACABIgEgAhC4gICAACIQDeYBIAEhAQwNCyAAIAEiASACELqAgIAAIhAN5wEgASEBDPACCwJAIAEiASACRw0AQQ8hEAzlAwsgAS0AACIQQTtGDQggEEENRw3oASABQQFqIQEM7wILIAAgASIBIAIQuoCAgAAiEA3oASABIQEM8gILA0ACQCABLQAAQfC1gIAAai0AACIQQQFGDQAgEEECRw3rASAAKAIEIRAgAEEANgIEIAAgECABQQFqIgEQuYCAgAAiEA3qASABIQEM9AILIAFBAWoiASACRw0AC0ESIRAM4gMLIAAgASIBIAIQuoCAgAAiEA3pASABIQEMCgsgASIBIAJHDQZBGyEQDOADCwJAIAEiASACRw0AQRYhEAzgAwsgAEGKgICAADYCCCAAIAE2AgQgACABIAIQuICAgAAiEA3qASABIQFBICEQDMYDCwJAIAEiASACRg0AA0ACQCABLQAAQfC3gIAAai0AACIQQQJGDQACQCAQQX9qDgTlAewBAOsB7AELIAFBAWohAUEIIRAMyAMLIAFBAWoiASACRw0AC0EVIRAM3wMLQRUhEAzeAwsDQAJAIAEtAABB8LmAgABqLQAAIhBBAkYNACAQQX9qDgTeAewB4AHrAewBCyABQQFqIgEgAkcNAAtBGCEQDN0DCwJAIAEiASACRg0AIABBi4CAgAA2AgggACABNgIEIAEhAUEHIRAMxAMLQRkhEAzcAwsgAUEBaiEBDAILAkAgASIUIAJHDQBBGiEQDNsDCyAUIQECQCAULQAAQXNqDhTdAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAu4C7gLuAgDuAgtBACEQIABBADYCHCAAQa+LgIAANgIQIABBAjYCDCAAIBRBAWo2AhQM2gMLAkAgAS0AACIQQTtGDQAgEEENRw3oASABQQFqIQEM5QILIAFBAWohAQtBIiEQDL8DCwJAIAEiECACRw0AQRwhEAzYAwtCACERIBAhASAQLQAAQVBqDjfnAeYBAQIDBAUGBwgAAAAAAAAACQoLDA0OAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPEBESExQAC0EeIRAMvQMLQgIhEQzlAQtCAyERDOQBC0IEIREM4wELQgUhEQziAQtCBiERDOEBC0IHIREM4AELQgghEQzfAQtCCSERDN4BC0IKIREM3QELQgshEQzcAQtCDCERDNsBC0INIREM2gELQg4hEQzZAQtCDyERDNgBC0IKIREM1wELQgshEQzWAQtCDCERDNUBC0INIREM1AELQg4hEQzTAQtCDyERDNIBC0IAIRECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIBAtAABBUGoON+UB5AEAAQIDBAUGB+YB5gHmAeYB5gHmAeYBCAkKCwwN5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAeYB5gHmAQ4PEBESE+YBC0ICIREM5AELQgMhEQzjAQtCBCERDOIBC0IFIREM4QELQgYhEQzgAQtCByERDN8BC0IIIREM3gELQgkhEQzdAQtCCiERDNwBC0ILIREM2wELQgwhEQzaAQtCDSERDNkBC0IOIREM2AELQg8hEQzXAQtCCiERDNYBC0ILIREM1QELQgwhEQzUAQtCDSERDNMBC0IOIREM0gELQg8hEQzRAQsgAEIAIAApAyAiESACIAEiEGutIhJ9IhMgEyARVhs3AyAgESASViIURQ3SAUEfIRAMwAMLAkAgASIBIAJGDQAgAEGJgICAADYCCCAAIAE2AgQgASEBQSQhEAynAwtBICEQDL8DCyAAIAEiECACEL6AgIAAQX9qDgW2AQDFAgHRAdIBC0ERIRAMpAMLIABBAToALyAQIQEMuwMLIAEiASACRw3SAUEkIRAMuwMLIAEiDSACRw0eQcYAIRAMugMLIAAgASIBIAIQsoCAgAAiEA3UASABIQEMtQELIAEiECACRw0mQdAAIRAMuAMLAkAgASIBIAJHDQBBKCEQDLgDCyAAQQA2AgQgAEGMgICAADYCCCAAIAEgARCxgICAACIQDdMBIAEhAQzYAQsCQCABIhAgAkcNAEEpIRAMtwMLIBAtAAAiAUEgRg0UIAFBCUcN0wEgEEEBaiEBDBULAkAgASIBIAJGDQAgAUEBaiEBDBcLQSohEAy1AwsCQCABIhAgAkcNAEErIRAMtQMLAkAgEC0AACIBQQlGDQAgAUEgRw3VAQsgAC0ALEEIRg3TASAQIQEMkQMLAkAgASIBIAJHDQBBLCEQDLQDCyABLQAAQQpHDdUBIAFBAWohAQzJAgsgASIOIAJHDdUBQS8hEAyyAwsDQAJAIAEtAAAiEEEgRg0AAkAgEEF2ag4EANwB3AEA2gELIAEhAQzgAQsgAUEBaiIBIAJHDQALQTEhEAyxAwtBMiEQIAEiFCACRg2wAyACIBRrIAAoAgAiAWohFSAUIAFrQQNqIRYCQANAIBQtAAAiF0EgciAXIBdBv39qQf8BcUEaSRtB/wFxIAFB8LuAgABqLQAARw0BAkAgAUEDRw0AQQYhAQyWAwsgAUEBaiEBIBRBAWoiFCACRw0ACyAAIBU2AgAMsQMLIABBADYCACAUIQEM2QELQTMhECABIhQgAkYNrwMgAiAUayAAKAIAIgFqIRUgFCABa0EIaiEWAkADQCAULQAAIhdBIHIgFyAXQb9/akH/AXFBGkkbQf8BcSABQfS7gIAAai0AAEcNAQJAIAFBCEcNAEEFIQEMlQMLIAFBAWohASAUQQFqIhQgAkcNAAsgACAVNgIADLADCyAAQQA2AgAgFCEBDNgBC0E0IRAgASIUIAJGDa4DIAIgFGsgACgCACIBaiEVIBQgAWtBBWohFgJAA0AgFC0AACIXQSByIBcgF0G/f2pB/wFxQRpJG0H/AXEgAUHQwoCAAGotAABHDQECQCABQQVHDQBBByEBDJQDCyABQQFqIQEgFEEBaiIUIAJHDQALIAAgFTYCAAyvAwsgAEEANgIAIBQhAQzXAQsCQCABIgEgAkYNAANAAkAgAS0AAEGAvoCAAGotAAAiEEEBRg0AIBBBAkYNCiABIQEM3QELIAFBAWoiASACRw0AC0EwIRAMrgMLQTAhEAytAwsCQCABIgEgAkYNAANAAkAgAS0AACIQQSBGDQAgEEF2ag4E2QHaAdoB2QHaAQsgAUEBaiIBIAJHDQALQTghEAytAwtBOCEQDKwDCwNAAkAgAS0AACIQQSBGDQAgEEEJRw0DCyABQQFqIgEgAkcNAAtBPCEQDKsDCwNAAkAgAS0AACIQQSBGDQACQAJAIBBBdmoOBNoBAQHaAQALIBBBLEYN2wELIAEhAQwECyABQQFqIgEgAkcNAAtBPyEQDKoDCyABIQEM2wELQcAAIRAgASIUIAJGDagDIAIgFGsgACgCACIBaiEWIBQgAWtBBmohFwJAA0AgFC0AAEEgciABQYDAgIAAai0AAEcNASABQQZGDY4DIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADKkDCyAAQQA2AgAgFCEBC0E2IRAMjgMLAkAgASIPIAJHDQBBwQAhEAynAwsgAEGMgICAADYCCCAAIA82AgQgDyEBIAAtACxBf2oOBM0B1QHXAdkBhwMLIAFBAWohAQzMAQsCQCABIgEgAkYNAANAAkAgAS0AACIQQSByIBAgEEG/f2pB/wFxQRpJG0H/AXEiEEEJRg0AIBBBIEYNAAJAAkACQAJAIBBBnX9qDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTEhEAyRAwsgAUEBaiEBQTIhEAyQAwsgAUEBaiEBQTMhEAyPAwsgASEBDNABCyABQQFqIgEgAkcNAAtBNSEQDKUDC0E1IRAMpAMLAkAgASIBIAJGDQADQAJAIAEtAABBgLyAgABqLQAAQQFGDQAgASEBDNMBCyABQQFqIgEgAkcNAAtBPSEQDKQDC0E9IRAMowMLIAAgASIBIAIQsICAgAAiEA3WASABIQEMAQsgEEEBaiEBC0E8IRAMhwMLAkAgASIBIAJHDQBBwgAhEAygAwsCQANAAkAgAS0AAEF3ag4YAAL+Av4ChAP+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gL+Av4C/gIA/gILIAFBAWoiASACRw0AC0HCACEQDKADCyABQQFqIQEgAC0ALUEBcUUNvQEgASEBC0EsIRAMhQMLIAEiASACRw3TAUHEACEQDJ0DCwNAAkAgAS0AAEGQwICAAGotAABBAUYNACABIQEMtwILIAFBAWoiASACRw0AC0HFACEQDJwDCyANLQAAIhBBIEYNswEgEEE6Rw2BAyAAKAIEIQEgAEEANgIEIAAgASANEK+AgIAAIgEN0AEgDUEBaiEBDLMCC0HHACEQIAEiDSACRg2aAyACIA1rIAAoAgAiAWohFiANIAFrQQVqIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQZDCgIAAai0AAEcNgAMgAUEFRg30AiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyaAwtByAAhECABIg0gAkYNmQMgAiANayAAKAIAIgFqIRYgDSABa0EJaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUGWwoCAAGotAABHDf8CAkAgAUEJRw0AQQIhAQz1AgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMmQMLAkAgASINIAJHDQBByQAhEAyZAwsCQAJAIA0tAAAiAUEgciABIAFBv39qQf8BcUEaSRtB/wFxQZJ/ag4HAIADgAOAA4ADgAMBgAMLIA1BAWohAUE+IRAMgAMLIA1BAWohAUE/IRAM/wILQcoAIRAgASINIAJGDZcDIAIgDWsgACgCACIBaiEWIA0gAWtBAWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFBoMKAgABqLQAARw39AiABQQFGDfACIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJcDC0HLACEQIAEiDSACRg2WAyACIA1rIAAoAgAiAWohFiANIAFrQQ5qIRcDQCANLQAAIhRBIHIgFCAUQb9/akH/AXFBGkkbQf8BcSABQaLCgIAAai0AAEcN/AIgAUEORg3wAiABQQFqIQEgDUEBaiINIAJHDQALIAAgFjYCAAyWAwtBzAAhECABIg0gAkYNlQMgAiANayAAKAIAIgFqIRYgDSABa0EPaiEXA0AgDS0AACIUQSByIBQgFEG/f2pB/wFxQRpJG0H/AXEgAUHAwoCAAGotAABHDfsCAkAgAUEPRw0AQQMhAQzxAgsgAUEBaiEBIA1BAWoiDSACRw0ACyAAIBY2AgAMlQMLQc0AIRAgASINIAJGDZQDIAIgDWsgACgCACIBaiEWIA0gAWtBBWohFwNAIA0tAAAiFEEgciAUIBRBv39qQf8BcUEaSRtB/wFxIAFB0MKAgABqLQAARw36AgJAIAFBBUcNAEEEIQEM8AILIAFBAWohASANQQFqIg0gAkcNAAsgACAWNgIADJQDCwJAIAEiDSACRw0AQc4AIRAMlAMLAkACQAJAAkAgDS0AACIBQSByIAEgAUG/f2pB/wFxQRpJG0H/AXFBnX9qDhMA/QL9Av0C/QL9Av0C/QL9Av0C/QL9Av0CAf0C/QL9AgID/QILIA1BAWohAUHBACEQDP0CCyANQQFqIQFBwgAhEAz8AgsgDUEBaiEBQcMAIRAM+wILIA1BAWohAUHEACEQDPoCCwJAIAEiASACRg0AIABBjYCAgAA2AgggACABNgIEIAEhAUHFACEQDPoCC0HPACEQDJIDCyAQIQECQAJAIBAtAABBdmoOBAGoAqgCAKgCCyAQQQFqIQELQSchEAz4AgsCQCABIgEgAkcNAEHRACEQDJEDCwJAIAEtAABBIEYNACABIQEMjQELIAFBAWohASAALQAtQQFxRQ3HASABIQEMjAELIAEiFyACRw3IAUHSACEQDI8DC0HTACEQIAEiFCACRg2OAyACIBRrIAAoAgAiAWohFiAUIAFrQQFqIRcDQCAULQAAIAFB1sKAgABqLQAARw3MASABQQFGDccBIAFBAWohASAUQQFqIhQgAkcNAAsgACAWNgIADI4DCwJAIAEiASACRw0AQdUAIRAMjgMLIAEtAABBCkcNzAEgAUEBaiEBDMcBCwJAIAEiASACRw0AQdYAIRAMjQMLAkACQCABLQAAQXZqDgQAzQHNAQHNAQsgAUEBaiEBDMcBCyABQQFqIQFBygAhEAzzAgsgACABIgEgAhCugICAACIQDcsBIAEhAUHNACEQDPICCyAALQApQSJGDYUDDKYCCwJAIAEiASACRw0AQdsAIRAMigMLQQAhFEEBIRdBASEWQQAhEAJAAkACQAJAAkACQAJAAkACQCABLQAAQVBqDgrUAdMBAAECAwQFBgjVAQtBAiEQDAYLQQMhEAwFC0EEIRAMBAtBBSEQDAMLQQYhEAwCC0EHIRAMAQtBCCEQC0EAIRdBACEWQQAhFAzMAQtBCSEQQQEhFEEAIRdBACEWDMsBCwJAIAEiASACRw0AQd0AIRAMiQMLIAEtAABBLkcNzAEgAUEBaiEBDKYCCyABIgEgAkcNzAFB3wAhEAyHAwsCQCABIgEgAkYNACAAQY6AgIAANgIIIAAgATYCBCABIQFB0AAhEAzuAgtB4AAhEAyGAwtB4QAhECABIgEgAkYNhQMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQeLCgIAAai0AAEcNzQEgFEEDRg3MASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyFAwtB4gAhECABIgEgAkYNhAMgAiABayAAKAIAIhRqIRYgASAUa0ECaiEXA0AgAS0AACAUQebCgIAAai0AAEcNzAEgFEECRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyEAwtB4wAhECABIgEgAkYNgwMgAiABayAAKAIAIhRqIRYgASAUa0EDaiEXA0AgAS0AACAUQenCgIAAai0AAEcNywEgFEEDRg3OASAUQQFqIRQgAUEBaiIBIAJHDQALIAAgFjYCAAyDAwsCQCABIgEgAkcNAEHlACEQDIMDCyAAIAFBAWoiASACEKiAgIAAIhANzQEgASEBQdYAIRAM6QILAkAgASIBIAJGDQADQAJAIAEtAAAiEEEgRg0AAkACQAJAIBBBuH9qDgsAAc8BzwHPAc8BzwHPAc8BzwECzwELIAFBAWohAUHSACEQDO0CCyABQQFqIQFB0wAhEAzsAgsgAUEBaiEBQdQAIRAM6wILIAFBAWoiASACRw0AC0HkACEQDIIDC0HkACEQDIEDCwNAAkAgAS0AAEHwwoCAAGotAAAiEEEBRg0AIBBBfmoOA88B0AHRAdIBCyABQQFqIgEgAkcNAAtB5gAhEAyAAwsCQCABIgEgAkYNACABQQFqIQEMAwtB5wAhEAz/AgsDQAJAIAEtAABB8MSAgABqLQAAIhBBAUYNAAJAIBBBfmoOBNIB0wHUAQDVAQsgASEBQdcAIRAM5wILIAFBAWoiASACRw0AC0HoACEQDP4CCwJAIAEiASACRw0AQekAIRAM/gILAkAgAS0AACIQQXZqDhq6AdUB1QG8AdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAdUB1QHVAcoB1QHVAQDTAQsgAUEBaiEBC0EGIRAM4wILA0ACQCABLQAAQfDGgIAAai0AAEEBRg0AIAEhAQyeAgsgAUEBaiIBIAJHDQALQeoAIRAM+wILAkAgASIBIAJGDQAgAUEBaiEBDAMLQesAIRAM+gILAkAgASIBIAJHDQBB7AAhEAz6AgsgAUEBaiEBDAELAkAgASIBIAJHDQBB7QAhEAz5AgsgAUEBaiEBC0EEIRAM3gILAkAgASIUIAJHDQBB7gAhEAz3AgsgFCEBAkACQAJAIBQtAABB8MiAgABqLQAAQX9qDgfUAdUB1gEAnAIBAtcBCyAUQQFqIQEMCgsgFEEBaiEBDM0BC0EAIRAgAEEANgIcIABBm5KAgAA2AhAgAEEHNgIMIAAgFEEBajYCFAz2AgsCQANAAkAgAS0AAEHwyICAAGotAAAiEEEERg0AAkACQCAQQX9qDgfSAdMB1AHZAQAEAdkBCyABIQFB2gAhEAzgAgsgAUEBaiEBQdwAIRAM3wILIAFBAWoiASACRw0AC0HvACEQDPYCCyABQQFqIQEMywELAkAgASIUIAJHDQBB8AAhEAz1AgsgFC0AAEEvRw3UASAUQQFqIQEMBgsCQCABIhQgAkcNAEHxACEQDPQCCwJAIBQtAAAiAUEvRw0AIBRBAWohAUHdACEQDNsCCyABQXZqIgRBFksN0wFBASAEdEGJgIACcUUN0wEMygILAkAgASIBIAJGDQAgAUEBaiEBQd4AIRAM2gILQfIAIRAM8gILAkAgASIUIAJHDQBB9AAhEAzyAgsgFCEBAkAgFC0AAEHwzICAAGotAABBf2oOA8kClAIA1AELQeEAIRAM2AILAkAgASIUIAJGDQADQAJAIBQtAABB8MqAgABqLQAAIgFBA0YNAAJAIAFBf2oOAssCANUBCyAUIQFB3wAhEAzaAgsgFEEBaiIUIAJHDQALQfMAIRAM8QILQfMAIRAM8AILAkAgASIBIAJGDQAgAEGPgICAADYCCCAAIAE2AgQgASEBQeAAIRAM1wILQfUAIRAM7wILAkAgASIBIAJHDQBB9gAhEAzvAgsgAEGPgICAADYCCCAAIAE2AgQgASEBC0EDIRAM1AILA0AgAS0AAEEgRw3DAiABQQFqIgEgAkcNAAtB9wAhEAzsAgsCQCABIgEgAkcNAEH4ACEQDOwCCyABLQAAQSBHDc4BIAFBAWohAQzvAQsgACABIgEgAhCsgICAACIQDc4BIAEhAQyOAgsCQCABIgQgAkcNAEH6ACEQDOoCCyAELQAAQcwARw3RASAEQQFqIQFBEyEQDM8BCwJAIAEiBCACRw0AQfsAIRAM6QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEANAIAQtAAAgAUHwzoCAAGotAABHDdABIAFBBUYNzgEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBB+wAhEAzoAgsCQCABIgQgAkcNAEH8ACEQDOgCCwJAAkAgBC0AAEG9f2oODADRAdEB0QHRAdEB0QHRAdEB0QHRAQHRAQsgBEEBaiEBQeYAIRAMzwILIARBAWohAUHnACEQDM4CCwJAIAEiBCACRw0AQf0AIRAM5wILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNzwEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf0AIRAM5wILIABBADYCACAQQQFqIQFBECEQDMwBCwJAIAEiBCACRw0AQf4AIRAM5gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQfbOgIAAai0AAEcNzgEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf4AIRAM5gILIABBADYCACAQQQFqIQFBFiEQDMsBCwJAIAEiBCACRw0AQf8AIRAM5QILIAIgBGsgACgCACIBaiEUIAQgAWtBA2ohEAJAA0AgBC0AACABQfzOgIAAai0AAEcNzQEgAUEDRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQf8AIRAM5QILIABBADYCACAQQQFqIQFBBSEQDMoBCwJAIAEiBCACRw0AQYABIRAM5AILIAQtAABB2QBHDcsBIARBAWohAUEIIRAMyQELAkAgASIEIAJHDQBBgQEhEAzjAgsCQAJAIAQtAABBsn9qDgMAzAEBzAELIARBAWohAUHrACEQDMoCCyAEQQFqIQFB7AAhEAzJAgsCQCABIgQgAkcNAEGCASEQDOICCwJAAkAgBC0AAEG4f2oOCADLAcsBywHLAcsBywEBywELIARBAWohAUHqACEQDMkCCyAEQQFqIQFB7QAhEAzIAgsCQCABIgQgAkcNAEGDASEQDOECCyACIARrIAAoAgAiAWohECAEIAFrQQJqIRQCQANAIAQtAAAgAUGAz4CAAGotAABHDckBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgEDYCAEGDASEQDOECC0EAIRAgAEEANgIAIBRBAWohAQzGAQsCQCABIgQgAkcNAEGEASEQDOACCyACIARrIAAoAgAiAWohFCAEIAFrQQRqIRACQANAIAQtAAAgAUGDz4CAAGotAABHDcgBIAFBBEYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGEASEQDOACCyAAQQA2AgAgEEEBaiEBQSMhEAzFAQsCQCABIgQgAkcNAEGFASEQDN8CCwJAAkAgBC0AAEG0f2oOCADIAcgByAHIAcgByAEByAELIARBAWohAUHvACEQDMYCCyAEQQFqIQFB8AAhEAzFAgsCQCABIgQgAkcNAEGGASEQDN4CCyAELQAAQcUARw3FASAEQQFqIQEMgwILAkAgASIEIAJHDQBBhwEhEAzdAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFBiM+AgABqLQAARw3FASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBhwEhEAzdAgsgAEEANgIAIBBBAWohAUEtIRAMwgELAkAgASIEIAJHDQBBiAEhEAzcAgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw3EASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiAEhEAzcAgsgAEEANgIAIBBBAWohAUEpIRAMwQELAkAgASIBIAJHDQBBiQEhEAzbAgtBASEQIAEtAABB3wBHDcABIAFBAWohAQyBAgsCQCABIgQgAkcNAEGKASEQDNoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRADQCAELQAAIAFBjM+AgABqLQAARw3BASABQQFGDa8CIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQYoBIRAM2QILAkAgASIEIAJHDQBBiwEhEAzZAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFBjs+AgABqLQAARw3BASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBiwEhEAzZAgsgAEEANgIAIBBBAWohAUECIRAMvgELAkAgASIEIAJHDQBBjAEhEAzYAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw3AASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjAEhEAzYAgsgAEEANgIAIBBBAWohAUEfIRAMvQELAkAgASIEIAJHDQBBjQEhEAzXAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8s+AgABqLQAARw2/ASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBjQEhEAzXAgsgAEEANgIAIBBBAWohAUEJIRAMvAELAkAgASIEIAJHDQBBjgEhEAzWAgsCQAJAIAQtAABBt39qDgcAvwG/Ab8BvwG/AQG/AQsgBEEBaiEBQfgAIRAMvQILIARBAWohAUH5ACEQDLwCCwJAIAEiBCACRw0AQY8BIRAM1QILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQZHPgIAAai0AAEcNvQEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQY8BIRAM1QILIABBADYCACAQQQFqIQFBGCEQDLoBCwJAIAEiBCACRw0AQZABIRAM1AILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQZfPgIAAai0AAEcNvAEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZABIRAM1AILIABBADYCACAQQQFqIQFBFyEQDLkBCwJAIAEiBCACRw0AQZEBIRAM0wILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQZrPgIAAai0AAEcNuwEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZEBIRAM0wILIABBADYCACAQQQFqIQFBFSEQDLgBCwJAIAEiBCACRw0AQZIBIRAM0gILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQaHPgIAAai0AAEcNugEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZIBIRAM0gILIABBADYCACAQQQFqIQFBHiEQDLcBCwJAIAEiBCACRw0AQZMBIRAM0QILIAQtAABBzABHDbgBIARBAWohAUEKIRAMtgELAkAgBCACRw0AQZQBIRAM0AILAkACQCAELQAAQb9/ag4PALkBuQG5AbkBuQG5AbkBuQG5AbkBuQG5AbkBAbkBCyAEQQFqIQFB/gAhEAy3AgsgBEEBaiEBQf8AIRAMtgILAkAgBCACRw0AQZUBIRAMzwILAkACQCAELQAAQb9/ag4DALgBAbgBCyAEQQFqIQFB/QAhEAy2AgsgBEEBaiEEQYABIRAMtQILAkAgBCACRw0AQZYBIRAMzgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQafPgIAAai0AAEcNtgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZYBIRAMzgILIABBADYCACAQQQFqIQFBCyEQDLMBCwJAIAQgAkcNAEGXASEQDM0CCwJAAkACQAJAIAQtAABBU2oOIwC4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBuAG4AbgBAbgBuAG4AbgBuAECuAG4AbgBA7gBCyAEQQFqIQFB+wAhEAy2AgsgBEEBaiEBQfwAIRAMtQILIARBAWohBEGBASEQDLQCCyAEQQFqIQRBggEhEAyzAgsCQCAEIAJHDQBBmAEhEAzMAgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBqc+AgABqLQAARw20ASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmAEhEAzMAgsgAEEANgIAIBBBAWohAUEZIRAMsQELAkAgBCACRw0AQZkBIRAMywILIAIgBGsgACgCACIBaiEUIAQgAWtBBWohEAJAA0AgBC0AACABQa7PgIAAai0AAEcNswEgAUEFRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZkBIRAMywILIABBADYCACAQQQFqIQFBBiEQDLABCwJAIAQgAkcNAEGaASEQDMoCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG0z4CAAGotAABHDbIBIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGaASEQDMoCCyAAQQA2AgAgEEEBaiEBQRwhEAyvAQsCQCAEIAJHDQBBmwEhEAzJAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBts+AgABqLQAARw2xASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBmwEhEAzJAgsgAEEANgIAIBBBAWohAUEnIRAMrgELAkAgBCACRw0AQZwBIRAMyAILAkACQCAELQAAQax/ag4CAAGxAQsgBEEBaiEEQYYBIRAMrwILIARBAWohBEGHASEQDK4CCwJAIAQgAkcNAEGdASEQDMcCCyACIARrIAAoAgAiAWohFCAEIAFrQQFqIRACQANAIAQtAAAgAUG4z4CAAGotAABHDa8BIAFBAUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGdASEQDMcCCyAAQQA2AgAgEEEBaiEBQSYhEAysAQsCQCAEIAJHDQBBngEhEAzGAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFBus+AgABqLQAARw2uASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBngEhEAzGAgsgAEEANgIAIBBBAWohAUEDIRAMqwELAkAgBCACRw0AQZ8BIRAMxQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNrQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQZ8BIRAMxQILIABBADYCACAQQQFqIQFBDCEQDKoBCwJAIAQgAkcNAEGgASEQDMQCCyACIARrIAAoAgAiAWohFCAEIAFrQQNqIRACQANAIAQtAAAgAUG8z4CAAGotAABHDawBIAFBA0YNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGgASEQDMQCCyAAQQA2AgAgEEEBaiEBQQ0hEAypAQsCQCAEIAJHDQBBoQEhEAzDAgsCQAJAIAQtAABBun9qDgsArAGsAawBrAGsAawBrAGsAawBAawBCyAEQQFqIQRBiwEhEAyqAgsgBEEBaiEEQYwBIRAMqQILAkAgBCACRw0AQaIBIRAMwgILIAQtAABB0ABHDakBIARBAWohBAzpAQsCQCAEIAJHDQBBowEhEAzBAgsCQAJAIAQtAABBt39qDgcBqgGqAaoBqgGqAQCqAQsgBEEBaiEEQY4BIRAMqAILIARBAWohAUEiIRAMpgELAkAgBCACRw0AQaQBIRAMwAILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQcDPgIAAai0AAEcNqAEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaQBIRAMwAILIABBADYCACAQQQFqIQFBHSEQDKUBCwJAIAQgAkcNAEGlASEQDL8CCwJAAkAgBC0AAEGuf2oOAwCoAQGoAQsgBEEBaiEEQZABIRAMpgILIARBAWohAUEEIRAMpAELAkAgBCACRw0AQaYBIRAMvgILAkACQAJAAkACQCAELQAAQb9/ag4VAKoBqgGqAaoBqgGqAaoBqgGqAaoBAaoBqgECqgGqAQOqAaoBBKoBCyAEQQFqIQRBiAEhEAyoAgsgBEEBaiEEQYkBIRAMpwILIARBAWohBEGKASEQDKYCCyAEQQFqIQRBjwEhEAylAgsgBEEBaiEEQZEBIRAMpAILAkAgBCACRw0AQacBIRAMvQILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQe3PgIAAai0AAEcNpQEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQacBIRAMvQILIABBADYCACAQQQFqIQFBESEQDKIBCwJAIAQgAkcNAEGoASEQDLwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHCz4CAAGotAABHDaQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGoASEQDLwCCyAAQQA2AgAgEEEBaiEBQSwhEAyhAQsCQCAEIAJHDQBBqQEhEAy7AgsgAiAEayAAKAIAIgFqIRQgBCABa0EEaiEQAkADQCAELQAAIAFBxc+AgABqLQAARw2jASABQQRGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBqQEhEAy7AgsgAEEANgIAIBBBAWohAUErIRAMoAELAkAgBCACRw0AQaoBIRAMugILIAIgBGsgACgCACIBaiEUIAQgAWtBAmohEAJAA0AgBC0AACABQcrPgIAAai0AAEcNogEgAUECRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQaoBIRAMugILIABBADYCACAQQQFqIQFBFCEQDJ8BCwJAIAQgAkcNAEGrASEQDLkCCwJAAkACQAJAIAQtAABBvn9qDg8AAQKkAaQBpAGkAaQBpAGkAaQBpAGkAaQBA6QBCyAEQQFqIQRBkwEhEAyiAgsgBEEBaiEEQZQBIRAMoQILIARBAWohBEGVASEQDKACCyAEQQFqIQRBlgEhEAyfAgsCQCAEIAJHDQBBrAEhEAy4AgsgBC0AAEHFAEcNnwEgBEEBaiEEDOABCwJAIAQgAkcNAEGtASEQDLcCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHNz4CAAGotAABHDZ8BIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEGtASEQDLcCCyAAQQA2AgAgEEEBaiEBQQ4hEAycAQsCQCAEIAJHDQBBrgEhEAy2AgsgBC0AAEHQAEcNnQEgBEEBaiEBQSUhEAybAQsCQCAEIAJHDQBBrwEhEAy1AgsgAiAEayAAKAIAIgFqIRQgBCABa0EIaiEQAkADQCAELQAAIAFB0M+AgABqLQAARw2dASABQQhGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBrwEhEAy1AgsgAEEANgIAIBBBAWohAUEqIRAMmgELAkAgBCACRw0AQbABIRAMtAILAkACQCAELQAAQat/ag4LAJ0BnQGdAZ0BnQGdAZ0BnQGdAQGdAQsgBEEBaiEEQZoBIRAMmwILIARBAWohBEGbASEQDJoCCwJAIAQgAkcNAEGxASEQDLMCCwJAAkAgBC0AAEG/f2oOFACcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAGcAZwBnAEBnAELIARBAWohBEGZASEQDJoCCyAEQQFqIQRBnAEhEAyZAgsCQCAEIAJHDQBBsgEhEAyyAgsgAiAEayAAKAIAIgFqIRQgBCABa0EDaiEQAkADQCAELQAAIAFB2c+AgABqLQAARw2aASABQQNGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBsgEhEAyyAgsgAEEANgIAIBBBAWohAUEhIRAMlwELAkAgBCACRw0AQbMBIRAMsQILIAIgBGsgACgCACIBaiEUIAQgAWtBBmohEAJAA0AgBC0AACABQd3PgIAAai0AAEcNmQEgAUEGRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbMBIRAMsQILIABBADYCACAQQQFqIQFBGiEQDJYBCwJAIAQgAkcNAEG0ASEQDLACCwJAAkACQCAELQAAQbt/ag4RAJoBmgGaAZoBmgGaAZoBmgGaAQGaAZoBmgGaAZoBApoBCyAEQQFqIQRBnQEhEAyYAgsgBEEBaiEEQZ4BIRAMlwILIARBAWohBEGfASEQDJYCCwJAIAQgAkcNAEG1ASEQDK8CCyACIARrIAAoAgAiAWohFCAEIAFrQQVqIRACQANAIAQtAAAgAUHkz4CAAGotAABHDZcBIAFBBUYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG1ASEQDK8CCyAAQQA2AgAgEEEBaiEBQSghEAyUAQsCQCAEIAJHDQBBtgEhEAyuAgsgAiAEayAAKAIAIgFqIRQgBCABa0ECaiEQAkADQCAELQAAIAFB6s+AgABqLQAARw2WASABQQJGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBtgEhEAyuAgsgAEEANgIAIBBBAWohAUEHIRAMkwELAkAgBCACRw0AQbcBIRAMrQILAkACQCAELQAAQbt/ag4OAJYBlgGWAZYBlgGWAZYBlgGWAZYBlgGWAQGWAQsgBEEBaiEEQaEBIRAMlAILIARBAWohBEGiASEQDJMCCwJAIAQgAkcNAEG4ASEQDKwCCyACIARrIAAoAgAiAWohFCAEIAFrQQJqIRACQANAIAQtAAAgAUHtz4CAAGotAABHDZQBIAFBAkYNASABQQFqIQEgBEEBaiIEIAJHDQALIAAgFDYCAEG4ASEQDKwCCyAAQQA2AgAgEEEBaiEBQRIhEAyRAQsCQCAEIAJHDQBBuQEhEAyrAgsgAiAEayAAKAIAIgFqIRQgBCABa0EBaiEQAkADQCAELQAAIAFB8M+AgABqLQAARw2TASABQQFGDQEgAUEBaiEBIARBAWoiBCACRw0ACyAAIBQ2AgBBuQEhEAyrAgsgAEEANgIAIBBBAWohAUEgIRAMkAELAkAgBCACRw0AQboBIRAMqgILIAIgBGsgACgCACIBaiEUIAQgAWtBAWohEAJAA0AgBC0AACABQfLPgIAAai0AAEcNkgEgAUEBRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQboBIRAMqgILIABBADYCACAQQQFqIQFBDyEQDI8BCwJAIAQgAkcNAEG7ASEQDKkCCwJAAkAgBC0AAEG3f2oOBwCSAZIBkgGSAZIBAZIBCyAEQQFqIQRBpQEhEAyQAgsgBEEBaiEEQaYBIRAMjwILAkAgBCACRw0AQbwBIRAMqAILIAIgBGsgACgCACIBaiEUIAQgAWtBB2ohEAJAA0AgBC0AACABQfTPgIAAai0AAEcNkAEgAUEHRg0BIAFBAWohASAEQQFqIgQgAkcNAAsgACAUNgIAQbwBIRAMqAILIABBADYCACAQQQFqIQFBGyEQDI0BCwJAIAQgAkcNAEG9ASEQDKcCCwJAAkACQCAELQAAQb5/ag4SAJEBkQGRAZEBkQGRAZEBkQGRAQGRAZEBkQGRAZEBkQECkQELIARBAWohBEGkASEQDI8CCyAEQQFqIQRBpwEhEAyOAgsgBEEBaiEEQagBIRAMjQILAkAgBCACRw0AQb4BIRAMpgILIAQtAABBzgBHDY0BIARBAWohBAzPAQsCQCAEIAJHDQBBvwEhEAylAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAELQAAQb9/ag4VAAECA5wBBAUGnAGcAZwBBwgJCgucAQwNDg+cAQsgBEEBaiEBQegAIRAMmgILIARBAWohAUHpACEQDJkCCyAEQQFqIQFB7gAhEAyYAgsgBEEBaiEBQfIAIRAMlwILIARBAWohAUHzACEQDJYCCyAEQQFqIQFB9gAhEAyVAgsgBEEBaiEBQfcAIRAMlAILIARBAWohAUH6ACEQDJMCCyAEQQFqIQRBgwEhEAySAgsgBEEBaiEEQYQBIRAMkQILIARBAWohBEGFASEQDJACCyAEQQFqIQRBkgEhEAyPAgsgBEEBaiEEQZgBIRAMjgILIARBAWohBEGgASEQDI0CCyAEQQFqIQRBowEhEAyMAgsgBEEBaiEEQaoBIRAMiwILAkAgBCACRg0AIABBkICAgAA2AgggACAENgIEQasBIRAMiwILQcABIRAMowILIAAgBSACEKqAgIAAIgENiwEgBSEBDFwLAkAgBiACRg0AIAZBAWohBQyNAQtBwgEhEAyhAgsDQAJAIBAtAABBdmoOBIwBAACPAQALIBBBAWoiECACRw0AC0HDASEQDKACCwJAIAcgAkYNACAAQZGAgIAANgIIIAAgBzYCBCAHIQFBASEQDIcCC0HEASEQDJ8CCwJAIAcgAkcNAEHFASEQDJ8CCwJAAkAgBy0AAEF2ag4EAc4BzgEAzgELIAdBAWohBgyNAQsgB0EBaiEFDIkBCwJAIAcgAkcNAEHGASEQDJ4CCwJAAkAgBy0AAEF2ag4XAY8BjwEBjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BAI8BCyAHQQFqIQcLQbABIRAMhAILAkAgCCACRw0AQcgBIRAMnQILIAgtAABBIEcNjQEgAEEAOwEyIAhBAWohAUGzASEQDIMCCyABIRcCQANAIBciByACRg0BIActAABBUGpB/wFxIhBBCk8NzAECQCAALwEyIhRBmTNLDQAgACAUQQpsIhQ7ATIgEEH//wNzIBRB/v8DcUkNACAHQQFqIRcgACAUIBBqIhA7ATIgEEH//wNxQegHSQ0BCwtBACEQIABBADYCHCAAQcGJgIAANgIQIABBDTYCDCAAIAdBAWo2AhQMnAILQccBIRAMmwILIAAgCCACEK6AgIAAIhBFDcoBIBBBFUcNjAEgAEHIATYCHCAAIAg2AhQgAEHJl4CAADYCECAAQRU2AgxBACEQDJoCCwJAIAkgAkcNAEHMASEQDJoCC0EAIRRBASEXQQEhFkEAIRACQAJAAkACQAJAAkACQAJAAkAgCS0AAEFQag4KlgGVAQABAgMEBQYIlwELQQIhEAwGC0EDIRAMBQtBBCEQDAQLQQUhEAwDC0EGIRAMAgtBByEQDAELQQghEAtBACEXQQAhFkEAIRQMjgELQQkhEEEBIRRBACEXQQAhFgyNAQsCQCAKIAJHDQBBzgEhEAyZAgsgCi0AAEEuRw2OASAKQQFqIQkMygELIAsgAkcNjgFB0AEhEAyXAgsCQCALIAJGDQAgAEGOgICAADYCCCAAIAs2AgRBtwEhEAz+AQtB0QEhEAyWAgsCQCAEIAJHDQBB0gEhEAyWAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EEaiELA0AgBC0AACAQQfzPgIAAai0AAEcNjgEgEEEERg3pASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHSASEQDJUCCyAAIAwgAhCsgICAACIBDY0BIAwhAQy4AQsCQCAEIAJHDQBB1AEhEAyUAgsgAiAEayAAKAIAIhBqIRQgBCAQa0EBaiEMA0AgBC0AACAQQYHQgIAAai0AAEcNjwEgEEEBRg2OASAQQQFqIRAgBEEBaiIEIAJHDQALIAAgFDYCAEHUASEQDJMCCwJAIAQgAkcNAEHWASEQDJMCCyACIARrIAAoAgAiEGohFCAEIBBrQQJqIQsDQCAELQAAIBBBg9CAgABqLQAARw2OASAQQQJGDZABIBBBAWohECAEQQFqIgQgAkcNAAsgACAUNgIAQdYBIRAMkgILAkAgBCACRw0AQdcBIRAMkgILAkACQCAELQAAQbt/ag4QAI8BjwGPAY8BjwGPAY8BjwGPAY8BjwGPAY8BjwEBjwELIARBAWohBEG7ASEQDPkBCyAEQQFqIQRBvAEhEAz4AQsCQCAEIAJHDQBB2AEhEAyRAgsgBC0AAEHIAEcNjAEgBEEBaiEEDMQBCwJAIAQgAkYNACAAQZCAgIAANgIIIAAgBDYCBEG+ASEQDPcBC0HZASEQDI8CCwJAIAQgAkcNAEHaASEQDI8CCyAELQAAQcgARg3DASAAQQE6ACgMuQELIABBAjoALyAAIAQgAhCmgICAACIQDY0BQcIBIRAM9AELIAAtAChBf2oOArcBuQG4AQsDQAJAIAQtAABBdmoOBACOAY4BAI4BCyAEQQFqIgQgAkcNAAtB3QEhEAyLAgsgAEEAOgAvIAAtAC1BBHFFDYQCCyAAQQA6AC8gAEEBOgA0IAEhAQyMAQsgEEEVRg3aASAAQQA2AhwgACABNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAyIAgsCQCAAIBAgAhC0gICAACIEDQAgECEBDIECCwJAIARBFUcNACAAQQM2AhwgACAQNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAyIAgsgAEEANgIcIAAgEDYCFCAAQaeOgIAANgIQIABBEjYCDEEAIRAMhwILIBBBFUYN1gEgAEEANgIcIAAgATYCFCAAQdqNgIAANgIQIABBFDYCDEEAIRAMhgILIAAoAgQhFyAAQQA2AgQgECARp2oiFiEBIAAgFyAQIBYgFBsiEBC1gICAACIURQ2NASAAQQc2AhwgACAQNgIUIAAgFDYCDEEAIRAMhQILIAAgAC8BMEGAAXI7ATAgASEBC0EqIRAM6gELIBBBFUYN0QEgAEEANgIcIAAgATYCFCAAQYOMgIAANgIQIABBEzYCDEEAIRAMggILIBBBFUYNzwEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAMgQILIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDI0BCyAAQQw2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAMgAILIBBBFUYNzAEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM/wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIwBCyAAQQ02AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/gELIBBBFUYNyQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM/QELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIsBCyAAQQ42AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM/AELIABBADYCHCAAIAE2AhQgAEHAlYCAADYCECAAQQI2AgxBACEQDPsBCyAQQRVGDcUBIABBADYCHCAAIAE2AhQgAEHGjICAADYCECAAQSM2AgxBACEQDPoBCyAAQRA2AhwgACABNgIUIAAgEDYCDEEAIRAM+QELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDPEBCyAAQRE2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM+AELIBBBFUYNwQEgAEEANgIcIAAgATYCFCAAQcaMgIAANgIQIABBIzYCDEEAIRAM9wELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC5gICAACIQDQAgAUEBaiEBDIgBCyAAQRM2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM9gELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC5gICAACIEDQAgAUEBaiEBDO0BCyAAQRQ2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM9QELIBBBFUYNvQEgAEEANgIcIAAgATYCFCAAQZqPgIAANgIQIABBIjYCDEEAIRAM9AELIAAoAgQhECAAQQA2AgQCQCAAIBAgARC3gICAACIQDQAgAUEBaiEBDIYBCyAAQRY2AhwgACAQNgIMIAAgAUEBajYCFEEAIRAM8wELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARC3gICAACIEDQAgAUEBaiEBDOkBCyAAQRc2AhwgACAENgIMIAAgAUEBajYCFEEAIRAM8gELIABBADYCHCAAIAE2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDPEBC0IBIRELIBBBAWohAQJAIAApAyAiEkL//////////w9WDQAgACASQgSGIBGENwMgIAEhAQyEAQsgAEEANgIcIAAgATYCFCAAQa2JgIAANgIQIABBDDYCDEEAIRAM7wELIABBADYCHCAAIBA2AhQgAEHNk4CAADYCECAAQQw2AgxBACEQDO4BCyAAKAIEIRcgAEEANgIEIBAgEadqIhYhASAAIBcgECAWIBQbIhAQtYCAgAAiFEUNcyAAQQU2AhwgACAQNgIUIAAgFDYCDEEAIRAM7QELIABBADYCHCAAIBA2AhQgAEGqnICAADYCECAAQQ82AgxBACEQDOwBCyAAIBAgAhC0gICAACIBDQEgECEBC0EOIRAM0QELAkAgAUEVRw0AIABBAjYCHCAAIBA2AhQgAEGwmICAADYCECAAQRU2AgxBACEQDOoBCyAAQQA2AhwgACAQNgIUIABBp46AgAA2AhAgAEESNgIMQQAhEAzpAQsgAUEBaiEQAkAgAC8BMCIBQYABcUUNAAJAIAAgECACELuAgIAAIgENACAQIQEMcAsgAUEVRw26ASAAQQU2AhwgACAQNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAzpAQsCQCABQaAEcUGgBEcNACAALQAtQQJxDQAgAEEANgIcIAAgEDYCFCAAQZaTgIAANgIQIABBBDYCDEEAIRAM6QELIAAgECACEL2AgIAAGiAQIQECQAJAAkACQAJAIAAgECACELOAgIAADhYCAQAEBAQEBAQEBAQEBAQEBAQEBAQDBAsgAEEBOgAuCyAAIAAvATBBwAByOwEwIBAhAQtBJiEQDNEBCyAAQSM2AhwgACAQNgIUIABBpZaAgAA2AhAgAEEVNgIMQQAhEAzpAQsgAEEANgIcIAAgEDYCFCAAQdWLgIAANgIQIABBETYCDEEAIRAM6AELIAAtAC1BAXFFDQFBwwEhEAzOAQsCQCANIAJGDQADQAJAIA0tAABBIEYNACANIQEMxAELIA1BAWoiDSACRw0AC0ElIRAM5wELQSUhEAzmAQsgACgCBCEEIABBADYCBCAAIAQgDRCvgICAACIERQ2tASAAQSY2AhwgACAENgIMIAAgDUEBajYCFEEAIRAM5QELIBBBFUYNqwEgAEEANgIcIAAgATYCFCAAQf2NgIAANgIQIABBHTYCDEEAIRAM5AELIABBJzYCHCAAIAE2AhQgACAQNgIMQQAhEAzjAQsgECEBQQEhFAJAAkACQAJAAkACQAJAIAAtACxBfmoOBwYFBQMBAgAFCyAAIAAvATBBCHI7ATAMAwtBAiEUDAELQQQhFAsgAEEBOgAsIAAgAC8BMCAUcjsBMAsgECEBC0ErIRAMygELIABBADYCHCAAIBA2AhQgAEGrkoCAADYCECAAQQs2AgxBACEQDOIBCyAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMQQAhEAzhAQsgAEEAOgAsIBAhAQy9AQsgECEBQQEhFAJAAkACQAJAAkAgAC0ALEF7ag4EAwECAAULIAAgAC8BMEEIcjsBMAwDC0ECIRQMAQtBBCEUCyAAQQE6ACwgACAALwEwIBRyOwEwCyAQIQELQSkhEAzFAQsgAEEANgIcIAAgATYCFCAAQfCUgIAANgIQIABBAzYCDEEAIRAM3QELAkAgDi0AAEENRw0AIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDkEBaiEBDHULIABBLDYCHCAAIAE2AgwgACAOQQFqNgIUQQAhEAzdAQsgAC0ALUEBcUUNAUHEASEQDMMBCwJAIA4gAkcNAEEtIRAM3AELAkACQANAAkAgDi0AAEF2ag4EAgAAAwALIA5BAWoiDiACRw0AC0EtIRAM3QELIAAoAgQhASAAQQA2AgQCQCAAIAEgDhCxgICAACIBDQAgDiEBDHQLIABBLDYCHCAAIA42AhQgACABNgIMQQAhEAzcAQsgACgCBCEBIABBADYCBAJAIAAgASAOELGAgIAAIgENACAOQQFqIQEMcwsgAEEsNgIcIAAgATYCDCAAIA5BAWo2AhRBACEQDNsBCyAAKAIEIQQgAEEANgIEIAAgBCAOELGAgIAAIgQNoAEgDiEBDM4BCyAQQSxHDQEgAUEBaiEQQQEhAQJAAkACQAJAAkAgAC0ALEF7ag4EAwECBAALIBAhAQwEC0ECIQEMAQtBBCEBCyAAQQE6ACwgACAALwEwIAFyOwEwIBAhAQwBCyAAIAAvATBBCHI7ATAgECEBC0E5IRAMvwELIABBADoALCABIQELQTQhEAy9AQsgACAALwEwQSByOwEwIAEhAQwCCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQsYCAgAAiBA0AIAEhAQzHAQsgAEE3NgIcIAAgATYCFCAAIAQ2AgxBACEQDNQBCyAAQQg6ACwgASEBC0EwIRAMuQELAkAgAC0AKEEBRg0AIAEhAQwECyAALQAtQQhxRQ2TASABIQEMAwsgAC0AMEEgcQ2UAUHFASEQDLcBCwJAIA8gAkYNAAJAA0ACQCAPLQAAQVBqIgFB/wFxQQpJDQAgDyEBQTUhEAy6AQsgACkDICIRQpmz5syZs+bMGVYNASAAIBFCCn4iETcDICARIAGtQv8BgyISQn+FVg0BIAAgESASfDcDICAPQQFqIg8gAkcNAAtBOSEQDNEBCyAAKAIEIQIgAEEANgIEIAAgAiAPQQFqIgQQsYCAgAAiAg2VASAEIQEMwwELQTkhEAzPAQsCQCAALwEwIgFBCHFFDQAgAC0AKEEBRw0AIAAtAC1BCHFFDZABCyAAIAFB9/sDcUGABHI7ATAgDyEBC0E3IRAMtAELIAAgAC8BMEEQcjsBMAyrAQsgEEEVRg2LASAAQQA2AhwgACABNgIUIABB8I6AgAA2AhAgAEEcNgIMQQAhEAzLAQsgAEHDADYCHCAAIAE2AgwgACANQQFqNgIUQQAhEAzKAQsCQCABLQAAQTpHDQAgACgCBCEQIABBADYCBAJAIAAgECABEK+AgIAAIhANACABQQFqIQEMYwsgAEHDADYCHCAAIBA2AgwgACABQQFqNgIUQQAhEAzKAQsgAEEANgIcIAAgATYCFCAAQbGRgIAANgIQIABBCjYCDEEAIRAMyQELIABBADYCHCAAIAE2AhQgAEGgmYCAADYCECAAQR42AgxBACEQDMgBCyAAQQA2AgALIABBgBI7ASogACAXQQFqIgEgAhCogICAACIQDQEgASEBC0HHACEQDKwBCyAQQRVHDYMBIABB0QA2AhwgACABNgIUIABB45eAgAA2AhAgAEEVNgIMQQAhEAzEAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMXgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAzDAQsgAEEANgIcIAAgFDYCFCAAQcGogIAANgIQIABBBzYCDCAAQQA2AgBBACEQDMIBCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxdCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDMEBC0EAIRAgAEEANgIcIAAgATYCFCAAQYCRgIAANgIQIABBCTYCDAzAAQsgEEEVRg19IABBADYCHCAAIAE2AhQgAEGUjYCAADYCECAAQSE2AgxBACEQDL8BC0EBIRZBACEXQQAhFEEBIRALIAAgEDoAKyABQQFqIQECQAJAIAAtAC1BEHENAAJAAkACQCAALQAqDgMBAAIECyAWRQ0DDAILIBQNAQwCCyAXRQ0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQrYCAgAAiEA0AIAEhAQxcCyAAQdgANgIcIAAgATYCFCAAIBA2AgxBACEQDL4BCyAAKAIEIQQgAEEANgIEAkAgACAEIAEQrYCAgAAiBA0AIAEhAQytAQsgAEHZADYCHCAAIAE2AhQgACAENgIMQQAhEAy9AQsgACgCBCEEIABBADYCBAJAIAAgBCABEK2AgIAAIgQNACABIQEMqwELIABB2gA2AhwgACABNgIUIAAgBDYCDEEAIRAMvAELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKkBCyAAQdwANgIcIAAgATYCFCAAIAQ2AgxBACEQDLsBCwJAIAEtAABBUGoiEEH/AXFBCk8NACAAIBA6ACogAUEBaiEBQc8AIRAMogELIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCtgICAACIEDQAgASEBDKcBCyAAQd4ANgIcIAAgATYCFCAAIAQ2AgxBACEQDLoBCyAAQQA2AgAgF0EBaiEBAkAgAC0AKUEjTw0AIAEhAQxZCyAAQQA2AhwgACABNgIUIABB04mAgAA2AhAgAEEINgIMQQAhEAy5AQsgAEEANgIAC0EAIRAgAEEANgIcIAAgATYCFCAAQZCzgIAANgIQIABBCDYCDAy3AQsgAEEANgIAIBdBAWohAQJAIAAtAClBIUcNACABIQEMVgsgAEEANgIcIAAgATYCFCAAQZuKgIAANgIQIABBCDYCDEEAIRAMtgELIABBADYCACAXQQFqIQECQCAALQApIhBBXWpBC08NACABIQEMVQsCQCAQQQZLDQBBASAQdEHKAHFFDQAgASEBDFULQQAhECAAQQA2AhwgACABNgIUIABB94mAgAA2AhAgAEEINgIMDLUBCyAQQRVGDXEgAEEANgIcIAAgATYCFCAAQbmNgIAANgIQIABBGjYCDEEAIRAMtAELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFQLIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMswELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0gA2AhwgACABNgIUIAAgEDYCDEEAIRAMsgELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDE0LIABB0wA2AhwgACABNgIUIAAgEDYCDEEAIRAMsQELIAAoAgQhECAAQQA2AgQCQCAAIBAgARCngICAACIQDQAgASEBDFELIABB5QA2AhwgACABNgIUIAAgEDYCDEEAIRAMsAELIABBADYCHCAAIAE2AhQgAEHGioCAADYCECAAQQc2AgxBACEQDK8BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdIANgIcIAAgATYCFCAAIBA2AgxBACEQDK4BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxJCyAAQdMANgIcIAAgATYCFCAAIBA2AgxBACEQDK0BCyAAKAIEIRAgAEEANgIEAkAgACAQIAEQp4CAgAAiEA0AIAEhAQxNCyAAQeUANgIcIAAgATYCFCAAIBA2AgxBACEQDKwBCyAAQQA2AhwgACABNgIUIABB3IiAgAA2AhAgAEEHNgIMQQAhEAyrAQsgEEE/Rw0BIAFBAWohAQtBBSEQDJABC0EAIRAgAEEANgIcIAAgATYCFCAAQf2SgIAANgIQIABBBzYCDAyoAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHSADYCHCAAIAE2AhQgACAQNgIMQQAhEAynAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMQgsgAEHTADYCHCAAIAE2AhQgACAQNgIMQQAhEAymAQsgACgCBCEQIABBADYCBAJAIAAgECABEKeAgIAAIhANACABIQEMRgsgAEHlADYCHCAAIAE2AhQgACAQNgIMQQAhEAylAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHSADYCHCAAIBQ2AhQgACABNgIMQQAhEAykAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMPwsgAEHTADYCHCAAIBQ2AhQgACABNgIMQQAhEAyjAQsgACgCBCEBIABBADYCBAJAIAAgASAUEKeAgIAAIgENACAUIQEMQwsgAEHlADYCHCAAIBQ2AhQgACABNgIMQQAhEAyiAQsgAEEANgIcIAAgFDYCFCAAQcOPgIAANgIQIABBBzYCDEEAIRAMoQELIABBADYCHCAAIAE2AhQgAEHDj4CAADYCECAAQQc2AgxBACEQDKABC0EAIRAgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDAyfAQsgAEEANgIcIAAgFDYCFCAAQYycgIAANgIQIABBBzYCDEEAIRAMngELIABBADYCHCAAIBQ2AhQgAEH+kYCAADYCECAAQQc2AgxBACEQDJ0BCyAAQQA2AhwgACABNgIUIABBjpuAgAA2AhAgAEEGNgIMQQAhEAycAQsgEEEVRg1XIABBADYCHCAAIAE2AhQgAEHMjoCAADYCECAAQSA2AgxBACEQDJsBCyAAQQA2AgAgEEEBaiEBQSQhEAsgACAQOgApIAAoAgQhECAAQQA2AgQgACAQIAEQq4CAgAAiEA1UIAEhAQw+CyAAQQA2AgALQQAhECAAQQA2AhwgACAENgIUIABB8ZuAgAA2AhAgAEEGNgIMDJcBCyABQRVGDVAgAEEANgIcIAAgBTYCFCAAQfCMgIAANgIQIABBGzYCDEEAIRAMlgELIAAoAgQhBSAAQQA2AgQgACAFIBAQqYCAgAAiBQ0BIBBBAWohBQtBrQEhEAx7CyAAQcEBNgIcIAAgBTYCDCAAIBBBAWo2AhRBACEQDJMBCyAAKAIEIQYgAEEANgIEIAAgBiAQEKmAgIAAIgYNASAQQQFqIQYLQa4BIRAMeAsgAEHCATYCHCAAIAY2AgwgACAQQQFqNgIUQQAhEAyQAQsgAEEANgIcIAAgBzYCFCAAQZeLgIAANgIQIABBDTYCDEEAIRAMjwELIABBADYCHCAAIAg2AhQgAEHjkICAADYCECAAQQk2AgxBACEQDI4BCyAAQQA2AhwgACAINgIUIABBlI2AgAA2AhAgAEEhNgIMQQAhEAyNAQtBASEWQQAhF0EAIRRBASEQCyAAIBA6ACsgCUEBaiEIAkACQCAALQAtQRBxDQACQAJAAkAgAC0AKg4DAQACBAsgFkUNAwwCCyAUDQEMAgsgF0UNAQsgACgCBCEQIABBADYCBCAAIBAgCBCtgICAACIQRQ09IABByQE2AhwgACAINgIUIAAgEDYCDEEAIRAMjAELIAAoAgQhBCAAQQA2AgQgACAEIAgQrYCAgAAiBEUNdiAAQcoBNgIcIAAgCDYCFCAAIAQ2AgxBACEQDIsBCyAAKAIEIQQgAEEANgIEIAAgBCAJEK2AgIAAIgRFDXQgAEHLATYCHCAAIAk2AhQgACAENgIMQQAhEAyKAQsgACgCBCEEIABBADYCBCAAIAQgChCtgICAACIERQ1yIABBzQE2AhwgACAKNgIUIAAgBDYCDEEAIRAMiQELAkAgCy0AAEFQaiIQQf8BcUEKTw0AIAAgEDoAKiALQQFqIQpBtgEhEAxwCyAAKAIEIQQgAEEANgIEIAAgBCALEK2AgIAAIgRFDXAgAEHPATYCHCAAIAs2AhQgACAENgIMQQAhEAyIAQsgAEEANgIcIAAgBDYCFCAAQZCzgIAANgIQIABBCDYCDCAAQQA2AgBBACEQDIcBCyABQRVGDT8gAEEANgIcIAAgDDYCFCAAQcyOgIAANgIQIABBIDYCDEEAIRAMhgELIABBgQQ7ASggACgCBCEQIABCADcDACAAIBAgDEEBaiIMEKuAgIAAIhBFDTggAEHTATYCHCAAIAw2AhQgACAQNgIMQQAhEAyFAQsgAEEANgIAC0EAIRAgAEEANgIcIAAgBDYCFCAAQdibgIAANgIQIABBCDYCDAyDAQsgACgCBCEQIABCADcDACAAIBAgC0EBaiILEKuAgIAAIhANAUHGASEQDGkLIABBAjoAKAxVCyAAQdUBNgIcIAAgCzYCFCAAIBA2AgxBACEQDIABCyAQQRVGDTcgAEEANgIcIAAgBDYCFCAAQaSMgIAANgIQIABBEDYCDEEAIRAMfwsgAC0ANEEBRw00IAAgBCACELyAgIAAIhBFDTQgEEEVRw01IABB3AE2AhwgACAENgIUIABB1ZaAgAA2AhAgAEEVNgIMQQAhEAx+C0EAIRAgAEEANgIcIABBr4uAgAA2AhAgAEECNgIMIAAgFEEBajYCFAx9C0EAIRAMYwtBAiEQDGILQQ0hEAxhC0EPIRAMYAtBJSEQDF8LQRMhEAxeC0EVIRAMXQtBFiEQDFwLQRchEAxbC0EYIRAMWgtBGSEQDFkLQRohEAxYC0EbIRAMVwtBHCEQDFYLQR0hEAxVC0EfIRAMVAtBISEQDFMLQSMhEAxSC0HGACEQDFELQS4hEAxQC0EvIRAMTwtBOyEQDE4LQT0hEAxNC0HIACEQDEwLQckAIRAMSwtBywAhEAxKC0HMACEQDEkLQc4AIRAMSAtB0QAhEAxHC0HVACEQDEYLQdgAIRAMRQtB2QAhEAxEC0HbACEQDEMLQeQAIRAMQgtB5QAhEAxBC0HxACEQDEALQfQAIRAMPwtBjQEhEAw+C0GXASEQDD0LQakBIRAMPAtBrAEhEAw7C0HAASEQDDoLQbkBIRAMOQtBrwEhEAw4C0GxASEQDDcLQbIBIRAMNgtBtAEhEAw1C0G1ASEQDDQLQboBIRAMMwtBvQEhEAwyC0G/ASEQDDELQcEBIRAMMAsgAEEANgIcIAAgBDYCFCAAQemLgIAANgIQIABBHzYCDEEAIRAMSAsgAEHbATYCHCAAIAQ2AhQgAEH6loCAADYCECAAQRU2AgxBACEQDEcLIABB+AA2AhwgACAMNgIUIABBypiAgAA2AhAgAEEVNgIMQQAhEAxGCyAAQdEANgIcIAAgBTYCFCAAQbCXgIAANgIQIABBFTYCDEEAIRAMRQsgAEH5ADYCHCAAIAE2AhQgACAQNgIMQQAhEAxECyAAQfgANgIcIAAgATYCFCAAQcqYgIAANgIQIABBFTYCDEEAIRAMQwsgAEHkADYCHCAAIAE2AhQgAEHjl4CAADYCECAAQRU2AgxBACEQDEILIABB1wA2AhwgACABNgIUIABByZeAgAA2AhAgAEEVNgIMQQAhEAxBCyAAQQA2AhwgACABNgIUIABBuY2AgAA2AhAgAEEaNgIMQQAhEAxACyAAQcIANgIcIAAgATYCFCAAQeOYgIAANgIQIABBFTYCDEEAIRAMPwsgAEEANgIEIAAgDyAPELGAgIAAIgRFDQEgAEE6NgIcIAAgBDYCDCAAIA9BAWo2AhRBACEQDD4LIAAoAgQhBCAAQQA2AgQCQCAAIAQgARCxgICAACIERQ0AIABBOzYCHCAAIAQ2AgwgACABQQFqNgIUQQAhEAw+CyABQQFqIQEMLQsgD0EBaiEBDC0LIABBADYCHCAAIA82AhQgAEHkkoCAADYCECAAQQQ2AgxBACEQDDsLIABBNjYCHCAAIAQ2AhQgACACNgIMQQAhEAw6CyAAQS42AhwgACAONgIUIAAgBDYCDEEAIRAMOQsgAEHQADYCHCAAIAE2AhQgAEGRmICAADYCECAAQRU2AgxBACEQDDgLIA1BAWohAQwsCyAAQRU2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAw2CyAAQRs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw1CyAAQQ82AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAw0CyAAQQs2AhwgACABNgIUIABBkZeAgAA2AhAgAEEVNgIMQQAhEAwzCyAAQRo2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwyCyAAQQs2AhwgACABNgIUIABBgpmAgAA2AhAgAEEVNgIMQQAhEAwxCyAAQQo2AhwgACABNgIUIABB5JaAgAA2AhAgAEEVNgIMQQAhEAwwCyAAQR42AhwgACABNgIUIABB+ZeAgAA2AhAgAEEVNgIMQQAhEAwvCyAAQQA2AhwgACAQNgIUIABB2o2AgAA2AhAgAEEUNgIMQQAhEAwuCyAAQQQ2AhwgACABNgIUIABBsJiAgAA2AhAgAEEVNgIMQQAhEAwtCyAAQQA2AgAgC0EBaiELC0G4ASEQDBILIABBADYCACAQQQFqIQFB9QAhEAwRCyABIQECQCAALQApQQVHDQBB4wAhEAwRC0HiACEQDBALQQAhECAAQQA2AhwgAEHkkYCAADYCECAAQQc2AgwgACAUQQFqNgIUDCgLIABBADYCACAXQQFqIQFBwAAhEAwOC0EBIQELIAAgAToALCAAQQA2AgAgF0EBaiEBC0EoIRAMCwsgASEBC0E4IRAMCQsCQCABIg8gAkYNAANAAkAgDy0AAEGAvoCAAGotAAAiAUEBRg0AIAFBAkcNAyAPQQFqIQEMBAsgD0EBaiIPIAJHDQALQT4hEAwiC0E+IRAMIQsgAEEAOgAsIA8hAQwBC0ELIRAMBgtBOiEQDAULIAFBAWohAUEtIRAMBAsgACABOgAsIABBADYCACAWQQFqIQFBDCEQDAMLIABBADYCACAXQQFqIQFBCiEQDAILIABBADYCAAsgAEEAOgAsIA0hAUEJIRAMAAsLQQAhECAAQQA2AhwgACALNgIUIABBzZCAgAA2AhAgAEEJNgIMDBcLQQAhECAAQQA2AhwgACAKNgIUIABB6YqAgAA2AhAgAEEJNgIMDBYLQQAhECAAQQA2AhwgACAJNgIUIABBt5CAgAA2AhAgAEEJNgIMDBULQQAhECAAQQA2AhwgACAINgIUIABBnJGAgAA2AhAgAEEJNgIMDBQLQQAhECAAQQA2AhwgACABNgIUIABBzZCAgAA2AhAgAEEJNgIMDBMLQQAhECAAQQA2AhwgACABNgIUIABB6YqAgAA2AhAgAEEJNgIMDBILQQAhECAAQQA2AhwgACABNgIUIABBt5CAgAA2AhAgAEEJNgIMDBELQQAhECAAQQA2AhwgACABNgIUIABBnJGAgAA2AhAgAEEJNgIMDBALQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA8LQQAhECAAQQA2AhwgACABNgIUIABBl5WAgAA2AhAgAEEPNgIMDA4LQQAhECAAQQA2AhwgACABNgIUIABBwJKAgAA2AhAgAEELNgIMDA0LQQAhECAAQQA2AhwgACABNgIUIABBlYmAgAA2AhAgAEELNgIMDAwLQQAhECAAQQA2AhwgACABNgIUIABB4Y+AgAA2AhAgAEEKNgIMDAsLQQAhECAAQQA2AhwgACABNgIUIABB+4+AgAA2AhAgAEEKNgIMDAoLQQAhECAAQQA2AhwgACABNgIUIABB8ZmAgAA2AhAgAEECNgIMDAkLQQAhECAAQQA2AhwgACABNgIUIABBxJSAgAA2AhAgAEECNgIMDAgLQQAhECAAQQA2AhwgACABNgIUIABB8pWAgAA2AhAgAEECNgIMDAcLIABBAjYCHCAAIAE2AhQgAEGcmoCAADYCECAAQRY2AgxBACEQDAYLQQEhEAwFC0HUACEQIAEiBCACRg0EIANBCGogACAEIAJB2MKAgABBChDFgICAACADKAIMIQQgAygCCA4DAQQCAAsQyoCAgAAACyAAQQA2AhwgAEG1moCAADYCECAAQRc2AgwgACAEQQFqNgIUQQAhEAwCCyAAQQA2AhwgACAENgIUIABBypqAgAA2AhAgAEEJNgIMQQAhEAwBCwJAIAEiBCACRw0AQSIhEAwBCyAAQYmAgIAANgIIIAAgBDYCBEEhIRALIANBEGokgICAgAAgEAuvAQECfyABKAIAIQYCQAJAIAIgA0YNACAEIAZqIQQgBiADaiACayEHIAIgBkF/cyAFaiIGaiEFA0ACQCACLQAAIAQtAABGDQBBAiEEDAMLAkAgBg0AQQAhBCAFIQIMAwsgBkF/aiEGIARBAWohBCACQQFqIgIgA0cNAAsgByEGIAMhAgsgAEEBNgIAIAEgBjYCACAAIAI2AgQPCyABQQA2AgAgACAENgIAIAAgAjYCBAsKACAAEMeAgIAAC/I2AQt/I4CAgIAAQRBrIgEkgICAgAACQEEAKAKg0ICAAA0AQQAQy4CAgABBgNSEgABrIgJB2QBJDQBBACEDAkBBACgC4NOAgAAiBA0AQQBCfzcC7NOAgABBAEKAgISAgIDAADcC5NOAgABBACABQQhqQXBxQdiq1aoFcyIENgLg04CAAEEAQQA2AvTTgIAAQQBBADYCxNOAgAALQQAgAjYCzNOAgABBAEGA1ISAADYCyNOAgABBAEGA1ISAADYCmNCAgABBACAENgKs0ICAAEEAQX82AqjQgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAtBgNSEgABBeEGA1ISAAGtBD3FBAEGA1ISAAEEIakEPcRsiA2oiBEEEaiACQUhqIgUgA2siA0EBcjYCAEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgABBgNSEgAAgBWpBODYCBAsCQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAUsNAAJAQQAoAojQgIAAIgZBECAAQRNqQXBxIABBC0kbIgJBA3YiBHYiA0EDcUUNAAJAAkAgA0EBcSAEckEBcyIFQQN0IgRBsNCAgABqIgMgBEG40ICAAGooAgAiBCgCCCICRw0AQQAgBkF+IAV3cTYCiNCAgAAMAQsgAyACNgIIIAIgAzYCDAsgBEEIaiEDIAQgBUEDdCIFQQNyNgIEIAQgBWoiBCAEKAIEQQFyNgIEDAwLIAJBACgCkNCAgAAiB00NAQJAIANFDQACQAJAIAMgBHRBAiAEdCIDQQAgA2tycSIDQQAgA2txQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmoiBEEDdCIDQbDQgIAAaiIFIANBuNCAgABqKAIAIgMoAggiAEcNAEEAIAZBfiAEd3EiBjYCiNCAgAAMAQsgBSAANgIIIAAgBTYCDAsgAyACQQNyNgIEIAMgBEEDdCIEaiAEIAJrIgU2AgAgAyACaiIAIAVBAXI2AgQCQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhBAJAAkAgBkEBIAdBA3Z0IghxDQBBACAGIAhyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAQ2AgwgAiAENgIIIAQgAjYCDCAEIAg2AggLIANBCGohA0EAIAA2ApzQgIAAQQAgBTYCkNCAgAAMDAtBACgCjNCAgAAiCUUNASAJQQAgCWtxQX9qIgMgA0EMdkEQcSIDdiIEQQV2QQhxIgUgA3IgBCAFdiIDQQJ2QQRxIgRyIAMgBHYiA0EBdkECcSIEciADIAR2IgNBAXZBAXEiBHIgAyAEdmpBAnRBuNKAgABqKAIAIgAoAgRBeHEgAmshBCAAIQUCQANAAkAgBSgCECIDDQAgBUEUaigCACIDRQ0CCyADKAIEQXhxIAJrIgUgBCAFIARJIgUbIQQgAyAAIAUbIQAgAyEFDAALCyAAKAIYIQoCQCAAKAIMIgggAEYNACAAKAIIIgNBACgCmNCAgABJGiAIIAM2AgggAyAINgIMDAsLAkAgAEEUaiIFKAIAIgMNACAAKAIQIgNFDQMgAEEQaiEFCwNAIAUhCyADIghBFGoiBSgCACIDDQAgCEEQaiEFIAgoAhAiAw0ACyALQQA2AgAMCgtBfyECIABBv39LDQAgAEETaiIDQXBxIQJBACgCjNCAgAAiB0UNAEEAIQsCQCACQYACSQ0AQR8hCyACQf///wdLDQAgA0EIdiIDIANBgP4/akEQdkEIcSIDdCIEIARBgOAfakEQdkEEcSIEdCIFIAVBgIAPakEQdkECcSIFdEEPdiADIARyIAVyayIDQQF0IAIgA0EVanZBAXFyQRxqIQsLQQAgAmshBAJAAkACQAJAIAtBAnRBuNKAgABqKAIAIgUNAEEAIQNBACEIDAELQQAhAyACQQBBGSALQQF2ayALQR9GG3QhAEEAIQgDQAJAIAUoAgRBeHEgAmsiBiAETw0AIAYhBCAFIQggBg0AQQAhBCAFIQggBSEDDAMLIAMgBUEUaigCACIGIAYgBSAAQR12QQRxakEQaigCACIFRhsgAyAGGyEDIABBAXQhACAFDQALCwJAIAMgCHINAEEAIQhBAiALdCIDQQAgA2tyIAdxIgNFDQMgA0EAIANrcUF/aiIDIANBDHZBEHEiA3YiBUEFdkEIcSIAIANyIAUgAHYiA0ECdkEEcSIFciADIAV2IgNBAXZBAnEiBXIgAyAFdiIDQQF2QQFxIgVyIAMgBXZqQQJ0QbjSgIAAaigCACEDCyADRQ0BCwNAIAMoAgRBeHEgAmsiBiAESSEAAkAgAygCECIFDQAgA0EUaigCACEFCyAGIAQgABshBCADIAggABshCCAFIQMgBQ0ACwsgCEUNACAEQQAoApDQgIAAIAJrTw0AIAgoAhghCwJAIAgoAgwiACAIRg0AIAgoAggiA0EAKAKY0ICAAEkaIAAgAzYCCCADIAA2AgwMCQsCQCAIQRRqIgUoAgAiAw0AIAgoAhAiA0UNAyAIQRBqIQULA0AgBSEGIAMiAEEUaiIFKAIAIgMNACAAQRBqIQUgACgCECIDDQALIAZBADYCAAwICwJAQQAoApDQgIAAIgMgAkkNAEEAKAKc0ICAACEEAkACQCADIAJrIgVBEEkNACAEIAJqIgAgBUEBcjYCBEEAIAU2ApDQgIAAQQAgADYCnNCAgAAgBCADaiAFNgIAIAQgAkEDcjYCBAwBCyAEIANBA3I2AgQgBCADaiIDIAMoAgRBAXI2AgRBAEEANgKc0ICAAEEAQQA2ApDQgIAACyAEQQhqIQMMCgsCQEEAKAKU0ICAACIAIAJNDQBBACgCoNCAgAAiAyACaiIEIAAgAmsiBUEBcjYCBEEAIAU2ApTQgIAAQQAgBDYCoNCAgAAgAyACQQNyNgIEIANBCGohAwwKCwJAAkBBACgC4NOAgABFDQBBACgC6NOAgAAhBAwBC0EAQn83AuzTgIAAQQBCgICEgICAwAA3AuTTgIAAQQAgAUEMakFwcUHYqtWqBXM2AuDTgIAAQQBBADYC9NOAgABBAEEANgLE04CAAEGAgAQhBAtBACEDAkAgBCACQccAaiIHaiIGQQAgBGsiC3EiCCACSw0AQQBBMDYC+NOAgAAMCgsCQEEAKALA04CAACIDRQ0AAkBBACgCuNOAgAAiBCAIaiIFIARNDQAgBSADTQ0BC0EAIQNBAEEwNgL404CAAAwKC0EALQDE04CAAEEEcQ0EAkACQAJAQQAoAqDQgIAAIgRFDQBByNOAgAAhAwNAAkAgAygCACIFIARLDQAgBSADKAIEaiAESw0DCyADKAIIIgMNAAsLQQAQy4CAgAAiAEF/Rg0FIAghBgJAQQAoAuTTgIAAIgNBf2oiBCAAcUUNACAIIABrIAQgAGpBACADa3FqIQYLIAYgAk0NBSAGQf7///8HSw0FAkBBACgCwNOAgAAiA0UNAEEAKAK404CAACIEIAZqIgUgBE0NBiAFIANLDQYLIAYQy4CAgAAiAyAARw0BDAcLIAYgAGsgC3EiBkH+////B0sNBCAGEMuAgIAAIgAgAygCACADKAIEakYNAyAAIQMLAkAgA0F/Rg0AIAJByABqIAZNDQACQCAHIAZrQQAoAujTgIAAIgRqQQAgBGtxIgRB/v///wdNDQAgAyEADAcLAkAgBBDLgICAAEF/Rg0AIAQgBmohBiADIQAMBwtBACAGaxDLgICAABoMBAsgAyEAIANBf0cNBQwDC0EAIQgMBwtBACEADAULIABBf0cNAgtBAEEAKALE04CAAEEEcjYCxNOAgAALIAhB/v///wdLDQEgCBDLgICAACEAQQAQy4CAgAAhAyAAQX9GDQEgA0F/Rg0BIAAgA08NASADIABrIgYgAkE4ak0NAQtBAEEAKAK404CAACAGaiIDNgK404CAAAJAIANBACgCvNOAgABNDQBBACADNgK804CAAAsCQAJAAkACQEEAKAKg0ICAACIERQ0AQcjTgIAAIQMDQCAAIAMoAgAiBSADKAIEIghqRg0CIAMoAggiAw0ADAMLCwJAAkBBACgCmNCAgAAiA0UNACAAIANPDQELQQAgADYCmNCAgAALQQAhA0EAIAY2AszTgIAAQQAgADYCyNOAgABBAEF/NgKo0ICAAEEAQQAoAuDTgIAANgKs0ICAAEEAQQA2AtTTgIAAA0AgA0HE0ICAAGogA0G40ICAAGoiBDYCACAEIANBsNCAgABqIgU2AgAgA0G80ICAAGogBTYCACADQczQgIAAaiADQcDQgIAAaiIFNgIAIAUgBDYCACADQdTQgIAAaiADQcjQgIAAaiIENgIAIAQgBTYCACADQdDQgIAAaiAENgIAIANBIGoiA0GAAkcNAAsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiBCAGQUhqIgUgA2siA0EBcjYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAM2ApTQgIAAQQAgBDYCoNCAgAAgACAFakE4NgIEDAILIAMtAAxBCHENACAEIAVJDQAgBCAATw0AIARBeCAEa0EPcUEAIARBCGpBD3EbIgVqIgBBACgClNCAgAAgBmoiCyAFayIFQQFyNgIEIAMgCCAGajYCBEEAQQAoAvDTgIAANgKk0ICAAEEAIAU2ApTQgIAAQQAgADYCoNCAgAAgBCALakE4NgIEDAELAkAgAEEAKAKY0ICAACIITw0AQQAgADYCmNCAgAAgACEICyAAIAZqIQVByNOAgAAhAwJAAkACQAJAAkACQAJAA0AgAygCACAFRg0BIAMoAggiAw0ADAILCyADLQAMQQhxRQ0BC0HI04CAACEDA0ACQCADKAIAIgUgBEsNACAFIAMoAgRqIgUgBEsNAwsgAygCCCEDDAALCyADIAA2AgAgAyADKAIEIAZqNgIEIABBeCAAa0EPcUEAIABBCGpBD3EbaiILIAJBA3I2AgQgBUF4IAVrQQ9xQQAgBUEIakEPcRtqIgYgCyACaiICayEDAkAgBiAERw0AQQAgAjYCoNCAgABBAEEAKAKU0ICAACADaiIDNgKU0ICAACACIANBAXI2AgQMAwsCQCAGQQAoApzQgIAARw0AQQAgAjYCnNCAgABBAEEAKAKQ0ICAACADaiIDNgKQ0ICAACACIANBAXI2AgQgAiADaiADNgIADAMLAkAgBigCBCIEQQNxQQFHDQAgBEF4cSEHAkACQCAEQf8BSw0AIAYoAggiBSAEQQN2IghBA3RBsNCAgABqIgBGGgJAIAYoAgwiBCAFRw0AQQBBACgCiNCAgABBfiAId3E2AojQgIAADAILIAQgAEYaIAQgBTYCCCAFIAQ2AgwMAQsgBigCGCEJAkACQCAGKAIMIgAgBkYNACAGKAIIIgQgCEkaIAAgBDYCCCAEIAA2AgwMAQsCQCAGQRRqIgQoAgAiBQ0AIAZBEGoiBCgCACIFDQBBACEADAELA0AgBCEIIAUiAEEUaiIEKAIAIgUNACAAQRBqIQQgACgCECIFDQALIAhBADYCAAsgCUUNAAJAAkAgBiAGKAIcIgVBAnRBuNKAgABqIgQoAgBHDQAgBCAANgIAIAANAUEAQQAoAozQgIAAQX4gBXdxNgKM0ICAAAwCCyAJQRBBFCAJKAIQIAZGG2ogADYCACAARQ0BCyAAIAk2AhgCQCAGKAIQIgRFDQAgACAENgIQIAQgADYCGAsgBigCFCIERQ0AIABBFGogBDYCACAEIAA2AhgLIAcgA2ohAyAGIAdqIgYoAgQhBAsgBiAEQX5xNgIEIAIgA2ogAzYCACACIANBAXI2AgQCQCADQf8BSw0AIANBeHFBsNCAgABqIQQCQAJAQQAoAojQgIAAIgVBASADQQN2dCIDcQ0AQQAgBSADcjYCiNCAgAAgBCEDDAELIAQoAgghAwsgAyACNgIMIAQgAjYCCCACIAQ2AgwgAiADNgIIDAMLQR8hBAJAIANB////B0sNACADQQh2IgQgBEGA/j9qQRB2QQhxIgR0IgUgBUGA4B9qQRB2QQRxIgV0IgAgAEGAgA9qQRB2QQJxIgB0QQ92IAQgBXIgAHJrIgRBAXQgAyAEQRVqdkEBcXJBHGohBAsgAiAENgIcIAJCADcCECAEQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiAEEBIAR0IghxDQAgBSACNgIAQQAgACAIcjYCjNCAgAAgAiAFNgIYIAIgAjYCCCACIAI2AgwMAwsgA0EAQRkgBEEBdmsgBEEfRht0IQQgBSgCACEAA0AgACIFKAIEQXhxIANGDQIgBEEddiEAIARBAXQhBCAFIABBBHFqQRBqIggoAgAiAA0ACyAIIAI2AgAgAiAFNgIYIAIgAjYCDCACIAI2AggMAgsgAEF4IABrQQ9xQQAgAEEIakEPcRsiA2oiCyAGQUhqIgggA2siA0EBcjYCBCAAIAhqQTg2AgQgBCAFQTcgBWtBD3FBACAFQUlqQQ9xG2pBQWoiCCAIIARBEGpJGyIIQSM2AgRBAEEAKALw04CAADYCpNCAgABBACADNgKU0ICAAEEAIAs2AqDQgIAAIAhBEGpBACkC0NOAgAA3AgAgCEEAKQLI04CAADcCCEEAIAhBCGo2AtDTgIAAQQAgBjYCzNOAgABBACAANgLI04CAAEEAQQA2AtTTgIAAIAhBJGohAwNAIANBBzYCACADQQRqIgMgBUkNAAsgCCAERg0DIAggCCgCBEF+cTYCBCAIIAggBGsiADYCACAEIABBAXI2AgQCQCAAQf8BSw0AIABBeHFBsNCAgABqIQMCQAJAQQAoAojQgIAAIgVBASAAQQN2dCIAcQ0AQQAgBSAAcjYCiNCAgAAgAyEFDAELIAMoAgghBQsgBSAENgIMIAMgBDYCCCAEIAM2AgwgBCAFNgIIDAQLQR8hAwJAIABB////B0sNACAAQQh2IgMgA0GA/j9qQRB2QQhxIgN0IgUgBUGA4B9qQRB2QQRxIgV0IgggCEGAgA9qQRB2QQJxIgh0QQ92IAMgBXIgCHJrIgNBAXQgACADQRVqdkEBcXJBHGohAwsgBCADNgIcIARCADcCECADQQJ0QbjSgIAAaiEFAkBBACgCjNCAgAAiCEEBIAN0IgZxDQAgBSAENgIAQQAgCCAGcjYCjNCAgAAgBCAFNgIYIAQgBDYCCCAEIAQ2AgwMBAsgAEEAQRkgA0EBdmsgA0EfRht0IQMgBSgCACEIA0AgCCIFKAIEQXhxIABGDQMgA0EddiEIIANBAXQhAyAFIAhBBHFqQRBqIgYoAgAiCA0ACyAGIAQ2AgAgBCAFNgIYIAQgBDYCDCAEIAQ2AggMAwsgBSgCCCIDIAI2AgwgBSACNgIIIAJBADYCGCACIAU2AgwgAiADNgIICyALQQhqIQMMBQsgBSgCCCIDIAQ2AgwgBSAENgIIIARBADYCGCAEIAU2AgwgBCADNgIIC0EAKAKU0ICAACIDIAJNDQBBACgCoNCAgAAiBCACaiIFIAMgAmsiA0EBcjYCBEEAIAM2ApTQgIAAQQAgBTYCoNCAgAAgBCACQQNyNgIEIARBCGohAwwDC0EAIQNBAEEwNgL404CAAAwCCwJAIAtFDQACQAJAIAggCCgCHCIFQQJ0QbjSgIAAaiIDKAIARw0AIAMgADYCACAADQFBACAHQX4gBXdxIgc2AozQgIAADAILIAtBEEEUIAsoAhAgCEYbaiAANgIAIABFDQELIAAgCzYCGAJAIAgoAhAiA0UNACAAIAM2AhAgAyAANgIYCyAIQRRqKAIAIgNFDQAgAEEUaiADNgIAIAMgADYCGAsCQAJAIARBD0sNACAIIAQgAmoiA0EDcjYCBCAIIANqIgMgAygCBEEBcjYCBAwBCyAIIAJqIgAgBEEBcjYCBCAIIAJBA3I2AgQgACAEaiAENgIAAkAgBEH/AUsNACAEQXhxQbDQgIAAaiEDAkACQEEAKAKI0ICAACIFQQEgBEEDdnQiBHENAEEAIAUgBHI2AojQgIAAIAMhBAwBCyADKAIIIQQLIAQgADYCDCADIAA2AgggACADNgIMIAAgBDYCCAwBC0EfIQMCQCAEQf///wdLDQAgBEEIdiIDIANBgP4/akEQdkEIcSIDdCIFIAVBgOAfakEQdkEEcSIFdCICIAJBgIAPakEQdkECcSICdEEPdiADIAVyIAJyayIDQQF0IAQgA0EVanZBAXFyQRxqIQMLIAAgAzYCHCAAQgA3AhAgA0ECdEG40oCAAGohBQJAIAdBASADdCICcQ0AIAUgADYCAEEAIAcgAnI2AozQgIAAIAAgBTYCGCAAIAA2AgggACAANgIMDAELIARBAEEZIANBAXZrIANBH0YbdCEDIAUoAgAhAgJAA0AgAiIFKAIEQXhxIARGDQEgA0EddiECIANBAXQhAyAFIAJBBHFqQRBqIgYoAgAiAg0ACyAGIAA2AgAgACAFNgIYIAAgADYCDCAAIAA2AggMAQsgBSgCCCIDIAA2AgwgBSAANgIIIABBADYCGCAAIAU2AgwgACADNgIICyAIQQhqIQMMAQsCQCAKRQ0AAkACQCAAIAAoAhwiBUECdEG40oCAAGoiAygCAEcNACADIAg2AgAgCA0BQQAgCUF+IAV3cTYCjNCAgAAMAgsgCkEQQRQgCigCECAARhtqIAg2AgAgCEUNAQsgCCAKNgIYAkAgACgCECIDRQ0AIAggAzYCECADIAg2AhgLIABBFGooAgAiA0UNACAIQRRqIAM2AgAgAyAINgIYCwJAAkAgBEEPSw0AIAAgBCACaiIDQQNyNgIEIAAgA2oiAyADKAIEQQFyNgIEDAELIAAgAmoiBSAEQQFyNgIEIAAgAkEDcjYCBCAFIARqIAQ2AgACQCAHRQ0AIAdBeHFBsNCAgABqIQJBACgCnNCAgAAhAwJAAkBBASAHQQN2dCIIIAZxDQBBACAIIAZyNgKI0ICAACACIQgMAQsgAigCCCEICyAIIAM2AgwgAiADNgIIIAMgAjYCDCADIAg2AggLQQAgBTYCnNCAgABBACAENgKQ0ICAAAsgAEEIaiEDCyABQRBqJICAgIAAIAMLCgAgABDJgICAAAviDQEHfwJAIABFDQAgAEF4aiIBIABBfGooAgAiAkF4cSIAaiEDAkAgAkEBcQ0AIAJBA3FFDQEgASABKAIAIgJrIgFBACgCmNCAgAAiBEkNASACIABqIQACQCABQQAoApzQgIAARg0AAkAgAkH/AUsNACABKAIIIgQgAkEDdiIFQQN0QbDQgIAAaiIGRhoCQCABKAIMIgIgBEcNAEEAQQAoAojQgIAAQX4gBXdxNgKI0ICAAAwDCyACIAZGGiACIAQ2AgggBCACNgIMDAILIAEoAhghBwJAAkAgASgCDCIGIAFGDQAgASgCCCICIARJGiAGIAI2AgggAiAGNgIMDAELAkAgAUEUaiICKAIAIgQNACABQRBqIgIoAgAiBA0AQQAhBgwBCwNAIAIhBSAEIgZBFGoiAigCACIEDQAgBkEQaiECIAYoAhAiBA0ACyAFQQA2AgALIAdFDQECQAJAIAEgASgCHCIEQQJ0QbjSgIAAaiICKAIARw0AIAIgBjYCACAGDQFBAEEAKAKM0ICAAEF+IAR3cTYCjNCAgAAMAwsgB0EQQRQgBygCECABRhtqIAY2AgAgBkUNAgsgBiAHNgIYAkAgASgCECICRQ0AIAYgAjYCECACIAY2AhgLIAEoAhQiAkUNASAGQRRqIAI2AgAgAiAGNgIYDAELIAMoAgQiAkEDcUEDRw0AIAMgAkF+cTYCBEEAIAA2ApDQgIAAIAEgAGogADYCACABIABBAXI2AgQPCyABIANPDQAgAygCBCICQQFxRQ0AAkACQCACQQJxDQACQCADQQAoAqDQgIAARw0AQQAgATYCoNCAgABBAEEAKAKU0ICAACAAaiIANgKU0ICAACABIABBAXI2AgQgAUEAKAKc0ICAAEcNA0EAQQA2ApDQgIAAQQBBADYCnNCAgAAPCwJAIANBACgCnNCAgABHDQBBACABNgKc0ICAAEEAQQAoApDQgIAAIABqIgA2ApDQgIAAIAEgAEEBcjYCBCABIABqIAA2AgAPCyACQXhxIABqIQACQAJAIAJB/wFLDQAgAygCCCIEIAJBA3YiBUEDdEGw0ICAAGoiBkYaAkAgAygCDCICIARHDQBBAEEAKAKI0ICAAEF+IAV3cTYCiNCAgAAMAgsgAiAGRhogAiAENgIIIAQgAjYCDAwBCyADKAIYIQcCQAJAIAMoAgwiBiADRg0AIAMoAggiAkEAKAKY0ICAAEkaIAYgAjYCCCACIAY2AgwMAQsCQCADQRRqIgIoAgAiBA0AIANBEGoiAigCACIEDQBBACEGDAELA0AgAiEFIAQiBkEUaiICKAIAIgQNACAGQRBqIQIgBigCECIEDQALIAVBADYCAAsgB0UNAAJAAkAgAyADKAIcIgRBAnRBuNKAgABqIgIoAgBHDQAgAiAGNgIAIAYNAUEAQQAoAozQgIAAQX4gBHdxNgKM0ICAAAwCCyAHQRBBFCAHKAIQIANGG2ogBjYCACAGRQ0BCyAGIAc2AhgCQCADKAIQIgJFDQAgBiACNgIQIAIgBjYCGAsgAygCFCICRQ0AIAZBFGogAjYCACACIAY2AhgLIAEgAGogADYCACABIABBAXI2AgQgAUEAKAKc0ICAAEcNAUEAIAA2ApDQgIAADwsgAyACQX5xNgIEIAEgAGogADYCACABIABBAXI2AgQLAkAgAEH/AUsNACAAQXhxQbDQgIAAaiECAkACQEEAKAKI0ICAACIEQQEgAEEDdnQiAHENAEEAIAQgAHI2AojQgIAAIAIhAAwBCyACKAIIIQALIAAgATYCDCACIAE2AgggASACNgIMIAEgADYCCA8LQR8hAgJAIABB////B0sNACAAQQh2IgIgAkGA/j9qQRB2QQhxIgJ0IgQgBEGA4B9qQRB2QQRxIgR0IgYgBkGAgA9qQRB2QQJxIgZ0QQ92IAIgBHIgBnJrIgJBAXQgACACQRVqdkEBcXJBHGohAgsgASACNgIcIAFCADcCECACQQJ0QbjSgIAAaiEEAkACQEEAKAKM0ICAACIGQQEgAnQiA3ENACAEIAE2AgBBACAGIANyNgKM0ICAACABIAQ2AhggASABNgIIIAEgATYCDAwBCyAAQQBBGSACQQF2ayACQR9GG3QhAiAEKAIAIQYCQANAIAYiBCgCBEF4cSAARg0BIAJBHXYhBiACQQF0IQIgBCAGQQRxakEQaiIDKAIAIgYNAAsgAyABNgIAIAEgBDYCGCABIAE2AgwgASABNgIIDAELIAQoAggiACABNgIMIAQgATYCCCABQQA2AhggASAENgIMIAEgADYCCAtBAEEAKAKo0ICAAEF/aiIBQX8gARs2AqjQgIAACwsEAAAAC04AAkAgAA0APwBBEHQPCwJAIABB//8DcQ0AIABBf0wNAAJAIABBEHZAACIAQX9HDQBBAEEwNgL404CAAEF/DwsgAEEQdA8LEMqAgIAAAAvyAgIDfwF+AkAgAkUNACAAIAE6AAAgAiAAaiIDQX9qIAE6AAAgAkEDSQ0AIAAgAToAAiAAIAE6AAEgA0F9aiABOgAAIANBfmogAToAACACQQdJDQAgACABOgADIANBfGogAToAACACQQlJDQAgAEEAIABrQQNxIgRqIgMgAUH/AXFBgYKECGwiATYCACADIAIgBGtBfHEiBGoiAkF8aiABNgIAIARBCUkNACADIAE2AgggAyABNgIEIAJBeGogATYCACACQXRqIAE2AgAgBEEZSQ0AIAMgATYCGCADIAE2AhQgAyABNgIQIAMgATYCDCACQXBqIAE2AgAgAkFsaiABNgIAIAJBaGogATYCACACQWRqIAE2AgAgBCADQQRxQRhyIgVrIgJBIEkNACABrUKBgICAEH4hBiADIAVqIQEDQCABIAY3AxggASAGNwMQIAEgBjcDCCABIAY3AwAgAUEgaiEBIAJBYGoiAkEfSw0ACwsgAAsLjkgBAEGACAuGSAEAAAACAAAAAwAAAAAAAAAAAAAABAAAAAUAAAAAAAAAAAAAAAYAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASW52YWxpZCBjaGFyIGluIHVybCBxdWVyeQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2JvZHkAQ29udGVudC1MZW5ndGggb3ZlcmZsb3cAQ2h1bmsgc2l6ZSBvdmVyZmxvdwBSZXNwb25zZSBvdmVyZmxvdwBJbnZhbGlkIG1ldGhvZCBmb3IgSFRUUC94LnggcmVxdWVzdABJbnZhbGlkIG1ldGhvZCBmb3IgUlRTUC94LnggcmVxdWVzdABFeHBlY3RlZCBTT1VSQ0UgbWV0aG9kIGZvciBJQ0UveC54IHJlcXVlc3QASW52YWxpZCBjaGFyIGluIHVybCBmcmFnbWVudCBzdGFydABFeHBlY3RlZCBkb3QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9zdGF0dXMASW52YWxpZCByZXNwb25zZSBzdGF0dXMASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucwBVc2VyIGNhbGxiYWNrIGVycm9yAGBvbl9yZXNldGAgY2FsbGJhY2sgZXJyb3IAYG9uX2NodW5rX2hlYWRlcmAgY2FsbGJhY2sgZXJyb3IAYG9uX21lc3NhZ2VfYmVnaW5gIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19leHRlbnNpb25fdmFsdWVgIGNhbGxiYWNrIGVycm9yAGBvbl9zdGF0dXNfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl92ZXJzaW9uX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdXJsX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAEVtcHR5IENvbnRlbnQtTGVuZ3RoAEludmFsaWQgY2hhcmFjdGVyIGluIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBNaXNzaW5nIGV4cGVjdGVkIExGIGFmdGVyIGhlYWRlciB2YWx1ZQBJbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AgaGVhZGVyIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGUgdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZWQgdmFsdWUAUGF1c2VkIGJ5IG9uX2hlYWRlcnNfY29tcGxldGUASW52YWxpZCBFT0Ygc3RhdGUAb25fcmVzZXQgcGF1c2UAb25fY2h1bmtfaGVhZGVyIHBhdXNlAG9uX21lc3NhZ2VfYmVnaW4gcGF1c2UAb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlIHBhdXNlAG9uX3N0YXR1c19jb21wbGV0ZSBwYXVzZQBvbl92ZXJzaW9uX2NvbXBsZXRlIHBhdXNlAG9uX3VybF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19jb21wbGV0ZSBwYXVzZQBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGUgcGF1c2UAb25fbWVzc2FnZV9jb21wbGV0ZSBwYXVzZQBvbl9tZXRob2RfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lIHBhdXNlAFVuZXhwZWN0ZWQgc3BhY2UgYWZ0ZXIgc3RhcnQgbGluZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX2NodW5rX2V4dGVuc2lvbl9uYW1lAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgbmFtZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AAU1dJVENIX1BST1hZAFVTRV9QUk9YWQBNS0FDVElWSVRZAFVOUFJPQ0VTU0FCTEVfRU5USVRZAENPUFkATU9WRURfUEVSTUFORU5UTFkAVE9PX0VBUkxZAE5PVElGWQBGQUlMRURfREVQRU5ERU5DWQBCQURfR0FURVdBWQBQTEFZAFBVVABDSEVDS09VVABHQVRFV0FZX1RJTUVPVVQAUkVRVUVTVF9USU1FT1VUAE5FVFdPUktfQ09OTkVDVF9USU1FT1VUAENPTk5FQ1RJT05fVElNRU9VVABMT0dJTl9USU1FT1VUAE5FVFdPUktfUkVBRF9USU1FT1VUAFBPU1QATUlTRElSRUNURURfUkVRVUVTVABDTElFTlRfQ0xPU0VEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9MT0FEX0JBTEFOQ0VEX1JFUVVFU1QAQkFEX1JFUVVFU1QASFRUUF9SRVFVRVNUX1NFTlRfVE9fSFRUUFNfUE9SVABSRVBPUlQASU1fQV9URUFQT1QAUkVTRVRfQ09OVEVOVABOT19DT05URU5UAFBBUlRJQUxfQ09OVEVOVABIUEVfSU5WQUxJRF9DT05TVEFOVABIUEVfQ0JfUkVTRVQAR0VUAEhQRV9TVFJJQ1QAQ09ORkxJQ1QAVEVNUE9SQVJZX1JFRElSRUNUAFBFUk1BTkVOVF9SRURJUkVDVABDT05ORUNUAE1VTFRJX1NUQVRVUwBIUEVfSU5WQUxJRF9TVEFUVVMAVE9PX01BTllfUkVRVUVTVFMARUFSTFlfSElOVFMAVU5BVkFJTEFCTEVfRk9SX0xFR0FMX1JFQVNPTlMAT1BUSU9OUwBTV0lUQ0hJTkdfUFJPVE9DT0xTAFZBUklBTlRfQUxTT19ORUdPVElBVEVTAE1VTFRJUExFX0NIT0lDRVMASU5URVJOQUxfU0VSVkVSX0VSUk9SAFdFQl9TRVJWRVJfVU5LTk9XTl9FUlJPUgBSQUlMR1VOX0VSUk9SAElERU5USVRZX1BST1ZJREVSX0FVVEhFTlRJQ0FUSU9OX0VSUk9SAFNTTF9DRVJUSUZJQ0FURV9FUlJPUgBJTlZBTElEX1hfRk9SV0FSREVEX0ZPUgBTRVRfUEFSQU1FVEVSAEdFVF9QQVJBTUVURVIASFBFX1VTRVIAU0VFX09USEVSAEhQRV9DQl9DSFVOS19IRUFERVIATUtDQUxFTkRBUgBTRVRVUABXRUJfU0VSVkVSX0lTX0RPV04AVEVBUkRPV04ASFBFX0NMT1NFRF9DT05ORUNUSU9OAEhFVVJJU1RJQ19FWFBJUkFUSU9OAERJU0NPTk5FQ1RFRF9PUEVSQVRJT04ATk9OX0FVVEhPUklUQVRJVkVfSU5GT1JNQVRJT04ASFBFX0lOVkFMSURfVkVSU0lPTgBIUEVfQ0JfTUVTU0FHRV9CRUdJTgBTSVRFX0lTX0ZST1pFTgBIUEVfSU5WQUxJRF9IRUFERVJfVE9LRU4ASU5WQUxJRF9UT0tFTgBGT1JCSURERU4ARU5IQU5DRV9ZT1VSX0NBTE0ASFBFX0lOVkFMSURfVVJMAEJMT0NLRURfQllfUEFSRU5UQUxfQ09OVFJPTABNS0NPTABBQ0wASFBFX0lOVEVSTkFMAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0VfVU5PRkZJQ0lBTABIUEVfT0sAVU5MSU5LAFVOTE9DSwBQUkkAUkVUUllfV0lUSABIUEVfSU5WQUxJRF9DT05URU5UX0xFTkdUSABIUEVfVU5FWFBFQ1RFRF9DT05URU5UX0xFTkdUSABGTFVTSABQUk9QUEFUQ0gATS1TRUFSQ0gAVVJJX1RPT19MT05HAFBST0NFU1NJTkcATUlTQ0VMTEFORU9VU19QRVJTSVNURU5UX1dBUk5JTkcATUlTQ0VMTEFORU9VU19XQVJOSU5HAEhQRV9JTlZBTElEX1RSQU5TRkVSX0VOQ09ESU5HAEV4cGVjdGVkIENSTEYASFBFX0lOVkFMSURfQ0hVTktfU0laRQBNT1ZFAENPTlRJTlVFAEhQRV9DQl9TVEFUVVNfQ09NUExFVEUASFBFX0NCX0hFQURFUlNfQ09NUExFVEUASFBFX0NCX1ZFUlNJT05fQ09NUExFVEUASFBFX0NCX1VSTF9DT01QTEVURQBIUEVfQ0JfQ0hVTktfQ09NUExFVEUASFBFX0NCX0hFQURFUl9WQUxVRV9DT01QTEVURQBIUEVfQ0JfQ0hVTktfRVhURU5TSU9OX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fTkFNRV9DT01QTEVURQBIUEVfQ0JfTUVTU0FHRV9DT01QTEVURQBIUEVfQ0JfTUVUSE9EX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJfRklFTERfQ09NUExFVEUAREVMRVRFAEhQRV9JTlZBTElEX0VPRl9TVEFURQBJTlZBTElEX1NTTF9DRVJUSUZJQ0FURQBQQVVTRQBOT19SRVNQT05TRQBVTlNVUFBPUlRFRF9NRURJQV9UWVBFAEdPTkUATk9UX0FDQ0VQVEFCTEUAU0VSVklDRV9VTkFWQUlMQUJMRQBSQU5HRV9OT1RfU0FUSVNGSUFCTEUAT1JJR0lOX0lTX1VOUkVBQ0hBQkxFAFJFU1BPTlNFX0lTX1NUQUxFAFBVUkdFAE1FUkdFAFJFUVVFU1RfSEVBREVSX0ZJRUxEU19UT09fTEFSR0UAUkVRVUVTVF9IRUFERVJfVE9PX0xBUkdFAFBBWUxPQURfVE9PX0xBUkdFAElOU1VGRklDSUVOVF9TVE9SQUdFAEhQRV9QQVVTRURfVVBHUkFERQBIUEVfUEFVU0VEX0gyX1VQR1JBREUAU09VUkNFAEFOTk9VTkNFAFRSQUNFAEhQRV9VTkVYUEVDVEVEX1NQQUNFAERFU0NSSUJFAFVOU1VCU0NSSUJFAFJFQ09SRABIUEVfSU5WQUxJRF9NRVRIT0QATk9UX0ZPVU5EAFBST1BGSU5EAFVOQklORABSRUJJTkQAVU5BVVRIT1JJWkVEAE1FVEhPRF9OT1RfQUxMT1dFRABIVFRQX1ZFUlNJT05fTk9UX1NVUFBPUlRFRABBTFJFQURZX1JFUE9SVEVEAEFDQ0VQVEVEAE5PVF9JTVBMRU1FTlRFRABMT09QX0RFVEVDVEVEAEhQRV9DUl9FWFBFQ1RFRABIUEVfTEZfRVhQRUNURUQAQ1JFQVRFRABJTV9VU0VEAEhQRV9QQVVTRUQAVElNRU9VVF9PQ0NVUkVEAFBBWU1FTlRfUkVRVUlSRUQAUFJFQ09ORElUSU9OX1JFUVVJUkVEAFBST1hZX0FVVEhFTlRJQ0FUSU9OX1JFUVVJUkVEAE5FVFdPUktfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATEVOR1RIX1JFUVVJUkVEAFNTTF9DRVJUSUZJQ0FURV9SRVFVSVJFRABVUEdSQURFX1JFUVVJUkVEAFBBR0VfRVhQSVJFRABQUkVDT05ESVRJT05fRkFJTEVEAEVYUEVDVEFUSU9OX0ZBSUxFRABSRVZBTElEQVRJT05fRkFJTEVEAFNTTF9IQU5EU0hBS0VfRkFJTEVEAExPQ0tFRABUUkFOU0ZPUk1BVElPTl9BUFBMSUVEAE5PVF9NT0RJRklFRABOT1RfRVhURU5ERUQAQkFORFdJRFRIX0xJTUlUX0VYQ0VFREVEAFNJVEVfSVNfT1ZFUkxPQURFRABIRUFEAEV4cGVjdGVkIEhUVFAvAABeEwAAJhMAADAQAADwFwAAnRMAABUSAAA5FwAA8BIAAAoQAAB1EgAArRIAAIITAABPFAAAfxAAAKAVAAAjFAAAiRIAAIsUAABNFQAA1BEAAM8UAAAQGAAAyRYAANwWAADBEQAA4BcAALsUAAB0FAAAfBUAAOUUAAAIFwAAHxAAAGUVAACjFAAAKBUAAAIVAACZFQAALBAAAIsZAABPDwAA1A4AAGoQAADOEAAAAhcAAIkOAABuEwAAHBMAAGYUAABWFwAAwRMAAM0TAABsEwAAaBcAAGYXAABfFwAAIhMAAM4PAABpDgAA2A4AAGMWAADLEwAAqg4AACgXAAAmFwAAxRMAAF0WAADoEQAAZxMAAGUTAADyFgAAcxMAAB0XAAD5FgAA8xEAAM8OAADOFQAADBIAALMRAAClEQAAYRAAADIXAAC7EwAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAgMCAgICAgAAAgIAAgIAAgICAgICAgICAgAEAAAAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgAAAAICAgICAgICAgICAgICAgICAgICAgICAgICAgICAAIAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAIAAgICAgIAAAICAAICAAICAgICAgICAgIAAwAEAAAAAgICAgICAgICAgICAgICAgICAgICAgICAgIAAAACAgICAgICAgICAgICAgICAgICAgICAgICAgICAgACAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABsb3NlZWVwLWFsaXZlAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQEBAQEBAQEBAQEBAgEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQFjaHVua2VkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGVjdGlvbmVudC1sZW5ndGhvbnJveHktY29ubmVjdGlvbgAAAAAAAAAAAAAAAAAAAHJhbnNmZXItZW5jb2RpbmdwZ3JhZGUNCg0KDQpTTQ0KDQpUVFAvQ0UvVFNQLwAAAAAAAAAAAAAAAAECAAEDAAAAAAAAAAAAAAAAAAAAAAAABAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAABAgABAwAAAAAAAAAAAAAAAAAAAAAAAAQBAQUBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAQEAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAABAAACAAAAAAAAAAAAAAAAAAAAAAAAAwQAAAQEBAQEBAQEBAQEBQQEBAQEBAQEBAQEBAAEAAYHBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAQABAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAgAAAAACAAAAAAAAAAAAAAAAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAE5PVU5DRUVDS09VVE5FQ1RFVEVDUklCRUxVU0hFVEVBRFNFQVJDSFJHRUNUSVZJVFlMRU5EQVJWRU9USUZZUFRJT05TQ0hTRUFZU1RBVENIR0VPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFSFRUUC9BRFRQLw==' + + +/***/ }), + +/***/ 29451: +/***/ ((__unused_webpack_module, 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; +//# sourceMappingURL=utils.js.map + +/***/ }), + +/***/ 21627: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { kClients } = __nccwpck_require__(48039) +const Agent = __nccwpck_require__(97464) +const { + kAgent, + kMockAgentSet, + kMockAgentGet, + kDispatches, + kIsMockActive, + kNetConnect, + kGetNetConnect, + kOptions, + kFactory +} = __nccwpck_require__(50865) +const MockClient = __nccwpck_require__(52905) +const MockPool = __nccwpck_require__(28511) +const { matchValue, buildMockOptions } = __nccwpck_require__(63643) +const { InvalidArgumentError, UndiciError } = __nccwpck_require__(46339) +const Dispatcher = __nccwpck_require__(73272) +const Pluralizer = __nccwpck_require__(70764) +const PendingInterceptorsFormatter = __nccwpck_require__(79197) + +class FakeWeakRef { + constructor (value) { + this.value = value + } + + deref () { + return this.value + } +} + +class MockAgent extends Dispatcher { + constructor (opts) { + super(opts) + + this[kNetConnect] = true + this[kIsMockActive] = true + + // Instantiate Agent and encapsulate + if ((opts && opts.agent && typeof opts.agent.dispatch !== 'function')) { + throw new InvalidArgumentError('Argument opts.agent must implement Agent') + } + const agent = opts && 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) { + // Call MockAgent.get to perform additional setup before dispatching as normal + 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 + } + + // This is required to bypass issues caused by using global symbols - see: + // https://github.com/nodejs/undici/issues/1447 + 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(origin, mockOptions) + : new MockPool(origin, mockOptions) + } + + [kMockAgentGet] (origin) { + // First check if we can immediately find it + const ref = this[kClients].get(origin) + if (ref) { + return ref.deref() + } + + // If the origin is not a string create a dummy parent pool and return to user + if (typeof origin !== 'string') { + const dispatcher = this[kFactory]('http://localhost:9999') + this[kMockAgentSet](origin, dispatcher) + return dispatcher + } + + // If we match, create a pool and assign the same dispatches + 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 + + +/***/ }), + +/***/ 52905: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { promisify } = __nccwpck_require__(73837) +const Client = __nccwpck_require__(52463) +const { buildMockDispatch } = __nccwpck_require__(63643) +const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected +} = __nccwpck_require__(50865) +const { MockInterceptor } = __nccwpck_require__(6418) +const Symbols = __nccwpck_require__(48039) +const { InvalidArgumentError } = __nccwpck_require__(46339) + +/** + * MockClient provides an API that extends the Client to influence the mockDispatches. + */ +class MockClient 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(this[kOriginalClose])() + this[kConnected] = 0 + this[kMockAgent][Symbols.kClients].delete(this[kOrigin]) + } +} + +module.exports = MockClient + + +/***/ }), + +/***/ 31816: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { UndiciError } = __nccwpck_require__(46339) + +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' + } +} + +module.exports = { + MockNotMatchedError +} + + +/***/ }), + +/***/ 6418: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { getResponseData, buildKey, addMockDispatch } = __nccwpck_require__(63643) +const { + kDispatches, + kDispatchKey, + kDefaultHeaders, + kDefaultTrailers, + kContentLength, + kMockDispatch +} = __nccwpck_require__(50865) +const { InvalidArgumentError } = __nccwpck_require__(46339) +const { buildURL } = __nccwpck_require__(67468) + +/** + * Defines the scope API for an interceptor reply + */ +class MockScope { + 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 + */ +class MockInterceptor { + 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' + } + // See https://github.com/nodejs/undici/issues/1245 + // As per RFC 3986, clients are not supposed to send URI + // fragments to servers when they retrieve a document, + if (typeof opts.path === 'string') { + if (opts.query) { + opts.path = buildURL(opts.path, opts.query) + } else { + // Matches https://github.com/nodejs/undici/blob/main/lib/fetch/index.js#L1811 + 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 } : {} + 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('statusCode must be defined') + } + if (typeof data === 'undefined') { + throw new InvalidArgumentError('data must be defined') + } + if (typeof responseOptions !== 'object') { + throw new InvalidArgumentError('responseOptions must be an object') + } + } + + /** + * Mock an undici request with a defined reply. + */ + reply (replyData) { + // Values of reply aren't available right now as they + // can only be available when the reply callback is invoked. + if (typeof replyData === 'function') { + // We'll first wrap the provided callback in another function, + // this function will properly resolve the data from the callback + // when invoked. + const wrappedDefaultsCallback = (opts) => { + // Our reply options callback contains the parameter for statusCode, data and options. + const resolvedData = replyData(opts) + + // Check if it is in the right format + if (typeof resolvedData !== 'object') { + throw new InvalidArgumentError('reply options callback must return an object') + } + + const { statusCode, data = '', responseOptions = {} } = resolvedData + this.validateReplyParameters(statusCode, data, responseOptions) + // Since the values can be obtained immediately we return them + // from this higher order function that will be resolved later. + return { + ...this.createMockScopeDispatchData(statusCode, data, responseOptions) + } + } + + // Add usual dispatch data, but this time set the data parameter to function that will eventually provide data. + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback) + return new MockScope(newMockDispatch) + } + + // We can have either one or three parameters, if we get here, + // we should have 1-3 parameters. So we spread the arguments of + // this function to obtain the parameters, since replyData will always + // just be the statusCode. + const [statusCode, data = '', responseOptions = {}] = [...arguments] + this.validateReplyParameters(statusCode, data, responseOptions) + + // Send in-already provided data like usual + const dispatchData = this.createMockScopeDispatchData(statusCode, data, responseOptions) + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData) + return new MockScope(newMockDispatch) + } + + /** + * Mock an undici request with a defined error. + */ + replyWithError (error) { + if (typeof error === 'undefined') { + throw new InvalidArgumentError('error must be defined') + } + + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }) + return new MockScope(newMockDispatch) + } + + /** + * 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 + + +/***/ }), + +/***/ 28511: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { promisify } = __nccwpck_require__(73837) +const Pool = __nccwpck_require__(85186) +const { buildMockDispatch } = __nccwpck_require__(63643) +const { + kDispatches, + kMockAgent, + kClose, + kOriginalClose, + kOrigin, + kOriginalDispatch, + kConnected +} = __nccwpck_require__(50865) +const { MockInterceptor } = __nccwpck_require__(6418) +const Symbols = __nccwpck_require__(48039) +const { InvalidArgumentError } = __nccwpck_require__(46339) + +/** + * MockPool provides an API that extends the Pool to influence the mockDispatches. + */ +class MockPool 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 + + +/***/ }), + +/***/ 50865: +/***/ ((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') +} + + +/***/ }), + +/***/ 63643: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { MockNotMatchedError } = __nccwpck_require__(31816) +const { + kDispatches, + kMockAgent, + kOriginalDispatch, + kOrigin, + kGetNetConnect +} = __nccwpck_require__(50865) +const { buildURL, nop } = __nccwpck_require__(67468) +const { STATUS_CODES } = __nccwpck_require__(13685) +const { + types: { + isPromise + } +} = __nccwpck_require__(73837) + +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 undefined + } else if (typeof headers.get === 'function') { + return headers.get(key) + } else { + return lowerCaseEntries(headers)[key.toLocaleLowerCase()] + } +} + +/** @param {string[]} headers */ +function buildHeadersFromArray (headers) { // fetch HeadersList + 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)) { // fetch HeadersList + 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)) { + const headerValue = getHeaderByName(headers, matchHeaderName) + + if (!matchValue(matchHeaderValue, headerValue)) { + 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 (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 + + // Match path + 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}'`) + } + + // Match method + matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)) + if (matchedMockDispatches.length === 0) { + throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}'`) + } + + // Match body + 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}'`) + } + + // Match headers + 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}'`) + } + + 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) { + 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[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) { + // Get mock dispatch from built key + const key = buildKey(opts) + const mockDispatch = getMockDispatch(this[kDispatches], key) + + mockDispatch.timesInvoked++ + + // Here's where we resolve a callback if a callback is present for the dispatch data. + if (mockDispatch.data.callback) { + mockDispatch.data = { ...mockDispatch.data, ...mockDispatch.data.callback(opts) } + } + + // Parse mockDispatch data + const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch + const { timesInvoked, times } = mockDispatch + + // If it's used up and not persistent, mark as consumed + mockDispatch.consumed = !persist && timesInvoked >= times + mockDispatch.pending = timesInvoked < times + + // If specified, trigger dispatch error + if (error !== null) { + deleteMockDispatch(this[kDispatches], key) + handler.onError(error) + return true + } + + // Handle the request with a delay if necessary + if (typeof delay === 'number' && delay > 0) { + setTimeout(() => { + handleReply(this[kDispatches]) + }, delay) + } else { + handleReply(this[kDispatches]) + } + + function handleReply (mockDispatches, _data = data) { + // fetch's HeadersList is a 1D string array + const optsHeaders = Array.isArray(opts.headers) + ? buildHeadersFromArray(opts.headers) + : opts.headers + const body = typeof _data === 'function' + ? _data({ ...opts, headers: optsHeaders }) + : _data + + // util.types.isPromise is likely needed for jest. + if (isPromise(body)) { + // If handleReply is asynchronous, throwing an error + // in the callback will reject the promise, rather than + // synchronously throw the error, which breaks some tests. + // Rather, we wait for the callback to resolve if it is a + // promise, and then re-run handleReply with the new body. + body.then((newData) => handleReply(mockDispatches, newData)) + return + } + + const responseData = getResponseData(body) + const responseHeaders = generateKeyValues(headers) + const responseTrailers = generateKeyValues(trailers) + + handler.abort = nop + 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 +} + + +/***/ }), + +/***/ 79197: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { Transform } = __nccwpck_require__(12781) +const { Console } = __nccwpck_require__(96206) + +/** + * Gets the output of `console.table(…)` as a string. + */ +module.exports = class PendingInterceptorsFormatter { + 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, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + Method: method, + Origin: origin, + Path: path, + 'Status code': statusCode, + Persistent: persist ? '✅' : '❌', + Invocations: timesInvoked, + Remaining: persist ? Infinity : times - timesInvoked + })) + + this.logger.table(withPrettyHeaders) + return this.transform.read().toString() + } +} + + +/***/ }), + +/***/ 70764: +/***/ ((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 } + } +} + + +/***/ }), + +/***/ 82046: +/***/ ((module) => { + +/* eslint-disable */ + + + +// Extracted from node/lib/internal/fixed_queue.js + +// Currently optimal queue size, tested on V8 6.0 - 6.6. Must be power of two. +const kSize = 2048; +const kMask = kSize - 1; + +// The FixedQueue is implemented as a singly-linked list of fixed-size +// circular buffers. It looks something like this: +// +// head tail +// | | +// v v +// +-----------+ <-----\ +-----------+ <------\ +-----------+ +// | [null] | \----- | next | \------- | next | +// +-----------+ +-----------+ +-----------+ +// | item | <-- bottom | item | <-- bottom | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | | [empty] | +// | item | | item | bottom --> | item | +// | item | | item | | item | +// | ... | | ... | | ... | +// | item | | item | | item | +// | item | | item | | item | +// | [empty] | <-- top | item | | item | +// | [empty] | | item | | item | +// | [empty] | | [empty] | <-- top top --> | [empty] | +// +-----------+ +-----------+ +-----------+ +// +// Or, if there is only one circular buffer, it looks something +// like either of these: +// +// head tail head tail +// | | | | +// v v v v +// +-----------+ +-----------+ +// | [null] | | [null] | +// +-----------+ +-----------+ +// | [empty] | | item | +// | [empty] | | item | +// | item | <-- bottom top --> | [empty] | +// | item | | [empty] | +// | [empty] | <-- top bottom --> | item | +// | [empty] | | item | +// +-----------+ +-----------+ +// +// Adding a value means moving `top` forward by one, removing means +// moving `bottom` forward by one. After reaching the end, the queue +// wraps around. +// +// When `top === bottom` the current queue is empty and when +// `top + 1 === bottom` it's full. This wastes a single space of storage +// but allows much quicker checks. + +class FixedCircularBuffer { + 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 === undefined) + return null; + this.list[this.bottom] = undefined; + 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()) { + // Head is full: Creates a new queue, sets the old queue's `.next` to it, + // and sets it as the new main queue. + 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) { + // If there is another queue, it forms the new tail. + this.tail = tail.next; + } + return next; + } +}; + + +/***/ }), + +/***/ 68504: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const DispatcherBase = __nccwpck_require__(32426) +const FixedQueue = __nccwpck_require__(82046) +const { kConnected, kSize, kRunning, kPending, kQueued, kBusy, kFree, kUrl, kClose, kDestroy, kDispatch } = __nccwpck_require__(48039) +const PoolStats = __nccwpck_require__(44226) + +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') + +class PoolBase 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()) { + return Promise.all(this[kClients].map(c => c.close())) + } else { + return new Promise((resolve) => { + this[kClosedResolve] = resolve + }) + } + } + + async [kDestroy] (err) { + while (true) { + const item = this[kQueue].shift() + if (!item) { + break + } + item.handler.onError(err) + } + + return 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]) { + process.nextTick(() => { + 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 +} + + +/***/ }), + +/***/ 44226: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { kFree, kConnected, kPending, kQueued, kRunning, kSize } = __nccwpck_require__(48039) +const kPool = Symbol('pool') + +class PoolStats { + 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 + + +/***/ }), + +/***/ 85186: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { + PoolBase, + kClients, + kNeedDrain, + kAddClient, + kGetDispatcher +} = __nccwpck_require__(68504) +const Client = __nccwpck_require__(52463) +const { + InvalidArgumentError +} = __nccwpck_require__(46339) +const util = __nccwpck_require__(67468) +const { kUrl, kInterceptors } = __nccwpck_require__(48039) +const buildConnector = __nccwpck_require__(2209) + +const kOptions = Symbol('options') +const kConnections = Symbol('connections') +const kFactory = Symbol('factory') + +function defaultFactory (origin, opts) { + return new Client(origin, opts) +} + +class Pool 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, + ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), + ...connect + }) + } + + this[kInterceptors] = options.interceptors && 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 } + : undefined + this[kFactory] = factory + } + + [kGetDispatcher] () { + let dispatcher = this[kClients].find(dispatcher => !dispatcher[kNeedDrain]) + + if (dispatcher) { + return dispatcher + } + + if (!this[kConnections] || this[kClients].length < this[kConnections]) { + dispatcher = this[kFactory](this[kUrl], this[kOptions]) + this[kAddClient](dispatcher) + } + + return dispatcher + } +} + +module.exports = Pool + + +/***/ }), + +/***/ 44417: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { kProxy, kClose, kDestroy, kInterceptors } = __nccwpck_require__(48039) +const { URL } = __nccwpck_require__(57310) +const Agent = __nccwpck_require__(97464) +const Pool = __nccwpck_require__(85186) +const DispatcherBase = __nccwpck_require__(32426) +const { InvalidArgumentError, RequestAbortedError } = __nccwpck_require__(46339) +const buildConnector = __nccwpck_require__(2209) + +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('Proxy opts.uri is mandatory') + } + + return { + uri: opts.uri, + protocol: opts.protocol || 'https' + } +} + +function defaultFactory (origin, opts) { + return new Pool(origin, opts) +} + +class ProxyAgent extends DispatcherBase { + constructor (opts) { + super(opts) + this[kProxy] = buildProxyOptions(opts) + this[kAgent] = new Agent(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('Proxy opts.uri is mandatory') + } + + const { clientFactory = defaultFactory } = opts + + if (typeof clientFactory !== 'function') { + throw new InvalidArgumentError('Proxy opts.clientFactory must be a function.') + } + + this[kRequestTls] = opts.requestTls + this[kProxyTls] = opts.proxyTls + this[kProxyHeaders] = opts.headers || {} + + const resolvedUrl = new URL(opts.uri) + const { origin, port, host, username, password } = resolvedUrl + + if (opts.auth && opts.token) { + throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') + } else if (opts.auth) { + /* @deprecated in favour of opts.token */ + 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 }) + this[kClient] = clientFactory(resolvedUrl, { connect }) + this[kAgent] = new Agent({ + ...opts, + connect: async (opts, callback) => { + let requestedHost = opts.host + if (!opts.port) { + requestedHost += `:${defaultProtocolPort(opts.protocol)}` + } + try { + const { socket, statusCode } = await this[kClient].connect({ + origin, + port, + path: requestedHost, + signal: opts.signal, + headers: { + ...this[kProxyHeaders], + host + } + }) + if (statusCode !== 200) { + socket.on('error', () => {}).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) { + callback(err) + } + } + }) + } + + dispatch (opts, handler) { + const { host } = new URL(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) { + // When using undici.fetch, the headers list is stored + // as an array. + 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('Proxy-Authorization should be sent in ProxyAgent constructor') + } +} + +module.exports = ProxyAgent + + +/***/ }), + +/***/ 38965: +/***/ ((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() + } + } +} + +class Timeout { + constructor (callback, delay, opaque) { + this.callback = callback + this.delay = delay + this.opaque = opaque + + // -2 not in timer list + // -1 in timer list but inactive + // 0 in timer list waiting for time + // > 0 in timer list waiting for time to expire + 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) + } + } +} + + +/***/ }), + +/***/ 60337: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const diagnosticsChannel = __nccwpck_require__(67643) +const { uid, states } = __nccwpck_require__(6246) +const { + kReadyState, + kSentClose, + kByteParser, + kReceivedClose +} = __nccwpck_require__(18099) +const { fireEvent, failWebsocketConnection } = __nccwpck_require__(72125) +const { CloseEvent } = __nccwpck_require__(28381) +const { makeRequest } = __nccwpck_require__(7288) +const { fetching } = __nccwpck_require__(72748) +const { Headers } = __nccwpck_require__(23245) +const { getGlobalDispatcher } = __nccwpck_require__(29102) +const { kHeadersList } = __nccwpck_require__(48039) + +const channels = {} +channels.open = diagnosticsChannel.channel('undici:websocket:open') +channels.close = diagnosticsChannel.channel('undici:websocket:close') +channels.socketError = diagnosticsChannel.channel('undici:websocket:socket_error') + +/** @type {import('crypto')} */ +let crypto +try { + crypto = __nccwpck_require__(6113) +} 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 (url, protocols, ws, onEstablish, options) { + // 1. Let requestURL be a copy of url, with its scheme set to "http", if url’s + // scheme is "ws", and to "https" otherwise. + const requestURL = url + + requestURL.protocol = url.protocol === 'ws:' ? 'http:' : 'https:' + + // 2. Let request be a new request, whose URL is requestURL, client is client, + // service-workers mode is "none", referrer is "no-referrer", mode is + // "websocket", credentials mode is "include", cache mode is "no-store" , + // and redirect mode is "error". + const request = makeRequest({ + urlList: [requestURL], + serviceWorkers: 'none', + referrer: 'no-referrer', + mode: 'websocket', + credentials: 'include', + cache: 'no-store', + redirect: 'error' + }) + + // Note: undici extension, allow setting custom headers. + if (options.headers) { + const headersList = new Headers(options.headers)[kHeadersList] + + request.headersList = headersList + } + + // 3. Append (`Upgrade`, `websocket`) to request’s header list. + // 4. Append (`Connection`, `Upgrade`) to request’s header list. + // Note: both of these are handled by undici currently. + // https://github.com/nodejs/undici/blob/68c269c4144c446f3f1220951338daef4a6b5ec4/lib/client.js#L1397 + + // 5. Let keyValue be a nonce consisting of a randomly selected + // 16-byte value that has been forgiving-base64-encoded and + // isomorphic encoded. + const keyValue = crypto.randomBytes(16).toString('base64') + + // 6. Append (`Sec-WebSocket-Key`, keyValue) to request’s + // header list. + request.headersList.append('sec-websocket-key', keyValue) + + // 7. Append (`Sec-WebSocket-Version`, `13`) to request’s + // header list. + request.headersList.append('sec-websocket-version', '13') + + // 8. For each protocol in protocols, combine + // (`Sec-WebSocket-Protocol`, protocol) in request’s header + // list. + for (const protocol of protocols) { + request.headersList.append('sec-websocket-protocol', protocol) + } + + // 9. Let permessageDeflate be a user-agent defined + // "permessage-deflate" extension header value. + // https://github.com/mozilla/gecko-dev/blob/ce78234f5e653a5d3916813ff990f053510227bc/netwerk/protocol/websocket/WebSocketChannel.cpp#L2673 + // TODO: enable once permessage-deflate is supported + const permessageDeflate = '' // 'permessage-deflate; 15' + + // 10. Append (`Sec-WebSocket-Extensions`, permessageDeflate) to + // request’s header list. + // request.headersList.append('sec-websocket-extensions', permessageDeflate) + + // 11. Fetch request with useParallelQueue set to true, and + // processResponse given response being these steps: + const controller = fetching({ + request, + useParallelQueue: true, + dispatcher: options.dispatcher ?? getGlobalDispatcher(), + processResponse (response) { + // 1. If response is a network error or its status is not 101, + // fail the WebSocket connection. + if (response.type === 'error' || response.status !== 101) { + failWebsocketConnection(ws, 'Received network error or non-101 status code.') + return + } + + // 2. If protocols is not the empty list and extracting header + // list values given `Sec-WebSocket-Protocol` and response’s + // header list results in null, failure, or the empty byte + // sequence, then fail the WebSocket connection. + if (protocols.length !== 0 && !response.headersList.get('Sec-WebSocket-Protocol')) { + failWebsocketConnection(ws, 'Server did not respond with sent protocols.') + return + } + + // 3. Follow the requirements stated step 2 to step 6, inclusive, + // of the last set of steps in section 4.1 of The WebSocket + // Protocol to validate response. This either results in fail + // the WebSocket connection or the WebSocket connection is + // established. + + // 2. If the response lacks an |Upgrade| header field or the |Upgrade| + // header field contains a value that is not an ASCII case- + // insensitive match for the value "websocket", the client MUST + // _Fail the WebSocket Connection_. + if (response.headersList.get('Upgrade')?.toLowerCase() !== 'websocket') { + failWebsocketConnection(ws, 'Server did not set Upgrade header to "websocket".') + return + } + + // 3. If the response lacks a |Connection| header field or the + // |Connection| header field doesn't contain a token that is an + // ASCII case-insensitive match for the value "Upgrade", the client + // MUST _Fail the WebSocket Connection_. + if (response.headersList.get('Connection')?.toLowerCase() !== 'upgrade') { + failWebsocketConnection(ws, 'Server did not set Connection header to "upgrade".') + return + } + + // 4. If the response lacks a |Sec-WebSocket-Accept| header field or + // the |Sec-WebSocket-Accept| contains a value other than the + // base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket- + // Key| (as a string, not base64-decoded) with the string "258EAFA5- + // E914-47DA-95CA-C5AB0DC85B11" but ignoring any leading and + // trailing whitespace, the client MUST _Fail the WebSocket + // Connection_. + const secWSAccept = response.headersList.get('Sec-WebSocket-Accept') + const digest = crypto.createHash('sha1').update(keyValue + uid).digest('base64') + if (secWSAccept !== digest) { + failWebsocketConnection(ws, 'Incorrect hash received in Sec-WebSocket-Accept header.') + return + } + + // 5. If the response includes a |Sec-WebSocket-Extensions| header + // field and this header field indicates the use of an extension + // that was not present in the client's handshake (the server has + // indicated an extension not requested by the client), the client + // MUST _Fail the WebSocket Connection_. (The parsing of this + // header field to determine which extensions are requested is + // discussed in Section 9.1.) + const secExtension = response.headersList.get('Sec-WebSocket-Extensions') + + if (secExtension !== null && secExtension !== permessageDeflate) { + failWebsocketConnection(ws, 'Received different permessage-deflate than the one set.') + return + } + + // 6. If the response includes a |Sec-WebSocket-Protocol| header field + // and this header field indicates the use of a subprotocol that was + // not present in the client's handshake (the server has indicated a + // subprotocol not requested by the client), the client MUST _Fail + // the WebSocket Connection_. + const secProtocol = response.headersList.get('Sec-WebSocket-Protocol') + + if (secProtocol !== null && secProtocol !== request.headersList.get('Sec-WebSocket-Protocol')) { + 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) + } + }) + + return controller +} + +/** + * @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 + + // If the TCP connection was closed after the + // WebSocket closing handshake was completed, the WebSocket connection + // is said to have been closed _cleanly_. + const wasClean = ws[kSentClose] && ws[kReceivedClose] + + let code = 1005 + let reason = '' + + const result = ws[kByteParser].closingInfo + + if (result) { + code = result.code ?? 1005 + reason = result.reason + } else if (!ws[kSentClose]) { + // If _The WebSocket + // Connection is Closed_ and no Close control frame was received by the + // endpoint (such as could occur if the underlying transport connection + // is lost), _The WebSocket Connection Close Code_ is considered to be + // 1006. + code = 1006 + } + + // 1. Change the ready state to CLOSED (3). + ws[kReadyState] = states.CLOSED + + // 2. If the user agent was required to fail the WebSocket + // connection, or if the WebSocket connection was closed + // after being flagged as full, fire an event named error + // at the WebSocket object. + // TODO + + // 3. Fire an event named close at the WebSocket object, + // using CloseEvent, with the wasClean attribute + // initialized to true if the connection closed cleanly + // and false otherwise, the code attribute initialized to + // the WebSocket connection close code, and the reason + // attribute initialized to the result of applying UTF-8 + // decode without BOM to the WebSocket connection close + // reason. + fireEvent('close', ws, CloseEvent, { + 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 +} + + +/***/ }), + +/***/ 6246: +/***/ ((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 +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 opcodes = { + CONTINUATION: 0x0, + TEXT: 0x1, + BINARY: 0x2, + CLOSE: 0x8, + PING: 0x9, + PONG: 0xA +} + +const maxUnsigned16Bit = 2 ** 16 - 1 // 65535 + +const parserStates = { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 +} + +const emptyBuffer = Buffer.allocUnsafe(0) + +module.exports = { + uid, + staticPropertyDescriptors, + states, + opcodes, + maxUnsigned16Bit, + parserStates, + emptyBuffer +} + + +/***/ }), + +/***/ 28381: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { webidl } = __nccwpck_require__(96138) +const { kEnumerableProperty } = __nccwpck_require__(67468) +const { MessagePort } = __nccwpck_require__(71267) + +/** + * @see https://html.spec.whatwg.org/multipage/comms.html#messageevent + */ +class MessageEvent extends Event { + #eventInit + + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'MessageEvent constructor' }) + + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.MessageEventInit(eventInitDict) + + super(type, eventInitDict) + + this.#eventInit = eventInitDict + } + + 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, { header: 'MessageEvent.initMessageEvent' }) + + return new MessageEvent(type, { + bubbles, cancelable, data, origin, lastEventId, source, ports + }) + } +} + +/** + * @see https://websockets.spec.whatwg.org/#the-closeevent-interface + */ +class CloseEvent extends Event { + #eventInit + + constructor (type, eventInitDict = {}) { + webidl.argumentLengthCheck(arguments, 1, { header: 'CloseEvent constructor' }) + + type = webidl.converters.DOMString(type) + eventInitDict = webidl.converters.CloseEventInit(eventInitDict) + + super(type, eventInitDict) + + this.#eventInit = eventInitDict + } + + 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 + } +} + +// https://html.spec.whatwg.org/multipage/webappapis.html#the-errorevent-interface +class ErrorEvent extends Event { + #eventInit + + constructor (type, eventInitDict) { + webidl.argumentLengthCheck(arguments, 1, { header: 'ErrorEvent constructor' }) + + super(type, eventInitDict) + + type = webidl.converters.DOMString(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', + // Node doesn't implement WindowProxy or ServiceWorker, so the only + // valid value for source is a MessagePort. + converter: webidl.nullableConverter(webidl.converters.MessagePort), + defaultValue: null + }, + { + key: 'ports', + converter: webidl.converters['sequence'], + get defaultValue () { + return [] + } + } +]) + +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 +} + + +/***/ }), + +/***/ 15020: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { maxUnsigned16Bit } = __nccwpck_require__(6246) + +/** @type {import('crypto')} */ +let crypto +try { + crypto = __nccwpck_require__(6113) +} catch { + +} + +class WebsocketFrameSend { + /** + * @param {Buffer|undefined} data + */ + constructor (data) { + this.frameData = data + this.maskKey = crypto.randomBytes(4) + } + + createFrame (opcode) { + const bodyLength = this.frameData?.byteLength ?? 0 + + /** @type {number} */ + let payloadLength = bodyLength // 0-125 + let offset = 6 + + if (bodyLength > maxUnsigned16Bit) { + offset += 8 // payload length is next 8 bytes + payloadLength = 127 + } else if (bodyLength > 125) { + offset += 2 // payload length is next 2 bytes + payloadLength = 126 + } + + const buffer = Buffer.allocUnsafe(bodyLength + offset) + + // Clear first 2 bytes, everything else is overwritten + buffer[0] = buffer[1] = 0 + buffer[0] |= 0x80 // FIN + buffer[0] = (buffer[0] & 0xF0) + opcode // 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, 2) + } else if (payloadLength === 127) { + // Clear extended payload length + buffer[2] = buffer[3] = 0 + buffer.writeUIntBE(bodyLength, 4, 6) + } + + buffer[1] |= 0x80 // MASK + + // mask body + for (let i = 0; i < bodyLength; i++) { + buffer[offset + i] = this.frameData[i] ^ this.maskKey[i % 4] + } + + return buffer + } +} + +module.exports = { + WebsocketFrameSend +} + + +/***/ }), + +/***/ 59808: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { Writable } = __nccwpck_require__(12781) +const diagnosticsChannel = __nccwpck_require__(67643) +const { parserStates, opcodes, states, emptyBuffer } = __nccwpck_require__(6246) +const { kReadyState, kSentClose, kResponse, kReceivedClose } = __nccwpck_require__(18099) +const { isValidStatusCode, failWebsocketConnection, websocketMessageReceived } = __nccwpck_require__(72125) +const { WebsocketFrameSend } = __nccwpck_require__(15020) + +// This code was influenced by ws released under the MIT license. +// Copyright (c) 2011 Einar Otto Stangvik +// Copyright (c) 2013 Arnout Kazemier and contributors +// Copyright (c) 2016 Luigi Pinca and contributors + +const channels = {} +channels.ping = diagnosticsChannel.channel('undici:websocket:ping') +channels.pong = diagnosticsChannel.channel('undici:websocket:pong') + +class ByteParser 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 there aren't enough bytes to parse the payload length, etc. + if (this.#byteOffset < 2) { + return callback() + } + + const buffer = this.consume(2) + + this.#info.fin = (buffer[0] & 0x80) !== 0 + this.#info.opcode = buffer[0] & 0x0F + + // If we receive a fragmented message, we use the type of the first + // frame to parse the full message as binary/text, when it's terminated + this.#info.originalOpcode ??= this.#info.opcode + + this.#info.fragmented = !this.#info.fin && this.#info.opcode !== opcodes.CONTINUATION + + if (this.#info.fragmented && this.#info.opcode !== opcodes.BINARY && this.#info.opcode !== opcodes.TEXT) { + // Only text and binary frames can be fragmented + failWebsocketConnection(this.ws, 'Invalid frame type was fragmented.') + return + } + + const payloadLength = buffer[1] & 0x7F + + 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) { + // A fragmented frame can't be fragmented itself + failWebsocketConnection(this.ws, 'Fragmented frame exceeded 125 bytes.') + return + } else if ( + (this.#info.opcode === opcodes.PING || + this.#info.opcode === opcodes.PONG || + this.#info.opcode === opcodes.CLOSE) && + payloadLength > 125 + ) { + // Control frames can have a payload length of 125 bytes MAX + failWebsocketConnection(this.ws, 'Payload length for control frame exceeded 125 bytes.') + return + } else if (this.#info.opcode === opcodes.CLOSE) { + if (payloadLength === 1) { + failWebsocketConnection(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]) { + // If an endpoint receives a Close frame and did not previously send a + // Close frame, the endpoint MUST send a Close frame in response. (When + // sending a Close frame in response, the endpoint typically echos the + // status code it received.) + const 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] = true + } + } + ) + } + + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this.ws[kReadyState] = states.CLOSING + this.ws[kReceivedClose] = true + + this.end() + + return + } else if (this.#info.opcode === opcodes.PING) { + // Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in + // response, unless it already received a Close frame. + // A Pong frame sent in response to a Ping frame must have identical + // "Application data" + + const body = this.consume(payloadLength) + + 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 + }) + } + } + + this.#state = parserStates.INFO + + if (this.#byteOffset > 0) { + continue + } else { + callback() + return + } + } else if (this.#info.opcode === opcodes.PONG) { + // A Pong frame MAY be sent unsolicited. This serves as a + // unidirectional heartbeat. A response to an unsolicited Pong frame is + // not expected. + + 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) + + // 2^31 is the maxinimum bytes an arraybuffer can contain + // on 32-bit systems. Although, on 64-bit systems, this is + // 2^53-1 bytes. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Invalid_array_length + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/common/globals.h;drc=1946212ac0100668f14eb9e2843bdd846e510a1e;bpv=1;bpt=1;l=1275 + // https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/js-array-buffer.h;l=34;drc=1946212ac0100668f14eb9e2843bdd846e510a1e + 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) { + // If there is still more data in this chunk that needs to be read + return callback() + } else if (this.#byteOffset >= this.#info.payloadLength) { + // If the server sent multiple frames in a single chunk + + const body = this.consume(this.#info.payloadLength) + + this.#fragments.push(body) + + // If the frame is unfragmented, or a fragmented frame was terminated, + // a message was received + if (!this.#info.fragmented || (this.#info.fin && this.#info.opcode === opcodes.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 + } + + 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) { + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5 + /** @type {number|undefined} */ + let code + + if (data.length >= 2) { + // _The WebSocket Connection Close Code_ is + // defined as the status code (Section 7.4) contained in the first Close + // control frame received by the application + code = data.readUInt16BE(0) + } + + if (onlyCode) { + if (!isValidStatusCode(code)) { + return null + } + + return { code } + } + + // https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6 + /** @type {Buffer} */ + let reason = data.subarray(2) + + // Remove BOM + if (reason[0] === 0xEF && reason[1] === 0xBB && reason[2] === 0xBF) { + reason = reason.subarray(3) + } + + if (code !== undefined && !isValidStatusCode(code)) { + return null + } + + try { + // TODO: optimize this + reason = new TextDecoder('utf-8', { fatal: true }).decode(reason) + } catch { + return null + } + + return { code, reason } + } + + get closingInfo () { + return this.#info.closeInfo + } +} + +module.exports = { + ByteParser +} + + +/***/ }), + +/***/ 18099: +/***/ ((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') +} + + +/***/ }), + +/***/ 72125: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { kReadyState, kController, kResponse, kBinaryType, kWebSocketURL } = __nccwpck_require__(18099) +const { states, opcodes } = __nccwpck_require__(6246) +const { MessageEvent, ErrorEvent } = __nccwpck_require__(28381) + +/* globals Blob */ + +/** + * @param {import('./websocket').WebSocket} ws + */ +function isEstablished (ws) { + // If the server's response is validated as provided for above, it is + // said that _The WebSocket Connection is Established_ and that the + // WebSocket Connection is in the OPEN state. + return ws[kReadyState] === states.OPEN +} + +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosing (ws) { + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + return ws[kReadyState] === states.CLOSING +} + +/** + * @param {import('./websocket').WebSocket} ws + */ +function isClosed (ws) { + return ws[kReadyState] === states.CLOSED +} + +/** + * @see https://dom.spec.whatwg.org/#concept-event-fire + * @param {string} e + * @param {EventTarget} target + * @param {EventInit | undefined} eventInitDict + */ +function fireEvent (e, target, eventConstructor = Event, eventInitDict) { + // 1. If eventConstructor is not given, then let eventConstructor be Event. + + // 2. Let event be the result of creating an event given eventConstructor, + // in the relevant realm of target. + // 3. Initialize event’s type attribute to e. + const event = new eventConstructor(e, eventInitDict) // eslint-disable-line new-cap + + // 4. Initialize any other IDL attributes of event as described in the + // invocation of this algorithm. + + // 5. Return the result of dispatching event at target, with legacy target + // override flag set if set. + 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) { + // 1. If ready state is not OPEN (1), then return. + if (ws[kReadyState] !== states.OPEN) { + return + } + + // 2. Let dataForEvent be determined by switching on type and binary type: + let dataForEvent + + if (type === opcodes.TEXT) { + // -> type indicates that the data is Text + // a new DOMString containing data + try { + dataForEvent = new TextDecoder('utf-8', { fatal: true }).decode(data) + } catch { + failWebsocketConnection(ws, 'Received invalid UTF-8 in text frame.') + return + } + } else if (type === opcodes.BINARY) { + if (ws[kBinaryType] === 'blob') { + // -> type indicates that the data is Binary and binary type is "blob" + // a new Blob object, created in the relevant Realm of the WebSocket + // object, that represents data as its raw data + dataForEvent = new Blob([data]) + } else { + // -> type indicates that the data is Binary and binary type is "arraybuffer" + // a new ArrayBuffer object, created in the relevant Realm of the + // WebSocket object, whose contents are data + dataForEvent = new Uint8Array(data).buffer + } + } + + // 3. Fire an event named message at the WebSocket object, using MessageEvent, + // with the origin attribute initialized to the serialization of the WebSocket + // object’s url's origin, and the data attribute initialized to dataForEvent. + fireEvent('message', ws, MessageEvent, { + origin: ws[kWebSocketURL].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 (protocol) { + // If present, this value indicates one + // or more comma-separated subprotocol the client wishes to speak, + // ordered by preference. The elements that comprise this value + // MUST be non-empty strings with characters in the range U+0021 to + // U+007E not including separator characters as defined in + // [RFC2616] and MUST all be unique strings. + if (protocol.length === 0) { + return false + } + + for (const char of protocol) { + const code = char.charCodeAt(0) + + if ( + code < 0x21 || + code > 0x7E || + char === '(' || + char === ')' || + char === '<' || + char === '>' || + char === '@' || + char === ',' || + char === ';' || + char === ':' || + char === '\\' || + char === '"' || + char === '/' || + char === '[' || + char === ']' || + char === '?' || + char === '=' || + char === '{' || + char === '}' || + code === 32 || // SP + code === 9 // HT + ) { + return false + } + } + + return true +} + +/** + * @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4 + * @param {number} code + */ +function isValidStatusCode (code) { + if (code >= 1000 && code < 1015) { + return ( + code !== 1004 && // reserved + code !== 1005 && // "MUST NOT be set as a status code" + code !== 1006 // "MUST NOT be set as a status code" + ) + } + + return code >= 3000 && 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, ErrorEvent, { + error: new Error(reason) + }) + } +} + +module.exports = { + isEstablished, + isClosing, + isClosed, + fireEvent, + isValidSubprotocol, + isValidStatusCode, + failWebsocketConnection, + websocketMessageReceived +} + + +/***/ }), + +/***/ 53726: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const { webidl } = __nccwpck_require__(96138) +const { DOMException } = __nccwpck_require__(93541) +const { URLSerializer } = __nccwpck_require__(50096) +const { getGlobalOrigin } = __nccwpck_require__(64110) +const { staticPropertyDescriptors, states, opcodes, emptyBuffer } = __nccwpck_require__(6246) +const { + kWebSocketURL, + kReadyState, + kController, + kBinaryType, + kResponse, + kSentClose, + kByteParser +} = __nccwpck_require__(18099) +const { isEstablished, isClosing, isValidSubprotocol, failWebsocketConnection, fireEvent } = __nccwpck_require__(72125) +const { establishWebSocketConnection } = __nccwpck_require__(60337) +const { WebsocketFrameSend } = __nccwpck_require__(15020) +const { ByteParser } = __nccwpck_require__(59808) +const { kEnumerableProperty, isBlobLike } = __nccwpck_require__(67468) +const { getGlobalDispatcher } = __nccwpck_require__(29102) +const { types } = __nccwpck_require__(73837) + +let experimentalWarned = false + +// https://websockets.spec.whatwg.org/#interface-definition +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 + + // 1. Let baseURL be this's relevant settings object's API base URL. + const baseURL = getGlobalOrigin() + + // 1. Let urlRecord be the result of applying the URL parser to url with baseURL. + let urlRecord + + try { + urlRecord = new URL(url, baseURL) + } catch (e) { + // 3. If urlRecord is failure, then throw a "SyntaxError" DOMException. + throw new DOMException(e, 'SyntaxError') + } + + // 4. If urlRecord’s scheme is "http", then set urlRecord’s scheme to "ws". + if (urlRecord.protocol === 'http:') { + urlRecord.protocol = 'ws:' + } else if (urlRecord.protocol === 'https:') { + // 5. Otherwise, if urlRecord’s scheme is "https", set urlRecord’s scheme to "wss". + urlRecord.protocol = 'wss:' + } + + // 6. If urlRecord’s scheme is not "ws" or "wss", then throw a "SyntaxError" DOMException. + if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') { + throw new DOMException( + `Expected a ws: or wss: protocol, got ${urlRecord.protocol}`, + 'SyntaxError' + ) + } + + // 7. If urlRecord’s fragment is non-null, then throw a "SyntaxError" + // DOMException. + if (urlRecord.hash || urlRecord.href.endsWith('#')) { + throw new DOMException('Got fragment', 'SyntaxError') + } + + // 8. If protocols is a string, set protocols to a sequence consisting + // of just that string. + if (typeof protocols === 'string') { + protocols = [protocols] + } + + // 9. If any of the values in protocols occur more than once or otherwise + // fail to match the requirements for elements that comprise the value + // of `Sec-WebSocket-Protocol` fields as defined by The WebSocket + // protocol, then throw a "SyntaxError" DOMException. + 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') + } + + // 10. Set this's url to urlRecord. + this[kWebSocketURL] = new URL(urlRecord.href) + + // 11. Let client be this's relevant settings object. + + // 12. Run this step in parallel: + + // 1. Establish a WebSocket connection given urlRecord, protocols, + // and client. + this[kController] = establishWebSocketConnection( + urlRecord, + protocols, + this, + (response) => this.#onConnectionEstablished(response), + options + ) + + // Each WebSocket object has an associated ready state, which is a + // number representing the state of the connection. Initially it must + // be CONNECTING (0). + this[kReadyState] = WebSocket.CONNECTING + + // The extensions attribute must initially return the empty string. + + // The protocol attribute must initially return the empty string. + + // Each WebSocket object has an associated binary type, which is a + // BinaryType. Initially it must be "blob". + this[kBinaryType] = 'blob' + } + + /** + * @see https://websockets.spec.whatwg.org/#dom-websocket-close + * @param {number|undefined} code + * @param {string|undefined} reason + */ + close (code = undefined, reason = undefined) { + webidl.brandCheck(this, WebSocket) + + if (code !== undefined) { + code = webidl.converters['unsigned short'](code, { clamp: true }) + } + + if (reason !== undefined) { + reason = webidl.converters.USVString(reason) + } + + // 1. If code is present, but is neither an integer equal to 1000 nor an + // integer in the range 3000 to 4999, inclusive, throw an + // "InvalidAccessError" DOMException. + if (code !== undefined) { + if (code !== 1000 && (code < 3000 || code > 4999)) { + throw new DOMException('invalid code', 'InvalidAccessError') + } + } + + let reasonByteLength = 0 + + // 2. If reason is present, then run these substeps: + if (reason !== undefined) { + // 1. Let reasonBytes be the result of encoding reason. + // 2. If reasonBytes is longer than 123 bytes, then throw a + // "SyntaxError" DOMException. + reasonByteLength = Buffer.byteLength(reason) + + if (reasonByteLength > 123) { + throw new DOMException( + `Reason must be less than 123 bytes; received ${reasonByteLength}`, + 'SyntaxError' + ) + } + } + + // 3. Run the first matching steps from the following list: + if (this[kReadyState] === WebSocket.CLOSING || this[kReadyState] === WebSocket.CLOSED) { + // If this's ready state is CLOSING (2) or CLOSED (3) + // Do nothing. + } else if (!isEstablished(this)) { + // If the WebSocket connection is not yet established + // Fail the WebSocket connection and set this's ready state + // to CLOSING (2). + failWebsocketConnection(this, 'Connection was closed before it was established.') + this[kReadyState] = WebSocket.CLOSING + } else if (!isClosing(this)) { + // If the WebSocket closing handshake has not yet been started + // Start the WebSocket closing handshake and set this's ready + // state to CLOSING (2). + // - If neither code nor reason is present, the WebSocket Close + // message must not have a body. + // - If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + // - If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + + const frame = new WebsocketFrameSend() + + // If neither code nor reason is present, the WebSocket Close + // message must not have a body. + + // If code is present, then the status code to use in the + // WebSocket Close message must be the integer given by code. + if (code !== undefined && reason === undefined) { + frame.frameData = Buffer.allocUnsafe(2) + frame.frameData.writeUInt16BE(code, 0) + } else if (code !== undefined && reason !== undefined) { + // If reason is also present, then reasonBytes must be + // provided in the Close message after the status code. + frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength) + frame.frameData.writeUInt16BE(code, 0) + // the body MAY contain UTF-8-encoded data with value /reason/ + 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 + } + }) + + // Upon either sending or receiving a Close control frame, it is said + // that _The WebSocket Closing Handshake is Started_ and that the + // WebSocket connection is in the CLOSING state. + this[kReadyState] = states.CLOSING + } else { + // Otherwise + // Set this's ready state to CLOSING (2). + 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) + + // 1. If this's ready state is CONNECTING, then throw an + // "InvalidStateError" DOMException. + if (this[kReadyState] === WebSocket.CONNECTING) { + throw new DOMException('Sent before connected.', 'InvalidStateError') + } + + // 2. Run the appropriate set of steps from the following list: + // https://datatracker.ietf.org/doc/html/rfc6455#section-6.1 + // https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 + + if (!isEstablished(this) || isClosing(this)) { + return + } + + /** @type {import('stream').Duplex} */ + const socket = this[kResponse].socket + + // If data is a string + if (typeof data === 'string') { + // If the WebSocket connection is established and the WebSocket + // closing handshake has not yet started, then the user agent + // must send a WebSocket Message comprised of the data argument + // using a text frame opcode; if the data cannot be sent, e.g. + // because it would need to be buffered but the buffer is full, + // the user agent must flag the WebSocket as full and then close + // the WebSocket connection. Any invocation of this method with a + // string argument that does not throw an exception must increase + // the bufferedAmount attribute by the number of bytes needed to + // express the argument as UTF-8. + + 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)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need + // to be buffered but the buffer is full, the user agent must flag + // the WebSocket as full and then close the WebSocket connection. + // The data to be sent is the data stored in the buffer described + // by the ArrayBuffer object. Any invocation of this method with an + // ArrayBuffer argument that does not throw an exception must + // increase the bufferedAmount attribute by the length of the + // ArrayBuffer in bytes. + + 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)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The + // data to be sent is the data stored in the section of the buffer + // described by the ArrayBuffer object that data references. Any + // invocation of this method with this kind of argument that does + // not throw an exception must increase the bufferedAmount attribute + // by the length of data’s buffer in bytes. + + 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)) { + // If the WebSocket connection is established, and the WebSocket + // closing handshake has not yet started, then the user agent must + // send a WebSocket Message comprised of data using a binary frame + // opcode; if the data cannot be sent, e.g. because it would need to + // be buffered but the buffer is full, the user agent must flag the + // WebSocket as full and then close the WebSocket connection. The data + // to be sent is the raw data represented by the Blob object. Any + // invocation of this method with a Blob argument that does not throw + // an exception must increase the bufferedAmount attribute by the size + // of the Blob object’s raw data, in bytes. + + 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) + + // The readyState getter steps are to return this's ready state. + return this[kReadyState] + } + + get bufferedAmount () { + webidl.brandCheck(this, WebSocket) + + return this.#bufferedAmount + } + + get url () { + webidl.brandCheck(this, WebSocket) + + // The url getter steps are to return this's url, serialized. + 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) { + // processResponse is called when the "response’s header list has been received and initialized." + // once this happens, the connection is open + 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 + + // 1. Change the ready state to OPEN (1). + this[kReadyState] = states.OPEN + + // 2. Change the extensions attribute’s value to the extensions in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-9.1 + const extensions = response.headersList.get('sec-websocket-extensions') + + if (extensions !== null) { + this.#extensions = extensions + } + + // 3. Change the protocol attribute’s value to the subprotocol in use, if + // it is not the null value. + // https://datatracker.ietf.org/doc/html/rfc6455#section-1.9 + const protocol = response.headersList.get('sec-websocket-protocol') + + if (protocol !== null) { + this.#protocol = protocol + } + + // 4. Fire an event named open at the WebSocket object. + fireEvent('open', this) + } +} + +// https://websockets.spec.whatwg.org/#dom-websocket-connecting +WebSocket.CONNECTING = WebSocket.prototype.CONNECTING = states.CONNECTING +// https://websockets.spec.whatwg.org/#dom-websocket-open +WebSocket.OPEN = WebSocket.prototype.OPEN = states.OPEN +// https://websockets.spec.whatwg.org/#dom-websocket-closing +WebSocket.CLOSING = WebSocket.prototype.CLOSING = states.CLOSING +// https://websockets.spec.whatwg.org/#dom-websocket-closed +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) +} + +// This implements the propsal made in https://github.com/whatwg/websockets/issues/42 +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() + } + }, + { + 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 +} + + +/***/ }), + +/***/ 60031: +/***/ ((__unused_webpack_module, exports) => { + +======= +/***/ 35770: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +Object.defineProperty(exports, "__esModule", ({ value: true })); + +function getUserAgent() { + if (typeof navigator === "object" && "userAgent" in navigator) { + return navigator.userAgent; + } + +<<<<<<< HEAD + if (typeof process === "object" && process.version !== undefined) { +======= + if (typeof process === "object" && "version" in process) { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; + } + + return ""; +} + +exports.getUserAgent = getUserAgent; +//# sourceMappingURL=index.js.map + + +/***/ }), + +<<<<<<< HEAD +/***/ 13472: +======= +/***/ 49360: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "v1", ({ + enumerable: true, + get: function () { + return _v.default; + } +})); +Object.defineProperty(exports, "v3", ({ + enumerable: true, + get: function () { + return _v2.default; + } +})); +Object.defineProperty(exports, "v4", ({ + enumerable: true, + get: function () { + return _v3.default; + } +})); +Object.defineProperty(exports, "v5", ({ + enumerable: true, + get: function () { + return _v4.default; + } +})); +Object.defineProperty(exports, "NIL", ({ + enumerable: true, + get: function () { + return _nil.default; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function () { + return _version.default; + } +})); +Object.defineProperty(exports, "validate", ({ + enumerable: true, + get: function () { + return _validate.default; + } +})); +Object.defineProperty(exports, "stringify", ({ + enumerable: true, + get: function () { + return _stringify.default; + } +})); +Object.defineProperty(exports, "parse", ({ + enumerable: true, + get: function () { + return _parse.default; + } +})); + +<<<<<<< HEAD +var _v = _interopRequireDefault(__nccwpck_require__(39635)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(69432)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(47505)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(37492)); + +var _nil = _interopRequireDefault(__nccwpck_require__(98316)); + +var _version = _interopRequireDefault(__nccwpck_require__(5110)); + +var _validate = _interopRequireDefault(__nccwpck_require__(92441)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(21590)); + +var _parse = _interopRequireDefault(__nccwpck_require__(19956)); +======= +var _v = _interopRequireDefault(__nccwpck_require__(89125)); + +var _v2 = _interopRequireDefault(__nccwpck_require__(46530)); + +var _v3 = _interopRequireDefault(__nccwpck_require__(33930)); + +var _v4 = _interopRequireDefault(__nccwpck_require__(22681)); + +var _nil = _interopRequireDefault(__nccwpck_require__(51361)); + +var _version = _interopRequireDefault(__nccwpck_require__(28987)); + +var _validate = _interopRequireDefault(__nccwpck_require__(67848)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(39004)); + +var _parse = _interopRequireDefault(__nccwpck_require__(72615)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/***/ }), + +<<<<<<< HEAD +/***/ 59621: +======= +/***/ 1611: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('md5').update(bytes).digest(); +} + +var _default = md5; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 98316: +======= +/***/ 51361: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = '00000000-0000-0000-0000-000000000000'; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 19956: +======= +/***/ 72615: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _validate = _interopRequireDefault(__nccwpck_require__(92441)); +======= +var _validate = _interopRequireDefault(__nccwpck_require__(67848)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function parse(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + let v; + const arr = new Uint8Array(16); // Parse ########-....-....-....-............ + + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 0xff; + arr[2] = v >>> 8 & 0xff; + arr[3] = v & 0xff; // Parse ........-####-....-....-............ + + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 0xff; // Parse ........-....-####-....-............ + + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 0xff; // Parse ........-....-....-####-............ + + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 0xff; // Parse ........-....-....-....-############ + // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) + + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; + arr[11] = v / 0x100000000 & 0xff; + arr[12] = v >>> 24 & 0xff; + arr[13] = v >>> 16 & 0xff; + arr[14] = v >>> 8 & 0xff; + arr[15] = v & 0xff; + return arr; +} + +var _default = parse; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 33654: +======= +/***/ 73270: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; +var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 5618: +======= +/***/ 32714: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = rng; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + +let poolPtr = rnds8Pool.length; + +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + _crypto.default.randomFillSync(rnds8Pool); + + poolPtr = 0; + } + + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} + +/***/ }), + +<<<<<<< HEAD +/***/ 88645: +======= +/***/ 39908: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === 'string') { + bytes = Buffer.from(bytes, 'utf8'); + } + + return _crypto.default.createHash('sha1').update(bytes).digest(); +} + +var _default = sha1; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 21590: +======= +/***/ 39004: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _validate = _interopRequireDefault(__nccwpck_require__(92441)); +======= +var _validate = _interopRequireDefault(__nccwpck_require__(67848)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +const byteToHex = []; + +for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 0x100).toString(16).substr(1)); +} + +function stringify(arr, offset = 0) { + // Note: Be careful editing this code! It's been tuned for performance + // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one + // of the following: + // - One or more input array values don't map to a hex octet (leading to + // "undefined" in the uuid) + // - Invalid input values for the RFC `version` or `variant` fields + + if (!(0, _validate.default)(uuid)) { + throw TypeError('Stringified UUID is invalid'); + } + + return uuid; +} + +var _default = stringify; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 39635: +======= +/***/ 89125: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _rng = _interopRequireDefault(__nccwpck_require__(5618)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(21590)); +======= +var _rng = _interopRequireDefault(__nccwpck_require__(32714)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(39004)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html +let _nodeId; + +let _clockseq; // Previous uuid creation time + + +let _lastMSecs = 0; +let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details + +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || _rng.default)(); + + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + + + let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + + let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) + + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression + + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + + + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; + } // Per 4.2.1.2 Throw error if too many uuids are requested + + + if (nsecs >= 10000) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + + msecs += 12219292800000; // `time_low` + + const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; // `time_mid` + + const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; // `time_high_and_version` + + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + + b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + + b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` + + b[i++] = clockseq & 0xff; // `node` + + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf || (0, _stringify.default)(b); +} + +var _default = v1; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 69432: +======= +/***/ 46530: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _v = _interopRequireDefault(__nccwpck_require__(41893)); + +var _md = _interopRequireDefault(__nccwpck_require__(59621)); +======= +var _v = _interopRequireDefault(__nccwpck_require__(60535)); + +var _md = _interopRequireDefault(__nccwpck_require__(1611)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v3 = (0, _v.default)('v3', 0x30, _md.default); +var _default = v3; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 41893: +======= +/***/ 60535: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = _default; +exports.URL = exports.DNS = void 0; + +<<<<<<< HEAD +var _stringify = _interopRequireDefault(__nccwpck_require__(21590)); + +var _parse = _interopRequireDefault(__nccwpck_require__(19956)); +======= +var _stringify = _interopRequireDefault(__nccwpck_require__(39004)); + +var _parse = _interopRequireDefault(__nccwpck_require__(72615)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); // UTF8 escape + + const bytes = []; + + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + + return bytes; +} + +const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; +exports.DNS = DNS; +const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; +exports.URL = URL; + +function _default(name, version, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === 'string') { + value = stringToBytes(value); + } + + if (typeof namespace === 'string') { + namespace = (0, _parse.default)(namespace); + } + + if (namespace.length !== 16) { + throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); + } // Compute hash of namespace and value, Per 4.3 + // Future: Use spread syntax when supported on all platforms, e.g. `bytes = + // hashfunc([...namespace, ... value])` + + + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 0x0f | version; + bytes[8] = bytes[8] & 0x3f | 0x80; + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + + return buf; + } + + return (0, _stringify.default)(bytes); + } // Function#name is not settable on some platforms (#270) + + + try { + generateUUID.name = name; // eslint-disable-next-line no-empty + } catch (err) {} // For CommonJS default export support + + + generateUUID.DNS = DNS; + generateUUID.URL = URL; + return generateUUID; +} + +/***/ }), + +<<<<<<< HEAD +/***/ 47505: +======= +/***/ 33930: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _rng = _interopRequireDefault(__nccwpck_require__(5618)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(21590)); +======= +var _rng = _interopRequireDefault(__nccwpck_require__(32714)); + +var _stringify = _interopRequireDefault(__nccwpck_require__(39004)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function v4(options, buf, offset) { + options = options || {}; + + const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + + + rnds[6] = rnds[6] & 0x0f | 0x40; + rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + + if (buf) { + offset = offset || 0; + + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + + return buf; + } + + return (0, _stringify.default)(rnds); +} + +var _default = v4; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 37492: +======= +/***/ 22681: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _v = _interopRequireDefault(__nccwpck_require__(41893)); + +var _sha = _interopRequireDefault(__nccwpck_require__(88645)); +======= +var _v = _interopRequireDefault(__nccwpck_require__(60535)); + +var _sha = _interopRequireDefault(__nccwpck_require__(39908)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +const v5 = (0, _v.default)('v5', 0x50, _sha.default); +var _default = v5; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 92441: +======= +/***/ 67848: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _regex = _interopRequireDefault(__nccwpck_require__(33654)); +======= +var _regex = _interopRequireDefault(__nccwpck_require__(73270)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function validate(uuid) { + return typeof uuid === 'string' && _regex.default.test(uuid); +} + +var _default = validate; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 5110: +======= +/***/ 28987: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports["default"] = void 0; + +<<<<<<< HEAD +var _validate = _interopRequireDefault(__nccwpck_require__(92441)); +======= +var _validate = _interopRequireDefault(__nccwpck_require__(67848)); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function version(uuid) { + if (!(0, _validate.default)(uuid)) { + throw TypeError('Invalid UUID'); + } + + return parseInt(uuid.substr(14, 1), 16); +} + +var _default = version; +exports["default"] = _default; + +/***/ }), + +<<<<<<< HEAD +/***/ 8909: +======= +/***/ 21628: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +exports.TextEncoder = + typeof TextEncoder !== "undefined" ? TextEncoder : (__nccwpck_require__(73837).TextEncoder) + +exports.TextDecoder = + typeof TextDecoder !== "undefined" ? TextDecoder : (__nccwpck_require__(73837).TextDecoder) + + +/***/ }), + +/***/ 10078: +/***/ (function(__unused_webpack_module, exports) { + +/** + * web-streams-polyfill v3.2.1 + */ +(function (global, factory) { + true ? factory(exports) : + 0; +}(this, (function (exports) { 'use strict'; + + /// + var SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? + Symbol : + function (description) { return "Symbol(" + description + ")"; }; + + /// + function noop() { + return undefined; + } + function getGlobals() { + if (typeof self !== 'undefined') { + return self; + } + else if (typeof window !== 'undefined') { + return window; + } + else if (typeof global !== 'undefined') { + return global; + } + return undefined; + } + var globals = getGlobals(); + + function typeIsObject(x) { + return (typeof x === 'object' && x !== null) || typeof x === 'function'; + } + var rethrowAssertionErrorRejection = noop; + + var originalPromise = Promise; + var originalPromiseThen = Promise.prototype.then; + var originalPromiseResolve = Promise.resolve.bind(originalPromise); + var originalPromiseReject = Promise.reject.bind(originalPromise); + function newPromise(executor) { + return new originalPromise(executor); + } + function promiseResolvedWith(value) { + return originalPromiseResolve(value); + } + function promiseRejectedWith(reason) { + return originalPromiseReject(reason); + } + function PerformPromiseThen(promise, onFulfilled, onRejected) { + // There doesn't appear to be any way to correctly emulate the behaviour from JavaScript, so this is just an + // approximation. + return originalPromiseThen.call(promise, onFulfilled, onRejected); + } + function uponPromise(promise, onFulfilled, onRejected) { + PerformPromiseThen(PerformPromiseThen(promise, onFulfilled, onRejected), undefined, rethrowAssertionErrorRejection); + } + function uponFulfillment(promise, onFulfilled) { + uponPromise(promise, onFulfilled); + } + function uponRejection(promise, onRejected) { + uponPromise(promise, undefined, onRejected); + } + function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) { + return PerformPromiseThen(promise, fulfillmentHandler, rejectionHandler); + } + function setPromiseIsHandledToTrue(promise) { + PerformPromiseThen(promise, undefined, rethrowAssertionErrorRejection); + } + var queueMicrotask = (function () { + var globalQueueMicrotask = globals && globals.queueMicrotask; + if (typeof globalQueueMicrotask === 'function') { + return globalQueueMicrotask; + } + var resolvedPromise = promiseResolvedWith(undefined); + return function (fn) { return PerformPromiseThen(resolvedPromise, fn); }; + })(); + function reflectCall(F, V, args) { + if (typeof F !== 'function') { + throw new TypeError('Argument is not a function'); + } + return Function.prototype.apply.call(F, V, args); + } + function promiseCall(F, V, args) { + try { + return promiseResolvedWith(reflectCall(F, V, args)); + } + catch (value) { + return promiseRejectedWith(value); + } + } + + // Original from Chromium + // https://chromium.googlesource.com/chromium/src/+/0aee4434a4dba42a42abaea9bfbc0cd196a63bc1/third_party/blink/renderer/core/streams/SimpleQueue.js + var QUEUE_MAX_ARRAY_SIZE = 16384; + /** + * Simple queue structure. + * + * Avoids scalability issues with using a packed array directly by using + * multiple arrays in a linked list and keeping the array size bounded. + */ + var SimpleQueue = /** @class */ (function () { + function SimpleQueue() { + this._cursor = 0; + this._size = 0; + // _front and _back are always defined. + this._front = { + _elements: [], + _next: undefined + }; + this._back = this._front; + // The cursor is used to avoid calling Array.shift(). + // It contains the index of the front element of the array inside the + // front-most node. It is always in the range [0, QUEUE_MAX_ARRAY_SIZE). + this._cursor = 0; + // When there is only one node, size === elements.length - cursor. + this._size = 0; + } + Object.defineProperty(SimpleQueue.prototype, "length", { + get: function () { + return this._size; + }, + enumerable: false, + configurable: true + }); + // For exception safety, this method is structured in order: + // 1. Read state + // 2. Calculate required state mutations + // 3. Perform state mutations + SimpleQueue.prototype.push = function (element) { + var oldBack = this._back; + var newBack = oldBack; + if (oldBack._elements.length === QUEUE_MAX_ARRAY_SIZE - 1) { + newBack = { + _elements: [], + _next: undefined + }; + } + // push() is the mutation most likely to throw an exception, so it + // goes first. + oldBack._elements.push(element); + if (newBack !== oldBack) { + this._back = newBack; + oldBack._next = newBack; + } + ++this._size; + }; + // Like push(), shift() follows the read -> calculate -> mutate pattern for + // exception safety. + SimpleQueue.prototype.shift = function () { // must not be called on an empty queue + var oldFront = this._front; + var newFront = oldFront; + var oldCursor = this._cursor; + var newCursor = oldCursor + 1; + var elements = oldFront._elements; + var element = elements[oldCursor]; + if (newCursor === QUEUE_MAX_ARRAY_SIZE) { + newFront = oldFront._next; + newCursor = 0; + } + // No mutations before this point. + --this._size; + this._cursor = newCursor; + if (oldFront !== newFront) { + this._front = newFront; + } + // Permit shifted element to be garbage collected. + elements[oldCursor] = undefined; + return element; + }; + // The tricky thing about forEach() is that it can be called + // re-entrantly. The queue may be mutated inside the callback. It is easy to + // see that push() within the callback has no negative effects since the end + // of the queue is checked for on every iteration. If shift() is called + // repeatedly within the callback then the next iteration may return an + // element that has been removed. In this case the callback will be called + // with undefined values until we either "catch up" with elements that still + // exist or reach the back of the queue. + SimpleQueue.prototype.forEach = function (callback) { + var i = this._cursor; + var node = this._front; + var elements = node._elements; + while (i !== elements.length || node._next !== undefined) { + if (i === elements.length) { + node = node._next; + elements = node._elements; + i = 0; + if (elements.length === 0) { + break; + } + } + callback(elements[i]); + ++i; + } + }; + // Return the element that would be returned if shift() was called now, + // without modifying the queue. + SimpleQueue.prototype.peek = function () { // must not be called on an empty queue + var front = this._front; + var cursor = this._cursor; + return front._elements[cursor]; + }; + return SimpleQueue; + }()); + + function ReadableStreamReaderGenericInitialize(reader, stream) { + reader._ownerReadableStream = stream; + stream._reader = reader; + if (stream._state === 'readable') { + defaultReaderClosedPromiseInitialize(reader); + } + else if (stream._state === 'closed') { + defaultReaderClosedPromiseInitializeAsResolved(reader); + } + else { + defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError); + } + } + // A client of ReadableStreamDefaultReader and ReadableStreamBYOBReader may use these functions directly to bypass state + // check. + function ReadableStreamReaderGenericCancel(reader, reason) { + var stream = reader._ownerReadableStream; + return ReadableStreamCancel(stream, reason); + } + function ReadableStreamReaderGenericRelease(reader) { + if (reader._ownerReadableStream._state === 'readable') { + defaultReaderClosedPromiseReject(reader, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")); + } + else { + defaultReaderClosedPromiseResetToRejected(reader, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")); + } + reader._ownerReadableStream._reader = undefined; + reader._ownerReadableStream = undefined; + } + // Helper functions for the readers. + function readerLockException(name) { + return new TypeError('Cannot ' + name + ' a stream using a released reader'); + } + // Helper functions for the ReadableStreamDefaultReader. + function defaultReaderClosedPromiseInitialize(reader) { + reader._closedPromise = newPromise(function (resolve, reject) { + reader._closedPromise_resolve = resolve; + reader._closedPromise_reject = reject; + }); + } + function defaultReaderClosedPromiseInitializeAsRejected(reader, reason) { + defaultReaderClosedPromiseInitialize(reader); + defaultReaderClosedPromiseReject(reader, reason); + } + function defaultReaderClosedPromiseInitializeAsResolved(reader) { + defaultReaderClosedPromiseInitialize(reader); + defaultReaderClosedPromiseResolve(reader); + } + function defaultReaderClosedPromiseReject(reader, reason) { + if (reader._closedPromise_reject === undefined) { + return; + } + setPromiseIsHandledToTrue(reader._closedPromise); + reader._closedPromise_reject(reason); + reader._closedPromise_resolve = undefined; + reader._closedPromise_reject = undefined; + } + function defaultReaderClosedPromiseResetToRejected(reader, reason) { + defaultReaderClosedPromiseInitializeAsRejected(reader, reason); + } + function defaultReaderClosedPromiseResolve(reader) { + if (reader._closedPromise_resolve === undefined) { + return; + } + reader._closedPromise_resolve(undefined); + reader._closedPromise_resolve = undefined; + reader._closedPromise_reject = undefined; + } + + var AbortSteps = SymbolPolyfill('[[AbortSteps]]'); + var ErrorSteps = SymbolPolyfill('[[ErrorSteps]]'); + var CancelSteps = SymbolPolyfill('[[CancelSteps]]'); + var PullSteps = SymbolPolyfill('[[PullSteps]]'); + + /// + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite#Polyfill + var NumberIsFinite = Number.isFinite || function (x) { + return typeof x === 'number' && isFinite(x); + }; + + /// + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc#Polyfill + var MathTrunc = Math.trunc || function (v) { + return v < 0 ? Math.ceil(v) : Math.floor(v); + }; + + // https://heycam.github.io/webidl/#idl-dictionaries + function isDictionary(x) { + return typeof x === 'object' || typeof x === 'function'; + } + function assertDictionary(obj, context) { + if (obj !== undefined && !isDictionary(obj)) { + throw new TypeError(context + " is not an object."); + } + } + // https://heycam.github.io/webidl/#idl-callback-functions + function assertFunction(x, context) { + if (typeof x !== 'function') { + throw new TypeError(context + " is not a function."); + } + } + // https://heycam.github.io/webidl/#idl-object + function isObject(x) { + return (typeof x === 'object' && x !== null) || typeof x === 'function'; + } + function assertObject(x, context) { + if (!isObject(x)) { + throw new TypeError(context + " is not an object."); + } + } + function assertRequiredArgument(x, position, context) { + if (x === undefined) { + throw new TypeError("Parameter " + position + " is required in '" + context + "'."); + } + } + function assertRequiredField(x, field, context) { + if (x === undefined) { + throw new TypeError(field + " is required in '" + context + "'."); + } + } + // https://heycam.github.io/webidl/#idl-unrestricted-double + function convertUnrestrictedDouble(value) { + return Number(value); + } + function censorNegativeZero(x) { + return x === 0 ? 0 : x; + } + function integerPart(x) { + return censorNegativeZero(MathTrunc(x)); + } + // https://heycam.github.io/webidl/#idl-unsigned-long-long + function convertUnsignedLongLongWithEnforceRange(value, context) { + var lowerBound = 0; + var upperBound = Number.MAX_SAFE_INTEGER; + var x = Number(value); + x = censorNegativeZero(x); + if (!NumberIsFinite(x)) { + throw new TypeError(context + " is not a finite number"); + } + x = integerPart(x); + if (x < lowerBound || x > upperBound) { + throw new TypeError(context + " is outside the accepted range of " + lowerBound + " to " + upperBound + ", inclusive"); + } + if (!NumberIsFinite(x) || x === 0) { + return 0; + } + // TODO Use BigInt if supported? + // let xBigInt = BigInt(integerPart(x)); + // xBigInt = BigInt.asUintN(64, xBigInt); + // return Number(xBigInt); + return x; + } + + function assertReadableStream(x, context) { + if (!IsReadableStream(x)) { + throw new TypeError(context + " is not a ReadableStream."); + } + } + + // Abstract operations for the ReadableStream. + function AcquireReadableStreamDefaultReader(stream) { + return new ReadableStreamDefaultReader(stream); + } + // ReadableStream API exposed for controllers. + function ReadableStreamAddReadRequest(stream, readRequest) { + stream._reader._readRequests.push(readRequest); + } + function ReadableStreamFulfillReadRequest(stream, chunk, done) { + var reader = stream._reader; + var readRequest = reader._readRequests.shift(); + if (done) { + readRequest._closeSteps(); + } + else { + readRequest._chunkSteps(chunk); + } + } + function ReadableStreamGetNumReadRequests(stream) { + return stream._reader._readRequests.length; + } + function ReadableStreamHasDefaultReader(stream) { + var reader = stream._reader; + if (reader === undefined) { + return false; + } + if (!IsReadableStreamDefaultReader(reader)) { + return false; + } + return true; + } + /** + * A default reader vended by a {@link ReadableStream}. + * + * @public + */ + var ReadableStreamDefaultReader = /** @class */ (function () { + function ReadableStreamDefaultReader(stream) { + assertRequiredArgument(stream, 1, 'ReadableStreamDefaultReader'); + assertReadableStream(stream, 'First parameter'); + if (IsReadableStreamLocked(stream)) { + throw new TypeError('This stream has already been locked for exclusive reading by another reader'); + } + ReadableStreamReaderGenericInitialize(this, stream); + this._readRequests = new SimpleQueue(); + } + Object.defineProperty(ReadableStreamDefaultReader.prototype, "closed", { + /** + * Returns a promise that will be fulfilled when the stream becomes closed, + * or rejected if the stream ever errors or the reader's lock is released before the stream finishes closing. + */ + get: function () { + if (!IsReadableStreamDefaultReader(this)) { + return promiseRejectedWith(defaultReaderBrandCheckException('closed')); + } + return this._closedPromise; + }, + enumerable: false, + configurable: true + }); + /** + * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}. + */ + ReadableStreamDefaultReader.prototype.cancel = function (reason) { + if (reason === void 0) { reason = undefined; } + if (!IsReadableStreamDefaultReader(this)) { + return promiseRejectedWith(defaultReaderBrandCheckException('cancel')); + } + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('cancel')); + } + return ReadableStreamReaderGenericCancel(this, reason); + }; + /** + * Returns a promise that allows access to the next chunk from the stream's internal queue, if available. + * + * If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source. + */ + ReadableStreamDefaultReader.prototype.read = function () { + if (!IsReadableStreamDefaultReader(this)) { + return promiseRejectedWith(defaultReaderBrandCheckException('read')); + } + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('read from')); + } + var resolvePromise; + var rejectPromise; + var promise = newPromise(function (resolve, reject) { + resolvePromise = resolve; + rejectPromise = reject; + }); + var readRequest = { + _chunkSteps: function (chunk) { return resolvePromise({ value: chunk, done: false }); }, + _closeSteps: function () { return resolvePromise({ value: undefined, done: true }); }, + _errorSteps: function (e) { return rejectPromise(e); } + }; + ReadableStreamDefaultReaderRead(this, readRequest); + return promise; + }; + /** + * Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active. + * If the associated stream is errored when the lock is released, the reader will appear errored in the same way + * from now on; otherwise, the reader will appear closed. + * + * A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by + * the reader's {@link ReadableStreamDefaultReader.read | read()} method has not yet been settled. Attempting to + * do so will throw a `TypeError` and leave the reader locked to the stream. + */ + ReadableStreamDefaultReader.prototype.releaseLock = function () { + if (!IsReadableStreamDefaultReader(this)) { + throw defaultReaderBrandCheckException('releaseLock'); + } + if (this._ownerReadableStream === undefined) { + return; + } + if (this._readRequests.length > 0) { + throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); + } + ReadableStreamReaderGenericRelease(this); + }; + return ReadableStreamDefaultReader; + }()); + Object.defineProperties(ReadableStreamDefaultReader.prototype, { + cancel: { enumerable: true }, + read: { enumerable: true }, + releaseLock: { enumerable: true }, + closed: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamDefaultReader.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamDefaultReader', + configurable: true + }); + } + // Abstract operations for the readers. + function IsReadableStreamDefaultReader(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_readRequests')) { + return false; + } + return x instanceof ReadableStreamDefaultReader; + } + function ReadableStreamDefaultReaderRead(reader, readRequest) { + var stream = reader._ownerReadableStream; + stream._disturbed = true; + if (stream._state === 'closed') { + readRequest._closeSteps(); + } + else if (stream._state === 'errored') { + readRequest._errorSteps(stream._storedError); + } + else { + stream._readableStreamController[PullSteps](readRequest); + } + } + // Helper functions for the ReadableStreamDefaultReader. + function defaultReaderBrandCheckException(name) { + return new TypeError("ReadableStreamDefaultReader.prototype." + name + " can only be used on a ReadableStreamDefaultReader"); + } + + /// + var _a; + var AsyncIteratorPrototype; + if (typeof SymbolPolyfill.asyncIterator === 'symbol') { + // We're running inside a ES2018+ environment, but we're compiling to an older syntax. + // We cannot access %AsyncIteratorPrototype% without non-ES2018 syntax, but we can re-create it. + AsyncIteratorPrototype = (_a = {}, + // 25.1.3.1 %AsyncIteratorPrototype% [ @@asyncIterator ] ( ) + // https://tc39.github.io/ecma262/#sec-asynciteratorprototype-asynciterator + _a[SymbolPolyfill.asyncIterator] = function () { + return this; + }, + _a); + Object.defineProperty(AsyncIteratorPrototype, SymbolPolyfill.asyncIterator, { enumerable: false }); + } + + /// + var ReadableStreamAsyncIteratorImpl = /** @class */ (function () { + function ReadableStreamAsyncIteratorImpl(reader, preventCancel) { + this._ongoingPromise = undefined; + this._isFinished = false; + this._reader = reader; + this._preventCancel = preventCancel; + } + ReadableStreamAsyncIteratorImpl.prototype.next = function () { + var _this = this; + var nextSteps = function () { return _this._nextSteps(); }; + this._ongoingPromise = this._ongoingPromise ? + transformPromiseWith(this._ongoingPromise, nextSteps, nextSteps) : + nextSteps(); + return this._ongoingPromise; + }; + ReadableStreamAsyncIteratorImpl.prototype.return = function (value) { + var _this = this; + var returnSteps = function () { return _this._returnSteps(value); }; + return this._ongoingPromise ? + transformPromiseWith(this._ongoingPromise, returnSteps, returnSteps) : + returnSteps(); + }; + ReadableStreamAsyncIteratorImpl.prototype._nextSteps = function () { + var _this = this; + if (this._isFinished) { + return Promise.resolve({ value: undefined, done: true }); + } + var reader = this._reader; + if (reader._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('iterate')); + } + var resolvePromise; + var rejectPromise; + var promise = newPromise(function (resolve, reject) { + resolvePromise = resolve; + rejectPromise = reject; + }); + var readRequest = { + _chunkSteps: function (chunk) { + _this._ongoingPromise = undefined; + // This needs to be delayed by one microtask, otherwise we stop pulling too early which breaks a test. + // FIXME Is this a bug in the specification, or in the test? + queueMicrotask(function () { return resolvePromise({ value: chunk, done: false }); }); + }, + _closeSteps: function () { + _this._ongoingPromise = undefined; + _this._isFinished = true; + ReadableStreamReaderGenericRelease(reader); + resolvePromise({ value: undefined, done: true }); + }, + _errorSteps: function (reason) { + _this._ongoingPromise = undefined; + _this._isFinished = true; + ReadableStreamReaderGenericRelease(reader); + rejectPromise(reason); + } + }; + ReadableStreamDefaultReaderRead(reader, readRequest); + return promise; + }; + ReadableStreamAsyncIteratorImpl.prototype._returnSteps = function (value) { + if (this._isFinished) { + return Promise.resolve({ value: value, done: true }); + } + this._isFinished = true; + var reader = this._reader; + if (reader._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('finish iterating')); + } + if (!this._preventCancel) { + var result = ReadableStreamReaderGenericCancel(reader, value); + ReadableStreamReaderGenericRelease(reader); + return transformPromiseWith(result, function () { return ({ value: value, done: true }); }); + } + ReadableStreamReaderGenericRelease(reader); + return promiseResolvedWith({ value: value, done: true }); + }; + return ReadableStreamAsyncIteratorImpl; + }()); + var ReadableStreamAsyncIteratorPrototype = { + next: function () { + if (!IsReadableStreamAsyncIterator(this)) { + return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next')); + } + return this._asyncIteratorImpl.next(); + }, + return: function (value) { + if (!IsReadableStreamAsyncIterator(this)) { + return promiseRejectedWith(streamAsyncIteratorBrandCheckException('return')); + } + return this._asyncIteratorImpl.return(value); + } + }; + if (AsyncIteratorPrototype !== undefined) { + Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype); + } + // Abstract operations for the ReadableStream. + function AcquireReadableStreamAsyncIterator(stream, preventCancel) { + var reader = AcquireReadableStreamDefaultReader(stream); + var impl = new ReadableStreamAsyncIteratorImpl(reader, preventCancel); + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype); + iterator._asyncIteratorImpl = impl; + return iterator; + } + function IsReadableStreamAsyncIterator(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_asyncIteratorImpl')) { + return false; + } + try { + // noinspection SuspiciousTypeOfGuard + return x._asyncIteratorImpl instanceof + ReadableStreamAsyncIteratorImpl; + } + catch (_a) { + return false; + } + } + // Helper functions for the ReadableStream. + function streamAsyncIteratorBrandCheckException(name) { + return new TypeError("ReadableStreamAsyncIterator." + name + " can only be used on a ReadableSteamAsyncIterator"); + } + + /// + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill + var NumberIsNaN = Number.isNaN || function (x) { + // eslint-disable-next-line no-self-compare + return x !== x; + }; + + function CreateArrayFromList(elements) { + // We use arrays to represent lists, so this is basically a no-op. + // Do a slice though just in case we happen to depend on the unique-ness. + return elements.slice(); + } + function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n) { + new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset); + } + // Not implemented correctly + function TransferArrayBuffer(O) { + return O; + } + // Not implemented correctly + // eslint-disable-next-line @typescript-eslint/no-unused-vars + function IsDetachedBuffer(O) { + return false; + } + function ArrayBufferSlice(buffer, begin, end) { + // ArrayBuffer.prototype.slice is not available on IE10 + // https://www.caniuse.com/mdn-javascript_builtins_arraybuffer_slice + if (buffer.slice) { + return buffer.slice(begin, end); + } + var length = end - begin; + var slice = new ArrayBuffer(length); + CopyDataBlockBytes(slice, 0, buffer, begin, length); + return slice; + } + + function IsNonNegativeNumber(v) { + if (typeof v !== 'number') { + return false; + } + if (NumberIsNaN(v)) { + return false; + } + if (v < 0) { + return false; + } + return true; + } + function CloneAsUint8Array(O) { + var buffer = ArrayBufferSlice(O.buffer, O.byteOffset, O.byteOffset + O.byteLength); + return new Uint8Array(buffer); + } + + function DequeueValue(container) { + var pair = container._queue.shift(); + container._queueTotalSize -= pair.size; + if (container._queueTotalSize < 0) { + container._queueTotalSize = 0; + } + return pair.value; + } + function EnqueueValueWithSize(container, value, size) { + if (!IsNonNegativeNumber(size) || size === Infinity) { + throw new RangeError('Size must be a finite, non-NaN, non-negative number.'); + } + container._queue.push({ value: value, size: size }); + container._queueTotalSize += size; + } + function PeekQueueValue(container) { + var pair = container._queue.peek(); + return pair.value; + } + function ResetQueue(container) { + container._queue = new SimpleQueue(); + container._queueTotalSize = 0; + } + + /** + * A pull-into request in a {@link ReadableByteStreamController}. + * + * @public + */ + var ReadableStreamBYOBRequest = /** @class */ (function () { + function ReadableStreamBYOBRequest() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(ReadableStreamBYOBRequest.prototype, "view", { + /** + * Returns the view for writing in to, or `null` if the BYOB request has already been responded to. + */ + get: function () { + if (!IsReadableStreamBYOBRequest(this)) { + throw byobRequestBrandCheckException('view'); + } + return this._view; + }, + enumerable: false, + configurable: true + }); + ReadableStreamBYOBRequest.prototype.respond = function (bytesWritten) { + if (!IsReadableStreamBYOBRequest(this)) { + throw byobRequestBrandCheckException('respond'); + } + assertRequiredArgument(bytesWritten, 1, 'respond'); + bytesWritten = convertUnsignedLongLongWithEnforceRange(bytesWritten, 'First parameter'); + if (this._associatedReadableByteStreamController === undefined) { + throw new TypeError('This BYOB request has been invalidated'); + } + if (IsDetachedBuffer(this._view.buffer)) ; + ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten); + }; + ReadableStreamBYOBRequest.prototype.respondWithNewView = function (view) { + if (!IsReadableStreamBYOBRequest(this)) { + throw byobRequestBrandCheckException('respondWithNewView'); + } + assertRequiredArgument(view, 1, 'respondWithNewView'); + if (!ArrayBuffer.isView(view)) { + throw new TypeError('You can only respond with array buffer views'); + } + if (this._associatedReadableByteStreamController === undefined) { + throw new TypeError('This BYOB request has been invalidated'); + } + if (IsDetachedBuffer(view.buffer)) ; + ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view); + }; + return ReadableStreamBYOBRequest; + }()); + Object.defineProperties(ReadableStreamBYOBRequest.prototype, { + respond: { enumerable: true }, + respondWithNewView: { enumerable: true }, + view: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamBYOBRequest.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamBYOBRequest', + configurable: true + }); + } + /** + * Allows control of a {@link ReadableStream | readable byte stream}'s state and internal queue. + * + * @public + */ + var ReadableByteStreamController = /** @class */ (function () { + function ReadableByteStreamController() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(ReadableByteStreamController.prototype, "byobRequest", { + /** + * Returns the current BYOB pull request, or `null` if there isn't one. + */ + get: function () { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('byobRequest'); + } + return ReadableByteStreamControllerGetBYOBRequest(this); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(ReadableByteStreamController.prototype, "desiredSize", { + /** + * Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is + * over-full. An underlying byte source ought to use this information to determine when and how to apply backpressure. + */ + get: function () { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('desiredSize'); + } + return ReadableByteStreamControllerGetDesiredSize(this); + }, + enumerable: false, + configurable: true + }); + /** + * Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from + * the stream, but once those are read, the stream will become closed. + */ + ReadableByteStreamController.prototype.close = function () { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('close'); + } + if (this._closeRequested) { + throw new TypeError('The stream has already been closed; do not close it again!'); + } + var state = this._controlledReadableByteStream._state; + if (state !== 'readable') { + throw new TypeError("The stream (in " + state + " state) is not in the readable state and cannot be closed"); + } + ReadableByteStreamControllerClose(this); + }; + ReadableByteStreamController.prototype.enqueue = function (chunk) { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('enqueue'); + } + assertRequiredArgument(chunk, 1, 'enqueue'); + if (!ArrayBuffer.isView(chunk)) { + throw new TypeError('chunk must be an array buffer view'); + } + if (chunk.byteLength === 0) { + throw new TypeError('chunk must have non-zero byteLength'); + } + if (chunk.buffer.byteLength === 0) { + throw new TypeError("chunk's buffer must have non-zero byteLength"); + } + if (this._closeRequested) { + throw new TypeError('stream is closed or draining'); + } + var state = this._controlledReadableByteStream._state; + if (state !== 'readable') { + throw new TypeError("The stream (in " + state + " state) is not in the readable state and cannot be enqueued to"); + } + ReadableByteStreamControllerEnqueue(this, chunk); + }; + /** + * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`. + */ + ReadableByteStreamController.prototype.error = function (e) { + if (e === void 0) { e = undefined; } + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('error'); + } + ReadableByteStreamControllerError(this, e); + }; + /** @internal */ + ReadableByteStreamController.prototype[CancelSteps] = function (reason) { + ReadableByteStreamControllerClearPendingPullIntos(this); + ResetQueue(this); + var result = this._cancelAlgorithm(reason); + ReadableByteStreamControllerClearAlgorithms(this); + return result; + }; + /** @internal */ + ReadableByteStreamController.prototype[PullSteps] = function (readRequest) { + var stream = this._controlledReadableByteStream; + if (this._queueTotalSize > 0) { + var entry = this._queue.shift(); + this._queueTotalSize -= entry.byteLength; + ReadableByteStreamControllerHandleQueueDrain(this); + var view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength); + readRequest._chunkSteps(view); + return; + } + var autoAllocateChunkSize = this._autoAllocateChunkSize; + if (autoAllocateChunkSize !== undefined) { + var buffer = void 0; + try { + buffer = new ArrayBuffer(autoAllocateChunkSize); + } + catch (bufferE) { + readRequest._errorSteps(bufferE); + return; + } + var pullIntoDescriptor = { + buffer: buffer, + bufferByteLength: autoAllocateChunkSize, + byteOffset: 0, + byteLength: autoAllocateChunkSize, + bytesFilled: 0, + elementSize: 1, + viewConstructor: Uint8Array, + readerType: 'default' + }; + this._pendingPullIntos.push(pullIntoDescriptor); + } + ReadableStreamAddReadRequest(stream, readRequest); + ReadableByteStreamControllerCallPullIfNeeded(this); + }; + return ReadableByteStreamController; + }()); + Object.defineProperties(ReadableByteStreamController.prototype, { + close: { enumerable: true }, + enqueue: { enumerable: true }, + error: { enumerable: true }, + byobRequest: { enumerable: true }, + desiredSize: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableByteStreamController.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableByteStreamController', + configurable: true + }); + } + // Abstract operations for the ReadableByteStreamController. + function IsReadableByteStreamController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableByteStream')) { + return false; + } + return x instanceof ReadableByteStreamController; + } + function IsReadableStreamBYOBRequest(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_associatedReadableByteStreamController')) { + return false; + } + return x instanceof ReadableStreamBYOBRequest; + } + function ReadableByteStreamControllerCallPullIfNeeded(controller) { + var shouldPull = ReadableByteStreamControllerShouldCallPull(controller); + if (!shouldPull) { + return; + } + if (controller._pulling) { + controller._pullAgain = true; + return; + } + controller._pulling = true; + // TODO: Test controller argument + var pullPromise = controller._pullAlgorithm(); + uponPromise(pullPromise, function () { + controller._pulling = false; + if (controller._pullAgain) { + controller._pullAgain = false; + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + }, function (e) { + ReadableByteStreamControllerError(controller, e); + }); + } + function ReadableByteStreamControllerClearPendingPullIntos(controller) { + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + controller._pendingPullIntos = new SimpleQueue(); + } + function ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) { + var done = false; + if (stream._state === 'closed') { + done = true; + } + var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); + if (pullIntoDescriptor.readerType === 'default') { + ReadableStreamFulfillReadRequest(stream, filledView, done); + } + else { + ReadableStreamFulfillReadIntoRequest(stream, filledView, done); + } + } + function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) { + var bytesFilled = pullIntoDescriptor.bytesFilled; + var elementSize = pullIntoDescriptor.elementSize; + return new pullIntoDescriptor.viewConstructor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize); + } + function ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) { + controller._queue.push({ buffer: buffer, byteOffset: byteOffset, byteLength: byteLength }); + controller._queueTotalSize += byteLength; + } + function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) { + var elementSize = pullIntoDescriptor.elementSize; + var currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize; + var maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled); + var maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy; + var maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize; + var totalBytesToCopyRemaining = maxBytesToCopy; + var ready = false; + if (maxAlignedBytes > currentAlignedBytes) { + totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled; + ready = true; + } + var queue = controller._queue; + while (totalBytesToCopyRemaining > 0) { + var headOfQueue = queue.peek(); + var bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength); + var destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; + CopyDataBlockBytes(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy); + if (headOfQueue.byteLength === bytesToCopy) { + queue.shift(); + } + else { + headOfQueue.byteOffset += bytesToCopy; + headOfQueue.byteLength -= bytesToCopy; + } + controller._queueTotalSize -= bytesToCopy; + ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor); + totalBytesToCopyRemaining -= bytesToCopy; + } + return ready; + } + function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) { + pullIntoDescriptor.bytesFilled += size; + } + function ReadableByteStreamControllerHandleQueueDrain(controller) { + if (controller._queueTotalSize === 0 && controller._closeRequested) { + ReadableByteStreamControllerClearAlgorithms(controller); + ReadableStreamClose(controller._controlledReadableByteStream); + } + else { + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + } + function ReadableByteStreamControllerInvalidateBYOBRequest(controller) { + if (controller._byobRequest === null) { + return; + } + controller._byobRequest._associatedReadableByteStreamController = undefined; + controller._byobRequest._view = null; + controller._byobRequest = null; + } + function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) { + while (controller._pendingPullIntos.length > 0) { + if (controller._queueTotalSize === 0) { + return; + } + var pullIntoDescriptor = controller._pendingPullIntos.peek(); + if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) { + ReadableByteStreamControllerShiftPendingPullInto(controller); + ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); + } + } + } + function ReadableByteStreamControllerPullInto(controller, view, readIntoRequest) { + var stream = controller._controlledReadableByteStream; + var elementSize = 1; + if (view.constructor !== DataView) { + elementSize = view.constructor.BYTES_PER_ELEMENT; + } + var ctor = view.constructor; + // try { + var buffer = TransferArrayBuffer(view.buffer); + // } catch (e) { + // readIntoRequest._errorSteps(e); + // return; + // } + var pullIntoDescriptor = { + buffer: buffer, + bufferByteLength: buffer.byteLength, + byteOffset: view.byteOffset, + byteLength: view.byteLength, + bytesFilled: 0, + elementSize: elementSize, + viewConstructor: ctor, + readerType: 'byob' + }; + if (controller._pendingPullIntos.length > 0) { + controller._pendingPullIntos.push(pullIntoDescriptor); + // No ReadableByteStreamControllerCallPullIfNeeded() call since: + // - No change happens on desiredSize + // - The source has already been notified of that there's at least 1 pending read(view) + ReadableStreamAddReadIntoRequest(stream, readIntoRequest); + return; + } + if (stream._state === 'closed') { + var emptyView = new ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0); + readIntoRequest._closeSteps(emptyView); + return; + } + if (controller._queueTotalSize > 0) { + if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) { + var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); + ReadableByteStreamControllerHandleQueueDrain(controller); + readIntoRequest._chunkSteps(filledView); + return; + } + if (controller._closeRequested) { + var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); + ReadableByteStreamControllerError(controller, e); + readIntoRequest._errorSteps(e); + return; + } + } + controller._pendingPullIntos.push(pullIntoDescriptor); + ReadableStreamAddReadIntoRequest(stream, readIntoRequest); + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + function ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) { + var stream = controller._controlledReadableByteStream; + if (ReadableStreamHasBYOBReader(stream)) { + while (ReadableStreamGetNumReadIntoRequests(stream) > 0) { + var pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller); + ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor); + } + } + } + function ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) { + ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor); + if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) { + return; + } + ReadableByteStreamControllerShiftPendingPullInto(controller); + var remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize; + if (remainderSize > 0) { + var end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; + var remainder = ArrayBufferSlice(pullIntoDescriptor.buffer, end - remainderSize, end); + ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength); + } + pullIntoDescriptor.bytesFilled -= remainderSize; + ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); + ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); + } + function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) { + var firstDescriptor = controller._pendingPullIntos.peek(); + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + var state = controller._controlledReadableByteStream._state; + if (state === 'closed') { + ReadableByteStreamControllerRespondInClosedState(controller); + } + else { + ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor); + } + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + function ReadableByteStreamControllerShiftPendingPullInto(controller) { + var descriptor = controller._pendingPullIntos.shift(); + return descriptor; + } + function ReadableByteStreamControllerShouldCallPull(controller) { + var stream = controller._controlledReadableByteStream; + if (stream._state !== 'readable') { + return false; + } + if (controller._closeRequested) { + return false; + } + if (!controller._started) { + return false; + } + if (ReadableStreamHasDefaultReader(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + return true; + } + if (ReadableStreamHasBYOBReader(stream) && ReadableStreamGetNumReadIntoRequests(stream) > 0) { + return true; + } + var desiredSize = ReadableByteStreamControllerGetDesiredSize(controller); + if (desiredSize > 0) { + return true; + } + return false; + } + function ReadableByteStreamControllerClearAlgorithms(controller) { + controller._pullAlgorithm = undefined; + controller._cancelAlgorithm = undefined; + } + // A client of ReadableByteStreamController may use these functions directly to bypass state check. + function ReadableByteStreamControllerClose(controller) { + var stream = controller._controlledReadableByteStream; + if (controller._closeRequested || stream._state !== 'readable') { + return; + } + if (controller._queueTotalSize > 0) { + controller._closeRequested = true; + return; + } + if (controller._pendingPullIntos.length > 0) { + var firstPendingPullInto = controller._pendingPullIntos.peek(); + if (firstPendingPullInto.bytesFilled > 0) { + var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); + ReadableByteStreamControllerError(controller, e); + throw e; + } + } + ReadableByteStreamControllerClearAlgorithms(controller); + ReadableStreamClose(stream); + } + function ReadableByteStreamControllerEnqueue(controller, chunk) { + var stream = controller._controlledReadableByteStream; + if (controller._closeRequested || stream._state !== 'readable') { + return; + } + var buffer = chunk.buffer; + var byteOffset = chunk.byteOffset; + var byteLength = chunk.byteLength; + var transferredBuffer = TransferArrayBuffer(buffer); + if (controller._pendingPullIntos.length > 0) { + var firstPendingPullInto = controller._pendingPullIntos.peek(); + if (IsDetachedBuffer(firstPendingPullInto.buffer)) ; + firstPendingPullInto.buffer = TransferArrayBuffer(firstPendingPullInto.buffer); + } + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + if (ReadableStreamHasDefaultReader(stream)) { + if (ReadableStreamGetNumReadRequests(stream) === 0) { + ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + } + else { + if (controller._pendingPullIntos.length > 0) { + ReadableByteStreamControllerShiftPendingPullInto(controller); + } + var transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength); + ReadableStreamFulfillReadRequest(stream, transferredView, false); + } + } + else if (ReadableStreamHasBYOBReader(stream)) { + // TODO: Ideally in this branch detaching should happen only if the buffer is not consumed fully. + ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); + } + else { + ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + } + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + function ReadableByteStreamControllerError(controller, e) { + var stream = controller._controlledReadableByteStream; + if (stream._state !== 'readable') { + return; + } + ReadableByteStreamControllerClearPendingPullIntos(controller); + ResetQueue(controller); + ReadableByteStreamControllerClearAlgorithms(controller); + ReadableStreamError(stream, e); + } + function ReadableByteStreamControllerGetBYOBRequest(controller) { + if (controller._byobRequest === null && controller._pendingPullIntos.length > 0) { + var firstDescriptor = controller._pendingPullIntos.peek(); + var view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled); + var byobRequest = Object.create(ReadableStreamBYOBRequest.prototype); + SetUpReadableStreamBYOBRequest(byobRequest, controller, view); + controller._byobRequest = byobRequest; + } + return controller._byobRequest; + } + function ReadableByteStreamControllerGetDesiredSize(controller) { + var state = controller._controlledReadableByteStream._state; + if (state === 'errored') { + return null; + } + if (state === 'closed') { + return 0; + } + return controller._strategyHWM - controller._queueTotalSize; + } + function ReadableByteStreamControllerRespond(controller, bytesWritten) { + var firstDescriptor = controller._pendingPullIntos.peek(); + var state = controller._controlledReadableByteStream._state; + if (state === 'closed') { + if (bytesWritten !== 0) { + throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream'); + } + } + else { + if (bytesWritten === 0) { + throw new TypeError('bytesWritten must be greater than 0 when calling respond() on a readable stream'); + } + if (firstDescriptor.bytesFilled + bytesWritten > firstDescriptor.byteLength) { + throw new RangeError('bytesWritten out of range'); + } + } + firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer); + ReadableByteStreamControllerRespondInternal(controller, bytesWritten); + } + function ReadableByteStreamControllerRespondWithNewView(controller, view) { + var firstDescriptor = controller._pendingPullIntos.peek(); + var state = controller._controlledReadableByteStream._state; + if (state === 'closed') { + if (view.byteLength !== 0) { + throw new TypeError('The view\'s length must be 0 when calling respondWithNewView() on a closed stream'); + } + } + else { + if (view.byteLength === 0) { + throw new TypeError('The view\'s length must be greater than 0 when calling respondWithNewView() on a readable stream'); + } + } + if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) { + throw new RangeError('The region specified by view does not match byobRequest'); + } + if (firstDescriptor.bufferByteLength !== view.buffer.byteLength) { + throw new RangeError('The buffer of view has different capacity than byobRequest'); + } + if (firstDescriptor.bytesFilled + view.byteLength > firstDescriptor.byteLength) { + throw new RangeError('The region specified by view is larger than byobRequest'); + } + var viewByteLength = view.byteLength; + firstDescriptor.buffer = TransferArrayBuffer(view.buffer); + ReadableByteStreamControllerRespondInternal(controller, viewByteLength); + } + function SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize) { + controller._controlledReadableByteStream = stream; + controller._pullAgain = false; + controller._pulling = false; + controller._byobRequest = null; + // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly. + controller._queue = controller._queueTotalSize = undefined; + ResetQueue(controller); + controller._closeRequested = false; + controller._started = false; + controller._strategyHWM = highWaterMark; + controller._pullAlgorithm = pullAlgorithm; + controller._cancelAlgorithm = cancelAlgorithm; + controller._autoAllocateChunkSize = autoAllocateChunkSize; + controller._pendingPullIntos = new SimpleQueue(); + stream._readableStreamController = controller; + var startResult = startAlgorithm(); + uponPromise(promiseResolvedWith(startResult), function () { + controller._started = true; + ReadableByteStreamControllerCallPullIfNeeded(controller); + }, function (r) { + ReadableByteStreamControllerError(controller, r); + }); + } + function SetUpReadableByteStreamControllerFromUnderlyingSource(stream, underlyingByteSource, highWaterMark) { + var controller = Object.create(ReadableByteStreamController.prototype); + var startAlgorithm = function () { return undefined; }; + var pullAlgorithm = function () { return promiseResolvedWith(undefined); }; + var cancelAlgorithm = function () { return promiseResolvedWith(undefined); }; + if (underlyingByteSource.start !== undefined) { + startAlgorithm = function () { return underlyingByteSource.start(controller); }; + } + if (underlyingByteSource.pull !== undefined) { + pullAlgorithm = function () { return underlyingByteSource.pull(controller); }; + } + if (underlyingByteSource.cancel !== undefined) { + cancelAlgorithm = function (reason) { return underlyingByteSource.cancel(reason); }; + } + var autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize; + if (autoAllocateChunkSize === 0) { + throw new TypeError('autoAllocateChunkSize must be greater than 0'); + } + SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize); + } + function SetUpReadableStreamBYOBRequest(request, controller, view) { + request._associatedReadableByteStreamController = controller; + request._view = view; + } + // Helper functions for the ReadableStreamBYOBRequest. + function byobRequestBrandCheckException(name) { + return new TypeError("ReadableStreamBYOBRequest.prototype." + name + " can only be used on a ReadableStreamBYOBRequest"); + } + // Helper functions for the ReadableByteStreamController. + function byteStreamControllerBrandCheckException(name) { + return new TypeError("ReadableByteStreamController.prototype." + name + " can only be used on a ReadableByteStreamController"); + } + + // Abstract operations for the ReadableStream. + function AcquireReadableStreamBYOBReader(stream) { + return new ReadableStreamBYOBReader(stream); + } + // ReadableStream API exposed for controllers. + function ReadableStreamAddReadIntoRequest(stream, readIntoRequest) { + stream._reader._readIntoRequests.push(readIntoRequest); + } + function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) { + var reader = stream._reader; + var readIntoRequest = reader._readIntoRequests.shift(); + if (done) { + readIntoRequest._closeSteps(chunk); + } + else { + readIntoRequest._chunkSteps(chunk); + } + } + function ReadableStreamGetNumReadIntoRequests(stream) { + return stream._reader._readIntoRequests.length; + } + function ReadableStreamHasBYOBReader(stream) { + var reader = stream._reader; + if (reader === undefined) { + return false; + } + if (!IsReadableStreamBYOBReader(reader)) { + return false; + } + return true; + } + /** + * A BYOB reader vended by a {@link ReadableStream}. + * + * @public + */ + var ReadableStreamBYOBReader = /** @class */ (function () { + function ReadableStreamBYOBReader(stream) { + assertRequiredArgument(stream, 1, 'ReadableStreamBYOBReader'); + assertReadableStream(stream, 'First parameter'); + if (IsReadableStreamLocked(stream)) { + throw new TypeError('This stream has already been locked for exclusive reading by another reader'); + } + if (!IsReadableByteStreamController(stream._readableStreamController)) { + throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte ' + + 'source'); + } + ReadableStreamReaderGenericInitialize(this, stream); + this._readIntoRequests = new SimpleQueue(); + } + Object.defineProperty(ReadableStreamBYOBReader.prototype, "closed", { + /** + * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or + * the reader's lock is released before the stream finishes closing. + */ + get: function () { + if (!IsReadableStreamBYOBReader(this)) { + return promiseRejectedWith(byobReaderBrandCheckException('closed')); + } + return this._closedPromise; + }, + enumerable: false, + configurable: true + }); + /** + * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}. + */ + ReadableStreamBYOBReader.prototype.cancel = function (reason) { + if (reason === void 0) { reason = undefined; } + if (!IsReadableStreamBYOBReader(this)) { + return promiseRejectedWith(byobReaderBrandCheckException('cancel')); + } + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('cancel')); + } + return ReadableStreamReaderGenericCancel(this, reason); + }; + /** + * Attempts to reads bytes into view, and returns a promise resolved with the result. + * + * If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source. + */ + ReadableStreamBYOBReader.prototype.read = function (view) { + if (!IsReadableStreamBYOBReader(this)) { + return promiseRejectedWith(byobReaderBrandCheckException('read')); + } + if (!ArrayBuffer.isView(view)) { + return promiseRejectedWith(new TypeError('view must be an array buffer view')); + } + if (view.byteLength === 0) { + return promiseRejectedWith(new TypeError('view must have non-zero byteLength')); + } + if (view.buffer.byteLength === 0) { + return promiseRejectedWith(new TypeError("view's buffer must have non-zero byteLength")); + } + if (IsDetachedBuffer(view.buffer)) ; + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('read from')); + } + var resolvePromise; + var rejectPromise; + var promise = newPromise(function (resolve, reject) { + resolvePromise = resolve; + rejectPromise = reject; + }); + var readIntoRequest = { + _chunkSteps: function (chunk) { return resolvePromise({ value: chunk, done: false }); }, + _closeSteps: function (chunk) { return resolvePromise({ value: chunk, done: true }); }, + _errorSteps: function (e) { return rejectPromise(e); } + }; + ReadableStreamBYOBReaderRead(this, view, readIntoRequest); + return promise; + }; + /** + * Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active. + * If the associated stream is errored when the lock is released, the reader will appear errored in the same way + * from now on; otherwise, the reader will appear closed. + * + * A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by + * the reader's {@link ReadableStreamBYOBReader.read | read()} method has not yet been settled. Attempting to + * do so will throw a `TypeError` and leave the reader locked to the stream. + */ + ReadableStreamBYOBReader.prototype.releaseLock = function () { + if (!IsReadableStreamBYOBReader(this)) { + throw byobReaderBrandCheckException('releaseLock'); + } + if (this._ownerReadableStream === undefined) { + return; + } + if (this._readIntoRequests.length > 0) { + throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); + } + ReadableStreamReaderGenericRelease(this); + }; + return ReadableStreamBYOBReader; + }()); + Object.defineProperties(ReadableStreamBYOBReader.prototype, { + cancel: { enumerable: true }, + read: { enumerable: true }, + releaseLock: { enumerable: true }, + closed: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamBYOBReader.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamBYOBReader', + configurable: true + }); + } + // Abstract operations for the readers. + function IsReadableStreamBYOBReader(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_readIntoRequests')) { + return false; + } + return x instanceof ReadableStreamBYOBReader; + } + function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest) { + var stream = reader._ownerReadableStream; + stream._disturbed = true; + if (stream._state === 'errored') { + readIntoRequest._errorSteps(stream._storedError); + } + else { + ReadableByteStreamControllerPullInto(stream._readableStreamController, view, readIntoRequest); + } + } + // Helper functions for the ReadableStreamBYOBReader. + function byobReaderBrandCheckException(name) { + return new TypeError("ReadableStreamBYOBReader.prototype." + name + " can only be used on a ReadableStreamBYOBReader"); + } + + function ExtractHighWaterMark(strategy, defaultHWM) { + var highWaterMark = strategy.highWaterMark; + if (highWaterMark === undefined) { + return defaultHWM; + } + if (NumberIsNaN(highWaterMark) || highWaterMark < 0) { + throw new RangeError('Invalid highWaterMark'); + } + return highWaterMark; + } + function ExtractSizeAlgorithm(strategy) { + var size = strategy.size; + if (!size) { + return function () { return 1; }; + } + return size; + } + + function convertQueuingStrategy(init, context) { + assertDictionary(init, context); + var highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark; + var size = init === null || init === void 0 ? void 0 : init.size; + return { + highWaterMark: highWaterMark === undefined ? undefined : convertUnrestrictedDouble(highWaterMark), + size: size === undefined ? undefined : convertQueuingStrategySize(size, context + " has member 'size' that") + }; + } + function convertQueuingStrategySize(fn, context) { + assertFunction(fn, context); + return function (chunk) { return convertUnrestrictedDouble(fn(chunk)); }; + } + + function convertUnderlyingSink(original, context) { + assertDictionary(original, context); + var abort = original === null || original === void 0 ? void 0 : original.abort; + var close = original === null || original === void 0 ? void 0 : original.close; + var start = original === null || original === void 0 ? void 0 : original.start; + var type = original === null || original === void 0 ? void 0 : original.type; + var write = original === null || original === void 0 ? void 0 : original.write; + return { + abort: abort === undefined ? + undefined : + convertUnderlyingSinkAbortCallback(abort, original, context + " has member 'abort' that"), + close: close === undefined ? + undefined : + convertUnderlyingSinkCloseCallback(close, original, context + " has member 'close' that"), + start: start === undefined ? + undefined : + convertUnderlyingSinkStartCallback(start, original, context + " has member 'start' that"), + write: write === undefined ? + undefined : + convertUnderlyingSinkWriteCallback(write, original, context + " has member 'write' that"), + type: type + }; + } + function convertUnderlyingSinkAbortCallback(fn, original, context) { + assertFunction(fn, context); + return function (reason) { return promiseCall(fn, original, [reason]); }; + } + function convertUnderlyingSinkCloseCallback(fn, original, context) { + assertFunction(fn, context); + return function () { return promiseCall(fn, original, []); }; + } + function convertUnderlyingSinkStartCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { return reflectCall(fn, original, [controller]); }; + } + function convertUnderlyingSinkWriteCallback(fn, original, context) { + assertFunction(fn, context); + return function (chunk, controller) { return promiseCall(fn, original, [chunk, controller]); }; + } + + function assertWritableStream(x, context) { + if (!IsWritableStream(x)) { + throw new TypeError(context + " is not a WritableStream."); + } + } + + function isAbortSignal(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + try { + return typeof value.aborted === 'boolean'; + } + catch (_a) { + // AbortSignal.prototype.aborted throws if its brand check fails + return false; + } + } + var supportsAbortController = typeof AbortController === 'function'; + /** + * Construct a new AbortController, if supported by the platform. + * + * @internal + */ + function createAbortController() { + if (supportsAbortController) { + return new AbortController(); + } + return undefined; + } + + /** + * A writable stream represents a destination for data, into which you can write. + * + * @public + */ + var WritableStream = /** @class */ (function () { + function WritableStream(rawUnderlyingSink, rawStrategy) { + if (rawUnderlyingSink === void 0) { rawUnderlyingSink = {}; } + if (rawStrategy === void 0) { rawStrategy = {}; } + if (rawUnderlyingSink === undefined) { + rawUnderlyingSink = null; + } + else { + assertObject(rawUnderlyingSink, 'First parameter'); + } + var strategy = convertQueuingStrategy(rawStrategy, 'Second parameter'); + var underlyingSink = convertUnderlyingSink(rawUnderlyingSink, 'First parameter'); + InitializeWritableStream(this); + var type = underlyingSink.type; + if (type !== undefined) { + throw new RangeError('Invalid type is specified'); + } + var sizeAlgorithm = ExtractSizeAlgorithm(strategy); + var highWaterMark = ExtractHighWaterMark(strategy, 1); + SetUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, highWaterMark, sizeAlgorithm); + } + Object.defineProperty(WritableStream.prototype, "locked", { + /** + * Returns whether or not the writable stream is locked to a writer. + */ + get: function () { + if (!IsWritableStream(this)) { + throw streamBrandCheckException$2('locked'); + } + return IsWritableStreamLocked(this); + }, + enumerable: false, + configurable: true + }); + /** + * Aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be + * immediately moved to an errored state, with any queued-up writes discarded. This will also execute any abort + * mechanism of the underlying sink. + * + * The returned promise will fulfill if the stream shuts down successfully, or reject if the underlying sink signaled + * that there was an error doing so. Additionally, it will reject with a `TypeError` (without attempting to cancel + * the stream) if the stream is currently locked. + */ + WritableStream.prototype.abort = function (reason) { + if (reason === void 0) { reason = undefined; } + if (!IsWritableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$2('abort')); + } + if (IsWritableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('Cannot abort a stream that already has a writer')); + } + return WritableStreamAbort(this, reason); + }; + /** + * Closes the stream. The underlying sink will finish processing any previously-written chunks, before invoking its + * close behavior. During this time any further attempts to write will fail (without erroring the stream). + * + * The method returns a promise that will fulfill if all remaining chunks are successfully written and the stream + * successfully closes, or rejects if an error is encountered during this process. Additionally, it will reject with + * a `TypeError` (without attempting to cancel the stream) if the stream is currently locked. + */ + WritableStream.prototype.close = function () { + if (!IsWritableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$2('close')); + } + if (IsWritableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('Cannot close a stream that already has a writer')); + } + if (WritableStreamCloseQueuedOrInFlight(this)) { + return promiseRejectedWith(new TypeError('Cannot close an already-closing stream')); + } + return WritableStreamClose(this); + }; + /** + * Creates a {@link WritableStreamDefaultWriter | writer} and locks the stream to the new writer. While the stream + * is locked, no other writer can be acquired until this one is released. + * + * This functionality is especially useful for creating abstractions that desire the ability to write to a stream + * without interruption or interleaving. By getting a writer for the stream, you can ensure nobody else can write at + * the same time, which would cause the resulting written data to be unpredictable and probably useless. + */ + WritableStream.prototype.getWriter = function () { + if (!IsWritableStream(this)) { + throw streamBrandCheckException$2('getWriter'); + } + return AcquireWritableStreamDefaultWriter(this); + }; + return WritableStream; + }()); + Object.defineProperties(WritableStream.prototype, { + abort: { enumerable: true }, + close: { enumerable: true }, + getWriter: { enumerable: true }, + locked: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(WritableStream.prototype, SymbolPolyfill.toStringTag, { + value: 'WritableStream', + configurable: true + }); + } + // Abstract operations for the WritableStream. + function AcquireWritableStreamDefaultWriter(stream) { + return new WritableStreamDefaultWriter(stream); + } + // Throws if and only if startAlgorithm throws. + function CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) { + if (highWaterMark === void 0) { highWaterMark = 1; } + if (sizeAlgorithm === void 0) { sizeAlgorithm = function () { return 1; }; } + var stream = Object.create(WritableStream.prototype); + InitializeWritableStream(stream); + var controller = Object.create(WritableStreamDefaultController.prototype); + SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm); + return stream; + } + function InitializeWritableStream(stream) { + stream._state = 'writable'; + // The error that will be reported by new method calls once the state becomes errored. Only set when [[state]] is + // 'erroring' or 'errored'. May be set to an undefined value. + stream._storedError = undefined; + stream._writer = undefined; + // Initialize to undefined first because the constructor of the controller checks this + // variable to validate the caller. + stream._writableStreamController = undefined; + // This queue is placed here instead of the writer class in order to allow for passing a writer to the next data + // producer without waiting for the queued writes to finish. + stream._writeRequests = new SimpleQueue(); + // Write requests are removed from _writeRequests when write() is called on the underlying sink. This prevents + // them from being erroneously rejected on error. If a write() call is in-flight, the request is stored here. + stream._inFlightWriteRequest = undefined; + // The promise that was returned from writer.close(). Stored here because it may be fulfilled after the writer + // has been detached. + stream._closeRequest = undefined; + // Close request is removed from _closeRequest when close() is called on the underlying sink. This prevents it + // from being erroneously rejected on error. If a close() call is in-flight, the request is stored here. + stream._inFlightCloseRequest = undefined; + // The promise that was returned from writer.abort(). This may also be fulfilled after the writer has detached. + stream._pendingAbortRequest = undefined; + // The backpressure signal set by the controller. + stream._backpressure = false; + } + function IsWritableStream(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) { + return false; + } + return x instanceof WritableStream; + } + function IsWritableStreamLocked(stream) { + if (stream._writer === undefined) { + return false; + } + return true; + } + function WritableStreamAbort(stream, reason) { + var _a; + if (stream._state === 'closed' || stream._state === 'errored') { + return promiseResolvedWith(undefined); + } + stream._writableStreamController._abortReason = reason; + (_a = stream._writableStreamController._abortController) === null || _a === void 0 ? void 0 : _a.abort(); + // TypeScript narrows the type of `stream._state` down to 'writable' | 'erroring', + // but it doesn't know that signaling abort runs author code that might have changed the state. + // Widen the type again by casting to WritableStreamState. + var state = stream._state; + if (state === 'closed' || state === 'errored') { + return promiseResolvedWith(undefined); + } + if (stream._pendingAbortRequest !== undefined) { + return stream._pendingAbortRequest._promise; + } + var wasAlreadyErroring = false; + if (state === 'erroring') { + wasAlreadyErroring = true; + // reason will not be used, so don't keep a reference to it. + reason = undefined; + } + var promise = newPromise(function (resolve, reject) { + stream._pendingAbortRequest = { + _promise: undefined, + _resolve: resolve, + _reject: reject, + _reason: reason, + _wasAlreadyErroring: wasAlreadyErroring + }; + }); + stream._pendingAbortRequest._promise = promise; + if (!wasAlreadyErroring) { + WritableStreamStartErroring(stream, reason); + } + return promise; + } + function WritableStreamClose(stream) { + var state = stream._state; + if (state === 'closed' || state === 'errored') { + return promiseRejectedWith(new TypeError("The stream (in " + state + " state) is not in the writable state and cannot be closed")); + } + var promise = newPromise(function (resolve, reject) { + var closeRequest = { + _resolve: resolve, + _reject: reject + }; + stream._closeRequest = closeRequest; + }); + var writer = stream._writer; + if (writer !== undefined && stream._backpressure && state === 'writable') { + defaultWriterReadyPromiseResolve(writer); + } + WritableStreamDefaultControllerClose(stream._writableStreamController); + return promise; + } + // WritableStream API exposed for controllers. + function WritableStreamAddWriteRequest(stream) { + var promise = newPromise(function (resolve, reject) { + var writeRequest = { + _resolve: resolve, + _reject: reject + }; + stream._writeRequests.push(writeRequest); + }); + return promise; + } + function WritableStreamDealWithRejection(stream, error) { + var state = stream._state; + if (state === 'writable') { + WritableStreamStartErroring(stream, error); + return; + } + WritableStreamFinishErroring(stream); + } + function WritableStreamStartErroring(stream, reason) { + var controller = stream._writableStreamController; + stream._state = 'erroring'; + stream._storedError = reason; + var writer = stream._writer; + if (writer !== undefined) { + WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason); + } + if (!WritableStreamHasOperationMarkedInFlight(stream) && controller._started) { + WritableStreamFinishErroring(stream); + } + } + function WritableStreamFinishErroring(stream) { + stream._state = 'errored'; + stream._writableStreamController[ErrorSteps](); + var storedError = stream._storedError; + stream._writeRequests.forEach(function (writeRequest) { + writeRequest._reject(storedError); + }); + stream._writeRequests = new SimpleQueue(); + if (stream._pendingAbortRequest === undefined) { + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + return; + } + var abortRequest = stream._pendingAbortRequest; + stream._pendingAbortRequest = undefined; + if (abortRequest._wasAlreadyErroring) { + abortRequest._reject(storedError); + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + return; + } + var promise = stream._writableStreamController[AbortSteps](abortRequest._reason); + uponPromise(promise, function () { + abortRequest._resolve(); + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + }, function (reason) { + abortRequest._reject(reason); + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + }); + } + function WritableStreamFinishInFlightWrite(stream) { + stream._inFlightWriteRequest._resolve(undefined); + stream._inFlightWriteRequest = undefined; + } + function WritableStreamFinishInFlightWriteWithError(stream, error) { + stream._inFlightWriteRequest._reject(error); + stream._inFlightWriteRequest = undefined; + WritableStreamDealWithRejection(stream, error); + } + function WritableStreamFinishInFlightClose(stream) { + stream._inFlightCloseRequest._resolve(undefined); + stream._inFlightCloseRequest = undefined; + var state = stream._state; + if (state === 'erroring') { + // The error was too late to do anything, so it is ignored. + stream._storedError = undefined; + if (stream._pendingAbortRequest !== undefined) { + stream._pendingAbortRequest._resolve(); + stream._pendingAbortRequest = undefined; + } + } + stream._state = 'closed'; + var writer = stream._writer; + if (writer !== undefined) { + defaultWriterClosedPromiseResolve(writer); + } + } + function WritableStreamFinishInFlightCloseWithError(stream, error) { + stream._inFlightCloseRequest._reject(error); + stream._inFlightCloseRequest = undefined; + // Never execute sink abort() after sink close(). + if (stream._pendingAbortRequest !== undefined) { + stream._pendingAbortRequest._reject(error); + stream._pendingAbortRequest = undefined; + } + WritableStreamDealWithRejection(stream, error); + } + // TODO(ricea): Fix alphabetical order. + function WritableStreamCloseQueuedOrInFlight(stream) { + if (stream._closeRequest === undefined && stream._inFlightCloseRequest === undefined) { + return false; + } + return true; + } + function WritableStreamHasOperationMarkedInFlight(stream) { + if (stream._inFlightWriteRequest === undefined && stream._inFlightCloseRequest === undefined) { + return false; + } + return true; + } + function WritableStreamMarkCloseRequestInFlight(stream) { + stream._inFlightCloseRequest = stream._closeRequest; + stream._closeRequest = undefined; + } + function WritableStreamMarkFirstWriteRequestInFlight(stream) { + stream._inFlightWriteRequest = stream._writeRequests.shift(); + } + function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) { + if (stream._closeRequest !== undefined) { + stream._closeRequest._reject(stream._storedError); + stream._closeRequest = undefined; + } + var writer = stream._writer; + if (writer !== undefined) { + defaultWriterClosedPromiseReject(writer, stream._storedError); + } + } + function WritableStreamUpdateBackpressure(stream, backpressure) { + var writer = stream._writer; + if (writer !== undefined && backpressure !== stream._backpressure) { + if (backpressure) { + defaultWriterReadyPromiseReset(writer); + } + else { + defaultWriterReadyPromiseResolve(writer); + } + } + stream._backpressure = backpressure; + } + /** + * A default writer vended by a {@link WritableStream}. + * + * @public + */ + var WritableStreamDefaultWriter = /** @class */ (function () { + function WritableStreamDefaultWriter(stream) { + assertRequiredArgument(stream, 1, 'WritableStreamDefaultWriter'); + assertWritableStream(stream, 'First parameter'); + if (IsWritableStreamLocked(stream)) { + throw new TypeError('This stream has already been locked for exclusive writing by another writer'); + } + this._ownerWritableStream = stream; + stream._writer = this; + var state = stream._state; + if (state === 'writable') { + if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._backpressure) { + defaultWriterReadyPromiseInitialize(this); + } + else { + defaultWriterReadyPromiseInitializeAsResolved(this); + } + defaultWriterClosedPromiseInitialize(this); + } + else if (state === 'erroring') { + defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError); + defaultWriterClosedPromiseInitialize(this); + } + else if (state === 'closed') { + defaultWriterReadyPromiseInitializeAsResolved(this); + defaultWriterClosedPromiseInitializeAsResolved(this); + } + else { + var storedError = stream._storedError; + defaultWriterReadyPromiseInitializeAsRejected(this, storedError); + defaultWriterClosedPromiseInitializeAsRejected(this, storedError); + } + } + Object.defineProperty(WritableStreamDefaultWriter.prototype, "closed", { + /** + * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or + * the writer’s lock is released before the stream finishes closing. + */ + get: function () { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('closed')); + } + return this._closedPromise; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WritableStreamDefaultWriter.prototype, "desiredSize", { + /** + * Returns the desired size to fill the stream’s internal queue. It can be negative, if the queue is over-full. + * A producer can use this information to determine the right amount of data to write. + * + * It will be `null` if the stream cannot be successfully written to (due to either being errored, or having an abort + * queued up). It will return zero if the stream is closed. And the getter will throw an exception if invoked when + * the writer’s lock is released. + */ + get: function () { + if (!IsWritableStreamDefaultWriter(this)) { + throw defaultWriterBrandCheckException('desiredSize'); + } + if (this._ownerWritableStream === undefined) { + throw defaultWriterLockException('desiredSize'); + } + return WritableStreamDefaultWriterGetDesiredSize(this); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WritableStreamDefaultWriter.prototype, "ready", { + /** + * Returns a promise that will be fulfilled when the desired size to fill the stream’s internal queue transitions + * from non-positive to positive, signaling that it is no longer applying backpressure. Once the desired size dips + * back to zero or below, the getter will return a new promise that stays pending until the next transition. + * + * If the stream becomes errored or aborted, or the writer’s lock is released, the returned promise will become + * rejected. + */ + get: function () { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('ready')); + } + return this._readyPromise; + }, + enumerable: false, + configurable: true + }); + /** + * If the reader is active, behaves the same as {@link WritableStream.abort | stream.abort(reason)}. + */ + WritableStreamDefaultWriter.prototype.abort = function (reason) { + if (reason === void 0) { reason = undefined; } + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('abort')); + } + if (this._ownerWritableStream === undefined) { + return promiseRejectedWith(defaultWriterLockException('abort')); + } + return WritableStreamDefaultWriterAbort(this, reason); + }; + /** + * If the reader is active, behaves the same as {@link WritableStream.close | stream.close()}. + */ + WritableStreamDefaultWriter.prototype.close = function () { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('close')); + } + var stream = this._ownerWritableStream; + if (stream === undefined) { + return promiseRejectedWith(defaultWriterLockException('close')); + } + if (WritableStreamCloseQueuedOrInFlight(stream)) { + return promiseRejectedWith(new TypeError('Cannot close an already-closing stream')); + } + return WritableStreamDefaultWriterClose(this); + }; + /** + * Releases the writer’s lock on the corresponding stream. After the lock is released, the writer is no longer active. + * If the associated stream is errored when the lock is released, the writer will appear errored in the same way from + * now on; otherwise, the writer will appear closed. + * + * Note that the lock can still be released even if some ongoing writes have not yet finished (i.e. even if the + * promises returned from previous calls to {@link WritableStreamDefaultWriter.write | write()} have not yet settled). + * It’s not necessary to hold the lock on the writer for the duration of the write; the lock instead simply prevents + * other producers from writing in an interleaved manner. + */ + WritableStreamDefaultWriter.prototype.releaseLock = function () { + if (!IsWritableStreamDefaultWriter(this)) { + throw defaultWriterBrandCheckException('releaseLock'); + } + var stream = this._ownerWritableStream; + if (stream === undefined) { + return; + } + WritableStreamDefaultWriterRelease(this); + }; + WritableStreamDefaultWriter.prototype.write = function (chunk) { + if (chunk === void 0) { chunk = undefined; } + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('write')); + } + if (this._ownerWritableStream === undefined) { + return promiseRejectedWith(defaultWriterLockException('write to')); + } + return WritableStreamDefaultWriterWrite(this, chunk); + }; + return WritableStreamDefaultWriter; + }()); + Object.defineProperties(WritableStreamDefaultWriter.prototype, { + abort: { enumerable: true }, + close: { enumerable: true }, + releaseLock: { enumerable: true }, + write: { enumerable: true }, + closed: { enumerable: true }, + desiredSize: { enumerable: true }, + ready: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(WritableStreamDefaultWriter.prototype, SymbolPolyfill.toStringTag, { + value: 'WritableStreamDefaultWriter', + configurable: true + }); + } + // Abstract operations for the WritableStreamDefaultWriter. + function IsWritableStreamDefaultWriter(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_ownerWritableStream')) { + return false; + } + return x instanceof WritableStreamDefaultWriter; + } + // A client of WritableStreamDefaultWriter may use these functions directly to bypass state check. + function WritableStreamDefaultWriterAbort(writer, reason) { + var stream = writer._ownerWritableStream; + return WritableStreamAbort(stream, reason); + } + function WritableStreamDefaultWriterClose(writer) { + var stream = writer._ownerWritableStream; + return WritableStreamClose(stream); + } + function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) { + var stream = writer._ownerWritableStream; + var state = stream._state; + if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') { + return promiseResolvedWith(undefined); + } + if (state === 'errored') { + return promiseRejectedWith(stream._storedError); + } + return WritableStreamDefaultWriterClose(writer); + } + function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) { + if (writer._closedPromiseState === 'pending') { + defaultWriterClosedPromiseReject(writer, error); + } + else { + defaultWriterClosedPromiseResetToRejected(writer, error); + } + } + function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) { + if (writer._readyPromiseState === 'pending') { + defaultWriterReadyPromiseReject(writer, error); + } + else { + defaultWriterReadyPromiseResetToRejected(writer, error); + } + } + function WritableStreamDefaultWriterGetDesiredSize(writer) { + var stream = writer._ownerWritableStream; + var state = stream._state; + if (state === 'errored' || state === 'erroring') { + return null; + } + if (state === 'closed') { + return 0; + } + return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController); + } + function WritableStreamDefaultWriterRelease(writer) { + var stream = writer._ownerWritableStream; + var releasedError = new TypeError("Writer was released and can no longer be used to monitor the stream's closedness"); + WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError); + // The state transitions to "errored" before the sink abort() method runs, but the writer.closed promise is not + // rejected until afterwards. This means that simply testing state will not work. + WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError); + stream._writer = undefined; + writer._ownerWritableStream = undefined; + } + function WritableStreamDefaultWriterWrite(writer, chunk) { + var stream = writer._ownerWritableStream; + var controller = stream._writableStreamController; + var chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk); + if (stream !== writer._ownerWritableStream) { + return promiseRejectedWith(defaultWriterLockException('write to')); + } + var state = stream._state; + if (state === 'errored') { + return promiseRejectedWith(stream._storedError); + } + if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') { + return promiseRejectedWith(new TypeError('The stream is closing or closed and cannot be written to')); + } + if (state === 'erroring') { + return promiseRejectedWith(stream._storedError); + } + var promise = WritableStreamAddWriteRequest(stream); + WritableStreamDefaultControllerWrite(controller, chunk, chunkSize); + return promise; + } + var closeSentinel = {}; + /** + * Allows control of a {@link WritableStream | writable stream}'s state and internal queue. + * + * @public + */ + var WritableStreamDefaultController = /** @class */ (function () { + function WritableStreamDefaultController() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(WritableStreamDefaultController.prototype, "abortReason", { + /** + * The reason which was passed to `WritableStream.abort(reason)` when the stream was aborted. + * + * @deprecated + * This property has been removed from the specification, see https://github.com/whatwg/streams/pull/1177. + * Use {@link WritableStreamDefaultController.signal}'s `reason` instead. + */ + get: function () { + if (!IsWritableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$2('abortReason'); + } + return this._abortReason; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WritableStreamDefaultController.prototype, "signal", { + /** + * An `AbortSignal` that can be used to abort the pending write or close operation when the stream is aborted. + */ + get: function () { + if (!IsWritableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$2('signal'); + } + if (this._abortController === undefined) { + // Older browsers or older Node versions may not support `AbortController` or `AbortSignal`. + // We don't want to bundle and ship an `AbortController` polyfill together with our polyfill, + // so instead we only implement support for `signal` if we find a global `AbortController` constructor. + throw new TypeError('WritableStreamDefaultController.prototype.signal is not supported'); + } + return this._abortController.signal; + }, + enumerable: false, + configurable: true + }); + /** + * Closes the controlled writable stream, making all future interactions with it fail with the given error `e`. + * + * This method is rarely used, since usually it suffices to return a rejected promise from one of the underlying + * sink's methods. However, it can be useful for suddenly shutting down a stream in response to an event outside the + * normal lifecycle of interactions with the underlying sink. + */ + WritableStreamDefaultController.prototype.error = function (e) { + if (e === void 0) { e = undefined; } + if (!IsWritableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$2('error'); + } + var state = this._controlledWritableStream._state; + if (state !== 'writable') { + // The stream is closed, errored or will be soon. The sink can't do anything useful if it gets an error here, so + // just treat it as a no-op. + return; + } + WritableStreamDefaultControllerError(this, e); + }; + /** @internal */ + WritableStreamDefaultController.prototype[AbortSteps] = function (reason) { + var result = this._abortAlgorithm(reason); + WritableStreamDefaultControllerClearAlgorithms(this); + return result; + }; + /** @internal */ + WritableStreamDefaultController.prototype[ErrorSteps] = function () { + ResetQueue(this); + }; + return WritableStreamDefaultController; + }()); + Object.defineProperties(WritableStreamDefaultController.prototype, { + abortReason: { enumerable: true }, + signal: { enumerable: true }, + error: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(WritableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, { + value: 'WritableStreamDefaultController', + configurable: true + }); + } + // Abstract operations implementing interface required by the WritableStream. + function IsWritableStreamDefaultController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledWritableStream')) { + return false; + } + return x instanceof WritableStreamDefaultController; + } + function SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) { + controller._controlledWritableStream = stream; + stream._writableStreamController = controller; + // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly. + controller._queue = undefined; + controller._queueTotalSize = undefined; + ResetQueue(controller); + controller._abortReason = undefined; + controller._abortController = createAbortController(); + controller._started = false; + controller._strategySizeAlgorithm = sizeAlgorithm; + controller._strategyHWM = highWaterMark; + controller._writeAlgorithm = writeAlgorithm; + controller._closeAlgorithm = closeAlgorithm; + controller._abortAlgorithm = abortAlgorithm; + var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); + WritableStreamUpdateBackpressure(stream, backpressure); + var startResult = startAlgorithm(); + var startPromise = promiseResolvedWith(startResult); + uponPromise(startPromise, function () { + controller._started = true; + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + }, function (r) { + controller._started = true; + WritableStreamDealWithRejection(stream, r); + }); + } + function SetUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, highWaterMark, sizeAlgorithm) { + var controller = Object.create(WritableStreamDefaultController.prototype); + var startAlgorithm = function () { return undefined; }; + var writeAlgorithm = function () { return promiseResolvedWith(undefined); }; + var closeAlgorithm = function () { return promiseResolvedWith(undefined); }; + var abortAlgorithm = function () { return promiseResolvedWith(undefined); }; + if (underlyingSink.start !== undefined) { + startAlgorithm = function () { return underlyingSink.start(controller); }; + } + if (underlyingSink.write !== undefined) { + writeAlgorithm = function (chunk) { return underlyingSink.write(chunk, controller); }; + } + if (underlyingSink.close !== undefined) { + closeAlgorithm = function () { return underlyingSink.close(); }; + } + if (underlyingSink.abort !== undefined) { + abortAlgorithm = function (reason) { return underlyingSink.abort(reason); }; + } + SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm); + } + // ClearAlgorithms may be called twice. Erroring the same stream in multiple ways will often result in redundant calls. + function WritableStreamDefaultControllerClearAlgorithms(controller) { + controller._writeAlgorithm = undefined; + controller._closeAlgorithm = undefined; + controller._abortAlgorithm = undefined; + controller._strategySizeAlgorithm = undefined; + } + function WritableStreamDefaultControllerClose(controller) { + EnqueueValueWithSize(controller, closeSentinel, 0); + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + } + function WritableStreamDefaultControllerGetChunkSize(controller, chunk) { + try { + return controller._strategySizeAlgorithm(chunk); + } + catch (chunkSizeE) { + WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE); + return 1; + } + } + function WritableStreamDefaultControllerGetDesiredSize(controller) { + return controller._strategyHWM - controller._queueTotalSize; + } + function WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) { + try { + EnqueueValueWithSize(controller, chunk, chunkSize); + } + catch (enqueueE) { + WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE); + return; + } + var stream = controller._controlledWritableStream; + if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._state === 'writable') { + var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); + WritableStreamUpdateBackpressure(stream, backpressure); + } + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + } + // Abstract operations for the WritableStreamDefaultController. + function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) { + var stream = controller._controlledWritableStream; + if (!controller._started) { + return; + } + if (stream._inFlightWriteRequest !== undefined) { + return; + } + var state = stream._state; + if (state === 'erroring') { + WritableStreamFinishErroring(stream); + return; + } + if (controller._queue.length === 0) { + return; + } + var value = PeekQueueValue(controller); + if (value === closeSentinel) { + WritableStreamDefaultControllerProcessClose(controller); + } + else { + WritableStreamDefaultControllerProcessWrite(controller, value); + } + } + function WritableStreamDefaultControllerErrorIfNeeded(controller, error) { + if (controller._controlledWritableStream._state === 'writable') { + WritableStreamDefaultControllerError(controller, error); + } + } + function WritableStreamDefaultControllerProcessClose(controller) { + var stream = controller._controlledWritableStream; + WritableStreamMarkCloseRequestInFlight(stream); + DequeueValue(controller); + var sinkClosePromise = controller._closeAlgorithm(); + WritableStreamDefaultControllerClearAlgorithms(controller); + uponPromise(sinkClosePromise, function () { + WritableStreamFinishInFlightClose(stream); + }, function (reason) { + WritableStreamFinishInFlightCloseWithError(stream, reason); + }); + } + function WritableStreamDefaultControllerProcessWrite(controller, chunk) { + var stream = controller._controlledWritableStream; + WritableStreamMarkFirstWriteRequestInFlight(stream); + var sinkWritePromise = controller._writeAlgorithm(chunk); + uponPromise(sinkWritePromise, function () { + WritableStreamFinishInFlightWrite(stream); + var state = stream._state; + DequeueValue(controller); + if (!WritableStreamCloseQueuedOrInFlight(stream) && state === 'writable') { + var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); + WritableStreamUpdateBackpressure(stream, backpressure); + } + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + }, function (reason) { + if (stream._state === 'writable') { + WritableStreamDefaultControllerClearAlgorithms(controller); + } + WritableStreamFinishInFlightWriteWithError(stream, reason); + }); + } + function WritableStreamDefaultControllerGetBackpressure(controller) { + var desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller); + return desiredSize <= 0; + } + // A client of WritableStreamDefaultController may use these functions directly to bypass state check. + function WritableStreamDefaultControllerError(controller, error) { + var stream = controller._controlledWritableStream; + WritableStreamDefaultControllerClearAlgorithms(controller); + WritableStreamStartErroring(stream, error); + } + // Helper functions for the WritableStream. + function streamBrandCheckException$2(name) { + return new TypeError("WritableStream.prototype." + name + " can only be used on a WritableStream"); + } + // Helper functions for the WritableStreamDefaultController. + function defaultControllerBrandCheckException$2(name) { + return new TypeError("WritableStreamDefaultController.prototype." + name + " can only be used on a WritableStreamDefaultController"); + } + // Helper functions for the WritableStreamDefaultWriter. + function defaultWriterBrandCheckException(name) { + return new TypeError("WritableStreamDefaultWriter.prototype." + name + " can only be used on a WritableStreamDefaultWriter"); + } + function defaultWriterLockException(name) { + return new TypeError('Cannot ' + name + ' a stream using a released writer'); + } + function defaultWriterClosedPromiseInitialize(writer) { + writer._closedPromise = newPromise(function (resolve, reject) { + writer._closedPromise_resolve = resolve; + writer._closedPromise_reject = reject; + writer._closedPromiseState = 'pending'; + }); + } + function defaultWriterClosedPromiseInitializeAsRejected(writer, reason) { + defaultWriterClosedPromiseInitialize(writer); + defaultWriterClosedPromiseReject(writer, reason); + } + function defaultWriterClosedPromiseInitializeAsResolved(writer) { + defaultWriterClosedPromiseInitialize(writer); + defaultWriterClosedPromiseResolve(writer); + } + function defaultWriterClosedPromiseReject(writer, reason) { + if (writer._closedPromise_reject === undefined) { + return; + } + setPromiseIsHandledToTrue(writer._closedPromise); + writer._closedPromise_reject(reason); + writer._closedPromise_resolve = undefined; + writer._closedPromise_reject = undefined; + writer._closedPromiseState = 'rejected'; + } + function defaultWriterClosedPromiseResetToRejected(writer, reason) { + defaultWriterClosedPromiseInitializeAsRejected(writer, reason); + } + function defaultWriterClosedPromiseResolve(writer) { + if (writer._closedPromise_resolve === undefined) { + return; + } + writer._closedPromise_resolve(undefined); + writer._closedPromise_resolve = undefined; + writer._closedPromise_reject = undefined; + writer._closedPromiseState = 'resolved'; + } + function defaultWriterReadyPromiseInitialize(writer) { + writer._readyPromise = newPromise(function (resolve, reject) { + writer._readyPromise_resolve = resolve; + writer._readyPromise_reject = reject; + }); + writer._readyPromiseState = 'pending'; + } + function defaultWriterReadyPromiseInitializeAsRejected(writer, reason) { + defaultWriterReadyPromiseInitialize(writer); + defaultWriterReadyPromiseReject(writer, reason); + } + function defaultWriterReadyPromiseInitializeAsResolved(writer) { + defaultWriterReadyPromiseInitialize(writer); + defaultWriterReadyPromiseResolve(writer); + } + function defaultWriterReadyPromiseReject(writer, reason) { + if (writer._readyPromise_reject === undefined) { + return; + } + setPromiseIsHandledToTrue(writer._readyPromise); + writer._readyPromise_reject(reason); + writer._readyPromise_resolve = undefined; + writer._readyPromise_reject = undefined; + writer._readyPromiseState = 'rejected'; + } + function defaultWriterReadyPromiseReset(writer) { + defaultWriterReadyPromiseInitialize(writer); + } + function defaultWriterReadyPromiseResetToRejected(writer, reason) { + defaultWriterReadyPromiseInitializeAsRejected(writer, reason); + } + function defaultWriterReadyPromiseResolve(writer) { + if (writer._readyPromise_resolve === undefined) { + return; + } + writer._readyPromise_resolve(undefined); + writer._readyPromise_resolve = undefined; + writer._readyPromise_reject = undefined; + writer._readyPromiseState = 'fulfilled'; + } + + /// + var NativeDOMException = typeof DOMException !== 'undefined' ? DOMException : undefined; + + /// + function isDOMExceptionConstructor(ctor) { + if (!(typeof ctor === 'function' || typeof ctor === 'object')) { + return false; + } + try { + new ctor(); + return true; + } + catch (_a) { + return false; + } + } + function createDOMExceptionPolyfill() { + // eslint-disable-next-line no-shadow + var ctor = function DOMException(message, name) { + this.message = message || ''; + this.name = name || 'Error'; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + }; + ctor.prototype = Object.create(Error.prototype); + Object.defineProperty(ctor.prototype, 'constructor', { value: ctor, writable: true, configurable: true }); + return ctor; + } + // eslint-disable-next-line no-redeclare + var DOMException$1 = isDOMExceptionConstructor(NativeDOMException) ? NativeDOMException : createDOMExceptionPolyfill(); + + function ReadableStreamPipeTo(source, dest, preventClose, preventAbort, preventCancel, signal) { + var reader = AcquireReadableStreamDefaultReader(source); + var writer = AcquireWritableStreamDefaultWriter(dest); + source._disturbed = true; + var shuttingDown = false; + // This is used to keep track of the spec's requirement that we wait for ongoing writes during shutdown. + var currentWrite = promiseResolvedWith(undefined); + return newPromise(function (resolve, reject) { + var abortAlgorithm; + if (signal !== undefined) { + abortAlgorithm = function () { + var error = new DOMException$1('Aborted', 'AbortError'); + var actions = []; + if (!preventAbort) { + actions.push(function () { + if (dest._state === 'writable') { + return WritableStreamAbort(dest, error); + } + return promiseResolvedWith(undefined); + }); + } + if (!preventCancel) { + actions.push(function () { + if (source._state === 'readable') { + return ReadableStreamCancel(source, error); + } + return promiseResolvedWith(undefined); + }); + } + shutdownWithAction(function () { return Promise.all(actions.map(function (action) { return action(); })); }, true, error); + }; + if (signal.aborted) { + abortAlgorithm(); + return; + } + signal.addEventListener('abort', abortAlgorithm); + } + // Using reader and writer, read all chunks from this and write them to dest + // - Backpressure must be enforced + // - Shutdown must stop all activity + function pipeLoop() { + return newPromise(function (resolveLoop, rejectLoop) { + function next(done) { + if (done) { + resolveLoop(); + } + else { + // Use `PerformPromiseThen` instead of `uponPromise` to avoid + // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers + PerformPromiseThen(pipeStep(), next, rejectLoop); + } + } + next(false); + }); + } + function pipeStep() { + if (shuttingDown) { + return promiseResolvedWith(true); + } + return PerformPromiseThen(writer._readyPromise, function () { + return newPromise(function (resolveRead, rejectRead) { + ReadableStreamDefaultReaderRead(reader, { + _chunkSteps: function (chunk) { + currentWrite = PerformPromiseThen(WritableStreamDefaultWriterWrite(writer, chunk), undefined, noop); + resolveRead(false); + }, + _closeSteps: function () { return resolveRead(true); }, + _errorSteps: rejectRead + }); + }); + }); + } + // Errors must be propagated forward + isOrBecomesErrored(source, reader._closedPromise, function (storedError) { + if (!preventAbort) { + shutdownWithAction(function () { return WritableStreamAbort(dest, storedError); }, true, storedError); + } + else { + shutdown(true, storedError); + } + }); + // Errors must be propagated backward + isOrBecomesErrored(dest, writer._closedPromise, function (storedError) { + if (!preventCancel) { + shutdownWithAction(function () { return ReadableStreamCancel(source, storedError); }, true, storedError); + } + else { + shutdown(true, storedError); + } + }); + // Closing must be propagated forward + isOrBecomesClosed(source, reader._closedPromise, function () { + if (!preventClose) { + shutdownWithAction(function () { return WritableStreamDefaultWriterCloseWithErrorPropagation(writer); }); + } + else { + shutdown(); + } + }); + // Closing must be propagated backward + if (WritableStreamCloseQueuedOrInFlight(dest) || dest._state === 'closed') { + var destClosed_1 = new TypeError('the destination writable stream closed before all data could be piped to it'); + if (!preventCancel) { + shutdownWithAction(function () { return ReadableStreamCancel(source, destClosed_1); }, true, destClosed_1); + } + else { + shutdown(true, destClosed_1); + } + } + setPromiseIsHandledToTrue(pipeLoop()); + function waitForWritesToFinish() { + // Another write may have started while we were waiting on this currentWrite, so we have to be sure to wait + // for that too. + var oldCurrentWrite = currentWrite; + return PerformPromiseThen(currentWrite, function () { return oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined; }); + } + function isOrBecomesErrored(stream, promise, action) { + if (stream._state === 'errored') { + action(stream._storedError); + } + else { + uponRejection(promise, action); + } + } + function isOrBecomesClosed(stream, promise, action) { + if (stream._state === 'closed') { + action(); + } + else { + uponFulfillment(promise, action); + } + } + function shutdownWithAction(action, originalIsError, originalError) { + if (shuttingDown) { + return; + } + shuttingDown = true; + if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) { + uponFulfillment(waitForWritesToFinish(), doTheRest); + } + else { + doTheRest(); + } + function doTheRest() { + uponPromise(action(), function () { return finalize(originalIsError, originalError); }, function (newError) { return finalize(true, newError); }); + } + } + function shutdown(isError, error) { + if (shuttingDown) { + return; + } + shuttingDown = true; + if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) { + uponFulfillment(waitForWritesToFinish(), function () { return finalize(isError, error); }); + } + else { + finalize(isError, error); + } + } + function finalize(isError, error) { + WritableStreamDefaultWriterRelease(writer); + ReadableStreamReaderGenericRelease(reader); + if (signal !== undefined) { + signal.removeEventListener('abort', abortAlgorithm); + } + if (isError) { + reject(error); + } + else { + resolve(undefined); + } + } + }); + } + + /** + * Allows control of a {@link ReadableStream | readable stream}'s state and internal queue. + * + * @public + */ + var ReadableStreamDefaultController = /** @class */ (function () { + function ReadableStreamDefaultController() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(ReadableStreamDefaultController.prototype, "desiredSize", { + /** + * Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is + * over-full. An underlying source ought to use this information to determine when and how to apply backpressure. + */ + get: function () { + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('desiredSize'); + } + return ReadableStreamDefaultControllerGetDesiredSize(this); + }, + enumerable: false, + configurable: true + }); + /** + * Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from + * the stream, but once those are read, the stream will become closed. + */ + ReadableStreamDefaultController.prototype.close = function () { + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('close'); + } + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) { + throw new TypeError('The stream is not in a state that permits close'); + } + ReadableStreamDefaultControllerClose(this); + }; + ReadableStreamDefaultController.prototype.enqueue = function (chunk) { + if (chunk === void 0) { chunk = undefined; } + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('enqueue'); + } + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) { + throw new TypeError('The stream is not in a state that permits enqueue'); + } + return ReadableStreamDefaultControllerEnqueue(this, chunk); + }; + /** + * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`. + */ + ReadableStreamDefaultController.prototype.error = function (e) { + if (e === void 0) { e = undefined; } + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('error'); + } + ReadableStreamDefaultControllerError(this, e); + }; + /** @internal */ + ReadableStreamDefaultController.prototype[CancelSteps] = function (reason) { + ResetQueue(this); + var result = this._cancelAlgorithm(reason); + ReadableStreamDefaultControllerClearAlgorithms(this); + return result; + }; + /** @internal */ + ReadableStreamDefaultController.prototype[PullSteps] = function (readRequest) { + var stream = this._controlledReadableStream; + if (this._queue.length > 0) { + var chunk = DequeueValue(this); + if (this._closeRequested && this._queue.length === 0) { + ReadableStreamDefaultControllerClearAlgorithms(this); + ReadableStreamClose(stream); + } + else { + ReadableStreamDefaultControllerCallPullIfNeeded(this); + } + readRequest._chunkSteps(chunk); + } + else { + ReadableStreamAddReadRequest(stream, readRequest); + ReadableStreamDefaultControllerCallPullIfNeeded(this); + } + }; + return ReadableStreamDefaultController; + }()); + Object.defineProperties(ReadableStreamDefaultController.prototype, { + close: { enumerable: true }, + enqueue: { enumerable: true }, + error: { enumerable: true }, + desiredSize: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamDefaultController', + configurable: true + }); + } + // Abstract operations for the ReadableStreamDefaultController. + function IsReadableStreamDefaultController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableStream')) { + return false; + } + return x instanceof ReadableStreamDefaultController; + } + function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { + var shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); + if (!shouldPull) { + return; + } + if (controller._pulling) { + controller._pullAgain = true; + return; + } + controller._pulling = true; + var pullPromise = controller._pullAlgorithm(); + uponPromise(pullPromise, function () { + controller._pulling = false; + if (controller._pullAgain) { + controller._pullAgain = false; + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + } + }, function (e) { + ReadableStreamDefaultControllerError(controller, e); + }); + } + function ReadableStreamDefaultControllerShouldCallPull(controller) { + var stream = controller._controlledReadableStream; + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) { + return false; + } + if (!controller._started) { + return false; + } + if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + return true; + } + var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller); + if (desiredSize > 0) { + return true; + } + return false; + } + function ReadableStreamDefaultControllerClearAlgorithms(controller) { + controller._pullAlgorithm = undefined; + controller._cancelAlgorithm = undefined; + controller._strategySizeAlgorithm = undefined; + } + // A client of ReadableStreamDefaultController may use these functions directly to bypass state check. + function ReadableStreamDefaultControllerClose(controller) { + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) { + return; + } + var stream = controller._controlledReadableStream; + controller._closeRequested = true; + if (controller._queue.length === 0) { + ReadableStreamDefaultControllerClearAlgorithms(controller); + ReadableStreamClose(stream); + } + } + function ReadableStreamDefaultControllerEnqueue(controller, chunk) { + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) { + return; + } + var stream = controller._controlledReadableStream; + if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + ReadableStreamFulfillReadRequest(stream, chunk, false); + } + else { + var chunkSize = void 0; + try { + chunkSize = controller._strategySizeAlgorithm(chunk); + } + catch (chunkSizeE) { + ReadableStreamDefaultControllerError(controller, chunkSizeE); + throw chunkSizeE; + } + try { + EnqueueValueWithSize(controller, chunk, chunkSize); + } + catch (enqueueE) { + ReadableStreamDefaultControllerError(controller, enqueueE); + throw enqueueE; + } + } + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + } + function ReadableStreamDefaultControllerError(controller, e) { + var stream = controller._controlledReadableStream; + if (stream._state !== 'readable') { + return; + } + ResetQueue(controller); + ReadableStreamDefaultControllerClearAlgorithms(controller); + ReadableStreamError(stream, e); + } + function ReadableStreamDefaultControllerGetDesiredSize(controller) { + var state = controller._controlledReadableStream._state; + if (state === 'errored') { + return null; + } + if (state === 'closed') { + return 0; + } + return controller._strategyHWM - controller._queueTotalSize; + } + // This is used in the implementation of TransformStream. + function ReadableStreamDefaultControllerHasBackpressure(controller) { + if (ReadableStreamDefaultControllerShouldCallPull(controller)) { + return false; + } + return true; + } + function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) { + var state = controller._controlledReadableStream._state; + if (!controller._closeRequested && state === 'readable') { + return true; + } + return false; + } + function SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) { + controller._controlledReadableStream = stream; + controller._queue = undefined; + controller._queueTotalSize = undefined; + ResetQueue(controller); + controller._started = false; + controller._closeRequested = false; + controller._pullAgain = false; + controller._pulling = false; + controller._strategySizeAlgorithm = sizeAlgorithm; + controller._strategyHWM = highWaterMark; + controller._pullAlgorithm = pullAlgorithm; + controller._cancelAlgorithm = cancelAlgorithm; + stream._readableStreamController = controller; + var startResult = startAlgorithm(); + uponPromise(promiseResolvedWith(startResult), function () { + controller._started = true; + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + }, function (r) { + ReadableStreamDefaultControllerError(controller, r); + }); + } + function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream, underlyingSource, highWaterMark, sizeAlgorithm) { + var controller = Object.create(ReadableStreamDefaultController.prototype); + var startAlgorithm = function () { return undefined; }; + var pullAlgorithm = function () { return promiseResolvedWith(undefined); }; + var cancelAlgorithm = function () { return promiseResolvedWith(undefined); }; + if (underlyingSource.start !== undefined) { + startAlgorithm = function () { return underlyingSource.start(controller); }; + } + if (underlyingSource.pull !== undefined) { + pullAlgorithm = function () { return underlyingSource.pull(controller); }; + } + if (underlyingSource.cancel !== undefined) { + cancelAlgorithm = function (reason) { return underlyingSource.cancel(reason); }; + } + SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm); + } + // Helper functions for the ReadableStreamDefaultController. + function defaultControllerBrandCheckException$1(name) { + return new TypeError("ReadableStreamDefaultController.prototype." + name + " can only be used on a ReadableStreamDefaultController"); + } + + function ReadableStreamTee(stream, cloneForBranch2) { + if (IsReadableByteStreamController(stream._readableStreamController)) { + return ReadableByteStreamTee(stream); + } + return ReadableStreamDefaultTee(stream); + } + function ReadableStreamDefaultTee(stream, cloneForBranch2) { + var reader = AcquireReadableStreamDefaultReader(stream); + var reading = false; + var readAgain = false; + var canceled1 = false; + var canceled2 = false; + var reason1; + var reason2; + var branch1; + var branch2; + var resolveCancelPromise; + var cancelPromise = newPromise(function (resolve) { + resolveCancelPromise = resolve; + }); + function pullAlgorithm() { + if (reading) { + readAgain = true; + return promiseResolvedWith(undefined); + } + reading = true; + var readRequest = { + _chunkSteps: function (chunk) { + // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using + // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let + // successful synchronously-available reads get ahead of asynchronously-available errors. + queueMicrotask(function () { + readAgain = false; + var chunk1 = chunk; + var chunk2 = chunk; + // There is no way to access the cloning code right now in the reference implementation. + // If we add one then we'll need an implementation for serializable objects. + // if (!canceled2 && cloneForBranch2) { + // chunk2 = StructuredDeserialize(StructuredSerialize(chunk2)); + // } + if (!canceled1) { + ReadableStreamDefaultControllerEnqueue(branch1._readableStreamController, chunk1); + } + if (!canceled2) { + ReadableStreamDefaultControllerEnqueue(branch2._readableStreamController, chunk2); + } + reading = false; + if (readAgain) { + pullAlgorithm(); + } + }); + }, + _closeSteps: function () { + reading = false; + if (!canceled1) { + ReadableStreamDefaultControllerClose(branch1._readableStreamController); + } + if (!canceled2) { + ReadableStreamDefaultControllerClose(branch2._readableStreamController); + } + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }, + _errorSteps: function () { + reading = false; + } + }; + ReadableStreamDefaultReaderRead(reader, readRequest); + return promiseResolvedWith(undefined); + } + function cancel1Algorithm(reason) { + canceled1 = true; + reason1 = reason; + if (canceled2) { + var compositeReason = CreateArrayFromList([reason1, reason2]); + var cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function cancel2Algorithm(reason) { + canceled2 = true; + reason2 = reason; + if (canceled1) { + var compositeReason = CreateArrayFromList([reason1, reason2]); + var cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function startAlgorithm() { + // do nothing + } + branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm); + branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm); + uponRejection(reader._closedPromise, function (r) { + ReadableStreamDefaultControllerError(branch1._readableStreamController, r); + ReadableStreamDefaultControllerError(branch2._readableStreamController, r); + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }); + return [branch1, branch2]; + } + function ReadableByteStreamTee(stream) { + var reader = AcquireReadableStreamDefaultReader(stream); + var reading = false; + var readAgainForBranch1 = false; + var readAgainForBranch2 = false; + var canceled1 = false; + var canceled2 = false; + var reason1; + var reason2; + var branch1; + var branch2; + var resolveCancelPromise; + var cancelPromise = newPromise(function (resolve) { + resolveCancelPromise = resolve; + }); + function forwardReaderError(thisReader) { + uponRejection(thisReader._closedPromise, function (r) { + if (thisReader !== reader) { + return; + } + ReadableByteStreamControllerError(branch1._readableStreamController, r); + ReadableByteStreamControllerError(branch2._readableStreamController, r); + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }); + } + function pullWithDefaultReader() { + if (IsReadableStreamBYOBReader(reader)) { + ReadableStreamReaderGenericRelease(reader); + reader = AcquireReadableStreamDefaultReader(stream); + forwardReaderError(reader); + } + var readRequest = { + _chunkSteps: function (chunk) { + // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using + // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let + // successful synchronously-available reads get ahead of asynchronously-available errors. + queueMicrotask(function () { + readAgainForBranch1 = false; + readAgainForBranch2 = false; + var chunk1 = chunk; + var chunk2 = chunk; + if (!canceled1 && !canceled2) { + try { + chunk2 = CloneAsUint8Array(chunk); + } + catch (cloneE) { + ReadableByteStreamControllerError(branch1._readableStreamController, cloneE); + ReadableByteStreamControllerError(branch2._readableStreamController, cloneE); + resolveCancelPromise(ReadableStreamCancel(stream, cloneE)); + return; + } + } + if (!canceled1) { + ReadableByteStreamControllerEnqueue(branch1._readableStreamController, chunk1); + } + if (!canceled2) { + ReadableByteStreamControllerEnqueue(branch2._readableStreamController, chunk2); + } + reading = false; + if (readAgainForBranch1) { + pull1Algorithm(); + } + else if (readAgainForBranch2) { + pull2Algorithm(); + } + }); + }, + _closeSteps: function () { + reading = false; + if (!canceled1) { + ReadableByteStreamControllerClose(branch1._readableStreamController); + } + if (!canceled2) { + ReadableByteStreamControllerClose(branch2._readableStreamController); + } + if (branch1._readableStreamController._pendingPullIntos.length > 0) { + ReadableByteStreamControllerRespond(branch1._readableStreamController, 0); + } + if (branch2._readableStreamController._pendingPullIntos.length > 0) { + ReadableByteStreamControllerRespond(branch2._readableStreamController, 0); + } + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }, + _errorSteps: function () { + reading = false; + } + }; + ReadableStreamDefaultReaderRead(reader, readRequest); + } + function pullWithBYOBReader(view, forBranch2) { + if (IsReadableStreamDefaultReader(reader)) { + ReadableStreamReaderGenericRelease(reader); + reader = AcquireReadableStreamBYOBReader(stream); + forwardReaderError(reader); + } + var byobBranch = forBranch2 ? branch2 : branch1; + var otherBranch = forBranch2 ? branch1 : branch2; + var readIntoRequest = { + _chunkSteps: function (chunk) { + // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using + // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let + // successful synchronously-available reads get ahead of asynchronously-available errors. + queueMicrotask(function () { + readAgainForBranch1 = false; + readAgainForBranch2 = false; + var byobCanceled = forBranch2 ? canceled2 : canceled1; + var otherCanceled = forBranch2 ? canceled1 : canceled2; + if (!otherCanceled) { + var clonedChunk = void 0; + try { + clonedChunk = CloneAsUint8Array(chunk); + } + catch (cloneE) { + ReadableByteStreamControllerError(byobBranch._readableStreamController, cloneE); + ReadableByteStreamControllerError(otherBranch._readableStreamController, cloneE); + resolveCancelPromise(ReadableStreamCancel(stream, cloneE)); + return; + } + if (!byobCanceled) { + ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk); + } + ReadableByteStreamControllerEnqueue(otherBranch._readableStreamController, clonedChunk); + } + else if (!byobCanceled) { + ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk); + } + reading = false; + if (readAgainForBranch1) { + pull1Algorithm(); + } + else if (readAgainForBranch2) { + pull2Algorithm(); + } + }); + }, + _closeSteps: function (chunk) { + reading = false; + var byobCanceled = forBranch2 ? canceled2 : canceled1; + var otherCanceled = forBranch2 ? canceled1 : canceled2; + if (!byobCanceled) { + ReadableByteStreamControllerClose(byobBranch._readableStreamController); + } + if (!otherCanceled) { + ReadableByteStreamControllerClose(otherBranch._readableStreamController); + } + if (chunk !== undefined) { + if (!byobCanceled) { + ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk); + } + if (!otherCanceled && otherBranch._readableStreamController._pendingPullIntos.length > 0) { + ReadableByteStreamControllerRespond(otherBranch._readableStreamController, 0); + } + } + if (!byobCanceled || !otherCanceled) { + resolveCancelPromise(undefined); + } + }, + _errorSteps: function () { + reading = false; + } + }; + ReadableStreamBYOBReaderRead(reader, view, readIntoRequest); + } + function pull1Algorithm() { + if (reading) { + readAgainForBranch1 = true; + return promiseResolvedWith(undefined); + } + reading = true; + var byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch1._readableStreamController); + if (byobRequest === null) { + pullWithDefaultReader(); + } + else { + pullWithBYOBReader(byobRequest._view, false); + } + return promiseResolvedWith(undefined); + } + function pull2Algorithm() { + if (reading) { + readAgainForBranch2 = true; + return promiseResolvedWith(undefined); + } + reading = true; + var byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch2._readableStreamController); + if (byobRequest === null) { + pullWithDefaultReader(); + } + else { + pullWithBYOBReader(byobRequest._view, true); + } + return promiseResolvedWith(undefined); + } + function cancel1Algorithm(reason) { + canceled1 = true; + reason1 = reason; + if (canceled2) { + var compositeReason = CreateArrayFromList([reason1, reason2]); + var cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function cancel2Algorithm(reason) { + canceled2 = true; + reason2 = reason; + if (canceled1) { + var compositeReason = CreateArrayFromList([reason1, reason2]); + var cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function startAlgorithm() { + return; + } + branch1 = CreateReadableByteStream(startAlgorithm, pull1Algorithm, cancel1Algorithm); + branch2 = CreateReadableByteStream(startAlgorithm, pull2Algorithm, cancel2Algorithm); + forwardReaderError(reader); + return [branch1, branch2]; + } + + function convertUnderlyingDefaultOrByteSource(source, context) { + assertDictionary(source, context); + var original = source; + var autoAllocateChunkSize = original === null || original === void 0 ? void 0 : original.autoAllocateChunkSize; + var cancel = original === null || original === void 0 ? void 0 : original.cancel; + var pull = original === null || original === void 0 ? void 0 : original.pull; + var start = original === null || original === void 0 ? void 0 : original.start; + var type = original === null || original === void 0 ? void 0 : original.type; + return { + autoAllocateChunkSize: autoAllocateChunkSize === undefined ? + undefined : + convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize, context + " has member 'autoAllocateChunkSize' that"), + cancel: cancel === undefined ? + undefined : + convertUnderlyingSourceCancelCallback(cancel, original, context + " has member 'cancel' that"), + pull: pull === undefined ? + undefined : + convertUnderlyingSourcePullCallback(pull, original, context + " has member 'pull' that"), + start: start === undefined ? + undefined : + convertUnderlyingSourceStartCallback(start, original, context + " has member 'start' that"), + type: type === undefined ? undefined : convertReadableStreamType(type, context + " has member 'type' that") + }; + } + function convertUnderlyingSourceCancelCallback(fn, original, context) { + assertFunction(fn, context); + return function (reason) { return promiseCall(fn, original, [reason]); }; + } + function convertUnderlyingSourcePullCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { return promiseCall(fn, original, [controller]); }; + } + function convertUnderlyingSourceStartCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { return reflectCall(fn, original, [controller]); }; + } + function convertReadableStreamType(type, context) { + type = "" + type; + if (type !== 'bytes') { + throw new TypeError(context + " '" + type + "' is not a valid enumeration value for ReadableStreamType"); + } + return type; + } + + function convertReaderOptions(options, context) { + assertDictionary(options, context); + var mode = options === null || options === void 0 ? void 0 : options.mode; + return { + mode: mode === undefined ? undefined : convertReadableStreamReaderMode(mode, context + " has member 'mode' that") + }; + } + function convertReadableStreamReaderMode(mode, context) { + mode = "" + mode; + if (mode !== 'byob') { + throw new TypeError(context + " '" + mode + "' is not a valid enumeration value for ReadableStreamReaderMode"); + } + return mode; + } + + function convertIteratorOptions(options, context) { + assertDictionary(options, context); + var preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel; + return { preventCancel: Boolean(preventCancel) }; + } + + function convertPipeOptions(options, context) { + assertDictionary(options, context); + var preventAbort = options === null || options === void 0 ? void 0 : options.preventAbort; + var preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel; + var preventClose = options === null || options === void 0 ? void 0 : options.preventClose; + var signal = options === null || options === void 0 ? void 0 : options.signal; + if (signal !== undefined) { + assertAbortSignal(signal, context + " has member 'signal' that"); + } + return { + preventAbort: Boolean(preventAbort), + preventCancel: Boolean(preventCancel), + preventClose: Boolean(preventClose), + signal: signal + }; + } + function assertAbortSignal(signal, context) { + if (!isAbortSignal(signal)) { + throw new TypeError(context + " is not an AbortSignal."); + } + } + + function convertReadableWritablePair(pair, context) { + assertDictionary(pair, context); + var readable = pair === null || pair === void 0 ? void 0 : pair.readable; + assertRequiredField(readable, 'readable', 'ReadableWritablePair'); + assertReadableStream(readable, context + " has member 'readable' that"); + var writable = pair === null || pair === void 0 ? void 0 : pair.writable; + assertRequiredField(writable, 'writable', 'ReadableWritablePair'); + assertWritableStream(writable, context + " has member 'writable' that"); + return { readable: readable, writable: writable }; + } + + /** + * A readable stream represents a source of data, from which you can read. + * + * @public + */ + var ReadableStream = /** @class */ (function () { + function ReadableStream(rawUnderlyingSource, rawStrategy) { + if (rawUnderlyingSource === void 0) { rawUnderlyingSource = {}; } + if (rawStrategy === void 0) { rawStrategy = {}; } + if (rawUnderlyingSource === undefined) { + rawUnderlyingSource = null; + } + else { + assertObject(rawUnderlyingSource, 'First parameter'); + } + var strategy = convertQueuingStrategy(rawStrategy, 'Second parameter'); + var underlyingSource = convertUnderlyingDefaultOrByteSource(rawUnderlyingSource, 'First parameter'); + InitializeReadableStream(this); + if (underlyingSource.type === 'bytes') { + if (strategy.size !== undefined) { + throw new RangeError('The strategy for a byte stream cannot have a size function'); + } + var highWaterMark = ExtractHighWaterMark(strategy, 0); + SetUpReadableByteStreamControllerFromUnderlyingSource(this, underlyingSource, highWaterMark); + } + else { + var sizeAlgorithm = ExtractSizeAlgorithm(strategy); + var highWaterMark = ExtractHighWaterMark(strategy, 1); + SetUpReadableStreamDefaultControllerFromUnderlyingSource(this, underlyingSource, highWaterMark, sizeAlgorithm); + } + } + Object.defineProperty(ReadableStream.prototype, "locked", { + /** + * Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}. + */ + get: function () { + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('locked'); + } + return IsReadableStreamLocked(this); + }, + enumerable: false, + configurable: true + }); + /** + * Cancels the stream, signaling a loss of interest in the stream by a consumer. + * + * The supplied `reason` argument will be given to the underlying source's {@link UnderlyingSource.cancel | cancel()} + * method, which might or might not use it. + */ + ReadableStream.prototype.cancel = function (reason) { + if (reason === void 0) { reason = undefined; } + if (!IsReadableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$1('cancel')); + } + if (IsReadableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('Cannot cancel a stream that already has a reader')); + } + return ReadableStreamCancel(this, reason); + }; + ReadableStream.prototype.getReader = function (rawOptions) { + if (rawOptions === void 0) { rawOptions = undefined; } + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('getReader'); + } + var options = convertReaderOptions(rawOptions, 'First parameter'); + if (options.mode === undefined) { + return AcquireReadableStreamDefaultReader(this); + } + return AcquireReadableStreamBYOBReader(this); + }; + ReadableStream.prototype.pipeThrough = function (rawTransform, rawOptions) { + if (rawOptions === void 0) { rawOptions = {}; } + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('pipeThrough'); + } + assertRequiredArgument(rawTransform, 1, 'pipeThrough'); + var transform = convertReadableWritablePair(rawTransform, 'First parameter'); + var options = convertPipeOptions(rawOptions, 'Second parameter'); + if (IsReadableStreamLocked(this)) { + throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream'); + } + if (IsWritableStreamLocked(transform.writable)) { + throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream'); + } + var promise = ReadableStreamPipeTo(this, transform.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal); + setPromiseIsHandledToTrue(promise); + return transform.readable; + }; + ReadableStream.prototype.pipeTo = function (destination, rawOptions) { + if (rawOptions === void 0) { rawOptions = {}; } + if (!IsReadableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$1('pipeTo')); + } + if (destination === undefined) { + return promiseRejectedWith("Parameter 1 is required in 'pipeTo'."); + } + if (!IsWritableStream(destination)) { + return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")); + } + var options; + try { + options = convertPipeOptions(rawOptions, 'Second parameter'); + } + catch (e) { + return promiseRejectedWith(e); + } + if (IsReadableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream')); + } + if (IsWritableStreamLocked(destination)) { + return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream')); + } + return ReadableStreamPipeTo(this, destination, options.preventClose, options.preventAbort, options.preventCancel, options.signal); + }; + /** + * Tees this readable stream, returning a two-element array containing the two resulting branches as + * new {@link ReadableStream} instances. + * + * Teeing a stream will lock it, preventing any other consumer from acquiring a reader. + * To cancel the stream, cancel both of the resulting branches; a composite cancellation reason will then be + * propagated to the stream's underlying source. + * + * Note that the chunks seen in each branch will be the same object. If the chunks are not immutable, + * this could allow interference between the two branches. + */ + ReadableStream.prototype.tee = function () { + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('tee'); + } + var branches = ReadableStreamTee(this); + return CreateArrayFromList(branches); + }; + ReadableStream.prototype.values = function (rawOptions) { + if (rawOptions === void 0) { rawOptions = undefined; } + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('values'); + } + var options = convertIteratorOptions(rawOptions, 'First parameter'); + return AcquireReadableStreamAsyncIterator(this, options.preventCancel); + }; + return ReadableStream; + }()); + Object.defineProperties(ReadableStream.prototype, { + cancel: { enumerable: true }, + getReader: { enumerable: true }, + pipeThrough: { enumerable: true }, + pipeTo: { enumerable: true }, + tee: { enumerable: true }, + values: { enumerable: true }, + locked: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStream', + configurable: true + }); + } + if (typeof SymbolPolyfill.asyncIterator === 'symbol') { + Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.asyncIterator, { + value: ReadableStream.prototype.values, + writable: true, + configurable: true + }); + } + // Abstract operations for the ReadableStream. + // Throws if and only if startAlgorithm throws. + function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) { + if (highWaterMark === void 0) { highWaterMark = 1; } + if (sizeAlgorithm === void 0) { sizeAlgorithm = function () { return 1; }; } + var stream = Object.create(ReadableStream.prototype); + InitializeReadableStream(stream); + var controller = Object.create(ReadableStreamDefaultController.prototype); + SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm); + return stream; + } + // Throws if and only if startAlgorithm throws. + function CreateReadableByteStream(startAlgorithm, pullAlgorithm, cancelAlgorithm) { + var stream = Object.create(ReadableStream.prototype); + InitializeReadableStream(stream); + var controller = Object.create(ReadableByteStreamController.prototype); + SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, 0, undefined); + return stream; + } + function InitializeReadableStream(stream) { + stream._state = 'readable'; + stream._reader = undefined; + stream._storedError = undefined; + stream._disturbed = false; + } + function IsReadableStream(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_readableStreamController')) { + return false; + } + return x instanceof ReadableStream; + } + function IsReadableStreamLocked(stream) { + if (stream._reader === undefined) { + return false; + } + return true; + } + // ReadableStream API exposed for controllers. + function ReadableStreamCancel(stream, reason) { + stream._disturbed = true; + if (stream._state === 'closed') { + return promiseResolvedWith(undefined); + } + if (stream._state === 'errored') { + return promiseRejectedWith(stream._storedError); + } + ReadableStreamClose(stream); + var reader = stream._reader; + if (reader !== undefined && IsReadableStreamBYOBReader(reader)) { + reader._readIntoRequests.forEach(function (readIntoRequest) { + readIntoRequest._closeSteps(undefined); + }); + reader._readIntoRequests = new SimpleQueue(); + } + var sourceCancelPromise = stream._readableStreamController[CancelSteps](reason); + return transformPromiseWith(sourceCancelPromise, noop); + } + function ReadableStreamClose(stream) { + stream._state = 'closed'; + var reader = stream._reader; + if (reader === undefined) { + return; + } + defaultReaderClosedPromiseResolve(reader); + if (IsReadableStreamDefaultReader(reader)) { + reader._readRequests.forEach(function (readRequest) { + readRequest._closeSteps(); + }); + reader._readRequests = new SimpleQueue(); + } + } + function ReadableStreamError(stream, e) { + stream._state = 'errored'; + stream._storedError = e; + var reader = stream._reader; + if (reader === undefined) { + return; + } + defaultReaderClosedPromiseReject(reader, e); + if (IsReadableStreamDefaultReader(reader)) { + reader._readRequests.forEach(function (readRequest) { + readRequest._errorSteps(e); + }); + reader._readRequests = new SimpleQueue(); + } + else { + reader._readIntoRequests.forEach(function (readIntoRequest) { + readIntoRequest._errorSteps(e); + }); + reader._readIntoRequests = new SimpleQueue(); + } + } + // Helper functions for the ReadableStream. + function streamBrandCheckException$1(name) { + return new TypeError("ReadableStream.prototype." + name + " can only be used on a ReadableStream"); + } + + function convertQueuingStrategyInit(init, context) { + assertDictionary(init, context); + var highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark; + assertRequiredField(highWaterMark, 'highWaterMark', 'QueuingStrategyInit'); + return { + highWaterMark: convertUnrestrictedDouble(highWaterMark) + }; + } + + // The size function must not have a prototype property nor be a constructor + var byteLengthSizeFunction = function (chunk) { + return chunk.byteLength; + }; + try { + Object.defineProperty(byteLengthSizeFunction, 'name', { + value: 'size', + configurable: true + }); + } + catch (_a) { + // This property is non-configurable in older browsers, so ignore if this throws. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility + } + /** + * A queuing strategy that counts the number of bytes in each chunk. + * + * @public + */ + var ByteLengthQueuingStrategy = /** @class */ (function () { + function ByteLengthQueuingStrategy(options) { + assertRequiredArgument(options, 1, 'ByteLengthQueuingStrategy'); + options = convertQueuingStrategyInit(options, 'First parameter'); + this._byteLengthQueuingStrategyHighWaterMark = options.highWaterMark; + } + Object.defineProperty(ByteLengthQueuingStrategy.prototype, "highWaterMark", { + /** + * Returns the high water mark provided to the constructor. + */ + get: function () { + if (!IsByteLengthQueuingStrategy(this)) { + throw byteLengthBrandCheckException('highWaterMark'); + } + return this._byteLengthQueuingStrategyHighWaterMark; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(ByteLengthQueuingStrategy.prototype, "size", { + /** + * Measures the size of `chunk` by returning the value of its `byteLength` property. + */ + get: function () { + if (!IsByteLengthQueuingStrategy(this)) { + throw byteLengthBrandCheckException('size'); + } + return byteLengthSizeFunction; + }, + enumerable: false, + configurable: true + }); + return ByteLengthQueuingStrategy; + }()); + Object.defineProperties(ByteLengthQueuingStrategy.prototype, { + highWaterMark: { enumerable: true }, + size: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ByteLengthQueuingStrategy.prototype, SymbolPolyfill.toStringTag, { + value: 'ByteLengthQueuingStrategy', + configurable: true + }); + } + // Helper functions for the ByteLengthQueuingStrategy. + function byteLengthBrandCheckException(name) { + return new TypeError("ByteLengthQueuingStrategy.prototype." + name + " can only be used on a ByteLengthQueuingStrategy"); + } + function IsByteLengthQueuingStrategy(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_byteLengthQueuingStrategyHighWaterMark')) { + return false; + } + return x instanceof ByteLengthQueuingStrategy; + } + + // The size function must not have a prototype property nor be a constructor + var countSizeFunction = function () { + return 1; + }; + try { + Object.defineProperty(countSizeFunction, 'name', { + value: 'size', + configurable: true + }); + } + catch (_a) { + // This property is non-configurable in older browsers, so ignore if this throws. + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility + } + /** + * A queuing strategy that counts the number of chunks. + * + * @public + */ + var CountQueuingStrategy = /** @class */ (function () { + function CountQueuingStrategy(options) { + assertRequiredArgument(options, 1, 'CountQueuingStrategy'); + options = convertQueuingStrategyInit(options, 'First parameter'); + this._countQueuingStrategyHighWaterMark = options.highWaterMark; + } + Object.defineProperty(CountQueuingStrategy.prototype, "highWaterMark", { + /** + * Returns the high water mark provided to the constructor. + */ + get: function () { + if (!IsCountQueuingStrategy(this)) { + throw countBrandCheckException('highWaterMark'); + } + return this._countQueuingStrategyHighWaterMark; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(CountQueuingStrategy.prototype, "size", { + /** + * Measures the size of `chunk` by always returning 1. + * This ensures that the total queue size is a count of the number of chunks in the queue. + */ + get: function () { + if (!IsCountQueuingStrategy(this)) { + throw countBrandCheckException('size'); + } + return countSizeFunction; + }, + enumerable: false, + configurable: true + }); + return CountQueuingStrategy; + }()); + Object.defineProperties(CountQueuingStrategy.prototype, { + highWaterMark: { enumerable: true }, + size: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(CountQueuingStrategy.prototype, SymbolPolyfill.toStringTag, { + value: 'CountQueuingStrategy', + configurable: true + }); + } + // Helper functions for the CountQueuingStrategy. + function countBrandCheckException(name) { + return new TypeError("CountQueuingStrategy.prototype." + name + " can only be used on a CountQueuingStrategy"); + } + function IsCountQueuingStrategy(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_countQueuingStrategyHighWaterMark')) { + return false; + } + return x instanceof CountQueuingStrategy; + } + + function convertTransformer(original, context) { + assertDictionary(original, context); + var flush = original === null || original === void 0 ? void 0 : original.flush; + var readableType = original === null || original === void 0 ? void 0 : original.readableType; + var start = original === null || original === void 0 ? void 0 : original.start; + var transform = original === null || original === void 0 ? void 0 : original.transform; + var writableType = original === null || original === void 0 ? void 0 : original.writableType; + return { + flush: flush === undefined ? + undefined : + convertTransformerFlushCallback(flush, original, context + " has member 'flush' that"), + readableType: readableType, + start: start === undefined ? + undefined : + convertTransformerStartCallback(start, original, context + " has member 'start' that"), + transform: transform === undefined ? + undefined : + convertTransformerTransformCallback(transform, original, context + " has member 'transform' that"), + writableType: writableType + }; + } + function convertTransformerFlushCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { return promiseCall(fn, original, [controller]); }; + } + function convertTransformerStartCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { return reflectCall(fn, original, [controller]); }; + } + function convertTransformerTransformCallback(fn, original, context) { + assertFunction(fn, context); + return function (chunk, controller) { return promiseCall(fn, original, [chunk, controller]); }; + } + + // Class TransformStream + /** + * A transform stream consists of a pair of streams: a {@link WritableStream | writable stream}, + * known as its writable side, and a {@link ReadableStream | readable stream}, known as its readable side. + * In a manner specific to the transform stream in question, writes to the writable side result in new data being + * made available for reading from the readable side. + * + * @public + */ + var TransformStream = /** @class */ (function () { + function TransformStream(rawTransformer, rawWritableStrategy, rawReadableStrategy) { + if (rawTransformer === void 0) { rawTransformer = {}; } + if (rawWritableStrategy === void 0) { rawWritableStrategy = {}; } + if (rawReadableStrategy === void 0) { rawReadableStrategy = {}; } + if (rawTransformer === undefined) { + rawTransformer = null; + } + var writableStrategy = convertQueuingStrategy(rawWritableStrategy, 'Second parameter'); + var readableStrategy = convertQueuingStrategy(rawReadableStrategy, 'Third parameter'); + var transformer = convertTransformer(rawTransformer, 'First parameter'); + if (transformer.readableType !== undefined) { + throw new RangeError('Invalid readableType specified'); + } + if (transformer.writableType !== undefined) { + throw new RangeError('Invalid writableType specified'); + } + var readableHighWaterMark = ExtractHighWaterMark(readableStrategy, 0); + var readableSizeAlgorithm = ExtractSizeAlgorithm(readableStrategy); + var writableHighWaterMark = ExtractHighWaterMark(writableStrategy, 1); + var writableSizeAlgorithm = ExtractSizeAlgorithm(writableStrategy); + var startPromise_resolve; + var startPromise = newPromise(function (resolve) { + startPromise_resolve = resolve; + }); + InitializeTransformStream(this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm); + SetUpTransformStreamDefaultControllerFromTransformer(this, transformer); + if (transformer.start !== undefined) { + startPromise_resolve(transformer.start(this._transformStreamController)); + } + else { + startPromise_resolve(undefined); + } + } + Object.defineProperty(TransformStream.prototype, "readable", { + /** + * The readable side of the transform stream. + */ + get: function () { + if (!IsTransformStream(this)) { + throw streamBrandCheckException('readable'); + } + return this._readable; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(TransformStream.prototype, "writable", { + /** + * The writable side of the transform stream. + */ + get: function () { + if (!IsTransformStream(this)) { + throw streamBrandCheckException('writable'); + } + return this._writable; + }, + enumerable: false, + configurable: true + }); + return TransformStream; + }()); + Object.defineProperties(TransformStream.prototype, { + readable: { enumerable: true }, + writable: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(TransformStream.prototype, SymbolPolyfill.toStringTag, { + value: 'TransformStream', + configurable: true + }); + } + function InitializeTransformStream(stream, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm) { + function startAlgorithm() { + return startPromise; + } + function writeAlgorithm(chunk) { + return TransformStreamDefaultSinkWriteAlgorithm(stream, chunk); + } + function abortAlgorithm(reason) { + return TransformStreamDefaultSinkAbortAlgorithm(stream, reason); + } + function closeAlgorithm() { + return TransformStreamDefaultSinkCloseAlgorithm(stream); + } + stream._writable = CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, writableHighWaterMark, writableSizeAlgorithm); + function pullAlgorithm() { + return TransformStreamDefaultSourcePullAlgorithm(stream); + } + function cancelAlgorithm(reason) { + TransformStreamErrorWritableAndUnblockWrite(stream, reason); + return promiseResolvedWith(undefined); + } + stream._readable = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, readableHighWaterMark, readableSizeAlgorithm); + // The [[backpressure]] slot is set to undefined so that it can be initialised by TransformStreamSetBackpressure. + stream._backpressure = undefined; + stream._backpressureChangePromise = undefined; + stream._backpressureChangePromise_resolve = undefined; + TransformStreamSetBackpressure(stream, true); + stream._transformStreamController = undefined; + } + function IsTransformStream(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_transformStreamController')) { + return false; + } + return x instanceof TransformStream; + } + // This is a no-op if both sides are already errored. + function TransformStreamError(stream, e) { + ReadableStreamDefaultControllerError(stream._readable._readableStreamController, e); + TransformStreamErrorWritableAndUnblockWrite(stream, e); + } + function TransformStreamErrorWritableAndUnblockWrite(stream, e) { + TransformStreamDefaultControllerClearAlgorithms(stream._transformStreamController); + WritableStreamDefaultControllerErrorIfNeeded(stream._writable._writableStreamController, e); + if (stream._backpressure) { + // Pretend that pull() was called to permit any pending write() calls to complete. TransformStreamSetBackpressure() + // cannot be called from enqueue() or pull() once the ReadableStream is errored, so this will will be the final time + // _backpressure is set. + TransformStreamSetBackpressure(stream, false); + } + } + function TransformStreamSetBackpressure(stream, backpressure) { + // Passes also when called during construction. + if (stream._backpressureChangePromise !== undefined) { + stream._backpressureChangePromise_resolve(); + } + stream._backpressureChangePromise = newPromise(function (resolve) { + stream._backpressureChangePromise_resolve = resolve; + }); + stream._backpressure = backpressure; + } + // Class TransformStreamDefaultController + /** + * Allows control of the {@link ReadableStream} and {@link WritableStream} of the associated {@link TransformStream}. + * + * @public + */ + var TransformStreamDefaultController = /** @class */ (function () { + function TransformStreamDefaultController() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(TransformStreamDefaultController.prototype, "desiredSize", { + /** + * Returns the desired size to fill the readable side’s internal queue. It can be negative, if the queue is over-full. + */ + get: function () { + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('desiredSize'); + } + var readableController = this._controlledTransformStream._readable._readableStreamController; + return ReadableStreamDefaultControllerGetDesiredSize(readableController); + }, + enumerable: false, + configurable: true + }); + TransformStreamDefaultController.prototype.enqueue = function (chunk) { + if (chunk === void 0) { chunk = undefined; } + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('enqueue'); + } + TransformStreamDefaultControllerEnqueue(this, chunk); + }; + /** + * Errors both the readable side and the writable side of the controlled transform stream, making all future + * interactions with it fail with the given error `e`. Any chunks queued for transformation will be discarded. + */ + TransformStreamDefaultController.prototype.error = function (reason) { + if (reason === void 0) { reason = undefined; } + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('error'); + } + TransformStreamDefaultControllerError(this, reason); + }; + /** + * Closes the readable side and errors the writable side of the controlled transform stream. This is useful when the + * transformer only needs to consume a portion of the chunks written to the writable side. + */ + TransformStreamDefaultController.prototype.terminate = function () { + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('terminate'); + } + TransformStreamDefaultControllerTerminate(this); + }; + return TransformStreamDefaultController; + }()); + Object.defineProperties(TransformStreamDefaultController.prototype, { + enqueue: { enumerable: true }, + error: { enumerable: true }, + terminate: { enumerable: true }, + desiredSize: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(TransformStreamDefaultController.prototype, SymbolPolyfill.toStringTag, { + value: 'TransformStreamDefaultController', + configurable: true + }); + } + // Transform Stream Default Controller Abstract Operations + function IsTransformStreamDefaultController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledTransformStream')) { + return false; + } + return x instanceof TransformStreamDefaultController; + } + function SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm) { + controller._controlledTransformStream = stream; + stream._transformStreamController = controller; + controller._transformAlgorithm = transformAlgorithm; + controller._flushAlgorithm = flushAlgorithm; + } + function SetUpTransformStreamDefaultControllerFromTransformer(stream, transformer) { + var controller = Object.create(TransformStreamDefaultController.prototype); + var transformAlgorithm = function (chunk) { + try { + TransformStreamDefaultControllerEnqueue(controller, chunk); + return promiseResolvedWith(undefined); + } + catch (transformResultE) { + return promiseRejectedWith(transformResultE); + } + }; + var flushAlgorithm = function () { return promiseResolvedWith(undefined); }; + if (transformer.transform !== undefined) { + transformAlgorithm = function (chunk) { return transformer.transform(chunk, controller); }; + } + if (transformer.flush !== undefined) { + flushAlgorithm = function () { return transformer.flush(controller); }; + } + SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm); + } + function TransformStreamDefaultControllerClearAlgorithms(controller) { + controller._transformAlgorithm = undefined; + controller._flushAlgorithm = undefined; + } + function TransformStreamDefaultControllerEnqueue(controller, chunk) { + var stream = controller._controlledTransformStream; + var readableController = stream._readable._readableStreamController; + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController)) { + throw new TypeError('Readable side is not in a state that permits enqueue'); + } + // We throttle transform invocations based on the backpressure of the ReadableStream, but we still + // accept TransformStreamDefaultControllerEnqueue() calls. + try { + ReadableStreamDefaultControllerEnqueue(readableController, chunk); + } + catch (e) { + // This happens when readableStrategy.size() throws. + TransformStreamErrorWritableAndUnblockWrite(stream, e); + throw stream._readable._storedError; + } + var backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController); + if (backpressure !== stream._backpressure) { + TransformStreamSetBackpressure(stream, true); + } + } + function TransformStreamDefaultControllerError(controller, e) { + TransformStreamError(controller._controlledTransformStream, e); + } + function TransformStreamDefaultControllerPerformTransform(controller, chunk) { + var transformPromise = controller._transformAlgorithm(chunk); + return transformPromiseWith(transformPromise, undefined, function (r) { + TransformStreamError(controller._controlledTransformStream, r); + throw r; + }); + } + function TransformStreamDefaultControllerTerminate(controller) { + var stream = controller._controlledTransformStream; + var readableController = stream._readable._readableStreamController; + ReadableStreamDefaultControllerClose(readableController); + var error = new TypeError('TransformStream terminated'); + TransformStreamErrorWritableAndUnblockWrite(stream, error); + } + // TransformStreamDefaultSink Algorithms + function TransformStreamDefaultSinkWriteAlgorithm(stream, chunk) { + var controller = stream._transformStreamController; + if (stream._backpressure) { + var backpressureChangePromise = stream._backpressureChangePromise; + return transformPromiseWith(backpressureChangePromise, function () { + var writable = stream._writable; + var state = writable._state; + if (state === 'erroring') { + throw writable._storedError; + } + return TransformStreamDefaultControllerPerformTransform(controller, chunk); + }); + } + return TransformStreamDefaultControllerPerformTransform(controller, chunk); + } + function TransformStreamDefaultSinkAbortAlgorithm(stream, reason) { + // abort() is not called synchronously, so it is possible for abort() to be called when the stream is already + // errored. + TransformStreamError(stream, reason); + return promiseResolvedWith(undefined); + } + function TransformStreamDefaultSinkCloseAlgorithm(stream) { + // stream._readable cannot change after construction, so caching it across a call to user code is safe. + var readable = stream._readable; + var controller = stream._transformStreamController; + var flushPromise = controller._flushAlgorithm(); + TransformStreamDefaultControllerClearAlgorithms(controller); + // Return a promise that is fulfilled with undefined on success. + return transformPromiseWith(flushPromise, function () { + if (readable._state === 'errored') { + throw readable._storedError; + } + ReadableStreamDefaultControllerClose(readable._readableStreamController); + }, function (r) { + TransformStreamError(stream, r); + throw readable._storedError; + }); + } + // TransformStreamDefaultSource Algorithms + function TransformStreamDefaultSourcePullAlgorithm(stream) { + // Invariant. Enforced by the promises returned by start() and pull(). + TransformStreamSetBackpressure(stream, false); + // Prevent the next pull() call until there is backpressure. + return stream._backpressureChangePromise; + } + // Helper functions for the TransformStreamDefaultController. + function defaultControllerBrandCheckException(name) { + return new TypeError("TransformStreamDefaultController.prototype." + name + " can only be used on a TransformStreamDefaultController"); + } + // Helper functions for the TransformStream. + function streamBrandCheckException(name) { + return new TypeError("TransformStream.prototype." + name + " can only be used on a TransformStream"); + } + + exports.ByteLengthQueuingStrategy = ByteLengthQueuingStrategy; + exports.CountQueuingStrategy = CountQueuingStrategy; + exports.ReadableByteStreamController = ReadableByteStreamController; + exports.ReadableStream = ReadableStream; + exports.ReadableStreamBYOBReader = ReadableStreamBYOBReader; + exports.ReadableStreamBYOBRequest = ReadableStreamBYOBRequest; + exports.ReadableStreamDefaultController = ReadableStreamDefaultController; + exports.ReadableStreamDefaultReader = ReadableStreamDefaultReader; + exports.TransformStream = TransformStream; + exports.TransformStreamDefaultController = TransformStreamDefaultController; + exports.WritableStream = WritableStream; + exports.WritableStreamDefaultController = WritableStreamDefaultController; + exports.WritableStreamDefaultWriter = WritableStreamDefaultWriter; + + Object.defineProperty(exports, '__esModule', { value: true }); + +}))); +//# sourceMappingURL=ponyfill.js.map + + +/***/ }), + +/***/ 79019: +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 +/***/ ((module) => { + +// Returns a wrapper function that returns a wrapped callback +// The wrapper function should do some stuff, and return a +// presumably different callback function. +// This makes sure that own properties are retained, so that +// decorations and such are not lost along the way. +module.exports = wrappy +function wrappy (fn, cb) { + if (fn && cb) return wrappy(fn)(cb) + + if (typeof fn !== 'function') + throw new TypeError('need wrapper function') + + Object.keys(fn).forEach(function (k) { + wrapper[k] = fn[k] + }) + + return wrapper + + function wrapper() { + var args = new Array(arguments.length) + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] + } + var ret = fn.apply(this, args) + var cb = args[args.length-1] + if (typeof ret === 'function' && ret !== cb) { + Object.keys(cb).forEach(function (k) { + ret[k] = cb[k] + }) + } + return ret + } +} + + +/***/ }), + +<<<<<<< HEAD +/***/ 83251: +/***/ ((module) => { + +module.exports = eval("require")("electron"); + + +/***/ }), + +/***/ 39491: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("assert"); + +/***/ }), + +/***/ 50852: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("async_hooks"); + +/***/ }), + +/***/ 14300: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("buffer"); + +/***/ }), + +/***/ 32081: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("child_process"); + +/***/ }), + +/***/ 96206: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("console"); + +/***/ }), + +/***/ 22057: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("constants"); + +/***/ }), + +/***/ 6113: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("crypto"); + +/***/ }), + +/***/ 67643: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("diagnostics_channel"); + +/***/ }), + +/***/ 82361: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("events"); + +/***/ }), + +/***/ 57147: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs"); + +/***/ }), + +/***/ 13685: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http"); + +/***/ }), + +/***/ 85158: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("http2"); + +/***/ }), + +/***/ 95687: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("https"); + +/***/ }), + +/***/ 41808: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("net"); + +/***/ }), + +/***/ 15673: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:events"); + +/***/ }), + +/***/ 84492: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:stream"); + +/***/ }), + +/***/ 47261: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:util"); + +/***/ }), + +/***/ 22037: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("os"); + +/***/ }), + +/***/ 71017: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("path"); + +/***/ }), + +/***/ 4074: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("perf_hooks"); + +/***/ }), + +/***/ 77282: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("process"); + +/***/ }), + +/***/ 63477: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("querystring"); + +/***/ }), + +/***/ 12781: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("stream"); + +/***/ }), + +/***/ 35356: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("stream/web"); + +/***/ }), + +/***/ 71576: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("string_decoder"); + +/***/ }), + +/***/ 24404: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tls"); + +/***/ }), + +/***/ 76224: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("tty"); + +/***/ }), + +/***/ 57310: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("url"); + +/***/ }), + +/***/ 73837: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util"); + +/***/ }), + +/***/ 29830: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("util/types"); + +/***/ }), + +/***/ 71267: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("worker_threads"); + +/***/ }), + +/***/ 59796: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("zlib"); + +/***/ }), + +/***/ 94438: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const WritableStream = (__nccwpck_require__(84492).Writable) +const inherits = (__nccwpck_require__(47261).inherits) + +const StreamSearch = __nccwpck_require__(10004) + +const PartStream = __nccwpck_require__(20453) +const HeaderParser = __nccwpck_require__(21200) + +const DASH = 45 +const B_ONEDASH = Buffer.from('-') +const B_CRLF = Buffer.from('\r\n') +const EMPTY_FN = function () {} + +function Dicer (cfg) { + if (!(this instanceof Dicer)) { return new Dicer(cfg) } + WritableStream.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 = undefined } + + 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 = undefined + this._cb = undefined + 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(Dicer, WritableStream) + +Dicer.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.prototype.emit.apply(this, arguments) } +} + +Dicer.prototype._write = function (data, encoding, cb) { + // ignore unexpected data (e.g. extra trailer data after finished) + if (!this._hparser && !this._bparser) { return cb() } + + if (this._headerFirst && this._isPreamble) { + if (!this._part) { + this._part = new PartStream(this._partOpts) + if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() } + } + const r = this._hparser.push(data) + if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() } + } + + // allows for "easier" testing + if (this._firstWrite) { + this._bparser.push(B_CRLF) + this._firstWrite = false + } + + this._bparser.push(data) + + if (this._pause) { this._cb = cb } else { cb() } +} + +Dicer.prototype.reset = function () { + this._part = undefined + this._bparser = undefined + this._hparser = undefined +} + +Dicer.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.prototype._ignore = function () { + if (this._part && !this._ignoreData) { + this._ignoreData = true + this._part.on('error', EMPTY_FN) + // we must perform some kind of read on the stream even though we are + // ignoring the data, otherwise node's Readable stream will not emit 'end' + // after pushing null to the stream + this._part.resume() + } +} + +Dicer.prototype._oninfo = function (isMatch, data, start, end) { + let buf; const self = this; let i = 0; let r; let shouldWriteMore = true + + if (!this._part && this._justMatched && data) { + while (this._dashes < 2 && (start + i) < end) { + if (data[start + i] === DASH) { + ++i + ++this._dashes + } else { + if (this._dashes) { buf = B_ONEDASH } + this._dashes = 0 + break + } + } + if (this._dashes === 2) { + if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) } + this.reset() + this._finished = true + // no more parts will be added + 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._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { 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 !== undefined && 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 = undefined + this._ignoreData = false + this._justMatched = true + this._dashes = 0 + } +} + +Dicer.prototype._unpause = function () { + if (!this._pause) { return } + + this._pause = false + if (this._cb) { + const cb = this._cb + this._cb = undefined + cb() + } +} + +module.exports = Dicer +======= +/***/ 38682: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { FilebaseClient } = __nccwpck_require__(5369); +const { filesFromPath } = __nccwpck_require__(29857); + +module.exports = { + name: "Filebase", + builder: async (options) => { + const { filebaseKey, filebaseSecret, filebaseBucket } = options; + + if (!filebaseKey) { + throw new Error("[filebase] Key is empty. (input `filebaseKey`)"); + } + + if (!filebaseSecret) { + throw new Error("[filebase] Secret is empty. (input `filebaseSecret`)"); + } + + if (!filebaseBucket) { + throw new Error("[filebase] Bucket is empty. (input `filebaseBucket`)"); + } + + return { key: filebaseKey, secret: filebaseSecret, bucket: filebaseBucket }; + }, + upload: async (api, options) => { + console.log(`Parsing options...`); + const { path, pinName, verbose } = options; + + console.log(`Adding files...`); + const files = []; + for await (const file of filesFromPath(path, { pathPrefix: path })) { + files.push(file); + if (verbose) { + console.log(`Added File: ${JSON.stringify(file)}`); + } + } + + console.log(`Storing files...`); + let tokenString = `${api.key}:${api.secret}:${api.bucket}`; + let cid = await FilebaseClient.storeDirectory( + { + endpoint: "https://s3.filebase.com", + token: Buffer.from(tokenString).toString("base64"), + }, + files, + pinName + ); + console.log(`Stored files...`); + console.log(`CID: ${cid}`); + console.log(`Done`); + + return { + cid: cid, + ipfs: cid, + }; + }, +}; +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/***/ }), + +<<<<<<< HEAD +/***/ 21200: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const EventEmitter = (__nccwpck_require__(15673).EventEmitter) +const inherits = (__nccwpck_require__(47261).inherits) +const getLimit = __nccwpck_require__(21619) + +const StreamSearch = __nccwpck_require__(10004) + +const B_DCRLF = Buffer.from('\r\n\r\n') +const RE_CRLF = /\r\n/g +const RE_HDR = /^([^:]+):[ \t]?([\x00-\xFF]+)?$/ // eslint-disable-line no-control-regex + +function HeaderParser (cfg) { + EventEmitter.call(this) + + cfg = cfg || {} + const self = this + this.nread = 0 + this.maxed = false + this.npairs = 0 + this.maxHeaderPairs = getLimit(cfg, 'maxHeaderPairs', 2000) + this.maxHeaderSize = getLimit(cfg, 'maxHeaderSize', 80 * 1024) + this.buffer = '' + this.header = {} + this.finished = false + this.ss = new StreamSearch(B_DCRLF) + this.ss.on('info', function (isMatch, data, start, end) { + if (data && !self.maxed) { + if (self.nread + end - start >= self.maxHeaderSize) { + end = self.maxHeaderSize - self.nread + start + self.nread = self.maxHeaderSize + self.maxed = true + } else { self.nread += (end - start) } + + self.buffer += data.toString('binary', start, end) + } + if (isMatch) { self._finish() } + }) +} +inherits(HeaderParser, EventEmitter) + +HeaderParser.prototype.push = function (data) { + const r = this.ss.push(data) + if (this.finished) { return r } +} + +HeaderParser.prototype.reset = function () { + this.finished = false + this.buffer = '' + this.header = {} + this.ss.reset() +} + +HeaderParser.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.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 = 0; i < len; ++i) { // eslint-disable-line no-var + if (lines[i].length === 0) { continue } + if (lines[i][0] === '\t' || lines[i][0] === ' ') { + // folded header content + // RFC2822 says to just remove the CRLF and not the whitespace following + // it, so we follow the RFC and include the leading whitespace ... + if (h) { + this.header[h][this.header[h].length - 1] += lines[i] + continue + } + } + + const posColon = lines[i].indexOf(':') + if ( + posColon === -1 || + posColon === 0 + ) { + return + } + m = RE_HDR.exec(lines[i]) + 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 + + +/***/ }), + +/***/ 20453: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const inherits = (__nccwpck_require__(47261).inherits) +const ReadableStream = (__nccwpck_require__(84492).Readable) + +function PartStream (opts) { + ReadableStream.call(this, opts) +} +inherits(PartStream, ReadableStream) + +PartStream.prototype._read = function (n) {} + +module.exports = PartStream + + +/***/ }), + +/***/ 10004: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +/** + * 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 = (__nccwpck_require__(15673).EventEmitter) +const inherits = (__nccwpck_require__(47261).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) // Initialize occurrence table. + this._lookbehind_size = 0 + this._needle = needle + this._bufpos = 0 + + this._lookbehind = Buffer.alloc(needleLength) + + // Populate occurrence table with analysis of the needle, + // ignoring last letter. + for (var i = 0; i < needleLength - 1; ++i) { // eslint-disable-line no-var + this._occ[needle[i]] = needleLength - 1 - i + } +} +inherits(SBMH, EventEmitter) + +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] + + // Positive: points to a position in `data` + // pos == 3 points to data[3] + // Negative: points to a position in the lookbehind buffer + // pos == -2 points to lookbehind[lookbehind_size - 2] + let pos = -this._lookbehind_size + let ch + + if (pos < 0) { + // Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool + // search with character lookup code that considers both the + // lookbehind buffer and the current round's haystack data. + // + // Loop until + // there is a match. + // or until + // we've moved past the position that requires the + // lookbehind buffer. In this case we switch to the + // optimized loop. + // or until + // the character to look at lies outside the haystack. + 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] +======= +/***/ 78700: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const make = __nccwpck_require__(76333); + +module.exports = { + ipfs: make(__nccwpck_require__(12820)), + pinata: make(__nccwpck_require__(95067)), + infura: make(__nccwpck_require__(7855)), + filebase: make(__nccwpck_require__(38682)) +}; + + +/***/ }), + +/***/ 7855: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const { create, globSource } = __nccwpck_require__(21719); +const last = __nccwpck_require__(28741); +const fsPath = __nccwpck_require__(71017); + +module.exports = { + name: "Infura", + builder: async (options) => { + const { infuraProjectId, infuraProjectSecret, headers, timeout } = options; + if (!infuraProjectId) { + throw new Error("[infura] ProjectId is empty. (input `infuraProjectId`)"); + } + + if (!infuraProjectSecret) { + throw new Error( + "[infura] ProjectSecret is empty. (input `infuraProjectSecret`)" + ); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + } + + // No match. + + if (pos < 0) { + // There's too few data for Boyer-Moore-Horspool to run, + // so let's use a different algorithm to skip as much as + // we can. + // Forward pos until + // the trailing part of lookbehind + data + // looks like the beginning of the needle + // or until + // pos == 0 + while (pos < 0 && !this._sbmh_memcmp(data, pos, len - pos)) { ++pos } + } + + if (pos >= 0) { + // Discard lookbehind buffer. + this.emit('info', false, this._lookbehind, 0, this._lookbehind_size) + this._lookbehind_size = 0 + } else { + // Cut off part of the lookbehind buffer that has + // been processed and append the entire haystack + // into it. + const bytesToCutOff = this._lookbehind_size + pos + if (bytesToCutOff > 0) { + // The cut off data is guaranteed not to contain the needle. + 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 + + // Lookbehind buffer is now empty. We only need to check if the + // needle is in the haystack. + 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 + } + + // There was no match. If there's trailing haystack data that we cannot + // match yet using the Boyer-Moore-Horspool algorithm (because the trailing + // data is less than the needle size) then match using a modified + // algorithm that starts matching from the beginning instead of the end. + // Whatever trailing data is left after running this algorithm is added to + // the lookbehind buffer. + 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 + } + + // Everything until pos is guaranteed not to contain needle data. + 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 = 0; i < len; ++i) { // eslint-disable-line no-var + if (this._sbmh_lookup_char(data, pos + i) !== this._needle[i]) { return false } + } + return true +} + +module.exports = SBMH + + +/***/ }), + +/***/ 52612: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const WritableStream = (__nccwpck_require__(84492).Writable) +const { inherits } = __nccwpck_require__(47261) +const Dicer = __nccwpck_require__(94438) + +const MultipartParser = __nccwpck_require__(28045) +const UrlencodedParser = __nccwpck_require__(86563) +const parseParams = __nccwpck_require__(73411) + +function Busboy (opts) { + if (!(this instanceof Busboy)) { return new Busboy(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, WritableStream) + +Busboy.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.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.prototype._write = function (chunk, encoding, cb) { + this._parser.write(chunk, cb) +} + +module.exports = Busboy +module.exports["default"] = Busboy +module.exports.Busboy = Busboy + +module.exports.Dicer = Dicer + + +/***/ }), + +/***/ 28045: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +// TODO: +// * support 1 nested multipart level +// (see second multipart example here: +// http://www.w3.org/TR/html401/interact/forms.html#didx-multipartform-data) +// * support limits.fieldNameSize +// -- this will require modifications to utils.parseParams + +const { Readable } = __nccwpck_require__(84492) +const { inherits } = __nccwpck_require__(47261) + +const Dicer = __nccwpck_require__(94438) + +const parseParams = __nccwpck_require__(73411) +const decodeText = __nccwpck_require__(92892) +const basename = __nccwpck_require__(58054) +const getLimit = __nccwpck_require__(21619) + +const RE_BOUNDARY = /^boundary$/i +const RE_FIELD = /^form-data$/i +const RE_CHARSET = /^charset$/i +const RE_FILENAME = /^filename$/i +const RE_NAME = /^name$/i + +Multipart.detect = /^multipart\/form-data/i +function Multipart (boy, cfg) { + let i + let len + const self = this + let boundary + const limits = cfg.limits + const isPartAFile = cfg.isPartAFile || ((fieldName, contentType, fileName) => (contentType === 'application/octet-stream' || fileName !== undefined)) + const parsedConType = cfg.parsedConType || [] + const defCharset = cfg.defCharset || 'utf8' + const preservePath = cfg.preservePath + const fileOpts = { highWaterMark: cfg.fileHwm } + + for (i = 0, len = parsedConType.length; i < len; ++i) { + if (Array.isArray(parsedConType[i]) && + RE_BOUNDARY.test(parsedConType[i][0])) { + boundary = parsedConType[i][1] + break + } + } + + function checkFinished () { + if (nends === 0 && finished && !boy._done) { + finished = false + self.end() + } + } + + if (typeof boundary !== 'string') { throw new Error('Multipart: Boundary not found') } + + const fieldSizeLimit = getLimit(limits, 'fieldSize', 1 * 1024 * 1024) + const fileSizeLimit = getLimit(limits, 'fileSize', Infinity) + const filesLimit = getLimit(limits, 'files', Infinity) + const fieldsLimit = getLimit(limits, 'fields', Infinity) + const partsLimit = getLimit(limits, 'parts', Infinity) + const headerPairsLimit = getLimit(limits, 'headerPairs', 2000) + const headerSizeLimit = getLimit(limits, 'headerSize', 80 * 1024) + + let nfiles = 0 + let nfields = 0 + let nends = 0 + let curFile + let curField + let finished = false + + this._needDrain = false + this._pause = false + this._cb = undefined + this._nparts = 0 + this._boy = boy + + const parserCfg = { + boundary, + maxHeaderPairs: headerPairsLimit, + maxHeaderSize: headerSizeLimit, + partHwm: fileOpts.highWaterMark, + highWaterMark: cfg.highWaterMark + } + + this.parser = new Dicer(parserCfg) + this.parser.on('drain', function () { + self._needDrain = false + if (self._cb && !self._pause) { + const cb = self._cb + self._cb = undefined + 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) + } + + // hack because streams2 _always_ doesn't emit 'end' until nextTick, so let + // us emit 'end' early since we know the part has ended if we are already + // seeing the next 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(header['content-type'][0]) + if (parsed[0]) { + contype = parsed[0].toLowerCase() + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_CHARSET.test(parsed[i][0])) { + charset = parsed[i][1].toLowerCase() + break + } + } + } + } + + if (contype === undefined) { contype = 'text/plain' } + if (charset === undefined) { charset = defCharset } + + if (header['content-disposition']) { + parsed = parseParams(header['content-disposition'][0]) + if (!RE_FIELD.test(parsed[0])) { return skipPart(part) } + for (i = 0, len = parsed.length; i < len; ++i) { + if (RE_NAME.test(parsed[i][0])) { + fieldname = parsed[i][1] + } else if (RE_FILENAME.test(parsed[i][0])) { + filename = parsed[i][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)) { + // file/binary field + if (nfiles === filesLimit) { + if (!boy.hitFilesLimit) { + boy.hitFilesLimit = true + boy.emit('filesLimit') + } + return skipPart(part) + } + + ++nfiles + + if (!boy._events.file) { + 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 = undefined + cb() + } + }) + file._read = function (n) { + if (!self._pause) { return } + self._pause = false + if (self._cb && !self._needDrain) { + const cb = self._cb + self._cb = undefined + 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 = undefined + file.push(null) + } + } else { + // non-file field + 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 = undefined + if (buffer.length) { buffer = decodeText(buffer, 'binary', charset) } + boy.emit('field', fieldname, buffer, false, truncated, encoding, contype) + --nends + checkFinished() + } + } + + /* As of node@2efe4ab761666 (v0.10.29+/v0.11.14+), busboy had become + broken. Streams2/streams3 is a huge black box of confusion, but + somehow overriding the sync state seems to fix things again (and still + seems to work for previous node versions). + */ + 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 = 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.call(this, opts) + + this.bytesRead = 0 + + this.truncated = false +} + +inherits(FileStream, Readable) + +FileStream.prototype._read = function (n) {} + +module.exports = Multipart + + +/***/ }), + +/***/ 86563: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +const Decoder = __nccwpck_require__(58926) +const decodeText = __nccwpck_require__(92892) +const getLimit = __nccwpck_require__(21619) + +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 = 0, len = parsedConType.length; i < len; ++i) { // eslint-disable-line no-var + if (Array.isArray(parsedConType[i]) && + RE_CHARSET.test(parsedConType[i][0])) { + charset = parsedConType[i][1].toLowerCase() + break + } + } + + if (charset === undefined) { 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; let p = 0; const len = data.length + + while (p < len) { + if (this._state === 'key') { + idxeq = idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x3D/* = */) { + idxeq = i + break + } else if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesKey === this.fieldNameSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesKey } + } + + if (idxeq !== undefined) { + // key with assignment + 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 !== undefined) { + // key with no assignment + ++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) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._key += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._bytesKey = this._key.length) === this.fieldNameSizeLimit) { + // yep, we actually did hit the limit + this._checkingBytes = false + this._keyTrunc = true + } + } else { + if (p < len) { this._key += this.decoder.write(data.toString('binary', p)) } + p = len + } + } else { + idxamp = undefined + for (i = p; i < len; ++i) { + if (!this._checkingBytes) { ++p } + if (data[i] === 0x26/* & */) { + idxamp = i + break + } + if (this._checkingBytes && this._bytesVal === this.fieldSizeLimit) { + this._hitLimit = true + break + } else if (this._checkingBytes) { ++this._bytesVal } + } + + if (idxamp !== undefined) { + ++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) { + // we may not have hit the actual limit if there are encoded bytes... + if (i > p) { this._val += this.decoder.write(data.toString('binary', p, i)) } + p = i + if ((this._val === '' && this.fieldSizeLimit === 0) || + (this._bytesVal = this._val.length) === this.fieldSizeLimit) { + // yep, we actually did hit the limit + 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 + + +/***/ }), + +/***/ 58926: +/***/ ((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 () { + this.buffer = undefined +} +Decoder.prototype.write = function (str) { + // Replace '+' with ' ' before decoding + str = str.replace(RE_PLUS, ' ') + let res = '' + let i = 0; let p = 0; const len = str.length + for (; i < len; ++i) { + if (this.buffer !== undefined) { + if (!HEX[str.charCodeAt(i)]) { + res += '%' + this.buffer + this.buffer = undefined + --i // retry character + } else { + this.buffer += str[i] + ++p + if (this.buffer.length === 2) { + res += String.fromCharCode(parseInt(this.buffer, 16)) + this.buffer = undefined + } + } + } else if (str[i] === '%') { + if (i > p) { + res += str.substring(p, i) + p = i + } + this.buffer = '' + ++p + } + } + if (p < len && this.buffer === undefined) { res += str.substring(p) } + return res +} +Decoder.prototype.reset = function () { + this.buffer = undefined +} + +module.exports = Decoder + + +/***/ }), + +/***/ 58054: +/***/ ((module) => { + + + +module.exports = function basename (path) { + if (typeof path !== 'string') { return '' } + for (var i = path.length - 1; i >= 0; --i) { // eslint-disable-line no-var + switch (path.charCodeAt(i)) { + case 0x2F: // '/' + case 0x5C: // '\' + path = path.slice(i + 1) + return (path === '..' || path === '.' ? '' : path) + } + } + return (path === '..' || path === '.' ? '' : path) +} + + +/***/ }), + +/***/ 92892: +/***/ (function(module) { + + + +// Node has always utf-8 +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': // TODO: Make these a separate, strict decoder? + 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 === undefined) { + 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) + }, +<<<<<<< HEAD + + 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(this.toString())) { + try { + return textDecoders.get(this).decode(data) + } catch (e) { } + } + return typeof data === 'string' + ? data + : data.toString() + } +} + +function decodeText (text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding) + } + return text +} + +module.exports = decodeText + + +/***/ }), + +/***/ 21619: +/***/ ((module) => { + + + +module.exports = function getLimit (limits, name, defaultLimit) { + if ( + !limits || + limits[name] === undefined || + 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] +} + + +/***/ }), + +/***/ 73411: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +/* eslint-disable object-property-newline */ + + +const decodeText = __nccwpck_require__(92892) + +const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g + +const EncodedLookup = { + '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', + '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', + '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', + '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', + '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', + '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', + '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', + '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', + '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', + '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', + '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', + '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', + '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', + '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', + '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', + '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', + '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', + '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', + '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', + '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', + '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', + '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', + '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', + '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', + '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', + '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', + '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', + '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', + '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', + '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', + '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', + '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', + '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', + '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', + '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', + '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', + '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', + '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', + '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', + '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', + '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', + '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', + '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', + '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', + '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', + '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', + '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', + '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', + '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', + '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', + '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', + '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', + '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', + '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', + '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', + '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', + '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', + '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', + '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', + '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', + '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', + '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', + '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', + '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', + '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', + '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', + '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', + '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', + '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', + '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', + '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', + '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', + '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', + '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', + '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', + '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', + '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', + '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', + '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', + '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', + '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', + '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', + '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', + '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', + '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', + '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', + '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', + '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', + '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', + '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', + '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', + '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', + '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', + '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', + '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', + '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', + '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' +} + +function encodedReplacer (match) { + return EncodedLookup[match] +} + +const STATE_KEY = 0 +const STATE_VALUE = 1 +const STATE_CHARSET = 2 +const STATE_LANG = 3 + +function parseParams (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 = 0; i < len; ++i) { // eslint-disable-line no-var + const char = str[i] + 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, undefined] + tmp = '' + continue + } else if (!inquote && char === ';') { + state = STATE_KEY + if (charset) { + if (tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } + charset = '' + } else if (tmp.length) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + if (res[p] === undefined) { res[p] = tmp } else { res[p][1] = tmp } + tmp = '' + ++p + continue + } else if (!inquote && (char === ' ' || char === '\t')) { continue } + } + tmp += char + } + if (charset && tmp.length) { + tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), + 'binary', + charset) + } else if (tmp) { + tmp = decodeText(tmp, 'binary', 'utf8') + } + + if (res[p] === undefined) { + if (tmp) { res[p] = tmp } + } else { res[p][1] = tmp } + + return res +} + +module.exports = parseParams + + +/***/ }), + +/***/ 58686: +/***/ ((__webpack_module__, __unused_webpack___webpack_exports__, __nccwpck_require__) => { + +__nccwpck_require__.a(__webpack_module__, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try { +/* harmony import */ var _runner_js__WEBPACK_IMPORTED_MODULE_0__ = __nccwpck_require__(10762); + + +await (0,_runner_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(); +__webpack_async_result__(); +} catch(e) { __webpack_async_result__(e); } }, 1); + +/***/ }), + +/***/ 10762: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => { + + +// EXPORTS +__nccwpck_require__.d(__webpack_exports__, { + "Z": () => (/* binding */ runner) +}); + +// NAMESPACE OBJECT: ./node_modules/@ipld/dag-pb/src/index.js +var src_namespaceObject = {}; +__nccwpck_require__.r(src_namespaceObject); +__nccwpck_require__.d(src_namespaceObject, { + "code": () => (code), + "createLink": () => (createLink), + "createNode": () => (createNode), + "decode": () => (src_decode), + "encode": () => (src_encode), + "name": () => (src_name), + "prepare": () => (prepare), + "validate": () => (validate) +}); + +// NAMESPACE OBJECT: ./node_modules/@ipld/dag-cbor/src/index.js +var dag_cbor_src_namespaceObject = {}; +__nccwpck_require__.r(dag_cbor_src_namespaceObject); +__nccwpck_require__.d(dag_cbor_src_namespaceObject, { + "code": () => (src_code), + "decode": () => (dag_cbor_src_decode), + "encode": () => (dag_cbor_src_encode), + "name": () => (dag_cbor_src_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@ipld/dag-json/src/index.js +var dag_json_src_namespaceObject = {}; +__nccwpck_require__.r(dag_json_src_namespaceObject); +__nccwpck_require__.d(dag_json_src_namespaceObject, { + "code": () => (dag_json_src_code), + "decode": () => (dag_json_src_decode), + "encode": () => (dag_json_src_encode), + "format": () => (src_format), + "name": () => (dag_json_src_name), + "parse": () => (parse), + "stringify": () => (src_format) +}); + +// NAMESPACE OBJECT: ./node_modules/dag-jose/lib/index.js +var lib_namespaceObject = {}; +__nccwpck_require__.r(lib_namespaceObject); +__nccwpck_require__.d(lib_namespaceObject, { + "code": () => (lib_code), + "decode": () => (lib_decode), + "encode": () => (lib_encode), + "name": () => (lib_name), + "toGeneral": () => (toGeneral) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/hashes/identity.js +var identity_namespaceObject = {}; +__nccwpck_require__.r(identity_namespaceObject); +__nccwpck_require__.d(identity_namespaceObject, { + "identity": () => (identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/identity.js +var bases_identity_namespaceObject = {}; +__nccwpck_require__.r(bases_identity_namespaceObject); +__nccwpck_require__.d(bases_identity_namespaceObject, { + "identity": () => (bases_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base2.js +var base2_namespaceObject = {}; +__nccwpck_require__.r(base2_namespaceObject); +__nccwpck_require__.d(base2_namespaceObject, { + "base2": () => (base2) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base8.js +var base8_namespaceObject = {}; +__nccwpck_require__.r(base8_namespaceObject); +__nccwpck_require__.d(base8_namespaceObject, { + "base8": () => (base8) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base10.js +var base10_namespaceObject = {}; +__nccwpck_require__.r(base10_namespaceObject); +__nccwpck_require__.d(base10_namespaceObject, { + "base10": () => (base10) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base16.js +var base16_namespaceObject = {}; +__nccwpck_require__.r(base16_namespaceObject); +__nccwpck_require__.d(base16_namespaceObject, { + "base16": () => (base16), + "base16upper": () => (base16upper) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base32.js +var node_modules_multiformats_src_bases_base32_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_base32_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_base32_namespaceObject, { + "base32": () => (node_modules_multiformats_src_bases_base32_base32), + "base32hex": () => (multiformats_src_bases_base32_base32hex), + "base32hexpad": () => (multiformats_src_bases_base32_base32hexpad), + "base32hexpadupper": () => (multiformats_src_bases_base32_base32hexpadupper), + "base32hexupper": () => (multiformats_src_bases_base32_base32hexupper), + "base32pad": () => (multiformats_src_bases_base32_base32pad), + "base32padupper": () => (multiformats_src_bases_base32_base32padupper), + "base32upper": () => (node_modules_multiformats_src_bases_base32_base32upper), + "base32z": () => (multiformats_src_bases_base32_base32z) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base36.js +var base36_namespaceObject = {}; +__nccwpck_require__.r(base36_namespaceObject); +__nccwpck_require__.d(base36_namespaceObject, { + "base36": () => (base36), + "base36upper": () => (base36upper) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base58.js +var node_modules_multiformats_src_bases_base58_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_base58_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_base58_namespaceObject, { + "base58btc": () => (node_modules_multiformats_src_bases_base58_base58btc), + "base58flickr": () => (multiformats_src_bases_base58_base58flickr) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base64.js +var src_bases_base64_namespaceObject = {}; +__nccwpck_require__.r(src_bases_base64_namespaceObject); +__nccwpck_require__.d(src_bases_base64_namespaceObject, { + "base64": () => (bases_base64_base64), + "base64pad": () => (bases_base64_base64pad), + "base64url": () => (bases_base64_base64url), + "base64urlpad": () => (bases_base64_base64urlpad) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base256emoji.js +var base256emoji_namespaceObject = {}; +__nccwpck_require__.r(base256emoji_namespaceObject); +__nccwpck_require__.d(base256emoji_namespaceObject, { + "base256emoji": () => (base256emoji) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/hashes/sha2.js +var sha2_namespaceObject = {}; +__nccwpck_require__.r(sha2_namespaceObject); +__nccwpck_require__.d(sha2_namespaceObject, { + "sha256": () => (sha2_sha256), + "sha512": () => (sha512) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/codecs/raw.js +var raw_namespaceObject = {}; +__nccwpck_require__.r(raw_namespaceObject); +__nccwpck_require__.d(raw_namespaceObject, { + "code": () => (raw_code), + "decode": () => (raw_decode), + "encode": () => (raw_encode), + "name": () => (raw_name) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/codecs/json.js +var codecs_json_namespaceObject = {}; +__nccwpck_require__.r(codecs_json_namespaceObject); +__nccwpck_require__.d(codecs_json_namespaceObject, { + "code": () => (json_code), + "decode": () => (json_decode), + "encode": () => (json_encode), + "name": () => (json_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base58.js +var dist_src_bases_base58_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_base58_namespaceObject); +__nccwpck_require__.d(dist_src_bases_base58_namespaceObject, { + "base58btc": () => (dist_src_bases_base58_base58btc), + "base58flickr": () => (dist_src_bases_base58_base58flickr) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base32.js +var dist_src_bases_base32_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_base32_namespaceObject); +__nccwpck_require__.d(dist_src_bases_base32_namespaceObject, { + "base32": () => (dist_src_bases_base32_base32), + "base32hex": () => (dist_src_bases_base32_base32hex), + "base32hexpad": () => (dist_src_bases_base32_base32hexpad), + "base32hexpadupper": () => (dist_src_bases_base32_base32hexpadupper), + "base32hexupper": () => (dist_src_bases_base32_base32hexupper), + "base32pad": () => (dist_src_bases_base32_base32pad), + "base32padupper": () => (dist_src_bases_base32_base32padupper), + "base32upper": () => (dist_src_bases_base32_base32upper), + "base32z": () => (dist_src_bases_base32_base32z) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base10.js +var bases_base10_namespaceObject = {}; +__nccwpck_require__.r(bases_base10_namespaceObject); +__nccwpck_require__.d(bases_base10_namespaceObject, { + "base10": () => (base10_base10) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base16.js +var bases_base16_namespaceObject = {}; +__nccwpck_require__.r(bases_base16_namespaceObject); +__nccwpck_require__.d(bases_base16_namespaceObject, { + "base16": () => (base16_base16), + "base16upper": () => (base16_base16upper) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base2.js +var bases_base2_namespaceObject = {}; +__nccwpck_require__.r(bases_base2_namespaceObject); +__nccwpck_require__.d(bases_base2_namespaceObject, { + "base2": () => (base2_base2) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base256emoji.js +var bases_base256emoji_namespaceObject = {}; +__nccwpck_require__.r(bases_base256emoji_namespaceObject); +__nccwpck_require__.d(bases_base256emoji_namespaceObject, { + "base256emoji": () => (base256emoji_base256emoji) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base36.js +var bases_base36_namespaceObject = {}; +__nccwpck_require__.r(bases_base36_namespaceObject); +__nccwpck_require__.d(bases_base36_namespaceObject, { + "base36": () => (base36_base36), + "base36upper": () => (base36_base36upper) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base64.js +var dist_src_bases_base64_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_base64_namespaceObject); +__nccwpck_require__.d(dist_src_bases_base64_namespaceObject, { + "base64": () => (src_bases_base64_base64), + "base64pad": () => (src_bases_base64_base64pad), + "base64url": () => (src_bases_base64_base64url), + "base64urlpad": () => (src_bases_base64_base64urlpad) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base8.js +var bases_base8_namespaceObject = {}; +__nccwpck_require__.r(bases_base8_namespaceObject); +__nccwpck_require__.d(bases_base8_namespaceObject, { + "base8": () => (base8_base8) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/identity.js +var src_bases_identity_namespaceObject = {}; +__nccwpck_require__.r(src_bases_identity_namespaceObject); +__nccwpck_require__.d(src_bases_identity_namespaceObject, { + "identity": () => (src_bases_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/codecs/json.js +var src_codecs_json_namespaceObject = {}; +__nccwpck_require__.r(src_codecs_json_namespaceObject); +__nccwpck_require__.d(src_codecs_json_namespaceObject, { + "code": () => (codecs_json_code), + "decode": () => (codecs_json_decode), + "encode": () => (codecs_json_encode), + "name": () => (codecs_json_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/codecs/raw.js +var codecs_raw_namespaceObject = {}; +__nccwpck_require__.r(codecs_raw_namespaceObject); +__nccwpck_require__.d(codecs_raw_namespaceObject, { + "code": () => (codecs_raw_code), + "decode": () => (codecs_raw_decode), + "encode": () => (codecs_raw_encode), + "name": () => (codecs_raw_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/hashes/identity.js +var hashes_identity_namespaceObject = {}; +__nccwpck_require__.r(hashes_identity_namespaceObject); +__nccwpck_require__.d(hashes_identity_namespaceObject, { + "identity": () => (hashes_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/hashes/sha2.js +var hashes_sha2_namespaceObject = {}; +__nccwpck_require__.r(hashes_sha2_namespaceObject); +__nccwpck_require__.d(hashes_sha2_namespaceObject, { + "sha256": () => (hashes_sha2_sha256), + "sha512": () => (sha2_sha512) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base10.js +var src_bases_base10_namespaceObject = {}; +__nccwpck_require__.r(src_bases_base10_namespaceObject); +__nccwpck_require__.d(src_bases_base10_namespaceObject, { + "base10": () => (bases_base10_base10) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base16.js +var src_bases_base16_namespaceObject = {}; +__nccwpck_require__.r(src_bases_base16_namespaceObject); +__nccwpck_require__.d(src_bases_base16_namespaceObject, { + "base16": () => (bases_base16_base16), + "base16upper": () => (bases_base16_base16upper) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base2.js +var src_bases_base2_namespaceObject = {}; +__nccwpck_require__.r(src_bases_base2_namespaceObject); +__nccwpck_require__.d(src_bases_base2_namespaceObject, { + "base2": () => (bases_base2_base2) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base256emoji.js +var src_bases_base256emoji_namespaceObject = {}; +__nccwpck_require__.r(src_bases_base256emoji_namespaceObject); +__nccwpck_require__.d(src_bases_base256emoji_namespaceObject, { + "base256emoji": () => (bases_base256emoji_base256emoji) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base32.js +var uint8arrays_node_modules_multiformats_src_bases_base32_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_base32_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_base32_namespaceObject, { + "base32": () => (uint8arrays_node_modules_multiformats_src_bases_base32_base32), + "base32hex": () => (node_modules_multiformats_src_bases_base32_base32hex), + "base32hexpad": () => (node_modules_multiformats_src_bases_base32_base32hexpad), + "base32hexpadupper": () => (node_modules_multiformats_src_bases_base32_base32hexpadupper), + "base32hexupper": () => (node_modules_multiformats_src_bases_base32_base32hexupper), + "base32pad": () => (node_modules_multiformats_src_bases_base32_base32pad), + "base32padupper": () => (node_modules_multiformats_src_bases_base32_base32padupper), + "base32upper": () => (uint8arrays_node_modules_multiformats_src_bases_base32_base32upper), + "base32z": () => (node_modules_multiformats_src_bases_base32_base32z) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base36.js +var src_bases_base36_namespaceObject = {}; +__nccwpck_require__.r(src_bases_base36_namespaceObject); +__nccwpck_require__.d(src_bases_base36_namespaceObject, { + "base36": () => (bases_base36_base36), + "base36upper": () => (bases_base36_base36upper) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base58.js +var uint8arrays_node_modules_multiformats_src_bases_base58_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_base58_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_base58_namespaceObject, { + "base58btc": () => (uint8arrays_node_modules_multiformats_src_bases_base58_base58btc), + "base58flickr": () => (node_modules_multiformats_src_bases_base58_base58flickr) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base64.js +var multiformats_src_bases_base64_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_bases_base64_namespaceObject); +__nccwpck_require__.d(multiformats_src_bases_base64_namespaceObject, { + "base64": () => (multiformats_src_bases_base64_base64), + "base64pad": () => (multiformats_src_bases_base64_base64pad), + "base64url": () => (multiformats_src_bases_base64_base64url), + "base64urlpad": () => (multiformats_src_bases_base64_base64urlpad) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base8.js +var src_bases_base8_namespaceObject = {}; +__nccwpck_require__.r(src_bases_base8_namespaceObject); +__nccwpck_require__.d(src_bases_base8_namespaceObject, { + "base8": () => (bases_base8_base8) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/identity.js +var multiformats_src_bases_identity_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_bases_identity_namespaceObject); +__nccwpck_require__.d(multiformats_src_bases_identity_namespaceObject, { + "identity": () => (multiformats_src_bases_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/codecs/json.js +var multiformats_src_codecs_json_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_codecs_json_namespaceObject); +__nccwpck_require__.d(multiformats_src_codecs_json_namespaceObject, { + "code": () => (src_codecs_json_code), + "decode": () => (src_codecs_json_decode), + "encode": () => (src_codecs_json_encode), + "name": () => (src_codecs_json_name) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/codecs/raw.js +var src_codecs_raw_namespaceObject = {}; +__nccwpck_require__.r(src_codecs_raw_namespaceObject); +__nccwpck_require__.d(src_codecs_raw_namespaceObject, { + "code": () => (src_codecs_raw_code), + "decode": () => (src_codecs_raw_decode), + "encode": () => (src_codecs_raw_encode), + "name": () => (src_codecs_raw_name) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/hashes/identity.js +var src_hashes_identity_namespaceObject = {}; +__nccwpck_require__.r(src_hashes_identity_namespaceObject); +__nccwpck_require__.d(src_hashes_identity_namespaceObject, { + "identity": () => (src_hashes_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/hashes/sha2.js +var src_hashes_sha2_namespaceObject = {}; +__nccwpck_require__.r(src_hashes_sha2_namespaceObject); +__nccwpck_require__.d(src_hashes_sha2_namespaceObject, { + "sha256": () => (src_hashes_sha2_sha256), + "sha512": () => (hashes_sha2_sha512) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base58.js +var ipfs_core_utils_node_modules_multiformats_src_bases_base58_namespaceObject = {}; +__nccwpck_require__.r(ipfs_core_utils_node_modules_multiformats_src_bases_base58_namespaceObject); +__nccwpck_require__.d(ipfs_core_utils_node_modules_multiformats_src_bases_base58_namespaceObject, { + "base58btc": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc), + "base58flickr": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58flickr) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base32.js +var ipfs_core_utils_node_modules_multiformats_src_bases_base32_namespaceObject = {}; +__nccwpck_require__.r(ipfs_core_utils_node_modules_multiformats_src_bases_base32_namespaceObject); +__nccwpck_require__.d(ipfs_core_utils_node_modules_multiformats_src_bases_base32_namespaceObject, { + "base32": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32), + "base32hex": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32hex), + "base32hexpad": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32hexpad), + "base32hexpadupper": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32hexpadupper), + "base32hexupper": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32hexupper), + "base32pad": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32pad), + "base32padupper": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32padupper), + "base32upper": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32upper), + "base32z": () => (ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32z) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/identity.js +var node_modules_multiformats_src_bases_identity_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_identity_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_identity_namespaceObject, { + "identity": () => (node_modules_multiformats_src_bases_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base2.js +var multiformats_src_bases_base2_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_bases_base2_namespaceObject); +__nccwpck_require__.d(multiformats_src_bases_base2_namespaceObject, { + "base2": () => (src_bases_base2_base2) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base8.js +var multiformats_src_bases_base8_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_bases_base8_namespaceObject); +__nccwpck_require__.d(multiformats_src_bases_base8_namespaceObject, { + "base8": () => (src_bases_base8_base8) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base10.js +var multiformats_src_bases_base10_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_bases_base10_namespaceObject); +__nccwpck_require__.d(multiformats_src_bases_base10_namespaceObject, { + "base10": () => (src_bases_base10_base10) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base16.js +var multiformats_src_bases_base16_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_bases_base16_namespaceObject); +__nccwpck_require__.d(multiformats_src_bases_base16_namespaceObject, { + "base16": () => (src_bases_base16_base16), + "base16upper": () => (src_bases_base16_base16upper) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base36.js +var multiformats_src_bases_base36_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_bases_base36_namespaceObject); +__nccwpck_require__.d(multiformats_src_bases_base36_namespaceObject, { + "base36": () => (src_bases_base36_base36), + "base36upper": () => (src_bases_base36_base36upper) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base64.js +var node_modules_multiformats_src_bases_base64_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_base64_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_base64_namespaceObject, { + "base64": () => (node_modules_multiformats_src_bases_base64_base64), + "base64pad": () => (node_modules_multiformats_src_bases_base64_base64pad), + "base64url": () => (node_modules_multiformats_src_bases_base64_base64url), + "base64urlpad": () => (node_modules_multiformats_src_bases_base64_base64urlpad) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base256emoji.js +var multiformats_src_bases_base256emoji_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_bases_base256emoji_namespaceObject); +__nccwpck_require__.d(multiformats_src_bases_base256emoji_namespaceObject, { + "base256emoji": () => (src_bases_base256emoji_base256emoji) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/hashes/sha2.js +var multiformats_src_hashes_sha2_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_hashes_sha2_namespaceObject); +__nccwpck_require__.d(multiformats_src_hashes_sha2_namespaceObject, { + "sha256": () => (multiformats_src_hashes_sha2_sha256), + "sha512": () => (src_hashes_sha2_sha512) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/hashes/identity.js +var multiformats_src_hashes_identity_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_hashes_identity_namespaceObject); +__nccwpck_require__.d(multiformats_src_hashes_identity_namespaceObject, { + "identity": () => (multiformats_src_hashes_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/codecs/raw.js +var multiformats_src_codecs_raw_namespaceObject = {}; +__nccwpck_require__.r(multiformats_src_codecs_raw_namespaceObject); +__nccwpck_require__.d(multiformats_src_codecs_raw_namespaceObject, { + "code": () => (multiformats_src_codecs_raw_code), + "decode": () => (multiformats_src_codecs_raw_decode), + "encode": () => (multiformats_src_codecs_raw_encode), + "name": () => (multiformats_src_codecs_raw_name) +}); + +// NAMESPACE OBJECT: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/codecs/json.js +var node_modules_multiformats_src_codecs_json_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_codecs_json_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_codecs_json_namespaceObject, { + "code": () => (multiformats_src_codecs_json_code), + "decode": () => (multiformats_src_codecs_json_decode), + "encode": () => (multiformats_src_codecs_json_encode), + "name": () => (multiformats_src_codecs_json_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base58.js +var peer_id_node_modules_multiformats_src_bases_base58_namespaceObject = {}; +__nccwpck_require__.r(peer_id_node_modules_multiformats_src_bases_base58_namespaceObject); +__nccwpck_require__.d(peer_id_node_modules_multiformats_src_bases_base58_namespaceObject, { + "base58btc": () => (peer_id_node_modules_multiformats_src_bases_base58_base58btc), + "base58flickr": () => (peer_id_node_modules_multiformats_src_bases_base58_base58flickr) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/identity.js +var peer_id_node_modules_multiformats_src_bases_identity_namespaceObject = {}; +__nccwpck_require__.r(peer_id_node_modules_multiformats_src_bases_identity_namespaceObject); +__nccwpck_require__.d(peer_id_node_modules_multiformats_src_bases_identity_namespaceObject, { + "identity": () => (peer_id_node_modules_multiformats_src_bases_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base2.js +var node_modules_multiformats_src_bases_base2_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_base2_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_base2_namespaceObject, { + "base2": () => (multiformats_src_bases_base2_base2) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base8.js +var node_modules_multiformats_src_bases_base8_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_base8_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_base8_namespaceObject, { + "base8": () => (multiformats_src_bases_base8_base8) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base10.js +var node_modules_multiformats_src_bases_base10_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_base10_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_base10_namespaceObject, { + "base10": () => (multiformats_src_bases_base10_base10) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base16.js +var node_modules_multiformats_src_bases_base16_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_base16_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_base16_namespaceObject, { + "base16": () => (multiformats_src_bases_base16_base16), + "base16upper": () => (multiformats_src_bases_base16_base16upper) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base32.js +var peer_id_node_modules_multiformats_src_bases_base32_namespaceObject = {}; +__nccwpck_require__.r(peer_id_node_modules_multiformats_src_bases_base32_namespaceObject); +__nccwpck_require__.d(peer_id_node_modules_multiformats_src_bases_base32_namespaceObject, { + "base32": () => (peer_id_node_modules_multiformats_src_bases_base32_base32), + "base32hex": () => (peer_id_node_modules_multiformats_src_bases_base32_base32hex), + "base32hexpad": () => (peer_id_node_modules_multiformats_src_bases_base32_base32hexpad), + "base32hexpadupper": () => (peer_id_node_modules_multiformats_src_bases_base32_base32hexpadupper), + "base32hexupper": () => (peer_id_node_modules_multiformats_src_bases_base32_base32hexupper), + "base32pad": () => (peer_id_node_modules_multiformats_src_bases_base32_base32pad), + "base32padupper": () => (peer_id_node_modules_multiformats_src_bases_base32_base32padupper), + "base32upper": () => (peer_id_node_modules_multiformats_src_bases_base32_base32upper), + "base32z": () => (peer_id_node_modules_multiformats_src_bases_base32_base32z) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base36.js +var node_modules_multiformats_src_bases_base36_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_base36_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_base36_namespaceObject, { + "base36": () => (multiformats_src_bases_base36_base36), + "base36upper": () => (multiformats_src_bases_base36_base36upper) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base64.js +var peer_id_node_modules_multiformats_src_bases_base64_namespaceObject = {}; +__nccwpck_require__.r(peer_id_node_modules_multiformats_src_bases_base64_namespaceObject); +__nccwpck_require__.d(peer_id_node_modules_multiformats_src_bases_base64_namespaceObject, { + "base64": () => (peer_id_node_modules_multiformats_src_bases_base64_base64), + "base64pad": () => (peer_id_node_modules_multiformats_src_bases_base64_base64pad), + "base64url": () => (peer_id_node_modules_multiformats_src_bases_base64_base64url), + "base64urlpad": () => (peer_id_node_modules_multiformats_src_bases_base64_base64urlpad) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base256emoji.js +var node_modules_multiformats_src_bases_base256emoji_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_bases_base256emoji_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_bases_base256emoji_namespaceObject, { + "base256emoji": () => (multiformats_src_bases_base256emoji_base256emoji) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/hashes/sha2.js +var node_modules_multiformats_src_hashes_sha2_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_hashes_sha2_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_hashes_sha2_namespaceObject, { + "sha256": () => (node_modules_multiformats_src_hashes_sha2_sha256), + "sha512": () => (multiformats_src_hashes_sha2_sha512) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/hashes/identity.js +var node_modules_multiformats_src_hashes_identity_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_hashes_identity_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_hashes_identity_namespaceObject, { + "identity": () => (node_modules_multiformats_src_hashes_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/codecs/raw.js +var node_modules_multiformats_src_codecs_raw_namespaceObject = {}; +__nccwpck_require__.r(node_modules_multiformats_src_codecs_raw_namespaceObject); +__nccwpck_require__.d(node_modules_multiformats_src_codecs_raw_namespaceObject, { + "code": () => (node_modules_multiformats_src_codecs_raw_code), + "decode": () => (node_modules_multiformats_src_codecs_raw_decode), + "encode": () => (node_modules_multiformats_src_codecs_raw_encode), + "name": () => (node_modules_multiformats_src_codecs_raw_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/codecs/json.js +var peer_id_node_modules_multiformats_src_codecs_json_namespaceObject = {}; +__nccwpck_require__.r(peer_id_node_modules_multiformats_src_codecs_json_namespaceObject); +__nccwpck_require__.d(peer_id_node_modules_multiformats_src_codecs_json_namespaceObject, { + "code": () => (node_modules_multiformats_src_codecs_json_code), + "decode": () => (node_modules_multiformats_src_codecs_json_decode), + "encode": () => (node_modules_multiformats_src_codecs_json_encode), + "name": () => (node_modules_multiformats_src_codecs_json_name) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base10.js +var uint8arrays_node_modules_multiformats_src_bases_base10_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_base10_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_base10_namespaceObject, { + "base10": () => (node_modules_multiformats_src_bases_base10_base10) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base16.js +var uint8arrays_node_modules_multiformats_src_bases_base16_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_base16_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_base16_namespaceObject, { + "base16": () => (node_modules_multiformats_src_bases_base16_base16), + "base16upper": () => (node_modules_multiformats_src_bases_base16_base16upper) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base2.js +var uint8arrays_node_modules_multiformats_src_bases_base2_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_base2_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_base2_namespaceObject, { + "base2": () => (node_modules_multiformats_src_bases_base2_base2) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base256emoji.js +var uint8arrays_node_modules_multiformats_src_bases_base256emoji_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_base256emoji_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_base256emoji_namespaceObject, { + "base256emoji": () => (node_modules_multiformats_src_bases_base256emoji_base256emoji) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base32.js +var node_modules_uint8arrays_node_modules_multiformats_src_bases_base32_namespaceObject = {}; +__nccwpck_require__.r(node_modules_uint8arrays_node_modules_multiformats_src_bases_base32_namespaceObject); +__nccwpck_require__.d(node_modules_uint8arrays_node_modules_multiformats_src_bases_base32_namespaceObject, { + "base32": () => (node_modules_uint8arrays_node_modules_multiformats_src_bases_base32_base32), + "base32hex": () => (uint8arrays_node_modules_multiformats_src_bases_base32_base32hex), + "base32hexpad": () => (uint8arrays_node_modules_multiformats_src_bases_base32_base32hexpad), + "base32hexpadupper": () => (uint8arrays_node_modules_multiformats_src_bases_base32_base32hexpadupper), + "base32hexupper": () => (uint8arrays_node_modules_multiformats_src_bases_base32_base32hexupper), + "base32pad": () => (uint8arrays_node_modules_multiformats_src_bases_base32_base32pad), + "base32padupper": () => (uint8arrays_node_modules_multiformats_src_bases_base32_base32padupper), + "base32upper": () => (node_modules_uint8arrays_node_modules_multiformats_src_bases_base32_base32upper), + "base32z": () => (uint8arrays_node_modules_multiformats_src_bases_base32_base32z) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base36.js +var uint8arrays_node_modules_multiformats_src_bases_base36_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_base36_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_base36_namespaceObject, { + "base36": () => (node_modules_multiformats_src_bases_base36_base36), + "base36upper": () => (node_modules_multiformats_src_bases_base36_base36upper) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base58.js +var node_modules_uint8arrays_node_modules_multiformats_src_bases_base58_namespaceObject = {}; +__nccwpck_require__.r(node_modules_uint8arrays_node_modules_multiformats_src_bases_base58_namespaceObject); +__nccwpck_require__.d(node_modules_uint8arrays_node_modules_multiformats_src_bases_base58_namespaceObject, { + "base58btc": () => (node_modules_uint8arrays_node_modules_multiformats_src_bases_base58_base58btc), + "base58flickr": () => (uint8arrays_node_modules_multiformats_src_bases_base58_base58flickr) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base64.js +var uint8arrays_node_modules_multiformats_src_bases_base64_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_base64_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_base64_namespaceObject, { + "base64": () => (uint8arrays_node_modules_multiformats_src_bases_base64_base64), + "base64pad": () => (uint8arrays_node_modules_multiformats_src_bases_base64_base64pad), + "base64url": () => (uint8arrays_node_modules_multiformats_src_bases_base64_base64url), + "base64urlpad": () => (uint8arrays_node_modules_multiformats_src_bases_base64_base64urlpad) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base8.js +var uint8arrays_node_modules_multiformats_src_bases_base8_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_base8_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_base8_namespaceObject, { + "base8": () => (node_modules_multiformats_src_bases_base8_base8) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/identity.js +var uint8arrays_node_modules_multiformats_src_bases_identity_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_bases_identity_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_bases_identity_namespaceObject, { + "identity": () => (uint8arrays_node_modules_multiformats_src_bases_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/codecs/json.js +var uint8arrays_node_modules_multiformats_src_codecs_json_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_codecs_json_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_codecs_json_namespaceObject, { + "code": () => (uint8arrays_node_modules_multiformats_src_codecs_json_code), + "decode": () => (uint8arrays_node_modules_multiformats_src_codecs_json_decode), + "encode": () => (uint8arrays_node_modules_multiformats_src_codecs_json_encode), + "name": () => (uint8arrays_node_modules_multiformats_src_codecs_json_name) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/codecs/raw.js +var uint8arrays_node_modules_multiformats_src_codecs_raw_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_codecs_raw_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_codecs_raw_namespaceObject, { + "code": () => (uint8arrays_node_modules_multiformats_src_codecs_raw_code), + "decode": () => (uint8arrays_node_modules_multiformats_src_codecs_raw_decode), + "encode": () => (uint8arrays_node_modules_multiformats_src_codecs_raw_encode), + "name": () => (uint8arrays_node_modules_multiformats_src_codecs_raw_name) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/hashes/identity.js +var uint8arrays_node_modules_multiformats_src_hashes_identity_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_hashes_identity_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_hashes_identity_namespaceObject, { + "identity": () => (uint8arrays_node_modules_multiformats_src_hashes_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/hashes/sha2.js +var uint8arrays_node_modules_multiformats_src_hashes_sha2_namespaceObject = {}; +__nccwpck_require__.r(uint8arrays_node_modules_multiformats_src_hashes_sha2_namespaceObject); +__nccwpck_require__.d(uint8arrays_node_modules_multiformats_src_hashes_sha2_namespaceObject, { + "sha256": () => (uint8arrays_node_modules_multiformats_src_hashes_sha2_sha256), + "sha512": () => (node_modules_multiformats_src_hashes_sha2_sha512) +}); + +// NAMESPACE OBJECT: ./node_modules/@filebase/sdk/node_modules/axios/lib/platform/common/utils.js +var common_utils_namespaceObject = {}; +__nccwpck_require__.r(common_utils_namespaceObject); +__nccwpck_require__.d(common_utils_namespaceObject, { + "hasBrowserEnv": () => (hasBrowserEnv), + "hasStandardBrowserEnv": () => (hasStandardBrowserEnv), + "hasStandardBrowserWebWorkerEnv": () => (hasStandardBrowserWebWorkerEnv) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base10.js +var protons_runtime_node_modules_multiformats_src_bases_base10_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_base10_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_base10_namespaceObject, { + "base10": () => (protons_runtime_node_modules_multiformats_src_bases_base10_base10) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base16.js +var protons_runtime_node_modules_multiformats_src_bases_base16_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_base16_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_base16_namespaceObject, { + "base16": () => (protons_runtime_node_modules_multiformats_src_bases_base16_base16), + "base16upper": () => (protons_runtime_node_modules_multiformats_src_bases_base16_base16upper) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base2.js +var protons_runtime_node_modules_multiformats_src_bases_base2_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_base2_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_base2_namespaceObject, { + "base2": () => (protons_runtime_node_modules_multiformats_src_bases_base2_base2) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base256emoji.js +var protons_runtime_node_modules_multiformats_src_bases_base256emoji_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_base256emoji_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_base256emoji_namespaceObject, { + "base256emoji": () => (protons_runtime_node_modules_multiformats_src_bases_base256emoji_base256emoji) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base32.js +var protons_runtime_node_modules_multiformats_src_bases_base32_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_base32_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_base32_namespaceObject, { + "base32": () => (protons_runtime_node_modules_multiformats_src_bases_base32_base32), + "base32hex": () => (protons_runtime_node_modules_multiformats_src_bases_base32_base32hex), + "base32hexpad": () => (protons_runtime_node_modules_multiformats_src_bases_base32_base32hexpad), + "base32hexpadupper": () => (protons_runtime_node_modules_multiformats_src_bases_base32_base32hexpadupper), + "base32hexupper": () => (protons_runtime_node_modules_multiformats_src_bases_base32_base32hexupper), + "base32pad": () => (protons_runtime_node_modules_multiformats_src_bases_base32_base32pad), + "base32padupper": () => (protons_runtime_node_modules_multiformats_src_bases_base32_base32padupper), + "base32upper": () => (protons_runtime_node_modules_multiformats_src_bases_base32_base32upper), + "base32z": () => (protons_runtime_node_modules_multiformats_src_bases_base32_base32z) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base36.js +var protons_runtime_node_modules_multiformats_src_bases_base36_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_base36_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_base36_namespaceObject, { + "base36": () => (protons_runtime_node_modules_multiformats_src_bases_base36_base36), + "base36upper": () => (protons_runtime_node_modules_multiformats_src_bases_base36_base36upper) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base58.js +var protons_runtime_node_modules_multiformats_src_bases_base58_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_base58_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_base58_namespaceObject, { + "base58btc": () => (protons_runtime_node_modules_multiformats_src_bases_base58_base58btc), + "base58flickr": () => (protons_runtime_node_modules_multiformats_src_bases_base58_base58flickr) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base64.js +var protons_runtime_node_modules_multiformats_src_bases_base64_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_base64_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_base64_namespaceObject, { + "base64": () => (protons_runtime_node_modules_multiformats_src_bases_base64_base64), + "base64pad": () => (protons_runtime_node_modules_multiformats_src_bases_base64_base64pad), + "base64url": () => (protons_runtime_node_modules_multiformats_src_bases_base64_base64url), + "base64urlpad": () => (protons_runtime_node_modules_multiformats_src_bases_base64_base64urlpad) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base8.js +var protons_runtime_node_modules_multiformats_src_bases_base8_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_base8_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_base8_namespaceObject, { + "base8": () => (protons_runtime_node_modules_multiformats_src_bases_base8_base8) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/identity.js +var protons_runtime_node_modules_multiformats_src_bases_identity_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_bases_identity_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_bases_identity_namespaceObject, { + "identity": () => (protons_runtime_node_modules_multiformats_src_bases_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/codecs/json.js +var protons_runtime_node_modules_multiformats_src_codecs_json_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_codecs_json_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_codecs_json_namespaceObject, { + "code": () => (protons_runtime_node_modules_multiformats_src_codecs_json_code), + "decode": () => (protons_runtime_node_modules_multiformats_src_codecs_json_decode), + "encode": () => (protons_runtime_node_modules_multiformats_src_codecs_json_encode), + "name": () => (protons_runtime_node_modules_multiformats_src_codecs_json_name) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/codecs/raw.js +var protons_runtime_node_modules_multiformats_src_codecs_raw_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_codecs_raw_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_codecs_raw_namespaceObject, { + "code": () => (protons_runtime_node_modules_multiformats_src_codecs_raw_code), + "decode": () => (protons_runtime_node_modules_multiformats_src_codecs_raw_decode), + "encode": () => (protons_runtime_node_modules_multiformats_src_codecs_raw_encode), + "name": () => (protons_runtime_node_modules_multiformats_src_codecs_raw_name) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/hashes/identity.js +var protons_runtime_node_modules_multiformats_src_hashes_identity_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_hashes_identity_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_hashes_identity_namespaceObject, { + "identity": () => (protons_runtime_node_modules_multiformats_src_hashes_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/protons-runtime/node_modules/multiformats/src/hashes/sha2.js +var protons_runtime_node_modules_multiformats_src_hashes_sha2_namespaceObject = {}; +__nccwpck_require__.r(protons_runtime_node_modules_multiformats_src_hashes_sha2_namespaceObject); +__nccwpck_require__.d(protons_runtime_node_modules_multiformats_src_hashes_sha2_namespaceObject, { + "sha256": () => (protons_runtime_node_modules_multiformats_src_hashes_sha2_sha256), + "sha512": () => (protons_runtime_node_modules_multiformats_src_hashes_sha2_sha512) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/codecs/raw.js +var dist_src_codecs_raw_namespaceObject = {}; +__nccwpck_require__.r(dist_src_codecs_raw_namespaceObject); +__nccwpck_require__.d(dist_src_codecs_raw_namespaceObject, { + "code": () => (dist_src_codecs_raw_code), + "decode": () => (dist_src_codecs_raw_decode), + "encode": () => (dist_src_codecs_raw_encode), + "name": () => (dist_src_codecs_raw_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base32.js +var multiformats_dist_src_bases_base32_namespaceObject = {}; +__nccwpck_require__.r(multiformats_dist_src_bases_base32_namespaceObject); +__nccwpck_require__.d(multiformats_dist_src_bases_base32_namespaceObject, { + "base32": () => (multiformats_dist_src_bases_base32_base32), + "base32hex": () => (multiformats_dist_src_bases_base32_base32hex), + "base32hexpad": () => (multiformats_dist_src_bases_base32_base32hexpad), + "base32hexpadupper": () => (multiformats_dist_src_bases_base32_base32hexpadupper), + "base32hexupper": () => (multiformats_dist_src_bases_base32_base32hexupper), + "base32pad": () => (multiformats_dist_src_bases_base32_base32pad), + "base32padupper": () => (multiformats_dist_src_bases_base32_base32padupper), + "base32upper": () => (multiformats_dist_src_bases_base32_base32upper), + "base32z": () => (multiformats_dist_src_bases_base32_base32z) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base58.js +var multiformats_dist_src_bases_base58_namespaceObject = {}; +__nccwpck_require__.r(multiformats_dist_src_bases_base58_namespaceObject); +__nccwpck_require__.d(multiformats_dist_src_bases_base58_namespaceObject, { + "base58btc": () => (multiformats_dist_src_bases_base58_base58btc), + "base58flickr": () => (multiformats_dist_src_bases_base58_base58flickr) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/hashes/sha2.js +var dist_src_hashes_sha2_namespaceObject = {}; +__nccwpck_require__.r(dist_src_hashes_sha2_namespaceObject); +__nccwpck_require__.d(dist_src_hashes_sha2_namespaceObject, { + "sha256": () => (dist_src_hashes_sha2_sha256), + "sha512": () => (dist_src_hashes_sha2_sha512) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base10.js +var dist_src_bases_base10_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_base10_namespaceObject); +__nccwpck_require__.d(dist_src_bases_base10_namespaceObject, { + "base10": () => (dist_src_bases_base10_base10) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base16.js +var dist_src_bases_base16_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_base16_namespaceObject); +__nccwpck_require__.d(dist_src_bases_base16_namespaceObject, { + "base16": () => (dist_src_bases_base16_base16), + "base16upper": () => (dist_src_bases_base16_base16upper) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base2.js +var dist_src_bases_base2_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_base2_namespaceObject); +__nccwpck_require__.d(dist_src_bases_base2_namespaceObject, { + "base2": () => (dist_src_bases_base2_base2) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base256emoji.js +var dist_src_bases_base256emoji_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_base256emoji_namespaceObject); +__nccwpck_require__.d(dist_src_bases_base256emoji_namespaceObject, { + "base256emoji": () => (dist_src_bases_base256emoji_base256emoji) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base36.js +var dist_src_bases_base36_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_base36_namespaceObject); +__nccwpck_require__.d(dist_src_bases_base36_namespaceObject, { + "base36": () => (dist_src_bases_base36_base36), + "base36upper": () => (dist_src_bases_base36_base36upper) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base64.js +var multiformats_dist_src_bases_base64_namespaceObject = {}; +__nccwpck_require__.r(multiformats_dist_src_bases_base64_namespaceObject); +__nccwpck_require__.d(multiformats_dist_src_bases_base64_namespaceObject, { + "base64": () => (dist_src_bases_base64_base64), + "base64pad": () => (dist_src_bases_base64_base64pad), + "base64url": () => (dist_src_bases_base64_base64url), + "base64urlpad": () => (dist_src_bases_base64_base64urlpad) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base8.js +var dist_src_bases_base8_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_base8_namespaceObject); +__nccwpck_require__.d(dist_src_bases_base8_namespaceObject, { + "base8": () => (dist_src_bases_base8_base8) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/identity.js +var dist_src_bases_identity_namespaceObject = {}; +__nccwpck_require__.r(dist_src_bases_identity_namespaceObject); +__nccwpck_require__.d(dist_src_bases_identity_namespaceObject, { + "identity": () => (dist_src_bases_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/codecs/json.js +var dist_src_codecs_json_namespaceObject = {}; +__nccwpck_require__.r(dist_src_codecs_json_namespaceObject); +__nccwpck_require__.d(dist_src_codecs_json_namespaceObject, { + "code": () => (dist_src_codecs_json_code), + "decode": () => (dist_src_codecs_json_decode), + "encode": () => (dist_src_codecs_json_encode), + "name": () => (dist_src_codecs_json_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/hashes/identity.js +var dist_src_hashes_identity_namespaceObject = {}; +__nccwpck_require__.r(dist_src_hashes_identity_namespaceObject); +__nccwpck_require__.d(dist_src_hashes_identity_namespaceObject, { + "identity": () => (dist_src_hashes_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base32.js +var unixfs_node_modules_multiformats_src_bases_base32_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_base32_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_base32_namespaceObject, { + "base32": () => (unixfs_node_modules_multiformats_src_bases_base32_base32), + "base32hex": () => (unixfs_node_modules_multiformats_src_bases_base32_base32hex), + "base32hexpad": () => (unixfs_node_modules_multiformats_src_bases_base32_base32hexpad), + "base32hexpadupper": () => (unixfs_node_modules_multiformats_src_bases_base32_base32hexpadupper), + "base32hexupper": () => (unixfs_node_modules_multiformats_src_bases_base32_base32hexupper), + "base32pad": () => (unixfs_node_modules_multiformats_src_bases_base32_base32pad), + "base32padupper": () => (unixfs_node_modules_multiformats_src_bases_base32_base32padupper), + "base32upper": () => (unixfs_node_modules_multiformats_src_bases_base32_base32upper), + "base32z": () => (unixfs_node_modules_multiformats_src_bases_base32_base32z) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base58.js +var unixfs_node_modules_multiformats_src_bases_base58_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_base58_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_base58_namespaceObject, { + "base58btc": () => (unixfs_node_modules_multiformats_src_bases_base58_base58btc), + "base58flickr": () => (unixfs_node_modules_multiformats_src_bases_base58_base58flickr) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base10.js +var unixfs_node_modules_multiformats_src_bases_base10_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_base10_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_base10_namespaceObject, { + "base10": () => (unixfs_node_modules_multiformats_src_bases_base10_base10) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base16.js +var unixfs_node_modules_multiformats_src_bases_base16_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_base16_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_base16_namespaceObject, { + "base16": () => (unixfs_node_modules_multiformats_src_bases_base16_base16), + "base16upper": () => (unixfs_node_modules_multiformats_src_bases_base16_base16upper) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base2.js +var unixfs_node_modules_multiformats_src_bases_base2_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_base2_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_base2_namespaceObject, { + "base2": () => (unixfs_node_modules_multiformats_src_bases_base2_base2) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base256emoji.js +var unixfs_node_modules_multiformats_src_bases_base256emoji_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_base256emoji_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_base256emoji_namespaceObject, { + "base256emoji": () => (unixfs_node_modules_multiformats_src_bases_base256emoji_base256emoji) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base36.js +var unixfs_node_modules_multiformats_src_bases_base36_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_base36_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_base36_namespaceObject, { + "base36": () => (unixfs_node_modules_multiformats_src_bases_base36_base36), + "base36upper": () => (unixfs_node_modules_multiformats_src_bases_base36_base36upper) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base64.js +var unixfs_node_modules_multiformats_src_bases_base64_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_base64_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_base64_namespaceObject, { + "base64": () => (unixfs_node_modules_multiformats_src_bases_base64_base64), + "base64pad": () => (unixfs_node_modules_multiformats_src_bases_base64_base64pad), + "base64url": () => (unixfs_node_modules_multiformats_src_bases_base64_base64url), + "base64urlpad": () => (unixfs_node_modules_multiformats_src_bases_base64_base64urlpad) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base8.js +var unixfs_node_modules_multiformats_src_bases_base8_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_base8_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_base8_namespaceObject, { + "base8": () => (unixfs_node_modules_multiformats_src_bases_base8_base8) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/identity.js +var unixfs_node_modules_multiformats_src_bases_identity_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_bases_identity_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_bases_identity_namespaceObject, { + "identity": () => (unixfs_node_modules_multiformats_src_bases_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/codecs/json.js +var unixfs_node_modules_multiformats_src_codecs_json_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_codecs_json_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_codecs_json_namespaceObject, { + "code": () => (unixfs_node_modules_multiformats_src_codecs_json_code), + "decode": () => (unixfs_node_modules_multiformats_src_codecs_json_decode), + "encode": () => (unixfs_node_modules_multiformats_src_codecs_json_encode), + "name": () => (unixfs_node_modules_multiformats_src_codecs_json_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/codecs/raw.js +var unixfs_node_modules_multiformats_src_codecs_raw_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_codecs_raw_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_codecs_raw_namespaceObject, { + "code": () => (unixfs_node_modules_multiformats_src_codecs_raw_code), + "decode": () => (unixfs_node_modules_multiformats_src_codecs_raw_decode), + "encode": () => (unixfs_node_modules_multiformats_src_codecs_raw_encode), + "name": () => (unixfs_node_modules_multiformats_src_codecs_raw_name) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/hashes/identity.js +var unixfs_node_modules_multiformats_src_hashes_identity_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_hashes_identity_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_hashes_identity_namespaceObject, { + "identity": () => (unixfs_node_modules_multiformats_src_hashes_identity_identity) +}); + +// NAMESPACE OBJECT: ./node_modules/@helia/unixfs/node_modules/multiformats/src/hashes/sha2.js +var unixfs_node_modules_multiformats_src_hashes_sha2_namespaceObject = {}; +__nccwpck_require__.r(unixfs_node_modules_multiformats_src_hashes_sha2_namespaceObject); +__nccwpck_require__.d(unixfs_node_modules_multiformats_src_hashes_sha2_namespaceObject, { + "sha256": () => (unixfs_node_modules_multiformats_src_hashes_sha2_sha256), + "sha512": () => (unixfs_node_modules_multiformats_src_hashes_sha2_sha512) +}); + +// NAMESPACE OBJECT: ./node_modules/blockstore-fs/node_modules/blockstore-core/dist/src/errors.js +var blockstore_core_dist_src_errors_namespaceObject = {}; +__nccwpck_require__.r(blockstore_core_dist_src_errors_namespaceObject); +__nccwpck_require__.d(blockstore_core_dist_src_errors_namespaceObject, { + "abortedError": () => (abortedError), + "closeFailedError": () => (closeFailedError), + "deleteFailedError": () => (deleteFailedError), + "getFailedError": () => (getFailedError), + "hasFailedError": () => (hasFailedError), + "notFoundError": () => (notFoundError), + "openFailedError": () => (openFailedError), + "putFailedError": () => (putFailedError) +}); + +// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js +var core = __nccwpck_require__(47514); +// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js +var github = __nccwpck_require__(29592); +;// CONCATENATED MODULE: ./pinners/maker.js +/* harmony default export */ const maker = (({ builder, upload }) => + async (options) => { + const api = await builder(options); + +======= + upload: async (api, options) => { + const { path, pattern, pin } = options; + const { cid } = await last( + api.addAll(globSource(fsPath.dirname(path), pattern), { pin }) + ); + + if (!cid) throw new Error("Content hash is not found."); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + return { + upload: async (options) => { + const { path } = options; + if (!path) { + throw new Error("Path is empty"); + } + + return upload(api, options); + }, + }; + }); + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/multibases.js +/** + * @typedef {import('multiformats/bases/interface').MultibaseCodec} MultibaseCodec + * @typedef {import('./types').LoadBaseFn} LoadBaseFn + * @typedef {import('ipfs-core-types/src/utils').AbortOptions} AbortOptions + */ + +/** + * @type {LoadBaseFn} + */ +const LOAD_BASE = (name) => Promise.reject(new Error(`No base found for "${name}"`)) + +class Multibases { + /** + * @param {object} options + * @param {LoadBaseFn} [options.loadBase] + * @param {MultibaseCodec[]} options.bases + */ + constructor (options) { + // Object with current list of active resolvers + /** @type {Record}} */ + this._basesByName = {} + + // Object with current list of active resolvers + /** @type {Record}} */ + this._basesByPrefix = {} + + this._loadBase = options.loadBase || LOAD_BASE + + // Enable all supplied codecs + for (const base of options.bases) { + this.addBase(base) + } + } + + /** + * Add support for a multibase codec + * + * @param {MultibaseCodec} base + */ + addBase (base) { + if (this._basesByName[base.name] || this._basesByPrefix[base.prefix]) { + throw new Error(`Codec already exists for codec "${base.name}"`) + } + + this._basesByName[base.name] = base + this._basesByPrefix[base.prefix] = base + } + + /** + * Remove support for a multibase codec + * + * @param {MultibaseCodec} base + */ + removeBase (base) { + delete this._basesByName[base.name] + delete this._basesByPrefix[base.prefix] + } + + /** + * @param {string} nameOrPrefix + */ + async getBase (nameOrPrefix) { + if (this._basesByName[nameOrPrefix]) { + return this._basesByName[nameOrPrefix] + } + + if (this._basesByPrefix[nameOrPrefix]) { + return this._basesByPrefix[nameOrPrefix] + } + + // If not supported, attempt to dynamically load this codec + const base = await this._loadBase(nameOrPrefix) + + if (this._basesByName[base.name] == null && this._basesByPrefix[base.prefix] == null) { + this.addBase(base) + } + + return base + } + + listBases () { + return Object.values(this._basesByName) + } +} + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/multicodecs.js +/** + * @typedef {import('multiformats/codecs/interface').BlockCodec} BlockCodec + * @typedef {import('./types').LoadCodecFn} LoadCodecFn + * @typedef {import('ipfs-core-types/src/utils').AbortOptions} AbortOptions + */ + +/** + * @type {LoadCodecFn} + */ +const LOAD_CODEC = (codeOrName) => Promise.reject(new Error(`No codec found for "${codeOrName}"`)) + +class Multicodecs { + /** + * @param {object} options + * @param {LoadCodecFn} [options.loadCodec] + * @param {BlockCodec[]} options.codecs + */ + constructor (options) { + // Object with current list of active resolvers + /** @type {Record}} */ + this._codecsByName = {} + + // Object with current list of active resolvers + /** @type {Record}} */ + this._codecsByCode = {} + + this._loadCodec = options.loadCodec || LOAD_CODEC + + // Enable all supplied codecs + for (const codec of options.codecs) { + this.addCodec(codec) + } + } + + /** + * Add support for a block codec + * + * @param {BlockCodec} codec + */ + addCodec (codec) { + if (this._codecsByName[codec.name] || this._codecsByCode[codec.code]) { + throw new Error(`Resolver already exists for codec "${codec.name}"`) + } + + this._codecsByName[codec.name] = codec + this._codecsByCode[codec.code] = codec + } + + /** + * Remove support for a block codec + * + * @param {BlockCodec} codec + */ + removeCodec (codec) { + delete this._codecsByName[codec.name] + delete this._codecsByCode[codec.code] + } + + /** + * @param {number | string} code + */ + async getCodec (code) { + const table = typeof code === 'string' ? this._codecsByName : this._codecsByCode + + if (table[code]) { + return table[code] + } + + // If not supported, attempt to dynamically load this codec + const codec = await this._loadCodec(code) + + if (table[code] == null) { + this.addCodec(codec) + } + + return codec + } + + listCodecs () { + return Object.values(this._codecsByName) + } +} + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/multihashes.js +/** + * @typedef {import('multiformats/hashes/interface').MultihashHasher} MultihashHasher + * @typedef {import('./types').LoadHasherFn} LoadHasherFn + * @typedef {import('ipfs-core-types/src/utils').AbortOptions} AbortOptions + */ + +/** + * @type {LoadHasherFn} + */ +const LOAD_HASHER = (codeOrName) => Promise.reject(new Error(`No hasher found for "${codeOrName}"`)) + +class Multihashes { + /** + * @param {object} options + * @param {LoadHasherFn} [options.loadHasher] + * @param {MultihashHasher[]} options.hashers + */ + constructor (options) { + // Object with current list of active hashers + /** @type {Record}} */ + this._hashersByName = {} + + // Object with current list of active hashers + /** @type {Record}} */ + this._hashersByCode = {} + + this._loadHasher = options.loadHasher || LOAD_HASHER + + // Enable all supplied hashers + for (const hasher of options.hashers) { + this.addHasher(hasher) + } + } + + /** + * Add support for a multibase hasher + * + * @param {MultihashHasher} hasher + */ + addHasher (hasher) { + if (this._hashersByName[hasher.name] || this._hashersByCode[hasher.code]) { + throw new Error(`Resolver already exists for codec "${hasher.name}"`) + } + + this._hashersByName[hasher.name] = hasher + this._hashersByCode[hasher.code] = hasher + } + + /** + * Remove support for a multibase hasher + * + * @param {MultihashHasher} hasher + */ + removeHasher (hasher) { + delete this._hashersByName[hasher.name] + delete this._hashersByCode[hasher.code] + } + + /** + * @param {number | string} code + */ + async getHasher (code) { + const table = typeof code === 'string' ? this._hashersByName : this._hashersByCode + + if (table[code]) { + return table[code] + } + + // If not supported, attempt to dynamically load this hasher + const hasher = await this._loadHasher(code) + + if (table[code] == null) { + this.addHasher(hasher) + } + + return hasher + } + + listHashers () { + return Object.values(this._hashersByName) + } +} + +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/node_modules/multiformats/dist/src/bytes.js +const empty = new Uint8Array(0); +function toHex(d) { + return d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), ''); +} +function fromHex(hex) { + const hexes = hex.match(/../g); + return hexes != null ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : empty; +} +function equals(aa, bb) { + if (aa === bb) + return true; + if (aa.byteLength !== bb.byteLength) { + return false; + } + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false; + } + } + return true; +} +function bytes_coerce(o) { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') + return o; + if (o instanceof ArrayBuffer) + return new Uint8Array(o); + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength); + } + throw new Error('Unknown type, must be binary type'); +} +function isBinary(o) { + return o instanceof ArrayBuffer || ArrayBuffer.isView(o); +} +function fromString(str) { + return new TextEncoder().encode(str); +} +function bytes_toString(b) { + return new TextDecoder().decode(b); +} +//# sourceMappingURL=bytes.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/node_modules/multiformats/dist/src/vendor/base-x.js +/* eslint-disable */ +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +/** + * @param {string} ALPHABET + * @param {any} name + */ +function base(ALPHABET, name) { + if (ALPHABET.length >= 255) { + throw new TypeError('Alphabet too long'); + } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { + throw new TypeError(x + ' is ambiguous'); + } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + /** + * @param {any[] | Iterable} source + */ + function encode(source) { + // @ts-ignore + if (source instanceof Uint8Array) + ; + else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } + else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { + throw new TypeError('Expected Uint8Array'); + } + if (source.length === 0) { + return ''; + } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { + str += ALPHABET.charAt(b58[it2]); + } + return str; + } + /** + * @param {string | string[]} source + */ + function decodeUnsafe(source) { + if (typeof source !== 'string') { + throw new TypeError('Expected String'); + } + if (source.length === 0) { + return new Uint8Array(); + } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { + return; + } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { + return; + } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { + return; + } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch; + } + /** + * @param {string | string[]} string + */ + function decode(string) { + var buffer = decodeUnsafe(string); + if (buffer) { + return buffer; + } + throw new Error(`Non-${name} character`); + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + }; +} +var src = base; +var _brrp__multiformats_scope_baseX = src; +/* harmony default export */ const base_x = (_brrp__multiformats_scope_baseX); +//# sourceMappingURL=base-x.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/node_modules/multiformats/dist/src/bases/base.js + + +/** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + */ +class Encoder { + name; + prefix; + baseEncode; + constructor(name, prefix, baseEncode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + } + encode(bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}`; + } + else { + throw Error('Unknown type, must be binary type'); + } + } +} +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + */ +class Decoder { + name; + prefix; + baseDecode; + prefixCodePoint; + constructor(name, prefix, baseDecode) { + this.name = name; + this.prefix = prefix; + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character'); + } + this.prefixCodePoint = prefix.codePointAt(0); + this.baseDecode = baseDecode; + } + decode(text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`); + } + return this.baseDecode(text.slice(this.prefix.length)); + } + else { + throw Error('Can only multibase decode strings'); + } + } + or(decoder) { + return or(this, decoder); + } +} +class ComposedDecoder { + decoders; + constructor(decoders) { + this.decoders = decoders; + } + or(decoder) { + return or(this, decoder); + } + decode(input) { + const prefix = input[0]; + const decoder = this.decoders[prefix]; + if (decoder != null) { + return decoder.decode(input); + } + else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`); + } + } +} +function or(left, right) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return new ComposedDecoder({ + ...(left.decoders ?? { [left.prefix]: left }), + ...(right.decoders ?? { [right.prefix]: right }) + }); +} +class Codec { + name; + prefix; + baseEncode; + baseDecode; + encoder; + decoder; + constructor(name, prefix, baseEncode, baseDecode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + this.baseDecode = baseDecode; + this.encoder = new Encoder(name, prefix, baseEncode); + this.decoder = new Decoder(name, prefix, baseDecode); + } + encode(input) { + return this.encoder.encode(input); + } + decode(input) { + return this.decoder.decode(input); + } +} +function from({ name, prefix, encode, decode }) { + return new Codec(name, prefix, encode, decode); +} +function baseX({ name, prefix, alphabet }) { + const { encode, decode } = base_x(alphabet, name); + return from({ + prefix, + name, + encode, + decode: (text) => bytes_coerce(decode(text)) + }); +} +function decode(string, alphabet, bitsPerChar, name) { + // Build the character lookup table: + const codes = {}; + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i; + } + // Count the padding bytes: + let end = string.length; + while (string[end - 1] === '=') { + --end; + } + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0); + // Parse the data: + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + let written = 0; // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]]; + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`); + } + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value; + bits += bitsPerChar; + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8; + out[written++] = 0xff & (buffer >> bits); + } + } + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || (0xff & (buffer << (8 - bits))) !== 0) { + throw new SyntaxError('Unexpected end of data'); + } + return out; +} +function encode(data, alphabet, bitsPerChar) { + const pad = alphabet[alphabet.length - 1] === '='; + const mask = (1 << bitsPerChar) - 1; + let out = ''; + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i]; + bits += 8; + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar; + out += alphabet[mask & (buffer >> bits)]; + } + } + // Partial character: + if (bits !== 0) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))]; + } + // Add padding characters until we hit a byte boundary: + if (pad) { + while (((out.length * bitsPerChar) & 7) !== 0) { + out += '='; + } + } + return out; +} +/** + * RFC4648 Factory + */ +function rfc4648({ name, prefix, bitsPerChar, alphabet }) { + return from({ + prefix, + name, + encode(input) { + return encode(input, alphabet, bitsPerChar); + }, + decode(input) { + return decode(input, alphabet, bitsPerChar, name); + } + }); +} +//# sourceMappingURL=base.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/node_modules/multiformats/dist/src/bases/base32.js + +const base32_base32 = rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}); +const base32_base32upper = rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}); +const base32pad = rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}); +const base32padupper = rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}); +const base32hex = rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}); +const base32hexupper = rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}); +const base32hexpad = rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}); +const base32hexpadupper = rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}); +const base32z = rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}); +//# sourceMappingURL=base32.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/node_modules/multiformats/dist/src/bases/base58.js + +const base58_base58btc = baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}); +const base58flickr = baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}); +//# sourceMappingURL=base58.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/node_modules/multiformats/dist/src/vendor/varint.js +/* eslint-disable */ +var encode_1 = varint_encode; +var MSB = 0x80, REST = 0x7F, MSBALL = ~REST, INT = Math.pow(2, 31); +/** + * @param {number} num + * @param {number[]} out + * @param {number} offset + */ +function varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while (num >= INT) { + out[offset++] = (num & 0xFF) | MSB; + num /= 128; + } + while (num & MSBALL) { + out[offset++] = (num & 0xFF) | MSB; + num >>>= 7; + } + out[offset] = num | 0; + // @ts-ignore + varint_encode.bytes = offset - oldOffset + 1; + return out; +} +var varint_decode = read; +var MSB$1 = 0x80, REST$1 = 0x7F; +/** + * @param {string | any[]} buf + * @param {number} offset + */ +function read(buf, offset) { + var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + do { + if (counter >= l) { + // @ts-ignore + read.bytes = 0; + throw new RangeError('Could not decode varint'); + } + b = buf[counter++]; + res += shift < 28 + ? (b & REST$1) << shift + : (b & REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= MSB$1); + // @ts-ignore + read.bytes = counter - offset; + return res; +} +var N1 = Math.pow(2, 7); +var N2 = Math.pow(2, 14); +var N3 = Math.pow(2, 21); +var N4 = Math.pow(2, 28); +var N5 = Math.pow(2, 35); +var N6 = Math.pow(2, 42); +var N7 = Math.pow(2, 49); +var N8 = Math.pow(2, 56); +var N9 = Math.pow(2, 63); +var varint_length = function (/** @type {number} */ value) { + return (value < N1 ? 1 + : value < N2 ? 2 + : value < N3 ? 3 + : value < N4 ? 4 + : value < N5 ? 5 + : value < N6 ? 6 + : value < N7 ? 7 + : value < N8 ? 8 + : value < N9 ? 9 + : 10); +}; +var varint_varint = { + encode: encode_1, + decode: varint_decode, + encodingLength: varint_length +}; +var _brrp_varint = varint_varint; +/* harmony default export */ const vendor_varint = (_brrp_varint); +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/node_modules/multiformats/dist/src/varint.js + +function src_varint_decode(data, offset = 0) { + const code = vendor_varint.decode(data, offset); + return [code, vendor_varint.decode.bytes]; +} +function encodeTo(int, target, offset = 0) { + vendor_varint.encode(int, target, offset); + return target; +} +function encodingLength(int) { + return vendor_varint.encodingLength(int); +} +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/node_modules/multiformats/dist/src/hashes/digest.js + + +/** + * Creates a multihash digest. + */ +function digest_create(code, digest) { + const size = digest.byteLength; + const sizeOffset = encodingLength(code); + const digestOffset = sizeOffset + encodingLength(size); + const bytes = new Uint8Array(digestOffset + size); + encodeTo(code, bytes, 0); + encodeTo(size, bytes, sizeOffset); + bytes.set(digest, digestOffset); + return new digest_Digest(code, size, digest, bytes); +} +/** + * Turns bytes representation of multihash digest into an instance. + */ +function digest_decode(multihash) { + const bytes = bytes_coerce(multihash); + const [code, sizeOffset] = src_varint_decode(bytes); + const [size, digestOffset] = src_varint_decode(bytes.subarray(sizeOffset)); + const digest = bytes.subarray(sizeOffset + digestOffset); + if (digest.byteLength !== size) { + throw new Error('Incorrect length'); + } + return new digest_Digest(code, size, digest, bytes); +} +function digest_equals(a, b) { + if (a === b) { + return true; + } + else { + const data = b; + return (a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + equals(a.bytes, data.bytes)); + } +} +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + */ +class digest_Digest { + code; + size; + digest; + bytes; + /** + * Creates a multihash digest. + */ + constructor(code, size, digest, bytes) { + this.code = code; + this.size = size; + this.digest = digest; + this.bytes = bytes; + } +} +//# sourceMappingURL=digest.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/node_modules/multiformats/dist/src/cid.js + + + + + +// This way TS will also expose all the types from module + +function format(link, base) { + const { bytes, version } = link; + switch (version) { + case 0: + return toStringV0(bytes, baseCache(link), base ?? base58_base58btc.encoder); + default: + return toStringV1(bytes, baseCache(link), (base ?? base32_base32.encoder)); + } +} +function toJSON(link) { + return { + '/': format(link) + }; +} +function fromJSON(json) { + return cid_CID.parse(json['/']); +} +const cache = new WeakMap(); +function baseCache(cid) { + const baseCache = cache.get(cid); + if (baseCache == null) { + const baseCache = new Map(); + cache.set(cid, baseCache); + return baseCache; + } + return baseCache; +} +class cid_CID { + code; + version; + multihash; + bytes; + '/'; + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param multihash - (Multi)hash of the of the content. + */ + constructor(version, code, multihash, bytes) { + this.code = code; + this.version = version; + this.multihash = multihash; + this.bytes = bytes; + // flag to serializers that this is a CID and + // should be treated specially + this['/'] = bytes; + } + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID() { + return this; + } + // ArrayBufferView + get byteOffset() { + return this.bytes.byteOffset; + } + // ArrayBufferView + get byteLength() { + return this.bytes.byteLength; + } + toV0() { + switch (this.version) { + case 0: { + return this; + } + case 1: { + const { code, multihash } = this; + if (code !== DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0'); + } + // sha2-256 + if (multihash.code !== SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0'); + } + return (cid_CID.createV0(multihash)); + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`); + } + } + } + toV1() { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash; + const multihash = digest_create(code, digest); + return (cid_CID.createV1(this.code, multihash)); + } + case 1: { + return this; + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`); + } + } + } + equals(other) { + return cid_CID.equals(this, other); + } + static equals(self, other) { + const unknown = other; + return (unknown != null && + self.code === unknown.code && + self.version === unknown.version && + digest_equals(self.multihash, unknown.multihash)); + } + toString(base) { + return format(this, base); + } + toJSON() { + return { '/': format(this) }; + } + link() { + return this; + } + [Symbol.toStringTag] = 'CID'; + // Legacy + [Symbol.for('nodejs.util.inspect.custom')]() { + return `CID(${this.toString()})`; + } + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + */ + static asCID(input) { + if (input == null) { + return null; + } + const value = input; + if (value instanceof cid_CID) { + // If value is instance of CID then we're all set. + return value; + } + else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value; + return new cid_CID(version, code, multihash, bytes ?? encodeCID(version, code, multihash.bytes)); + } + else if (value[cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value; + const digest = digest_decode(multihash); + return cid_CID.create(version, code, digest); + } + else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null; + } + } + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param digest - (Multi)hash of the of the content. + */ + static create(version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported'); + } + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest'); + } + switch (version) { + case 0: { + if (code !== DAG_PB_CODE) { + throw new Error(`Version 0 CID must use dag-pb (code: ${DAG_PB_CODE}) block encoding`); + } + else { + return new cid_CID(version, code, digest, digest.bytes); + } + } + case 1: { + const bytes = encodeCID(version, code, digest.bytes); + return new cid_CID(version, code, digest, bytes); + } + default: { + throw new Error('Invalid version'); + } + } + } + /** + * Simplified version of `create` for CIDv0. + */ + static createV0(digest) { + return cid_CID.create(0, DAG_PB_CODE, digest); + } + /** + * Simplified version of `create` for CIDv1. + * + * @param code - Content encoding format code. + * @param digest - Multihash of the content. + */ + static createV1(code, digest) { + return cid_CID.create(1, code, digest); + } + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + */ + static decode(bytes) { + const [cid, remainder] = cid_CID.decodeFirst(bytes); + if (remainder.length !== 0) { + throw new Error('Incorrect length'); + } + return cid; + } + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + */ + static decodeFirst(bytes) { + const specs = cid_CID.inspectBytes(bytes); + const prefixSize = specs.size - specs.multihashSize; + const multihashBytes = bytes_coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize)); + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length'); + } + const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize); + const digest = new digest_Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes); + const cid = specs.version === 0 + ? cid_CID.createV0(digest) + : cid_CID.createV1(specs.codec, digest); + return [cid, bytes.subarray(specs.size)]; + } + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + */ + static inspectBytes(initialBytes) { + let offset = 0; + const next = () => { + const [i, length] = src_varint_decode(initialBytes.subarray(offset)); + offset += length; + return i; + }; + let version = next(); + let codec = DAG_PB_CODE; + if (version === 18) { + // CIDv0 + version = 0; + offset = 0; + } + else { + codec = next(); + } + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`); + } + const prefixSize = offset; + const multihashCode = next(); // multihash code + const digestSize = next(); // multihash length + const size = offset + digestSize; + const multihashSize = size - prefixSize; + return { version, codec, multihashCode, digestSize, multihashSize, size }; + } + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + */ + static parse(source, base) { + const [prefix, bytes] = parseCIDtoBytes(source, base); + const cid = cid_CID.decode(bytes); + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix'); + } + // Cache string representation to avoid computing it on `this.toString()` + baseCache(cid).set(prefix, source); + return cid; + } +} +function parseCIDtoBytes(source, base) { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base ?? base58_base58btc; + return [ + base58_base58btc.prefix, + decoder.decode(`${base58_base58btc.prefix}${source}`) + ]; + } + case base58_base58btc.prefix: { + const decoder = base ?? base58_base58btc; + return [base58_base58btc.prefix, decoder.decode(source)]; + } + case base32_base32.prefix: { + const decoder = base ?? base32_base32; + return [base32_base32.prefix, decoder.decode(source)]; + } + default: { + if (base == null) { + throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided'); + } + return [source[0], base.decode(source)]; + } + } +} +function toStringV0(bytes, cache, base) { + const { prefix } = base; + if (prefix !== base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`); + } + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes).slice(1); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +function toStringV1(bytes, cache, base) { + const { prefix } = base; + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +const DAG_PB_CODE = 0x70; +const SHA_256_CODE = 0x12; +function encodeCID(version, code, multihash) { + const codeOffset = encodingLength(version); + const hashOffset = codeOffset + encodingLength(code); + const bytes = new Uint8Array(hashOffset + multihash.byteLength); + encodeTo(version, bytes, 0); + encodeTo(code, bytes, codeOffset); + bytes.set(multihash, hashOffset); + return bytes; +} +const cidSymbol = Symbol.for('@ipld/js-cid/CID'); +//# sourceMappingURL=cid.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/src/pb-decode.js +const textDecoder = new TextDecoder() + +/** + * @typedef {import('./interface.js').RawPBLink} RawPBLink + */ + +/** + * @typedef {import('./interface.js').RawPBNode} RawPBNode + */ + +/** + * @param {Uint8Array} bytes + * @param {number} offset + * @returns {[number, number]} + */ +function pb_decode_decodeVarint (bytes, offset) { + let v = 0 + + for (let shift = 0; ; shift += 7) { + /* c8 ignore next 3 */ + if (shift >= 64) { + throw new Error('protobuf: varint overflow') + } + /* c8 ignore next 3 */ + if (offset >= bytes.length) { + throw new Error('protobuf: unexpected end of data') + } + + const b = bytes[offset++] + v += shift < 28 ? (b & 0x7f) << shift : (b & 0x7f) * (2 ** shift) + if (b < 0x80) { + break + } } - if (typeof mode === 'number') { - return mode & 4095; + return [v, offset] +} + +/** + * @param {Uint8Array} bytes + * @param {number} offset + * @returns {[Uint8Array, number]} + */ +function decodeBytes (bytes, offset) { + let byteLen + ;[byteLen, offset] = pb_decode_decodeVarint(bytes, offset) + const postOffset = offset + byteLen + + /* c8 ignore next 3 */ + if (byteLen < 0 || postOffset < 0) { + throw new Error('protobuf: invalid length') + } + /* c8 ignore next 3 */ + if (postOffset > bytes.length) { + throw new Error('protobuf: unexpected end of data') + } + + return [bytes.subarray(offset, postOffset), postOffset] +} + +/** + * @param {Uint8Array} bytes + * @param {number} index + * @returns {[number, number, number]} + */ +function decodeKey (bytes, index) { + let wire + ;[wire, index] = pb_decode_decodeVarint(bytes, index) + // [wireType, fieldNum, newIndex] + return [wire & 0x7, wire >> 3, index] +} + +/** + * @param {Uint8Array} bytes + * @returns {RawPBLink} + */ +function decodeLink (bytes) { + /** @type {RawPBLink} */ + const link = {} + const l = bytes.length + let index = 0 + + while (index < l) { + let wireType, fieldNum + ;[wireType, fieldNum, index] = decodeKey(bytes, index) + + if (fieldNum === 1) { + if (link.Hash) { + throw new Error('protobuf: (PBLink) duplicate Hash section') + } + if (wireType !== 2) { + throw new Error(`protobuf: (PBLink) wrong wireType (${wireType}) for Hash`) + } + if (link.Name !== undefined) { + throw new Error('protobuf: (PBLink) invalid order, found Name before Hash') + } + if (link.Tsize !== undefined) { + throw new Error('protobuf: (PBLink) invalid order, found Tsize before Hash') + } + + [link.Hash, index] = decodeBytes(bytes, index) + } else if (fieldNum === 2) { + if (link.Name !== undefined) { + throw new Error('protobuf: (PBLink) duplicate Name section') + } + if (wireType !== 2) { + throw new Error(`protobuf: (PBLink) wrong wireType (${wireType}) for Name`) + } + if (link.Tsize !== undefined) { + throw new Error('protobuf: (PBLink) invalid order, found Tsize before Name') + } + + let byts + ;[byts, index] = decodeBytes(bytes, index) + link.Name = textDecoder.decode(byts) + } else if (fieldNum === 3) { + if (link.Tsize !== undefined) { + throw new Error('protobuf: (PBLink) duplicate Tsize section') + } + if (wireType !== 0) { + throw new Error(`protobuf: (PBLink) wrong wireType (${wireType}) for Tsize`) + } + + [link.Tsize, index] = pb_decode_decodeVarint(bytes, index) + } else { + throw new Error(`protobuf: (PBLink) invalid fieldNumber, expected 1, 2 or 3, got ${fieldNum}`) + } + } + + /* c8 ignore next 3 */ + if (index > l) { + throw new Error('protobuf: (PBLink) unexpected end of data') + } + + return link +} + +/** + * @param {Uint8Array} bytes + * @returns {RawPBNode} + */ +function decodeNode (bytes) { + const l = bytes.length + let index = 0 + /** @type {RawPBLink[]|void} */ + let links = undefined // eslint-disable-line no-undef-init + let linksBeforeData = false + /** @type {Uint8Array|void} */ + let data = undefined // eslint-disable-line no-undef-init + + while (index < l) { + let wireType, fieldNum + ;[wireType, fieldNum, index] = decodeKey(bytes, index) + + if (wireType !== 2) { + throw new Error(`protobuf: (PBNode) invalid wireType, expected 2, got ${wireType}`) + } + + if (fieldNum === 1) { + if (data) { + throw new Error('protobuf: (PBNode) duplicate Data section') + } + + [data, index] = decodeBytes(bytes, index) + if (links) { + linksBeforeData = true + } + } else if (fieldNum === 2) { + if (linksBeforeData) { // interleaved Links/Data/Links + throw new Error('protobuf: (PBNode) duplicate Links section') + } else if (!links) { + links = [] + } + let byts + ;[byts, index] = decodeBytes(bytes, index) + links.push(decodeLink(byts)) + } else { + throw new Error(`protobuf: (PBNode) invalid fieldNumber, expected 1 or 2, got ${fieldNum}`) + } + } + + /* c8 ignore next 3 */ + if (index > l) { + throw new Error('protobuf: (PBNode) unexpected end of data') + } + + /** @type {RawPBNode} */ + const node = {} + if (data) { + node.Data = data + } + node.Links = links || [] + return node +} + +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/src/pb-encode.js +const textEncoder = new TextEncoder() +const maxInt32 = 2 ** 32 +const maxUInt32 = 2 ** 31 + +/** + * @typedef {import('./interface.js').RawPBLink} RawPBLink + */ + +/** + * @typedef {import('./interface.js').RawPBNode} RawPBNode + */ + +// the encoders work backward from the end of the bytes array + +/** + * encodeLink() is passed a slice of the parent byte array that ends where this + * link needs to end, so it packs to the right-most part of the passed `bytes` + * + * @param {RawPBLink} link + * @param {Uint8Array} bytes + * @returns {number} + */ +function encodeLink (link, bytes) { + let i = bytes.length + + if (typeof link.Tsize === 'number') { + if (link.Tsize < 0) { + throw new Error('Tsize cannot be negative') + } + if (!Number.isSafeInteger(link.Tsize)) { + throw new Error('Tsize too large for encoding') + } + i = encodeVarint(bytes, i, link.Tsize) - 1 + bytes[i] = 0x18 + } + + if (typeof link.Name === 'string') { + const nameBytes = textEncoder.encode(link.Name) + i -= nameBytes.length + bytes.set(nameBytes, i) + i = encodeVarint(bytes, i, nameBytes.length) - 1 + bytes[i] = 0x12 + } + + if (link.Hash) { + i -= link.Hash.length + bytes.set(link.Hash, i) + i = encodeVarint(bytes, i, link.Hash.length) - 1 + bytes[i] = 0xa + } + + return bytes.length - i +} + +/** + * Encodes a PBNode into a new byte array of precisely the correct size + * + * @param {RawPBNode} node + * @returns {Uint8Array} + */ +function encodeNode (node) { + const size = sizeNode(node) + const bytes = new Uint8Array(size) + let i = size + + if (node.Data) { + i -= node.Data.length + bytes.set(node.Data, i) + i = encodeVarint(bytes, i, node.Data.length) - 1 + bytes[i] = 0xa + } + + if (node.Links) { + for (let index = node.Links.length - 1; index >= 0; index--) { + const size = encodeLink(node.Links[index], bytes.subarray(0, i)) + i -= size + i = encodeVarint(bytes, i, size) - 1 + bytes[i] = 0x12 + } + } + + return bytes +} + +/** + * work out exactly how many bytes this link takes up + * + * @param {RawPBLink} link + * @returns + */ +function sizeLink (link) { + let n = 0 + + if (link.Hash) { + const l = link.Hash.length + n += 1 + l + sov(l) + } + + if (typeof link.Name === 'string') { + const l = textEncoder.encode(link.Name).length + n += 1 + l + sov(l) + } + + if (typeof link.Tsize === 'number') { + n += 1 + sov(link.Tsize) + } + + return n +} + +/** + * Work out exactly how many bytes this node takes up + * + * @param {RawPBNode} node + * @returns {number} + */ +function sizeNode (node) { + let n = 0 + + if (node.Data) { + const l = node.Data.length + n += 1 + l + sov(l) + } + + if (node.Links) { + for (const link of node.Links) { + const l = sizeLink(link) + n += 1 + l + sov(l) + } + } + + return n +} + +/** + * @param {Uint8Array} bytes + * @param {number} offset + * @param {number} v + * @returns {number} + */ +function encodeVarint (bytes, offset, v) { + offset -= sov(v) + const base = offset + + while (v >= maxUInt32) { + bytes[offset++] = (v & 0x7f) | 0x80 + v /= 128 + } + + while (v >= 128) { + bytes[offset++] = (v & 0x7f) | 0x80 + v >>>= 7 + } + + bytes[offset] = v + + return base +} + +/** + * size of varint + * + * @param {number} x + * @returns {number} + */ +function sov (x) { + if (x % 2 === 0) { + x++ + } + return Math.floor((len64(x) + 6) / 7) +} + +/** + * golang math/bits, how many bits does it take to represent this integer? + * + * @param {number} x + * @returns {number} + */ +function len64 (x) { + let n = 0 + if (x >= maxInt32) { + x = Math.floor(x / maxInt32) + n = 32 + } + if (x >= (1 << 16)) { + x >>>= 16 + n += 16 + } + if (x >= (1 << 8)) { + x >>>= 8 + n += 8 + } + return n + len8tab[x] +} + +// golang math/bits +const len8tab = [ + 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 +] + +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/src/util.js + + +/** + * @typedef {import('./interface.js').PBLink} PBLink + * @typedef {import('./interface.js').PBNode} PBNode + */ + +const pbNodeProperties = ['Data', 'Links'] +const pbLinkProperties = ['Hash', 'Name', 'Tsize'] + +const util_textEncoder = new TextEncoder() + +/** + * @param {PBLink} a + * @param {PBLink} b + * @returns {number} + */ +function linkComparator (a, b) { + if (a === b) { + return 0 + } + + const abuf = a.Name ? util_textEncoder.encode(a.Name) : [] + const bbuf = b.Name ? util_textEncoder.encode(b.Name) : [] + + let x = abuf.length + let y = bbuf.length + + for (let i = 0, len = Math.min(x, y); i < len; ++i) { + if (abuf[i] !== bbuf[i]) { + x = abuf[i] + y = bbuf[i] + break + } + } + + return x < y ? -1 : y < x ? 1 : 0 +} + +/** + * @param {any} node + * @param {string[]} properties + * @returns {boolean} + */ +function hasOnlyProperties (node, properties) { + return !Object.keys(node).some((p) => !properties.includes(p)) +} + +/** + * Converts a CID, or a PBLink-like object to a PBLink + * + * @param {any} link + * @returns {PBLink} + */ +function asLink (link) { + if (typeof link.asCID === 'object') { + const Hash = cid_CID.asCID(link) + if (!Hash) { + throw new TypeError('Invalid DAG-PB form') + } + return { Hash } + } + + if (typeof link !== 'object' || Array.isArray(link)) { + throw new TypeError('Invalid DAG-PB form') + } + + const pbl = {} + + if (link.Hash) { + let cid = cid_CID.asCID(link.Hash) + try { + if (!cid) { + if (typeof link.Hash === 'string') { + cid = cid_CID.parse(link.Hash) + } else if (link.Hash instanceof Uint8Array) { + cid = cid_CID.decode(link.Hash) + } + } + } catch (/** @type {any} */ e) { + throw new TypeError(`Invalid DAG-PB form: ${e.message}`) + } + + if (cid) { + pbl.Hash = cid + } + } + + if (!pbl.Hash) { + throw new TypeError('Invalid DAG-PB form') + } + + if (typeof link.Name === 'string') { + pbl.Name = link.Name + } + + if (typeof link.Tsize === 'number') { + pbl.Tsize = link.Tsize + } + + return pbl +} + +/** + * @param {any} node + * @returns {PBNode} + */ +function prepare (node) { + if (node instanceof Uint8Array || typeof node === 'string') { + node = { Data: node } + } + + if (typeof node !== 'object' || Array.isArray(node)) { + throw new TypeError('Invalid DAG-PB form') + } + + /** @type {PBNode} */ + const pbn = {} + + if (node.Data !== undefined) { + if (typeof node.Data === 'string') { + pbn.Data = util_textEncoder.encode(node.Data) + } else if (node.Data instanceof Uint8Array) { + pbn.Data = node.Data + } else { + throw new TypeError('Invalid DAG-PB form') + } + } + + if (node.Links !== undefined) { + if (Array.isArray(node.Links)) { + pbn.Links = node.Links.map(asLink) + pbn.Links.sort(linkComparator) + } else { + throw new TypeError('Invalid DAG-PB form') + } + } else { + pbn.Links = [] + } + + return pbn +} + +/** + * @param {PBNode} node + */ +function validate (node) { + /* + type PBLink struct { + Hash optional Link + Name optional String + Tsize optional Int + } + + type PBNode struct { + Links [PBLink] + Data optional Bytes + } + */ + // @ts-ignore private property for TS + if (!node || typeof node !== 'object' || Array.isArray(node) || node instanceof Uint8Array || (node['/'] && node['/'] === node.bytes)) { + throw new TypeError('Invalid DAG-PB form') + } + + if (!hasOnlyProperties(node, pbNodeProperties)) { + throw new TypeError('Invalid DAG-PB form (extraneous properties)') + } + + if (node.Data !== undefined && !(node.Data instanceof Uint8Array)) { + throw new TypeError('Invalid DAG-PB form (Data must be bytes)') + } + + if (!Array.isArray(node.Links)) { + throw new TypeError('Invalid DAG-PB form (Links must be a list)') + } + + for (let i = 0; i < node.Links.length; i++) { + const link = node.Links[i] + // @ts-ignore private property for TS + if (!link || typeof link !== 'object' || Array.isArray(link) || link instanceof Uint8Array || (link['/'] && link['/'] === link.bytes)) { + throw new TypeError('Invalid DAG-PB form (bad link)') + } + + if (!hasOnlyProperties(link, pbLinkProperties)) { + throw new TypeError('Invalid DAG-PB form (extraneous properties on link)') + } + + if (link.Hash === undefined) { + throw new TypeError('Invalid DAG-PB form (link must have a Hash)') + } + + // @ts-ignore private property for TS + if (link.Hash == null || !link.Hash['/'] || link.Hash['/'] !== link.Hash.bytes) { + throw new TypeError('Invalid DAG-PB form (link Hash must be a CID)') + } + + if (link.Name !== undefined && typeof link.Name !== 'string') { + throw new TypeError('Invalid DAG-PB form (link Name must be a string)') + } + + if (link.Tsize !== undefined) { + if (typeof link.Tsize !== 'number' || link.Tsize % 1 !== 0) { + throw new TypeError('Invalid DAG-PB form (link Tsize must be an integer)') + } + if (link.Tsize < 0) { + throw new TypeError('Invalid DAG-PB form (link Tsize cannot be negative)') + } + } + + if (i > 0 && linkComparator(link, node.Links[i - 1]) === -1) { + throw new TypeError('Invalid DAG-PB form (links must be sorted by Name bytes)') + } + } +} + +/** + * @param {Uint8Array} data + * @param {PBLink[]} [links=[]] + * @returns {PBNode} + */ +function createNode (data, links = []) { + return prepare({ Data: data, Links: links }) +} + +/** + * @param {string} name + * @param {number} size + * @param {CID} cid + * @returns {PBLink} + */ +function createLink (name, size, cid) { + return asLink({ Hash: cid, Name: name, Tsize: size }) +} + +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-pb/src/index.js + + + + + +/** + * @template T + * @typedef {import('multiformats/codecs/interface').ByteView} ByteView + */ + +/** + * @typedef {import('./interface.js').PBLink} PBLink + * @typedef {import('./interface.js').PBNode} PBNode + */ + +const src_name = 'dag-pb' +const code = 0x70 + +/** + * @param {PBNode} node + * @returns {ByteView} + */ +function src_encode (node) { + validate(node) + + const pbn = {} + if (node.Links) { + pbn.Links = node.Links.map((l) => { + const link = {} + if (l.Hash) { + link.Hash = l.Hash.bytes // cid -> bytes + } + if (l.Name !== undefined) { + link.Name = l.Name + } + if (l.Tsize !== undefined) { + link.Tsize = l.Tsize + } + return link + }) + } + if (node.Data) { + pbn.Data = node.Data + } + + return encodeNode(pbn) +} + +/** + * @param {ByteView} bytes + * @returns {PBNode} + */ +function src_decode (bytes) { + const pbn = decodeNode(bytes) + + const node = {} + + if (pbn.Data) { + node.Data = pbn.Data + } + + if (pbn.Links) { + node.Links = pbn.Links.map((l) => { + const link = {} + try { + link.Hash = cid_CID.decode(l.Hash) + } catch (e) {} + if (!link.Hash) { + throw new Error('Invalid Hash field found in link, expected CID') + } + if (l.Name !== undefined) { + link.Name = l.Name + } + if (l.Tsize !== undefined) { + link.Tsize = l.Tsize + } + return link + }) + } + + return node +} + + + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/is.js +// This is an unfortunate replacement for @sindresorhus/is that we need to +// re-implement for performance purposes. In particular the is.observable() +// check is expensive, and unnecessary for our purposes. The values returned +// are compatible with @sindresorhus/is, however. + +const typeofs = [ + 'string', + 'number', + 'bigint', + 'symbol' +] + +const objectTypeNames = [ + 'Function', + 'Generator', + 'AsyncGenerator', + 'GeneratorFunction', + 'AsyncGeneratorFunction', + 'AsyncFunction', + 'Observable', + 'Array', + 'Buffer', + 'Object', + 'RegExp', + 'Date', + 'Error', + 'Map', + 'Set', + 'WeakMap', + 'WeakSet', + 'ArrayBuffer', + 'SharedArrayBuffer', + 'DataView', + 'Promise', + 'URL', + 'HTMLElement', + 'Int8Array', + 'Uint8Array', + 'Uint8ClampedArray', + 'Int16Array', + 'Uint16Array', + 'Int32Array', + 'Uint32Array', + 'Float32Array', + 'Float64Array', + 'BigInt64Array', + 'BigUint64Array' +] + +/** + * @param {any} value + * @returns {string} + */ +function is (value) { + if (value === null) { + return 'null' + } + if (value === undefined) { + return 'undefined' + } + if (value === true || value === false) { + return 'boolean' + } + const typeOf = typeof value + if (typeofs.includes(typeOf)) { + return typeOf + } + /* c8 ignore next 4 */ + // not going to bother testing this, it's not going to be valid anyway + if (typeOf === 'function') { + return 'Function' + } + if (Array.isArray(value)) { + return 'Array' + } + if (isBuffer(value)) { + return 'Buffer' + } + const objectType = getObjectType(value) + if (objectType) { + return objectType + } + /* c8 ignore next */ + return 'Object' +} + +/** + * @param {any} value + * @returns {boolean} + */ +function isBuffer (value) { + return value && value.constructor && value.constructor.isBuffer && value.constructor.isBuffer.call(null, value) +} + +/** + * @param {any} value + * @returns {string|undefined} + */ +function getObjectType (value) { + const objectTypeName = Object.prototype.toString.call(value).slice(8, -1) + if (objectTypeNames.includes(objectTypeName)) { + return objectTypeName + } + /* c8 ignore next */ + return undefined +} + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/token.js +class token_Type { + /** + * @param {number} major + * @param {string} name + * @param {boolean} terminal + */ + constructor (major, name, terminal) { + this.major = major + this.majorEncoded = major << 5 + this.name = name + this.terminal = terminal + } + + /* c8 ignore next 3 */ + toString () { + return `Type[${this.major}].${this.name}` + } + + /** + * @param {Type} typ + * @returns {number} + */ + compare (typ) { + /* c8 ignore next 1 */ + return this.major < typ.major ? -1 : this.major > typ.major ? 1 : 0 + } +} + +// convert to static fields when better supported +token_Type.uint = new token_Type(0, 'uint', true) +token_Type.negint = new token_Type(1, 'negint', true) +token_Type.bytes = new token_Type(2, 'bytes', true) +token_Type.string = new token_Type(3, 'string', true) +token_Type.array = new token_Type(4, 'array', false) +token_Type.map = new token_Type(5, 'map', false) +token_Type.tag = new token_Type(6, 'tag', false) // terminal? +token_Type.float = new token_Type(7, 'float', true) +token_Type.false = new token_Type(7, 'false', true) +token_Type.true = new token_Type(7, 'true', true) +token_Type.null = new token_Type(7, 'null', true) +token_Type.undefined = new token_Type(7, 'undefined', true) +token_Type.break = new token_Type(7, 'break', true) +// Type.indefiniteLength = new Type(0, 'indefiniteLength', true) + +class token_Token { + /** + * @param {Type} type + * @param {any} [value] + * @param {number} [encodedLength] + */ + constructor (type, value, encodedLength) { + this.type = type + this.value = value + this.encodedLength = encodedLength + /** @type {Uint8Array|undefined} */ + this.encodedBytes = undefined + /** @type {Uint8Array|undefined} */ + this.byteValue = undefined + } + + /* c8 ignore next 3 */ + toString () { + return `Token[${this.type}].${this.value}` + } +} + + + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/byte-utils.js +// Use Uint8Array directly in the browser, use Buffer in Node.js but don't +// speak its name directly to avoid bundlers pulling in the `Buffer` polyfill + +// @ts-ignore +const useBuffer = globalThis.process && + // @ts-ignore + !globalThis.process.browser && + // @ts-ignore + globalThis.Buffer && + // @ts-ignore + typeof globalThis.Buffer.isBuffer === 'function' + +const byte_utils_textDecoder = new TextDecoder() +const byte_utils_textEncoder = new TextEncoder() + +/** + * @param {Uint8Array} buf + * @returns {boolean} + */ +function byte_utils_isBuffer (buf) { + // @ts-ignore + return useBuffer && globalThis.Buffer.isBuffer(buf) +} + +/** + * @param {Uint8Array|number[]} buf + * @returns {Uint8Array} + */ +function asU8A (buf) { + /* c8 ignore next */ + if (!(buf instanceof Uint8Array)) { + return Uint8Array.from(buf) + } + return byte_utils_isBuffer(buf) ? new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength) : buf +} + +const byte_utils_toString = useBuffer + ? // eslint-disable-line operator-linebreak + /** + * @param {Uint8Array} bytes + * @param {number} start + * @param {number} end + */ + (bytes, start, end) => { + return end - start > 64 + ? // eslint-disable-line operator-linebreak + // @ts-ignore + globalThis.Buffer.from(bytes.subarray(start, end)).toString('utf8') + : utf8Slice(bytes, start, end) + } + /* c8 ignore next 11 */ + : // eslint-disable-line operator-linebreak + /** + * @param {Uint8Array} bytes + * @param {number} start + * @param {number} end + */ + (bytes, start, end) => { + return end - start > 64 + ? byte_utils_textDecoder.decode(bytes.subarray(start, end)) + : utf8Slice(bytes, start, end) + } + +const byte_utils_fromString = useBuffer + ? // eslint-disable-line operator-linebreak + /** + * @param {string} string + */ + (string) => { + return string.length > 64 + ? // eslint-disable-line operator-linebreak + // @ts-ignore + globalThis.Buffer.from(string) + : utf8ToBytes(string) + } + /* c8 ignore next 7 */ + : // eslint-disable-line operator-linebreak + /** + * @param {string} string + */ + (string) => { + return string.length > 64 ? byte_utils_textEncoder.encode(string) : utf8ToBytes(string) + } + +/** + * Buffer variant not fast enough for what we need + * @param {number[]} arr + * @returns {Uint8Array} + */ +const fromArray = (arr) => { + return Uint8Array.from(arr) +} + +const slice = useBuffer + ? // eslint-disable-line operator-linebreak + /** + * @param {Uint8Array} bytes + * @param {number} start + * @param {number} end + */ + (bytes, start, end) => { + if (byte_utils_isBuffer(bytes)) { + return new Uint8Array(bytes.subarray(start, end)) + } + return bytes.slice(start, end) + } + /* c8 ignore next 9 */ + : // eslint-disable-line operator-linebreak + /** + * @param {Uint8Array} bytes + * @param {number} start + * @param {number} end + */ + (bytes, start, end) => { + return bytes.slice(start, end) + } + +const concat = useBuffer + ? // eslint-disable-line operator-linebreak + /** + * @param {Uint8Array[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ + (chunks, length) => { + // might get a stray plain Array here + /* c8 ignore next 1 */ + chunks = chunks.map((c) => c instanceof Uint8Array + ? c + // this case is occasionally missed during test runs so becomes coverage-flaky + /* c8 ignore next 4 */ + : // eslint-disable-line operator-linebreak + // @ts-ignore + globalThis.Buffer.from(c)) + // @ts-ignore + return asU8A(globalThis.Buffer.concat(chunks, length)) + } + /* c8 ignore next 19 */ + : // eslint-disable-line operator-linebreak + /** + * @param {Uint8Array[]} chunks + * @param {number} length + * @returns {Uint8Array} + */ + (chunks, length) => { + const out = new Uint8Array(length) + let off = 0 + for (let b of chunks) { + if (off + b.length > out.length) { + // final chunk that's bigger than we need + b = b.subarray(0, out.length - off) + } + out.set(b, off) + off += b.length + } + return out + } + +const alloc = useBuffer + ? // eslint-disable-line operator-linebreak + /** + * @param {number} size + * @returns {Uint8Array} + */ + (size) => { + // we always write over the contents we expose so this should be safe + // @ts-ignore + return globalThis.Buffer.allocUnsafe(size) + } + /* c8 ignore next 8 */ + : // eslint-disable-line operator-linebreak + /** + * @param {number} size + * @returns {Uint8Array} + */ + (size) => { + return new Uint8Array(size) + } + +const byte_utils_toHex = (/* unused pure expression or super */ null && (useBuffer + ? // eslint-disable-line operator-linebreak + /** + * @param {Uint8Array} d + * @returns {string} + */ + (d) => { + if (typeof d === 'string') { + return d + } + // @ts-ignore + return globalThis.Buffer.from(toBytes(d)).toString('hex') + } + /* c8 ignore next 12 */ + : // eslint-disable-line operator-linebreak + /** + * @param {Uint8Array} d + * @returns {string} + */ + (d) => { + if (typeof d === 'string') { + return d + } + // @ts-ignore not smart enough to figure this out + return Array.prototype.reduce.call(toBytes(d), (p, c) => `${p}${c.toString(16).padStart(2, '0')}`, '') + })) + +const byte_utils_fromHex = (/* unused pure expression or super */ null && (useBuffer + ? // eslint-disable-line operator-linebreak + /** + * @param {string|Uint8Array} hex + * @returns {Uint8Array} + */ + (hex) => { + if (hex instanceof Uint8Array) { + return hex + } + // @ts-ignore + return globalThis.Buffer.from(hex, 'hex') + } + /* c8 ignore next 17 */ + : // eslint-disable-line operator-linebreak + /** + * @param {string|Uint8Array} hex + * @returns {Uint8Array} + */ + (hex) => { + if (hex instanceof Uint8Array) { + return hex + } + if (!hex.length) { + return new Uint8Array(0) + } + return new Uint8Array(hex.split('') + .map((/** @type {string} */ c, /** @type {number} */ i, /** @type {string[]} */ d) => i % 2 === 0 ? `0x${c}${d[i + 1]}` : '') + .filter(Boolean) + .map((/** @type {string} */ e) => parseInt(e, 16))) + })) + +/** + * @param {Uint8Array|ArrayBuffer|ArrayBufferView} obj + * @returns {Uint8Array} + */ +function toBytes (obj) { + if (obj instanceof Uint8Array && obj.constructor.name === 'Uint8Array') { + return obj + } + if (obj instanceof ArrayBuffer) { + return new Uint8Array(obj) + } + if (ArrayBuffer.isView(obj)) { + return new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength) + } + /* c8 ignore next */ + throw new Error('Unknown type, must be binary type') +} + +/** + * @param {Uint8Array} b1 + * @param {Uint8Array} b2 + * @returns {number} + */ +function compare (b1, b2) { + /* c8 ignore next 5 */ + if (byte_utils_isBuffer(b1) && byte_utils_isBuffer(b2)) { + // probably not possible to get here in the current API + // @ts-ignore Buffer + return b1.compare(b2) + } + for (let i = 0; i < b1.length; i++) { + if (b1[i] === b2[i]) { + continue + } + return b1[i] < b2[i] ? -1 : 1 + } /* c8 ignore next 3 */ + return 0 +} + +// The below code is taken from https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143 +// Licensed Apache-2.0. + +/** + * @param {string} str + * @returns {number[]} + */ +function utf8ToBytes (str) { + const out = [] + let p = 0 + for (let i = 0; i < str.length; i++) { + let c = str.charCodeAt(i) + if (c < 128) { + out[p++] = c + } else if (c < 2048) { + out[p++] = (c >> 6) | 192 + out[p++] = (c & 63) | 128 + } else if ( + ((c & 0xFC00) === 0xD800) && (i + 1) < str.length && + ((str.charCodeAt(i + 1) & 0xFC00) === 0xDC00)) { + // Surrogate Pair + c = 0x10000 + ((c & 0x03FF) << 10) + (str.charCodeAt(++i) & 0x03FF) + out[p++] = (c >> 18) | 240 + out[p++] = ((c >> 12) & 63) | 128 + out[p++] = ((c >> 6) & 63) | 128 + out[p++] = (c & 63) | 128 + } else { + out[p++] = (c >> 12) | 224 + out[p++] = ((c >> 6) & 63) | 128 + out[p++] = (c & 63) | 128 + } + } + return out +} + +// The below code is mostly taken from https://github.com/feross/buffer +// Licensed MIT. Copyright (c) Feross Aboukhadijeh + +/** + * @param {Uint8Array} buf + * @param {number} offset + * @param {number} end + * @returns {string} + */ +function utf8Slice (buf, offset, end) { + const res = [] + + while (offset < end) { + const firstByte = buf[offset] + let codePoint = null + let bytesPerSequence = (firstByte > 0xef) ? 4 : (firstByte > 0xdf) ? 3 : (firstByte > 0xbf) ? 2 : 1 + + if (offset + bytesPerSequence <= end) { + let secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[offset + 1] + if ((secondByte & 0xc0) === 0x80) { + tempCodePoint = (firstByte & 0x1f) << 0x6 | (secondByte & 0x3f) + if (tempCodePoint > 0x7f) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[offset + 1] + thirdByte = buf[offset + 2] + if ((secondByte & 0xc0) === 0x80 && (thirdByte & 0xc0) === 0x80) { + tempCodePoint = (firstByte & 0xf) << 0xc | (secondByte & 0x3f) << 0x6 | (thirdByte & 0x3f) + /* c8 ignore next 3 */ + if (tempCodePoint > 0x7ff && (tempCodePoint < 0xd800 || tempCodePoint > 0xdfff)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[offset + 1] + thirdByte = buf[offset + 2] + fourthByte = buf[offset + 3] + if ((secondByte & 0xc0) === 0x80 && (thirdByte & 0xc0) === 0x80 && (fourthByte & 0xc0) === 0x80) { + tempCodePoint = (firstByte & 0xf) << 0x12 | (secondByte & 0x3f) << 0xc | (thirdByte & 0x3f) << 0x6 | (fourthByte & 0x3f) + if (tempCodePoint > 0xffff && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + /* c8 ignore next 5 */ + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xfffd + bytesPerSequence = 1 + } else if (codePoint > 0xffff) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3ff | 0xd800) + codePoint = 0xdc00 | codePoint & 0x3ff + } + + res.push(codePoint) + offset += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +const MAX_ARGUMENTS_LENGTH = 0x1000 + +/** + * @param {number[]} codePoints + * @returns {string} + */ +function decodeCodePointsArray (codePoints) { + const len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + /* c8 ignore next 10 */ + // Decode in chunks to avoid "call stack size exceeded". + let res = '' + let i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/bl.js +/** + * Bl is a list of byte chunks, similar to https://github.com/rvagg/bl but for + * writing rather than reading. + * A Bl object accepts set() operations for individual bytes and copyTo() for + * inserting byte arrays. These write operations don't automatically increment + * the internal cursor so its "length" won't be changed. Instead, increment() + * must be called to extend its length to cover the inserted data. + * The toBytes() call will convert all internal memory to a single Uint8Array of + * the correct length, truncating any data that is stored but hasn't been + * included by an increment(). + * get() can retrieve a single byte. + * All operations (except toBytes()) take an "offset" argument that will perform + * the write at the offset _from the current cursor_. For most operations this + * will be `0` to write at the current cursor position but it can be ahead of + * the current cursor. Negative offsets probably work but are untested. + */ + +// TODO: ipjs doesn't support this, only for test files: https://github.com/mikeal/ipjs/blob/master/src/package/testFile.js#L39 + + +// the ts-ignores in this file are almost all for the `Uint8Array|number[]` duality that exists +// for perf reasons. Consider better approaches to this or removing it entirely, it is quite +// risky because of some assumptions about small chunks === number[] and everything else === Uint8Array. + +const defaultChunkSize = 256 + +class Bl { + /** + * @param {number} [chunkSize] + */ + constructor (chunkSize = defaultChunkSize) { + this.chunkSize = chunkSize + /** @type {number} */ + this.cursor = 0 + /** @type {number} */ + this.maxCursor = -1 + /** @type {(Uint8Array|number[])[]} */ + this.chunks = [] + // keep the first chunk around if we can to save allocations for future encodes + /** @type {Uint8Array|number[]|null} */ + this._initReuseChunk = null + } + + reset () { + this.cursor = 0 + this.maxCursor = -1 + if (this.chunks.length) { + this.chunks = [] + } + if (this._initReuseChunk !== null) { + this.chunks.push(this._initReuseChunk) + this.maxCursor = this._initReuseChunk.length - 1 + } + } + + /** + * @param {Uint8Array|number[]} bytes + */ + push (bytes) { + let topChunk = this.chunks[this.chunks.length - 1] + const newMax = this.cursor + bytes.length + if (newMax <= this.maxCursor + 1) { + // we have at least one chunk and we can fit these bytes into that chunk + const chunkPos = topChunk.length - (this.maxCursor - this.cursor) - 1 + // @ts-ignore + topChunk.set(bytes, chunkPos) + } else { + // can't fit it in + if (topChunk) { + // trip the last chunk to `cursor` if we need to + const chunkPos = topChunk.length - (this.maxCursor - this.cursor) - 1 + if (chunkPos < topChunk.length) { + // @ts-ignore + this.chunks[this.chunks.length - 1] = topChunk.subarray(0, chunkPos) + this.maxCursor = this.cursor - 1 + } + } + if (bytes.length < 64 && bytes.length < this.chunkSize) { + // make a new chunk and copy the new one into it + topChunk = alloc(this.chunkSize) + this.chunks.push(topChunk) + this.maxCursor += topChunk.length + if (this._initReuseChunk === null) { + this._initReuseChunk = topChunk + } + // @ts-ignore + topChunk.set(bytes, 0) + } else { + // push the new bytes in as its own chunk + this.chunks.push(bytes) + this.maxCursor += bytes.length + } + } + this.cursor += bytes.length + } + + /** + * @param {boolean} [reset] + * @returns {Uint8Array} + */ + toBytes (reset = false) { + let byts + if (this.chunks.length === 1) { + const chunk = this.chunks[0] + if (reset && this.cursor > chunk.length / 2) { + /* c8 ignore next 2 */ + // @ts-ignore + byts = this.cursor === chunk.length ? chunk : chunk.subarray(0, this.cursor) + this._initReuseChunk = null + this.chunks = [] + } else { + // @ts-ignore + byts = slice(chunk, 0, this.cursor) + } + } else { + // @ts-ignore + byts = concat(this.chunks, this.cursor) + } + if (reset) { + this.reset() + } + return byts + } +} + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/common.js +const decodeErrPrefix = 'CBOR decode error:' +const encodeErrPrefix = 'CBOR encode error:' + +const uintMinorPrefixBytes = [] +uintMinorPrefixBytes[23] = 1 +uintMinorPrefixBytes[24] = 2 +uintMinorPrefixBytes[25] = 3 +uintMinorPrefixBytes[26] = 5 +uintMinorPrefixBytes[27] = 9 + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} need + */ +function assertEnoughData (data, pos, need) { + if (data.length - pos < need) { + throw new Error(`${decodeErrPrefix} not enough data for type`) + } +} + + + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/0uint.js +/* globals BigInt */ + + + + +const uintBoundaries = [24, 256, 65536, 4294967296, BigInt('18446744073709551616')] + +/** + * @typedef {import('./bl.js').Bl} Bl + * @typedef {import('../interface').DecodeOptions} DecodeOptions + */ + +/** + * @param {Uint8Array} data + * @param {number} offset + * @param {DecodeOptions} options + * @returns {number} + */ +function readUint8 (data, offset, options) { + assertEnoughData(data, offset, 1) + const value = data[offset] + if (options.strict === true && value < uintBoundaries[0]) { + throw new Error(`${decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`) + } + return value +} + +/** + * @param {Uint8Array} data + * @param {number} offset + * @param {DecodeOptions} options + * @returns {number} + */ +function readUint16 (data, offset, options) { + assertEnoughData(data, offset, 2) + const value = (data[offset] << 8) | data[offset + 1] + if (options.strict === true && value < uintBoundaries[1]) { + throw new Error(`${decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`) } - mode = mode.toString(); - if (mode.substring(0, 1) === '0') { - return parseInt(mode, 8) & 4095; + return value +} + +/** + * @param {Uint8Array} data + * @param {number} offset + * @param {DecodeOptions} options + * @returns {number} + */ +function readUint32 (data, offset, options) { + assertEnoughData(data, offset, 4) + const value = (data[offset] * 16777216 /* 2 ** 24 */) + (data[offset + 1] << 16) + (data[offset + 2] << 8) + data[offset + 3] + if (options.strict === true && value < uintBoundaries[2]) { + throw new Error(`${decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`) } - return parseInt(mode, 10) & 4095; + return value } -function parseMtime(input) { - if (input == null) { - return undefined; + +/** + * @param {Uint8Array} data + * @param {number} offset + * @param {DecodeOptions} options + * @returns {number|bigint} + */ +function readUint64 (data, offset, options) { + // assume BigInt, convert back to Number if within safe range + assertEnoughData(data, offset, 8) + const hi = (data[offset] * 16777216 /* 2 ** 24 */) + (data[offset + 1] << 16) + (data[offset + 2] << 8) + data[offset + 3] + const lo = (data[offset + 4] * 16777216 /* 2 ** 24 */) + (data[offset + 5] << 16) + (data[offset + 6] << 8) + data[offset + 7] + const value = (BigInt(hi) << BigInt(32)) + BigInt(lo) + if (options.strict === true && value < uintBoundaries[3]) { + throw new Error(`${decodeErrPrefix} integer encoded in more bytes than necessary (strict decode)`) } - let mtime; - if (input.secs != null) { - mtime = { - secs: input.secs, - nsecs: input.nsecs - }; + if (value <= Number.MAX_SAFE_INTEGER) { + return Number(value) } - if (input.Seconds != null) { - mtime = { - secs: input.Seconds, - nsecs: input.FractionalNanoseconds - }; + if (options.allowBigInt === true) { + return value } - if (Array.isArray(input)) { - mtime = { - secs: input[0], - nsecs: input[1] - }; + throw new Error(`${decodeErrPrefix} integers outside of the safe integer range are not supported`) +} + +/* not required thanks to quick[] list +const oneByteTokens = new Array(24).fill(0).map((v, i) => new Token(Type.uint, i, 1)) +export function decodeUintCompact (data, pos, minor, options) { + return oneByteTokens[minor] +} +*/ + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeUint8 (data, pos, _minor, options) { + return new token_Token(token_Type.uint, readUint8(data, pos + 1, options), 2) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeUint16 (data, pos, _minor, options) { + return new token_Token(token_Type.uint, readUint16(data, pos + 1, options), 3) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeUint32 (data, pos, _minor, options) { + return new token_Token(token_Type.uint, readUint32(data, pos + 1, options), 5) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeUint64 (data, pos, _minor, options) { + return new token_Token(token_Type.uint, readUint64(data, pos + 1, options), 9) +} + +/** + * @param {Bl} buf + * @param {Token} token + */ +function encodeUint (buf, token) { + return encodeUintValue(buf, 0, token.value) +} + +/** + * @param {Bl} buf + * @param {number} major + * @param {number|bigint} uint + */ +function encodeUintValue (buf, major, uint) { + if (uint < uintBoundaries[0]) { + const nuint = Number(uint) + // pack into one byte, minor=0, additional=value + buf.push([major | nuint]) + } else if (uint < uintBoundaries[1]) { + const nuint = Number(uint) + // pack into two byte, minor=0, additional=24 + buf.push([major | 24, nuint]) + } else if (uint < uintBoundaries[2]) { + const nuint = Number(uint) + // pack into three byte, minor=0, additional=25 + buf.push([major | 25, nuint >>> 8, nuint & 0xff]) + } else if (uint < uintBoundaries[3]) { + const nuint = Number(uint) + // pack into five byte, minor=0, additional=26 + buf.push([major | 26, (nuint >>> 24) & 0xff, (nuint >>> 16) & 0xff, (nuint >>> 8) & 0xff, nuint & 0xff]) + } else { + const buint = BigInt(uint) + if (buint < uintBoundaries[4]) { + // pack into nine byte, minor=0, additional=27 + const set = [major | 27, 0, 0, 0, 0, 0, 0, 0] + // simulate bitwise above 32 bits + let lo = Number(buint & BigInt(0xffffffff)) + let hi = Number(buint >> BigInt(32) & BigInt(0xffffffff)) + set[8] = lo & 0xff + lo = lo >> 8 + set[7] = lo & 0xff + lo = lo >> 8 + set[6] = lo & 0xff + lo = lo >> 8 + set[5] = lo & 0xff + set[4] = hi & 0xff + hi = hi >> 8 + set[3] = hi & 0xff + hi = hi >> 8 + set[2] = hi & 0xff + hi = hi >> 8 + set[1] = hi & 0xff + buf.push(set) + } else { + throw new Error(`${decodeErrPrefix} encountered BigInt larger than allowable range`) + } } - if (input instanceof Date) { - const ms = input.getTime(); - const secs = Math.floor(ms / 1000); - mtime = { - secs: secs, - nsecs: (ms - secs * 1000) * 1000 - }; +} + +/** + * @param {Token} token + * @returns {number} + */ +encodeUint.encodedSize = function encodedSize (token) { + return encodeUintValue.encodedSize(token.value) +} + +/** + * @param {number} uint + * @returns {number} + */ +encodeUintValue.encodedSize = function encodedSize (uint) { + if (uint < uintBoundaries[0]) { + return 1 } - if (!Object.prototype.hasOwnProperty.call(mtime, 'secs')) { - return undefined; + if (uint < uintBoundaries[1]) { + return 2 } - if (mtime != null && mtime.nsecs != null && (mtime.nsecs < 0 || mtime.nsecs > 999999999)) { - throw errcode__default['default'](new Error('mtime-nsecs must be within the range [0,999999999]'), 'ERR_INVALID_MTIME_NSECS'); + if (uint < uintBoundaries[2]) { + return 3 } - return mtime; -} -class UnixFS { - static unmarshal(marshaled) { - const message = PBData.decode(marshaled); - const decoded = PBData.toObject(message, { - defaults: false, - arrays: true, - longs: Number, - objects: false - }); - const data = new UnixFS({ - type: types[decoded.Type], - data: decoded.Data, - blockSizes: decoded.blocksizes, - mode: decoded.mode, - mtime: decoded.mtime ? { - secs: decoded.mtime.Seconds, - nsecs: decoded.mtime.FractionalNanoseconds - } : undefined - }); - data._originalMode = decoded.mode || 0; - return data; + if (uint < uintBoundaries[3]) { + return 5 } - constructor(options = { type: 'file' }) { - const {type, data, blockSizes, hashType, fanout, mtime, mode} = options; - if (type && !types.includes(type)) { - throw errcode__default['default'](new Error('Type: ' + type + ' is not valid'), 'ERR_INVALID_TYPE'); - } - this.type = type || 'file'; - this.data = data; - this.hashType = hashType; - this.fanout = fanout; - this.blockSizes = blockSizes || []; - this._originalMode = 0; - this.mode = parseMode(mode); - if (mtime) { - this.mtime = parseMtime(mtime); - if (this.mtime && !this.mtime.nsecs) { - this.mtime.nsecs = 0; - } + return 9 +} + +/** + * @param {Token} tok1 + * @param {Token} tok2 + * @returns {number} + */ +encodeUint.compareTokens = function compareTokens (tok1, tok2) { + return tok1.value < tok2.value ? -1 : tok1.value > tok2.value ? 1 : /* c8 ignore next */ 0 +} + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/1negint.js +/* eslint-env es2020 */ + + + + + +/** + * @typedef {import('./bl.js').Bl} Bl + * @typedef {import('../interface').DecodeOptions} DecodeOptions + */ + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeNegint8 (data, pos, _minor, options) { + return new token_Token(token_Type.negint, -1 - readUint8(data, pos + 1, options), 2) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeNegint16 (data, pos, _minor, options) { + return new token_Token(token_Type.negint, -1 - readUint16(data, pos + 1, options), 3) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeNegint32 (data, pos, _minor, options) { + return new token_Token(token_Type.negint, -1 - readUint32(data, pos + 1, options), 5) +} + +const neg1b = BigInt(-1) +const pos1b = BigInt(1) + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeNegint64 (data, pos, _minor, options) { + const int = readUint64(data, pos + 1, options) + if (typeof int !== 'bigint') { + const value = -1 - int + if (value >= Number.MIN_SAFE_INTEGER) { + return new token_Token(token_Type.negint, value, 9) } } - set mode(mode) { - this._mode = this.isDirectory() ? DEFAULT_DIRECTORY_MODE : DEFAULT_FILE_MODE; - const parsedMode = parseMode(mode); - if (parsedMode !== undefined) { - this._mode = parsedMode; - } + if (options.allowBigInt !== true) { + throw new Error(`${decodeErrPrefix} integers outside of the safe integer range are not supported`) } - get mode() { - return this._mode; + return new token_Token(token_Type.negint, neg1b - BigInt(int), 9) +} + +/** + * @param {Bl} buf + * @param {Token} token + */ +function encodeNegint (buf, token) { + const negint = token.value + const unsigned = (typeof negint === 'bigint' ? (negint * neg1b - pos1b) : (negint * -1 - 1)) + encodeUintValue(buf, token.type.majorEncoded, unsigned) +} + +/** + * @param {Token} token + * @returns {number} + */ +encodeNegint.encodedSize = function encodedSize (token) { + const negint = token.value + const unsigned = (typeof negint === 'bigint' ? (negint * neg1b - pos1b) : (negint * -1 - 1)) + /* c8 ignore next 4 */ + // handled by quickEncode, we shouldn't get here but it's included for completeness + if (unsigned < uintBoundaries[0]) { + return 1 } - isDirectory() { - return Boolean(this.type && dirTypes.includes(this.type)); + if (unsigned < uintBoundaries[1]) { + return 2 } - addBlockSize(size) { - this.blockSizes.push(size); + if (unsigned < uintBoundaries[2]) { + return 3 } - removeBlockSize(index) { - this.blockSizes.splice(index, 1); + if (unsigned < uintBoundaries[3]) { + return 5 } - fileSize() { - if (this.isDirectory()) { - return 0; - } - let sum = 0; - this.blockSizes.forEach(size => { - sum += size; - }); - if (this.data) { - sum += this.data.length; - } - return sum; + return 9 +} + +/** + * @param {Token} tok1 + * @param {Token} tok2 + * @returns {number} + */ +encodeNegint.compareTokens = function compareTokens (tok1, tok2) { + // opposite of the uint comparison since we store the uint version in bytes + return tok1.value < tok2.value ? 1 : tok1.value > tok2.value ? -1 : /* c8 ignore next */ 0 +} + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/2bytes.js + + + + + +/** + * @typedef {import('./bl.js').Bl} Bl + * @typedef {import('../interface').DecodeOptions} DecodeOptions + */ + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} prefix + * @param {number} length + * @returns {Token} + */ +function toToken (data, pos, prefix, length) { + assertEnoughData(data, pos, prefix + length) + const buf = slice(data, pos + prefix, pos + prefix + length) + return new token_Token(token_Type.bytes, buf, prefix + length) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} minor + * @param {DecodeOptions} _options + * @returns {Token} + */ +function decodeBytesCompact (data, pos, minor, _options) { + return toToken(data, pos, 1, minor) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeBytes8 (data, pos, _minor, options) { + return toToken(data, pos, 2, readUint8(data, pos + 1, options)) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeBytes16 (data, pos, _minor, options) { + return toToken(data, pos, 3, readUint16(data, pos + 1, options)) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeBytes32 (data, pos, _minor, options) { + return toToken(data, pos, 5, readUint32(data, pos + 1, options)) +} + +// TODO: maybe we shouldn't support this .. +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeBytes64 (data, pos, _minor, options) { + const l = readUint64(data, pos + 1, options) + if (typeof l === 'bigint') { + throw new Error(`${decodeErrPrefix} 64-bit integer bytes lengths not supported`) } - marshal() { - let type; - switch (this.type) { - case 'raw': - type = PBData.DataType.Raw; - break; - case 'directory': - type = PBData.DataType.Directory; - break; - case 'file': - type = PBData.DataType.File; - break; - case 'metadata': - type = PBData.DataType.Metadata; - break; - case 'symlink': - type = PBData.DataType.Symlink; - break; - case 'hamt-sharded-directory': - type = PBData.DataType.HAMTShard; - break; - default: - throw errcode__default['default'](new Error('Type: ' + type + ' is not valid'), 'ERR_INVALID_TYPE'); - } - let data = this.data; - if (!this.data || !this.data.length) { - data = undefined; - } - let mode; - if (this.mode != null) { - mode = this._originalMode & 4294963200 | (parseMode(this.mode) || 0); - if (mode === DEFAULT_FILE_MODE && !this.isDirectory()) { - mode = undefined; - } - if (mode === DEFAULT_DIRECTORY_MODE && this.isDirectory()) { - mode = undefined; - } - } - let mtime; - if (this.mtime != null) { - const parsed = parseMtime(this.mtime); - if (parsed) { - mtime = { - Seconds: parsed.secs, - FractionalNanoseconds: parsed.nsecs - }; - if (mtime.FractionalNanoseconds === 0) { - delete mtime.FractionalNanoseconds; - } - } - } - const pbData = { - Type: type, - Data: data, - filesize: this.isDirectory() ? undefined : this.fileSize(), - blocksizes: this.blockSizes, - hashType: this.hashType, - fanout: this.fanout, - mode, - mtime - }; - return PBData.encode(pbData).finish(); + return toToken(data, pos, 9, l) +} + +/** + * `encodedBytes` allows for caching when we do a byte version of a string + * for key sorting purposes + * @param {Token} token + * @returns {Uint8Array} + */ +function tokenBytes (token) { + if (token.encodedBytes === undefined) { + token.encodedBytes = token.type === token_Type.string ? byte_utils_fromString(token.value) : token.value } + // @ts-ignore c'mon + return token.encodedBytes } -exports.UnixFS = UnixFS; -exports.parseMode = parseMode; -exports.parseMtime = parseMtime; +/** + * @param {Bl} buf + * @param {Token} token + */ +function encodeBytes (buf, token) { + const bytes = tokenBytes(token) + encodeUintValue(buf, token.type.majorEncoded, bytes.length) + buf.push(bytes) +} + +/** + * @param {Token} token + * @returns {number} + */ +encodeBytes.encodedSize = function encodedSize (token) { + const bytes = tokenBytes(token) + return encodeUintValue.encodedSize(bytes.length) + bytes.length +} +/** + * @param {Token} tok1 + * @param {Token} tok2 + * @returns {number} + */ +encodeBytes.compareTokens = function compareTokens (tok1, tok2) { + return compareBytes(tokenBytes(tok1), tokenBytes(tok2)) +} -/***/ }), +/** + * @param {Uint8Array} b1 + * @param {Uint8Array} b2 + * @returns {number} + */ +function compareBytes (b1, b2) { + return b1.length < b2.length ? -1 : b1.length > b2.length ? 1 : compare(b1, b2) +} -/***/ 81422: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/cborg/lib/3string.js -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var $protobuf = __nccwpck_require__(63616); -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } -var $protobuf__default = /*#__PURE__*/_interopDefaultLegacy($protobuf); +/** + * @typedef {import('./bl.js').Bl} Bl + * @typedef {import('../interface').DecodeOptions} DecodeOptions + */ -const $Reader = $protobuf__default['default'].Reader, $Writer = $protobuf__default['default'].Writer, $util = $protobuf__default['default'].util; -const $root = $protobuf__default['default'].roots['ipfs-unixfs'] || ($protobuf__default['default'].roots['ipfs-unixfs'] = {}); -const Data = $root.Data = (() => { - function Data(p) { - this.blocksizes = []; - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} prefix + * @param {number} length + * @param {DecodeOptions} options + * @returns {Token} + */ +function _3string_toToken (data, pos, prefix, length, options) { + const totLength = prefix + length + assertEnoughData(data, pos, totLength) + const tok = new token_Token(token_Type.string, byte_utils_toString(data, pos + prefix, pos + totLength), totLength) + if (options.retainStringBytes === true) { + tok.byteValue = slice(data, pos + prefix, pos + totLength) } - Data.prototype.Type = 0; - Data.prototype.Data = $util.newBuffer([]); - Data.prototype.filesize = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - Data.prototype.blocksizes = $util.emptyArray; - Data.prototype.hashType = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - Data.prototype.fanout = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; - Data.prototype.mode = 0; - Data.prototype.mtime = null; - Data.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - w.uint32(8).int32(m.Type); - if (m.Data != null && Object.hasOwnProperty.call(m, 'Data')) - w.uint32(18).bytes(m.Data); - if (m.filesize != null && Object.hasOwnProperty.call(m, 'filesize')) - w.uint32(24).uint64(m.filesize); - if (m.blocksizes != null && m.blocksizes.length) { - for (var i = 0; i < m.blocksizes.length; ++i) - w.uint32(32).uint64(m.blocksizes[i]); - } - if (m.hashType != null && Object.hasOwnProperty.call(m, 'hashType')) - w.uint32(40).uint64(m.hashType); - if (m.fanout != null && Object.hasOwnProperty.call(m, 'fanout')) - w.uint32(48).uint64(m.fanout); - if (m.mode != null && Object.hasOwnProperty.call(m, 'mode')) - w.uint32(56).uint32(m.mode); - if (m.mtime != null && Object.hasOwnProperty.call(m, 'mtime')) - $root.UnixTime.encode(m.mtime, w.uint32(66).fork()).ldelim(); - return w; - }; - Data.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.Data(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.Type = r.int32(); - break; - case 2: - m.Data = r.bytes(); - break; - case 3: - m.filesize = r.uint64(); - break; - case 4: - if (!(m.blocksizes && m.blocksizes.length)) - m.blocksizes = []; - if ((t & 7) === 2) { - var c2 = r.uint32() + r.pos; - while (r.pos < c2) - m.blocksizes.push(r.uint64()); - } else - m.blocksizes.push(r.uint64()); - break; - case 5: - m.hashType = r.uint64(); - break; - case 6: - m.fanout = r.uint64(); - break; - case 7: - m.mode = r.uint32(); - break; - case 8: - m.mtime = $root.UnixTime.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - if (!m.hasOwnProperty('Type')) - throw $util.ProtocolError('missing required \'Type\'', { instance: m }); - return m; - }; - Data.fromObject = function fromObject(d) { - if (d instanceof $root.Data) - return d; - var m = new $root.Data(); - switch (d.Type) { - case 'Raw': - case 0: - m.Type = 0; - break; - case 'Directory': - case 1: - m.Type = 1; - break; - case 'File': - case 2: - m.Type = 2; - break; - case 'Metadata': - case 3: - m.Type = 3; - break; - case 'Symlink': - case 4: - m.Type = 4; - break; - case 'HAMTShard': - case 5: - m.Type = 5; - break; - } - if (d.Data != null) { - if (typeof d.Data === 'string') - $util.base64.decode(d.Data, m.Data = $util.newBuffer($util.base64.length(d.Data)), 0); - else if (d.Data.length) - m.Data = d.Data; - } - if (d.filesize != null) { - if ($util.Long) - (m.filesize = $util.Long.fromValue(d.filesize)).unsigned = true; - else if (typeof d.filesize === 'string') - m.filesize = parseInt(d.filesize, 10); - else if (typeof d.filesize === 'number') - m.filesize = d.filesize; - else if (typeof d.filesize === 'object') - m.filesize = new $util.LongBits(d.filesize.low >>> 0, d.filesize.high >>> 0).toNumber(true); - } - if (d.blocksizes) { - if (!Array.isArray(d.blocksizes)) - throw TypeError('.Data.blocksizes: array expected'); - m.blocksizes = []; - for (var i = 0; i < d.blocksizes.length; ++i) { - if ($util.Long) - (m.blocksizes[i] = $util.Long.fromValue(d.blocksizes[i])).unsigned = true; - else if (typeof d.blocksizes[i] === 'string') - m.blocksizes[i] = parseInt(d.blocksizes[i], 10); - else if (typeof d.blocksizes[i] === 'number') - m.blocksizes[i] = d.blocksizes[i]; - else if (typeof d.blocksizes[i] === 'object') - m.blocksizes[i] = new $util.LongBits(d.blocksizes[i].low >>> 0, d.blocksizes[i].high >>> 0).toNumber(true); - } - } - if (d.hashType != null) { - if ($util.Long) - (m.hashType = $util.Long.fromValue(d.hashType)).unsigned = true; - else if (typeof d.hashType === 'string') - m.hashType = parseInt(d.hashType, 10); - else if (typeof d.hashType === 'number') - m.hashType = d.hashType; - else if (typeof d.hashType === 'object') - m.hashType = new $util.LongBits(d.hashType.low >>> 0, d.hashType.high >>> 0).toNumber(true); - } - if (d.fanout != null) { - if ($util.Long) - (m.fanout = $util.Long.fromValue(d.fanout)).unsigned = true; - else if (typeof d.fanout === 'string') - m.fanout = parseInt(d.fanout, 10); - else if (typeof d.fanout === 'number') - m.fanout = d.fanout; - else if (typeof d.fanout === 'object') - m.fanout = new $util.LongBits(d.fanout.low >>> 0, d.fanout.high >>> 0).toNumber(true); - } - if (d.mode != null) { - m.mode = d.mode >>> 0; - } - if (d.mtime != null) { - if (typeof d.mtime !== 'object') - throw TypeError('.Data.mtime: object expected'); - m.mtime = $root.UnixTime.fromObject(d.mtime); - } - return m; - }; - Data.toObject = function toObject(m, o) { - if (!o) - o = {}; - var d = {}; - if (o.arrays || o.defaults) { - d.blocksizes = []; - } - if (o.defaults) { - d.Type = o.enums === String ? 'Raw' : 0; - if (o.bytes === String) - d.Data = ''; - else { - d.Data = []; - if (o.bytes !== Array) - d.Data = $util.newBuffer(d.Data); - } - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.filesize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.filesize = o.longs === String ? '0' : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.hashType = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.hashType = o.longs === String ? '0' : 0; - if ($util.Long) { - var n = new $util.Long(0, 0, true); - d.fanout = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.fanout = o.longs === String ? '0' : 0; - d.mode = 0; - d.mtime = null; - } - if (m.Type != null && m.hasOwnProperty('Type')) { - d.Type = o.enums === String ? $root.Data.DataType[m.Type] : m.Type; - } - if (m.Data != null && m.hasOwnProperty('Data')) { - d.Data = o.bytes === String ? $util.base64.encode(m.Data, 0, m.Data.length) : o.bytes === Array ? Array.prototype.slice.call(m.Data) : m.Data; - } - if (m.filesize != null && m.hasOwnProperty('filesize')) { - if (typeof m.filesize === 'number') - d.filesize = o.longs === String ? String(m.filesize) : m.filesize; - else - d.filesize = o.longs === String ? $util.Long.prototype.toString.call(m.filesize) : o.longs === Number ? new $util.LongBits(m.filesize.low >>> 0, m.filesize.high >>> 0).toNumber(true) : m.filesize; - } - if (m.blocksizes && m.blocksizes.length) { - d.blocksizes = []; - for (var j = 0; j < m.blocksizes.length; ++j) { - if (typeof m.blocksizes[j] === 'number') - d.blocksizes[j] = o.longs === String ? String(m.blocksizes[j]) : m.blocksizes[j]; - else - d.blocksizes[j] = o.longs === String ? $util.Long.prototype.toString.call(m.blocksizes[j]) : o.longs === Number ? new $util.LongBits(m.blocksizes[j].low >>> 0, m.blocksizes[j].high >>> 0).toNumber(true) : m.blocksizes[j]; - } - } - if (m.hashType != null && m.hasOwnProperty('hashType')) { - if (typeof m.hashType === 'number') - d.hashType = o.longs === String ? String(m.hashType) : m.hashType; - else - d.hashType = o.longs === String ? $util.Long.prototype.toString.call(m.hashType) : o.longs === Number ? new $util.LongBits(m.hashType.low >>> 0, m.hashType.high >>> 0).toNumber(true) : m.hashType; - } - if (m.fanout != null && m.hasOwnProperty('fanout')) { - if (typeof m.fanout === 'number') - d.fanout = o.longs === String ? String(m.fanout) : m.fanout; - else - d.fanout = o.longs === String ? $util.Long.prototype.toString.call(m.fanout) : o.longs === Number ? new $util.LongBits(m.fanout.low >>> 0, m.fanout.high >>> 0).toNumber(true) : m.fanout; - } - if (m.mode != null && m.hasOwnProperty('mode')) { - d.mode = m.mode; - } - if (m.mtime != null && m.hasOwnProperty('mtime')) { - d.mtime = $root.UnixTime.toObject(m.mtime, o); - } - return d; - }; - Data.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf__default['default'].util.toJSONOptions); - }; - Data.DataType = function () { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = 'Raw'] = 0; - values[valuesById[1] = 'Directory'] = 1; - values[valuesById[2] = 'File'] = 2; - values[valuesById[3] = 'Metadata'] = 3; - values[valuesById[4] = 'Symlink'] = 4; - values[valuesById[5] = 'HAMTShard'] = 5; - return values; - }(); - return Data; -})(); -const UnixTime = $root.UnixTime = (() => { - function UnixTime(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; + return tok +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeStringCompact (data, pos, minor, options) { + return _3string_toToken(data, pos, 1, minor, options) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeString8 (data, pos, _minor, options) { + return _3string_toToken(data, pos, 2, readUint8(data, pos + 1, options), options) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeString16 (data, pos, _minor, options) { + return _3string_toToken(data, pos, 3, readUint16(data, pos + 1, options), options) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeString32 (data, pos, _minor, options) { + return _3string_toToken(data, pos, 5, readUint32(data, pos + 1, options), options) +} + +// TODO: maybe we shouldn't support this .. +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeString64 (data, pos, _minor, options) { + const l = readUint64(data, pos + 1, options) + if (typeof l === 'bigint') { + throw new Error(`${decodeErrPrefix} 64-bit integer string lengths not supported`) } - UnixTime.prototype.Seconds = $util.Long ? $util.Long.fromBits(0, 0, false) : 0; - UnixTime.prototype.FractionalNanoseconds = 0; - UnixTime.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - w.uint32(8).int64(m.Seconds); - if (m.FractionalNanoseconds != null && Object.hasOwnProperty.call(m, 'FractionalNanoseconds')) - w.uint32(21).fixed32(m.FractionalNanoseconds); - return w; - }; - UnixTime.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.UnixTime(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.Seconds = r.int64(); - break; - case 2: - m.FractionalNanoseconds = r.fixed32(); - break; - default: - r.skipType(t & 7); - break; - } - } - if (!m.hasOwnProperty('Seconds')) - throw $util.ProtocolError('missing required \'Seconds\'', { instance: m }); - return m; - }; - UnixTime.fromObject = function fromObject(d) { - if (d instanceof $root.UnixTime) - return d; - var m = new $root.UnixTime(); - if (d.Seconds != null) { - if ($util.Long) - (m.Seconds = $util.Long.fromValue(d.Seconds)).unsigned = false; - else if (typeof d.Seconds === 'string') - m.Seconds = parseInt(d.Seconds, 10); - else if (typeof d.Seconds === 'number') - m.Seconds = d.Seconds; - else if (typeof d.Seconds === 'object') - m.Seconds = new $util.LongBits(d.Seconds.low >>> 0, d.Seconds.high >>> 0).toNumber(); - } - if (d.FractionalNanoseconds != null) { - m.FractionalNanoseconds = d.FractionalNanoseconds >>> 0; - } - return m; - }; - UnixTime.toObject = function toObject(m, o) { - if (!o) - o = {}; - var d = {}; - if (o.defaults) { - if ($util.Long) { - var n = new $util.Long(0, 0, false); - d.Seconds = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; - } else - d.Seconds = o.longs === String ? '0' : 0; - d.FractionalNanoseconds = 0; - } - if (m.Seconds != null && m.hasOwnProperty('Seconds')) { - if (typeof m.Seconds === 'number') - d.Seconds = o.longs === String ? String(m.Seconds) : m.Seconds; - else - d.Seconds = o.longs === String ? $util.Long.prototype.toString.call(m.Seconds) : o.longs === Number ? new $util.LongBits(m.Seconds.low >>> 0, m.Seconds.high >>> 0).toNumber() : m.Seconds; - } - if (m.FractionalNanoseconds != null && m.hasOwnProperty('FractionalNanoseconds')) { - d.FractionalNanoseconds = m.FractionalNanoseconds; - } - return d; - }; - UnixTime.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf__default['default'].util.toJSONOptions); - }; - return UnixTime; -})(); -const Metadata = $root.Metadata = (() => { - function Metadata(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; + return _3string_toToken(data, pos, 9, l, options) +} + +const encodeString = encodeBytes + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/4array.js + + + + +/** + * @typedef {import('./bl.js').Bl} Bl + * @typedef {import('../interface').DecodeOptions} DecodeOptions + */ + +/** + * @param {Uint8Array} _data + * @param {number} _pos + * @param {number} prefix + * @param {number} length + * @returns {Token} + */ +function _4array_toToken (_data, _pos, prefix, length) { + return new token_Token(token_Type.array, length, prefix) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} minor + * @param {DecodeOptions} _options + * @returns {Token} + */ +function decodeArrayCompact (data, pos, minor, _options) { + return _4array_toToken(data, pos, 1, minor) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeArray8 (data, pos, _minor, options) { + return _4array_toToken(data, pos, 2, readUint8(data, pos + 1, options)) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeArray16 (data, pos, _minor, options) { + return _4array_toToken(data, pos, 3, readUint16(data, pos + 1, options)) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeArray32 (data, pos, _minor, options) { + return _4array_toToken(data, pos, 5, readUint32(data, pos + 1, options)) +} + +// TODO: maybe we shouldn't support this .. +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeArray64 (data, pos, _minor, options) { + const l = readUint64(data, pos + 1, options) + if (typeof l === 'bigint') { + throw new Error(`${decodeErrPrefix} 64-bit integer array lengths not supported`) } - Metadata.prototype.MimeType = ''; - Metadata.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.MimeType != null && Object.hasOwnProperty.call(m, 'MimeType')) - w.uint32(10).string(m.MimeType); - return w; - }; - Metadata.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.Metadata(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.MimeType = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - Metadata.fromObject = function fromObject(d) { - if (d instanceof $root.Metadata) - return d; - var m = new $root.Metadata(); - if (d.MimeType != null) { - m.MimeType = String(d.MimeType); - } - return m; - }; - Metadata.toObject = function toObject(m, o) { - if (!o) - o = {}; - var d = {}; - if (o.defaults) { - d.MimeType = ''; - } - if (m.MimeType != null && m.hasOwnProperty('MimeType')) { - d.MimeType = m.MimeType; - } - return d; - }; - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf__default['default'].util.toJSONOptions); - }; - return Metadata; -})(); + return _4array_toToken(data, pos, 9, l) +} -exports.Data = Data; -exports.Metadata = Metadata; -exports.UnixTime = UnixTime; -exports["default"] = $root; +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeArrayIndefinite (data, pos, _minor, options) { + if (options.allowIndefinite === false) { + throw new Error(`${decodeErrPrefix} indefinite length items not allowed`) + } + return _4array_toToken(data, pos, 1, Infinity) +} +/** + * @param {Bl} buf + * @param {Token} token + */ +function encodeArray (buf, token) { + encodeUintValue(buf, token_Type.array.majorEncoded, token.value) +} + +// using an array as a map key, are you sure about this? we can only sort +// by map length here, it's up to the encoder to decide to look deeper +encodeArray.compareTokens = encodeUint.compareTokens + +/** + * @param {Token} token + * @returns {number} + */ +encodeArray.encodedSize = function encodedSize (token) { + return encodeUintValue.encodedSize(token.value) +} + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/5map.js -/***/ }), -/***/ 58529: -/***/ ((module) => { -const { AbortController } = globalThis /** - * Takes an array of AbortSignals and returns a single signal. - * If any signals are aborted, the returned signal will be aborted. - * @param {Array} signals - * @returns {AbortSignal} + * @typedef {import('./bl.js').Bl} Bl + * @typedef {import('../interface').DecodeOptions} DecodeOptions */ -function anySignal (signals) { - const controller = new AbortController() - function onAbort () { - controller.abort() +/** + * @param {Uint8Array} _data + * @param {number} _pos + * @param {number} prefix + * @param {number} length + * @returns {Token} + */ +function _5map_toToken (_data, _pos, prefix, length) { + return new token_Token(token_Type.map, length, prefix) +} - for (const signal of signals) { - if (!signal || !signal.removeEventListener) continue - signal.removeEventListener('abort', onAbort) - } +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} minor + * @param {DecodeOptions} _options + * @returns {Token} + */ +function decodeMapCompact (data, pos, minor, _options) { + return _5map_toToken(data, pos, 1, minor) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeMap8 (data, pos, _minor, options) { + return _5map_toToken(data, pos, 2, readUint8(data, pos + 1, options)) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeMap16 (data, pos, _minor, options) { + return _5map_toToken(data, pos, 3, readUint16(data, pos + 1, options)) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeMap32 (data, pos, _minor, options) { + return _5map_toToken(data, pos, 5, readUint32(data, pos + 1, options)) +} + +// TODO: maybe we shouldn't support this .. +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeMap64 (data, pos, _minor, options) { + const l = readUint64(data, pos + 1, options) + if (typeof l === 'bigint') { + throw new Error(`${decodeErrPrefix} 64-bit integer map lengths not supported`) } + return _5map_toToken(data, pos, 9, l) +} - for (const signal of signals) { - if (!signal || !signal.addEventListener) continue - if (signal.aborted) { - onAbort() - break - } - signal.addEventListener('abort', onAbort) +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeMapIndefinite (data, pos, _minor, options) { + if (options.allowIndefinite === false) { + throw new Error(`${decodeErrPrefix} indefinite length items not allowed`) } + return _5map_toToken(data, pos, 1, Infinity) +} - return controller.signal +/** + * @param {Bl} buf + * @param {Token} token + */ +function encodeMap (buf, token) { + encodeUintValue(buf, token_Type.map.majorEncoded, token.value) } -module.exports = anySignal -module.exports.anySignal = anySignal +// using a map as a map key, are you sure about this? we can only sort +// by map length here, it's up to the encoder to decide to look deeper +encodeMap.compareTokens = encodeUint.compareTokens +/** + * @param {Token} token + * @returns {number} + */ +encodeMap.encodedSize = function encodedSize (token) { + return encodeUintValue.encodedSize(token.value) +} -/***/ }), +;// CONCATENATED MODULE: ./node_modules/cborg/lib/6tag.js -/***/ 48488: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -const isElectron = __nccwpck_require__(78002) +/** + * @typedef {import('./bl.js').Bl} Bl + * @typedef {import('../interface').DecodeOptions} DecodeOptions + */ -const IS_ENV_WITH_DOM = typeof window === 'object' && typeof document === 'object' && document.nodeType === 9 -// @ts-ignore -const IS_ELECTRON = isElectron() -const IS_BROWSER = IS_ENV_WITH_DOM && !IS_ELECTRON -const IS_ELECTRON_MAIN = IS_ELECTRON && !IS_ENV_WITH_DOM -const IS_ELECTRON_RENDERER = IS_ELECTRON && IS_ENV_WITH_DOM -const IS_NODE = true && typeof process !== 'undefined' && typeof process.release !== 'undefined' && process.release.name === 'node' && !IS_ELECTRON -// @ts-ignore - we either ignore worker scope or dom scope -const IS_WEBWORKER = typeof importScripts === 'function' && typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope -const IS_TEST = typeof process !== 'undefined' && typeof process.env !== 'undefined' && process.env.NODE_ENV === 'test' -const IS_REACT_NATIVE = typeof navigator !== 'undefined' && navigator.product === 'ReactNative' +/** + * @param {Uint8Array} _data + * @param {number} _pos + * @param {number} minor + * @param {DecodeOptions} _options + * @returns {Token} + */ +function decodeTagCompact (_data, _pos, minor, _options) { + return new token_Token(token_Type.tag, minor, 1) +} -module.exports = { - isTest: IS_TEST, - isElectron: IS_ELECTRON, - isElectronMain: IS_ELECTRON_MAIN, - isElectronRenderer: IS_ELECTRON_RENDERER, - isNode: IS_NODE, - /** - * Detects browser main thread **NOT** web worker or service worker - */ - isBrowser: IS_BROWSER, - isWebWorker: IS_WEBWORKER, - isEnvWithDom: IS_ENV_WITH_DOM, - isReactNative: IS_REACT_NATIVE +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeTag8 (data, pos, _minor, options) { + return new token_Token(token_Type.tag, readUint8(data, pos + 1, options), 2) } +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeTag16 (data, pos, _minor, options) { + return new token_Token(token_Type.tag, readUint16(data, pos + 1, options), 3) +} -/***/ }), +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeTag32 (data, pos, _minor, options) { + return new token_Token(token_Type.tag, readUint32(data, pos + 1, options), 5) +} -/***/ 48448: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeTag64 (data, pos, _minor, options) { + return new token_Token(token_Type.tag, readUint64(data, pos + 1, options), 9) +} -"use strict"; +/** + * @param {Bl} buf + * @param {Token} token + */ +function encodeTag (buf, token) { + encodeUintValue(buf, token_Type.tag.majorEncoded, token.value) +} +encodeTag.compareTokens = encodeUint.compareTokens -const { isElectronMain } = __nccwpck_require__(48488) +/** + * @param {Token} token + * @returns {number} + */ +encodeTag.encodedSize = function encodedSize (token) { + return encodeUintValue.encodedSize(token.value) +} -if (isElectronMain) { - module.exports = __nccwpck_require__(8281) -} else { -// use window.fetch if it is available, fall back to node-fetch if not - module.exports = __nccwpck_require__(96357) +;// CONCATENATED MODULE: ./node_modules/cborg/lib/7float.js +// TODO: shift some of the bytes logic to bytes-utils so we can use Buffer +// where possible + + + + + +/** + * @typedef {import('./bl.js').Bl} Bl + * @typedef {import('../interface').DecodeOptions} DecodeOptions + * @typedef {import('../interface').EncodeOptions} EncodeOptions + */ + +const MINOR_FALSE = 20 +const MINOR_TRUE = 21 +const MINOR_NULL = 22 +const MINOR_UNDEFINED = 23 + +/** + * @param {Uint8Array} _data + * @param {number} _pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeUndefined (_data, _pos, _minor, options) { + if (options.allowUndefined === false) { + throw new Error(`${decodeErrPrefix} undefined values are not supported`) + } else if (options.coerceUndefinedToNull === true) { + return new token_Token(token_Type["null"], null, 1) + } + return new token_Token(token_Type.undefined, undefined, 1) +} + +/** + * @param {Uint8Array} _data + * @param {number} _pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeBreak (_data, _pos, _minor, options) { + if (options.allowIndefinite === false) { + throw new Error(`${decodeErrPrefix} indefinite length items not allowed`) + } + return new token_Token(token_Type["break"], undefined, 1) +} + +/** + * @param {number} value + * @param {number} bytes + * @param {DecodeOptions} options + * @returns {Token} + */ +function createToken (value, bytes, options) { + if (options) { + if (options.allowNaN === false && Number.isNaN(value)) { + throw new Error(`${decodeErrPrefix} NaN values are not supported`) + } + if (options.allowInfinity === false && (value === Infinity || value === -Infinity)) { + throw new Error(`${decodeErrPrefix} Infinity values are not supported`) + } + } + return new token_Token(token_Type.float, value, bytes) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeFloat16 (data, pos, _minor, options) { + return createToken(readFloat16(data, pos + 1), 3, options) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeFloat32 (data, pos, _minor, options) { + return createToken(readFloat32(data, pos + 1), 5, options) +} + +/** + * @param {Uint8Array} data + * @param {number} pos + * @param {number} _minor + * @param {DecodeOptions} options + * @returns {Token} + */ +function decodeFloat64 (data, pos, _minor, options) { + return createToken(readFloat64(data, pos + 1), 9, options) +} + +/** + * @param {Bl} buf + * @param {Token} token + * @param {EncodeOptions} options + */ +function encodeFloat (buf, token, options) { + const float = token.value + + if (float === false) { + buf.push([token_Type.float.majorEncoded | MINOR_FALSE]) + } else if (float === true) { + buf.push([token_Type.float.majorEncoded | MINOR_TRUE]) + } else if (float === null) { + buf.push([token_Type.float.majorEncoded | MINOR_NULL]) + } else if (float === undefined) { + buf.push([token_Type.float.majorEncoded | MINOR_UNDEFINED]) + } else { + let decoded + let success = false + if (!options || options.float64 !== true) { + encodeFloat16(float) + decoded = readFloat16(ui8a, 1) + if (float === decoded || Number.isNaN(float)) { + ui8a[0] = 0xf9 + buf.push(ui8a.slice(0, 3)) + success = true + } else { + encodeFloat32(float) + decoded = readFloat32(ui8a, 1) + if (float === decoded) { + ui8a[0] = 0xfa + buf.push(ui8a.slice(0, 5)) + success = true + } + } + } + if (!success) { + encodeFloat64(float) + decoded = readFloat64(ui8a, 1) + ui8a[0] = 0xfb + buf.push(ui8a.slice(0, 9)) + } + } +} + +/** + * @param {Token} token + * @param {EncodeOptions} options + * @returns {number} + */ +encodeFloat.encodedSize = function encodedSize (token, options) { + const float = token.value + + if (float === false || float === true || float === null || float === undefined) { + return 1 + } + + if (!options || options.float64 !== true) { + encodeFloat16(float) + let decoded = readFloat16(ui8a, 1) + if (float === decoded || Number.isNaN(float)) { + return 3 + } + encodeFloat32(float) + decoded = readFloat32(ui8a, 1) + if (float === decoded) { + return 5 + } + } + return 9 } +const buffer = new ArrayBuffer(9) +const dataView = new DataView(buffer, 1) +const ui8a = new Uint8Array(buffer, 0) -/***/ }), - -/***/ 23905: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +/** + * @param {number} inp + */ +function encodeFloat16 (inp) { + if (inp === Infinity) { + dataView.setUint16(0, 0x7c00, false) + } else if (inp === -Infinity) { + dataView.setUint16(0, 0xfc00, false) + } else if (Number.isNaN(inp)) { + dataView.setUint16(0, 0x7e00, false) + } else { + dataView.setFloat32(0, inp) + const valu32 = dataView.getUint32(0) + const exponent = (valu32 & 0x7f800000) >> 23 + const mantissa = valu32 & 0x7fffff + + /* c8 ignore next 6 */ + if (exponent === 0xff) { + // too big, Infinity, but this should be hard (impossible?) to trigger + dataView.setUint16(0, 0x7c00, false) + } else if (exponent === 0x00) { + // 0.0, -0.0 and subnormals, shouldn't be possible to get here because 0.0 should be counted as an int + dataView.setUint16(0, ((inp & 0x80000000) >> 16) | (mantissa >> 13), false) + } else { // standard numbers + // chunks of logic here borrowed from https://github.com/PJK/libcbor/blob/c78f437182533e3efa8d963ff4b945bb635c2284/src/cbor/encoding.c#L127 + const logicalExponent = exponent - 127 + // Now we know that 2^exponent <= 0 logically + /* c8 ignore next 6 */ + if (logicalExponent < -24) { + /* No unambiguous representation exists, this float is not a half float + and is too small to be represented using a half, round off to zero. + Consistent with the reference implementation. */ + // should be difficult (impossible?) to get here in JS + dataView.setUint16(0, 0) + } else if (logicalExponent < -14) { + /* Offset the remaining decimal places by shifting the significand, the + value is lost. This is an implementation decision that works around the + absence of standard half-float in the language. */ + dataView.setUint16(0, ((valu32 & 0x80000000) >> 16) | /* sign bit */ (1 << (24 + logicalExponent)), false) + } else { + dataView.setUint16(0, ((valu32 & 0x80000000) >> 16) | ((logicalExponent + 15) << 10) | (mantissa >> 13), false) + } + } + } +} +/** + * @param {Uint8Array} ui8a + * @param {number} pos + * @returns {number} + */ +function readFloat16 (ui8a, pos) { + if (ui8a.length - pos < 2) { + throw new Error(`${decodeErrPrefix} not enough data for float16`) + } -const fsp = (__nccwpck_require__(57147).promises) -const fs = __nccwpck_require__(57147) -const glob = __nccwpck_require__(3332) -const Path = __nccwpck_require__(71017) -const errCode = __nccwpck_require__(5822) + const half = (ui8a[pos] << 8) + ui8a[pos + 1] + if (half === 0x7c00) { + return Infinity + } + if (half === 0xfc00) { + return -Infinity + } + if (half === 0x7e00) { + return NaN + } + const exp = (half >> 10) & 0x1f + const mant = half & 0x3ff + let val + if (exp === 0) { + val = mant * (2 ** -24) + } else if (exp !== 31) { + val = (mant + 1024) * (2 ** (exp - 25)) + /* c8 ignore next 4 */ + } else { + // may not be possible to get here + val = mant === 0 ? Infinity : NaN + } + return (half & 0x8000) ? -val : val +} /** - * Create an async iterator that yields paths that match requested glob pattern - * - * @param {string} cwd - The directory to start matching the pattern in - * @param {string} pattern - Glob pattern to match - * @param {Object} [options] - Optional options - * @param {boolean} [options.hidden] - Include .dot files in matched paths - * @param {boolean} [options.followSymlinks] - follow symlinks - * @param {boolean} [options.preserveMode] - preserve mode - * @param {boolean} [options.preserveMtime] - preserve mtime - * @param {number} [options.mode] - mode to use - if preserveMode is true this will be ignored - * @param {import('ipfs-unixfs').MtimeLike} [options.mtime] - mtime to use - if preserveMtime is true this will be ignored - * @yields {Object} File objects in the form `{ path: String, content: AsyncIterator }` + * @param {number} inp */ -module.exports = async function * globSource (cwd, pattern, options) { - options = options || {} +function encodeFloat32 (inp) { + dataView.setFloat32(0, inp, false) +} - if (typeof pattern !== 'string') { - throw errCode( - new Error('Pattern must be a string'), - 'ERR_INVALID_PATH', - { pattern } - ) +/** + * @param {Uint8Array} ui8a + * @param {number} pos + * @returns {number} + */ +function readFloat32 (ui8a, pos) { + if (ui8a.length - pos < 4) { + throw new Error(`${decodeErrPrefix} not enough data for float32`) } + const offset = (ui8a.byteOffset || 0) + pos + return new DataView(ui8a.buffer, offset, 4).getFloat32(0, false) +} - if (!Path.isAbsolute(cwd)) { - cwd = Path.resolve(process.cwd(), cwd) +/** + * @param {number} inp + */ +function encodeFloat64 (inp) { + dataView.setFloat64(0, inp, false) +} + +/** + * @param {Uint8Array} ui8a + * @param {number} pos + * @returns {number} + */ +function readFloat64 (ui8a, pos) { + if (ui8a.length - pos < 8) { + throw new Error(`${decodeErrPrefix} not enough data for float64`) } + const offset = (ui8a.byteOffset || 0) + pos + return new DataView(ui8a.buffer, offset, 8).getFloat64(0, false) +} - const globOptions = Object.assign({}, { - nodir: false, - realpath: false, - absolute: true, - dot: Boolean(options.hidden), - follow: options.followSymlinks != null ? options.followSymlinks : true - }) +/** + * @param {Token} _tok1 + * @param {Token} _tok2 + * @returns {number} + */ +encodeFloat.compareTokens = encodeUint.compareTokens +/* +encodeFloat.compareTokens = function compareTokens (_tok1, _tok2) { + return _tok1 + throw new Error(`${encodeErrPrefix} cannot use floats as map keys`) +} +*/ - for await (const p of glob(cwd, pattern, globOptions)) { - const stat = await fsp.stat(p) +;// CONCATENATED MODULE: ./node_modules/cborg/lib/jump.js - let mode = options.mode - if (options.preserveMode) { - mode = stat.mode - } - let mtime = options.mtime - if (options.preserveMtime) { - mtime = stat.mtime - } - yield { - path: toPosix(p.replace(cwd, '')), - content: stat.isFile() ? fs.createReadStream(p) : undefined, - mode, - mtime - } - } -} -/** - * @param {string} path - */ -const toPosix = path => path.replace(/\\/g, '/') -/***/ }), -/***/ 74676: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -const HTTP = __nccwpck_require__(24335) +/** + * @typedef {import('../interface').DecodeOptions} DecodeOptions + */ /** - * - * @param {string} url - * @param {import("../types").HTTPOptions} [options] - * @returns {{ path: string; content?: AsyncIterable }} + * @param {Uint8Array} data + * @param {number} pos + * @param {number} minor */ -const urlSource = (url, options) => { - return { - path: decodeURIComponent(new URL(url).pathname.split('/').pop() || ''), - content: readURLContent(url, options) - } +function invalidMinor (data, pos, minor) { + throw new Error(`${decodeErrPrefix} encountered invalid minor (${minor}) for major ${data[pos] >>> 5}`) } /** - * - * @param {string} url - * @param {import("../types").HTTPOptions} [options] - * @returns {AsyncIterable} + * @param {string} msg + * @returns {()=>any} */ -async function * readURLContent (url, options) { - const http = new HTTP() - const response = await http.get(url, options) +function errorer (msg) { + return () => { throw new Error(`${decodeErrPrefix} ${msg}`) } +} + +/** @type {((data:Uint8Array, pos:number, minor:number, options?:DecodeOptions) => any)[]} */ +const jump = [] + +// unsigned integer, 0x00..0x17 (0..23) +for (let i = 0; i <= 0x17; i++) { + jump[i] = invalidMinor // uint.decodeUintCompact, handled by quick[] +} +jump[0x18] = decodeUint8 // unsigned integer, one-byte uint8_t follows +jump[0x19] = decodeUint16 // unsigned integer, two-byte uint16_t follows +jump[0x1a] = decodeUint32 // unsigned integer, four-byte uint32_t follows +jump[0x1b] = decodeUint64 // unsigned integer, eight-byte uint64_t follows +jump[0x1c] = invalidMinor +jump[0x1d] = invalidMinor +jump[0x1e] = invalidMinor +jump[0x1f] = invalidMinor +// negative integer, -1-0x00..-1-0x17 (-1..-24) +for (let i = 0x20; i <= 0x37; i++) { + jump[i] = invalidMinor // negintDecode, handled by quick[] +} +jump[0x38] = decodeNegint8 // negative integer, -1-n one-byte uint8_t for n follows +jump[0x39] = decodeNegint16 // negative integer, -1-n two-byte uint16_t for n follows +jump[0x3a] = decodeNegint32 // negative integer, -1-n four-byte uint32_t for follows +jump[0x3b] = decodeNegint64 // negative integer, -1-n eight-byte uint64_t for follows +jump[0x3c] = invalidMinor +jump[0x3d] = invalidMinor +jump[0x3e] = invalidMinor +jump[0x3f] = invalidMinor +// byte string, 0x00..0x17 bytes follow +for (let i = 0x40; i <= 0x57; i++) { + jump[i] = decodeBytesCompact +} +jump[0x58] = decodeBytes8 // byte string, one-byte uint8_t for n, and then n bytes follow +jump[0x59] = decodeBytes16 // byte string, two-byte uint16_t for n, and then n bytes follow +jump[0x5a] = decodeBytes32 // byte string, four-byte uint32_t for n, and then n bytes follow +jump[0x5b] = decodeBytes64 // byte string, eight-byte uint64_t for n, and then n bytes follow +jump[0x5c] = invalidMinor +jump[0x5d] = invalidMinor +jump[0x5e] = invalidMinor +jump[0x5f] = errorer('indefinite length bytes/strings are not supported') // byte string, byte strings follow, terminated by "break" +// UTF-8 string 0x00..0x17 bytes follow +for (let i = 0x60; i <= 0x77; i++) { + jump[i] = decodeStringCompact +} +jump[0x78] = decodeString8 // UTF-8 string, one-byte uint8_t for n, and then n bytes follow +jump[0x79] = decodeString16 // UTF-8 string, two-byte uint16_t for n, and then n bytes follow +jump[0x7a] = decodeString32 // UTF-8 string, four-byte uint32_t for n, and then n bytes follow +jump[0x7b] = decodeString64 // UTF-8 string, eight-byte uint64_t for n, and then n bytes follow +jump[0x7c] = invalidMinor +jump[0x7d] = invalidMinor +jump[0x7e] = invalidMinor +jump[0x7f] = errorer('indefinite length bytes/strings are not supported') // UTF-8 strings follow, terminated by "break" +// array, 0x00..0x17 data items follow +for (let i = 0x80; i <= 0x97; i++) { + jump[i] = decodeArrayCompact +} +jump[0x98] = decodeArray8 // array, one-byte uint8_t for n, and then n data items follow +jump[0x99] = decodeArray16 // array, two-byte uint16_t for n, and then n data items follow +jump[0x9a] = decodeArray32 // array, four-byte uint32_t for n, and then n data items follow +jump[0x9b] = decodeArray64 // array, eight-byte uint64_t for n, and then n data items follow +jump[0x9c] = invalidMinor +jump[0x9d] = invalidMinor +jump[0x9e] = invalidMinor +jump[0x9f] = decodeArrayIndefinite // array, data items follow, terminated by "break" +// map, 0x00..0x17 pairs of data items follow +for (let i = 0xa0; i <= 0xb7; i++) { + jump[i] = decodeMapCompact +} +jump[0xb8] = decodeMap8 // map, one-byte uint8_t for n, and then n pairs of data items follow +jump[0xb9] = decodeMap16 // map, two-byte uint16_t for n, and then n pairs of data items follow +jump[0xba] = decodeMap32 // map, four-byte uint32_t for n, and then n pairs of data items follow +jump[0xbb] = decodeMap64 // map, eight-byte uint64_t for n, and then n pairs of data items follow +jump[0xbc] = invalidMinor +jump[0xbd] = invalidMinor +jump[0xbe] = invalidMinor +jump[0xbf] = decodeMapIndefinite // map, pairs of data items follow, terminated by "break" +// tags +for (let i = 0xc0; i <= 0xd7; i++) { + jump[i] = decodeTagCompact +} +jump[0xd8] = decodeTag8 +jump[0xd9] = decodeTag16 +jump[0xda] = decodeTag32 +jump[0xdb] = decodeTag64 +jump[0xdc] = invalidMinor +jump[0xdd] = invalidMinor +jump[0xde] = invalidMinor +jump[0xdf] = invalidMinor +// 0xe0..0xf3 simple values, unsupported +for (let i = 0xe0; i <= 0xf3; i++) { + jump[i] = errorer('simple values are not supported') +} +jump[0xf4] = invalidMinor // false, handled by quick[] +jump[0xf5] = invalidMinor // true, handled by quick[] +jump[0xf6] = invalidMinor // null, handled by quick[] +jump[0xf7] = decodeUndefined // undefined +jump[0xf8] = errorer('simple values are not supported') // simple value, one byte follows, unsupported +jump[0xf9] = decodeFloat16 // half-precision float (two-byte IEEE 754) +jump[0xfa] = decodeFloat32 // single-precision float (four-byte IEEE 754) +jump[0xfb] = decodeFloat64 // double-precision float (eight-byte IEEE 754) +jump[0xfc] = invalidMinor +jump[0xfd] = invalidMinor +jump[0xfe] = invalidMinor +jump[0xff] = decodeBreak // "break" stop code + +/** @type {Token[]} */ +const quick = [] +// ints <24 +for (let i = 0; i < 24; i++) { + quick[i] = new token_Token(token_Type.uint, i, 1) +} +// negints >= -24 +for (let i = -1; i >= -24; i--) { + quick[31 - i] = new token_Token(token_Type.negint, i, 1) +} +// empty bytes +quick[0x40] = new token_Token(token_Type.bytes, new Uint8Array(0), 1) +// empty string +quick[0x60] = new token_Token(token_Type.string, '', 1) +// empty list +quick[0x80] = new token_Token(token_Type.array, 0, 1) +// empty map +quick[0xa0] = new token_Token(token_Type.map, 0, 1) +// false +quick[0xf4] = new token_Token(token_Type["false"], false, 1) +// true +quick[0xf5] = new token_Token(token_Type["true"], true, 1) +// null +quick[0xf6] = new token_Token(token_Type["null"], null, 1) - yield * response.iterator() +/** + * @param {Token} token + * @returns {Uint8Array|undefined} + */ +function quickEncodeToken (token) { + switch (token.type) { + case token_Type["false"]: + return fromArray([0xf4]) + case token_Type["true"]: + return fromArray([0xf5]) + case token_Type["null"]: + return fromArray([0xf6]) + case token_Type.bytes: + if (!token.value.length) { + return fromArray([0x40]) + } + return + case token_Type.string: + if (token.value === '') { + return fromArray([0x60]) + } + return + case token_Type.array: + if (token.value === 0) { + return fromArray([0x80]) + } + /* c8 ignore next 2 */ + // shouldn't be possible if this were called when there was only one token + return + case token_Type.map: + if (token.value === 0) { + return fromArray([0xa0]) + } + /* c8 ignore next 2 */ + // shouldn't be possible if this were called when there was only one token + return + case token_Type.uint: + if (token.value < 24) { + return fromArray([Number(token.value)]) + } + return + case token_Type.negint: + if (token.value >= -24) { + return fromArray([31 - Number(token.value)]) + } + } } -module.exports = urlSource +;// CONCATENATED MODULE: ./node_modules/cborg/lib/encode.js -/***/ }), -/***/ 24335: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -/* eslint-disable no-undef */ -const { fetch, Request, Headers } = __nccwpck_require__(12302) -const { TimeoutError, HTTPError } = __nccwpck_require__(56330) -const merge = (__nccwpck_require__(79139).bind)({ ignoreUndefined: true }) -const { URL, URLSearchParams } = __nccwpck_require__(2003) -const anySignal = __nccwpck_require__(58529) -/** - * @typedef {import('stream').Readable} NodeReadableStream - * @typedef {import('./types').HTTPOptions} HTTPOptions - * @typedef {import('./types').ExtendedResponse} ExtendedResponse - */ -/** - * @template TResponse - * @param {Promise} promise - * @param {number | undefined} ms - * @param {AbortController} abortController - * @returns {Promise} - */ -const timeout = (promise, ms, abortController) => { - if (ms === undefined) { - return promise - } - const start = Date.now() - const timedOut = () => { - const time = Date.now() - start - return time >= ms - } - return new Promise((resolve, reject) => { - const timeoutID = setTimeout(() => { - if (timedOut()) { - reject(new TimeoutError()) - abortController.abort() - } - }, ms) - /** - * @param {(value: any) => void } next - */ - const after = (next) => { - /** - * @param {any} res - */ - const fn = (res) => { - clearTimeout(timeoutID) - if (timedOut()) { - reject(new TimeoutError()) - return - } - next(res) - } - return fn - } - promise - .then(after(resolve), after(reject)) - }) +/** + * @typedef {import('../interface').EncodeOptions} EncodeOptions + * @typedef {import('../interface').OptionalTypeEncoder} OptionalTypeEncoder + * @typedef {import('../interface').Reference} Reference + * @typedef {import('../interface').StrictTypeEncoder} StrictTypeEncoder + * @typedef {import('../interface').TokenTypeEncoder} TokenTypeEncoder + * @typedef {import('../interface').TokenOrNestedTokens} TokenOrNestedTokens + */ + +/** @type {EncodeOptions} */ +const defaultEncodeOptions = { + float64: false, + mapSorter, + quickEncodeToken: quickEncodeToken } -const defaults = { - throwHttpErrors: true, - credentials: 'same-origin' +/** @returns {TokenTypeEncoder[]} */ +function makeCborEncoders () { + const encoders = [] + encoders[token_Type.uint.major] = encodeUint + encoders[token_Type.negint.major] = encodeNegint + encoders[token_Type.bytes.major] = encodeBytes + encoders[token_Type.string.major] = encodeString + encoders[token_Type.array.major] = encodeArray + encoders[token_Type.map.major] = encodeMap + encoders[token_Type.tag.major] = encodeTag + encoders[token_Type.float.major] = encodeFloat + return encoders } -class HTTP { +const cborEncoders = makeCborEncoders() + +const buf = new Bl() + +/** @implements {Reference} */ +class Ref { /** - * - * @param {HTTPOptions} options + * @param {object|any[]} obj + * @param {Reference|undefined} parent */ - constructor (options = {}) { - /** @type {HTTPOptions} */ - this.opts = merge(defaults, options) + constructor (obj, parent) { + this.obj = obj + this.parent = parent } /** - * Fetch - * - * @param {string | Request} resource - * @param {HTTPOptions} options - * @returns {Promise} + * @param {object|any[]} obj + * @returns {boolean} */ - async fetch (resource, options = {}) { - /** @type {HTTPOptions} */ - const opts = merge(this.opts, options) - const headers = new Headers(opts.headers) + includes (obj) { + /** @type {Reference|undefined} */ + let p = this + do { + if (p.obj === obj) { + return true + } + } while (p = p.parent) // eslint-disable-line + return false + } - // validate resource type - if (typeof resource !== 'string' && !(resource instanceof URL || resource instanceof Request)) { - throw new TypeError('`resource` must be a string, URL, or Request') + /** + * @param {Reference|undefined} stack + * @param {object|any[]} obj + * @returns {Reference} + */ + static createCheck (stack, obj) { + if (stack && stack.includes(obj)) { + throw new Error(`${encodeErrPrefix} object contains circular references`) } + return new Ref(obj, stack) + } +} - const url = new URL(resource.toString(), opts.base) - - const { - searchParams, - transformSearchParams, - json - } = opts +const simpleTokens = { + null: new token_Token(token_Type["null"], null), + undefined: new token_Token(token_Type.undefined, undefined), + true: new token_Token(token_Type["true"], true), + false: new token_Token(token_Type["false"], false), + emptyArray: new token_Token(token_Type.array, 0), + emptyMap: new token_Token(token_Type.map, 0) +} - if (searchParams) { - if (typeof transformSearchParams === 'function') { - // @ts-ignore - url.search = transformSearchParams(new URLSearchParams(opts.searchParams)) - } else { - // @ts-ignore - url.search = new URLSearchParams(opts.searchParams) - } +/** @type {{[typeName: string]: StrictTypeEncoder}} */ +const typeEncoders = { + /** + * @param {any} obj + * @param {string} _typ + * @param {EncodeOptions} _options + * @param {Reference} [_refStack] + * @returns {TokenOrNestedTokens} + */ + number (obj, _typ, _options, _refStack) { + if (!Number.isInteger(obj) || !Number.isSafeInteger(obj)) { + return new token_Token(token_Type.float, obj) + } else if (obj >= 0) { + return new token_Token(token_Type.uint, obj) + } else { + return new token_Token(token_Type.negint, obj) } + }, - if (json) { - opts.body = JSON.stringify(opts.json) - headers.set('content-type', 'application/json') + /** + * @param {any} obj + * @param {string} _typ + * @param {EncodeOptions} _options + * @param {Reference} [_refStack] + * @returns {TokenOrNestedTokens} + */ + bigint (obj, _typ, _options, _refStack) { + if (obj >= BigInt(0)) { + return new token_Token(token_Type.uint, obj) + } else { + return new token_Token(token_Type.negint, obj) } + }, - const abortController = new AbortController() - // @ts-ignore - const signal = anySignal([abortController.signal, opts.signal]) - - const response = await timeout( - fetch( - url.toString(), - { - ...opts, - signal, - timeout: undefined, - headers - } - ), - opts.timeout, - abortController - ) - - if (!response.ok && opts.throwHttpErrors) { - if (opts.handleError) { - await opts.handleError(response) - } - throw new HTTPError(response) - } + /** + * @param {any} obj + * @param {string} _typ + * @param {EncodeOptions} _options + * @param {Reference} [_refStack] + * @returns {TokenOrNestedTokens} + */ + Uint8Array (obj, _typ, _options, _refStack) { + return new token_Token(token_Type.bytes, obj) + }, - response.iterator = function () { - return fromStream(response.body) - } + /** + * @param {any} obj + * @param {string} _typ + * @param {EncodeOptions} _options + * @param {Reference} [_refStack] + * @returns {TokenOrNestedTokens} + */ + string (obj, _typ, _options, _refStack) { + return new token_Token(token_Type.string, obj) + }, - response.ndjson = async function * () { - for await (const chunk of ndjson(response.iterator())) { - if (options.transform) { - yield options.transform(chunk) - } else { - yield chunk - } - } - } + /** + * @param {any} obj + * @param {string} _typ + * @param {EncodeOptions} _options + * @param {Reference} [_refStack] + * @returns {TokenOrNestedTokens} + */ + boolean (obj, _typ, _options, _refStack) { + return obj ? simpleTokens.true : simpleTokens.false + }, - return response - } + /** + * @param {any} _obj + * @param {string} _typ + * @param {EncodeOptions} _options + * @param {Reference} [_refStack] + * @returns {TokenOrNestedTokens} + */ + null (_obj, _typ, _options, _refStack) { + return simpleTokens.null + }, /** - * @param {string | Request} resource - * @param {HTTPOptions} options + * @param {any} _obj + * @param {string} _typ + * @param {EncodeOptions} _options + * @param {Reference} [_refStack] + * @returns {TokenOrNestedTokens} */ - post (resource, options = {}) { - return this.fetch(resource, { ...options, method: 'POST' }) - } + undefined (_obj, _typ, _options, _refStack) { + return simpleTokens.undefined + }, /** - * @param {string | Request} resource - * @param {HTTPOptions} options + * @param {any} obj + * @param {string} _typ + * @param {EncodeOptions} _options + * @param {Reference} [_refStack] + * @returns {TokenOrNestedTokens} */ - get (resource, options = {}) { - return this.fetch(resource, { ...options, method: 'GET' }) - } + ArrayBuffer (obj, _typ, _options, _refStack) { + return new token_Token(token_Type.bytes, new Uint8Array(obj)) + }, /** - * @param {string | Request} resource - * @param {HTTPOptions} options + * @param {any} obj + * @param {string} _typ + * @param {EncodeOptions} _options + * @param {Reference} [_refStack] + * @returns {TokenOrNestedTokens} */ - put (resource, options = {}) { - return this.fetch(resource, { ...options, method: 'PUT' }) - } + DataView (obj, _typ, _options, _refStack) { + return new token_Token(token_Type.bytes, new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength)) + }, /** - * @param {string | Request} resource - * @param {HTTPOptions} options + * @param {any} obj + * @param {string} _typ + * @param {EncodeOptions} options + * @param {Reference} [refStack] + * @returns {TokenOrNestedTokens} */ - delete (resource, options = {}) { - return this.fetch(resource, { ...options, method: 'DELETE' }) - } + Array (obj, _typ, options, refStack) { + if (!obj.length) { + if (options.addBreakTokens === true) { + return [simpleTokens.emptyArray, new token_Token(token_Type["break"])] + } + return simpleTokens.emptyArray + } + refStack = Ref.createCheck(refStack, obj) + const entries = [] + let i = 0 + for (const e of obj) { + entries[i++] = encode_objectToTokens(e, options, refStack) + } + if (options.addBreakTokens) { + return [new token_Token(token_Type.array, obj.length), entries, new token_Token(token_Type["break"])] + } + return [new token_Token(token_Type.array, obj.length), entries] + }, /** - * @param {string | Request} resource - * @param {HTTPOptions} options + * @param {any} obj + * @param {string} typ + * @param {EncodeOptions} options + * @param {Reference} [refStack] + * @returns {TokenOrNestedTokens} */ - options (resource, options = {}) { - return this.fetch(resource, { ...options, method: 'OPTIONS' }) + Object (obj, typ, options, refStack) { + // could be an Object or a Map + const isMap = typ !== 'Object' + // it's slightly quicker to use Object.keys() than Object.entries() + const keys = isMap ? obj.keys() : Object.keys(obj) + const length = isMap ? obj.size : keys.length + if (!length) { + if (options.addBreakTokens === true) { + return [simpleTokens.emptyMap, new token_Token(token_Type["break"])] + } + return simpleTokens.emptyMap + } + refStack = Ref.createCheck(refStack, obj) + /** @type {TokenOrNestedTokens[]} */ + const entries = [] + let i = 0 + for (const key of keys) { + entries[i++] = [ + encode_objectToTokens(key, options, refStack), + encode_objectToTokens(isMap ? obj.get(key) : obj[key], options, refStack) + ] + } + sortMapEntries(entries, options) + if (options.addBreakTokens) { + return [new token_Token(token_Type.map, length), entries, new token_Token(token_Type["break"])] + } + return [new token_Token(token_Type.map, length), entries] } } +typeEncoders.Map = typeEncoders.Object +typeEncoders.Buffer = typeEncoders.Uint8Array +for (const typ of 'Uint8Clamped Uint16 Uint32 Int8 Int16 Int32 BigUint64 BigInt64 Float32 Float64'.split(' ')) { + typeEncoders[`${typ}Array`] = typeEncoders.DataView +} + /** - * Parses NDJSON chunks from an iterator - * - * @param {AsyncIterable} source - * @returns {AsyncIterable} + * @param {any} obj + * @param {EncodeOptions} [options] + * @param {Reference} [refStack] + * @returns {TokenOrNestedTokens} */ -const ndjson = async function * (source) { - const decoder = new TextDecoder() - let buf = '' - - for await (const chunk of source) { - buf += decoder.decode(chunk, { stream: true }) - const lines = buf.split(/\r?\n/) - - for (let i = 0; i < lines.length - 1; i++) { - const l = lines[i].trim() - if (l.length > 0) { - yield JSON.parse(l) - } +function encode_objectToTokens (obj, options = {}, refStack) { + const typ = is(obj) + const customTypeEncoder = (options && options.typeEncoders && /** @type {OptionalTypeEncoder} */ options.typeEncoders[typ]) || typeEncoders[typ] + if (typeof customTypeEncoder === 'function') { + const tokens = customTypeEncoder(obj, typ, options, refStack) + if (tokens != null) { + return tokens } - buf = lines[lines.length - 1] } - buf += decoder.decode() - buf = buf.trim() - if (buf.length !== 0) { - yield JSON.parse(buf) + const typeEncoder = typeEncoders[typ] + if (!typeEncoder) { + throw new Error(`${encodeErrPrefix} unsupported type: ${typ}`) } + return typeEncoder(obj, typ, options, refStack) } +/* +CBOR key sorting is a mess. + +The canonicalisation recommendation from https://tools.ietf.org/html/rfc7049#section-3.9 +includes the wording: + +> The keys in every map must be sorted lowest value to highest. +> Sorting is performed on the bytes of the representation of the key +> data items without paying attention to the 3/5 bit splitting for +> major types. +> ... +> * If two keys have different lengths, the shorter one sorts + earlier; +> * If two keys have the same length, the one with the lower value + in (byte-wise) lexical order sorts earlier. + +1. It is not clear what "bytes of the representation of the key" means: is it + the CBOR representation, or the binary representation of the object itself? + Consider the int and uint difference here. +2. It is not clear what "without paying attention to" means: do we include it + and compare on that? Or do we omit the special prefix byte, (mostly) treating + the key in its plain binary representation form. + +The FIDO 2.0: Client To Authenticator Protocol spec takes the original CBOR +wording and clarifies it according to their understanding. +https://fidoalliance.org/specs/fido-v2.0-rd-20170927/fido-client-to-authenticator-protocol-v2.0-rd-20170927.html#message-encoding + +> The keys in every map must be sorted lowest value to highest. Sorting is +> performed on the bytes of the representation of the key data items without +> paying attention to the 3/5 bit splitting for major types. The sorting rules +> are: +> * If the major types are different, the one with the lower value in numerical +> order sorts earlier. +> * If two keys have different lengths, the shorter one sorts earlier; +> * If two keys have the same length, the one with the lower value in +> (byte-wise) lexical order sorts earlier. + +Some other implementations, such as borc, do a full encode then do a +length-first, byte-wise-second comparison: +https://github.com/dignifiedquire/borc/blob/b6bae8b0bcde7c3976b0f0f0957208095c392a36/src/encoder.js#L358 +https://github.com/dignifiedquire/borc/blob/b6bae8b0bcde7c3976b0f0f0957208095c392a36/src/utils.js#L143-L151 + +This has the benefit of being able to easily handle arbitrary keys, including +complex types (maps and arrays). + +We'll opt for the FIDO approach, since it affords some efficies since we don't +need a full encode of each key to determine order and can defer to the types +to determine how to most efficiently order their values (i.e. int and uint +ordering can be done on the numbers, no need for byte-wise, for example). + +Recommendation: stick to single key types or you'll get into trouble, and prefer +string keys because it's much simpler that way. +*/ + +/* +(UPDATE, Dec 2020) +https://tools.ietf.org/html/rfc8949 is the updated CBOR spec and clarifies some +of the questions above with a new recommendation for sorting order being much +closer to what would be expected in other environments (i.e. no length-first +weirdness). +This new sorting order is not yet implemented here but could be added as an +option. "Determinism" (canonicity) is system dependent and it's difficult to +change existing systems that are built with existing expectations. So if a new +ordering is introduced here, the old needs to be kept as well with the user +having the option. +*/ + /** - * Stream to AsyncIterable - * - * @template TChunk - * @param {ReadableStream | NodeReadableStream | null} source - * @returns {AsyncIterable} + * @param {TokenOrNestedTokens[]} entries + * @param {EncodeOptions} options */ -const fromStream = (source) => { - // Workaround for https://github.com/node-fetch/node-fetch/issues/766 - if (isNodeReadableStream(source)) { - const iter = source[Symbol.asyncIterator]() - return { - [Symbol.asyncIterator] () { - return { - next: iter.next.bind(iter), - return (value) { - source.destroy() - if (typeof iter.return === 'function') { - return iter.return() - } - return Promise.resolve({ done: true, value }) - } - } - } - } +function sortMapEntries (entries, options) { + if (options.mapSorter) { + entries.sort(options.mapSorter) } +} - if (isWebReadableStream(source)) { - const reader = source.getReader() - return (async function * () { - try { - while (true) { - // Read from the stream - const { done, value } = await reader.read() - // Exit if we're done - if (done) return - // Else yield the chunk - if (value) { - yield value - } - } - } finally { - reader.releaseLock() - } - })() +/** + * @param {(Token|Token[])[]} e1 + * @param {(Token|Token[])[]} e2 + * @returns {number} + */ +function mapSorter (e1, e2) { + // the key position ([0]) could have a single token or an array + // almost always it'll be a single token but complex key might get involved + /* c8 ignore next 2 */ + const keyToken1 = Array.isArray(e1[0]) ? e1[0][0] : e1[0] + const keyToken2 = Array.isArray(e2[0]) ? e2[0][0] : e2[0] + + // different key types + if (keyToken1.type !== keyToken2.type) { + return keyToken1.type.compare(keyToken2.type) } - if (isAsyncIterable(source)) { - return source + const major = keyToken1.type.major + // TODO: handle case where cmp === 0 but there are more keyToken e. complex type) + const tcmp = cborEncoders[major].compareTokens(keyToken1, keyToken2) + /* c8 ignore next 5 */ + if (tcmp === 0) { + // duplicate key or complex type where the first token matched, + // i.e. a map or array and we're only comparing the opening token + console.warn('WARNING: complex key types used, CBOR key sorting guarantees are gone') } - - throw new TypeError('Body can\'t be converted to AsyncIterable') + return tcmp } /** - * Check if it's an AsyncIterable - * - * @template {unknown} TChunk - * @template {any} Other - * @param {Other|AsyncIterable} value - * @returns {value is AsyncIterable} + * @param {Bl} buf + * @param {TokenOrNestedTokens} tokens + * @param {TokenTypeEncoder[]} encoders + * @param {EncodeOptions} options */ -const isAsyncIterable = (value) => { - return typeof value === 'object' && - value !== null && - typeof /** @type {any} */(value)[Symbol.asyncIterator] === 'function' +function tokensToEncoded (buf, tokens, encoders, options) { + if (Array.isArray(tokens)) { + for (const token of tokens) { + tokensToEncoded(buf, token, encoders, options) + } + } else { + encoders[tokens.type.major](buf, tokens, options) + } } /** - * Check for web readable stream - * - * @template {unknown} TChunk - * @template {any} Other - * @param {Other|ReadableStream} value - * @returns {value is ReadableStream} + * @param {any} data + * @param {TokenTypeEncoder[]} encoders + * @param {EncodeOptions} options + * @returns {Uint8Array} */ -const isWebReadableStream = (value) => { - return value && typeof /** @type {any} */(value).getReader === 'function' +function encodeCustom (data, encoders, options) { + const tokens = encode_objectToTokens(data, options) + if (!Array.isArray(tokens) && options.quickEncodeToken) { + const quickBytes = options.quickEncodeToken(tokens) + if (quickBytes) { + return quickBytes + } + const encoder = encoders[tokens.type.major] + if (encoder.encodedSize) { + const size = encoder.encodedSize(tokens, options) + const buf = new Bl(size) + encoder(buf, tokens, options) + /* c8 ignore next 4 */ + // this would be a problem with encodedSize() functions + if (buf.chunks.length !== 1) { + throw new Error(`Unexpected error: pre-calculated length for ${tokens} was wrong`) + } + return asU8A(buf.chunks[0]) + } + } + buf.reset() + tokensToEncoded(buf, tokens, encoders, options) + return buf.toBytes(true) } /** - * @param {any} value - * @returns {value is NodeReadableStream} + * @param {any} data + * @param {EncodeOptions} [options] + * @returns {Uint8Array} */ -const isNodeReadableStream = (value) => - Object.prototype.hasOwnProperty.call(value, 'readable') && - Object.prototype.hasOwnProperty.call(value, 'writable') +function encode_encode (data, options) { + options = Object.assign({}, defaultEncodeOptions, options) + return encodeCustom(data, cborEncoders, options) +} + + + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/decode.js + + -HTTP.HTTPError = HTTPError -HTTP.TimeoutError = TimeoutError -HTTP.streamToAsyncIterator = fromStream /** - * @param {string | Request} resource - * @param {HTTPOptions} [options] + * @typedef {import('./token.js').Token} Token + * @typedef {import('../interface').DecodeOptions} DecodeOptions + * @typedef {import('../interface').DecodeTokenizer} DecodeTokenizer */ -HTTP.post = (resource, options) => new HTTP(options).post(resource, options) + +const defaultDecodeOptions = { + strict: false, + allowIndefinite: true, + allowUndefined: true, + allowBigInt: true +} /** - * @param {string | Request} resource - * @param {HTTPOptions} [options] + * @implements {DecodeTokenizer} */ -HTTP.get = (resource, options) => new HTTP(options).get(resource, options) +class Tokeniser { + /** + * @param {Uint8Array} data + * @param {DecodeOptions} options + */ + constructor (data, options = {}) { + this._pos = 0 + this.data = data + this.options = options + } + + pos () { + return this._pos + } + + done () { + return this._pos >= this.data.length + } + + next () { + const byt = this.data[this._pos] + let token = quick[byt] + if (token === undefined) { + const decoder = jump[byt] + /* c8 ignore next 4 */ + // if we're here then there's something wrong with our jump or quick lists! + if (!decoder) { + throw new Error(`${decodeErrPrefix} no decoder for major type ${byt >>> 5} (byte 0x${byt.toString(16).padStart(2, '0')})`) + } + const minor = byt & 31 + token = decoder(this.data, this._pos, minor, this.options) + } + // @ts-ignore we get to assume encodedLength is set (crossing fingers slightly) + this._pos += token.encodedLength + return token + } +} + +const DONE = Symbol.for('DONE') +const BREAK = Symbol.for('BREAK') /** - * @param {string | Request} resource - * @param {HTTPOptions} [options] + * @param {Token} token + * @param {DecodeTokenizer} tokeniser + * @param {DecodeOptions} options + * @returns {any|BREAK|DONE} */ -HTTP.put = (resource, options) => new HTTP(options).put(resource, options) +function tokenToArray (token, tokeniser, options) { + const arr = [] + for (let i = 0; i < token.value; i++) { + const value = tokensToObject(tokeniser, options) + if (value === BREAK) { + if (token.value === Infinity) { + // normal end to indefinite length array + break + } + throw new Error(`${decodeErrPrefix} got unexpected break to lengthed array`) + } + if (value === DONE) { + throw new Error(`${decodeErrPrefix} found array but not enough entries (got ${i}, expected ${token.value})`) + } + arr[i] = value + } + return arr +} /** - * @param {string | Request} resource - * @param {HTTPOptions} [options] + * @param {Token} token + * @param {DecodeTokenizer} tokeniser + * @param {DecodeOptions} options + * @returns {any|BREAK|DONE} */ -HTTP.delete = (resource, options) => new HTTP(options).delete(resource, options) +function tokenToMap (token, tokeniser, options) { + const useMaps = options.useMaps === true + const obj = useMaps ? undefined : {} + const m = useMaps ? new Map() : undefined + for (let i = 0; i < token.value; i++) { + const key = tokensToObject(tokeniser, options) + if (key === BREAK) { + if (token.value === Infinity) { + // normal end to indefinite length map + break + } + throw new Error(`${decodeErrPrefix} got unexpected break to lengthed map`) + } + if (key === DONE) { + throw new Error(`${decodeErrPrefix} found map but not enough entries (got ${i} [no key], expected ${token.value})`) + } + if (useMaps !== true && typeof key !== 'string') { + throw new Error(`${decodeErrPrefix} non-string keys not supported (got ${typeof key})`) + } + if (options.rejectDuplicateMapKeys === true) { + // @ts-ignore + if ((useMaps && m.has(key)) || (!useMaps && (key in obj))) { + throw new Error(`${decodeErrPrefix} found repeat map key "${key}"`) + } + } + const value = tokensToObject(tokeniser, options) + if (value === DONE) { + throw new Error(`${decodeErrPrefix} found map but not enough entries (got ${i} [no value], expected ${token.value})`) + } + if (useMaps) { + // @ts-ignore TODO reconsider this .. maybe needs to be strict about key types + m.set(key, value) + } else { + // @ts-ignore TODO reconsider this .. maybe needs to be strict about key types + obj[key] = value + } + } + // @ts-ignore c'mon man + return useMaps ? m : obj +} /** - * @param {string | Request} resource - * @param {HTTPOptions} [options] + * @param {DecodeTokenizer} tokeniser + * @param {DecodeOptions} options + * @returns {any|BREAK|DONE} */ -HTTP.options = (resource, options) => new HTTP(options).options(resource, options) - -module.exports = HTTP +function tokensToObject (tokeniser, options) { + // should we support array as an argument? + // check for tokenIter[Symbol.iterator] and replace tokenIter with what that returns? + if (tokeniser.done()) { + return DONE + } + const token = tokeniser.next() -/***/ }), + if (token.type === token_Type["break"]) { + return BREAK + } -/***/ 56330: -/***/ ((__unused_webpack_module, exports) => { + if (token.type.terminal) { + return token.value + } -"use strict"; + if (token.type === token_Type.array) { + return tokenToArray(token, tokeniser, options) + } + if (token.type === token_Type.map) { + return tokenToMap(token, tokeniser, options) + } -class TimeoutError extends Error { - constructor (message = 'Request timed out') { - super(message) - this.name = 'TimeoutError' + if (token.type === token_Type.tag) { + if (options.tags && typeof options.tags[token.value] === 'function') { + const tagged = tokensToObject(tokeniser, options) + return options.tags[token.value](tagged) + } + throw new Error(`${decodeErrPrefix} tag not supported (${token.value})`) } + /* c8 ignore next */ + throw new Error('unsupported') } -exports.TimeoutError = TimeoutError -class AbortError extends Error { - constructor (message = 'The operation was aborted.') { - super(message) - this.name = 'AbortError' +/** + * @param {Uint8Array} data + * @param {DecodeOptions} [options] + * @returns {[any, Uint8Array]} + */ +function decodeFirst (data, options) { + if (!(data instanceof Uint8Array)) { + throw new Error(`${decodeErrPrefix} data to decode must be a Uint8Array`) + } + options = Object.assign({}, defaultDecodeOptions, options) + const tokeniser = options.tokenizer || new Tokeniser(data, options) + const decoded = tokensToObject(tokeniser, options) + if (decoded === DONE) { + throw new Error(`${decodeErrPrefix} did not find any content to decode`) + } + if (decoded === BREAK) { + throw new Error(`${decodeErrPrefix} got unexpected break`) } + return [decoded, data.subarray(tokeniser.pos())] } -exports.AbortError = AbortError -class HTTPError extends Error { - /** - * @param {Response} response - */ - constructor (response) { - super(response.statusText) - this.name = 'HTTPError' - this.response = response +/** + * @param {Uint8Array} data + * @param {DecodeOptions} [options] + * @returns {any} + */ +function decode_decode (data, options) { + const [decoded, remainder] = decodeFirst(data, options) + if (remainder.length > 0) { + throw new Error(`${decodeErrPrefix} too many terminals, data makes no sense`) } + return decoded } -exports.HTTPError = HTTPError - -/***/ }), -/***/ 97355: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +;// CONCATENATED MODULE: ./node_modules/cborg/cborg.js -const { TimeoutError, AbortError } = __nccwpck_require__(56330) -const { Response, Request, Headers, default: fetch } = __nccwpck_require__(48448) -/** - * @typedef {import('../types').FetchOptions} FetchOptions - * @typedef {import('../types').ProgressFn} ProgressFn - */ /** - * Fetch with progress - * - * @param {string | Request} url - * @param {FetchOptions} [options] - * @returns {Promise} + * Export the types that were present in the original manual cborg.d.ts + * @typedef {import('./interface').TagDecoder} TagDecoder + * There was originally just `TypeEncoder` so don't break types by renaming or not exporting + * @typedef {import('./interface').OptionalTypeEncoder} TypeEncoder + * @typedef {import('./interface').DecodeOptions} DecodeOptions + * @typedef {import('./interface').EncodeOptions} EncodeOptions */ -const fetchWithProgress = (url, options = {}) => { - const request = new XMLHttpRequest() - request.open(options.method || 'GET', url.toString(), true) - const { timeout, headers } = options - - if (timeout && timeout > 0 && timeout < Infinity) { - request.timeout = timeout - } - if (options.overrideMimeType != null) { - request.overrideMimeType(options.overrideMimeType) - } - if (headers) { - for (const [name, value] of new Headers(headers)) { - request.setRequestHeader(name, value) +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/bytes.js +const bytes_empty = new Uint8Array(0); +function bytes_toHex(d) { + return d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), ''); +} +function bytes_fromHex(hex) { + const hexes = hex.match(/../g); + return hexes != null ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : bytes_empty; +} +function bytes_equals(aa, bb) { + if (aa === bb) + return true; + if (aa.byteLength !== bb.byteLength) { + return false; } - } - - if (options.signal) { - options.signal.onabort = () => request.abort() - } - - if (options.onUploadProgress) { - request.upload.onprogress = options.onUploadProgress - } - - // Note: Need to use `arraybuffer` here instead of `blob` because `Blob` - // instances coming from JSDOM are not compatible with `Response` from - // node-fetch (which is the setup we get when testing with jest because - // it uses JSDOM which does not provide a global fetch - // https://github.com/jsdom/jsdom/issues/1724) - request.responseType = 'arraybuffer' - - return new Promise((resolve, reject) => { + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false; + } + } + return true; +} +function src_bytes_coerce(o) { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') + return o; + if (o instanceof ArrayBuffer) + return new Uint8Array(o); + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength); + } + throw new Error('Unknown type, must be binary type'); +} +function bytes_isBinary(o) { + return o instanceof ArrayBuffer || ArrayBuffer.isView(o); +} +function bytes_fromString(str) { + return new TextEncoder().encode(str); +} +function src_bytes_toString(b) { + return new TextDecoder().decode(b); +} +//# sourceMappingURL=bytes.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/vendor/base-x.js +/* eslint-disable */ +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +/** + * @param {string} ALPHABET + * @param {any} name + */ +function base_x_base(ALPHABET, name) { + if (ALPHABET.length >= 255) { + throw new TypeError('Alphabet too long'); + } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { + throw new TypeError(x + ' is ambiguous'); + } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up /** - * @param {Event} event + * @param {any[] | Iterable} source */ - const handleEvent = (event) => { - switch (event.type) { - case 'error': { - resolve(Response.error()) - break + function encode(source) { + // @ts-ignore + if (source instanceof Uint8Array) + ; + else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); } - case 'load': { - resolve( - new ResponseWithURL(request.responseURL, request.response, { - status: request.status, - statusText: request.statusText, - headers: parseHeaders(request.getAllResponseHeaders()) - }) - ) - break + else if (Array.isArray(source)) { + source = Uint8Array.from(source); } - case 'timeout': { - reject(new TimeoutError()) - break + if (!(source instanceof Uint8Array)) { + throw new TypeError('Expected Uint8Array'); } - case 'abort': { - reject(new AbortError()) - break + if (source.length === 0) { + return ''; } - default: { - break + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; } - } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { + str += ALPHABET.charAt(b58[it2]); + } + return str; } - request.onerror = handleEvent - request.onload = handleEvent - request.ontimeout = handleEvent - request.onabort = handleEvent - - // @ts-expect-error options.body can be a node readable stream, which isn't compatible with XHR, but this - // file is a browser override so you won't get a node readable stream so ignore the error - request.send(options.body) - }) + /** + * @param {string | string[]} source + */ + function decodeUnsafe(source) { + if (typeof source !== 'string') { + throw new TypeError('Expected String'); + } + if (source.length === 0) { + return new Uint8Array(); + } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { + return; + } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { + return; + } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { + return; + } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch; + } + /** + * @param {string | string[]} string + */ + function decode(string) { + var buffer = decodeUnsafe(string); + if (buffer) { + return buffer; + } + throw new Error(`Non-${name} character`); + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + }; } +var base_x_src = base_x_base; +var base_x_brrp_multiformats_scope_baseX = base_x_src; +/* harmony default export */ const vendor_base_x = (base_x_brrp_multiformats_scope_baseX); +//# sourceMappingURL=base-x.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/bases/base.js -const fetchWithStreaming = fetch /** - * @param {string | Request} url - * @param {FetchOptions} options + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. */ -const fetchWith = (url, options = {}) => - (options.onUploadProgress != null) - ? fetchWithProgress(url, options) - : fetchWithStreaming(url, options) - +class base_Encoder { + name; + prefix; + baseEncode; + constructor(name, prefix, baseEncode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + } + encode(bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}`; + } + else { + throw Error('Unknown type, must be binary type'); + } + } +} /** - * Parse Headers from a XMLHttpRequest - * - * @param {string} input - * @returns {Headers} + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. */ -const parseHeaders = (input) => { - const headers = new Headers() - for (const line of input.trim().split(/[\r\n]+/)) { - const index = line.indexOf(': ') - if (index > 0) { - headers.set(line.slice(0, index), line.slice(index + 1)) +class base_Decoder { + name; + prefix; + baseDecode; + prefixCodePoint; + constructor(name, prefix, baseDecode) { + this.name = name; + this.prefix = prefix; + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character'); + } + this.prefixCodePoint = prefix.codePointAt(0); + this.baseDecode = baseDecode; + } + decode(text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`); + } + return this.baseDecode(text.slice(this.prefix.length)); + } + else { + throw Error('Can only multibase decode strings'); + } + } + or(decoder) { + return base_or(this, decoder); } - } - - return headers } - -class ResponseWithURL extends Response { - /** - * @param {string} url - * @param {BodyInit} body - * @param {ResponseInit} options - */ - constructor (url, body, options) { - super(body, options) - Object.defineProperty(this, 'url', { value: url }) - } +class base_ComposedDecoder { + decoders; + constructor(decoders) { + this.decoders = decoders; + } + or(decoder) { + return base_or(this, decoder); + } + decode(input) { + const prefix = input[0]; + const decoder = this.decoders[prefix]; + if (decoder != null) { + return decoder.decode(input); + } + else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`); + } + } } - -module.exports = { - fetch: fetchWith, - Request, - Headers +function base_or(left, right) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return new base_ComposedDecoder({ + ...(left.decoders ?? { [left.prefix]: left }), + ...(right.decoders ?? { [right.prefix]: right }) + }); } +class base_Codec { + name; + prefix; + baseEncode; + baseDecode; + encoder; + decoder; + constructor(name, prefix, baseEncode, baseDecode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + this.baseDecode = baseDecode; + this.encoder = new base_Encoder(name, prefix, baseEncode); + this.decoder = new base_Decoder(name, prefix, baseDecode); + } + encode(input) { + return this.encoder.encode(input); + } + decode(input) { + return this.decoder.decode(input); + } +} +function base_from({ name, prefix, encode, decode }) { + return new base_Codec(name, prefix, encode, decode); +} +function base_baseX({ name, prefix, alphabet }) { + const { encode, decode } = vendor_base_x(alphabet, name); + return base_from({ + prefix, + name, + encode, + decode: (text) => src_bytes_coerce(decode(text)) + }); +} +function base_decode(string, alphabet, bitsPerChar, name) { + // Build the character lookup table: + const codes = {}; + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i; + } + // Count the padding bytes: + let end = string.length; + while (string[end - 1] === '=') { + --end; + } + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0); + // Parse the data: + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + let written = 0; // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]]; + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`); + } + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value; + bits += bitsPerChar; + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8; + out[written++] = 0xff & (buffer >> bits); + } + } + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || (0xff & (buffer << (8 - bits))) !== 0) { + throw new SyntaxError('Unexpected end of data'); + } + return out; +} +function base_encode(data, alphabet, bitsPerChar) { + const pad = alphabet[alphabet.length - 1] === '='; + const mask = (1 << bitsPerChar) - 1; + let out = ''; + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i]; + bits += 8; + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar; + out += alphabet[mask & (buffer >> bits)]; + } + } + // Partial character: + if (bits !== 0) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))]; + } + // Add padding characters until we hit a byte boundary: + if (pad) { + while (((out.length * bitsPerChar) & 7) !== 0) { + out += '='; + } + } + return out; +} +/** + * RFC4648 Factory + */ +function base_rfc4648({ name, prefix, bitsPerChar, alphabet }) { + return base_from({ + prefix, + name, + encode(input) { + return base_encode(input, alphabet, bitsPerChar); + }, + decode(input) { + return base_decode(input, alphabet, bitsPerChar, name); + } + }); +} +//# sourceMappingURL=base.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/bases/base32.js +const bases_base32_base32 = base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}); +const bases_base32_base32upper = base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}); +const base32_base32pad = base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}); +const base32_base32padupper = base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}); +const base32_base32hex = base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}); +const base32_base32hexupper = base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}); +const base32_base32hexpad = base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}); +const base32_base32hexpadupper = base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}); +const base32_base32z = base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}); +//# sourceMappingURL=base32.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/bases/base58.js -/***/ }), - -/***/ 12302: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; +const bases_base58_base58btc = base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}); +const base58_base58flickr = base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}); +//# sourceMappingURL=base58.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/vendor/varint.js +/* eslint-disable */ +var varint_encode_1 = vendor_varint_encode; +var varint_MSB = 0x80, varint_REST = 0x7F, varint_MSBALL = ~varint_REST, varint_INT = Math.pow(2, 31); +/** + * @param {number} num + * @param {number[]} out + * @param {number} offset + */ +function vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while (num >= varint_INT) { + out[offset++] = (num & 0xFF) | varint_MSB; + num /= 128; + } + while (num & varint_MSBALL) { + out[offset++] = (num & 0xFF) | varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + // @ts-ignore + vendor_varint_encode.bytes = offset - oldOffset + 1; + return out; +} +var vendor_varint_decode = varint_read; +var varint_MSB$1 = 0x80, varint_REST$1 = 0x7F; +/** + * @param {string | any[]} buf + * @param {number} offset + */ +function varint_read(buf, offset) { + var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + do { + if (counter >= l) { + // @ts-ignore + varint_read.bytes = 0; + throw new RangeError('Could not decode varint'); + } + b = buf[counter++]; + res += shift < 28 + ? (b & varint_REST$1) << shift + : (b & varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= varint_MSB$1); + // @ts-ignore + varint_read.bytes = counter - offset; + return res; +} +var varint_N1 = Math.pow(2, 7); +var varint_N2 = Math.pow(2, 14); +var varint_N3 = Math.pow(2, 21); +var varint_N4 = Math.pow(2, 28); +var varint_N5 = Math.pow(2, 35); +var varint_N6 = Math.pow(2, 42); +var varint_N7 = Math.pow(2, 49); +var varint_N8 = Math.pow(2, 56); +var varint_N9 = Math.pow(2, 63); +var vendor_varint_length = function (/** @type {number} */ value) { + return (value < varint_N1 ? 1 + : value < varint_N2 ? 2 + : value < varint_N3 ? 3 + : value < varint_N4 ? 4 + : value < varint_N5 ? 5 + : value < varint_N6 ? 6 + : value < varint_N7 ? 7 + : value < varint_N8 ? 8 + : value < varint_N9 ? 9 + : 10); +}; +var vendor_varint_varint = { + encode: varint_encode_1, + decode: vendor_varint_decode, + encodingLength: vendor_varint_length +}; +var varint_brrp_varint = vendor_varint_varint; +/* harmony default export */ const src_vendor_varint = (varint_brrp_varint); +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/varint.js + +function dist_src_varint_decode(data, offset = 0) { + const code = src_vendor_varint.decode(data, offset); + return [code, src_vendor_varint.decode.bytes]; +} +function varint_encodeTo(int, target, offset = 0) { + src_vendor_varint.encode(int, target, offset); + return target; +} +function varint_encodingLength(int) { + return src_vendor_varint.encodingLength(int); +} +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/hashes/digest.js -if (typeof XMLHttpRequest === 'function') { - // Electron has `XMLHttpRequest` and should get the browser implementation - // instead of node. - module.exports = __nccwpck_require__(97355) -} else { - module.exports = __nccwpck_require__(38606) +/** + * Creates a multihash digest. + */ +function hashes_digest_create(code, digest) { + const size = digest.byteLength; + const sizeOffset = varint_encodingLength(code); + const digestOffset = sizeOffset + varint_encodingLength(size); + const bytes = new Uint8Array(digestOffset + size); + varint_encodeTo(code, bytes, 0); + varint_encodeTo(size, bytes, sizeOffset); + bytes.set(digest, digestOffset); + return new hashes_digest_Digest(code, size, digest, bytes); +} +/** + * Turns bytes representation of multihash digest into an instance. + */ +function hashes_digest_decode(multihash) { + const bytes = src_bytes_coerce(multihash); + const [code, sizeOffset] = dist_src_varint_decode(bytes); + const [size, digestOffset] = dist_src_varint_decode(bytes.subarray(sizeOffset)); + const digest = bytes.subarray(sizeOffset + digestOffset); + if (digest.byteLength !== size) { + throw new Error('Incorrect length'); + } + return new hashes_digest_Digest(code, size, digest, bytes); +} +function hashes_digest_equals(a, b) { + if (a === b) { + return true; + } + else { + const data = b; + return (a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + bytes_equals(a.bytes, data.bytes)); + } +} +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + */ +class hashes_digest_Digest { + code; + size; + digest; + bytes; + /** + * Creates a multihash digest. + */ + constructor(code, size, digest, bytes) { + this.code = code; + this.size = size; + this.digest = digest; + this.bytes = bytes; + } } +//# sourceMappingURL=digest.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/node_modules/multiformats/dist/src/cid.js -/***/ }), -/***/ 38606: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -const { Request, Response, Headers, default: nativeFetch } = __nccwpck_require__(48448) -// @ts-ignore -const toStream = __nccwpck_require__(28186) -const { Buffer } = __nccwpck_require__(14300) -/** - * @typedef {import('stream').Readable} NodeReadableStream - * - * @typedef {import('../types').FetchOptions} FetchOptions - * @typedef {import('../types').ProgressFn} ProgressFn - */ +// This way TS will also expose all the types from module + +function cid_format(link, base) { + const { bytes, version } = link; + switch (version) { + case 0: + return cid_toStringV0(bytes, cid_baseCache(link), base ?? bases_base58_base58btc.encoder); + default: + return cid_toStringV1(bytes, cid_baseCache(link), (base ?? bases_base32_base32.encoder)); + } +} +function cid_toJSON(link) { + return { + '/': cid_format(link) + }; +} +function cid_fromJSON(json) { + return src_cid_CID.parse(json['/']); +} +const cid_cache = new WeakMap(); +function cid_baseCache(cid) { + const baseCache = cid_cache.get(cid); + if (baseCache == null) { + const baseCache = new Map(); + cid_cache.set(cid, baseCache); + return baseCache; + } + return baseCache; +} +class src_cid_CID { + code; + version; + multihash; + bytes; + '/'; + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param multihash - (Multi)hash of the of the content. + */ + constructor(version, code, multihash, bytes) { + this.code = code; + this.version = version; + this.multihash = multihash; + this.bytes = bytes; + // flag to serializers that this is a CID and + // should be treated specially + this['/'] = bytes; + } + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID() { + return this; + } + // ArrayBufferView + get byteOffset() { + return this.bytes.byteOffset; + } + // ArrayBufferView + get byteLength() { + return this.bytes.byteLength; + } + toV0() { + switch (this.version) { + case 0: { + return this; + } + case 1: { + const { code, multihash } = this; + if (code !== cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0'); + } + // sha2-256 + if (multihash.code !== cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0'); + } + return (src_cid_CID.createV0(multihash)); + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`); + } + } + } + toV1() { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash; + const multihash = hashes_digest_create(code, digest); + return (src_cid_CID.createV1(this.code, multihash)); + } + case 1: { + return this; + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`); + } + } + } + equals(other) { + return src_cid_CID.equals(this, other); + } + static equals(self, other) { + const unknown = other; + return (unknown != null && + self.code === unknown.code && + self.version === unknown.version && + hashes_digest_equals(self.multihash, unknown.multihash)); + } + toString(base) { + return cid_format(this, base); + } + toJSON() { + return { '/': cid_format(this) }; + } + link() { + return this; + } + [Symbol.toStringTag] = 'CID'; + // Legacy + [Symbol.for('nodejs.util.inspect.custom')]() { + return `CID(${this.toString()})`; + } + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + */ + static asCID(input) { + if (input == null) { + return null; + } + const value = input; + if (value instanceof src_cid_CID) { + // If value is instance of CID then we're all set. + return value; + } + else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value; + return new src_cid_CID(version, code, multihash, bytes ?? cid_encodeCID(version, code, multihash.bytes)); + } + else if (value[cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value; + const digest = hashes_digest_decode(multihash); + return src_cid_CID.create(version, code, digest); + } + else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null; + } + } + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param digest - (Multi)hash of the of the content. + */ + static create(version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported'); + } + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest'); + } + switch (version) { + case 0: { + if (code !== cid_DAG_PB_CODE) { + throw new Error(`Version 0 CID must use dag-pb (code: ${cid_DAG_PB_CODE}) block encoding`); + } + else { + return new src_cid_CID(version, code, digest, digest.bytes); + } + } + case 1: { + const bytes = cid_encodeCID(version, code, digest.bytes); + return new src_cid_CID(version, code, digest, bytes); + } + default: { + throw new Error('Invalid version'); + } + } + } + /** + * Simplified version of `create` for CIDv0. + */ + static createV0(digest) { + return src_cid_CID.create(0, cid_DAG_PB_CODE, digest); + } + /** + * Simplified version of `create` for CIDv1. + * + * @param code - Content encoding format code. + * @param digest - Multihash of the content. + */ + static createV1(code, digest) { + return src_cid_CID.create(1, code, digest); + } + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + */ + static decode(bytes) { + const [cid, remainder] = src_cid_CID.decodeFirst(bytes); + if (remainder.length !== 0) { + throw new Error('Incorrect length'); + } + return cid; + } + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + */ + static decodeFirst(bytes) { + const specs = src_cid_CID.inspectBytes(bytes); + const prefixSize = specs.size - specs.multihashSize; + const multihashBytes = src_bytes_coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize)); + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length'); + } + const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize); + const digest = new hashes_digest_Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes); + const cid = specs.version === 0 + ? src_cid_CID.createV0(digest) + : src_cid_CID.createV1(specs.codec, digest); + return [cid, bytes.subarray(specs.size)]; + } + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + */ + static inspectBytes(initialBytes) { + let offset = 0; + const next = () => { + const [i, length] = dist_src_varint_decode(initialBytes.subarray(offset)); + offset += length; + return i; + }; + let version = next(); + let codec = cid_DAG_PB_CODE; + if (version === 18) { + // CIDv0 + version = 0; + offset = 0; + } + else { + codec = next(); + } + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`); + } + const prefixSize = offset; + const multihashCode = next(); // multihash code + const digestSize = next(); // multihash length + const size = offset + digestSize; + const multihashSize = size - prefixSize; + return { version, codec, multihashCode, digestSize, multihashSize, size }; + } + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + */ + static parse(source, base) { + const [prefix, bytes] = cid_parseCIDtoBytes(source, base); + const cid = src_cid_CID.decode(bytes); + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix'); + } + // Cache string representation to avoid computing it on `this.toString()` + cid_baseCache(cid).set(prefix, source); + return cid; + } +} +function cid_parseCIDtoBytes(source, base) { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base ?? bases_base58_base58btc; + return [ + bases_base58_base58btc.prefix, + decoder.decode(`${bases_base58_base58btc.prefix}${source}`) + ]; + } + case bases_base58_base58btc.prefix: { + const decoder = base ?? bases_base58_base58btc; + return [bases_base58_base58btc.prefix, decoder.decode(source)]; + } + case bases_base32_base32.prefix: { + const decoder = base ?? bases_base32_base32; + return [bases_base32_base32.prefix, decoder.decode(source)]; + } + default: { + if (base == null) { + throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided'); + } + return [source[0], base.decode(source)]; + } + } +} +function cid_toStringV0(bytes, cache, base) { + const { prefix } = base; + if (prefix !== bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`); + } + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes).slice(1); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +function cid_toStringV1(bytes, cache, base) { + const { prefix } = base; + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +const cid_DAG_PB_CODE = 0x70; +const cid_SHA_256_CODE = 0x12; +function cid_encodeCID(version, code, multihash) { + const codeOffset = varint_encodingLength(version); + const hashOffset = codeOffset + varint_encodingLength(code); + const bytes = new Uint8Array(hashOffset + multihash.byteLength); + varint_encodeTo(version, bytes, 0); + varint_encodeTo(code, bytes, codeOffset); + bytes.set(multihash, hashOffset); + return bytes; +} +const cid_cidSymbol = Symbol.for('@ipld/js-cid/CID'); +//# sourceMappingURL=cid.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-cbor/src/index.js + + + +// https://github.com/ipfs/go-ipfs/issues/3570#issuecomment-273931692 +const CID_CBOR_TAG = 42 /** - * @param {string|Request} url - * @param {FetchOptions} [options] - * @returns {Promise} + * @template T + * @typedef {import('multiformats/codecs/interface').ByteView} ByteView */ -const fetch = (url, options = {}) => - // @ts-ignore - nativeFetch(url, withUploadProgress(options)) /** - * Takes fetch options and wraps request body to track upload progress if - * `onUploadProgress` is supplied. Otherwise returns options as is. + * cidEncoder will receive all Objects during encode, it needs to filter out + * anything that's not a CID and return `null` for that so it's encoded as + * normal. * - * @param {FetchOptions} options - * @returns {FetchOptions} + * @param {any} obj + * @returns {cborg.Token[]|null} */ -const withUploadProgress = (options) => { - const { onUploadProgress, body } = options - if (onUploadProgress && body) { - // This works around the fact that electron-fetch serializes `Uint8Array`s - // and `ArrayBuffer`s to strings. - const content = normalizeBody(body) - - const rsp = new Response(content) - const source = iterateBodyWithProgress(/** @type {NodeReadableStream} */(rsp.body), onUploadProgress) - return { - ...options, - body: toStream.readable(source) - } - } else { - return options +function cidEncoder (obj) { + if (obj.asCID !== obj && obj['/'] !== obj.bytes) { + return null // any other kind of object + } + const cid = src_cid_CID.asCID(obj) + /* c8 ignore next 4 */ + // very unlikely case, and it'll probably throw a recursion error in cborg + if (!cid) { + return null } + const bytes = new Uint8Array(cid.bytes.byteLength + 1) + bytes.set(cid.bytes, 1) // prefix is 0x00, for historical reasons + return [ + new token_Token(token_Type.tag, CID_CBOR_TAG), + new token_Token(token_Type.bytes, bytes) + ] } +// eslint-disable-next-line jsdoc/require-returns-check /** - * @param {BodyInit | NodeReadableStream} input + * Intercept all `undefined` values from an object walk and reject the entire + * object if we find one. + * + * @returns {null} */ -const normalizeBody = (input) => { - if (input instanceof ArrayBuffer) { - return Buffer.from(input) - } else if (ArrayBuffer.isView(input)) { - return Buffer.from(input.buffer, input.byteOffset, input.byteLength) - } else if (typeof input === 'string') { - return Buffer.from(input) - } - return input +function undefinedEncoder () { + throw new Error('`undefined` is not supported by the IPLD Data Model and cannot be encoded') } /** - * Takes body from native-fetch response as body and `onUploadProgress` handler - * and returns async iterable that emits body chunks and emits - * `onUploadProgress`. + * Intercept all `number` values from an object walk and reject the entire + * object if we find something that doesn't fit the IPLD data model (NaN & + * Infinity). * - * @param {NodeReadableStream | null} body - * @param {ProgressFn} onUploadProgress - * @returns {AsyncIterable} + * @param {number} num + * @returns {null} */ -const iterateBodyWithProgress = async function * (body, onUploadProgress) { - if (body == null) { - onUploadProgress({ total: 0, loaded: 0, lengthComputable: true }) - } else if (Buffer.isBuffer(body)) { - const total = body.byteLength - const lengthComputable = true - yield body - onUploadProgress({ total, loaded: total, lengthComputable }) - } else { - const total = 0 - const lengthComputable = false - let loaded = 0 - for await (const chunk of body) { - loaded += chunk.byteLength - yield chunk - onUploadProgress({ total, loaded, lengthComputable }) - } +function numberEncoder (num) { + if (Number.isNaN(num)) { + throw new Error('`NaN` is not supported by the IPLD Data Model and cannot be encoded') + } + if (num === Infinity || num === -Infinity) { + throw new Error('`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded') } + return null } -module.exports = { - fetch, - Request, - Headers +const encodeOptions = { + float64: true, + typeEncoders: { + Object: cidEncoder, + undefined: undefinedEncoder, + number: numberEncoder + } } +/** + * @param {Uint8Array} bytes + * @returns {CID} + */ +function cidDecoder (bytes) { + if (bytes[0] !== 0) { + throw new Error('Invalid CID for CBOR tag 42; expected leading 0x00') + } + return src_cid_CID.decode(bytes.subarray(1)) // ignore leading 0x00 +} -/***/ }), - -/***/ 78002: -/***/ ((module) => { - -// https://github.com/electron/electron/issues/2288 -function isElectron() { - // Renderer process - if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') { - return true; - } - - // Main process - if (typeof process !== 'undefined' && typeof process.versions === 'object' && !!process.versions.electron) { - return true; - } - - // Detect the user agent when the `nodeIntegration` option is set to false - if (typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Electron') >= 0) { - return true; - } - - return false; +const decodeOptions = { + allowIndefinite: false, + coerceUndefinedToNull: true, + allowNaN: false, + allowInfinity: false, + allowBigInt: true, // this will lead to BigInt for ints outside of + // safe-integer range, which may surprise users + strict: true, + useMaps: false, + rejectDuplicateMapKeys: true, + /** @type {import('cborg').TagDecoder[]} */ + tags: [] } +decodeOptions.tags[CID_CBOR_TAG] = cidDecoder -module.exports = isElectron; +const dag_cbor_src_name = 'dag-cbor' +const src_code = 0x71 +/** + * @template T + * @param {T} node + * @returns {ByteView} + */ +const dag_cbor_src_encode = (node) => encode_encode(node, encodeOptions) -/***/ }), +/** + * @template T + * @param {ByteView} data + * @returns {T} + */ +const dag_cbor_src_decode = (data) => decode_decode(data, decodeOptions) -/***/ 89837: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/cborg/lib/json/encode.js -"use strict"; -const ipRegex = __nccwpck_require__(94807); -const isIp = string => ipRegex({exact: true}).test(string); -isIp.v4 = string => ipRegex.v4({exact: true}).test(string); -isIp.v6 = string => ipRegex.v6({exact: true}).test(string); -isIp.version = string => isIp(string) ? (isIp.v4(string) ? 4 : 6) : undefined; -module.exports = isIp; +/** + * @typedef {import('../../interface').EncodeOptions} EncodeOptions + * @typedef {import('../token').Token} Token + * @typedef {import('../bl').Bl} Bl + */ -/***/ }), +class JSONEncoder extends Array { + constructor () { + super() + /** @type {{type:Type,elements:number}[]} */ + this.inRecursive = [] + } -/***/ 87873: -/***/ ((module) => { + /** + * @param {Bl} buf + */ + prefix (buf) { + const recurs = this.inRecursive[this.inRecursive.length - 1] + if (recurs) { + if (recurs.type === token_Type.array) { + recurs.elements++ + if (recurs.elements !== 1) { // >first + buf.push([44]) // ',' + } + } + if (recurs.type === token_Type.map) { + recurs.elements++ + if (recurs.elements !== 1) { // >first + if (recurs.elements % 2 === 1) { // key + buf.push([44]) // ',' + } else { + buf.push([58]) // ':' + } + } + } + } + } -"use strict"; + /** + * @param {Bl} buf + * @param {Token} token + */ + [token_Type.uint.major] (buf, token) { + this.prefix(buf) + const is = String(token.value) + const isa = [] + for (let i = 0; i < is.length; i++) { + isa[i] = is.charCodeAt(i) + } + buf.push(isa) + } + /** + * @param {Bl} buf + * @param {Token} token + */ + [token_Type.negint.major] (buf, token) { + // @ts-ignore hack + this[token_Type.uint.major](buf, token) + } -module.exports = value => { - if (Object.prototype.toString.call(value) !== '[object Object]') { - return false; - } + /** + * @param {Bl} _buf + * @param {Token} _token + */ + [token_Type.bytes.major] (_buf, _token) { + throw new Error(`${encodeErrPrefix} unsupported type: Uint8Array`) + } - const prototype = Object.getPrototypeOf(value); - return prototype === null || prototype === Object.prototype; -}; + /** + * @param {Bl} buf + * @param {Token} token + */ + [token_Type.string.major] (buf, token) { + this.prefix(buf) + // buf.push(34) // '"' + // encodeUtf8(token.value, byts) + // buf.push(34) // '"' + const byts = byte_utils_fromString(JSON.stringify(token.value)) + buf.push(byts.length > 32 ? asU8A(byts) : byts) + } + /** + * @param {Bl} buf + * @param {Token} _token + */ + [token_Type.array.major] (buf, _token) { + this.prefix(buf) + this.inRecursive.push({ type: token_Type.array, elements: 0 }) + buf.push([91]) // '[' + } -/***/ }), + /** + * @param {Bl} buf + * @param {Token} _token + */ + [token_Type.map.major] (buf, _token) { + this.prefix(buf) + this.inRecursive.push({ type: token_Type.map, elements: 0 }) + buf.push([123]) // '{' + } -/***/ 9551: -/***/ ((__unused_webpack_module, exports) => { + /** + * @param {Bl} _buf + * @param {Token} _token + */ + [token_Type.tag.major] (_buf, _token) {} -"use strict"; + /** + * @param {Bl} buf + * @param {Token} token + */ + [token_Type.float.major] (buf, token) { + if (token.type.name === 'break') { + const recurs = this.inRecursive.pop() + if (recurs) { + if (recurs.type === token_Type.array) { + buf.push([93]) // ']' + } else if (recurs.type === token_Type.map) { + buf.push([125]) // '}' + /* c8 ignore next 3 */ + } else { + throw new Error('Unexpected recursive type; this should not happen!') + } + return + } + /* c8 ignore next 2 */ + throw new Error('Unexpected break; this should not happen!') + } + if (token.value === undefined) { + throw new Error(`${encodeErrPrefix} unsupported type: undefined`) + } + this.prefix(buf) + if (token.type.name === 'true') { + buf.push([116, 114, 117, 101]) // 'true' + return + } else if (token.type.name === 'false') { + buf.push([102, 97, 108, 115, 101]) // 'false' + return + } else if (token.type.name === 'null') { + buf.push([110, 117, 108, 108]) // 'null' + return + } -Object.defineProperty(exports, "__esModule", ({ value: true })); + // number + const is = String(token.value) + const isa = [] + let dp = false + for (let i = 0; i < is.length; i++) { + isa[i] = is.charCodeAt(i) + if (!dp && (isa[i] === 46 || isa[i] === 101 || isa[i] === 69)) { // '[.eE]' + dp = true + } + } + if (!dp) { // need a decimal point for floats + isa.push(46) // '.' + isa.push(48) // '0' + } + buf.push(isa) + } +} + +// The below code is mostly taken and modified from https://github.com/feross/buffer +// Licensed MIT. Copyright (c) Feross Aboukhadijeh +// function encodeUtf8 (string, byts) { +// let codePoint +// const length = string.length +// let leadSurrogate = null + +// for (let i = 0; i < length; ++i) { +// codePoint = string.charCodeAt(i) + +// // is surrogate component +// if (codePoint > 0xd7ff && codePoint < 0xe000) { +// // last char was a lead +// if (!leadSurrogate) { +// // no lead yet +// /* c8 ignore next 9 */ +// if (codePoint > 0xdbff) { +// // unexpected trail +// byts.push(0xef, 0xbf, 0xbd) +// continue +// } else if (i + 1 === length) { +// // unpaired lead +// byts.push(0xef, 0xbf, 0xbd) +// continue +// } + +// // valid lead +// leadSurrogate = codePoint + +// continue +// } + +// // 2 leads in a row +// /* c8 ignore next 5 */ +// if (codePoint < 0xdc00) { +// byts.push(0xef, 0xbf, 0xbd) +// leadSurrogate = codePoint +// continue +// } + +// // valid surrogate pair +// codePoint = (leadSurrogate - 0xd800 << 10 | codePoint - 0xdc00) + 0x10000 +// /* c8 ignore next 4 */ +// } else if (leadSurrogate) { +// // valid bmp char, but last char was a lead +// byts.push(0xef, 0xbf, 0xbd) +// } + +// leadSurrogate = null + +// // encode utf8 +// if (codePoint < 0x80) { +// // special JSON escapes +// switch (codePoint) { +// case 8: // '\b' +// byts.push(92, 98) // '\\b' +// continue +// case 9: // '\t' +// byts.push(92, 116) // '\\t' +// continue +// case 10: // '\n' +// byts.push(92, 110) // '\\n' +// continue +// case 12: // '\f' +// byts.push(92, 102) // '\\f' +// continue +// case 13: // '\r' +// byts.push(92, 114) // '\\r' +// continue +// case 34: // '"' +// byts.push(92, 34) // '\\"' +// continue +// case 92: // '\\' +// byts.push(92, 92) // '\\\\' +// continue +// } + +// byts.push(codePoint) +// } else if (codePoint < 0x800) { +// /* c8 ignore next 1 */ +// byts.push( +// codePoint >> 0x6 | 0xc0, +// codePoint & 0x3f | 0x80 +// ) +// } else if (codePoint < 0x10000) { +// /* c8 ignore next 1 */ +// byts.push( +// codePoint >> 0xc | 0xe0, +// codePoint >> 0x6 & 0x3f | 0x80, +// codePoint & 0x3f | 0x80 +// ) +// /* c8 ignore next 9 */ +// } else if (codePoint < 0x110000) { +// byts.push( +// codePoint >> 0x12 | 0xf0, +// codePoint >> 0xc & 0x3f | 0x80, +// codePoint >> 0x6 & 0x3f | 0x80, +// codePoint & 0x3f | 0x80 +// ) +// } else { +// /* c8 ignore next 2 */ +// throw new Error('Invalid code point') +// } +// } +// } -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. +/** + * @param {(Token|Token[])[]} e1 + * @param {(Token|Token[])[]} e2 + * @returns {number} */ - -function isObject(o) { - return Object.prototype.toString.call(o) === '[object Object]'; -} - -function isPlainObject(o) { - var ctor,prot; - - if (isObject(o) === false) return false; - - // If has modified constructor - ctor = o.constructor; - if (ctor === undefined) return true; - - // If has modified prototype - prot = ctor.prototype; - if (isObject(prot) === false) return false; - - // If constructor does not have an Object-specific method - if (prot.hasOwnProperty('isPrototypeOf') === false) { - return false; +function encode_mapSorter (e1, e2) { + if (Array.isArray(e1[0]) || Array.isArray(e2[0])) { + throw new Error(`${encodeErrPrefix} complex map keys are not supported`) } - - // Most likely a plain Object - return true; + const keyToken1 = e1[0] + const keyToken2 = e2[0] + if (keyToken1.type !== token_Type.string || keyToken2.type !== token_Type.string) { + throw new Error(`${encodeErrPrefix} non-string map keys are not supported`) + } + if (keyToken1 < keyToken2) { + return -1 + } + if (keyToken1 > keyToken2) { + return 1 + } + /* c8 ignore next 1 */ + throw new Error(`${encodeErrPrefix} unexpected duplicate map keys, this is not supported`) } -exports.isPlainObject = isPlainObject; - - -/***/ }), - -/***/ 51252: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { randomBytes } = __nccwpck_require__(6113) - -module.exports = randomBytes - - -/***/ }), - -/***/ 2003: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { - URLWithLegacySupport, - format, - URLSearchParams, - defaultBase -} = __nccwpck_require__(3197) -const relative = __nccwpck_require__(37043) +const encode_defaultEncodeOptions = { addBreakTokens: true, mapSorter: encode_mapSorter } -module.exports = { - URL: URLWithLegacySupport, - URLSearchParams, - format, - relative, - defaultBase +/** + * @param {any} data + * @param {EncodeOptions} [options] + * @returns {Uint8Array} + */ +function json_encode_encode (data, options) { + options = Object.assign({}, encode_defaultEncodeOptions, options) + return encodeCustom(data, new JSONEncoder(), options) } -/***/ }), -/***/ 37043: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/cborg/lib/json/decode.js + -"use strict"; -const { URLWithLegacySupport, format } = __nccwpck_require__(3197) /** - * @param {string | undefined} url - * @param {any} [location] - * @param {any} [protocolMap] - * @param {any} [defaultProtocol] + * @typedef {import('../../interface').DecodeOptions} DecodeOptions + * @typedef {import('../../interface').DecodeTokenizer} DecodeTokenizer */ -module.exports = (url, location = {}, protocolMap = {}, defaultProtocol) => { - let protocol = location.protocol - ? location.protocol.replace(':', '') - : 'http' - - // Check protocol map - protocol = (protocolMap[protocol] || defaultProtocol || protocol) + ':' - let urlParsed - try { - urlParsed = new URLWithLegacySupport(url) - } catch (err) { - urlParsed = {} +/** + * @implements {DecodeTokenizer} + */ +class Tokenizer { + /** + * @param {Uint8Array} data + * @param {DecodeOptions} options + */ + constructor (data, options = {}) { + this._pos = 0 + this.data = data + this.options = options + /** @type {string[]} */ + this.modeStack = ['value'] + this.lastToken = '' } - const base = Object.assign({}, location, { - protocol: protocol || urlParsed.protocol, - host: location.host || urlParsed.host - }) - - return new URLWithLegacySupport(url, format(base)).toString() -} - - -/***/ }), - -/***/ 3197: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const { URL, URLSearchParams, format } = __nccwpck_require__(57310) - -// https://github.com/nodejs/node/issues/12682 -const defaultBase = 'http://localhost' - -class URLWithLegacySupport extends URL { - constructor (url = '', base = defaultBase) { - super(url, base) - this.path = this.pathname + this.search - this.auth = - this.username && this.password - ? this.username + ':' + this.password - : null - this.query = - this.search && this.search.startsWith('?') - ? this.search.slice(1) - : null + pos () { + return this._pos } - format () { - return this.toString() + /** + * @returns {boolean} + */ + done () { + return this._pos >= this.data.length } -} - -module.exports = { - URLWithLegacySupport, - URLSearchParams, - format, - defaultBase -} + /** + * @returns {number} + */ + ch () { + return this.data[this._pos] + } -/***/ }), + /** + * @returns {string} + */ + currentMode () { + return this.modeStack[this.modeStack.length - 1] + } -/***/ 81172: -/***/ ((module) => { + skipWhitespace () { + let c = this.ch() + // @ts-ignore + while (c === 32 /* ' ' */ || c === 9 /* '\t' */ || c === 13 /* '\r' */ || c === 10 /* '\n' */) { + c = this.data[++this._pos] + } + } -"use strict"; + /** + * @param {number[]} str + */ + expect (str) { + if (this.data.length - this._pos < str.length) { + throw new Error(`${decodeErrPrefix} unexpected end of input at position ${this._pos}`) + } + for (let i = 0; i < str.length; i++) { + if (this.data[this._pos++] !== str[i]) { + throw new Error(`${decodeErrPrefix} unexpected token at position ${this._pos}, expected to find '${String.fromCharCode(...str)}'`) + } + } + } + parseNumber () { + const startPos = this._pos + let negative = false + let float = false -/** - * Collects all values from an (async) iterable into an array and returns it. - * - * @template T - * @param {AsyncIterable|Iterable} source - */ -const all = async (source) => { - const arr = [] + /** + * @param {number[]} chars + */ + const swallow = (chars) => { + while (!this.done()) { + const ch = this.ch() + if (chars.includes(ch)) { + this._pos++ + } else { + break + } + } + } - for await (const entry of source) { - arr.push(entry) + // lead + if (this.ch() === 45) { // '-' + negative = true + this._pos++ + } + if (this.ch() === 48) { // '0' + this._pos++ + if (this.ch() === 46) { // '.' + this._pos++ + float = true + } else { + return new token_Token(token_Type.uint, 0, this._pos - startPos) + } + } + swallow([48, 49, 50, 51, 52, 53, 54, 55, 56, 57]) // DIGIT + if (negative && this._pos === startPos + 1) { + throw new Error(`${decodeErrPrefix} unexpected token at position ${this._pos}`) + } + if (!this.done() && this.ch() === 46) { // '.' + if (float) { + throw new Error(`${decodeErrPrefix} unexpected token at position ${this._pos}`) + } + float = true + this._pos++ + swallow([48, 49, 50, 51, 52, 53, 54, 55, 56, 57]) // DIGIT + } + if (!this.done() && (this.ch() === 101 || this.ch() === 69)) { // '[eE]' + float = true + this._pos++ + if (!this.done() && (this.ch() === 43 || this.ch() === 45)) { // '+', '-' + this._pos++ + } + swallow([48, 49, 50, 51, 52, 53, 54, 55, 56, 57]) // DIGIT + } + // @ts-ignore + const numStr = String.fromCharCode.apply(null, this.data.subarray(startPos, this._pos)) + const num = parseFloat(numStr) + if (float) { + return new token_Token(token_Type.float, num, this._pos - startPos) + } + if (this.options.allowBigInt !== true || Number.isSafeInteger(num)) { + return new token_Token(num >= 0 ? token_Type.uint : token_Type.negint, num, this._pos - startPos) + } + return new token_Token(num >= 0 ? token_Type.uint : token_Type.negint, BigInt(numStr), this._pos - startPos) } - return arr -} + /** + * @returns {Token} + */ + parseString () { + /* c8 ignore next 4 */ + if (this.ch() !== 34) { // '"' + // this would be a programming error + throw new Error(`${decodeErrPrefix} unexpected character at position ${this._pos}; this shouldn't happen`) + } + this._pos++ + + // check for simple fast-path, all printable ascii, no escapes + // >0x10000 elements may fail fn.apply() (http://stackoverflow.com/a/22747272/680742) + for (let i = this._pos, l = 0; i < this.data.length && l < 0x10000; i++, l++) { + const ch = this.data[i] + if (ch === 92 || ch < 32 || ch >= 128) { // '\', ' ', control-chars or non-trivial + break + } + if (ch === 34) { // '"' + // @ts-ignore + const str = String.fromCharCode.apply(null, this.data.subarray(this._pos, i)) + this._pos = i + 1 + return new token_Token(token_Type.string, str, l) + } + } -module.exports = all + const startPos = this._pos + const chars = [] + const readu4 = () => { + if (this._pos + 4 >= this.data.length) { + throw new Error(`${decodeErrPrefix} unexpected end of unicode escape sequence at position ${this._pos}`) + } + let u4 = 0 + for (let i = 0; i < 4; i++) { + let ch = this.ch() + if (ch >= 48 && ch <= 57) { // '0' && '9' + ch -= 48 + } else if (ch >= 97 && ch <= 102) { // 'a' && 'f' + ch = ch - 97 + 10 + } else if (ch >= 65 && ch <= 70) { // 'A' && 'F' + ch = ch - 65 + 10 + } else { + throw new Error(`${decodeErrPrefix} unexpected unicode escape character at position ${this._pos}`) + } + u4 = u4 * 16 + ch + this._pos++ + } + return u4 + } -/***/ }), + // mostly taken from feross/buffer and adjusted to fit + const readUtf8Char = () => { + const firstByte = this.ch() + let codePoint = null + /* c8 ignore next 1 */ + let bytesPerSequence = (firstByte > 0xef) ? 4 : (firstByte > 0xdf) ? 3 : (firstByte > 0xbf) ? 2 : 1 -/***/ 58611: -/***/ ((module) => { + if (this._pos + bytesPerSequence > this.data.length) { + throw new Error(`${decodeErrPrefix} unexpected unicode sequence at position ${this._pos}`) + } -"use strict"; + let secondByte, thirdByte, fourthByte, tempCodePoint + switch (bytesPerSequence) { + /* c8 ignore next 6 */ + // this case is dealt with by the caller function + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = this.data[this._pos + 1] + if ((secondByte & 0xc0) === 0x80) { + tempCodePoint = (firstByte & 0x1f) << 0x6 | (secondByte & 0x3f) + if (tempCodePoint > 0x7f) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = this.data[this._pos + 1] + thirdByte = this.data[this._pos + 2] + if ((secondByte & 0xc0) === 0x80 && (thirdByte & 0xc0) === 0x80) { + tempCodePoint = (firstByte & 0xf) << 0xc | (secondByte & 0x3f) << 0x6 | (thirdByte & 0x3f) + /* c8 ignore next 3 */ + if (tempCodePoint > 0x7ff && (tempCodePoint < 0xd800 || tempCodePoint > 0xdfff)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = this.data[this._pos + 1] + thirdByte = this.data[this._pos + 2] + fourthByte = this.data[this._pos + 3] + if ((secondByte & 0xc0) === 0x80 && (thirdByte & 0xc0) === 0x80 && (fourthByte & 0xc0) === 0x80) { + tempCodePoint = (firstByte & 0xf) << 0x12 | (secondByte & 0x3f) << 0xc | (thirdByte & 0x3f) << 0x6 | (fourthByte & 0x3f) + if (tempCodePoint > 0xffff && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } -/** - * Takes an (async) iterable that emits things and returns an async iterable that - * emits those things in fixed-sized batches. - * - * @template T - * @param {AsyncIterable|Iterable} source - * @param {number} [size=1] - * @returns {AsyncIterable} - */ -async function * batch (source, size = 1) { - /** @type {T[]} */ - let things = [] + /* c8 ignore next 5 */ + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xfffd + bytesPerSequence = 1 + } else if (codePoint > 0xffff) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + chars.push(codePoint >>> 10 & 0x3ff | 0xd800) + codePoint = 0xdc00 | codePoint & 0x3ff + } - if (size < 1) { - size = 1 - } + chars.push(codePoint) + this._pos += bytesPerSequence + } - for await (const thing of source) { - things.push(thing) + // TODO: could take the approach of a quick first scan for special chars like encoding/json/decode.go#unquoteBytes + // and converting all of the ascii chars from the base array in bulk + while (!this.done()) { + const ch = this.ch() + let ch1 + switch (ch) { + case 92: // '\' + this._pos++ + if (this.done()) { + throw new Error(`${decodeErrPrefix} unexpected string termination at position ${this._pos}`) + } + ch1 = this.ch() + this._pos++ + switch (ch1) { + case 34: // '"' + case 39: // '\'' + case 92: // '\' + case 47: // '/' + chars.push(ch1) + break + case 98: // 'b' + chars.push(8) + break + case 116: // 't' + chars.push(9) + break + case 110: // 'n' + chars.push(10) + break + case 102: // 'f' + chars.push(12) + break + case 114: // 'r' + chars.push(13) + break + case 117: // 'u' + chars.push(readu4()) + break + default: + throw new Error(`${decodeErrPrefix} unexpected string escape character at position ${this._pos}`) + } + break + case 34: // '"' + this._pos++ + return new token_Token(token_Type.string, decodeCodePointsArray(chars), this._pos - startPos) + default: + if (ch < 32) { // ' ' + throw new Error(`${decodeErrPrefix} invalid control character at position ${this._pos}`) + } else if (ch < 0x80) { + chars.push(ch) + this._pos++ + } else { + readUtf8Char() + } + } + } - while (things.length >= size) { - yield things.slice(0, size) + throw new Error(`${decodeErrPrefix} unexpected end of string at position ${this._pos}`) + } - things = things.slice(size) + /** + * @returns {Token} + */ + parseValue () { + switch (this.ch()) { + case 123: // '{' + this.modeStack.push('obj-start') + this._pos++ + return new token_Token(token_Type.map, Infinity, 1) + case 91: // '[' + this.modeStack.push('array-start') + this._pos++ + return new token_Token(token_Type.array, Infinity, 1) + case 34: { // '"' + return this.parseString() + } + case 110: // 'n' / null + this.expect([110, 117, 108, 108]) // 'null' + return new token_Token(token_Type["null"], null, 4) + case 102: // 'f' / // false + this.expect([102, 97, 108, 115, 101]) // 'false' + return new token_Token(token_Type["false"], false, 5) + case 116: // 't' / // true + this.expect([116, 114, 117, 101]) // 'true' + return new token_Token(token_Type["true"], true, 4) + case 45: // '-' + case 48: // '0' + case 49: // '1' + case 50: // '2' + case 51: // '3' + case 52: // '4' + case 53: // '5' + case 54: // '6' + case 55: // '7' + case 56: // '8' + case 57: // '9' + return this.parseNumber() + default: + throw new Error(`${decodeErrPrefix} unexpected character at position ${this._pos}`) } } - while (things.length) { - yield things.slice(0, size) - - things = things.slice(size) + /** + * @returns {Token} + */ + next () { + this.skipWhitespace() + switch (this.currentMode()) { + case 'value': + this.modeStack.pop() + return this.parseValue() + case 'array-value': { + this.modeStack.pop() + if (this.ch() === 93) { // ']' + this._pos++ + this.skipWhitespace() + return new token_Token(token_Type["break"], undefined, 1) + } + if (this.ch() !== 44) { // ',' + throw new Error(`${decodeErrPrefix} unexpected character at position ${this._pos}, was expecting array delimiter but found '${String.fromCharCode(this.ch())}'`) + } + this._pos++ + this.modeStack.push('array-value') + this.skipWhitespace() + return this.parseValue() + } + case 'array-start': { + this.modeStack.pop() + if (this.ch() === 93) { // ']' + this._pos++ + this.skipWhitespace() + return new token_Token(token_Type["break"], undefined, 1) + } + this.modeStack.push('array-value') + this.skipWhitespace() + return this.parseValue() + } + // @ts-ignore + case 'obj-key': + if (this.ch() === 125) { // '}' + this.modeStack.pop() + this._pos++ + this.skipWhitespace() + return new token_Token(token_Type["break"], undefined, 1) + } + if (this.ch() !== 44) { // ',' + throw new Error(`${decodeErrPrefix} unexpected character at position ${this._pos}, was expecting object delimiter but found '${String.fromCharCode(this.ch())}'`) + } + this._pos++ + this.skipWhitespace() + case 'obj-start': { // eslint-disable-line no-fallthrough + this.modeStack.pop() + if (this.ch() === 125) { // '}' + this._pos++ + this.skipWhitespace() + return new token_Token(token_Type["break"], undefined, 1) + } + const token = this.parseString() + this.skipWhitespace() + if (this.ch() !== 58) { // ':' + throw new Error(`${decodeErrPrefix} unexpected character at position ${this._pos}, was expecting key/value delimiter ':' but found '${String.fromCharCode(this.ch())}'`) + } + this._pos++ + this.modeStack.push('obj-value') + return token + } + case 'obj-value': { + this.modeStack.pop() + this.modeStack.push('obj-key') + this.skipWhitespace() + return this.parseValue() + } + /* c8 ignore next 2 */ + default: + throw new Error(`${decodeErrPrefix} unexpected parse state at position ${this._pos}; this shouldn't happen`) + } } } -module.exports = batch - - -/***/ }), - -/***/ 85041: -/***/ ((module) => { - -"use strict"; - - /** - * Drains an (async) iterable discarding its' content and does not return - * anything. - * - * @template T - * @param {AsyncIterable|Iterable} source - * @returns {Promise} + * @param {Uint8Array} data + * @param {DecodeOptions} [options] + * @returns {any} */ -const drain = async (source) => { - for await (const _ of source) { } // eslint-disable-line no-unused-vars,no-empty +function json_decode_decode (data, options) { + options = Object.assign({ tokenizer: new Tokenizer(data, options) }, options) + return decode_decode(data, options) } -module.exports = drain - - -/***/ }), - -/***/ 78883: -/***/ ((module) => { - -"use strict"; - - /** - * Filters the passed (async) iterable by using the filter function - * - * @template T - * @param {AsyncIterable|Iterable} source - * @param {function(T):boolean|Promise} fn + * @param {Uint8Array} data + * @param {DecodeOptions} [options] + * @returns {[any, Uint8Array]} */ -const filter = async function * (source, fn) { - for await (const entry of source) { - if (await fn(entry)) { - yield entry - } - } +function decode_decodeFirst (data, options) { + options = Object.assign({ tokenizer: new Tokenizer(data, options) }, options) + return _decodeFirst(data, options) } -module.exports = filter -/***/ }), +;// CONCATENATED MODULE: ./node_modules/cborg/lib/json/json.js + -/***/ 84103: -/***/ ((module) => { -"use strict"; +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/bytes.js +const src_bytes_empty = new Uint8Array(0); +function src_bytes_toHex(d) { + return d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), ''); +} +function src_bytes_fromHex(hex) { + const hexes = hex.match(/../g); + return hexes != null ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : src_bytes_empty; +} +function src_bytes_equals(aa, bb) { + if (aa === bb) + return true; + if (aa.byteLength !== bb.byteLength) { + return false; + } + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false; + } + } + return true; +} +function dist_src_bytes_coerce(o) { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') + return o; + if (o instanceof ArrayBuffer) + return new Uint8Array(o); + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength); + } + throw new Error('Unknown type, must be binary type'); +} +function src_bytes_isBinary(o) { + return o instanceof ArrayBuffer || ArrayBuffer.isView(o); +} +function src_bytes_fromString(str) { + return new TextEncoder().encode(str); +} +function dist_src_bytes_toString(b) { + return new TextDecoder().decode(b); +} +//# sourceMappingURL=bytes.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/vendor/base-x.js +/* eslint-disable */ +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. /** - * Returns the first result from an (async) iterable, unless empty, in which - * case returns `undefined`. - * - * @template T - * @param {AsyncIterable|Iterable} source + * @param {string} ALPHABET + * @param {any} name */ -const first = async (source) => { - for await (const entry of source) { // eslint-disable-line no-unreachable-loop - return entry - } - - return undefined +function vendor_base_x_base(ALPHABET, name) { + if (ALPHABET.length >= 255) { + throw new TypeError('Alphabet too long'); + } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { + throw new TypeError(x + ' is ambiguous'); + } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + /** + * @param {any[] | Iterable} source + */ + function encode(source) { + // @ts-ignore + if (source instanceof Uint8Array) + ; + else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } + else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { + throw new TypeError('Expected Uint8Array'); + } + if (source.length === 0) { + return ''; + } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { + str += ALPHABET.charAt(b58[it2]); + } + return str; + } + /** + * @param {string | string[]} source + */ + function decodeUnsafe(source) { + if (typeof source !== 'string') { + throw new TypeError('Expected String'); + } + if (source.length === 0) { + return new Uint8Array(); + } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { + return; + } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { + return; + } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { + return; + } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch; + } + /** + * @param {string | string[]} string + */ + function decode(string) { + var buffer = decodeUnsafe(string); + if (buffer) { + return buffer; + } + throw new Error(`Non-${name} character`); + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + }; } +var vendor_base_x_src = vendor_base_x_base; +var vendor_base_x_brrp_multiformats_scope_baseX = vendor_base_x_src; +/* harmony default export */ const src_vendor_base_x = (vendor_base_x_brrp_multiformats_scope_baseX); +//# sourceMappingURL=base-x.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/bases/base.js -module.exports = first - - -/***/ }), - -/***/ 3332: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - - -const fs = (__nccwpck_require__(57147).promises) -const path = __nccwpck_require__(71017) -const minimatch = __nccwpck_require__(71111) /** - * @typedef {string} Glob - * @typedef {object} OptionsExt - * @property {string} [cwd=process.cwd()] - * @property {boolean} [absolute=false] - If true produces absolute paths - * @property {boolean} [nodir] - If true yields file paths and skip directories - * - * @typedef {OptionsExt & minimatch.IOptions} Options + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. */ - +class bases_base_Encoder { + name; + prefix; + baseEncode; + constructor(name, prefix, baseEncode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + } + encode(bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}`; + } + else { + throw Error('Unknown type, must be binary type'); + } + } +} /** - * Async iterable filename pattern matcher - * - * @param {string} dir - * @param {string} pattern - * @param {Options} [options] - * @returns {AsyncIterable} + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. */ -async function * glob (dir, pattern, options = {}) { - const absoluteDir = path.resolve(dir) - const relativeDir = path.relative(options.cwd || process.cwd(), dir) - - const stats = await fs.stat(absoluteDir) - - if (stats.isDirectory()) { - for await (const entry of _glob(absoluteDir, '', pattern, options)) { - yield entry +class bases_base_Decoder { + name; + prefix; + baseDecode; + prefixCodePoint; + constructor(name, prefix, baseDecode) { + this.name = name; + this.prefix = prefix; + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character'); + } + this.prefixCodePoint = prefix.codePointAt(0); + this.baseDecode = baseDecode; + } + decode(text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`); + } + return this.baseDecode(text.slice(this.prefix.length)); + } + else { + throw Error('Can only multibase decode strings'); + } + } + or(decoder) { + return bases_base_or(this, decoder); } - - return - } - - if (minimatch(relativeDir, pattern, options)) { - yield options.absolute ? absoluteDir : relativeDir - } } - +class bases_base_ComposedDecoder { + decoders; + constructor(decoders) { + this.decoders = decoders; + } + or(decoder) { + return bases_base_or(this, decoder); + } + decode(input) { + const prefix = input[0]; + const decoder = this.decoders[prefix]; + if (decoder != null) { + return decoder.decode(input); + } + else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`); + } + } +} +function bases_base_or(left, right) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return new bases_base_ComposedDecoder({ + ...(left.decoders ?? { [left.prefix]: left }), + ...(right.decoders ?? { [right.prefix]: right }) + }); +} +class bases_base_Codec { + name; + prefix; + baseEncode; + baseDecode; + encoder; + decoder; + constructor(name, prefix, baseEncode, baseDecode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + this.baseDecode = baseDecode; + this.encoder = new bases_base_Encoder(name, prefix, baseEncode); + this.decoder = new bases_base_Decoder(name, prefix, baseDecode); + } + encode(input) { + return this.encoder.encode(input); + } + decode(input) { + return this.decoder.decode(input); + } +} +function bases_base_from({ name, prefix, encode, decode }) { + return new bases_base_Codec(name, prefix, encode, decode); +} +function bases_base_baseX({ name, prefix, alphabet }) { + const { encode, decode } = src_vendor_base_x(alphabet, name); + return bases_base_from({ + prefix, + name, + encode, + decode: (text) => dist_src_bytes_coerce(decode(text)) + }); +} +function bases_base_decode(string, alphabet, bitsPerChar, name) { + // Build the character lookup table: + const codes = {}; + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i; + } + // Count the padding bytes: + let end = string.length; + while (string[end - 1] === '=') { + --end; + } + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0); + // Parse the data: + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + let written = 0; // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]]; + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`); + } + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value; + bits += bitsPerChar; + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8; + out[written++] = 0xff & (buffer >> bits); + } + } + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || (0xff & (buffer << (8 - bits))) !== 0) { + throw new SyntaxError('Unexpected end of data'); + } + return out; +} +function bases_base_encode(data, alphabet, bitsPerChar) { + const pad = alphabet[alphabet.length - 1] === '='; + const mask = (1 << bitsPerChar) - 1; + let out = ''; + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i]; + bits += 8; + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar; + out += alphabet[mask & (buffer >> bits)]; + } + } + // Partial character: + if (bits !== 0) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))]; + } + // Add padding characters until we hit a byte boundary: + if (pad) { + while (((out.length * bitsPerChar) & 7) !== 0) { + out += '='; + } + } + return out; +} /** - * @param {string} base - * @param {string} dir - * @param {Glob} pattern - * @param {Options} options - * @returns {AsyncIterable} + * RFC4648 Factory */ -async function * _glob (base, dir, pattern, options) { - for await (const entry of await fs.opendir(path.join(base, dir))) { - const relativeEntryPath = path.join(dir, entry.name) - const absoluteEntryPath = path.join(base, dir, entry.name) - - let match = minimatch(relativeEntryPath, pattern, options) - - const isDirectory = entry.isDirectory() +function bases_base_rfc4648({ name, prefix, bitsPerChar, alphabet }) { + return bases_base_from({ + prefix, + name, + encode(input) { + return bases_base_encode(input, alphabet, bitsPerChar); + }, + decode(input) { + return bases_base_decode(input, alphabet, bitsPerChar, name); + } + }); +} +//# sourceMappingURL=base.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/bases/base32.js - if (isDirectory && options.nodir) { - match = false - } +const src_bases_base32_base32 = bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}); +const src_bases_base32_base32upper = bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}); +const bases_base32_base32pad = bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}); +const bases_base32_base32padupper = bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}); +const bases_base32_base32hex = bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}); +const bases_base32_base32hexupper = bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}); +const bases_base32_base32hexpad = bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}); +const bases_base32_base32hexpadupper = bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}); +const bases_base32_base32z = bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}); +//# sourceMappingURL=base32.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/bases/base58.js - if (match) { - yield options.absolute ? absoluteEntryPath : relativeEntryPath +const src_bases_base58_base58btc = bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}); +const bases_base58_base58flickr = bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}); +//# sourceMappingURL=base58.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/vendor/varint.js +/* eslint-disable */ +var vendor_varint_encode_1 = src_vendor_varint_encode; +var vendor_varint_MSB = 0x80, vendor_varint_REST = 0x7F, vendor_varint_MSBALL = ~vendor_varint_REST, vendor_varint_INT = Math.pow(2, 31); +/** + * @param {number} num + * @param {number[]} out + * @param {number} offset + */ +function src_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while (num >= vendor_varint_INT) { + out[offset++] = (num & 0xFF) | vendor_varint_MSB; + num /= 128; } - - if (isDirectory) { - yield * _glob(base, relativeEntryPath, pattern, options) + while (num & vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | vendor_varint_MSB; + num >>>= 7; } - } + out[offset] = num | 0; + // @ts-ignore + src_vendor_varint_encode.bytes = offset - oldOffset + 1; + return out; } - -module.exports = glob - - -/***/ }), - -/***/ 28741: -/***/ ((module) => { - -"use strict"; - - +var src_vendor_varint_decode = vendor_varint_read; +var vendor_varint_MSB$1 = 0x80, vendor_varint_REST$1 = 0x7F; /** - * Returns the last item of an (async) iterable, unless empty, in which case - * return `undefined`. - * - * @template T - * @param {AsyncIterable|Iterable} source + * @param {string | any[]} buf + * @param {number} offset */ -const last = async (source) => { - let res - - for await (const entry of source) { - res = entry - } - - return res +function vendor_varint_read(buf, offset) { + var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + do { + if (counter >= l) { + // @ts-ignore + vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint'); + } + b = buf[counter++]; + res += shift < 28 + ? (b & vendor_varint_REST$1) << shift + : (b & vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= vendor_varint_MSB$1); + // @ts-ignore + vendor_varint_read.bytes = counter - offset; + return res; } - -module.exports = last - - -/***/ }), - -/***/ 6305: -/***/ ((module) => { - -"use strict"; +var vendor_varint_N1 = Math.pow(2, 7); +var vendor_varint_N2 = Math.pow(2, 14); +var vendor_varint_N3 = Math.pow(2, 21); +var vendor_varint_N4 = Math.pow(2, 28); +var vendor_varint_N5 = Math.pow(2, 35); +var vendor_varint_N6 = Math.pow(2, 42); +var vendor_varint_N7 = Math.pow(2, 49); +var vendor_varint_N8 = Math.pow(2, 56); +var vendor_varint_N9 = Math.pow(2, 63); +var src_vendor_varint_length = function (/** @type {number} */ value) { + return (value < vendor_varint_N1 ? 1 + : value < vendor_varint_N2 ? 2 + : value < vendor_varint_N3 ? 3 + : value < vendor_varint_N4 ? 4 + : value < vendor_varint_N5 ? 5 + : value < vendor_varint_N6 ? 6 + : value < vendor_varint_N7 ? 7 + : value < vendor_varint_N8 ? 8 + : value < vendor_varint_N9 ? 9 + : 10); +}; +var src_vendor_varint_varint = { + encode: vendor_varint_encode_1, + decode: src_vendor_varint_decode, + encodingLength: src_vendor_varint_length +}; +var vendor_varint_brrp_varint = src_vendor_varint_varint; +/* harmony default export */ const dist_src_vendor_varint = (vendor_varint_brrp_varint); +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/varint.js + +function multiformats_dist_src_varint_decode(data, offset = 0) { + const code = dist_src_vendor_varint.decode(data, offset); + return [code, dist_src_vendor_varint.decode.bytes]; +} +function src_varint_encodeTo(int, target, offset = 0) { + dist_src_vendor_varint.encode(int, target, offset); + return target; +} +function src_varint_encodingLength(int) { + return dist_src_vendor_varint.encodingLength(int); +} +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/hashes/digest.js /** - * Takes an (async) iterable and returns one with each item mapped by the passed - * function. - * - * @template I,O - * @param {AsyncIterable|Iterable} source - * @param {function(I):O|Promise} func - * @returns {AsyncIterable} + * Creates a multihash digest. */ -const map = async function * (source, func) { - for await (const val of source) { - yield func(val) - } +function src_hashes_digest_create(code, digest) { + const size = digest.byteLength; + const sizeOffset = src_varint_encodingLength(code); + const digestOffset = sizeOffset + src_varint_encodingLength(size); + const bytes = new Uint8Array(digestOffset + size); + src_varint_encodeTo(code, bytes, 0); + src_varint_encodeTo(size, bytes, sizeOffset); + bytes.set(digest, digestOffset); + return new src_hashes_digest_Digest(code, size, digest, bytes); } +/** + * Turns bytes representation of multihash digest into an instance. + */ +function src_hashes_digest_decode(multihash) { + const bytes = dist_src_bytes_coerce(multihash); + const [code, sizeOffset] = multiformats_dist_src_varint_decode(bytes); + const [size, digestOffset] = multiformats_dist_src_varint_decode(bytes.subarray(sizeOffset)); + const digest = bytes.subarray(sizeOffset + digestOffset); + if (digest.byteLength !== size) { + throw new Error('Incorrect length'); + } + return new src_hashes_digest_Digest(code, size, digest, bytes); +} +function src_hashes_digest_equals(a, b) { + if (a === b) { + return true; + } + else { + const data = b; + return (a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + src_bytes_equals(a.bytes, data.bytes)); + } +} +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + */ +class src_hashes_digest_Digest { + code; + size; + digest; + bytes; + /** + * Creates a multihash digest. + */ + constructor(code, size, digest, bytes) { + this.code = code; + this.size = size; + this.digest = digest; + this.bytes = bytes; + } +} +//# sourceMappingURL=digest.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/cid.js -module.exports = map - - -/***/ }), -/***/ 62898: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -const batch = __nccwpck_require__(58611) +// This way TS will also expose all the types from module -/** - * @template T - * @typedef {{ok:true, value:T}} Success - */ +function src_cid_format(link, base) { + const { bytes, version } = link; + switch (version) { + case 0: + return src_cid_toStringV0(bytes, src_cid_baseCache(link), base ?? src_bases_base58_base58btc.encoder); + default: + return src_cid_toStringV1(bytes, src_cid_baseCache(link), (base ?? src_bases_base32_base32.encoder)); + } +} +function src_cid_toJSON(link) { + return { + '/': src_cid_format(link) + }; +} +function src_cid_fromJSON(json) { + return dist_src_cid_CID.parse(json['/']); +} +const src_cid_cache = new WeakMap(); +function src_cid_baseCache(cid) { + const baseCache = src_cid_cache.get(cid); + if (baseCache == null) { + const baseCache = new Map(); + src_cid_cache.set(cid, baseCache); + return baseCache; + } + return baseCache; +} +class dist_src_cid_CID { + code; + version; + multihash; + bytes; + '/'; + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param multihash - (Multi)hash of the of the content. + */ + constructor(version, code, multihash, bytes) { + this.code = code; + this.version = version; + this.multihash = multihash; + this.bytes = bytes; + // flag to serializers that this is a CID and + // should be treated specially + this['/'] = bytes; + } + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID() { + return this; + } + // ArrayBufferView + get byteOffset() { + return this.bytes.byteOffset; + } + // ArrayBufferView + get byteLength() { + return this.bytes.byteLength; + } + toV0() { + switch (this.version) { + case 0: { + return this; + } + case 1: { + const { code, multihash } = this; + if (code !== src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0'); + } + // sha2-256 + if (multihash.code !== src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0'); + } + return (dist_src_cid_CID.createV0(multihash)); + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`); + } + } + } + toV1() { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash; + const multihash = src_hashes_digest_create(code, digest); + return (dist_src_cid_CID.createV1(this.code, multihash)); + } + case 1: { + return this; + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`); + } + } + } + equals(other) { + return dist_src_cid_CID.equals(this, other); + } + static equals(self, other) { + const unknown = other; + return (unknown != null && + self.code === unknown.code && + self.version === unknown.version && + src_hashes_digest_equals(self.multihash, unknown.multihash)); + } + toString(base) { + return src_cid_format(this, base); + } + toJSON() { + return { '/': src_cid_format(this) }; + } + link() { + return this; + } + [Symbol.toStringTag] = 'CID'; + // Legacy + [Symbol.for('nodejs.util.inspect.custom')]() { + return `CID(${this.toString()})`; + } + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + */ + static asCID(input) { + if (input == null) { + return null; + } + const value = input; + if (value instanceof dist_src_cid_CID) { + // If value is instance of CID then we're all set. + return value; + } + else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value; + return new dist_src_cid_CID(version, code, multihash, bytes ?? src_cid_encodeCID(version, code, multihash.bytes)); + } + else if (value[src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value; + const digest = src_hashes_digest_decode(multihash); + return dist_src_cid_CID.create(version, code, digest); + } + else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null; + } + } + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param digest - (Multi)hash of the of the content. + */ + static create(version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported'); + } + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest'); + } + switch (version) { + case 0: { + if (code !== src_cid_DAG_PB_CODE) { + throw new Error(`Version 0 CID must use dag-pb (code: ${src_cid_DAG_PB_CODE}) block encoding`); + } + else { + return new dist_src_cid_CID(version, code, digest, digest.bytes); + } + } + case 1: { + const bytes = src_cid_encodeCID(version, code, digest.bytes); + return new dist_src_cid_CID(version, code, digest, bytes); + } + default: { + throw new Error('Invalid version'); + } + } + } + /** + * Simplified version of `create` for CIDv0. + */ + static createV0(digest) { + return dist_src_cid_CID.create(0, src_cid_DAG_PB_CODE, digest); + } + /** + * Simplified version of `create` for CIDv1. + * + * @param code - Content encoding format code. + * @param digest - Multihash of the content. + */ + static createV1(code, digest) { + return dist_src_cid_CID.create(1, code, digest); + } + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + */ + static decode(bytes) { + const [cid, remainder] = dist_src_cid_CID.decodeFirst(bytes); + if (remainder.length !== 0) { + throw new Error('Incorrect length'); + } + return cid; + } + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + */ + static decodeFirst(bytes) { + const specs = dist_src_cid_CID.inspectBytes(bytes); + const prefixSize = specs.size - specs.multihashSize; + const multihashBytes = dist_src_bytes_coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize)); + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length'); + } + const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize); + const digest = new src_hashes_digest_Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes); + const cid = specs.version === 0 + ? dist_src_cid_CID.createV0(digest) + : dist_src_cid_CID.createV1(specs.codec, digest); + return [cid, bytes.subarray(specs.size)]; + } + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + */ + static inspectBytes(initialBytes) { + let offset = 0; + const next = () => { + const [i, length] = multiformats_dist_src_varint_decode(initialBytes.subarray(offset)); + offset += length; + return i; + }; + let version = next(); + let codec = src_cid_DAG_PB_CODE; + if (version === 18) { + // CIDv0 + version = 0; + offset = 0; + } + else { + codec = next(); + } + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`); + } + const prefixSize = offset; + const multihashCode = next(); // multihash code + const digestSize = next(); // multihash length + const size = offset + digestSize; + const multihashSize = size - prefixSize; + return { version, codec, multihashCode, digestSize, multihashSize, size }; + } + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + */ + static parse(source, base) { + const [prefix, bytes] = src_cid_parseCIDtoBytes(source, base); + const cid = dist_src_cid_CID.decode(bytes); + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix'); + } + // Cache string representation to avoid computing it on `this.toString()` + src_cid_baseCache(cid).set(prefix, source); + return cid; + } +} +function src_cid_parseCIDtoBytes(source, base) { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base ?? src_bases_base58_base58btc; + return [ + src_bases_base58_base58btc.prefix, + decoder.decode(`${src_bases_base58_base58btc.prefix}${source}`) + ]; + } + case src_bases_base58_base58btc.prefix: { + const decoder = base ?? src_bases_base58_base58btc; + return [src_bases_base58_base58btc.prefix, decoder.decode(source)]; + } + case src_bases_base32_base32.prefix: { + const decoder = base ?? src_bases_base32_base32; + return [src_bases_base32_base32.prefix, decoder.decode(source)]; + } + default: { + if (base == null) { + throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided'); + } + return [source[0], base.decode(source)]; + } + } +} +function src_cid_toStringV0(bytes, cache, base) { + const { prefix } = base; + if (prefix !== src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`); + } + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes).slice(1); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +function src_cid_toStringV1(bytes, cache, base) { + const { prefix } = base; + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +const src_cid_DAG_PB_CODE = 0x70; +const src_cid_SHA_256_CODE = 0x12; +function src_cid_encodeCID(version, code, multihash) { + const codeOffset = src_varint_encodingLength(version); + const hashOffset = codeOffset + src_varint_encodingLength(code); + const bytes = new Uint8Array(hashOffset + multihash.byteLength); + src_varint_encodeTo(version, bytes, 0); + src_varint_encodeTo(code, bytes, codeOffset); + bytes.set(multihash, hashOffset); + return bytes; +} +const src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID'); +//# sourceMappingURL=cid.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/hashes/hasher.js +function hasher_from({ name, code, encode }) { + return new Hasher(name, code, encode); +} /** - * @typedef {{ok:false, err:Error}} Failure + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. */ - +class Hasher { + name; + code; + encode; + constructor(name, code, encode) { + this.name = name; + this.code = code; + this.encode = encode; + } + digest(input) { + if (input instanceof Uint8Array) { + const result = this.encode(input); + return result instanceof Uint8Array + ? Digest.create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => Digest.create(this.code, digest)); + } + else { + throw Error('Unknown type, must be binary type'); + /* c8 ignore next 1 */ + } + } +} +//# sourceMappingURL=hasher.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/index.js /** - * Takes an (async) iterator that emits promise-returning functions, - * invokes them in parallel and emits the results as they become available but - * in the same order as the input + * @packageDocumentation + * + * This library defines common interfaces and low level building blocks for various interrelated multiformat technologies (multicodec, multihash, multibase, and CID). They can be used to implement custom base encoders / decoders / codecs, codec encoders /decoders and multihash hashers that comply to the interface that layers above assume. + * + * This library provides implementations for most basics and many others can be found in linked repositories. + * + * ```TypeScript + * import { CID } from 'multiformats/cid' + * import * as json from 'multiformats/codecs/json' + * import { sha256 } from 'multiformats/hashes/sha2' + * + * const bytes = json.encode({ hello: 'world' }) + * + * const hash = await sha256.digest(bytes) + * const cid = CID.create(1, json.code, hash) + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * ``` + * + * ## Creating Blocks + * + * ```TypeScript + * import * as Block from 'multiformats/block' + * import * as codec from '@ipld/dag-cbor' + * import { sha256 as hasher } from 'multiformats/hashes/sha2' + * + * const value = { hello: 'world' } + * + * // encode a block + * let block = await Block.encode({ value, codec, hasher }) + * + * block.value // { hello: 'world' } + * block.bytes // Uint8Array + * block.cid // CID() w/ sha2-256 hash address and dag-cbor codec + * + * // you can also decode blocks from their binary state + * block = await Block.decode({ bytes: block.bytes, codec, hasher }) + * + * // if you have the cid you can also verify the hash on decode + * block = await Block.create({ bytes: block.bytes, cid: block.cid, codec, hasher }) + * ``` + * + * ## Multibase Encoders / Decoders / Codecs + * + * CIDs can be serialized to string representation using multibase encoders that implement [`MultibaseEncoder`](https://github.com/multiformats/js-multiformats/blob/master/src/bases/interface.ts) interface. This library provides quite a few implementations that can be imported: + * + * ```TypeScript + * import { base64 } from "multiformats/bases/base64" + * cid.toString(base64.encoder) + * //> 'mAYAEEiCTojlxqRTl6svwqNJRVM2jCcPBxy+7mRTUfGDzy2gViA' + * ``` + * + * Parsing CID string serialized CIDs requires multibase decoder that implements [`MultibaseDecoder`](https://github.com/multiformats/js-multiformats/blob/master/src/bases/interface.ts) interface. This library provides a decoder for every encoder it provides: + * + * ```TypeScript + * CID.parse('mAYAEEiCTojlxqRTl6svwqNJRVM2jCcPBxy+7mRTUfGDzy2gViA', base64.decoder) + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * ``` + * + * Dual of multibase encoder & decoder is defined as multibase codec and it exposes + * them as `encoder` and `decoder` properties. For added convenience codecs also + * implement `MultibaseEncoder` and `MultibaseDecoder` interfaces so they could be + * used as either or both: + * + * ```TypeScript + * cid.toString(base64) + * CID.parse(cid.toString(base64), base64) + * ``` + * + * **Note:** CID implementation comes bundled with `base32` and `base58btc` + * multibase codecs so that CIDs can be base serialized to (version specific) + * default base encoding and parsed without having to supply base encoders/decoders: + * + * ```TypeScript + * const v1 = CID.parse('bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea') + * v1.toString() + * //> 'bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea' + * + * const v0 = CID.parse('QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n') + * v0.toString() + * //> 'QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n' + * v0.toV1().toString() + * //> 'bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku' + * ``` + * + * ## Multicodec Encoders / Decoders / Codecs + * + * This library defines [`BlockEncoder`, `BlockDecoder` and `BlockCodec` interfaces](https://github.com/multiformats/js-multiformats/blob/master/src/codecs/interface.ts). + * Codec implementations should conform to the `BlockCodec` interface which implements both `BlockEncoder` and `BlockDecoder`. + * Here is an example implementation of JSON `BlockCodec`. + * + * ```TypeScript + * export const { name, code, encode, decode } = { + * name: 'json', + * code: 0x0200, + * encode: json => new TextEncoder().encode(JSON.stringify(json)), + * decode: bytes => JSON.parse(new TextDecoder().decode(bytes)) + * } + * ``` + * + * ## Multihash Hashers + * + * This library defines [`MultihashHasher` and `MultihashDigest` interfaces](https://github.com/multiformats/js-multiformats/blob/master/src/hashes/interface.ts) and convinient function for implementing them: + * + * ```TypeScript + * import * as hasher from 'multiformats/hashes/hasher' + * + * const sha256 = hasher.from({ + * // As per multiformats table + * // https://github.com/multiformats/multicodec/blob/master/table.csv#L9 + * name: 'sha2-256', + * code: 0x12, + * + * encode: (input) => new Uint8Array(crypto.createHash('sha256').update(input).digest()) + * }) + * + * const hash = await sha256.digest(json.encode({ hello: 'world' })) + * CID.create(1, json.code, hash) + * + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * ``` + * + * ## Traversal + * + * This library contains higher-order functions for traversing graphs of data easily. + * + * `walk()` walks through the links in each block of a DAG calling a user-supplied loader function for each one, in depth-first order with no duplicate block visits. The loader should return a `Block` object and can be used to inspect and collect block ordering for a full DAG walk. The loader should `throw` on error, and return `null` if a block should be skipped by `walk()`. + * + * ```TypeScript + * import { walk } from 'multiformats/traversal' + * import * as Block from 'multiformats/block' + * import * as codec from 'multiformats/codecs/json' + * import { sha256 as hasher } from 'multiformats/hashes/sha2' + * + * // build a DAG (a single block for this simple example) + * const value = { hello: 'world' } + * const block = await Block.encode({ value, codec, hasher }) + * const { cid } = block + * console.log(cid) + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * + * // create a loader function that also collects CIDs of blocks in + * // their traversal order + * const load = (cid, blocks) => async (cid) => { + * // fetch a block using its cid + * // e.g.: const block = await fetchBlockByCID(cid) + * blocks.push(cid) + * return block + * } + * + * // collect blocks in this DAG starting from the root `cid` + * const blocks = [] + * await walk({ cid, load: load(cid, blocks) }) + * + * console.log(blocks) + * //> [CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea)] + * ``` + * + * ## Legacy interface + * + * [`blockcodec-to-ipld-format`](https://github.com/ipld/js-blockcodec-to-ipld-format) converts a multiformats [`BlockCodec`](https://github.com/multiformats/js-multiformats/blob/master/src/codecs/interface.ts#L21) into an + * [`interface-ipld-format`](https://github.com/ipld/interface-ipld-format) for use with the [`ipld`](https://github.com/ipld/ipld) package. This can help bridge IPLD codecs implemented using the structure and interfaces defined here to existing code that assumes, or requires `interface-ipld-format`. This bridge also includes the relevant TypeScript definitions. + * + * ## Implementations + * + * By default, no base encodings (other than base32 & base58btc), hash functions, + * or codec implementations are exposed by `multiformats`, you need to + * import the ones you need yourself. * - * @template T - * @param {AsyncIterable<() => Promise>} source - * @param {number} [size=1] - * @returns {AsyncIterable} + * ### Multibase codecs + * + * | bases | import | repo | + * | ------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------- | + * | `base16` | `multiformats/bases/base16` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * | `base32`, `base32pad`, `base32hex`, `base32hexpad`, `base32z` | `multiformats/bases/base32` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * | `base64`, `base64pad`, `base64url`, `base64urlpad` | `multiformats/bases/base64` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * | `base58btc`, `base58flick4` | `multiformats/bases/base58` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * + * Other (less useful) bases implemented in [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) include: `base2`, `base8`, `base10`, `base36` and `base256emoji`. + * + * ### Multihash hashers + * + * | hashes | import | repo | + * | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------ | + * | `sha2-256`, `sha2-512` | `multiformats/hashes/sha2` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/hashes) | + * | `sha3-224`, `sha3-256`, `sha3-384`,`sha3-512`, `shake-128`, `shake-256`, `keccak-224`, `keccak-256`, `keccak-384`, `keccak-512` | `@multiformats/sha3` | [multiformats/js-sha3](https://github.com/multiformats/js-sha3) | + * | `identity` | `multiformats/hashes/identity` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/hashes/identity.js) | + * | `murmur3-128`, `murmur3-32` | `@multiformats/murmur3` | [multiformats/js-murmur3](https://github.com/multiformats/js-murmur3) | + * | `blake2b-*`, `blake2s-*` | `@multiformats/blake2` | [multiformats/js-blake2](https://github.com/multiformats/js-blake2) | + * + * ### IPLD codecs (multicodec) + * + * | codec | import | repo | + * | ---------- | -------------------------- | ------------------------------------------------------------------------------------------------------ | + * | `raw` | `multiformats/codecs/raw` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/codecs) | + * | `json` | `multiformats/codecs/json` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/codecs) | + * | `dag-cbor` | `@ipld/dag-cbor` | [ipld/js-dag-cbor](https://github.com/ipld/js-dag-cbor) | + * | `dag-json` | `@ipld/dag-json` | [ipld/js-dag-json](https://github.com/ipld/js-dag-json) | + * | `dag-pb` | `@ipld/dag-pb` | [ipld/js-dag-pb](https://github.com/ipld/js-dag-pb) | + * | `dag-jose` | `dag-jose` | [ceramicnetwork/js-dag-jose](https://github.com/ceramicnetwork/js-dag-jose) | */ -async function * parallelBatch (source, size = 1) { - for await (const tasks of batch(source, size)) { - /** @type {Promise|Failure>[]} */ - const things = tasks.map( - /** - * @param {() => Promise} p - */ - p => { - return p().then(value => ({ ok: true, value }), err => ({ ok: false, err })) - }) - for (let i = 0; i < things.length; i++) { - const result = await things[i] - if (result.ok) { - yield result.value - } else { - throw result.err - } - } - } -} -module.exports = parallelBatch -/***/ }), +// This way TS will also expose all the types from module + + +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/node_modules/multiformats/dist/src/bases/base64.js + +const base64 = bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}); +const base64pad = bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}); +const base64url = bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}); +const base64urlpad = bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}); +//# sourceMappingURL=base64.js.map +;// CONCATENATED MODULE: ./node_modules/@ipld/dag-json/src/index.js +/* eslint max-depth: ["error", 7] */ + -/***/ 66140: -/***/ ((module) => { -"use strict"; /** * @template T - * @typedef {Object} Peek - * @property {() => IteratorResult} peek + * @typedef {import('multiformats/codecs/interface').ByteView} ByteView */ - /** * @template T - * @typedef {Object} AsyncPeek - * @property {() => Promise>} peek + * @typedef {import('multiformats').ToString} ToString */ - /** - * @template T - * @typedef {Object} Push - * @property {(value:T) => void} push + * @typedef {import('cborg/interface').DecodeTokenizer} DecodeTokenizer */ /** - * @template T - * @typedef {Iterable & Peek & Push & Iterator} Peekable + * cidEncoder will receive all Objects during encode, it needs to filter out + * anything that's not a CID and return `null` for that so it's encoded as + * normal. Encoding a CID means replacing it with a `{"/":"}` + * object as per the DAG-JSON spec. + * + * @param {any} obj + * @returns {Token[]|null} */ +function src_cidEncoder (obj) { + if (obj.asCID !== obj && obj['/'] !== obj.bytes) { + return null // any other kind of object + } + const cid = dist_src_cid_CID.asCID(obj) + /* c8 ignore next 4 */ + // very unlikely case, and it'll probably throw a recursion error in cborg + if (!cid) { + return null + } + const cidString = cid.toString() + + return [ + new token_Token(token_Type.map, Infinity, 1), + new token_Token(token_Type.string, '/', 1), // key + new token_Token(token_Type.string, cidString, cidString.length), // value + new token_Token(token_Type["break"], undefined, 1) + ] +} /** - * @template T - * @typedef {AsyncIterable & AsyncPeek & Push & AsyncIterator} AsyncPeekable + * bytesEncoder will receive all Uint8Arrays (and friends) during encode, it + * needs to replace it with a `{"/":{"bytes":"Base64ByteString"}}` object as + * per the DAG-JSON spec. + * + * @param {Uint8Array} bytes + * @returns {Token[]|null} */ +function bytesEncoder (bytes) { + const bytesString = base64.encode(bytes).slice(1) // no mbase prefix + return [ + new token_Token(token_Type.map, Infinity, 1), + new token_Token(token_Type.string, '/', 1), // key + new token_Token(token_Type.map, Infinity, 1), // value + new token_Token(token_Type.string, 'bytes', 5), // inner key + new token_Token(token_Type.string, bytesString, bytesString.length), // inner value + new token_Token(token_Type["break"], undefined, 1), + new token_Token(token_Type["break"], undefined, 1) + ] +} /** - * @template {Iterable | AsyncIterable} I - * @param {I} iterable - * @returns {I extends Iterable - * ? Peekable - * : I extends AsyncIterable - * ? AsyncPeekable - * : never - * } + * taBytesEncoder wraps bytesEncoder() but for the more exotic typed arrays so + * that we access the underlying ArrayBuffer data + * + * @param {Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array|Float32Array|Float64Array|Uint8ClampedArray|BigInt64Array|BigUint64Array} obj + * @returns {Token[]|null} */ -function peekableIterator (iterable) { - // @ts-ignore - const [iterator, symbol] = iterable[Symbol.asyncIterator] - // @ts-ignore - ? [iterable[Symbol.asyncIterator](), Symbol.asyncIterator] - // @ts-ignore - : [iterable[Symbol.iterator](), Symbol.iterator] +function taBytesEncoder (obj) { + return bytesEncoder(new Uint8Array(obj.buffer, obj.byteOffset, obj.byteLength)) +} - /** @type {any[]} */ - const queue = [] +/** + * abBytesEncoder wraps bytesEncoder() but for plain ArrayBuffers + * + * @param {ArrayBuffer} ab + * @returns {Token[]|null} + */ +function abBytesEncoder (ab) { + return bytesEncoder(new Uint8Array(ab)) +} - // @ts-ignore - return { - peek: () => { - return iterator.next() - }, - push: (value) => { - queue.push(value) - }, - next: () => { - if (queue.length) { - return { - done: false, - value: queue.shift() - } - } +// eslint-disable-next-line jsdoc/require-returns-check +/** + * Intercept all `undefined` values from an object walk and reject the entire + * object if we find one. + * + * @returns {null} + */ +function src_undefinedEncoder () { + throw new Error('`undefined` is not supported by the IPLD Data Model and cannot be encoded') +} - return iterator.next() - }, - [symbol] () { - return this - } +/** + * Intercept all `number` values from an object walk and reject the entire + * object if we find something that doesn't fit the IPLD data model (NaN & + * Infinity). + * + * @param {number} num + * @returns {null} + */ +function src_numberEncoder (num) { + if (Number.isNaN(num)) { + throw new Error('`NaN` is not supported by the IPLD Data Model and cannot be encoded') } + if (num === Infinity || num === -Infinity) { + throw new Error('`Infinity` and `-Infinity` is not supported by the IPLD Data Model and cannot be encoded') + } + return null // process with standard number encoder } -module.exports = peekableIterator - - -/***/ }), - -/***/ 74824: -/***/ ((module) => { - -const rawPipe = (...fns) => { - let res - while (fns.length) { - res = fns.shift()(res) +const src_encodeOptions = { + typeEncoders: { + Object: src_cidEncoder, + Buffer: bytesEncoder, + Uint8Array: bytesEncoder, + Int8Array: taBytesEncoder, + Uint16Array: taBytesEncoder, + Int16Array: taBytesEncoder, + Uint32Array: taBytesEncoder, + Int32Array: taBytesEncoder, + Float32Array: taBytesEncoder, + Float64Array: taBytesEncoder, + Uint8ClampedArray: taBytesEncoder, + BigInt64Array: taBytesEncoder, + BigUint64Array: taBytesEncoder, + DataView: taBytesEncoder, + ArrayBuffer: abBytesEncoder, + undefined: src_undefinedEncoder, + number: src_numberEncoder } - return res } -const isIterable = obj => obj && ( - typeof obj[Symbol.asyncIterator] === 'function' || - typeof obj[Symbol.iterator] === 'function' || - typeof obj.next === 'function' // Probably, right? -) - -const isDuplex = obj => obj && typeof obj.sink === 'function' && isIterable(obj.source) - -const duplexPipelineFn = duplex => source => { - duplex.sink(source) // TODO: error on sink side is unhandled rejection - this is the same as pull streams - return duplex.source -} +/** + * @implements {DecodeTokenizer} + */ +class DagJsonTokenizer extends Tokenizer { + /** + * @param {Uint8Array} data + * @param {object} [options] + */ + constructor (data, options) { + super(data, options) + /** @type {Token[]} */ + this.tokenBuffer = [] + } -const pipe = (...fns) => { - // Duplex at start: wrap in function and return duplex source - if (isDuplex(fns[0])) { - const duplex = fns[0] - fns[0] = () => duplex.source - // Iterable at start: wrap in function - } else if (isIterable(fns[0])) { - const source = fns[0] - fns[0] = () => source + /** + * @returns {boolean} + */ + done () { + return this.tokenBuffer.length === 0 && super.done() } - if (fns.length > 1) { - // Duplex at end: use duplex sink - if (isDuplex(fns[fns.length - 1])) { - fns[fns.length - 1] = fns[fns.length - 1].sink + /** + * @returns {Token} + */ + _next () { + if (this.tokenBuffer.length > 0) { + // @ts-ignore https://github.com/Microsoft/TypeScript/issues/30406 + return this.tokenBuffer.pop() } + return super.next() } - if (fns.length > 2) { - // Duplex in the middle, consume source with duplex sink and return duplex source - for (let i = 1; i < fns.length - 1; i++) { - if (isDuplex(fns[i])) { - fns[i] = duplexPipelineFn(fns[i]) + /** + * Implements rules outlined in https://github.com/ipld/specs/pull/356 + * + * @returns {Token} + */ + next () { + const token = this._next() + + if (token.type === token_Type.map) { + const keyToken = this._next() + if (keyToken.type === token_Type.string && keyToken.value === '/') { + const valueToken = this._next() + if (valueToken.type === token_Type.string) { // *must* be a CID + const breakToken = this._next() // swallow the end-of-map token + if (breakToken.type !== token_Type["break"]) { + throw new Error('Invalid encoded CID form') + } + this.tokenBuffer.push(valueToken) // CID.parse will pick this up after our tag token + return new token_Token(token_Type.tag, 42, 0) + } + if (valueToken.type === token_Type.map) { + const innerKeyToken = this._next() + if (innerKeyToken.type === token_Type.string && innerKeyToken.value === 'bytes') { + const innerValueToken = this._next() + if (innerValueToken.type === token_Type.string) { // *must* be Bytes + for (let i = 0; i < 2; i++) { + const breakToken = this._next() // swallow two end-of-map tokens + if (breakToken.type !== token_Type["break"]) { + throw new Error('Invalid encoded Bytes form') + } + } + const bytes = base64.decode(`m${innerValueToken.value}`) + return new token_Token(token_Type.bytes, bytes, innerValueToken.value.length) + } + this.tokenBuffer.push(innerValueToken) // bail + } + this.tokenBuffer.push(innerKeyToken) // bail + } + this.tokenBuffer.push(valueToken) // bail } + this.tokenBuffer.push(keyToken) // bail } + return token } - - return rawPipe(...fns) } -module.exports = pipe -module.exports.pipe = pipe -module.exports.rawPipe = rawPipe -module.exports.isIterable = isIterable -module.exports.isDuplex = isDuplex - - -/***/ }), - -/***/ 16346: -/***/ ((module) => { +const src_decodeOptions = { + allowIndefinite: false, + allowUndefined: false, + allowNaN: false, + allowInfinity: false, + allowBigInt: true, // this will lead to BigInt for ints outside of + // safe-integer range, which may surprise users + strict: true, + useMaps: false, + rejectDuplicateMapKeys: true, + /** @type {import('cborg').TagDecoder[]} */ + tags: [] +} -"use strict"; +// we're going to get TAG(42)STRING("bafy...") from the tokenizer so we only need +// to deal with the STRING("bafy...") at this point +src_decodeOptions.tags[42] = dist_src_cid_CID.parse +const dag_json_src_name = 'dag-json' +const dag_json_src_code = 0x0129 /** - * Stop iteration after n items have been received. - * * @template T - * @param {AsyncIterable|Iterable} source - * @param {number} limit - * @returns {AsyncIterable} + * @param {T} node + * @returns {ByteView} */ -const take = async function * (source, limit) { - let items = 0 - - if (limit < 1) { - return - } - - for await (const entry of source) { - yield entry - - items++ +const dag_json_src_encode = (node) => json_encode_encode(node, src_encodeOptions) - if (items === limit) { - return - } - } +/** + * @template T + * @param {ByteView} data + * @returns {T} + */ +const dag_json_src_decode = (data) => { + // the tokenizer is stateful so we need a single instance of it + const options = Object.assign(src_decodeOptions, { tokenizer: new DagJsonTokenizer(data, src_decodeOptions) }) + return json_decode_decode(data, options) } -module.exports = take - - -/***/ }), - -/***/ 17188: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const { Readable, Writable, Duplex } = __nccwpck_require__(12781) -const getIterator = __nccwpck_require__(26805) -const Fifo = __nccwpck_require__(93963) -const { Buffer } = __nccwpck_require__(14300) -const END_CHUNK = Buffer.alloc(0) +/** + * @template T + * @param {T} node + * @returns {ToString} + */ +const src_format = (node) => utf8Decoder.decode(dag_json_src_encode(node)) -module.exports = function toDuplex (duplex, options) { - options = options || {} +const utf8Decoder = new TextDecoder() - let reading = false - const fifo = new Fifo() +/** + * @template T + * @param {ToString} data + * @returns {T} + */ +const parse = (data) => dag_json_src_decode(utf8Encoder.encode(data)) +const utf8Encoder = new TextEncoder() - duplex = { - sink: duplex.sink, - source: duplex.source ? getIterator(duplex.source) : null +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; } - - let Stream = Duplex - if (!duplex.source) { - Stream = Writable - } else if (!duplex.sink) { - Stream = Readable + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; } - - let readable - if (duplex.source) { - readable = { - async read (size) { - if (reading) return - reading = true - - try { - while (true) { - const { value, done } = await duplex.source.next(size) - if (done) return this.push(null) - if (!this.push(value)) break - } - } catch (err) { - this.emit('error', err) - } finally { - reading = false - } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str } - - let writable - if (duplex.sink) { - writable = { - write (chunk, enc, cb) { - fifo.push(chunk).then(() => cb(), cb) - }, - final (cb) { - fifo.push(END_CHUNK).then(() => cb(), cb) + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; } + return vch } - - Object.assign(options, readable, writable) - - const stream = new Stream(options) - - if (duplex.sink) { - duplex.sink({ - [Symbol.asyncIterator] () { - return this - }, - async next () { - const chunk = await fifo.shift() - return chunk === END_CHUNK ? { done: true } : { value: chunk } - }, - async throw (err) { - stream.destroy(err) - return { done: true } - }, - async return () { - stream.destroy() - return { done: true } - } - }) + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode } - - return stream } +var multiformats_vendor_base_x_src = multiformats_vendor_base_x_base; +var multiformats_vendor_base_x_brrp_multiformats_scope_baseX = multiformats_vendor_base_x_src; -/***/ }), - -/***/ 28186: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/* harmony default export */ const multiformats_vendor_base_x = (multiformats_vendor_base_x_brrp_multiformats_scope_baseX); -"use strict"; - - -const toTransform = __nccwpck_require__(63688) -const toDuplex = __nccwpck_require__(17188) +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/src/bytes.js +const multiformats_src_bytes_empty = new Uint8Array(0) -function toReadable (source, options) { - return toDuplex({ source }, options) -} +/** + * @param {Uint8Array} d + */ +const multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') -function toWritable (sink, options) { - return toDuplex({ sink }, options) +/** + * @param {string} hex + */ +const multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : multiformats_src_bytes_empty } -module.exports = toReadable -module.exports.readable = toReadable -module.exports.writable = toWritable -module.exports.transform = toTransform -module.exports.duplex = toDuplex - - -/***/ }), +/** + * @param {Uint8Array} aa + * @param {Uint8Array} bb + */ +const multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false + } -/***/ 63688: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false + } + } -const toDuplex = __nccwpck_require__(17188) -const defer = __nccwpck_require__(31368) + return true +} -module.exports = function toTransform (transform, options) { - const { promise, resolve } = defer() +/** + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} + */ +const multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) + } + throw new Error('Unknown type, must be binary type') +} - const source = (async function * () { - const it = await promise - for await (const chunk of it) yield chunk - })() +/** + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} + */ +const multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) - return toDuplex({ sink: s => resolve(transform(s)), source }, options) -} +/** + * @param {string} str + * @returns {Uint8Array} + */ +const multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) +/** + * @param {Uint8Array} b + * @returns {string} + */ +const multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) -/***/ }), -/***/ 66405: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/src/bases/base.js -const crypto = __nccwpck_require__(6113) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) +// Linter can't see that API is used in types. +// eslint-disable-next-line -// Based off of code from https://github.com/luke-park/SecureCompatibleEncryptionExamples /** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. * - * @param {object} [options] - * @param {number} [options.algorithmTagLength=16] - * @param {number} [options.nonceLength=12] - * @param {number} [options.keyLength=16] - * @param {string} [options.digest=sha256] - * @param {number} [options.saltLength=16] - * @param {number} [options.iterations=32767] - * @returns {*} + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} */ -function create ({ - algorithmTagLength = 16, - nonceLength = 12, - keyLength = 16, - digest = 'sha256', - saltLength = 16, - iterations = 32767 -} = {}) { - const algorithm = 'aes-128-gcm' +class src_bases_base_Encoder { /** - * - * @private - * @param {Uint8Array} data - * @param {Uint8Array} key - * @returns {Promise} + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode */ - async function encryptWithKey (data, key) { // eslint-disable-line require-await - const nonce = crypto.randomBytes(nonceLength) - - // Create the cipher instance. - const cipher = crypto.createCipheriv(algorithm, key, nonce) - - // Encrypt and prepend nonce. - const ciphertext = uint8ArrayConcat([cipher.update(data), cipher.final()]) - - return uint8ArrayConcat([nonce, ciphertext, cipher.getAuthTag()]) + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode } /** - * Uses the provided password to derive a pbkdf2 key. The key - * will then be used to encrypt the data. - * - * @param {Uint8Array} data - The data to decrypt - * @param {string|Uint8Array} password - A plain password - * @returns {Promise} + * @param {Uint8Array} bytes + * @returns {API.Multibase} */ - async function encrypt (data, password) { // eslint-disable-line require-await - // Generate a 128-bit salt using a CSPRNG. - const salt = crypto.randomBytes(saltLength) - - if (typeof password === 'string' || password instanceof String) { - password = uint8ArrayFromString(password) + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') } + } +} - // Derive a key using PBKDF2. - const key = crypto.pbkdf2Sync(password, salt, iterations, keyLength, digest) +/** + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} + */ +class src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') + } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode + } - // Encrypt and prepend salt. - return uint8ArrayConcat([salt, await encryptWithKey(Uint8Array.from(data), key)]) + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) + } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') + } } /** - * Decrypts the given cipher text with the provided key. The `key` should - * be a cryptographically safe key and not a plaintext password. To use - * a plaintext password, use `decrypt`. The options used to create - * this decryption cipher must be the same as those used to create - * the encryption cipher. - * - * @private - * @param {Uint8Array} ciphertextAndNonce - The data to decrypt - * @param {Uint8Array} key - * @returns {Promise} + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} */ - async function decryptWithKey (ciphertextAndNonce, key) { // eslint-disable-line require-await - // Create Uint8Arrays of nonce, ciphertext and tag. - const nonce = ciphertextAndNonce.slice(0, nonceLength) - const ciphertext = ciphertextAndNonce.slice(nonceLength, ciphertextAndNonce.length - algorithmTagLength) - const tag = ciphertextAndNonce.slice(ciphertext.length + nonceLength) + or (decoder) { + return src_bases_base_or(this, decoder) + } +} - // Create the cipher instance. - const cipher = crypto.createDecipheriv(algorithm, key, nonce) +/** + * @template {string} Prefix + * @typedef {Record>} Decoders + */ - // Decrypt and return result. - cipher.setAuthTag(tag) - return uint8ArrayConcat([cipher.update(ciphertext), cipher.final()]) +/** + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} + */ +class src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders } /** - * Uses the provided password to derive a pbkdf2 key. The key - * will then be used to decrypt the data. The options used to create - * this decryption cipher must be the same as those used to create - * the encryption cipher. - * - * @param {Uint8Array} data - The data to decrypt - * @param {string|Uint8Array} password - A plain password + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} */ - async function decrypt (data, password) { // eslint-disable-line require-await - // Create Uint8Arrays of salt and ciphertextAndNonce. - const salt = data.slice(0, saltLength) - const ciphertextAndNonce = data.slice(saltLength) + or (decoder) { + return src_bases_base_or(this, decoder) + } - if (typeof password === 'string' || password instanceof String) { - password = uint8ArrayFromString(password) + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) } + } +} - // Derive the key using PBKDF2. - const key = crypto.pbkdf2Sync(password, salt, iterations, keyLength, digest) +/** + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} + */ +const src_bases_base_or = (left, right) => new src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) - // Decrypt and return result. - return decryptWithKey(ciphertextAndNonce, key) +/** + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} + */ +class src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new src_bases_base_Decoder(name, prefix, baseDecode) } - return { - encrypt, - decrypt + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) + } + + /** + * @param {string} input + */ + decode (input) { + return this.decoder.decode(input) } } -module.exports = { - create +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} + */ +const src_bases_base_from = ({ name, prefix, encode, decode }) => + new src_bases_base_Codec(name, prefix, encode, decode) + +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} + */ +const src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = multiformats_vendor_base_x(alphabet, name) + return src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => multiformats_src_bytes_coerce(decode(text)) + }) } +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i + } -/***/ }), + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end + } -/***/ 82744: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) -"use strict"; + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) + } + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar -const crypto = __nccwpck_require__(6113) -const lengths = __nccwpck_require__(31481) + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) + } + } -exports.create = async function (hash, secret) { // eslint-disable-line require-await - const res = { - async digest (data) { // eslint-disable-line require-await - const hmac = crypto.createHmac(hash.toLowerCase(), secret) - hmac.update(data) - return hmac.digest() - }, - length: lengths[hash] + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') } - return res + return out } +/** + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} + */ +const src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' -/***/ }), + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 -/***/ 31481: -/***/ ((module) => { + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] + } + } -"use strict"; + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] + } + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' + } + } -module.exports = { - SHA1: 20, - SHA256: 32, - SHA512: 64 + return out +} + +/** + * RFC4648 Factory + * + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar + */ +const src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return src_bases_base_from({ + prefix, + name, + encode (input) { + return src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return src_bases_base_decode(input, alphabet, bitsPerChar, name) + } + }) } +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/src/bases/base64.js +// @ts-check -/***/ }), -/***/ 28051: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +const base64_base64 = src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) +const base64_base64pad = src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) -const crypto = __nccwpck_require__(6113) -const validateCurveType = __nccwpck_require__(52410) +const base64_base64url = src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) -const curves = { - 'P-256': 'prime256v1', - 'P-384': 'secp384r1', - 'P-521': 'secp521r1' -} +const base64_base64urlpad = src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) -exports.generateEphmeralKeyPair = async function (curve) { // eslint-disable-line require-await - validateCurveType(Object.keys(curves), curve) +;// CONCATENATED MODULE: ./node_modules/dag-jose/lib/utils.js - const ecdh = crypto.createECDH(curves[curve]) - ecdh.generateKeys() +function toBase64url(b) { + return base64_base64url.encode(b).slice(1); +} +function fromBase64url(s) { + return base64_base64url.decode(`u${s}`); +} +//# sourceMappingURL=utils.js.map +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/vendor/varint.js +var multiformats_vendor_varint_encode_1 = multiformats_vendor_varint_encode; - return { - key: ecdh.getPublicKey(), - async genSharedKey (theirPub, forcePrivate) { // eslint-disable-line require-await - if (forcePrivate) { - ecdh.setPrivateKey(forcePrivate.private) - } +var multiformats_vendor_varint_MSB = 0x80 + , multiformats_vendor_varint_REST = 0x7F + , multiformats_vendor_varint_MSBALL = ~multiformats_vendor_varint_REST + , multiformats_vendor_varint_INT = Math.pow(2, 31); - return ecdh.computeSecret(theirPub) - } +function multiformats_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + + while(num >= multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | multiformats_vendor_varint_MSB; + num /= 128; + } + while(num & multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | multiformats_vendor_varint_MSB; + num >>>= 7; } + out[offset] = num | 0; + + multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out } +var multiformats_vendor_varint_decode = multiformats_vendor_varint_read; -/***/ }), +var multiformats_vendor_varint_MSB$1 = 0x80 + , multiformats_vendor_varint_REST$1 = 0x7F; -/***/ 8452: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +function multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; -"use strict"; + do { + if (counter >= l) { + multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') + } + b = buf[counter++]; + res += shift < 28 + ? (b & multiformats_vendor_varint_REST$1) << shift + : (b & multiformats_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= multiformats_vendor_varint_MSB$1) + multiformats_vendor_varint_read.bytes = counter - offset; -const errcode = __nccwpck_require__(5822) -const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) -const { sha256 } = __nccwpck_require__(80960) -const { base58btc } = __nccwpck_require__(49108) -const { identity } = __nccwpck_require__(53863) -const crypto = __nccwpck_require__(90716) -const pbm = __nccwpck_require__(72826) -const exporter = __nccwpck_require__(76630) + return res +} -class Ed25519PublicKey { - constructor (key) { - this._key = ensureKey(key, crypto.publicKeyLength) - } +var multiformats_vendor_varint_N1 = Math.pow(2, 7); +var multiformats_vendor_varint_N2 = Math.pow(2, 14); +var multiformats_vendor_varint_N3 = Math.pow(2, 21); +var multiformats_vendor_varint_N4 = Math.pow(2, 28); +var multiformats_vendor_varint_N5 = Math.pow(2, 35); +var multiformats_vendor_varint_N6 = Math.pow(2, 42); +var multiformats_vendor_varint_N7 = Math.pow(2, 49); +var multiformats_vendor_varint_N8 = Math.pow(2, 56); +var multiformats_vendor_varint_N9 = Math.pow(2, 63); - async verify (data, sig) { // eslint-disable-line require-await - return crypto.hashAndVerify(this._key, sig, data) - } +var multiformats_vendor_varint_length = function (value) { + return ( + value < multiformats_vendor_varint_N1 ? 1 + : value < multiformats_vendor_varint_N2 ? 2 + : value < multiformats_vendor_varint_N3 ? 3 + : value < multiformats_vendor_varint_N4 ? 4 + : value < multiformats_vendor_varint_N5 ? 5 + : value < multiformats_vendor_varint_N6 ? 6 + : value < multiformats_vendor_varint_N7 ? 7 + : value < multiformats_vendor_varint_N8 ? 8 + : value < multiformats_vendor_varint_N9 ? 9 + : 10 + ) +}; - marshal () { - return this._key - } +var multiformats_vendor_varint_varint = { + encode: multiformats_vendor_varint_encode_1 + , decode: multiformats_vendor_varint_decode + , encodingLength: multiformats_vendor_varint_length +}; - get bytes () { - return pbm.PublicKey.encode({ - Type: pbm.KeyType.Ed25519, - Data: this.marshal() - }).finish() - } +var multiformats_vendor_varint_brrp_varint = multiformats_vendor_varint_varint; - equals (key) { - return uint8ArrayEquals(this.bytes, key.bytes) - } +<<<<<<< HEAD +/* harmony default export */ const multiformats_vendor_varint = (multiformats_vendor_varint_brrp_varint); - async hash () { - const { bytes } = await sha256.digest(this.bytes) +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/src/varint.js +======= +/***/ 12820: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - return bytes - } +const { create, globSource } = __nccwpck_require__(21719); +const PeerId = __nccwpck_require__(63923); +const last = __nccwpck_require__(28741); +const fsPath = __nccwpck_require__(71017); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + + +/** + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} + */ +const multiformats_src_varint_decode = (data, offset = 0) => { + const code = multiformats_vendor_varint.decode(data, offset) + return [code, multiformats_vendor_varint.decode.bytes] } -class Ed25519PrivateKey { - // key - 64 byte Uint8Array containing private key - // publicKey - 32 byte Uint8Array containing public key - constructor (key, publicKey) { - this._key = ensureKey(key, crypto.privateKeyLength) - this._publicKey = ensureKey(publicKey, crypto.publicKeyLength) - } +/** + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] + */ +const multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + multiformats_vendor_varint.encode(int, target, offset) + return target +} - async sign (message) { // eslint-disable-line require-await - return crypto.hashAndSign(this._key, message) - } +/** + * @param {number} int + * @returns {number} + */ +const multiformats_src_varint_encodingLength = (int) => { + return multiformats_vendor_varint.encodingLength(int) +} - get public () { - return new Ed25519PublicKey(this._publicKey) - } +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/src/hashes/digest.js - marshal () { - return this._key - } - get bytes () { - return pbm.PrivateKey.encode({ - Type: pbm.KeyType.Ed25519, - Data: this.marshal() - }).finish() - } - equals (key) { - return uint8ArrayEquals(this.bytes, key.bytes) - } +/** + * Creates a multihash digest. + * + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest + */ +const multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + multiformats_src_varint_encodingLength(size) - async hash () { - const { bytes } = await sha256.digest(this.bytes) + const bytes = new Uint8Array(digestOffset + size) + multiformats_src_varint_encodeTo(code, bytes, 0) + multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) - return bytes + return new multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} + +/** + * Turns bytes representation of multihash digest into an instance. + * + * @param {Uint8Array} multihash + * @returns {MultihashDigest} + */ +const multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = multiformats_src_bytes_coerce(multihash) + const [code, sizeOffset] = multiformats_src_varint_decode(bytes) + const [size, digestOffset] = multiformats_src_varint_decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) + + if (digest.byteLength !== size) { + throw new Error('Incorrect length') } - /** - * Gets the ID of the key. - * - * The key id is the base58 encoding of the identity multihash containing its public key. - * The public key is a protobuf encoding containing a type and the DER encoding - * of the PKCS SubjectPublicKeyInfo. - * - * @returns {Promise} - */ - async id () { - const encoding = await identity.digest(this.public.bytes) - return base58btc.encode(encoding.bytes).substring(1) + return new multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} + +/** + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} + */ +const multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { + return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) + + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + multiformats_src_bytes_equals(a.bytes, data.bytes) + ) } +} + +/** + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest + */ +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + * + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} + */ +class multiformats_src_hashes_digest_Digest { /** - * Exports the key into a password protected `format` + * Creates a multihash digest. * - * @param {string} password - The password to encrypt the key - * @param {string} [format=libp2p-key] - The format in which to export as - * @returns {Promise} The encrypted private key + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes */ - async export (password, format = 'libp2p-key') { // eslint-disable-line require-await - if (format === 'libp2p-key') { - return exporter.export(this.bytes, password) - } else { - throw errcode(new Error(`export format '${format}' is not supported`), 'ERR_INVALID_EXPORT_FORMAT') - } + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes } } -function unmarshalEd25519PrivateKey (bytes) { - // Try the old, redundant public key version - if (bytes.length > crypto.privateKeyLength) { - bytes = ensureKey(bytes, crypto.privateKeyLength + crypto.publicKeyLength) - const privateKeyBytes = bytes.slice(0, crypto.privateKeyLength) - const publicKeyBytes = bytes.slice(crypto.privateKeyLength, bytes.length) - return new Ed25519PrivateKey(privateKeyBytes, publicKeyBytes) - } +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/src/bases/base58.js - bytes = ensureKey(bytes, crypto.privateKeyLength) - const privateKeyBytes = bytes.slice(0, crypto.privateKeyLength) - const publicKeyBytes = bytes.slice(crypto.publicKeyLength) - return new Ed25519PrivateKey(privateKeyBytes, publicKeyBytes) -} -function unmarshalEd25519PublicKey (bytes) { - bytes = ensureKey(bytes, crypto.publicKeyLength) - return new Ed25519PublicKey(bytes) -} +const multiformats_src_bases_base58_base58btc = src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) -async function generateKeyPair () { - const { privateKey, publicKey } = await crypto.generateKey() - return new Ed25519PrivateKey(privateKey, publicKey) -} +const src_bases_base58_base58flickr = src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) -async function generateKeyPairFromSeed (seed) { - const { privateKey, publicKey } = await crypto.generateKeyFromSeed(seed) - return new Ed25519PrivateKey(privateKey, publicKey) -} +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/src/bases/base32.js -function ensureKey (key, length) { - key = Uint8Array.from(key || []) - if (key.length !== length) { - throw errcode(new Error(`Key must be a Uint8Array of length ${length}, got ${key.length}`), 'ERR_INVALID_KEY_TYPE') - } - return key -} -module.exports = { - Ed25519PublicKey, - Ed25519PrivateKey, - unmarshalEd25519PrivateKey, - unmarshalEd25519PublicKey, - generateKeyPair, - generateKeyPairFromSeed -} +const multiformats_src_bases_base32_base32 = src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) +const multiformats_src_bases_base32_base32upper = src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) -/***/ }), +const src_bases_base32_base32pad = src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) + +const src_bases_base32_base32padupper = src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) + +const src_bases_base32_base32hex = src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) + +const src_bases_base32_base32hexupper = src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) + +const src_bases_base32_base32hexpad = src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) + +const src_bases_base32_base32hexpadupper = src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) + +const src_bases_base32_base32z = src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) + +;// CONCATENATED MODULE: ./node_modules/dag-jose/node_modules/multiformats/src/cid.js -/***/ 90716: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -const ed = __nccwpck_require__(27766) -const PUBLIC_KEY_BYTE_LENGTH = 32 -const PRIVATE_KEY_BYTE_LENGTH = 64 // private key is actually 32 bytes but for historical reasons we concat private and public keys -const KEYS_BYTE_LENGTH = 32 +// Linter can see that API is used in types. +// eslint-disable-next-line -exports.publicKeyLength = PUBLIC_KEY_BYTE_LENGTH -exports.privateKeyLength = PRIVATE_KEY_BYTE_LENGTH -exports.generateKey = async function () { - // the actual private key (32 bytes) - const privateKeyRaw = ed.utils.randomPrivateKey() - const publicKey = await ed.getPublicKey(privateKeyRaw) +// This way TS will also expose all the types from module - // concatenated the public key to the private key - const privateKey = concatKeys(privateKeyRaw, publicKey) - return { - privateKey, - publicKey +/** + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} + */ +const multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return multiformats_src_cid_toStringV0( + bytes, + multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || multiformats_src_bases_base58_base58btc.encoder + ) + default: + return multiformats_src_cid_toStringV1( + bytes, + multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || multiformats_src_bases_base32_base32.encoder) + ) } } /** - * Generate keypair from a seed - * - * @param {Uint8Array} seed - seed should be a 32 byte uint8array - * @returns + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} */ -exports.generateKeyFromSeed = async function (seed) { - if (seed.length !== KEYS_BYTE_LENGTH) { - throw new TypeError('"seed" must be 32 bytes in length.') - } else if (!(seed instanceof Uint8Array)) { - throw new TypeError('"seed" must be a node.js Buffer, or Uint8Array.') - } +const multiformats_src_cid_toJSON = (link) => ({ + '/': multiformats_src_cid_format(link) +}) - // based on node forges algorithm, the seed is used directly as private key - const privateKeyRaw = seed - const publicKey = await ed.getPublicKey(privateKeyRaw) +/** + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json + */ +const multiformats_src_cid_fromJSON = (json) => + multiformats_src_cid_CID.parse(json['/']) - const privateKey = concatKeys(privateKeyRaw, publicKey) +/** @type {WeakMap>} */ +const multiformats_src_cid_cache = new WeakMap() - return { - privateKey, - publicKey +/** + * @param {API.UnknownLink} cid + * @returns {Map} + */ +const multiformats_src_cid_baseCache = cid => { + const baseCache = multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + multiformats_src_cid_cache.set(cid, baseCache) + return baseCache } + return baseCache } -exports.hashAndSign = function (privateKey, msg) { - const privateKeyRaw = privateKey.slice(0, KEYS_BYTE_LENGTH) +/** + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} + */ - return ed.sign(msg, privateKeyRaw) -} +class multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + * + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes -exports.hashAndVerify = function (publicKey, sig, msg) { - return ed.verify(sig, msg, publicKey) -} + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes + } -function concatKeys (privateKeyRaw, publicKey) { - const privateKey = new Uint8Array(exports.privateKeyLength) - for (let i = 0; i < KEYS_BYTE_LENGTH; i++) { - privateKey[i] = privateKeyRaw[i] - privateKey[KEYS_BYTE_LENGTH + i] = publicKey[i] + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this } - return privateKey -} + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset + } -/***/ }), + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } -/***/ 48831: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * @returns {CID} + */ + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) + } + case 1: { + const { code, multihash } = this -"use strict"; + if (code !== multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } + // sha2-256 + if (multihash.code !== multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') + } -const ecdh = __nccwpck_require__(28051) + return /** @type {CID} */ ( + multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) + } + } + } -// Generates an ephemeral public key and returns a function that will compute -// the shared secret key. -// -// Focuses only on ECDH now, but can be made more general in the future. -module.exports = async (curve) => ecdh.generateEphmeralKeyPair(curve) // eslint-disable-line require-await + /** + * @returns {CID} + */ + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = multiformats_src_hashes_digest_create(code, digest) + return /** @type {CID} */ ( + multiformats_src_cid_CID.createV1(this.code, multihash) + ) + } + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) + } + } + } + /** + * @param {unknown} other + * @returns {other is CID} + */ + equals (other) { + return multiformats_src_cid_CID.equals(this, other) + } -/***/ }), + /** + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} + */ + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + multiformats_src_hashes_digest_equals(self.multihash, unknown.multihash) + ) + } -/***/ 76630: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * @param {API.MultibaseEncoder} [base] + * @returns {string} + */ + toString (base) { + return multiformats_src_cid_format(this, base) + } -"use strict"; + toJSON () { + return { '/': multiformats_src_cid_format(this) } + } + + link () { + return this + } + get [Symbol.toStringTag] () { + return 'CID' + } -const { base64 } = __nccwpck_require__(98197) -const ciphers = __nccwpck_require__(66405) + // Legacy + + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` + } -module.exports = { /** - * Exports the given PrivateKey as a base64 encoded string. - * The PrivateKey is encrypted via a password derived PBKDF2 key - * leveraging the aes-gcm cipher algorithm. + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. * - * @param {Uint8Array} privateKey - The PrivateKey protobuf - * @param {string} password - * @returns {Promise} A base64 encoded string + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} */ - export: async function (privateKey, password) { - const cipher = ciphers.create() - const encryptedKey = await cipher.encrypt(privateKey, password) - return base64.encode(encryptedKey) + static asCID (input) { + if (input == null) { + return null + } + + const value = /** @type {any} */ (input) + if (value instanceof multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (multiformats_src_hashes_digest_decode(multihash)) + return multiformats_src_cid_CID.create(version, code, digest) + } else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null + } } -} + /** + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} + */ + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') + } -/***/ }), + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } -/***/ 22940: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + switch (version) { + case 0: { + if (code !== multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new multiformats_src_cid_CID(version, code, digest, digest.bytes) + } + } + case 1: { + const bytes = multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') + } + } + } -"use strict"; + /** + * Simplified version of `create` for CIDv0. + * + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} + */ + static createV0 (digest) { + return multiformats_src_cid_CID.create(0, multiformats_src_cid_DAG_PB_CODE, digest) + } + /** + * Simplified version of `create` for CIDv1. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} + */ + static createV1 (code, digest) { + return multiformats_src_cid_CID.create(1, code, digest) + } -const { base64 } = __nccwpck_require__(98197) -const ciphers = __nccwpck_require__(66405) + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} + */ + static decode (bytes) { + const [cid, remainder] = multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') + } + return cid + } -module.exports = { /** - * Attempts to decrypt a base64 encoded PrivateKey string - * with the given password. The privateKey must have been exported - * using the same password and underlying cipher (aes-gcm) + * Decoded a CID from its binary representation at the beginning of a byte + * array. * - * @param {string} privateKey - A base64 encoded encrypted key - * @param {string} password - * @returns {Promise} The private key protobuf + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} */ - import: async function (privateKey, password) { - const encryptedKey = base64.decode(privateKey) - const cipher = ciphers.create() - return await cipher.decrypt(encryptedKey, password) + static decodeFirst (bytes) { + const specs = multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = multiformats_src_bytes_coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') + } + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new multiformats_src_hashes_digest_Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] } -} + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} + */ + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = multiformats_src_varint_decode(initialBytes.subarray(offset)) + offset += length + return i + } -/***/ }), + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 + } else { + codec = /** @type {C} */ (next()) + } -/***/ 13041: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } -"use strict"; + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize + return { version, codec, multihashCode, digestSize, multihashSize, size } + } -const keysPBM = __nccwpck_require__(72826) -__nccwpck_require__(69197) -__nccwpck_require__(87861) -const forge = __nccwpck_require__(96630) -const errcode = __nccwpck_require__(5822) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + * + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} + */ + static parse (source, base) { + const [prefix, bytes] = multiformats_src_cid_parseCIDtoBytes(source, base) -const importer = __nccwpck_require__(22940) + const cid = multiformats_src_cid_CID.decode(bytes) -const supportedKeys = { - rsa: __nccwpck_require__(91667), - ed25519: __nccwpck_require__(8452), - secp256k1: __nccwpck_require__(84968)(keysPBM, __nccwpck_require__(26409)) -} + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') + } -const ErrMissingSecp256K1 = { - message: 'secp256k1 support requires libp2p-crypto-secp256k1 package', - code: 'ERR_MISSING_PACKAGE' -} + // Cache string representation to avoid computing it on `this.toString()` + multiformats_src_cid_baseCache(cid).set(prefix, source) -function typeToKey (type) { - const key = supportedKeys[type.toLowerCase()] - if (!key) { - const supported = Object.keys(supportedKeys).join(' / ') - throw errcode(new Error(`invalid or unsupported key type ${type}. Must be ${supported}`), 'ERR_UNSUPPORTED_KEY_TYPE') + return cid } - return key } -// Generates a keypair of the given type and bitsize -const generateKeyPair = async (type, bits) => { // eslint-disable-line require-await - return typeToKey(type).generateKeyPair(bits) +/** + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} + */ +const multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || multiformats_src_bases_base58_base58btc + return [ + /** @type {Prefix} */ (multiformats_src_bases_base58_base58btc.prefix), + decoder.decode(`${multiformats_src_bases_base58_base58btc.prefix}${source}`) + ] + } + case multiformats_src_bases_base58_base58btc.prefix: { + const decoder = base || multiformats_src_bases_base58_base58btc + return [/** @type {Prefix} */(multiformats_src_bases_base58_base58btc.prefix), decoder.decode(source)] + } + case multiformats_src_bases_base32_base32.prefix: { + const decoder = base || multiformats_src_bases_base32_base32 + return [/** @type {Prefix} */(multiformats_src_bases_base32_base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) + } + return [/** @type {Prefix} */(source[0]), base.decode(source)] + } + } } -// Generates a keypair of the given type and bitsize -// seed is a 32 byte uint8array -const generateKeyPairFromSeed = async (type, seed, bits) => { // eslint-disable-line require-await - const key = typeToKey(type) - if (type.toLowerCase() !== 'ed25519') { - throw errcode(new Error('Seed key derivation is unimplemented for RSA or secp256k1'), 'ERR_UNSUPPORTED_KEY_DERIVATION_TYPE') +/** + * + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base + */ +const multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== multiformats_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) } - return key.generateKeyPairFromSeed(seed, bits) -} -// Converts a protobuf serialized public key into its -// representative object -const unmarshalPublicKey = (buf) => { - const decoded = keysPBM.PublicKey.decode(buf) - const data = decoded.Data + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} - switch (decoded.Type) { - case keysPBM.KeyType.RSA: - return supportedKeys.rsa.unmarshalRsaPublicKey(data) - case keysPBM.KeyType.Ed25519: - return supportedKeys.ed25519.unmarshalEd25519PublicKey(data) - case keysPBM.KeyType.Secp256k1: - if (supportedKeys.secp256k1) { - return supportedKeys.secp256k1.unmarshalSecp256k1PublicKey(data) - } else { - throw errcode(new Error(ErrMissingSecp256K1.message), ErrMissingSecp256K1.code) - } - default: - typeToKey(decoded.Type) // throws because type is not supported +/** + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base + */ +const multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid + } else { + return cid } } -// Converts a public key object into a protobuf serialized public key -const marshalPublicKey = (key, type) => { - type = (type || 'rsa').toLowerCase() - typeToKey(type) // check type - return key.bytes +const multiformats_src_cid_DAG_PB_CODE = 0x70 +const multiformats_src_cid_SHA_256_CODE = 0x12 + +/** + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} + */ +const multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = multiformats_src_varint_encodingLength(version) + const hashOffset = codeOffset + multiformats_src_varint_encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + multiformats_src_varint_encodeTo(version, bytes, 0) + multiformats_src_varint_encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes } -// Converts a protobuf serialized private key into its -// representative object -const unmarshalPrivateKey = async (buf) => { // eslint-disable-line require-await - const decoded = keysPBM.PrivateKey.decode(buf) - const data = decoded.Data +const multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') - switch (decoded.Type) { - case keysPBM.KeyType.RSA: - return supportedKeys.rsa.unmarshalRsaPrivateKey(data) - case keysPBM.KeyType.Ed25519: - return supportedKeys.ed25519.unmarshalEd25519PrivateKey(data) - case keysPBM.KeyType.Secp256k1: - if (supportedKeys.secp256k1) { - return supportedKeys.secp256k1.unmarshalSecp256k1PrivateKey(data) - } else { - throw errcode(new Error(ErrMissingSecp256K1.message), ErrMissingSecp256K1.code) - } - default: - typeToKey(decoded.Type) // throws because type is not supported - } +;// CONCATENATED MODULE: ./node_modules/dag-jose/lib/signing.js + + +function fromSplit(split) { + const [protectedHeader, payload, signature] = split; + return { + payload, + signatures: [{ protected: protectedHeader, signature }], + link: multiformats_src_cid_CID.decode(fromBase64url(payload)), + }; +} +function encodeSignature(signature) { + const encoded = { + signature: fromBase64url(signature.signature), + }; + if (signature.header) + encoded.header = signature.header; + if (signature.protected) + encoded.protected = fromBase64url(signature.protected); + return encoded; +} +function signing_encode(jws) { + const payload = fromBase64url(jws.payload); + try { + multiformats_src_cid_CID.decode(payload); + } + catch (e) { + throw new Error('Not a valid DagJWS'); + } + return { + payload, + signatures: jws.signatures.map(encodeSignature), + }; +} +function decodeSignature(encoded) { + const sign = { + signature: toBase64url(encoded.signature), + }; + if (encoded.header) + sign.header = encoded.header; + if (encoded.protected) + sign.protected = toBase64url(encoded.protected); + return sign; +} +function signing_decode(encoded) { + const decoded = { + payload: toBase64url(encoded.payload), + signatures: encoded.signatures.map(decodeSignature), + }; + decoded.link = multiformats_src_cid_CID.decode(new Uint8Array(encoded.payload)); + return decoded; } +//# sourceMappingURL=signing.js.map +;// CONCATENATED MODULE: ./node_modules/dag-jose/lib/encryption.js -// Converts a private key object into a protobuf serialized private key -const marshalPrivateKey = (key, type) => { - type = (type || 'rsa').toLowerCase() - typeToKey(type) // check type - return key.bytes +function encryption_fromSplit(split) { + const [protectedHeader, encrypted_key, iv, ciphertext, tag] = split; + const jwe = { + ciphertext, + iv, + protected: protectedHeader, + tag, + }; + if (encrypted_key) + jwe.recipients = [{ encrypted_key }]; + return jwe; +} +function encodeRecipient(recipient) { + const encRec = {}; + if (recipient.encrypted_key) + encRec.encrypted_key = fromBase64url(recipient.encrypted_key); + if (recipient.header) + encRec.header = recipient.header; + return encRec; +} +function encryption_encode(jwe) { + const encJwe = { + ciphertext: fromBase64url(jwe.ciphertext), + protected: fromBase64url(jwe.protected), + iv: fromBase64url(jwe.iv), + tag: fromBase64url(jwe.tag), + }; + if (jwe.aad) + encJwe.aad = fromBase64url(jwe.aad); + if (jwe.recipients) + encJwe.recipients = jwe.recipients.map(encodeRecipient); + if (jwe.unprotected) + encJwe.unprotected = jwe.unprotected; + return encJwe; +} +function decodeRecipient(encoded) { + const recipient = {}; + if (encoded.encrypted_key) + recipient.encrypted_key = toBase64url(encoded.encrypted_key); + if (encoded.header) + recipient.header = encoded.header; + return recipient; +} +function encryption_decode(encoded) { + const jwe = { + ciphertext: toBase64url(encoded.ciphertext), + protected: toBase64url(encoded.protected), + iv: toBase64url(encoded.iv), + tag: toBase64url(encoded.tag), + }; + if (encoded.aad) + jwe.aad = toBase64url(encoded.aad); + if (encoded.recipients) + jwe.recipients = encoded.recipients.map(decodeRecipient); + if (encoded.unprotected) + jwe.unprotected = encoded.unprotected; + return jwe; +} +//# sourceMappingURL=encryption.js.map +;// CONCATENATED MODULE: ./node_modules/dag-jose/lib/index.js + + + +const lib_name = 'dag-jose'; +const lib_code = 133; +function isDagJWS(jose) { + return ('payload' in jose && + typeof jose.payload === 'string' && + 'signatures' in jose && + Array.isArray(jose.signatures)); +} +function isEncodedJWS(jose) { + return ('payload' in jose && + jose.payload instanceof Uint8Array && + 'signatures' in jose && + Array.isArray(jose.signatures)); +} +function isEncodedJWE(jose) { + return ('ciphertext' in jose && + jose.ciphertext instanceof Uint8Array && + 'iv' in jose && + jose.iv instanceof Uint8Array && + 'protected' in jose && + jose.protected instanceof Uint8Array && + 'tag' in jose && + jose.tag instanceof Uint8Array); +} +function isDagJWE(jose) { + return ('ciphertext' in jose && + typeof jose.ciphertext === 'string' && + 'iv' in jose && + typeof jose.iv === 'string' && + 'protected' in jose && + typeof jose.protected === 'string' && + 'tag' in jose && + typeof jose.tag === 'string'); +} +function toGeneral(jose) { + if (typeof jose === 'string') { + const split = jose.split('.'); + if (split.length === 3) { + return fromSplit(split); + } + else if (split.length === 5) { + return encryption_fromSplit(split); + } + throw new Error('Not a valid JOSE string'); + } + if (isDagJWS(jose) || isDagJWE(jose)) { + return jose; + } + throw new Error('Not a valid unencoded JOSE object'); +} +function lib_encode(obj) { + if (typeof obj === 'string') { + obj = toGeneral(obj); + } + let encodedJose; + if (isDagJWS(obj)) { + encodedJose = signing_encode(obj); + } + else if (isDagJWE(obj)) { + encodedJose = encryption_encode(obj); + } + else { + throw new Error('Not a valid JOSE object'); + } + return new Uint8Array(dag_cbor_src_encode(encodedJose)); +} +function lib_decode(data) { + let encoded; + try { + encoded = dag_cbor_src_decode(data); + } + catch (e) { + throw new Error('Not a valid DAG-JOSE object'); + } + if (isEncodedJWS(encoded)) { + return signing_decode(encoded); + } + else if (isEncodedJWE(encoded)) { + return encryption_decode(encoded); + } + else { + throw new Error('Not a valid DAG-JOSE object'); + } } +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bytes.js +const node_modules_multiformats_src_bytes_empty = new Uint8Array(0) /** - * - * @param {string} encryptedKey - * @param {string} password + * @param {Uint8Array} d */ -const importKey = async (encryptedKey, password) => { // eslint-disable-line require-await - try { - const key = await importer.import(encryptedKey, password) - return unmarshalPrivateKey(key) - } catch (_) { - // Ignore and try the old pem decrypt +const node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') + +/** + * @param {string} hex + */ +const node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : node_modules_multiformats_src_bytes_empty +} + +/** + * @param {Uint8Array} aa + * @param {Uint8Array} bb + */ +const node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false } - // Only rsa supports pem right now - const key = forge.pki.decryptRsaPrivateKey(encryptedKey, password) - if (key === null) { - throw errcode(new Error('Cannot read the key, most likely the password is wrong or not a RSA key'), 'ERR_CANNOT_DECRYPT_PEM') + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false + } } - let der = forge.asn1.toDer(forge.pki.privateKeyToAsn1(key)) - der = uint8ArrayFromString(der.getBytes(), 'ascii') - return supportedKeys.rsa.unmarshalRsaPrivateKey(der) + + return true } -module.exports = { - supportedKeys, - keysPBM, - keyStretcher: __nccwpck_require__(88595), - generateEphemeralKeyPair: __nccwpck_require__(48831), - generateKeyPair, - generateKeyPairFromSeed, - unmarshalPublicKey, - marshalPublicKey, - unmarshalPrivateKey, - marshalPrivateKey, - import: importKey +/** + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} + */ +const node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) + } + throw new Error('Unknown type, must be binary type') } +/** + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} + */ +const node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) -/***/ }), +/** + * @param {string} str + * @returns {Uint8Array} + */ +const node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) -/***/ 88595: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/** + * @param {Uint8Array} b + * @returns {string} + */ +const node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) -"use strict"; -const errcode = __nccwpck_require__(5822) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) -const hmac = __nccwpck_require__(82744) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/vendor/varint.js +var node_modules_multiformats_vendor_varint_encode_1 = node_modules_multiformats_vendor_varint_encode; -const cipherMap = { - 'AES-128': { - ivSize: 16, - keySize: 16 - }, - 'AES-256': { - ivSize: 16, - keySize: 32 - }, - Blowfish: { - ivSize: 8, - cipherKeySize: 32 - } -} +var node_modules_multiformats_vendor_varint_MSB = 0x80 + , node_modules_multiformats_vendor_varint_REST = 0x7F + , node_modules_multiformats_vendor_varint_MSBALL = ~node_modules_multiformats_vendor_varint_REST + , node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31); -// Generates a set of keys for each party by stretching the shared key. -// (myIV, theirIV, myCipherKey, theirCipherKey, myMACKey, theirMACKey) -module.exports = async (cipherType, hash, secret) => { - const cipher = cipherMap[cipherType] +function node_modules_multiformats_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; - if (!cipher) { - const allowed = Object.keys(cipherMap).join(' / ') - throw errcode(new Error(`unknown cipher type '${cipherType}'. Must be ${allowed}`), 'ERR_INVALID_CIPHER_TYPE') + while(num >= node_modules_multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | node_modules_multiformats_vendor_varint_MSB; + num /= 128; } - - if (!hash) { - throw errcode(new Error('missing hash type'), 'ERR_MISSING_HASH_TYPE') + while(num & node_modules_multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | node_modules_multiformats_vendor_varint_MSB; + num >>>= 7; } + out[offset] = num | 0; + + node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out +} - const cipherKeySize = cipher.keySize - const ivSize = cipher.ivSize - const hmacKeySize = 20 - const seed = uint8ArrayFromString('key expansion') - const resultLength = 2 * (ivSize + cipherKeySize + hmacKeySize) - - const m = await hmac.create(hash, secret) - let a = await m.digest(seed) +var node_modules_multiformats_vendor_varint_decode = node_modules_multiformats_vendor_varint_read; - const result = [] - let j = 0 +var node_modules_multiformats_vendor_varint_MSB$1 = 0x80 + , node_modules_multiformats_vendor_varint_REST$1 = 0x7F; - while (j < resultLength) { - const b = await m.digest(uint8ArrayConcat([a, seed])) - let todo = b.length +function node_modules_multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; - if (j + todo > resultLength) { - todo = resultLength - j + do { + if (counter >= l) { + node_modules_multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') } + b = buf[counter++]; + res += shift < 28 + ? (b & node_modules_multiformats_vendor_varint_REST$1) << shift + : (b & node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= node_modules_multiformats_vendor_varint_MSB$1) - result.push(b) - j += todo - a = await m.digest(a) - } - - const half = resultLength / 2 - const resultBuffer = uint8ArrayConcat(result) - const r1 = resultBuffer.slice(0, half) - const r2 = resultBuffer.slice(half, resultLength) - - const createKey = (res) => ({ - iv: res.slice(0, ivSize), - cipherKey: res.slice(ivSize, ivSize + cipherKeySize), - macKey: res.slice(ivSize + cipherKeySize) - }) + node_modules_multiformats_vendor_varint_read.bytes = counter - offset; - return { - k1: createKey(r1), - k2: createKey(r2) - } + return res } +var node_modules_multiformats_vendor_varint_N1 = Math.pow(2, 7); +var node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14); +var node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21); +var node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28); +var node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35); +var node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42); +var node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49); +var node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56); +var node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63); -/***/ }), - -/***/ 72826: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var node_modules_multiformats_vendor_varint_length = function (value) { + return ( + value < node_modules_multiformats_vendor_varint_N1 ? 1 + : value < node_modules_multiformats_vendor_varint_N2 ? 2 + : value < node_modules_multiformats_vendor_varint_N3 ? 3 + : value < node_modules_multiformats_vendor_varint_N4 ? 4 + : value < node_modules_multiformats_vendor_varint_N5 ? 5 + : value < node_modules_multiformats_vendor_varint_N6 ? 6 + : value < node_modules_multiformats_vendor_varint_N7 ? 7 + : value < node_modules_multiformats_vendor_varint_N8 ? 8 + : value < node_modules_multiformats_vendor_varint_N9 ? 9 + : 10 + ) +}; -"use strict"; -/*eslint-disable*/ +var node_modules_multiformats_vendor_varint_varint = { + encode: node_modules_multiformats_vendor_varint_encode_1 + , decode: node_modules_multiformats_vendor_varint_decode + , encodingLength: node_modules_multiformats_vendor_varint_length +}; +var node_modules_multiformats_vendor_varint_brrp_varint = node_modules_multiformats_vendor_varint_varint; -var $protobuf = __nccwpck_require__(63616); +/* harmony default export */ const node_modules_multiformats_vendor_varint = (node_modules_multiformats_vendor_varint_brrp_varint); -// Common aliases -var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/varint.js -// Exported root namespace -var $root = $protobuf.roots["libp2p-crypto-keys"] || ($protobuf.roots["libp2p-crypto-keys"] = {}); /** - * KeyType enum. - * @exports KeyType - * @enum {number} - * @property {number} RSA=0 RSA value - * @property {number} Ed25519=1 Ed25519 value - * @property {number} Secp256k1=2 Secp256k1 value + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} */ -$root.KeyType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RSA"] = 0; - values[valuesById[1] = "Ed25519"] = 1; - values[valuesById[2] = "Secp256k1"] = 2; - return values; -})(); - -$root.PublicKey = (function() { - - /** - * Properties of a PublicKey. - * @exports IPublicKey - * @interface IPublicKey - * @property {KeyType} Type PublicKey Type - * @property {Uint8Array} Data PublicKey Data - */ +const node_modules_multiformats_src_varint_decode = (data, offset = 0) => { + const code = node_modules_multiformats_vendor_varint.decode(data, offset) + return [code, node_modules_multiformats_vendor_varint.decode.bytes] +} - /** - * Constructs a new PublicKey. - * @exports PublicKey - * @classdesc Represents a PublicKey. - * @implements IPublicKey - * @constructor - * @param {IPublicKey=} [p] Properties to set - */ - function PublicKey(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } +/** + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] + */ +const node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + node_modules_multiformats_vendor_varint.encode(int, target, offset) + return target +} - /** - * PublicKey Type. - * @member {KeyType} Type - * @memberof PublicKey - * @instance - */ - PublicKey.prototype.Type = 0; +/** + * @param {number} int + * @returns {number} + */ +const node_modules_multiformats_src_varint_encodingLength = (int) => { + return node_modules_multiformats_vendor_varint.encodingLength(int) +} - /** - * PublicKey Data. - * @member {Uint8Array} Data - * @memberof PublicKey - * @instance - */ - PublicKey.prototype.Data = $util.newBuffer([]); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/hashes/digest.js - /** - * Encodes the specified PublicKey message. Does not implicitly {@link PublicKey.verify|verify} messages. - * @function encode - * @memberof PublicKey - * @static - * @param {IPublicKey} m PublicKey message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublicKey.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - w.uint32(8).int32(m.Type); - w.uint32(18).bytes(m.Data); - return w; - }; - /** - * Decodes a PublicKey message from the specified reader or buffer. - * @function decode - * @memberof PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {PublicKey} PublicKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublicKey.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.PublicKey(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.Type = r.int32(); - break; - case 2: - m.Data = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - if (!m.hasOwnProperty("Type")) - throw $util.ProtocolError("missing required 'Type'", { instance: m }); - if (!m.hasOwnProperty("Data")) - throw $util.ProtocolError("missing required 'Data'", { instance: m }); - return m; - }; - /** - * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof PublicKey - * @static - * @param {Object.} d Plain object - * @returns {PublicKey} PublicKey - */ - PublicKey.fromObject = function fromObject(d) { - if (d instanceof $root.PublicKey) - return d; - var m = new $root.PublicKey(); - switch (d.Type) { - case "RSA": - case 0: - m.Type = 0; - break; - case "Ed25519": - case 1: - m.Type = 1; - break; - case "Secp256k1": - case 2: - m.Type = 2; - break; - } - if (d.Data != null) { - if (typeof d.Data === "string") - $util.base64.decode(d.Data, m.Data = $util.newBuffer($util.base64.length(d.Data)), 0); - else if (d.Data.length) - m.Data = d.Data; - } - return m; - }; +/** + * Creates a multihash digest. + * + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest + */ +const node_modules_multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = node_modules_multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + node_modules_multiformats_src_varint_encodingLength(size) - /** - * Creates a plain object from a PublicKey message. Also converts values to other types if specified. - * @function toObject - * @memberof PublicKey - * @static - * @param {PublicKey} m PublicKey - * @param {$protobuf.IConversionOptions} [o] Conversion options - * @returns {Object.} Plain object - */ - PublicKey.toObject = function toObject(m, o) { - if (!o) - o = {}; - var d = {}; - if (o.defaults) { - d.Type = o.enums === String ? "RSA" : 0; - if (o.bytes === String) - d.Data = ""; - else { - d.Data = []; - if (o.bytes !== Array) - d.Data = $util.newBuffer(d.Data); - } - } - if (m.Type != null && m.hasOwnProperty("Type")) { - d.Type = o.enums === String ? $root.KeyType[m.Type] : m.Type; - } - if (m.Data != null && m.hasOwnProperty("Data")) { - d.Data = o.bytes === String ? $util.base64.encode(m.Data, 0, m.Data.length) : o.bytes === Array ? Array.prototype.slice.call(m.Data) : m.Data; - } - return d; - }; + const bytes = new Uint8Array(digestOffset + size) + node_modules_multiformats_src_varint_encodeTo(code, bytes, 0) + node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) - /** - * Converts this PublicKey to JSON. - * @function toJSON - * @memberof PublicKey - * @instance - * @returns {Object.} JSON object - */ - PublicKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return new node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} - return PublicKey; -})(); +/** + * Turns bytes representation of multihash digest into an instance. + * + * @param {Uint8Array} multihash + * @returns {MultihashDigest} + */ +const node_modules_multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = node_modules_multiformats_src_bytes_coerce(multihash) + const [code, sizeOffset] = node_modules_multiformats_src_varint_decode(bytes) + const [size, digestOffset] = node_modules_multiformats_src_varint_decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) -$root.PrivateKey = (function() { + if (digest.byteLength !== size) { + throw new Error('Incorrect length') + } - /** - * Properties of a PrivateKey. - * @exports IPrivateKey - * @interface IPrivateKey - * @property {KeyType} Type PrivateKey Type - * @property {Uint8Array} Data PrivateKey Data - */ + return new node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} - /** - * Constructs a new PrivateKey. - * @exports PrivateKey - * @classdesc Represents a PrivateKey. - * @implements IPrivateKey - * @constructor - * @param {IPrivateKey=} [p] Properties to set - */ - function PrivateKey(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } +/** + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} + */ +const node_modules_multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { + return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) - /** - * PrivateKey Type. - * @member {KeyType} Type - * @memberof PrivateKey - * @instance - */ - PrivateKey.prototype.Type = 0; + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + node_modules_multiformats_src_bytes_equals(a.bytes, data.bytes) + ) + } +} - /** - * PrivateKey Data. - * @member {Uint8Array} Data - * @memberof PrivateKey - * @instance - */ - PrivateKey.prototype.Data = $util.newBuffer([]); +/** + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest + */ - /** - * Encodes the specified PrivateKey message. Does not implicitly {@link PrivateKey.verify|verify} messages. - * @function encode - * @memberof PrivateKey - * @static - * @param {IPrivateKey} m PrivateKey message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateKey.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - w.uint32(8).int32(m.Type); - w.uint32(18).bytes(m.Data); - return w; - }; +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + * + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} + */ +class node_modules_multiformats_src_hashes_digest_Digest { + /** + * Creates a multihash digest. + * + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes + */ + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes + } +} - /** - * Decodes a PrivateKey message from the specified reader or buffer. - * @function decode - * @memberof PrivateKey - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {PrivateKey} PrivateKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateKey.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.PrivateKey(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.Type = r.int32(); - break; - case 2: - m.Data = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - if (!m.hasOwnProperty("Type")) - throw $util.ProtocolError("missing required 'Type'", { instance: m }); - if (!m.hasOwnProperty("Data")) - throw $util.ProtocolError("missing required 'Data'", { instance: m }); - return m; - }; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/hashes/identity.js - /** - * Creates a PrivateKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof PrivateKey - * @static - * @param {Object.} d Plain object - * @returns {PrivateKey} PrivateKey - */ - PrivateKey.fromObject = function fromObject(d) { - if (d instanceof $root.PrivateKey) - return d; - var m = new $root.PrivateKey(); - switch (d.Type) { - case "RSA": - case 0: - m.Type = 0; - break; - case "Ed25519": - case 1: - m.Type = 1; - break; - case "Secp256k1": - case 2: - m.Type = 2; - break; - } - if (d.Data != null) { - if (typeof d.Data === "string") - $util.base64.decode(d.Data, m.Data = $util.newBuffer($util.base64.length(d.Data)), 0); - else if (d.Data.length) - m.Data = d.Data; - } - return m; - }; - /** - * Creates a plain object from a PrivateKey message. Also converts values to other types if specified. - * @function toObject - * @memberof PrivateKey - * @static - * @param {PrivateKey} m PrivateKey - * @param {$protobuf.IConversionOptions} [o] Conversion options - * @returns {Object.} Plain object - */ - PrivateKey.toObject = function toObject(m, o) { - if (!o) - o = {}; - var d = {}; - if (o.defaults) { - d.Type = o.enums === String ? "RSA" : 0; - if (o.bytes === String) - d.Data = ""; - else { - d.Data = []; - if (o.bytes !== Array) - d.Data = $util.newBuffer(d.Data); - } - } - if (m.Type != null && m.hasOwnProperty("Type")) { - d.Type = o.enums === String ? $root.KeyType[m.Type] : m.Type; - } - if (m.Data != null && m.hasOwnProperty("Data")) { - d.Data = o.bytes === String ? $util.base64.encode(m.Data, 0, m.Data.length) : o.bytes === Array ? Array.prototype.slice.call(m.Data) : m.Data; - } - return d; - }; - /** - * Converts this PrivateKey to JSON. - * @function toJSON - * @memberof PrivateKey - * @instance - * @returns {Object.} JSON object - */ - PrivateKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; +const identity_code = 0x0 +const identity_name = 'identity' - return PrivateKey; -})(); +/** @type {(input:Uint8Array) => Uint8Array} */ +const identity_encode = node_modules_multiformats_src_bytes_coerce -module.exports = $root; +/** + * @param {Uint8Array} input + * @returns {Digest.Digest} + */ +const digest = (input) => node_modules_multiformats_src_hashes_digest_create(identity_code, identity_encode(input)) +const identity_identity = { code: identity_code, name: identity_name, encode: identity_encode, digest } -/***/ }), +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str + } + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch + } + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + } +} +var node_modules_multiformats_vendor_base_x_src = node_modules_multiformats_vendor_base_x_base; -/***/ 91667: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = node_modules_multiformats_vendor_base_x_src; -"use strict"; +/* harmony default export */ const node_modules_multiformats_vendor_base_x = (node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base.js -const { sha256 } = __nccwpck_require__(80960) -const errcode = __nccwpck_require__(5822) -const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -__nccwpck_require__(34531) -const forge = __nccwpck_require__(96630) +// Linter can't see that API is used in types. +// eslint-disable-next-line -const crypto = __nccwpck_require__(23882) -const pbm = __nccwpck_require__(72826) -const exporter = __nccwpck_require__(76630) -class RsaPublicKey { - constructor (key) { - this._key = key +/** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} + */ +class multiformats_src_bases_base_Encoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + */ + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode } - async verify (data, sig) { // eslint-disable-line require-await - return crypto.hashAndVerify(this._key, sig, data) + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') + } } +} - marshal () { - return crypto.utils.jwkToPkix(this._key) +/** + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} + */ +class multiformats_src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') + } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode } - get bytes () { - return pbm.PublicKey.encode({ - Type: pbm.KeyType.RSA, - Data: this.marshal() - }).finish() + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) + } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') + } } - encrypt (bytes) { - return crypto.encrypt(this._key, bytes) + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return multiformats_src_bases_base_or(this, decoder) } +} - equals (key) { - return uint8ArrayEquals(this.bytes, key.bytes) +/** + * @template {string} Prefix + * @typedef {Record>} Decoders + */ + +/** + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} + */ +class multiformats_src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders } - async hash () { - const { bytes } = await sha256.digest(this.bytes) + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return multiformats_src_bases_base_or(this, decoder) + } - return bytes + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) + } } } -class RsaPrivateKey { - // key - Object of the jwk format - // publicKey - Uint8Array of the spki format - constructor (key, publicKey) { - this._key = key - this._publicKey = publicKey +/** + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} + */ +const multiformats_src_bases_base_or = (left, right) => new multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) + +/** + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} + */ +class multiformats_src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new multiformats_src_bases_base_Decoder(name, prefix, baseDecode) } - genSecret () { - return crypto.getRandomValues(16) + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) } - async sign (message) { // eslint-disable-line require-await - return crypto.hashAndSign(this._key, message) + /** + * @param {string} input + */ + decode (input) { + return this.decoder.decode(input) } +} - get public () { - if (!this._publicKey) { - throw errcode(new Error('public key not provided'), 'ERR_PUBKEY_NOT_PROVIDED') - } +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} + */ +const multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new multiformats_src_bases_base_Codec(name, prefix, encode, decode) - return new RsaPublicKey(this._publicKey) - } +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} + */ +const multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = node_modules_multiformats_vendor_base_x(alphabet, name) + return multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => node_modules_multiformats_src_bytes_coerce(decode(text)) + }) +} - decrypt (bytes) { - return crypto.decrypt(this._key, bytes) +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i } - marshal () { - return crypto.utils.jwkToPkcs1(this._key) + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end } - get bytes () { - return pbm.PrivateKey.encode({ - Type: pbm.KeyType.RSA, - Data: this.marshal() - }).finish() + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) + + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) + } + + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar + + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) + } } - equals (key) { - return uint8ArrayEquals(this.bytes, key.bytes) + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') } - async hash () { - const { bytes } = await sha256.digest(this.bytes) + return out +} - return bytes - } +/** + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} + */ +const multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' - /** - * Gets the ID of the key. - * - * The key id is the base58 encoding of the SHA-256 multihash of its public key. - * The public key is a protobuf encoding containing a type and the DER encoding - * of the PKCS SubjectPublicKeyInfo. - * - * @returns {Promise} - */ - async id () { - const hash = await this.public.hash() - return uint8ArrayToString(hash, 'base58btc') + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 + + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] + } } - /** - * Exports the key into a password protected PEM format - * - * @param {string} password - The password to read the encrypted PEM - * @param {string} [format=pkcs-8] - The format in which to export as - */ - async export (password, format = 'pkcs-8') { // eslint-disable-line require-await - if (format === 'pkcs-8') { - const buffer = new forge.util.ByteBuffer(this.marshal()) - const asn1 = forge.asn1.fromDer(buffer) - const privateKey = forge.pki.privateKeyFromAsn1(asn1) + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] + } - const options = { - algorithm: 'aes256', - count: 10000, - saltSize: 128 / 8, - prfAlgorithm: 'sha512' - } - return forge.pki.encryptRsaPrivateKey(privateKey, password, options) - } else if (format === 'libp2p-key') { - return exporter.export(this.bytes, password) - } else { - throw errcode(new Error(`export format '${format}' is not supported`), 'ERR_INVALID_EXPORT_FORMAT') + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' } } -} -async function unmarshalRsaPrivateKey (bytes) { - const jwk = crypto.utils.pkcs1ToJwk(bytes) - const keys = await crypto.unmarshalPrivateKey(jwk) - return new RsaPrivateKey(keys.privateKey, keys.publicKey) + return out } -function unmarshalRsaPublicKey (bytes) { - const jwk = crypto.utils.pkixToJwk(bytes) - return new RsaPublicKey(jwk) +/** + * RFC4648 Factory + * + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar + */ +const multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) + } + }) } -async function fromJwk (jwk) { - const keys = await crypto.unmarshalPrivateKey(jwk) - return new RsaPrivateKey(keys.privateKey, keys.publicKey) -} +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/identity.js +// @ts-check -async function generateKeyPair (bits) { - const keys = await crypto.generateKey(bits) - return new RsaPrivateKey(keys.privateKey, keys.publicKey) -} -module.exports = { - RsaPublicKey, - RsaPrivateKey, - unmarshalRsaPublicKey, - unmarshalRsaPrivateKey, - generateKeyPair, - fromJwk -} -/***/ }), +const bases_identity_identity = multiformats_src_bases_base_from({ + prefix: '\x00', + name: 'identity', + encode: (buf) => node_modules_multiformats_src_bytes_toString(buf), + decode: (str) => node_modules_multiformats_src_bytes_fromString(str) +}) -/***/ 34219: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base2.js +// @ts-check -"use strict"; -__nccwpck_require__(69197) -__nccwpck_require__(79626) -const forge = __nccwpck_require__(96630) -const { bigIntegerToUintBase64url, base64urlToBigInteger } = __nccwpck_require__(85216) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) +const base2 = multiformats_src_bases_base_rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}) -// Convert a PKCS#1 in ASN1 DER format to a JWK key -exports.pkcs1ToJwk = function (bytes) { - const asn1 = forge.asn1.fromDer(uint8ArrayToString(bytes, 'ascii')) - const privateKey = forge.pki.privateKeyFromAsn1(asn1) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base8.js +// @ts-check - // https://tools.ietf.org/html/rfc7518#section-6.3.1 - return { - kty: 'RSA', - n: bigIntegerToUintBase64url(privateKey.n), - e: bigIntegerToUintBase64url(privateKey.e), - d: bigIntegerToUintBase64url(privateKey.d), - p: bigIntegerToUintBase64url(privateKey.p), - q: bigIntegerToUintBase64url(privateKey.q), - dp: bigIntegerToUintBase64url(privateKey.dP), - dq: bigIntegerToUintBase64url(privateKey.dQ), - qi: bigIntegerToUintBase64url(privateKey.qInv), - alg: 'RS256', - kid: '2011-04-29' - } -} -// Convert a JWK key into PKCS#1 in ASN1 DER format -exports.jwkToPkcs1 = function (jwk) { - const asn1 = forge.pki.privateKeyToAsn1({ - n: base64urlToBigInteger(jwk.n), - e: base64urlToBigInteger(jwk.e), - d: base64urlToBigInteger(jwk.d), - p: base64urlToBigInteger(jwk.p), - q: base64urlToBigInteger(jwk.q), - dP: base64urlToBigInteger(jwk.dp), - dQ: base64urlToBigInteger(jwk.dq), - qInv: base64urlToBigInteger(jwk.qi) - }) - return uint8ArrayFromString(forge.asn1.toDer(asn1).getBytes(), 'ascii') -} +const base8 = multiformats_src_bases_base_rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}) -// Convert a PKCIX in ASN1 DER format to a JWK key -exports.pkixToJwk = function (bytes) { - const asn1 = forge.asn1.fromDer(uint8ArrayToString(bytes, 'ascii')) - const publicKey = forge.pki.publicKeyFromAsn1(asn1) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base10.js - return { - kty: 'RSA', - n: bigIntegerToUintBase64url(publicKey.n), - e: bigIntegerToUintBase64url(publicKey.e), - alg: 'RS256', - kid: '2011-04-29' - } -} -// Convert a JWK key to PKCIX in ASN1 DER format -exports.jwkToPkix = function (jwk) { - const asn1 = forge.pki.publicKeyToAsn1({ - n: base64urlToBigInteger(jwk.n), - e: base64urlToBigInteger(jwk.e) - }) +const base10 = multiformats_src_bases_base_baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}) - return uint8ArrayFromString(forge.asn1.toDer(asn1).getBytes(), 'ascii') -} +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base16.js +// @ts-check -/***/ }), -/***/ 23882: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const base16 = multiformats_src_bases_base_rfc4648({ + prefix: 'f', + name: 'base16', + alphabet: '0123456789abcdef', + bitsPerChar: 4 +}) -"use strict"; +const base16upper = multiformats_src_bases_base_rfc4648({ + prefix: 'F', + name: 'base16upper', + alphabet: '0123456789ABCDEF', + bitsPerChar: 4 +}) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base32.js -const crypto = __nccwpck_require__(6113) -const promisify = (__nccwpck_require__(73837).promisify) -const errcode = __nccwpck_require__(5822) -const randomBytes = __nccwpck_require__(26409) -const keypair = promisify(crypto.generateKeyPair) -exports.utils = __nccwpck_require__(34219) +const node_modules_multiformats_src_bases_base32_base32 = multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) -exports.generateKey = async function (bits) { // eslint-disable-line require-await - const key = await keypair('rsa', { - modulusLength: bits, - publicKeyEncoding: { type: 'pkcs1', format: 'jwk' }, - privateKeyEncoding: { type: 'pkcs1', format: 'jwk' } - }) +const node_modules_multiformats_src_bases_base32_base32upper = multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) - return { - privateKey: key.privateKey, - publicKey: key.publicKey +const multiformats_src_bases_base32_base32pad = multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) + +const multiformats_src_bases_base32_base32padupper = multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) + +const multiformats_src_bases_base32_base32hex = multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) + +const multiformats_src_bases_base32_base32hexupper = multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) + +const multiformats_src_bases_base32_base32hexpad = multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) + +const multiformats_src_bases_base32_base32hexpadupper = multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) + +const multiformats_src_bases_base32_base32z = multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base36.js + + +const base36 = multiformats_src_bases_base_baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}) + +const base36upper = multiformats_src_bases_base_baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base58.js + + +const node_modules_multiformats_src_bases_base58_base58btc = multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) + +const multiformats_src_bases_base58_base58flickr = multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base64.js +// @ts-check + + + +const bases_base64_base64 = multiformats_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) + +const bases_base64_base64pad = multiformats_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) + +const bases_base64_base64url = multiformats_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) + +const bases_base64_base64urlpad = multiformats_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/bases/base256emoji.js + + +const alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂') +const alphabetBytesToChars = /** @type {string[]} */ (alphabet.reduce((p, c, i) => { p[i] = c; return p }, /** @type {string[]} */([]))) +const alphabetCharsToBytes = /** @type {number[]} */ (alphabet.reduce((p, c, i) => { p[/** @type {number} */ (c.codePointAt(0))] = i; return p }, /** @type {number[]} */([]))) + +/** + * @param {Uint8Array} data + * @returns {string} + */ +function base256emoji_encode (data) { + return data.reduce((p, c) => { + p += alphabetBytesToChars[c] + return p + }, '') +} + +/** + * @param {string} str + * @returns {Uint8Array} + */ +function base256emoji_decode (str) { + const byts = [] + for (const char of str) { + const byt = alphabetCharsToBytes[/** @type {number} */ (char.codePointAt(0))] + if (byt === undefined) { + throw new Error(`Non-base256emoji character: ${char}`) + } + byts.push(byt) } + return new Uint8Array(byts) } -// Takes a jwk key -exports.unmarshalPrivateKey = async function (key) { // eslint-disable-line require-await - if (!key) { - throw errcode(new Error('Missing key parameter'), 'ERR_MISSING_KEY') +const base256emoji = multiformats_src_bases_base_from({ + prefix: '🚀', + name: 'base256emoji', + encode: base256emoji_encode, + decode: base256emoji_decode +}) + +// EXTERNAL MODULE: external "crypto" +var external_crypto_ = __nccwpck_require__(6113); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/hashes/hasher.js + + +/** + * @template {string} Name + * @template {number} Code + * @param {object} options + * @param {Name} options.name + * @param {Code} options.code + * @param {(input: Uint8Array) => Await} options.encode + */ +const hashes_hasher_from = ({ name, code, encode }) => new hasher_Hasher(name, code, encode) + +/** + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. + * + * @template {string} Name + * @template {number} Code + * @class + * @implements {MultihashHasher} + */ +class hasher_Hasher { + /** + * + * @param {Name} name + * @param {Code} code + * @param {(input: Uint8Array) => Await} encode + */ + constructor (name, code, encode) { + this.name = name + this.code = code + this.encode = encode } - return { - privateKey: key, - publicKey: { - kty: key.kty, - n: key.n, - e: key.e + + /** + * @param {Uint8Array} input + * @returns {Await>} + */ + digest (input) { + if (input instanceof Uint8Array) { + const result = this.encode(input) + return result instanceof Uint8Array + ? node_modules_multiformats_src_hashes_digest_create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => node_modules_multiformats_src_hashes_digest_create(this.code, digest)) + } else { + throw Error('Unknown type, must be binary type') + /* c8 ignore next 1 */ } } } -exports.getRandomValues = randomBytes +/** + * @template {number} Alg + * @typedef {import('./interface.js').MultihashHasher} MultihashHasher + */ -exports.hashAndSign = async function (key, msg) { // eslint-disable-line require-await - return crypto.createSign('RSA-SHA256') - .update(msg) - .sign({ format: 'jwk', key: key }) -} +/** + * @template T + * @typedef {Promise|T} Await + */ -exports.hashAndVerify = async function (key, sig, msg) { // eslint-disable-line require-await - return crypto.createVerify('RSA-SHA256') - .update(msg) - .verify({ format: 'jwk', key: key }, sig) -} +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/hashes/sha2.js +// @ts-check -const padding = crypto.constants.RSA_PKCS1_PADDING -exports.encrypt = function (key, bytes) { - return crypto.publicEncrypt({ format: 'jwk', key, padding }, bytes) -} -exports.decrypt = function (key, bytes) { - return crypto.privateDecrypt({ format: 'jwk', key, padding }, bytes) -} -/***/ }), +const sha2_sha256 = hashes_hasher_from({ + name: 'sha2-256', + code: 0x12, + encode: (input) => node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha256').update(input).digest()) +}) -/***/ 84968: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const sha512 = hashes_hasher_from({ + name: 'sha2-512', + code: 0x13, + encode: input => node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha512').update(input).digest()) +}) -"use strict"; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/codecs/raw.js +// @ts-check -const { sha256 } = __nccwpck_require__(80960) -const errcode = __nccwpck_require__(5822) -const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const exporter = __nccwpck_require__(76630) +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ -module.exports = (keysProtobuf, randomBytes, crypto) => { - crypto = crypto || __nccwpck_require__(22831)() +const raw_name = 'raw' +const raw_code = 0x55 - class Secp256k1PublicKey { - constructor (key) { - crypto.validatePublicKey(key) - this._key = key - } +/** + * @param {Uint8Array} node + * @returns {ByteView} + */ +const raw_encode = (node) => node_modules_multiformats_src_bytes_coerce(node) - verify (data, sig) { - return crypto.hashAndVerify(this._key, sig, data) - } +/** + * @param {ByteView} data + * @returns {Uint8Array} + */ +const raw_decode = (data) => node_modules_multiformats_src_bytes_coerce(data) - marshal () { - return crypto.compressPublicKey(this._key) - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/codecs/json.js +// @ts-check - get bytes () { - return keysProtobuf.PublicKey.encode({ - Type: keysProtobuf.KeyType.Secp256k1, - Data: this.marshal() - }).finish() - } +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ - equals (key) { - return uint8ArrayEquals(this.bytes, key.bytes) - } +const json_textEncoder = new TextEncoder() +const json_textDecoder = new TextDecoder() - async hash () { - const { bytes } = await sha256.digest(this.bytes) +const json_name = 'json' +const json_code = 0x0200 - return bytes - } +/** + * @template T + * @param {T} node + * @returns {ByteView} + */ +const json_encode = (node) => json_textEncoder.encode(JSON.stringify(node)) + +/** + * @template T + * @param {ByteView} data + * @returns {T} + */ +const json_decode = (data) => JSON.parse(json_textDecoder.decode(data)) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/cid.js + + + + + +// Linter can see that API is used in types. +// eslint-disable-next-line + + +// This way TS will also expose all the types from module + + +/** + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} + */ +const node_modules_multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return node_modules_multiformats_src_cid_toStringV0( + bytes, + node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || node_modules_multiformats_src_bases_base58_base58btc.encoder + ) + default: + return node_modules_multiformats_src_cid_toStringV1( + bytes, + node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || node_modules_multiformats_src_bases_base32_base32.encoder) + ) } +} - class Secp256k1PrivateKey { - constructor (key, publicKey) { - this._key = key - this._publicKey = publicKey || crypto.computePublicKey(key) - crypto.validatePrivateKey(this._key) - crypto.validatePublicKey(this._publicKey) - } +/** + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} + */ +const node_modules_multiformats_src_cid_toJSON = (link) => ({ + '/': node_modules_multiformats_src_cid_format(link) +}) - sign (message) { - return crypto.hashAndSign(this._key, message) - } +/** + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json + */ +const node_modules_multiformats_src_cid_fromJSON = (json) => + node_modules_multiformats_src_cid_CID.parse(json['/']) - get public () { - return new Secp256k1PublicKey(this._publicKey) - } +/** @type {WeakMap>} */ +const node_modules_multiformats_src_cid_cache = new WeakMap() - marshal () { - return this._key - } +/** + * @param {API.UnknownLink} cid + * @returns {Map} + */ +const node_modules_multiformats_src_cid_baseCache = cid => { + const baseCache = node_modules_multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + node_modules_multiformats_src_cid_cache.set(cid, baseCache) + return baseCache + } + return baseCache +} - get bytes () { - return keysProtobuf.PrivateKey.encode({ - Type: keysProtobuf.KeyType.Secp256k1, - Data: this.marshal() - }).finish() - } +/** + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} + */ - equals (key) { - return uint8ArrayEquals(this.bytes, key.bytes) - } +class node_modules_multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + * + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes - async hash () { - const { bytes } = await sha256.digest(this.bytes) + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes + } - return bytes - } + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this + } - /** - * Gets the ID of the key. - * - * The key id is the base58 encoding of the SHA-256 multihash of its public key. - * The public key is a protobuf encoding containing a type and the DER encoding - * of the PKCS SubjectPublicKeyInfo. - * - * @returns {Promise} - */ - async id () { - const hash = await this.public.hash() - return uint8ArrayToString(hash, 'base58btc') + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset + } + + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } + + /** + * @returns {CID} + */ + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) + } + case 1: { + const { code, multihash } = this + + if (code !== node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } + + // sha2-256 + if (multihash.code !== node_modules_multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') + } + + return /** @type {CID} */ ( + node_modules_multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) + } } + } - /** - * Exports the key into a password protected `format` - * - * @param {string} password - The password to encrypt the key - * @param {string} [format=libp2p-key] - The format in which to export as - * @returns {Promise} The encrypted private key - */ - async export (password, format = 'libp2p-key') { // eslint-disable-line require-await - if (format === 'libp2p-key') { - return exporter.export(this.bytes, password) - } else { - throw errcode(new Error(`export format '${format}' is not supported`), 'ERR_INVALID_EXPORT_FORMAT') + /** + * @returns {CID} + */ + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = node_modules_multiformats_src_hashes_digest_create(code, digest) + return /** @type {CID} */ ( + node_modules_multiformats_src_cid_CID.createV1(this.code, multihash) + ) + } + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) } } } - function unmarshalSecp256k1PrivateKey (bytes) { - return new Secp256k1PrivateKey(bytes) + /** + * @param {unknown} other + * @returns {other is CID} + */ + equals (other) { + return node_modules_multiformats_src_cid_CID.equals(this, other) } - function unmarshalSecp256k1PublicKey (bytes) { - return new Secp256k1PublicKey(bytes) + /** + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} + */ + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + node_modules_multiformats_src_hashes_digest_equals(self.multihash, unknown.multihash) + ) } - async function generateKeyPair () { - const privateKeyBytes = await crypto.generateKey() - return new Secp256k1PrivateKey(privateKeyBytes) + /** + * @param {API.MultibaseEncoder} [base] + * @returns {string} + */ + toString (base) { + return node_modules_multiformats_src_cid_format(this, base) } - return { - Secp256k1PublicKey, - Secp256k1PrivateKey, - unmarshalSecp256k1PrivateKey, - unmarshalSecp256k1PublicKey, - generateKeyPair + toJSON () { + return { '/': node_modules_multiformats_src_cid_format(this) } } -} + link () { + return this + } -/***/ }), + get [Symbol.toStringTag] () { + return 'CID' + } -/***/ 22831: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Legacy -"use strict"; + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` + } + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} + */ + static asCID (input) { + if (input == null) { + return null + } -const errcode = __nccwpck_require__(5822) -const secp = __nccwpck_require__(61163) -const { sha256 } = __nccwpck_require__(80960) + const value = /** @type {any} */ (input) + if (value instanceof node_modules_multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new node_modules_multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[node_modules_multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (node_modules_multiformats_src_hashes_digest_decode(multihash)) + return node_modules_multiformats_src_cid_CID.create(version, code, digest) + } else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null + } + } -module.exports = () => { - const privateKeyLength = 32 + /** + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} + */ + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') + } - function generateKey () { - return secp.utils.randomPrivateKey() + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } + + switch (version) { + case 0: { + if (code !== node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes) + } + } + case 1: { + const bytes = node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new node_modules_multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') + } + } } /** - * Hash and sign message with private key + * Simplified version of `create` for CIDv0. * - * @param {number | bigint | (string | Uint8Array)} key - * @param {Uint8Array} msg + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} */ - async function hashAndSign (key, msg) { - const { digest } = await sha256.digest(msg) - try { - return await secp.sign(digest, key) - } catch (err) { - throw errcode(err, 'ERR_INVALID_INPUT') - } + static createV0 (digest) { + return node_modules_multiformats_src_cid_CID.create(0, node_modules_multiformats_src_cid_DAG_PB_CODE, digest) } /** - * Hash message and verify signature with public key + * Simplified version of `create` for CIDv1. * - * @param {secp.Point | (string | Uint8Array)} key - * @param {(string | Uint8Array) | secp.Signature} sig - * @param {Uint8Array} msg + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} */ - async function hashAndVerify (key, sig, msg) { - try { - const { digest } = await sha256.digest(msg) - return secp.verify(sig, digest, key) - } catch (err) { - throw errcode(err, 'ERR_INVALID_INPUT') - } + static createV1 (code, digest) { + return node_modules_multiformats_src_cid_CID.create(1, code, digest) } - function compressPublicKey (key) { - const point = secp.Point.fromHex(key).toRawBytes(true) - return point + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} + */ + static decode (bytes) { + const [cid, remainder] = node_modules_multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') + } + return cid } - function decompressPublicKey (key) { - const point = secp.Point.fromHex(key).toRawBytes(false) - return point + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} + */ + static decodeFirst (bytes) { + const specs = node_modules_multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = node_modules_multiformats_src_bytes_coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') + } + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new node_modules_multiformats_src_hashes_digest_Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] } - function validatePrivateKey (key) { - try { - secp.getPublicKey(key, true) - } catch (err) { - throw errcode(err, 'ERR_INVALID_PRIVATE_KEY') + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} + */ + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = node_modules_multiformats_src_varint_decode(initialBytes.subarray(offset)) + offset += length + return i } + + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (node_modules_multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 + } else { + codec = /** @type {C} */ (next()) + } + + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } + + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize + + return { version, codec, multihashCode, digestSize, multihashSize, size } } - function validatePublicKey (key) { - try { - secp.Point.fromHex(key) - } catch (err) { - throw errcode(err, 'ERR_INVALID_PUBLIC_KEY') + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + * + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} + */ + static parse (source, base) { + const [prefix, bytes] = node_modules_multiformats_src_cid_parseCIDtoBytes(source, base) + + const cid = node_modules_multiformats_src_cid_CID.decode(bytes) + + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') } + + // Cache string representation to avoid computing it on `this.toString()` + node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source) + + return cid } +} - function computePublicKey (privateKey) { - try { - return secp.getPublicKey(privateKey, true) - } catch (err) { - throw errcode(err, 'ERR_INVALID_PRIVATE_KEY') +/** + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} + */ +const node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || node_modules_multiformats_src_bases_base58_base58btc + return [ + /** @type {Prefix} */ (node_modules_multiformats_src_bases_base58_base58btc.prefix), + decoder.decode(`${node_modules_multiformats_src_bases_base58_base58btc.prefix}${source}`) + ] + } + case node_modules_multiformats_src_bases_base58_base58btc.prefix: { + const decoder = base || node_modules_multiformats_src_bases_base58_base58btc + return [/** @type {Prefix} */(node_modules_multiformats_src_bases_base58_base58btc.prefix), decoder.decode(source)] + } + case node_modules_multiformats_src_bases_base32_base32.prefix: { + const decoder = base || node_modules_multiformats_src_bases_base32_base32 + return [/** @type {Prefix} */(node_modules_multiformats_src_bases_base32_base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) + } + return [/** @type {Prefix} */(source[0]), base.decode(source)] } } +} - return { - generateKey, - privateKeyLength, - hashAndSign, - hashAndVerify, - compressPublicKey, - decompressPublicKey, - validatePrivateKey, - validatePublicKey, - computePublicKey +/** + * + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base + */ +const node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== node_modules_multiformats_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) + } + + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} + +/** + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base + */ +const node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid + } else { + return cid } } +const node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70 +const node_modules_multiformats_src_cid_SHA_256_CODE = 0x12 + +/** + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} + */ +const node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = node_modules_multiformats_src_varint_encodingLength(version) + const hashOffset = codeOffset + node_modules_multiformats_src_varint_encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + node_modules_multiformats_src_varint_encodeTo(version, bytes, 0) + node_modules_multiformats_src_varint_encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes +} + +const node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/index.js + + + + + +// This way TS will also expose all the types from module + + + + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/multiformats/src/basics.js +// @ts-check + + + + + + + + + + + + + + + + + + + +const bases = { ...bases_identity_namespaceObject, ...base2_namespaceObject, ...base8_namespaceObject, ...base10_namespaceObject, ...base16_namespaceObject, ...node_modules_multiformats_src_bases_base32_namespaceObject, ...base36_namespaceObject, ...node_modules_multiformats_src_bases_base58_namespaceObject, ...src_bases_base64_namespaceObject, ...base256emoji_namespaceObject } +const hashes = { ...sha2_namespaceObject, ...identity_namespaceObject } +const codecs = { raw: raw_namespaceObject, json: codecs_json_namespaceObject } + + + +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/connection/index.js +const connectionSymbol = Symbol.for('@libp2p/connection'); +function isConnection(other) { + return other != null && Boolean(other[connectionSymbol]); +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/content-routing/index.js +/** + * Any object that implements this Symbol as a property should return a + * ContentRouting instance as the property value, similar to how + * `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`. + * + * @example + * + * ```js + * import { contentRoutingSymbol, ContentRouting } from '@libp2p/content-routing' + * + * class MyContentRouter implements ContentRouting { + * get [contentRoutingSymbol] () { + * return this + * } + * + * // ...other methods + * } + * ``` + */ +const contentRoutingSymbol = Symbol.for('@libp2p/content-routing'); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/peer-discovery/index.js +/** + * Any object that implements this Symbol as a property should return a + * PeerDiscovery instance as the property value, similar to how + * `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`. + * + * @example + * + * ```js + * import { peerDiscovery, PeerDiscovery } from '@libp2p/peer-discovery' + * + * class MyPeerDiscoverer implements PeerDiscovery { + * get [peerDiscovery] () { + * return this + * } + * + * // ...other methods + * } + * ``` + */ +const peerDiscoverySymbol = Symbol.for('@libp2p/peer-discovery'); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/peer-id/index.js +const peerIdSymbol = Symbol.for('@libp2p/peer-id'); +function isPeerId(other) { + return other != null && Boolean(other[peerIdSymbol]); +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/peer-routing/index.js +/** + * Any object that implements this Symbol as a property should return a + * PeerRouting instance as the property value, similar to how + * `Symbol.Iterable` can be used to return an `Iterable` from an `Iterator`. + * + * @example + * + * ```js + * import { peerRouting, PeerRouting } from '@libp2p/peer-routing' + * + * class MyPeerRouter implements PeerRouting { + * get [peerRouting] () { + * return this + * } + * + * // ...other methods + * } + * ``` + */ +const peerRoutingSymbol = Symbol.for('@libp2p/peer-routing'); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/pubsub/index.js +/** + * On the producing side: + * * Build messages with the signature, key (from may be enough for certain inlineable public key types), from and seqno fields. + * + * On the consuming side: + * * Enforce the fields to be present, reject otherwise. + * * Propagate only if the fields are valid and signature can be verified, reject otherwise. + */ +const StrictSign = 'StrictSign'; +/** + * On the producing side: + * * Build messages without the signature, key, from and seqno fields. + * * The corresponding protobuf key-value pairs are absent from the marshalled message, not just empty. + * + * On the consuming side: + * * Enforce the fields to be absent, reject otherwise. + * * Propagate only if the fields are absent, reject otherwise. + * * A message_id function will not be able to use the above fields, and should instead rely on the data field. A commonplace strategy is to calculate a hash. + */ +const StrictNoSign = 'StrictNoSign'; +var TopicValidatorResult; +(function (TopicValidatorResult) { + /** + * The message is considered valid, and it should be delivered and forwarded to the network + */ + TopicValidatorResult["Accept"] = "accept"; + /** + * The message is neither delivered nor forwarded to the network + */ + TopicValidatorResult["Ignore"] = "ignore"; + /** + * The message is considered invalid, and it should be rejected + */ + TopicValidatorResult["Reject"] = "reject"; +})(TopicValidatorResult || (TopicValidatorResult = {})); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/transport/index.js +const transportSymbol = Symbol.for('@libp2p/transport'); +function isTransport(other) { + return other != null && Boolean(other[transportSymbol]); +} +/** + * Enum Transport Manager Fault Tolerance values + */ +var FaultTolerance; +(function (FaultTolerance) { + /** + * should be used for failing in any listen circumstance + */ + FaultTolerance[FaultTolerance["FATAL_ALL"] = 0] = "FATAL_ALL"; + /** + * should be used for not failing when not listening + */ + FaultTolerance[FaultTolerance["NO_FATAL"] = 1] = "NO_FATAL"; +})(FaultTolerance || (FaultTolerance = {})); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/errors.js +/** + * When this error is thrown it means an operation was aborted, + * usually in response to the `abort` event being emitted by an + * AbortSignal. + */ +class AbortError extends Error { + code; + type; + constructor(message = 'The operation was aborted') { + super(message); + this.code = AbortError.code; + this.type = AbortError.type; + } + static code = (/* unused pure expression or super */ null && ('ABORT_ERR')); + static type = (/* unused pure expression or super */ null && ('aborted')); +} +class errors_CodeError extends Error { + code; + props; + constructor(message, code, props) { + super(message); + this.code = code; + this.name = props?.name ?? 'CodeError'; + this.props = props ?? {}; // eslint-disable-line @typescript-eslint/consistent-type-assertions + } +} +class UnexpectedPeerError extends Error { + code; + constructor(message = 'Unexpected Peer') { + super(message); + this.code = UnexpectedPeerError.code; + } + static code = (/* unused pure expression or super */ null && ('ERR_UNEXPECTED_PEER')); +} +class InvalidCryptoExchangeError extends Error { + code; + constructor(message = 'Invalid crypto exchange') { + super(message); + this.code = InvalidCryptoExchangeError.code; + } + static code = (/* unused pure expression or super */ null && ('ERR_INVALID_CRYPTO_EXCHANGE')); +} +class InvalidCryptoTransmissionError extends Error { + code; + constructor(message = 'Invalid crypto transmission') { + super(message); + this.code = InvalidCryptoTransmissionError.code; + } + static code = (/* unused pure expression or super */ null && ('ERR_INVALID_CRYPTO_TRANSMISSION')); +} +// Error codes +const ERR_TIMEOUT = 'ERR_TIMEOUT'; +const ERR_INVALID_PARAMETERS = 'ERR_INVALID_PARAMETERS'; +const ERR_NOT_FOUND = 'ERR_NOT_FOUND'; +const ERR_INVALID_MESSAGE = 'ERR_INVALID_MESSAGE'; +//# sourceMappingURL=errors.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/event-target.js +/** + * An implementation of a typed event target + * etc + */ +class TypedEventEmitter extends EventTarget { + #listeners = new Map(); + listenerCount(type) { + const listeners = this.#listeners.get(type); + if (listeners == null) { + return 0; + } + return listeners.length; + } + addEventListener(type, listener, options) { + super.addEventListener(type, listener, options); + let list = this.#listeners.get(type); + if (list == null) { + list = []; + this.#listeners.set(type, list); + } + list.push({ + callback: listener, + once: (options !== true && options !== false && options?.once) ?? false + }); + } + removeEventListener(type, listener, options) { + super.removeEventListener(type.toString(), listener ?? null, options); + let list = this.#listeners.get(type); + if (list == null) { + return; + } + list = list.filter(({ callback }) => callback !== listener); + this.#listeners.set(type, list); + } + dispatchEvent(event) { + const result = super.dispatchEvent(event); + let list = this.#listeners.get(event.type); + if (list == null) { + return result; + } + list = list.filter(({ once }) => !once); + this.#listeners.set(event.type, list); + return result; + } + safeDispatchEvent(type, detail) { + return this.dispatchEvent(new CustomEvent(type, detail)); + } +} +/** + * CustomEvent is a standard event but it's not supported by node. + * + * Remove this when https://github.com/nodejs/node/issues/40678 is closed. + * + * Ref: https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent + */ +class CustomEventPolyfill extends Event { + /** Returns any custom data event was created with. Typically used for synthetic events. */ + detail; + constructor(message, data) { + super(message, data); + // @ts-expect-error could be undefined + this.detail = data?.detail; + } +} +const CustomEvent = globalThis.CustomEvent ?? CustomEventPolyfill; +//# sourceMappingURL=event-target.js.map +// EXTERNAL MODULE: external "events" +var external_events_ = __nccwpck_require__(82361); +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/events.js + +// create a setMaxListeners that doesn't break browser usage +const setMaxListeners = (n, ...eventTargets) => { + try { + nodeSetMaxListeners(n, ...eventTargets); + } + catch { + // swallow error, gulp + } +}; +//# sourceMappingURL=events.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/dist/src/index.js +/** + * @packageDocumentation + * + * Exports a `Libp2p` type for modules to use as a type argument. + * + * @example + * + * ```typescript + * import type { Libp2p } from '@libp2p/interface' + * + * function doSomethingWithLibp2p (node: Libp2p) { + * // ... + * } + * ``` + */ + -/***/ }), - -/***/ 52410: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -const errcode = __nccwpck_require__(5822) -module.exports = function (curveTypes, type) { - if (!curveTypes.includes(type)) { - const names = curveTypes.join(' / ') - throw errcode(new Error(`Unknown curve: ${type}. Must be ${names}`), 'ERR_INVALID_CURVE') - } -} -/***/ }), -/***/ 26409: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -const randomBytes = __nccwpck_require__(51252) -const errcode = __nccwpck_require__(5822) -module.exports = function (length) { - if (isNaN(length) || length <= 0) { - throw errcode(new Error('random bytes length must be a Number bigger than 0'), 'ERR_INVALID_LENGTH') - } - return randomBytes(length) -} -/***/ }), -/***/ 85216: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -__nccwpck_require__(36536) -__nccwpck_require__(121) -const forge = __nccwpck_require__(96630) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) -exports.bigIntegerToUintBase64url = (num, len) => { - // Call `.abs()` to convert to unsigned - let buf = Uint8Array.from(num.abs().toByteArray()) // toByteArray converts to big endian - // toByteArray() gives us back a signed array, which will include a leading 0 - // byte if the most significant bit of the number is 1: - // https://docs.microsoft.com/en-us/windows/win32/seccertenroll/about-integer - // Our number will always be positive so we should remove the leading padding. - buf = buf[0] === 0 ? buf.slice(1) : buf - if (len != null) { - if (buf.length > len) throw new Error('byte array longer than desired length') - buf = uint8ArrayConcat([new Uint8Array(len - buf.length), buf]) - } - return uint8ArrayToString(buf, 'base64url') +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bytes.js +const dist_src_bytes_empty = new Uint8Array(0); +function dist_src_bytes_toHex(d) { + return d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), ''); } - -// Convert a base64url encoded string to a BigInteger -exports.base64urlToBigInteger = str => { - const buf = exports.base64urlToBuffer(str) - return new forge.jsbn.BigInteger(uint8ArrayToString(buf, 'base16'), 16) +function dist_src_bytes_fromHex(hex) { + const hexes = hex.match(/../g); + return hexes != null ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : dist_src_bytes_empty; } - -exports.base64urlToBuffer = (str, len) => { - let buf = uint8ArrayFromString(str, 'base64urlpad') - - if (len != null) { - if (buf.length > len) throw new Error('byte array longer than desired length') - buf = uint8ArrayConcat([new Uint8Array(len - buf.length), buf]) - } - - return buf +function dist_src_bytes_equals(aa, bb) { + if (aa === bb) + return true; + if (aa.byteLength !== bb.byteLength) { + return false; + } + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false; + } + } + return true; } +function multiformats_dist_src_bytes_coerce(o) { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') + return o; + if (o instanceof ArrayBuffer) + return new Uint8Array(o); + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength); + } + throw new Error('Unknown type, must be binary type'); +} +function dist_src_bytes_isBinary(o) { + return o instanceof ArrayBuffer || ArrayBuffer.isView(o); +} +function dist_src_bytes_fromString(str) { + return new TextEncoder().encode(str); +} +function multiformats_dist_src_bytes_toString(b) { + return new TextDecoder().decode(b); +} +//# sourceMappingURL=bytes.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/vendor/base-x.js +/* eslint-disable */ +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +/** + * @param {string} ALPHABET + * @param {any} name + */ +function src_vendor_base_x_base(ALPHABET, name) { + if (ALPHABET.length >= 255) { + throw new TypeError('Alphabet too long'); + } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { + throw new TypeError(x + ' is ambiguous'); + } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + /** + * @param {any[] | Iterable} source + */ + function encode(source) { + // @ts-ignore + if (source instanceof Uint8Array) + ; + else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } + else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { + throw new TypeError('Expected Uint8Array'); + } + if (source.length === 0) { + return ''; + } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { + str += ALPHABET.charAt(b58[it2]); + } + return str; + } + /** + * @param {string | string[]} source + */ + function decodeUnsafe(source) { + if (typeof source !== 'string') { + throw new TypeError('Expected String'); + } + if (source.length === 0) { + return new Uint8Array(); + } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { + return; + } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { + return; + } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { + return; + } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch; + } + /** + * @param {string | string[]} string + */ + function decode(string) { + var buffer = decodeUnsafe(string); + if (buffer) { + return buffer; + } + throw new Error(`Non-${name} character`); + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + }; +} +var src_vendor_base_x_src = src_vendor_base_x_base; +var src_vendor_base_x_brrp_multiformats_scope_baseX = src_vendor_base_x_src; +/* harmony default export */ const dist_src_vendor_base_x = (src_vendor_base_x_brrp_multiformats_scope_baseX); +//# sourceMappingURL=base-x.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base.js -/***/ }), - -/***/ 79139: -/***/ (function(module, __unused_webpack_exports, __nccwpck_require__) { - -"use strict"; - -const isOptionObject = __nccwpck_require__(87873); +/** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + */ +class dist_src_bases_base_Encoder { + name; + prefix; + baseEncode; + constructor(name, prefix, baseEncode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + } + encode(bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}`; + } + else { + throw Error('Unknown type, must be binary type'); + } + } +} +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + */ +class dist_src_bases_base_Decoder { + name; + prefix; + baseDecode; + prefixCodePoint; + constructor(name, prefix, baseDecode) { + this.name = name; + this.prefix = prefix; + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character'); + } + this.prefixCodePoint = prefix.codePointAt(0); + this.baseDecode = baseDecode; + } + decode(text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`); + } + return this.baseDecode(text.slice(this.prefix.length)); + } + else { + throw Error('Can only multibase decode strings'); + } + } + or(decoder) { + return dist_src_bases_base_or(this, decoder); + } +} +class dist_src_bases_base_ComposedDecoder { + decoders; + constructor(decoders) { + this.decoders = decoders; + } + or(decoder) { + return dist_src_bases_base_or(this, decoder); + } + decode(input) { + const prefix = input[0]; + const decoder = this.decoders[prefix]; + if (decoder != null) { + return decoder.decode(input); + } + else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`); + } + } +} +function dist_src_bases_base_or(left, right) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return new dist_src_bases_base_ComposedDecoder({ + ...(left.decoders ?? { [left.prefix]: left }), + ...(right.decoders ?? { [right.prefix]: right }) + }); +} +class dist_src_bases_base_Codec { + name; + prefix; + baseEncode; + baseDecode; + encoder; + decoder; + constructor(name, prefix, baseEncode, baseDecode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + this.baseDecode = baseDecode; + this.encoder = new dist_src_bases_base_Encoder(name, prefix, baseEncode); + this.decoder = new dist_src_bases_base_Decoder(name, prefix, baseDecode); + } + encode(input) { + return this.encoder.encode(input); + } + decode(input) { + return this.decoder.decode(input); + } +} +function dist_src_bases_base_from({ name, prefix, encode, decode }) { + return new dist_src_bases_base_Codec(name, prefix, encode, decode); +} +function dist_src_bases_base_baseX({ name, prefix, alphabet }) { + const { encode, decode } = dist_src_vendor_base_x(alphabet, name); + return dist_src_bases_base_from({ + prefix, + name, + encode, + decode: (text) => multiformats_dist_src_bytes_coerce(decode(text)) + }); +} +function dist_src_bases_base_decode(string, alphabet, bitsPerChar, name) { + // Build the character lookup table: + const codes = {}; + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i; + } + // Count the padding bytes: + let end = string.length; + while (string[end - 1] === '=') { + --end; + } + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0); + // Parse the data: + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + let written = 0; // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]]; + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`); + } + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value; + bits += bitsPerChar; + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8; + out[written++] = 0xff & (buffer >> bits); + } + } + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || (0xff & (buffer << (8 - bits))) !== 0) { + throw new SyntaxError('Unexpected end of data'); + } + return out; +} +function dist_src_bases_base_encode(data, alphabet, bitsPerChar) { + const pad = alphabet[alphabet.length - 1] === '='; + const mask = (1 << bitsPerChar) - 1; + let out = ''; + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i]; + bits += 8; + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar; + out += alphabet[mask & (buffer >> bits)]; + } + } + // Partial character: + if (bits !== 0) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))]; + } + // Add padding characters until we hit a byte boundary: + if (pad) { + while (((out.length * bitsPerChar) & 7) !== 0) { + out += '='; + } + } + return out; +} +/** + * RFC4648 Factory + */ +function dist_src_bases_base_rfc4648({ name, prefix, bitsPerChar, alphabet }) { + return dist_src_bases_base_from({ + prefix, + name, + encode(input) { + return dist_src_bases_base_encode(input, alphabet, bitsPerChar); + }, + decode(input) { + return dist_src_bases_base_decode(input, alphabet, bitsPerChar, name); + } + }); +} +//# sourceMappingURL=base.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base58.js -const {hasOwnProperty} = Object.prototype; -const {propertyIsEnumerable} = Object; -const defineProperty = (object, name, value) => Object.defineProperty(object, name, { - value, - writable: true, - enumerable: true, - configurable: true +const dist_src_bases_base58_base58btc = dist_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}); +const dist_src_bases_base58_base58flickr = dist_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' }); +//# sourceMappingURL=base58.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base32.js + +const dist_src_bases_base32_base32 = dist_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}); +const dist_src_bases_base32_base32upper = dist_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}); +const dist_src_bases_base32_base32pad = dist_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}); +const dist_src_bases_base32_base32padupper = dist_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}); +const dist_src_bases_base32_base32hex = dist_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}); +const dist_src_bases_base32_base32hexupper = dist_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}); +const dist_src_bases_base32_base32hexpad = dist_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}); +const dist_src_bases_base32_base32hexpadupper = dist_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}); +const dist_src_bases_base32_base32z = dist_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}); +//# sourceMappingURL=base32.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/vendor/varint.js +/* eslint-disable */ +var src_vendor_varint_encode_1 = dist_src_vendor_varint_encode; +var src_vendor_varint_MSB = 0x80, src_vendor_varint_REST = 0x7F, src_vendor_varint_MSBALL = ~src_vendor_varint_REST, src_vendor_varint_INT = Math.pow(2, 31); +/** + * @param {number} num + * @param {number[]} out + * @param {number} offset + */ +function dist_src_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while (num >= src_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | src_vendor_varint_MSB; + num /= 128; + } + while (num & src_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | src_vendor_varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + // @ts-ignore + dist_src_vendor_varint_encode.bytes = offset - oldOffset + 1; + return out; +} +var dist_src_vendor_varint_decode = src_vendor_varint_read; +var src_vendor_varint_MSB$1 = 0x80, src_vendor_varint_REST$1 = 0x7F; +/** + * @param {string | any[]} buf + * @param {number} offset + */ +function src_vendor_varint_read(buf, offset) { + var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + do { + if (counter >= l) { + // @ts-ignore + src_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint'); + } + b = buf[counter++]; + res += shift < 28 + ? (b & src_vendor_varint_REST$1) << shift + : (b & src_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= src_vendor_varint_MSB$1); + // @ts-ignore + src_vendor_varint_read.bytes = counter - offset; + return res; +} +var src_vendor_varint_N1 = Math.pow(2, 7); +var src_vendor_varint_N2 = Math.pow(2, 14); +var src_vendor_varint_N3 = Math.pow(2, 21); +var src_vendor_varint_N4 = Math.pow(2, 28); +var src_vendor_varint_N5 = Math.pow(2, 35); +var src_vendor_varint_N6 = Math.pow(2, 42); +var src_vendor_varint_N7 = Math.pow(2, 49); +var src_vendor_varint_N8 = Math.pow(2, 56); +var src_vendor_varint_N9 = Math.pow(2, 63); +var dist_src_vendor_varint_length = function (/** @type {number} */ value) { + return (value < src_vendor_varint_N1 ? 1 + : value < src_vendor_varint_N2 ? 2 + : value < src_vendor_varint_N3 ? 3 + : value < src_vendor_varint_N4 ? 4 + : value < src_vendor_varint_N5 ? 5 + : value < src_vendor_varint_N6 ? 6 + : value < src_vendor_varint_N7 ? 7 + : value < src_vendor_varint_N8 ? 8 + : value < src_vendor_varint_N9 ? 9 + : 10); +}; +var dist_src_vendor_varint_varint = { + encode: src_vendor_varint_encode_1, + decode: dist_src_vendor_varint_decode, + encodingLength: dist_src_vendor_varint_length +}; +var src_vendor_varint_brrp_varint = dist_src_vendor_varint_varint; +/* harmony default export */ const multiformats_dist_src_vendor_varint = (src_vendor_varint_brrp_varint); +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/varint.js + +function node_modules_multiformats_dist_src_varint_decode(data, offset = 0) { + const code = multiformats_dist_src_vendor_varint.decode(data, offset); + return [code, multiformats_dist_src_vendor_varint.decode.bytes]; +} +function dist_src_varint_encodeTo(int, target, offset = 0) { + multiformats_dist_src_vendor_varint.encode(int, target, offset); + return target; +} +function dist_src_varint_encodingLength(int) { + return multiformats_dist_src_vendor_varint.encodingLength(int); +} +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/hashes/digest.js -const globalThis = this; -const defaultMergeOptions = { - concatArrays: false, - ignoreUndefined: false -}; -const getEnumerableOwnPropertyKeys = value => { - const keys = []; +/** + * Creates a multihash digest. + */ +function dist_src_hashes_digest_create(code, digest) { + const size = digest.byteLength; + const sizeOffset = dist_src_varint_encodingLength(code); + const digestOffset = sizeOffset + dist_src_varint_encodingLength(size); + const bytes = new Uint8Array(digestOffset + size); + dist_src_varint_encodeTo(code, bytes, 0); + dist_src_varint_encodeTo(size, bytes, sizeOffset); + bytes.set(digest, digestOffset); + return new dist_src_hashes_digest_Digest(code, size, digest, bytes); +} +/** + * Turns bytes representation of multihash digest into an instance. + */ +function dist_src_hashes_digest_decode(multihash) { + const bytes = multiformats_dist_src_bytes_coerce(multihash); + const [code, sizeOffset] = node_modules_multiformats_dist_src_varint_decode(bytes); + const [size, digestOffset] = node_modules_multiformats_dist_src_varint_decode(bytes.subarray(sizeOffset)); + const digest = bytes.subarray(sizeOffset + digestOffset); + if (digest.byteLength !== size) { + throw new Error('Incorrect length'); + } + return new dist_src_hashes_digest_Digest(code, size, digest, bytes); +} +function dist_src_hashes_digest_equals(a, b) { + if (a === b) { + return true; + } + else { + const data = b; + return (a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + dist_src_bytes_equals(a.bytes, data.bytes)); + } +} +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + */ +class dist_src_hashes_digest_Digest { + code; + size; + digest; + bytes; + /** + * Creates a multihash digest. + */ + constructor(code, size, digest, bytes) { + this.code = code; + this.size = size; + this.digest = digest; + this.bytes = bytes; + } +} +//# sourceMappingURL=digest.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/cid.js - for (const key in value) { - if (hasOwnProperty.call(value, key)) { - keys.push(key); - } - } - /* istanbul ignore else */ - if (Object.getOwnPropertySymbols) { - const symbols = Object.getOwnPropertySymbols(value); - for (const symbol of symbols) { - if (propertyIsEnumerable.call(value, symbol)) { - keys.push(symbol); - } - } - } - return keys; -}; -function clone(value) { - if (Array.isArray(value)) { - return cloneArray(value); - } +// This way TS will also expose all the types from module - if (isOptionObject(value)) { - return cloneOptionObject(value); - } +function dist_src_cid_format(link, base) { + const { bytes, version } = link; + switch (version) { + case 0: + return dist_src_cid_toStringV0(bytes, dist_src_cid_baseCache(link), base ?? dist_src_bases_base58_base58btc.encoder); + default: + return dist_src_cid_toStringV1(bytes, dist_src_cid_baseCache(link), (base ?? dist_src_bases_base32_base32.encoder)); + } +} +function dist_src_cid_toJSON(link) { + return { + '/': dist_src_cid_format(link) + }; +} +function dist_src_cid_fromJSON(json) { + return multiformats_dist_src_cid_CID.parse(json['/']); +} +const dist_src_cid_cache = new WeakMap(); +function dist_src_cid_baseCache(cid) { + const baseCache = dist_src_cid_cache.get(cid); + if (baseCache == null) { + const baseCache = new Map(); + dist_src_cid_cache.set(cid, baseCache); + return baseCache; + } + return baseCache; +} +class multiformats_dist_src_cid_CID { + code; + version; + multihash; + bytes; + '/'; + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param multihash - (Multi)hash of the of the content. + */ + constructor(version, code, multihash, bytes) { + this.code = code; + this.version = version; + this.multihash = multihash; + this.bytes = bytes; + // flag to serializers that this is a CID and + // should be treated specially + this['/'] = bytes; + } + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID() { + return this; + } + // ArrayBufferView + get byteOffset() { + return this.bytes.byteOffset; + } + // ArrayBufferView + get byteLength() { + return this.bytes.byteLength; + } + toV0() { + switch (this.version) { + case 0: { + return this; + } + case 1: { + const { code, multihash } = this; + if (code !== dist_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0'); + } + // sha2-256 + if (multihash.code !== dist_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0'); + } + return (multiformats_dist_src_cid_CID.createV0(multihash)); + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`); + } + } + } + toV1() { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash; + const multihash = dist_src_hashes_digest_create(code, digest); + return (multiformats_dist_src_cid_CID.createV1(this.code, multihash)); + } + case 1: { + return this; + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`); + } + } + } + equals(other) { + return multiformats_dist_src_cid_CID.equals(this, other); + } + static equals(self, other) { + const unknown = other; + return (unknown != null && + self.code === unknown.code && + self.version === unknown.version && + dist_src_hashes_digest_equals(self.multihash, unknown.multihash)); + } + toString(base) { + return dist_src_cid_format(this, base); + } + toJSON() { + return { '/': dist_src_cid_format(this) }; + } + link() { + return this; + } + [Symbol.toStringTag] = 'CID'; + // Legacy + [Symbol.for('nodejs.util.inspect.custom')]() { + return `CID(${this.toString()})`; + } + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + */ + static asCID(input) { + if (input == null) { + return null; + } + const value = input; + if (value instanceof multiformats_dist_src_cid_CID) { + // If value is instance of CID then we're all set. + return value; + } + else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value; + return new multiformats_dist_src_cid_CID(version, code, multihash, bytes ?? dist_src_cid_encodeCID(version, code, multihash.bytes)); + } + else if (value[dist_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value; + const digest = dist_src_hashes_digest_decode(multihash); + return multiformats_dist_src_cid_CID.create(version, code, digest); + } + else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null; + } + } + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param digest - (Multi)hash of the of the content. + */ + static create(version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported'); + } + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest'); + } + switch (version) { + case 0: { + if (code !== dist_src_cid_DAG_PB_CODE) { + throw new Error(`Version 0 CID must use dag-pb (code: ${dist_src_cid_DAG_PB_CODE}) block encoding`); + } + else { + return new multiformats_dist_src_cid_CID(version, code, digest, digest.bytes); + } + } + case 1: { + const bytes = dist_src_cid_encodeCID(version, code, digest.bytes); + return new multiformats_dist_src_cid_CID(version, code, digest, bytes); + } + default: { + throw new Error('Invalid version'); + } + } + } + /** + * Simplified version of `create` for CIDv0. + */ + static createV0(digest) { + return multiformats_dist_src_cid_CID.create(0, dist_src_cid_DAG_PB_CODE, digest); + } + /** + * Simplified version of `create` for CIDv1. + * + * @param code - Content encoding format code. + * @param digest - Multihash of the content. + */ + static createV1(code, digest) { + return multiformats_dist_src_cid_CID.create(1, code, digest); + } + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + */ + static decode(bytes) { + const [cid, remainder] = multiformats_dist_src_cid_CID.decodeFirst(bytes); + if (remainder.length !== 0) { + throw new Error('Incorrect length'); + } + return cid; + } + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + */ + static decodeFirst(bytes) { + const specs = multiformats_dist_src_cid_CID.inspectBytes(bytes); + const prefixSize = specs.size - specs.multihashSize; + const multihashBytes = multiformats_dist_src_bytes_coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize)); + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length'); + } + const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize); + const digest = new dist_src_hashes_digest_Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes); + const cid = specs.version === 0 + ? multiformats_dist_src_cid_CID.createV0(digest) + : multiformats_dist_src_cid_CID.createV1(specs.codec, digest); + return [cid, bytes.subarray(specs.size)]; + } + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + */ + static inspectBytes(initialBytes) { + let offset = 0; + const next = () => { + const [i, length] = node_modules_multiformats_dist_src_varint_decode(initialBytes.subarray(offset)); + offset += length; + return i; + }; + let version = next(); + let codec = dist_src_cid_DAG_PB_CODE; + if (version === 18) { + // CIDv0 + version = 0; + offset = 0; + } + else { + codec = next(); + } + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`); + } + const prefixSize = offset; + const multihashCode = next(); // multihash code + const digestSize = next(); // multihash length + const size = offset + digestSize; + const multihashSize = size - prefixSize; + return { version, codec, multihashCode, digestSize, multihashSize, size }; + } + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + */ + static parse(source, base) { + const [prefix, bytes] = dist_src_cid_parseCIDtoBytes(source, base); + const cid = multiformats_dist_src_cid_CID.decode(bytes); + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix'); + } + // Cache string representation to avoid computing it on `this.toString()` + dist_src_cid_baseCache(cid).set(prefix, source); + return cid; + } +} +function dist_src_cid_parseCIDtoBytes(source, base) { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base ?? dist_src_bases_base58_base58btc; + return [ + dist_src_bases_base58_base58btc.prefix, + decoder.decode(`${dist_src_bases_base58_base58btc.prefix}${source}`) + ]; + } + case dist_src_bases_base58_base58btc.prefix: { + const decoder = base ?? dist_src_bases_base58_base58btc; + return [dist_src_bases_base58_base58btc.prefix, decoder.decode(source)]; + } + case dist_src_bases_base32_base32.prefix: { + const decoder = base ?? dist_src_bases_base32_base32; + return [dist_src_bases_base32_base32.prefix, decoder.decode(source)]; + } + default: { + if (base == null) { + throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided'); + } + return [source[0], base.decode(source)]; + } + } +} +function dist_src_cid_toStringV0(bytes, cache, base) { + const { prefix } = base; + if (prefix !== dist_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`); + } + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes).slice(1); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +function dist_src_cid_toStringV1(bytes, cache, base) { + const { prefix } = base; + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +const dist_src_cid_DAG_PB_CODE = 0x70; +const dist_src_cid_SHA_256_CODE = 0x12; +function dist_src_cid_encodeCID(version, code, multihash) { + const codeOffset = dist_src_varint_encodingLength(version); + const hashOffset = codeOffset + dist_src_varint_encodingLength(code); + const bytes = new Uint8Array(hashOffset + multihash.byteLength); + dist_src_varint_encodeTo(version, bytes, 0); + dist_src_varint_encodeTo(code, bytes, codeOffset); + bytes.set(multihash, hashOffset); + return bytes; +} +const dist_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID'); +//# sourceMappingURL=cid.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/uint8arrays/dist/src/equals.js +/** + * Returns true if the two passed Uint8Arrays have the same content + */ +function equals_equals(a, b) { + if (a === b) { + return true; + } + if (a.byteLength !== b.byteLength) { + return false; + } + for (let i = 0; i < a.byteLength; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; +} +//# sourceMappingURL=equals.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base10.js - return value; +const base10_base10 = dist_src_bases_base_baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}); +//# sourceMappingURL=base10.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base16.js + +const base16_base16 = dist_src_bases_base_rfc4648({ + prefix: 'f', + name: 'base16', + alphabet: '0123456789abcdef', + bitsPerChar: 4 +}); +const base16_base16upper = dist_src_bases_base_rfc4648({ + prefix: 'F', + name: 'base16upper', + alphabet: '0123456789ABCDEF', + bitsPerChar: 4 +}); +//# sourceMappingURL=base16.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base2.js + +const base2_base2 = dist_src_bases_base_rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}); +//# sourceMappingURL=base2.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base256emoji.js + +const base256emoji_alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂'); +const base256emoji_alphabetBytesToChars = (base256emoji_alphabet.reduce((p, c, i) => { p[i] = c; return p; }, ([]))); +const base256emoji_alphabetCharsToBytes = (base256emoji_alphabet.reduce((p, c, i) => { p[c.codePointAt(0)] = i; return p; }, ([]))); +function bases_base256emoji_encode(data) { + return data.reduce((p, c) => { + p += base256emoji_alphabetBytesToChars[c]; + return p; + }, ''); +} +function bases_base256emoji_decode(str) { + const byts = []; + for (const char of str) { + const byt = base256emoji_alphabetCharsToBytes[char.codePointAt(0)]; + if (byt === undefined) { + throw new Error(`Non-base256emoji character: ${char}`); + } + byts.push(byt); + } + return new Uint8Array(byts); } +const base256emoji_base256emoji = dist_src_bases_base_from({ + prefix: '🚀', + name: 'base256emoji', + encode: bases_base256emoji_encode, + decode: bases_base256emoji_decode +}); +//# sourceMappingURL=base256emoji.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base36.js -function cloneArray(array) { - const result = array.slice(0, 0); +const base36_base36 = dist_src_bases_base_baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}); +const base36_base36upper = dist_src_bases_base_baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}); +//# sourceMappingURL=base36.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base64.js + +const src_bases_base64_base64 = dist_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}); +const src_bases_base64_base64pad = dist_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}); +const src_bases_base64_base64url = dist_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}); +const src_bases_base64_base64urlpad = dist_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}); +//# sourceMappingURL=base64.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/base8.js + +const base8_base8 = dist_src_bases_base_rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}); +//# sourceMappingURL=base8.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/bases/identity.js - getEnumerableOwnPropertyKeys(array).forEach(key => { - defineProperty(result, key, clone(array[key])); - }); - return result; +const src_bases_identity_identity = dist_src_bases_base_from({ + prefix: '\x00', + name: 'identity', + encode: (buf) => multiformats_dist_src_bytes_toString(buf), + decode: (str) => dist_src_bytes_fromString(str) +}); +//# sourceMappingURL=identity.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/codecs/json.js +const codecs_json_textEncoder = new TextEncoder(); +const codecs_json_textDecoder = new TextDecoder(); +const codecs_json_name = 'json'; +const codecs_json_code = 0x0200; +function codecs_json_encode(node) { + return codecs_json_textEncoder.encode(JSON.stringify(node)); } +function codecs_json_decode(data) { + return JSON.parse(codecs_json_textDecoder.decode(data)); +} +//# sourceMappingURL=json.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/codecs/raw.js -function cloneOptionObject(object) { - const result = Object.getPrototypeOf(object) === null ? Object.create(null) : {}; +const codecs_raw_name = 'raw'; +const codecs_raw_code = 0x55; +function codecs_raw_encode(node) { + return multiformats_dist_src_bytes_coerce(node); +} +function codecs_raw_decode(data) { + return multiformats_dist_src_bytes_coerce(data); +} +//# sourceMappingURL=raw.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/hashes/identity.js - getEnumerableOwnPropertyKeys(object).forEach(key => { - defineProperty(result, key, clone(object[key])); - }); - return result; +const hashes_identity_code = 0x0; +const hashes_identity_name = 'identity'; +const hashes_identity_encode = multiformats_dist_src_bytes_coerce; +function identity_digest(input) { + return dist_src_hashes_digest_create(hashes_identity_code, hashes_identity_encode(input)); } +const hashes_identity_identity = { code: hashes_identity_code, name: hashes_identity_name, encode: hashes_identity_encode, digest: identity_digest }; +//# sourceMappingURL=identity.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/hashes/hasher.js +function src_hashes_hasher_from({ name, code, encode }) { + return new hashes_hasher_Hasher(name, code, encode); +} /** - * @param {*} merged already cloned - * @param {*} source something to merge - * @param {string[]} keys keys to merge - * @param {Object} config Config Object - * @returns {*} cloned Object + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. */ -const mergeKeys = (merged, source, keys, config) => { - keys.forEach(key => { - if (typeof source[key] === 'undefined' && config.ignoreUndefined) { - return; - } +class hashes_hasher_Hasher { + name; + code; + encode; + constructor(name, code, encode) { + this.name = name; + this.code = code; + this.encode = encode; + } + digest(input) { + if (input instanceof Uint8Array) { + const result = this.encode(input); + return result instanceof Uint8Array + ? dist_src_hashes_digest_create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => dist_src_hashes_digest_create(this.code, digest)); + } + else { + throw Error('Unknown type, must be binary type'); + /* c8 ignore next 1 */ + } + } +} +//# sourceMappingURL=hasher.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/hashes/sha2.js - // Do not recurse into prototype chain of merged - if (key in merged && merged[key] !== Object.getPrototypeOf(merged)) { - defineProperty(merged, key, merge(merged[key], source[key], config)); - } else { - defineProperty(merged, key, clone(source[key])); - } - }); - return merged; -}; +const hashes_sha2_sha256 = src_hashes_hasher_from({ + name: 'sha2-256', + code: 0x12, + encode: (input) => multiformats_dist_src_bytes_coerce(external_crypto_.createHash('sha256').update(input).digest()) +}); +const sha2_sha512 = src_hashes_hasher_from({ + name: 'sha2-512', + code: 0x13, + encode: input => multiformats_dist_src_bytes_coerce(external_crypto_.createHash('sha512').update(input).digest()) +}); +//# sourceMappingURL=sha2.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/index.js /** - * @param {*} merged already cloned - * @param {*} source something to merge - * @param {Object} config Config Object - * @returns {*} cloned Object + * @packageDocumentation * - * see [Array.prototype.concat ( ...arguments )](http://www.ecma-international.org/ecma-262/6.0/#sec-array.prototype.concat) + * This library defines common interfaces and low level building blocks for various interrelated multiformat technologies (multicodec, multihash, multibase, and CID). They can be used to implement custom base encoders / decoders / codecs, codec encoders /decoders and multihash hashers that comply to the interface that layers above assume. + * + * This library provides implementations for most basics and many others can be found in linked repositories. + * + * ```TypeScript + * import { CID } from 'multiformats/cid' + * import * as json from 'multiformats/codecs/json' + * import { sha256 } from 'multiformats/hashes/sha2' + * + * const bytes = json.encode({ hello: 'world' }) + * + * const hash = await sha256.digest(bytes) + * const cid = CID.create(1, json.code, hash) + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * ``` + * + * ## Creating Blocks + * + * ```TypeScript + * import * as Block from 'multiformats/block' + * import * as codec from '@ipld/dag-cbor' + * import { sha256 as hasher } from 'multiformats/hashes/sha2' + * + * const value = { hello: 'world' } + * + * // encode a block + * let block = await Block.encode({ value, codec, hasher }) + * + * block.value // { hello: 'world' } + * block.bytes // Uint8Array + * block.cid // CID() w/ sha2-256 hash address and dag-cbor codec + * + * // you can also decode blocks from their binary state + * block = await Block.decode({ bytes: block.bytes, codec, hasher }) + * + * // if you have the cid you can also verify the hash on decode + * block = await Block.create({ bytes: block.bytes, cid: block.cid, codec, hasher }) + * ``` + * + * ## Multibase Encoders / Decoders / Codecs + * + * CIDs can be serialized to string representation using multibase encoders that implement [`MultibaseEncoder`](https://github.com/multiformats/js-multiformats/blob/master/src/bases/interface.ts) interface. This library provides quite a few implementations that can be imported: + * + * ```TypeScript + * import { base64 } from "multiformats/bases/base64" + * cid.toString(base64.encoder) + * //> 'mAYAEEiCTojlxqRTl6svwqNJRVM2jCcPBxy+7mRTUfGDzy2gViA' + * ``` + * + * Parsing CID string serialized CIDs requires multibase decoder that implements [`MultibaseDecoder`](https://github.com/multiformats/js-multiformats/blob/master/src/bases/interface.ts) interface. This library provides a decoder for every encoder it provides: + * + * ```TypeScript + * CID.parse('mAYAEEiCTojlxqRTl6svwqNJRVM2jCcPBxy+7mRTUfGDzy2gViA', base64.decoder) + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * ``` + * + * Dual of multibase encoder & decoder is defined as multibase codec and it exposes + * them as `encoder` and `decoder` properties. For added convenience codecs also + * implement `MultibaseEncoder` and `MultibaseDecoder` interfaces so they could be + * used as either or both: + * + * ```TypeScript + * cid.toString(base64) + * CID.parse(cid.toString(base64), base64) + * ``` + * + * **Note:** CID implementation comes bundled with `base32` and `base58btc` + * multibase codecs so that CIDs can be base serialized to (version specific) + * default base encoding and parsed without having to supply base encoders/decoders: + * + * ```TypeScript + * const v1 = CID.parse('bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea') + * v1.toString() + * //> 'bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea' + * + * const v0 = CID.parse('QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n') + * v0.toString() + * //> 'QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n' + * v0.toV1().toString() + * //> 'bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku' + * ``` + * + * ## Multicodec Encoders / Decoders / Codecs + * + * This library defines [`BlockEncoder`, `BlockDecoder` and `BlockCodec` interfaces](https://github.com/multiformats/js-multiformats/blob/master/src/codecs/interface.ts). + * Codec implementations should conform to the `BlockCodec` interface which implements both `BlockEncoder` and `BlockDecoder`. + * Here is an example implementation of JSON `BlockCodec`. + * + * ```TypeScript + * export const { name, code, encode, decode } = { + * name: 'json', + * code: 0x0200, + * encode: json => new TextEncoder().encode(JSON.stringify(json)), + * decode: bytes => JSON.parse(new TextDecoder().decode(bytes)) + * } + * ``` + * + * ## Multihash Hashers + * + * This library defines [`MultihashHasher` and `MultihashDigest` interfaces](https://github.com/multiformats/js-multiformats/blob/master/src/hashes/interface.ts) and convinient function for implementing them: + * + * ```TypeScript + * import * as hasher from 'multiformats/hashes/hasher' + * + * const sha256 = hasher.from({ + * // As per multiformats table + * // https://github.com/multiformats/multicodec/blob/master/table.csv#L9 + * name: 'sha2-256', + * code: 0x12, + * + * encode: (input) => new Uint8Array(crypto.createHash('sha256').update(input).digest()) + * }) + * + * const hash = await sha256.digest(json.encode({ hello: 'world' })) + * CID.create(1, json.code, hash) + * + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * ``` + * + * ## Traversal + * + * This library contains higher-order functions for traversing graphs of data easily. + * + * `walk()` walks through the links in each block of a DAG calling a user-supplied loader function for each one, in depth-first order with no duplicate block visits. The loader should return a `Block` object and can be used to inspect and collect block ordering for a full DAG walk. The loader should `throw` on error, and return `null` if a block should be skipped by `walk()`. + * + * ```TypeScript + * import { walk } from 'multiformats/traversal' + * import * as Block from 'multiformats/block' + * import * as codec from 'multiformats/codecs/json' + * import { sha256 as hasher } from 'multiformats/hashes/sha2' + * + * // build a DAG (a single block for this simple example) + * const value = { hello: 'world' } + * const block = await Block.encode({ value, codec, hasher }) + * const { cid } = block + * console.log(cid) + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * + * // create a loader function that also collects CIDs of blocks in + * // their traversal order + * const load = (cid, blocks) => async (cid) => { + * // fetch a block using its cid + * // e.g.: const block = await fetchBlockByCID(cid) + * blocks.push(cid) + * return block + * } + * + * // collect blocks in this DAG starting from the root `cid` + * const blocks = [] + * await walk({ cid, load: load(cid, blocks) }) + * + * console.log(blocks) + * //> [CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea)] + * ``` + * + * ## Legacy interface + * + * [`blockcodec-to-ipld-format`](https://github.com/ipld/js-blockcodec-to-ipld-format) converts a multiformats [`BlockCodec`](https://github.com/multiformats/js-multiformats/blob/master/src/codecs/interface.ts#L21) into an + * [`interface-ipld-format`](https://github.com/ipld/interface-ipld-format) for use with the [`ipld`](https://github.com/ipld/ipld) package. This can help bridge IPLD codecs implemented using the structure and interfaces defined here to existing code that assumes, or requires `interface-ipld-format`. This bridge also includes the relevant TypeScript definitions. + * + * ## Implementations + * + * By default, no base encodings (other than base32 & base58btc), hash functions, + * or codec implementations are exposed by `multiformats`, you need to + * import the ones you need yourself. + * + * ### Multibase codecs + * + * | bases | import | repo | + * | ------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------- | + * | `base16` | `multiformats/bases/base16` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * | `base32`, `base32pad`, `base32hex`, `base32hexpad`, `base32z` | `multiformats/bases/base32` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * | `base64`, `base64pad`, `base64url`, `base64urlpad` | `multiformats/bases/base64` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * | `base58btc`, `base58flick4` | `multiformats/bases/base58` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * + * Other (less useful) bases implemented in [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) include: `base2`, `base8`, `base10`, `base36` and `base256emoji`. + * + * ### Multihash hashers + * + * | hashes | import | repo | + * | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------ | + * | `sha2-256`, `sha2-512` | `multiformats/hashes/sha2` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/hashes) | + * | `sha3-224`, `sha3-256`, `sha3-384`,`sha3-512`, `shake-128`, `shake-256`, `keccak-224`, `keccak-256`, `keccak-384`, `keccak-512` | `@multiformats/sha3` | [multiformats/js-sha3](https://github.com/multiformats/js-sha3) | + * | `identity` | `multiformats/hashes/identity` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/hashes/identity.js) | + * | `murmur3-128`, `murmur3-32` | `@multiformats/murmur3` | [multiformats/js-murmur3](https://github.com/multiformats/js-murmur3) | + * | `blake2b-*`, `blake2s-*` | `@multiformats/blake2` | [multiformats/js-blake2](https://github.com/multiformats/js-blake2) | + * + * ### IPLD codecs (multicodec) + * + * | codec | import | repo | + * | ---------- | -------------------------- | ------------------------------------------------------------------------------------------------------ | + * | `raw` | `multiformats/codecs/raw` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/codecs) | + * | `json` | `multiformats/codecs/json` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/codecs) | + * | `dag-cbor` | `@ipld/dag-cbor` | [ipld/js-dag-cbor](https://github.com/ipld/js-dag-cbor) | + * | `dag-json` | `@ipld/dag-json` | [ipld/js-dag-json](https://github.com/ipld/js-dag-json) | + * | `dag-pb` | `@ipld/dag-pb` | [ipld/js-dag-pb](https://github.com/ipld/js-dag-pb) | + * | `dag-jose` | `dag-jose` | [ceramicnetwork/js-dag-jose](https://github.com/ceramicnetwork/js-dag-jose) | */ -const concatArrays = (merged, source, config) => { - let result = merged.slice(0, 0); - let resultIndex = 0; - - [merged, source].forEach(array => { - const indices = []; - - // `result.concat(array)` with cloning - for (let k = 0; k < array.length; k++) { - if (!hasOwnProperty.call(array, k)) { - continue; - } - indices.push(String(k)); - - if (array === merged) { - // Already cloned - defineProperty(result, resultIndex++, array[k]); - } else { - defineProperty(result, resultIndex++, clone(array[k])); - } - } - - // Merge non-index keys - result = mergeKeys(result, array, getEnumerableOwnPropertyKeys(array).filter(key => !indices.includes(key)), config); - }); - return result; -}; -/** - * @param {*} merged already cloned - * @param {*} source something to merge - * @param {Object} config Config Object - * @returns {*} cloned Object - */ -function merge(merged, source, config) { - if (config.concatArrays && Array.isArray(merged) && Array.isArray(source)) { - return concatArrays(merged, source, config); - } - if (!isOptionObject(source) || !isOptionObject(merged)) { - return clone(source); - } - return mergeKeys(merged, source, getEnumerableOwnPropertyKeys(source), config); -} +// This way TS will also expose all the types from module -module.exports = function (...options) { - const config = merge(clone(defaultMergeOptions), (this !== globalThis && this) || {}, defaultMergeOptions); - let merged = {_: {}}; - for (const option of options) { - if (option === undefined) { - continue; - } +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/multiformats/dist/src/basics.js - if (!isOptionObject(option)) { - throw new TypeError('`' + option + '` is not an Option Object'); - } - merged = merge(merged, {_: option}, config); - } - return merged._; -}; -/***/ }), -/***/ 71111: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = minimatch -minimatch.Minimatch = Minimatch -var path = (function () { try { return __nccwpck_require__(71017) } catch (e) {}}()) || { - sep: '/' -} -minimatch.sep = path.sep -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = __nccwpck_require__(73594) -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' -// * => any number of characters -var star = qmark + '*?' -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') +const basics_bases = { ...src_bases_identity_namespaceObject, ...bases_base2_namespaceObject, ...bases_base8_namespaceObject, ...bases_base10_namespaceObject, ...bases_base16_namespaceObject, ...dist_src_bases_base32_namespaceObject, ...bases_base36_namespaceObject, ...dist_src_bases_base58_namespaceObject, ...dist_src_bases_base64_namespaceObject, ...bases_base256emoji_namespaceObject }; +const basics_hashes = { ...hashes_sha2_namespaceObject, ...hashes_identity_namespaceObject }; +const basics_codecs = { raw: codecs_raw_namespaceObject, json: src_codecs_json_namespaceObject }; -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) +//# sourceMappingURL=basics.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/uint8arrays/dist/src/util/as-uint8array.js +/** + * To guarantee Uint8Array semantics, convert nodejs Buffers + * into vanilla Uint8Arrays + */ +function as_uint8array_asUint8Array(buf) { + if (globalThis.Buffer != null) { + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + return buf; } +//# sourceMappingURL=as-uint8array.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/uint8arrays/dist/src/alloc.js -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } +/** + * Returns a `Uint8Array` of the requested size. Referenced memory will + * be initialized to 0. + */ +function alloc_alloc(size = 0) { + if (globalThis.Buffer?.alloc != null) { + return asUint8Array(globalThis.Buffer.alloc(size)); + } + return new Uint8Array(size); } - -function ext (a, b) { - b = b || {} - var t = {} - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - return t +/** + * Where possible returns a Uint8Array of the requested size that references + * uninitialized memory. Only use if you are certain you will immediately + * overwrite every value in the returned `Uint8Array`. + */ +function allocUnsafe(size = 0) { + if (globalThis.Buffer?.allocUnsafe != null) { + return as_uint8array_asUint8Array(globalThis.Buffer.allocUnsafe(size)); + } + return new Uint8Array(size); } +//# sourceMappingURL=alloc.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/uint8arrays/dist/src/util/bases.js -minimatch.defaults = function (def) { - if (!def || typeof def !== 'object' || !Object.keys(def).length) { - return minimatch - } - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - m.Minimatch.defaults = function defaults (options) { - return orig.defaults(ext(def, options)).Minimatch - } - - m.filter = function filter (pattern, options) { - return orig.filter(pattern, ext(def, options)) - } - - m.defaults = function defaults (options) { - return orig.defaults(ext(def, options)) - } - - m.makeRe = function makeRe (pattern, options) { - return orig.makeRe(pattern, ext(def, options)) - } - - m.braceExpand = function braceExpand (pattern, options) { - return orig.braceExpand(pattern, ext(def, options)) - } - - m.match = function (list, pattern, options) { - return orig.match(list, pattern, ext(def, options)) - } - return m +function createCodec(name, prefix, encode, decode) { + return { + name, + prefix, + encoder: { + name, + prefix, + encode + }, + decoder: { + decode + } + }; } +const string = createCodec('utf8', 'u', (buf) => { + const decoder = new TextDecoder('utf8'); + return 'u' + decoder.decode(buf); +}, (str) => { + const encoder = new TextEncoder(); + return encoder.encode(str.substring(1)); +}); +const ascii = createCodec('ascii', 'a', (buf) => { + let string = 'a'; + for (let i = 0; i < buf.length; i++) { + string += String.fromCharCode(buf[i]); + } + return string; +}, (str) => { + str = str.substring(1); + const buf = allocUnsafe(str.length); + for (let i = 0; i < str.length; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}); +const BASES = { + utf8: string, + 'utf-8': string, + hex: basics_bases.base16, + latin1: ascii, + ascii, + binary: ascii, + ...basics_bases +}; +/* harmony default export */ const util_bases = (BASES); +//# sourceMappingURL=bases.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/uint8arrays/dist/src/to-string.js -Minimatch.defaults = function (def) { - return minimatch.defaults(def).Minimatch +/** + * Turns a `Uint8Array` into a string. + * + * Supports `utf8`, `utf-8` and any encoding supported by the multibase module. + * + * Also `ascii` which is similar to node's 'binary' encoding. + */ +function to_string_toString(array, encoding = 'utf8') { + const base = util_bases[encoding]; + if (base == null) { + throw new Error(`Unsupported encoding "${encoding}"`); + } + if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) { + return globalThis.Buffer.from(array.buffer, array.byteOffset, array.byteLength).toString('utf8'); + } + // strip multibase prefix + return base.encoder.encode(array).substring(1); } - -function minimatch (p, pattern, options) { - assertValidPattern(pattern) - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - return new Minimatch(pattern, options).match(p) +//# sourceMappingURL=to-string.js.map +;// CONCATENATED MODULE: ./node_modules/uint8-varint/node_modules/uint8arrays/dist/src/util/as-uint8array.js +/** + * To guarantee Uint8Array semantics, convert nodejs Buffers + * into vanilla Uint8Arrays + */ +function util_as_uint8array_asUint8Array(buf) { + if (globalThis.Buffer != null) { + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + return buf; } +//# sourceMappingURL=as-uint8array.js.map +;// CONCATENATED MODULE: ./node_modules/uint8-varint/node_modules/uint8arrays/dist/src/alloc.js -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - assertValidPattern(pattern) - - if (!options) options = {} - - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (!options.allowWindowsEscape && path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - this.partial = !!options.partial - - // make the set of regexps etc. - this.make() +/** + * Returns a `Uint8Array` of the requested size. Referenced memory will + * be initialized to 0. + */ +function src_alloc_alloc(size = 0) { + if (globalThis.Buffer?.alloc != null) { + return asUint8Array(globalThis.Buffer.alloc(size)); + } + return new Uint8Array(size); } +/** + * Where possible returns a Uint8Array of the requested size that references + * uninitialized memory. Only use if you are certain you will immediately + * overwrite every value in the returned `Uint8Array`. + */ +function alloc_allocUnsafe(size = 0) { + if (globalThis.Buffer?.allocUnsafe != null) { + return util_as_uint8array_asUint8Array(globalThis.Buffer.allocUnsafe(size)); + } + return new Uint8Array(size); +} +//# sourceMappingURL=alloc.js.map +;// CONCATENATED MODULE: ./node_modules/uint8-varint/dist/src/index.js +/* eslint-disable no-fallthrough */ + +const src_N1 = Math.pow(2, 7); +const src_N2 = Math.pow(2, 14); +const src_N3 = Math.pow(2, 21); +const src_N4 = Math.pow(2, 28); +const src_N5 = Math.pow(2, 35); +const src_N6 = Math.pow(2, 42); +const src_N7 = Math.pow(2, 49); +/** Most significant bit of a byte */ +const src_MSB = 0x80; +/** Rest of the bits in a byte */ +const src_REST = 0x7f; +function src_encodingLength(value) { + if (value < src_N1) { + return 1; + } + if (value < src_N2) { + return 2; + } + if (value < src_N3) { + return 3; + } + if (value < src_N4) { + return 4; + } + if (value < src_N5) { + return 5; + } + if (value < src_N6) { + return 6; + } + if (value < src_N7) { + return 7; + } + if (Number.MAX_SAFE_INTEGER != null && value > Number.MAX_SAFE_INTEGER) { + throw new RangeError('Could not encode varint'); + } + return 8; +} +function encodeUint8Array(value, buf, offset = 0) { + switch (src_encodingLength(value)) { + case 8: { + buf[offset++] = (value & 0xFF) | src_MSB; + value /= 128; + } + case 7: { + buf[offset++] = (value & 0xFF) | src_MSB; + value /= 128; + } + case 6: { + buf[offset++] = (value & 0xFF) | src_MSB; + value /= 128; + } + case 5: { + buf[offset++] = (value & 0xFF) | src_MSB; + value /= 128; + } + case 4: { + buf[offset++] = (value & 0xFF) | src_MSB; + value >>>= 7; + } + case 3: { + buf[offset++] = (value & 0xFF) | src_MSB; + value >>>= 7; + } + case 2: { + buf[offset++] = (value & 0xFF) | src_MSB; + value >>>= 7; + } + case 1: { + buf[offset++] = (value & 0xFF); + value >>>= 7; + break; + } + default: throw new Error('unreachable'); + } + return buf; +} +function encodeUint8ArrayList(value, buf, offset = 0) { + switch (src_encodingLength(value)) { + case 8: { + buf.set(offset++, (value & 0xFF) | src_MSB); + value /= 128; + } + case 7: { + buf.set(offset++, (value & 0xFF) | src_MSB); + value /= 128; + } + case 6: { + buf.set(offset++, (value & 0xFF) | src_MSB); + value /= 128; + } + case 5: { + buf.set(offset++, (value & 0xFF) | src_MSB); + value /= 128; + } + case 4: { + buf.set(offset++, (value & 0xFF) | src_MSB); + value >>>= 7; + } + case 3: { + buf.set(offset++, (value & 0xFF) | src_MSB); + value >>>= 7; + } + case 2: { + buf.set(offset++, (value & 0xFF) | src_MSB); + value >>>= 7; + } + case 1: { + buf.set(offset++, (value & 0xFF)); + value >>>= 7; + break; + } + default: throw new Error('unreachable'); + } + return buf; +} +function decodeUint8Array(buf, offset) { + let b = buf[offset]; + let res = 0; + res += b & src_REST; + if (b < src_MSB) { + return res; + } + b = buf[offset + 1]; + res += (b & src_REST) << 7; + if (b < src_MSB) { + return res; + } + b = buf[offset + 2]; + res += (b & src_REST) << 14; + if (b < src_MSB) { + return res; + } + b = buf[offset + 3]; + res += (b & src_REST) << 21; + if (b < src_MSB) { + return res; + } + b = buf[offset + 4]; + res += (b & src_REST) * src_N4; + if (b < src_MSB) { + return res; + } + b = buf[offset + 5]; + res += (b & src_REST) * src_N5; + if (b < src_MSB) { + return res; + } + b = buf[offset + 6]; + res += (b & src_REST) * src_N6; + if (b < src_MSB) { + return res; + } + b = buf[offset + 7]; + res += (b & src_REST) * src_N7; + if (b < src_MSB) { + return res; + } + throw new RangeError('Could not decode varint'); +} +function decodeUint8ArrayList(buf, offset) { + let b = buf.get(offset); + let res = 0; + res += b & src_REST; + if (b < src_MSB) { + return res; + } + b = buf.get(offset + 1); + res += (b & src_REST) << 7; + if (b < src_MSB) { + return res; + } + b = buf.get(offset + 2); + res += (b & src_REST) << 14; + if (b < src_MSB) { + return res; + } + b = buf.get(offset + 3); + res += (b & src_REST) << 21; + if (b < src_MSB) { + return res; + } + b = buf.get(offset + 4); + res += (b & src_REST) * src_N4; + if (b < src_MSB) { + return res; + } + b = buf.get(offset + 5); + res += (b & src_REST) * src_N5; + if (b < src_MSB) { + return res; + } + b = buf.get(offset + 6); + res += (b & src_REST) * src_N6; + if (b < src_MSB) { + return res; + } + b = buf.get(offset + 7); + res += (b & src_REST) * src_N7; + if (b < src_MSB) { + return res; + } + throw new RangeError('Could not decode varint'); +} +function dist_src_encode(value, buf, offset = 0) { + if (buf == null) { + buf = alloc_allocUnsafe(src_encodingLength(value)); + } + if (buf instanceof Uint8Array) { + return encodeUint8Array(value, buf, offset); + } + else { + return encodeUint8ArrayList(value, buf, offset); + } +} +function dist_src_decode(buf, offset = 0) { + if (buf instanceof Uint8Array) { + return decodeUint8Array(buf, offset); + } + else { + return decodeUint8ArrayList(buf, offset); + } +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/uint8arrays/dist/src/concat.js -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - // step 1: figure out negation, etc. - this.parseNegate() +/** + * Returns a new Uint8Array created by concatenating the passed Uint8Arrays + */ +function concat_concat(arrays, length) { + if (globalThis.Buffer != null) { + return as_uint8array_asUint8Array(globalThis.Buffer.concat(arrays, length)); + } + if (length == null) { + length = arrays.reduce((acc, curr) => acc + curr.length, 0); + } + const output = allocUnsafe(length); + let offset = 0; + for (const arr of arrays) { + output.set(arr, offset); + offset += arr.length; + } + return as_uint8array_asUint8Array(output); +} +//# sourceMappingURL=concat.js.map +;// CONCATENATED MODULE: ./node_modules/@chainsafe/is-ip/lib/parser.js +/* eslint-disable @typescript-eslint/no-unsafe-return */ +class Parser { + index = 0; + input = ""; + new(input) { + this.index = 0; + this.input = input; + return this; + } + /** Run a parser, and restore the pre-parse state if it fails. */ + readAtomically(fn) { + const index = this.index; + const result = fn(); + if (result === undefined) { + this.index = index; + } + return result; + } + /** Run a parser, but fail if the entire input wasn't consumed. Doesn't run atomically. */ + parseWith(fn) { + const result = fn(); + if (this.index !== this.input.length) { + return undefined; + } + return result; + } + /** Peek the next character from the input */ + peekChar() { + if (this.index >= this.input.length) { + return undefined; + } + return this.input[this.index]; + } + /** Read the next character from the input */ + readChar() { + if (this.index >= this.input.length) { + return undefined; + } + return this.input[this.index++]; + } + /** Read the next character from the input if it matches the target. */ + readGivenChar(target) { + return this.readAtomically(() => { + const char = this.readChar(); + if (char !== target) { + return undefined; + } + return char; + }); + } + /** + * Helper for reading separators in an indexed loop. Reads the separator + * character iff index > 0, then runs the parser. When used in a loop, + * the separator character will only be read on index > 0 (see + * readIPv4Addr for an example) + */ + readSeparator(sep, index, inner) { + return this.readAtomically(() => { + if (index > 0) { + if (this.readGivenChar(sep) === undefined) { + return undefined; + } + } + return inner(); + }); + } + /** + * Read a number off the front of the input in the given radix, stopping + * at the first non-digit character or eof. Fails if the number has more + * digits than max_digits or if there is no number. + */ + readNumber(radix, maxDigits, allowZeroPrefix, maxBytes) { + return this.readAtomically(() => { + let result = 0; + let digitCount = 0; + const leadingChar = this.peekChar(); + if (leadingChar === undefined) { + return undefined; + } + const hasLeadingZero = leadingChar === "0"; + const maxValue = 2 ** (8 * maxBytes) - 1; + // eslint-disable-next-line no-constant-condition + while (true) { + const digit = this.readAtomically(() => { + const char = this.readChar(); + if (char === undefined) { + return undefined; + } + const num = Number.parseInt(char, radix); + if (Number.isNaN(num)) { + return undefined; + } + return num; + }); + if (digit === undefined) { + break; + } + result *= radix; + result += digit; + if (result > maxValue) { + return undefined; + } + digitCount += 1; + if (maxDigits !== undefined) { + if (digitCount > maxDigits) { + return undefined; + } + } + } + if (digitCount === 0) { + return undefined; + } + else if (!allowZeroPrefix && hasLeadingZero && digitCount > 1) { + return undefined; + } + else { + return result; + } + }); + } + /** Read an IPv4 address. */ + readIPv4Addr() { + return this.readAtomically(() => { + const out = new Uint8Array(4); + for (let i = 0; i < out.length; i++) { + const ix = this.readSeparator(".", i, () => this.readNumber(10, 3, false, 1)); + if (ix === undefined) { + return undefined; + } + out[i] = ix; + } + return out; + }); + } + /** Read an IPv6 Address. */ + readIPv6Addr() { + /** + * Read a chunk of an IPv6 address into `groups`. Returns the number + * of groups read, along with a bool indicating if an embedded + * trailing IPv4 address was read. Specifically, read a series of + * colon-separated IPv6 groups (0x0000 - 0xFFFF), with an optional + * trailing embedded IPv4 address. + */ + const readGroups = (groups) => { + for (let i = 0; i < groups.length / 2; i++) { + const ix = i * 2; + // Try to read a trailing embedded IPv4 address. There must be at least 4 groups left. + if (i < groups.length - 3) { + const ipv4 = this.readSeparator(":", i, () => this.readIPv4Addr()); + if (ipv4 !== undefined) { + groups[ix] = ipv4[0]; + groups[ix + 1] = ipv4[1]; + groups[ix + 2] = ipv4[2]; + groups[ix + 3] = ipv4[3]; + return [ix + 4, true]; + } + } + const group = this.readSeparator(":", i, () => this.readNumber(16, 4, true, 2)); + if (group === undefined) { + return [ix, false]; + } + groups[ix] = group >> 8; + groups[ix + 1] = group & 255; + } + return [groups.length, false]; + }; + return this.readAtomically(() => { + // Read the front part of the address; either the whole thing, or up to the first :: + const head = new Uint8Array(16); + const [headSize, headIp4] = readGroups(head); + if (headSize === 16) { + return head; + } + // IPv4 part is not allowed before `::` + if (headIp4) { + return undefined; + } + // Read `::` if previous code parsed less than 8 groups. + // `::` indicates one or more groups of 16 bits of zeros. + if (this.readGivenChar(":") === undefined) { + return undefined; + } + if (this.readGivenChar(":") === undefined) { + return undefined; + } + // Read the back part of the address. The :: must contain at least one + // set of zeroes, so our max length is 7. + const tail = new Uint8Array(14); + const limit = 16 - (headSize + 2); + const [tailSize] = readGroups(tail.subarray(0, limit)); + // Concat the head and tail of the IP address + head.set(tail.subarray(0, tailSize), 16 - tailSize); + return head; + }); + } + /** Read an IP Address, either IPv4 or IPv6. */ + readIPAddr() { + return this.readIPv4Addr() ?? this.readIPv6Addr(); + } +} +//# sourceMappingURL=parser.js.map +;// CONCATENATED MODULE: ./node_modules/@chainsafe/is-ip/lib/parse.js - // step 2: expand braces - var set = this.globSet = this.braceExpand() +// See https://stackoverflow.com/questions/166132/maximum-length-of-the-textual-representation-of-an-ipv6-address +const MAX_IPV6_LENGTH = 45; +const MAX_IPV4_LENGTH = 15; +const parser = new Parser(); +/** Parse `input` into IPv4 bytes. */ +function parse_parseIPv4(input) { + if (input.length > MAX_IPV4_LENGTH) { + return undefined; + } + return parser.new(input).parseWith(() => parser.readIPv4Addr()); +} +/** Parse `input` into IPv6 bytes. */ +function parse_parseIPv6(input) { + // strip zone index if it is present + if (input.includes("%")) { + input = input.split("%")[0]; + } + if (input.length > MAX_IPV6_LENGTH) { + return undefined; + } + return parser.new(input).parseWith(() => parser.readIPv6Addr()); +} +/** Parse `input` into IPv4 or IPv6 bytes. */ +function parse_parseIP(input) { + // strip zone index if it is present + if (input.includes("%")) { + input = input.split("%")[0]; + } + if (input.length > MAX_IPV6_LENGTH) { + return undefined; + } + return parser.new(input).parseWith(() => parser.readIPAddr()); +} +//# sourceMappingURL=parse.js.map +;// CONCATENATED MODULE: ./node_modules/@chainsafe/netmask/dist/src/util.js - if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) } +function util_allFF(a, from, to) { + let i = 0; + for (const e of a) { + if (i < from) + continue; + if (i > to) + break; + if (e !== 0xff) + return false; + i++; + } + return true; +} +function util_deepEqual(a, b, from, to) { + let i = 0; + for (const e of a) { + if (i < from) + continue; + if (i > to) + break; + if (e !== b[i]) + return false; + i++; + } + return true; +} +/*** + * Returns long ip format + */ +function util_ipToString(ip) { + switch (ip.length) { + case IPv4Len: { + return ip.join("."); + } + case IPv6Len: { + const result = []; + for (let i = 0; i < ip.length; i++) { + if (i % 2 === 0) { + result.push(ip[i].toString(16).padStart(2, "0") + + ip[i + 1].toString(16).padStart(2, "0")); + } + } + return result.join(":"); + } + default: { + throw new Error("Invalid ip length"); + } + } +} +/** + * If mask is a sequence of 1 bits followed by 0 bits, return number of 1 bits else -1 + */ +function util_simpleMaskLength(mask) { + let ones = 0; + // eslint-disable-next-line prefer-const + for (let [index, byte] of mask.entries()) { + if (byte === 0xff) { + ones += 8; + continue; + } + while ((byte & 0x80) != 0) { + ones++; + byte = byte << 1; + } + if ((byte & 0x80) != 0) { + return -1; + } + for (let i = index + 1; i < mask.length; i++) { + if (mask[i] != 0) { + return -1; + } + } + break; + } + return ones; +} +function util_maskToHex(mask) { + let hex = "0x"; + for (const byte of mask) { + hex += (byte >> 4).toString(16) + (byte & 0x0f).toString(16); + } + return hex; +} +//# sourceMappingURL=util.js.map +;// CONCATENATED MODULE: ./node_modules/@chainsafe/netmask/dist/src/ip.js - this.debug(this.pattern, set) - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) +const ip_IPv4Len = 4; +const ip_IPv6Len = 16; +const maxIPv6Octet = parseInt("0xFFFF", 16); +const ipv4Prefix = new Uint8Array([ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, +]); +function ip_maskIp(ip, mask) { + if (mask.length === ip_IPv6Len && ip.length === ip_IPv4Len && allFF(mask, 0, 11)) { + mask = mask.slice(12); + } + if (mask.length === ip_IPv4Len && + ip.length === ip_IPv6Len && + deepEqual(ip, ipv4Prefix, 0, 11)) { + ip = ip.slice(12); + } + const n = ip.length; + if (n != mask.length) { + throw new Error("Failed to mask ip"); + } + const out = new Uint8Array(n); + for (let i = 0; i < n; i++) { + out[i] = ip[i] & mask[i]; + } + return out; +} +function ip_containsIp(net, ip) { + if (typeof ip === "string") { + ip = parseIP(ip); + } + if (ip == null) + throw new Error("Invalid ip"); + if (ip.length !== net.network.length) { + return false; + } + for (let i = 0; i < ip.length; i++) { + if ((net.network[i] & net.mask[i]) !== (ip[i] & net.mask[i])) { + return false; + } + } + return true; +} +function iPv4FromIPv6(ip) { + if (!isIPv4mappedIPv6(ip)) { + throw new Error("Must have 0xffff prefix"); + } + return ip.slice(12); +} +function isIPv4mappedIPv6(ip) { + return deepEqual(ip, ipv4Prefix, 0, 11); +} +//# sourceMappingURL=ip.js.map +;// CONCATENATED MODULE: ./node_modules/@chainsafe/netmask/dist/src/cidr.js - this.debug(this.pattern, set) - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) +function cidr_parseCidr(s) { + const [address, maskString] = s.split("/"); + if (!address || !maskString) + throw new Error("Failed to parse given CIDR: " + s); + let ipLength = IPv4Len; + let ip = parseIPv4(address); + if (ip == null) { + ipLength = IPv6Len; + ip = parseIPv6(address); + if (ip == null) + throw new Error("Failed to parse given CIDR: " + s); + } + const m = parseInt(maskString, 10); + if (Number.isNaN(m) || + String(m).length !== maskString.length || + m < 0 || + m > ipLength * 8) { + throw new Error("Failed to parse given CIDR: " + s); + } + const mask = cidr_cidrMask(m, 8 * ipLength); + return { + network: maskIp(ip, mask), + mask, + }; +} +function cidr_cidrMask(ones, bits) { + if (bits !== 8 * IPv4Len && bits !== 8 * IPv6Len) + throw new Error("Invalid CIDR mask"); + if (ones < 0 || ones > bits) + throw new Error("Invalid CIDR mask"); + const l = bits / 8; + const m = new Uint8Array(l); + for (let i = 0; i < l; i++) { + if (ones >= 8) { + m[i] = 0xff; + ones -= 8; + continue; + } + m[i] = 255 - (0xff >> ones); + ones = 0; + } + return m; +} +//# sourceMappingURL=cidr.js.map +;// CONCATENATED MODULE: ./node_modules/@chainsafe/netmask/dist/src/ipnet.js - this.debug(this.pattern, set) - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - this.debug(this.pattern, set) - this.set = set +class ipnet_IpNet { + /** + * + * @param ipOrCidr either network ip or full cidr address + * @param mask in case ipOrCidr is network this can be either mask in decimal format or as ip address + */ + constructor(ipOrCidr, mask) { + if (mask == null) { + ({ network: this.network, mask: this.mask } = parseCidr(ipOrCidr)); + } + else { + const ipResult = parseIP(ipOrCidr); + if (ipResult == null) { + throw new Error("Failed to parse network"); + } + mask = String(mask); + const m = parseInt(mask, 10); + if (Number.isNaN(m) || + String(m).length !== mask.length || + m < 0 || + m > ipResult.length * 8) { + const maskResult = parseIP(mask); + if (maskResult == null) { + throw new Error("Failed to parse mask"); + } + this.mask = maskResult; + } + else { + this.mask = cidrMask(m, 8 * ipResult.length); + } + this.network = maskIp(ipResult, this.mask); + } + } + /** + * Checks if netmask contains ip address + * @param ip + * @returns + */ + contains(ip) { + return containsIp({ network: this.network, mask: this.mask }, ip); + } + /**Serializes back to string format */ + toString() { + const l = simpleMaskLength(this.mask); + const mask = l !== -1 ? String(l) : maskToHex(this.mask); + return ipToString(this.network) + "/" + mask; + } } +//# sourceMappingURL=ipnet.js.map +;// CONCATENATED MODULE: ./node_modules/@chainsafe/netmask/dist/src/index.js -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - if (options.nonegate) return - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) +/** + * Checks if cidr block contains ip address + * @param cidr ipv4 or ipv6 formatted cidr . Example 198.51.100.14/24 or 2001:db8::/48 + * @param ip ipv4 or ipv6 address Example 198.51.100.14 or 2001:db8:: + * + */ +function cidrContains(cidr, ip) { + const ipnet = new IpNet(cidr); + return ipnet.contains(ip); } +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/node_modules/uint8arrays/dist/src/from-string.js -Minimatch.prototype.braceExpand = braceExpand -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} +/** + * Create a `Uint8Array` from the passed string + * + * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module. + * + * Also `ascii` which is similar to node's 'binary' encoding. + */ +function from_string_fromString(string, encoding = 'utf8') { + const base = util_bases[encoding]; + if (base == null) { + throw new Error(`Unsupported encoding "${encoding}"`); } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - assertValidPattern(pattern) - - // Thanks to Yeting Li for - // improving this regexp to avoid a ReDOS vulnerability. - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) + if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) { + return as_uint8array_asUint8Array(globalThis.Buffer.from(string, 'utf-8')); + } + // add multibase prefix + return base.decoder.decode(`${base.prefix}${string}`); // eslint-disable-line @typescript-eslint/restrict-template-expressions } +//# sourceMappingURL=from-string.js.map +;// CONCATENATED MODULE: external "node:net" +const external_node_net_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:net"); +;// CONCATENATED MODULE: ./node_modules/@chainsafe/is-ip/lib/is-ip.node.js -var MAX_PATTERN_LENGTH = 1024 * 64 -var assertValidPattern = function (pattern) { - if (typeof pattern !== 'string') { - throw new TypeError('invalid pattern') - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError('pattern is too long') - } +/** Check if `input` is IPv4 or IPv6. */ +function isIP(input) { + return Boolean((0,external_node_net_namespaceObject.isIP)(input)); } +//# sourceMappingURL=is-ip.node.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/dist/src/ip.js -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - assertValidPattern(pattern) - - var options = this.options - - // shortcuts - if (pattern === '**') { - if (!options.noglobstar) - return GLOBSTAR - else - pattern = '*' - } - if (pattern === '') return '' - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false +const isV4 = external_node_net_namespaceObject.isIPv4; +const isV6 = external_node_net_namespaceObject.isIPv6; +// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L7 +// but with buf/offset args removed because we don't use them +const ip_toBytes = function (ip) { + let offset = 0; + ip = ip.toString().trim(); + if (isV4(ip)) { + const bytes = new Uint8Array(offset + 4); + ip.split(/\./g).forEach((byte) => { + bytes[offset++] = parseInt(byte, 10) & 0xff; + }); + return bytes; } - } + if (isV6(ip)) { + const sections = ip.split(':', 8); + let i; + for (i = 0; i < sections.length; i++) { + const isv4 = isV4(sections[i]); + let v4Buffer; + if (isv4) { + v4Buffer = ip_toBytes(sections[i]); + sections[i] = to_string_toString(v4Buffer.slice(0, 2), 'base16'); + } + if (v4Buffer != null && ++i < 8) { + sections.splice(i, 0, to_string_toString(v4Buffer.slice(2, 4), 'base16')); + } + } + if (sections[0] === '') { + while (sections.length < 8) + sections.unshift('0'); + } + else if (sections[sections.length - 1] === '') { + while (sections.length < 8) + sections.push('0'); + } + else if (sections.length < 8) { + for (i = 0; i < sections.length && sections[i] !== ''; i++) + ; + const argv = [i, 1]; + for (i = 9 - sections.length; i > 0; i--) { + argv.push('0'); + } + sections.splice.apply(sections, argv); + } + const bytes = new Uint8Array(offset + 16); + for (i = 0; i < sections.length; i++) { + const word = parseInt(sections[i], 16); + bytes[offset++] = (word >> 8) & 0xff; + bytes[offset++] = word & 0xff; + } + return bytes; + } + throw new Error('invalid ip address'); +}; +// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63 +const ip_toString = function (buf, offset = 0, length) { + offset = ~~offset; + length = length ?? (buf.length - offset); + const view = new DataView(buf.buffer); + if (length === 4) { + const result = []; + // IPv4 + for (let i = 0; i < length; i++) { + result.push(buf[offset + i]); + } + return result.join('.'); + } + if (length === 16) { + const result = []; + // IPv6 + for (let i = 0; i < length; i += 2) { + result.push(view.getUint16(offset + i).toString(16)); + } + return result.join(':') + .replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3') + .replace(/:{3,4}/, '::'); + } + return ''; +}; +//# sourceMappingURL=ip.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/dist/src/protocols-table.js +const V = -1; +const names = {}; +const codes = {}; +const table = [ + [4, 32, 'ip4'], + [6, 16, 'tcp'], + [33, 16, 'dccp'], + [41, 128, 'ip6'], + [42, V, 'ip6zone'], + [43, 8, 'ipcidr'], + [53, V, 'dns', true], + [54, V, 'dns4', true], + [55, V, 'dns6', true], + [56, V, 'dnsaddr', true], + [132, 16, 'sctp'], + [273, 16, 'udp'], + [275, 0, 'p2p-webrtc-star'], + [276, 0, 'p2p-webrtc-direct'], + [277, 0, 'p2p-stardust'], + [280, 0, 'webrtc-direct'], + [281, 0, 'webrtc'], + [290, 0, 'p2p-circuit'], + [301, 0, 'udt'], + [302, 0, 'utp'], + [400, V, 'unix', false, true], + // `ipfs` is added before `p2p` for legacy support. + // All text representations will default to `p2p`, but `ipfs` will + // still be supported + [421, V, 'ipfs'], + // `p2p` is the preferred name for 421, and is now the default + [421, V, 'p2p'], + [443, 0, 'https'], + [444, 96, 'onion'], + [445, 296, 'onion3'], + [446, V, 'garlic64'], + [448, 0, 'tls'], + [449, V, 'sni'], + [460, 0, 'quic'], + [461, 0, 'quic-v1'], + [465, 0, 'webtransport'], + [466, V, 'certhash'], + [477, 0, 'ws'], + [478, 0, 'wss'], + [479, 0, 'p2p-websocket-star'], + [480, 0, 'http'], + [777, V, 'memory'] +]; +// populate tables +table.forEach(row => { + const proto = createProtocol(...row); + codes[proto.code] = proto; + names[proto.name] = proto; +}); +function createProtocol(code, size, name, resolvable, path) { + return { + code, + size, + name, + resolvable: Boolean(resolvable), + path: Boolean(path) + }; +} +/** + * For the passed proto string or number, return a {@link Protocol} + * + * @example + * + * ```js + * import { protocol } from '@multiformats/multiaddr' + * + * console.info(protocol(4)) + * // { code: 4, size: 32, name: 'ip4', resolvable: false, path: false } + * ``` + */ +function protocols_table_getProtocol(proto) { + if (typeof proto === 'number') { + if (codes[proto] != null) { + return codes[proto]; + } + throw new Error(`no protocol with code: ${proto}`); + } + else if (typeof proto === 'string') { + if (names[proto] != null) { + return names[proto]; + } + throw new Error(`no protocol with name: ${proto}`); + } + throw new Error(`invalid protocol id type: ${typeof proto}`); +} +//# sourceMappingURL=protocols-table.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/dist/src/convert.js +/** + * @packageDocumentation + * + * Provides methods for converting + */ - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - switch (c) { - /* istanbul ignore next */ - case '/': { - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - } - case '\\': - clearStateChar() - escaping = true - continue - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - case '(': - if (inClass) { - re += '(' - continue - } - if (!stateChar) { - re += '\\(' - continue - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) +const ip4Protocol = protocols_table_getProtocol('ip4'); +const ip6Protocol = protocols_table_getProtocol('ip6'); +const ipcidrProtocol = protocols_table_getProtocol('ipcidr'); +function convert(proto, a) { + if (a instanceof Uint8Array) { + return convertToString(proto, a); + } + else { + return convertToBytes(proto, a); + } +} +/** + * Convert [code,Uint8Array] to string + */ +function convertToString(proto, buf) { + const protocol = protocols_table_getProtocol(proto); + switch (protocol.code) { + case 4: // ipv4 + case 41: // ipv6 + return bytes2ip(buf); + case 42: // ipv6zone + return bytes2str(buf); + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return bytes2port(buf).toString(); + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 449: // sni + case 777: // memory + return bytes2str(buf); + case 421: // ipfs + return bytes2mh(buf); + case 444: // onion + return bytes2onion(buf); + case 445: // onion3 + return bytes2onion(buf); + case 466: // certhash + return bytes2mb(buf); + default: + return to_string_toString(buf, 'base16'); // no clue. convert to hex + } +} +function convertToBytes(proto, str) { + const protocol = protocols_table_getProtocol(proto); + switch (protocol.code) { + case 4: // ipv4 + return ip2bytes(str); + case 41: // ipv6 + return ip2bytes(str); + case 42: // ipv6zone + return str2bytes(str); + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return port2bytes(parseInt(str, 10)); + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 449: // sni + case 777: // memory + return str2bytes(str); + case 421: // ipfs + return mh2bytes(str); + case 444: // onion + return onion2bytes(str); + case 445: // onion3 + return onion32bytes(str); + case 466: // certhash + return mb2bytes(str); + default: + return from_string_fromString(str, 'base16'); // no clue. convert from hex + } +} +function convert_convertToIpNet(multiaddr) { + let mask; + let addr; + multiaddr.stringTuples().forEach(([code, value]) => { + if (code === ip4Protocol.code || code === ip6Protocol.code) { + addr = value; } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue + if (code === ipcidrProtocol.code) { + mask = value; } + }); + if (mask == null || addr == null) { + throw new Error('Invalid multiaddr'); + } + return new IpNet(addr, mask); +} +const decoders = Object.values(basics_bases).map((c) => c.decoder); +const anybaseDecoder = (function () { + let acc = decoders[0].or(decoders[1]); + decoders.slice(2).forEach((d) => (acc = acc.or(d))); + return acc; +})(); +function ip2bytes(ipString) { + if (!isIP(ipString)) { + throw new Error('invalid ip address'); + } + return ip_toBytes(ipString); +} +function bytes2ip(ipBuff) { + const ipString = ip_toString(ipBuff, 0, ipBuff.length); + if (ipString == null) { + throw new Error('ipBuff is required'); + } + if (!isIP(ipString)) { + throw new Error('invalid ip address'); + } + return ipString; +} +function port2bytes(port) { + const buf = new ArrayBuffer(2); + const view = new DataView(buf); + view.setUint16(0, port); + return new Uint8Array(buf); +} +function bytes2port(buf) { + const view = new DataView(buf.buffer); + return view.getUint16(buf.byteOffset); +} +function str2bytes(str) { + const buf = from_string_fromString(str); + const size = Uint8Array.from(dist_src_encode(buf.length)); + return concat_concat([size, buf], size.length + buf.length); +} +function bytes2str(buf) { + const size = dist_src_decode(buf); + buf = buf.slice(src_encodingLength(size)); + if (buf.length !== size) { + throw new Error('inconsistent lengths'); + } + return to_string_toString(buf); +} +function mh2bytes(hash) { + let mh; + if (hash[0] === 'Q' || hash[0] === '1') { + mh = dist_src_hashes_digest_decode(dist_src_bases_base58_base58btc.decode(`z${hash}`)).bytes; + } + else { + mh = multiformats_dist_src_cid_CID.parse(hash).multihash.bytes; + } + // the address is a varint prefixed multihash string representation + const size = Uint8Array.from(dist_src_encode(mh.length)); + return concat_concat([size, mh], size.length + mh.length); +} +function mb2bytes(mbstr) { + const mb = anybaseDecoder.decode(mbstr); + const size = Uint8Array.from(dist_src_encode(mb.length)); + return concat_concat([size, mb], size.length + mb.length); +} +function bytes2mb(buf) { + const size = dist_src_decode(buf); + const hash = buf.slice(src_encodingLength(size)); + if (hash.length !== size) { + throw new Error('inconsistent lengths'); + } + return 'u' + to_string_toString(hash, 'base64url'); +} +/** + * Converts bytes to bas58btc string + */ +function bytes2mh(buf) { + const size = dist_src_decode(buf); + const address = buf.slice(src_encodingLength(size)); + if (address.length !== size) { + throw new Error('inconsistent lengths'); + } + return to_string_toString(address, 'base58btc'); +} +function onion2bytes(str) { + const addr = str.split(':'); + if (addr.length !== 2) { + throw new Error(`failed to parse onion addr: ["'${addr.join('", "')}'"]' does not contain a port number`); + } + if (addr[0].length !== 16) { + throw new Error(`failed to parse onion addr: ${addr[0]} not a Tor onion address.`); + } + // onion addresses do not include the multibase prefix, add it before decoding + const buf = dist_src_bases_base32_base32.decode('b' + addr[0]); + // onion port number + const port = parseInt(addr[1], 10); + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)'); + } + const portBuf = port2bytes(port); + return concat_concat([buf, portBuf], buf.length + portBuf.length); +} +function onion32bytes(str) { + const addr = str.split(':'); + if (addr.length !== 2) { + throw new Error(`failed to parse onion addr: ["'${addr.join('", "')}'"]' does not contain a port number`); + } + if (addr[0].length !== 56) { + throw new Error(`failed to parse onion addr: ${addr[0]} not a Tor onion3 address.`); + } + // onion addresses do not include the multibase prefix, add it before decoding + const buf = dist_src_bases_base32_base32.decode(`b${addr[0]}`); + // onion port number + const port = parseInt(addr[1], 10); + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)'); + } + const portBuf = port2bytes(port); + return concat_concat([buf, portBuf], buf.length + portBuf.length); +} +function bytes2onion(buf) { + const addrBytes = buf.slice(0, buf.length - 2); + const portBytes = buf.slice(buf.length - 2); + const addr = to_string_toString(addrBytes, 'base32'); + const port = bytes2port(portBytes); + return `${addr}:${port}`; +} +//# sourceMappingURL=convert.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/dist/src/codec.js - clearStateChar() - re += '|' - continue - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - if (inClass) { - re += '\\' + c - continue - } - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue +function stringToMultiaddrParts(str) { + str = cleanPath(str); + const tuples = []; + const stringTuples = []; + let path = null; + const parts = str.split('/').slice(1); + if (parts.length === 1 && parts[0] === '') { + return { + bytes: new Uint8Array(), + string: '/', + tuples: [], + stringTuples: [], + path: null + }; + } + for (let p = 0; p < parts.length; p++) { + const part = parts[p]; + const proto = protocols_table_getProtocol(part); + if (proto.size === 0) { + tuples.push([proto.code]); + stringTuples.push([proto.code]); + // eslint-disable-next-line no-continue + continue; } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue + p++; // advance addr part + if (p >= parts.length) { + throw ParseError('invalid address: ' + str); + } + // if it's a path proto, take the rest + if (proto.path === true) { + // should we need to check each path part to see if it's a proto? + // This would allow for other protocols to be added after a unix path, + // however it would have issues if the path had a protocol name in the path + path = cleanPath(parts.slice(p).join('/')); + tuples.push([proto.code, convertToBytes(proto.code, path)]); + stringTuples.push([proto.code, path]); + break; } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' + const bytes = convertToBytes(proto.code, parts[p]); + tuples.push([proto.code, bytes]); + stringTuples.push([proto.code, convertToString(proto.code, bytes)]); + } + return { + string: stringTuplesToString(stringTuples), + bytes: tuplesToBytes(tuples), + tuples, + stringTuples, + path + }; +} +function bytesToMultiaddrParts(bytes) { + const tuples = []; + const stringTuples = []; + let path = null; + let i = 0; + while (i < bytes.length) { + const code = dist_src_decode(bytes, i); + const n = src_encodingLength(code); + const p = protocols_table_getProtocol(code); + const size = sizeForAddr(p, bytes.slice(i + n)); + if (size === 0) { + tuples.push([code]); + stringTuples.push([code]); + i += n; + // eslint-disable-next-line no-continue + continue; + } + const addr = bytes.slice(i + n, i + n + size); + i += (size + n); + if (i > bytes.length) { // did not end _exactly_ at buffer.length + throw ParseError('Invalid address Uint8Array: ' + to_string_toString(bytes, 'base16')); + } + // ok, tuple seems good. + tuples.push([code, addr]); + const stringAddr = convertToString(code, addr); + stringTuples.push([code, stringAddr]); + if (p.path === true) { + // should we need to check each path part to see if it's a proto? + // This would allow for other protocols to be added after a unix path, + // however it would have issues if the path had a protocol name in the path + path = stringAddr; + break; + } + } + return { + bytes: Uint8Array.from(bytes), + string: stringTuplesToString(stringTuples), + tuples, + stringTuples, + path + }; +} +/** + * [[str name, str addr]... ] -> string + */ +function stringTuplesToString(tuples) { + const parts = []; + tuples.map((tup) => { + const proto = protocols_table_getProtocol(tup[0]); + parts.push(proto.name); + if (tup.length > 1 && tup[1] != null) { + parts.push(tup[1]); + } + return null; + }); + return cleanPath(parts.join('/')); +} +/** + * [[int code, Uint8Array ]... ] -> Uint8Array + */ +function tuplesToBytes(tuples) { + return concat_concat(tuples.map((tup) => { + const proto = protocols_table_getProtocol(tup[0]); + let buf = Uint8Array.from(dist_src_encode(proto.code)); + if (tup.length > 1 && tup[1] != null) { + buf = concat_concat([buf, tup[1]]); // add address buffer + } + return buf; + })); +} +/** + * For the passed address, return the serialized size + */ +function sizeForAddr(p, addr) { + if (p.size > 0) { + return p.size / 8; + } + else if (p.size === 0) { + return 0; + } + else { + const size = dist_src_decode(addr instanceof Uint8Array ? addr : Uint8Array.from(addr)); + return size + src_encodingLength(size); + } +} +function bytesToTuples(buf) { + const tuples = []; + let i = 0; + while (i < buf.length) { + const code = varint.decode(buf, i); + const n = varint.encodingLength(code); + const p = getProtocol(code); + const size = sizeForAddr(p, buf.slice(i + n)); + if (size === 0) { + tuples.push([code]); + i += n; + // eslint-disable-next-line no-continue + continue; } + const addr = buf.slice(i + n, i + n + size); + i += (size + n); + if (i > buf.length) { // did not end _exactly_ at buffer.length + throw ParseError('Invalid address Uint8Array: ' + uint8ArrayToString(buf, 'base16')); + } + // ok, tuple seems good. + tuples.push([code, addr]); + } + return tuples; +} +function cleanPath(str) { + return '/' + str.trim().split('/').filter((a) => a).join('/'); +} +function ParseError(str) { + return new Error('Error parsing address: ' + str); +} +//# sourceMappingURL=codec.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/dist/src/multiaddr.js +/** + * @packageDocumentation + * + * An implementation of a Multiaddr in JavaScript + * + * @example + * + * ```js + * import { multiaddr } from '@multiformats/multiaddr' + * + * const ma = multiaddr('/ip4/127.0.0.1/tcp/1234') + * ``` + */ - re += c - } // switch - } // for - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } +const inspect = Symbol.for('nodejs.util.inspect.custom'); +const symbol = Symbol.for('@multiformats/js-multiaddr/multiaddr'); +const DNS_CODES = [ + protocols_table_getProtocol('dns').code, + protocols_table_getProtocol('dns4').code, + protocols_table_getProtocol('dns6').code, + protocols_table_getProtocol('dnsaddr').code +]; +/** + * Creates a {@link Multiaddr} from a {@link MultiaddrInput} + */ +class Multiaddr { + bytes; + #string; + #tuples; + #stringTuples; + #path; + [symbol] = true; + constructor(addr) { + // default + if (addr == null) { + addr = ''; + } + let parts; + if (addr instanceof Uint8Array) { + parts = bytesToMultiaddrParts(addr); + } + else if (typeof addr === 'string') { + if (addr.length > 0 && addr.charAt(0) !== '/') { + throw new Error(`multiaddr "${addr}" must start with a "/"`); + } + parts = stringToMultiaddrParts(addr); + } + else if (isMultiaddr(addr)) { // Multiaddr + parts = bytesToMultiaddrParts(addr.bytes); + } + else { + throw new Error('addr must be a string, Buffer, or another Multiaddr'); + } + this.bytes = parts.bytes; + this.#string = parts.string; + this.#tuples = parts.tuples; + this.#stringTuples = parts.stringTuples; + this.#path = parts.path; + } + toString() { + return this.#string; + } + toJSON() { + return this.toString(); + } + toOptions() { + let family; + let transport; + let host; + let port; + let zone = ''; + const tcp = protocols_table_getProtocol('tcp'); + const udp = protocols_table_getProtocol('udp'); + const ip4 = protocols_table_getProtocol('ip4'); + const ip6 = protocols_table_getProtocol('ip6'); + const dns6 = protocols_table_getProtocol('dns6'); + const ip6zone = protocols_table_getProtocol('ip6zone'); + for (const [code, value] of this.stringTuples()) { + if (code === ip6zone.code) { + zone = `%${value ?? ''}`; + } + // default to https when protocol & port are omitted from DNS addrs + if (DNS_CODES.includes(code)) { + transport = tcp.name; + port = 443; + host = `${value ?? ''}${zone}`; + family = code === dns6.code ? 6 : 4; + } + if (code === tcp.code || code === udp.code) { + transport = protocols_table_getProtocol(code).name; + port = parseInt(value ?? ''); + } + if (code === ip4.code || code === ip6.code) { + transport = protocols_table_getProtocol(code).name; + host = `${value ?? ''}${zone}`; + family = code === ip6.code ? 6 : 4; + } + } + if (family == null || transport == null || host == null || port == null) { + throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6, dnsaddr}/{address}/{tcp, udp}/{port}".'); + } + const opts = { + family, + host, + transport, + port + }; + return opts; + } + protos() { + return this.#tuples.map(([code]) => Object.assign({}, protocols_table_getProtocol(code))); + } + protoCodes() { + return this.#tuples.map(([code]) => code); + } + protoNames() { + return this.#tuples.map(([code]) => protocols_table_getProtocol(code).name); + } + tuples() { + return this.#tuples; + } + stringTuples() { + return this.#stringTuples; + } + encapsulate(addr) { + addr = new Multiaddr(addr); + return new Multiaddr(this.toString() + addr.toString()); + } + decapsulate(addr) { + const addrString = addr.toString(); + const s = this.toString(); + const i = s.lastIndexOf(addrString); + if (i < 0) { + throw new Error(`Address ${this.toString()} does not contain subaddress: ${addr.toString()}`); + } + return new Multiaddr(s.slice(0, i)); + } + decapsulateCode(code) { + const tuples = this.tuples(); + for (let i = tuples.length - 1; i >= 0; i--) { + if (tuples[i][0] === code) { + return new Multiaddr(tuplesToBytes(tuples.slice(0, i))); + } + } + return this; + } + getPeerId() { + try { + let tuples = []; + this.stringTuples().forEach(([code, name]) => { + if (code === names.p2p.code) { + tuples.push([code, name]); + } + // if this is a p2p-circuit address, return the target peer id if present + // not the peer id of the relay + if (code === names["p2p-circuit"].code) { + tuples = []; + } + }); + // Get the last ipfs tuple ['p2p', 'peerid string'] + const tuple = tuples.pop(); + if (tuple?.[1] != null) { + const peerIdStr = tuple[1]; + // peer id is base58btc encoded string but not multibase encoded so add the `z` + // prefix so we can validate that it is correctly encoded + if (peerIdStr[0] === 'Q' || peerIdStr[0] === '1') { + return to_string_toString(dist_src_bases_base58_base58btc.decode(`z${peerIdStr}`), 'base58btc'); + } + // try to parse peer id as CID + return to_string_toString(multiformats_dist_src_cid_CID.parse(peerIdStr).multihash.bytes, 'base58btc'); + } + return null; + } + catch (e) { + return null; + } + } + getPath() { + return this.#path; + } + equals(addr) { + return equals_equals(this.bytes, addr.bytes); + } + async resolve(options) { + const resolvableProto = this.protos().find((p) => p.resolvable); + // Multiaddr is not resolvable? + if (resolvableProto == null) { + return [this]; + } + const resolver = resolvers.get(resolvableProto.name); + if (resolver == null) { + throw new errors_CodeError(`no available resolver for ${resolvableProto.name}`, 'ERR_NO_AVAILABLE_RESOLVER'); + } + const addresses = await resolver(this, options); + return addresses.map((a) => new Multiaddr(a)); + } + nodeAddress() { + const options = this.toOptions(); + if (options.transport !== 'tcp' && options.transport !== 'udp') { + throw new Error(`multiaddr must have a valid format - no protocol with name: "${options.transport}". Must have a valid transport protocol: "{tcp, udp}"`); + } + return { + family: options.family, + address: options.host, + port: options.port + }; + } + isThinWaistAddress(addr) { + const protos = (addr ?? this).protos(); + if (protos.length !== 2) { + return false; + } + if (protos[0].code !== 4 && protos[0].code !== 41) { + return false; + } + if (protos[1].code !== 6 && protos[1].code !== 273) { + return false; + } + return true; + } + /** + * Returns Multiaddr as a human-readable string + * https://nodejs.org/api/util.html#utilinspectcustom + * + * @example + * ```js + * import { multiaddr } from '@multiformats/multiaddr' + * + * console.info(multiaddr('/ip4/127.0.0.1/tcp/4001')) + * // 'Multiaddr(/ip4/127.0.0.1/tcp/4001)' + * ``` + */ + [inspect]() { + return `Multiaddr(${this.#string})`; + } +} +//# sourceMappingURL=multiaddr.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/dist/src/filter/multiaddr-filter.js - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '[': case '.': case '(': addPatternStart = true - } - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] +/** + * A utility class to determine if a Multiaddr contains another + * multiaddr. + * + * This can be used with ipcidr ranges to determine if a given + * multiaddr is in a ipcidr range. + * + * @example + * + * ```js + * import { multiaddr, MultiaddrFilter } from '@multiformats/multiaddr' + * + * const range = multiaddr('/ip4/192.168.10.10/ipcidr/24') + * const filter = new MultiaddrFilter(range) + * + * const input = multiaddr('/ip4/192.168.10.2/udp/60') + * console.info(filter.contains(input)) // true + * ``` + */ +class MultiaddrFilter { + multiaddr; + netmask; + constructor(input) { + this.multiaddr = multiaddr(input); + this.netmask = convertToIpNet(this.multiaddr); + } + contains(input) { + if (input == null) + return false; + const m = multiaddr(input); + let ip; + for (const [code, value] of m.stringTuples()) { + if (code === 4 || code === 41) { + ip = value; + break; + } + } + if (ip === undefined) + return false; + return this.netmask.contains(ip); + } +} +//# sourceMappingURL=multiaddr-filter.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr/dist/src/index.js +/** + * @packageDocumentation + * + * A standard way to represent addresses that + * + * - support any standard network protocol + * - are self-describing + * - have a binary packed format + * - have a nice string representation + * - encapsulate well + * + * @example + * + * ```js + * import { multiaddr } from '@multiformats/multiaddr' + * const addr = multiaddr("/ip4/127.0.0.1/udp/1234") + * // Multiaddr(/ip4/127.0.0.1/udp/1234) + * + * const addr = multiaddr("/ip4/127.0.0.1/udp/1234") + * // Multiaddr(/ip4/127.0.0.1/udp/1234) + * + * addr.bytes + * // + * + * addr.toString() + * // '/ip4/127.0.0.1/udp/1234' + * + * addr.protos() + * // [ + * // {code: 4, name: 'ip4', size: 32}, + * // {code: 273, name: 'udp', size: 16} + * // ] + * + * // gives you an object that is friendly with what Node.js core modules expect for addresses + * addr.nodeAddress() + * // { + * // family: 4, + * // port: 1234, + * // address: "127.0.0.1" + * // } + * + * addr.encapsulate('/sctp/5678') + * // Multiaddr(/ip4/127.0.0.1/udp/1234/sctp/5678) + * ``` + * + * ## Resolvers + * + * `multiaddr` allows multiaddrs to be resolved when appropriate resolvers are provided. This module already has resolvers available, but you can also create your own. Resolvers should always be set in the same module that is calling `multiaddr.resolve()` to avoid conflicts if multiple versions of `multiaddr` are in your dependency tree. + * + * To provide multiaddr resolvers you can do: + * + * ```js + * import { resolvers } from '@multiformats/multiaddr' + * + * resolvers.set('dnsaddr', resolvers.dnsaddrResolver) + * ``` + * + * The available resolvers are: + * + * | Name | type | Description | + * | ----------------- | --------- | ----------------------------------- | + * | `dnsaddrResolver` | `dnsaddr` | dnsaddr resolution with TXT Records | + * + * A resolver receives a `Multiaddr` as a parameter and returns a `Promise>`. + */ - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - nlLast += nlAfter +/** + * All configured {@link Resolver}s + */ +const resolvers = new Map(); - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') +/** + * Creates a Multiaddr from a node-friendly address object + * + * @example + * ```js + * import { fromNodeAddress } from '@multiformats/multiaddr' + * + * fromNodeAddress({address: '127.0.0.1', port: '4001'}, 'tcp') + * // Multiaddr(/ip4/127.0.0.1/tcp/4001) + * ``` + */ +function fromNodeAddress(addr, transport) { + if (addr == null) { + throw new Error('requires node address object'); } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' + if (transport == null) { + throw new Error('requires transport protocol'); } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } + let ip; + let host = addr.address; + switch (addr.family) { + case 4: + ip = 'ip4'; + break; + case 6: + ip = 'ip6'; + if (host.includes('%')) { + const parts = host.split('%'); + if (parts.length !== 2) { + throw Error('Multiple ip6 zones in multiaddr'); + } + host = parts[0]; + const zone = parts[1]; + ip = `/ip6zone/${zone}/ip6`; + } + break; + default: + throw Error('Invalid addr family, should be 4 or 6.'); + } + return new MultiaddrClass('/' + [ip, host, transport, addr.port].join('/')); +} +/** + * Returns if something is a {@link Multiaddr} that is a resolvable name + * + * @example + * + * ```js + * import { isName, multiaddr } from '@multiformats/multiaddr' + * + * isName(multiaddr('/ip4/127.0.0.1')) + * // false + * isName(multiaddr('/dns/ipfs.io')) + * // true + * ``` + */ +function isName(addr) { + if (!isMultiaddr(addr)) { + return false; + } + // if a part of the multiaddr is resolvable, then return true + return addr.protos().some((proto) => proto.resolvable); +} +/** + * Check if object is a {@link Multiaddr} instance + * + * @example + * + * ```js + * import { isMultiaddr, multiaddr } from '@multiformats/multiaddr' + * + * isMultiaddr(5) + * // false + * isMultiaddr(multiaddr('/ip4/127.0.0.1')) + * // true + * ``` + */ +function isMultiaddr(value) { + return Boolean(value?.[symbol]); +} +/** + * A function that takes a {@link MultiaddrInput} and returns a {@link Multiaddr} + * + * @example + * ```js + * import { multiaddr } from '@libp2p/multiaddr' + * + * multiaddr('/ip4/127.0.0.1/tcp/4001') + * // Multiaddr(/ip4/127.0.0.1/tcp/4001) + * ``` + * + * @param {MultiaddrInput} [addr] - If String or Uint8Array, needs to adhere to the address format of a [multiaddr](https://github.com/multiformats/multiaddr#string-format) + */ +function src_multiaddr(addr) { + return new Multiaddr(addr); +} - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } +//# sourceMappingURL=index.js.map +// EXTERNAL MODULE: ./node_modules/ipfs-utils/src/env.js +var env = __nccwpck_require__(75062); +;// CONCATENATED MODULE: ./node_modules/parse-duration/index.mjs +let durationRE = /(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([\p{L}]*)/uig - if (addPatternStart) { - re = patternStart + re - } - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } +/** + * conversion ratios + */ - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } +parse_duration_parse.nanosecond = +parse_duration_parse.ns = 1 / 1e6 - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) /* istanbul ignore next - should be impossible */ { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } +parse_duration_parse['µs'] = +parse_duration_parse['μs'] = +parse_duration_parse.us = +parse_duration_parse.microsecond = 1 / 1e3 - regExp._glob = pattern - regExp._src = re +parse_duration_parse.millisecond = +parse_duration_parse.ms = +parse_duration_parse[''] = 1 - return regExp -} +parse_duration_parse.second = +parse_duration_parse.sec = +parse_duration_parse.s = parse_duration_parse.ms * 1000 -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} +parse_duration_parse.minute = +parse_duration_parse.min = +parse_duration_parse.m = parse_duration_parse.s * 60 -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp +parse_duration_parse.hour = +parse_duration_parse.hr = +parse_duration_parse.h = parse_duration_parse.m * 60 - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set +parse_duration_parse.day = +parse_duration_parse.d = parse_duration_parse.h * 24 - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options +parse_duration_parse.week = +parse_duration_parse.wk = +parse_duration_parse.w = parse_duration_parse.d * 7 - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' +parse_duration_parse.month = +parse_duration_parse.b = +parse_duration_parse.d * (365.25 / 12) - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') +parse_duration_parse.year = +parse_duration_parse.yr = +parse_duration_parse.y = parse_duration_parse.d * 365.25 - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' +/** + * convert `str` to ms + * + * @param {String} str + * @param {String} format + * @return {Number} + */ - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' +function parse_duration_parse(str='', format='ms'){ + var result = null + // ignore commas/placeholders + str = (str+'').replace(/(\d)[,_](\d)/g, '$1$2') + var isNegative = str[0] === '-'; + str.replace(durationRE, function(_, n, units){ + units = unitRatio(units) + if (units) result = (result || 0) + Math.abs(parseFloat(n, 10)) * units + }) - try { - this.regexp = new RegExp(re, flags) - } catch (ex) /* istanbul ignore next - should be impossible */ { - this.regexp = false - } - return this.regexp + return result && ((result / (unitRatio(format) || 1)) * (isNegative ? -1 : 1)) } -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list +function unitRatio(str) { + return parse_duration_parse[str] || parse_duration_parse[str.toLowerCase().replace(/s$/, '')] } -Minimatch.prototype.match = function match (f, partial) { - if (typeof partial === 'undefined') partial = this.partial - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' +/* harmony default export */ const parse_duration = (parse_duration_parse); - if (f === '/' && partial) return true +// EXTERNAL MODULE: ./node_modules/debug/src/index.js +var debug_src = __nccwpck_require__(80908); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/@libp2p/logger/dist/src/index.js - var options = this.options - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. +// Add a formatter for converting to a base58 string +debug_src.formatters.b = (v) => { + return v == null ? 'undefined' : node_modules_multiformats_src_bases_base58_base58btc.baseEncode(v); +}; +// Add a formatter for converting to a base32 string +debug_src.formatters.t = (v) => { + return v == null ? 'undefined' : node_modules_multiformats_src_bases_base32_base32.baseEncode(v); +}; +// Add a formatter for converting to a base64 string +debug_src.formatters.m = (v) => { + return v == null ? 'undefined' : bases_base64_base64.baseEncode(v); +}; +// Add a formatter for stringifying peer ids +debug_src.formatters.p = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +// Add a formatter for stringifying CIDs +debug_src.formatters.c = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +// Add a formatter for stringifying Datastore keys +debug_src.formatters.k = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +// Add a formatter for stringifying Multiaddrs +debug_src.formatters.a = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +function createDisabledLogger(namespace) { + const logger = () => { }; + logger.enabled = false; + logger.color = ''; + logger.diff = 0; + logger.log = () => { }; + logger.namespace = namespace; + logger.destroy = () => true; + logger.extend = () => logger; + return logger; +} +function logger(name) { + // trace logging is a no-op by default + let trace = createDisabledLogger(`${name}:trace`); + // look at all the debug names and see if trace logging has explicitly been enabled + if (debug_src.enabled(`${name}:trace`) && debug_src.names.map(r => r.toString()).find(n => n.includes(':trace')) != null) { + trace = debug_src(`${name}:trace`); + } + return Object.assign(debug_src(name), { + error: debug_src(`${name}:error`), + trace + }); +} +function disable() { + debug.disable(); +} +function enable(namespaces) { + debug.enable(namespaces); +} +function enabled(namespaces) { + return debug.enabled(namespaces); +} +//# sourceMappingURL=index.js.map +// EXTERNAL MODULE: ./node_modules/ipfs-utils/src/http.js +var http = __nccwpck_require__(8530); +// EXTERNAL MODULE: ./node_modules/merge-options/index.js +var merge_options = __nccwpck_require__(67270); +;// CONCATENATED MODULE: ./node_modules/merge-options/index.mjs +/** + * Thin ESM wrapper for CJS named exports. + * + * Ref: https://redfin.engineering/node-modules-at-war-why-commonjs-and-es-modules-cant-get-along-9617135eeca1 + */ - var set = this.set - this.debug(this.pattern, 'set', set) - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } +/* harmony default export */ const node_modules_merge_options = (merge_options); - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function uint8arrays_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - /* istanbul ignore if */ - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch + } + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + } +} +var uint8arrays_node_modules_multiformats_vendor_base_x_src = uint8arrays_node_modules_multiformats_vendor_base_x_base; - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) +var uint8arrays_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = uint8arrays_node_modules_multiformats_vendor_base_x_src; - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } +/* harmony default export */ const uint8arrays_node_modules_multiformats_vendor_base_x = (uint8arrays_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bytes.js +const uint8arrays_node_modules_multiformats_src_bytes_empty = new Uint8Array(0) - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - /* istanbul ignore if */ - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } +/** + * @param {Uint8Array} d + */ +const uint8arrays_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - hit = f === p - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } +/** + * @param {string} hex + */ +const uint8arrays_node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : uint8arrays_node_modules_multiformats_src_bytes_empty +} - if (!hit) return false +/** + * @param {Uint8Array} aa + * @param {Uint8Array} bb + */ +const uint8arrays_node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false } - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else /* istanbul ignore else */ if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - return (fi === fl - 1) && (file[fi] === '') + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false + } } - // should be unreachable. - /* istanbul ignore next */ - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') + return true } -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') +/** + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} + */ +const uint8arrays_node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) + } + throw new Error('Unknown type, must be binary type') } +/** + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} + */ +const uint8arrays_node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) -/***/ }), - -/***/ 3562: -/***/ ((module) => { +/** + * @param {string} str + * @returns {Uint8Array} + */ +const uint8arrays_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) /** - * Helpers. + * @param {Uint8Array} b + * @returns {string} */ +const uint8arrays_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) + + + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base.js + + +// Linter can't see that API is used in types. +// eslint-disable-next-line -var s = 1000; -var m = s * 60; -var h = m * 60; -var d = h * 24; -var w = d * 7; -var y = d * 365.25; /** - * Parse or format the given `val`. - * - * Options: - * - * - `long` verbose formatting [false] + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. * - * @param {String|Number} val - * @param {Object} [options] - * @throws {Error} throw an error if val is not a non-empty string or a number - * @return {String|Number} - * @api public + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} */ +class node_modules_multiformats_src_bases_base_Encoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + */ + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + } -module.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === 'string' && val.length > 0) { - return parse(val); - } else if (type === 'number' && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') + } } - throw new Error( - 'val is not a non-empty string or a valid number. val=' + - JSON.stringify(val) - ); -}; +} /** - * Parse the given `str` and return milliseconds. + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. * - * @param {String} str - * @return {Number} - * @api private + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} */ - -function parse(str) { - str = String(str); - if (str.length > 100) { - return; +class node_modules_multiformats_src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') + } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode } - 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; + + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) + } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') + } } - var n = parseFloat(match[1]); - var type = (match[2] || 'ms').toLowerCase(); - switch (type) { - case 'years': - case 'year': - case 'yrs': - case 'yr': - case 'y': - return n * y; - case 'weeks': - case 'week': - case 'w': - return n * w; - case 'days': - case 'day': - case 'd': - return n * d; - case 'hours': - case 'hour': - case 'hrs': - case 'hr': - case 'h': - return n * h; - case 'minutes': - case 'minute': - case 'mins': - case 'min': - case 'm': - return n * m; - case 'seconds': - case 'second': - case 'secs': - case 'sec': - case 's': - return n * s; - case 'milliseconds': - case 'millisecond': - case 'msecs': - case 'msec': - case 'ms': - return n; - default: - return undefined; + + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return node_modules_multiformats_src_bases_base_or(this, decoder) } } /** - * Short format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private + * @template {string} Prefix + * @typedef {Record>} Decoders */ -function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + 'd'; - } - if (msAbs >= h) { - return Math.round(ms / h) + 'h'; +/** + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} + */ +class node_modules_multiformats_src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders } - if (msAbs >= m) { - return Math.round(ms / m) + 'm'; + + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return node_modules_multiformats_src_bases_base_or(this, decoder) } - if (msAbs >= s) { - return Math.round(ms / s) + 's'; + + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) + } } - return ms + 'ms'; } /** - * Long format for `ms`. - * - * @param {Number} ms - * @return {String} - * @api private + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} */ +const node_modules_multiformats_src_bases_base_or = (left, right) => new node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) -function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, 'day'); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, 'hour'); +/** + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} + */ +class node_modules_multiformats_src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode) } - if (msAbs >= m) { - return plural(ms, msAbs, m, 'minute'); + + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) } - if (msAbs >= s) { - return plural(ms, msAbs, s, 'second'); + + /** + * @param {string} input + */ + decode (input) { + return this.decoder.decode(input) } - return ms + ' ms'; } /** - * Pluralization helper. + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} */ +const node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode) -function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : ''); +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} + */ +const node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = uint8arrays_node_modules_multiformats_vendor_base_x(alphabet, name) + return node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => uint8arrays_node_modules_multiformats_src_bytes_coerce(decode(text)) + }) } +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i + } + + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end + } -/***/ }), + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) -/***/ 6211: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) + } -const { Multiaddr } = __nccwpck_require__(17907) + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar -const reduceValue = (_, v) => v -const tcpUri = (str, port, parts, opts) => { - // return tcp when explicitly requested - if (opts && opts.assumeHttp === false) return `tcp://${str}:${port}` - // check if tcp is the last protocol in multiaddr - let protocol = 'tcp' - let explicitPort = `:${port}` - const last = parts[parts.length - 1] - if (last.protocol === 'tcp') { - // assume http and produce clean urls - protocol = port === '443' ? 'https' : 'http' - explicitPort = port === '443' || port === '80' ? '' : explicitPort + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) + } } - return `${protocol}://${str}${explicitPort}` + + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') + } + + return out } -const Reducers = { - ip4: reduceValue, - ip6: (str, content, i, parts) => ( - parts.length === 1 && parts[0].protocol === 'ip6' - ? content - : `[${content}]` - ), - tcp: (str, content, i, parts, opts) => ( - parts.some(p => ['http', 'https', 'ws', 'wss'].includes(p.protocol)) - ? `${str}:${content}` - : tcpUri(str, content, parts, opts) - ), - udp: (str, content) => `udp://${str}:${content}`, - dnsaddr: reduceValue, - dns4: reduceValue, - dns6: reduceValue, - ipfs: (str, content) => `${str}/ipfs/${content}`, - p2p: (str, content) => `${str}/p2p/${content}`, - http: str => `http://${str}`, - https: str => `https://${str}`, - ws: str => `ws://${str}`, - wss: str => `wss://${str}`, - 'p2p-websocket-star': str => `${str}/p2p-websocket-star`, - 'p2p-webrtc-star': str => `${str}/p2p-webrtc-star`, - 'p2p-webrtc-direct': str => `${str}/p2p-webrtc-direct` +/** + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} + */ +const node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' + + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 + + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] + } + } + + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] + } + + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' + } + } + + return out } -module.exports = (multiaddr, opts) => { - const ma = new Multiaddr(multiaddr) - const parts = multiaddr.toString().split('/').slice(1) - return ma - .tuples() - .map(tuple => ({ - protocol: parts.shift(), - content: tuple[1] ? parts.shift() : null - })) - .reduce((str, part, i, parts) => { - const reduce = Reducers[part.protocol] - if (!reduce) throw new Error(`Unsupported protocol ${part.protocol}`) - return reduce(str, part.content, i, parts, opts) - }, '') +/** + * RFC4648 Factory + * + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar + */ +const node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) + } + }) } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base10.js -/***/ }), -/***/ 41437: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const bases_base10_base10 = node_modules_multiformats_src_bases_base_baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}) -"use strict"; +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base16.js +// @ts-check -const convert = __nccwpck_require__(73095) -const protocols = __nccwpck_require__(17046) -const varint = __nccwpck_require__(52865) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -// export codec -module.exports = { - stringToStringTuples, - stringTuplesToString, +const bases_base16_base16 = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'f', + name: 'base16', + alphabet: '0123456789abcdef', + bitsPerChar: 4 +}) - tuplesToStringTuples, - stringTuplesToTuples, +const bases_base16_base16upper = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'F', + name: 'base16upper', + alphabet: '0123456789ABCDEF', + bitsPerChar: 4 +}) - bytesToTuples, - tuplesToBytes, +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base2.js +// @ts-check - bytesToString, - stringToBytes, - fromString, - fromBytes, - validateBytes, - isValidBytes, - cleanPath, - ParseError, - protoFromTuple, +const bases_base2_base2 = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}) - sizeForAddr +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base256emoji.js + + +const bases_base256emoji_alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂') +const bases_base256emoji_alphabetBytesToChars = /** @type {string[]} */ (bases_base256emoji_alphabet.reduce((p, c, i) => { p[i] = c; return p }, /** @type {string[]} */([]))) +const bases_base256emoji_alphabetCharsToBytes = /** @type {number[]} */ (bases_base256emoji_alphabet.reduce((p, c, i) => { p[/** @type {number} */ (c.codePointAt(0))] = i; return p }, /** @type {number[]} */([]))) + +/** + * @param {Uint8Array} data + * @returns {string} + */ +function src_bases_base256emoji_encode (data) { + return data.reduce((p, c) => { + p += bases_base256emoji_alphabetBytesToChars[c] + return p + }, '') } -// string -> [[str name, str addr]... ] /** * @param {string} str + * @returns {Uint8Array} */ -function stringToStringTuples (str) { - const tuples = [] - const parts = str.split('/').slice(1) // skip first empty elem - if (parts.length === 1 && parts[0] === '') { - return [] +function src_bases_base256emoji_decode (str) { + const byts = [] + for (const char of str) { + const byt = bases_base256emoji_alphabetCharsToBytes[/** @type {number} */ (char.codePointAt(0))] + if (byt === undefined) { + throw new Error(`Non-base256emoji character: ${char}`) + } + byts.push(byt) } + return new Uint8Array(byts) +} - for (let p = 0; p < parts.length; p++) { - const part = parts[p] - const proto = protocols(part) +const bases_base256emoji_base256emoji = node_modules_multiformats_src_bases_base_from({ + prefix: '🚀', + name: 'base256emoji', + encode: src_bases_base256emoji_encode, + decode: src_bases_base256emoji_decode +}) - if (proto.size === 0) { - tuples.push([part]) - continue - } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base32.js - p++ // advance addr part - if (p >= parts.length) { - throw ParseError('invalid address: ' + str) - } - // if it's a path proto, take the rest - if (proto.path) { - tuples.push([ - part, - // TODO: should we need to check each path part to see if it's a proto? - // This would allow for other protocols to be added after a unix path, - // however it would have issues if the path had a protocol name in the path - cleanPath(parts.slice(p).join('/')) - ]) - break - } +const uint8arrays_node_modules_multiformats_src_bases_base32_base32 = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) - tuples.push([part, parts[p]]) - } +const uint8arrays_node_modules_multiformats_src_bases_base32_base32upper = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) - return tuples -} +const node_modules_multiformats_src_bases_base32_base32pad = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) + +const node_modules_multiformats_src_bases_base32_base32padupper = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) + +const node_modules_multiformats_src_bases_base32_base32hex = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) + +const node_modules_multiformats_src_bases_base32_base32hexupper = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) + +const node_modules_multiformats_src_bases_base32_base32hexpad = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) + +const node_modules_multiformats_src_bases_base32_base32hexpadupper = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) + +const node_modules_multiformats_src_bases_base32_base32z = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base36.js + + +const bases_base36_base36 = node_modules_multiformats_src_bases_base_baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}) + +const bases_base36_base36upper = node_modules_multiformats_src_bases_base_baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}) + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base58.js + + +const uint8arrays_node_modules_multiformats_src_bases_base58_base58btc = node_modules_multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) + +const node_modules_multiformats_src_bases_base58_base58flickr = node_modules_multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base64.js +// @ts-check + + + +const multiformats_src_bases_base64_base64 = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) + +const multiformats_src_bases_base64_base64pad = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) + +const multiformats_src_bases_base64_base64url = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) + +const multiformats_src_bases_base64_base64urlpad = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/base8.js +// @ts-check + + + +const bases_base8_base8 = node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}) + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/bases/identity.js +// @ts-check + + + + +const multiformats_src_bases_identity_identity = node_modules_multiformats_src_bases_base_from({ + prefix: '\x00', + name: 'identity', + encode: (buf) => uint8arrays_node_modules_multiformats_src_bytes_toString(buf), + decode: (str) => uint8arrays_node_modules_multiformats_src_bytes_fromString(str) +}) + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/codecs/json.js +// @ts-check -// [[str name, str addr]... ] -> string /** - * @param {[number, string?][]} tuples + * @template T + * @typedef {import('./interface.js').ByteView} ByteView */ -function stringTuplesToString (tuples) { - /** @type {Array} */ - const parts = [] - tuples.map((tup) => { - const proto = protoFromTuple(tup) - parts.push(proto.name) - if (tup.length > 1) { - parts.push(tup[1]) - } - return null - }) - return cleanPath(parts.join('/')) -} +const src_codecs_json_textEncoder = new TextEncoder() +const src_codecs_json_textDecoder = new TextDecoder() + +const src_codecs_json_name = 'json' +const src_codecs_json_code = 0x0200 -// [[str name, str addr]... ] -> [[int code, Uint8Array]... ] /** - * @param {Array} tuples - * @returns {[number , Uint8Array?][]} + * @template T + * @param {T} node + * @returns {ByteView} */ -function stringTuplesToTuples (tuples) { - return tuples.map((tup) => { - if (!Array.isArray(tup)) { - tup = [tup] - } - const proto = protoFromTuple(tup) - if (tup.length > 1) { - return [proto.code, convert.toBytes(proto.code, tup[1])] - } - return [proto.code] - }) -} +const src_codecs_json_encode = (node) => src_codecs_json_textEncoder.encode(JSON.stringify(node)) /** - * Convert tuples to string tuples - * - * [[int code, Uint8Array]... ] -> [[int code, str addr]... ] - * - * @param {Array<[number, Uint8Array?]>} tuples - * @returns {Array<[number, string?]>} + * @template T + * @param {ByteView} data + * @returns {T} */ +const src_codecs_json_decode = (data) => JSON.parse(src_codecs_json_textDecoder.decode(data)) + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/codecs/raw.js +// @ts-check + -function tuplesToStringTuples (tuples) { - return tuples.map(tup => { - const proto = protoFromTuple(tup) - if (tup[1]) { - return [proto.code, convert.toString(proto.code, tup[1])] - } - return [proto.code] - }) -} -// [[int code, Uint8Array ]... ] -> Uint8Array /** - * @param {[number, Uint8Array?][]} tuples + * @template T + * @typedef {import('./interface.js').ByteView} ByteView */ -function tuplesToBytes (tuples) { - return fromBytes(uint8ArrayConcat(tuples.map((/** @type {any[]} */ tup) => { - const proto = protoFromTuple(tup) - let buf = Uint8Array.from(varint.encode(proto.code)) - - if (tup.length > 1) { - buf = uint8ArrayConcat([buf, tup[1]]) // add address buffer - } - return buf - }))) -} +const src_codecs_raw_name = 'raw' +const src_codecs_raw_code = 0x55 /** - * @param {import("./types").Protocol} p - * @param {Uint8Array | number[]} addr + * @param {Uint8Array} node + * @returns {ByteView} */ -function sizeForAddr (p, addr) { - if (p.size > 0) { - return p.size / 8 - } else if (p.size === 0) { - return 0 - } else { - const size = varint.decode(addr) - return size + varint.decode.bytes - } -} +const src_codecs_raw_encode = (node) => uint8arrays_node_modules_multiformats_src_bytes_coerce(node) /** - * - * @param {Uint8Array} buf - * @returns {Array<[number, Uint8Array?]>} + * @param {ByteView} data + * @returns {Uint8Array} */ -function bytesToTuples (buf) { - /** @type {Array<[number, Uint8Array?]>} */ - const tuples = [] - let i = 0 - while (i < buf.length) { - const code = varint.decode(buf, i) - const n = varint.decode.bytes +const src_codecs_raw_decode = (data) => uint8arrays_node_modules_multiformats_src_bytes_coerce(data) - const p = protocols(code) +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/vendor/varint.js +var uint8arrays_node_modules_multiformats_vendor_varint_encode_1 = uint8arrays_node_modules_multiformats_vendor_varint_encode; - const size = sizeForAddr(p, buf.slice(i + n)) +var uint8arrays_node_modules_multiformats_vendor_varint_MSB = 0x80 + , uint8arrays_node_modules_multiformats_vendor_varint_REST = 0x7F + , uint8arrays_node_modules_multiformats_vendor_varint_MSBALL = ~uint8arrays_node_modules_multiformats_vendor_varint_REST + , uint8arrays_node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31); - if (size === 0) { - tuples.push([code]) - i += n - continue - } +function uint8arrays_node_modules_multiformats_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; - const addr = buf.slice(i + n, i + n + size) + while(num >= uint8arrays_node_modules_multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | uint8arrays_node_modules_multiformats_vendor_varint_MSB; + num /= 128; + } + while(num & uint8arrays_node_modules_multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | uint8arrays_node_modules_multiformats_vendor_varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + + uint8arrays_node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out +} - i += (size + n) +var uint8arrays_node_modules_multiformats_vendor_varint_decode = uint8arrays_node_modules_multiformats_vendor_varint_read; - if (i > buf.length) { // did not end _exactly_ at buffer.length - throw ParseError('Invalid address Uint8Array: ' + uint8ArrayToString(buf, 'base16')) +var uint8arrays_node_modules_multiformats_vendor_varint_MSB$1 = 0x80 + , uint8arrays_node_modules_multiformats_vendor_varint_REST$1 = 0x7F; + +function uint8arrays_node_modules_multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; + + do { + if (counter >= l) { + uint8arrays_node_modules_multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') } + b = buf[counter++]; + res += shift < 28 + ? (b & uint8arrays_node_modules_multiformats_vendor_varint_REST$1) << shift + : (b & uint8arrays_node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= uint8arrays_node_modules_multiformats_vendor_varint_MSB$1) - // ok, tuple seems good. - tuples.push([code, addr]) - } + uint8arrays_node_modules_multiformats_vendor_varint_read.bytes = counter - offset; - return tuples + return res } -// Uint8Array -> String +var uint8arrays_node_modules_multiformats_vendor_varint_N1 = Math.pow(2, 7); +var uint8arrays_node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14); +var uint8arrays_node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21); +var uint8arrays_node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28); +var uint8arrays_node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35); +var uint8arrays_node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42); +var uint8arrays_node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49); +var uint8arrays_node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56); +var uint8arrays_node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63); + +var uint8arrays_node_modules_multiformats_vendor_varint_length = function (value) { + return ( + value < uint8arrays_node_modules_multiformats_vendor_varint_N1 ? 1 + : value < uint8arrays_node_modules_multiformats_vendor_varint_N2 ? 2 + : value < uint8arrays_node_modules_multiformats_vendor_varint_N3 ? 3 + : value < uint8arrays_node_modules_multiformats_vendor_varint_N4 ? 4 + : value < uint8arrays_node_modules_multiformats_vendor_varint_N5 ? 5 + : value < uint8arrays_node_modules_multiformats_vendor_varint_N6 ? 6 + : value < uint8arrays_node_modules_multiformats_vendor_varint_N7 ? 7 + : value < uint8arrays_node_modules_multiformats_vendor_varint_N8 ? 8 + : value < uint8arrays_node_modules_multiformats_vendor_varint_N9 ? 9 + : 10 + ) +}; + +var uint8arrays_node_modules_multiformats_vendor_varint_varint = { + encode: uint8arrays_node_modules_multiformats_vendor_varint_encode_1 + , decode: uint8arrays_node_modules_multiformats_vendor_varint_decode + , encodingLength: uint8arrays_node_modules_multiformats_vendor_varint_length +}; + +var uint8arrays_node_modules_multiformats_vendor_varint_brrp_varint = uint8arrays_node_modules_multiformats_vendor_varint_varint; + +/* harmony default export */ const uint8arrays_node_modules_multiformats_vendor_varint = (uint8arrays_node_modules_multiformats_vendor_varint_brrp_varint); + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/varint.js + + /** - * @param {Uint8Array} buf + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} */ -function bytesToString (buf) { - const a = bytesToTuples(buf) - const b = tuplesToStringTuples(a) - return stringTuplesToString(b) +const uint8arrays_node_modules_multiformats_src_varint_decode = (data, offset = 0) => { + const code = varint.decode(data, offset) + return [code, varint.decode.bytes] } -// String -> Uint8Array /** - * @param {string} str + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] */ -function stringToBytes (str) { - str = cleanPath(str) - const a = stringToStringTuples(str) - const b = stringTuplesToTuples(a) - - return tuplesToBytes(b) +const uint8arrays_node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + uint8arrays_node_modules_multiformats_vendor_varint.encode(int, target, offset) + return target } -// String -> Uint8Array /** - * @param {string} str + * @param {number} int + * @returns {number} */ -function fromString (str) { - return stringToBytes(str) +const uint8arrays_node_modules_multiformats_src_varint_encodingLength = (int) => { + return uint8arrays_node_modules_multiformats_vendor_varint.encodingLength(int) } -// Uint8Array -> Uint8Array +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/hashes/digest.js + + + /** - * @param {Uint8Array} buf + * Creates a multihash digest. + * + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest */ -function fromBytes (buf) { - const err = validateBytes(buf) - if (err) throw err - return Uint8Array.from(buf) // copy +const uint8arrays_node_modules_multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = uint8arrays_node_modules_multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + uint8arrays_node_modules_multiformats_src_varint_encodingLength(size) + + const bytes = new Uint8Array(digestOffset + size) + uint8arrays_node_modules_multiformats_src_varint_encodeTo(code, bytes, 0) + uint8arrays_node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) + + return new uint8arrays_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) } /** - * @param {Uint8Array} buf + * Turns bytes representation of multihash digest into an instance. + * + * @param {Uint8Array} multihash + * @returns {MultihashDigest} */ -function validateBytes (buf) { - try { - bytesToTuples(buf) // try to parse. will throw if breaks - } catch (err) { - return err +const uint8arrays_node_modules_multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = coerce(multihash) + const [code, sizeOffset] = varint.decode(bytes) + const [size, digestOffset] = varint.decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) + + if (digest.byteLength !== size) { + throw new Error('Incorrect length') } -} -/** - * @param {Uint8Array} buf - */ -function isValidBytes (buf) { - return validateBytes(buf) === undefined + return new uint8arrays_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) } /** - * @param {string} str + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} */ -function cleanPath (str) { - return '/' + str.trim().split('/').filter((/** @type {any} */ a) => a).join('/') +const uint8arrays_node_modules_multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { + return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) + + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + equalBytes(a.bytes, data.bytes) + ) + } } /** - * @param {string} str + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest */ -function ParseError (str) { - return new Error('Error parsing address: ' + str) -} /** - * @param {any[]} tup + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + * + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} */ -function protoFromTuple (tup) { - const proto = protocols(tup[0]) - return proto +class uint8arrays_node_modules_multiformats_src_hashes_digest_Digest { + /** + * Creates a multihash digest. + * + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes + */ + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes + } } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/hashes/identity.js -/***/ }), -/***/ 73095: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +const src_hashes_identity_code = 0x0 +const src_hashes_identity_name = 'identity' +/** @type {(input:Uint8Array) => Uint8Array} */ +const src_hashes_identity_encode = uint8arrays_node_modules_multiformats_src_bytes_coerce -const ip = __nccwpck_require__(95416) -const protocols = __nccwpck_require__(17046) -const { CID } = __nccwpck_require__(24247) -const { base32 } = __nccwpck_require__(70784) -const { base58btc } = __nccwpck_require__(49108) -const Digest = __nccwpck_require__(81168) -const varint = __nccwpck_require__(52865) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) -const { concat: uint8ArrayConcat } = __nccwpck_require__(17225) +/** + * @param {Uint8Array} input + * @returns {Digest.Digest} + */ +const hashes_identity_digest = (input) => uint8arrays_node_modules_multiformats_src_hashes_digest_create(src_hashes_identity_code, src_hashes_identity_encode(input)) + +const src_hashes_identity_identity = { code: src_hashes_identity_code, name: src_hashes_identity_name, encode: src_hashes_identity_encode, digest: hashes_identity_digest } + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/hashes/hasher.js -module.exports = Convert -// converts (serializes) addresses /** - * @param {string} proto - * @param {string | Uint8Array} a + * @template {string} Name + * @template {number} Code + * @param {object} options + * @param {Name} options.name + * @param {Code} options.code + * @param {(input: Uint8Array) => Await} options.encode */ -function Convert (proto, a) { - if (a instanceof Uint8Array) { - return Convert.toString(proto, a) - } else { - return Convert.toBytes(proto, a) - } -} +const multiformats_src_hashes_hasher_from = ({ name, code, encode }) => new src_hashes_hasher_Hasher(name, code, encode) /** - * Convert [code,Uint8Array] to string + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. * - * @param {number|string} proto - * @param {Uint8Array} buf - * @returns {string} + * @template {string} Name + * @template {number} Code + * @class + * @implements {MultihashHasher} */ -Convert.toString = function convertToString (proto, buf) { - const protocol = protocols(proto) - switch (protocol.code) { - case 4: // ipv4 - case 41: // ipv6 - return bytes2ip(buf) - - case 6: // tcp - case 273: // udp - case 33: // dccp - case 132: // sctp - return bytes2port(buf).toString() - - case 53: // dns - case 54: // dns4 - case 55: // dns6 - case 56: // dnsaddr - case 400: // unix - case 777: // memory - return bytes2str(buf) - - case 421: // ipfs - return bytes2mh(buf) - case 444: // onion - return bytes2onion(buf) - case 445: // onion3 - return bytes2onion(buf) - default: - return uint8ArrayToString(buf, 'base16') // no clue. convert to hex +class src_hashes_hasher_Hasher { + /** + * + * @param {Name} name + * @param {Code} code + * @param {(input: Uint8Array) => Await} encode + */ + constructor (name, code, encode) { + this.name = name + this.code = code + this.encode = encode } -} - -Convert.toBytes = function convertToBytes (/** @type {string | number } */ proto, /** @type {string} */ str) { - const protocol = protocols(proto) - switch (protocol.code) { - case 4: // ipv4 - return ip2bytes(str) - case 41: // ipv6 - return ip2bytes(str) - - case 6: // tcp - case 273: // udp - case 33: // dccp - case 132: // sctp - return port2bytes(parseInt(str, 10)) - - case 53: // dns - case 54: // dns4 - case 55: // dns6 - case 56: // dnsaddr - case 400: // unix - case 777: // memory - return str2bytes(str) - case 421: // ipfs - return mh2bytes(str) - case 444: // onion - return onion2bytes(str) - case 445: // onion3 - return onion32bytes(str) - default: - return uint8ArrayFromString(str, 'base16') // no clue. convert from hex + /** + * @param {Uint8Array} input + * @returns {Await>} + */ + digest (input) { + if (input instanceof Uint8Array) { + const result = this.encode(input) + return result instanceof Uint8Array + ? uint8arrays_node_modules_multiformats_src_hashes_digest_create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => uint8arrays_node_modules_multiformats_src_hashes_digest_create(this.code, digest)) + } else { + throw Error('Unknown type, must be binary type') + /* c8 ignore next 1 */ + } } } /** - * @param {string} ipString + * @template {number} Alg + * @typedef {import('./interface.js').MultihashHasher} MultihashHasher */ -function ip2bytes (ipString) { - if (!ip.isIP(ipString)) { - throw new Error('invalid ip address') - } - return ip.toBytes(ipString) -} /** - * @param {Uint8Array} ipBuff + * @template T + * @typedef {Promise|T} Await */ -function bytes2ip (ipBuff) { - const ipString = ip.toString(ipBuff) - if (!ipString || !ip.isIP(ipString)) { - throw new Error('invalid ip address') - } - return ipString -} -/** - * @param {number} port - */ -function port2bytes (port) { - const buf = new ArrayBuffer(2) - const view = new DataView(buf) - view.setUint16(0, port) +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/hashes/sha2.js +// @ts-check - return new Uint8Array(buf) -} -/** - * @param {Uint8Array} buf - */ -function bytes2port (buf) { - const view = new DataView(buf.buffer) - return view.getUint16(buf.byteOffset) -} -/** - * @param {string} str - */ -function str2bytes (str) { - const buf = uint8ArrayFromString(str) - const size = Uint8Array.from(varint.encode(buf.length)) - return uint8ArrayConcat([size, buf], size.length + buf.length) -} -/** - * @param {Uint8Array} buf - */ -function bytes2str (buf) { - const size = varint.decode(buf) - buf = buf.slice(varint.decode.bytes) - if (buf.length !== size) { - throw new Error('inconsistent lengths') - } +const src_hashes_sha2_sha256 = multiformats_src_hashes_hasher_from({ + name: 'sha2-256', + code: 0x12, + encode: (input) => uint8arrays_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha256').update(input).digest()) +}) - return uint8ArrayToString(buf) -} +const hashes_sha2_sha512 = multiformats_src_hashes_hasher_from({ + name: 'sha2-512', + code: 0x13, + encode: input => uint8arrays_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha512').update(input).digest()) +}) -/** - * @param {string} hash - base58btc string - */ -function mh2bytes (hash) { - let mh +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/cid.js - if (hash[0] === 'Q' || hash[0] === '1') { - mh = Digest.decode(base58btc.decode(`z${hash}`)).bytes - } else { - mh = CID.parse(hash).multihash.bytes - } - // the address is a varint prefixed multihash string representation - const size = Uint8Array.from(varint.encode(mh.length)) - return uint8ArrayConcat([size, mh], size.length + mh.length) -} + + +// Linter can see that API is used in types. +// eslint-disable-next-line + + + +// This way TS will also expose all the types from module + /** - * Converts bytes to bas58btc string - * - * @param {Uint8Array} buf - * @returns {string} base58btc string + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} */ -function bytes2mh (buf) { - const size = varint.decode(buf) - const address = buf.slice(varint.decode.bytes) - - if (address.length !== size) { - throw new Error('inconsistent lengths') +const uint8arrays_node_modules_multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return uint8arrays_node_modules_multiformats_src_cid_toStringV0( + bytes, + uint8arrays_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || base58btc.encoder + ) + default: + return uint8arrays_node_modules_multiformats_src_cid_toStringV1( + bytes, + uint8arrays_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || base32.encoder) + ) } - - return uint8ArrayToString(address, 'base58btc') } /** - * @param {string} str + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} */ -function onion2bytes (str) { - const addr = str.split(':') - if (addr.length !== 2) { - throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') - } - if (addr[0].length !== 16) { - throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion address.') - } +const uint8arrays_node_modules_multiformats_src_cid_toJSON = (link) => ({ + '/': uint8arrays_node_modules_multiformats_src_cid_format(link) +}) - // onion addresses do not include the multibase prefix, add it before decoding - const buf = base32.decode('b' + addr[0]) +/** + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json + */ +const uint8arrays_node_modules_multiformats_src_cid_fromJSON = (json) => + uint8arrays_node_modules_multiformats_src_cid_CID.parse(json['/']) - // onion port number - const port = parseInt(addr[1], 10) - if (port < 1 || port > 65536) { - throw new Error('Port number is not in range(1, 65536)') - } - const portBuf = port2bytes(port) - return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) -} +/** @type {WeakMap>} */ +const uint8arrays_node_modules_multiformats_src_cid_cache = new WeakMap() /** - * @param {string} str + * @param {API.UnknownLink} cid + * @returns {Map} */ -function onion32bytes (str) { - const addr = str.split(':') - if (addr.length !== 2) { - throw new Error('failed to parse onion addr: ' + addr + ' does not contain a port number') - } - if (addr[0].length !== 56) { - throw new Error('failed to parse onion addr: ' + addr[0] + ' not a Tor onion3 address.') - } - // onion addresses do not include the multibase prefix, add it before decoding - const buf = base32.decode('b' + addr[0]) - - // onion port number - const port = parseInt(addr[1], 10) - if (port < 1 || port > 65536) { - throw new Error('Port number is not in range(1, 65536)') +const uint8arrays_node_modules_multiformats_src_cid_baseCache = cid => { + const baseCache = uint8arrays_node_modules_multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + uint8arrays_node_modules_multiformats_src_cid_cache.set(cid, baseCache) + return baseCache } - const portBuf = port2bytes(port) - return uint8ArrayConcat([buf, portBuf], buf.length + portBuf.length) + return baseCache } /** - * @param {Uint8Array} buf + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} */ -function bytes2onion (buf) { - const addrBytes = buf.slice(0, buf.length - 2) - const portBytes = buf.slice(buf.length - 2) - const addr = uint8ArrayToString(addrBytes, 'base32') - const port = bytes2port(portBytes) - return addr + ':' + port -} - - -/***/ }), - -/***/ 17907: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +class uint8arrays_node_modules_multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes + } -const codec = __nccwpck_require__(41437) -const protocols = __nccwpck_require__(17046) -const varint = __nccwpck_require__(52865) -const { CID } = __nccwpck_require__(24247) -const { base58btc } = __nccwpck_require__(49108) -const errCode = __nccwpck_require__(5822) -const inspect = Symbol.for('nodejs.util.inspect.custom') -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this + } -/** - * @typedef {(addr: Multiaddr) => Promise} Resolver - * @typedef {string | Multiaddr | Uint8Array | null} MultiaddrInput - * @typedef {import('./types').MultiaddrObject} MultiaddrObject - * @typedef {import('./types').Protocol} Protocol - */ + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset + } -/** @type {Map} */ -const resolvers = new Map() -const symbol = Symbol.for('@multiformats/js-multiaddr/multiaddr') + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } -/** - * Creates a [multiaddr](https://github.com/multiformats/multiaddr) from - * a Uint8Array, String or another Multiaddr instance - * public key. - * - */ -class Multiaddr { /** - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * ``` - * - * @param {MultiaddrInput} [addr] - If String or Uint8Array, needs to adhere to the address format of a [multiaddr](https://github.com/multiformats/multiaddr#string-format) + * @returns {CID} */ - constructor (addr) { - // default - if (addr == null) { - addr = '' - } + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) + } + case 1: { + const { code, multihash } = this - // Define symbol - Object.defineProperty(this, symbol, { value: true }) + if (code !== uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } - if (addr instanceof Uint8Array) { - /** @type {Uint8Array} - The raw bytes representing this multiaddress */ - this.bytes = codec.fromBytes(addr) - } else if (typeof addr === 'string') { - if (addr.length > 0 && addr.charAt(0) !== '/') { - throw new Error(`multiaddr "${addr}" must start with a "/"`) + // sha2-256 + if (multihash.code !== uint8arrays_node_modules_multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') + } + + return /** @type {CID} */ ( + uint8arrays_node_modules_multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) } - this.bytes = codec.fromString(addr) - } else if (Multiaddr.isMultiaddr(addr)) { // Multiaddr - this.bytes = codec.fromBytes(addr.bytes) // validate + copy buffer - } else { - throw new Error('addr must be a string, Buffer, or another Multiaddr') } } /** - * Returns Multiaddr as a String - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toString() - * // '/ip4/127.0.0.1/tcp/4001' - * ``` + * @returns {CID} */ - toString () { - return codec.bytesToString(this.bytes) + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = Digest.create(code, digest) + return /** @type {CID} */ ( + uint8arrays_node_modules_multiformats_src_cid_CID.createV1(this.code, multihash) + ) + } + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) + } + } } /** - * Returns Multiaddr as a JSON encoded object - * - * @example - * ```js - * JSON.stringify(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) - * // '/ip4/127.0.0.1/tcp/4001' - * ``` + * @param {unknown} other + * @returns {other is CID} */ - toJSON () { - return this.toString() + equals (other) { + return uint8arrays_node_modules_multiformats_src_cid_CID.equals(this, other) } /** - * Returns Multiaddr as a convinient options object to be used with net.createConnection - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').toOptions() - * // { family: 4, host: '127.0.0.1', transport: 'tcp', port: 4001 } - * ``` + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} */ - toOptions () { - /** @type {MultiaddrObject} */ - const opts = {} - const parsed = this.toString().split('/') - opts.family = parsed[1] === 'ip4' ? 4 : 6 - opts.host = parsed[2] - opts.transport = parsed[3] - opts.port = parseInt(parsed[4]) - return opts + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + Digest.equals(self.multihash, unknown.multihash) + ) } /** - * Returns the protocols the Multiaddr is defined with, as an array of objects, in - * left-to-right order. Each object contains the protocol code, protocol name, - * and the size of its address space in bits. - * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protos() - * // [ { code: 4, size: 32, name: 'ip4' }, - * // { code: 6, size: 16, name: 'tcp' } ] - * ``` - * - * @returns {Protocol[]} protocols - All the protocols the address is composed of + * @param {API.MultibaseEncoder} [base] + * @returns {string} */ - protos () { - return this.protoCodes().map(code => Object.assign({}, protocols(code))) + toString (base) { + return uint8arrays_node_modules_multiformats_src_cid_format(this, base) } /** - * Returns the codes of the protocols in left-to-right order. - * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) - * - * @example - * ```js - * Multiaddr('/ip4/127.0.0.1/tcp/4001').protoCodes() - * // [ 4, 6 ] - * ``` - * - * @returns {number[]} protocol codes + * @returns {API.LinkJSON} */ - protoCodes () { - const codes = [] - const buf = this.bytes - let i = 0 - while (i < buf.length) { - const code = varint.decode(buf, i) - const n = varint.decode.bytes + toJSON () { + return { '/': uint8arrays_node_modules_multiformats_src_cid_format(this) } + } - const p = protocols(code) - const size = codec.sizeForAddr(p, buf.slice(i + n)) + link () { + return this + } - i += (size + n) - codes.push(code) - } + get [Symbol.toStringTag] () { + return 'CID' + } - return codes + // Legacy + + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` } /** - * Returns the names of the protocols in left-to-right order. - * [See list of protocols](https://github.com/multiformats/multiaddr/blob/master/protocols.csv) + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').protoNames() - * // [ 'ip4', 'tcp' ] - * ``` + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. * - * @returns {string[]} protocol names + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} */ - protoNames () { - return this.protos().map(proto => proto.name) + static asCID (input) { + if (input == null) { + return null + } + + const value = /** @type {any} */ (input) + if (value instanceof uint8arrays_node_modules_multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new uint8arrays_node_modules_multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || uint8arrays_node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[uint8arrays_node_modules_multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (Digest.decode(multihash)) + return uint8arrays_node_modules_multiformats_src_cid_CID.create(version, code, digest) + } else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null + } } /** - * Returns a tuple of parts * - * @example - * ```js - * new Multiaddr("/ip4/127.0.0.1/tcp/4001").tuples() - * // [ [ 4, ], [ 6, ] ] - * ``` + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} */ - tuples () { - return codec.bytesToTuples(this.bytes) + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') + } + + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } + + switch (version) { + case 0: { + if (code !== uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new uint8arrays_node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes) + } + } + case 1: { + const bytes = uint8arrays_node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new uint8arrays_node_modules_multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') + } + } } /** - * Returns a tuple of string/number parts - * - tuples[][0] = code of protocol - * - tuples[][1] = contents of address + * Simplified version of `create` for CIDv0. * - * @example - * ```js - * new Multiaddr("/ip4/127.0.0.1/tcp/4001").stringTuples() - * // [ [ 4, '127.0.0.1' ], [ 6, '4001' ] ] - * ``` + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} */ - stringTuples () { - const t = codec.bytesToTuples(this.bytes) - return codec.tuplesToStringTuples(t) + static createV0 (digest) { + return uint8arrays_node_modules_multiformats_src_cid_CID.create(0, uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE, digest) } /** - * Encapsulates a Multiaddr in another Multiaddr - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') - * // - * - * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * - * const mh3 = mh1.encapsulate(mh2) - * // - * - * mh3.toString() - * // '/ip4/8.8.8.8/tcp/1080/ip4/127.0.0.1/tcp/4001' - * ``` + * Simplified version of `create` for CIDv1. * - * @param {MultiaddrInput} addr - Multiaddr to add into this Multiaddr + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} */ - encapsulate (addr) { - addr = new Multiaddr(addr) - return new Multiaddr(this.toString() + addr.toString()) + static createV1 (code, digest) { + return uint8arrays_node_modules_multiformats_src_cid_CID.create(1, code, digest) } /** - * Decapsulates a Multiaddr from another Multiaddr - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') - * // - * - * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * - * const mh3 = mh1.encapsulate(mh2) - * // + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. * - * mh3.decapsulate(mh2).toString() - * // '/ip4/8.8.8.8/tcp/1080' - * ``` + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. * - * @param {Multiaddr | string} addr - Multiaddr to remove from this Multiaddr - * @returns {Multiaddr} + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} */ - decapsulate (addr) { - const addrString = addr.toString() - const s = this.toString() - const i = s.lastIndexOf(addrString) - if (i < 0) { - throw new Error('Address ' + this + ' does not contain subaddress: ' + addr) + static decode (bytes) { + const [cid, remainder] = uint8arrays_node_modules_multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') } - return new Multiaddr(s.slice(0, i)) + return cid } /** - * A more reliable version of `decapsulate` if you are targeting a - * specific code, such as 421 (the `p2p` protocol code). The last index of the code - * will be removed from the `Multiaddr`, and a new instance will be returned. - * If the code is not present, the original `Multiaddr` is returned. - * - * @example - * ```js - * const addr = new Multiaddr('/ip4/0.0.0.0/tcp/8080/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC') - * // + * Decoded a CID from its binary representation at the beginning of a byte + * array. * - * addr.decapsulateCode(421).toString() - * // '/ip4/0.0.0.0/tcp/8080' - * - * new Multiaddr('/ip4/127.0.0.1/tcp/8080').decapsulateCode(421).toString() - * // '/ip4/127.0.0.1/tcp/8080' - * ``` + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. * - * @param {number} code - The code of the protocol to decapsulate from this Multiaddr - * @returns {Multiaddr} + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} */ - decapsulateCode (code) { - const tuples = this.tuples() - for (let i = tuples.length - 1; i >= 0; i--) { - if (tuples[i][0] === code) { - return new Multiaddr(codec.tuplesToBytes(tuples.slice(0, i))) - } + static decodeFirst (bytes) { + const specs = uint8arrays_node_modules_multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') } - return this + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new Digest.Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? uint8arrays_node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : uint8arrays_node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] } /** - * Extract the peerId if the multiaddr contains one - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/ipfs/QmValidBase58string') - * // + * Inspect the initial bytes of a CID to determine its properties. * - * // should return QmValidBase58string or null if the id is missing or invalid - * const peerId = mh1.getPeerId() - * ``` + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. * - * @returns {string | null} peerId - The id of the peer or null if invalid or missing from the ma + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} */ - getPeerId () { - try { - const tuples = this.stringTuples().filter((tuple) => { - if (tuple[0] === protocols.names.ipfs.code) { - return true - } - return false - }) + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = varint.decode(initialBytes.subarray(offset)) + offset += length + return i + } - // Get the last ipfs tuple ['ipfs', 'peerid string'] - const tuple = tuples.pop() - if (tuple && tuple[1]) { - const peerIdStr = tuple[1] + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 + } else { + codec = /** @type {C} */ (next()) + } - // peer id is base58btc encoded string but not multibase encoded so add the `z` - // prefix so we can validate that it is correctly encoded - if (peerIdStr[0] === 'Q' || peerIdStr[0] === '1') { - return uint8ArrayToString(base58btc.decode(`z${peerIdStr}`), 'base58btc') - } + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } - // try to parse peer id as CID - return uint8ArrayToString(CID.parse(peerIdStr).multihash.bytes, 'base58btc') - } + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize - return null - } catch (e) { - return null - } + return { version, codec, multihashCode, digestSize, multihashSize, size } } /** - * Extract the path if the multiaddr contains one - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080/unix/tmp/p2p.sock') - * // - * - * // should return utf8 string or null if the id is missing or invalid - * const path = mh1.getPath() - * ```js + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). * - * @returns {string | null} path - The path of the multiaddr, or null if no path protocol is present + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} */ - getPath () { - let path = null - try { - path = this.stringTuples().filter((tuple) => { - const proto = protocols(tuple[0]) - if (proto.path) { - return true - } - return false - })[0][1] + static parse (source, base) { + const [prefix, bytes] = uint8arrays_node_modules_multiformats_src_cid_parseCIDtoBytes(source, base) - if (!path) { - path = null + const cid = uint8arrays_node_modules_multiformats_src_cid_CID.decode(bytes) + + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') + } + + // Cache string representation to avoid computing it on `this.toString()` + uint8arrays_node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source) + + return cid + } +} + +/** + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} + */ +const uint8arrays_node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || base58btc + return [ + /** @type {Prefix} */ (base58btc.prefix), + decoder.decode(`${base58btc.prefix}${source}`) + ] + } + case base58btc.prefix: { + const decoder = base || base58btc + return [/** @type {Prefix} */(base58btc.prefix), decoder.decode(source)] + } + case base32.prefix: { + const decoder = base || base32 + return [/** @type {Prefix} */(base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) } - } catch (e) { - path = null + return [/** @type {Prefix} */(source[0]), base.decode(source)] } - return path + } +} + +/** + * + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base + */ +const uint8arrays_node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) } - /** - * Checks if two Multiaddrs are the same - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/8.8.8.8/tcp/1080') - * // - * - * const mh2 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * - * mh1.equals(mh1) - * // true - * - * mh1.equals(mh2) - * // false - * ``` - * - * @param {Multiaddr} addr - * @returns {boolean} - */ - equals (addr) { - return uint8ArrayEquals(this.bytes, addr.bytes) + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} + +/** + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base + */ +const uint8arrays_node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid + } else { + return cid } +} - /** - * Resolve multiaddr if containing resolvable hostname. - * - * @example - * ```js - * Multiaddr.resolvers.set('dnsaddr', resolverFunction) - * const mh1 = new Multiaddr('/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb') - * const resolvedMultiaddrs = await mh1.resolve() - * // [ - * // , - * // , - * // - * // ] - * ``` - * - * @returns {Promise>} - */ - async resolve () { - const resolvableProto = this.protos().find((p) => p.resolvable) +const uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70 +const uint8arrays_node_modules_multiformats_src_cid_SHA_256_CODE = 0x12 - // Multiaddr is not resolvable? - if (!resolvableProto) { - return [this] +/** + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} + */ +const uint8arrays_node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = varint.encodingLength(version) + const hashOffset = codeOffset + varint.encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + varint.encodeTo(version, bytes, 0) + varint.encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes +} + +const uint8arrays_node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/index.js + + + + + + +// This way TS will also expose all the types from module + + + + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats/src/basics.js +// @ts-check + + + + + + + + + + + + + + + + + +const src_basics_bases = { ...multiformats_src_bases_identity_namespaceObject, ...src_bases_base2_namespaceObject, ...src_bases_base8_namespaceObject, ...src_bases_base10_namespaceObject, ...src_bases_base16_namespaceObject, ...uint8arrays_node_modules_multiformats_src_bases_base32_namespaceObject, ...src_bases_base36_namespaceObject, ...uint8arrays_node_modules_multiformats_src_bases_base58_namespaceObject, ...multiformats_src_bases_base64_namespaceObject, ...src_bases_base256emoji_namespaceObject } +const src_basics_hashes = { ...src_hashes_sha2_namespaceObject, ...src_hashes_identity_namespaceObject } +const src_basics_codecs = { raw: src_codecs_raw_namespaceObject, json: multiformats_src_codecs_json_namespaceObject } + + + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/dist/src/util/as-uint8array.js +/** + * To guarantee Uint8Array semantics, convert nodejs Buffers + * into vanilla Uint8Arrays + */ +function src_util_as_uint8array_asUint8Array(buf) { + if (globalThis.Buffer != null) { + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); } + return buf; +} +//# sourceMappingURL=as-uint8array.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/dist/src/alloc.js - const resolver = resolvers.get(resolvableProto.name) - if (!resolver) { - throw errCode(new Error(`no available resolver for ${resolvableProto.name}`), 'ERR_NO_AVAILABLE_RESOLVER') +/** + * Returns a `Uint8Array` of the requested size. Referenced memory will + * be initialized to 0. + */ +function dist_src_alloc_alloc(size = 0) { + if (globalThis.Buffer?.alloc != null) { + return asUint8Array(globalThis.Buffer.alloc(size)); + } + return new Uint8Array(size); +} +/** + * Where possible returns a Uint8Array of the requested size that references + * uninitialized memory. Only use if you are certain you will immediately + * overwrite every value in the returned `Uint8Array`. + */ +function src_alloc_allocUnsafe(size = 0) { + if (globalThis.Buffer?.allocUnsafe != null) { + return src_util_as_uint8array_asUint8Array(globalThis.Buffer.allocUnsafe(size)); } + return new Uint8Array(size); +} +//# sourceMappingURL=alloc.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/dist/src/util/bases.js - const addresses = await resolver(this) - return addresses.map((a) => new Multiaddr(a)) - } - /** - * Gets a Multiaddrs node-friendly address object. Note that protocol information - * is left out: in Node (and most network systems) the protocol is unknowable - * given only the address. - * - * Has to be a ThinWaist Address, otherwise throws error - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').nodeAddress() - * // {family: 4, address: '127.0.0.1', port: 4001} - * ``` - * - * @returns {{family: 4 | 6, address: string, port: number}} - * @throws {Error} Throws error if Multiaddr is not a Thin Waist address - */ - nodeAddress () { - const codes = this.protoCodes() - const names = this.protoNames() - const parts = this.toString().split('/').slice(1) +function bases_createCodec(name, prefix, encode, decode) { + return { + name, + prefix, + encoder: { + name, + prefix, + encode + }, + decoder: { + decode + } + }; +} +const bases_string = bases_createCodec('utf8', 'u', (buf) => { + const decoder = new TextDecoder('utf8'); + return 'u' + decoder.decode(buf); +}, (str) => { + const encoder = new TextEncoder(); + return encoder.encode(str.substring(1)); +}); +const bases_ascii = bases_createCodec('ascii', 'a', (buf) => { + let string = 'a'; + for (let i = 0; i < buf.length; i++) { + string += String.fromCharCode(buf[i]); + } + return string; +}, (str) => { + str = str.substring(1); + const buf = src_alloc_allocUnsafe(str.length); + for (let i = 0; i < str.length; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}); +const bases_BASES = { + utf8: bases_string, + 'utf-8': bases_string, + hex: src_basics_bases.base16, + latin1: bases_ascii, + ascii: bases_ascii, + binary: bases_ascii, + ...src_basics_bases +}; +/* harmony default export */ const src_util_bases = (bases_BASES); +//# sourceMappingURL=bases.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/dist/src/to-string.js - if (parts.length < 4) { - throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6}/{address}/{tcp, udp}/{port}".') - } else if (codes[0] !== 4 && codes[0] !== 41 && codes[0] !== 54 && codes[0] !== 55) { - throw new Error(`no protocol with name: "'${names[0]}'". Must have a valid family name: "{ip4, ip6, dns4, dns6}".`) - } else if (parts[2] !== 'tcp' && parts[2] !== 'udp') { - throw new Error(`no protocol with name: "'${names[1]}'". Must have a valid transport protocol: "{tcp, udp}".`) +/** + * Turns a `Uint8Array` into a string. + * + * Supports `utf8`, `utf-8` and any encoding supported by the multibase module. + * + * Also `ascii` which is similar to node's 'binary' encoding. + */ +function src_to_string_toString(array, encoding = 'utf8') { + const base = src_util_bases[encoding]; + if (base == null) { + throw new Error(`Unsupported encoding "${encoding}"`); } + if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) { + return globalThis.Buffer.from(array.buffer, array.byteOffset, array.byteLength).toString('utf8'); + } + // strip multibase prefix + return base.encoder.encode(array).substring(1); +} +//# sourceMappingURL=to-string.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/@multiformats/multiaddr/dist/src/ip.js + + +const ip_isV4 = external_node_net_namespaceObject.isIPv4; +const ip_isV6 = external_node_net_namespaceObject.isIPv6; +// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L7 +// but with buf/offset args removed because we don't use them +const src_ip_toBytes = function (ip) { + let offset = 0; + ip = ip.toString().trim(); + if (ip_isV4(ip)) { + const bytes = new Uint8Array(offset + 4); + ip.split(/\./g).forEach((byte) => { + bytes[offset++] = parseInt(byte, 10) & 0xff; + }); + return bytes; + } + if (ip_isV6(ip)) { + const sections = ip.split(':', 8); + let i; + for (i = 0; i < sections.length; i++) { + const isv4 = ip_isV4(sections[i]); + let v4Buffer; + if (isv4) { + v4Buffer = src_ip_toBytes(sections[i]); + sections[i] = src_to_string_toString(v4Buffer.slice(0, 2), 'base16'); + } + if (v4Buffer != null && ++i < 8) { + sections.splice(i, 0, src_to_string_toString(v4Buffer.slice(2, 4), 'base16')); + } + } + if (sections[0] === '') { + while (sections.length < 8) + sections.unshift('0'); + } + else if (sections[sections.length - 1] === '') { + while (sections.length < 8) + sections.push('0'); + } + else if (sections.length < 8) { + for (i = 0; i < sections.length && sections[i] !== ''; i++) + ; + const argv = [i, 1]; + for (i = 9 - sections.length; i > 0; i--) { + argv.push('0'); + } + sections.splice.apply(sections, argv); + } + const bytes = new Uint8Array(offset + 16); + for (i = 0; i < sections.length; i++) { + const word = parseInt(sections[i], 16); + bytes[offset++] = (word >> 8) & 0xff; + bytes[offset++] = word & 0xff; + } + return bytes; + } + throw new Error('invalid ip address'); +}; +// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63 +const src_ip_toString = function (buf, offset = 0, length) { + offset = ~~offset; + length = length ?? (buf.length - offset); + const view = new DataView(buf.buffer); + if (length === 4) { + const result = []; + // IPv4 + for (let i = 0; i < length; i++) { + result.push(buf[offset + i]); + } + return result.join('.'); + } + if (length === 16) { + const result = []; + // IPv6 + for (let i = 0; i < length; i += 2) { + result.push(view.getUint16(offset + i).toString(16)); + } + return result.join(':') + .replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3') + .replace(/:{3,4}/, '::'); + } + return ''; +}; +//# sourceMappingURL=ip.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/@multiformats/multiaddr/dist/src/protocols-table.js +const protocols_table_V = -1; +const protocols_table_names = {}; +const protocols_table_codes = {}; +const protocols_table_table = [ + [4, 32, 'ip4'], + [6, 16, 'tcp'], + [33, 16, 'dccp'], + [41, 128, 'ip6'], + [42, protocols_table_V, 'ip6zone'], + [43, 8, 'ipcidr'], + [53, protocols_table_V, 'dns', true], + [54, protocols_table_V, 'dns4', true], + [55, protocols_table_V, 'dns6', true], + [56, protocols_table_V, 'dnsaddr', true], + [132, 16, 'sctp'], + [273, 16, 'udp'], + [275, 0, 'p2p-webrtc-star'], + [276, 0, 'p2p-webrtc-direct'], + [277, 0, 'p2p-stardust'], + [280, 0, 'webrtc'], + [281, 0, 'webrtc-w3c'], + [290, 0, 'p2p-circuit'], + [301, 0, 'udt'], + [302, 0, 'utp'], + [400, protocols_table_V, 'unix', false, true], + // `ipfs` is added before `p2p` for legacy support. + // All text representations will default to `p2p`, but `ipfs` will + // still be supported + [421, protocols_table_V, 'ipfs'], + // `p2p` is the preferred name for 421, and is now the default + [421, protocols_table_V, 'p2p'], + [443, 0, 'https'], + [444, 96, 'onion'], + [445, 296, 'onion3'], + [446, protocols_table_V, 'garlic64'], + [448, 0, 'tls'], + [449, protocols_table_V, 'sni'], + [460, 0, 'quic'], + [461, 0, 'quic-v1'], + [465, 0, 'webtransport'], + [466, protocols_table_V, 'certhash'], + [477, 0, 'ws'], + [478, 0, 'wss'], + [479, 0, 'p2p-websocket-star'], + [480, 0, 'http'], + [777, protocols_table_V, 'memory'] +]; +// populate tables +protocols_table_table.forEach(row => { + const proto = protocols_table_createProtocol(...row); + protocols_table_codes[proto.code] = proto; + protocols_table_names[proto.name] = proto; +}); +function protocols_table_createProtocol(code, size, name, resolvable, path) { return { - family: (codes[0] === 41 || codes[0] === 55) ? 6 : 4, - address: parts[1], - port: parseInt(parts[3]) // tcp or udp port + code, + size, + name, + resolvable: Boolean(resolvable), + path: Boolean(path) + }; +} +/** + * For the passed proto string or number, return a {@link Protocol} + * + * @example + * + * ```js + * import { protocol } from '@multiformats/multiaddr' + * + * console.info(protocol(4)) + * // { code: 4, size: 32, name: 'ip4', resolvable: false, path: false } + * ``` + */ +function src_protocols_table_getProtocol(proto) { + if (typeof proto === 'number') { + if (protocols_table_codes[proto] != null) { + return protocols_table_codes[proto]; + } + throw new Error(`no protocol with code: ${proto}`); + } + else if (typeof proto === 'string') { + if (protocols_table_names[proto] != null) { + return protocols_table_names[proto]; + } + throw new Error(`no protocol with name: ${proto}`); } + throw new Error(`invalid protocol id type: ${typeof proto}`); +} +//# sourceMappingURL=protocols-table.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/vendor/varint.js +var ipfs_core_utils_node_modules_multiformats_vendor_varint_encode_1 = ipfs_core_utils_node_modules_multiformats_vendor_varint_encode; + +var ipfs_core_utils_node_modules_multiformats_vendor_varint_MSB = 0x80 + , ipfs_core_utils_node_modules_multiformats_vendor_varint_REST = 0x7F + , ipfs_core_utils_node_modules_multiformats_vendor_varint_MSBALL = ~ipfs_core_utils_node_modules_multiformats_vendor_varint_REST + , ipfs_core_utils_node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31); + +function ipfs_core_utils_node_modules_multiformats_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + + while(num >= ipfs_core_utils_node_modules_multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | ipfs_core_utils_node_modules_multiformats_vendor_varint_MSB; + num /= 128; + } + while(num & ipfs_core_utils_node_modules_multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | ipfs_core_utils_node_modules_multiformats_vendor_varint_MSB; + num >>>= 7; } + out[offset] = num | 0; + + ipfs_core_utils_node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out +} - /** - * Returns if a Multiaddr is a Thin Waist address or not. - * - * Thin Waist is if a Multiaddr adheres to the standard combination of: - * - * `{IPv4, IPv6}/{TCP, UDP}` - * - * @example - * ```js - * const mh1 = new Multiaddr('/ip4/127.0.0.1/tcp/4001') - * // - * const mh2 = new Multiaddr('/ip4/192.168.2.1/tcp/5001') - * // - * const mh3 = mh1.encapsulate(mh2) - * // - * const mh4 = new Multiaddr('/ip4/127.0.0.1/tcp/2000/wss/p2p-webrtc-star/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSooo2a') - * // - * mh1.isThinWaistAddress() - * // true - * mh2.isThinWaistAddress() - * // true - * mh3.isThinWaistAddress() - * // false - * mh4.isThinWaistAddress() - * // false - * ``` - * - * @param {Multiaddr} [addr] - Defaults to using `this` instance - */ - isThinWaistAddress (addr) { - const protos = (addr || this).protos() +var ipfs_core_utils_node_modules_multiformats_vendor_varint_decode = ipfs_core_utils_node_modules_multiformats_vendor_varint_read; - if (protos.length !== 2) { - return false - } +var ipfs_core_utils_node_modules_multiformats_vendor_varint_MSB$1 = 0x80 + , ipfs_core_utils_node_modules_multiformats_vendor_varint_REST$1 = 0x7F; - if (protos[0].code !== 4 && protos[0].code !== 41) { - return false +function ipfs_core_utils_node_modules_multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; + + do { + if (counter >= l) { + ipfs_core_utils_node_modules_multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') } - if (protos[1].code !== 6 && protos[1].code !== 273) { + b = buf[counter++]; + res += shift < 28 + ? (b & ipfs_core_utils_node_modules_multiformats_vendor_varint_REST$1) << shift + : (b & ipfs_core_utils_node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= ipfs_core_utils_node_modules_multiformats_vendor_varint_MSB$1) + + ipfs_core_utils_node_modules_multiformats_vendor_varint_read.bytes = counter - offset; + + return res +} + +var ipfs_core_utils_node_modules_multiformats_vendor_varint_N1 = Math.pow(2, 7); +var ipfs_core_utils_node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14); +var ipfs_core_utils_node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21); +var ipfs_core_utils_node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28); +var ipfs_core_utils_node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35); +var ipfs_core_utils_node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42); +var ipfs_core_utils_node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49); +var ipfs_core_utils_node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56); +var ipfs_core_utils_node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63); + +var ipfs_core_utils_node_modules_multiformats_vendor_varint_length = function (value) { + return ( + value < ipfs_core_utils_node_modules_multiformats_vendor_varint_N1 ? 1 + : value < ipfs_core_utils_node_modules_multiformats_vendor_varint_N2 ? 2 + : value < ipfs_core_utils_node_modules_multiformats_vendor_varint_N3 ? 3 + : value < ipfs_core_utils_node_modules_multiformats_vendor_varint_N4 ? 4 + : value < ipfs_core_utils_node_modules_multiformats_vendor_varint_N5 ? 5 + : value < ipfs_core_utils_node_modules_multiformats_vendor_varint_N6 ? 6 + : value < ipfs_core_utils_node_modules_multiformats_vendor_varint_N7 ? 7 + : value < ipfs_core_utils_node_modules_multiformats_vendor_varint_N8 ? 8 + : value < ipfs_core_utils_node_modules_multiformats_vendor_varint_N9 ? 9 + : 10 + ) +}; + +var ipfs_core_utils_node_modules_multiformats_vendor_varint_varint = { + encode: ipfs_core_utils_node_modules_multiformats_vendor_varint_encode_1 + , decode: ipfs_core_utils_node_modules_multiformats_vendor_varint_decode + , encodingLength: ipfs_core_utils_node_modules_multiformats_vendor_varint_length +}; + +var ipfs_core_utils_node_modules_multiformats_vendor_varint_brrp_varint = ipfs_core_utils_node_modules_multiformats_vendor_varint_varint; + +/* harmony default export */ const ipfs_core_utils_node_modules_multiformats_vendor_varint = (ipfs_core_utils_node_modules_multiformats_vendor_varint_brrp_varint); + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/varint.js + + +/** + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} + */ +const ipfs_core_utils_node_modules_multiformats_src_varint_decode = (data, offset = 0) => { + const code = ipfs_core_utils_node_modules_multiformats_vendor_varint.decode(data, offset) + return [code, ipfs_core_utils_node_modules_multiformats_vendor_varint.decode.bytes] +} + +/** + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] + */ +const ipfs_core_utils_node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + ipfs_core_utils_node_modules_multiformats_vendor_varint.encode(int, target, offset) + return target +} + +/** + * @param {number} int + * @returns {number} + */ +const ipfs_core_utils_node_modules_multiformats_src_varint_encodingLength = (int) => { + return ipfs_core_utils_node_modules_multiformats_vendor_varint.encodingLength(int) +} + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bytes.js +const ipfs_core_utils_node_modules_multiformats_src_bytes_empty = new Uint8Array(0) + +/** + * @param {Uint8Array} d + */ +const ipfs_core_utils_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') + +/** + * @param {string} hex + */ +const ipfs_core_utils_node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : ipfs_core_utils_node_modules_multiformats_src_bytes_empty +} + +/** + * @param {Uint8Array} aa + * @param {Uint8Array} bb + */ +const ipfs_core_utils_node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false + } + + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { return false } + } + + return true +} + +/** + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} + */ +const ipfs_core_utils_node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) + } + throw new Error('Unknown type, must be binary type') +} + +/** + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} + */ +const ipfs_core_utils_node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) + +/** + * @param {string} str + * @returns {Uint8Array} + */ +const ipfs_core_utils_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) + +/** + * @param {Uint8Array} b + * @returns {string} + */ +const ipfs_core_utils_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) + + + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/hashes/digest.js + + + +/** + * Creates a multihash digest. + * + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest + */ +const ipfs_core_utils_node_modules_multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = ipfs_core_utils_node_modules_multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + ipfs_core_utils_node_modules_multiformats_src_varint_encodingLength(size) + + const bytes = new Uint8Array(digestOffset + size) + ipfs_core_utils_node_modules_multiformats_src_varint_encodeTo(code, bytes, 0) + ipfs_core_utils_node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) + + return new ipfs_core_utils_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} + +/** + * Turns bytes representation of multihash digest into an instance. + * + * @param {Uint8Array} multihash + * @returns {MultihashDigest} + */ +const ipfs_core_utils_node_modules_multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = ipfs_core_utils_node_modules_multiformats_src_bytes_coerce(multihash) + const [code, sizeOffset] = ipfs_core_utils_node_modules_multiformats_src_varint_decode(bytes) + const [size, digestOffset] = ipfs_core_utils_node_modules_multiformats_src_varint_decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) + + if (digest.byteLength !== size) { + throw new Error('Incorrect length') + } + + return new ipfs_core_utils_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} + +/** + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} + */ +const ipfs_core_utils_node_modules_multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) + + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + ipfs_core_utils_node_modules_multiformats_src_bytes_equals(a.bytes, data.bytes) + ) } +} + +/** + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest + */ +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + * + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} + */ +class ipfs_core_utils_node_modules_multiformats_src_hashes_digest_Digest { /** - * Creates a Multiaddr from a node-friendly address object - * - * @example - * ```js - * Multiaddr.fromNodeAddress({address: '127.0.0.1', port: '4001'}, 'tcp') - * // - * ``` + * Creates a multihash digest. * - * @param {{family: 4 | 6, address: string, port: number}} addr - * @param {string} transport + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes */ - static fromNodeAddress (addr, transport) { - if (!addr) { throw new Error('requires node address object') } - if (!transport) { throw new Error('requires transport protocol') } - let ip - switch (addr.family) { - case 4: - ip = 'ip4' - break - case 6: - ip = 'ip6' - break - default: - throw Error(`Invalid addr family. Got '${addr.family}' instead of 4 or 6`) + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes + } +} + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function ipfs_core_utils_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); } - return new Multiaddr('/' + [ip, addr.address, transport, addr.port].join('/')) + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str + } + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch + } + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode } +} +var ipfs_core_utils_node_modules_multiformats_vendor_base_x_src = ipfs_core_utils_node_modules_multiformats_vendor_base_x_base; + +var ipfs_core_utils_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = ipfs_core_utils_node_modules_multiformats_vendor_base_x_src; + +/* harmony default export */ const ipfs_core_utils_node_modules_multiformats_vendor_base_x = (ipfs_core_utils_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base.js + +// Linter can't see that API is used in types. +// eslint-disable-next-line + + +/** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} + */ +class ipfs_core_utils_node_modules_multiformats_src_bases_base_Encoder { /** - * Returns if something is a Multiaddr that is a name - * - * @param {Multiaddr} addr - * @returns {boolean} isName + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode */ - static isName (addr) { - if (!Multiaddr.isMultiaddr(addr)) { - return false - } + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + } - // if a part of the multiaddr is resolvable, then return true - return addr.protos().some((proto) => proto.resolvable) + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') + } } +} +/** + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} + */ +class ipfs_core_utils_node_modules_multiformats_src_bases_base_Decoder { /** - * Check if object is a CID instance - * - * @param {any} value - * @returns {value is Multiaddr} + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode */ - static isMultiaddr (value) { - return value instanceof Multiaddr || Boolean(value && value[symbol]) + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') + } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode } /** - * Returns Multiaddr as a human-readable string. - * For post Node.js v10.0.0. - * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect - * - * @example - * ```js - * console.log(new Multiaddr('/ip4/127.0.0.1/tcp/4001')) - * // '' - * ``` - * - * @returns {string} + * @param {string} text */ - [inspect] () { - return '' + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) + } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') + } } /** - * Returns Multiaddr as a human-readable string. - * Fallback for pre Node.js v10.0.0. - * https://nodejs.org/api/deprecations.html#deprecations_dep0079_custom_inspection_function_on_objects_via_inspect - * - * @example - * ```js - * new Multiaddr('/ip4/127.0.0.1/tcp/4001').inspect() - * // '' - * ``` - * - * @returns {string} + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} */ - inspect () { - return '' + or (decoder) { + return ipfs_core_utils_node_modules_multiformats_src_bases_base_or(this, decoder) } } /** - * Object containing table, names and codes of all supported protocols. - * To get the protocol values from a Multiaddr, you can use - * [`.protos()`](#multiaddrprotos), - * [`.protoCodes()`](#multiaddrprotocodes) or - * [`.protoNames()`](#multiaddrprotonames) - * - * @returns {{table: Array, names: Object, codes: Object}} + * @template {string} Prefix + * @typedef {Record>} Decoders */ -Multiaddr.protocols = protocols - -Multiaddr.resolvers = resolvers /** - * Static factory - * - * @param {MultiaddrInput} addr + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} */ -function multiaddr (addr) { - return new Multiaddr(addr) -} - -module.exports = { Multiaddr, multiaddr, protocols, resolvers } - +class ipfs_core_utils_node_modules_multiformats_src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders + } -/***/ }), + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return ipfs_core_utils_node_modules_multiformats_src_bases_base_or(this, decoder) + } -/***/ 95416: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) + } + } +} -"use strict"; +/** + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} + */ +const ipfs_core_utils_node_modules_multiformats_src_bases_base_or = (left, right) => new ipfs_core_utils_node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) +/** + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} + */ +class ipfs_core_utils_node_modules_multiformats_src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new ipfs_core_utils_node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new ipfs_core_utils_node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode) + } -const isIp = __nccwpck_require__(89837) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) + } -const isIP = isIp -const isV4 = isIp.v4 -const isV6 = isIp.v6 + /** + * @param {string} input + */ + decode (input) { + return this.decoder.decode(input) + } +} -// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L7 -// @ts-ignore - this is copied from the link above better to keep it the same -const toBytes = function (ip, buff, offset) { - offset = ~~offset +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} + */ +const ipfs_core_utils_node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new ipfs_core_utils_node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode) - let result +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} + */ +const ipfs_core_utils_node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = ipfs_core_utils_node_modules_multiformats_vendor_base_x(alphabet, name) + return ipfs_core_utils_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => ipfs_core_utils_node_modules_multiformats_src_bytes_coerce(decode(text)) + }) +} - if (isV4(ip)) { - result = buff || new Uint8Array(offset + 4) - // @ts-ignore - // eslint-disable-next-line array-callback-return - ip.split(/\./g).map(function (byte) { - result[offset++] = parseInt(byte, 10) & 0xff - }) - } else if (isV6(ip)) { - const sections = ip.split(':', 8) +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const ipfs_core_utils_node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i + } - let i - for (i = 0; i < sections.length; i++) { - const isv4 = isV4(sections[i]) - let v4Buffer + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end + } - if (isv4) { - v4Buffer = toBytes(sections[i]) - sections[i] = uint8ArrayToString(v4Buffer.slice(0, 2), 'base16') - } + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) - if (v4Buffer && ++i < 8) { - sections.splice(i, 0, uint8ArrayToString(v4Buffer.slice(2, 4), 'base16')) - } + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) } - if (sections[0] === '') { - while (sections.length < 8) sections.unshift('0') - } else if (sections[sections.length - 1] === '') { - while (sections.length < 8) sections.push('0') - } else if (sections.length < 8) { - for (i = 0; i < sections.length && sections[i] !== ''; i++); - const argv = [i, '1'] - for (i = 9 - sections.length; i > 0; i--) { - argv.push('0') - } - sections.splice.apply(sections, argv) - } + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar - result = buff || new Uint8Array(offset + 16) - for (i = 0; i < sections.length; i++) { - const word = parseInt(sections[i], 16) - result[offset++] = (word >> 8) & 0xff - result[offset++] = word & 0xff + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) } } - if (!result) { - throw Error('Invalid ip address: ' + ip) + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') } - return result + return out } -// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63 -// @ts-ignore - this is copied from the link above better to keep it the same -const toString = function (buff, offset, length) { - offset = ~~offset - length = length || (buff.length - offset) +/** + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} + */ +const ipfs_core_utils_node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' - const result = [] - let string - const view = new DataView(buff.buffer) - if (length === 4) { - // IPv4 - for (let i = 0; i < length; i++) { - result.push(buff[offset + i]) + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 + + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] } - string = result.join('.') - } else if (length === 16) { - // IPv6 - for (let i = 0; i < length; i += 2) { - result.push(view.getUint16(offset + i).toString(16)) + } + + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] + } + + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' } - string = result.join(':') - string = string.replace(/(^|:)0(:0)*:0(:|$)/, '$1::$3') - string = string.replace(/:{3,4}/, '::') } - return string + return out } -module.exports = { - isIP, - isV4, - isV6, - toBytes, - toString +/** + * RFC4648 Factory + * + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar + */ +const ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return ipfs_core_utils_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return ipfs_core_utils_node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return ipfs_core_utils_node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) + } + }) } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base58.js -/***/ }), -/***/ 17046: -/***/ ((module) => { +const ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc = ipfs_core_utils_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) -"use strict"; +const ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58flickr = ipfs_core_utils_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) -/** @typedef {import("./types").Protocol} Protocol */ +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base32.js -/** - * Protocols - * - * @param {number | string} proto - * @returns {Protocol} - */ -function Protocols (proto) { - if (typeof (proto) === 'number') { - if (Protocols.codes[proto]) { - return Protocols.codes[proto] - } - throw new Error('no protocol with code: ' + proto) - } else if (typeof (proto) === 'string') { - if (Protocols.names[proto]) { - return Protocols.names[proto] - } +const ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32 = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) - throw new Error('no protocol with name: ' + proto) - } +const ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32upper = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) - throw new Error('invalid protocol id type: ' + proto) -} +const ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32pad = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) -const V = -1 -Protocols.lengthPrefixedVarSize = V -Protocols.V = V +const ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32padupper = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) -/** @type {Array<[number, number, string, (string|boolean)?, string?]>} */ -Protocols.table = [ - [4, 32, 'ip4'], - [6, 16, 'tcp'], - [33, 16, 'dccp'], - [41, 128, 'ip6'], - [42, V, 'ip6zone'], - [53, V, 'dns', 'resolvable'], - [54, V, 'dns4', 'resolvable'], - [55, V, 'dns6', 'resolvable'], - [56, V, 'dnsaddr', 'resolvable'], - [132, 16, 'sctp'], - [273, 16, 'udp'], - [275, 0, 'p2p-webrtc-star'], - [276, 0, 'p2p-webrtc-direct'], - [277, 0, 'p2p-stardust'], - [290, 0, 'p2p-circuit'], - [301, 0, 'udt'], - [302, 0, 'utp'], - [400, V, 'unix', false, 'path'], - // `ipfs` is added before `p2p` for legacy support. - // All text representations will default to `p2p`, but `ipfs` will - // still be supported - [421, V, 'ipfs'], - // `p2p` is the preferred name for 421, and is now the default - [421, V, 'p2p'], - [443, 0, 'https'], - [444, 96, 'onion'], - [445, 296, 'onion3'], - [446, V, 'garlic64'], - [460, 0, 'quic'], - [477, 0, 'ws'], - [478, 0, 'wss'], - [479, 0, 'p2p-websocket-star'], - [480, 0, 'http'], - [777, V, 'memory'] -] -/** @type {Record} */ -Protocols.names = {} -/** @type {Record} */ -Protocols.codes = {} +const ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32hex = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) -// populate tables -Protocols.table.map(row => { - const proto = p.apply(null, row) - Protocols.codes[proto.code] = proto - Protocols.names[proto.name] = proto - return null +const ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32hexupper = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 }) -Protocols.object = p +const ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32hexpad = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) -/** - * - * Create a protocol - * - * @param {number} code - * @param {number} size - * @param {string} name - * @param {any} [resolvable] - * @param {any} [path] - * @returns {Protocol} - */ -function p (code, size, name, resolvable, path) { - return { - code, - size, - name, - resolvable: Boolean(resolvable), - path: Boolean(path) - } -} +const ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32hexpadupper = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) -module.exports = Protocols +const ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32z = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/cid.js -/***/ }), -/***/ 76975: -/***/ ((module) => { -module.exports = read -var MSB = 0x80 - , REST = 0x7F -function read(buf, offset) { - var res = 0 - , offset = offset || 0 - , shift = 0 - , counter = offset - , b - , l = buf.length +// Linter can see that API is used in types. +// eslint-disable-next-line - do { - if (counter >= l || shift > 49) { - read.bytes = 0 - throw new RangeError('Could not decode varint') - } - b = buf[counter++] - res += shift < 28 - ? (b & REST) << shift - : (b & REST) * Math.pow(2, shift) - shift += 7 - } while (b >= MSB) - read.bytes = counter - offset +// This way TS will also expose all the types from module - return res + +/** + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} + */ +const ipfs_core_utils_node_modules_multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return ipfs_core_utils_node_modules_multiformats_src_cid_toStringV0( + bytes, + ipfs_core_utils_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc.encoder + ) + default: + return ipfs_core_utils_node_modules_multiformats_src_cid_toStringV1( + bytes, + ipfs_core_utils_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32.encoder) + ) + } } +/** + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} + */ +const ipfs_core_utils_node_modules_multiformats_src_cid_toJSON = (link) => ({ + '/': ipfs_core_utils_node_modules_multiformats_src_cid_format(link) +}) -/***/ }), +/** + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json + */ +const ipfs_core_utils_node_modules_multiformats_src_cid_fromJSON = (json) => + ipfs_core_utils_node_modules_multiformats_src_cid_CID.parse(json['/']) -/***/ 32291: -/***/ ((module) => { +/** @type {WeakMap>} */ +const ipfs_core_utils_node_modules_multiformats_src_cid_cache = new WeakMap() -module.exports = encode +/** + * @param {API.UnknownLink} cid + * @returns {Map} + */ +const ipfs_core_utils_node_modules_multiformats_src_cid_baseCache = cid => { + const baseCache = ipfs_core_utils_node_modules_multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + ipfs_core_utils_node_modules_multiformats_src_cid_cache.set(cid, baseCache) + return baseCache + } + return baseCache +} -var MSB = 0x80 - , REST = 0x7F - , MSBALL = ~REST - , INT = Math.pow(2, 31) +/** + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} + */ -function encode(num, out, offset) { - if (Number.MAX_SAFE_INTEGER && num > Number.MAX_SAFE_INTEGER) { - encode.bytes = 0 - throw new RangeError('Could not encode varint') - } - out = out || [] - offset = offset || 0 - var oldOffset = offset +class ipfs_core_utils_node_modules_multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + * + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes - while(num >= INT) { - out[offset++] = (num & 0xFF) | MSB - num /= 128 - } - while(num & MSBALL) { - out[offset++] = (num & 0xFF) | MSB - num >>>= 7 + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes } - out[offset] = num | 0 - - encode.bytes = offset - oldOffset + 1 - - return out -} + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this + } -/***/ }), + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset + } -/***/ 52865: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } -module.exports = { - encode: __nccwpck_require__(32291) - , decode: __nccwpck_require__(76975) - , encodingLength: __nccwpck_require__(52845) -} + /** + * @returns {CID} + */ + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) + } + case 1: { + const { code, multihash } = this + if (code !== ipfs_core_utils_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } -/***/ }), + // sha2-256 + if (multihash.code !== ipfs_core_utils_node_modules_multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') + } -/***/ 52845: -/***/ ((module) => { + return /** @type {CID} */ ( + ipfs_core_utils_node_modules_multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) + } + } + } + /** + * @returns {CID} + */ + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = ipfs_core_utils_node_modules_multiformats_src_hashes_digest_create(code, digest) + return /** @type {CID} */ ( + ipfs_core_utils_node_modules_multiformats_src_cid_CID.createV1(this.code, multihash) + ) + } + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) + } + } + } -var N1 = Math.pow(2, 7) -var N2 = Math.pow(2, 14) -var N3 = Math.pow(2, 21) -var N4 = Math.pow(2, 28) -var N5 = Math.pow(2, 35) -var N6 = Math.pow(2, 42) -var N7 = Math.pow(2, 49) -var N8 = Math.pow(2, 56) -var N9 = Math.pow(2, 63) + /** + * @param {unknown} other + * @returns {other is CID} + */ + equals (other) { + return ipfs_core_utils_node_modules_multiformats_src_cid_CID.equals(this, other) + } -module.exports = function (value) { - return ( - value < N1 ? 1 - : value < N2 ? 2 - : value < N3 ? 3 - : value < N4 ? 4 - : value < N5 ? 5 - : value < N6 ? 6 - : value < N7 ? 7 - : value < N8 ? 8 - : value < N9 ? 9 - : 10 - ) -} + /** + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} + */ + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + ipfs_core_utils_node_modules_multiformats_src_hashes_digest_equals(self.multihash, unknown.multihash) + ) + } + /** + * @param {API.MultibaseEncoder} [base] + * @returns {string} + */ + toString (base) { + return ipfs_core_utils_node_modules_multiformats_src_cid_format(this, base) + } -/***/ }), + toJSON () { + return { '/': ipfs_core_utils_node_modules_multiformats_src_cid_format(this) } + } -/***/ 16924: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + link () { + return this + } -"use strict"; + get [Symbol.toStringTag] () { + return 'CID' + } + // Legacy -Object.defineProperty(exports, "__esModule", ({ value: true })); + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` + } -var baseX$1 = __nccwpck_require__(21357); -var bytes = __nccwpck_require__(16570); + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} + */ + static asCID (input) { + if (input == null) { + return null + } -class Encoder { - constructor(name, prefix, baseEncode) { - this.name = name; - this.prefix = prefix; - this.baseEncode = baseEncode; - } - encode(bytes) { - if (bytes instanceof Uint8Array) { - return `${ this.prefix }${ this.baseEncode(bytes) }`; + const value = /** @type {any} */ (input) + if (value instanceof ipfs_core_utils_node_modules_multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new ipfs_core_utils_node_modules_multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || ipfs_core_utils_node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[ipfs_core_utils_node_modules_multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (ipfs_core_utils_node_modules_multiformats_src_hashes_digest_decode(multihash)) + return ipfs_core_utils_node_modules_multiformats_src_cid_CID.create(version, code, digest) } else { - throw Error('Unknown type, must be binary type'); + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null } } -} -class Decoder { - constructor(name, prefix, baseDecode) { - this.name = name; - this.prefix = prefix; - if (prefix.codePointAt(0) === undefined) { - throw new Error('Invalid prefix character'); + + /** + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} + */ + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') } - this.prefixCodePoint = prefix.codePointAt(0); - this.baseDecode = baseDecode; - } - decode(text) { - if (typeof text === 'string') { - if (text.codePointAt(0) !== this.prefixCodePoint) { - throw Error(`Unable to decode multibase string ${ JSON.stringify(text) }, ${ this.name } decoder only supports inputs prefixed with ${ this.prefix }`); + + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } + + switch (version) { + case 0: { + if (code !== ipfs_core_utils_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${ipfs_core_utils_node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new ipfs_core_utils_node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes) + } + } + case 1: { + const bytes = ipfs_core_utils_node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new ipfs_core_utils_node_modules_multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') } - return this.baseDecode(text.slice(this.prefix.length)); - } else { - throw Error('Can only multibase decode strings'); } } - or(decoder) { - return or(this, decoder); - } -} -class ComposedDecoder { - constructor(decoders) { - this.decoders = decoders; + + /** + * Simplified version of `create` for CIDv0. + * + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} + */ + static createV0 (digest) { + return ipfs_core_utils_node_modules_multiformats_src_cid_CID.create(0, ipfs_core_utils_node_modules_multiformats_src_cid_DAG_PB_CODE, digest) } - or(decoder) { - return or(this, decoder); + + /** + * Simplified version of `create` for CIDv1. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} + */ + static createV1 (code, digest) { + return ipfs_core_utils_node_modules_multiformats_src_cid_CID.create(1, code, digest) } - decode(input) { - const prefix = input[0]; - const decoder = this.decoders[prefix]; - if (decoder) { - return decoder.decode(input); - } else { - throw RangeError(`Unable to decode multibase string ${ JSON.stringify(input) }, only inputs prefixed with ${ Object.keys(this.decoders) } are supported`); + + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} + */ + static decode (bytes) { + const [cid, remainder] = ipfs_core_utils_node_modules_multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') } + return cid } -} -const or = (left, right) => new ComposedDecoder({ - ...left.decoders || { [left.prefix]: left }, - ...right.decoders || { [right.prefix]: right } -}); -class Codec { - constructor(name, prefix, baseEncode, baseDecode) { - this.name = name; - this.prefix = prefix; - this.baseEncode = baseEncode; - this.baseDecode = baseDecode; - this.encoder = new Encoder(name, prefix, baseEncode); - this.decoder = new Decoder(name, prefix, baseDecode); + + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} + */ + static decodeFirst (bytes) { + const specs = ipfs_core_utils_node_modules_multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = ipfs_core_utils_node_modules_multiformats_src_bytes_coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') + } + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new ipfs_core_utils_node_modules_multiformats_src_hashes_digest_Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? ipfs_core_utils_node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : ipfs_core_utils_node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] } - encode(input) { - return this.encoder.encode(input); + + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} + */ + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = ipfs_core_utils_node_modules_multiformats_src_varint_decode(initialBytes.subarray(offset)) + offset += length + return i + } + + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (ipfs_core_utils_node_modules_multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 + } else { + codec = /** @type {C} */ (next()) + } + + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } + + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize + + return { version, codec, multihashCode, digestSize, multihashSize, size } } - decode(input) { - return this.decoder.decode(input); + + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + * + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} + */ + static parse (source, base) { + const [prefix, bytes] = ipfs_core_utils_node_modules_multiformats_src_cid_parseCIDtoBytes(source, base) + + const cid = ipfs_core_utils_node_modules_multiformats_src_cid_CID.decode(bytes) + + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') + } + + // Cache string representation to avoid computing it on `this.toString()` + ipfs_core_utils_node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source) + + return cid } } -const from = ({name, prefix, encode, decode}) => new Codec(name, prefix, encode, decode); -const baseX = ({prefix, name, alphabet}) => { - const {encode, decode} = baseX$1(alphabet, name); - return from({ - prefix, - name, - encode, - decode: text => bytes.coerce(decode(text)) - }); -}; -const decode = (string, alphabet, bitsPerChar, name) => { - const codes = {}; - for (let i = 0; i < alphabet.length; ++i) { - codes[alphabet[i]] = i; - } - let end = string.length; - while (string[end - 1] === '=') { - --end; - } - const out = new Uint8Array(end * bitsPerChar / 8 | 0); - let bits = 0; - let buffer = 0; - let written = 0; - for (let i = 0; i < end; ++i) { - const value = codes[string[i]]; - if (value === undefined) { - throw new SyntaxError(`Non-${ name } character`); + +/** + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} + */ +const ipfs_core_utils_node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc + return [ + /** @type {Prefix} */ (ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc.prefix), + decoder.decode(`${ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc.prefix}${source}`) + ] } - buffer = buffer << bitsPerChar | value; - bits += bitsPerChar; - if (bits >= 8) { - bits -= 8; - out[written++] = 255 & buffer >> bits; + case ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc.prefix: { + const decoder = base || ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc + return [/** @type {Prefix} */(ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc.prefix), decoder.decode(source)] } - } - if (bits >= bitsPerChar || 255 & buffer << 8 - bits) { - throw new SyntaxError('Unexpected end of data'); - } - return out; -}; -const encode = (data, alphabet, bitsPerChar) => { - const pad = alphabet[alphabet.length - 1] === '='; - const mask = (1 << bitsPerChar) - 1; - let out = ''; - let bits = 0; - let buffer = 0; - for (let i = 0; i < data.length; ++i) { - buffer = buffer << 8 | data[i]; - bits += 8; - while (bits > bitsPerChar) { - bits -= bitsPerChar; - out += alphabet[mask & buffer >> bits]; + case ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32.prefix: { + const decoder = base || ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32 + return [/** @type {Prefix} */(ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) + } + return [/** @type {Prefix} */(source[0]), base.decode(source)] } } - if (bits) { - out += alphabet[mask & buffer << bitsPerChar - bits]; +} + +/** + * + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base + */ +const ipfs_core_utils_node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) } - if (pad) { - while (out.length * bitsPerChar & 7) { - out += '='; - } + + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid } - return out; -}; -const rfc4648 = ({name, prefix, bitsPerChar, alphabet}) => { - return from({ - prefix, - name, - encode(input) { - return encode(input, alphabet, bitsPerChar); - }, - decode(input) { - return decode(input, alphabet, bitsPerChar, name); - } - }); -}; +} -exports.Codec = Codec; -exports.baseX = baseX; -exports.from = from; -exports.or = or; -exports.rfc4648 = rfc4648; +/** + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base + */ +const ipfs_core_utils_node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} +const ipfs_core_utils_node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70 +const ipfs_core_utils_node_modules_multiformats_src_cid_SHA_256_CODE = 0x12 -/***/ }), +/** + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} + */ +const ipfs_core_utils_node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = ipfs_core_utils_node_modules_multiformats_src_varint_encodingLength(version) + const hashOffset = codeOffset + ipfs_core_utils_node_modules_multiformats_src_varint_encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + ipfs_core_utils_node_modules_multiformats_src_varint_encodeTo(version, bytes, 0) + ipfs_core_utils_node_modules_multiformats_src_varint_encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes +} -/***/ 86007: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const ipfs_core_utils_node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') -"use strict"; +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/identity.js +// @ts-check -Object.defineProperty(exports, "__esModule", ({ value: true })); -var base = __nccwpck_require__(16924); -const base10 = base.baseX({ - prefix: '9', - name: 'base10', - alphabet: '0123456789' -}); +const node_modules_multiformats_src_bases_identity_identity = ipfs_core_utils_node_modules_multiformats_src_bases_base_from({ + prefix: '\x00', + name: 'identity', + encode: (buf) => ipfs_core_utils_node_modules_multiformats_src_bytes_toString(buf), + decode: (str) => ipfs_core_utils_node_modules_multiformats_src_bytes_fromString(str) +}) -exports.base10 = base10; +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base2.js +// @ts-check -/***/ }), -/***/ 98085: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const src_bases_base2_base2 = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}) -"use strict"; +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base8.js +// @ts-check -Object.defineProperty(exports, "__esModule", ({ value: true })); -var base = __nccwpck_require__(16924); +const src_bases_base8_base8 = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}) -const base16 = base.rfc4648({ +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base10.js + + +const src_bases_base10_base10 = ipfs_core_utils_node_modules_multiformats_src_bases_base_baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}) + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base16.js +// @ts-check + + + +const src_bases_base16_base16 = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ prefix: 'f', name: 'base16', alphabet: '0123456789abcdef', bitsPerChar: 4 -}); -const base16upper = base.rfc4648({ +}) + +const src_bases_base16_base16upper = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ prefix: 'F', name: 'base16upper', alphabet: '0123456789ABCDEF', bitsPerChar: 4 -}); - -exports.base16 = base16; -exports.base16upper = base16upper; - - -/***/ }), +}) -/***/ 16721: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base36.js -"use strict"; +const src_bases_base36_base36 = ipfs_core_utils_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}) -Object.defineProperty(exports, "__esModule", ({ value: true })); +const src_bases_base36_base36upper = ipfs_core_utils_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}) -var base = __nccwpck_require__(16924); +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base64.js +// @ts-check -const base2 = base.rfc4648({ - prefix: '0', - name: 'base2', - alphabet: '01', - bitsPerChar: 1 -}); -exports.base2 = base2; +const node_modules_multiformats_src_bases_base64_base64 = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) -/***/ }), +const node_modules_multiformats_src_bases_base64_base64pad = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) -/***/ 40411: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const node_modules_multiformats_src_bases_base64_base64url = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) -"use strict"; +const node_modules_multiformats_src_bases_base64_base64urlpad = ipfs_core_utils_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/bases/base256emoji.js -Object.defineProperty(exports, "__esModule", ({ value: true })); -var base = __nccwpck_require__(16924); +const src_bases_base256emoji_alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂') +const src_bases_base256emoji_alphabetBytesToChars = /** @type {string[]} */ (src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[i] = c; return p }, /** @type {string[]} */([]))) +const src_bases_base256emoji_alphabetCharsToBytes = /** @type {number[]} */ (src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[/** @type {number} */ (c.codePointAt(0))] = i; return p }, /** @type {number[]} */([]))) -const alphabet = Array.from('\uD83D\uDE80\uD83E\uDE90\u2604\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09\u2600\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02\u2764\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09\u263A\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E\u270C\u2728\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D\u2763\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33\u270B\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13\u2B50\u2705\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6\u2714\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90\u2639\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20\u261D\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B\u26BD\uD83E\uDD19\u2615\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81\u26A1\uD83C\uDF1E\uD83C\uDF88\u274C\u270A\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C\u2708\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74\u25B6\u27A1\u2753\uD83D\uDC8E\uD83D\uDCB8\u2B07\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A\u26A0\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37\u260E\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51\u2744\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42'); -const alphabetBytesToChars = alphabet.reduce((p, c, i) => { - p[i] = c; - return p; -}, []); -const alphabetCharsToBytes = alphabet.reduce((p, c, i) => { - p[c.codePointAt(0)] = i; - return p; -}, []); -function encode(data) { +/** + * @param {Uint8Array} data + * @returns {string} + */ +function multiformats_src_bases_base256emoji_encode (data) { return data.reduce((p, c) => { - p += alphabetBytesToChars[c]; - return p; - }, ''); + p += src_bases_base256emoji_alphabetBytesToChars[c] + return p + }, '') } -function decode(str) { - const byts = []; + +/** + * @param {string} str + * @returns {Uint8Array} + */ +function multiformats_src_bases_base256emoji_decode (str) { + const byts = [] for (const char of str) { - const byt = alphabetCharsToBytes[char.codePointAt(0)]; + const byt = src_bases_base256emoji_alphabetCharsToBytes[/** @type {number} */ (char.codePointAt(0))] if (byt === undefined) { - throw new Error(`Non-base256emoji character: ${ char }`); + throw new Error(`Non-base256emoji character: ${char}`) } - byts.push(byt); + byts.push(byt) } - return new Uint8Array(byts); + return new Uint8Array(byts) } -const base256emoji = base.from({ - prefix: '\uD83D\uDE80', + +const src_bases_base256emoji_base256emoji = ipfs_core_utils_node_modules_multiformats_src_bases_base_from({ + prefix: '🚀', name: 'base256emoji', - encode, - decode -}); + encode: multiformats_src_bases_base256emoji_encode, + decode: multiformats_src_bases_base256emoji_decode +}) -exports.base256emoji = base256emoji; +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/hashes/hasher.js -/***/ }), +/** + * @template {string} Name + * @template {number} Code + * @param {object} options + * @param {Name} options.name + * @param {Code} options.code + * @param {(input: Uint8Array) => Await} options.encode + */ +const node_modules_multiformats_src_hashes_hasher_from = ({ name, code, encode }) => new multiformats_src_hashes_hasher_Hasher(name, code, encode) -/***/ 70784: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/** + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. + * + * @template {string} Name + * @template {number} Code + * @class + * @implements {MultihashHasher} + */ +class multiformats_src_hashes_hasher_Hasher { + /** + * + * @param {Name} name + * @param {Code} code + * @param {(input: Uint8Array) => Await} encode + */ + constructor (name, code, encode) { + this.name = name + this.code = code + this.encode = encode + } -"use strict"; + /** + * @param {Uint8Array} input + * @returns {Await>} + */ + digest (input) { + if (input instanceof Uint8Array) { + const result = this.encode(input) + return result instanceof Uint8Array + ? ipfs_core_utils_node_modules_multiformats_src_hashes_digest_create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => ipfs_core_utils_node_modules_multiformats_src_hashes_digest_create(this.code, digest)) + } else { + throw Error('Unknown type, must be binary type') + /* c8 ignore next 1 */ + } + } +} +/** + * @template {number} Alg + * @typedef {import('./interface.js').MultihashHasher} MultihashHasher + */ -Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * @template T + * @typedef {Promise|T} Await + */ -var base = __nccwpck_require__(16924); +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/hashes/sha2.js +// @ts-check -const base32 = base.rfc4648({ - prefix: 'b', - name: 'base32', - alphabet: 'abcdefghijklmnopqrstuvwxyz234567', - bitsPerChar: 5 -}); -const base32upper = base.rfc4648({ - prefix: 'B', - name: 'base32upper', - alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', - bitsPerChar: 5 -}); -const base32pad = base.rfc4648({ - prefix: 'c', - name: 'base32pad', - alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', - bitsPerChar: 5 -}); -const base32padupper = base.rfc4648({ - prefix: 'C', - name: 'base32padupper', - alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', - bitsPerChar: 5 -}); -const base32hex = base.rfc4648({ - prefix: 'v', - name: 'base32hex', - alphabet: '0123456789abcdefghijklmnopqrstuv', - bitsPerChar: 5 -}); -const base32hexupper = base.rfc4648({ - prefix: 'V', - name: 'base32hexupper', - alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', - bitsPerChar: 5 -}); -const base32hexpad = base.rfc4648({ - prefix: 't', - name: 'base32hexpad', - alphabet: '0123456789abcdefghijklmnopqrstuv=', - bitsPerChar: 5 -}); -const base32hexpadupper = base.rfc4648({ - prefix: 'T', - name: 'base32hexpadupper', - alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', - bitsPerChar: 5 -}); -const base32z = base.rfc4648({ - prefix: 'h', - name: 'base32z', - alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', - bitsPerChar: 5 -}); -exports.base32 = base32; -exports.base32hex = base32hex; -exports.base32hexpad = base32hexpad; -exports.base32hexpadupper = base32hexpadupper; -exports.base32hexupper = base32hexupper; -exports.base32pad = base32pad; -exports.base32padupper = base32padupper; -exports.base32upper = base32upper; -exports.base32z = base32z; -/***/ }), -/***/ 76443: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const multiformats_src_hashes_sha2_sha256 = node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-256', + code: 0x12, + encode: (input) => ipfs_core_utils_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha256').update(input).digest()) +}) -"use strict"; +const src_hashes_sha2_sha512 = node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-512', + code: 0x13, + encode: input => ipfs_core_utils_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha512').update(input).digest()) +}) +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/hashes/identity.js -Object.defineProperty(exports, "__esModule", ({ value: true })); -var base = __nccwpck_require__(16924); -const base36 = base.baseX({ - prefix: 'k', - name: 'base36', - alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' -}); -const base36upper = base.baseX({ - prefix: 'K', - name: 'base36upper', - alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' -}); +const multiformats_src_hashes_identity_code = 0x0 +const multiformats_src_hashes_identity_name = 'identity' + +/** @type {(input:Uint8Array) => Uint8Array} */ +const multiformats_src_hashes_identity_encode = ipfs_core_utils_node_modules_multiformats_src_bytes_coerce + +/** + * @param {Uint8Array} input + * @returns {Digest.Digest} + */ +const src_hashes_identity_digest = (input) => ipfs_core_utils_node_modules_multiformats_src_hashes_digest_create(multiformats_src_hashes_identity_code, multiformats_src_hashes_identity_encode(input)) + +const multiformats_src_hashes_identity_identity = { code: multiformats_src_hashes_identity_code, name: multiformats_src_hashes_identity_name, encode: multiformats_src_hashes_identity_encode, digest: src_hashes_identity_digest } + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/codecs/raw.js +// @ts-check + + + +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ + +const multiformats_src_codecs_raw_name = 'raw' +const multiformats_src_codecs_raw_code = 0x55 + +/** + * @param {Uint8Array} node + * @returns {ByteView} + */ +const multiformats_src_codecs_raw_encode = (node) => ipfs_core_utils_node_modules_multiformats_src_bytes_coerce(node) + +/** + * @param {ByteView} data + * @returns {Uint8Array} + */ +const multiformats_src_codecs_raw_decode = (data) => ipfs_core_utils_node_modules_multiformats_src_bytes_coerce(data) + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/codecs/json.js +// @ts-check + +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ + +const multiformats_src_codecs_json_textEncoder = new TextEncoder() +const multiformats_src_codecs_json_textDecoder = new TextDecoder() -exports.base36 = base36; -exports.base36upper = base36upper; +const multiformats_src_codecs_json_name = 'json' +const multiformats_src_codecs_json_code = 0x0200 +/** + * @template T + * @param {T} node + * @returns {ByteView} + */ +const multiformats_src_codecs_json_encode = (node) => multiformats_src_codecs_json_textEncoder.encode(JSON.stringify(node)) -/***/ }), +/** + * @template T + * @param {ByteView} data + * @returns {T} + */ +const multiformats_src_codecs_json_decode = (data) => JSON.parse(multiformats_src_codecs_json_textDecoder.decode(data)) -/***/ 49108: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/index.js -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var base = __nccwpck_require__(16924); -const base58btc = base.baseX({ - name: 'base58btc', - prefix: 'z', - alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' -}); -const base58flickr = base.baseX({ - name: 'base58flickr', - prefix: 'Z', - alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' -}); +// This way TS will also expose all the types from module -exports.base58btc = base58btc; -exports.base58flickr = base58flickr; -/***/ }), -/***/ 98197: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/multiformats/src/basics.js +// @ts-check -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var base = __nccwpck_require__(16924); -const base64 = base.rfc4648({ - prefix: 'm', - name: 'base64', - alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', - bitsPerChar: 6 -}); -const base64pad = base.rfc4648({ - prefix: 'M', - name: 'base64pad', - alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', - bitsPerChar: 6 -}); -const base64url = base.rfc4648({ - prefix: 'u', - name: 'base64url', - alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', - bitsPerChar: 6 -}); -const base64urlpad = base.rfc4648({ - prefix: 'U', - name: 'base64urlpad', - alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', - bitsPerChar: 6 -}); -exports.base64 = base64; -exports.base64pad = base64pad; -exports.base64url = base64url; -exports.base64urlpad = base64urlpad; -/***/ }), -/***/ 3529: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var base = __nccwpck_require__(16924); -const base8 = base.rfc4648({ - prefix: '7', - name: 'base8', - alphabet: '01234567', - bitsPerChar: 3 -}); -exports.base8 = base8; -/***/ }), -/***/ 28380: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +const multiformats_src_basics_bases = { ...node_modules_multiformats_src_bases_identity_namespaceObject, ...multiformats_src_bases_base2_namespaceObject, ...multiformats_src_bases_base8_namespaceObject, ...multiformats_src_bases_base10_namespaceObject, ...multiformats_src_bases_base16_namespaceObject, ...ipfs_core_utils_node_modules_multiformats_src_bases_base32_namespaceObject, ...multiformats_src_bases_base36_namespaceObject, ...ipfs_core_utils_node_modules_multiformats_src_bases_base58_namespaceObject, ...node_modules_multiformats_src_bases_base64_namespaceObject, ...multiformats_src_bases_base256emoji_namespaceObject } +const multiformats_src_basics_hashes = { ...multiformats_src_hashes_sha2_namespaceObject, ...multiformats_src_hashes_identity_namespaceObject } +const multiformats_src_basics_codecs = { raw: multiformats_src_codecs_raw_namespaceObject, json: node_modules_multiformats_src_codecs_json_namespaceObject } -Object.defineProperty(exports, "__esModule", ({ value: true })); -var base = __nccwpck_require__(16924); -var bytes = __nccwpck_require__(16570); +// EXTERNAL MODULE: ./node_modules/ipfs-core-utils/node_modules/varint/index.js +var node_modules_varint = __nccwpck_require__(86941); +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/dist/src/from-string.js -const identity = base.from({ - prefix: '\0', - name: 'identity', - encode: buf => bytes.toString(buf), - decode: str => bytes.fromString(str) -}); -exports.identity = identity; +/** + * Create a `Uint8Array` from the passed string + * + * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module. + * + * Also `ascii` which is similar to node's 'binary' encoding. + */ +function src_from_string_fromString(string, encoding = 'utf8') { + const base = src_util_bases[encoding]; + if (base == null) { + throw new Error(`Unsupported encoding "${encoding}"`); + } + if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) { + return src_util_as_uint8array_asUint8Array(globalThis.Buffer.from(string, 'utf-8')); + } + // add multibase prefix + return base.decoder.decode(`${base.prefix}${string}`); // eslint-disable-line @typescript-eslint/restrict-template-expressions +} +//# sourceMappingURL=from-string.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/dist/src/concat.js -/***/ }), +/** + * Returns a new Uint8Array created by concatenating the passed ArrayLikes + */ +function src_concat_concat(arrays, length) { + if (length == null) { + length = arrays.reduce((acc, curr) => acc + curr.length, 0); + } + const output = src_alloc_allocUnsafe(length); + let offset = 0; + for (const arr of arrays) { + output.set(arr, offset); + offset += arr.length; + } + return src_util_as_uint8array_asUint8Array(output); +} +//# sourceMappingURL=concat.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/@multiformats/multiaddr/dist/src/convert.js +/** + * @packageDocumentation + * + * Provides methods for converting + */ -/***/ 42916: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var identity = __nccwpck_require__(28380); -var base2 = __nccwpck_require__(16721); -var base8 = __nccwpck_require__(3529); -var base10 = __nccwpck_require__(86007); -var base16 = __nccwpck_require__(98085); -var base32 = __nccwpck_require__(70784); -var base36 = __nccwpck_require__(76443); -var base58 = __nccwpck_require__(49108); -var base64 = __nccwpck_require__(98197); -var base256emoji = __nccwpck_require__(40411); -var sha2 = __nccwpck_require__(80960); -var identity$1 = __nccwpck_require__(53863); -var raw = __nccwpck_require__(4848); -var json = __nccwpck_require__(81245); -__nccwpck_require__(27331); -var cid = __nccwpck_require__(24247); -var hasher = __nccwpck_require__(62030); -var digest = __nccwpck_require__(81168); -var varint = __nccwpck_require__(55687); -var bytes = __nccwpck_require__(16570); -const bases = { - ...identity, - ...base2, - ...base8, - ...base10, - ...base16, - ...base32, - ...base36, - ...base58, - ...base64, - ...base256emoji -}; -const hashes = { - ...sha2, - ...identity$1 -}; -const codecs = { - raw, - json -}; -exports.CID = cid.CID; -exports.hasher = hasher; -exports.digest = digest; -exports.varint = varint; -exports.bytes = bytes; -exports.bases = bases; -exports.codecs = codecs; -exports.hashes = hashes; -/***/ }), -/***/ 44748: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +function convert_convert(proto, a) { + if (a instanceof Uint8Array) { + return convert_convertToString(proto, a); + } + else { + return convert_convertToBytes(proto, a); + } +} +/** + * Convert [code,Uint8Array] to string + */ +function convert_convertToString(proto, buf) { + const protocol = src_protocols_table_getProtocol(proto); + switch (protocol.code) { + case 4: // ipv4 + case 41: // ipv6 + return convert_bytes2ip(buf); + case 42: // ipv6zone + return convert_bytes2str(buf); + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return convert_bytes2port(buf).toString(); + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 449: // sni + case 777: // memory + return convert_bytes2str(buf); + case 421: // ipfs + return convert_bytes2mh(buf); + case 444: // onion + return convert_bytes2onion(buf); + case 445: // onion3 + return convert_bytes2onion(buf); + case 466: // certhash + return convert_bytes2mb(buf); + default: + return src_to_string_toString(buf, 'base16'); // no clue. convert to hex + } +} +function convert_convertToBytes(proto, str) { + const protocol = src_protocols_table_getProtocol(proto); + switch (protocol.code) { + case 4: // ipv4 + return convert_ip2bytes(str); + case 41: // ipv6 + return convert_ip2bytes(str); + case 42: // ipv6zone + return convert_str2bytes(str); + case 6: // tcp + case 273: // udp + case 33: // dccp + case 132: // sctp + return convert_port2bytes(parseInt(str, 10)); + case 53: // dns + case 54: // dns4 + case 55: // dns6 + case 56: // dnsaddr + case 400: // unix + case 449: // sni + case 777: // memory + return convert_str2bytes(str); + case 421: // ipfs + return convert_mh2bytes(str); + case 444: // onion + return convert_onion2bytes(str); + case 445: // onion3 + return convert_onion32bytes(str); + case 466: // certhash + return convert_mb2bytes(str); + default: + return src_from_string_fromString(str, 'base16'); // no clue. convert from hex + } +} +const convert_decoders = Object.values(multiformats_src_basics_bases).map((c) => c.decoder); +const convert_anybaseDecoder = (function () { + let acc = convert_decoders[0].or(convert_decoders[1]); + convert_decoders.slice(2).forEach((d) => (acc = acc.or(d))); + return acc; +})(); +function convert_ip2bytes(ipString) { + if (!isIP(ipString)) { + throw new Error('invalid ip address'); + } + return src_ip_toBytes(ipString); +} +function convert_bytes2ip(ipBuff) { + const ipString = src_ip_toString(ipBuff, 0, ipBuff.length); + if (ipString == null) { + throw new Error('ipBuff is required'); + } + if (!isIP(ipString)) { + throw new Error('invalid ip address'); + } + return ipString; +} +function convert_port2bytes(port) { + const buf = new ArrayBuffer(2); + const view = new DataView(buf); + view.setUint16(0, port); + return new Uint8Array(buf); +} +function convert_bytes2port(buf) { + const view = new DataView(buf.buffer); + return view.getUint16(buf.byteOffset); +} +function convert_str2bytes(str) { + const buf = src_from_string_fromString(str); + const size = Uint8Array.from(node_modules_varint.encode(buf.length)); + return src_concat_concat([size, buf], size.length + buf.length); +} +function convert_bytes2str(buf) { + const size = node_modules_varint.decode(buf); + buf = buf.slice(node_modules_varint.decode.bytes); + if (buf.length !== size) { + throw new Error('inconsistent lengths'); + } + return src_to_string_toString(buf); +} +function convert_mh2bytes(hash) { + let mh; + if (hash[0] === 'Q' || hash[0] === '1') { + mh = ipfs_core_utils_node_modules_multiformats_src_hashes_digest_decode(ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc.decode(`z${hash}`)).bytes; + } + else { + mh = ipfs_core_utils_node_modules_multiformats_src_cid_CID.parse(hash).multihash.bytes; + } + // the address is a varint prefixed multihash string representation + const size = Uint8Array.from(node_modules_varint.encode(mh.length)); + return src_concat_concat([size, mh], size.length + mh.length); +} +function convert_mb2bytes(mbstr) { + const mb = convert_anybaseDecoder.decode(mbstr); + const size = Uint8Array.from(node_modules_varint.encode(mb.length)); + return src_concat_concat([size, mb], size.length + mb.length); +} +function convert_bytes2mb(buf) { + const size = node_modules_varint.decode(buf); + const hash = buf.slice(node_modules_varint.decode.bytes); + if (hash.length !== size) { + throw new Error('inconsistent lengths'); + } + return 'u' + src_to_string_toString(hash, 'base64url'); +} +/** + * Converts bytes to bas58btc string + */ +function convert_bytes2mh(buf) { + const size = node_modules_varint.decode(buf); + const address = buf.slice(node_modules_varint.decode.bytes); + if (address.length !== size) { + throw new Error('inconsistent lengths'); + } + return src_to_string_toString(address, 'base58btc'); +} +function convert_onion2bytes(str) { + const addr = str.split(':'); + if (addr.length !== 2) { + throw new Error(`failed to parse onion addr: ["'${addr.join('", "')}'"]' does not contain a port number`); + } + if (addr[0].length !== 16) { + throw new Error(`failed to parse onion addr: ${addr[0]} not a Tor onion address.`); + } + // onion addresses do not include the multibase prefix, add it before decoding + const buf = ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32.decode('b' + addr[0]); + // onion port number + const port = parseInt(addr[1], 10); + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)'); + } + const portBuf = convert_port2bytes(port); + return src_concat_concat([buf, portBuf], buf.length + portBuf.length); +} +function convert_onion32bytes(str) { + const addr = str.split(':'); + if (addr.length !== 2) { + throw new Error(`failed to parse onion addr: ["'${addr.join('", "')}'"]' does not contain a port number`); + } + if (addr[0].length !== 56) { + throw new Error(`failed to parse onion addr: ${addr[0]} not a Tor onion3 address.`); + } + // onion addresses do not include the multibase prefix, add it before decoding + const buf = ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32.decode(`b${addr[0]}`); + // onion port number + const port = parseInt(addr[1], 10); + if (port < 1 || port > 65536) { + throw new Error('Port number is not in range(1, 65536)'); + } + const portBuf = convert_port2bytes(port); + return src_concat_concat([buf, portBuf], buf.length + portBuf.length); +} +function convert_bytes2onion(buf) { + const addrBytes = buf.slice(0, buf.length - 2); + const portBytes = buf.slice(buf.length - 2); + const addr = src_to_string_toString(addrBytes, 'base32'); + const port = convert_bytes2port(portBytes); + return `${addr}:${port}`; +} +//# sourceMappingURL=convert.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/@multiformats/multiaddr/dist/src/codec.js -Object.defineProperty(exports, "__esModule", ({ value: true })); -__nccwpck_require__(27331); -var cid = __nccwpck_require__(24247); -var bytes = __nccwpck_require__(16570); -const readonly = ({enumerable = true, configurable = false} = {}) => ({ - enumerable, - configurable, - writable: false -}); -const links = function* (source, base) { - if (source == null) - return; - if (source instanceof Uint8Array) - return; - for (const [key, value] of Object.entries(source)) { - const path = [ - ...base, - key - ]; - if (value != null && typeof value === 'object') { - if (Array.isArray(value)) { - for (const [index, element] of value.entries()) { - const elementPath = [ - ...path, - index - ]; - const cid$1 = cid.CID.asCID(element); - if (cid$1) { - yield [ - elementPath.join('/'), - cid$1 - ]; - } else if (typeof element === 'object') { - yield* links(element, elementPath); - } + +/** + * string -> [[str name, str addr]... ] + */ +function stringToStringTuples(str) { + const tuples = []; + const parts = str.split('/').slice(1); // skip first empty elem + if (parts.length === 1 && parts[0] === '') { + return []; + } + for (let p = 0; p < parts.length; p++) { + const part = parts[p]; + const proto = src_protocols_table_getProtocol(part); + if (proto.size === 0) { + tuples.push([part]); + // eslint-disable-next-line no-continue + continue; } - } else { - const cid$1 = cid.CID.asCID(value); - if (cid$1) { - yield [ - path.join('/'), - cid$1 - ]; - } else { - yield* links(value, path); + p++; // advance addr part + if (p >= parts.length) { + throw codec_ParseError('invalid address: ' + str); + } + // if it's a path proto, take the rest + if (proto.path === true) { + tuples.push([ + part, + // should we need to check each path part to see if it's a proto? + // This would allow for other protocols to be added after a unix path, + // however it would have issues if the path had a protocol name in the path + codec_cleanPath(parts.slice(p).join('/')) + ]); + break; } - } + tuples.push([part, parts[p]]); } - } -}; -const tree = function* (source, base) { - if (source == null) - return; - for (const [key, value] of Object.entries(source)) { - const path = [ - ...base, - key - ]; - yield path.join('/'); - if (value != null && !(value instanceof Uint8Array) && typeof value === 'object' && !cid.CID.asCID(value)) { - if (Array.isArray(value)) { - for (const [index, element] of value.entries()) { - const elementPath = [ - ...path, - index - ]; - yield elementPath.join('/'); - if (typeof element === 'object' && !cid.CID.asCID(element)) { - yield* tree(element, elementPath); - } + return tuples; +} +/** + * [[str name, str addr]... ] -> string + */ +function codec_stringTuplesToString(tuples) { + const parts = []; + tuples.map((tup) => { + const proto = protoFromTuple(tup); + parts.push(proto.name); + if (tup.length > 1 && tup[1] != null) { + parts.push(tup[1]); } - } else { - yield* tree(value, path); - } + return null; + }); + return codec_cleanPath(parts.join('/')); +} +/** + * [[str name, str addr]... ] -> [[int code, Uint8Array]... ] + */ +function stringTuplesToTuples(tuples) { + return tuples.map((tup) => { + if (!Array.isArray(tup)) { + tup = [tup]; + } + const proto = protoFromTuple(tup); + if (tup.length > 1) { + return [proto.code, convert_convertToBytes(proto.code, tup[1])]; + } + return [proto.code]; + }); +} +/** + * Convert tuples to string tuples + * + * [[int code, Uint8Array]... ] -> [[int code, str addr]... ] + */ +function tuplesToStringTuples(tuples) { + return tuples.map(tup => { + const proto = protoFromTuple(tup); + if (tup[1] != null) { + return [proto.code, convert_convertToString(proto.code, tup[1])]; + } + return [proto.code]; + }); +} +/** + * [[int code, Uint8Array ]... ] -> Uint8Array + */ +function codec_tuplesToBytes(tuples) { + return fromBytes(src_concat_concat(tuples.map((tup) => { + const proto = protoFromTuple(tup); + let buf = Uint8Array.from(node_modules_varint.encode(proto.code)); + if (tup.length > 1 && tup[1] != null) { + buf = src_concat_concat([buf, tup[1]]); // add address buffer + } + return buf; + }))); +} +/** + * For the passed address, return the serialized size + */ +function codec_sizeForAddr(p, addr) { + if (p.size > 0) { + return p.size / 8; } - } -}; -const get = (source, path) => { - let node = source; - for (const [index, key] of path.entries()) { - node = node[key]; - if (node == null) { - throw new Error(`Object has no property at ${ path.slice(0, index + 1).map(part => `[${ JSON.stringify(part) }]`).join('') }`); + else if (p.size === 0) { + return 0; } - const cid$1 = cid.CID.asCID(node); - if (cid$1) { - return { - value: cid$1, - remaining: path.slice(index + 1).join('/') - }; + else { + const size = node_modules_varint.decode(addr); + return size + (node_modules_varint.decode.bytes ?? 0); } - } - return { value: node }; -}; -class Block { - constructor({cid, bytes, value}) { - if (!cid || !bytes || typeof value === 'undefined') - throw new Error('Missing required argument'); - this.cid = cid; - this.bytes = bytes; - this.value = value; - this.asBlock = this; - Object.defineProperties(this, { - cid: readonly(), - bytes: readonly(), - value: readonly(), - asBlock: readonly() - }); - } - links() { - return links(this.value, []); - } - tree() { - return tree(this.value, []); - } - get(path = '/') { - return get(this.value, path.split('/').filter(Boolean)); - } } -const encode = async ({value, codec, hasher}) => { - if (typeof value === 'undefined') - throw new Error('Missing required argument "value"'); - if (!codec || !hasher) - throw new Error('Missing required argument: codec or hasher'); - const bytes = codec.encode(value); - const hash = await hasher.digest(bytes); - const cid$1 = cid.CID.create(1, codec.code, hash); - return new Block({ - value, - bytes, - cid: cid$1 - }); -}; -const decode = async ({bytes, codec, hasher}) => { - if (!bytes) - throw new Error('Missing required argument "bytes"'); - if (!codec || !hasher) - throw new Error('Missing required argument: codec or hasher'); - const value = codec.decode(bytes); - const hash = await hasher.digest(bytes); - const cid$1 = cid.CID.create(1, codec.code, hash); - return new Block({ - value, - bytes, - cid: cid$1 - }); -}; -const createUnsafe = ({ - bytes, - cid, - value: maybeValue, - codec -}) => { - const value = maybeValue !== undefined ? maybeValue : codec && codec.decode(bytes); - if (value === undefined) - throw new Error('Missing required argument, must either provide "value" or "codec"'); - return new Block({ - cid, - bytes, - value - }); -}; -const create = async ({bytes: bytes$1, cid, hasher, codec}) => { - if (!bytes$1) - throw new Error('Missing required argument "bytes"'); - if (!hasher) - throw new Error('Missing required argument "hasher"'); - const value = codec.decode(bytes$1); - const hash = await hasher.digest(bytes$1); - if (!bytes.equals(cid.multihash.bytes, hash.bytes)) { - throw new Error('CID hash does not match bytes'); - } - return createUnsafe({ - bytes: bytes$1, - cid, - value, - codec - }); -}; - -exports.Block = Block; -exports.create = create; -exports.createUnsafe = createUnsafe; -exports.decode = decode; -exports.encode = encode; - - -/***/ }), - -/***/ 16570: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", ({ value: true })); - -const empty = new Uint8Array(0); -const toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), ''); -const fromHex = hex => { - const hexes = hex.match(/../g); - return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : empty; -}; -const equals = (aa, bb) => { - if (aa === bb) - return true; - if (aa.byteLength !== bb.byteLength) { - return false; - } - for (let ii = 0; ii < aa.byteLength; ii++) { - if (aa[ii] !== bb[ii]) { - return false; +function codec_bytesToTuples(buf) { + const tuples = []; + let i = 0; + while (i < buf.length) { + const code = node_modules_varint.decode(buf, i); + const n = node_modules_varint.decode.bytes ?? 0; + const p = src_protocols_table_getProtocol(code); + const size = codec_sizeForAddr(p, buf.slice(i + n)); + if (size === 0) { + tuples.push([code]); + i += n; + // eslint-disable-next-line no-continue + continue; + } + const addr = buf.slice(i + n, i + n + size); + i += (size + n); + if (i > buf.length) { // did not end _exactly_ at buffer.length + throw codec_ParseError('Invalid address Uint8Array: ' + src_to_string_toString(buf, 'base16')); + } + // ok, tuple seems good. + tuples.push([code, addr]); } - } - return true; + return tuples; +} +/** + * Uint8Array -> String + */ +function bytesToString(buf) { + const a = codec_bytesToTuples(buf); + const b = tuplesToStringTuples(a); + return codec_stringTuplesToString(b); +} +/** + * String -> Uint8Array + */ +function stringToBytes(str) { + str = codec_cleanPath(str); + const a = stringToStringTuples(str); + const b = stringTuplesToTuples(a); + return codec_tuplesToBytes(b); +} +/** + * String -> Uint8Array + */ +function codec_fromString(str) { + return stringToBytes(str); +} +/** + * Uint8Array -> Uint8Array + */ +function fromBytes(buf) { + const err = validateBytes(buf); + if (err != null) { + throw err; + } + return Uint8Array.from(buf); // copy +} +function validateBytes(buf) { + try { + codec_bytesToTuples(buf); // try to parse. will throw if breaks + } + catch (err) { + return err; + } +} +function isValidBytes(buf) { + return validateBytes(buf) === undefined; +} +function codec_cleanPath(str) { + return '/' + str.trim().split('/').filter((a) => a).join('/'); +} +function codec_ParseError(str) { + return new Error('Error parsing address: ' + str); +} +function protoFromTuple(tup) { + const proto = src_protocols_table_getProtocol(tup[0]); + return proto; +} +//# sourceMappingURL=codec.js.map +// EXTERNAL MODULE: ./node_modules/err-code/index.js +var err_code = __nccwpck_require__(22077); +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/uint8arrays/dist/src/equals.js +/** + * Returns true if the two passed Uint8Arrays have the same content + */ +function src_equals_equals(a, b) { + if (a === b) { + return true; + } + if (a.byteLength !== b.byteLength) { + return false; + } + for (let i = 0; i < a.byteLength; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; +} +//# sourceMappingURL=equals.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/@multiformats/multiaddr/dist/src/index.js +/** + * @packageDocumentation + * + * An implementation of a Multiaddr in JavaScript + * + * @example + * + * ```js + * import { multiaddr } from '@multiformats/multiaddr' + * + * const ma = multiaddr('/ip4/127.0.0.1/tcp/1234') + * ``` + */ +var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; -const coerce = o => { - if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') - return o; - if (o instanceof ArrayBuffer) - return new Uint8Array(o); - if (ArrayBuffer.isView(o)) { - return new Uint8Array(o.buffer, o.byteOffset, o.byteLength); - } - throw new Error('Unknown type, must be binary type'); +var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; -const isBinary = o => o instanceof ArrayBuffer || ArrayBuffer.isView(o); -const fromString = str => new TextEncoder().encode(str); -const toString = b => new TextDecoder().decode(b); - -exports.coerce = coerce; -exports.empty = empty; -exports.equals = equals; -exports.fromHex = fromHex; -exports.fromString = fromString; -exports.isBinary = isBinary; -exports.toHex = toHex; -exports.toString = toString; +var _DefaultMultiaddr_string, _DefaultMultiaddr_tuples, _DefaultMultiaddr_stringTuples, _a; -/***/ }), -/***/ 24247: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var varint = __nccwpck_require__(55687); -var digest = __nccwpck_require__(81168); -var base58 = __nccwpck_require__(49108); -var base32 = __nccwpck_require__(70784); -var bytes = __nccwpck_require__(16570); -class CID { - constructor(version, code, multihash, bytes) { - this.code = code; - this.version = version; - this.multihash = multihash; - this.bytes = bytes; - this.byteOffset = bytes.byteOffset; - this.byteLength = bytes.byteLength; - this.asCID = this; - this._baseCache = new Map(); - Object.defineProperties(this, { - byteOffset: hidden, - byteLength: hidden, - code: readonly, - version: readonly, - multihash: readonly, - bytes: readonly, - _baseCache: hidden, - asCID: hidden - }); - } - toV0() { - switch (this.version) { - case 0: { - return this; - } - default: { - const {code, multihash} = this; - if (code !== DAG_PB_CODE) { - throw new Error('Cannot convert a non dag-pb CID to CIDv0'); +const src_inspect = Symbol.for('nodejs.util.inspect.custom'); +const src_DNS_CODES = [ + src_protocols_table_getProtocol('dns').code, + src_protocols_table_getProtocol('dns4').code, + src_protocols_table_getProtocol('dns6').code, + src_protocols_table_getProtocol('dnsaddr').code +]; +/** + * All configured {@link Resolver}s + */ +const src_resolvers = new Map(); +const src_symbol = Symbol.for('@multiformats/js-multiaddr/multiaddr'); +/** + * Creates a Multiaddr from a node-friendly address object + * + * @example + * ```js + * import { fromNodeAddress } from '@multiformats/multiaddr' + * + * fromNodeAddress({address: '127.0.0.1', port: '4001'}, 'tcp') + * // Multiaddr(/ip4/127.0.0.1/tcp/4001) + * ``` + */ +function src_fromNodeAddress(addr, transport) { + if (addr == null) { + throw new Error('requires node address object'); + } + if (transport == null) { + throw new Error('requires transport protocol'); + } + let ip; + let host = addr.address; + switch (addr.family) { + case 4: + ip = 'ip4'; + break; + case 6: + ip = 'ip6'; + if (host.includes('%')) { + const parts = host.split('%'); + if (parts.length !== 2) { + throw Error('Multiple ip6 zones in multiaddr'); + } + host = parts[0]; + const zone = parts[1]; + ip = `/ip6zone/${zone}/ip6`; + } + break; + default: + throw Error('Invalid addr family, should be 4 or 6.'); + } + return new DefaultMultiaddr('/' + [ip, host, transport, addr.port].join('/')); +} +/** + * Returns if something is a {@link Multiaddr} that is a resolvable name + * + * @example + * + * ```js + * import { isName, multiaddr } from '@multiformats/multiaddr' + * + * isName(multiaddr('/ip4/127.0.0.1')) + * // false + * isName(multiaddr('/dns/ipfs.io')) + * // true + * ``` + */ +function src_isName(addr) { + if (!src_isMultiaddr(addr)) { + return false; + } + // if a part of the multiaddr is resolvable, then return true + return addr.protos().some((proto) => proto.resolvable); +} +/** + * Check if object is a {@link Multiaddr} instance + * + * @example + * + * ```js + * import { isMultiaddr, multiaddr } from '@multiformats/multiaddr' + * + * isMultiaddr(5) + * // false + * isMultiaddr(multiaddr('/ip4/127.0.0.1')) + * // true + * ``` + */ +function src_isMultiaddr(value) { + return Boolean(value?.[src_symbol]); +} +/** + * Creates a {@link Multiaddr} from a {@link MultiaddrInput} + */ +class DefaultMultiaddr { + constructor(addr) { + _DefaultMultiaddr_string.set(this, void 0); + _DefaultMultiaddr_tuples.set(this, void 0); + _DefaultMultiaddr_stringTuples.set(this, void 0); + this[_a] = true; + // default + if (addr == null) { + addr = ''; + } + if (addr instanceof Uint8Array) { + this.bytes = fromBytes(addr); + } + else if (typeof addr === 'string') { + if (addr.length > 0 && addr.charAt(0) !== '/') { + throw new Error(`multiaddr "${addr}" must start with a "/"`); + } + this.bytes = codec_fromString(addr); } - if (multihash.code !== SHA_256_CODE) { - throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0'); + else if (src_isMultiaddr(addr)) { // Multiaddr + this.bytes = fromBytes(addr.bytes); // validate + copy buffer + } + else { + throw new Error('addr must be a string, Buffer, or another Multiaddr'); } - return CID.createV0(multihash); - } } - } - toV1() { - switch (this.version) { - case 0: { - const {code, digest: digest$1} = this.multihash; - const multihash = digest.create(code, digest$1); - return CID.createV1(this.code, multihash); - } - case 1: { + toString() { + if (__classPrivateFieldGet(this, _DefaultMultiaddr_string, "f") == null) { + __classPrivateFieldSet(this, _DefaultMultiaddr_string, bytesToString(this.bytes), "f"); + } + return __classPrivateFieldGet(this, _DefaultMultiaddr_string, "f"); + } + toJSON() { + return this.toString(); + } + toOptions() { + let family; + let transport; + let host; + let port; + let zone = ''; + const tcp = src_protocols_table_getProtocol('tcp'); + const udp = src_protocols_table_getProtocol('udp'); + const ip4 = src_protocols_table_getProtocol('ip4'); + const ip6 = src_protocols_table_getProtocol('ip6'); + const dns6 = src_protocols_table_getProtocol('dns6'); + const ip6zone = src_protocols_table_getProtocol('ip6zone'); + for (const [code, value] of this.stringTuples()) { + if (code === ip6zone.code) { + zone = `%${value ?? ''}`; + } + // default to https when protocol & port are omitted from DNS addrs + if (src_DNS_CODES.includes(code)) { + transport = tcp.name; + port = 443; + host = `${value ?? ''}${zone}`; + family = code === dns6.code ? 6 : 4; + } + if (code === tcp.code || code === udp.code) { + transport = src_protocols_table_getProtocol(code).name; + port = parseInt(value ?? ''); + } + if (code === ip4.code || code === ip6.code) { + transport = src_protocols_table_getProtocol(code).name; + host = `${value ?? ''}${zone}`; + family = code === ip6.code ? 6 : 4; + } + } + if (family == null || transport == null || host == null || port == null) { + throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6, dnsaddr}/{address}/{tcp, udp}/{port}".'); + } + const opts = { + family, + host, + transport, + port + }; + return opts; + } + protos() { + return this.protoCodes().map(code => Object.assign({}, src_protocols_table_getProtocol(code))); + } + protoCodes() { + const codes = []; + const buf = this.bytes; + let i = 0; + while (i < buf.length) { + const code = node_modules_varint.decode(buf, i); + const n = node_modules_varint.decode.bytes ?? 0; + const p = src_protocols_table_getProtocol(code); + const size = codec_sizeForAddr(p, buf.slice(i + n)); + i += (size + n); + codes.push(code); + } + return codes; + } + protoNames() { + return this.protos().map(proto => proto.name); + } + tuples() { + if (__classPrivateFieldGet(this, _DefaultMultiaddr_tuples, "f") == null) { + __classPrivateFieldSet(this, _DefaultMultiaddr_tuples, codec_bytesToTuples(this.bytes), "f"); + } + return __classPrivateFieldGet(this, _DefaultMultiaddr_tuples, "f"); + } + stringTuples() { + if (__classPrivateFieldGet(this, _DefaultMultiaddr_stringTuples, "f") == null) { + __classPrivateFieldSet(this, _DefaultMultiaddr_stringTuples, tuplesToStringTuples(this.tuples()), "f"); + } + return __classPrivateFieldGet(this, _DefaultMultiaddr_stringTuples, "f"); + } + encapsulate(addr) { + addr = new DefaultMultiaddr(addr); + return new DefaultMultiaddr(this.toString() + addr.toString()); + } + decapsulate(addr) { + const addrString = addr.toString(); + const s = this.toString(); + const i = s.lastIndexOf(addrString); + if (i < 0) { + throw new Error(`Address ${this.toString()} does not contain subaddress: ${addr.toString()}`); + } + return new DefaultMultiaddr(s.slice(0, i)); + } + decapsulateCode(code) { + const tuples = this.tuples(); + for (let i = tuples.length - 1; i >= 0; i--) { + if (tuples[i][0] === code) { + return new DefaultMultiaddr(codec_tuplesToBytes(tuples.slice(0, i))); + } + } return this; - } - default: { - throw Error(`Can not convert CID version ${ this.version } to version 0. This is a bug please report`); - } } - } - equals(other) { - return other && this.code === other.code && this.version === other.version && digest.equals(this.multihash, other.multihash); - } - toString(base) { - const {bytes, version, _baseCache} = this; - switch (version) { - case 0: - return toStringV0(bytes, _baseCache, base || base58.base58btc.encoder); - default: - return toStringV1(bytes, _baseCache, base || base32.base32.encoder); + getPeerId() { + try { + const tuples = this.stringTuples().filter((tuple) => { + if (tuple[0] === protocols_table_names.ipfs.code) { + return true; + } + return false; + }); + // Get the last ipfs tuple ['ipfs', 'peerid string'] + const tuple = tuples.pop(); + if (tuple?.[1] != null) { + const peerIdStr = tuple[1]; + // peer id is base58btc encoded string but not multibase encoded so add the `z` + // prefix so we can validate that it is correctly encoded + if (peerIdStr[0] === 'Q' || peerIdStr[0] === '1') { + return src_to_string_toString(ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc.decode(`z${peerIdStr}`), 'base58btc'); + } + // try to parse peer id as CID + return src_to_string_toString(ipfs_core_utils_node_modules_multiformats_src_cid_CID.parse(peerIdStr).multihash.bytes, 'base58btc'); + } + return null; + } + catch (e) { + return null; + } } - } - toJSON() { - return { - code: this.code, - version: this.version, - hash: this.multihash.bytes - }; - } - get [Symbol.toStringTag]() { - return 'CID'; - } - [Symbol.for('nodejs.util.inspect.custom')]() { - return 'CID(' + this.toString() + ')'; - } - static isCID(value) { - deprecate(/^0\.0/, IS_CID_DEPRECATION); - return !!(value && (value[cidSymbol] || value.asCID === value)); - } - get toBaseEncodedString() { - throw new Error('Deprecated, use .toString()'); - } - get codec() { - throw new Error('"codec" property is deprecated, use integer "code" property instead'); - } - get buffer() { - throw new Error('Deprecated .buffer property, use .bytes to get Uint8Array instead'); - } - get multibaseName() { - throw new Error('"multibaseName" property is deprecated'); - } - get prefix() { - throw new Error('"prefix" property is deprecated'); - } - static asCID(value) { - if (value instanceof CID) { - return value; - } else if (value != null && value.asCID === value) { - const {version, code, multihash, bytes} = value; - return new CID(version, code, multihash, bytes || encodeCID(version, code, multihash.bytes)); - } else if (value != null && value[cidSymbol] === true) { - const {version, multihash, code} = value; - const digest$1 = digest.decode(multihash); - return CID.create(version, code, digest$1); - } else { - return null; + getPath() { + let path = null; + try { + path = this.stringTuples().filter((tuple) => { + const proto = src_protocols_table_getProtocol(tuple[0]); + if (proto.path === true) { + return true; + } + return false; + })[0][1]; + if (path == null) { + path = null; + } + } + catch { + path = null; + } + return path; } - } - static create(version, code, digest) { - if (typeof code !== 'number') { - throw new Error('String codecs are no longer supported'); + equals(addr) { + return src_equals_equals(this.bytes, addr.bytes); } - switch (version) { - case 0: { - if (code !== DAG_PB_CODE) { - throw new Error(`Version 0 CID must use dag-pb (code: ${ DAG_PB_CODE }) block encoding`); - } else { - return new CID(version, code, digest, digest.bytes); + async resolve(options) { + const resolvableProto = this.protos().find((p) => p.resolvable); + // Multiaddr is not resolvable? + if (resolvableProto == null) { + return [this]; } - } - case 1: { - const bytes = encodeCID(version, code, digest.bytes); - return new CID(version, code, digest, bytes); - } - default: { - throw new Error('Invalid version'); - } - } - } - static createV0(digest) { - return CID.create(0, DAG_PB_CODE, digest); - } - static createV1(code, digest) { - return CID.create(1, code, digest); - } - static decode(bytes) { - const [cid, remainder] = CID.decodeFirst(bytes); - if (remainder.length) { - throw new Error('Incorrect length'); + const resolver = src_resolvers.get(resolvableProto.name); + if (resolver == null) { + throw err_code(new Error(`no available resolver for ${resolvableProto.name}`), 'ERR_NO_AVAILABLE_RESOLVER'); + } + const addresses = await resolver(this, options); + return addresses.map((a) => new DefaultMultiaddr(a)); } - return cid; - } - static decodeFirst(bytes$1) { - const specs = CID.inspectBytes(bytes$1); - const prefixSize = specs.size - specs.multihashSize; - const multihashBytes = bytes.coerce(bytes$1.subarray(prefixSize, prefixSize + specs.multihashSize)); - if (multihashBytes.byteLength !== specs.multihashSize) { - throw new Error('Incorrect length'); + nodeAddress() { + const options = this.toOptions(); + if (options.transport !== 'tcp' && options.transport !== 'udp') { + throw new Error(`multiaddr must have a valid format - no protocol with name: "${options.transport}". Must have a valid transport protocol: "{tcp, udp}"`); + } + return { + family: options.family, + address: options.host, + port: options.port + }; } - const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize); - const digest$1 = new digest.Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes); - const cid = specs.version === 0 ? CID.createV0(digest$1) : CID.createV1(specs.codec, digest$1); - return [ - cid, - bytes$1.subarray(specs.size) - ]; - } - static inspectBytes(initialBytes) { - let offset = 0; - const next = () => { - const [i, length] = varint.decode(initialBytes.subarray(offset)); - offset += length; - return i; - }; - let version = next(); - let codec = DAG_PB_CODE; - if (version === 18) { - version = 0; - offset = 0; - } else if (version === 1) { - codec = next(); + isThinWaistAddress(addr) { + const protos = (addr ?? this).protos(); + if (protos.length !== 2) { + return false; + } + if (protos[0].code !== 4 && protos[0].code !== 41) { + return false; + } + if (protos[1].code !== 6 && protos[1].code !== 273) { + return false; + } + return true; } - if (version !== 0 && version !== 1) { - throw new RangeError(`Invalid CID version ${ version }`); + /** + * Returns Multiaddr as a human-readable string + * https://nodejs.org/api/util.html#utilinspectcustom + * + * @example + * ```js + * import { multiaddr } from '@multiformats/multiaddr' + * + * console.info(multiaddr('/ip4/127.0.0.1/tcp/4001')) + * // 'Multiaddr(/ip4/127.0.0.1/tcp/4001)' + * ``` + */ + [(_DefaultMultiaddr_string = new WeakMap(), _DefaultMultiaddr_tuples = new WeakMap(), _DefaultMultiaddr_stringTuples = new WeakMap(), _a = src_symbol, src_inspect)]() { + return `Multiaddr(${bytesToString(this.bytes)})`; } - const prefixSize = offset; - const multihashCode = next(); - const digestSize = next(); - const size = offset + digestSize; - const multihashSize = size - prefixSize; - return { - version, - codec, - multihashCode, - digestSize, - multihashSize, - size - }; - } - static parse(source, base) { - const [prefix, bytes] = parseCIDtoBytes(source, base); - const cid = CID.decode(bytes); - cid._baseCache.set(prefix, source); - return cid; - } } -const parseCIDtoBytes = (source, base) => { - switch (source[0]) { - case 'Q': { - const decoder = base || base58.base58btc; - return [ - base58.base58btc.prefix, - decoder.decode(`${ base58.base58btc.prefix }${ source }`) - ]; +/** + * A function that takes a {@link MultiaddrInput} and returns a {@link Multiaddr} + * + * @example + * ```js + * import { multiaddr } from '@libp2p/multiaddr' + * + * multiaddr('/ip4/127.0.0.1/tcp/4001') + * // Multiaddr(/ip4/127.0.0.1/tcp/4001) + * ``` + * + * @param {MultiaddrInput} [addr] - If String or Uint8Array, needs to adhere to the address format of a [multiaddr](https://github.com/multiformats/multiaddr#string-format) + */ +function dist_src_multiaddr(addr) { + return new DefaultMultiaddr(addr); +} + +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@multiformats/multiaddr-to-uri/dist/src/index.js + +function extractSNI(ma) { + let sniProtoCode; + try { + sniProtoCode = protocols_table_getProtocol('sni').code; } - case base58.base58btc.prefix: { - const decoder = base || base58.base58btc; - return [ - base58.base58btc.prefix, - decoder.decode(source) - ]; + catch (e) { + // No SNI protocol in multiaddr + return null; } - case base32.base32.prefix: { - const decoder = base || base32.base32; - return [ - base32.base32.prefix, - decoder.decode(source) - ]; + for (const [proto, value] of ma) { + if (proto === sniProtoCode && value !== undefined) { + return value; + } } - default: { - if (base == null) { - throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided'); - } - return [ - source[0], - base.decode(source) - ]; + return null; +} +function hasTLS(ma) { + return ma.some(([proto, _]) => proto === protocols_table_getProtocol('tls').code); +} +function interpretNext(headProtoCode, headProtoVal, restMa) { + const interpreter = interpreters[protocols_table_getProtocol(headProtoCode).name]; + if (interpreter === undefined) { + throw new Error(`Can't interpret protocol ${protocols_table_getProtocol(headProtoCode).name}`); } - } -}; -const toStringV0 = (bytes, cache, base) => { - const {prefix} = base; - if (prefix !== base58.base58btc.prefix) { - throw Error(`Cannot string encode V0 in ${ base.name } encoding`); - } - const cid = cache.get(prefix); - if (cid == null) { - const cid = base.encode(bytes).slice(1); - cache.set(prefix, cid); - return cid; - } else { - return cid; - } -}; -const toStringV1 = (bytes, cache, base) => { - const {prefix} = base; - const cid = cache.get(prefix); - if (cid == null) { - const cid = base.encode(bytes); - cache.set(prefix, cid); - return cid; - } else { - return cid; - } -}; -const DAG_PB_CODE = 112; -const SHA_256_CODE = 18; -const encodeCID = (version, code, multihash) => { - const codeOffset = varint.encodingLength(version); - const hashOffset = codeOffset + varint.encodingLength(code); - const bytes = new Uint8Array(hashOffset + multihash.byteLength); - varint.encodeTo(version, bytes, 0); - varint.encodeTo(code, bytes, codeOffset); - bytes.set(multihash, hashOffset); - return bytes; -}; -const cidSymbol = Symbol.for('@ipld/js-cid/CID'); -const readonly = { - writable: false, - configurable: false, - enumerable: true -}; -const hidden = { - writable: false, - enumerable: false, - configurable: false -}; -const version = '0.0.0-dev'; -const deprecate = (range, message) => { - if (range.test(version)) { - console.warn(message); - } else { - throw new Error(message); - } -}; -const IS_CID_DEPRECATION = `CID.isCID(v) is deprecated and will be removed in the next major release. -Following code pattern: - -if (CID.isCID(value)) { - doSomethingWithCID(value) + const restVal = interpreter(headProtoVal, restMa); + if (headProtoCode === protocols_table_getProtocol('ip6').code) { + return `[${restVal}]`; + } + return restVal; +} +const interpreters = { + ip4: (value, restMa) => value, + ip6: (value, restMa) => { + if (restMa.length === 0) { + return value; + } + return `[${value}]`; + }, + tcp: (value, restMa) => { + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + return `tcp://${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}:${value}`; + }, + udp: (value, restMa) => { + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + return `udp://${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}:${value}`; + }, + dnsaddr: (value, restMa) => value, + dns4: (value, restMa) => value, + dns6: (value, restMa) => value, + dns: (value, restMa) => value, + ipfs: (value, restMa) => { + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + return `${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}/ipfs/${value}`; + }, + p2p: (value, restMa) => { + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + return `${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}/p2p/${value}`; + }, + http: (value, restMa) => { + const maHasTLS = hasTLS(restMa); + const sni = extractSNI(restMa); + if (maHasTLS && sni !== null) { + return `https://${sni}`; + } + const protocol = maHasTLS ? 'https://' : 'http://'; + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + let baseVal = interpretNext(tailProto[0], tailProto[1] ?? '', restMa); + // We are reinterpreting the base as http, so we need to remove the tcp:// if it's there + baseVal = baseVal.replace('tcp://', ''); + return `${protocol}${baseVal}`; + }, + tls: (value, restMa) => { + // Noop, the parent context knows that it's tls. We don't need to do + // anything here + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + return interpretNext(tailProto[0], tailProto[1] ?? '', restMa); + }, + sni: (value, restMa) => { + // Noop, the parent context uses the sni information, we don't need to do + // anything here + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + return interpretNext(tailProto[0], tailProto[1] ?? '', restMa); + }, + https: (value, restMa) => { + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + let baseVal = interpretNext(tailProto[0], tailProto[1] ?? '', restMa); + // We are reinterpreting the base as http, so we need to remove the tcp:// if it's there + baseVal = baseVal.replace('tcp://', ''); + return `https://${baseVal}`; + }, + ws: (value, restMa) => { + const maHasTLS = hasTLS(restMa); + const sni = extractSNI(restMa); + if (maHasTLS && sni !== null) { + return `wss://${sni}`; + } + const protocol = maHasTLS ? 'wss://' : 'ws://'; + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + let baseVal = interpretNext(tailProto[0], tailProto[1] ?? '', restMa); + // We are reinterpreting the base, so we need to remove the tcp:// if it's there + baseVal = baseVal.replace('tcp://', ''); + return `${protocol}${baseVal}`; + }, + wss: (value, restMa) => { + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + let baseVal = interpretNext(tailProto[0], tailProto[1] ?? '', restMa); + // We are reinterpreting the base as http, so we need to remove the tcp:// if it's there + baseVal = baseVal.replace('tcp://', ''); + return `wss://${baseVal}`; + }, + 'p2p-websocket-star': (value, restMa) => { + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + return `${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}/p2p-websocket-star`; + }, + 'p2p-webrtc-star': (value, restMa) => { + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + return `${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}/p2p-webrtc-star`; + }, + 'p2p-webrtc-direct': (value, restMa) => { + const tailProto = restMa.pop(); + if (tailProto === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + return `${interpretNext(tailProto[0], tailProto[1] ?? '', restMa)}/p2p-webrtc-direct`; + } +}; +function multiaddrToUri(input, opts) { + const ma = src_multiaddr(input); + const parts = ma.stringTuples(); + const head = parts.pop(); + if (head === undefined) { + throw new Error('Unexpected end of multiaddr'); + } + const protocol = protocols_table_getProtocol(head[0]); + const interpreter = interpreters[protocol.name]; + if (interpreter == null) { + throw new Error(`No interpreter found for ${protocol.name}`); + } + let uri = interpreter(head[1] ?? '', parts); + if (opts?.assumeHttp !== false && head[0] === protocols_table_getProtocol('tcp').code) { + // If rightmost proto is tcp, we assume http here + uri = uri.replace('tcp://', 'http://'); + if (head[1] === '443' || head[1] === '80') { + if (head[1] === '443') { + uri = uri.replace('http://', 'https://'); + } + // Drop the port + uri = uri.substring(0, uri.lastIndexOf(':')); + } + } + return uri; } +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/to-url-string.js -Is replaced with: -const cid = CID.asCID(value) -if (cid) { - // Make sure to use cid instead of value - doSomethingWithCID(cid) + +/** + * @typedef {import('@multiformats/multiaddr').Multiaddr} Multiaddr + */ + +/** + * @param {string|Multiaddr|URL} url - A string, multiaddr or URL to convert to a url string + * @returns {string} + */ +function toUrlString (url) { + try { + // @ts-expect-error + url = multiaddrToUri(dist_src_multiaddr(url)) + } catch (/** @type {any} */ err) { } + + url = url.toString() + + return url } -`; -exports.CID = CID; +// EXTERNAL MODULE: external "http" +var external_http_ = __nccwpck_require__(13685); +// EXTERNAL MODULE: external "https" +var external_https_ = __nccwpck_require__(95687); +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/agent.js -/***/ }), -/***/ 81245: -/***/ ((__unused_webpack_module, exports) => { +/** + * @param {URL} [url] + */ +/* harmony default export */ const src_agent = ((url) => { + if (!url) { + throw new Error('URL required') + } -"use strict"; + return url.protocol.startsWith('https') ? external_https_.Agent : external_http_.Agent +}); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/core.js -Object.defineProperty(exports, "__esModule", ({ value: true })); +/* eslint-env browser */ -const textEncoder = new TextEncoder(); -const textDecoder = new TextDecoder(); -const name = 'json'; -const code = 512; -const encode = node => textEncoder.encode(JSON.stringify(node)); -const decode = data => JSON.parse(textDecoder.decode(data)); -exports.code = code; -exports.decode = decode; -exports.encode = encode; -exports.name = name; -/***/ }), -/***/ 4848: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -var bytes = __nccwpck_require__(16570); -const name = 'raw'; -const code = 85; -const encode = node => bytes.coerce(node); -const decode = data => bytes.coerce(data); +const log = logger('js-kubo-rpc-client:lib:error-handler') +const core_merge = node_modules_merge_options.bind({ ignoreUndefined: true }) + +const DEFAULT_PROTOCOL = env.isBrowser || env.isWebWorker ? location.protocol : 'http' +const DEFAULT_HOST = env.isBrowser || env.isWebWorker ? location.hostname : 'localhost' +const DEFAULT_PORT = env.isBrowser || env.isWebWorker ? location.port : '5001' + +/** + * @typedef {import('../types').Options} Options + */ + +/** + * @typedef {import('../types').Multiaddr} Multiaddr + */ + +/** + * @param {Options|URL|Multiaddr|string} [options] + * @returns {Options} + */ +const normalizeOptions = (options = {}) => { + let url + /** @type {Options} */ + let opts = {} + let agent + + if (typeof options === 'string' || isMultiaddr(options)) { + url = new URL(toUrlString(options)) + } else if (options instanceof URL) { + url = options + } else if (typeof options.url === 'string' || isMultiaddr(options.url)) { + url = new URL(toUrlString(options.url)) + opts = options + } else if (options.url instanceof URL) { + url = options.url + opts = options + } else { + opts = options || {} + + const protocol = (opts.protocol || DEFAULT_PROTOCOL).replace(':', '') + const host = (opts.host || DEFAULT_HOST).split(':')[0] + const port = (opts.port || DEFAULT_PORT) + + url = new URL(`${protocol}://${host}:${port}`) + } + + if (opts.apiPath) { + url.pathname = opts.apiPath + } else if (url.pathname === '/' || url.pathname === undefined) { + url.pathname = 'api/v0' + } + + if (env.isNode) { + const Agent = src_agent(url) + + agent = opts.agent || new Agent({ + keepAlive: true, + // Similar to browsers which limit connections to six per host + maxSockets: 6 + }) + } + + return { + ...opts, + host: url.host, + protocol: url.protocol.replace(':', ''), + port: Number(url.port), + apiPath: url.pathname, + url, + agent + } +} + +/** + * @param {Response} response + */ +const errorHandler = async (response) => { + let msg + + try { + if ((response.headers.get('Content-Type') || '').startsWith('application/json')) { + const data = await response.json() + log(data) + msg = data.Message || data.message + } else { + msg = await response.text() + } + } catch (/** @type {any} */ err) { + log('Failed to parse error response', err) + // Failed to extract/parse error message from response + msg = err.message + } -exports.code = code; -exports.decode = decode; -exports.encode = encode; -exports.name = name; + /** @type {Error} */ + let error = new http.HTTPError(response) + if (msg) { + // This is what rs-ipfs returns where there's a timeout + if (msg.includes('deadline has elapsed')) { + error = new http.TimeoutError() + } -/***/ }), + // This is what go-ipfs returns where there's a timeout + if (msg && msg.includes('context deadline exceeded')) { + error = new http.TimeoutError() + } + } -/***/ 81168: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // This also gets returned + if (msg && msg.includes('request timed out')) { + error = new http.TimeoutError() + } -"use strict"; + // If we managed to extract a message from the response, use it + if (msg) { + error.message = msg + } + throw error +} -Object.defineProperty(exports, "__esModule", ({ value: true })); +const KEBAB_REGEX = /[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g -var bytes = __nccwpck_require__(16570); -var varint = __nccwpck_require__(55687); +/** + * @param {string} str + */ +const kebabCase = (str) => { + return str.replace(KEBAB_REGEX, function (match) { + return '-' + match.toLowerCase() + }) +} -const create = (code, digest) => { - const size = digest.byteLength; - const sizeOffset = varint.encodingLength(code); - const digestOffset = sizeOffset + varint.encodingLength(size); - const bytes = new Uint8Array(digestOffset + size); - varint.encodeTo(code, bytes, 0); - varint.encodeTo(size, bytes, sizeOffset); - bytes.set(digest, digestOffset); - return new Digest(code, size, digest, bytes); -}; -const decode = multihash => { - const bytes$1 = bytes.coerce(multihash); - const [code, sizeOffset] = varint.decode(bytes$1); - const [size, digestOffset] = varint.decode(bytes$1.subarray(sizeOffset)); - const digest = bytes$1.subarray(sizeOffset + digestOffset); - if (digest.byteLength !== size) { - throw new Error('Incorrect length'); - } - return new Digest(code, size, digest, bytes$1); -}; -const equals = (a, b) => { - if (a === b) { - return true; - } else { - return a.code === b.code && a.size === b.size && bytes.equals(a.bytes, b.bytes); - } -}; -class Digest { - constructor(code, size, digest, bytes) { - this.code = code; - this.size = size; - this.digest = digest; - this.bytes = bytes; - } +/** + * @param {string | number} value + */ +const parseTimeout = (value) => { + return typeof value === 'string' ? parse_duration(value) : value } -exports.Digest = Digest; -exports.create = create; -exports.decode = decode; -exports.equals = equals; +class Client extends http { + /** + * @param {Options|URL|Multiaddr|string} [options] + */ + constructor (options = {}) { + const opts = normalizeOptions(options) + super({ + timeout: parseTimeout(opts.timeout || 0) || undefined, + headers: opts.headers, + base: `${opts.url}`, + handleError: errorHandler, + transformSearchParams: (search) => { + const out = new URLSearchParams() -/***/ }), + for (const [key, value] of search) { + if ( + value !== 'undefined' && + value !== 'null' && + key !== 'signal' + ) { + out.append(kebabCase(key), value) + } -/***/ 62030: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // @ts-expect-error server timeouts are strings + if (key === 'timeout' && !isNaN(value)) { + out.append(kebabCase(key), value) + } + } -"use strict"; + return out + }, + // @ts-expect-error this can be a https agent or a http agent + agent: opts.agent + }) + // @ts-expect-error - cannot delete no-optional fields + delete this.get + // @ts-expect-error - cannot delete no-optional fields + delete this.put + // @ts-expect-error - cannot delete no-optional fields + delete this.delete + // @ts-expect-error - cannot delete no-optional fields + delete this.options -Object.defineProperty(exports, "__esModule", ({ value: true })); + const fetch = this.fetch -var digest = __nccwpck_require__(81168); + /** + * @param {string | Request} resource + * @param {import('../types').HTTPOptions} options + */ + this.fetch = (resource, options = {}) => { + if (typeof resource === 'string' && !resource.startsWith('/')) { + resource = `${opts.url}/${resource}` + } -const from = ({name, code, encode}) => new Hasher(name, code, encode); -class Hasher { - constructor(name, code, encode) { - this.name = name; - this.code = code; - this.encode = encode; - } - digest(input) { - if (input instanceof Uint8Array) { - const result = this.encode(input); - return result instanceof Uint8Array ? digest.create(this.code, result) : result.then(digest$1 => digest.create(this.code, digest$1)); - } else { - throw Error('Unknown type, must be binary type'); + return fetch.call(this, resource, core_merge(options, { + method: 'POST' + })) } } } -exports.Hasher = Hasher; -exports.from = from; +const HTTPError = http.HTTPError +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/configure.js +/* eslint-env browser */ -/***/ }), -/***/ 53863: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/** + * Set default configuration and call create function with them + * + * @template T + * @param {import('../types').ConfigureFn} fn + * @returns {import('../types').ConfigureFactory} + */ +const configure = (fn) => { + return (options) => { + return fn(new Client(options), options) + } +} -"use strict"; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/mode-to-string.js +/** + * @param {number | string | undefined} mode + */ +function modeToString (mode) { + if (mode == null) { + return undefined + } -Object.defineProperty(exports, "__esModule", ({ value: true })); + if (typeof mode === 'string') { + return mode + } -var bytes = __nccwpck_require__(16570); -var digest$1 = __nccwpck_require__(81168); + return mode.toString(8).padStart(4, '0') +} -const code = 0; -const name = 'identity'; -const encode = bytes.coerce; -const digest = input => digest$1.create(code, encode(input)); -const identity = { - code, - name, - encode, - digest -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/parse-mtime.js -exports.identity = identity; +/** + * @param {any} input + */ +function parseMtime (input) { + if (input == null) { + return undefined + } -/***/ }), + /** @type {{ secs: number, nsecs?: number } | undefined} */ + let mtime -/***/ 80960: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + // { secs, nsecs } + if (input.secs != null) { + mtime = { + secs: input.secs, + nsecs: input.nsecs + } + } -"use strict"; + // UnixFS TimeSpec + if (input.Seconds != null) { + mtime = { + secs: input.Seconds, + nsecs: input.FractionalNanoseconds + } + } + // process.hrtime() + if (Array.isArray(input)) { + mtime = { + secs: input[0], + nsecs: input[1] + } + } -Object.defineProperty(exports, "__esModule", ({ value: true })); + // Javascript Date + if (input instanceof Date) { + const ms = input.getTime() + const secs = Math.floor(ms / 1000) -var crypto = __nccwpck_require__(6113); -var hasher = __nccwpck_require__(62030); -var bytes = __nccwpck_require__(16570); + mtime = { + secs, + nsecs: (ms - (secs * 1000)) * 1000 + } + } -function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + /* + TODO: https://github.com/ipfs/aegir/issues/487 -var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto); + // process.hrtime.bigint() + if (input instanceof BigInt) { + const secs = input / BigInt(1e9) + const nsecs = input - (secs * BigInt(1e9)) -const sha256 = hasher.from({ - name: 'sha2-256', - code: 18, - encode: input => bytes.coerce(crypto__default["default"].createHash('sha256').update(input).digest()) -}); -const sha512 = hasher.from({ - name: 'sha2-512', - code: 19, - encode: input => bytes.coerce(crypto__default["default"].createHash('sha512').update(input).digest()) -}); + mtime = { + secs: parseInt(secs.toString()), + nsecs: parseInt(nsecs.toString()) + } + } + */ -exports.sha256 = sha256; -exports.sha512 = sha512; + if (!Object.prototype.hasOwnProperty.call(mtime, 'secs')) { + return undefined + } + if (mtime != null && mtime.nsecs != null && (mtime.nsecs < 0 || mtime.nsecs > 999999999)) { + throw err_code(new Error('mtime-nsecs must be within the range [0,999999999]'), 'ERR_INVALID_MTIME_NSECS') + } -/***/ }), + return mtime +} -/***/ 27331: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/to-url-search-params.js -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); +/** + * @param {*} params + * @returns {URLSearchParams} + */ +function toUrlSearchParams ({ arg, searchParams, hashAlg, mtime, mode, ...options } = {}) { + if (searchParams) { + options = { + ...options, + ...searchParams + } + } -var cid = __nccwpck_require__(24247); -var varint = __nccwpck_require__(55687); -var bytes = __nccwpck_require__(16570); -var hasher = __nccwpck_require__(62030); -var digest = __nccwpck_require__(81168); + if (hashAlg) { + options.hash = hashAlg + } + if (mtime != null) { + mtime = parseMtime(mtime) + options.mtime = mtime.secs + options.mtimeNsecs = mtime.nsecs + } -exports.CID = cid.CID; -exports.varint = varint; -exports.bytes = bytes; -exports.hasher = hasher; -exports.digest = digest; + if (mode != null) { + options.mode = modeToString(mode) + } + if (options.timeout && !isNaN(options.timeout)) { + // server API expects timeouts as strings + options.timeout = `${options.timeout}ms` + } -/***/ }), + if (arg === undefined || arg === null) { + arg = [] + } else if (!Array.isArray(arg)) { + arg = [arg] + } -/***/ 55687: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + const urlSearchParams = new URLSearchParams(options) -"use strict"; + arg.forEach((/** @type {any} */ arg) => urlSearchParams.append('arg', arg)) + return urlSearchParams +} -Object.defineProperty(exports, "__esModule", ({ value: true })); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/bitswap/wantlist.js -var varint$1 = __nccwpck_require__(55250); -const decode = data => { - const code = varint$1.decode(data); - return [ - code, - varint$1.decode.bytes - ]; -}; -const encodeTo = (int, target, offset = 0) => { - varint$1.encode(int, target, offset); - return target; -}; -const encodingLength = int => { - return varint$1.encodingLength(int); -}; -exports.decode = decode; -exports.encodeTo = encodeTo; -exports.encodingLength = encodingLength; +const createWantlist = configure(api => { + /** + * @type {import('../types').BitswapAPI["wantlist"]} + */ + async function wantlist (options = {}) { + const res = await (await api.post('bitswap/wantlist', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + })).json() -/***/ }), + return (res.Keys || []).map((/** @type {{ '/': string }} */ k) => node_modules_multiformats_src_cid_CID.parse(k['/'])) + } + return wantlist +}) -/***/ 21357: -/***/ ((module) => { +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/bitswap/wantlist-for-peer.js -"use strict"; -function base(ALPHABET, name) { - if (ALPHABET.length >= 255) { - throw new TypeError('Alphabet too long'); + +const createWantlistForPeer = configure(api => { + /** + * @type {import('../types').BitswapAPI["wantlistForPeer"]} + */ + async function wantlistForPeer (peerId, options = {}) { + const res = await (await api.post('bitswap/wantlist', { + signal: options.signal, + searchParams: toUrlSearchParams({ + ...options, + peer: peerId.toString() + }), + headers: options.headers + })).json() + + return (res.Keys || []).map((/** @type {{ '/': string }} */ k) => node_modules_multiformats_src_cid_CID.parse(k['/'])) } + return wantlistForPeer +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/interface-peer-id/dist/src/index.js +const dist_src_symbol = Symbol.for('@libp2p/peer-id'); +function src_isPeerId(other) { + return other != null && Boolean(other[dist_src_symbol]); +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@libp2p/interfaces/dist/src/errors.js +/** + * When this error is thrown it means an operation was aborted, + * usually in response to the `abort` event being emitted by an + * AbortSignal. + */ +class errors_AbortError extends Error { + code; + type; + constructor(message = 'The operation was aborted') { + super(message); + this.code = errors_AbortError.code; + this.type = errors_AbortError.type; + } + static code = (/* unused pure expression or super */ null && ('ABORT_ERR')); + static type = (/* unused pure expression or super */ null && ('aborted')); +} +class src_errors_CodeError extends Error { + code; + props; + constructor(message, code, props) { + super(message); + this.code = code; + this.name = props?.name ?? 'CodeError'; + this.props = props ?? {}; // eslint-disable-line @typescript-eslint/consistent-type-assertions + } +} +//# sourceMappingURL=errors.js.map +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function peer_id_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } var BASE_MAP = new Uint8Array(256); for (var j = 0; j < BASE_MAP.length; j++) { BASE_MAP[j] = 255; @@ -115062,28 +228930,22 @@ function base(ALPHABET, name) { for (var i = 0; i < ALPHABET.length; i++) { var x = ALPHABET.charAt(i); var xc = x.charCodeAt(0); - if (BASE_MAP[xc] !== 255) { - throw new TypeError(x + ' is ambiguous'); - } + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } BASE_MAP[xc] = i; } var BASE = ALPHABET.length; var LEADER = ALPHABET.charAt(0); - var FACTOR = Math.log(BASE) / Math.log(256); - var iFACTOR = Math.log(256) / Math.log(BASE); - function encode(source) { - if (source instanceof Uint8Array); - else if (ArrayBuffer.isView(source)) { + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); } else if (Array.isArray(source)) { source = Uint8Array.from(source); } - if (!(source instanceof Uint8Array)) { - throw new TypeError('Expected Uint8Array'); - } - if (source.length === 0) { - return ''; - } + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. var zeroes = 0; var length = 0; var pbegin = 0; @@ -115092,71 +228954,68 @@ function base(ALPHABET, name) { pbegin++; zeroes++; } - var size = (pend - pbegin) * iFACTOR + 1 >>> 0; + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; var b58 = new Uint8Array(size); + // Process the bytes. while (pbegin !== pend) { var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". var i = 0; - for (var it1 = size - 1; (carry !== 0 || i < length) && it1 !== -1; it1--, i++) { - carry += 256 * b58[it1] >>> 0; - b58[it1] = carry % BASE >>> 0; - carry = carry / BASE >>> 0; - } - if (carry !== 0) { - throw new Error('Non-zero carry'); + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; } + if (carry !== 0) { throw new Error('Non-zero carry') } length = i; pbegin++; } + // Skip leading zeroes in base58 result. var it2 = size - length; while (it2 !== size && b58[it2] === 0) { it2++; } + // Translate the result into a string. var str = LEADER.repeat(zeroes); - for (; it2 < size; ++it2) { - str += ALPHABET.charAt(b58[it2]); - } - return str; + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str } - function decodeUnsafe(source) { - if (typeof source !== 'string') { - throw new TypeError('Expected String'); - } - if (source.length === 0) { - return new Uint8Array(); - } + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } var psz = 0; - if (source[psz] === ' ') { - return; - } + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. var zeroes = 0; var length = 0; while (source[psz] === LEADER) { zeroes++; psz++; } - var size = (source.length - psz) * FACTOR + 1 >>> 0; + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. var b256 = new Uint8Array(size); + // Process the characters. while (source[psz]) { + // Decode character var carry = BASE_MAP[source.charCodeAt(psz)]; - if (carry === 255) { - return; - } + // Invalid character + if (carry === 255) { return } var i = 0; - for (var it3 = size - 1; (carry !== 0 || i < length) && it3 !== -1; it3--, i++) { - carry += BASE * b256[it3] >>> 0; - b256[it3] = carry % 256 >>> 0; - carry = carry / 256 >>> 0; - } - if (carry !== 0) { - throw new Error('Non-zero carry'); + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; } + if (carry !== 0) { throw new Error('Non-zero carry') } length = i; psz++; } - if (source[psz] === ' ') { - return; - } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. var it4 = size - length; while (it4 !== size && b256[it4] === 0) { it4++; @@ -115166,28891 +229025,46308 @@ function base(ALPHABET, name) { while (it4 !== size) { vch[j++] = b256[it4++]; } - return vch; + return vch } - function decode(string) { + function decode (string) { var buffer = decodeUnsafe(string); - if (buffer) { - return buffer; - } - throw new Error(`Non-${ name } character`); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) } return { encode: encode, decodeUnsafe: decodeUnsafe, decode: decode - }; + } } -var src = base; -var _brrp__multiformats_scope_baseX = src; +var peer_id_node_modules_multiformats_vendor_base_x_src = peer_id_node_modules_multiformats_vendor_base_x_base; -module.exports = _brrp__multiformats_scope_baseX; +var peer_id_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = peer_id_node_modules_multiformats_vendor_base_x_src; +/* harmony default export */ const peer_id_node_modules_multiformats_vendor_base_x = (peer_id_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); -/***/ }), +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bytes.js +const peer_id_node_modules_multiformats_src_bytes_empty = new Uint8Array(0) -/***/ 55250: -/***/ ((module) => { +/** + * @param {Uint8Array} d + */ +const peer_id_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') -"use strict"; +/** + * @param {string} hex + */ +const peer_id_node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : peer_id_node_modules_multiformats_src_bytes_empty +} +/** + * @param {Uint8Array} aa + * @param {Uint8Array} bb + */ +const peer_id_node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false + } -var encode_1 = encode; -var MSB = 128, REST = 127, MSBALL = ~REST, INT = Math.pow(2, 31); -function encode(num, out, offset) { + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false + } + } + + return true +} + +/** + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} + */ +const peer_id_node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) + } + throw new Error('Unknown type, must be binary type') +} + +/** + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} + */ +const peer_id_node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) + +/** + * @param {string} str + * @returns {Uint8Array} + */ +const peer_id_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) + +/** + * @param {Uint8Array} b + * @returns {string} + */ +const peer_id_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) + + + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base.js + + +// Linter can't see that API is used in types. +// eslint-disable-next-line + + +/** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} + */ +class peer_id_node_modules_multiformats_src_bases_base_Encoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + */ + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + } + + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') + } + } +} + +/** + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} + */ +class peer_id_node_modules_multiformats_src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') + } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode + } + + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) + } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') + } + } + + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return peer_id_node_modules_multiformats_src_bases_base_or(this, decoder) + } +} + +/** + * @template {string} Prefix + * @typedef {Record>} Decoders + */ + +/** + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} + */ +class peer_id_node_modules_multiformats_src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders + } + + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return peer_id_node_modules_multiformats_src_bases_base_or(this, decoder) + } + + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) + } + } +} + +/** + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} + */ +const peer_id_node_modules_multiformats_src_bases_base_or = (left, right) => new peer_id_node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) + +/** + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} + */ +class peer_id_node_modules_multiformats_src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new peer_id_node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new peer_id_node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode) + } + + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) + } + + /** + * @param {string} input + */ + decode (input) { + return this.decoder.decode(input) + } +} + +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} + */ +const peer_id_node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new peer_id_node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode) + +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} + */ +const peer_id_node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = peer_id_node_modules_multiformats_vendor_base_x(alphabet, name) + return peer_id_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => peer_id_node_modules_multiformats_src_bytes_coerce(decode(text)) + }) +} + +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const peer_id_node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i + } + + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end + } + + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) + + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) + } + + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar + + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) + } + } + + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') + } + + return out +} + +/** + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} + */ +const peer_id_node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' + + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 + + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] + } + } + + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] + } + + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' + } + } + + return out +} + +/** + * RFC4648 Factory + * + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar + */ +const peer_id_node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return peer_id_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return peer_id_node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return peer_id_node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) + } + }) +} + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base58.js + + +const peer_id_node_modules_multiformats_src_bases_base58_base58btc = peer_id_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) + +const peer_id_node_modules_multiformats_src_bases_base58_base58flickr = peer_id_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/identity.js +// @ts-check + + + + +const peer_id_node_modules_multiformats_src_bases_identity_identity = peer_id_node_modules_multiformats_src_bases_base_from({ + prefix: '\x00', + name: 'identity', + encode: (buf) => peer_id_node_modules_multiformats_src_bytes_toString(buf), + decode: (str) => peer_id_node_modules_multiformats_src_bytes_fromString(str) +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base2.js +// @ts-check + + + +const multiformats_src_bases_base2_base2 = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base8.js +// @ts-check + + + +const multiformats_src_bases_base8_base8 = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base10.js + + +const multiformats_src_bases_base10_base10 = peer_id_node_modules_multiformats_src_bases_base_baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base16.js +// @ts-check + + + +const multiformats_src_bases_base16_base16 = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'f', + name: 'base16', + alphabet: '0123456789abcdef', + bitsPerChar: 4 +}) + +const multiformats_src_bases_base16_base16upper = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'F', + name: 'base16upper', + alphabet: '0123456789ABCDEF', + bitsPerChar: 4 +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base32.js + + +const peer_id_node_modules_multiformats_src_bases_base32_base32 = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) + +const peer_id_node_modules_multiformats_src_bases_base32_base32upper = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) + +const peer_id_node_modules_multiformats_src_bases_base32_base32pad = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) + +const peer_id_node_modules_multiformats_src_bases_base32_base32padupper = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) + +const peer_id_node_modules_multiformats_src_bases_base32_base32hex = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) + +const peer_id_node_modules_multiformats_src_bases_base32_base32hexupper = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) + +const peer_id_node_modules_multiformats_src_bases_base32_base32hexpad = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) + +const peer_id_node_modules_multiformats_src_bases_base32_base32hexpadupper = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) + +const peer_id_node_modules_multiformats_src_bases_base32_base32z = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base36.js + + +const multiformats_src_bases_base36_base36 = peer_id_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}) + +const multiformats_src_bases_base36_base36upper = peer_id_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base64.js +// @ts-check + + + +const peer_id_node_modules_multiformats_src_bases_base64_base64 = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) + +const peer_id_node_modules_multiformats_src_bases_base64_base64pad = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) + +const peer_id_node_modules_multiformats_src_bases_base64_base64url = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) + +const peer_id_node_modules_multiformats_src_bases_base64_base64urlpad = peer_id_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/bases/base256emoji.js + + +const multiformats_src_bases_base256emoji_alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂') +const multiformats_src_bases_base256emoji_alphabetBytesToChars = /** @type {string[]} */ (multiformats_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[i] = c; return p }, /** @type {string[]} */([]))) +const multiformats_src_bases_base256emoji_alphabetCharsToBytes = /** @type {number[]} */ (multiformats_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[/** @type {number} */ (c.codePointAt(0))] = i; return p }, /** @type {number[]} */([]))) + +/** + * @param {Uint8Array} data + * @returns {string} + */ +function node_modules_multiformats_src_bases_base256emoji_encode (data) { + return data.reduce((p, c) => { + p += multiformats_src_bases_base256emoji_alphabetBytesToChars[c] + return p + }, '') +} + +/** + * @param {string} str + * @returns {Uint8Array} + */ +function node_modules_multiformats_src_bases_base256emoji_decode (str) { + const byts = [] + for (const char of str) { + const byt = multiformats_src_bases_base256emoji_alphabetCharsToBytes[/** @type {number} */ (char.codePointAt(0))] + if (byt === undefined) { + throw new Error(`Non-base256emoji character: ${char}`) + } + byts.push(byt) + } + return new Uint8Array(byts) +} + +const multiformats_src_bases_base256emoji_base256emoji = peer_id_node_modules_multiformats_src_bases_base_from({ + prefix: '🚀', + name: 'base256emoji', + encode: node_modules_multiformats_src_bases_base256emoji_encode, + decode: node_modules_multiformats_src_bases_base256emoji_decode +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/vendor/varint.js +var peer_id_node_modules_multiformats_vendor_varint_encode_1 = peer_id_node_modules_multiformats_vendor_varint_encode; + +var peer_id_node_modules_multiformats_vendor_varint_MSB = 0x80 + , peer_id_node_modules_multiformats_vendor_varint_REST = 0x7F + , peer_id_node_modules_multiformats_vendor_varint_MSBALL = ~peer_id_node_modules_multiformats_vendor_varint_REST + , peer_id_node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31); + +function peer_id_node_modules_multiformats_vendor_varint_encode(num, out, offset) { out = out || []; offset = offset || 0; var oldOffset = offset; - while (num >= INT) { - out[offset++] = num & 255 | MSB; + + while(num >= peer_id_node_modules_multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | peer_id_node_modules_multiformats_vendor_varint_MSB; num /= 128; } - while (num & MSBALL) { - out[offset++] = num & 255 | MSB; + while(num & peer_id_node_modules_multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | peer_id_node_modules_multiformats_vendor_varint_MSB; num >>>= 7; } out[offset] = num | 0; - encode.bytes = offset - oldOffset + 1; - return out; + + peer_id_node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out } -var decode = read; -var MSB$1 = 128, REST$1 = 127; -function read(buf, offset) { - var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + +var peer_id_node_modules_multiformats_vendor_varint_decode = peer_id_node_modules_multiformats_vendor_varint_read; + +var peer_id_node_modules_multiformats_vendor_varint_MSB$1 = 0x80 + , peer_id_node_modules_multiformats_vendor_varint_REST$1 = 0x7F; + +function peer_id_node_modules_multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; + do { if (counter >= l) { - read.bytes = 0; - throw new RangeError('Could not decode varint'); + peer_id_node_modules_multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') } b = buf[counter++]; - res += shift < 28 ? (b & REST$1) << shift : (b & REST$1) * Math.pow(2, shift); + res += shift < 28 + ? (b & peer_id_node_modules_multiformats_vendor_varint_REST$1) << shift + : (b & peer_id_node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift); shift += 7; - } while (b >= MSB$1); - read.bytes = counter - offset; - return res; + } while (b >= peer_id_node_modules_multiformats_vendor_varint_MSB$1) + + peer_id_node_modules_multiformats_vendor_varint_read.bytes = counter - offset; + + return res } -var N1 = Math.pow(2, 7); -var N2 = Math.pow(2, 14); -var N3 = Math.pow(2, 21); -var N4 = Math.pow(2, 28); -var N5 = Math.pow(2, 35); -var N6 = Math.pow(2, 42); -var N7 = Math.pow(2, 49); -var N8 = Math.pow(2, 56); -var N9 = Math.pow(2, 63); -var length = function (value) { - return value < N1 ? 1 : value < N2 ? 2 : value < N3 ? 3 : value < N4 ? 4 : value < N5 ? 5 : value < N6 ? 6 : value < N7 ? 7 : value < N8 ? 8 : value < N9 ? 9 : 10; + +var peer_id_node_modules_multiformats_vendor_varint_N1 = Math.pow(2, 7); +var peer_id_node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14); +var peer_id_node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21); +var peer_id_node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28); +var peer_id_node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35); +var peer_id_node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42); +var peer_id_node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49); +var peer_id_node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56); +var peer_id_node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63); + +var peer_id_node_modules_multiformats_vendor_varint_length = function (value) { + return ( + value < peer_id_node_modules_multiformats_vendor_varint_N1 ? 1 + : value < peer_id_node_modules_multiformats_vendor_varint_N2 ? 2 + : value < peer_id_node_modules_multiformats_vendor_varint_N3 ? 3 + : value < peer_id_node_modules_multiformats_vendor_varint_N4 ? 4 + : value < peer_id_node_modules_multiformats_vendor_varint_N5 ? 5 + : value < peer_id_node_modules_multiformats_vendor_varint_N6 ? 6 + : value < peer_id_node_modules_multiformats_vendor_varint_N7 ? 7 + : value < peer_id_node_modules_multiformats_vendor_varint_N8 ? 8 + : value < peer_id_node_modules_multiformats_vendor_varint_N9 ? 9 + : 10 + ) }; -var varint = { - encode: encode_1, - decode: decode, - encodingLength: length + +var peer_id_node_modules_multiformats_vendor_varint_varint = { + encode: peer_id_node_modules_multiformats_vendor_varint_encode_1 + , decode: peer_id_node_modules_multiformats_vendor_varint_decode + , encodingLength: peer_id_node_modules_multiformats_vendor_varint_length }; -var _brrp_varint = varint; -var varint$1 = _brrp_varint; -module.exports = varint$1; +var peer_id_node_modules_multiformats_vendor_varint_brrp_varint = peer_id_node_modules_multiformats_vendor_varint_varint; +/* harmony default export */ const peer_id_node_modules_multiformats_vendor_varint = (peer_id_node_modules_multiformats_vendor_varint_brrp_varint); -/***/ }), +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/varint.js -/***/ 32924: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(62027); +/** + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} + */ +const peer_id_node_modules_multiformats_src_varint_decode = (data, offset = 0) => { + const code = peer_id_node_modules_multiformats_vendor_varint.decode(data, offset) + return [code, peer_id_node_modules_multiformats_vendor_varint.decode.bytes] +} +/** + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] + */ +const peer_id_node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + peer_id_node_modules_multiformats_vendor_varint.encode(int, target, offset) + return target +} -/***/ }), +/** + * @param {number} int + * @returns {number} + */ +const peer_id_node_modules_multiformats_src_varint_encodingLength = (int) => { + return peer_id_node_modules_multiformats_vendor_varint.encodingLength(int) +} -/***/ 62027: -/***/ (function(module, exports) { +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/hashes/digest.js -/* jshint -W086: true */ -// +----------------------------------------------------------------------+ -// | murmurHash3js.js v3.0.1 // https://github.com/pid/murmurHash3js -// | A javascript implementation of MurmurHash3's x86 hashing algorithms. | -// |----------------------------------------------------------------------| -// | Copyright (c) 2012-2015 Karan Lyons | -// | https://github.com/karanlyons/murmurHash3.js/blob/c1778f75792abef7bdd74bc85d2d4e1a3d25cfe9/murmurHash3.js | -// | Freely distributable under the MIT license. | -// +----------------------------------------------------------------------+ -;(function (root, undefined) { - 'use strict'; - // Create a local object that'll be exported or referenced globally. - var library = { - 'version': '3.0.0', - 'x86': {}, - 'x64': {}, - 'inputValidation': true - }; +/** + * Creates a multihash digest. + * + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest + */ +const peer_id_node_modules_multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = peer_id_node_modules_multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + peer_id_node_modules_multiformats_src_varint_encodingLength(size) - // PRIVATE FUNCTIONS - // ----------------- + const bytes = new Uint8Array(digestOffset + size) + peer_id_node_modules_multiformats_src_varint_encodeTo(code, bytes, 0) + peer_id_node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) - function _validBytes(bytes) { - // check the input is an array or a typed array - if (!Array.isArray(bytes) && !ArrayBuffer.isView(bytes)) { - return false; - } + return new peer_id_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} - // check all bytes are actually bytes - for (var i = 0; i < bytes.length; i++) { - if (!Number.isInteger(bytes[i]) || bytes[i] < 0 || bytes[i] > 255) { - return false; - } - } - return true; - } +/** + * Turns bytes representation of multihash digest into an instance. + * + * @param {Uint8Array} multihash + * @returns {MultihashDigest} + */ +const peer_id_node_modules_multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = peer_id_node_modules_multiformats_src_bytes_coerce(multihash) + const [code, sizeOffset] = peer_id_node_modules_multiformats_src_varint_decode(bytes) + const [size, digestOffset] = peer_id_node_modules_multiformats_src_varint_decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) - function _x86Multiply(m, n) { - // - // Given two 32bit ints, returns the two multiplied together as a - // 32bit int. - // + if (digest.byteLength !== size) { + throw new Error('Incorrect length') + } - return ((m & 0xffff) * n) + ((((m >>> 16) * n) & 0xffff) << 16); - } + return new peer_id_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} - function _x86Rotl(m, n) { - // - // Given a 32bit int and an int representing a number of bit positions, - // returns the 32bit int rotated left by that number of positions. - // +/** + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} + */ +const peer_id_node_modules_multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { + return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) - return (m << n) | (m >>> (32 - n)); - } + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + peer_id_node_modules_multiformats_src_bytes_equals(a.bytes, data.bytes) + ) + } +} - function _x86Fmix(h) { - // - // Given a block, returns murmurHash3's final x86 mix of that block. - // +/** + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest + */ - h ^= h >>> 16; - h = _x86Multiply(h, 0x85ebca6b); - h ^= h >>> 13; - h = _x86Multiply(h, 0xc2b2ae35); - h ^= h >>> 16; +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + * + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} + */ +class peer_id_node_modules_multiformats_src_hashes_digest_Digest { + /** + * Creates a multihash digest. + * + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes + */ + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes + } +} - return h; +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/hashes/hasher.js + + +/** + * @template {string} Name + * @template {number} Code + * @param {object} options + * @param {Name} options.name + * @param {Code} options.code + * @param {(input: Uint8Array) => Await} options.encode + */ +const peer_id_node_modules_multiformats_src_hashes_hasher_from = ({ name, code, encode }) => new node_modules_multiformats_src_hashes_hasher_Hasher(name, code, encode) + +/** + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. + * + * @template {string} Name + * @template {number} Code + * @class + * @implements {MultihashHasher} + */ +class node_modules_multiformats_src_hashes_hasher_Hasher { + /** + * + * @param {Name} name + * @param {Code} code + * @param {(input: Uint8Array) => Await} encode + */ + constructor (name, code, encode) { + this.name = name + this.code = code + this.encode = encode + } + + /** + * @param {Uint8Array} input + * @returns {Await>} + */ + digest (input) { + if (input instanceof Uint8Array) { + const result = this.encode(input) + return result instanceof Uint8Array + ? peer_id_node_modules_multiformats_src_hashes_digest_create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => peer_id_node_modules_multiformats_src_hashes_digest_create(this.code, digest)) + } else { + throw Error('Unknown type, must be binary type') + /* c8 ignore next 1 */ } + } +} - function _x64Add(m, n) { - // - // Given two 64bit ints (as an array of two 32bit ints) returns the two - // added together as a 64bit int (as an array of two 32bit ints). - // +/** + * @template {number} Alg + * @typedef {import('./interface.js').MultihashHasher} MultihashHasher + */ - m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]; - n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]; - var o = [0, 0, 0, 0]; +/** + * @template T + * @typedef {Promise|T} Await + */ - o[3] += m[3] + n[3]; - o[2] += o[3] >>> 16; - o[3] &= 0xffff; +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/hashes/sha2.js +// @ts-check - o[2] += m[2] + n[2]; - o[1] += o[2] >>> 16; - o[2] &= 0xffff; - o[1] += m[1] + n[1]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; - o[0] += m[0] + n[0]; - o[0] &= 0xffff; - return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]; - } - function _x64Multiply(m, n) { - // - // Given two 64bit ints (as an array of two 32bit ints) returns the two - // multiplied together as a 64bit int (as an array of two 32bit ints). - // +const node_modules_multiformats_src_hashes_sha2_sha256 = peer_id_node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-256', + code: 0x12, + encode: (input) => peer_id_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha256').update(input).digest()) +}) + +const multiformats_src_hashes_sha2_sha512 = peer_id_node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-512', + code: 0x13, + encode: input => peer_id_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha512').update(input).digest()) +}) + +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/hashes/identity.js + + + +const node_modules_multiformats_src_hashes_identity_code = 0x0 +const node_modules_multiformats_src_hashes_identity_name = 'identity' + +/** @type {(input:Uint8Array) => Uint8Array} */ +const node_modules_multiformats_src_hashes_identity_encode = peer_id_node_modules_multiformats_src_bytes_coerce + +/** + * @param {Uint8Array} input + * @returns {Digest.Digest} + */ +const multiformats_src_hashes_identity_digest = (input) => peer_id_node_modules_multiformats_src_hashes_digest_create(node_modules_multiformats_src_hashes_identity_code, node_modules_multiformats_src_hashes_identity_encode(input)) + +const node_modules_multiformats_src_hashes_identity_identity = { code: node_modules_multiformats_src_hashes_identity_code, name: node_modules_multiformats_src_hashes_identity_name, encode: node_modules_multiformats_src_hashes_identity_encode, digest: multiformats_src_hashes_identity_digest } - m = [m[0] >>> 16, m[0] & 0xffff, m[1] >>> 16, m[1] & 0xffff]; - n = [n[0] >>> 16, n[0] & 0xffff, n[1] >>> 16, n[1] & 0xffff]; - var o = [0, 0, 0, 0]; +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/codecs/raw.js +// @ts-check - o[3] += m[3] * n[3]; - o[2] += o[3] >>> 16; - o[3] &= 0xffff; - o[2] += m[2] * n[3]; - o[1] += o[2] >>> 16; - o[2] &= 0xffff; - o[2] += m[3] * n[2]; - o[1] += o[2] >>> 16; - o[2] &= 0xffff; +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ - o[1] += m[1] * n[3]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; +const node_modules_multiformats_src_codecs_raw_name = 'raw' +const node_modules_multiformats_src_codecs_raw_code = 0x55 - o[1] += m[2] * n[2]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; +/** + * @param {Uint8Array} node + * @returns {ByteView} + */ +const node_modules_multiformats_src_codecs_raw_encode = (node) => peer_id_node_modules_multiformats_src_bytes_coerce(node) - o[1] += m[3] * n[1]; - o[0] += o[1] >>> 16; - o[1] &= 0xffff; +/** + * @param {ByteView} data + * @returns {Uint8Array} + */ +const node_modules_multiformats_src_codecs_raw_decode = (data) => peer_id_node_modules_multiformats_src_bytes_coerce(data) - o[0] += (m[0] * n[3]) + (m[1] * n[2]) + (m[2] * n[1]) + (m[3] * n[0]); - o[0] &= 0xffff; +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/codecs/json.js +// @ts-check - return [(o[0] << 16) | o[1], (o[2] << 16) | o[3]]; - } +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ - function _x64Rotl(m, n) { - // - // Given a 64bit int (as an array of two 32bit ints) and an int - // representing a number of bit positions, returns the 64bit int (as an - // array of two 32bit ints) rotated left by that number of positions. - // +const node_modules_multiformats_src_codecs_json_textEncoder = new TextEncoder() +const node_modules_multiformats_src_codecs_json_textDecoder = new TextDecoder() - n %= 64; +const node_modules_multiformats_src_codecs_json_name = 'json' +const node_modules_multiformats_src_codecs_json_code = 0x0200 - if (n === 32) { - return [m[1], m[0]]; - } else if (n < 32) { - return [(m[0] << n) | (m[1] >>> (32 - n)), (m[1] << n) | (m[0] >>> (32 - n))]; - } else { - n -= 32; - return [(m[1] << n) | (m[0] >>> (32 - n)), (m[0] << n) | (m[1] >>> (32 - n))]; - } - } +/** + * @template T + * @param {T} node + * @returns {ByteView} + */ +const node_modules_multiformats_src_codecs_json_encode = (node) => node_modules_multiformats_src_codecs_json_textEncoder.encode(JSON.stringify(node)) - function _x64LeftShift(m, n) { - // - // Given a 64bit int (as an array of two 32bit ints) and an int - // representing a number of bit positions, returns the 64bit int (as an - // array of two 32bit ints) shifted left by that number of positions. - // +/** + * @template T + * @param {ByteView} data + * @returns {T} + */ +const node_modules_multiformats_src_codecs_json_decode = (data) => JSON.parse(node_modules_multiformats_src_codecs_json_textDecoder.decode(data)) - n %= 64; +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/cid.js - if (n === 0) { - return m; - } else if (n < 32) { - return [(m[0] << n) | (m[1] >>> (32 - n)), m[1] << n]; - } else { - return [m[1] << (n - 32), 0]; - } - } - function _x64Xor(m, n) { - // - // Given two 64bit ints (as an array of two 32bit ints) returns the two - // xored together as a 64bit int (as an array of two 32bit ints). - // - return [m[0] ^ n[0], m[1] ^ n[1]]; - } - function _x64Fmix(h) { - // - // Given a block, returns murmurHash3's final x64 mix of that block. - // (`[0, h[0] >>> 1]` is a 33 bit unsigned right shift. This is the - // only place where we need to right shift 64bit ints.) - // - h = _x64Xor(h, [0, h[0] >>> 1]); - h = _x64Multiply(h, [0xff51afd7, 0xed558ccd]); - h = _x64Xor(h, [0, h[0] >>> 1]); - h = _x64Multiply(h, [0xc4ceb9fe, 0x1a85ec53]); - h = _x64Xor(h, [0, h[0] >>> 1]); +// Linter can see that API is used in types. +// eslint-disable-next-line - return h; - } - // PUBLIC FUNCTIONS - // ---------------- +// This way TS will also expose all the types from module - library.x86.hash32 = function (bytes, seed) { - // - // Given a string and an optional seed as an int, returns a 32 bit hash - // using the x86 flavor of MurmurHash3, as an unsigned int. - // - if (library.inputValidation && !_validBytes(bytes)) { - return undefined; - } - seed = seed || 0; - var remainder = bytes.length % 4; - var blocks = bytes.length - remainder; +/** + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} + */ +const peer_id_node_modules_multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return peer_id_node_modules_multiformats_src_cid_toStringV0( + bytes, + peer_id_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || peer_id_node_modules_multiformats_src_bases_base58_base58btc.encoder + ) + default: + return peer_id_node_modules_multiformats_src_cid_toStringV1( + bytes, + peer_id_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || peer_id_node_modules_multiformats_src_bases_base32_base32.encoder) + ) + } +} - var h1 = seed; +/** + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} + */ +const peer_id_node_modules_multiformats_src_cid_toJSON = (link) => ({ + '/': peer_id_node_modules_multiformats_src_cid_format(link) +}) - var k1 = 0; +/** + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json + */ +const peer_id_node_modules_multiformats_src_cid_fromJSON = (json) => + peer_id_node_modules_multiformats_src_cid_CID.parse(json['/']) - var c1 = 0xcc9e2d51; - var c2 = 0x1b873593; +/** @type {WeakMap>} */ +const peer_id_node_modules_multiformats_src_cid_cache = new WeakMap() - for (var i = 0; i < blocks; i = i + 4) { - k1 = (bytes[i]) | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24); +/** + * @param {API.UnknownLink} cid + * @returns {Map} + */ +const peer_id_node_modules_multiformats_src_cid_baseCache = cid => { + const baseCache = peer_id_node_modules_multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + peer_id_node_modules_multiformats_src_cid_cache.set(cid, baseCache) + return baseCache + } + return baseCache +} - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); +/** + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} + */ - h1 ^= k1; - h1 = _x86Rotl(h1, 13); - h1 = _x86Multiply(h1, 5) + 0xe6546b64; - } +class peer_id_node_modules_multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + * + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes - k1 = 0; + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes + } - switch (remainder) { - case 3: - k1 ^= bytes[i + 2] << 16; + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this + } - case 2: - k1 ^= bytes[i + 1] << 8; + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset + } - case 1: - k1 ^= bytes[i]; - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - } + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } - h1 ^= bytes.length; - h1 = _x86Fmix(h1); + /** + * @returns {CID} + */ + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) + } + case 1: { + const { code, multihash } = this - return h1 >>> 0; - }; + if (code !== peer_id_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } - library.x86.hash128 = function (bytes, seed) { - // - // Given a string and an optional seed as an int, returns a 128 bit - // hash using the x86 flavor of MurmurHash3, as an unsigned hex. - // - if (library.inputValidation && !_validBytes(bytes)) { - return undefined; + // sha2-256 + if (multihash.code !== peer_id_node_modules_multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') } - seed = seed || 0; - var remainder = bytes.length % 16; - var blocks = bytes.length - remainder; + return /** @type {CID} */ ( + peer_id_node_modules_multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) + } + } + } - var h1 = seed; - var h2 = seed; - var h3 = seed; - var h4 = seed; + /** + * @returns {CID} + */ + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = peer_id_node_modules_multiformats_src_hashes_digest_create(code, digest) + return /** @type {CID} */ ( + peer_id_node_modules_multiformats_src_cid_CID.createV1(this.code, multihash) + ) + } + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) + } + } + } - var k1 = 0; - var k2 = 0; - var k3 = 0; - var k4 = 0; + /** + * @param {unknown} other + * @returns {other is CID} + */ + equals (other) { + return peer_id_node_modules_multiformats_src_cid_CID.equals(this, other) + } - var c1 = 0x239b961b; - var c2 = 0xab0e9789; - var c3 = 0x38b34ae5; - var c4 = 0xa1e38b93; + /** + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} + */ + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + peer_id_node_modules_multiformats_src_hashes_digest_equals(self.multihash, unknown.multihash) + ) + } - for (var i = 0; i < blocks; i = i + 16) { - k1 = (bytes[i]) | (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24); - k2 = (bytes[i + 4]) | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24); - k3 = (bytes[i + 8]) | (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24); - k4 = (bytes[i + 12]) | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24); + /** + * @param {API.MultibaseEncoder} [base] + * @returns {string} + */ + toString (base) { + return peer_id_node_modules_multiformats_src_cid_format(this, base) + } - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; + toJSON () { + return { '/': peer_id_node_modules_multiformats_src_cid_format(this) } + } - h1 = _x86Rotl(h1, 19); - h1 += h2; - h1 = _x86Multiply(h1, 5) + 0x561ccd1b; + link () { + return this + } - k2 = _x86Multiply(k2, c2); - k2 = _x86Rotl(k2, 16); - k2 = _x86Multiply(k2, c3); - h2 ^= k2; + get [Symbol.toStringTag] () { + return 'CID' + } - h2 = _x86Rotl(h2, 17); - h2 += h3; - h2 = _x86Multiply(h2, 5) + 0x0bcaa747; + // Legacy - k3 = _x86Multiply(k3, c3); - k3 = _x86Rotl(k3, 17); - k3 = _x86Multiply(k3, c4); - h3 ^= k3; + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` + } - h3 = _x86Rotl(h3, 15); - h3 += h4; - h3 = _x86Multiply(h3, 5) + 0x96cd1c35; + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} + */ + static asCID (input) { + if (input == null) { + return null + } - k4 = _x86Multiply(k4, c4); - k4 = _x86Rotl(k4, 18); - k4 = _x86Multiply(k4, c1); - h4 ^= k4; + const value = /** @type {any} */ (input) + if (value instanceof peer_id_node_modules_multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new peer_id_node_modules_multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || peer_id_node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[peer_id_node_modules_multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (peer_id_node_modules_multiformats_src_hashes_digest_decode(multihash)) + return peer_id_node_modules_multiformats_src_cid_CID.create(version, code, digest) + } else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null + } + } - h4 = _x86Rotl(h4, 13); - h4 += h1; - h4 = _x86Multiply(h4, 5) + 0x32ac3b17; - } + /** + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} + */ + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') + } - k1 = 0; - k2 = 0; - k3 = 0; - k4 = 0; + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } - switch (remainder) { - case 15: - k4 ^= bytes[i + 14] << 16; + switch (version) { + case 0: { + if (code !== peer_id_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${peer_id_node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new peer_id_node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes) + } + } + case 1: { + const bytes = peer_id_node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new peer_id_node_modules_multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') + } + } + } - case 14: - k4 ^= bytes[i + 13] << 8; + /** + * Simplified version of `create` for CIDv0. + * + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} + */ + static createV0 (digest) { + return peer_id_node_modules_multiformats_src_cid_CID.create(0, peer_id_node_modules_multiformats_src_cid_DAG_PB_CODE, digest) + } - case 13: - k4 ^= bytes[i + 12]; - k4 = _x86Multiply(k4, c4); - k4 = _x86Rotl(k4, 18); - k4 = _x86Multiply(k4, c1); - h4 ^= k4; + /** + * Simplified version of `create` for CIDv1. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} + */ + static createV1 (code, digest) { + return peer_id_node_modules_multiformats_src_cid_CID.create(1, code, digest) + } - case 12: - k3 ^= bytes[i + 11] << 24; + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} + */ + static decode (bytes) { + const [cid, remainder] = peer_id_node_modules_multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') + } + return cid + } - case 11: - k3 ^= bytes[i + 10] << 16; + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} + */ + static decodeFirst (bytes) { + const specs = peer_id_node_modules_multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = peer_id_node_modules_multiformats_src_bytes_coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') + } + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new peer_id_node_modules_multiformats_src_hashes_digest_Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? peer_id_node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : peer_id_node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] + } - case 10: - k3 ^= bytes[i + 9] << 8; + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} + */ + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = peer_id_node_modules_multiformats_src_varint_decode(initialBytes.subarray(offset)) + offset += length + return i + } - case 9: - k3 ^= bytes[i + 8]; - k3 = _x86Multiply(k3, c3); - k3 = _x86Rotl(k3, 17); - k3 = _x86Multiply(k3, c4); - h3 ^= k3; + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (peer_id_node_modules_multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 + } else { + codec = /** @type {C} */ (next()) + } - case 8: - k2 ^= bytes[i + 7] << 24; + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } - case 7: - k2 ^= bytes[i + 6] << 16; + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize - case 6: - k2 ^= bytes[i + 5] << 8; + return { version, codec, multihashCode, digestSize, multihashSize, size } + } - case 5: - k2 ^= bytes[i + 4]; - k2 = _x86Multiply(k2, c2); - k2 = _x86Rotl(k2, 16); - k2 = _x86Multiply(k2, c3); - h2 ^= k2; + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + * + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} + */ + static parse (source, base) { + const [prefix, bytes] = peer_id_node_modules_multiformats_src_cid_parseCIDtoBytes(source, base) - case 4: - k1 ^= bytes[i + 3] << 24; + const cid = peer_id_node_modules_multiformats_src_cid_CID.decode(bytes) - case 3: - k1 ^= bytes[i + 2] << 16; + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') + } - case 2: - k1 ^= bytes[i + 1] << 8; + // Cache string representation to avoid computing it on `this.toString()` + peer_id_node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source) - case 1: - k1 ^= bytes[i]; - k1 = _x86Multiply(k1, c1); - k1 = _x86Rotl(k1, 15); - k1 = _x86Multiply(k1, c2); - h1 ^= k1; - } + return cid + } +} - h1 ^= bytes.length; - h2 ^= bytes.length; - h3 ^= bytes.length; - h4 ^= bytes.length; +/** + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} + */ +const peer_id_node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || peer_id_node_modules_multiformats_src_bases_base58_base58btc + return [ + /** @type {Prefix} */ (peer_id_node_modules_multiformats_src_bases_base58_base58btc.prefix), + decoder.decode(`${peer_id_node_modules_multiformats_src_bases_base58_base58btc.prefix}${source}`) + ] + } + case peer_id_node_modules_multiformats_src_bases_base58_base58btc.prefix: { + const decoder = base || peer_id_node_modules_multiformats_src_bases_base58_base58btc + return [/** @type {Prefix} */(peer_id_node_modules_multiformats_src_bases_base58_base58btc.prefix), decoder.decode(source)] + } + case peer_id_node_modules_multiformats_src_bases_base32_base32.prefix: { + const decoder = base || peer_id_node_modules_multiformats_src_bases_base32_base32 + return [/** @type {Prefix} */(peer_id_node_modules_multiformats_src_bases_base32_base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) + } + return [/** @type {Prefix} */(source[0]), base.decode(source)] + } + } +} - h1 += h2; - h1 += h3; - h1 += h4; - h2 += h1; - h3 += h1; - h4 += h1; +/** + * + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base + */ +const peer_id_node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== peer_id_node_modules_multiformats_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) + } - h1 = _x86Fmix(h1); - h2 = _x86Fmix(h2); - h3 = _x86Fmix(h3); - h4 = _x86Fmix(h4); + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} - h1 += h2; - h1 += h3; - h1 += h4; - h2 += h1; - h3 += h1; - h4 += h1; +/** + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base + */ +const peer_id_node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} - return ("00000000" + (h1 >>> 0).toString(16)).slice(-8) + ("00000000" + (h2 >>> 0).toString(16)).slice(-8) + ("00000000" + (h3 >>> 0).toString(16)).slice(-8) + ("00000000" + (h4 >>> 0).toString(16)).slice(-8); - }; +const peer_id_node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70 +const peer_id_node_modules_multiformats_src_cid_SHA_256_CODE = 0x12 - library.x64.hash128 = function (bytes, seed) { - // - // Given a string and an optional seed as an int, returns a 128 bit - // hash using the x64 flavor of MurmurHash3, as an unsigned hex. - // - if (library.inputValidation && !_validBytes(bytes)) { - return undefined; - } - seed = seed || 0; +/** + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} + */ +const peer_id_node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = peer_id_node_modules_multiformats_src_varint_encodingLength(version) + const hashOffset = codeOffset + peer_id_node_modules_multiformats_src_varint_encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + peer_id_node_modules_multiformats_src_varint_encodeTo(version, bytes, 0) + peer_id_node_modules_multiformats_src_varint_encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes +} - var remainder = bytes.length % 16; - var blocks = bytes.length - remainder; +const peer_id_node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') - var h1 = [0, seed]; - var h2 = [0, seed]; +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/index.js - var k1 = [0, 0]; - var k2 = [0, 0]; - var c1 = [0x87c37b91, 0x114253d5]; - var c2 = [0x4cf5ad43, 0x2745937f]; - for (var i = 0; i < blocks; i = i + 16) { - k1 = [(bytes[i + 4]) | (bytes[i + 5] << 8) | (bytes[i + 6] << 16) | (bytes[i + 7] << 24), (bytes[i]) | - (bytes[i + 1] << 8) | (bytes[i + 2] << 16) | (bytes[i + 3] << 24)]; - k2 = [(bytes[i + 12]) | (bytes[i + 13] << 8) | (bytes[i + 14] << 16) | (bytes[i + 15] << 24), (bytes[i + 8]) | - (bytes[i + 9] << 8) | (bytes[i + 10] << 16) | (bytes[i + 11] << 24)]; - k1 = _x64Multiply(k1, c1); - k1 = _x64Rotl(k1, 31); - k1 = _x64Multiply(k1, c2); - h1 = _x64Xor(h1, k1); - h1 = _x64Rotl(h1, 27); - h1 = _x64Add(h1, h2); - h1 = _x64Add(_x64Multiply(h1, [0, 5]), [0, 0x52dce729]); +// This way TS will also expose all the types from module - k2 = _x64Multiply(k2, c2); - k2 = _x64Rotl(k2, 33); - k2 = _x64Multiply(k2, c1); - h2 = _x64Xor(h2, k2); - h2 = _x64Rotl(h2, 31); - h2 = _x64Add(h2, h1); - h2 = _x64Add(_x64Multiply(h2, [0, 5]), [0, 0x38495ab5]); - } - k1 = [0, 0]; - k2 = [0, 0]; - switch (remainder) { - case 15: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 14]], 48)); +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/multiformats/src/basics.js +// @ts-check - case 14: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 13]], 40)); - case 13: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 12]], 32)); - case 12: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 11]], 24)); - case 11: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 10]], 16)); - case 10: - k2 = _x64Xor(k2, _x64LeftShift([0, bytes[i + 9]], 8)); - case 9: - k2 = _x64Xor(k2, [0, bytes[i + 8]]); - k2 = _x64Multiply(k2, c2); - k2 = _x64Rotl(k2, 33); - k2 = _x64Multiply(k2, c1); - h2 = _x64Xor(h2, k2); - case 8: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 7]], 56)); - case 7: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 6]], 48)); - case 6: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 5]], 40)); - case 5: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 4]], 32)); - case 4: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 3]], 24)); - case 3: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 2]], 16)); - case 2: - k1 = _x64Xor(k1, _x64LeftShift([0, bytes[i + 1]], 8)); - case 1: - k1 = _x64Xor(k1, [0, bytes[i]]); - k1 = _x64Multiply(k1, c1); - k1 = _x64Rotl(k1, 31); - k1 = _x64Multiply(k1, c2); - h1 = _x64Xor(h1, k1); - } - h1 = _x64Xor(h1, [0, bytes.length]); - h2 = _x64Xor(h2, [0, bytes.length]); - h1 = _x64Add(h1, h2); - h2 = _x64Add(h2, h1); - h1 = _x64Fmix(h1); - h2 = _x64Fmix(h2); - h1 = _x64Add(h1, h2); - h2 = _x64Add(h2, h1); - return ("00000000" + (h1[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h1[1] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[0] >>> 0).toString(16)).slice(-8) + ("00000000" + (h2[1] >>> 0).toString(16)).slice(-8); - }; +const node_modules_multiformats_src_basics_bases = { ...peer_id_node_modules_multiformats_src_bases_identity_namespaceObject, ...node_modules_multiformats_src_bases_base2_namespaceObject, ...node_modules_multiformats_src_bases_base8_namespaceObject, ...node_modules_multiformats_src_bases_base10_namespaceObject, ...node_modules_multiformats_src_bases_base16_namespaceObject, ...peer_id_node_modules_multiformats_src_bases_base32_namespaceObject, ...node_modules_multiformats_src_bases_base36_namespaceObject, ...peer_id_node_modules_multiformats_src_bases_base58_namespaceObject, ...peer_id_node_modules_multiformats_src_bases_base64_namespaceObject, ...node_modules_multiformats_src_bases_base256emoji_namespaceObject } +const node_modules_multiformats_src_basics_hashes = { ...node_modules_multiformats_src_hashes_sha2_namespaceObject, ...node_modules_multiformats_src_hashes_identity_namespaceObject } +const node_modules_multiformats_src_basics_codecs = { raw: node_modules_multiformats_src_codecs_raw_namespaceObject, json: peer_id_node_modules_multiformats_src_codecs_json_namespaceObject } - // INITIALIZATION - // -------------- - // Export murmurHash3 for CommonJS, either as an AMD module or just as part - // of the global object. - if (true) { - if ( true && module.exports) { - exports = module.exports = library; +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/node_modules/uint8arrays/dist/src/equals.js +/** + * Returns true if the two passed Uint8Arrays have the same content + */ +function dist_src_equals_equals(a, b) { + if (a === b) { + return true; + } + if (a.byteLength !== b.byteLength) { + return false; + } + for (let i = 0; i < a.byteLength; i++) { + if (a[i] !== b[i]) { + return false; } + } + return true; +} +//# sourceMappingURL=equals.js.map +;// CONCATENATED MODULE: ./node_modules/@libp2p/peer-id/dist/src/index.js - exports.murmurHash3 = library; - } else {} -})(this); -/***/ }), -/***/ 43586: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -let impl -if (globalThis.AbortController && globalThis.AbortSignal) { - impl = globalThis -} else { - impl = __nccwpck_require__(67022) +const dist_src_inspect = Symbol.for('nodejs.util.inspect.custom'); +const baseDecoder = Object + .values(node_modules_multiformats_src_basics_bases) + .map(codec => codec.decoder) + // @ts-expect-error https://github.com/multiformats/js-multiformats/issues/141 + .reduce((acc, curr) => acc.or(curr), node_modules_multiformats_src_basics_bases.identity.decoder); +// these values are from https://github.com/multiformats/multicodec/blob/master/table.csv +const LIBP2P_KEY_CODE = 0x72; +const MARSHALLED_ED225519_PUBLIC_KEY_LENGTH = 36; +const MARSHALLED_SECP256K1_PUBLIC_KEY_LENGTH = 37; +class PeerIdImpl { + type; + multihash; + privateKey; + publicKey; + string; + constructor(init) { + this.type = init.type; + this.multihash = init.multihash; + this.privateKey = init.privateKey; + // mark string cache as non-enumerable + Object.defineProperty(this, 'string', { + enumerable: false, + writable: true + }); + } + get [Symbol.toStringTag]() { + return `PeerId(${this.toString()})`; + } + [dist_src_symbol] = true; + toString() { + if (this.string == null) { + this.string = peer_id_node_modules_multiformats_src_bases_base58_base58btc.encode(this.multihash.bytes).slice(1); + } + return this.string; + } + // return self-describing String representation + // in default format from RFC 0001: https://github.com/libp2p/specs/pull/209 + toCID() { + return peer_id_node_modules_multiformats_src_cid_CID.createV1(LIBP2P_KEY_CODE, this.multihash); + } + toBytes() { + return this.multihash.bytes; + } + /** + * Returns Multiaddr as a JSON string + */ + toJSON() { + return this.toString(); + } + /** + * Checks the equality of `this` peer against a given PeerId + */ + equals(id) { + if (id instanceof Uint8Array) { + return dist_src_equals_equals(this.multihash.bytes, id); + } + else if (typeof id === 'string') { + return peerIdFromString(id).equals(this); + } + else if (id?.multihash?.bytes != null) { + return dist_src_equals_equals(this.multihash.bytes, id.multihash.bytes); + } + else { + throw new Error('not valid Id'); + } + } + /** + * Returns PeerId as a human-readable string + * https://nodejs.org/api/util.html#utilinspectcustom + * + * @example + * ```js + * import { peerIdFromString } from '@libp2p/peer-id' + * + * console.info(peerIdFromString('QmFoo')) + * // 'PeerId(QmFoo)' + * ``` + */ + [dist_src_inspect]() { + return `PeerId(${this.toString()})`; + } } - -module.exports.AbortSignal = impl.AbortSignal -module.exports.AbortController = impl.AbortController +class RSAPeerIdImpl extends PeerIdImpl { + type = 'RSA'; + publicKey; + constructor(init) { + super({ ...init, type: 'RSA' }); + this.publicKey = init.publicKey; + } +} +class Ed25519PeerIdImpl extends PeerIdImpl { + type = 'Ed25519'; + publicKey; + constructor(init) { + super({ ...init, type: 'Ed25519' }); + this.publicKey = init.multihash.digest; + } +} +class Secp256k1PeerIdImpl extends PeerIdImpl { + type = 'secp256k1'; + publicKey; + constructor(init) { + super({ ...init, type: 'secp256k1' }); + this.publicKey = init.multihash.digest; + } +} +function createPeerId(init) { + if (init.type === 'RSA') { + return new RSAPeerIdImpl(init); + } + if (init.type === 'Ed25519') { + return new Ed25519PeerIdImpl(init); + } + if (init.type === 'secp256k1') { + return new Secp256k1PeerIdImpl(init); + } + throw new CodeError('Type must be "RSA", "Ed25519" or "secp256k1"', 'ERR_INVALID_PARAMETERS'); +} +function peerIdFromPeerId(other) { + if (other.type === 'RSA') { + return new RSAPeerIdImpl(other); + } + if (other.type === 'Ed25519') { + return new Ed25519PeerIdImpl(other); + } + if (other.type === 'secp256k1') { + return new Secp256k1PeerIdImpl(other); + } + throw new CodeError('Not a PeerId', 'ERR_INVALID_PARAMETERS'); +} +function peerIdFromString(str, decoder) { + decoder = decoder ?? baseDecoder; + if (str.charAt(0) === '1' || str.charAt(0) === 'Q') { + // identity hash ed25519/secp256k1 key or sha2-256 hash of + // rsa public key - base58btc encoded either way + const multihash = peer_id_node_modules_multiformats_src_hashes_digest_decode(peer_id_node_modules_multiformats_src_bases_base58_base58btc.decode(`z${str}`)); + if (str.startsWith('12D')) { + return new Ed25519PeerIdImpl({ multihash }); + } + else if (str.startsWith('16U')) { + return new Secp256k1PeerIdImpl({ multihash }); + } + else { + return new RSAPeerIdImpl({ multihash }); + } + } + return peerIdFromBytes(baseDecoder.decode(str)); +} +function peerIdFromBytes(buf) { + try { + const multihash = peer_id_node_modules_multiformats_src_hashes_digest_decode(buf); + if (multihash.code === node_modules_multiformats_src_hashes_identity_identity.code) { + if (multihash.digest.length === MARSHALLED_ED225519_PUBLIC_KEY_LENGTH) { + return new Ed25519PeerIdImpl({ multihash }); + } + else if (multihash.digest.length === MARSHALLED_SECP256K1_PUBLIC_KEY_LENGTH) { + return new Secp256k1PeerIdImpl({ multihash }); + } + } + if (multihash.code === node_modules_multiformats_src_hashes_sha2_sha256.code) { + return new RSAPeerIdImpl({ multihash }); + } + } + catch { + return peerIdFromCID(peer_id_node_modules_multiformats_src_cid_CID.decode(buf)); + } + throw new Error('Supplied PeerID CID is invalid'); +} +function peerIdFromCID(cid) { + if (cid == null || cid.multihash == null || cid.version == null || (cid.version === 1 && cid.code !== LIBP2P_KEY_CODE)) { + throw new Error('Supplied PeerID CID is invalid'); + } + const multihash = cid.multihash; + if (multihash.code === node_modules_multiformats_src_hashes_sha2_sha256.code) { + return new RSAPeerIdImpl({ multihash: cid.multihash }); + } + else if (multihash.code === node_modules_multiformats_src_hashes_identity_identity.code) { + if (multihash.digest.length === MARSHALLED_ED225519_PUBLIC_KEY_LENGTH) { + return new Ed25519PeerIdImpl({ multihash: cid.multihash }); + } + else if (multihash.digest.length === MARSHALLED_SECP256K1_PUBLIC_KEY_LENGTH) { + return new Secp256k1PeerIdImpl({ multihash: cid.multihash }); + } + } + throw new Error('Supplied PeerID CID is invalid'); +} +/** + * @param publicKey - A marshalled public key + * @param privateKey - A marshalled private key + */ +async function peerIdFromKeys(publicKey, privateKey) { + if (publicKey.length === MARSHALLED_ED225519_PUBLIC_KEY_LENGTH) { + return new Ed25519PeerIdImpl({ multihash: Digest.create(identity.code, publicKey), privateKey }); + } + if (publicKey.length === MARSHALLED_SECP256K1_PUBLIC_KEY_LENGTH) { + return new Secp256k1PeerIdImpl({ multihash: Digest.create(identity.code, publicKey), privateKey }); + } + return new RSAPeerIdImpl({ multihash: await sha256.digest(publicKey), publicKey, privateKey }); +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/bitswap/stat.js -/***/ }), -/***/ 96357: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; +const createStat = configure(api => { + /** + * @type {import('../types').BitswapAPI["stat"]} + */ + async function stat (options = {}) { + const res = await api.post('bitswap/stat', { + searchParams: toUrlSearchParams(options), + signal: options.signal, + headers: options.headers + }) -if (globalThis.fetch && globalThis.Headers && globalThis.Request && globalThis.Response) { - module.exports = { - default: globalThis.fetch, - Headers: globalThis.Headers, - Request: globalThis.Request, - Response: globalThis.Response + return toCoreInterface(await res.json()) } -} else { - module.exports = { - default: (__nccwpck_require__(66471)["default"]), - Headers: (__nccwpck_require__(66471).Headers), - Request: (__nccwpck_require__(66471).Request), - Response: (__nccwpck_require__(66471).Response) + return stat +}) + +/** + * @param {any} res + */ +function toCoreInterface (res) { + return { + provideBufLen: res.ProvideBufLen, + wantlist: (res.Wantlist || []).map((/** @type {{ '/': string }} */ k) => node_modules_multiformats_src_cid_CID.parse(k['/'])), + peers: (res.Peers || []).map((/** @type {string} */ str) => peerIdFromString(str)), + blocksReceived: BigInt(res.BlocksReceived), + dataReceived: BigInt(res.DataReceived), + blocksSent: BigInt(res.BlocksSent), + dataSent: BigInt(res.DataSent), + dupBlksReceived: BigInt(res.DupBlksReceived), + dupDataReceived: BigInt(res.DupDataReceived) } } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/bitswap/index.js -/***/ }), -/***/ 66471: -/***/ ((module, exports, __nccwpck_require__) => { -"use strict"; +/** + * @param {import('../types').Options} config + */ +function createBitswap (config) { + return { + /** + * TODO: https://github.com/ipfs/js-kubo-rpc-client/issues/99 + */ + wantlist: createWantlist(config), + wantlistForPeer: createWantlistForPeer(config), + stat: createStat(config) + } +} -Object.defineProperty(exports, "__esModule", ({ value: true })); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/block/get.js -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } -var Stream = _interopDefault(__nccwpck_require__(12781)); -var http = _interopDefault(__nccwpck_require__(13685)); -var Url = _interopDefault(__nccwpck_require__(57310)); -var whatwgUrl = _interopDefault(__nccwpck_require__(73323)); -var https = _interopDefault(__nccwpck_require__(95687)); -var zlib = _interopDefault(__nccwpck_require__(59796)); -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js +const createGet = configure(api => { + /** + * @type {import('../types').BlockAPI["get"]} + */ + async function get (cid, options = {}) { + const res = await api.post('block/get', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: cid.toString(), + ...options + }), + headers: options.headers + }) -// fix for "Readable" isn't a named export issue -const Readable = Stream.Readable; + return new Uint8Array(await res.arrayBuffer()) + } + return get +}) -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); +;// CONCATENATED MODULE: ./node_modules/browser-readablestream-to-it/dist/src/index.js +/** + * @packageDocumentation + * + * Allows treating a browser readable stream as an async iterator. + * + * @example + * + * ```javascript + * import toIt from 'browser-readablestream-to-it' + * import all from 'it-all' + * + * const content = [0, 1, 2, 3, 4] + * + * const stream = new ReadableStream({ + * start(controller) { + * for (let i = 0; i < content.length; i++) { + * controller.enqueue(content[i]) + * } + * + * controller.close() + * } + * }) + * + * const arr = await all(toIt(stream)) + * + * console.info(arr) // 0, 1, 2, 3, 4 + * ``` + * + * ## preventCancel + * + * By default a readable stream will have [.cancel](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/cancel) called on it once it has ended or + * reading has stopped prematurely. + * + * To prevent this behaviour, pass `preventCancel: true` as an option: + * + * ```javascript + * const arr = await all(toIt(stream, { preventCancel: true })) + * + * console.info(arr) // 0, 1, 2, 3, 4 + * ``` + */ +/** + * Turns a browser readable stream into an async iterable. Async iteration over + * returned iterable will lock give stream, preventing any other consumer from + * acquiring a reader. The lock will be released if iteration loop is broken. To + * prevent stream cancelling optional `{ preventCancel: true }` could be passed + * as a second argument. + */ +async function* browserReadableStreamToIt(stream, options = {}) { + const reader = stream.getReader(); + try { + while (true) { + const result = await reader.read(); + if (result.done) { + return; + } + yield result.value; + } + } + finally { + if (options.preventCancel !== true) { + await reader.cancel(); + } + reader.releaseLock(); + } +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/blob-to-it/dist/src/index.js +/** + * @packageDocumentation + * + * Allows reading Blob contents as an async iterator. + * + * @example + * + * ```javascript + * import toIt from 'blob-to-it' + * import all from 'it-all' + * + * const content = [ Uint8Array.from([0, 1, 2, 3, 4]) ] + * const blob = new Blob(content) + * const arr = await all(toIt(blob)) + * + * console.info(arr) // [ [ 0, 1, 2, 3, 4 ] ] + * ``` + */ -class Blob { - constructor() { - this[TYPE] = ''; +function blobToIt(blob) { + if (typeof blob.stream === 'function') { + return browserReadableStreamToIt(blob.stream()); + } + // firefox < 69 does not support blob.stream() + // @ts-expect-error - response.body is optional, but in practice it's a stream. + return browserReadableStreamToIt(new Response(blob).body); +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/it-peekable/dist/src/index.js +function peekableIterator(iterable) { + // @ts-expect-error + const [iterator, symbol] = iterable[Symbol.asyncIterator] != null + // @ts-expect-error + ? [iterable[Symbol.asyncIterator](), Symbol.asyncIterator] + // @ts-expect-error + : [iterable[Symbol.iterator](), Symbol.iterator]; + const queue = []; + // @ts-expect-error + return { + peek: () => { + return iterator.next(); + }, + push: (value) => { + queue.push(value); + }, + next: () => { + if (queue.length > 0) { + return { + done: false, + value: queue.shift() + }; + } + return iterator.next(); + }, + [symbol]() { + return this; + } + }; +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/it-all/dist/src/index.js +/** + * Collects all values from an (async) iterable and returns them as an array + */ +async function src_all(source) { + const arr = []; + for await (const entry of source) { + arr.push(entry); + } + return arr; +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/it-map/dist/src/index.js +/** + * Takes an (async) iterable and returns one with each item mapped by the passed + * function + */ +async function* map(source, func) { + for await (const val of source) { + yield func(val); + } +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/files/utils.js +/** + * @param {any} obj + * @returns {obj is ArrayBufferView|ArrayBuffer} + */ +function isBytes (obj) { + return ArrayBuffer.isView(obj) || obj instanceof ArrayBuffer +} - const blobParts = arguments[0]; - const options = arguments[1]; +/** + * @param {any} obj + * @returns {obj is globalThis.Blob} + */ +function isBlob (obj) { + return obj.constructor && + (obj.constructor.name === 'Blob' || obj.constructor.name === 'File') && + typeof obj.stream === 'function' +} + +/** + * An object with a path or content property + * + * @param {any} obj + * @returns {obj is import('ipfs-core-types/src/utils').ImportCandidate} + */ +function isFileObject (obj) { + return typeof obj === 'object' && (obj.path || obj.content) +} + +/** + * @param {any} value + * @returns {value is ReadableStream} + */ +const isReadableStream = (value) => + value && typeof value.getReader === 'function' + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/files/normalise-content.js - const buffers = []; - let size = 0; - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } - this[BUFFER] = Buffer.concat(buffers); - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); /** - * fetch-error.js - * - * FetchError interface for operational errors + * @template T + * @param {T} thing */ +async function * toAsyncIterable (thing) { + yield thing +} /** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError + * @param {import('ipfs-core-types/src/utils').ToContent} input */ -function FetchError(message, type, systemError) { - Error.call(this, message); +async function normaliseContent (input) { + // Bytes | String + if (isBytes(input)) { + return toAsyncIterable(normalise_content_toBytes(input)) + } - this.message = message; - this.type = type; + if (typeof input === 'string' || input instanceof String) { + return toAsyncIterable(normalise_content_toBytes(input.toString())) + } - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; + // Blob + if (isBlob(input)) { + return blobToIt(input) } - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} + // Browser stream + if (isReadableStream(input)) { + input = browserReadableStreamToIt(input) + } -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; + // (Async)Iterator + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + /** @type {any} peekable */ + const peekable = peekableIterator(input) -let convert; -try { - convert = (__nccwpck_require__(73931).convert); -} catch (e) {} + /** @type {any} value */ + const { value, done } = await peekable.peek() -const INTERNALS = Symbol('Body internals'); + if (done) { + // make sure empty iterators result in empty files + return toAsyncIterable(new Uint8Array(0)) + } -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = Stream.PassThrough; + peekable.push(value) + + // (Async)Iterable + if (Number.isInteger(value)) { + return toAsyncIterable(Uint8Array.from(await src_all(peekable))) + } + + // (Async)Iterable + if (isBytes(value) || typeof value === 'string' || value instanceof String) { + return map(peekable, normalise_content_toBytes) + } + } + + throw err_code(new Error(`Unexpected input: ${input}`), 'ERR_UNEXPECTED_INPUT') +} /** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void + * @param {ArrayBuffer | ArrayBufferView | string | InstanceType | number[]} chunk */ -function Body(body) { - var _this = this; +function normalise_content_toBytes (chunk) { + if (chunk instanceof Uint8Array) { + return chunk + } - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; + if (ArrayBuffer.isView(chunk)) { + return new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength) + } - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + if (chunk instanceof ArrayBuffer) { + return new Uint8Array(chunk) + } - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof Stream) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; + if (Array.isArray(chunk)) { + return Uint8Array.from(chunk) + } - if (body instanceof Stream) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } + return src_from_string_fromString(chunk.toString()) } -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, +// EXTERNAL MODULE: ./node_modules/ipfs-core-utils/node_modules/protobufjs/minimal.js +var minimal = __nccwpck_require__(42413); +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/ipfs-unixfs/src/unixfs.js +/*eslint-disable*/ + + +// Common aliases +const $Reader = minimal.Reader, $Writer = minimal.Writer, $util = minimal.util; + +// Exported root namespace +const $root = minimal.roots["ipfs-unixfs"] || (minimal.roots["ipfs-unixfs"] = {}); + +const Data = $root.Data = (() => { + + /** + * Properties of a Data. + * @exports IData + * @interface IData + * @property {Data.DataType} Type Data Type + * @property {Uint8Array|null} [Data] Data Data + * @property {number|null} [filesize] Data filesize + * @property {Array.|null} [blocksizes] Data blocksizes + * @property {number|null} [hashType] Data hashType + * @property {number|null} [fanout] Data fanout + * @property {number|null} [mode] Data mode + * @property {IUnixTime|null} [mtime] Data mtime + */ + + /** + * Constructs a new Data. + * @exports Data + * @classdesc Represents a Data. + * @implements IData + * @constructor + * @param {IData=} [p] Properties to set + */ + function Data(p) { + this.blocksizes = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) + this[ks[i]] = p[ks[i]]; + } - get bodyUsed() { - return this[INTERNALS].disturbed; - }, + /** + * Data Type. + * @member {Data.DataType} Type + * @memberof Data + * @instance + */ + Data.prototype.Type = 0; - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, + /** + * Data Data. + * @member {Uint8Array} Data + * @memberof Data + * @instance + */ + Data.prototype.Data = $util.newBuffer([]); - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, + /** + * Data filesize. + * @member {number} filesize + * @memberof Data + * @instance + */ + Data.prototype.filesize = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; + /** + * Data blocksizes. + * @member {Array.} blocksizes + * @memberof Data + * @instance + */ + Data.prototype.blocksizes = $util.emptyArray; - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, + /** + * Data hashType. + * @member {number} hashType + * @memberof Data + * @instance + */ + Data.prototype.hashType = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, + /** + * Data fanout. + * @member {number} fanout + * @memberof Data + * @instance + */ + Data.prototype.fanout = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, + /** + * Data mode. + * @member {number} mode + * @memberof Data + * @instance + */ + Data.prototype.mode = 0; - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; + /** + * Data mtime. + * @member {IUnixTime|null|undefined} mtime + * @memberof Data + * @instance + */ + Data.prototype.mtime = null; - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; + /** + * Encodes the specified Data message. Does not implicitly {@link Data.verify|verify} messages. + * @function encode + * @memberof Data + * @static + * @param {IData} m Data message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Data.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + w.uint32(8).int32(m.Type); + if (m.Data != null && Object.hasOwnProperty.call(m, "Data")) + w.uint32(18).bytes(m.Data); + if (m.filesize != null && Object.hasOwnProperty.call(m, "filesize")) + w.uint32(24).uint64(m.filesize); + if (m.blocksizes != null && m.blocksizes.length) { + for (var i = 0; i < m.blocksizes.length; ++i) + w.uint32(32).uint64(m.blocksizes[i]); + } + if (m.hashType != null && Object.hasOwnProperty.call(m, "hashType")) + w.uint32(40).uint64(m.hashType); + if (m.fanout != null && Object.hasOwnProperty.call(m, "fanout")) + w.uint32(48).uint64(m.fanout); + if (m.mode != null && Object.hasOwnProperty.call(m, "mode")) + w.uint32(56).uint32(m.mode); + if (m.mtime != null && Object.hasOwnProperty.call(m, "mtime")) + $root.UnixTime.encode(m.mtime, w.uint32(66).fork()).ldelim(); + return w; + }; -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); + /** + * Decodes a Data message from the specified reader or buffer. + * @function decode + * @memberof Data + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {Data} Data + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Data.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.Data(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.Type = r.int32(); + break; + case 2: + m.Data = r.bytes(); + break; + case 3: + m.filesize = r.uint64(); + break; + case 4: + if (!(m.blocksizes && m.blocksizes.length)) + m.blocksizes = []; + if ((t & 7) === 2) { + var c2 = r.uint32() + r.pos; + while (r.pos < c2) + m.blocksizes.push(r.uint64()); + } else + m.blocksizes.push(r.uint64()); + break; + case 5: + m.hashType = r.uint64(); + break; + case 6: + m.fanout = r.uint64(); + break; + case 7: + m.mode = r.uint32(); + break; + case 8: + m.mtime = $root.UnixTime.decode(r, r.uint32()); + break; + default: + r.skipType(t & 7); + break; + } + } + if (!m.hasOwnProperty("Type")) + throw $util.ProtocolError("missing required 'Type'", { instance: m }); + return m; + }; -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; + /** + * Creates a Data message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof Data + * @static + * @param {Object.} d Plain object + * @returns {Data} Data + */ + Data.fromObject = function fromObject(d) { + if (d instanceof $root.Data) + return d; + var m = new $root.Data(); + switch (d.Type) { + case "Raw": + case 0: + m.Type = 0; + break; + case "Directory": + case 1: + m.Type = 1; + break; + case "File": + case 2: + m.Type = 2; + break; + case "Metadata": + case 3: + m.Type = 3; + break; + case "Symlink": + case 4: + m.Type = 4; + break; + case "HAMTShard": + case 5: + m.Type = 5; + break; + } + if (d.Data != null) { + if (typeof d.Data === "string") + $util.base64.decode(d.Data, m.Data = $util.newBuffer($util.base64.length(d.Data)), 0); + else if (d.Data.length) + m.Data = d.Data; + } + if (d.filesize != null) { + if ($util.Long) + (m.filesize = $util.Long.fromValue(d.filesize)).unsigned = true; + else if (typeof d.filesize === "string") + m.filesize = parseInt(d.filesize, 10); + else if (typeof d.filesize === "number") + m.filesize = d.filesize; + else if (typeof d.filesize === "object") + m.filesize = new $util.LongBits(d.filesize.low >>> 0, d.filesize.high >>> 0).toNumber(true); + } + if (d.blocksizes) { + if (!Array.isArray(d.blocksizes)) + throw TypeError(".Data.blocksizes: array expected"); + m.blocksizes = []; + for (var i = 0; i < d.blocksizes.length; ++i) { + if ($util.Long) + (m.blocksizes[i] = $util.Long.fromValue(d.blocksizes[i])).unsigned = true; + else if (typeof d.blocksizes[i] === "string") + m.blocksizes[i] = parseInt(d.blocksizes[i], 10); + else if (typeof d.blocksizes[i] === "number") + m.blocksizes[i] = d.blocksizes[i]; + else if (typeof d.blocksizes[i] === "object") + m.blocksizes[i] = new $util.LongBits(d.blocksizes[i].low >>> 0, d.blocksizes[i].high >>> 0).toNumber(true); + } + } + if (d.hashType != null) { + if ($util.Long) + (m.hashType = $util.Long.fromValue(d.hashType)).unsigned = true; + else if (typeof d.hashType === "string") + m.hashType = parseInt(d.hashType, 10); + else if (typeof d.hashType === "number") + m.hashType = d.hashType; + else if (typeof d.hashType === "object") + m.hashType = new $util.LongBits(d.hashType.low >>> 0, d.hashType.high >>> 0).toNumber(true); + } + if (d.fanout != null) { + if ($util.Long) + (m.fanout = $util.Long.fromValue(d.fanout)).unsigned = true; + else if (typeof d.fanout === "string") + m.fanout = parseInt(d.fanout, 10); + else if (typeof d.fanout === "number") + m.fanout = d.fanout; + else if (typeof d.fanout === "object") + m.fanout = new $util.LongBits(d.fanout.low >>> 0, d.fanout.high >>> 0).toNumber(true); + } + if (d.mode != null) { + m.mode = d.mode >>> 0; + } + if (d.mtime != null) { + if (typeof d.mtime !== "object") + throw TypeError(".Data.mtime: object expected"); + m.mtime = $root.UnixTime.fromObject(d.mtime); + } + return m; + }; -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; + /** + * Creates a plain object from a Data message. Also converts values to other types if specified. + * @function toObject + * @memberof Data + * @static + * @param {Data} m Data + * @param {$protobuf.IConversionOptions} [o] Conversion options + * @returns {Object.} Plain object + */ + Data.toObject = function toObject(m, o) { + if (!o) + o = {}; + var d = {}; + if (o.arrays || o.defaults) { + d.blocksizes = []; + } + if (o.defaults) { + d.Type = o.enums === String ? "Raw" : 0; + if (o.bytes === String) + d.Data = ""; + else { + d.Data = []; + if (o.bytes !== Array) + d.Data = $util.newBuffer(d.Data); + } + if ($util.Long) { + var n = new $util.Long(0, 0, true); + d.filesize = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; + } else + d.filesize = o.longs === String ? "0" : 0; + if ($util.Long) { + var n = new $util.Long(0, 0, true); + d.hashType = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; + } else + d.hashType = o.longs === String ? "0" : 0; + if ($util.Long) { + var n = new $util.Long(0, 0, true); + d.fanout = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; + } else + d.fanout = o.longs === String ? "0" : 0; + d.mode = 0; + d.mtime = null; + } + if (m.Type != null && m.hasOwnProperty("Type")) { + d.Type = o.enums === String ? $root.Data.DataType[m.Type] : m.Type; + } + if (m.Data != null && m.hasOwnProperty("Data")) { + d.Data = o.bytes === String ? $util.base64.encode(m.Data, 0, m.Data.length) : o.bytes === Array ? Array.prototype.slice.call(m.Data) : m.Data; + } + if (m.filesize != null && m.hasOwnProperty("filesize")) { + if (typeof m.filesize === "number") + d.filesize = o.longs === String ? String(m.filesize) : m.filesize; + else + d.filesize = o.longs === String ? $util.Long.prototype.toString.call(m.filesize) : o.longs === Number ? new $util.LongBits(m.filesize.low >>> 0, m.filesize.high >>> 0).toNumber(true) : m.filesize; + } + if (m.blocksizes && m.blocksizes.length) { + d.blocksizes = []; + for (var j = 0; j < m.blocksizes.length; ++j) { + if (typeof m.blocksizes[j] === "number") + d.blocksizes[j] = o.longs === String ? String(m.blocksizes[j]) : m.blocksizes[j]; + else + d.blocksizes[j] = o.longs === String ? $util.Long.prototype.toString.call(m.blocksizes[j]) : o.longs === Number ? new $util.LongBits(m.blocksizes[j].low >>> 0, m.blocksizes[j].high >>> 0).toNumber(true) : m.blocksizes[j]; + } + } + if (m.hashType != null && m.hasOwnProperty("hashType")) { + if (typeof m.hashType === "number") + d.hashType = o.longs === String ? String(m.hashType) : m.hashType; + else + d.hashType = o.longs === String ? $util.Long.prototype.toString.call(m.hashType) : o.longs === Number ? new $util.LongBits(m.hashType.low >>> 0, m.hashType.high >>> 0).toNumber(true) : m.hashType; + } + if (m.fanout != null && m.hasOwnProperty("fanout")) { + if (typeof m.fanout === "number") + d.fanout = o.longs === String ? String(m.fanout) : m.fanout; + else + d.fanout = o.longs === String ? $util.Long.prototype.toString.call(m.fanout) : o.longs === Number ? new $util.LongBits(m.fanout.low >>> 0, m.fanout.high >>> 0).toNumber(true) : m.fanout; + } + if (m.mode != null && m.hasOwnProperty("mode")) { + d.mode = m.mode; + } + if (m.mtime != null && m.hasOwnProperty("mtime")) { + d.mtime = $root.UnixTime.toObject(m.mtime, o); + } + return d; + }; - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } + /** + * Converts this Data to JSON. + * @function toJSON + * @memberof Data + * @instance + * @returns {Object.} JSON object + */ + Data.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, minimal.util.toJSONOptions); + }; - this[INTERNALS].disturbed = true; + /** + * DataType enum. + * @name Data.DataType + * @enum {number} + * @property {number} Raw=0 Raw value + * @property {number} Directory=1 Directory value + * @property {number} File=2 File value + * @property {number} Metadata=3 Metadata value + * @property {number} Symlink=4 Symlink value + * @property {number} HAMTShard=5 HAMTShard value + */ + Data.DataType = (function() { + const valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "Raw"] = 0; + values[valuesById[1] = "Directory"] = 1; + values[valuesById[2] = "File"] = 2; + values[valuesById[3] = "Metadata"] = 3; + values[valuesById[4] = "Symlink"] = 4; + values[valuesById[5] = "HAMTShard"] = 5; + return values; + })(); - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } + return Data; +})(); - let body = this.body; +const UnixTime = $root.UnixTime = (() => { - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } + /** + * Properties of an UnixTime. + * @exports IUnixTime + * @interface IUnixTime + * @property {number} Seconds UnixTime Seconds + * @property {number|null} [FractionalNanoseconds] UnixTime FractionalNanoseconds + */ - // body is blob - if (isBlob(body)) { - body = body.stream(); - } + /** + * Constructs a new UnixTime. + * @exports UnixTime + * @classdesc Represents an UnixTime. + * @implements IUnixTime + * @constructor + * @param {IUnixTime=} [p] Properties to set + */ + function UnixTime(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) + this[ks[i]] = p[ks[i]]; + } - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } + /** + * UnixTime Seconds. + * @member {number} Seconds + * @memberof UnixTime + * @instance + */ + UnixTime.prototype.Seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - // istanbul ignore if: should never happen - if (!(body instanceof Stream)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } + /** + * UnixTime FractionalNanoseconds. + * @member {number} FractionalNanoseconds + * @memberof UnixTime + * @instance + */ + UnixTime.prototype.FractionalNanoseconds = 0; - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; + /** + * Encodes the specified UnixTime message. Does not implicitly {@link UnixTime.verify|verify} messages. + * @function encode + * @memberof UnixTime + * @static + * @param {IUnixTime} m UnixTime message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnixTime.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + w.uint32(8).int64(m.Seconds); + if (m.FractionalNanoseconds != null && Object.hasOwnProperty.call(m, "FractionalNanoseconds")) + w.uint32(21).fixed32(m.FractionalNanoseconds); + return w; + }; - return new Body.Promise(function (resolve, reject) { - let resTimeout; + /** + * Decodes an UnixTime message from the specified reader or buffer. + * @function decode + * @memberof UnixTime + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {UnixTime} UnixTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnixTime.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.UnixTime(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.Seconds = r.int64(); + break; + case 2: + m.FractionalNanoseconds = r.fixed32(); + break; + default: + r.skipType(t & 7); + break; + } + } + if (!m.hasOwnProperty("Seconds")) + throw $util.ProtocolError("missing required 'Seconds'", { instance: m }); + return m; + }; - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } + /** + * Creates an UnixTime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof UnixTime + * @static + * @param {Object.} d Plain object + * @returns {UnixTime} UnixTime + */ + UnixTime.fromObject = function fromObject(d) { + if (d instanceof $root.UnixTime) + return d; + var m = new $root.UnixTime(); + if (d.Seconds != null) { + if ($util.Long) + (m.Seconds = $util.Long.fromValue(d.Seconds)).unsigned = false; + else if (typeof d.Seconds === "string") + m.Seconds = parseInt(d.Seconds, 10); + else if (typeof d.Seconds === "number") + m.Seconds = d.Seconds; + else if (typeof d.Seconds === "object") + m.Seconds = new $util.LongBits(d.Seconds.low >>> 0, d.Seconds.high >>> 0).toNumber(); + } + if (d.FractionalNanoseconds != null) { + m.FractionalNanoseconds = d.FractionalNanoseconds >>> 0; + } + return m; + }; - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); + /** + * Creates a plain object from an UnixTime message. Also converts values to other types if specified. + * @function toObject + * @memberof UnixTime + * @static + * @param {UnixTime} m UnixTime + * @param {$protobuf.IConversionOptions} [o] Conversion options + * @returns {Object.} Plain object + */ + UnixTime.toObject = function toObject(m, o) { + if (!o) + o = {}; + var d = {}; + if (o.defaults) { + if ($util.Long) { + var n = new $util.Long(0, 0, false); + d.Seconds = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n; + } else + d.Seconds = o.longs === String ? "0" : 0; + d.FractionalNanoseconds = 0; + } + if (m.Seconds != null && m.hasOwnProperty("Seconds")) { + if (typeof m.Seconds === "number") + d.Seconds = o.longs === String ? String(m.Seconds) : m.Seconds; + else + d.Seconds = o.longs === String ? $util.Long.prototype.toString.call(m.Seconds) : o.longs === Number ? new $util.LongBits(m.Seconds.low >>> 0, m.Seconds.high >>> 0).toNumber() : m.Seconds; + } + if (m.FractionalNanoseconds != null && m.hasOwnProperty("FractionalNanoseconds")) { + d.FractionalNanoseconds = m.FractionalNanoseconds; + } + return d; + }; - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } + /** + * Converts this UnixTime to JSON. + * @function toJSON + * @memberof UnixTime + * @instance + * @returns {Object.} JSON object + */ + UnixTime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, minimal.util.toJSONOptions); + }; - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } + return UnixTime; +})(); - accumBytes += chunk.length; - accum.push(chunk); - }); +const Metadata = $root.Metadata = (() => { - body.on('end', function () { - if (abort) { - return; - } + /** + * Properties of a Metadata. + * @exports IMetadata + * @interface IMetadata + * @property {string|null} [MimeType] Metadata MimeType + */ - clearTimeout(resTimeout); + /** + * Constructs a new Metadata. + * @exports Metadata + * @classdesc Represents a Metadata. + * @implements IMetadata + * @constructor + * @param {IMetadata=} [p] Properties to set + */ + function Metadata(p) { + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) + this[ks[i]] = p[ks[i]]; + } - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} + /** + * Metadata MimeType. + * @member {string} MimeType + * @memberof Metadata + * @instance + */ + Metadata.prototype.MimeType = ""; -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } + /** + * Encodes the specified Metadata message. Does not implicitly {@link Metadata.verify|verify} messages. + * @function encode + * @memberof Metadata + * @static + * @param {IMetadata} m Metadata message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metadata.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.MimeType != null && Object.hasOwnProperty.call(m, "MimeType")) + w.uint32(10).string(m.MimeType); + return w; + }; - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; + /** + * Decodes a Metadata message from the specified reader or buffer. + * @function decode + * @memberof Metadata + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {Metadata} Metadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metadata.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.Metadata(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.MimeType = r.string(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } + /** + * Creates a Metadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof Metadata + * @static + * @param {Object.} d Plain object + * @returns {Metadata} Metadata + */ + Metadata.fromObject = function fromObject(d) { + if (d instanceof $root.Metadata) + return d; + var m = new $root.Metadata(); + if (d.MimeType != null) { + m.MimeType = String(d.MimeType); + } + return m; + }; - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); + /** + * Creates a plain object from a Metadata message. Also converts values to other types if specified. + * @function toObject + * @memberof Metadata + * @static + * @param {Metadata} m Metadata + * @param {$protobuf.IConversionOptions} [o] Conversion options + * @returns {Object.} Plain object + */ + Metadata.toObject = function toObject(m, o) { + if (!o) + o = {}; + var d = {}; + if (o.defaults) { + d.MimeType = ""; + } + if (m.MimeType != null && m.hasOwnProperty("MimeType")) { + d.MimeType = m.MimeType; + } + return d; + }; - // html5 - if (!res && str) { - res = /} JSON object + */ + Metadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, minimal.util.toJSONOptions); + }; - // html4 - if (!res && str) { - res = / 999999999)) { + throw err_code(new Error('mtime-nsecs must be within the range [0,999999999]'), 'ERR_INVALID_MTIME_NSECS') + } + + return mtime } -const MAP = Symbol('map'); -class Headers { - /** - * Headers class - * - * @param Object headers Response headers - * @return Void - */ - constructor() { - let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; +class UnixFS { + /** + * Decode from protobuf https://github.com/ipfs/specs/blob/master/UNIXFS.md + * + * @param {Uint8Array} marshaled + */ + static unmarshal (marshaled) { + const message = PBData.decode(marshaled) + const decoded = PBData.toObject(message, { + defaults: false, + arrays: true, + longs: Number, + objects: false + }) - this[MAP] = Object.create(null); + const data = new UnixFS({ + type: types[decoded.Type], + data: decoded.Data, + blockSizes: decoded.blocksizes, + mode: decoded.mode, + mtime: decoded.mtime + ? { + secs: decoded.mtime.Seconds, + nsecs: decoded.mtime.FractionalNanoseconds + } + : undefined + }) - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); + // make sure we honour the original mode + data._originalMode = decoded.mode || 0 - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } + return data + } - return; - } + /** + * @param {object} [options] + * @param {string} [options.type='file'] + * @param {Uint8Array} [options.data] + * @param {number[]} [options.blockSizes] + * @param {number} [options.hashType] + * @param {number} [options.fanout] + * @param {MtimeLike | null} [options.mtime] + * @param {number | string} [options.mode] + */ + constructor (options = { + type: 'file' + }) { + const { + type, + data, + blockSizes, + hashType, + fanout, + mtime, + mode + } = options - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } + if (type && !types.includes(type)) { + throw errcode(new Error('Type: ' + type + ' is not valid'), 'ERR_INVALID_TYPE') + } - // sequence> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } + this.type = type || 'file' + this.data = data + this.hashType = hashType + this.fanout = fanout - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } + /** @type {number[]} */ + this.blockSizes = blockSizes || [] + this._originalMode = 0 + this.mode = parseMode(mode) - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } + if (mtime) { + this.mtime = src_parseMtime(mtime) - return this[MAP][key].join(', '); - } + if (this.mtime && !this.mtime.nsecs) { + this.mtime.nsecs = 0 + } + } + } - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + /** + * @param {number | undefined} mode + */ + set mode (mode) { + this._mode = this.isDirectory() ? DEFAULT_DIRECTORY_MODE : DEFAULT_FILE_MODE - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; + const parsedMode = parseMode(mode) - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } + if (parsedMode !== undefined) { + this._mode = parsedMode + } + } - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } + /** + * @returns {number | undefined} + */ + get mode () { + return this._mode + } - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } + isDirectory () { + return Boolean(this.type && dirTypes.includes(this.type)) + } - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } + /** + * @param {number} size + */ + addBlockSize (size) { + this.blockSizes.push(size) + } - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } + /** + * @param {number} index + */ + removeBlockSize (index) { + this.blockSizes.splice(index, 1) + } - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } + /** + * Returns `0` for directories or `data.length + sum(blockSizes)` for everything else + */ + fileSize () { + if (this.isDirectory()) { + // dirs don't have file size + return 0 + } - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } + let sum = 0 + this.blockSizes.forEach((size) => { + sum += size + }) - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } + if (this.data) { + sum += this.data.length + } + + return sum + } + + /** + * encode to protobuf Uint8Array + */ + marshal () { + let type + + switch (this.type) { + case 'raw': type = PBData.DataType.Raw; break + case 'directory': type = PBData.DataType.Directory; break + case 'file': type = PBData.DataType.File; break + case 'metadata': type = PBData.DataType.Metadata; break + case 'symlink': type = PBData.DataType.Symlink; break + case 'hamt-sharded-directory': type = PBData.DataType.HAMTShard; break + default: + throw errcode(new Error('Type: ' + type + ' is not valid'), 'ERR_INVALID_TYPE') + } + + let data = this.data + + if (!this.data || !this.data.length) { + data = undefined + } + + let mode + + if (this.mode != null) { + mode = (this._originalMode & 0xFFFFF000) | (parseMode(this.mode) || 0) + + if (mode === DEFAULT_FILE_MODE && !this.isDirectory()) { + mode = undefined + } - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + if (mode === DEFAULT_DIRECTORY_MODE && this.isDirectory()) { + mode = undefined + } + } -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); + let mtime -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); + if (this.mtime != null) { + const parsed = src_parseMtime(this.mtime) -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + if (parsed) { + mtime = { + Seconds: parsed.secs, + FractionalNanoseconds: parsed.nsecs + } - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} + if (mtime.FractionalNanoseconds === 0) { + delete mtime.FractionalNanoseconds + } + } + } -const INTERNAL = Symbol('internal'); + const pbData = { + Type: type, + Data: data, + filesize: this.isDirectory() ? undefined : this.fileSize(), + blocksizes: this.blockSizes, + hashType: this.hashType, + fanout: this.fanout, + mode, + mtime + } -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; + return PBData.encode(pbData).finish() + } } -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/files/normalise-candidate-multiple.js + + + - this[INTERNAL].index = index + 1; - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); /** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object + * @typedef {import('ipfs-core-types/src/utils').ImportCandidate} ImportCandidate + * @typedef {import('ipfs-core-types/src/utils').ToContent} ToContent + * @typedef {import('ipfs-unixfs-importer').ImportCandidate} ImporterImportCandidate + * @typedef {import('ipfs-core-types/src/utils').ImportCandidateStream} ImportCandidateStream */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } +/** + * @param {ImportCandidateStream} input + * @param {(content:ToContent) => Promise>} normaliseContent + */ +// eslint-disable-next-line complexity +async function * normaliseCandidateMultiple (input, normaliseContent) { + // String + // Uint8Array|ArrayBuffer|TypedArray + // Blob|File + // fs.ReadStream + // @ts-expect-error _readableState is a property of a node fs.ReadStream + if (typeof input === 'string' || input instanceof String || isBytes(input) || isBlob(input) || input._readableState) { + throw err_code(new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT') + } - return obj; + // Browser ReadableStream + if (isReadableStream(input)) { + input = browserReadableStreamToIt(input) + } + + // Iterable + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + const peekable = peekableIterator(input) + const { value, done } = await peekable.peek() + + if (done) { + // make sure empty iterators result in empty files + yield * [] + return + } + + peekable.push(value) + + // (Async)Iterable + // (Async)Iterable + if (Number.isInteger(value)) { + throw err_code(new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT') + } + + // (Async)Iterable + // @ts-expect-error private field + if (value._readableState) { + // @ts-expect-error Node fs.ReadStreams have a `.path` property so we need to pass it as the content + yield * map(peekable, (/** @type {ImportCandidate} */ value) => toFileObject({ content: value }, normaliseContent)) + return + } + + if (isBytes(value)) { + // @ts-expect-error peekable is still an iterable of ImportCandidates + yield toFileObject({ content: peekable }, normaliseContent) + return + } + + // (Async)Iterable<(Async)Iterable> + // (Async)Iterable> + // ReadableStream<(Async)Iterable> + // ReadableStream> + if (isFileObject(value) || value[Symbol.iterator] || value[Symbol.asyncIterator] || isReadableStream(value) || isBlob(value)) { + yield * map(peekable, (/** @type {ImportCandidate} */ value) => toFileObject(value, normaliseContent)) + return + } + } + + // { path, content: ? } + // Note: Detected _after_ (Async)Iterable because Node.js fs.ReadStreams have a + // `path` property that passes this check. + if (isFileObject(input)) { + throw err_code(new Error('Unexpected input: single item passed - if you are using ipfs.addAll, please use ipfs.add instead'), 'ERR_UNEXPECTED_INPUT') + } + + throw err_code(new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT') } /** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers + * @param {ImportCandidate} input + * @param {(content:ToContent) => Promise>} normaliseContent */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; +async function toFileObject (input, normaliseContent) { + // @ts-expect-error - Those properties don't exist on most input types + const { path, mode, mtime, content } = input + + /** @type {ImporterImportCandidate} */ + const file = { + path: path || '', + mode: parseMode(mode), + mtime: src_parseMtime(mtime) + } + + if (content) { + file.content = await normaliseContent(content) + } else if (!path) { // Not already a file object with path or content prop + // @ts-expect-error - input still can be different ToContent + file.content = await normaliseContent(input) + } + + return file } -const INTERNALS$1 = Symbol('Response internals'); +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/files/normalise-input-multiple.js + -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http.STATUS_CODES; /** - * Response class + * @typedef {import('ipfs-core-types/src/utils').ImportCandidateStream} ImportCandidateStream + */ + +/** + * Transforms any of the `ipfs.addAll` input types into * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void + * ``` + * AsyncIterable<{ path, mode, mtime, content: AsyncIterable }> + * ``` + * + * See https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options + * + * @param {ImportCandidateStream} input */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +function normaliseInput (input) { + return normaliseCandidateMultiple(input, normaliseContent) +} - Body.call(this, body, opts); +;// CONCATENATED MODULE: ./node_modules/nanoid/url-alphabet/index.js +const urlAlphabet = + 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict' - const status = opts.status || 200; - const headers = new Headers(opts.headers); +;// CONCATENATED MODULE: ./node_modules/nanoid/index.js - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - get url() { - return this[INTERNALS$1].url || ''; - } +const POOL_SIZE_MULTIPLIER = 128 +let pool, poolOffset +let fillPool = bytes => { + if (!pool || pool.length < bytes) { + pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER) + ;(0,external_crypto_.randomFillSync)(pool) + poolOffset = 0 + } else if (poolOffset + bytes > pool.length) { + (0,external_crypto_.randomFillSync)(pool) + poolOffset = 0 + } + poolOffset += bytes +} +let random = bytes => { + fillPool((bytes -= 0)) + return pool.subarray(poolOffset - bytes, poolOffset) +} +let customRandom = (alphabet, defaultSize, getRandom) => { + let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1 + let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length) + return (size = defaultSize) => { + let id = '' + while (true) { + let bytes = getRandom(step) + let i = step + while (i--) { + id += alphabet[bytes[i] & mask] || '' + if (id.length === size) return id + } + } + } +} +let customAlphabet = (alphabet, size = 21) => + customRandom(alphabet, size, random) +let nanoid = (size = 21) => { + fillPool((size -= 0)) + let id = '' + for (let i = poolOffset - size; i < poolOffset; i++) { + id += urlAlphabet[pool[i] & 63] + } + return id +} - get status() { - return this[INTERNALS$1].status; - } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/mode-to-string.js - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } +/** + * @param {number | string | undefined} mode + */ +function mode_to_string_modeToString (mode) { + if (mode == null) { + return undefined + } - get redirected() { - return this[INTERNALS$1].counter > 0; - } + if (typeof mode === 'string') { + return mode + } - get statusText() { - return this[INTERNALS$1].statusText; - } + return mode.toString(8).padStart(4, '0') +} - get headers() { - return this[INTERNALS$1].headers; - } +// EXTERNAL MODULE: ./node_modules/it-to-stream/src/index.js +var it_to_stream_src = __nccwpck_require__(79620); +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/node_modules/@libp2p/logger/dist/src/index.js - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } + + + +// Add a formatter for converting to a base58 string +debug_src.formatters.b = (v) => { + return v == null ? 'undefined' : ipfs_core_utils_node_modules_multiformats_src_bases_base58_base58btc.baseEncode(v); +}; +// Add a formatter for converting to a base32 string +debug_src.formatters.t = (v) => { + return v == null ? 'undefined' : ipfs_core_utils_node_modules_multiformats_src_bases_base32_base32.baseEncode(v); +}; +// Add a formatter for converting to a base64 string +debug_src.formatters.m = (v) => { + return v == null ? 'undefined' : node_modules_multiformats_src_bases_base64_base64.baseEncode(v); +}; +// Add a formatter for stringifying peer ids +debug_src.formatters.p = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +// Add a formatter for stringifying CIDs +debug_src.formatters.c = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +// Add a formatter for stringifying Datastore keys +debug_src.formatters.k = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +// Add a formatter for stringifying Multiaddrs +debug_src.formatters.a = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +function src_createDisabledLogger(namespace) { + const logger = () => { }; + logger.enabled = false; + logger.color = ''; + logger.diff = 0; + logger.log = () => { }; + logger.namespace = namespace; + logger.destroy = () => true; + logger.extend = () => logger; + return logger; +} +function src_logger(name) { + // trace logging is a no-op by default + let trace = src_createDisabledLogger(`${name}:trace`); + // look at all the debug names and see if trace logging has explicitly been enabled + if (debug_src.enabled(`${name}:trace`) && debug_src.names.map(r => r.toString()).find(n => n.includes(':trace')) != null) { + trace = debug_src(`${name}:trace`); + } + return Object.assign(debug_src(name), { + error: debug_src(`${name}:error`), + trace + }); } +function src_disable() { + debug.disable(); +} +function src_enable(namespaces) { + debug.enable(namespaces); +} +function src_enabled(namespaces) { + return debug.enabled(namespaces); +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/multipart-request.node.js -Body.mixIn(Response.prototype); -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); -const INTERNALS$2 = Symbol('Request internals'); -const URL = Url.URL || whatwgUrl.URL; +// @ts-expect-error no types -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = Url.parse; -const format_url = Url.format; -/** - * Wrapper around `new URL` to handle arbitrary URLs - * - * @param {string} urlStr - * @return {void} - */ -function parseURL(urlStr) { - /* - Check whether the URL is absolute or not - Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 - Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 - */ - if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL(urlStr).toString(); - } - // Fallback to old implementation for arbitrary URLs - return parse_url(urlStr); -} -const streamDestructionSupported = 'destroy' in Stream.Readable.prototype; +const multipart_request_node_merge = node_modules_merge_options.bind({ ignoreUndefined: true }) +const multipart_request_node_log = src_logger('ipfs:core-utils:multipart-request') /** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean + * @typedef {import('ipfs-core-types/src/utils').ImportCandidateStream} ImportCandidateStream */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} - -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} /** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void + * @param {ImportCandidateStream} source + * @param {AbortController} abortController + * @param {Headers|Record} [headers] + * @param {string} [boundary] */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +async function multipartRequest (source, abortController, headers = {}, boundary = `-----------------------------${nanoid()}`) { + /** + * @param {ImportCandidateStream} source + */ + async function * streamFiles (source) { + try { + let index = 0 - let parsedURL; + // @ts-expect-error + for await (const { content, path, mode, mtime } of source) { + let fileSuffix = '' + const type = content ? 'file' : 'dir' - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parseURL(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parseURL(`${input}`); - } - input = {}; - } else { - parsedURL = parseURL(input.url); - } + if (index > 0) { + yield '\r\n' - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); + fileSuffix = `-${index}` + } - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } + let fieldName = type + fileSuffix + const qs = [] - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + if (mode !== null && mode !== undefined) { + qs.push(`mode=${mode_to_string_modeToString(mode)}`) + } - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); + if (mtime != null) { + const { secs, nsecs } = mtime - const headers = new Headers(init.headers || input.headers || {}); + qs.push(`mtime=${secs}`) - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } + if (nsecs != null) { + qs.push(`mtime-nsecs=${nsecs}`) + } + } - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; + if (qs.length) { + fieldName = `${fieldName}?${qs.join('&')}` + } - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } + yield `--${boundary}\r\n` + yield `Content-Disposition: form-data; name="${fieldName}"; filename="${encodeURIComponent(path || '')}"\r\n` + yield `Content-Type: ${content ? 'application/octet-stream' : 'application/x-directory'}\r\n` + yield '\r\n' - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; + if (content) { + yield * content + } - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } + index++ + } + } catch (/** @type {any} */ err) { + multipart_request_node_log(err) + // workaround for https://github.com/node-fetch/node-fetch/issues/753 + abortController.abort() + } finally { + yield `\r\n--${boundary}--\r\n` + } + } - get method() { - return this[INTERNALS$2].method; - } + // peek at the first value in order to get the input stream moving + // and to validate its contents. + // We cannot do this in the `for await..of` in streamFiles due to + // https://github.com/node-fetch/node-fetch/issues/753 + const peekable = peekableIterator(normaliseInput(source)) - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } + /** @type {any} value **/ + const { value, done } = await peekable.peek() - get headers() { - return this[INTERNALS$2].headers; - } + if (!done) { + peekable.push(value) + } - get redirect() { - return this[INTERNALS$2].redirect; - } + return { + parts: null, + total: -1, + headers: multipart_request_node_merge(headers, { + 'Content-Type': `multipart/form-data; boundary=${boundary}` + }), + // @ts-expect-error normaliseInput returns unixfs importer import candidates + body: it_to_stream_src(streamFiles(peekable)) + } +} + +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/files/normalise-content.browser.js - get signal() { - return this[INTERNALS$2].signal; - } - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} -Body.mixIn(Request.prototype); -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); /** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request + * @param {import('ipfs-core-types/src/utils').ToContent} input */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } +async function normalise_content_browser_normaliseContent (input) { + // Bytes + if (isBytes(input)) { + return new Blob([input]) + } - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } + // String + if (typeof input === 'string' || input instanceof String) { + return new Blob([input.toString()]) + } - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } + // Blob | File + if (isBlob(input)) { + return input + } - if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } + // Browser stream + if (isReadableStream(input)) { + input = browserReadableStreamToIt(input) + } - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } + // (Async)Iterator + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + /** @type {any} peekable */ + const peekable = peekableIterator(input) - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } + /** @type {any} value **/ + const { value, done } = await peekable.peek() - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } + if (done) { + // make sure empty iterators result in empty files + return itToBlob(peekable) + } - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } + peekable.push(value) - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } + // (Async)Iterable + if (Number.isInteger(value)) { + return new Blob([Uint8Array.from(await src_all(peekable))]) + } - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js + // (Async)Iterable + if (isBytes(value) || typeof value === 'string' || value instanceof String) { + return itToBlob(peekable) + } + } - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); + throw err_code(new Error(`Unexpected input: ${input}`), 'ERR_UNEXPECTED_INPUT') } /** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError + * @param {AsyncIterable|Iterable} stream */ -function AbortError(message) { - Error.call(this, message); +async function itToBlob (stream) { + const parts = [] - this.type = 'aborted'; - this.message = message; + for await (const chunk of stream) { + parts.push(chunk) + } - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); + return new Blob(parts) } -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -const URL$1 = Url.URL || whatwgUrl.URL; +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/files/normalise-input-multiple.browser.js -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = Stream.PassThrough; -const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { - const orig = new URL$1(original).hostname; - const dest = new URL$1(destination).hostname; - return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); -}; +/** + * @typedef {import('ipfs-core-types/src/utils').ImportCandidateStream} ImportCandidateStream + * @typedef {import('ipfs-core-types/src/utils').BrowserImportCandidate} BrowserImportCandidate + */ /** - * Fetch function + * Transforms any of the `ipfs.addAll` input types into * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise + * ``` + * AsyncIterable<{ path, mode, mtime, content: Blob }> + * ``` + * + * See https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options + * + * @param {ImportCandidateStream} input + * @returns {AsyncGenerator} */ -function fetch(url, opts) { +function normalise_input_multiple_browser_normaliseInput (input) { + // @ts-expect-error browser normaliseContent returns a Blob not an AsyncIterable + return normaliseCandidateMultiple(input, normalise_content_browser_normaliseContent, true) +} - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/multipart-request.browser.js - Body.Promise = fetch.Promise; +// Import browser version otherwise electron-renderer will end up with node +// version and fail. - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - const send = (options.protocol === 'https:' ? https : http).request; - const signal = request.signal; - let response = null; +/** + * @typedef {import('ipfs-core-types/src/utils').ImportCandidateStream} ImportCandidateStream + */ - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof Stream.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; +/** + * @param {ImportCandidateStream} source + * @param {AbortController} abortController + * @param {Headers|Record} [headers] + */ +async function multipart_request_browser_multipartRequest (source, abortController, headers = {}) { + const parts = [] + const formData = new FormData() + let index = 0 + let total = 0 - if (signal && signal.aborted) { - abort(); - return; - } + for await (const { content, path, mode, mtime } of normalise_input_multiple_browser_normaliseInput(source)) { + let fileSuffix = '' + const type = content ? 'file' : 'dir' - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; + if (index > 0) { + fileSuffix = `-${index}` + } - // send request - const req = send(options); - let reqTimeout; + let fieldName = type + fileSuffix + const qs = [] - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } + if (mode !== null && mode !== undefined) { + qs.push(`mode=${mode_to_string_modeToString(mode)}`) + } - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } + if ((mtime) != null) { + const { secs, nsecs } = (mtime) - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } + qs.push(`mtime=${secs}`) - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - finalize(); - }); + if (nsecs != null) { + qs.push(`mtime-nsecs=${nsecs}`) + } + } - req.on('response', function (res) { - clearTimeout(reqTimeout); + if (qs.length) { + fieldName = `${fieldName}?${qs.join('&')}` + } - const headers = createHeadersLenient(res.headers); + if (content) { + formData.set(fieldName, content, path != null ? encodeURIComponent(path) : undefined) + const end = total + content.size + parts.push({ name: path, start: total, end }) + total = end + } else if (path != null) { + formData.set(fieldName, new File([''], encodeURIComponent(path), { type: 'application/x-directory' })) + } else { + throw new Error('path or content or both must be set') + } - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); + index++ + } - // HTTP fetch step 5.3 - let locationURL = null; - try { - locationURL = location === null ? null : new URL$1(location, request.url).toString(); - } catch (err) { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== 'manual') { - reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); - finalize(); - return; - } - } + return { + total, + parts, + headers, + body: formData + } +} - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/multipart-request.js - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; - if (!isDomainOrSubdomain(request.url, locationURL)) { - for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { - requestOpts.headers.delete(name); - } - } - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } +/** + * @typedef {import('ipfs-core-types/src/utils').ImportCandidateStream} ImportCandidateStream + */ - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } +/** + * @param {ImportCandidateStream} source + * @param {AbortController} abortController + * @param {Headers|Record} [headers] + * @param {string} [boundary] + */ +async function multipart_request_multipartRequest (source, abortController, headers = {}, boundary = `-----------------------------${nanoid()}`) { + let req = multipartRequest - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); + // In electron-renderer we use native fetch and should encode body using native + // form data. + if (env.isElectronRenderer) { + // @ts-expect-error types are different + req = multipart_request_browser_multipartRequest + } - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; + return req(source, abortController, headers, boundary) +} - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); +// EXTERNAL MODULE: ./node_modules/any-signal/index.js +var any_signal = __nccwpck_require__(28332); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/abort-signal.js - // HTTP-network fetch step 12.1.1.4: handle content codings - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } +/** + * @param {any[]} signals + * @returns {AbortSignal[]} + */ +function abort_signal_filter (signals) { + return signals.filter(Boolean) +} - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib.Z_SYNC_FLUSH, - finishFlush: zlib.Z_SYNC_FLUSH - }; +/** + * @param {...AbortSignal|undefined} signals + */ +function abortSignal (...signals) { + return (0,any_signal.anySignal)(abort_signal_filter(signals)) +} - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/block/put.js - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib.createInflate()); - } else { - body = body.pipe(zlib.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } - // for br - if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') { - body = body.pipe(zlib.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); - writeToStream(req, request); - }); -} -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; -// expose Promise -fetch.Promise = global.Promise; -module.exports = exports = fetch; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports["default"] = exports; -exports.Headers = Headers; -exports.Request = Request; -exports.Response = Response; -exports.FetchError = FetchError; +const createPut = configure((api, configOptions) => { + /** + * @type {import('../types').BlockAPI["put"]} + * @see https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-block-put + */ + async function put (data, options = {}) { + // allow aborting requests on body errors + const controller = new AbortController() + const signal = abortSignal(controller.signal, options.signal) + let res + try { + const response = await api.post('block/put', { + signal, + searchParams: toUrlSearchParams(options), + ...( + await multipart_request_multipartRequest([data], controller, options.headers) + ) + }) + res = await response.json() + } catch (/** @type {any} */ err) { + // Retry with "protobuf"/"cbor" format for go-ipfs + // TODO: remove when https://github.com/ipfs/go-cid/issues/75 resolved + if (options.format === 'dag-pb') { + return put(data, { ...options, format: 'protobuf' }) + } else if (options.format === 'dag-cbor') { + return put(data, { ...options, format: 'cbor' }) + } -/***/ }), + throw err + } -/***/ 48026: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return node_modules_multiformats_src_cid_CID.parse(res.Key) + } -"use strict"; + return put +}) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/block/rm.js -var punycode = __nccwpck_require__(85477); -var mappingTable = __nccwpck_require__(1907); -var PROCESSING_OPTIONS = { - TRANSITIONAL: 0, - NONTRANSITIONAL: 1 -}; -function normalize(str) { // fix bug in v8 - return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000'); -} -function findStatus(val) { - var start = 0; - var end = mappingTable.length - 1; +const createRm = configure(api => { + /** + * @type {import('../types').BlockAPI["rm"]} + */ + async function * rm (cid, options = {}) { + if (!Array.isArray(cid)) { + cid = [cid] + } - while (start <= end) { - var mid = Math.floor((start + end) / 2); + const res = await api.post('block/rm', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: cid.map(cid => cid.toString()), + 'stream-channels': true, + ...options + }), + headers: options.headers + }) - var target = mappingTable[mid]; - if (target[0][0] <= val && target[0][1] >= val) { - return target; - } else if (target[0][0] > val) { - end = mid - 1; - } else { - start = mid + 1; + for await (const removed of res.ndjson()) { + yield rm_toCoreInterface(removed) } } - return null; -} + return rm +}) -var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; +/** + * @param {*} removed + */ +function rm_toCoreInterface (removed) { + /** @type {import('../types').RmResult} */ + const out = { + cid: node_modules_multiformats_src_cid_CID.parse(removed.Hash) + } -function countSymbols(string) { - return string - // replace every surrogate pair with a BMP symbol - .replace(regexAstralSymbols, '_') - // then get the length - .length; -} + if (removed.Error) { + out.error = new Error(removed.Error) + } -function mapChars(domain_name, useSTD3, processing_option) { - var hasError = false; - var processed = ""; + return out +} - var len = countSymbols(domain_name); - for (var i = 0; i < len; ++i) { - var codePoint = domain_name.codePointAt(i); - var status = findStatus(codePoint); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/block/stat.js - switch (status[1]) { - case "disallowed": - hasError = true; - processed += String.fromCodePoint(codePoint); - break; - case "ignored": - break; - case "mapped": - processed += String.fromCodePoint.apply(String, status[2]); - break; - case "deviation": - if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) { - processed += String.fromCodePoint.apply(String, status[2]); - } else { - processed += String.fromCodePoint(codePoint); - } - break; - case "valid": - processed += String.fromCodePoint(codePoint); - break; - case "disallowed_STD3_mapped": - if (useSTD3) { - hasError = true; - processed += String.fromCodePoint(codePoint); - } else { - processed += String.fromCodePoint.apply(String, status[2]); - } - break; - case "disallowed_STD3_valid": - if (useSTD3) { - hasError = true; - } - processed += String.fromCodePoint(codePoint); - break; - } - } - return { - string: processed, - error: hasError - }; -} -var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/; +const stat_createStat = configure(api => { + /** + * @type {import('../types').BlockAPI["stat"]} + */ + async function stat (cid, options = {}) { + const res = await api.post('block/stat', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: cid.toString(), + ...options + }), + headers: options.headers + }) + const data = await res.json() -function validateLabel(label, processing_option) { - if (label.substr(0, 4) === "xn--") { - label = punycode.toUnicode(label); - processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; + return { cid: node_modules_multiformats_src_cid_CID.parse(data.Key), size: data.Size } } - var error = false; + return stat +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/block/index.js + + - if (normalize(label) !== label || - (label[3] === "-" && label[4] === "-") || - label[0] === "-" || label[label.length - 1] === "-" || - label.indexOf(".") !== -1 || - label.search(combiningMarksRegex) === 0) { - error = true; - } - var len = countSymbols(label); - for (var i = 0; i < len; ++i) { - var status = findStatus(label.codePointAt(i)); - if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") || - (processing === PROCESSING_OPTIONS.NONTRANSITIONAL && - status[1] !== "valid" && status[1] !== "deviation")) { - error = true; - break; - } - } +/** + * @param {import('../types').Options} config + */ +function createBlock (config) { return { - label: label, - error: error - }; + get: createGet(config), + put: createPut(config), + rm: createRm(config), + stat: stat_createStat(config) + } } -function processing(domain_name, useSTD3, processing_option) { - var result = mapChars(domain_name, useSTD3, processing_option); - result.string = normalize(result.string); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/bootstrap/add.js - var labels = result.string.split("."); - for (var i = 0; i < labels.length; ++i) { - try { - var validation = validateLabel(labels[i]); - labels[i] = validation.label; - result.error = result.error || validation.error; - } catch(e) { - result.error = true; - } - } - return { - string: labels.join("."), - error: result.error - }; -} -module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { - var result = processing(domain_name, useSTD3, processing_option); - var labels = result.string.split("."); - labels = labels.map(function(l) { - try { - return punycode.toASCII(l); - } catch(e) { - result.error = true; - return l; - } - }); - if (verifyDnsLength) { - var total = labels.slice(0, labels.length - 1).join(".").length; - if (total.length > 253 || total.length === 0) { - result.error = true; - } +const createAdd = configure(api => { + /** + * @type {import('../types').BootstrapAPI["add"]} + */ + async function add (addr, options = {}) { + const res = await api.post('bootstrap/add', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: addr, + ...options + }), + headers: options.headers + }) - for (var i=0; i < labels.length; ++i) { - if (labels.length > 63 || labels.length === 0) { - result.error = true; - break; - } - } + const { Peers } = await res.json() + + return { Peers: Peers.map((/** @type {string} */ ma) => src_multiaddr(ma)) } } - if (result.error) return null; - return labels.join("."); -}; + return add +}) -module.exports.toUnicode = function(domain_name, useSTD3) { - var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/bootstrap/list.js - return { - domain: result.string, - error: result.error - }; -}; -module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; -/***/ }), +const createList = configure(api => { + /** + * @type {import('../types').BootstrapAPI["list"]} + */ + async function list (options = {}) { + const res = await api.post('bootstrap/list', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) -/***/ 40487: -/***/ ((module) => { + const { Peers } = await res.json() -"use strict"; + return { Peers: Peers.map((/** @type {string} */ ma) => src_multiaddr(ma)) } + } + return list +}) -var conversions = {}; -module.exports = conversions; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/bootstrap/rm.js -function sign(x) { - return x < 0 ? -1 : 1; -} -function evenRound(x) { - // Round x to the nearest integer, choosing the even integer if it lies halfway between two. - if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor) - return Math.floor(x); - } else { - return Math.round(x); - } -} -function createNumberConversion(bitLength, typeOpts) { - if (!typeOpts.unsigned) { - --bitLength; - } - const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength); - const upperBound = Math.pow(2, bitLength) - 1; - const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength); - const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1); +const rm_createRm = configure(api => { + /** + * @type {import('../types').BootstrapAPI["rm"]} + */ + async function rm (addr, options = {}) { + const res = await api.post('bootstrap/rm', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: addr, + ...options + }), + headers: options.headers + }) - return function(V, opts) { - if (!opts) opts = {}; + const { Peers } = await res.json() - let x = +V; + return { Peers: Peers.map((/** @type {string} */ ma) => src_multiaddr(ma)) } + } - if (opts.enforceRange) { - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite number"); - } + return rm +}) - x = sign(x) * Math.floor(Math.abs(x)); - if (x < lowerBound || x > upperBound) { - throw new TypeError("Argument is not in byte range"); - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/bootstrap/index.js - return x; - } - if (!isNaN(x) && opts.clamp) { - x = evenRound(x); - if (x < lowerBound) x = lowerBound; - if (x > upperBound) x = upperBound; - return x; - } - if (!Number.isFinite(x) || x === 0) { - return 0; - } +/** + * @param {import('../types').Options} config + */ +function createBootstrap (config) { + return { + add: createAdd(config), + list: createList(config), + rm: rm_createRm(config) + } +} - x = sign(x) * Math.floor(Math.abs(x)); - x = x % moduloVal; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/config/profiles/apply.js - if (!typeOpts.unsigned && x >= moduloBound) { - return x - moduloVal; - } else if (typeOpts.unsigned) { - if (x < 0) { - x += moduloVal; - } else if (x === -0) { // don't return negative zero - return 0; - } - } - return x; + +const createApply = configure(api => { + /** + * @type {import('../../types').ConfigProfilesAPI["apply"]} + */ + async function apply (profile, options = {}) { + const res = await api.post('config/profile/apply', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: profile, + ...options + }), + headers: options.headers + }) + const data = await res.json() + + return { + original: data.OldCfg, updated: data.NewCfg } -} + } -conversions["void"] = function () { - return undefined; -}; + return apply +}) -conversions["boolean"] = function (val) { - return !!val; -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/config/profiles/index.js -conversions["byte"] = createNumberConversion(8, { unsigned: false }); -conversions["octet"] = createNumberConversion(8, { unsigned: true }); -conversions["short"] = createNumberConversion(16, { unsigned: false }); -conversions["unsigned short"] = createNumberConversion(16, { unsigned: true }); +/** + * @param {import('../../types').Options} config + */ +function createProfiles (config) { + return { + apply: createApply(config) + } +} -conversions["long"] = createNumberConversion(32, { unsigned: false }); -conversions["unsigned long"] = createNumberConversion(32, { unsigned: true }); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/config/get.js -conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 }); -conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 }); -conversions["double"] = function (V) { - const x = +V; - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite floating-point value"); +const get_createGet = configure(api => { + /** + * @type {import('../types.js').ConfigAPI["get"]} + */ + const get = async (key, options = {}) => { + if (!key) { + throw new Error('key argument is required') } - return x; -}; + const res = await api.post('config', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: key, + ...options + }), + headers: options.headers + }) + const data = await res.json() -conversions["unrestricted double"] = function (V) { - const x = +V; + return data.Value + } - if (isNaN(x)) { - throw new TypeError("Argument is NaN"); - } + return get +}) - return x; -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/config/get-all.js -// not quite valid, but good enough for JS -conversions["float"] = conversions["double"]; -conversions["unrestricted float"] = conversions["unrestricted double"]; -conversions["DOMString"] = function (V, opts) { - if (!opts) opts = {}; - if (opts.treatNullAsEmptyString && V === null) { - return ""; - } +const createGetAll = configure(api => { + /** + * @type {import('../types.js').ConfigAPI["getAll"]} + */ + const getAll = async (options = {}) => { + const res = await api.post('config/show', { + signal: options.signal, + searchParams: toUrlSearchParams({ + ...options + }), + headers: options.headers + }) + const data = await res.json() - return String(V); -}; + return data + } -conversions["ByteString"] = function (V, opts) { - const x = String(V); - let c = undefined; - for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { - if (c > 255) { - throw new TypeError("Argument is not a valid bytestring"); - } + return getAll +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/dist/src/util/as-uint8array.js +/** + * To guarantee Uint8Array semantics, convert nodejs Buffers + * into vanilla Uint8Arrays + */ +function dist_src_util_as_uint8array_asUint8Array(buf) { + if (globalThis.Buffer != null) { + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + return buf; +} +//# sourceMappingURL=as-uint8array.js.map +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function node_modules_uint8arrays_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str + } + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; } + return vch + } + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + } +} +var node_modules_uint8arrays_node_modules_multiformats_vendor_base_x_src = node_modules_uint8arrays_node_modules_multiformats_vendor_base_x_base; - return x; -}; +var node_modules_uint8arrays_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = node_modules_uint8arrays_node_modules_multiformats_vendor_base_x_src; -conversions["USVString"] = function (V) { - const S = String(V); - const n = S.length; - const U = []; - for (let i = 0; i < n; ++i) { - const c = S.charCodeAt(i); - if (c < 0xD800 || c > 0xDFFF) { - U.push(String.fromCodePoint(c)); - } else if (0xDC00 <= c && c <= 0xDFFF) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - if (i === n - 1) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - const d = S.charCodeAt(i + 1); - if (0xDC00 <= d && d <= 0xDFFF) { - const a = c & 0x3FF; - const b = d & 0x3FF; - U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b)); - ++i; - } else { - U.push(String.fromCodePoint(0xFFFD)); - } - } - } - } +/* harmony default export */ const node_modules_uint8arrays_node_modules_multiformats_vendor_base_x = (node_modules_uint8arrays_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); - return U.join(''); -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bytes.js +const node_modules_uint8arrays_node_modules_multiformats_src_bytes_empty = new Uint8Array(0) -conversions["Date"] = function (V, opts) { - if (!(V instanceof Date)) { - throw new TypeError("Argument is not a Date object"); - } - if (isNaN(V)) { - return undefined; - } +/** + * @param {Uint8Array} d + */ +const node_modules_uint8arrays_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') - return V; -}; +/** + * @param {string} hex + */ +const node_modules_uint8arrays_node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : node_modules_uint8arrays_node_modules_multiformats_src_bytes_empty +} -conversions["RegExp"] = function (V, opts) { - if (!(V instanceof RegExp)) { - V = new RegExp(V); +/** + * @param {Uint8Array} aa + * @param {Uint8Array} bb + */ +const node_modules_uint8arrays_node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false + } + + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false } + } - return V; -}; + return true +} +/** + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} + */ +const node_modules_uint8arrays_node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) + } + throw new Error('Unknown type, must be binary type') +} -/***/ }), +/** + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} + */ +const node_modules_uint8arrays_node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) -/***/ 79722: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/** + * @param {string} str + * @returns {Uint8Array} + */ +const node_modules_uint8arrays_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) -"use strict"; +/** + * @param {Uint8Array} b + * @returns {string} + */ +const node_modules_uint8arrays_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) -const usm = __nccwpck_require__(40402); -exports.implementation = class URLImpl { - constructor(constructorArgs) { - const url = constructorArgs[0]; - const base = constructorArgs[1]; - let parsedBase = null; - if (base !== undefined) { - parsedBase = usm.basicURLParse(base); - if (parsedBase === "failure") { - throw new TypeError("Invalid base URL"); - } - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base.js - const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); - } - this._url = parsedURL; +// Linter can't see that API is used in types. +// eslint-disable-next-line - // TODO: query stuff - } - get href() { - return usm.serializeURL(this._url); +/** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} + */ +class uint8arrays_node_modules_multiformats_src_bases_base_Encoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + */ + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode } - set href(v) { - const parsedURL = usm.basicURLParse(v); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') } + } +} - this._url = parsedURL; +/** + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} + */ +class uint8arrays_node_modules_multiformats_src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') + } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode } - get origin() { - return usm.serializeURLOrigin(this._url); + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) + } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') + } } - get protocol() { - return this._url.scheme + ":"; + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return uint8arrays_node_modules_multiformats_src_bases_base_or(this, decoder) } +} - set protocol(v) { - usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" }); +/** + * @template {string} Prefix + * @typedef {Record>} Decoders + */ + +/** + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} + */ +class uint8arrays_node_modules_multiformats_src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders } - get username() { - return this._url.username; + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return uint8arrays_node_modules_multiformats_src_bases_base_or(this, decoder) } - set username(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) } - - usm.setTheUsername(this._url, v); } +} - get password() { - return this._url.password; +/** + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} + */ +const uint8arrays_node_modules_multiformats_src_bases_base_or = (left, right) => new uint8arrays_node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) + +/** + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} + */ +class uint8arrays_node_modules_multiformats_src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new uint8arrays_node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new uint8arrays_node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode) } - set password(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; - } + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) + } - usm.setThePassword(this._url, v); + /** + * @param {string} input + */ + decode (input) { + return this.decoder.decode(input) } +} - get host() { - const url = this._url; +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} + */ +const uint8arrays_node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new uint8arrays_node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode) - if (url.host === null) { - return ""; - } +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} + */ +const uint8arrays_node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = node_modules_uint8arrays_node_modules_multiformats_vendor_base_x(alphabet, name) + return uint8arrays_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => node_modules_uint8arrays_node_modules_multiformats_src_bytes_coerce(decode(text)) + }) +} - if (url.port === null) { - return usm.serializeHost(url.host); - } +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const uint8arrays_node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i + } - return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end } - set host(v) { - if (this._url.cannotBeABaseURL) { - return; + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) + + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) } - usm.basicURLParse(v, { url: this._url, stateOverride: "host" }); - } + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar - get hostname() { - if (this._url.host === null) { - return ""; + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) } + } - return usm.serializeHost(this._url.host); + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') } - set hostname(v) { - if (this._url.cannotBeABaseURL) { - return; + return out +} + +/** + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} + */ +const uint8arrays_node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' + + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 + + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] } + } - usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" }); + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] } - get port() { - if (this._url.port === null) { - return ""; + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' } - - return usm.serializeInteger(this._url.port); } - set port(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; + return out +} + +/** + * RFC4648 Factory + * + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar + */ +const uint8arrays_node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return uint8arrays_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return uint8arrays_node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return uint8arrays_node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) } + }) +} - if (v === "") { - this._url.port = null; - } else { - usm.basicURLParse(v, { url: this._url, stateOverride: "port" }); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base10.js + + +const node_modules_multiformats_src_bases_base10_base10 = uint8arrays_node_modules_multiformats_src_bases_base_baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base16.js +// @ts-check + + + +const node_modules_multiformats_src_bases_base16_base16 = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'f', + name: 'base16', + alphabet: '0123456789abcdef', + bitsPerChar: 4 +}) + +const node_modules_multiformats_src_bases_base16_base16upper = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'F', + name: 'base16upper', + alphabet: '0123456789ABCDEF', + bitsPerChar: 4 +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base2.js +// @ts-check + + + +const node_modules_multiformats_src_bases_base2_base2 = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base256emoji.js + + +const node_modules_multiformats_src_bases_base256emoji_alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂') +const node_modules_multiformats_src_bases_base256emoji_alphabetBytesToChars = /** @type {string[]} */ (node_modules_multiformats_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[i] = c; return p }, /** @type {string[]} */([]))) +const node_modules_multiformats_src_bases_base256emoji_alphabetCharsToBytes = /** @type {number[]} */ (node_modules_multiformats_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[/** @type {number} */ (c.codePointAt(0))] = i; return p }, /** @type {number[]} */([]))) + +/** + * @param {Uint8Array} data + * @returns {string} + */ +function uint8arrays_node_modules_multiformats_src_bases_base256emoji_encode (data) { + return data.reduce((p, c) => { + p += node_modules_multiformats_src_bases_base256emoji_alphabetBytesToChars[c] + return p + }, '') +} + +/** + * @param {string} str + * @returns {Uint8Array} + */ +function uint8arrays_node_modules_multiformats_src_bases_base256emoji_decode (str) { + const byts = [] + for (const char of str) { + const byt = node_modules_multiformats_src_bases_base256emoji_alphabetCharsToBytes[/** @type {number} */ (char.codePointAt(0))] + if (byt === undefined) { + throw new Error(`Non-base256emoji character: ${char}`) } + byts.push(byt) } + return new Uint8Array(byts) +} - get pathname() { - if (this._url.cannotBeABaseURL) { - return this._url.path[0]; - } +const node_modules_multiformats_src_bases_base256emoji_base256emoji = uint8arrays_node_modules_multiformats_src_bases_base_from({ + prefix: '🚀', + name: 'base256emoji', + encode: uint8arrays_node_modules_multiformats_src_bases_base256emoji_encode, + decode: uint8arrays_node_modules_multiformats_src_bases_base256emoji_decode +}) - if (this._url.path.length === 0) { - return ""; - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base32.js - return "/" + this._url.path.join("/"); - } - set pathname(v) { - if (this._url.cannotBeABaseURL) { - return; - } +const node_modules_uint8arrays_node_modules_multiformats_src_bases_base32_base32 = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) - this._url.path = []; - usm.basicURLParse(v, { url: this._url, stateOverride: "path start" }); - } +const node_modules_uint8arrays_node_modules_multiformats_src_bases_base32_base32upper = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) - get search() { - if (this._url.query === null || this._url.query === "") { - return ""; - } +const uint8arrays_node_modules_multiformats_src_bases_base32_base32pad = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) - return "?" + this._url.query; - } +const uint8arrays_node_modules_multiformats_src_bases_base32_base32padupper = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) - set search(v) { - // TODO: query stuff +const uint8arrays_node_modules_multiformats_src_bases_base32_base32hex = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) - const url = this._url; +const uint8arrays_node_modules_multiformats_src_bases_base32_base32hexupper = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) - if (v === "") { - url.query = null; - return; - } +const uint8arrays_node_modules_multiformats_src_bases_base32_base32hexpad = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) - const input = v[0] === "?" ? v.substring(1) : v; - url.query = ""; - usm.basicURLParse(input, { url, stateOverride: "query" }); - } +const uint8arrays_node_modules_multiformats_src_bases_base32_base32hexpadupper = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) - get hash() { - if (this._url.fragment === null || this._url.fragment === "") { - return ""; - } +const uint8arrays_node_modules_multiformats_src_bases_base32_base32z = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) - return "#" + this._url.fragment; - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base36.js - set hash(v) { - if (v === "") { - this._url.fragment = null; - return; - } - const input = v[0] === "#" ? v.substring(1) : v; - this._url.fragment = ""; - usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); - } +const node_modules_multiformats_src_bases_base36_base36 = uint8arrays_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}) - toJSON() { - return this.href; - } -}; +const node_modules_multiformats_src_bases_base36_base36upper = uint8arrays_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base58.js -/***/ }), -/***/ 45724: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const node_modules_uint8arrays_node_modules_multiformats_src_bases_base58_base58btc = uint8arrays_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) -"use strict"; +const uint8arrays_node_modules_multiformats_src_bases_base58_base58flickr = uint8arrays_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base64.js +// @ts-check -const conversions = __nccwpck_require__(40487); -const utils = __nccwpck_require__(59468); -const Impl = __nccwpck_require__(79722); -const impl = utils.implSymbol; -function URL(url) { - if (!this || this[impl] || !(this instanceof URL)) { - throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); - } - if (arguments.length < 1) { - throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present."); - } - const args = []; - for (let i = 0; i < arguments.length && i < 2; ++i) { - args[i] = arguments[i]; - } - args[0] = conversions["USVString"](args[0]); - if (args[1] !== undefined) { - args[1] = conversions["USVString"](args[1]); - } +const uint8arrays_node_modules_multiformats_src_bases_base64_base64 = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) - module.exports.setup(this, args); -} +const uint8arrays_node_modules_multiformats_src_bases_base64_base64pad = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) -URL.prototype.toJSON = function toJSON() { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); - } - const args = []; - for (let i = 0; i < arguments.length && i < 0; ++i) { - args[i] = arguments[i]; - } - return this[impl].toJSON.apply(this[impl], args); -}; -Object.defineProperty(URL.prototype, "href", { - get() { - return this[impl].href; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].href = V; - }, - enumerable: true, - configurable: true -}); +const uint8arrays_node_modules_multiformats_src_bases_base64_base64url = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) -URL.prototype.toString = function () { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); - } - return this.href; -}; +const uint8arrays_node_modules_multiformats_src_bases_base64_base64urlpad = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) -Object.defineProperty(URL.prototype, "origin", { - get() { - return this[impl].origin; - }, - enumerable: true, - configurable: true -}); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/base8.js +// @ts-check -Object.defineProperty(URL.prototype, "protocol", { - get() { - return this[impl].protocol; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].protocol = V; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(URL.prototype, "username", { - get() { - return this[impl].username; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].username = V; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(URL.prototype, "password", { - get() { - return this[impl].password; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].password = V; - }, - enumerable: true, - configurable: true -}); +const node_modules_multiformats_src_bases_base8_base8 = uint8arrays_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}) -Object.defineProperty(URL.prototype, "host", { - get() { - return this[impl].host; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].host = V; - }, - enumerable: true, - configurable: true -}); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/bases/identity.js +// @ts-check -Object.defineProperty(URL.prototype, "hostname", { - get() { - return this[impl].hostname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].hostname = V; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(URL.prototype, "port", { - get() { - return this[impl].port; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].port = V; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(URL.prototype, "pathname", { - get() { - return this[impl].pathname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].pathname = V; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(URL.prototype, "search", { - get() { - return this[impl].search; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].search = V; - }, - enumerable: true, - configurable: true -}); +const uint8arrays_node_modules_multiformats_src_bases_identity_identity = uint8arrays_node_modules_multiformats_src_bases_base_from({ + prefix: '\x00', + name: 'identity', + encode: (buf) => node_modules_uint8arrays_node_modules_multiformats_src_bytes_toString(buf), + decode: (str) => node_modules_uint8arrays_node_modules_multiformats_src_bytes_fromString(str) +}) -Object.defineProperty(URL.prototype, "hash", { - get() { - return this[impl].hash; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].hash = V; - }, - enumerable: true, - configurable: true -}); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/codecs/json.js +// @ts-check +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ -module.exports = { - is(obj) { - return !!obj && obj[impl] instanceof Impl.implementation; - }, - create(constructorArgs, privateData) { - let obj = Object.create(URL.prototype); - this.setup(obj, constructorArgs, privateData); - return obj; - }, - setup(obj, constructorArgs, privateData) { - if (!privateData) privateData = {}; - privateData.wrapper = obj; +const uint8arrays_node_modules_multiformats_src_codecs_json_textEncoder = new TextEncoder() +const uint8arrays_node_modules_multiformats_src_codecs_json_textDecoder = new TextDecoder() - obj[impl] = new Impl.implementation(constructorArgs, privateData); - obj[impl][utils.wrapperSymbol] = obj; - }, - interface: URL, - expose: { - Window: { URL: URL }, - Worker: { URL: URL } - } -}; +const uint8arrays_node_modules_multiformats_src_codecs_json_name = 'json' +const uint8arrays_node_modules_multiformats_src_codecs_json_code = 0x0200 + +/** + * @template T + * @param {T} node + * @returns {ByteView} + */ +const uint8arrays_node_modules_multiformats_src_codecs_json_encode = (node) => uint8arrays_node_modules_multiformats_src_codecs_json_textEncoder.encode(JSON.stringify(node)) +/** + * @template T + * @param {ByteView} data + * @returns {T} + */ +const uint8arrays_node_modules_multiformats_src_codecs_json_decode = (data) => JSON.parse(uint8arrays_node_modules_multiformats_src_codecs_json_textDecoder.decode(data)) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/codecs/raw.js +// @ts-check -/***/ }), -/***/ 73323: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ +const uint8arrays_node_modules_multiformats_src_codecs_raw_name = 'raw' +const uint8arrays_node_modules_multiformats_src_codecs_raw_code = 0x55 -exports.URL = __nccwpck_require__(45724)["interface"]; -exports.serializeURL = __nccwpck_require__(40402).serializeURL; -exports.serializeURLOrigin = __nccwpck_require__(40402).serializeURLOrigin; -exports.basicURLParse = __nccwpck_require__(40402).basicURLParse; -exports.setTheUsername = __nccwpck_require__(40402).setTheUsername; -exports.setThePassword = __nccwpck_require__(40402).setThePassword; -exports.serializeHost = __nccwpck_require__(40402).serializeHost; -exports.serializeInteger = __nccwpck_require__(40402).serializeInteger; -exports.parseURL = __nccwpck_require__(40402).parseURL; +/** + * @param {Uint8Array} node + * @returns {ByteView} + */ +const uint8arrays_node_modules_multiformats_src_codecs_raw_encode = (node) => node_modules_uint8arrays_node_modules_multiformats_src_bytes_coerce(node) +/** + * @param {ByteView} data + * @returns {Uint8Array} + */ +const uint8arrays_node_modules_multiformats_src_codecs_raw_decode = (data) => node_modules_uint8arrays_node_modules_multiformats_src_bytes_coerce(data) -/***/ }), +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/vendor/varint.js +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_encode_1 = node_modules_uint8arrays_node_modules_multiformats_vendor_varint_encode; -/***/ 40402: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_MSB = 0x80 + , node_modules_uint8arrays_node_modules_multiformats_vendor_varint_REST = 0x7F + , node_modules_uint8arrays_node_modules_multiformats_vendor_varint_MSBALL = ~node_modules_uint8arrays_node_modules_multiformats_vendor_varint_REST + , node_modules_uint8arrays_node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31); -"use strict"; - -const punycode = __nccwpck_require__(85477); -const tr46 = __nccwpck_require__(48026); - -const specialSchemes = { - ftp: 21, - file: null, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 -}; - -const failure = Symbol("failure"); - -function countSymbols(str) { - return punycode.ucs2.decode(str).length; -} - -function at(input, idx) { - const c = input[idx]; - return isNaN(c) ? undefined : String.fromCodePoint(c); -} - -function isASCIIDigit(c) { - return c >= 0x30 && c <= 0x39; -} - -function isASCIIAlpha(c) { - return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); -} - -function isASCIIAlphanumeric(c) { - return isASCIIAlpha(c) || isASCIIDigit(c); -} - -function isASCIIHex(c) { - return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); -} - -function isSingleDot(buffer) { - return buffer === "." || buffer.toLowerCase() === "%2e"; -} - -function isDoubleDot(buffer) { - buffer = buffer.toLowerCase(); - return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; -} - -function isWindowsDriveLetterCodePoints(cp1, cp2) { - return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); -} - -function isWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); -} - -function isNormalizedWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; -} - -function containsForbiddenHostCodePoint(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function containsForbiddenHostCodePointExcludingPercent(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function isSpecialScheme(scheme) { - return specialSchemes[scheme] !== undefined; -} - -function isSpecial(url) { - return isSpecialScheme(url.scheme); -} - -function defaultPort(scheme) { - return specialSchemes[scheme]; -} - -function percentEncode(c) { - let hex = c.toString(16).toUpperCase(); - if (hex.length === 1) { - hex = "0" + hex; - } - - return "%" + hex; -} - -function utf8PercentEncode(c) { - const buf = new Buffer(c); - - let str = ""; - - for (let i = 0; i < buf.length; ++i) { - str += percentEncode(buf[i]); - } - - return str; -} - -function utf8PercentDecode(str) { - const input = new Buffer(str); - const output = []; - for (let i = 0; i < input.length; ++i) { - if (input[i] !== 37) { - output.push(input[i]); - } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { - output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); - i += 2; - } else { - output.push(input[i]); - } - } - return new Buffer(output).toString(); -} - -function isC0ControlPercentEncode(c) { - return c <= 0x1F || c > 0x7E; -} - -const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); -function isPathPercentEncode(c) { - return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); -} - -const extraUserinfoPercentEncodeSet = - new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); -function isUserinfoPercentEncode(c) { - return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); -} - -function percentEncodeChar(c, encodeSetPredicate) { - const cStr = String.fromCodePoint(c); - - if (encodeSetPredicate(c)) { - return utf8PercentEncode(cStr); - } - - return cStr; -} - -function parseIPv4Number(input) { - let R = 10; - - if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { - input = input.substring(2); - R = 16; - } else if (input.length >= 2 && input.charAt(0) === "0") { - input = input.substring(1); - R = 8; - } - - if (input === "") { - return 0; - } - - const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); - if (regex.test(input)) { - return failure; - } - - return parseInt(input, R); -} - -function parseIPv4(input) { - const parts = input.split("."); - if (parts[parts.length - 1] === "") { - if (parts.length > 1) { - parts.pop(); - } - } - - if (parts.length > 4) { - return input; - } - - const numbers = []; - for (const part of parts) { - if (part === "") { - return input; - } - const n = parseIPv4Number(part); - if (n === failure) { - return input; - } - - numbers.push(n); - } - - for (let i = 0; i < numbers.length - 1; ++i) { - if (numbers[i] > 255) { - return failure; - } - } - if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { - return failure; - } - - let ipv4 = numbers.pop(); - let counter = 0; - - for (const n of numbers) { - ipv4 += n * Math.pow(256, 3 - counter); - ++counter; - } - - return ipv4; -} - -function serializeIPv4(address) { - let output = ""; - let n = address; - - for (let i = 1; i <= 4; ++i) { - output = String(n % 256) + output; - if (i !== 4) { - output = "." + output; - } - n = Math.floor(n / 256); - } - - return output; -} - -function parseIPv6(input) { - const address = [0, 0, 0, 0, 0, 0, 0, 0]; - let pieceIndex = 0; - let compress = null; - let pointer = 0; - - input = punycode.ucs2.decode(input); - - if (input[pointer] === 58) { - if (input[pointer + 1] !== 58) { - return failure; - } - - pointer += 2; - ++pieceIndex; - compress = pieceIndex; - } - - while (pointer < input.length) { - if (pieceIndex === 8) { - return failure; - } - - if (input[pointer] === 58) { - if (compress !== null) { - return failure; - } - ++pointer; - ++pieceIndex; - compress = pieceIndex; - continue; - } - - let value = 0; - let length = 0; - - while (length < 4 && isASCIIHex(input[pointer])) { - value = value * 0x10 + parseInt(at(input, pointer), 16); - ++pointer; - ++length; - } - - if (input[pointer] === 46) { - if (length === 0) { - return failure; - } - - pointer -= length; - - if (pieceIndex > 6) { - return failure; - } - - let numbersSeen = 0; - - while (input[pointer] !== undefined) { - let ipv4Piece = null; - - if (numbersSeen > 0) { - if (input[pointer] === 46 && numbersSeen < 4) { - ++pointer; - } else { - return failure; - } - } - - if (!isASCIIDigit(input[pointer])) { - return failure; - } - - while (isASCIIDigit(input[pointer])) { - const number = parseInt(at(input, pointer)); - if (ipv4Piece === null) { - ipv4Piece = number; - } else if (ipv4Piece === 0) { - return failure; - } else { - ipv4Piece = ipv4Piece * 10 + number; - } - if (ipv4Piece > 255) { - return failure; - } - ++pointer; - } - - address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; - - ++numbersSeen; - - if (numbersSeen === 2 || numbersSeen === 4) { - ++pieceIndex; - } - } - - if (numbersSeen !== 4) { - return failure; - } - - break; - } else if (input[pointer] === 58) { - ++pointer; - if (input[pointer] === undefined) { - return failure; - } - } else if (input[pointer] !== undefined) { - return failure; - } - - address[pieceIndex] = value; - ++pieceIndex; - } - - if (compress !== null) { - let swaps = pieceIndex - compress; - pieceIndex = 7; - while (pieceIndex !== 0 && swaps > 0) { - const temp = address[compress + swaps - 1]; - address[compress + swaps - 1] = address[pieceIndex]; - address[pieceIndex] = temp; - --pieceIndex; - --swaps; - } - } else if (compress === null && pieceIndex !== 8) { - return failure; - } - - return address; -} - -function serializeIPv6(address) { - let output = ""; - const seqResult = findLongestZeroSequence(address); - const compress = seqResult.idx; - let ignore0 = false; - - for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { - if (ignore0 && address[pieceIndex] === 0) { - continue; - } else if (ignore0) { - ignore0 = false; - } - - if (compress === pieceIndex) { - const separator = pieceIndex === 0 ? "::" : ":"; - output += separator; - ignore0 = true; - continue; - } - - output += address[pieceIndex].toString(16); - - if (pieceIndex !== 7) { - output += ":"; - } - } - - return output; -} - -function parseHost(input, isSpecialArg) { - if (input[0] === "[") { - if (input[input.length - 1] !== "]") { - return failure; - } - - return parseIPv6(input.substring(1, input.length - 1)); - } - - if (!isSpecialArg) { - return parseOpaqueHost(input); - } - - const domain = utf8PercentDecode(input); - const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); - if (asciiDomain === null) { - return failure; - } - - if (containsForbiddenHostCodePoint(asciiDomain)) { - return failure; - } - - const ipv4Host = parseIPv4(asciiDomain); - if (typeof ipv4Host === "number" || ipv4Host === failure) { - return ipv4Host; - } - - return asciiDomain; -} - -function parseOpaqueHost(input) { - if (containsForbiddenHostCodePointExcludingPercent(input)) { - return failure; - } - - let output = ""; - const decoded = punycode.ucs2.decode(input); - for (let i = 0; i < decoded.length; ++i) { - output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); - } - return output; -} - -function findLongestZeroSequence(arr) { - let maxIdx = null; - let maxLen = 1; // only find elements > 1 - let currStart = null; - let currLen = 0; - - for (let i = 0; i < arr.length; ++i) { - if (arr[i] !== 0) { - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - currStart = null; - currLen = 0; - } else { - if (currStart === null) { - currStart = i; - } - ++currLen; - } - } - - // if trailing zeros - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - return { - idx: maxIdx, - len: maxLen - }; -} - -function serializeHost(host) { - if (typeof host === "number") { - return serializeIPv4(host); - } - - // IPv6 serializer - if (host instanceof Array) { - return "[" + serializeIPv6(host) + "]"; - } - - return host; -} - -function trimControlChars(url) { - return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); -} - -function trimTabAndNewline(url) { - return url.replace(/\u0009|\u000A|\u000D/g, ""); -} - -function shortenPath(url) { - const path = url.path; - if (path.length === 0) { - return; - } - if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { - return; - } - - path.pop(); -} - -function includesCredentials(url) { - return url.username !== "" || url.password !== ""; -} - -function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; -} - -function isNormalizedWindowsDriveLetter(string) { - return /^[A-Za-z]:$/.test(string); -} - -function URLStateMachine(input, base, encodingOverride, url, stateOverride) { - this.pointer = 0; - this.input = input; - this.base = base || null; - this.encodingOverride = encodingOverride || "utf-8"; - this.stateOverride = stateOverride; - this.url = url; - this.failure = false; - this.parseError = false; - - if (!this.url) { - this.url = { - scheme: "", - username: "", - password: "", - host: null, - port: null, - path: [], - query: null, - fragment: null, - - cannotBeABaseURL: false - }; - - const res = trimControlChars(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - } - - const res = trimTabAndNewline(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - - this.state = stateOverride || "scheme start"; - - this.buffer = ""; - this.atFlag = false; - this.arrFlag = false; - this.passwordTokenSeenFlag = false; - - this.input = punycode.ucs2.decode(this.input); - - for (; this.pointer <= this.input.length; ++this.pointer) { - const c = this.input[this.pointer]; - const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); - - // exec state machine - const ret = this["parse " + this.state](c, cStr); - if (!ret) { - break; // terminate algorithm - } else if (ret === failure) { - this.failure = true; - break; - } - } -} - -URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { - if (isASCIIAlpha(c)) { - this.buffer += cStr.toLowerCase(); - this.state = "scheme"; - } else if (!this.stateOverride) { - this.state = "no scheme"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { - if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { - this.buffer += cStr.toLowerCase(); - } else if (c === 58) { - if (this.stateOverride) { - if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { - return false; - } - - if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { - return false; - } - - if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { - return false; - } - - if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { - return false; - } - } - this.url.scheme = this.buffer; - this.buffer = ""; - if (this.stateOverride) { - return false; - } - if (this.url.scheme === "file") { - if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { - this.parseError = true; - } - this.state = "file"; - } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { - this.state = "special relative or authority"; - } else if (isSpecial(this.url)) { - this.state = "special authority slashes"; - } else if (this.input[this.pointer + 1] === 47) { - this.state = "path or authority"; - ++this.pointer; - } else { - this.url.cannotBeABaseURL = true; - this.url.path.push(""); - this.state = "cannot-be-a-base-URL path"; - } - } else if (!this.stateOverride) { - this.buffer = ""; - this.state = "no scheme"; - this.pointer = -1; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { - if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { - return failure; - } else if (this.base.cannotBeABaseURL && c === 35) { - this.url.scheme = this.base.scheme; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.url.cannotBeABaseURL = true; - this.state = "fragment"; - } else if (this.base.scheme === "file") { - this.state = "file"; - --this.pointer; - } else { - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { - if (c === 47) { - this.state = "authority"; - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative"] = function parseRelative(c) { - this.url.scheme = this.base.scheme; - if (isNaN(c)) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 47) { - this.state = "relative slash"; - } else if (c === 63) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else if (isSpecial(this.url) && c === 92) { - this.parseError = true; - this.state = "relative slash"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(0, this.base.path.length - 1); - - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { - if (isSpecial(this.url) && (c === 47 || c === 92)) { - if (c === 92) { - this.parseError = true; - } - this.state = "special authority ignore slashes"; - } else if (c === 47) { - this.state = "authority"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "special authority ignore slashes"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { - if (c !== 47 && c !== 92) { - this.state = "authority"; - --this.pointer; - } else { - this.parseError = true; - } - - return true; -}; - -URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { - if (c === 64) { - this.parseError = true; - if (this.atFlag) { - this.buffer = "%40" + this.buffer; - } - this.atFlag = true; - - // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars - const len = countSymbols(this.buffer); - for (let pointer = 0; pointer < len; ++pointer) { - const codePoint = this.buffer.codePointAt(pointer); - - if (codePoint === 58 && !this.passwordTokenSeenFlag) { - this.passwordTokenSeenFlag = true; - continue; - } - const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); - if (this.passwordTokenSeenFlag) { - this.url.password += encodedCodePoints; - } else { - this.url.username += encodedCodePoints; - } - } - this.buffer = ""; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - if (this.atFlag && this.buffer === "") { - this.parseError = true; - return failure; - } - this.pointer -= countSymbols(this.buffer) + 1; - this.buffer = ""; - this.state = "host"; - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse hostname"] = -URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { - if (this.stateOverride && this.url.scheme === "file") { - --this.pointer; - this.state = "file host"; - } else if (c === 58 && !this.arrFlag) { - if (this.buffer === "") { - this.parseError = true; - return failure; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "port"; - if (this.stateOverride === "hostname") { - return false; - } - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - --this.pointer; - if (isSpecial(this.url) && this.buffer === "") { - this.parseError = true; - return failure; - } else if (this.stateOverride && this.buffer === "" && - (includesCredentials(this.url) || this.url.port !== null)) { - this.parseError = true; - return false; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "path start"; - if (this.stateOverride) { - return false; - } - } else { - if (c === 91) { - this.arrFlag = true; - } else if (c === 93) { - this.arrFlag = false; - } - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { - if (isASCIIDigit(c)) { - this.buffer += cStr; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92) || - this.stateOverride) { - if (this.buffer !== "") { - const port = parseInt(this.buffer); - if (port > Math.pow(2, 16) - 1) { - this.parseError = true; - return failure; - } - this.url.port = port === defaultPort(this.url.scheme) ? null : port; - this.buffer = ""; - } - if (this.stateOverride) { - return false; - } - this.state = "path start"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); - -URLStateMachine.prototype["parse file"] = function parseFile(c) { - this.url.scheme = "file"; - - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file slash"; - } else if (this.base !== null && this.base.scheme === "file") { - if (isNaN(c)) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 63) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else { - if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points - !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || - (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points - !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - shortenPath(this.url); - } else { - this.parseError = true; - } - - this.state = "path"; - --this.pointer; - } - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file host"; - } else { - if (this.base !== null && this.base.scheme === "file") { - if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { - this.url.path.push(this.base.path[0]); - } else { - this.url.host = this.base.host; - } - } - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { - if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { - --this.pointer; - if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { - this.parseError = true; - this.state = "path"; - } else if (this.buffer === "") { - this.url.host = ""; - if (this.stateOverride) { - return false; - } - this.state = "path start"; - } else { - let host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - if (host === "localhost") { - host = ""; - } - this.url.host = host; - - if (this.stateOverride) { - return false; - } - - this.buffer = ""; - this.state = "path start"; - } - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { - if (isSpecial(this.url)) { - if (c === 92) { - this.parseError = true; - } - this.state = "path"; - - if (c !== 47 && c !== 92) { - --this.pointer; - } - } else if (!this.stateOverride && c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (!this.stateOverride && c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else if (c !== undefined) { - this.state = "path"; - if (c !== 47) { - --this.pointer; - } - } - - return true; -}; - -URLStateMachine.prototype["parse path"] = function parsePath(c) { - if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || - (!this.stateOverride && (c === 63 || c === 35))) { - if (isSpecial(this.url) && c === 92) { - this.parseError = true; - } - - if (isDoubleDot(this.buffer)) { - shortenPath(this.url); - if (c !== 47 && !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } - } else if (isSingleDot(this.buffer) && c !== 47 && - !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } else if (!isSingleDot(this.buffer)) { - if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { - if (this.url.host !== "" && this.url.host !== null) { - this.parseError = true; - this.url.host = ""; - } - this.buffer = this.buffer[0] + ":"; - } - this.url.path.push(this.buffer); - } - this.buffer = ""; - if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { - while (this.url.path.length > 1 && this.url.path[0] === "") { - this.parseError = true; - this.url.path.shift(); - } - } - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += percentEncodeChar(c, isPathPercentEncode); - } - - return true; -}; - -URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else { - // TODO: Add: not a URL code point - if (!isNaN(c) && c !== 37) { - this.parseError = true; - } - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - if (!isNaN(c)) { - this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); - } - } - - return true; -}; - -URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { - if (isNaN(c) || (!this.stateOverride && c === 35)) { - if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { - this.encodingOverride = "utf-8"; - } - - const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead - for (let i = 0; i < buffer.length; ++i) { - if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || - buffer[i] === 0x3C || buffer[i] === 0x3E) { - this.url.query += percentEncode(buffer[i]); - } else { - this.url.query += String.fromCodePoint(buffer[i]); - } - } - - this.buffer = ""; - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { - if (isNaN(c)) { // do nothing - } else if (c === 0x0) { - this.parseError = true; - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); - } - - return true; -}; - -function serializeURL(url, excludeFragment) { - let output = url.scheme + ":"; - if (url.host !== null) { - output += "//"; - - if (url.username !== "" || url.password !== "") { - output += url.username; - if (url.password !== "") { - output += ":" + url.password; - } - output += "@"; - } - - output += serializeHost(url.host); - - if (url.port !== null) { - output += ":" + url.port; - } - } else if (url.host === null && url.scheme === "file") { - output += "//"; - } - - if (url.cannotBeABaseURL) { - output += url.path[0]; - } else { - for (const string of url.path) { - output += "/" + string; - } - } - - if (url.query !== null) { - output += "?" + url.query; - } - - if (!excludeFragment && url.fragment !== null) { - output += "#" + url.fragment; - } - - return output; -} - -function serializeOrigin(tuple) { - let result = tuple.scheme + "://"; - result += serializeHost(tuple.host); - - if (tuple.port !== null) { - result += ":" + tuple.port; - } - - return result; -} - -module.exports.serializeURL = serializeURL; - -module.exports.serializeURLOrigin = function (url) { - // https://url.spec.whatwg.org/#concept-url-origin - switch (url.scheme) { - case "blob": - try { - return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); - } catch (e) { - // serializing an opaque origin returns "null" - return "null"; - } - case "ftp": - case "gopher": - case "http": - case "https": - case "ws": - case "wss": - return serializeOrigin({ - scheme: url.scheme, - host: url.host, - port: url.port - }); - case "file": - // spec says "exercise to the reader", chrome says "file://" - return "file://"; - default: - // serializing an opaque origin returns "null" - return "null"; - } -}; - -module.exports.basicURLParse = function (input, options) { - if (options === undefined) { - options = {}; - } - - const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); - if (usm.failure) { - return "failure"; - } - - return usm.url; -}; - -module.exports.setTheUsername = function (url, username) { - url.username = ""; - const decoded = punycode.ucs2.decode(username); - for (let i = 0; i < decoded.length; ++i) { - url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.setThePassword = function (url, password) { - url.password = ""; - const decoded = punycode.ucs2.decode(password); - for (let i = 0; i < decoded.length; ++i) { - url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.serializeHost = serializeHost; - -module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; - -module.exports.serializeInteger = function (integer) { - return String(integer); -}; - -module.exports.parseURL = function (input, options) { - if (options === undefined) { - options = {}; - } - - // We don't handle blobs, so this just delegates: - return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); -}; +function node_modules_uint8arrays_node_modules_multiformats_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while(num >= node_modules_uint8arrays_node_modules_multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | node_modules_uint8arrays_node_modules_multiformats_vendor_varint_MSB; + num /= 128; + } + while(num & node_modules_uint8arrays_node_modules_multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | node_modules_uint8arrays_node_modules_multiformats_vendor_varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + + node_modules_uint8arrays_node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out +} -/***/ }), +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_decode = node_modules_uint8arrays_node_modules_multiformats_vendor_varint_read; -/***/ 59468: -/***/ ((module) => { +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_MSB$1 = 0x80 + , node_modules_uint8arrays_node_modules_multiformats_vendor_varint_REST$1 = 0x7F; -"use strict"; +function node_modules_uint8arrays_node_modules_multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; + do { + if (counter >= l) { + node_modules_uint8arrays_node_modules_multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') + } + b = buf[counter++]; + res += shift < 28 + ? (b & node_modules_uint8arrays_node_modules_multiformats_vendor_varint_REST$1) << shift + : (b & node_modules_uint8arrays_node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= node_modules_uint8arrays_node_modules_multiformats_vendor_varint_MSB$1) -module.exports.mixin = function mixin(target, source) { - const keys = Object.getOwnPropertyNames(source); - for (let i = 0; i < keys.length; ++i) { - Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); - } -}; + node_modules_uint8arrays_node_modules_multiformats_vendor_varint_read.bytes = counter - offset; -module.exports.wrapperSymbol = Symbol("wrapper"); -module.exports.implSymbol = Symbol("impl"); + return res +} -module.exports.wrapperForImpl = function (impl) { - return impl[module.exports.wrapperSymbol]; +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N1 = Math.pow(2, 7); +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14); +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21); +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28); +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35); +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42); +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49); +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56); +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63); + +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_length = function (value) { + return ( + value < node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N1 ? 1 + : value < node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N2 ? 2 + : value < node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N3 ? 3 + : value < node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N4 ? 4 + : value < node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N5 ? 5 + : value < node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N6 ? 6 + : value < node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N7 ? 7 + : value < node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N8 ? 8 + : value < node_modules_uint8arrays_node_modules_multiformats_vendor_varint_N9 ? 9 + : 10 + ) }; -module.exports.implForWrapper = function (wrapper) { - return wrapper[module.exports.implSymbol]; +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_varint = { + encode: node_modules_uint8arrays_node_modules_multiformats_vendor_varint_encode_1 + , decode: node_modules_uint8arrays_node_modules_multiformats_vendor_varint_decode + , encodingLength: node_modules_uint8arrays_node_modules_multiformats_vendor_varint_length }; +var node_modules_uint8arrays_node_modules_multiformats_vendor_varint_brrp_varint = node_modules_uint8arrays_node_modules_multiformats_vendor_varint_varint; +/* harmony default export */ const node_modules_uint8arrays_node_modules_multiformats_vendor_varint = (node_modules_uint8arrays_node_modules_multiformats_vendor_varint_brrp_varint); -/***/ }), +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/varint.js -/***/ 16606: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /** - * Advanced Encryption Standard (AES) implementation. - * - * This implementation is based on the public domain library 'jscrypto' which - * was written by: - * - * Emily Stark (estark@stanford.edu) - * Mike Hamburg (mhamburg@stanford.edu) - * Dan Boneh (dabo@cs.stanford.edu) - * - * Parts of this code are based on the OpenSSL implementation of AES: - * http://www.openssl.org - * - * @author Dave Longley - * - * Copyright (c) 2010-2014 Digital Bazaar, Inc. + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(27883); -__nccwpck_require__(70857); -__nccwpck_require__(36536); - -/* AES API */ -module.exports = forge.aes = forge.aes || {}; +const node_modules_uint8arrays_node_modules_multiformats_src_varint_decode = (data, offset = 0) => { + const code = varint.decode(data, offset) + return [code, varint.decode.bytes] +} /** - * Deprecated. Instead, use: - * - * var cipher = forge.cipher.createCipher('AES-', key); - * cipher.start({iv: iv}); - * - * Creates an AES cipher object to encrypt data using the given symmetric key. - * The output will be stored in the 'output' member of the returned cipher. - * - * The key and iv may be given as a string of bytes, an array of bytes, - * a byte buffer, or an array of 32-bit words. - * - * @param key the symmetric key to use. - * @param iv the initialization vector to use. - * @param output the buffer to write to, null to create one. - * @param mode the cipher mode to use (default: 'CBC'). - * - * @return the cipher. + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] */ -forge.aes.startEncrypting = function(key, iv, output, mode) { - var cipher = _createCipher({ - key: key, - output: output, - decrypt: false, - mode: mode - }); - cipher.start(iv); - return cipher; -}; +const node_modules_uint8arrays_node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + node_modules_uint8arrays_node_modules_multiformats_vendor_varint.encode(int, target, offset) + return target +} /** - * Deprecated. Instead, use: - * - * var cipher = forge.cipher.createCipher('AES-', key); - * - * Creates an AES cipher object to encrypt data using the given symmetric key. - * - * The key may be given as a string of bytes, an array of bytes, a - * byte buffer, or an array of 32-bit words. - * - * @param key the symmetric key to use. - * @param mode the cipher mode to use (default: 'CBC'). - * - * @return the cipher. + * @param {number} int + * @returns {number} */ -forge.aes.createEncryptionCipher = function(key, mode) { - return _createCipher({ - key: key, - output: null, - decrypt: false, - mode: mode - }); -}; +const node_modules_uint8arrays_node_modules_multiformats_src_varint_encodingLength = (int) => { + return node_modules_uint8arrays_node_modules_multiformats_vendor_varint.encodingLength(int) +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/hashes/digest.js + + /** - * Deprecated. Instead, use: - * - * var decipher = forge.cipher.createDecipher('AES-', key); - * decipher.start({iv: iv}); - * - * Creates an AES cipher object to decrypt data using the given symmetric key. - * The output will be stored in the 'output' member of the returned cipher. - * - * The key and iv may be given as a string of bytes, an array of bytes, - * a byte buffer, or an array of 32-bit words. - * - * @param key the symmetric key to use. - * @param iv the initialization vector to use. - * @param output the buffer to write to, null to create one. - * @param mode the cipher mode to use (default: 'CBC'). + * Creates a multihash digest. * - * @return the cipher. + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest */ -forge.aes.startDecrypting = function(key, iv, output, mode) { - var cipher = _createCipher({ - key: key, - output: output, - decrypt: true, - mode: mode - }); - cipher.start(iv); - return cipher; -}; +const node_modules_uint8arrays_node_modules_multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = node_modules_uint8arrays_node_modules_multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + node_modules_uint8arrays_node_modules_multiformats_src_varint_encodingLength(size) + + const bytes = new Uint8Array(digestOffset + size) + node_modules_uint8arrays_node_modules_multiformats_src_varint_encodeTo(code, bytes, 0) + node_modules_uint8arrays_node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) + + return new node_modules_uint8arrays_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} /** - * Deprecated. Instead, use: - * - * var decipher = forge.cipher.createDecipher('AES-', key); - * - * Creates an AES cipher object to decrypt data using the given symmetric key. - * - * The key may be given as a string of bytes, an array of bytes, a - * byte buffer, or an array of 32-bit words. - * - * @param key the symmetric key to use. - * @param mode the cipher mode to use (default: 'CBC'). + * Turns bytes representation of multihash digest into an instance. * - * @return the cipher. + * @param {Uint8Array} multihash + * @returns {MultihashDigest} */ -forge.aes.createDecryptionCipher = function(key, mode) { - return _createCipher({ - key: key, - output: null, - decrypt: true, - mode: mode - }); -}; +const node_modules_uint8arrays_node_modules_multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = coerce(multihash) + const [code, sizeOffset] = varint.decode(bytes) + const [size, digestOffset] = varint.decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) + + if (digest.byteLength !== size) { + throw new Error('Incorrect length') + } + + return new node_modules_uint8arrays_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} /** - * Creates a new AES cipher algorithm object. - * - * @param name the name of the algorithm. - * @param mode the mode factory function. - * - * @return the AES algorithm object. + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} */ -forge.aes.Algorithm = function(name, mode) { - if(!init) { - initialize(); +const node_modules_uint8arrays_node_modules_multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { + return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) + + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + equalBytes(a.bytes, data.bytes) + ) } - var self = this; - self.name = name; - self.mode = new mode({ - blockSize: 16, - cipher: { - encrypt: function(inBlock, outBlock) { - return _updateBlock(self._w, inBlock, outBlock, false); - }, - decrypt: function(inBlock, outBlock) { - return _updateBlock(self._w, inBlock, outBlock, true); - } - } - }); - self._init = false; -}; +} /** - * Initializes this AES algorithm by expanding its key. + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest + */ + +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. * - * @param options the options to use. - * key the key to use with this algorithm. - * decrypt true if the algorithm should be initialized for decryption, - * false for encryption. + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} */ -forge.aes.Algorithm.prototype.initialize = function(options) { - if(this._init) { - return; +class node_modules_uint8arrays_node_modules_multiformats_src_hashes_digest_Digest { + /** + * Creates a multihash digest. + * + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes + */ + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes } +} - var key = options.key; - var tmp; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/hashes/identity.js - /* Note: The key may be a string of bytes, an array of bytes, a byte - buffer, or an array of 32-bit integers. If the key is in bytes, then - it must be 16, 24, or 32 bytes in length. If it is in 32-bit - integers, it must be 4, 6, or 8 integers long. */ - if(typeof key === 'string' && - (key.length === 16 || key.length === 24 || key.length === 32)) { - // convert key string into byte buffer - key = forge.util.createBuffer(key); - } else if(forge.util.isArray(key) && - (key.length === 16 || key.length === 24 || key.length === 32)) { - // convert key integer array into byte buffer - tmp = key; - key = forge.util.createBuffer(); - for(var i = 0; i < tmp.length; ++i) { - key.putByte(tmp[i]); - } - } - // convert key byte buffer into 32-bit integer array - if(!forge.util.isArray(key)) { - tmp = key; - key = []; +const uint8arrays_node_modules_multiformats_src_hashes_identity_code = 0x0 +const uint8arrays_node_modules_multiformats_src_hashes_identity_name = 'identity' - // key lengths of 16, 24, 32 bytes allowed - var len = tmp.length(); - if(len === 16 || len === 24 || len === 32) { - len = len >>> 2; - for(var i = 0; i < len; ++i) { - key.push(tmp.getInt32()); - } - } - } +/** @type {(input:Uint8Array) => Uint8Array} */ +const uint8arrays_node_modules_multiformats_src_hashes_identity_encode = node_modules_uint8arrays_node_modules_multiformats_src_bytes_coerce - // key must be an array of 32-bit integers by now - if(!forge.util.isArray(key) || - !(key.length === 4 || key.length === 6 || key.length === 8)) { - throw new Error('Invalid key parameter.'); - } +/** + * @param {Uint8Array} input + * @returns {Digest.Digest} + */ +const node_modules_multiformats_src_hashes_identity_digest = (input) => node_modules_uint8arrays_node_modules_multiformats_src_hashes_digest_create(uint8arrays_node_modules_multiformats_src_hashes_identity_code, uint8arrays_node_modules_multiformats_src_hashes_identity_encode(input)) - // encryption operation is always used for these modes - var mode = this.mode.name; - var encryptOp = (['CFB', 'OFB', 'CTR', 'GCM'].indexOf(mode) !== -1); +const uint8arrays_node_modules_multiformats_src_hashes_identity_identity = { code: uint8arrays_node_modules_multiformats_src_hashes_identity_code, name: uint8arrays_node_modules_multiformats_src_hashes_identity_name, encode: uint8arrays_node_modules_multiformats_src_hashes_identity_encode, digest: node_modules_multiformats_src_hashes_identity_digest } + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/hashes/hasher.js - // do key expansion - this._w = _expandKey(key, options.decrypt && !encryptOp); - this._init = true; -}; /** - * Expands a key. Typically only used for testing. - * - * @param key the symmetric key to expand, as an array of 32-bit words. - * @param decrypt true to expand for decryption, false for encryption. + * @template {string} Name + * @template {number} Code + * @param {object} options + * @param {Name} options.name + * @param {Code} options.code + * @param {(input: Uint8Array) => Await} options.encode + */ +const uint8arrays_node_modules_multiformats_src_hashes_hasher_from = ({ name, code, encode }) => new uint8arrays_node_modules_multiformats_src_hashes_hasher_Hasher(name, code, encode) + +/** + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. * - * @return the expanded key. + * @template {string} Name + * @template {number} Code + * @class + * @implements {MultihashHasher} */ -forge.aes._expandKey = function(key, decrypt) { - if(!init) { - initialize(); +class uint8arrays_node_modules_multiformats_src_hashes_hasher_Hasher { + /** + * + * @param {Name} name + * @param {Code} code + * @param {(input: Uint8Array) => Await} encode + */ + constructor (name, code, encode) { + this.name = name + this.code = code + this.encode = encode } - return _expandKey(key, decrypt); -}; + + /** + * @param {Uint8Array} input + * @returns {Await>} + */ + digest (input) { + if (input instanceof Uint8Array) { + const result = this.encode(input) + return result instanceof Uint8Array + ? node_modules_uint8arrays_node_modules_multiformats_src_hashes_digest_create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => node_modules_uint8arrays_node_modules_multiformats_src_hashes_digest_create(this.code, digest)) + } else { + throw Error('Unknown type, must be binary type') + /* c8 ignore next 1 */ + } + } +} /** - * Updates a single block. Typically only used for testing. - * - * @param w the expanded key to use. - * @param input an array of block-size 32-bit words. - * @param output an array of block-size 32-bit words. - * @param decrypt true to decrypt, false to encrypt. + * @template {number} Alg + * @typedef {import('./interface.js').MultihashHasher} MultihashHasher */ -forge.aes._updateBlock = _updateBlock; -/** Register AES algorithms **/ +/** + * @template T + * @typedef {Promise|T} Await + */ -registerAlgorithm('AES-ECB', forge.cipher.modes.ecb); -registerAlgorithm('AES-CBC', forge.cipher.modes.cbc); -registerAlgorithm('AES-CFB', forge.cipher.modes.cfb); -registerAlgorithm('AES-OFB', forge.cipher.modes.ofb); -registerAlgorithm('AES-CTR', forge.cipher.modes.ctr); -registerAlgorithm('AES-GCM', forge.cipher.modes.gcm); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/hashes/sha2.js +// @ts-check -function registerAlgorithm(name, mode) { - var factory = function() { - return new forge.aes.Algorithm(name, mode); - }; - forge.cipher.registerAlgorithm(name, factory); -} -/** AES implementation **/ -var init = false; // not yet initialized -var Nb = 4; // number of words comprising the state (AES = 4) -var sbox; // non-linear substitution table used in key expansion -var isbox; // inversion of sbox -var rcon; // round constant word array -var mix; // mix-columns table -var imix; // inverse mix-columns table + + +const uint8arrays_node_modules_multiformats_src_hashes_sha2_sha256 = uint8arrays_node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-256', + code: 0x12, + encode: (input) => node_modules_uint8arrays_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha256').update(input).digest()) +}) + +const node_modules_multiformats_src_hashes_sha2_sha512 = uint8arrays_node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-512', + code: 0x13, + encode: input => node_modules_uint8arrays_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha512').update(input).digest()) +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/cid.js + + + + +// Linter can see that API is used in types. +// eslint-disable-next-line + + + +// This way TS will also expose all the types from module + /** - * Performs initialization, ie: precomputes tables to optimize for speed. - * - * One way to understand how AES works is to imagine that 'addition' and - * 'multiplication' are interfaces that require certain mathematical - * properties to hold true (ie: they are associative) but they might have - * different implementations and produce different kinds of results ... - * provided that their mathematical properties remain true. AES defines - * its own methods of addition and multiplication but keeps some important - * properties the same, ie: associativity and distributivity. The - * explanation below tries to shed some light on how AES defines addition - * and multiplication of bytes and 32-bit words in order to perform its - * encryption and decryption algorithms. - * - * The basics: - * - * The AES algorithm views bytes as binary representations of polynomials - * that have either 1 or 0 as the coefficients. It defines the addition - * or subtraction of two bytes as the XOR operation. It also defines the - * multiplication of two bytes as a finite field referred to as GF(2^8) - * (Note: 'GF' means "Galois Field" which is a field that contains a finite - * number of elements so GF(2^8) has 256 elements). - * - * This means that any two bytes can be represented as binary polynomials; - * when they multiplied together and modularly reduced by an irreducible - * polynomial of the 8th degree, the results are the field GF(2^8). The - * specific irreducible polynomial that AES uses in hexadecimal is 0x11b. - * This multiplication is associative with 0x01 as the identity: - * - * (b * 0x01 = GF(b, 0x01) = b). - * - * The operation GF(b, 0x02) can be performed at the byte level by left - * shifting b once and then XOR'ing it (to perform the modular reduction) - * with 0x11b if b is >= 128. Repeated application of the multiplication - * of 0x02 can be used to implement the multiplication of any two bytes. - * - * For instance, multiplying 0x57 and 0x13, denoted as GF(0x57, 0x13), can - * be performed by factoring 0x13 into 0x01, 0x02, and 0x10. Then these - * factors can each be multiplied by 0x57 and then added together. To do - * the multiplication, values for 0x57 multiplied by each of these 3 factors - * can be precomputed and stored in a table. To add them, the values from - * the table are XOR'd together. - * - * AES also defines addition and multiplication of words, that is 4-byte - * numbers represented as polynomials of 3 degrees where the coefficients - * are the values of the bytes. - * - * The word [a0, a1, a2, a3] is a polynomial a3x^3 + a2x^2 + a1x + a0. - * - * Addition is performed by XOR'ing like powers of x. Multiplication - * is performed in two steps, the first is an algebriac expansion as - * you would do normally (where addition is XOR). But the result is - * a polynomial larger than 3 degrees and thus it cannot fit in a word. So - * next the result is modularly reduced by an AES-specific polynomial of - * degree 4 which will always produce a polynomial of less than 4 degrees - * such that it will fit in a word. In AES, this polynomial is x^4 + 1. - * - * The modular product of two polynomials 'a' and 'b' is thus: - * - * d(x) = d3x^3 + d2x^2 + d1x + d0 - * with - * d0 = GF(a0, b0) ^ GF(a3, b1) ^ GF(a2, b2) ^ GF(a1, b3) - * d1 = GF(a1, b0) ^ GF(a0, b1) ^ GF(a3, b2) ^ GF(a2, b3) - * d2 = GF(a2, b0) ^ GF(a1, b1) ^ GF(a0, b2) ^ GF(a3, b3) - * d3 = GF(a3, b0) ^ GF(a2, b1) ^ GF(a1, b2) ^ GF(a0, b3) - * - * As a matrix: - * - * [d0] = [a0 a3 a2 a1][b0] - * [d1] [a1 a0 a3 a2][b1] - * [d2] [a2 a1 a0 a3][b2] - * [d3] [a3 a2 a1 a0][b3] - * - * Special polynomials defined by AES (0x02 == {02}): - * a(x) = {03}x^3 + {01}x^2 + {01}x + {02} - * a^-1(x) = {0b}x^3 + {0d}x^2 + {09}x + {0e}. - * - * These polynomials are used in the MixColumns() and InverseMixColumns() - * operations, respectively, to cause each element in the state to affect - * the output (referred to as diffusing). - * - * RotWord() uses: a0 = a1 = a2 = {00} and a3 = {01}, which is the - * polynomial x3. - * - * The ShiftRows() method modifies the last 3 rows in the state (where - * the state is 4 words with 4 bytes per word) by shifting bytes cyclically. - * The 1st byte in the second row is moved to the end of the row. The 1st - * and 2nd bytes in the third row are moved to the end of the row. The 1st, - * 2nd, and 3rd bytes are moved in the fourth row. - * - * More details on how AES arithmetic works: - * - * In the polynomial representation of binary numbers, XOR performs addition - * and subtraction and multiplication in GF(2^8) denoted as GF(a, b) - * corresponds with the multiplication of polynomials modulo an irreducible - * polynomial of degree 8. In other words, for AES, GF(a, b) will multiply - * polynomial 'a' with polynomial 'b' and then do a modular reduction by - * an AES-specific irreducible polynomial of degree 8. - * - * A polynomial is irreducible if its only divisors are one and itself. For - * the AES algorithm, this irreducible polynomial is: - * - * m(x) = x^8 + x^4 + x^3 + x + 1, - * - * or {01}{1b} in hexadecimal notation, where each coefficient is a bit: - * 100011011 = 283 = 0x11b. - * - * For example, GF(0x57, 0x83) = 0xc1 because - * - * 0x57 = 87 = 01010111 = x^6 + x^4 + x^2 + x + 1 - * 0x85 = 131 = 10000101 = x^7 + x + 1 - * - * (x^6 + x^4 + x^2 + x + 1) * (x^7 + x + 1) - * = x^13 + x^11 + x^9 + x^8 + x^7 + - * x^7 + x^5 + x^3 + x^2 + x + - * x^6 + x^4 + x^2 + x + 1 - * = x^13 + x^11 + x^9 + x^8 + x^6 + x^5 + x^4 + x^3 + 1 = y - * y modulo (x^8 + x^4 + x^3 + x + 1) - * = x^7 + x^6 + 1. - * - * The modular reduction by m(x) guarantees the result will be a binary - * polynomial of less than degree 8, so that it can fit in a byte. - * - * The operation to multiply a binary polynomial b with x (the polynomial - * x in binary representation is 00000010) is: - * - * b_7x^8 + b_6x^7 + b_5x^6 + b_4x^5 + b_3x^4 + b_2x^3 + b_1x^2 + b_0x^1 - * - * To get GF(b, x) we must reduce that by m(x). If b_7 is 0 (that is the - * most significant bit is 0 in b) then the result is already reduced. If - * it is 1, then we can reduce it by subtracting m(x) via an XOR. - * - * It follows that multiplication by x (00000010 or 0x02) can be implemented - * by performing a left shift followed by a conditional bitwise XOR with - * 0x1b. This operation on bytes is denoted by xtime(). Multiplication by - * higher powers of x can be implemented by repeated application of xtime(). - * - * By adding intermediate results, multiplication by any constant can be - * implemented. For instance: - * - * GF(0x57, 0x13) = 0xfe because: - * - * xtime(b) = (b & 128) ? (b << 1 ^ 0x11b) : (b << 1) - * - * Note: We XOR with 0x11b instead of 0x1b because in javascript our - * datatype for b can be larger than 1 byte, so a left shift will not - * automatically eliminate bits that overflow a byte ... by XOR'ing the - * overflow bit with 1 (the extra one from 0x11b) we zero it out. - * - * GF(0x57, 0x02) = xtime(0x57) = 0xae - * GF(0x57, 0x04) = xtime(0xae) = 0x47 - * GF(0x57, 0x08) = xtime(0x47) = 0x8e - * GF(0x57, 0x10) = xtime(0x8e) = 0x07 - * - * GF(0x57, 0x13) = GF(0x57, (0x01 ^ 0x02 ^ 0x10)) - * - * And by the distributive property (since XOR is addition and GF() is - * multiplication): - * - * = GF(0x57, 0x01) ^ GF(0x57, 0x02) ^ GF(0x57, 0x10) - * = 0x57 ^ 0xae ^ 0x07 - * = 0xfe. + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} */ -function initialize() { - init = true; +const node_modules_uint8arrays_node_modules_multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return node_modules_uint8arrays_node_modules_multiformats_src_cid_toStringV0( + bytes, + node_modules_uint8arrays_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || base58btc.encoder + ) + default: + return node_modules_uint8arrays_node_modules_multiformats_src_cid_toStringV1( + bytes, + node_modules_uint8arrays_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || base32.encoder) + ) + } +} - /* Populate the Rcon table. These are the values given by - [x^(i-1),{00},{00},{00}] where x^(i-1) are powers of x (and x = 0x02) - in the field of GF(2^8), where i starts at 1. +/** + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} + */ +const node_modules_uint8arrays_node_modules_multiformats_src_cid_toJSON = (link) => ({ + '/': node_modules_uint8arrays_node_modules_multiformats_src_cid_format(link) +}) - rcon[0] = [0x00, 0x00, 0x00, 0x00] - rcon[1] = [0x01, 0x00, 0x00, 0x00] 2^(1-1) = 2^0 = 1 - rcon[2] = [0x02, 0x00, 0x00, 0x00] 2^(2-1) = 2^1 = 2 - ... - rcon[9] = [0x1B, 0x00, 0x00, 0x00] 2^(9-1) = 2^8 = 0x1B - rcon[10] = [0x36, 0x00, 0x00, 0x00] 2^(10-1) = 2^9 = 0x36 +/** + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json + */ +const node_modules_uint8arrays_node_modules_multiformats_src_cid_fromJSON = (json) => + node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.parse(json['/']) - We only store the first byte because it is the only one used. - */ - rcon = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36]; +/** @type {WeakMap>} */ +const node_modules_uint8arrays_node_modules_multiformats_src_cid_cache = new WeakMap() - // compute xtime table which maps i onto GF(i, 0x02) - var xtime = new Array(256); - for(var i = 0; i < 128; ++i) { - xtime[i] = i << 1; - xtime[i + 128] = (i + 128) << 1 ^ 0x11B; +/** + * @param {API.UnknownLink} cid + * @returns {Map} + */ +const node_modules_uint8arrays_node_modules_multiformats_src_cid_baseCache = cid => { + const baseCache = node_modules_uint8arrays_node_modules_multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + node_modules_uint8arrays_node_modules_multiformats_src_cid_cache.set(cid, baseCache) + return baseCache } + return baseCache +} - // compute all other tables - sbox = new Array(256); - isbox = new Array(256); - mix = new Array(4); - imix = new Array(4); - for(var i = 0; i < 4; ++i) { - mix[i] = new Array(256); - imix[i] = new Array(256); - } - var e = 0, ei = 0, e2, e4, e8, sx, sx2, me, ime; - for(var i = 0; i < 256; ++i) { - /* We need to generate the SubBytes() sbox and isbox tables so that - we can perform byte substitutions. This requires us to traverse - all of the elements in GF, find their multiplicative inverses, - and apply to each the following affine transformation: +/** + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} + */ - bi' = bi ^ b(i + 4) mod 8 ^ b(i + 5) mod 8 ^ b(i + 6) mod 8 ^ - b(i + 7) mod 8 ^ ci - for 0 <= i < 8, where bi is the ith bit of the byte, and ci is the - ith bit of a byte c with the value {63} or {01100011}. +class node_modules_uint8arrays_node_modules_multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes - It is possible to traverse every possible value in a Galois field - using what is referred to as a 'generator'. There are many - generators (128 out of 256): 3,5,6,9,11,82 to name a few. To fully - traverse GF we iterate 255 times, multiplying by our generator - each time. + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes + } - On each iteration we can determine the multiplicative inverse for - the current element. + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this + } - Suppose there is an element in GF 'e'. For a given generator 'g', - e = g^x. The multiplicative inverse of e is g^(255 - x). It turns - out that if use the inverse of a generator as another generator - it will produce all of the corresponding multiplicative inverses - at the same time. For this reason, we choose 5 as our inverse - generator because it only requires 2 multiplies and 1 add and its - inverse, 82, requires relatively few operations as well. + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset + } - In order to apply the affine transformation, the multiplicative - inverse 'ei' of 'e' can be repeatedly XOR'd (4 times) with a - bit-cycling of 'ei'. To do this 'ei' is first stored in 's' and - 'x'. Then 's' is left shifted and the high bit of 's' is made the - low bit. The resulting value is stored in 's'. Then 'x' is XOR'd - with 's' and stored in 'x'. On each subsequent iteration the same - operation is performed. When 4 iterations are complete, 'x' is - XOR'd with 'c' (0x63) and the transformed value is stored in 'x'. - For example: + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } - s = 01000001 - x = 01000001 + /** + * @returns {CID} + */ + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) + } + case 1: { + const { code, multihash } = this - iteration 1: s = 10000010, x ^= s - iteration 2: s = 00000101, x ^= s - iteration 3: s = 00001010, x ^= s - iteration 4: s = 00010100, x ^= s - x ^= 0x63 + if (code !== node_modules_uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } - This can be done with a loop where s = (s << 1) | (s >> 7). However, - it can also be done by using a single 16-bit (in this case 32-bit) - number 'sx'. Since XOR is an associative operation, we can set 'sx' - to 'ei' and then XOR it with 'sx' left-shifted 1,2,3, and 4 times. - The most significant bits will flow into the high 8 bit positions - and be correctly XOR'd with one another. All that remains will be - to cycle the high 8 bits by XOR'ing them all with the lower 8 bits - afterwards. + // sha2-256 + if (multihash.code !== node_modules_uint8arrays_node_modules_multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') + } - At the same time we're populating sbox and isbox we can precompute - the multiplication we'll need to do to do MixColumns() later. - */ + return /** @type {CID} */ ( + node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) + } + } + } - // apply affine transformation - sx = ei ^ (ei << 1) ^ (ei << 2) ^ (ei << 3) ^ (ei << 4); - sx = (sx >> 8) ^ (sx & 255) ^ 0x63; + /** + * @returns {CID} + */ + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = Digest.create(code, digest) + return /** @type {CID} */ ( + node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.createV1(this.code, multihash) + ) + } + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) + } + } + } - // update tables - sbox[e] = sx; - isbox[sx] = e; + /** + * @param {unknown} other + * @returns {other is CID} + */ + equals (other) { + return node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.equals(this, other) + } - /* Mixing columns is done using matrix multiplication. The columns - that are to be mixed are each a single word in the current state. - The state has Nb columns (4 columns). Therefore each column is a - 4 byte word. So to mix the columns in a single column 'c' where - its rows are r0, r1, r2, and r3, we use the following matrix - multiplication: + /** + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} + */ + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + Digest.equals(self.multihash, unknown.multihash) + ) + } - [2 3 1 1]*[r0,c]=[r'0,c] - [1 2 3 1] [r1,c] [r'1,c] - [1 1 2 3] [r2,c] [r'2,c] - [3 1 1 2] [r3,c] [r'3,c] + /** + * @param {API.MultibaseEncoder} [base] + * @returns {string} + */ + toString (base) { + return node_modules_uint8arrays_node_modules_multiformats_src_cid_format(this, base) + } - r0, r1, r2, and r3 are each 1 byte of one of the words in the - state (a column). To do matrix multiplication for each mixed - column c' we multiply the corresponding row from the left matrix - with the corresponding column from the right matrix. In total, we - get 4 equations: + /** + * @returns {API.LinkJSON} + */ + toJSON () { + return { '/': node_modules_uint8arrays_node_modules_multiformats_src_cid_format(this) } + } - r0,c' = 2*r0,c + 3*r1,c + 1*r2,c + 1*r3,c - r1,c' = 1*r0,c + 2*r1,c + 3*r2,c + 1*r3,c - r2,c' = 1*r0,c + 1*r1,c + 2*r2,c + 3*r3,c - r3,c' = 3*r0,c + 1*r1,c + 1*r2,c + 2*r3,c + link () { + return this + } - As usual, the multiplication is as previously defined and the - addition is XOR. In order to optimize mixing columns we can store - the multiplication results in tables. If you think of the whole - column as a word (it might help to visualize by mentally rotating - the equations above by counterclockwise 90 degrees) then you can - see that it would be useful to map the multiplications performed on - each byte (r0, r1, r2, r3) onto a word as well. For instance, we - could map 2*r0,1*r0,1*r0,3*r0 onto a word by storing 2*r0 in the - highest 8 bits and 3*r0 in the lowest 8 bits (with the other two - respectively in the middle). This means that a table can be - constructed that uses r0 as an index to the word. We can do the - same with r1, r2, and r3, creating a total of 4 tables. + get [Symbol.toStringTag] () { + return 'CID' + } - To construct a full c', we can just look up each byte of c in - their respective tables and XOR the results together. + // Legacy - Also, to build each table we only have to calculate the word - for 2,1,1,3 for every byte ... which we can do on each iteration - of this loop since we will iterate over every byte. After we have - calculated 2,1,1,3 we can get the results for the other tables - by cycling the byte at the end to the beginning. For instance - we can take the result of table 2,1,1,3 and produce table 3,2,1,1 - by moving the right most byte to the left most position just like - how you can imagine the 3 moved out of 2,1,1,3 and to the front - to produce 3,2,1,1. + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` + } - There is another optimization in that the same multiples of - the current element we need in order to advance our generator - to the next iteration can be reused in performing the 2,1,1,3 - calculation. We also calculate the inverse mix column tables, - with e,9,d,b being the inverse of 2,1,1,3. + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} + */ + static asCID (input) { + if (input == null) { + return null + } - When we're done, and we need to actually mix columns, the first - byte of each state word should be put through mix[0] (2,1,1,3), - the second through mix[1] (3,2,1,1) and so forth. Then they should - be XOR'd together to produce the fully mixed column. - */ + const value = /** @type {any} */ (input) + if (value instanceof node_modules_uint8arrays_node_modules_multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new node_modules_uint8arrays_node_modules_multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || node_modules_uint8arrays_node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[node_modules_uint8arrays_node_modules_multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (Digest.decode(multihash)) + return node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.create(version, code, digest) + } else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null + } + } - // calculate mix and imix table values - sx2 = xtime[sx]; - e2 = xtime[e]; - e4 = xtime[e2]; - e8 = xtime[e4]; - me = - (sx2 << 24) ^ // 2 - (sx << 16) ^ // 1 - (sx << 8) ^ // 1 - (sx ^ sx2); // 3 - ime = - (e2 ^ e4 ^ e8) << 24 ^ // E (14) - (e ^ e8) << 16 ^ // 9 - (e ^ e4 ^ e8) << 8 ^ // D (13) - (e ^ e2 ^ e8); // B (11) - // produce each of the mix tables by rotating the 2,1,1,3 value - for(var n = 0; n < 4; ++n) { - mix[n][e] = me; - imix[n][sx] = ime; - // cycle the right most byte to the left most position - // ie: 2,1,1,3 becomes 3,2,1,1 - me = me << 24 | me >>> 8; - ime = ime << 24 | ime >>> 8; + /** + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} + */ + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') } - // get next element and inverse - if(e === 0) { - // 1 is the inverse of 1 - e = ei = 1; - } else { - // e = 2e + 2*2*2*(10e)) = multiply e by 82 (chosen generator) - // ei = ei + 2*2*ei = multiply ei by 5 (inverse generator) - e = e2 ^ xtime[xtime[xtime[e2 ^ e8]]]; - ei ^= xtime[xtime[ei]]; + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } + + switch (version) { + case 0: { + if (code !== node_modules_uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${node_modules_uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new node_modules_uint8arrays_node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes) + } + } + case 1: { + const bytes = node_modules_uint8arrays_node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new node_modules_uint8arrays_node_modules_multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') + } } } -} -/** - * Generates a key schedule using the AES key expansion algorithm. - * - * The AES algorithm takes the Cipher Key, K, and performs a Key Expansion - * routine to generate a key schedule. The Key Expansion generates a total - * of Nb*(Nr + 1) words: the algorithm requires an initial set of Nb words, - * and each of the Nr rounds requires Nb words of key data. The resulting - * key schedule consists of a linear array of 4-byte words, denoted [wi ], - * with i in the range 0 <= i < Nb(Nr + 1). - * - * KeyExpansion(byte key[4*Nk], word w[Nb*(Nr+1)], Nk) - * AES-128 (Nb=4, Nk=4, Nr=10) - * AES-192 (Nb=4, Nk=6, Nr=12) - * AES-256 (Nb=4, Nk=8, Nr=14) - * Note: Nr=Nk+6. - * - * Nb is the number of columns (32-bit words) comprising the State (or - * number of bytes in a block). For AES, Nb=4. - * - * @param key the key to schedule (as an array of 32-bit words). - * @param decrypt true to modify the key schedule to decrypt, false not to. - * - * @return the generated key schedule. - */ -function _expandKey(key, decrypt) { - // copy the key's words to initialize the key schedule - var w = key.slice(0); + /** + * Simplified version of `create` for CIDv0. + * + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} + */ + static createV0 (digest) { + return node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.create(0, node_modules_uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE, digest) + } - /* RotWord() will rotate a word, moving the first byte to the last - byte's position (shifting the other bytes left). + /** + * Simplified version of `create` for CIDv1. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} + */ + static createV1 (code, digest) { + return node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.create(1, code, digest) + } - We will be getting the value of Rcon at i / Nk. 'i' will iterate - from Nk to (Nb * Nr+1). Nk = 4 (4 byte key), Nb = 4 (4 words in - a block), Nr = Nk + 6 (10). Therefore 'i' will iterate from - 4 to 44 (exclusive). Each time we iterate 4 times, i / Nk will - increase by 1. We use a counter iNk to keep track of this. + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} */ + static decode (bytes) { + const [cid, remainder] = node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') + } + return cid + } - // go through the rounds expanding the key - var temp, iNk = 1; - var Nk = w.length; - var Nr1 = Nk + 6 + 1; - var end = Nb * Nr1; - for(var i = Nk; i < end; ++i) { - temp = w[i - 1]; - if(i % Nk === 0) { - // temp = SubWord(RotWord(temp)) ^ Rcon[i / Nk] - temp = - sbox[temp >>> 16 & 255] << 24 ^ - sbox[temp >>> 8 & 255] << 16 ^ - sbox[temp & 255] << 8 ^ - sbox[temp >>> 24] ^ (rcon[iNk] << 24); - iNk++; - } else if(Nk > 6 && (i % Nk === 4)) { - // temp = SubWord(temp) - temp = - sbox[temp >>> 24] << 24 ^ - sbox[temp >>> 16 & 255] << 16 ^ - sbox[temp >>> 8 & 255] << 8 ^ - sbox[temp & 255]; + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} + */ + static decodeFirst (bytes) { + const specs = node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') } - w[i] = w[i - Nk] ^ temp; + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new Digest.Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] } - /* When we are updating a cipher block we always use the code path for - encryption whether we are decrypting or not (to shorten code and - simplify the generation of look up tables). However, because there - are differences in the decryption algorithm, other than just swapping - in different look up tables, we must transform our key schedule to - account for these changes: + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} + */ + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = varint.decode(initialBytes.subarray(offset)) + offset += length + return i + } - 1. The decryption algorithm gets its key rounds in reverse order. - 2. The decryption algorithm adds the round key before mixing columns - instead of afterwards. + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (node_modules_uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 + } else { + codec = /** @type {C} */ (next()) + } - We don't need to modify our key schedule to handle the first case, - we can just traverse the key schedule in reverse order when decrypting. + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } - The second case requires a little work. + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize - The tables we built for performing rounds will take an input and then - perform SubBytes() and MixColumns() or, for the decrypt version, - InvSubBytes() and InvMixColumns(). But the decrypt algorithm requires - us to AddRoundKey() before InvMixColumns(). This means we'll need to - apply some transformations to the round key to inverse-mix its columns - so they'll be correct for moving AddRoundKey() to after the state has - had its columns inverse-mixed. + return { version, codec, multihashCode, digestSize, multihashSize, size } + } - To inverse-mix the columns of the state when we're decrypting we use a - lookup table that will apply InvSubBytes() and InvMixColumns() at the - same time. However, the round key's bytes are not inverse-substituted - in the decryption algorithm. To get around this problem, we can first - substitute the bytes in the round key so that when we apply the - transformation via the InvSubBytes()+InvMixColumns() table, it will - undo our substitution leaving us with the original value that we - want -- and then inverse-mix that value. + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + * + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} + */ + static parse (source, base) { + const [prefix, bytes] = node_modules_uint8arrays_node_modules_multiformats_src_cid_parseCIDtoBytes(source, base) - This change will correctly alter our key schedule so that we can XOR - each round key with our already transformed decryption state. This - allows us to use the same code path as the encryption algorithm. + const cid = node_modules_uint8arrays_node_modules_multiformats_src_cid_CID.decode(bytes) - We make one more change to the decryption key. Since the decryption - algorithm runs in reverse from the encryption algorithm, we reverse - the order of the round keys to avoid having to iterate over the key - schedule backwards when running the encryption algorithm later in - decryption mode. In addition to reversing the order of the round keys, - we also swap each round key's 2nd and 4th rows. See the comments - section where rounds are performed for more details about why this is - done. These changes are done inline with the other substitution - described above. - */ - if(decrypt) { - var tmp; - var m0 = imix[0]; - var m1 = imix[1]; - var m2 = imix[2]; - var m3 = imix[3]; - var wnew = w.slice(0); - end = w.length; - for(var i = 0, wi = end - Nb; i < end; i += Nb, wi -= Nb) { - // do not sub the first or last round key (round keys are Nb - // words) as no column mixing is performed before they are added, - // but do change the key order - if(i === 0 || i === (end - Nb)) { - wnew[i] = w[wi]; - wnew[i + 1] = w[wi + 3]; - wnew[i + 2] = w[wi + 2]; - wnew[i + 3] = w[wi + 1]; - } else { - // substitute each round key byte because the inverse-mix - // table will inverse-substitute it (effectively cancel the - // substitution because round key bytes aren't sub'd in - // decryption mode) and swap indexes 3 and 1 - for(var n = 0; n < Nb; ++n) { - tmp = w[wi + n]; - wnew[i + (3&-n)] = - m0[sbox[tmp >>> 24]] ^ - m1[sbox[tmp >>> 16 & 255]] ^ - m2[sbox[tmp >>> 8 & 255]] ^ - m3[sbox[tmp & 255]]; - } - } + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') } - w = wnew; - } - return w; + // Cache string representation to avoid computing it on `this.toString()` + node_modules_uint8arrays_node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source) + + return cid + } } /** - * Updates a single block (16 bytes) using AES. The update will either - * encrypt or decrypt the block. - * - * @param w the key schedule. - * @param input the input block (an array of 32-bit words). - * @param output the updated output block. - * @param decrypt true to decrypt the block, false to encrypt it. + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} */ -function _updateBlock(w, input, output, decrypt) { - /* - Cipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)]) - begin - byte state[4,Nb] - state = in - AddRoundKey(state, w[0, Nb-1]) - for round = 1 step 1 to Nr-1 - SubBytes(state) - ShiftRows(state) - MixColumns(state) - AddRoundKey(state, w[round*Nb, (round+1)*Nb-1]) - end for - SubBytes(state) - ShiftRows(state) - AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) - out = state - end +const node_modules_uint8arrays_node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || base58btc + return [ + /** @type {Prefix} */ (base58btc.prefix), + decoder.decode(`${base58btc.prefix}${source}`) + ] + } + case base58btc.prefix: { + const decoder = base || base58btc + return [/** @type {Prefix} */(base58btc.prefix), decoder.decode(source)] + } + case base32.prefix: { + const decoder = base || base32 + return [/** @type {Prefix} */(base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) + } + return [/** @type {Prefix} */(source[0]), base.decode(source)] + } + } +} + +/** + * + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base + */ +const node_modules_uint8arrays_node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) + } - InvCipher(byte in[4*Nb], byte out[4*Nb], word w[Nb*(Nr+1)]) - begin - byte state[4,Nb] - state = in - AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) - for round = Nr-1 step -1 downto 1 - InvShiftRows(state) - InvSubBytes(state) - AddRoundKey(state, w[round*Nb, (round+1)*Nb-1]) - InvMixColumns(state) - end for - InvShiftRows(state) - InvSubBytes(state) - AddRoundKey(state, w[0, Nb-1]) - out = state - end - */ + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} - // Encrypt: AddRoundKey(state, w[0, Nb-1]) - // Decrypt: AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) - var Nr = w.length / 4 - 1; - var m0, m1, m2, m3, sub; - if(decrypt) { - m0 = imix[0]; - m1 = imix[1]; - m2 = imix[2]; - m3 = imix[3]; - sub = isbox; +/** + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base + */ +const node_modules_uint8arrays_node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid } else { - m0 = mix[0]; - m1 = mix[1]; - m2 = mix[2]; - m3 = mix[3]; - sub = sbox; + return cid } - var a, b, c, d, a2, b2, c2; - a = input[0] ^ w[0]; - b = input[decrypt ? 3 : 1] ^ w[1]; - c = input[2] ^ w[2]; - d = input[decrypt ? 1 : 3] ^ w[3]; - var i = 3; +} - /* In order to share code we follow the encryption algorithm when both - encrypting and decrypting. To account for the changes required in the - decryption algorithm, we use different lookup tables when decrypting - and use a modified key schedule to account for the difference in the - order of transformations applied when performing rounds. We also get - key rounds in reverse order (relative to encryption). */ - for(var round = 1; round < Nr; ++round) { - /* As described above, we'll be using table lookups to perform the - column mixing. Each column is stored as a word in the state (the - array 'input' has one column as a word at each index). In order to - mix a column, we perform these transformations on each row in c, - which is 1 byte in each word. The new column for c0 is c'0: +const node_modules_uint8arrays_node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70 +const node_modules_uint8arrays_node_modules_multiformats_src_cid_SHA_256_CODE = 0x12 - m0 m1 m2 m3 - r0,c'0 = 2*r0,c0 + 3*r1,c0 + 1*r2,c0 + 1*r3,c0 - r1,c'0 = 1*r0,c0 + 2*r1,c0 + 3*r2,c0 + 1*r3,c0 - r2,c'0 = 1*r0,c0 + 1*r1,c0 + 2*r2,c0 + 3*r3,c0 - r3,c'0 = 3*r0,c0 + 1*r1,c0 + 1*r2,c0 + 2*r3,c0 +/** + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} + */ +const node_modules_uint8arrays_node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = varint.encodingLength(version) + const hashOffset = codeOffset + varint.encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + varint.encodeTo(version, bytes, 0) + varint.encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes +} - So using mix tables where c0 is a word with r0 being its upper - 8 bits and r3 being its lower 8 bits: +const node_modules_uint8arrays_node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') - m0[c0 >> 24] will yield this word: [2*r0,1*r0,1*r0,3*r0] - ... - m3[c0 & 255] will yield this word: [1*r3,1*r3,3*r3,2*r3] +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/index.js - Therefore to mix the columns in each word in the state we - do the following (& 255 omitted for brevity): - c'0,r0 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] - c'0,r1 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] - c'0,r2 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] - c'0,r3 = m0[c0 >> 24] ^ m1[c1 >> 16] ^ m2[c2 >> 8] ^ m3[c3] - However, before mixing, the algorithm requires us to perform - ShiftRows(). The ShiftRows() transformation cyclically shifts the - last 3 rows of the state over different offsets. The first row - (r = 0) is not shifted. - s'_r,c = s_r,(c + shift(r, Nb) mod Nb - for 0 < r < 4 and 0 <= c < Nb and - shift(1, 4) = 1 - shift(2, 4) = 2 - shift(3, 4) = 3. - This causes the first byte in r = 1 to be moved to the end of - the row, the first 2 bytes in r = 2 to be moved to the end of - the row, the first 3 bytes in r = 3 to be moved to the end of - the row: - r1: [c0 c1 c2 c3] => [c1 c2 c3 c0] - r2: [c0 c1 c2 c3] [c2 c3 c0 c1] - r3: [c0 c1 c2 c3] [c3 c0 c1 c2] - We can make these substitutions inline with our column mixing to - generate an updated set of equations to produce each word in the - state (note the columns have changed positions): +// This way TS will also expose all the types from module - c0 c1 c2 c3 => c0 c1 c2 c3 - c0 c1 c2 c3 c1 c2 c3 c0 (cycled 1 byte) - c0 c1 c2 c3 c2 c3 c0 c1 (cycled 2 bytes) - c0 c1 c2 c3 c3 c0 c1 c2 (cycled 3 bytes) - Therefore: - c'0 = 2*r0,c0 + 3*r1,c1 + 1*r2,c2 + 1*r3,c3 - c'0 = 1*r0,c0 + 2*r1,c1 + 3*r2,c2 + 1*r3,c3 - c'0 = 1*r0,c0 + 1*r1,c1 + 2*r2,c2 + 3*r3,c3 - c'0 = 3*r0,c0 + 1*r1,c1 + 1*r2,c2 + 2*r3,c3 - c'1 = 2*r0,c1 + 3*r1,c2 + 1*r2,c3 + 1*r3,c0 - c'1 = 1*r0,c1 + 2*r1,c2 + 3*r2,c3 + 1*r3,c0 - c'1 = 1*r0,c1 + 1*r1,c2 + 2*r2,c3 + 3*r3,c0 - c'1 = 3*r0,c1 + 1*r1,c2 + 1*r2,c3 + 2*r3,c0 +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats/src/basics.js +// @ts-check - ... and so forth for c'2 and c'3. The important distinction is - that the columns are cycling, with c0 being used with the m0 - map when calculating c0, but c1 being used with the m0 map when - calculating c1 ... and so forth. - When performing the inverse we transform the mirror image and - skip the bottom row, instead of the top one, and move upwards: - c3 c2 c1 c0 => c0 c3 c2 c1 (cycled 3 bytes) *same as encryption - c3 c2 c1 c0 c1 c0 c3 c2 (cycled 2 bytes) - c3 c2 c1 c0 c2 c1 c0 c3 (cycled 1 byte) *same as encryption - c3 c2 c1 c0 c3 c2 c1 c0 - If you compare the resulting matrices for ShiftRows()+MixColumns() - and for InvShiftRows()+InvMixColumns() the 2nd and 4th columns are - different (in encrypt mode vs. decrypt mode). So in order to use - the same code to handle both encryption and decryption, we will - need to do some mapping. - If in encryption mode we let a=c0, b=c1, c=c2, d=c3, and r be - a row number in the state, then the resulting matrix in encryption - mode for applying the above transformations would be: - r1: a b c d - r2: b c d a - r3: c d a b - r4: d a b c - If we did the same in decryption mode we would get: - r1: a d c b - r2: b a d c - r3: c b a d - r4: d c b a - If instead we swap d and b (set b=c3 and d=c1), then we get: - r1: a b c d - r2: d a b c - r3: c d a b - r4: b c d a - Now the 1st and 3rd rows are the same as the encryption matrix. All - we need to do then to make the mapping exactly the same is to swap - the 2nd and 4th rows when in decryption mode. To do this without - having to do it on each iteration, we swapped the 2nd and 4th rows - in the decryption key schedule. We also have to do the swap above - when we first pull in the input and when we set the final output. */ - a2 = - m0[a >>> 24] ^ - m1[b >>> 16 & 255] ^ - m2[c >>> 8 & 255] ^ - m3[d & 255] ^ w[++i]; - b2 = - m0[b >>> 24] ^ - m1[c >>> 16 & 255] ^ - m2[d >>> 8 & 255] ^ - m3[a & 255] ^ w[++i]; - c2 = - m0[c >>> 24] ^ - m1[d >>> 16 & 255] ^ - m2[a >>> 8 & 255] ^ - m3[b & 255] ^ w[++i]; - d = - m0[d >>> 24] ^ - m1[a >>> 16 & 255] ^ - m2[b >>> 8 & 255] ^ - m3[c & 255] ^ w[++i]; - a = a2; - b = b2; - c = c2; - } - /* - Encrypt: - SubBytes(state) - ShiftRows(state) - AddRoundKey(state, w[Nr*Nb, (Nr+1)*Nb-1]) - Decrypt: - InvShiftRows(state) - InvSubBytes(state) - AddRoundKey(state, w[0, Nb-1]) - */ - // Note: rows are shifted inline - output[0] = - (sub[a >>> 24] << 24) ^ - (sub[b >>> 16 & 255] << 16) ^ - (sub[c >>> 8 & 255] << 8) ^ - (sub[d & 255]) ^ w[++i]; - output[decrypt ? 3 : 1] = - (sub[b >>> 24] << 24) ^ - (sub[c >>> 16 & 255] << 16) ^ - (sub[d >>> 8 & 255] << 8) ^ - (sub[a & 255]) ^ w[++i]; - output[2] = - (sub[c >>> 24] << 24) ^ - (sub[d >>> 16 & 255] << 16) ^ - (sub[a >>> 8 & 255] << 8) ^ - (sub[b & 255]) ^ w[++i]; - output[decrypt ? 1 : 3] = - (sub[d >>> 24] << 24) ^ - (sub[a >>> 16 & 255] << 16) ^ - (sub[b >>> 8 & 255] << 8) ^ - (sub[c & 255]) ^ w[++i]; -} -/** - * Deprecated. Instead, use: - * - * forge.cipher.createCipher('AES-', key); - * forge.cipher.createDecipher('AES-', key); - * - * Creates a deprecated AES cipher object. This object's mode will default to - * CBC (cipher-block-chaining). - * - * The key and iv may be given as a string of bytes, an array of bytes, a - * byte buffer, or an array of 32-bit words. - * - * @param options the options to use. - * key the symmetric key to use. - * output the buffer to write to. - * decrypt true for decryption, false for encryption. - * mode the cipher mode to use (default: 'CBC'). - * - * @return the cipher. - */ -function _createCipher(options) { - options = options || {}; - var mode = (options.mode || 'CBC').toUpperCase(); - var algorithm = 'AES-' + mode; - var cipher; - if(options.decrypt) { - cipher = forge.cipher.createDecipher(algorithm, options.key); - } else { - cipher = forge.cipher.createCipher(algorithm, options.key); - } - // backwards compatible start API - var start = cipher.start; - cipher.start = function(iv, options) { - // backwards compatibility: support second arg as output buffer - var output = null; - if(options instanceof forge.util.ByteBuffer) { - output = options; - options = {}; - } - options = options || {}; - options.output = output; - options.iv = iv; - start.call(cipher, options); - }; - return cipher; -} +const uint8arrays_node_modules_multiformats_src_basics_bases = { ...uint8arrays_node_modules_multiformats_src_bases_identity_namespaceObject, ...uint8arrays_node_modules_multiformats_src_bases_base2_namespaceObject, ...uint8arrays_node_modules_multiformats_src_bases_base8_namespaceObject, ...uint8arrays_node_modules_multiformats_src_bases_base10_namespaceObject, ...uint8arrays_node_modules_multiformats_src_bases_base16_namespaceObject, ...node_modules_uint8arrays_node_modules_multiformats_src_bases_base32_namespaceObject, ...uint8arrays_node_modules_multiformats_src_bases_base36_namespaceObject, ...node_modules_uint8arrays_node_modules_multiformats_src_bases_base58_namespaceObject, ...uint8arrays_node_modules_multiformats_src_bases_base64_namespaceObject, ...uint8arrays_node_modules_multiformats_src_bases_base256emoji_namespaceObject } +const uint8arrays_node_modules_multiformats_src_basics_hashes = { ...uint8arrays_node_modules_multiformats_src_hashes_sha2_namespaceObject, ...uint8arrays_node_modules_multiformats_src_hashes_identity_namespaceObject } +const uint8arrays_node_modules_multiformats_src_basics_codecs = { raw: uint8arrays_node_modules_multiformats_src_codecs_raw_namespaceObject, json: uint8arrays_node_modules_multiformats_src_codecs_json_namespaceObject } -/***/ }), -/***/ 69197: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/dist/src/alloc.js /** - * Javascript implementation of Abstract Syntax Notation Number One. - * - * @author Dave Longley - * - * Copyright (c) 2010-2015 Digital Bazaar, Inc. - * - * An API for storing data using the Abstract Syntax Notation Number One - * format using DER (Distinguished Encoding Rules) encoding. This encoding is - * commonly used to store data for PKI, i.e. X.509 Certificates, and this - * implementation exists for that purpose. - * - * Abstract Syntax Notation Number One (ASN.1) is used to define the abstract - * syntax of information without restricting the way the information is encoded - * for transmission. It provides a standard that allows for open systems - * communication. ASN.1 defines the syntax of information data and a number of - * simple data types as well as a notation for describing them and specifying - * values for them. - * - * The RSA algorithm creates public and private keys that are often stored in - * X.509 or PKCS#X formats -- which use ASN.1 (encoded in DER format). This - * class provides the most basic functionality required to store and load DSA - * keys that are encoded according to ASN.1. - * - * The most common binary encodings for ASN.1 are BER (Basic Encoding Rules) - * and DER (Distinguished Encoding Rules). DER is just a subset of BER that - * has stricter requirements for how data must be encoded. - * - * Each ASN.1 structure has a tag (a byte identifying the ASN.1 structure type) - * and a byte array for the value of this ASN1 structure which may be data or a - * list of ASN.1 structures. - * - * Each ASN.1 structure using BER is (Tag-Length-Value): - * - * | byte 0 | bytes X | bytes Y | - * |--------|---------|---------- - * | tag | length | value | - * - * ASN.1 allows for tags to be of "High-tag-number form" which allows a tag to - * be two or more octets, but that is not supported by this class. A tag is - * only 1 byte. Bits 1-5 give the tag number (ie the data type within a - * particular 'class'), 6 indicates whether or not the ASN.1 value is - * constructed from other ASN.1 values, and bits 7 and 8 give the 'class'. If - * bits 7 and 8 are both zero, the class is UNIVERSAL. If only bit 7 is set, - * then the class is APPLICATION. If only bit 8 is set, then the class is - * CONTEXT_SPECIFIC. If both bits 7 and 8 are set, then the class is PRIVATE. - * The tag numbers for the data types for the class UNIVERSAL are listed below: - * - * UNIVERSAL 0 Reserved for use by the encoding rules - * UNIVERSAL 1 Boolean type - * UNIVERSAL 2 Integer type - * UNIVERSAL 3 Bitstring type - * UNIVERSAL 4 Octetstring type - * UNIVERSAL 5 Null type - * UNIVERSAL 6 Object identifier type - * UNIVERSAL 7 Object descriptor type - * UNIVERSAL 8 External type and Instance-of type - * UNIVERSAL 9 Real type - * UNIVERSAL 10 Enumerated type - * UNIVERSAL 11 Embedded-pdv type - * UNIVERSAL 12 UTF8String type - * UNIVERSAL 13 Relative object identifier type - * UNIVERSAL 14-15 Reserved for future editions - * UNIVERSAL 16 Sequence and Sequence-of types - * UNIVERSAL 17 Set and Set-of types - * UNIVERSAL 18-22, 25-30 Character string types - * UNIVERSAL 23-24 Time types - * - * The length of an ASN.1 structure is specified after the tag identifier. - * There is a definite form and an indefinite form. The indefinite form may - * be used if the encoding is constructed and not all immediately available. - * The indefinite form is encoded using a length byte with only the 8th bit - * set. The end of the constructed object is marked using end-of-contents - * octets (two zero bytes). - * - * The definite form looks like this: - * - * The length may take up 1 or more bytes, it depends on the length of the - * value of the ASN.1 structure. DER encoding requires that if the ASN.1 - * structure has a value that has a length greater than 127, more than 1 byte - * will be used to store its length, otherwise just one byte will be used. - * This is strict. - * - * In the case that the length of the ASN.1 value is less than 127, 1 octet - * (byte) is used to store the "short form" length. The 8th bit has a value of - * 0 indicating the length is "short form" and not "long form" and bits 7-1 - * give the length of the data. (The 8th bit is the left-most, most significant - * bit: also known as big endian or network format). - * - * In the case that the length of the ASN.1 value is greater than 127, 2 to - * 127 octets (bytes) are used to store the "long form" length. The first - * byte's 8th bit is set to 1 to indicate the length is "long form." Bits 7-1 - * give the number of additional octets. All following octets are in base 256 - * with the most significant digit first (typical big-endian binary unsigned - * integer storage). So, for instance, if the length of a value was 257, the - * first byte would be set to: - * - * 10000010 = 130 = 0x82. - * - * This indicates there are 2 octets (base 256) for the length. The second and - * third bytes (the octets just mentioned) would store the length in base 256: - * - * octet 2: 00000001 = 1 * 256^1 = 256 - * octet 3: 00000001 = 1 * 256^0 = 1 - * total = 257 - * - * The algorithm for converting a js integer value of 257 to base-256 is: - * - * var value = 257; - * var bytes = []; - * bytes[0] = (value >>> 8) & 0xFF; // most significant byte first - * bytes[1] = value & 0xFF; // least significant byte last - * - * On the ASN.1 UNIVERSAL Object Identifier (OID) type: - * - * An OID can be written like: "value1.value2.value3...valueN" - * - * The DER encoding rules: - * - * The first byte has the value 40 * value1 + value2. - * The following bytes, if any, encode the remaining values. Each value is - * encoded in base 128, most significant digit first (big endian), with as - * few digits as possible, and the most significant bit of each byte set - * to 1 except the last in each value's encoding. For example: Given the - * OID "1.2.840.113549", its DER encoding is (remember each byte except the - * last one in each encoding is OR'd with 0x80): - * - * byte 1: 40 * 1 + 2 = 42 = 0x2A. - * bytes 2-3: 128 * 6 + 72 = 840 = 6 72 = 6 72 = 0x0648 = 0x8648 - * bytes 4-6: 16384 * 6 + 128 * 119 + 13 = 6 119 13 = 0x06770D = 0x86F70D - * - * The final value is: 0x2A864886F70D. - * The full OID (including ASN.1 tag and length of 6 bytes) is: - * 0x06062A864886F70D + * Returns a `Uint8Array` of the requested size. Referenced memory will + * be initialized to 0. */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(36536); -__nccwpck_require__(11750); - -/* ASN.1 API */ -var asn1 = module.exports = forge.asn1 = forge.asn1 || {}; - +function uint8arrays_dist_src_alloc_alloc(size = 0) { + if (globalThis.Buffer?.alloc != null) { + return asUint8Array(globalThis.Buffer.alloc(size)); + } + return new Uint8Array(size); +} /** - * ASN.1 classes. + * Where possible returns a Uint8Array of the requested size that references + * uninitialized memory. Only use if you are certain you will immediately + * overwrite every value in the returned `Uint8Array`. */ -asn1.Class = { - UNIVERSAL: 0x00, - APPLICATION: 0x40, - CONTEXT_SPECIFIC: 0x80, - PRIVATE: 0xC0 -}; +function dist_src_alloc_allocUnsafe(size = 0) { + if (globalThis.Buffer?.allocUnsafe != null) { + return dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.allocUnsafe(size)); + } + return new Uint8Array(size); +} +//# sourceMappingURL=alloc.js.map +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/dist/src/util/bases.js -/** - * ASN.1 types. Not all types are supported by this implementation, only - * those necessary to implement a simple PKI are implemented. - */ -asn1.Type = { - NONE: 0, - BOOLEAN: 1, - INTEGER: 2, - BITSTRING: 3, - OCTETSTRING: 4, - NULL: 5, - OID: 6, - ODESC: 7, - EXTERNAL: 8, - REAL: 9, - ENUMERATED: 10, - EMBEDDED: 11, - UTF8: 12, - ROID: 13, - SEQUENCE: 16, - SET: 17, - PRINTABLESTRING: 19, - IA5STRING: 22, - UTCTIME: 23, - GENERALIZEDTIME: 24, - BMPSTRING: 30 + +function util_bases_createCodec(name, prefix, encode, decode) { + return { + name, + prefix, + encoder: { + name, + prefix, + encode + }, + decoder: { + decode + } + }; +} +const util_bases_string = util_bases_createCodec('utf8', 'u', (buf) => { + const decoder = new TextDecoder('utf8'); + return 'u' + decoder.decode(buf); +}, (str) => { + const encoder = new TextEncoder(); + return encoder.encode(str.substring(1)); +}); +const util_bases_ascii = util_bases_createCodec('ascii', 'a', (buf) => { + let string = 'a'; + for (let i = 0; i < buf.length; i++) { + string += String.fromCharCode(buf[i]); + } + return string; +}, (str) => { + str = str.substring(1); + const buf = dist_src_alloc_allocUnsafe(str.length); + for (let i = 0; i < str.length; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}); +const util_bases_BASES = { + utf8: util_bases_string, + 'utf-8': util_bases_string, + hex: uint8arrays_node_modules_multiformats_src_basics_bases.base16, + latin1: util_bases_ascii, + ascii: util_bases_ascii, + binary: util_bases_ascii, + ...uint8arrays_node_modules_multiformats_src_basics_bases }; +/* harmony default export */ const dist_src_util_bases = (util_bases_BASES); +//# sourceMappingURL=bases.js.map +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/dist/src/from-string.js + /** - * Creates a new asn1 object. + * Create a `Uint8Array` from the passed string * - * @param tagClass the tag class for the object. - * @param type the data type (tag number) for the object. - * @param constructed true if the asn1 object is in constructed form. - * @param value the value for the object, if it is not constructed. - * @param [options] the options to use: - * [bitStringContents] the plain BIT STRING content including padding - * byte. + * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module. * - * @return the asn1 object. + * Also `ascii` which is similar to node's 'binary' encoding. */ -asn1.create = function(tagClass, type, constructed, value, options) { - /* An asn1 object has a tagClass, a type, a constructed flag, and a - value. The value's type depends on the constructed flag. If - constructed, it will contain a list of other asn1 objects. If not, - it will contain the ASN.1 value as an array of bytes formatted - according to the ASN.1 data type. */ - - // remove undefined values - if(forge.util.isArray(value)) { - var tmp = []; - for(var i = 0; i < value.length; ++i) { - if(value[i] !== undefined) { - tmp.push(value[i]); - } +function dist_src_from_string_fromString(string, encoding = 'utf8') { + const base = dist_src_util_bases[encoding]; + if (base == null) { + throw new Error(`Unsupported encoding "${encoding}"`); } - value = tmp; - } + if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) { + return dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.from(string, 'utf-8')); + } + // add multibase prefix + return base.decoder.decode(`${base.prefix}${string}`); // eslint-disable-line @typescript-eslint/restrict-template-expressions +} +//# sourceMappingURL=from-string.js.map +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/config/replace.js - var obj = { - tagClass: tagClass, - type: type, - constructed: constructed, - composed: constructed || forge.util.isArray(value), - value: value - }; - if(options && 'bitStringContents' in options) { - // TODO: copy byte buffer if it's a buffer not a string - obj.bitStringContents = options.bitStringContents; - // TODO: add readonly flag to avoid this overhead - // save copy to detect changes - obj.original = asn1.copy(obj); - } - return obj; -}; -/** - * Copies an asn1 object. - * - * @param obj the asn1 object. - * @param [options] copy options: - * [excludeBitStringContents] true to not copy bitStringContents - * - * @return the a copy of the asn1 object. - */ -asn1.copy = function(obj, options) { - var copy; - if(forge.util.isArray(obj)) { - copy = []; - for(var i = 0; i < obj.length; ++i) { - copy.push(asn1.copy(obj[i], options)); - } - return copy; - } - if(typeof obj === 'string') { - // TODO: copy byte buffer if it's a buffer not a string - return obj; - } - copy = { - tagClass: obj.tagClass, - type: obj.type, - constructed: obj.constructed, - composed: obj.composed, - value: asn1.copy(obj.value, options) - }; - if(options && !options.excludeBitStringContents) { - // TODO: copy byte buffer if it's a buffer not a string - copy.bitStringContents = obj.bitStringContents; + +const createReplace = configure(api => { + /** + * @type {import('../types.js').ConfigAPI["replace"]} + */ + const replace = async (config, options = {}) => { + // allow aborting requests on body errors + const controller = new AbortController() + const signal = abortSignal(controller.signal, options.signal) + + const res = await api.post('config/replace', { + signal, + searchParams: toUrlSearchParams(options), + ...( + await multipart_request_multipartRequest([dist_src_from_string_fromString(JSON.stringify(config))], controller, options.headers) + ) + }) + + await res.text() } - return copy; -}; -/** - * Compares asn1 objects for equality. - * - * Note this function does not run in constant time. - * - * @param obj1 the first asn1 object. - * @param obj2 the second asn1 object. - * @param [options] compare options: - * [includeBitStringContents] true to compare bitStringContents - * - * @return true if the asn1 objects are equal. - */ -asn1.equals = function(obj1, obj2, options) { - if(forge.util.isArray(obj1)) { - if(!forge.util.isArray(obj2)) { - return false; - } - if(obj1.length !== obj2.length) { - return false; - } - for(var i = 0; i < obj1.length; ++i) { - if(!asn1.equals(obj1[i], obj2[i])) { - return false; - } + return replace +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/config/set.js + + + +const createSet = configure(api => { + /** + * @type {import('../types.js').ConfigAPI["set"]} + */ + const set = async (key, value, options = {}) => { + if (typeof key !== 'string') { + throw new Error('Invalid key type') } - return true; - } - if(typeof obj1 !== typeof obj2) { - return false; - } + const params = { + ...options, + ...encodeParam(key, value) + } - if(typeof obj1 === 'string') { - return obj1 === obj2; - } + const res = await api.post('config', { + signal: options.signal, + searchParams: toUrlSearchParams(params), + headers: options.headers + }) - var equal = obj1.tagClass === obj2.tagClass && - obj1.type === obj2.type && - obj1.constructed === obj2.constructed && - obj1.composed === obj2.composed && - asn1.equals(obj1.value, obj2.value); - if(options && options.includeBitStringContents) { - equal = equal && (obj1.bitStringContents === obj2.bitStringContents); + await res.text() } - return equal; -}; + return set +}) /** - * Gets the length of a BER-encoded ASN.1 value. - * - * In case the length is not specified, undefined is returned. - * - * @param b the BER-encoded ASN.1 byte buffer, starting with the first - * length byte. - * - * @return the length of the BER-encoded ASN.1 value or undefined. + * @param {*} key + * @param {*} value */ -asn1.getBerValueLength = function(b) { - // TODO: move this function and related DER/BER functions to a der.js - // file; better abstract ASN.1 away from der/ber. - var b2 = b.getByte(); - if(b2 === 0x80) { - return undefined; +const encodeParam = (key, value) => { + switch (typeof value) { + case 'boolean': + return { arg: [key, value.toString()], bool: true } + case 'string': + return { arg: [key, value] } + default: + return { arg: [key, JSON.stringify(value)], json: true } } +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/config/index.js + + + + - // see if the length is "short form" or "long form" (bit 8 set) - var length; - var longForm = b2 & 0x80; - if(!longForm) { - // length is just the first byte - length = b2; - } else { - // the number of bytes the length is specified in bits 7 through 1 - // and each length byte is in big-endian base-256 - length = b.getInt((b2 & 0x7F) << 3); - } - return length; -}; /** - * Check if the byte buffer has enough bytes. Throws an Error if not. - * - * @param bytes the byte buffer to parse from. - * @param remaining the bytes remaining in the current parsing state. - * @param n the number of bytes the buffer must have. + * @param {import('../types').Options} config */ -function _checkBufferLength(bytes, remaining, n) { - if(n > remaining) { - var error = new Error('Too few bytes to parse DER.'); - error.available = bytes.length(); - error.remaining = remaining; - error.requested = n; - throw error; +function createConfig (config) { + return { + getAll: createGetAll(config), + get: get_createGet(config), + set: createSet(config), + replace: createReplace(config), + profiles: createProfiles(config) } } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dag/export.js + + + +const createExport = configure(api => { + /** + * @type {import('../types').DAGAPI["export"]} + */ + async function * dagExport (root, options = {}) { + const res = await api.post('dag/export', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: root.toString() + }), + headers: options.headers + }) + + yield * res.iterator() + } + + return dagExport +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/resolve.js + + + /** - * Gets the length of a BER-encoded ASN.1 value. - * - * In case the length is not specified, undefined is returned. - * - * @param bytes the byte buffer to parse from. - * @param remaining the bytes remaining in the current parsing state. + * Retrieves IPLD Nodes along the `path` that is rooted at `cid`. * - * @return the length of the BER-encoded ASN.1 value or undefined. + * @param {CID} cid - the CID where the resolving starts + * @param {string} path - the path that should be resolved + * @param {import('../types').Multicodecs} codecs + * @param {(cid: CID, options?: import('../types').AbortOptions) => Promise} getBlock + * @param {import('../types').AbortOptions} [options] */ -var _getValueLength = function(bytes, remaining) { - // TODO: move this function and related DER/BER functions to a der.js - // file; better abstract ASN.1 away from der/ber. - // fromDer already checked that this byte exists - var b2 = bytes.getByte(); - remaining--; - if(b2 === 0x80) { - return undefined; +async function * resolve (cid, path, codecs, getBlock, options) { + /** + * @param {CID} cid + */ + const load = async (cid) => { + const codec = await codecs.getCodec(cid.code) + const block = await getBlock(cid, options) + + return codec.decode(block) } - // see if the length is "short form" or "long form" (bit 8 set) - var length; - var longForm = b2 & 0x80; - if(!longForm) { - // length is just the first byte - length = b2; - } else { - // the number of bytes the length is specified in bits 7 through 1 - // and each length byte is in big-endian base-256 - var longFormBytes = b2 & 0x7F; - _checkBufferLength(bytes, remaining, longFormBytes); - length = bytes.getInt(longFormBytes << 3); + const parts = path.split('/').filter(Boolean) + let value = await load(cid) + let lastCid = cid + + // End iteration if there isn't a CID to follow any more + while (parts.length) { + const key = parts.shift() + + if (!key) { + throw err_code(new Error(`Could not resolve path "${path}"`), 'ERR_INVALID_PATH') + } + + if (Object.prototype.hasOwnProperty.call(value, key)) { + value = value[key] + + yield { + value, + remainderPath: parts.join('/') + } + } else { + throw err_code(new Error(`no link named "${key}" under ${lastCid}`), 'ERR_NO_LINK') + } + + const cid = node_modules_multiformats_src_cid_CID.asCID(value) + + if (cid) { + lastCid = cid + value = await load(value) + } } - // FIXME: this will only happen for 32 bit getInt with high bit set - if(length < 0) { - throw new Error('Negative length: ' + length); + + yield { + value, + remainderPath: '' } - return length; -}; +} +;// CONCATENATED MODULE: ./node_modules/it-first/dist/src/index.js /** - * Parses an asn1 object from a byte buffer in DER format. - * - * @param bytes the byte buffer to parse from. - * @param [strict] true to be strict when checking value lengths, false to - * allow truncated values (default: true). - * @param [options] object with options or boolean strict flag - * [strict] true to be strict when checking value lengths, false to - * allow truncated values (default: true). - * [parseAllBytes] true to ensure all bytes are parsed - * (default: true) - * [decodeBitStrings] true to attempt to decode the content of - * BIT STRINGs (not OCTET STRINGs) using strict mode. Note that - * without schema support to understand the data context this can - * erroneously decode values that happen to be valid ASN.1. This - * flag will be deprecated or removed as soon as schema support is - * available. (default: true) - * - * @throws Will throw an error for various malformed input conditions. - * - * @return the parsed asn1 object. + * Returns the first result from an (async) iterable, unless empty, in which + * case returns `undefined` */ -asn1.fromDer = function(bytes, options) { - if(options === undefined) { - options = { - strict: true, - parseAllBytes: true, - decodeBitStrings: true - }; - } - if(typeof options === 'boolean') { - options = { - strict: options, - parseAllBytes: true, - decodeBitStrings: true - }; - } - if(!('strict' in options)) { - options.strict = true; - } - if(!('parseAllBytes' in options)) { - options.parseAllBytes = true; - } - if(!('decodeBitStrings' in options)) { - options.decodeBitStrings = true; - } +async function first(source) { + for await (const entry of source) { // eslint-disable-line no-unreachable-loop + return entry; + } + return undefined; +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/it-last/dist/src/index.js +/** + * Returns the last item of an (async) iterable, unless empty, in which case + * return `undefined` + */ +async function last(source) { + let res; + for await (const entry of source) { + res = entry; + } + return res; +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dag/get.js + + + + - // wrap in buffer if needed - if(typeof bytes === 'string') { - bytes = forge.util.createBuffer(bytes); - } - var byteCount = bytes.length(); - var value = _fromDer(bytes, bytes.length(), 0, options); - if(options.parseAllBytes && bytes.length() !== 0) { - var error = new Error('Unparsed DER bytes remain after ASN.1 parsing.'); - error.byteCount = byteCount; - error.remaining = bytes.length(); - throw error; - } - return value; -}; /** - * Internal function to parse an asn1 object from a byte buffer in DER format. - * - * @param bytes the byte buffer to parse from. - * @param remaining the number of bytes remaining for this chunk. - * @param depth the current parsing depth. - * @param options object with same options as fromDer(). - * - * @return the parsed asn1 object. + * @param {import('../types').Multicodecs} codecs + * @param {import('../types').Options} options */ -function _fromDer(bytes, remaining, depth, options) { - // temporary storage for consumption calculations - var start; +const dag_get_createGet = (codecs, options) => { + const fn = configure((api, opts) => { + const getBlock = createGet(opts) - // minimum length for ASN.1 DER structure is 2 - _checkBufferLength(bytes, remaining, 2); + /** + * @type {import('../types').DAGAPI["get"]} + */ + const get = async (cid, options = {}) => { + if (options.path) { + const entry = options.localResolve + ? await first(resolve(cid, options.path, codecs, getBlock, options)) + : await last(resolve(cid, options.path, codecs, getBlock, options)) + /** @type {import('../types').GetResult | undefined} - first and last will return undefined when empty */ + const result = (entry) - // get the first byte - var b1 = bytes.getByte(); - // consumed one byte - remaining--; + if (!result) { + throw err_code(new Error('Not found'), 'ERR_NOT_FOUND') + } - // get the tag class - var tagClass = (b1 & 0xC0); + return result + } - // get the type (bits 1-5) - var type = b1 & 0x1F; + const codec = await codecs.getCodec(cid.code) + const block = await getBlock(cid, options) + const node = codec.decode(block) - // get the variable value length and adjust remaining bytes - start = bytes.length(); - var length = _getValueLength(bytes, remaining); - remaining -= start - bytes.length(); + return { + value: node, + remainderPath: '' + } + } - // ensure there are enough bytes to get the value - if(length !== undefined && length > remaining) { - if(options.strict) { - var error = new Error('Too few bytes to read ASN.1 value.'); - error.available = bytes.length(); - error.remaining = remaining; - error.requested = length; - throw error; + return get + }) + + return fn(options) +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dag/import.js + + + + + + +const createImport = configure(api => { + /** + * @type {import('../types.js').DAGAPI["import"]} + */ + async function * dagImport (source, options = {}) { + const controller = new AbortController() + const signal = abortSignal(controller.signal, options.signal) + const { headers, body } = await multipart_request_multipartRequest(source, controller, options.headers) + + const res = await api.post('dag/import', { + signal, + headers, + body, + searchParams: toUrlSearchParams({ 'pin-roots': options.pinRoots }) + }) + + for await (const { Root } of res.ndjson()) { + if (Root !== undefined) { + const { Cid: { '/': Cid }, PinErrorMsg } = Root + + yield { + root: { + cid: node_modules_multiformats_src_cid_CID.parse(Cid), + pinErrorMsg: PinErrorMsg + } + } + } } - // Note: be lenient with truncated values and use remaining state bytes - length = remaining; } - // value storage - var value; - // possible BIT STRING contents storage - var bitStringContents; + return dagImport +}) - // constructed flag is bit 6 (32 = 0x20) of the first byte - var constructed = ((b1 & 0x20) === 0x20); - if(constructed) { - // parse child asn1 objects from the value - value = []; - if(length === undefined) { - // asn1 object of indefinite length, read until end tag - for(;;) { - _checkBufferLength(bytes, remaining, 2); - if(bytes.bytes(2) === String.fromCharCode(0, 0)) { - bytes.getBytes(2); - remaining -= 2; - break; - } - start = bytes.length(); - value.push(_fromDer(bytes, remaining, depth + 1, options)); - remaining -= start - bytes.length(); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dag/put.js + + + + + + +/** + * @param {import('../types').Multicodecs} codecs + * @param {import('../types').Options} options + */ +const put_createPut = (codecs, options) => { + const fn = configure((api) => { + /** + * @type {import('../types').DAGAPI["put"]} + */ + const put = async (dagNode, options = {}) => { + const settings = { + storeCodec: 'dag-cbor', + hashAlg: 'sha2-256', + ...options } - } else { - // parsing asn1 object of definite length - while(length > 0) { - start = bytes.length(); - value.push(_fromDer(bytes, length, depth + 1, options)); - remaining -= start - bytes.length(); - length -= start - bytes.length(); + + let serialized + + if (settings.inputCodec) { + // if you supply an inputCodec, we assume you're passing in a raw, encoded + // block using that codec, so we'll just pass that on to the server and let + // it deal with the decode/encode/store cycle + if (!(dagNode instanceof Uint8Array)) { + throw new Error('Can only inputCodec on raw bytes that can be decoded') + } + serialized = dagNode + } else { + // if you don't supply an inputCodec, we assume you've passed in a JavaScript + // object you want to have encoded using storeCodec, so we'll prepare it for + // you if we have the codec + const storeCodec = await codecs.getCodec(settings.storeCodec) + serialized = storeCodec.encode(dagNode) + // now we have a serialized form, the server should be told to receive it + // in that format + settings.inputCodec = settings.storeCodec } + + // allow aborting requests on body errors + const controller = new AbortController() + const signal = abortSignal(controller.signal, settings.signal) + + const res = await api.post('dag/put', { + timeout: settings.timeout, + signal, + searchParams: toUrlSearchParams(settings), + ...( + await multipart_request_multipartRequest([serialized], controller, settings.headers) + ) + }) + const data = await res.json() + + return node_modules_multiformats_src_cid_CID.parse(data.Cid['/']) } + + return put + }) + + return fn(options) +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dag/resolve.js + + + + +const createResolve = configure(api => { + /** + * @type {import('../types.js').DAGAPI["resolve"]} + */ + const resolve = async (ipfsPath, options = {}) => { + const res = await api.post('dag/resolve', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: `${ipfsPath}${options.path ? `/${options.path}`.replace(/\/[/]+/g, '/') : ''}`, + ...options + }), + headers: options.headers + }) + + const data = await res.json() + + return { cid: node_modules_multiformats_src_cid_CID.parse(data.Cid['/']), remainderPath: data.RemPath } } - // if a BIT STRING, save the contents including padding - if(value === undefined && tagClass === asn1.Class.UNIVERSAL && - type === asn1.Type.BITSTRING) { - bitStringContents = bytes.bytes(length); + return resolve +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dag/index.js + + + + + + +/** + * @param {import('../types').Multicodecs} codecs + * @param {import('../types').Options} config + */ +function createDag (codecs, config) { + return { + export: createExport(config), + get: dag_get_createGet(codecs, config), + import: createImport(config), + put: put_createPut(codecs, config), + resolve: createResolve(config) } +} - // determine if a non-constructed value should be decoded as a composed - // value that contains other ASN.1 objects. BIT STRINGs (and OCTET STRINGs) - // can be used this way. - if(value === undefined && options.decodeBitStrings && - tagClass === asn1.Class.UNIVERSAL && - // FIXME: OCTET STRINGs not yet supported here - // .. other parts of forge expect to decode OCTET STRINGs manually - (type === asn1.Type.BITSTRING /*|| type === asn1.Type.OCTETSTRING*/) && - length > 1) { - // save read position - var savedRead = bytes.read; - var savedRemaining = remaining; - var unused = 0; - if(type === asn1.Type.BITSTRING) { - /* The first octet gives the number of bits by which the length of the - bit string is less than the next multiple of eight (this is called - the "number of unused bits"). +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dht/response-types.js - The second and following octets give the value of the bit string - converted to an octet string. */ - _checkBufferLength(bytes, remaining, 1); - unused = bytes.getByte(); - remaining--; - } - // if all bits are used, maybe the BIT/OCTET STRING holds ASN.1 objs - if(unused === 0) { - try { - // attempt to parse child asn1 object from the value - // (stored in array to signal composed value) - start = bytes.length(); - var subOptions = { - // enforce strict mode to avoid parsing ASN.1 from plain data - strict: true, - decodeBitStrings: true - }; - var composed = _fromDer(bytes, remaining, depth + 1, subOptions); - var used = start - bytes.length(); - remaining -= used; - if(type == asn1.Type.BITSTRING) { - used++; - } +// Response types are defined here = +// https://github.com/libp2p/go-libp2p-core/blob/6e566d10f4a5447317a66d64c7459954b969bdab/routing/query.go#L15-L24 +const SendingQuery = 0 +const PeerResponse = 1 +const FinalPeer = 2 +const QueryError = 3 +const Provider = 4 +const Value = 5 +const AddingPeer = 6 +const DialingPeer = 7 - // if the data all decoded and the class indicates UNIVERSAL or - // CONTEXT_SPECIFIC then assume we've got an encapsulated ASN.1 object - var tc = composed.tagClass; - if(used === length && - (tc === asn1.Class.UNIVERSAL || tc === asn1.Class.CONTEXT_SPECIFIC)) { - value = [composed]; - } - } catch(ex) { - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dht/map-event.js + + + + + +/** + * @typedef {ReturnType} Multiaddr + */ + +/** + * @param {import('../types').MapEvent} event + * @returns {import('../types').QueryEvent} + */ +const mapEvent = (event) => { + if (event.Type === SendingQuery) { + return { + name: 'SENDING_QUERY', + type: event.Type } - if(value === undefined) { - // restore read position - bytes.read = savedRead; - remaining = savedRemaining; + } + + if (event.Type === PeerResponse) { + return { + from: peerIdFromString(event.ID), + name: 'PEER_RESPONSE', + type: event.Type, + // TODO: how to infer this from the go-ipfs response + messageType: 0, + // TODO: how to infer this from the go-ipfs response + messageName: 'PUT_VALUE', + closer: (event.Responses || []).map(({ ID, Addrs }) => ({ id: peerIdFromString(ID), multiaddrs: Addrs.map(addr => src_multiaddr(addr)), protocols: [] })), + providers: (event.Responses || []).map(({ ID, Addrs }) => ({ id: peerIdFromString(ID), multiaddrs: Addrs.map(addr => src_multiaddr(addr)), protocols: [] })) + // TODO: how to infer this from the go-ipfs response + // record: ??? } } - if(value === undefined) { - // asn1 not constructed or composed, get raw value - // TODO: do DER to OID conversion and vice-versa in .toDer? + if (event.Type === FinalPeer) { + // dht.query ends with a FinalPeer event with no Responses + /** @type {import('../types.js').PeerInfo} */ + let peer = { + // @ts-expect-error go-ipfs does not return this + id: event.ID ?? peerIdFromString(event.ID), + /** @type {Multiaddr[]} */ + multiaddrs: [], + protocols: [] + } - if(length === undefined) { - if(options.strict) { - throw new Error('Non-constructed ASN.1 object of indefinite length.'); + if (event.Responses && event.Responses.length) { + // dht.findPeer has the result in the Responses field + peer = { + id: peerIdFromString(event.Responses[0].ID), + multiaddrs: event.Responses[0].Addrs.map(addr => src_multiaddr(addr)), + protocols: [] } - // be lenient and use remaining state bytes - length = remaining; } - if(type === asn1.Type.BMPSTRING) { - value = ''; - for(; length > 0; length -= 2) { - _checkBufferLength(bytes, remaining, 2); - value += String.fromCharCode(bytes.getInt16()); - remaining -= 2; - } - } else { - value = bytes.getBytes(length); - remaining -= length; + return { + name: 'FINAL_PEER', + type: event.Type, + peer } } - // add BIT STRING contents if available - var asn1Options = bitStringContents === undefined ? null : { - bitStringContents: bitStringContents - }; + if (event.Type === QueryError) { + return { + name: 'QUERY_ERROR', + type: event.Type, + error: new Error(event.Extra) + } + } - // create and return asn1 object - return asn1.create(tagClass, type, constructed, value, asn1Options); -} + if (event.Type === Provider) { + return { + name: 'PROVIDER', + type: event.Type, + providers: event.Responses.map(({ ID, Addrs }) => ({ id: peerIdFromString(ID), multiaddrs: Addrs.map(addr => src_multiaddr(addr)), protocols: [] })) + } + } -/** - * Converts the given asn1 object to a buffer of bytes in DER format. - * - * @param asn1 the asn1 object to convert to bytes. - * - * @return the buffer of bytes. - */ -asn1.toDer = function(obj) { - var bytes = forge.util.createBuffer(); + if (event.Type === Value) { + return { + name: 'VALUE', + type: event.Type, + value: dist_src_from_string_fromString(event.Extra, 'base64pad') + } + } - // build the first byte - var b1 = obj.tagClass | obj.type; + if (event.Type === AddingPeer) { + const peers = event.Responses.map(({ ID }) => peerIdFromString(ID)) - // for storing the ASN.1 value - var value = forge.util.createBuffer(); + if (!peers.length) { + throw new Error('No peer found') + } - // use BIT STRING contents if available and data not changed - var useBitStringContents = false; - if('bitStringContents' in obj) { - useBitStringContents = true; - if(obj.original) { - useBitStringContents = asn1.equals(obj, obj.original); + return { + name: 'ADDING_PEER', + type: event.Type, + peer: peers[0] } } - if(useBitStringContents) { - value.putBytes(obj.bitStringContents); - } else if(obj.composed) { - // if composed, use each child asn1 object's DER bytes as value - // turn on 6th bit (0x20 = 32) to indicate asn1 is constructed - // from other asn1 objects - if(obj.constructed) { - b1 |= 0x20; - } else { - // type is a bit string, add unused bits of 0x00 - value.putByte(0x00); + if (event.Type === DialingPeer) { + return { + name: 'DIALING_PEER', + type: event.Type, + peer: peerIdFromString(event.ID) } + } - // add all of the child DER bytes together - for(var i = 0; i < obj.value.length; ++i) { - if(obj.value[i] !== undefined) { - value.putBuffer(asn1.toDer(obj.value[i])); - } - } - } else { - // use asn1.value directly - if(obj.type === asn1.Type.BMPSTRING) { - for(var i = 0; i < obj.value.length; ++i) { - value.putInt16(obj.value.charCodeAt(i)); - } - } else { - // ensure integer is minimally-encoded - // TODO: should all leading bytes be stripped vs just one? - // .. ex '00 00 01' => '01'? - if(obj.type === asn1.Type.INTEGER && - obj.value.length > 1 && - // leading 0x00 for positive integer - ((obj.value.charCodeAt(0) === 0 && - (obj.value.charCodeAt(1) & 0x80) === 0) || - // leading 0xFF for negative integer - (obj.value.charCodeAt(0) === 0xFF && - (obj.value.charCodeAt(1) & 0x80) === 0x80))) { - value.putBytes(obj.value.substr(1)); - } else { - value.putBytes(obj.value); - } + throw new Error('Unknown DHT event type') +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dht/find-peer.js + + + + +const createFindPeer = configure(api => { + /** + * @type {import('../types').DHTAPI["findPeer"]} + */ + async function * findPeer (peerId, options = {}) { + const res = await api.post('dht/findpeer', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: peerId, + ...options + }), + headers: options.headers + }) + + for await (const event of res.ndjson()) { + yield mapEvent(event) } } - // add tag byte - bytes.putByte(b1); + return findPeer +}) - // use "short form" encoding - if(value.length() <= 127) { - // one byte describes the length - // bit 8 = 0 and bits 7-1 = length - bytes.putByte(value.length() & 0x7F); - } else { - // use "long form" encoding - // 2 to 127 bytes describe the length - // first byte: bit 8 = 1 and bits 7-1 = # of additional bytes - // other bytes: length in base 256, big-endian - var len = value.length(); - var lenBytes = ''; - do { - lenBytes += String.fromCharCode(len & 0xFF); - len = len >>> 8; - } while(len > 0); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dht/find-provs.js - // set first byte to # bytes used to store the length and turn on - // bit 8 to indicate long-form length is used - bytes.putByte(lenBytes.length | 0x80); - // concatenate length bytes in reverse since they were generated - // little endian and we need big endian - for(var i = lenBytes.length - 1; i >= 0; --i) { - bytes.putByte(lenBytes.charCodeAt(i)); + + +const createFindProvs = configure(api => { + /** + * @type {import('../types.js').DHTAPI["findProvs"]} + */ + async function * findProvs (cid, options = {}) { + const res = await api.post('dht/findprovs', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: cid.toString(), + ...options + }), + headers: options.headers + }) + + for await (const event of res.ndjson()) { + yield mapEvent(event) } } - // concatenate value bytes - bytes.putBuffer(value); - return bytes; -}; + return findProvs +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/node_modules/uint8arrays/dist/src/to-string.js /** - * Converts an OID dot-separated string to a byte buffer. The byte buffer - * contains only the DER-encoded value, not any tag or length bytes. + * Turns a `Uint8Array` into a string. * - * @param oid the OID dot-separated string. + * Supports `utf8`, `utf-8` and any encoding supported by the multibase module. * - * @return the byte buffer. + * Also `ascii` which is similar to node's 'binary' encoding. */ -asn1.oidToDer = function(oid) { - // split OID into individual values - var values = oid.split('.'); - var bytes = forge.util.createBuffer(); +function dist_src_to_string_toString(array, encoding = 'utf8') { + const base = dist_src_util_bases[encoding]; + if (base == null) { + throw new Error(`Unsupported encoding "${encoding}"`); + } + if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) { + return globalThis.Buffer.from(array.buffer, array.byteOffset, array.byteLength).toString('utf8'); + } + // strip multibase prefix + return base.encoder.encode(array).substring(1); +} +//# sourceMappingURL=to-string.js.map +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dht/get.js - // first byte is 40 * value1 + value2 - bytes.putByte(40 * parseInt(values[0], 10) + parseInt(values[1], 10)); - // other bytes are each value in base 128 with 8th bit set except for - // the last byte for each value - var last, valueBytes, value, b; - for(var i = 2; i < values.length; ++i) { - // produce value bytes in reverse because we don't know how many - // bytes it will take to store the value - last = true; - valueBytes = []; - value = parseInt(values[i], 10); - do { - b = value & 0x7F; - value = value >>> 7; - // if value is not last, then turn on 8th bit - if(!last) { - b |= 0x80; - } - valueBytes.push(b); - last = false; - } while(value > 0); - // add value bytes in reverse (needs to be in big endian) - for(var n = valueBytes.length - 1; n >= 0; --n) { - bytes.putByte(valueBytes[n]); + + + +const dht_get_createGet = configure(api => { + /** + * @type {import('../types').DHTAPI["get"]} + */ + async function * get (key, options = {}) { + const res = await api.post('dht/get', { + signal: options.signal, + searchParams: toUrlSearchParams({ + // arg: base36.encode(key), + arg: key instanceof Uint8Array ? dist_src_to_string_toString(key) : key.toString(), + ...options + }), + headers: options.headers + }) + + for await (const event of res.ndjson()) { + yield mapEvent(event) } } - return bytes; -}; + return get +}) -/** - * Converts a DER-encoded byte buffer to an OID dot-separated string. The - * byte buffer should contain only the DER-encoded value, not any tag or - * length bytes. - * - * @param bytes the byte buffer. - * - * @return the OID dot-separated string. - */ -asn1.derToOid = function(bytes) { - var oid; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dht/provide.js - // wrap in buffer if needed - if(typeof bytes === 'string') { - bytes = forge.util.createBuffer(bytes); - } - // first byte is 40 * value1 + value2 - var b = bytes.getByte(); - oid = Math.floor(b / 40) + '.' + (b % 40); - // other bytes are each value in base 128 with 8th bit set except for - // the last byte for each value - var value = 0; - while(bytes.length() > 0) { - b = bytes.getByte(); - value = value << 7; - // not the last byte for the value - if(b & 0x80) { - value += b & 0x7F; - } else { - // last byte - oid += '.' + (value + b); - value = 0; + +const createProvide = configure(api => { + /** + * @type {import('../types').DHTAPI["provide"]} + */ + async function * provide (cids, options = { recursive: false }) { + /** @type {import('../types').CID[]} */ + const cidArr = Array.isArray(cids) ? cids : [cids] + + const res = await api.post('dht/provide', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: cidArr.map(cid => cid.toString()), + ...options + }), + headers: options.headers + }) + + for await (const event of res.ndjson()) { + yield mapEvent(event) } } - return oid; -}; + return provide +}) -/** - * Converts a UTCTime value to a date. - * - * Note: GeneralizedTime has 4 digits for the year and is used for X.509 - * dates past 2049. Parsing that structure hasn't been implemented yet. - * - * @param utc the UTCTime value to convert. - * - * @return the date. - */ -asn1.utcTimeToDate = function(utc) { - /* The following formats can be used: +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dht/put.js - YYMMDDhhmmZ - YYMMDDhhmm+hh'mm' - YYMMDDhhmm-hh'mm' - YYMMDDhhmmssZ - YYMMDDhhmmss+hh'mm' - YYMMDDhhmmss-hh'mm' - Where: - YY is the least significant two digits of the year - MM is the month (01 to 12) - DD is the day (01 to 31) - hh is the hour (00 to 23) - mm are the minutes (00 to 59) - ss are the seconds (00 to 59) - Z indicates that local time is GMT, + indicates that local time is - later than GMT, and - indicates that local time is earlier than GMT - hh' is the absolute value of the offset from GMT in hours - mm' is the absolute value of the offset from GMT in minutes */ - var date = new Date(); - // if YY >= 50 use 19xx, if YY < 50 use 20xx - var year = parseInt(utc.substr(0, 2), 10); - year = (year >= 50) ? 1900 + year : 2000 + year; - var MM = parseInt(utc.substr(2, 2), 10) - 1; // use 0-11 for month - var DD = parseInt(utc.substr(4, 2), 10); - var hh = parseInt(utc.substr(6, 2), 10); - var mm = parseInt(utc.substr(8, 2), 10); - var ss = 0; - // not just YYMMDDhhmmZ - if(utc.length > 11) { - // get character after minutes - var c = utc.charAt(10); - var end = 10; - // see if seconds are present - if(c !== '+' && c !== '-') { - // get seconds - ss = parseInt(utc.substr(10, 2), 10); - end += 2; + +const dht_put_createPut = configure(api => { + /** + * @type {import('../types.js').DHTAPI["put"]} + */ + async function * put (key, value, options = {}) { + // allow aborting requests on body errors + const controller = new AbortController() + const signal = abortSignal(controller.signal, options.signal) + + const res = await api.post('dht/put', { + signal, + searchParams: toUrlSearchParams({ + arg: key instanceof Uint8Array ? dist_src_to_string_toString(key) : key.toString(), + ...options + }), + ...( + await multipart_request_multipartRequest([value], controller, options.headers) + ) + }) + + for await (const event of res.ndjson()) { + yield mapEvent(event) } } - // update date - date.setUTCFullYear(year, MM, DD); - date.setUTCHours(hh, mm, ss, 0); + return put +}) - if(end) { - // get +/- after end of time - c = utc.charAt(end); - if(c === '+' || c === '-') { - // get hours+minutes offset - var hhoffset = parseInt(utc.substr(end + 1, 2), 10); - var mmoffset = parseInt(utc.substr(end + 4, 2), 10); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dht/query.js - // calculate offset in milliseconds - var offset = hhoffset * 60 + mmoffset; - offset *= 60000; - // apply offset - if(c === '+') { - date.setTime(+date - offset); - } else { - date.setTime(+date + offset); - } + + +const createQuery = configure(api => { + /** + * @type {import('../types.js').DHTAPI["query"]} + */ + async function * query (peerId, options = {}) { + const res = await api.post('dht/query', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: peerId.toString(), + ...options + }), + headers: options.headers + }) + + for await (const event of res.ndjson()) { + yield mapEvent(event) } } - return date; -}; + return query +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dht/index.js + + + + + + /** - * Converts a GeneralizedTime value to a date. - * - * @param gentime the GeneralizedTime value to convert. - * - * @return the date. + * @param {import('../types').Options} config */ -asn1.generalizedTimeToDate = function(gentime) { - /* The following formats can be used: +function createDht (config) { + return { + findPeer: createFindPeer(config), + findProvs: createFindProvs(config), + get: dht_get_createGet(config), + provide: createProvide(config), + put: dht_put_createPut(config), + query: createQuery(config) + } +} - YYYYMMDDHHMMSS - YYYYMMDDHHMMSS.fff - YYYYMMDDHHMMSSZ - YYYYMMDDHHMMSS.fffZ - YYYYMMDDHHMMSS+hh'mm' - YYYYMMDDHHMMSS.fff+hh'mm' - YYYYMMDDHHMMSS-hh'mm' - YYYYMMDDHHMMSS.fff-hh'mm' +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/diag/cmds.js - Where: - YYYY is the year - MM is the month (01 to 12) - DD is the day (01 to 31) - hh is the hour (00 to 23) - mm are the minutes (00 to 59) - ss are the seconds (00 to 59) - .fff is the second fraction, accurate to three decimal places - Z indicates that local time is GMT, + indicates that local time is - later than GMT, and - indicates that local time is earlier than GMT - hh' is the absolute value of the offset from GMT in hours - mm' is the absolute value of the offset from GMT in minutes */ - var date = new Date(); - var YYYY = parseInt(gentime.substr(0, 4), 10); - var MM = parseInt(gentime.substr(4, 2), 10) - 1; // use 0-11 for month - var DD = parseInt(gentime.substr(6, 2), 10); - var hh = parseInt(gentime.substr(8, 2), 10); - var mm = parseInt(gentime.substr(10, 2), 10); - var ss = parseInt(gentime.substr(12, 2), 10); - var fff = 0; - var offset = 0; - var isUTC = false; +const createCmds = configure(api => { + /** + * @type {import('../types').DiagAPI["cmds"]} + */ + async function cmds (options = {}) { + const res = await api.post('diag/cmds', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) - if(gentime.charAt(gentime.length - 1) === 'Z') { - isUTC = true; + return res.json() } + return cmds +}) - var end = gentime.length - 5, c = gentime.charAt(end); - if(c === '+' || c === '-') { - // get hours+minutes offset - var hhoffset = parseInt(gentime.substr(end + 1, 2), 10); - var mmoffset = parseInt(gentime.substr(end + 4, 2), 10); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/diag/net.js - // calculate offset in milliseconds - offset = hhoffset * 60 + mmoffset; - offset *= 60000; - // apply offset - if(c === '+') { - offset *= -1; - } - isUTC = true; +const createNet = configure(api => { + /** + * @type {import('../types').DiagAPI["net"]} + */ + async function net (options = {}) { + const res = await api.post('diag/net', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + return res.json() } + return net +}) - // check for second fraction - if(gentime.charAt(14) === '.') { - fff = parseFloat(gentime.substr(14), 10) * 1000; - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/diag/sys.js - if(isUTC) { - date.setUTCFullYear(YYYY, MM, DD); - date.setUTCHours(hh, mm, ss, fff); - // apply offset - date.setTime(+date + offset); - } else { - date.setFullYear(YYYY, MM, DD); - date.setHours(hh, mm, ss, fff); + +const createSys = configure(api => { + /** + * @type {import('../types').DiagAPI["sys"]} + */ + async function sys (options = {}) { + const res = await api.post('diag/sys', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + + return res.json() } + return sys +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/diag/index.js + + - return date; -}; /** - * Converts a date to a UTCTime value. - * - * Note: GeneralizedTime has 4 digits for the year and is used for X.509 - * dates past 2049. Converting to a GeneralizedTime hasn't been - * implemented yet. - * - * @param date the date to convert. - * - * @return the UTCTime value. + * @param {import('../types').Options} config */ -asn1.dateToUtcTime = function(date) { - // TODO: validate; currently assumes proper format - if(typeof date === 'string') { - return date; +function createDiag (config) { + return { + cmds: createCmds(config), + net: createNet(config), + sys: createSys(config) } +} - var rval = ''; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/cp.js - // create format YYMMDDhhmmssZ - var format = []; - format.push(('' + date.getUTCFullYear()).substr(2)); - format.push('' + (date.getUTCMonth() + 1)); - format.push('' + date.getUTCDate()); - format.push('' + date.getUTCHours()); - format.push('' + date.getUTCMinutes()); - format.push('' + date.getUTCSeconds()); - // ensure 2 digits are used for each format entry - for(var i = 0; i < format.length; ++i) { - if(format[i].length < 2) { - rval += '0'; - } - rval += format[i]; - } - rval += 'Z'; - return rval; -}; -/** - * Converts a date to a GeneralizedTime value. - * - * @param date the date to convert. - * - * @return the GeneralizedTime value as a string. - */ -asn1.dateToGeneralizedTime = function(date) { - // TODO: validate; currently assumes proper format - if(typeof date === 'string') { - return date; +const createCp = configure(api => { + /** + * @type {import('../types').FilesAPI["cp"]} + */ + async function cp (sources, destination, options = {}) { + /** @type {import('../types').IPFSPath[]} */ + const sourceArr = Array.isArray(sources) ? sources : [sources] + + const res = await api.post('files/cp', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: sourceArr.concat(destination).map(src => node_modules_multiformats_src_cid_CID.asCID(src) ? `/ipfs/${src}` : src), + ...options + }), + headers: options.headers + }) + + await res.text() } + return cp +}) - var rval = ''; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/flush.js - // create format YYYYMMDDHHMMSSZ - var format = []; - format.push('' + date.getUTCFullYear()); - format.push('' + (date.getUTCMonth() + 1)); - format.push('' + date.getUTCDate()); - format.push('' + date.getUTCHours()); - format.push('' + date.getUTCMinutes()); - format.push('' + date.getUTCSeconds()); - // ensure 2 digits are used for each format entry - for(var i = 0; i < format.length; ++i) { - if(format[i].length < 2) { - rval += '0'; + + +const createFlush = configure(api => { + /** + * @type {import('../types').FilesAPI["flush"]} + */ + async function flush (path, options = {}) { + if (!path || typeof path !== 'string') { + throw new Error('ipfs.files.flush requires a path') } - rval += format[i]; + + const res = await api.post('files/flush', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }) + const data = await res.json() + + return node_modules_multiformats_src_cid_CID.parse(data.Cid) } - rval += 'Z'; + return flush +}) - return rval; -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/object-to-camel.js /** - * Converts a javascript integer to a DER-encoded byte buffer to be used - * as the value for an INTEGER type. - * - * @param x the integer. + * Convert object properties to camel case. + * NOT recursive! + * e.g. + * AgentVersion => agentVersion + * ID => id * - * @return the byte buffer. + * @param {Record} obj */ -asn1.integerToDer = function(x) { - var rval = forge.util.createBuffer(); - if(x >= -0x80 && x < 0x80) { - return rval.putSignedInt(x, 8); - } - if(x >= -0x8000 && x < 0x8000) { - return rval.putSignedInt(x, 16); - } - if(x >= -0x800000 && x < 0x800000) { - return rval.putSignedInt(x, 24); - } - if(x >= -0x80000000 && x < 0x80000000) { - return rval.putSignedInt(x, 32); +function objectToCamel (obj) { + if (obj == null) { + return obj } - var error = new Error('Integer too large; max is 32-bits.'); - error.integer = x; - throw error; -}; + + const caps = /^[A-Z]+$/ + + /** @type {Record} */ + const output = {} + + return Object.keys(obj).reduce((camelObj, k) => { + if (caps.test(k)) { // all caps + camelObj[k.toLowerCase()] = obj[k] + } else if (caps.test(k[0])) { // pascal + camelObj[k[0].toLowerCase() + k.slice(1)] = obj[k] + } else { + camelObj[k] = obj[k] + } + return camelObj + }, output) +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/object-to-camel-with-metadata.js + /** - * Converts a DER-encoded byte buffer to a javascript integer. This is - * typically used to decode the value of an INTEGER type. - * - * @param bytes the byte buffer. - * - * @return the integer. + * @param {Record} entry */ -asn1.derToInteger = function(bytes) { - // wrap in buffer if needed - if(typeof bytes === 'string') { - bytes = forge.util.createBuffer(bytes); +function objectToCamelWithMetadata (entry) { + const file = objectToCamel(entry) + + if (Object.prototype.hasOwnProperty.call(file, 'mode')) { + file.mode = parseInt(file.mode, 8) } - var n = bytes.length() * 8; - if(n > 32) { - throw new Error('Integer too large; max is 32-bits.'); + if (Object.prototype.hasOwnProperty.call(file, 'mtime')) { + file.mtime = { + secs: file.mtime, + nsecs: file.mtimeNsecs || 0 + } + + delete file.mtimeNsecs } - return bytes.getSignedInt(n); -}; -/** - * Validates that the given ASN.1 object is at least a super set of the - * given ASN.1 structure. Only tag classes and types are checked. An - * optional map may also be provided to capture ASN.1 values while the - * structure is checked. - * - * To capture an ASN.1 value, set an object in the validator's 'capture' - * parameter to the key to use in the capture map. To capture the full - * ASN.1 object, specify 'captureAsn1'. To capture BIT STRING bytes, including - * the leading unused bits counter byte, specify 'captureBitStringContents'. - * To capture BIT STRING bytes, without the leading unused bits counter byte, - * specify 'captureBitStringValue'. - * - * Objects in the validator may set a field 'optional' to true to indicate - * that it isn't necessary to pass validation. - * - * @param obj the ASN.1 object to validate. - * @param v the ASN.1 structure validator. - * @param capture an optional map to capture values in. - * @param errors an optional array for storing validation errors. - * - * @return true on success, false on failure. - */ -asn1.validate = function(obj, v, capture, errors) { - var rval = false; + return file +} - // ensure tag class and type are the same if specified - if((obj.tagClass === v.tagClass || typeof(v.tagClass) === 'undefined') && - (obj.type === v.type || typeof(v.type) === 'undefined')) { - // ensure constructed flag is the same if specified - if(obj.constructed === v.constructed || - typeof(v.constructed) === 'undefined') { - rval = true; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/ls.js - // handle sub values - if(v.value && forge.util.isArray(v.value)) { - var j = 0; - for(var i = 0; rval && i < v.value.length; ++i) { - rval = v.value[i].optional || false; - if(obj.value[j]) { - rval = asn1.validate(obj.value[j], v.value[i], capture, errors); - if(rval) { - ++j; - } else if(v.value[i].optional) { - rval = true; - } - } - if(!rval && errors) { - errors.push( - '[' + v.name + '] ' + - 'Tag class "' + v.tagClass + '", type "' + - v.type + '" expected value length "' + - v.value.length + '", got "' + - obj.value.length + '"'); - } - } - } - if(rval && capture) { - if(v.capture) { - capture[v.capture] = obj.value; - } - if(v.captureAsn1) { - capture[v.captureAsn1] = obj; - } - if(v.captureBitStringContents && 'bitStringContents' in obj) { - capture[v.captureBitStringContents] = obj.bitStringContents; - } - if(v.captureBitStringValue && 'bitStringContents' in obj) { - var value; - if(obj.bitStringContents.length < 2) { - capture[v.captureBitStringValue] = ''; - } else { - // FIXME: support unused bits with data shifting - var unused = obj.bitStringContents.charCodeAt(0); - if(unused !== 0) { - throw new Error( - 'captureBitStringValue only supported for zero unused bits'); - } - capture[v.captureBitStringValue] = obj.bitStringContents.slice(1); - } + + + +const createLs = configure(api => { + /** + * @type {import('../types').FilesAPI["ls"]} + */ + async function * ls (path, options = {}) { + if (!path) { + throw new Error('ipfs.files.ls requires a path') + } + + const res = await api.post('files/ls', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: node_modules_multiformats_src_cid_CID.asCID(path) ? `/ipfs/${path}` : path, + // default long to true, diverges from go-ipfs where its false by default + long: true, + ...options, + stream: true + }), + headers: options.headers + }) + + for await (const result of res.ndjson()) { + // go-ipfs does not yet support the "stream" option + if ('Entries' in result) { + for (const entry of result.Entries || []) { + yield ls_toCoreInterface(objectToCamelWithMetadata(entry)) } + } else { + yield ls_toCoreInterface(objectToCamelWithMetadata(result)) } - } else if(errors) { - errors.push( - '[' + v.name + '] ' + - 'Expected constructed "' + v.constructed + '", got "' + - obj.constructed + '"'); - } - } else if(errors) { - if(obj.tagClass !== v.tagClass) { - errors.push( - '[' + v.name + '] ' + - 'Expected tag class "' + v.tagClass + '", got "' + - obj.tagClass + '"'); - } - if(obj.type !== v.type) { - errors.push( - '[' + v.name + '] ' + - 'Expected type "' + v.type + '", got "' + obj.type + '"'); } } - return rval; -}; - -// regex for testing for non-latin characters -var _nonLatinRegex = /[^\\u0000-\\u00ff]/; + return ls +}) /** - * Pretty prints an ASN.1 object to a string. - * - * @param obj the object to write out. - * @param level the level in the tree. - * @param indentation the indentation to use. - * - * @return the string. + * @param {*} entry */ -asn1.prettyPrint = function(obj, level, indentation) { - var rval = ''; +function ls_toCoreInterface (entry) { + if (entry.hash) { + entry.cid = node_modules_multiformats_src_cid_CID.parse(entry.hash) + } - // set default level and indentation - level = level || 0; - indentation = indentation || 2; + delete entry.hash - // start new line for deep levels - if(level > 0) { - rval += '\n'; + entry.type = entry.type === 1 ? 'directory' : 'file' + + return entry +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/mkdir.js + + + +const createMkdir = configure(api => { + /** + * @type {import('../types').FilesAPI["mkdir"]} + */ + async function mkdir (path, options = {}) { + const res = await api.post('files/mkdir', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }) + + await res.text() } + return mkdir +}) - // create indent - var indent = ''; - for(var i = 0; i < level * indentation; ++i) { - indent += ' '; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/mv.js + + + +const createMv = configure(api => { + /** + * @type {import('../types').FilesAPI["mv"]} + */ + async function mv (sources, destination, options = {}) { + if (!Array.isArray(sources)) { + sources = [sources] + } + + const res = await api.post('files/mv', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: sources.concat(destination), + ...options + }), + headers: options.headers + }) + await res.text() } - // print class:type - rval += indent + 'Tag: '; - switch(obj.tagClass) { - case asn1.Class.UNIVERSAL: - rval += 'Universal:'; - break; - case asn1.Class.APPLICATION: - rval += 'Application:'; - break; - case asn1.Class.CONTEXT_SPECIFIC: - rval += 'Context-Specific:'; - break; - case asn1.Class.PRIVATE: - rval += 'Private:'; - break; + return mv +}) + +// EXTERNAL MODULE: ./node_modules/stream-to-it/source.js +var source = __nccwpck_require__(6581); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/read.js + + +// @ts-expect-error no types + + +const createRead = configure(api => { + /** + * @type {import('../types').FilesAPI["read"]} + */ + async function * read (path, options = {}) { + const res = await api.post('files/read', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: path, + count: options.length, + ...options + }), + headers: options.headers + }) + + yield * source(res.body) } + return read +}) - if(obj.tagClass === asn1.Class.UNIVERSAL) { - rval += obj.type; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/rm.js - // known types - switch(obj.type) { - case asn1.Type.NONE: - rval += ' (None)'; - break; - case asn1.Type.BOOLEAN: - rval += ' (Boolean)'; - break; - case asn1.Type.INTEGER: - rval += ' (Integer)'; - break; - case asn1.Type.BITSTRING: - rval += ' (Bit string)'; - break; - case asn1.Type.OCTETSTRING: - rval += ' (Octet string)'; - break; - case asn1.Type.NULL: - rval += ' (Null)'; - break; - case asn1.Type.OID: - rval += ' (Object Identifier)'; - break; - case asn1.Type.ODESC: - rval += ' (Object Descriptor)'; - break; - case asn1.Type.EXTERNAL: - rval += ' (External or Instance of)'; - break; - case asn1.Type.REAL: - rval += ' (Real)'; - break; - case asn1.Type.ENUMERATED: - rval += ' (Enumerated)'; - break; - case asn1.Type.EMBEDDED: - rval += ' (Embedded PDV)'; - break; - case asn1.Type.UTF8: - rval += ' (UTF8)'; - break; - case asn1.Type.ROID: - rval += ' (Relative Object Identifier)'; - break; - case asn1.Type.SEQUENCE: - rval += ' (Sequence)'; - break; - case asn1.Type.SET: - rval += ' (Set)'; - break; - case asn1.Type.PRINTABLESTRING: - rval += ' (Printable String)'; - break; - case asn1.Type.IA5String: - rval += ' (IA5String (ASCII))'; - break; - case asn1.Type.UTCTIME: - rval += ' (UTC time)'; - break; - case asn1.Type.GENERALIZEDTIME: - rval += ' (Generalized time)'; - break; - case asn1.Type.BMPSTRING: - rval += ' (BMP String)'; - break; + + + +const files_rm_createRm = configure(api => { + /** + * @type {import('../types').FilesAPI["rm"]} + */ + async function rm (path, options = {}) { + const res = await api.post('files/rm', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }) + + const body = await res.text() + // we don't expect text body to be ever present + // (if so, it means an error such as https://github.com/ipfs/go-ipfs/issues/8606) + if (body !== '') { + /** @type {Error} */ + const error = new http.HTTPError(res) + error.message = body + throw error } - } else { - rval += obj.type; } + return rm +}) - rval += '\n'; - rval += indent + 'Constructed: ' + obj.constructed + '\n'; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/stat.js - if(obj.composed) { - var subvalues = 0; - var sub = ''; - for(var i = 0; i < obj.value.length; ++i) { - if(obj.value[i] !== undefined) { - subvalues += 1; - sub += asn1.prettyPrint(obj.value[i], level + 1, indentation); - if((i + 1) < obj.value.length) { - sub += ','; - } - } - } - rval += indent + 'Sub values: ' + subvalues + sub; - } else { - rval += indent + 'Value: '; - if(obj.type === asn1.Type.OID) { - var oid = asn1.derToOid(obj.value); - rval += oid; - if(forge.pki && forge.pki.oids) { - if(oid in forge.pki.oids) { - rval += ' (' + forge.pki.oids[oid] + ') '; - } - } - } - if(obj.type === asn1.Type.INTEGER) { - try { - rval += asn1.derToInteger(obj.value); - } catch(ex) { - rval += '0x' + forge.util.bytesToHex(obj.value); - } - } else if(obj.type === asn1.Type.BITSTRING) { - // TODO: shift bits as needed to display without padding - if(obj.value.length > 1) { - // remove unused bits field - rval += '0x' + forge.util.bytesToHex(obj.value.slice(1)); - } else { - rval += '(none)'; - } - // show unused bit count - if(obj.value.length > 0) { - var unused = obj.value.charCodeAt(0); - if(unused == 1) { - rval += ' (1 unused bit shown)'; - } else if(unused > 1) { - rval += ' (' + unused + ' unused bits shown)'; - } - } - } else if(obj.type === asn1.Type.OCTETSTRING) { - if(!_nonLatinRegex.test(obj.value)) { - rval += '(' + obj.value + ') '; - } - rval += '0x' + forge.util.bytesToHex(obj.value); - } else if(obj.type === asn1.Type.UTF8) { - try { - rval += forge.util.decodeUtf8(obj.value); - } catch(e) { - if(e.message === 'URI malformed') { - rval += - '0x' + forge.util.bytesToHex(obj.value) + ' (malformed UTF8)'; - } else { - throw e; - } - } - } else if(obj.type === asn1.Type.PRINTABLESTRING || - obj.type === asn1.Type.IA5String) { - rval += obj.value; - } else if(_nonLatinRegex.test(obj.value)) { - rval += '0x' + forge.util.bytesToHex(obj.value); - } else if(obj.value.length === 0) { - rval += '[null]'; - } else { - rval += obj.value; - } + + + + +const files_stat_createStat = configure(api => { + /** + * @type {import('../types').FilesAPI["stat"]} + */ + async function stat (path, options = {}) { + const res = await api.post('files/stat', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }) + const data = await res.json() + + data.WithLocality = data.WithLocality || false + return stat_toCoreInterface(objectToCamelWithMetadata(data)) + } + return stat +}) + +/** + * @param {*} entry + */ +function stat_toCoreInterface (entry) { + entry.cid = node_modules_multiformats_src_cid_CID.parse(entry.hash) + delete entry.hash + return entry +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/write.js + + + + + + + +const createWrite = configure(api => { + /** + * @type {import('../types').FilesAPI["write"]} + */ + async function write (path, input, options = {}) { + // allow aborting requests on body errors + const controller = new AbortController() + const signal = abortSignal(controller.signal, options.signal) + + const res = await api.post('files/write', { + signal, + searchParams: toUrlSearchParams({ + arg: path, + streamChannels: true, + count: options.length, + ...options + }), + ...( + await multipart_request_multipartRequest([{ + content: input, + path: 'arg', + mode: modeToString(options.mode), + mtime: parseMtime(options.mtime) + }], controller, options.headers) + ) + }) + + await res.text() } + return write +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/files/index.js + + + - return rval; -}; -/***/ }), -/***/ 12390: -/***/ ((module) => { -/** - * Base-N/Base-X encoding/decoding functions. - * - * Original implementation from base-x: - * https://github.com/cryptocoinjs/base-x - * - * Which is MIT licensed: - * - * The MIT License (MIT) - * - * Copyright base-x contributors (c) 2016 - * - * 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. - */ -var api = {}; -module.exports = api; -// baseN alphabet indexes -var _reverseAlphabets = {}; /** - * BaseN-encodes a Uint8Array using the given alphabet. - * - * @param input the Uint8Array to encode. - * @param maxline the maximum number of encoded characters per line to use, - * defaults to none. - * - * @return the baseN-encoded output string. + * @param {import('../types').Options} config */ -api.encode = function(input, alphabet, maxline) { - if(typeof alphabet !== 'string') { - throw new TypeError('"alphabet" must be a string.'); - } - if(maxline !== undefined && typeof maxline !== 'number') { - throw new TypeError('"maxline" must be a number.'); +function createFiles (config) { + return { + cp: createCp(config), + flush: createFlush(config), + ls: createLs(config), + mkdir: createMkdir(config), + mv: createMv(config), + read: createRead(config), + rm: files_rm_createRm(config), + stat: files_stat_createStat(config), + write: createWrite(config) } +} - var output = ''; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/key/export.js - if(!(input instanceof Uint8Array)) { - // assume forge byte buffer - output = _encodeWithByteBuffer(input, alphabet); - } else { - var i = 0; - var base = alphabet.length; - var first = alphabet.charAt(0); - var digits = [0]; - for(i = 0; i < input.length; ++i) { - for(var j = 0, carry = input[i]; j < digits.length; ++j) { - carry += digits[j] << 8; - digits[j] = carry % base; - carry = (carry / base) | 0; - } - while(carry > 0) { - digits.push(carry % base); - carry = (carry / base) | 0; - } - } - // deal with leading zeros - for(i = 0; input[i] === 0 && i < input.length - 1; ++i) { - output += first; - } - // convert digits to a string - for(i = digits.length - 1; i >= 0; --i) { - output += alphabet[digits[i]]; - } +const export_createExport = configure(api => { + /** + * @type {import('./types.js').KeyAPI['export']} + */ + const exportKey = async (name, password, options = {}) => { + throw err_code(new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED') } - if(maxline) { - var regex = new RegExp('.{1,' + maxline + '}', 'g'); - output = output.match(regex).join('\r\n'); - } + return exportKey +}) - return output; -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/key/gen.js -/** - * Decodes a baseN-encoded (using the given alphabet) string to a - * Uint8Array. - * - * @param input the baseN-encoded input string. - * - * @return the Uint8Array. - */ -api.decode = function(input, alphabet) { - if(typeof input !== 'string') { - throw new TypeError('"input" must be a string.'); + + + +/** @type {import('./types.js').GenOptions} */ +const defaultOptions = { + type: 'ed25519' +} + +const createGen = configure(api => { + /** + * @type {import('./types.js').KeyAPI['gen']} + */ + async function gen (name, options = defaultOptions) { + const res = await api.post('key/gen', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: name, + ...options + }), + headers: options.headers + }) + const data = await res.json() + + // @ts-expect-error server output is not typed + return objectToCamel(data) } - if(typeof alphabet !== 'string') { - throw new TypeError('"alphabet" must be a string.'); + return gen +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/key/import.js + + + + +const import_createImport = configure(api => { + /** + * @type {import('./types.js').KeyAPI['import']} + */ + async function importKey (name, pem, password, options = {}) { + const res = await api.post('key/import', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: name, + pem, + password, + ...options + }), + headers: options.headers + }) + const data = await res.json() + + // @ts-expect-error server output is not typed + return objectToCamel(data) } + return importKey +}) - var table = _reverseAlphabets[alphabet]; - if(!table) { - // compute reverse alphabet - table = _reverseAlphabets[alphabet] = []; - for(var i = 0; i < alphabet.length; ++i) { - table[alphabet.charCodeAt(i)] = i; - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/key/list.js + + + + +const list_createList = configure(api => { + /** + * @type {import('../types.js').KeyAPI["list"]} + */ + async function list (options = {}) { + const res = await api.post('key/list', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + const data = await res.json() + + return (data.Keys || []).map((/** @type {any} **/ k) => objectToCamel(k)) } + return list +}) - // remove whitespace characters - input = input.replace(/\s/g, ''); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/key/rename.js - var base = alphabet.length; - var first = alphabet.charAt(0); - var bytes = [0]; - for(var i = 0; i < input.length; i++) { - var value = table[input.charCodeAt(i)]; - if(value === undefined) { - return; - } - for(var j = 0, carry = value; j < bytes.length; ++j) { - carry += bytes[j] * base; - bytes[j] = carry & 0xff; - carry >>= 8; - } - while(carry > 0) { - bytes.push(carry & 0xff); - carry >>= 8; - } + +const createRename = configure(api => { + /** + * @type {import('./types.js').KeyAPI['rename']} + */ + async function rename (oldName, newName, options = {}) { + const res = await api.post('key/rename', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: [ + oldName, + newName + ], + ...options + }), + headers: options.headers + }) + + // @ts-expect-error server output is not typed + return objectToCamel(await res.json()) } + return rename +}) - // deal with leading zeros - for(var k = 0; input[k] === first && k < input.length - 1; ++k) { - bytes.push(0); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/key/rm.js + + + + +const key_rm_createRm = configure(api => { + /** + * @type {import('../types').KeyAPI["rm"]} + */ + async function rm (name, options = {}) { + const res = await api.post('key/rm', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: name, + ...options + }), + headers: options.headers + }) + const data = await res.json() + + // @ts-expect-error server output is not typed + return objectToCamel(data.Keys[0]) } + return rm +}) - if(typeof Buffer !== 'undefined') { - return Buffer.from(bytes.reverse()); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/key/index.js + + + + + + + +/** + * @param {import('../types.js').Options} config + * @returns {import('./types.js').KeyAPI} + */ +function createKey (config) { + return { + export: export_createExport(config), + gen: createGen(config), + import: import_createImport(config), + list: list_createList(config), + rename: createRename(config), + rm: key_rm_createRm(config) } +} - return new Uint8Array(bytes.reverse()); -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/log/level.js -function _encodeWithByteBuffer(input, alphabet) { - var i = 0; - var base = alphabet.length; - var first = alphabet.charAt(0); - var digits = [0]; - for(i = 0; i < input.length(); ++i) { - for(var j = 0, carry = input.at(i); j < digits.length; ++j) { - carry += digits[j] << 8; - digits[j] = carry % base; - carry = (carry / base) | 0; - } - while(carry > 0) { - digits.push(carry % base); - carry = (carry / base) | 0; - } + + +const createLevel = configure(api => { + /** + * @type {import('../types').LogAPI["level"]} + */ + async function level (subsystem, level, options = {}) { + const res = await api.post('log/level', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: [ + subsystem, + level + ], + ...options + }), + headers: options.headers + }) + + return objectToCamel(await res.json()) } + return level +}) - var output = ''; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/log/ls.js - // deal with leading zeros - for(i = 0; input.at(i) === 0 && i < input.length() - 1; ++i) { - output += first; + + +const ls_createLs = configure(api => { + /** + * @type {import('../types').LogAPI["ls"]} + */ + async function ls (options = {}) { + const res = await api.post('log/ls', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + + const data = await res.json() + return data.Strings } - // convert digits to a string - for(i = digits.length - 1; i >= 0; --i) { - output += alphabet[digits[i]]; + return ls +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/log/tail.js + + + +const createTail = configure(api => { + /** + * @type {import('../types').LogAPI["tail"]} + */ + async function * tail (options = {}) { + const res = await api.post('log/tail', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + + yield * res.ndjson() } + return tail +}) - return output; -} +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/log/index.js -/***/ }), -/***/ 27883: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /** - * Cipher base API. - * - * @author Dave Longley - * - * Copyright (c) 2010-2014 Digital Bazaar, Inc. + * @param {import('../types').Options} config */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(36536); +function createLog (config) { + return { + level: createLevel(config), + ls: ls_createLs(config), + tail: createTail(config) + } +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/name/publish.js + -module.exports = forge.cipher = forge.cipher || {}; -// registered algorithms -forge.cipher.algorithms = forge.cipher.algorithms || {}; /** - * Creates a cipher object that can be used to encrypt data using the given - * algorithm and key. The algorithm may be provided as a string value for a - * previously registered algorithm or it may be given as a cipher algorithm - * API object. - * - * @param algorithm the algorithm to use, either a string or an algorithm API - * object. - * @param key the key to use, as a binary-encoded string of bytes or a - * byte buffer. - * - * @return the cipher. + * @param {import('../types').Options} config + * @returns {import('../types').IPFS['publish']} */ -forge.cipher.createCipher = function(algorithm, key) { - var api = algorithm; - if(typeof api === 'string') { - api = forge.cipher.getAlgorithm(api); - if(api) { - api = api(); - } - } - if(!api) { - throw new Error('Unsupported algorithm: ' + algorithm); +const createPublish = configure(api => { + /** + * @type {import('../types.js').NameAPI["publish"]} + */ + async function publish (path, options = {}) { + const res = await api.post('name/publish', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: `${path}`, + ...options + }), + headers: options.headers + }) + + // @ts-expect-error server output is not typed + return objectToCamel(await res.json()) } + return publish +}) - // assume block cipher - return new forge.cipher.BlockCipher({ - algorithm: api, - key: key, - decrypt: false - }); -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/name/resolve.js -/** - * Creates a decipher object that can be used to decrypt data using the given - * algorithm and key. The algorithm may be provided as a string value for a - * previously registered algorithm or it may be given as a cipher algorithm - * API object. - * - * @param algorithm the algorithm to use, either a string or an algorithm API - * object. - * @param key the key to use, as a binary-encoded string of bytes or a - * byte buffer. - * - * @return the cipher. - */ -forge.cipher.createDecipher = function(algorithm, key) { - var api = algorithm; - if(typeof api === 'string') { - api = forge.cipher.getAlgorithm(api); - if(api) { - api = api(); + + +const resolve_createResolve = configure(api => { + /** + * @type {import('../types').NameAPI["resolve"]} + */ + async function * resolve (path, options = {}) { + const res = await api.post('name/resolve', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: path, + stream: true, + ...options + }), + headers: options.headers + }) + + for await (const result of res.ndjson()) { + yield result.Path } } - if(!api) { - throw new Error('Unsupported algorithm: ' + algorithm); - } + return resolve +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/name/pubsub/cancel.js + - // assume block cipher - return new forge.cipher.BlockCipher({ - algorithm: api, - key: key, - decrypt: true - }); -}; -/** - * Registers an algorithm by name. If the name was already registered, the - * algorithm API object will be overwritten. - * - * @param name the name of the algorithm. - * @param algorithm the algorithm API object. - */ -forge.cipher.registerAlgorithm = function(name, algorithm) { - name = name.toUpperCase(); - forge.cipher.algorithms[name] = algorithm; -}; /** - * Gets a registered algorithm by name. - * - * @param name the name of the algorithm. - * - * @return the algorithm, if found, null if not. + * @param {import('../../types').Options} config + * @returns {import('../../types').NamePubsubAPI["cancel"]} */ -forge.cipher.getAlgorithm = function(name) { - name = name.toUpperCase(); - if(name in forge.cipher.algorithms) { - return forge.cipher.algorithms[name]; +const createCancel = configure(api => { + /** + * @type {import('../../types').NamePubsubAPI["cancel"]} + */ + async function cancel (name, options = {}) { + const res = await api.post('name/pubsub/cancel', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: name, + ...options + }), + headers: options.headers + }) + + // @ts-expect-error server output is not typed + return objectToCamel(await res.json()) } - return null; -}; + return cancel +}) -var BlockCipher = forge.cipher.BlockCipher = function(options) { - this.algorithm = options.algorithm; - this.mode = this.algorithm.mode; - this.blockSize = this.mode.blockSize; - this._finish = false; - this._input = null; - this.output = null; - this._op = options.decrypt ? this.mode.decrypt : this.mode.encrypt; - this._decrypt = options.decrypt; - this.algorithm.initialize(options); -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/name/pubsub/state.js -/** - * Starts or restarts the encryption or decryption process, whichever - * was previously configured. - * - * For non-GCM mode, the IV may be a binary-encoded string of bytes, an array - * of bytes, a byte buffer, or an array of 32-bit integers. If the IV is in - * bytes, then it must be Nb (16) bytes in length. If the IV is given in as - * 32-bit integers, then it must be 4 integers long. - * - * Note: an IV is not required or used in ECB mode. - * - * For GCM-mode, the IV must be given as a binary-encoded string of bytes or - * a byte buffer. The number of bytes should be 12 (96 bits) as recommended - * by NIST SP-800-38D but another length may be given. - * - * @param options the options to use: - * iv the initialization vector to use as a binary-encoded string of - * bytes, null to reuse the last ciphered block from a previous - * update() (this "residue" method is for legacy support only). - * additionalData additional authentication data as a binary-encoded - * string of bytes, for 'GCM' mode, (default: none). - * tagLength desired length of authentication tag, in bits, for - * 'GCM' mode (0-128, default: 128). - * tag the authentication tag to check if decrypting, as a - * binary-encoded string of bytes. - * output the output the buffer to write to, null to create one. - */ -BlockCipher.prototype.start = function(options) { - options = options || {}; - var opts = {}; - for(var key in options) { - opts[key] = options[key]; + + + +const createState = configure(api => { + /** + * @type {import('../../types').NamePubsubAPI["state"]} + */ + async function state (options = {}) { + const res = await api.post('name/pubsub/state', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + + // @ts-expect-error server output is not typed + return objectToCamel(await res.json()) } - opts.decrypt = this._decrypt; - this._finish = false; - this._input = forge.util.createBuffer(); - this.output = options.output || forge.util.createBuffer(); - this.mode.start(opts); -}; + return state +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/name/pubsub/subs.js + + + +const createSubs = configure(api => { + /** + * @type {import('../../types').NamePubsubAPI["subs"]} + */ + async function subs (options = {}) { + const res = await api.post('name/pubsub/subs', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + const data = await res.json() + + return data.Strings || [] + } + return subs +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/name/pubsub/index.js + + + /** - * Updates the next block according to the cipher mode. - * - * @param input the buffer to read from. + * @param {import('../../types').Options} config + * @returns {import('../../types').NamePubsubAPI} */ -BlockCipher.prototype.update = function(input) { - if(input) { - // input given, so empty it into the input buffer - this._input.putBuffer(input); +function createPubsub (config) { + return { + cancel: createCancel(config), + state: createState(config), + subs: createSubs(config) } +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/name/index.js + - // do cipher operation until it needs more input and not finished - while(!this._op.call(this.mode, this._input, this.output, this._finish) && - !this._finish) {} - // free consumed memory from input buffer - this._input.compact(); -}; /** - * Finishes encrypting or decrypting. - * - * @param pad a padding function to use in CBC mode, null for default, - * signature(blockSize, buffer, decrypt). - * - * @return true if successful, false on error. + * @param {import('../types').Options} config + * @returns {import('../types').IPFS['name']} */ -BlockCipher.prototype.finish = function(pad) { - // backwards-compatibility w/deprecated padding API - // Note: will overwrite padding functions even after another start() call - if(pad && (this.mode.name === 'ECB' || this.mode.name === 'CBC')) { - this.mode.pad = function(input) { - return pad(this.blockSize, input, false); - }; - this.mode.unpad = function(output) { - return pad(this.blockSize, output, true); - }; +function createName (config) { + return { + publish: createPublish(config), + resolve: resolve_createResolve(config), + pubsub: createPubsub(config) } +} - // build options for padding and afterFinish functions - var options = {}; - options.decrypt = this._decrypt; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/data.js - // get # of bytes that won't fill a block - options.overflow = this._input.length() % this.blockSize; - if(!this._decrypt && this.mode.pad) { - if(!this.mode.pad(this._input, options)) { - return false; - } + + +const createData = configure(api => { + /** + * @type {import('../types').ObjectAPI["data"]} + */ + async function data (cid, options = {}) { + const res = await api.post('object/data', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: `${cid instanceof Uint8Array ? node_modules_multiformats_src_cid_CID.decode(cid) : cid}`, + ...options + }), + headers: options.headers + }) + const data = await res.arrayBuffer() + + return new Uint8Array(data, 0, data.byteLength) } + return data +}) - // do final update - this._finish = true; - this.update(); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/get.js - if(this._decrypt && this.mode.unpad) { - if(!this.mode.unpad(this.output, options)) { - return false; + + + + +const object_get_createGet = configure(api => { + /** + * @type {import('../types').ObjectAPI["get"]} + */ + async function get (cid, options = {}) { + const res = await api.post('object/get', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: `${cid instanceof Uint8Array ? node_modules_multiformats_src_cid_CID.decode(cid) : cid}`, + dataEncoding: 'base64', + ...options + }), + headers: options.headers + }) + const data = await res.json() + + return { + Data: dist_src_from_string_fromString(data.Data, 'base64pad'), + Links: (data.Links || []).map((/** @type {any} */ link) => ({ + Name: link.Name, + Hash: node_modules_multiformats_src_cid_CID.parse(link.Hash), + Tsize: link.Size + })) } } + return get +}) - if(this.mode.afterFinish) { - if(!this.mode.afterFinish(this.output, options)) { - return false; - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/links.js + + + + +const createLinks = configure(api => { + /** + * @type {import('../types').ObjectAPI["links"]} + */ + async function links (cid, options = {}) { + const res = await api.post('object/links', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: `${cid instanceof Uint8Array ? node_modules_multiformats_src_cid_CID.decode(cid) : cid}`, + ...options + }), + headers: options.headers + }) + const data = await res.json() + + return (data.Links || []).map((/** @type {any} */ l) => ({ + Name: l.Name, + Tsize: l.Size, + Hash: node_modules_multiformats_src_cid_CID.parse(l.Hash) + })) } + return links +}) - return true; -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/new.js -/***/ }), -/***/ 70857: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const createNew = configure(api => { + /** + * @type {import('../types').ObjectAPI["new"]} + */ + async function newObject (options = {}) { + const res = await api.post('object/new', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: options.template, + ...options + }), + headers: options.headers + }) + + const { Hash } = await res.json() + + return node_modules_multiformats_src_cid_CID.parse(Hash) + } + return newObject +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/put.js + + /** - * Supported cipher modes. - * - * @author Dave Longley - * - * Copyright (c) 2010-2014 Digital Bazaar, Inc. + * @param {import('../types').Multicodecs} codecs + * @param {import('../types').Options} options */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(36536); +const object_put_createPut = (codecs, options) => { + const fn = configure((api) => { + const dagPut = put_createPut(codecs, options) -forge.cipher = forge.cipher || {}; + /** + * @type {import('../types').ObjectAPI["put"]} + */ + async function put (obj, options = {}) { + return dagPut(obj, { + ...options, + storeCodec: 'dag-pb', + hashAlg: 'sha2-256', + version: 1 + }) + } + return put + }) -// supported cipher modes -var modes = module.exports = forge.cipher.modes = forge.cipher.modes || {}; + return fn(options) +} -/** Electronic codebook (ECB) (Don't use this; it's not secure) **/ +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/stat.js -modes.ecb = function(options) { - options = options || {}; - this.name = 'ECB'; - this.cipher = options.cipher; - this.blockSize = options.blockSize || 16; - this._ints = this.blockSize / 4; - this._inBlock = new Array(this._ints); - this._outBlock = new Array(this._ints); -}; -modes.ecb.prototype.start = function(options) {}; -modes.ecb.prototype.encrypt = function(input, output, finish) { - // not enough input to encrypt - if(input.length() < this.blockSize && !(finish && input.length() > 0)) { - return true; - } - // get next block - for(var i = 0; i < this._ints; ++i) { - this._inBlock[i] = input.getInt32(); - } +const object_stat_createStat = configure(api => { + /** + * @type {import('../types.js').ObjectAPI["stat"]} + */ + async function stat (cid, options = {}) { + const res = await api.post('object/stat', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: `${cid}`, + ...options + }), + headers: options.headers + }) - // encrypt block - this.cipher.encrypt(this._inBlock, this._outBlock); + const output = await res.json() - // write output - for(var i = 0; i < this._ints; ++i) { - output.putInt32(this._outBlock[i]); + return { + ...output, + Hash: node_modules_multiformats_src_cid_CID.parse(output.Hash) + } } -}; + return stat +}) -modes.ecb.prototype.decrypt = function(input, output, finish) { - // not enough input to decrypt - if(input.length() < this.blockSize && !(finish && input.length() > 0)) { - return true; - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/patch/add-link.js - // get next block - for(var i = 0; i < this._ints; ++i) { - this._inBlock[i] = input.getInt32(); - } - // decrypt block - this.cipher.decrypt(this._inBlock, this._outBlock); - // write output - for(var i = 0; i < this._ints; ++i) { - output.putInt32(this._outBlock[i]); - } -}; -modes.ecb.prototype.pad = function(input, options) { - // add PKCS#7 padding to block (each pad byte is the - // value of the number of pad bytes) - var padding = (input.length() === this.blockSize ? - this.blockSize : (this.blockSize - input.length())); - input.fillWithByte(padding, padding); - return true; -}; +const createAddLink = configure(api => { + /** + * @type {import('../../types').ObjectPatchAPI["addLink"]} + */ + async function addLink (cid, dLink, options = {}) { + const res = await api.post('object/patch/add-link', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: [ + `${cid}`, + // @ts-expect-error loose types + dLink.Name || dLink.name || '', + // @ts-expect-error loose types + (dLink.Hash || dLink.cid || '').toString() || null + ], + ...options + }), + headers: options.headers + }) -modes.ecb.prototype.unpad = function(output, options) { - // check for error: input data not a multiple of blockSize - if(options.overflow > 0) { - return false; - } + const { Hash } = await res.json() - // ensure padding byte count is valid - var len = output.length(); - var count = output.at(len - 1); - if(count > (this.blockSize << 2)) { - return false; + return node_modules_multiformats_src_cid_CID.parse(Hash) } - // trim off padding bytes - output.truncate(count); - return true; -}; + return addLink +}) -/** Cipher-block Chaining (CBC) **/ +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/patch/append-data.js -modes.cbc = function(options) { - options = options || {}; - this.name = 'CBC'; - this.cipher = options.cipher; - this.blockSize = options.blockSize || 16; - this._ints = this.blockSize / 4; - this._inBlock = new Array(this._ints); - this._outBlock = new Array(this._ints); -}; -modes.cbc.prototype.start = function(options) { - // Note: legacy support for using IV residue (has security flaws) - // if IV is null, reuse block from previous processing - if(options.iv === null) { - // must have a previous block - if(!this._prev) { - throw new Error('Invalid IV parameter.'); - } - this._iv = this._prev.slice(0); - } else if(!('iv' in options)) { - throw new Error('Invalid IV parameter.'); - } else { - // save IV as "previous" block - this._iv = transformIV(options.iv, this.blockSize); - this._prev = this._iv.slice(0); - } -}; -modes.cbc.prototype.encrypt = function(input, output, finish) { - // not enough input to encrypt - if(input.length() < this.blockSize && !(finish && input.length() > 0)) { - return true; - } - // get next block - // CBC XOR's IV (or previous block) with plaintext - for(var i = 0; i < this._ints; ++i) { - this._inBlock[i] = this._prev[i] ^ input.getInt32(); - } - // encrypt block - this.cipher.encrypt(this._inBlock, this._outBlock); - // write output, save previous block - for(var i = 0; i < this._ints; ++i) { - output.putInt32(this._outBlock[i]); - } - this._prev = this._outBlock; -}; +const createAppendData = configure(api => { + /** + * @type {import('../../types').ObjectPatchAPI["appendData"]} + */ + async function appendData (cid, data, options = {}) { + // allow aborting requests on body errors + const controller = new AbortController() + const signal = abortSignal(controller.signal, options.signal) -modes.cbc.prototype.decrypt = function(input, output, finish) { - // not enough input to decrypt - if(input.length() < this.blockSize && !(finish && input.length() > 0)) { - return true; - } + const res = await api.post('object/patch/append-data', { + signal, + searchParams: toUrlSearchParams({ + arg: `${cid}`, + ...options + }), + ...( + await multipart_request_multipartRequest([data], controller, options.headers) + ) + }) - // get next block - for(var i = 0; i < this._ints; ++i) { - this._inBlock[i] = input.getInt32(); + const { Hash } = await res.json() + + return node_modules_multiformats_src_cid_CID.parse(Hash) } + return appendData +}) - // decrypt block - this.cipher.decrypt(this._inBlock, this._outBlock); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/patch/rm-link.js - // write output, save previous ciphered block - // CBC XOR's IV (or previous block) with ciphertext - for(var i = 0; i < this._ints; ++i) { - output.putInt32(this._prev[i] ^ this._outBlock[i]); - } - this._prev = this._inBlock.slice(0); -}; -modes.cbc.prototype.pad = function(input, options) { - // add PKCS#7 padding to block (each pad byte is the - // value of the number of pad bytes) - var padding = (input.length() === this.blockSize ? - this.blockSize : (this.blockSize - input.length())); - input.fillWithByte(padding, padding); - return true; -}; -modes.cbc.prototype.unpad = function(output, options) { - // check for error: input data not a multiple of blockSize - if(options.overflow > 0) { - return false; - } - // ensure padding byte count is valid - var len = output.length(); - var count = output.at(len - 1); - if(count > (this.blockSize << 2)) { - return false; +const createRmLink = configure(api => { + /** + * @type {import('../../types').ObjectPatchAPI["rmLink"]} + */ + async function rmLink (cid, dLink, options = {}) { + const res = await api.post('object/patch/rm-link', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: [ + `${cid}`, + // @ts-expect-error loose types + dLink.Name || dLink.name || null + ], + ...options + }), + headers: options.headers + }) + + const { Hash } = await res.json() + + return node_modules_multiformats_src_cid_CID.parse(Hash) } + return rmLink +}) - // trim off padding bytes - output.truncate(count); - return true; -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/patch/set-data.js -/** Cipher feedback (CFB) **/ -modes.cfb = function(options) { - options = options || {}; - this.name = 'CFB'; - this.cipher = options.cipher; - this.blockSize = options.blockSize || 16; - this._ints = this.blockSize / 4; - this._inBlock = null; - this._outBlock = new Array(this._ints); - this._partialBlock = new Array(this._ints); - this._partialOutput = forge.util.createBuffer(); - this._partialBytes = 0; -}; -modes.cfb.prototype.start = function(options) { - if(!('iv' in options)) { - throw new Error('Invalid IV parameter.'); - } - // use IV as first input - this._iv = transformIV(options.iv, this.blockSize); - this._inBlock = this._iv.slice(0); - this._partialBytes = 0; -}; -modes.cfb.prototype.encrypt = function(input, output, finish) { - // not enough input to encrypt - var inputLength = input.length(); - if(inputLength === 0) { - return true; - } - // encrypt block - this.cipher.encrypt(this._inBlock, this._outBlock); - // handle full block - if(this._partialBytes === 0 && inputLength >= this.blockSize) { - // XOR input with output, write input as output - for(var i = 0; i < this._ints; ++i) { - this._inBlock[i] = input.getInt32() ^ this._outBlock[i]; - output.putInt32(this._inBlock[i]); - } - return; - } +const createSetData = configure(api => { + /** + * @type {import('../../types').ObjectPatchAPI["setData"]} + */ + async function setData (cid, data, options = {}) { + // allow aborting requests on body errors + const controller = new AbortController() + const signal = abortSignal(controller.signal, options.signal) - // handle partial block - var partialBytes = (this.blockSize - inputLength) % this.blockSize; - if(partialBytes > 0) { - partialBytes = this.blockSize - partialBytes; - } + const res = await api.post('object/patch/set-data', { + signal, + searchParams: toUrlSearchParams({ + arg: [ + `${cid}` + ], + ...options + }), + ...( + await multipart_request_multipartRequest([data], controller, options.headers) + ) + }) - // XOR input with output, write input as partial output - this._partialOutput.clear(); - for(var i = 0; i < this._ints; ++i) { - this._partialBlock[i] = input.getInt32() ^ this._outBlock[i]; - this._partialOutput.putInt32(this._partialBlock[i]); - } + const { Hash } = await res.json() - if(partialBytes > 0) { - // block still incomplete, restore input buffer - input.read -= this.blockSize; - } else { - // block complete, update input block - for(var i = 0; i < this._ints; ++i) { - this._inBlock[i] = this._partialBlock[i]; - } + return node_modules_multiformats_src_cid_CID.parse(Hash) } + return setData +}) - // skip any previous partial bytes - if(this._partialBytes > 0) { - this._partialOutput.getBytes(this._partialBytes); - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/patch/index.js - if(partialBytes > 0 && !finish) { - output.putBytes(this._partialOutput.getBytes( - partialBytes - this._partialBytes)); - this._partialBytes = partialBytes; - return true; - } - output.putBytes(this._partialOutput.getBytes( - inputLength - this._partialBytes)); - this._partialBytes = 0; -}; -modes.cfb.prototype.decrypt = function(input, output, finish) { - // not enough input to decrypt - var inputLength = input.length(); - if(inputLength === 0) { - return true; - } - // encrypt block (CFB always uses encryption mode) - this.cipher.encrypt(this._inBlock, this._outBlock); - // handle full block - if(this._partialBytes === 0 && inputLength >= this.blockSize) { - // XOR input with output, write input as output - for(var i = 0; i < this._ints; ++i) { - this._inBlock[i] = input.getInt32(); - output.putInt32(this._inBlock[i] ^ this._outBlock[i]); - } - return; +/** + * @param {import('../../types').Options} config + */ +function createPatch (config) { + return { + addLink: createAddLink(config), + appendData: createAppendData(config), + rmLink: createRmLink(config), + setData: createSetData(config) } +} - // handle partial block - var partialBytes = (this.blockSize - inputLength) % this.blockSize; - if(partialBytes > 0) { - partialBytes = this.blockSize - partialBytes; - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/object/index.js - // XOR input with output, write input as partial output - this._partialOutput.clear(); - for(var i = 0; i < this._ints; ++i) { - this._partialBlock[i] = input.getInt32(); - this._partialOutput.putInt32(this._partialBlock[i] ^ this._outBlock[i]); + + + + + + + +/** + * @param {import('../types').Multicodecs} codecs + * @param {import('../types').Options} config + */ +function createObject (codecs, config) { + return { + data: createData(config), + get: object_get_createGet(config), + links: createLinks(config), + new: createNew(config), + put: object_put_createPut(codecs, config), + stat: object_stat_createStat(config), + patch: createPatch(config) } +} - if(partialBytes > 0) { - // block still incomplete, restore input buffer - input.read -= this.blockSize; - } else { - // block complete, update input block - for(var i = 0; i < this._ints; ++i) { - this._inBlock[i] = this._partialBlock[i]; - } +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/pins/normalise-input.js + + + +/** + * @typedef {object} Pinnable + * @property {string | InstanceType | CID} [path] + * @property {CID} [cid] + * @property {boolean} [recursive] + * @property {any} [metadata] + * + * @typedef {CID|string|InstanceType|Pinnable} ToPin + * @typedef {ToPin|Iterable|AsyncIterable} Source + * + * @typedef {object} Pin + * @property {string|CID} path + * @property {boolean} recursive + * @property {any} [metadata] + */ + +/** + * @param {any} thing + * @returns {thing is IterableIterator & Iterator} + */ +function isIterable (thing) { + return Symbol.iterator in thing +} + +/** + * @param {any} thing + * @returns {thing is AsyncIterableIterator & AsyncIterator} + */ +function isAsyncIterable (thing) { + return Symbol.asyncIterator in thing +} + +/** + * @param {any} thing + * @returns {thing is CID} + */ +function isCID (thing) { + return ipfs_core_utils_node_modules_multiformats_src_cid_CID.asCID(thing) != null +} + +/** + * Transform one of: + * + * ```ts + * CID + * String + * { cid: CID recursive, metadata } + * { path: String recursive, metadata } + * Iterable + * Iterable + * Iterable<{ cid: CID recursive, metadata }> + * Iterable<{ path: String recursive, metadata }> + * AsyncIterable + * AsyncIterable + * AsyncIterable<{ cid: CID recursive, metadata }> + * AsyncIterable<{ path: String recursive, metadata }> + * ``` + * Into: + * + * ```ts + * AsyncIterable<{ path: CID|String, recursive:boolean, metadata }> + * ``` + * + * @param {Source} input + * @returns {AsyncIterable} + */ +// eslint-disable-next-line complexity +async function * normalise_input_normaliseInput (input) { + // must give us something + if (input === null || input === undefined) { + throw err_code(new Error(`Unexpected input: ${input}`), 'ERR_UNEXPECTED_INPUT') } - // skip any previous partial bytes - if(this._partialBytes > 0) { - this._partialOutput.getBytes(this._partialBytes); - } + // CID + const cid = ipfs_core_utils_node_modules_multiformats_src_cid_CID.asCID(input) - if(partialBytes > 0 && !finish) { - output.putBytes(this._partialOutput.getBytes( - partialBytes - this._partialBytes)); - this._partialBytes = partialBytes; - return true; + if (cid) { + yield toPin({ cid }) + return } - output.putBytes(this._partialOutput.getBytes( - inputLength - this._partialBytes)); - this._partialBytes = 0; -}; + if (input instanceof String || typeof input === 'string') { + yield toPin({ path: input }) + return + } -/** Output feedback (OFB) **/ + // { cid: CID recursive, metadata } + // @ts-expect-error - it still could be iterable or async iterable + if (input.cid != null || input.path != null) { + // @ts-expect-error + return yield toPin(input) + } -modes.ofb = function(options) { - options = options || {}; - this.name = 'OFB'; - this.cipher = options.cipher; - this.blockSize = options.blockSize || 16; - this._ints = this.blockSize / 4; - this._inBlock = null; - this._outBlock = new Array(this._ints); - this._partialOutput = forge.util.createBuffer(); - this._partialBytes = 0; -}; + // Iterable + if (isIterable(input)) { + const iterator = input[Symbol.iterator]() + const first = iterator.next() -modes.ofb.prototype.start = function(options) { - if(!('iv' in options)) { - throw new Error('Invalid IV parameter.'); - } - // use IV as first input - this._iv = transformIV(options.iv, this.blockSize); - this._inBlock = this._iv.slice(0); - this._partialBytes = 0; -}; + if (first.done) { + return iterator + } -modes.ofb.prototype.encrypt = function(input, output, finish) { - // not enough input to encrypt - var inputLength = input.length(); - if(input.length() === 0) { - return true; - } + // Iterable + if (isCID(first.value)) { + yield toPin({ cid: first.value }) + for (const cid of iterator) { + yield toPin({ cid }) + } + return + } - // encrypt block (OFB always uses encryption mode) - this.cipher.encrypt(this._inBlock, this._outBlock); + // Iterable + if (first.value instanceof String || typeof first.value === 'string') { + yield toPin({ path: first.value }) + for (const path of iterator) { + yield toPin({ path }) + } + return + } - // handle full block - if(this._partialBytes === 0 && inputLength >= this.blockSize) { - // XOR input with output and update next input - for(var i = 0; i < this._ints; ++i) { - output.putInt32(input.getInt32() ^ this._outBlock[i]); - this._inBlock[i] = this._outBlock[i]; + // Iterable + if (first.value.cid != null || first.value.path != null) { + yield toPin(first.value) + for (const obj of iterator) { + yield toPin(obj) + } + return } - return; - } - // handle partial block - var partialBytes = (this.blockSize - inputLength) % this.blockSize; - if(partialBytes > 0) { - partialBytes = this.blockSize - partialBytes; + throw err_code(new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT') } - // XOR input with output - this._partialOutput.clear(); - for(var i = 0; i < this._ints; ++i) { - this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]); - } + // AsyncIterable + if (isAsyncIterable(input)) { + const iterator = input[Symbol.asyncIterator]() + const first = await iterator.next() + if (first.done) return iterator - if(partialBytes > 0) { - // block still incomplete, restore input buffer - input.read -= this.blockSize; - } else { - // block complete, update input block - for(var i = 0; i < this._ints; ++i) { - this._inBlock[i] = this._outBlock[i]; + // AsyncIterable + if (isCID(first.value)) { + yield toPin({ cid: first.value }) + for await (const cid of iterator) { + yield toPin({ cid }) + } + return + } + + // AsyncIterable + if (first.value instanceof String || typeof first.value === 'string') { + yield toPin({ path: first.value }) + for await (const path of iterator) { + yield toPin({ path }) + } + return + } + + // AsyncIterable<{ cid: CID|String recursive, metadata }> + if (first.value.cid != null || first.value.path != null) { + yield toPin(first.value) + for await (const obj of iterator) { + yield toPin(obj) + } + return } + + throw err_code(new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT') } - // skip any previous partial bytes - if(this._partialBytes > 0) { - this._partialOutput.getBytes(this._partialBytes); + throw err_code(new Error('Unexpected input: ' + typeof input), 'ERR_UNEXPECTED_INPUT') +} + +/** + * @param {Pinnable} input + */ +function toPin (input) { + const path = input.cid || `${input.path}` + + if (!path) { + throw err_code(new Error('Unexpected input: Please path either a CID or an IPFS path'), 'ERR_UNEXPECTED_INPUT') } - if(partialBytes > 0 && !finish) { - output.putBytes(this._partialOutput.getBytes( - partialBytes - this._partialBytes)); - this._partialBytes = partialBytes; - return true; + /** @type {Pin} */ + const pin = { + path, + recursive: input.recursive !== false } - output.putBytes(this._partialOutput.getBytes( - inputLength - this._partialBytes)); - this._partialBytes = 0; -}; + if (input.metadata != null) { + pin.metadata = input.metadata + } -modes.ofb.prototype.decrypt = modes.ofb.prototype.encrypt; + return pin +} -/** Counter (CTR) **/ +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/add-all.js -modes.ctr = function(options) { - options = options || {}; - this.name = 'CTR'; - this.cipher = options.cipher; - this.blockSize = options.blockSize || 16; - this._ints = this.blockSize / 4; - this._inBlock = null; - this._outBlock = new Array(this._ints); - this._partialOutput = forge.util.createBuffer(); - this._partialBytes = 0; -}; -modes.ctr.prototype.start = function(options) { - if(!('iv' in options)) { - throw new Error('Invalid IV parameter.'); - } - // use IV as first input - this._iv = transformIV(options.iv, this.blockSize); - this._inBlock = this._iv.slice(0); - this._partialBytes = 0; -}; -modes.ctr.prototype.encrypt = function(input, output, finish) { - // not enough input to encrypt - var inputLength = input.length(); - if(inputLength === 0) { - return true; - } - // encrypt block (CTR always uses encryption mode) - this.cipher.encrypt(this._inBlock, this._outBlock); - // handle full block - if(this._partialBytes === 0 && inputLength >= this.blockSize) { - // XOR input with output - for(var i = 0; i < this._ints; ++i) { - output.putInt32(input.getInt32() ^ this._outBlock[i]); - } - } else { - // handle partial block - var partialBytes = (this.blockSize - inputLength) % this.blockSize; - if(partialBytes > 0) { - partialBytes = this.blockSize - partialBytes; - } +const createAddAll = configure(api => { + /** + * @type {import('../types').PinAPI["addAll"]} + */ + async function * addAll (source, options = {}) { + for await (const { path, recursive, metadata } of normalise_input_normaliseInput(source)) { + const res = await api.post('pin/add', { + signal: options.signal, + searchParams: toUrlSearchParams({ + ...options, + arg: path, + recursive, + metadata: metadata ? JSON.stringify(metadata) : undefined, + stream: true + }), + headers: options.headers + }) - // XOR input with output - this._partialOutput.clear(); - for(var i = 0; i < this._ints; ++i) { - this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]); - } + for await (const pin of res.ndjson()) { + if (pin.Pins) { // non-streaming response + for (const cid of pin.Pins) { + yield node_modules_multiformats_src_cid_CID.parse(cid) + } + // eslint-disable-next-line no-continue + continue + } - if(partialBytes > 0) { - // block still incomplete, restore input buffer - input.read -= this.blockSize; + yield node_modules_multiformats_src_cid_CID.parse(pin) + } } + } + return addAll +}) - // skip any previous partial bytes - if(this._partialBytes > 0) { - this._partialOutput.getBytes(this._partialBytes); - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/add.js - if(partialBytes > 0 && !finish) { - output.putBytes(this._partialOutput.getBytes( - partialBytes - this._partialBytes)); - this._partialBytes = partialBytes; - return true; - } - output.putBytes(this._partialOutput.getBytes( - inputLength - this._partialBytes)); - this._partialBytes = 0; - } - // block complete, increment counter (input block) - inc32(this._inBlock); -}; -modes.ctr.prototype.decrypt = modes.ctr.prototype.encrypt; +/** + * @param {import('../types').Options} config + */ +function add_createAdd (config) { + const all = createAddAll(config) -/** Galois/Counter Mode (GCM) **/ + return configure(() => { + /** + * @type {import('../types').PinAPI["add"]} + */ + async function add (path, options = {}) { + // @ts-expect-error last can return undefined + return last(all([{ + path, + ...options + }], options)) + } + return add + })(config) +} -modes.gcm = function(options) { - options = options || {}; - this.name = 'GCM'; - this.cipher = options.cipher; - this.blockSize = options.blockSize || 16; - this._ints = this.blockSize / 4; - this._inBlock = new Array(this._ints); - this._outBlock = new Array(this._ints); - this._partialOutput = forge.util.createBuffer(); - this._partialBytes = 0; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/ls.js - // R is actually this value concatenated with 120 more zero bits, but - // we only XOR against R so the other zeros have no effect -- we just - // apply this value to the first integer in a block - this._R = 0xE1000000; -}; -modes.gcm.prototype.start = function(options) { - if(!('iv' in options)) { - throw new Error('Invalid IV parameter.'); - } - // ensure IV is a byte buffer - var iv = forge.util.createBuffer(options.iv); - // no ciphered data processed yet - this._cipherLength = 0; - // default additional data is none - var additionalData; - if('additionalData' in options) { - additionalData = forge.util.createBuffer(options.additionalData); - } else { - additionalData = forge.util.createBuffer(); +/** + * @param {string} type + * @param {string} cid + * @param {Record} metadata + */ +function ls_toPin (type, cid, metadata) { + /** @type {import('../types').LsResult} */ + const pin = { + type, + cid: node_modules_multiformats_src_cid_CID.parse(cid) } - // default tag length is 128 bits - if('tagLength' in options) { - this._tagLength = options.tagLength; - } else { - this._tagLength = 128; + if (metadata) { + pin.metadata = metadata } - // if tag is given, ensure tag matches tag length - this._tag = null; - if(options.decrypt) { - // save tag to check later - this._tag = forge.util.createBuffer(options.tag).getBytes(); - if(this._tag.length !== (this._tagLength / 8)) { - throw new Error('Authentication tag does not match tag length.'); - } - } + return pin +} - // create tmp storage for hash calculation - this._hashBlock = new Array(this._ints); +const pin_ls_createLs = configure(api => { + /** + * @type {import('../types').PinAPI["ls"]} + */ + async function * ls (options = {}) { + /** @type {any[]} */ + let paths = [] - // no tag generated yet - this.tag = null; + if (options.paths) { + paths = Array.isArray(options.paths) ? options.paths : [options.paths] + } - // generate hash subkey - // (apply block cipher to "zero" block) - this._hashSubkey = new Array(this._ints); - this.cipher.encrypt([0, 0, 0, 0], this._hashSubkey); + const res = await api.post('pin/ls', { + signal: options.signal, + searchParams: toUrlSearchParams({ + ...options, + arg: paths.map(path => `${path}`), + stream: true + }), + headers: options.headers + }) - // generate table M - // use 4-bit tables (32 component decomposition of a 16 byte value) - // 8-bit tables take more space and are known to have security - // vulnerabilities (in native implementations) - this.componentBits = 4; - this._m = this.generateHashTable(this._hashSubkey, this.componentBits); + for await (const pin of res.ndjson()) { + if (pin.Keys) { // non-streaming response + for (const cid of Object.keys(pin.Keys)) { + yield ls_toPin(pin.Keys[cid].Type, cid, pin.Keys[cid].Metadata) + } + return + } - // Note: support IV length different from 96 bits? (only supporting - // 96 bits is recommended by NIST SP-800-38D) - // generate J_0 - var ivLength = iv.length(); - if(ivLength === 12) { - // 96-bit IV - this._j0 = [iv.getInt32(), iv.getInt32(), iv.getInt32(), 1]; - } else { - // IV is NOT 96-bits - this._j0 = [0, 0, 0, 0]; - while(iv.length() > 0) { - this._j0 = this.ghash( - this._hashSubkey, this._j0, - [iv.getInt32(), iv.getInt32(), iv.getInt32(), iv.getInt32()]); + yield ls_toPin(pin.Type, pin.Cid, pin.Metadata) } - this._j0 = this.ghash( - this._hashSubkey, this._j0, [0, 0].concat(from64To32(ivLength * 8))); } + return ls +}) - // generate ICB (initial counter block) - this._inBlock = this._j0.slice(0); - inc32(this._inBlock); - this._partialBytes = 0; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/rm-all.js - // consume authentication data - additionalData = forge.util.createBuffer(additionalData); - // save additional data length as a BE 64-bit number - this._aDataLength = from64To32(additionalData.length() * 8); - // pad additional data to 128 bit (16 byte) block size - var overflow = additionalData.length() % this.blockSize; - if(overflow) { - additionalData.fillWithByte(0, this.blockSize - overflow); - } - this._s = [0, 0, 0, 0]; - while(additionalData.length() > 0) { - this._s = this.ghash(this._hashSubkey, this._s, [ - additionalData.getInt32(), - additionalData.getInt32(), - additionalData.getInt32(), - additionalData.getInt32() - ]); - } -}; -modes.gcm.prototype.encrypt = function(input, output, finish) { - // not enough input to encrypt - var inputLength = input.length(); - if(inputLength === 0) { - return true; - } - // encrypt block - this.cipher.encrypt(this._inBlock, this._outBlock); - // handle full block - if(this._partialBytes === 0 && inputLength >= this.blockSize) { - // XOR input with output - for(var i = 0; i < this._ints; ++i) { - output.putInt32(this._outBlock[i] ^= input.getInt32()); - } - this._cipherLength += this.blockSize; - } else { - // handle partial block - var partialBytes = (this.blockSize - inputLength) % this.blockSize; - if(partialBytes > 0) { - partialBytes = this.blockSize - partialBytes; - } - // XOR input with output - this._partialOutput.clear(); - for(var i = 0; i < this._ints; ++i) { - this._partialOutput.putInt32(input.getInt32() ^ this._outBlock[i]); - } +const createRmAll = configure(api => { + /** + * @type {import('../types').PinAPI["rmAll"]} + */ + async function * rmAll (source, options = {}) { + for await (const { path, recursive } of normalise_input_normaliseInput(source)) { + const searchParams = new URLSearchParams(options.searchParams) + searchParams.append('arg', `${path}`) - if(partialBytes <= 0 || finish) { - // handle overflow prior to hashing - if(finish) { - // get block overflow - var overflow = inputLength % this.blockSize; - this._cipherLength += overflow; - // truncate for hash function - this._partialOutput.truncate(this.blockSize - overflow); - } else { - this._cipherLength += this.blockSize; - } + if (recursive != null) searchParams.set('recursive', String(recursive)) - // get output block for hashing - for(var i = 0; i < this._ints; ++i) { - this._outBlock[i] = this._partialOutput.getInt32(); + const res = await api.post('pin/rm', { + signal: options.signal, + headers: options.headers, + searchParams: toUrlSearchParams({ + ...options, + arg: `${path}`, + recursive + }) + }) + + for await (const pin of res.ndjson()) { + if (pin.Pins) { // non-streaming response + yield * pin.Pins.map((/** @type {string} */ cid) => node_modules_multiformats_src_cid_CID.parse(cid)) + // eslint-disable-next-line no-continue + continue + } + yield node_modules_multiformats_src_cid_CID.parse(pin) } - this._partialOutput.read -= this.blockSize; } + } + return rmAll +}) - // skip any previous partial bytes - if(this._partialBytes > 0) { - this._partialOutput.getBytes(this._partialBytes); - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/rm.js - if(partialBytes > 0 && !finish) { - // block still incomplete, restore input buffer, get partial output, - // and return early - input.read -= this.blockSize; - output.putBytes(this._partialOutput.getBytes( - partialBytes - this._partialBytes)); - this._partialBytes = partialBytes; - return true; - } - output.putBytes(this._partialOutput.getBytes( - inputLength - this._partialBytes)); - this._partialBytes = 0; - } - // update hash block S - this._s = this.ghash(this._hashSubkey, this._s, this._outBlock); - // increment counter (input block) - inc32(this._inBlock); -}; +/** + * @param {import('../types').Options} config + */ +const pin_rm_createRm = (config) => { + const all = createRmAll(config) -modes.gcm.prototype.decrypt = function(input, output, finish) { - // not enough input to decrypt - var inputLength = input.length(); - if(inputLength < this.blockSize && !(finish && inputLength > 0)) { - return true; - } + return configure(() => { + /** + * @type {import('../types').PinAPI["rm"]} + */ + async function rm (path, options = {}) { + // @ts-expect-error last can return undefined + return last(all([{ + path, + ...options + }], options)) + } + return rm + })(config) +} - // encrypt block (GCM always uses encryption mode) - this.cipher.encrypt(this._inBlock, this._outBlock); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/utils.js - // increment counter (input block) - inc32(this._inBlock); - // update hash block S - this._hashBlock[0] = input.getInt32(); - this._hashBlock[1] = input.getInt32(); - this._hashBlock[2] = input.getInt32(); - this._hashBlock[3] = input.getInt32(); - this._s = this.ghash(this._hashSubkey, this._s, this._hashBlock); - // XOR hash input with output - for(var i = 0; i < this._ints; ++i) { - output.putInt32(this._outBlock[i] ^ this._hashBlock[i]); +/** + * @param {object} json + * @param {string} json.Name + * @param {string} json.Cid + * @param {import('../../types.js').Status} json.Status + * @returns {import('../../types.js').Pin} + */ +const decodePin = ({ Name: name, Status: status, Cid: cid }) => { + return { + cid: node_modules_multiformats_src_cid_CID.parse(cid), + name, + status } +} - // increment cipher data length - if(inputLength < this.blockSize) { - this._cipherLength += inputLength % this.blockSize; +/** + * @param {any} service + * @returns {string} + */ +const encodeService = (service) => { + if (typeof service === 'string' && service !== '') { + return service } else { - this._cipherLength += this.blockSize; + throw new TypeError('service name must be passed') } -}; +} -modes.gcm.prototype.afterFinish = function(output, options) { - var rval = true; +/** + * @param {any} cid + * @returns {string} + */ +const utils_encodeCID = (cid) => { + if (node_modules_multiformats_src_cid_CID.asCID(cid)) { + return cid.toString() + } else { + throw new TypeError(`CID instance expected instead of ${typeof cid}`) + } +} - // handle overflow - if(options.decrypt && options.overflow) { - output.truncate(this.blockSize - options.overflow); +/** + * @param {import('../../types.js').Query & { all?: boolean }} query + * @returns {URLSearchParams} + */ +const encodeQuery = ({ service, cid, name, status, all }) => { + const query = toUrlSearchParams({ + service: encodeService(service), + name, + force: all ? true : undefined + }) + + if (cid) { + for (const value of cid) { + query.append('cid', utils_encodeCID(value)) + } } - // handle authentication tag - this.tag = forge.util.createBuffer(); + if (status) { + for (const value of status) { + query.append('status', value) + } + } - // concatenate additional data length with cipher length - var lengths = this._aDataLength.concat(from64To32(this._cipherLength * 8)); + return query +} - // include lengths in hash - this._s = this.ghash(this._hashSubkey, this._s, lengths); +/** + * @param {import('../../types.js').AddOptions & {cid:CID}} options + * @returns {URLSearchParams} + */ +const encodeAddParams = ({ cid, service, background, name, origins }) => { + const params = toUrlSearchParams({ + arg: utils_encodeCID(cid), + service: encodeService(service), + name, + background: background ? true : undefined + }) - // do GCTR(J_0, S) - var tag = []; - this.cipher.encrypt(this._j0, tag); - for(var i = 0; i < this._ints; ++i) { - this.tag.putInt32(this._s[i] ^ tag[i]); + if (origins) { + for (const origin of origins) { + params.append('origin', origin.toString()) + } } - // trim tag to length - this.tag.truncate(this.tag.length() % (this._tagLength / 8)); + return params +} - // check authentication tag - if(options.decrypt && this.tag.bytes() !== this._tag) { - rval = false; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/add.js + + +/** + * @param {import('../../lib/core').Client} client + */ +function remote_add_createAdd (client) { + /** + * @type {import('../../types').RemotePiningAPI["add"]} + */ + async function add (cid, { timeout, signal, headers, ...query }) { + const response = await client.post('pin/remote/add', { + timeout, + signal, + headers, + searchParams: encodeAddParams({ cid, ...query }) + }) + + return decodePin(await response.json()) } - return rval; -}; + return add +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/ls.js + /** - * See NIST SP-800-38D 6.3 (Algorithm 1). This function performs Galois - * field multiplication. The field, GF(2^128), is defined by the polynomial: - * - * x^128 + x^7 + x^2 + x + 1 - * - * Which is represented in little-endian binary form as: 11100001 (0xe1). When - * the value of a coefficient is 1, a bit is set. The value R, is the - * concatenation of this value and 120 zero bits, yielding a 128-bit value - * which matches the block size. - * - * This function will multiply two elements (vectors of bytes), X and Y, in - * the field GF(2^128). The result is initialized to zero. For each bit of - * X (out of 128), x_i, if x_i is set, then the result is multiplied (XOR'd) - * by the current value of Y. For each bit, the value of Y will be raised by - * a power of x (multiplied by the polynomial x). This can be achieved by - * shifting Y once to the right. If the current value of Y, prior to being - * multiplied by x, has 0 as its LSB, then it is a 127th degree polynomial. - * Otherwise, we must divide by R after shifting to find the remainder. - * - * @param x the first block to multiply by the second. - * @param y the second block to multiply by the first. - * - * @return the block result of the multiplication. + * @param {import('../../lib/core').Client} client */ -modes.gcm.prototype.multiply = function(x, y) { - var z_i = [0, 0, 0, 0]; - var v_i = y.slice(0); +function remote_ls_createLs (client) { + /** + * @type {import('../../types.js').RemotePiningAPI["ls"]} + */ + async function * ls ({ timeout, signal, headers, ...query }) { + const response = await client.post('pin/remote/ls', { + timeout, + signal, + headers, + searchParams: encodeQuery(query) + }) - // calculate Z_128 (block has 128 bits) - for(var i = 0; i < 128; ++i) { - // if x_i is 0, Z_{i+1} = Z_i (unchanged) - // else Z_{i+1} = Z_i ^ V_i - // get x_i by finding 32-bit int position, then left shift 1 by remainder - var x_i = x[(i / 32) | 0] & (1 << (31 - i % 32)); - if(x_i) { - z_i[0] ^= v_i[0]; - z_i[1] ^= v_i[1]; - z_i[2] ^= v_i[2]; - z_i[3] ^= v_i[3]; + for await (const pin of response.ndjson()) { + yield decodePin(pin) } - - // if LSB(V_i) is 1, V_i = V_i >> 1 - // else V_i = (V_i >> 1) ^ R - this.pow(v_i, v_i); } - return z_i; -}; + return ls +} -modes.gcm.prototype.pow = function(x, out) { - // if LSB(x) is 1, x = x >>> 1 - // else x = (x >>> 1) ^ R - var lsb = x[3] & 1; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/rm.js - // always do x >>> 1: - // starting with the rightmost integer, shift each integer to the right - // one bit, pulling in the bit from the integer to the left as its top - // most bit (do this for the last 3 integers) - for(var i = 3; i > 0; --i) { - out[i] = (x[i] >>> 1) | ((x[i - 1] & 1) << 31); - } - // shift the first integer normally - out[0] = x[0] >>> 1; - // if lsb was not set, then polynomial had a degree of 127 and doesn't - // need to divided; otherwise, XOR with R to find the remainder; we only - // need to XOR the first integer since R technically ends w/120 zero bits - if(lsb) { - out[0] ^= this._R; +/** + * @param {import('../../lib/core').Client} client + */ +function remote_rm_createRm (client) { + /** + * @type {import('../../types').RemotePiningAPI["rm"]} + */ + async function rm ({ timeout, signal, headers, ...query }) { + await client.post('pin/remote/rm', { + timeout, + signal, + headers, + searchParams: encodeQuery({ + ...query, + all: false + }) + }) } -}; -modes.gcm.prototype.tableMultiply = function(x) { - // assumes 4-bit tables are used - var z = [0, 0, 0, 0]; - for(var i = 0; i < 32; ++i) { - var idx = (i / 8) | 0; - var x_i = (x[idx] >>> ((7 - (i % 8)) * 4)) & 0xF; - var ah = this._m[i][x_i]; - z[0] ^= ah[0]; - z[1] ^= ah[1]; - z[2] ^= ah[2]; - z[3] ^= ah[3]; - } - return z; -}; + return rm +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/rm-all.js + /** - * A continuing version of the GHASH algorithm that operates on a single - * block. The hash block, last hash value (Ym) and the new block to hash - * are given. - * - * @param h the hash block. - * @param y the previous value for Ym, use [0, 0, 0, 0] for a new hash. - * @param x the block to hash. - * - * @return the hashed value (Ym). + * @param {import('../../lib/core').Client} client */ -modes.gcm.prototype.ghash = function(h, y, x) { - y[0] ^= x[0]; - y[1] ^= x[1]; - y[2] ^= x[2]; - y[3] ^= x[3]; - return this.tableMultiply(y); - //return this.multiply(y, h); -}; +function rm_all_createRmAll (client) { + /** + * @type {import('../../types').RemotePiningAPI["rmAll"]} + */ + async function rmAll ({ timeout, signal, headers, ...query }) { + await client.post('pin/remote/rm', { + timeout, + signal, + headers, + searchParams: encodeQuery({ + ...query, + all: true + }) + }) + } + + return rmAll +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/service/utils.js /** - * Precomputes a table for multiplying against the hash subkey. This - * mechanism provides a substantial speed increase over multiplication - * performed without a table. The table-based multiplication this table is - * for solves X * H by multiplying each component of X by H and then - * composing the results together using XOR. - * - * This function can be used to generate tables with different bit sizes - * for the components, however, this implementation assumes there are - * 32 components of X (which is a 16 byte vector), therefore each component - * takes 4-bits (so the table is constructed with bits=4). - * - * @param h the hash subkey. - * @param bits the bit size for a component. + * @param {URL} url */ -modes.gcm.prototype.generateHashTable = function(h, bits) { - // TODO: There are further optimizations that would use only the - // first table M_0 (or some variant) along with a remainder table; - // this can be explored in the future - var multiplier = 8 / bits; - var perInt = 4 * multiplier; - var size = 16 * multiplier; - var m = new Array(size); - for(var i = 0; i < size; ++i) { - var tmp = [0, 0, 0, 0]; - var idx = (i / perInt) | 0; - var shft = ((perInt - 1 - (i % perInt)) * bits); - tmp[idx] = (1 << (bits - 1)) << shft; - m[i] = this.generateSubHashTable(this.multiply(tmp, h), bits); +function encodeEndpoint (url) { + const href = String(url) + if (href === 'undefined') { + throw Error('endpoint is required') } - return m; -}; + // Workaround trailing `/` issue in go-ipfs + // @see https://github.com/ipfs/go-ipfs/issues/7826 + return href[href.length - 1] === '/' ? href.slice(0, -1) : href +} /** - * Generates a table for multiplying against the hash subkey for one - * particular component (out of all possible component values). - * - * @param mid the pre-multiplied value for the middle key of the table. - * @param bits the bit size for a component. + * @param {any} json + * @returns {import('../../../types').RemotePinServiceWithStat} */ -modes.gcm.prototype.generateSubHashTable = function(mid, bits) { - // compute the table quickly by minimizing the number of - // POW operations -- they only need to be performed for powers of 2, - // all other entries can be composed from those powers using XOR - var size = 1 << bits; - var half = size >>> 1; - var m = new Array(size); - m[half] = mid.slice(0); - var i = half >>> 1; - while(i > 0) { - // raise m0[2 * i] and store in m0[i] - this.pow(m[2 * i], m[i] = []); - i >>= 1; +function decodeRemoteService (json) { + return { + service: json.Service, + endpoint: new URL(json.ApiEndpoint), + ...(json.Stat && { stat: decodeStat(json.Stat) }) } - i = 2; - while(i < half) { - for(var j = 1; j < i; ++j) { - var m_i = m[i]; - var m_j = m[j]; - m[i + j] = [ - m_i[0] ^ m_j[0], - m_i[1] ^ m_j[1], - m_i[2] ^ m_j[2], - m_i[3] ^ m_j[3] - ]; +} + +/** + * @param {any} json + * @returns {import('../../../types').Stat} + */ +function decodeStat (json) { + switch (json.Status) { + case 'valid': { + const { Pinning, Pinned, Queued, Failed } = json.PinCount + return { + status: 'valid', + pinCount: { + queued: Queued, + pinning: Pinning, + pinned: Pinned, + failed: Failed + } + } + } + case 'invalid': { + return { status: 'invalid' } + } + default: { + return { status: json.Status } } - i *= 2; - } - m[0] = [0, 0, 0, 0]; - /* Note: We could avoid storing these by doing composition during multiply - calculate top half using composition by speed is preferred. */ - for(i = half + 1; i < size; ++i) { - var c = m[i ^ half]; - m[i] = [mid[0] ^ c[0], mid[1] ^ c[1], mid[2] ^ c[2], mid[3] ^ c[3]]; } - return m; -}; +} -/** Utility functions */ +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/service/add.js -function transformIV(iv, blockSize) { - if(typeof iv === 'string') { - // convert iv string into byte buffer - iv = forge.util.createBuffer(iv); - } - if(forge.util.isArray(iv) && iv.length > 4) { - // convert iv byte array into byte buffer - var tmp = iv; - iv = forge.util.createBuffer(); - for(var i = 0; i < tmp.length; ++i) { - iv.putByte(tmp[i]); - } - } - if(iv.length() < blockSize) { - throw new Error( - 'Invalid IV length; got ' + iv.length() + - ' bytes and expected ' + blockSize + ' bytes.'); - } +/** + * @param {import('../../../lib/core').Client} client + */ +function service_add_createAdd (client) { + /** + * @type {import('../../../types').RemotePiningServiceAPI["add"]} + */ + async function add (name, options) { + const { endpoint, key, headers, timeout, signal } = options - if(!forge.util.isArray(iv)) { - // convert iv byte buffer into 32-bit integer array - var ints = []; - var blocks = blockSize / 4; - for(var i = 0; i < blocks; ++i) { - ints.push(iv.getInt32()); - } - iv = ints; + await client.post('pin/remote/service/add', { + timeout, + signal, + searchParams: toUrlSearchParams({ + arg: [name, encodeEndpoint(endpoint), key] + }), + headers + }) } - return iv; + return add } -function inc32(block) { - // increment last 32 bits of block only - block[block.length - 1] = (block[block.length - 1] + 1) & 0xFFFFFFFF; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/service/ls.js + + + +/** + * @param {import('../../../lib/core').Client} client + */ +function service_ls_createLs (client) { + /** + * @type {import('../../../types').RemotePiningServiceAPI["ls"]} + */ + async function ls (options = {}) { + // @ts-expect-error cannot derive option type from typedef + const { stat, headers, timeout, signal } = options + + const response = await client.post('pin/remote/service/ls', { + timeout, + signal, + headers, + searchParams: stat === true ? toUrlSearchParams({ stat }) : undefined + }) + + /** @type {{RemoteServices: object[]}} */ + const { RemoteServices } = await response.json() + + return RemoteServices.map(decodeRemoteService) + } + + return ls } -function from64To32(num) { - // convert 64-bit number to two BE Int32s - return [(num / 0x100000000) | 0, num & 0xFFFFFFFF]; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/service/rm.js + + +/** + * @param {import('../../../lib/core').Client} client + */ +function service_rm_createRm (client) { + /** + * @type {import('../../../types').RemotePiningServiceAPI["rm"]} + */ + async function rm (name, options = {}) { + await client.post('pin/remote/service/rm', { + signal: options.signal, + headers: options.headers, + searchParams: toUrlSearchParams({ + arg: name + }) + }) + } + + return rm } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/service/index.js + + -/***/ }), -/***/ 16855: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /** - * DES (Data Encryption Standard) implementation. - * - * This implementation supports DES as well as 3DES-EDE in ECB and CBC mode. - * It is based on the BSD-licensed implementation by Paul Tero: - * - * Paul Tero, July 2001 - * http://www.tero.co.uk/des/ - * - * Optimised for performance with large blocks by - * Michael Hayworth, November 2001 - * http://www.netdealing.com - * - * THIS SOFTWARE IS PROVIDED "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @author Stefan Siegl - * @author Dave Longley - * - * Copyright (c) 2012 Stefan Siegl - * Copyright (c) 2012-2014 Digital Bazaar, Inc. + * @param {import('../../../types').Options} config */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(27883); -__nccwpck_require__(70857); -__nccwpck_require__(36536); +function createService (config) { + const client = new Client(config) + + return { + add: service_add_createAdd(client), + ls: service_ls_createLs(client), + rm: service_rm_createRm(client) + } +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/remote/index.js + + + + + -/* DES API */ -module.exports = forge.des = forge.des || {}; /** - * Deprecated. Instead, use: - * - * var cipher = forge.cipher.createCipher('DES-', key); - * cipher.start({iv: iv}); - * - * Creates an DES cipher object to encrypt data using the given symmetric key. - * The output will be stored in the 'output' member of the returned cipher. - * - * The key and iv may be given as binary-encoded strings of bytes or - * byte buffers. - * - * @param key the symmetric key to use (64 or 192 bits). - * @param iv the initialization vector to use. - * @param output the buffer to write to, null to create one. - * @param mode the cipher mode to use (default: 'CBC' if IV is - * given, 'ECB' if null). - * - * @return the cipher. + * @param {import('../../types').Options} config */ -forge.des.startEncrypting = function(key, iv, output, mode) { - var cipher = _createCipher({ - key: key, - output: output, - decrypt: false, - mode: mode || (iv === null ? 'ECB' : 'CBC') - }); - cipher.start(iv); - return cipher; -}; +function createRemote (config) { + const client = new Client(config) + + return { + add: remote_add_createAdd(client), + ls: remote_ls_createLs(client), + rm: remote_rm_createRm(client), + rmAll: rm_all_createRmAll(client), + service: createService(config) + } +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pin/index.js + + + + + + /** - * Deprecated. Instead, use: - * - * var cipher = forge.cipher.createCipher('DES-', key); - * - * Creates an DES cipher object to encrypt data using the given symmetric key. - * - * The key may be given as a binary-encoded string of bytes or a byte buffer. - * - * @param key the symmetric key to use (64 or 192 bits). - * @param mode the cipher mode to use (default: 'CBC'). - * - * @return the cipher. + * @param {import('../types').Options} config + */ +function createPin (config) { + return { + addAll: createAddAll(config), + add: add_createAdd(config), + ls: pin_ls_createLs(config), + rmAll: createRmAll(config), + rm: pin_rm_createRm(config), + remote: createRemote(config) + } +} + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/lib/http-rpc-wire-format.js + + + + +/* HTTP RPC: + * - wraps binary data in multibase. base64url is used to avoid issues + * when a binary data is passed as search param in URL. + * Historical context: https://github.com/ipfs/go-ipfs/issues/7939 + * Multibase wrapping introduced in: https://github.com/ipfs/go-ipfs/pull/8183 */ -forge.des.createEncryptionCipher = function(key, mode) { - return _createCipher({ - key: key, - output: null, - decrypt: false, - mode: mode - }); -}; /** - * Deprecated. Instead, use: - * - * var decipher = forge.cipher.createDecipher('DES-', key); - * decipher.start({iv: iv}); - * - * Creates an DES cipher object to decrypt data using the given symmetric key. - * The output will be stored in the 'output' member of the returned cipher. - * - * The key and iv may be given as binary-encoded strings of bytes or - * byte buffers. - * - * @param key the symmetric key to use (64 or 192 bits). - * @param iv the initialization vector to use. - * @param output the buffer to write to, null to create one. - * @param mode the cipher mode to use (default: 'CBC' if IV is - * given, 'ECB' if null). - * - * @return the cipher. + * @param {Array} strings + * @returns {Array} strings */ -forge.des.startDecrypting = function(key, iv, output, mode) { - var cipher = _createCipher({ - key: key, - output: output, - decrypt: true, - mode: mode || (iv === null ? 'ECB' : 'CBC') - }); - cipher.start(iv); - return cipher; -}; +const rpcArrayToTextArray = strings => { + if (Array.isArray(strings)) { + return strings.map(rpcToText) + } + return strings +} /** - * Deprecated. Instead, use: - * - * var decipher = forge.cipher.createDecipher('DES-', key); - * - * Creates an DES cipher object to decrypt data using the given symmetric key. - * - * The key may be given as a binary-encoded string of bytes or a byte buffer. - * - * @param key the symmetric key to use (64 or 192 bits). - * @param mode the cipher mode to use (default: 'CBC'). - * - * @return the cipher. + * @param {string} mb + * @returns {string} */ -forge.des.createDecryptionCipher = function(key, mode) { - return _createCipher({ - key: key, - output: null, - decrypt: true, - mode: mode - }); -}; +const rpcToText = mb => dist_src_to_string_toString(rpcToBytes(mb)) /** - * Creates a new DES cipher algorithm object. - * - * @param name the name of the algorithm. - * @param mode the mode factory function. - * - * @return the DES algorithm object. + * @param {string} mb + * @returns {Uint8Array} */ -forge.des.Algorithm = function(name, mode) { - var self = this; - self.name = name; - self.mode = new mode({ - blockSize: 8, - cipher: { - encrypt: function(inBlock, outBlock) { - return _updateBlock(self._keys, inBlock, outBlock, false); - }, - decrypt: function(inBlock, outBlock) { - return _updateBlock(self._keys, inBlock, outBlock, true); - } - } - }); - self._init = false; -}; +const rpcToBytes = mb => bases_base64_base64url.decode(mb) /** - * Initializes this DES algorithm by expanding its key. - * - * @param options the options to use. - * key the key to use with this algorithm. - * decrypt true if the algorithm should be initialized for decryption, - * false for encryption. + * @param {string} mb + * @returns {bigint} */ -forge.des.Algorithm.prototype.initialize = function(options) { - if(this._init) { - return; +const rpcToBigInt = mb => BigInt(`0x${dist_src_to_string_toString(bases_base64_base64url.decode(mb), 'base16')}`) + +/** + * @param {string} text + * @returns {string} + */ +const textToUrlSafeRpc = text => bases_base64_base64url.encode(dist_src_from_string_fromString(text)) + + + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pubsub/ls.js + + + + +const pubsub_ls_createLs = configure(api => { + /** + * @type {import('../types').PubsubAPI["ls"]} + */ + async function ls (options = {}) { + const { Strings } = await (await api.post('pubsub/ls', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + })).json() + + return rpcArrayToTextArray(Strings) || [] } + return ls +}) - var key = forge.util.createBuffer(options.key); - if(this.name.indexOf('3DES') === 0) { - if(key.length() !== 24) { - throw new Error('Invalid Triple-DES key size: ' + key.length() * 8); - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pubsub/peers.js + + + + +const createPeers = configure(api => { + /** + * @type {import('../types').PubsubAPI["peers"]} + */ + async function peers (topic, options = {}) { + const res = await api.post('pubsub/peers', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: textToUrlSafeRpc(topic), + ...options + }), + headers: options.headers + }) + + const { Strings } = await res.json() + + return Strings || [] } + return peers +}) - // do key expansion to 16 or 48 subkeys (single or triple DES) - this._keys = _createKeys(key); - this._init = true; -}; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pubsub/publish.js -/** Register DES algorithms **/ -registerAlgorithm('DES-ECB', forge.cipher.modes.ecb); -registerAlgorithm('DES-CBC', forge.cipher.modes.cbc); -registerAlgorithm('DES-CFB', forge.cipher.modes.cfb); -registerAlgorithm('DES-OFB', forge.cipher.modes.ofb); -registerAlgorithm('DES-CTR', forge.cipher.modes.ctr); -registerAlgorithm('3DES-ECB', forge.cipher.modes.ecb); -registerAlgorithm('3DES-CBC', forge.cipher.modes.cbc); -registerAlgorithm('3DES-CFB', forge.cipher.modes.cfb); -registerAlgorithm('3DES-OFB', forge.cipher.modes.ofb); -registerAlgorithm('3DES-CTR', forge.cipher.modes.ctr); -function registerAlgorithm(name, mode) { - var factory = function() { - return new forge.des.Algorithm(name, mode); - }; - forge.cipher.registerAlgorithm(name, factory); -} -/** DES implementation **/ -var spfunction1 = [0x1010400,0,0x10000,0x1010404,0x1010004,0x10404,0x4,0x10000,0x400,0x1010400,0x1010404,0x400,0x1000404,0x1010004,0x1000000,0x4,0x404,0x1000400,0x1000400,0x10400,0x10400,0x1010000,0x1010000,0x1000404,0x10004,0x1000004,0x1000004,0x10004,0,0x404,0x10404,0x1000000,0x10000,0x1010404,0x4,0x1010000,0x1010400,0x1000000,0x1000000,0x400,0x1010004,0x10000,0x10400,0x1000004,0x400,0x4,0x1000404,0x10404,0x1010404,0x10004,0x1010000,0x1000404,0x1000004,0x404,0x10404,0x1010400,0x404,0x1000400,0x1000400,0,0x10004,0x10400,0,0x1010004]; -var spfunction2 = [-0x7fef7fe0,-0x7fff8000,0x8000,0x108020,0x100000,0x20,-0x7fefffe0,-0x7fff7fe0,-0x7fffffe0,-0x7fef7fe0,-0x7fef8000,-0x80000000,-0x7fff8000,0x100000,0x20,-0x7fefffe0,0x108000,0x100020,-0x7fff7fe0,0,-0x80000000,0x8000,0x108020,-0x7ff00000,0x100020,-0x7fffffe0,0,0x108000,0x8020,-0x7fef8000,-0x7ff00000,0x8020,0,0x108020,-0x7fefffe0,0x100000,-0x7fff7fe0,-0x7ff00000,-0x7fef8000,0x8000,-0x7ff00000,-0x7fff8000,0x20,-0x7fef7fe0,0x108020,0x20,0x8000,-0x80000000,0x8020,-0x7fef8000,0x100000,-0x7fffffe0,0x100020,-0x7fff7fe0,-0x7fffffe0,0x100020,0x108000,0,-0x7fff8000,0x8020,-0x80000000,-0x7fefffe0,-0x7fef7fe0,0x108000]; -var spfunction3 = [0x208,0x8020200,0,0x8020008,0x8000200,0,0x20208,0x8000200,0x20008,0x8000008,0x8000008,0x20000,0x8020208,0x20008,0x8020000,0x208,0x8000000,0x8,0x8020200,0x200,0x20200,0x8020000,0x8020008,0x20208,0x8000208,0x20200,0x20000,0x8000208,0x8,0x8020208,0x200,0x8000000,0x8020200,0x8000000,0x20008,0x208,0x20000,0x8020200,0x8000200,0,0x200,0x20008,0x8020208,0x8000200,0x8000008,0x200,0,0x8020008,0x8000208,0x20000,0x8000000,0x8020208,0x8,0x20208,0x20200,0x8000008,0x8020000,0x8000208,0x208,0x8020000,0x20208,0x8,0x8020008,0x20200]; -var spfunction4 = [0x802001,0x2081,0x2081,0x80,0x802080,0x800081,0x800001,0x2001,0,0x802000,0x802000,0x802081,0x81,0,0x800080,0x800001,0x1,0x2000,0x800000,0x802001,0x80,0x800000,0x2001,0x2080,0x800081,0x1,0x2080,0x800080,0x2000,0x802080,0x802081,0x81,0x800080,0x800001,0x802000,0x802081,0x81,0,0,0x802000,0x2080,0x800080,0x800081,0x1,0x802001,0x2081,0x2081,0x80,0x802081,0x81,0x1,0x2000,0x800001,0x2001,0x802080,0x800081,0x2001,0x2080,0x800000,0x802001,0x80,0x800000,0x2000,0x802080]; -var spfunction5 = [0x100,0x2080100,0x2080000,0x42000100,0x80000,0x100,0x40000000,0x2080000,0x40080100,0x80000,0x2000100,0x40080100,0x42000100,0x42080000,0x80100,0x40000000,0x2000000,0x40080000,0x40080000,0,0x40000100,0x42080100,0x42080100,0x2000100,0x42080000,0x40000100,0,0x42000000,0x2080100,0x2000000,0x42000000,0x80100,0x80000,0x42000100,0x100,0x2000000,0x40000000,0x2080000,0x42000100,0x40080100,0x2000100,0x40000000,0x42080000,0x2080100,0x40080100,0x100,0x2000000,0x42080000,0x42080100,0x80100,0x42000000,0x42080100,0x2080000,0,0x40080000,0x42000000,0x80100,0x2000100,0x40000100,0x80000,0,0x40080000,0x2080100,0x40000100]; -var spfunction6 = [0x20000010,0x20400000,0x4000,0x20404010,0x20400000,0x10,0x20404010,0x400000,0x20004000,0x404010,0x400000,0x20000010,0x400010,0x20004000,0x20000000,0x4010,0,0x400010,0x20004010,0x4000,0x404000,0x20004010,0x10,0x20400010,0x20400010,0,0x404010,0x20404000,0x4010,0x404000,0x20404000,0x20000000,0x20004000,0x10,0x20400010,0x404000,0x20404010,0x400000,0x4010,0x20000010,0x400000,0x20004000,0x20000000,0x4010,0x20000010,0x20404010,0x404000,0x20400000,0x404010,0x20404000,0,0x20400010,0x10,0x4000,0x20400000,0x404010,0x4000,0x400010,0x20004010,0,0x20404000,0x20000000,0x400010,0x20004010]; -var spfunction7 = [0x200000,0x4200002,0x4000802,0,0x800,0x4000802,0x200802,0x4200800,0x4200802,0x200000,0,0x4000002,0x2,0x4000000,0x4200002,0x802,0x4000800,0x200802,0x200002,0x4000800,0x4000002,0x4200000,0x4200800,0x200002,0x4200000,0x800,0x802,0x4200802,0x200800,0x2,0x4000000,0x200800,0x4000000,0x200800,0x200000,0x4000802,0x4000802,0x4200002,0x4200002,0x2,0x200002,0x4000000,0x4000800,0x200000,0x4200800,0x802,0x200802,0x4200800,0x802,0x4000002,0x4200802,0x4200000,0x200800,0,0x2,0x4200802,0,0x200802,0x4200000,0x800,0x4000002,0x4000800,0x800,0x200002]; -var spfunction8 = [0x10001040,0x1000,0x40000,0x10041040,0x10000000,0x10001040,0x40,0x10000000,0x40040,0x10040000,0x10041040,0x41000,0x10041000,0x41040,0x1000,0x40,0x10040000,0x10000040,0x10001000,0x1040,0x41000,0x40040,0x10040040,0x10041000,0x1040,0,0,0x10040040,0x10000040,0x10001000,0x41040,0x40000,0x41040,0x40000,0x10041000,0x1000,0x40,0x10040040,0x1000,0x41040,0x10001000,0x40,0x10000040,0x10040000,0x10040040,0x10000000,0x40000,0x10001040,0,0x10041040,0x40040,0x10000040,0x10040000,0x10001000,0x10001040,0,0x10041040,0x41000,0x41000,0x1040,0x1040,0x40040,0x10000000,0x10041000]; +const publish_createPublish = configure(api => { + /** + * @type {import('../types').PubsubAPI["publish"]} + */ + async function publish (topic, data, options = {}) { + const searchParams = toUrlSearchParams({ + arg: textToUrlSafeRpc(topic), + ...options + }) + + // allow aborting requests on body errors + const controller = new AbortController() + const signal = abortSignal(controller.signal, options.signal) + + const res = await api.post('pubsub/pub', { + signal, + searchParams, + ...( + await multipart_request_multipartRequest([data], controller, options.headers) + ) + }) + + await res.text() + } + return publish +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pubsub/subscribe.js + + + + + +const subscribe_log = logger('js-kubo-rpc-client:pubsub:subscribe') /** - * Create necessary sub keys. - * - * @param key the 64-bit or 192-bit key. - * - * @return the expanded keys. + * @param {import('../types').Options} options + * @param {import('./subscription-tracker').SubscriptionTracker} subsTracker */ -function _createKeys(key) { - var pc2bytes0 = [0,0x4,0x20000000,0x20000004,0x10000,0x10004,0x20010000,0x20010004,0x200,0x204,0x20000200,0x20000204,0x10200,0x10204,0x20010200,0x20010204], - pc2bytes1 = [0,0x1,0x100000,0x100001,0x4000000,0x4000001,0x4100000,0x4100001,0x100,0x101,0x100100,0x100101,0x4000100,0x4000101,0x4100100,0x4100101], - pc2bytes2 = [0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808,0,0x8,0x800,0x808,0x1000000,0x1000008,0x1000800,0x1000808], - pc2bytes3 = [0,0x200000,0x8000000,0x8200000,0x2000,0x202000,0x8002000,0x8202000,0x20000,0x220000,0x8020000,0x8220000,0x22000,0x222000,0x8022000,0x8222000], - pc2bytes4 = [0,0x40000,0x10,0x40010,0,0x40000,0x10,0x40010,0x1000,0x41000,0x1010,0x41010,0x1000,0x41000,0x1010,0x41010], - pc2bytes5 = [0,0x400,0x20,0x420,0,0x400,0x20,0x420,0x2000000,0x2000400,0x2000020,0x2000420,0x2000000,0x2000400,0x2000020,0x2000420], - pc2bytes6 = [0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002,0,0x10000000,0x80000,0x10080000,0x2,0x10000002,0x80002,0x10080002], - pc2bytes7 = [0,0x10000,0x800,0x10800,0x20000000,0x20010000,0x20000800,0x20010800,0x20000,0x30000,0x20800,0x30800,0x20020000,0x20030000,0x20020800,0x20030800], - pc2bytes8 = [0,0x40000,0,0x40000,0x2,0x40002,0x2,0x40002,0x2000000,0x2040000,0x2000000,0x2040000,0x2000002,0x2040002,0x2000002,0x2040002], - pc2bytes9 = [0,0x10000000,0x8,0x10000008,0,0x10000000,0x8,0x10000008,0x400,0x10000400,0x408,0x10000408,0x400,0x10000400,0x408,0x10000408], - pc2bytes10 = [0,0x20,0,0x20,0x100000,0x100020,0x100000,0x100020,0x2000,0x2020,0x2000,0x2020,0x102000,0x102020,0x102000,0x102020], - pc2bytes11 = [0,0x1000000,0x200,0x1000200,0x200000,0x1200000,0x200200,0x1200200,0x4000000,0x5000000,0x4000200,0x5000200,0x4200000,0x5200000,0x4200200,0x5200200], - pc2bytes12 = [0,0x1000,0x8000000,0x8001000,0x80000,0x81000,0x8080000,0x8081000,0x10,0x1010,0x8000010,0x8001010,0x80010,0x81010,0x8080010,0x8081010], - pc2bytes13 = [0,0x4,0x100,0x104,0,0x4,0x100,0x104,0x1,0x5,0x101,0x105,0x1,0x5,0x101,0x105]; +const createSubscribe = (options, subsTracker) => { + return configure((api) => { + /** + * @type {import('../types').PubsubAPI["subscribe"]} + */ + async function subscribe (topic, handler, options = {}) { // eslint-disable-line require-await + options.signal = subsTracker.subscribe(topic, handler, options.signal) - // how many iterations (1 for des, 3 for triple des) - // changed by Paul 16/6/2007 to use Triple DES for 9+ byte keys - var iterations = key.length() > 8 ? 3 : 1; + /** @type {(value?: any) => void} */ + let done + /** @type {(error: Error) => void} */ + let fail - // stores the return keys - var keys = []; + const result = new Promise((resolve, reject) => { + done = resolve + fail = reject + }) - // now define the left shifts which need to be done - var shifts = [0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0]; + // In Firefox, the initial call to fetch does not resolve until some data + // is received. If this doesn't happen within 1 second assume success + const ffWorkaround = setTimeout(() => done(), 1000) - var n = 0, tmp; - for(var j = 0; j < iterations; j++) { - var left = key.getInt32(); - var right = key.getInt32(); + // Do this async to not block Firefox + api.post('pubsub/sub', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: textToUrlSafeRpc(topic), + ...options + }), + headers: options.headers + }) + .catch((err) => { + // Initial subscribe fail, ensure we clean up + subsTracker.unsubscribe(topic, handler) - tmp = ((left >>> 4) ^ right) & 0x0f0f0f0f; - right ^= tmp; - left ^= (tmp << 4); + fail(err) + }) + .then((response) => { + clearTimeout(ffWorkaround) - tmp = ((right >>> -16) ^ left) & 0x0000ffff; - left ^= tmp; - right ^= (tmp << -16); + if (!response) { + // if there was no response, the subscribe failed + return + } - tmp = ((left >>> 2) ^ right) & 0x33333333; - right ^= tmp; - left ^= (tmp << 2); + readMessages(response, { + onMessage: (message) => { + if (!handler) { + return + } - tmp = ((right >>> -16) ^ left) & 0x0000ffff; - left ^= tmp; - right ^= (tmp << -16); + if (typeof handler === 'function') { + handler(message) + return + } - tmp = ((left >>> 1) ^ right) & 0x55555555; - right ^= tmp; - left ^= (tmp << 1); + if (typeof handler.handleEvent === 'function') { + handler.handleEvent(message) + } + }, + onEnd: () => subsTracker.unsubscribe(topic, handler), + onError: options.onError + }) - tmp = ((right >>> 8) ^ left) & 0x00ff00ff; - left ^= tmp; - right ^= (tmp << 8); + done() + }) - tmp = ((left >>> 1) ^ right) & 0x55555555; - right ^= tmp; - left ^= (tmp << 1); + return result + } + return subscribe + })(options) +} - // right needs to be shifted and OR'd with last four bits of left - tmp = (left << 8) | ((right >>> 20) & 0x000000f0); +/** + * @param {import('../types').ExtendedResponse} response + * @param {object} options + * @param {(message: import('../types').Message) => void} options.onMessage + * @param {() => void} options.onEnd + * @param {import('../types').PubsubApiErrorHandlerFn} [options.onError] + */ +async function readMessages (response, { onMessage, onEnd, onError }) { + onError = onError || subscribe_log - // left needs to be put upside down - left = ((right << 24) | ((right << 8) & 0xff0000) | - ((right >>> 8) & 0xff00) | ((right >>> 24) & 0xf0)); - right = tmp; + try { + for await (const msg of response.ndjson()) { + try { + if (!msg.from) { + // eslint-disable-next-line no-continue + continue + } - // now go through and perform these shifts on the left and right keys - for(var i = 0; i < shifts.length; ++i) { - //shift the keys either one or two bits to the left - if(shifts[i]) { - left = (left << 2) | (left >>> 26); - right = (right << 2) | (right >>> 26); - } else { - left = (left << 1) | (left >>> 27); - right = (right << 1) | (right >>> 27); + if (msg.from != null && msg.seqno != null) { + onMessage({ + type: 'signed', + from: peerIdFromString(msg.from), + data: rpcToBytes(msg.data), + sequenceNumber: rpcToBigInt(msg.seqno), + topic: rpcToText(msg.topicIDs[0]), + key: rpcToBytes(msg.key ?? 'u'), + signature: rpcToBytes(msg.signature ?? 'u') + }) + } else { + onMessage({ + type: 'unsigned', + data: rpcToBytes(msg.data), + topic: rpcToText(msg.topicIDs[0]) + }) + } + } catch (/** @type {any} */ err) { + err.message = `Failed to parse pubsub message: ${err.message}` + onError(err, false, msg) // Not fatal } - left &= -0xf; - right &= -0xf; - - // now apply PC-2, in such a way that E is easier when encrypting or - // decrypting this conversion will look like PC-2 except only the last 6 - // bits of each byte are used rather than 48 consecutive bits and the - // order of lines will be according to how the S selection functions will - // be applied: S2, S4, S6, S8, S1, S3, S5, S7 - var lefttmp = ( - pc2bytes0[left >>> 28] | pc2bytes1[(left >>> 24) & 0xf] | - pc2bytes2[(left >>> 20) & 0xf] | pc2bytes3[(left >>> 16) & 0xf] | - pc2bytes4[(left >>> 12) & 0xf] | pc2bytes5[(left >>> 8) & 0xf] | - pc2bytes6[(left >>> 4) & 0xf]); - var righttmp = ( - pc2bytes7[right >>> 28] | pc2bytes8[(right >>> 24) & 0xf] | - pc2bytes9[(right >>> 20) & 0xf] | pc2bytes10[(right >>> 16) & 0xf] | - pc2bytes11[(right >>> 12) & 0xf] | pc2bytes12[(right >>> 8) & 0xf] | - pc2bytes13[(right >>> 4) & 0xf]); - tmp = ((righttmp >>> 16) ^ lefttmp) & 0x0000ffff; - keys[n++] = lefttmp ^ tmp; - keys[n++] = righttmp ^ (tmp << 16); } + } catch (/** @type {any} */ err) { + if (!isAbortError(err)) { + onError(err, true) // Fatal + } + } finally { + onEnd() } +} - return keys; +/** + * @param {Error & {type?:string}} error + * @returns {boolean} + */ +const isAbortError = error => { + switch (error.type) { + case 'aborted': + return true + // It is `abort` in Electron instead of `aborted` + case 'abort': + return true + default: + // FIXME: In testing with Chrome, err.type is undefined (should not be!) + // Temporarily use the name property instead. + return error.name === 'AbortError' + } } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pubsub/unsubscribe.js + /** - * Updates a single block (1 byte) using DES. The update will either - * encrypt or decrypt the block. - * - * @param keys the expanded keys. - * @param input the input block (an array of 32-bit words). - * @param output the updated output block. - * @param decrypt true to decrypt the block, false to encrypt it. + * @param {import('..').Options} options + * @param {import('./subscription-tracker').SubscriptionTracker} subsTracker */ -function _updateBlock(keys, input, output, decrypt) { - // set up loops for single or triple DES - var iterations = keys.length === 32 ? 3 : 9; - var looping; - if(iterations === 3) { - looping = decrypt ? [30, -2, -2] : [0, 32, 2]; - } else { - looping = (decrypt ? - [94, 62, -2, 32, 64, 2, 30, -2, -2] : - [0, 32, 2, 62, 30, -2, 64, 96, 2]); +const createUnsubscribe = (options, subsTracker) => { + /** + * @type {import('../types').PubsubAPI["unsubscribe"]} + */ + async function unsubscribe (topic, handler) { + subsTracker.unsubscribe(topic, handler) } + return unsubscribe +} - var tmp; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pubsub/subscription-tracker.js - var left = input[0]; - var right = input[1]; +/** + * + * @property {import('../types').MessageHandlerFn} handler + * @property {AbortController} controller + */ - // first each 64 bit chunk of the message must be permuted according to IP - tmp = ((left >>> 4) ^ right) & 0x0f0f0f0f; - right ^= tmp; - left ^= (tmp << 4); +class SubscriptionTracker { + constructor () { + /** @type {Map} */ + this._subs = new Map() + } - tmp = ((left >>> 16) ^ right) & 0x0000ffff; - right ^= tmp; - left ^= (tmp << 16); + /** + * @param {string} topic + * @param {import('../types').MessageHandlerFn} handler + * @param {AbortSignal} [signal] + * @returns {AbortSignal} + */ + subscribe (topic, handler, signal) { + const topicSubs = this._subs.get(topic) || [] - tmp = ((right >>> 2) ^ left) & 0x33333333; - left ^= tmp; - right ^= (tmp << 2); + if (topicSubs.find(s => s.handler === handler)) { + throw new Error(`Already subscribed to ${topic} with this handler`) + } - tmp = ((right >>> 8) ^ left) & 0x00ff00ff; - left ^= tmp; - right ^= (tmp << 8); + // Create controller so a call to unsubscribe can cancel the request + const controller = new AbortController() - tmp = ((left >>> 1) ^ right) & 0x55555555; - right ^= tmp; - left ^= (tmp << 1); + this._subs.set(topic, [{ handler, controller }].concat(topicSubs)) - // rotate left 1 bit - left = ((left << 1) | (left >>> 31)); - right = ((right << 1) | (right >>> 31)); + // If there is an external signal, forward the abort event + if (signal) { + signal.addEventListener('abort', () => this.unsubscribe(topic, handler)) + } - for(var j = 0; j < iterations; j += 3) { - var endloop = looping[j + 1]; - var loopinc = looping[j + 2]; + return controller.signal + } - // now go through and perform the encryption or decryption - for(var i = looping[j]; i != endloop; i += loopinc) { - var right1 = right ^ keys[i]; - var right2 = ((right >>> 4) | (right << 28)) ^ keys[i + 1]; + /** + * @param {string} topic + * @param {import('../types').MessageHandlerFn} [handler] + */ + unsubscribe (topic, handler) { + const subs = this._subs.get(topic) || [] + let unsubs - // passing these bytes through the S selection functions - tmp = left; - left = right; - right = tmp ^ ( - spfunction2[(right1 >>> 24) & 0x3f] | - spfunction4[(right1 >>> 16) & 0x3f] | - spfunction6[(right1 >>> 8) & 0x3f] | - spfunction8[right1 & 0x3f] | - spfunction1[(right2 >>> 24) & 0x3f] | - spfunction3[(right2 >>> 16) & 0x3f] | - spfunction5[(right2 >>> 8) & 0x3f] | - spfunction7[right2 & 0x3f]); + if (handler) { + this._subs.set(topic, subs.filter(s => s.handler !== handler)) + unsubs = subs.filter(s => s.handler === handler) + } else { + this._subs.set(topic, []) + unsubs = subs } - // unreverse left and right - tmp = left; - left = right; - right = tmp; + + if (!(this._subs.get(topic) || []).length) { + this._subs.delete(topic) + } + + unsubs.forEach(s => s.controller.abort()) } +} - // rotate right 1 bit - left = ((left >>> 1) | (left << 31)); - right = ((right >>> 1) | (right << 31)); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/pubsub/index.js - // now perform IP-1, which is IP in the opposite direction - tmp = ((left >>> 1) ^ right) & 0x55555555; - right ^= tmp; - left ^= (tmp << 1); - tmp = ((right >>> 8) ^ left) & 0x00ff00ff; - left ^= tmp; - right ^= (tmp << 8); - tmp = ((right >>> 2) ^ left) & 0x33333333; - left ^= tmp; - right ^= (tmp << 2); - tmp = ((left >>> 16) ^ right) & 0x0000ffff; - right ^= tmp; - left ^= (tmp << 16); - tmp = ((left >>> 4) ^ right) & 0x0f0f0f0f; - right ^= tmp; - left ^= (tmp << 4); - output[0] = left; - output[1] = right; -} /** - * Deprecated. Instead, use: - * - * forge.cipher.createCipher('DES-', key); - * forge.cipher.createDecipher('DES-', key); - * - * Creates a deprecated DES cipher object. This object's mode will default to - * CBC (cipher-block-chaining). - * - * The key may be given as a binary-encoded string of bytes or a byte buffer. - * - * @param options the options to use. - * key the symmetric key to use (64 or 192 bits). - * output the buffer to write to. - * decrypt true for decryption, false for encryption. - * mode the cipher mode to use (default: 'CBC'). - * - * @return the cipher. + * @param {import('../types').Options} config */ -function _createCipher(options) { - options = options || {}; - var mode = (options.mode || 'CBC').toUpperCase(); - var algorithm = 'DES-' + mode; +function pubsub_createPubsub (config) { + const subscriptionTracker = new SubscriptionTracker() - var cipher; - if(options.decrypt) { - cipher = forge.cipher.createDecipher(algorithm, options.key); - } else { - cipher = forge.cipher.createCipher(algorithm, options.key); + return { + ls: pubsub_ls_createLs(config), + peers: createPeers(config), + publish: publish_createPublish(config), + subscribe: createSubscribe(config, subscriptionTracker), + unsubscribe: createUnsubscribe(config, subscriptionTracker) } +} - // backwards compatible start API - var start = cipher.start; - cipher.start = function(iv, options) { - // backwards compatibility: support second arg as output buffer - var output = null; - if(options instanceof forge.util.ByteBuffer) { - output = options; - options = {}; - } - options = options || {}; - options.output = output; - options.iv = iv; - start.call(cipher, options); - }; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/refs/local.js - return cipher; -} -/***/ }), -/***/ 96630: -/***/ ((module) => { +const createLocal = configure(api => { + /** + * @type {import('../types').RefsAPI["local"]} + */ + async function * refsLocal (options = {}) { + const res = await api.post('refs/local', { + signal: options.signal, + transform: objectToCamel, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) -/** - * Node.js module for Forge. - * - * @author Dave Longley - * - * Copyright 2011-2016 Digital Bazaar, Inc. - */ -module.exports = { - // default options - options: { - usePureJavaScript: false + yield * res.ndjson() } -}; + return refsLocal +}) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/refs/index.js -/***/ }), -/***/ 46773: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Hash-based Message Authentication Code implementation. Requires a message - * digest object that can be obtained, for example, from forge.md.sha1 or - * forge.md.md5. - * - * @author Dave Longley - * - * Copyright (c) 2010-2012 Digital Bazaar, Inc. All rights reserved. - */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(80554); -__nccwpck_require__(36536); -/* HMAC API */ -var hmac = module.exports = forge.hmac = forge.hmac || {}; -/** - * Creates an HMAC object that uses the given message digest object. - * - * @return an HMAC object. - */ -hmac.create = function() { - // the hmac key to use - var _key = null; - // the message digest to use - var _md = null; +const createRefs = configure((api, opts) => { + /** + * @type {import('../types').RefsAPI["refs"]} + */ + const refs = async function * (args, options = {}) { + /** @type {import('../types').IPFSPath[]} */ + const argsArr = Array.isArray(args) ? args : [args] - // the inner padding - var _ipadding = null; + const res = await api.post('refs', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: argsArr.map(arg => `${arg instanceof Uint8Array ? node_modules_multiformats_src_cid_CID.decode(arg) : arg}`), + ...options + }), + headers: options.headers, + transform: objectToCamel + }) - // the outer padding - var _opadding = null; + yield * res.ndjson() + } - // hmac context - var ctx = {}; + return Object.assign(refs, { + local: createLocal(opts) + }) +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/repo/gc.js + + + +const createGc = configure(api => { /** - * Starts or restarts the HMAC with the given key and message digest. - * - * @param md the message digest to use, null to reuse the previous one, - * a string to use builtin 'sha1', 'md5', 'sha256'. - * @param key the key to use as a string, array of bytes, byte buffer, - * or null to reuse the previous key. + * @type {import('../types').RepoAPI["gc"]} */ - ctx.start = function(md, key) { - if(md !== null) { - if(typeof md === 'string') { - // create builtin message digest - md = md.toLowerCase(); - if(md in forge.md.algorithms) { - _md = forge.md.algorithms[md].create(); - } else { - throw new Error('Unknown hash algorithm "' + md + '"'); + async function * gc (options = {}) { + const res = await api.post('repo/gc', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers, + transform: (res) => { + return { + err: res.Error ? new Error(res.Error) : null, + cid: (res.Key || {})['/'] ? node_modules_multiformats_src_cid_CID.parse(res.Key['/']) : null } - } else { - // store message digest - _md = md; } - } + }) - if(key === null) { - // reuse previous key - key = _key; - } else { - if(typeof key === 'string') { - // convert string into byte buffer - key = forge.util.createBuffer(key); - } else if(forge.util.isArray(key)) { - // convert byte array into byte buffer - var tmp = key; - key = forge.util.createBuffer(); - for(var i = 0; i < tmp.length; ++i) { - key.putByte(tmp[i]); - } - } + yield * res.ndjson() + } + return gc +}) - // if key is longer than blocksize, hash it - var keylen = key.length(); - if(keylen > _md.blockLength) { - _md.start(); - _md.update(key.bytes()); - key = _md.digest(); - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/repo/stat.js - // mix key into inner and outer padding - // ipadding = [0x36 * blocksize] ^ key - // opadding = [0x5C * blocksize] ^ key - _ipadding = forge.util.createBuffer(); - _opadding = forge.util.createBuffer(); - keylen = key.length(); - for(var i = 0; i < keylen; ++i) { - var tmp = key.at(i); - _ipadding.putByte(0x36 ^ tmp); - _opadding.putByte(0x5C ^ tmp); - } - // if key is shorter than blocksize, add additional padding - if(keylen < _md.blockLength) { - var tmp = _md.blockLength - keylen; - for(var i = 0; i < tmp; ++i) { - _ipadding.putByte(0x36); - _opadding.putByte(0x5C); - } - } - _key = key; - _ipadding = _ipadding.bytes(); - _opadding = _opadding.bytes(); + +const repo_stat_createStat = configure(api => { + /** + * @type {import('../types').RepoAPI["stat"]} + */ + async function stat (options = {}) { + const res = await api.post('repo/stat', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + const data = await res.json() + + return { + numObjects: BigInt(data.NumObjects), + repoSize: BigInt(data.RepoSize), + repoPath: data.RepoPath, + version: data.Version, + storageMax: BigInt(data.StorageMax) } + } + return stat +}) - // digest is done like so: hash(opadding | hash(ipadding | message)) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/repo/version.js - // prepare to do inner hash - // hash(ipadding | message) - _md.start(); - _md.update(_ipadding); - }; - /** - * Updates the HMAC with the given message bytes. - * - * @param bytes the bytes to update with. - */ - ctx.update = function(bytes) { - _md.update(bytes); - }; +const createVersion = configure(api => { /** - * Produces the Message Authentication Code (MAC). - * - * @return a byte buffer containing the digest value. + * @type {import('../types').RepoAPI["version"]} */ - ctx.getMac = function() { - // digest is done like so: hash(opadding | hash(ipadding | message)) - // here we do the outer hashing - var inner = _md.digest().bytes(); - _md.start(); - _md.update(_opadding); - _md.update(inner); - return _md.digest(); - }; - // alias for getMac - ctx.digest = ctx.getMac; + async function version (options = {}) { + const res = await (await api.post('repo/version', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + })).json() - return ctx; -}; + return res.Version + } + return version +}) +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/repo/index.js -/***/ }), -/***/ 121: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -// Copyright (c) 2005 Tom Wu -// All Rights Reserved. -// See "LICENSE" for details. -// Basic JavaScript BN library - subset useful for RSA encryption. +/** + * @param {import('../types').Options} config + */ +function createRepo (config) { + return { + gc: createGc(config), + stat: repo_stat_createStat(config), + version: createVersion(config) + } +} -/* -Licensing (LICENSE) -------------------- +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/stats/bw.js -This software is covered under the following copyright: -*/ -/* - * Copyright (c) 2003-2005 Tom Wu - * All Rights Reserved. - * - * 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" AND WITHOUT WARRANTY OF ANY KIND, - * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY - * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. - * - * IN NO EVENT SHALL TOM WU BE LIABLE FOR ANY SPECIAL, INCIDENTAL, - * INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF - * THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * In addition, the following condition applies: - * - * All redistributions must retain an intact copy of this copyright notice - * and disclaimer. - */ -/* -Address all questions regarding this license to: - Tom Wu - tjw@cs.Stanford.EDU -*/ -var forge = __nccwpck_require__(96630); -module.exports = forge.jsbn = forge.jsbn || {}; +const createBw = configure(api => { + /** + * @type {import('../types').StatsAPI["bw"]} + */ + async function * bw (options = {}) { + const res = await api.post('stats/bw', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers, + transform: (stats) => ({ + totalIn: BigInt(stats.TotalIn), + totalOut: BigInt(stats.TotalOut), + rateIn: parseFloat(stats.RateIn), + rateOut: parseFloat(stats.RateOut) + }) + }) -// Bits per digit -var dbits; + yield * res.ndjson() + } + return bw +}) -// JavaScript engine analysis -var canary = 0xdeadbeefcafe; -var j_lm = ((canary&0xffffff)==0xefcafe); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/stats/index.js -// (public) Constructor -function BigInteger(a,b,c) { - this.data = []; - if(a != null) - if("number" == typeof a) this.fromNumber(a,b,c); - else if(b == null && "string" != typeof a) this.fromString(a,256); - else this.fromString(a,b); -} -forge.jsbn.BigInteger = BigInteger; -// return new, unset BigInteger -function nbi() { return new BigInteger(null); } -// am: Compute w_j += (x*this_i), propagate carries, -// c is initial carry, returns final carry. -// c < 3*dvalue, x < 2*dvalue, this_i < dvalue -// We need to select the fastest one that works in this environment. -// am1: use a single mult and divide to get the high bits, -// max digit bits should be 26 because -// max internal value = 2*dvalue^2-2*dvalue (< 2^53) -function am1(i,x,w,j,c,n) { - while(--n >= 0) { - var v = x*this.data[i++]+w.data[j]+c; - c = Math.floor(v/0x4000000); - w.data[j++] = v&0x3ffffff; - } - return c; -} -// am2 avoids a big mult-and-extract completely. -// Max digit bits should be <= 30 because we do bitwise ops -// on values up to 2*hdvalue^2-hdvalue-1 (< 2^31) -function am2(i,x,w,j,c,n) { - var xl = x&0x7fff, xh = x>>15; - while(--n >= 0) { - var l = this.data[i]&0x7fff; - var h = this.data[i++]>>15; - var m = xh*l+h*xl; - l = xl*l+((m&0x7fff)<<15)+w.data[j]+(c&0x3fffffff); - c = (l>>>30)+(m>>>15)+xh*h+(c>>>30); - w.data[j++] = l&0x3fffffff; - } - return c; -} -// Alternately, set max digit bits to 28 since some -// browsers slow down when dealing with 32-bit numbers. -function am3(i,x,w,j,c,n) { - var xl = x&0x3fff, xh = x>>14; - while(--n >= 0) { - var l = this.data[i]&0x3fff; - var h = this.data[i++]>>14; - var m = xh*l+h*xl; - l = xl*l+((m&0x3fff)<<14)+w.data[j]+c; - c = (l>>28)+(m>>14)+xh*h; - w.data[j++] = l&0xfffffff; +/** + * @param {import('../types').Options} config + */ +function createStats (config) { + return { + bitswap: createStat(config), + repo: repo_stat_createStat(config), + bw: createBw(config) } - return c; } -// node.js (no browser) -if(typeof(navigator) === 'undefined') -{ - BigInteger.prototype.am = am3; - dbits = 28; -} else if(j_lm && (navigator.appName == "Microsoft Internet Explorer")) { - BigInteger.prototype.am = am2; - dbits = 30; -} else if(j_lm && (navigator.appName != "Netscape")) { - BigInteger.prototype.am = am1; - dbits = 26; -} else { // Mozilla/Netscape seems to prefer am3 - BigInteger.prototype.am = am3; - dbits = 28; -} +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/swarm/addrs.js -BigInteger.prototype.DB = dbits; -BigInteger.prototype.DM = ((1<= 0; --i) r.data[i] = this.data[i]; - r.t = this.t; - r.s = this.s; -} +const createAddrs = configure(api => { + /** + * @type {import('../types.js').SwarmAPI["addrs"]} + */ + async function addrs (options = {}) { + const res = await api.post('swarm/addrs', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) -// (protected) set from integer value x, -DV <= x < DV -function bnpFromInt(x) { - this.t = 1; - this.s = (x<0)?-1:0; - if(x > 0) this.data[0] = x; - else if(x < -1) this.data[0] = x+this.DV; - else this.t = 0; -} + /** @type {{ Addrs: Record }} */ + const { Addrs } = await res.json() -// return bigint initialized to value -function nbv(i) { var r = nbi(); r.fromInt(i); return r; } + return Object.keys(Addrs).map(id => ({ + id: peerIdFromString(id), + addrs: (Addrs[id] || []).map(a => src_multiaddr(a)) + })) + } + return addrs +}) -// (protected) set from string and radix -function bnpFromString(s,b) { - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 256) k = 8; // byte array - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else { this.fromRadix(s,b); return; } - this.t = 0; - this.s = 0; - var i = s.length, mi = false, sh = 0; - while(--i >= 0) { - var x = (k==8)?s[i]&0xff:intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-") mi = true; - continue; - } - mi = false; - if(sh == 0) - this.data[this.t++] = x; - else if(sh+k > this.DB) { - this.data[this.t-1] |= (x&((1<<(this.DB-sh))-1))<>(this.DB-sh)); - } else - this.data[this.t-1] |= x<= this.DB) sh -= this.DB; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/swarm/connect.js + + + +const createConnect = configure(api => { + /** + * @type {import('../types').SwarmAPI["connect"]} + */ + async function connect (addr, options = {}) { + const res = await api.post('swarm/connect', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: addr, + ...options + }), + headers: options.headers + }) + const { Strings } = await res.json() + + return Strings || [] } - if(k == 8 && (s[0]&0x80) != 0) { - this.s = -1; - if(sh > 0) this.data[this.t-1] |= ((1<<(this.DB-sh))-1)< { + /** + * @type {import('../types').SwarmAPI["disconnect"]} + */ + async function disconnect (addr, options = {}) { + const res = await api.post('swarm/disconnect', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: addr, + ...options + }), + headers: options.headers + }) + const { Strings } = await res.json() + + return Strings || [] } - this.clamp(); - if(mi) BigInteger.ZERO.subTo(this,this); -} + return disconnect +}) -// (protected) clamp off excess high words -function bnpClamp() { - var c = this.s&this.DM; - while(this.t > 0 && this.data[this.t-1] == c) --this.t; -} +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/swarm/local-addrs.js -// (public) return string representation in given radix -function bnToString(b) { - if(this.s < 0) return "-"+this.negate().toString(b); - var k; - if(b == 16) k = 4; - else if(b == 8) k = 3; - else if(b == 2) k = 1; - else if(b == 32) k = 5; - else if(b == 4) k = 2; - else return this.toRadix(b); - var km = (1< 0) { - if(p < this.DB && (d = this.data[i]>>p) > 0) { m = true; r = int2char(d); } - while(i >= 0) { - if(p < k) { - d = (this.data[i]&((1<>(p+=this.DB-k); - } else { - d = (this.data[i]>>(p-=k))&km; - if(p <= 0) { p += this.DB; --i; } - } - if(d > 0) m = true; - if(m) r += int2char(d); - } + + + +const createLocalAddrs = configure(api => { + /** + * @type {import('../types.js').SwarmAPI["localAddrs"]} + */ + async function localAddrs (options = {}) { + const res = await api.post('swarm/addrs/local', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + + /** @type {{ Strings: string[] }} */ + const { Strings } = await res.json() + + return (Strings || []).map(a => src_multiaddr(a)) } - return m?r:"0"; -} + return localAddrs +}) -// (public) -this -function bnNegate() { var r = nbi(); BigInteger.ZERO.subTo(this,r); return r; } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/swarm/peers.js -// (public) |this| -function bnAbs() { return (this.s<0)?this.negate():this; } -// (public) return + if this > a, - if this < a, 0 if equal -function bnCompareTo(a) { - var r = this.s-a.s; - if(r != 0) return r; - var i = this.t; - r = i-a.t; - if(r != 0) return (this.s<0)?-r:r; - while(--i >= 0) if((r=this.data[i]-a.data[i]) != 0) return r; - return 0; -} -// returns bit length of the integer x -function nbits(x) { - var r = 1, t; - if((t=x>>>16) != 0) { x = t; r += 16; } - if((t=x>>8) != 0) { x = t; r += 8; } - if((t=x>>4) != 0) { x = t; r += 4; } - if((t=x>>2) != 0) { x = t; r += 2; } - if((t=x>>1) != 0) { x = t; r += 1; } - return r; -} -// (public) return the number of bits in "this" -function bnBitLength() { - if(this.t <= 0) return 0; - return this.DB*(this.t-1)+nbits(this.data[this.t-1]^(this.s&this.DM)); -} -// (protected) r = this << n*DB -function bnpDLShiftTo(n,r) { - var i; - for(i = this.t-1; i >= 0; --i) r.data[i+n] = this.data[i]; - for(i = n-1; i >= 0; --i) r.data[i] = 0; - r.t = this.t+n; - r.s = this.s; -} +const peers_createPeers = configure(api => { + /** + * @type {import('../types').SwarmAPI["peers"]} + */ + async function peers (options = {}) { + const res = await api.post('swarm/peers', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) -// (protected) r = this >> n*DB -function bnpDRShiftTo(n,r) { - for(var i = n; i < this.t; ++i) r.data[i-n] = this.data[i]; - r.t = Math.max(this.t-n,0); - r.s = this.s; -} + /** @type {{ Peers: { Peer: string, Addr: string, Muxer?: string, Latency?: string, Streams?: string[], Direction?: 0 | 1 }[] }} */ + const { Peers } = await res.json() -// (protected) r = this << n -function bnpLShiftTo(n,r) { - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<= 0; --i) { - r.data[i+ds+1] = (this.data[i]>>cbs)|c; - c = (this.data[i]&bm)< { + return { + addr: src_multiaddr(peer.Addr), + peer: peerIdFromString(peer.Peer), + muxer: peer.Muxer, + latency: peer.Latency, + streams: peer.Streams, + // eslint-disable-next-line no-nested-ternary + direction: peer.Direction == null ? undefined : peer.Direction === 0 ? 'inbound' : 'outbound' + } + }) } - for(i = ds-1; i >= 0; --i) r.data[i] = 0; - r.data[ds] = c; - r.t = this.t+ds+1; - r.s = this.s; - r.clamp(); -} + return peers +}) -// (protected) r = this >> n -function bnpRShiftTo(n,r) { - r.s = this.s; - var ds = Math.floor(n/this.DB); - if(ds >= this.t) { r.t = 0; return; } - var bs = n%this.DB; - var cbs = this.DB-bs; - var bm = (1<>bs; - for(var i = ds+1; i < this.t; ++i) { - r.data[i-ds-1] |= (this.data[i]&bm)<>bs; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/swarm/index.js + + + + + + +/** + * @param {import('../types').Options} config + * @returns {import('../types').IPFS['swarm']} + */ +function createSwarm (config) { + return { + addrs: createAddrs(config), + connect: createConnect(config), + disconnect: createDisconnect(config), + localAddrs: createLocalAddrs(config), + peers: peers_createPeers(config) } - if(bs > 0) r.data[this.t-ds-1] |= (this.s&bm)<>= this.DB; - } - if(a.t < this.t) { - c -= a.s; - while(i < this.t) { - c += this.data[i]; - r.data[i++] = c&this.DM; - c >>= this.DB; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/add-all.js + + + + + + + +const add_all_createAddAll = configure((api) => { + /** + * @type {import('./types.js').RootAPI["addAll"]} + */ + async function * addAll (source, options = {}) { + // allow aborting requests on body errors + const controller = new AbortController() + const signal = abortSignal(controller.signal, options.signal) + const { headers, body, total, parts } = + await multipart_request_multipartRequest(source, controller, options.headers) + + // In browser response body only starts streaming once upload is + // complete, at which point all the progress updates are invalid. If + // length of the content is computable we can interpret progress from + // `{ total, loaded}` passed to `onUploadProgress` and `multipart.total` + // in which case we disable progress updates to be written out. + const [progressFn, onUploadProgress] = typeof options.progress === 'function' + ? createProgressHandler(total, parts, options.progress) + : [undefined, undefined] + + const res = await api.post('add', { + searchParams: toUrlSearchParams({ + 'stream-channels': true, + ...options, + progress: Boolean(progressFn) + }), + onUploadProgress, + signal, + headers, + body + }) + + for await (let file of res.ndjson()) { + file = objectToCamel(file) + + if (file.hash !== undefined) { + yield add_all_toCoreInterface(file) + } else if (progressFn) { + progressFn(file.bytes || 0, file.name) + } } - c += this.s; - } else { - c += this.s; - while(i < a.t) { - c -= a.data[i]; - r.data[i++] = c&this.DM; - c >>= this.DB; + } + return addAll +}) + +/** + * Returns simple progress callback when content length isn't computable or a + * progress event handler that calculates progress from upload progress events. + * + * @param {number} total + * @param {{name:string, start:number, end:number}[]|null} parts + * @param {import('./types.js').IPFSCoreAddProgressFn} progress + * @returns {[import('./types.js').IPFSCoreAddProgressFn|undefined, import('./types.js').IPFSUtilsHttpUploadProgressFn|undefined]} + */ +const createProgressHandler = (total, parts, progress) => + parts ? [undefined, createOnUploadProgress(total, parts, progress)] : [progress, undefined] + +/** + * Creates a progress handler that interpolates progress from upload progress + * events and total size of the content that is added. + * + * @param {number} size - actual content size + * @param {{name:string, start:number, end:number}[]} parts + * @param {import('./types.js').IPFSCoreAddProgressFn} progress + * @returns {import('./types.js').IPFSUtilsHttpUploadProgressFn} + */ +const createOnUploadProgress = (size, parts, progress) => { + let index = 0 + const count = parts.length + return ({ loaded, total }) => { + // Derive position from the current progress. + const position = Math.floor(loaded / total * size) + while (index < count) { + const { start, end, name } = parts[index] + // If within current part range report progress and break the loop + if (position < end) { + progress(position - start, name) + break + // If passed current part range report final byte for the chunk and + // move to next one. + } else { + progress(end - start, name) + index += 1 + } } - c -= a.s; } - r.s = (c<0)?-1:0; - if(c < -1) r.data[i++] = this.DV+c; - else if(c > 0) r.data[i++] = c; - r.t = i; - r.clamp(); } -// (protected) r = this * a, r != this,a (HAC 14.12) -// "this" should be the larger one if appropriate. -function bnpMultiplyTo(a,r) { - var x = this.abs(), y = a.abs(); - var i = x.t; - r.t = i+y.t; - while(--i >= 0) r.data[i] = 0; - for(i = 0; i < y.t; ++i) r.data[i+x.t] = x.am(0,y.data[i],r,i,0,x.t); - r.s = 0; - r.clamp(); - if(this.s != a.s) BigInteger.ZERO.subTo(r,r); -} +/** + * @param {object} input + * @param {string} input.name + * @param {string} input.hash + * @param {string} input.size + * @param {string} [input.mode] + * @param {number} [input.mtime] + * @param {number} [input.mtimeNsecs] + */ +function add_all_toCoreInterface ({ name, hash, size, mode, mtime, mtimeNsecs }) { + /** @type {import('./types.js').AddResult} */ + const output = { + path: name, + cid: node_modules_multiformats_src_cid_CID.parse(hash), + size: parseInt(size) + } -// (protected) r = this^2, r != this (HAC 14.16) -function bnpSquareTo(r) { - var x = this.abs(); - var i = r.t = 2*x.t; - while(--i >= 0) r.data[i] = 0; - for(i = 0; i < x.t-1; ++i) { - var c = x.am(i,x.data[i],r,2*i,0,1); - if((r.data[i+x.t]+=x.am(i+1,2*x.data[i],r,2*i+1,c,x.t-i-1)) >= x.DV) { - r.data[i+x.t] -= x.DV; - r.data[i+x.t+1] = 1; + if (mode != null) { + output.mode = parseInt(mode, 8) + } + + if (mtime != null) { + output.mtime = { + secs: mtime, + nsecs: mtimeNsecs || 0 } } - if(r.t > 0) r.data[r.t-1] += x.am(i,x.data[i],r,2*i,0,1); - r.s = 0; - r.clamp(); + + return output } -// (protected) divide this by m, quotient and remainder to q, r (HAC 14.20) -// r != q, this != m. q or r may be null. -function bnpDivRemTo(m,q,r) { - var pm = m.abs(); - if(pm.t <= 0) return; - var pt = this.abs(); - if(pt.t < pm.t) { - if(q != null) q.fromInt(0); - if(r != null) this.copyTo(r); - return; +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/files/normalise-candidate-single.js + + + + + + +/** + * @typedef {import('ipfs-core-types/src/utils').ToContent} ToContent + * @typedef {import('ipfs-unixfs-importer').ImportCandidate} ImporterImportCandidate + * @typedef {import('ipfs-core-types/src/utils').ImportCandidate} ImportCandidate + * @typedef {import('ipfs-core-types/src/utils').ImportCandidateStream} ImportCandidateStream + */ + +/** + * @param {ImportCandidate} input + * @param {(content:ToContent) => Promise>} normaliseContent + */ +// eslint-disable-next-line complexity +async function * normaliseCandidateSingle (input, normaliseContent) { + if (input === null || input === undefined) { + throw err_code(new Error(`Unexpected input: ${input}`), 'ERR_UNEXPECTED_INPUT') } - if(r == null) r = nbi(); - var y = nbi(), ts = this.s, ms = m.s; - var nsh = this.DB-nbits(pm.data[pm.t-1]); // normalize modulus - if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); } else { pm.copyTo(y); pt.copyTo(r); } - var ys = y.t; - var y0 = y.data[ys-1]; - if(y0 == 0) return; - var yt = y0*(1<1)?y.data[ys-2]>>this.F2:0); - var d1 = this.FV/yt, d2 = (1<= 0) { - r.data[r.t++] = 1; - r.subTo(t,r); + + // String + if (typeof input === 'string' || input instanceof String) { + yield normalise_candidate_single_toFileObject(input.toString(), normaliseContent) + return } - BigInteger.ONE.dlShiftTo(ys,t); - t.subTo(y,y); // "negative" y so we can replace sub with am later - while(y.t < ys) y.data[y.t++] = 0; - while(--j >= 0) { - // Estimate quotient digit - var qd = (r.data[--i]==y0)?this.DM:Math.floor(r.data[i]*d1+(r.data[i-1]+e)*d2); - if((r.data[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out - y.dlShiftTo(j,t); - r.subTo(t,r); - while(r.data[i] < --qd) r.subTo(t,r); + + // Uint8Array|ArrayBuffer|TypedArray + // Blob|File + if (isBytes(input) || isBlob(input)) { + yield normalise_candidate_single_toFileObject(input, normaliseContent) + return + } + + // Browser ReadableStream + if (isReadableStream(input)) { + input = browserReadableStreamToIt(input) + } + + // Iterable + if (Symbol.iterator in input || Symbol.asyncIterator in input) { + const peekable = peekableIterator(input) + + /** @type {any} value **/ + const { value, done } = await peekable.peek() + + if (done) { + // make sure empty iterators result in empty files + yield { content: [] } + return + } + + peekable.push(value) + + // (Async)Iterable + // (Async)Iterable + // (Async)Iterable + if (Number.isInteger(value) || isBytes(value) || typeof value === 'string' || value instanceof String) { + yield normalise_candidate_single_toFileObject(peekable, normaliseContent) + return } + + throw err_code(new Error('Unexpected input: multiple items passed - if you are using ipfs.add, please use ipfs.addAll instead'), 'ERR_UNEXPECTED_INPUT') } - if(q != null) { - r.drShiftTo(ys,q); - if(ts != ms) BigInteger.ZERO.subTo(q,q); + + // { path, content: ? } + // Note: Detected _after_ (Async)Iterable because Node.js fs.ReadStreams have a + // `path` property that passes this check. + if (isFileObject(input)) { + yield normalise_candidate_single_toFileObject(input, normaliseContent) + return } - r.t = ys; - r.clamp(); - if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder - if(ts < 0) BigInteger.ZERO.subTo(r,r); -} -// (public) this mod a -function bnMod(a) { - var r = nbi(); - this.abs().divRemTo(a,null,r); - if(this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) a.subTo(r,r); - return r; + throw err_code(new Error('Unexpected input: cannot convert "' + typeof input + '" into ImportCandidate'), 'ERR_UNEXPECTED_INPUT') } -// Modular reduction using "classic" algorithm -function Classic(m) { this.m = m; } -function cConvert(x) { - if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m); - else return x; -} -function cRevert(x) { return x; } -function cReduce(x) { x.divRemTo(this.m,null,x); } -function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } -function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); } +/** + * @param {ImportCandidate} input + * @param {(content:ToContent) => Promise>} normaliseContent + */ +async function normalise_candidate_single_toFileObject (input, normaliseContent) { + // @ts-expect-error - Those properties don't exist on most input types + const { path, mode, mtime, content } = input -Classic.prototype.convert = cConvert; -Classic.prototype.revert = cRevert; -Classic.prototype.reduce = cReduce; -Classic.prototype.mulTo = cMulTo; -Classic.prototype.sqrTo = cSqrTo; + /** @type {ImporterImportCandidate} */ + const file = { + path: path || '', + mode: parseMode(mode), + mtime: src_parseMtime(mtime) + } -// (protected) return "-1/this % 2^DB"; useful for Mont. reduction -// justification: -// xy == 1 (mod m) -// xy = 1+km -// xy(2-xy) = (1+km)(1-km) -// x[y(2-xy)] = 1-k^2m^2 -// x[y(2-xy)] == 1 (mod m^2) -// if y is 1/x mod m, then y(2-xy) is 1/x mod m^2 -// should reduce x and y(2-xy) by m^2 at each step to keep size bounded. -// JS multiply "overflows" differently from C/C++, so care is needed here. -function bnpInvDigit() { - if(this.t < 1) return 0; - var x = this.data[0]; - if((x&1) == 0) return 0; - var y = x&3; // y == 1/x mod 2^2 - y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4 - y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8 - y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16 - // last step - calculate inverse mod DV directly; - // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints - y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits - // we really want the negative inverse, and -DV < y < DV - return (y>0)?this.DV-y:-y; -} + if (content) { + file.content = await normaliseContent(content) + } else if (!path) { // Not already a file object with path or content prop + // @ts-expect-error - input still can be different ToContent + file.content = await normaliseContent(input) + } -// Montgomery reduction -function Montgomery(m) { - this.m = m; - this.mp = m.invDigit(); - this.mpl = this.mp&0x7fff; - this.mph = this.mp>>15; - this.um = (1<<(m.DB-15))-1; - this.mt2 = 2*m.t; + return file } -// xR mod m -function montConvert(x) { - var r = nbi(); - x.abs().dlShiftTo(this.m.t,r); - r.divRemTo(this.m,null,r); - if(x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) this.m.subTo(r,r); - return r; +;// CONCATENATED MODULE: ./node_modules/ipfs-core-utils/src/files/normalise-input-single.js + + + +/** + * @typedef {import('ipfs-core-types/src/utils').ImportCandidate} ImportCandidate + */ + +/** + * Transforms any of the `ipfs.add` input types into + * + * ``` + * AsyncIterable<{ path, mode, mtime, content: AsyncIterable }> + * ``` + * + * See https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options + * + * @param {ImportCandidate} input + */ +function normalise_input_single_normaliseInput (input) { + return normaliseCandidateSingle(input, normaliseContent) } -// x/R mod m -function montRevert(x) { - var r = nbi(); - x.copyTo(r); - this.reduce(r); - return r; +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/add.js + + + + + +/** + * @param {import('./types').Options} options + */ +function src_add_createAdd (options) { + const all = add_all_createAddAll(options) + return configure(() => { + /** + * @type {import('./types').RootAPI["add"]} + */ + async function add (input, options = {}) { + const source = normalise_input_single_normaliseInput(input) + // @ts-expect-error - all may return undefined if source is empty + const addAllPromise = all(source, options) + // @ts-expect-error - last may return undefined if source is empty + return await last(addAllPromise) + } + return add + })(options) } -// x = x/R mod m (HAC 14.32) -function montReduce(x) { - while(x.t <= this.mt2) // pad x so am has enough room later - x.data[x.t++] = 0; - for(var i = 0; i < this.m.t; ++i) { - // faster way of calculating u0 = x.data[i]*mp mod DV - var j = x.data[i]&0x7fff; - var u0 = (j*this.mpl+(((j*this.mph+(x.data[i]>>15)*this.mpl)&this.um)<<15))&x.DM; - // use am to combine the multiply-shift-add into one call - j = i+this.m.t; - x.data[j] += this.m.am(0,u0,x,i,0,this.m.t); - // propagate carry - while(x.data[j] >= x.DV) { x.data[j] -= x.DV; x.data[++j]++; } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/cat.js + + + +const createCat = configure(api => { + /** + * @type {import('./types').RootAPI["cat"]} + */ + async function * cat (path, options = {}) { + const res = await api.post('cat', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: path.toString(), + ...options + }), + headers: options.headers + }) + + yield * res.iterator() } - x.clamp(); - x.drShiftTo(this.m.t,x); - if(x.compareTo(this.m) >= 0) x.subTo(this.m,x); -} -// r = "x^2/R mod m"; x != r -function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); } + return cat +}) -// r = "xy/R mod m"; x,y != r -function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/commands.js -Montgomery.prototype.convert = montConvert; -Montgomery.prototype.revert = montRevert; -Montgomery.prototype.reduce = montReduce; -Montgomery.prototype.mulTo = montMulTo; -Montgomery.prototype.sqrTo = montSqrTo; -// (protected) true iff this is even -function bnpIsEven() { return ((this.t>0)?(this.data[0]&1):this.s) == 0; } -// (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79) -function bnpExp(e,z) { - if(e > 0xffffffff || e < 1) return BigInteger.ONE; - var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1; - g.copyTo(r); - while(--i >= 0) { - z.sqrTo(r,r2); - if((e&(1< 0) z.mulTo(r2,g,r); - else { var t = r; r = r2; r2 = t; } +const createCommands = configure(api => { + /** + * @type {import('./types').RootAPI["commands"]} + */ + const commands = async (options = {}) => { + const res = await api.post('commands', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + + return res.json() } - return z.revert(r); -} + return commands +}) -// (public) this^e % m, 0 <= e < 2^32 -function bnModPowInt(e,m) { - var z; - if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m); - return this.exp(e,z); -} +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/dns.js -// protected -BigInteger.prototype.copyTo = bnpCopyTo; -BigInteger.prototype.fromInt = bnpFromInt; -BigInteger.prototype.fromString = bnpFromString; -BigInteger.prototype.clamp = bnpClamp; -BigInteger.prototype.dlShiftTo = bnpDLShiftTo; -BigInteger.prototype.drShiftTo = bnpDRShiftTo; -BigInteger.prototype.lShiftTo = bnpLShiftTo; -BigInteger.prototype.rShiftTo = bnpRShiftTo; -BigInteger.prototype.subTo = bnpSubTo; -BigInteger.prototype.multiplyTo = bnpMultiplyTo; -BigInteger.prototype.squareTo = bnpSquareTo; -BigInteger.prototype.divRemTo = bnpDivRemTo; -BigInteger.prototype.invDigit = bnpInvDigit; -BigInteger.prototype.isEven = bnpIsEven; -BigInteger.prototype.exp = bnpExp; -// public -BigInteger.prototype.toString = bnToString; -BigInteger.prototype.negate = bnNegate; -BigInteger.prototype.abs = bnAbs; -BigInteger.prototype.compareTo = bnCompareTo; -BigInteger.prototype.bitLength = bnBitLength; -BigInteger.prototype.mod = bnMod; -BigInteger.prototype.modPowInt = bnModPowInt; -// "constants" -BigInteger.ZERO = nbv(0); -BigInteger.ONE = nbv(1); +const createDns = configure(api => { + /** + * @type {import('./types').RootAPI["dns"]} + */ + const dns = async (domain, options = {}) => { + const res = await api.post('dns', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: domain, + ...options + }), + headers: options.headers + }) + const data = await res.json() -// jsbn2 lib + return data.Path + } -//Copyright (c) 2005-2009 Tom Wu -//All Rights Reserved. -//See "LICENSE" for details (See jsbn.js for LICENSE). + return dns +}) -//Extended JavaScript BN functions, required for RSA private ops. +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/get-endpoint-config.js -//Version 1.1: new BigInteger("0", 10) returns "proper" zero -//(public) -function bnClone() { var r = nbi(); this.copyTo(r); return r; } +const createGetEndpointConfig = configure(api => { + return () => { + const url = new URL(api.opts.base || '') + return { + host: url.hostname, + port: url.port, + protocol: url.protocol, + pathname: url.pathname, + 'api-path': url.pathname + } + } +}) -//(public) return value as integer -function bnIntValue() { -if(this.s < 0) { - if(this.t == 1) return this.data[0]-this.DV; - else if(this.t == 0) return -1; -} else if(this.t == 1) return this.data[0]; -else if(this.t == 0) return 0; -// assumes 16 < DB < 32 -return ((this.data[1]&((1<<(32-this.DB))-1))<>24; } -//(public) return value as short (assumes DB>=16) -function bnShortValue() { return (this.t==0)?this.s:(this.data[0]<<16)>>16; } -//(protected) return x s.t. r^x < DV -function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); } -//(public) 0 if this == 0, 1 if this > 0 -function bnSigNum() { -if(this.s < 0) return -1; -else if(this.t <= 0 || (this.t == 1 && this.data[0] <= 0)) return 0; -else return 1; -} +const src_get_createGet = configure(api => { + /** + * @type {import('./types').RootAPI["get"]} + */ + async function * get (path, options = {}) { + /** @type {Record} */ + const opts = { + arg: `${path instanceof Uint8Array ? node_modules_multiformats_src_cid_CID.decode(path) : path}`, + ...options + } -//(protected) convert to radix string -function bnpToRadix(b) { -if(b == null) b = 10; -if(this.signum() == 0 || b < 2 || b > 36) return "0"; -var cs = this.chunkSize(b); -var a = Math.pow(b,cs); -var d = nbv(a), y = nbi(), z = nbi(), r = ""; -this.divRemTo(d,y,z); -while(y.signum() > 0) { - r = (a+z.intValue()).toString(b).substr(1) + r; - y.divRemTo(d,y,z); -} -return z.intValue().toString(b) + r; -} + if (opts.compressionLevel) { + opts['compression-level'] = opts.compressionLevel + delete opts.compressionLevel + } -//(protected) convert from radix string -function bnpFromRadix(s,b) { -this.fromInt(0); -if(b == null) b = 10; -var cs = this.chunkSize(b); -var d = Math.pow(b,cs), mi = false, j = 0, w = 0; -for(var i = 0; i < s.length; ++i) { - var x = intAt(s,i); - if(x < 0) { - if(s.charAt(i) == "-" && this.signum() == 0) mi = true; - continue; - } - w = b*w+x; - if(++j >= cs) { - this.dMultiply(d); - this.dAddOffset(w,0); - j = 0; - w = 0; - } -} -if(j > 0) { - this.dMultiply(Math.pow(b,j)); - this.dAddOffset(w,0); -} -if(mi) BigInteger.ZERO.subTo(this,this); -} + const res = await api.post('get', { + signal: options.signal, + searchParams: toUrlSearchParams(opts), + headers: options.headers + }) -//(protected) alternate constructor -function bnpFromNumber(a,b,c) { -if("number" == typeof b) { - // new BigInteger(int,int,RNG) - if(a < 2) this.fromInt(1); - else { - this.fromNumber(a,c); - if(!this.testBit(a-1)) // force MSB set - this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this); - if(this.isEven()) this.dAddOffset(1,0); // force odd - while(!this.isProbablePrime(b)) { - this.dAddOffset(2,0); - if(this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a-1),this); - } - } -} else { - // new BigInteger(int,RNG) - var x = new Array(), t = a&7; - x.length = (a>>3)+1; - b.nextBytes(x); - if(t > 0) x[0] &= ((1< 0) { - if(p < this.DB && (d = this.data[i]>>p) != (this.s&this.DM)>>p) - r[k++] = d|(this.s<<(this.DB-p)); - while(i >= 0) { - if(p < 8) { - d = (this.data[i]&((1<>(p+=this.DB-8); - } else { - d = (this.data[i]>>(p-=8))&0xff; - if(p <= 0) { p += this.DB; --i; } - } - if((d&0x80) != 0) d |= -256; - if(k == 0 && (this.s&0x80) != (d&0x80)) ++k; - if(k > 0 || d != this.s) r[k++] = d; - } -} -return r; -} + return get +}) -function bnEquals(a) { return(this.compareTo(a)==0); } -function bnMin(a) { return(this.compareTo(a)<0)?this:a; } -function bnMax(a) { return(this.compareTo(a)>0)?this:a; } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/id.js -//(protected) r = this op a (bitwise) -function bnpBitwiseTo(a,op,r) { -var i, f, m = Math.min(a.t,this.t); -for(i = 0; i < m; ++i) r.data[i] = op(this.data[i],a.data[i]); -if(a.t < this.t) { - f = a.s&this.DM; - for(i = m; i < this.t; ++i) r.data[i] = op(this.data[i],f); - r.t = this.t; -} else { - f = this.s&this.DM; - for(i = m; i < a.t; ++i) r.data[i] = op(f,a.data[i]); - r.t = a.t; -} -r.s = op(this.s,a.s); -r.clamp(); -} -//(public) this & a -function op_and(x,y) { return x&y; } -function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; } -//(public) this | a -function op_or(x,y) { return x|y; } -function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; } -//(public) this ^ a -function op_xor(x,y) { return x^y; } -function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; } -//(public) this & ~a -function op_andnot(x,y) { return x&~y; } -function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; } -//(public) ~this -function bnNot() { -var r = nbi(); -for(var i = 0; i < this.t; ++i) r.data[i] = this.DM&~this.data[i]; -r.t = this.t; -r.s = ~this.s; -return r; -} +const createId = configure(api => { + /** + * @type {import('./types').RootAPI["id"]} + */ + async function id (options = {}) { + const res = await api.post('id', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: options.peerId ? options.peerId.toString() : undefined, + ...options + }), + headers: options.headers + }) + const data = await res.json() -//(public) this << n -function bnShiftLeft(n) { -var r = nbi(); -if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r); -return r; -} + const output = { + ...objectToCamel(data) + } -//(public) this >> n -function bnShiftRight(n) { -var r = nbi(); -if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r); -return r; -} + output.id = peerIdFromString(output.id) -//return index of lowest 1-bit in x, x < 2^31 -function lbit(x) { -if(x == 0) return -1; -var r = 0; -if((x&0xffff) == 0) { x >>= 16; r += 16; } -if((x&0xff) == 0) { x >>= 8; r += 8; } -if((x&0xf) == 0) { x >>= 4; r += 4; } -if((x&3) == 0) { x >>= 2; r += 2; } -if((x&1) == 0) ++r; -return r; -} + if (output.addresses) { + output.addresses = output.addresses.map((/** @type {string} */ ma) => src_multiaddr(ma)) + } -//(public) returns index of lowest 1-bit (or -1 if none) -function bnGetLowestSetBit() { -for(var i = 0; i < this.t; ++i) - if(this.data[i] != 0) return i*this.DB+lbit(this.data[i]); -if(this.s < 0) return this.t*this.DB; -return -1; -} + // @ts-expect-error server output is not typed + return output + } + return id +}) -//return number of 1 bits in x -function cbit(x) { -var r = 0; -while(x != 0) { x &= x-1; ++r; } -return r; -} +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/is-online.js -//(public) return number of set bits -function bnBitCount() { -var r = 0, x = this.s&this.DM; -for(var i = 0; i < this.t; ++i) r += cbit(this.data[i]^x); -return r; -} -//(public) true iff nth bit is set -function bnTestBit(n) { -var j = Math.floor(n/this.DB); -if(j >= this.t) return(this.s!=0); -return((this.data[j]&(1<<(n%this.DB)))!=0); -} +/** + * @param {import('./types').Options} options + */ +const createIsOnline = options => { + const id = createId(options) -//(protected) this op (1<>= this.DB; -} -if(a.t < this.t) { - c += a.s; - while(i < this.t) { - c += this.data[i]; - r.data[i++] = c&this.DM; - c >>= this.DB; - } - c += this.s; -} else { - c += this.s; - while(i < a.t) { - c += a.data[i]; - r.data[i++] = c&this.DM; - c >>= this.DB; - } - c += a.s; -} -r.s = (c<0)?-1:0; -if(c > 0) r.data[i++] = c; -else if(c < -1) r.data[i++] = this.DV+c; -r.t = i; -r.clamp(); -} -//(public) this + a -function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; } -//(public) this - a -function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; } +const src_ls_createLs = configure((api, opts) => { + /** + * @type {import('./types').RootAPI["ls"]} + */ + async function * ls (path, options = {}) { + const pathStr = `${path instanceof Uint8Array ? node_modules_multiformats_src_cid_CID.decode(path) : path}` -//(public) this * a -function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; } + /** + * @param {*} link + */ + async function mapLink (link) { + let hash = link.Hash -//(public) this / a -function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; } + if (hash.includes('/')) { + // the hash is a path, but we need the CID + const ipfsPath = hash.startsWith('/ipfs/') ? hash : `/ipfs/${hash}` + const stats = await files_stat_createStat(opts)(ipfsPath) -//(public) this % a -function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; } + hash = stats.cid + } else { + hash = node_modules_multiformats_src_cid_CID.parse(hash) + } -//(public) [this/a,this%a] -function bnDivideAndRemainder(a) { -var q = nbi(), r = nbi(); -this.divRemTo(a,q,r); -return new Array(q,r); -} + /** @type {import('./types').IPFSEntry} */ + const entry = { + name: link.Name, + path: pathStr + (link.Name ? `/${link.Name}` : ''), + size: link.Size, + cid: hash, + type: typeOf(link) + } -//(protected) this *= n, this >= 0, 1 < n < DV -function bnpDMultiply(n) { -this.data[this.t] = this.am(0,n-1,this,0,0,this.t); -++this.t; -this.clamp(); -} + if (link.Mode) { + entry.mode = parseInt(link.Mode, 8) + } -//(protected) this += n << w words, this >= 0 -function bnpDAddOffset(n,w) { -if(n == 0) return; -while(this.t <= w) this.data[this.t++] = 0; -this.data[w] += n; -while(this.data[w] >= this.DV) { - this.data[w] -= this.DV; - if(++w >= this.t) this.data[this.t++] = 0; - ++this.data[w]; -} -} + if (link.Mtime !== undefined && link.Mtime !== null) { + entry.mtime = { + secs: link.Mtime + } -//A "null" reducer -function NullExp() {} -function nNop(x) { return x; } -function nMulTo(x,y,r) { x.multiplyTo(y,r); } -function nSqrTo(x,r) { x.squareTo(r); } + if (link.MtimeNsecs !== undefined && link.MtimeNsecs !== null) { + entry.mtime.nsecs = link.MtimeNsecs + } + } -NullExp.prototype.convert = nNop; -NullExp.prototype.revert = nNop; -NullExp.prototype.mulTo = nMulTo; -NullExp.prototype.sqrTo = nSqrTo; + return entry + } -//(public) this^e -function bnPow(e) { return this.exp(e,new NullExp()); } + const res = await api.post('ls', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: pathStr, + ...options + }), + headers: options.headers + }) -//(protected) r = lower n words of "this * a", a.t <= n -//"this" should be the larger one if appropriate. -function bnpMultiplyLowerTo(a,n,r) { -var i = Math.min(this.t+a.t,n); -r.s = 0; // assumes a,this >= 0 -r.t = i; -while(i > 0) r.data[--i] = 0; -var j; -for(j = r.t-this.t; i < j; ++i) r.data[i+this.t] = this.am(0,a.data[i],r,i,0,this.t); -for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a.data[i],r,i,0,n-i); -r.clamp(); -} + for await (let result of res.ndjson()) { + result = result.Objects -//(protected) r = "this * a" without lower n words, n > 0 -//"this" should be the larger one if appropriate. -function bnpMultiplyUpperTo(a,n,r) { ---n; -var i = r.t = this.t+a.t-n; -r.s = 0; // assumes a,this >= 0 -while(--i >= 0) r.data[i] = 0; -for(i = Math.max(n-this.t,0); i < a.t; ++i) - r.data[this.t+i-n] = this.am(n-i,a.data[i],r,0,0,this.t+i-n); -r.clamp(); -r.drShiftTo(1,r); -} + if (!result) { + throw new Error('expected .Objects in results') + } -//Barrett modular reduction -function Barrett(m) { -// setup Barrett -this.r2 = nbi(); -this.q3 = nbi(); -BigInteger.ONE.dlShiftTo(2*m.t,this.r2); -this.mu = this.r2.divide(m); -this.m = m; -} + result = result[0] + if (!result) { + throw new Error('expected one array in results.Objects') + } -function barrettConvert(x) { -if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m); -else if(x.compareTo(this.m) < 0) return x; -else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; } -} + const links = result.Links + if (!Array.isArray(links)) { + throw new Error('expected one array in results.Objects[0].Links') + } -function barrettRevert(x) { return x; } + if (!links.length) { + // no links, this is a file, yield a single result + yield mapLink(result) -//x = x mod m (HAC 14.42) -function barrettReduce(x) { -x.drShiftTo(this.m.t-1,this.r2); -if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); } -this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3); -this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2); -while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1); -x.subTo(this.r2,x); -while(x.compareTo(this.m) >= 0) x.subTo(this.m,x); + return + } + + yield * links.map(mapLink) + } + } + return ls +}) + +/** + * @param {any} link + */ +function typeOf (link) { + switch (link.Type) { + case 1: + case 5: + return 'dir' + case 2: + return 'file' + default: + return 'file' + } } -//r = x^2 mod m; x != r -function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/mount.js -//r = x*y mod m; x,y != r -function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); } -Barrett.prototype.convert = barrettConvert; -Barrett.prototype.revert = barrettRevert; -Barrett.prototype.reduce = barrettReduce; -Barrett.prototype.mulTo = barrettMulTo; -Barrett.prototype.sqrTo = barrettSqrTo; -//(public) this^e % m (HAC 14.85) -function bnModPow(e,m) { -var i = e.bitLength(), k, r = nbv(1), z; -if(i <= 0) return r; -else if(i < 18) k = 1; -else if(i < 48) k = 3; -else if(i < 144) k = 4; -else if(i < 768) k = 5; -else k = 6; -if(i < 8) - z = new Classic(m); -else if(m.isEven()) - z = new Barrett(m); -else - z = new Montgomery(m); -// precomputation -var g = new Array(), n = 3, k1 = k-1, km = (1< 1) { - var g2 = nbi(); - z.sqrTo(g[1],g2); - while(n <= km) { - g[n] = nbi(); - z.mulTo(g2,g[n-2],g[n]); - n += 2; - } -} +const createMount = configure(api => { + /** + * @type {import('./types').RootAPI["mount"]} + */ + async function mount (options = {}) { + const res = await api.post('dns', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) -var j = e.t-1, w, is1 = true, r2 = nbi(), t; -i = nbits(e.data[j])-1; -while(j >= 0) { - if(i >= k1) w = (e.data[j]>>(i-k1))&km; - else { - w = (e.data[j]&((1<<(i+1))-1))<<(k1-i); - if(j > 0) w |= e.data[j-1]>>(this.DB+i-k1); - } + return objectToCamel(await res.json()) + } + return mount +}) - n = k; - while((w&1) == 0) { w >>= 1; --n; } - if((i -= n) < 0) { i += this.DB; --j; } - if(is1) { // ret == 1, don't bother squaring or multiplying it - g[w].copyTo(r); - is1 = false; - } else { - while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; } - if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; } - z.mulTo(r2,g[w],r); - } +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/ping.js - while(j >= 0 && (e.data[j]&(1< 0) { - x.rShiftTo(g,x); - y.rShiftTo(g,y); -} -while(x.signum() > 0) { - if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x); - if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y); - if(x.compareTo(y) >= 0) { - x.subTo(y,x); - x.rShiftTo(1,x); - } else { - y.subTo(x,y); - y.rShiftTo(1,y); - } -} -if(g > 0) y.lShiftTo(g,y); -return y; -} -//(protected) this % n, n < 2^26 -function bnpModInt(n) { -if(n <= 0) return 0; -var d = this.DV%n, r = (this.s<0)?n-1:0; -if(this.t > 0) - if(d == 0) r = this.data[0]%n; - else for(var i = this.t-1; i >= 0; --i) r = (d*r+this.data[i])%n; -return r; -} -//(public) 1/this % m (HAC 14.61) -function bnModInverse(m) { -var ac = m.isEven(); -if((this.isEven() && ac) || m.signum() == 0) return BigInteger.ZERO; -var u = m.clone(), v = this.clone(); -var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1); -while(u.signum() != 0) { - while(u.isEven()) { - u.rShiftTo(1,u); - if(ac) { - if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); } - a.rShiftTo(1,a); - } else if(!b.isEven()) b.subTo(m,b); - b.rShiftTo(1,b); - } - while(v.isEven()) { - v.rShiftTo(1,v); - if(ac) { - if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); } - c.rShiftTo(1,c); - } else if(!d.isEven()) d.subTo(m,d); - d.rShiftTo(1,d); - } - if(u.compareTo(v) >= 0) { - u.subTo(v,u); - if(ac) a.subTo(c,a); - b.subTo(d,b); - } else { - v.subTo(u,v); - if(ac) c.subTo(a,c); - d.subTo(b,d); - } -} -if(v.compareTo(BigInteger.ONE) != 0) return BigInteger.ZERO; -if(d.compareTo(m) >= 0) return d.subtract(m); -if(d.signum() < 0) d.addTo(m,d); else return d; -if(d.signum() < 0) return d.add(m); else return d; -} +const createPing = configure(api => { + /** + * @type {import('./types').RootAPI["ping"]} + */ + async function * ping (peerId, options = {}) { + const res = await api.post('ping', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: `${peerId}`, + ...options + }), + headers: options.headers, + transform: objectToCamel + }) -var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509]; -var lplim = (1<<26)/lowprimes[lowprimes.length-1]; + yield * res.ndjson() + } + return ping +}) -//(public) test primality with certainty >= 1-.5^t -function bnIsProbablePrime(t) { -var i, x = this.abs(); -if(x.t == 1 && x.data[0] <= lowprimes[lowprimes.length-1]) { - for(i = 0; i < lowprimes.length; ++i) - if(x.data[0] == lowprimes[i]) return true; - return false; -} -if(x.isEven()) return false; -i = 1; -while(i < lowprimes.length) { - var m = lowprimes[i], j = i+1; - while(j < lowprimes.length && m < lplim) m *= lowprimes[j++]; - m = x.modInt(m); - while(i < j) if(m%lowprimes[i++] == 0) return false; -} -return x.millerRabin(t); -} +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/resolve.js -//(protected) true if probably prime (HAC 4.24, Miller-Rabin) -function bnpMillerRabin(t) { -var n1 = this.subtract(BigInteger.ONE); -var k = n1.getLowestSetBit(); -if(k <= 0) return false; -var r = n1.shiftRight(k); -var prng = bnGetPrng(); -var a; -for(var i = 0; i < t; ++i) { - // select witness 'a' at random from between 1 and n1 - do { - a = new BigInteger(this.bitLength(), prng); - } - while(a.compareTo(BigInteger.ONE) <= 0 || a.compareTo(n1) >= 0); - var y = a.modPow(r,this); - if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) { - var j = 1; - while(j++ < k && y.compareTo(n1) != 0) { - y = y.modPowInt(2,this); - if(y.compareTo(BigInteger.ONE) == 0) return false; - } - if(y.compareTo(n1) != 0) return false; - } -} -return true; -} -// get pseudo random number generator -function bnGetPrng() { - // create prng with api that matches BigInteger secure random - return { - // x is an array to fill with bytes - nextBytes: function(x) { - for(var i = 0; i < x.length; ++i) { - x[i] = Math.floor(Math.random() * 0x0100); - } + +const src_resolve_createResolve = configure(api => { + /** + * @type {import('./types').RootAPI["resolve"]} + */ + async function resolve (path, options = {}) { + const res = await api.post('resolve', { + signal: options.signal, + searchParams: toUrlSearchParams({ + arg: path, + ...options + }), + headers: options.headers + }) + const { Path } = await res.json() + return Path + } + return resolve +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/start.js + + + +const createStart = configure(api => { + /** + * @type {import('./types').RootAPI["start"]} + */ + const start = async (options = {}) => { + throw err_code(new Error('Not implemented'), 'ERR_NOT_IMPLEMENTED') + } + + return start +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/stop.js + + + +const createStop = configure(api => { + /** + * @type {import('./types').RootAPI["stop"]} + */ + async function stop (options = {}) { + const res = await api.post('shutdown', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + + await res.text() + } + return stop +}) + +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/version.js + + + + +const version_createVersion = configure(api => { + /** + * @type {import('./types').RootAPI["version"]} + */ + async function version (options = {}) { + const res = await api.post('version', { + signal: options.signal, + searchParams: toUrlSearchParams(options), + headers: options.headers + }) + + // @ts-expect-error server output is not typed + return { + ...objectToCamel(await res.json()), + 'ipfs-http-client': '1.0.0' } - }; -} + } + + return version +}) + +// EXTERNAL MODULE: ./node_modules/ipfs-utils/src/files/glob-source.js +var glob_source = __nccwpck_require__(83447); +// EXTERNAL MODULE: ./node_modules/ipfs-utils/src/files/url-source.js +var url_source = __nccwpck_require__(6846); +;// CONCATENATED MODULE: ./node_modules/kubo-rpc-client/src/index.js +/* eslint-env browser */ + + + + + + + + + + + + -//protected -BigInteger.prototype.chunkSize = bnpChunkSize; -BigInteger.prototype.toRadix = bnpToRadix; -BigInteger.prototype.fromRadix = bnpFromRadix; -BigInteger.prototype.fromNumber = bnpFromNumber; -BigInteger.prototype.bitwiseTo = bnpBitwiseTo; -BigInteger.prototype.changeBit = bnpChangeBit; -BigInteger.prototype.addTo = bnpAddTo; -BigInteger.prototype.dMultiply = bnpDMultiply; -BigInteger.prototype.dAddOffset = bnpDAddOffset; -BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo; -BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo; -BigInteger.prototype.modInt = bnpModInt; -BigInteger.prototype.millerRabin = bnpMillerRabin; -//public -BigInteger.prototype.clone = bnClone; -BigInteger.prototype.intValue = bnIntValue; -BigInteger.prototype.byteValue = bnByteValue; -BigInteger.prototype.shortValue = bnShortValue; -BigInteger.prototype.signum = bnSigNum; -BigInteger.prototype.toByteArray = bnToByteArray; -BigInteger.prototype.equals = bnEquals; -BigInteger.prototype.min = bnMin; -BigInteger.prototype.max = bnMax; -BigInteger.prototype.and = bnAnd; -BigInteger.prototype.or = bnOr; -BigInteger.prototype.xor = bnXor; -BigInteger.prototype.andNot = bnAndNot; -BigInteger.prototype.not = bnNot; -BigInteger.prototype.shiftLeft = bnShiftLeft; -BigInteger.prototype.shiftRight = bnShiftRight; -BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit; -BigInteger.prototype.bitCount = bnBitCount; -BigInteger.prototype.testBit = bnTestBit; -BigInteger.prototype.setBit = bnSetBit; -BigInteger.prototype.clearBit = bnClearBit; -BigInteger.prototype.flipBit = bnFlipBit; -BigInteger.prototype.add = bnAdd; -BigInteger.prototype.subtract = bnSubtract; -BigInteger.prototype.multiply = bnMultiply; -BigInteger.prototype.divide = bnDivide; -BigInteger.prototype.remainder = bnRemainder; -BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder; -BigInteger.prototype.modPow = bnModPow; -BigInteger.prototype.modInverse = bnModInverse; -BigInteger.prototype.pow = bnPow; -BigInteger.prototype.gcd = bnGCD; -BigInteger.prototype.isProbablePrime = bnIsProbablePrime; -//BigInteger interfaces not implemented in jsbn: -//BigInteger(int signum, byte[] magnitude) -//double doubleValue() -//float floatValue() -//int hashCode() -//long longValue() -//static BigInteger valueOf(long val) -/***/ }), -/***/ 80554: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Node.js module for Forge message digests. - * - * @author Dave Longley - * - * Copyright 2011-2017 Digital Bazaar, Inc. - */ -var forge = __nccwpck_require__(96630); -module.exports = forge.md = forge.md || {}; -forge.md.algorithms = forge.md.algorithms || {}; -/***/ }), -/***/ 11750: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -/** - * Object IDs for ASN.1. - * - * @author Dave Longley - * - * Copyright (c) 2010-2013 Digital Bazaar, Inc. - */ -var forge = __nccwpck_require__(96630); -forge.pki = forge.pki || {}; -var oids = module.exports = forge.pki.oids = forge.oids = forge.oids || {}; -// set id to name mapping and name to id mapping -function _IN(id, name) { - oids[id] = name; - oids[name] = id; -} -// set id to name mapping only -function _I_(id, name) { - oids[id] = name; -} -// algorithm OIDs -_IN('1.2.840.113549.1.1.1', 'rsaEncryption'); -// Note: md2 & md4 not implemented -//_IN('1.2.840.113549.1.1.2', 'md2WithRSAEncryption'); -//_IN('1.2.840.113549.1.1.3', 'md4WithRSAEncryption'); -_IN('1.2.840.113549.1.1.4', 'md5WithRSAEncryption'); -_IN('1.2.840.113549.1.1.5', 'sha1WithRSAEncryption'); -_IN('1.2.840.113549.1.1.7', 'RSAES-OAEP'); -_IN('1.2.840.113549.1.1.8', 'mgf1'); -_IN('1.2.840.113549.1.1.9', 'pSpecified'); -_IN('1.2.840.113549.1.1.10', 'RSASSA-PSS'); -_IN('1.2.840.113549.1.1.11', 'sha256WithRSAEncryption'); -_IN('1.2.840.113549.1.1.12', 'sha384WithRSAEncryption'); -_IN('1.2.840.113549.1.1.13', 'sha512WithRSAEncryption'); -// Edwards-curve Digital Signature Algorithm (EdDSA) Ed25519 -_IN('1.3.101.112', 'EdDSA25519'); -_IN('1.2.840.10040.4.3', 'dsa-with-sha1'); -_IN('1.3.14.3.2.7', 'desCBC'); -_IN('1.3.14.3.2.26', 'sha1'); -// Deprecated equivalent of sha1WithRSAEncryption -_IN('1.3.14.3.2.29', 'sha1WithRSASignature'); -_IN('2.16.840.1.101.3.4.2.1', 'sha256'); -_IN('2.16.840.1.101.3.4.2.2', 'sha384'); -_IN('2.16.840.1.101.3.4.2.3', 'sha512'); -_IN('2.16.840.1.101.3.4.2.4', 'sha224'); -_IN('2.16.840.1.101.3.4.2.5', 'sha512-224'); -_IN('2.16.840.1.101.3.4.2.6', 'sha512-256'); -_IN('1.2.840.113549.2.2', 'md2'); -_IN('1.2.840.113549.2.5', 'md5'); -// pkcs#7 content types -_IN('1.2.840.113549.1.7.1', 'data'); -_IN('1.2.840.113549.1.7.2', 'signedData'); -_IN('1.2.840.113549.1.7.3', 'envelopedData'); -_IN('1.2.840.113549.1.7.4', 'signedAndEnvelopedData'); -_IN('1.2.840.113549.1.7.5', 'digestedData'); -_IN('1.2.840.113549.1.7.6', 'encryptedData'); -// pkcs#9 oids -_IN('1.2.840.113549.1.9.1', 'emailAddress'); -_IN('1.2.840.113549.1.9.2', 'unstructuredName'); -_IN('1.2.840.113549.1.9.3', 'contentType'); -_IN('1.2.840.113549.1.9.4', 'messageDigest'); -_IN('1.2.840.113549.1.9.5', 'signingTime'); -_IN('1.2.840.113549.1.9.6', 'counterSignature'); -_IN('1.2.840.113549.1.9.7', 'challengePassword'); -_IN('1.2.840.113549.1.9.8', 'unstructuredAddress'); -_IN('1.2.840.113549.1.9.14', 'extensionRequest'); -_IN('1.2.840.113549.1.9.20', 'friendlyName'); -_IN('1.2.840.113549.1.9.21', 'localKeyId'); -_IN('1.2.840.113549.1.9.22.1', 'x509Certificate'); -// pkcs#12 safe bags -_IN('1.2.840.113549.1.12.10.1.1', 'keyBag'); -_IN('1.2.840.113549.1.12.10.1.2', 'pkcs8ShroudedKeyBag'); -_IN('1.2.840.113549.1.12.10.1.3', 'certBag'); -_IN('1.2.840.113549.1.12.10.1.4', 'crlBag'); -_IN('1.2.840.113549.1.12.10.1.5', 'secretBag'); -_IN('1.2.840.113549.1.12.10.1.6', 'safeContentsBag'); -// password-based-encryption for pkcs#12 -_IN('1.2.840.113549.1.5.13', 'pkcs5PBES2'); -_IN('1.2.840.113549.1.5.12', 'pkcs5PBKDF2'); -_IN('1.2.840.113549.1.12.1.1', 'pbeWithSHAAnd128BitRC4'); -_IN('1.2.840.113549.1.12.1.2', 'pbeWithSHAAnd40BitRC4'); -_IN('1.2.840.113549.1.12.1.3', 'pbeWithSHAAnd3-KeyTripleDES-CBC'); -_IN('1.2.840.113549.1.12.1.4', 'pbeWithSHAAnd2-KeyTripleDES-CBC'); -_IN('1.2.840.113549.1.12.1.5', 'pbeWithSHAAnd128BitRC2-CBC'); -_IN('1.2.840.113549.1.12.1.6', 'pbewithSHAAnd40BitRC2-CBC'); -// hmac OIDs -_IN('1.2.840.113549.2.7', 'hmacWithSHA1'); -_IN('1.2.840.113549.2.8', 'hmacWithSHA224'); -_IN('1.2.840.113549.2.9', 'hmacWithSHA256'); -_IN('1.2.840.113549.2.10', 'hmacWithSHA384'); -_IN('1.2.840.113549.2.11', 'hmacWithSHA512'); -// symmetric key algorithm oids -_IN('1.2.840.113549.3.7', 'des-EDE3-CBC'); -_IN('2.16.840.1.101.3.4.1.2', 'aes128-CBC'); -_IN('2.16.840.1.101.3.4.1.22', 'aes192-CBC'); -_IN('2.16.840.1.101.3.4.1.42', 'aes256-CBC'); -// certificate issuer/subject OIDs -_IN('2.5.4.3', 'commonName'); -_IN('2.5.4.4', 'surname'); -_IN('2.5.4.5', 'serialNumber'); -_IN('2.5.4.6', 'countryName'); -_IN('2.5.4.7', 'localityName'); -_IN('2.5.4.8', 'stateOrProvinceName'); -_IN('2.5.4.9', 'streetAddress'); -_IN('2.5.4.10', 'organizationName'); -_IN('2.5.4.11', 'organizationalUnitName'); -_IN('2.5.4.12', 'title'); -_IN('2.5.4.13', 'description'); -_IN('2.5.4.15', 'businessCategory'); -_IN('2.5.4.17', 'postalCode'); -_IN('2.5.4.42', 'givenName'); -_IN('1.3.6.1.4.1.311.60.2.1.2', 'jurisdictionOfIncorporationStateOrProvinceName'); -_IN('1.3.6.1.4.1.311.60.2.1.3', 'jurisdictionOfIncorporationCountryName'); -// X.509 extension OIDs -_IN('2.16.840.1.113730.1.1', 'nsCertType'); -_IN('2.16.840.1.113730.1.13', 'nsComment'); // deprecated in theory; still widely used -_I_('2.5.29.1', 'authorityKeyIdentifier'); // deprecated, use .35 -_I_('2.5.29.2', 'keyAttributes'); // obsolete use .37 or .15 -_I_('2.5.29.3', 'certificatePolicies'); // deprecated, use .32 -_I_('2.5.29.4', 'keyUsageRestriction'); // obsolete use .37 or .15 -_I_('2.5.29.5', 'policyMapping'); // deprecated use .33 -_I_('2.5.29.6', 'subtreesConstraint'); // obsolete use .30 -_I_('2.5.29.7', 'subjectAltName'); // deprecated use .17 -_I_('2.5.29.8', 'issuerAltName'); // deprecated use .18 -_I_('2.5.29.9', 'subjectDirectoryAttributes'); -_I_('2.5.29.10', 'basicConstraints'); // deprecated use .19 -_I_('2.5.29.11', 'nameConstraints'); // deprecated use .30 -_I_('2.5.29.12', 'policyConstraints'); // deprecated use .36 -_I_('2.5.29.13', 'basicConstraints'); // deprecated use .19 -_IN('2.5.29.14', 'subjectKeyIdentifier'); -_IN('2.5.29.15', 'keyUsage'); -_I_('2.5.29.16', 'privateKeyUsagePeriod'); -_IN('2.5.29.17', 'subjectAltName'); -_IN('2.5.29.18', 'issuerAltName'); -_IN('2.5.29.19', 'basicConstraints'); -_I_('2.5.29.20', 'cRLNumber'); -_I_('2.5.29.21', 'cRLReason'); -_I_('2.5.29.22', 'expirationDate'); -_I_('2.5.29.23', 'instructionCode'); -_I_('2.5.29.24', 'invalidityDate'); -_I_('2.5.29.25', 'cRLDistributionPoints'); // deprecated use .31 -_I_('2.5.29.26', 'issuingDistributionPoint'); // deprecated use .28 -_I_('2.5.29.27', 'deltaCRLIndicator'); -_I_('2.5.29.28', 'issuingDistributionPoint'); -_I_('2.5.29.29', 'certificateIssuer'); -_I_('2.5.29.30', 'nameConstraints'); -_IN('2.5.29.31', 'cRLDistributionPoints'); -_IN('2.5.29.32', 'certificatePolicies'); -_I_('2.5.29.33', 'policyMappings'); -_I_('2.5.29.34', 'policyConstraints'); // deprecated use .36 -_IN('2.5.29.35', 'authorityKeyIdentifier'); -_I_('2.5.29.36', 'policyConstraints'); -_IN('2.5.29.37', 'extKeyUsage'); -_I_('2.5.29.46', 'freshestCRL'); -_I_('2.5.29.54', 'inhibitAnyPolicy'); -// extKeyUsage purposes -_IN('1.3.6.1.4.1.11129.2.4.2', 'timestampList'); -_IN('1.3.6.1.5.5.7.1.1', 'authorityInfoAccess'); -_IN('1.3.6.1.5.5.7.3.1', 'serverAuth'); -_IN('1.3.6.1.5.5.7.3.2', 'clientAuth'); -_IN('1.3.6.1.5.5.7.3.3', 'codeSigning'); -_IN('1.3.6.1.5.5.7.3.4', 'emailProtection'); -_IN('1.3.6.1.5.5.7.3.8', 'timeStamping'); -/***/ }), -/***/ 87861: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /** - * Password-based encryption functions. - * - * @author Dave Longley - * @author Stefan Siegl - * - * Copyright (c) 2010-2013 Digital Bazaar, Inc. - * Copyright (c) 2012 Stefan Siegl - * - * An EncryptedPrivateKeyInfo: - * - * EncryptedPrivateKeyInfo ::= SEQUENCE { - * encryptionAlgorithm EncryptionAlgorithmIdentifier, - * encryptedData EncryptedData } - * - * EncryptionAlgorithmIdentifier ::= AlgorithmIdentifier * - * EncryptedData ::= OCTET STRING + * @typedef {import('./types').Options} Options + * @typedef {import('./types').LoadBaseFn} LoadBaseFn + * @typedef {import('./types').LoadCodecFn} LoadCodecFn + * @typedef {import('./types').LoadHasherFn} LoadHasherFn + * @typedef {import('./types').IPLDOptions} IPLDOptions + * @typedef {import('./types').HTTPClientExtraOptions} HTTPClientExtraOptions + * @typedef {import('./types').EndpointConfig} EndpointConfig + * @typedef {import('./types').IPFSHTTPClient} IPFSHTTPClient */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(16606); -__nccwpck_require__(69197); -__nccwpck_require__(16855); -__nccwpck_require__(80554); -__nccwpck_require__(11750); -__nccwpck_require__(84418); -__nccwpck_require__(57334); -__nccwpck_require__(68737); -__nccwpck_require__(87938); -__nccwpck_require__(79626); -__nccwpck_require__(36536); -if(typeof BigInteger === 'undefined') { - var BigInteger = forge.jsbn.BigInteger; -} +/** + * @param {import('./types').Options} options + */ +function src_create (options = {}) { + /** + * @type {import('./types').BlockCodec} + */ + const id = { + name: identity_identity.name, + code: identity_identity.code, + encode: (id) => id, + decode: (id) => id + } -// shortcut for asn.1 API -var asn1 = forge.asn1; + /** @type {import('./types').MultibaseCodec[]} */ + const multibaseCodecs = Object.values(bases); -/* Password-based encryption implementation. */ -var pki = forge.pki = forge.pki || {}; -module.exports = pki.pbe = forge.pbe = forge.pbe || {}; -var oids = pki.oids; + (options.ipld && options.ipld.bases ? options.ipld.bases : []).forEach(base => multibaseCodecs.push(base)) -// validator for an EncryptedPrivateKeyInfo structure -// Note: Currently only works w/algorithm params -var encryptedPrivateKeyValidator = { - name: 'EncryptedPrivateKeyInfo', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'EncryptedPrivateKeyInfo.encryptionAlgorithm', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'AlgorithmIdentifier.algorithm', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OID, - constructed: false, - capture: 'encryptionOid' - }, { - name: 'AlgorithmIdentifier.parameters', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - captureAsn1: 'encryptionParams' - }] - }, { - // encryptedData - name: 'EncryptedPrivateKeyInfo.encryptedData', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OCTETSTRING, - constructed: false, - capture: 'encryptedData' - }] -}; + const multibases = new Multibases({ + bases: multibaseCodecs, + loadBase: options.ipld && options.ipld.loadBase + }) -// validator for a PBES2Algorithms structure -// Note: Currently only works w/PBKDF2 + AES encryption schemes -var PBES2AlgorithmsValidator = { - name: 'PBES2Algorithms', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'PBES2Algorithms.keyDerivationFunc', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'PBES2Algorithms.keyDerivationFunc.oid', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OID, - constructed: false, - capture: 'kdfOid' - }, { - name: 'PBES2Algorithms.params', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'PBES2Algorithms.params.salt', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OCTETSTRING, - constructed: false, - capture: 'kdfSalt' - }, { - name: 'PBES2Algorithms.params.iterationCount', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'kdfIterationCount' - }, { - name: 'PBES2Algorithms.params.keyLength', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - optional: true, - capture: 'keyLength' - }, { - // prf - name: 'PBES2Algorithms.params.prf', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - optional: true, - value: [{ - name: 'PBES2Algorithms.params.prf.algorithm', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OID, - constructed: false, - capture: 'prfOid' - }] - }] - }] - }, { - name: 'PBES2Algorithms.encryptionScheme', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'PBES2Algorithms.encryptionScheme.oid', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OID, - constructed: false, - capture: 'encOid' - }, { - name: 'PBES2Algorithms.encryptionScheme.iv', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OCTETSTRING, - constructed: false, - capture: 'encIv' - }] - }] -}; + /** @type {import('./types').BlockCodec[]} */ + const blockCodecs = Object.values(codecs); -var pkcs12PbeParamsValidator = { - name: 'pkcs-12PbeParams', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'pkcs-12PbeParams.salt', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OCTETSTRING, - constructed: false, - capture: 'salt' - }, { - name: 'pkcs-12PbeParams.iterations', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'iterations' - }] -}; + [src_namespaceObject, dag_cbor_src_namespaceObject, dag_json_src_namespaceObject, lib_namespaceObject, id].concat((options.ipld && options.ipld.codecs) || []).forEach(codec => blockCodecs.push(codec)) + + const multicodecs = new Multicodecs({ + codecs: blockCodecs, + loadCodec: options.ipld && options.ipld.loadCodec + }) + + /** @type {import('./types').MultihashHasher[]} */ + const multihashHashers = Object.values(hashes); + + (options.ipld && options.ipld.hashers ? options.ipld.hashers : []).forEach(hasher => multihashHashers.push(hasher)) + + const multihashes = new Multihashes({ + hashers: multihashHashers, + loadHasher: options.ipld && options.ipld.loadHasher + }) + /** @type {IPFSHTTPClient} */ + const client = { + add: src_add_createAdd(options), + addAll: add_all_createAddAll(options), + bitswap: createBitswap(options), + block: createBlock(options), + bootstrap: createBootstrap(options), + cat: createCat(options), + commands: createCommands(options), + config: createConfig(options), + dag: createDag(multicodecs, options), + dht: createDht(options), + diag: createDiag(options), + dns: createDns(options), + files: createFiles(options), + get: src_get_createGet(options), + getEndpointConfig: createGetEndpointConfig(options), + id: createId(options), + isOnline: createIsOnline(options), + key: /** @type {import('./types').IPFS['key']} */(createKey(options)), + log: createLog(options), + ls: src_ls_createLs(options), + mount: createMount(options), + name: /** @type {import('./types').IPFS['name']} */(createName(options)), + object: createObject(multicodecs, options), + pin: /** @type {import('./types').IPFS['pin']} */(createPin(options)), + ping: createPing(options), + pubsub: pubsub_createPubsub(options), + refs: createRefs(options), + repo: createRepo(options), + resolve: src_resolve_createResolve(options), + start: createStart(options), + stats: createStats(options), + stop: createStop(options), + swarm: /** @type {import('./types').IPFS['swarm']} */(createSwarm(options)), + version: /** @type {import('./types').IPFS['version']} */(version_createVersion(options)), + bases: multibases, + codecs: multicodecs, + hashers: multihashes + } + + return client +} + + + + +const globSource = glob_source + +// EXTERNAL MODULE: ./node_modules/peer-id/src/index.js +var peer_id_src = __nccwpck_require__(65459); +;// CONCATENATED MODULE: ./node_modules/it-last/dist/src/index.js /** - * Encrypts a ASN.1 PrivateKeyInfo object, producing an EncryptedPrivateKeyInfo. + * @packageDocumentation * - * PBES2Algorithms ALGORITHM-IDENTIFIER ::= - * { {PBES2-params IDENTIFIED BY id-PBES2}, ...} + * Return the last value from an (async)iterable. * - * id-PBES2 OBJECT IDENTIFIER ::= {pkcs-5 13} + * @example * - * PBES2-params ::= SEQUENCE { - * keyDerivationFunc AlgorithmIdentifier {{PBES2-KDFs}}, - * encryptionScheme AlgorithmIdentifier {{PBES2-Encs}} - * } + * ```javascript + * import last from 'it-last' * - * PBES2-KDFs ALGORITHM-IDENTIFIER ::= - * { {PBKDF2-params IDENTIFIED BY id-PBKDF2}, ... } + * // This can also be an iterator, generator, etc + * const values = [0, 1, 2, 3, 4] * - * PBES2-Encs ALGORITHM-IDENTIFIER ::= { ... } + * const res = last(values) * - * PBKDF2-params ::= SEQUENCE { - * salt CHOICE { - * specified OCTET STRING, - * otherSource AlgorithmIdentifier {{PBKDF2-SaltSources}} - * }, - * iterationCount INTEGER (1..MAX), - * keyLength INTEGER (1..MAX) OPTIONAL, - * prf AlgorithmIdentifier {{PBKDF2-PRFs}} DEFAULT algid-hmacWithSHA1 + * console.info(res) // 4 + * ``` + * + * Async sources must be awaited: + * + * ```javascript + * import last from 'it-last' + * + * const values = async function * () { + * yield * [0, 1, 2, 3, 4] * } * - * @param obj the ASN.1 PrivateKeyInfo object. - * @param password the password to encrypt with. - * @param options: - * algorithm the encryption algorithm to use - * ('aes128', 'aes192', 'aes256', '3des'), defaults to 'aes128'. - * count the iteration count to use. - * saltSize the salt size to use. - * prfAlgorithm the PRF message digest algorithm to use - * ('sha1', 'sha224', 'sha256', 'sha384', 'sha512') + * const res = await last(values()) * - * @return the ASN.1 EncryptedPrivateKeyInfo. + * console.info(res) // 4 + * ``` */ -pki.encryptPrivateKeyInfo = function(obj, password, options) { - // set default options - options = options || {}; - options.saltSize = options.saltSize || 8; - options.count = options.count || 2048; - options.algorithm = options.algorithm || 'aes128'; - options.prfAlgorithm = options.prfAlgorithm || 'sha1'; - - // generate PBE params - var salt = forge.random.getBytesSync(options.saltSize); - var count = options.count; - var countBytes = asn1.integerToDer(count); - var dkLen; - var encryptionAlgorithm; - var encryptedData; - if(options.algorithm.indexOf('aes') === 0 || options.algorithm === 'des') { - // do PBES2 - var ivLen, encOid, cipherFn; - switch(options.algorithm) { - case 'aes128': - dkLen = 16; - ivLen = 16; - encOid = oids['aes128-CBC']; - cipherFn = forge.aes.createEncryptionCipher; - break; - case 'aes192': - dkLen = 24; - ivLen = 16; - encOid = oids['aes192-CBC']; - cipherFn = forge.aes.createEncryptionCipher; - break; - case 'aes256': - dkLen = 32; - ivLen = 16; - encOid = oids['aes256-CBC']; - cipherFn = forge.aes.createEncryptionCipher; - break; - case 'des': - dkLen = 8; - ivLen = 8; - encOid = oids['desCBC']; - cipherFn = forge.des.createEncryptionCipher; - break; - default: - var error = new Error('Cannot encrypt private key. Unknown encryption algorithm.'); - error.algorithm = options.algorithm; - throw error; +function src_isAsyncIterable(thing) { + return thing[Symbol.asyncIterator] != null; +} +function src_last(source) { + if (src_isAsyncIterable(source)) { + return (async () => { + let res; + for await (const entry of source) { + res = entry; + } + return res; + })(); + } + let res; + for (const entry of source) { + res = entry; } + return res; +} +/* harmony default export */ const dist_src = (src_last); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: external "node:fs" +const external_node_fs_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs"); +;// CONCATENATED MODULE: external "node:path" +const external_node_path_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:path"); +;// CONCATENATED MODULE: ./pinners/ipfs.js - // get PRF message digest - var prfAlgorithm = 'hmacWith' + options.prfAlgorithm.toUpperCase(); - var md = prfAlgorithmToMessageDigest(prfAlgorithm); - // encrypt private key using pbe SHA-1 and AES/DES - var dk = forge.pkcs5.pbkdf2(password, salt, count, dkLen, md); - var iv = forge.random.getBytesSync(ivLen); - var cipher = cipherFn(dk); - cipher.start(iv); - cipher.update(asn1.toDer(obj)); - cipher.finish(); - encryptedData = cipher.output.getBytes(); - // get PBKDF2-params - var params = createPbkdf2Params(salt, countBytes, dkLen, prfAlgorithm); - encryptionAlgorithm = asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, - asn1.oidToDer(oids['pkcs5PBES2']).getBytes()), - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // keyDerivationFunc - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, - asn1.oidToDer(oids['pkcs5PBKDF2']).getBytes()), - // PBKDF2-params - params - ]), - // encryptionScheme - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, - asn1.oidToDer(encOid).getBytes()), - // iv - asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, iv) - ]) - ]) - ]); - } else if(options.algorithm === '3des') { - // Do PKCS12 PBE - dkLen = 24; - var saltBytes = new forge.util.ByteBuffer(salt); - var dk = pki.pbe.generatePkcs12Key(password, saltBytes, 1, count, dkLen); - var iv = pki.pbe.generatePkcs12Key(password, saltBytes, 2, count, dkLen); - var cipher = forge.des.createEncryptionCipher(dk); - cipher.start(iv); - cipher.update(asn1.toDer(obj)); - cipher.finish(); - encryptedData = cipher.output.getBytes(); - encryptionAlgorithm = asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, - asn1.oidToDer(oids['pbeWithSHAAnd3-KeyTripleDES-CBC']).getBytes()), - // pkcs-12PbeParams - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // salt - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, salt), - // iteration count - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - countBytes.getBytes()) - ]) - ]); - } else { - var error = new Error('Cannot encrypt private key. Unknown encryption algorithm.'); - error.algorithm = options.algorithm; - throw error; - } +/* harmony default export */ const ipfs = ({ + name: "IPFS", + builder: async (options) => { + const { host, port, protocol, timeout, headers } = options; - // EncryptedPrivateKeyInfo - var rval = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // encryptionAlgorithm - encryptionAlgorithm, - // encryptedData - asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, encryptedData) - ]); - return rval; -}; + return src_create({ host, port, protocol, timeout, headers }); + }, + upload: async (api, options) => { +<<<<<<< HEAD + const { path: p, timeout, verbose, key } = options; -/** - * Decrypts a ASN.1 PrivateKeyInfo object. - * - * @param obj the ASN.1 EncryptedPrivateKeyInfo object. - * @param password the password to decrypt with. - * - * @return the ASN.1 PrivateKeyInfo on success, null on failure. - */ -pki.decryptPrivateKeyInfo = function(obj, password) { - var rval = null; + const pattern = external_node_fs_namespaceObject.lstatSync(p).isDirectory() ? `${external_node_path_namespaceObject.basename(p)}/**/*` : external_node_path_namespaceObject.basename(p); + const { cid } = await dist_src(api.addAll(globSource(external_node_path_namespaceObject.dirname(p), pattern), { pin: true, timeout })); +======= + const { path, pattern, pin, timeout, key, verbose } = options; + const { cid } = await last( + api.addAll(globSource(fsPath.dirname(path), pattern), { + pin, + timeout, + }) + ); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 - // get PBE params - var capture = {}; - var errors = []; - if(!asn1.validate(obj, encryptedPrivateKeyValidator, capture, errors)) { - var error = new Error('Cannot read encrypted private key. ' + - 'ASN.1 object is not a supported EncryptedPrivateKeyInfo.'); - error.errors = errors; - throw error; - } + if (!cid) throw new Error("Content hash is not found."); - // get cipher - var oid = asn1.derToOid(capture.encryptionOid); - var cipher = pki.pbe.getCipher(oid, capture.encryptionParams, password); + let _key; + if (key) { + const keys = await api.key.list(); - // get encrypted data - var encrypted = forge.util.createBuffer(capture.encryptedData); + _key = keys.find((k) => k.name === key); + if (!_key) { + _key = await api.key.gen(key, { + type: "rsa", + size: 2048, + }); - cipher.update(encrypted); - if(cipher.finish()) { - rval = asn1.fromDer(cipher.output); - } + if (verbose) console.log(`Created IPNS key ${JSON.stringify(_key)}`); + } - return rval; -}; + await api.name.publish(cid, { key }); + } -/** - * Converts a EncryptedPrivateKeyInfo to PEM format. - * - * @param epki the EncryptedPrivateKeyInfo. - * @param maxline the maximum characters per line, defaults to 64. - * - * @return the PEM-formatted encrypted private key. - */ -pki.encryptedPrivateKeyToPem = function(epki, maxline) { - // convert to DER, then PEM-encode - var msg = { - type: 'ENCRYPTED PRIVATE KEY', - body: asn1.toDer(epki).getBytes() - }; - return forge.pem.encode(msg, {maxline: maxline}); -}; + return { + cid: cid.toString(), + ipfs: cid.toString(), + ipns: _key && peer_id_src.parse(_key.id).toB58String(), + }; + }, +}); -/** - * Converts a PEM-encoded EncryptedPrivateKeyInfo to ASN.1 format. Decryption - * is not performed. - * - * @param pem the EncryptedPrivateKeyInfo in PEM-format. - * - * @return the ASN.1 EncryptedPrivateKeyInfo. - */ -pki.encryptedPrivateKeyFromPem = function(pem) { - var msg = forge.pem.decode(pem)[0]; +// EXTERNAL MODULE: ./node_modules/@pinata/sdk/lib/pinata-sdk.js +var pinata_sdk = __nccwpck_require__(80590); +;// CONCATENATED MODULE: ./pinners/pinata.js - if(msg.type !== 'ENCRYPTED PRIVATE KEY') { - var error = new Error('Could not convert encrypted private key from PEM; ' + - 'PEM header type is "ENCRYPTED PRIVATE KEY".'); - error.headerType = msg.type; - throw error; - } - if(msg.procType && msg.procType.type === 'ENCRYPTED') { - throw new Error('Could not convert encrypted private key from PEM; ' + - 'PEM is encrypted.'); - } - // convert DER to ASN.1 object - return asn1.fromDer(msg.body); -}; +<<<<<<< HEAD +======= +/***/ }), -/** - * Encrypts an RSA private key. By default, the key will be wrapped in - * a PrivateKeyInfo and encrypted to produce a PKCS#8 EncryptedPrivateKeyInfo. - * This is the standard, preferred way to encrypt a private key. - * - * To produce a non-standard PEM-encrypted private key that uses encapsulated - * headers to indicate the encryption algorithm (old-style non-PKCS#8 OpenSSL - * private key encryption), set the 'legacy' option to true. Note: Using this - * option will cause the iteration count to be forced to 1. - * - * Note: The 'des' algorithm is supported, but it is not considered to be - * secure because it only uses a single 56-bit key. If possible, it is highly - * recommended that a different algorithm be used. - * - * @param rsaKey the RSA key to encrypt. - * @param password the password to use. - * @param options: - * algorithm: the encryption algorithm to use - * ('aes128', 'aes192', 'aes256', '3des', 'des'). - * count: the iteration count to use. - * saltSize: the salt size to use. - * legacy: output an old non-PKCS#8 PEM-encrypted+encapsulated - * headers (DEK-Info) private key. - * - * @return the PEM-encoded ASN.1 EncryptedPrivateKeyInfo. - */ -pki.encryptRsaPrivateKey = function(rsaKey, password, options) { - // standard PKCS#8 - options = options || {}; - if(!options.legacy) { - // encrypt PrivateKeyInfo - var rval = pki.wrapRsaPrivateKey(pki.privateKeyToAsn1(rsaKey)); - rval = pki.encryptPrivateKeyInfo(rval, password, options); - return pki.encryptedPrivateKeyToPem(rval); - } +/***/ 76333: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - // legacy non-PKCS#8 - var algorithm; - var iv; - var dkLen; - var cipherFn; - switch(options.algorithm) { - case 'aes128': - algorithm = 'AES-128-CBC'; - dkLen = 16; - iv = forge.random.getBytesSync(16); - cipherFn = forge.aes.createEncryptionCipher; - break; - case 'aes192': - algorithm = 'AES-192-CBC'; - dkLen = 24; - iv = forge.random.getBytesSync(16); - cipherFn = forge.aes.createEncryptionCipher; - break; - case 'aes256': - algorithm = 'AES-256-CBC'; - dkLen = 32; - iv = forge.random.getBytesSync(16); - cipherFn = forge.aes.createEncryptionCipher; - break; - case '3des': - algorithm = 'DES-EDE3-CBC'; - dkLen = 24; - iv = forge.random.getBytesSync(8); - cipherFn = forge.des.createEncryptionCipher; - break; - case 'des': - algorithm = 'DES-CBC'; - dkLen = 8; - iv = forge.random.getBytesSync(8); - cipherFn = forge.des.createEncryptionCipher; - break; - default: - var error = new Error('Could not encrypt RSA private key; unsupported ' + - 'encryption algorithm "' + options.algorithm + '".'); - error.algorithm = options.algorithm; - throw error; - } +const fs = __nccwpck_require__(57147); +const fsPath = __nccwpck_require__(71017); - // encrypt private key using OpenSSL legacy key derivation - var dk = forge.pbe.opensslDeriveBytes(password, iv.substr(0, 8), dkLen); - var cipher = cipherFn(dk); - cipher.start(iv); - cipher.update(asn1.toDer(pki.privateKeyToAsn1(rsaKey))); - cipher.finish(); +module.exports = + ({ builder, upload }) => + async (options) => { + const api = await builder(options); - var msg = { - type: 'RSA PRIVATE KEY', - procType: { - version: '4', - type: 'ENCRYPTED' - }, - dekInfo: { - algorithm: algorithm, - parameters: forge.util.bytesToHex(iv).toUpperCase() - }, - body: cipher.output.getBytes() + return { + upload: async (options) => { + const { path } = options; + if (!path) { + throw new Error("Path is empty"); + } + + let source = path; + if (!fsPath.isAbsolute(source)) { + const dir = ( + process.env.GITHUB_WORKSPACE || process.cwd() + ).toString(); + source = fsPath.join(dir, source); + } + + const pattern = fs.lstatSync(source).isDirectory() + ? `${fsPath.basename(source)}/**/*` + : fsPath.basename(source); + + return upload(api, { ...options, path: source, pattern }); + }, + }; }; - return forge.pem.encode(msg); + + +/***/ }), + +/***/ 95067: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const pinataSDK = __nccwpck_require__(44386); +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + +let pinataOptions = { + pinataOptions: { + cidVersion: 0, + wrapWithDirectory: false, + }, }; -/** - * Decrypts an RSA private key. - * - * @param pem the PEM-formatted EncryptedPrivateKeyInfo to decrypt. - * @param password the password to use. - * - * @return the RSA key on success, null on failure. - */ -pki.decryptRsaPrivateKey = function(pem, password) { - var rval = null; +/* harmony default export */ const pinata = ({ + name: "Pinata", + builder: async (options) => { + const { pinataKey, pinataSecret } = options; + if (!pinataKey) { + throw new Error("[pinata] Key is empty. (input `pinataKey`)"); + } - var msg = forge.pem.decode(pem)[0]; + if (!pinataSecret) { + throw new Error("[pinata] Secret is empty. (input `pinataSecret`)"); + } - if(msg.type !== 'ENCRYPTED PRIVATE KEY' && - msg.type !== 'PRIVATE KEY' && - msg.type !== 'RSA PRIVATE KEY') { - var error = new Error('Could not convert private key from PEM; PEM header type ' + - 'is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".'); - error.headerType = error; - throw error; - } + return pinata_sdk(pinataKey, pinataSecret); + }, + upload: async (api, options) => { +<<<<<<< HEAD + const { path, pinataPinName, verbose } = options; - if(msg.procType && msg.procType.type === 'ENCRYPTED') { - var dkLen; - var cipherFn; - switch(msg.dekInfo.algorithm) { - case 'DES-CBC': - dkLen = 8; - cipherFn = forge.des.createDecryptionCipher; - break; - case 'DES-EDE3-CBC': - dkLen = 24; - cipherFn = forge.des.createDecryptionCipher; - break; - case 'AES-128-CBC': - dkLen = 16; - cipherFn = forge.aes.createDecryptionCipher; - break; - case 'AES-192-CBC': - dkLen = 24; - cipherFn = forge.aes.createDecryptionCipher; - break; - case 'AES-256-CBC': - dkLen = 32; - cipherFn = forge.aes.createDecryptionCipher; - break; - case 'RC2-40-CBC': - dkLen = 5; - cipherFn = function(key) { - return forge.rc2.createDecryptionCipher(key, 40); - }; - break; - case 'RC2-64-CBC': - dkLen = 8; - cipherFn = function(key) { - return forge.rc2.createDecryptionCipher(key, 64); + let source = path; + if (!external_node_path_namespaceObject.isAbsolute(source)) { + const dir = (process.env.GITHUB_WORKSPACE || process.cwd()).toString(); + source = external_node_path_namespaceObject.join(dir, source); + } + + if (pinataPinName) { +======= + const { path, pinName, pinataPinName, verbose } = options; + const _pinName = pinName || pinataPinName; + if (_pinName) { +>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05 + pinataOptions = { + ...pinataOptions, + pinataMetadata: { + name: _pinName, + }, }; - break; - case 'RC2-128-CBC': - dkLen = 16; - cipherFn = function(key) { - return forge.rc2.createDecryptionCipher(key, 128); + } + + return api.pinFromFS(path, pinataOptions).then((result) => { + if (verbose) { + console.log(result); + } + + return { + cid: result.IpfsHash.toString(), + ipfs: result.IpfsHash.toString(), }; - break; - default: - var error = new Error('Could not decrypt private key; unsupported ' + - 'encryption algorithm "' + msg.dekInfo.algorithm + '".'); - error.algorithm = msg.dekInfo.algorithm; - throw error; + }); + }, +}); + +;// CONCATENATED MODULE: ./pinners/infura.js + + + + + +/* harmony default export */ const infura = ({ + name: "Infura", + builder: async (options) => { + const { infuraProjectId, infuraProjectSecret, headers, timeout } = options; + if (!infuraProjectId) { + throw new Error("[infura] ProjectId is empty"); } - // use OpenSSL legacy key derivation - var iv = forge.util.hexToBytes(msg.dekInfo.parameters); - var dk = forge.pbe.opensslDeriveBytes(password, iv.substr(0, 8), dkLen); - var cipher = cipherFn(dk); - cipher.start(iv); - cipher.update(forge.util.createBuffer(msg.body)); - if(cipher.finish()) { - rval = cipher.output.getBytes(); - } else { - return rval; + if (!infuraProjectSecret) { + throw new Error("[infura] ProjectSecret is empty"); } - } else { - rval = msg.body; - } - if(msg.type === 'ENCRYPTED PRIVATE KEY') { - rval = pki.decryptPrivateKeyInfo(asn1.fromDer(rval), password); - } else { - // decryption already performed above - rval = asn1.fromDer(rval); - } + const token = Buffer.from( + `${infuraProjectId}:${infuraProjectSecret}` + ).toString("base64"); - if(rval !== null) { - rval = pki.privateKeyFromAsn1(rval); - } + return src_create({ + host: "ipfs.infura.io", + port: "5001", + protocol: "https", + headers: { + ...headers, + authorization: `Basic ${token}`, + }, + timeout, + }); + }, + upload: async (api, options) => { + const { path: p, verbose } = options; + const pattern = external_node_fs_namespaceObject.lstatSync(p).isDirectory() + ? `${external_node_path_namespaceObject.basename(p)}/**/*` + : external_node_path_namespaceObject.basename(p); + const { cid } = await dist_src( + api.addAll(globSource(external_node_path_namespaceObject.dirname(p), pattern), { pin: true }) + ); - return rval; -}; + if (!cid) throw new Error("Content hash is not found."); + + if (verbose) console.log(cid); + + return { + cid: cid.toString(), + ipfs: cid.toString(), + }; + }, +}); + +// EXTERNAL MODULE: ./node_modules/@aws-sdk/client-s3/dist-cjs/index.js +var dist_cjs = __nccwpck_require__(23371); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/bind.js + + +function bind(fn, thisArg) { + return function wrap() { + return fn.apply(thisArg, arguments); + }; +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/utils.js + + + + +// utils is a library of generic helper functions non-specific to axios + +const {toString: utils_toString} = Object.prototype; +const {getPrototypeOf} = Object; + +const kindOf = (cache => thing => { + const str = utils_toString.call(thing); + return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase()); +})(Object.create(null)); + +const kindOfTest = (type) => { + type = type.toLowerCase(); + return (thing) => kindOf(thing) === type +} + +const typeOfTest = type => thing => typeof thing === type; /** - * Derives a PKCS#12 key. + * Determine if a value is an Array * - * @param password the password to derive the key material from, null or - * undefined for none. - * @param salt the salt, as a ByteBuffer, to use. - * @param id the PKCS#12 ID byte (1 = key material, 2 = IV, 3 = MAC). - * @param iter the iteration count. - * @param n the number of bytes to derive from the password. - * @param md the message digest to use, defaults to SHA-1. + * @param {Object} val The value to test * - * @return a ByteBuffer with the bytes derived from the password. + * @returns {boolean} True if value is an Array, otherwise false */ -pki.pbe.generatePkcs12Key = function(password, salt, id, iter, n, md) { - var j, l; - - if(typeof md === 'undefined' || md === null) { - if(!('sha1' in forge.md)) { - throw new Error('"sha1" hash algorithm unavailable.'); - } - md = forge.md.sha1.create(); - } - - var u = md.digestLength; - var v = md.blockLength; - var result = new forge.util.ByteBuffer(); +const {isArray} = Array; - /* Convert password to Unicode byte buffer + trailing 0-byte. */ - var passBuf = new forge.util.ByteBuffer(); - if(password !== null && password !== undefined) { - for(l = 0; l < password.length; l++) { - passBuf.putInt16(password.charCodeAt(l)); - } - passBuf.putInt16(0); - } +/** + * Determine if a value is undefined + * + * @param {*} val The value to test + * + * @returns {boolean} True if the value is undefined, otherwise false + */ +const isUndefined = typeOfTest('undefined'); - /* Length of salt and password in BYTES. */ - var p = passBuf.length(); - var s = salt.length(); +/** + * Determine if a value is a Buffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Buffer, otherwise false + */ +function utils_isBuffer(val) { + return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) + && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val); +} - /* 1. Construct a string, D (the "diversifier"), by concatenating - v copies of ID. */ - var D = new forge.util.ByteBuffer(); - D.fillWithByte(id, v); +/** + * Determine if a value is an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is an ArrayBuffer, otherwise false + */ +const isArrayBuffer = kindOfTest('ArrayBuffer'); - /* 2. Concatenate copies of the salt together to create a string S of length - v * ceil(s / v) bytes (the final copy of the salt may be trunacted - to create S). - Note that if the salt is the empty string, then so is S. */ - var Slen = v * Math.ceil(s / v); - var S = new forge.util.ByteBuffer(); - for(l = 0; l < Slen; l++) { - S.putByte(salt.at(l % s)); - } - /* 3. Concatenate copies of the password together to create a string P of - length v * ceil(p / v) bytes (the final copy of the password may be - truncated to create P). - Note that if the password is the empty string, then so is P. */ - var Plen = v * Math.ceil(p / v); - var P = new forge.util.ByteBuffer(); - for(l = 0; l < Plen; l++) { - P.putByte(passBuf.at(l % p)); +/** + * Determine if a value is a view on an ArrayBuffer + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false + */ +function isArrayBufferView(val) { + let result; + if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) { + result = ArrayBuffer.isView(val); + } else { + result = (val) && (val.buffer) && (isArrayBuffer(val.buffer)); } + return result; +} - /* 4. Set I=S||P to be the concatenation of S and P. */ - var I = S; - I.putBuffer(P); +/** + * Determine if a value is a String + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a String, otherwise false + */ +const isString = typeOfTest('string'); - /* 5. Set c=ceil(n / u). */ - var c = Math.ceil(n / u); +/** + * Determine if a value is a Function + * + * @param {*} val The value to test + * @returns {boolean} True if value is a Function, otherwise false + */ +const isFunction = typeOfTest('function'); - /* 6. For i=1, 2, ..., c, do the following: */ - for(var i = 1; i <= c; i++) { - /* a) Set Ai=H^r(D||I). (l.e. the rth hash of D||I, H(H(H(...H(D||I)))) */ - var buf = new forge.util.ByteBuffer(); - buf.putBytes(D.bytes()); - buf.putBytes(I.bytes()); - for(var round = 0; round < iter; round++) { - md.start(); - md.update(buf.getBytes()); - buf = md.digest(); - } +/** + * Determine if a value is a Number + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Number, otherwise false + */ +const isNumber = typeOfTest('number'); - /* b) Concatenate copies of Ai to create a string B of length v bytes (the - final copy of Ai may be truncated to create B). */ - var B = new forge.util.ByteBuffer(); - for(l = 0; l < v; l++) { - B.putByte(buf.at(l % u)); - } +/** + * Determine if a value is an Object + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an Object, otherwise false + */ +const isObject = (thing) => thing !== null && typeof thing === 'object'; - /* c) Treating I as a concatenation I0, I1, ..., Ik-1 of v-byte blocks, - where k=ceil(s / v) + ceil(p / v), modify I by setting - Ij=(Ij+B+1) mod 2v for each j. */ - var k = Math.ceil(s / v) + Math.ceil(p / v); - var Inew = new forge.util.ByteBuffer(); - for(j = 0; j < k; j++) { - var chunk = new forge.util.ByteBuffer(I.getBytes(v)); - var x = 0x1ff; - for(l = B.length() - 1; l >= 0; l--) { - x = x >> 8; - x += B.at(l) + chunk.at(l); - chunk.setAt(l, x & 0xff); - } - Inew.putBuffer(chunk); - } - I = Inew; +/** + * Determine if a value is a Boolean + * + * @param {*} thing The value to test + * @returns {boolean} True if value is a Boolean, otherwise false + */ +const isBoolean = thing => thing === true || thing === false; - /* Add Ai to A. */ - result.putBuffer(buf); +/** + * Determine if a value is a plain Object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a plain Object, otherwise false + */ +const isPlainObject = (val) => { + if (kindOf(val) !== 'object') { + return false; } - result.truncate(result.length() - n); - return result; -}; + const prototype = getPrototypeOf(val); + return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val); +} /** - * Get new Forge cipher object instance. + * Determine if a value is a Date * - * @param oid the OID (in string notation). - * @param params the ASN.1 params object. - * @param password the password to decrypt with. + * @param {*} val The value to test * - * @return new cipher object instance. + * @returns {boolean} True if value is a Date, otherwise false */ -pki.pbe.getCipher = function(oid, params, password) { - switch(oid) { - case pki.oids['pkcs5PBES2']: - return pki.pbe.getCipherForPBES2(oid, params, password); - - case pki.oids['pbeWithSHAAnd3-KeyTripleDES-CBC']: - case pki.oids['pbewithSHAAnd40BitRC2-CBC']: - return pki.pbe.getCipherForPKCS12PBE(oid, params, password); - - default: - var error = new Error('Cannot read encrypted PBE data block. Unsupported OID.'); - error.oid = oid; - error.supportedOids = [ - 'pkcs5PBES2', - 'pbeWithSHAAnd3-KeyTripleDES-CBC', - 'pbewithSHAAnd40BitRC2-CBC' - ]; - throw error; - } -}; +const isDate = kindOfTest('Date'); /** - * Get new Forge cipher object instance according to PBES2 params block. + * Determine if a value is a File * - * The returned cipher instance is already started using the IV - * from PBES2 parameter block. + * @param {*} val The value to test * - * @param oid the PKCS#5 PBKDF2 OID (in string notation). - * @param params the ASN.1 PBES2-params object. - * @param password the password to decrypt with. + * @returns {boolean} True if value is a File, otherwise false + */ +const isFile = kindOfTest('File'); + +/** + * Determine if a value is a Blob * - * @return new cipher object instance. + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Blob, otherwise false */ -pki.pbe.getCipherForPBES2 = function(oid, params, password) { - // get PBE params - var capture = {}; - var errors = []; - if(!asn1.validate(params, PBES2AlgorithmsValidator, capture, errors)) { - var error = new Error('Cannot read password-based-encryption algorithm ' + - 'parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.'); - error.errors = errors; - throw error; - } +const utils_isBlob = kindOfTest('Blob'); - // check oids - oid = asn1.derToOid(capture.kdfOid); - if(oid !== pki.oids['pkcs5PBKDF2']) { - var error = new Error('Cannot read encrypted private key. ' + - 'Unsupported key derivation function OID.'); - error.oid = oid; - error.supportedOids = ['pkcs5PBKDF2']; - throw error; - } - oid = asn1.derToOid(capture.encOid); - if(oid !== pki.oids['aes128-CBC'] && - oid !== pki.oids['aes192-CBC'] && - oid !== pki.oids['aes256-CBC'] && - oid !== pki.oids['des-EDE3-CBC'] && - oid !== pki.oids['desCBC']) { - var error = new Error('Cannot read encrypted private key. ' + - 'Unsupported encryption scheme OID.'); - error.oid = oid; - error.supportedOids = [ - 'aes128-CBC', 'aes192-CBC', 'aes256-CBC', 'des-EDE3-CBC', 'desCBC']; - throw error; - } +/** + * Determine if a value is a FileList + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a File, otherwise false + */ +const isFileList = kindOfTest('FileList'); - // set PBE params - var salt = capture.kdfSalt; - var count = forge.util.createBuffer(capture.kdfIterationCount); - count = count.getInt(count.length() << 3); - var dkLen; - var cipherFn; - switch(pki.oids[oid]) { - case 'aes128-CBC': - dkLen = 16; - cipherFn = forge.aes.createDecryptionCipher; - break; - case 'aes192-CBC': - dkLen = 24; - cipherFn = forge.aes.createDecryptionCipher; - break; - case 'aes256-CBC': - dkLen = 32; - cipherFn = forge.aes.createDecryptionCipher; - break; - case 'des-EDE3-CBC': - dkLen = 24; - cipherFn = forge.des.createDecryptionCipher; - break; - case 'desCBC': - dkLen = 8; - cipherFn = forge.des.createDecryptionCipher; - break; - } +/** + * Determine if a value is a Stream + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a Stream, otherwise false + */ +const isStream = (val) => isObject(val) && isFunction(val.pipe); - // get PRF message digest - var md = prfOidToMessageDigest(capture.prfOid); +/** + * Determine if a value is a FormData + * + * @param {*} thing The value to test + * + * @returns {boolean} True if value is an FormData, otherwise false + */ +const isFormData = (thing) => { + let kind; + return thing && ( + (typeof FormData === 'function' && thing instanceof FormData) || ( + isFunction(thing.append) && ( + (kind = kindOf(thing)) === 'formdata' || + // detect form-data instance + (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]') + ) + ) + ) +} - // decrypt private key using pbe with chosen PRF and AES/DES - var dk = forge.pkcs5.pbkdf2(password, salt, count, dkLen, md); - var iv = capture.encIv; - var cipher = cipherFn(dk); - cipher.start(iv); +/** + * Determine if a value is a URLSearchParams object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a URLSearchParams object, otherwise false + */ +const isURLSearchParams = kindOfTest('URLSearchParams'); - return cipher; -}; +/** + * Trim excess whitespace off the beginning and end of a string + * + * @param {String} str The String to trim + * + * @returns {String} The String freed of excess whitespace + */ +const trim = (str) => str.trim ? + str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ''); /** - * Get new Forge cipher object instance for PKCS#12 PBE. + * Iterate over an Array or an Object invoking a function for each item. * - * The returned cipher instance is already started using the key & IV - * derived from the provided password and PKCS#12 PBE salt. + * If `obj` is an Array callback will be called passing + * the value, index, and complete array for each item. * - * @param oid The PKCS#12 PBE OID (in string notation). - * @param params The ASN.1 PKCS#12 PBE-params object. - * @param password The password to decrypt with. + * If 'obj' is an Object callback will be called passing + * the value, key, and complete object for each property. * - * @return the new cipher object instance. + * @param {Object|Array} obj The object to iterate + * @param {Function} fn The callback to invoke for each item + * + * @param {Boolean} [allOwnKeys = false] + * @returns {any} */ -pki.pbe.getCipherForPKCS12PBE = function(oid, params, password) { - // get PBE params - var capture = {}; - var errors = []; - if(!asn1.validate(params, pkcs12PbeParamsValidator, capture, errors)) { - var error = new Error('Cannot read password-based-encryption algorithm ' + - 'parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.'); - error.errors = errors; - throw error; +function forEach(obj, fn, {allOwnKeys = false} = {}) { + // Don't bother if no value provided + if (obj === null || typeof obj === 'undefined') { + return; } - var salt = forge.util.createBuffer(capture.salt); - var count = forge.util.createBuffer(capture.iterations); - count = count.getInt(count.length() << 3); + let i; + let l; - var dkLen, dIvLen, cipherFn; - switch(oid) { - case pki.oids['pbeWithSHAAnd3-KeyTripleDES-CBC']: - dkLen = 24; - dIvLen = 8; - cipherFn = forge.des.startDecrypting; - break; + // Force an array if not already something iterable + if (typeof obj !== 'object') { + /*eslint no-param-reassign:0*/ + obj = [obj]; + } - case pki.oids['pbewithSHAAnd40BitRC2-CBC']: - dkLen = 5; - dIvLen = 8; - cipherFn = function(key, iv) { - var cipher = forge.rc2.createDecryptionCipher(key, 40); - cipher.start(iv, null); - return cipher; - }; - break; + if (isArray(obj)) { + // Iterate over array values + for (i = 0, l = obj.length; i < l; i++) { + fn.call(null, obj[i], i, obj); + } + } else { + // Iterate over object keys + const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj); + const len = keys.length; + let key; - default: - var error = new Error('Cannot read PKCS #12 PBE data block. Unsupported OID.'); - error.oid = oid; - throw error; + for (i = 0; i < len; i++) { + key = keys[i]; + fn.call(null, obj[key], key, obj); + } } +} - // get PRF message digest - var md = prfOidToMessageDigest(capture.prfOid); - var key = pki.pbe.generatePkcs12Key(password, salt, 1, count, dkLen, md); - md.start(); - var iv = pki.pbe.generatePkcs12Key(password, salt, 2, count, dIvLen, md); +function findKey(obj, key) { + key = key.toLowerCase(); + const keys = Object.keys(obj); + let i = keys.length; + let _key; + while (i-- > 0) { + _key = keys[i]; + if (key === _key.toLowerCase()) { + return _key; + } + } + return null; +} - return cipherFn(key, iv); -}; +const _global = (() => { + /*eslint no-undef:0*/ + if (typeof globalThis !== "undefined") return globalThis; + return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global) +})(); + +const isContextDefined = (context) => !isUndefined(context) && context !== _global; /** - * OpenSSL's legacy key derivation function. + * Accepts varargs expecting each argument to be an object, then + * immutably merges the properties of each object and returns result. * - * See: http://www.openssl.org/docs/crypto/EVP_BytesToKey.html + * When multiple objects contain the same key the later object in + * the arguments list will take precedence. * - * @param password the password to derive the key from. - * @param salt the salt to use, null for none. - * @param dkLen the number of bytes needed for the derived key. - * @param [options] the options to use: - * [md] an optional message digest object to use. + * Example: + * + * ```js + * var result = merge({foo: 123}, {foo: 456}); + * console.log(result.foo); // outputs 456 + * ``` + * + * @param {Object} obj1 Object to merge + * + * @returns {Object} Result of all merge properties */ -pki.pbe.opensslDeriveBytes = function(password, salt, dkLen, md) { - if(typeof md === 'undefined' || md === null) { - if(!('md5' in forge.md)) { - throw new Error('"md5" hash algorithm unavailable.'); +function utils_merge(/* obj1, obj2, obj3, ... */) { + const {caseless} = isContextDefined(this) && this || {}; + const result = {}; + const assignValue = (val, key) => { + const targetKey = caseless && findKey(result, key) || key; + if (isPlainObject(result[targetKey]) && isPlainObject(val)) { + result[targetKey] = utils_merge(result[targetKey], val); + } else if (isPlainObject(val)) { + result[targetKey] = utils_merge({}, val); + } else if (isArray(val)) { + result[targetKey] = val.slice(); + } else { + result[targetKey] = val; } - md = forge.md.md5.create(); } - if(salt === null) { - salt = ''; - } - var digests = [hash(md, password + salt)]; - for(var length = 16, i = 1; length < dkLen; ++i, length += 16) { - digests.push(hash(md, digests[i - 1] + password + salt)); - } - return digests.join('').substr(0, dkLen); -}; -function hash(md, bytes) { - return md.start().update(bytes).digest().getBytes(); + for (let i = 0, l = arguments.length; i < l; i++) { + arguments[i] && forEach(arguments[i], assignValue); + } + return result; } -function prfOidToMessageDigest(prfOid) { - // get PRF algorithm, default to SHA-1 - var prfAlgorithm; - if(!prfOid) { - prfAlgorithm = 'hmacWithSHA1'; - } else { - prfAlgorithm = pki.oids[asn1.derToOid(prfOid)]; - if(!prfAlgorithm) { - var error = new Error('Unsupported PRF OID.'); - error.oid = prfOid; - error.supported = [ - 'hmacWithSHA1', 'hmacWithSHA224', 'hmacWithSHA256', 'hmacWithSHA384', - 'hmacWithSHA512']; - throw error; +/** + * Extends object a by mutably adding to it the properties of object b. + * + * @param {Object} a The object to be extended + * @param {Object} b The object to copy properties from + * @param {Object} thisArg The object to bind function to + * + * @param {Boolean} [allOwnKeys] + * @returns {Object} The resulting value of object a + */ +const extend = (a, b, thisArg, {allOwnKeys}= {}) => { + forEach(b, (val, key) => { + if (thisArg && isFunction(val)) { + a[key] = bind(val, thisArg); + } else { + a[key] = val; } - } - return prfAlgorithmToMessageDigest(prfAlgorithm); + }, {allOwnKeys}); + return a; } -function prfAlgorithmToMessageDigest(prfAlgorithm) { - var factory = forge.md; - switch(prfAlgorithm) { - case 'hmacWithSHA224': - factory = forge.md.sha512; - case 'hmacWithSHA1': - case 'hmacWithSHA256': - case 'hmacWithSHA384': - case 'hmacWithSHA512': - prfAlgorithm = prfAlgorithm.substr(8).toLowerCase(); - break; - default: - var error = new Error('Unsupported PRF algorithm.'); - error.algorithm = prfAlgorithm; - error.supported = [ - 'hmacWithSHA1', 'hmacWithSHA224', 'hmacWithSHA256', 'hmacWithSHA384', - 'hmacWithSHA512']; - throw error; - } - if(!factory || !(prfAlgorithm in factory)) { - throw new Error('Unknown hash algorithm: ' + prfAlgorithm); +/** + * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM) + * + * @param {string} content with BOM + * + * @returns {string} content value without BOM + */ +const stripBOM = (content) => { + if (content.charCodeAt(0) === 0xFEFF) { + content = content.slice(1); } - return factory[prfAlgorithm].create(); + return content; } -function createPbkdf2Params(salt, countBytes, dkLen, prfAlgorithm) { - var params = asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // salt - asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, salt), - // iteration count - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - countBytes.getBytes()) - ]); - // when PRF algorithm is not SHA-1 default, add key length and PRF algorithm - if(prfAlgorithm !== 'hmacWithSHA1') { - params.value.push( - // key length - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - forge.util.hexToBytes(dkLen.toString(16))), - // AlgorithmIdentifier - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // algorithm - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, - asn1.oidToDer(pki.oids[prfAlgorithm]).getBytes()), - // parameters (null) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '') - ])); - } - return params; +/** + * Inherit the prototype methods from one constructor into another + * @param {function} constructor + * @param {function} superConstructor + * @param {object} [props] + * @param {object} [descriptors] + * + * @returns {void} + */ +const inherits = (constructor, superConstructor, props, descriptors) => { + constructor.prototype = Object.create(superConstructor.prototype, descriptors); + constructor.prototype.constructor = constructor; + Object.defineProperty(constructor, 'super', { + value: superConstructor.prototype + }); + props && Object.assign(constructor.prototype, props); } +/** + * Resolve object with deep prototype chain to a flat object + * @param {Object} sourceObj source object + * @param {Object} [destObj] + * @param {Function|Boolean} [filter] + * @param {Function} [propFilter] + * + * @returns {Object} + */ +const toFlatObject = (sourceObj, destObj, filter, propFilter) => { + let props; + let i; + let prop; + const merged = {}; + + destObj = destObj || {}; + // eslint-disable-next-line no-eq-null,eqeqeq + if (sourceObj == null) return destObj; -/***/ }), + do { + props = Object.getOwnPropertyNames(sourceObj); + i = props.length; + while (i-- > 0) { + prop = props[i]; + if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) { + destObj[prop] = sourceObj[prop]; + merged[prop] = true; + } + } + sourceObj = filter !== false && getPrototypeOf(sourceObj); + } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype); -/***/ 84418: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return destObj; +} /** - * Password-Based Key-Derivation Function #2 implementation. - * - * See RFC 2898 for details. + * Determines whether a string ends with the characters of a specified string * - * @author Dave Longley + * @param {String} str + * @param {String} searchString + * @param {Number} [position= 0] * - * Copyright (c) 2010-2013 Digital Bazaar, Inc. + * @returns {boolean} */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(46773); -__nccwpck_require__(80554); -__nccwpck_require__(36536); +const endsWith = (str, searchString, position) => { + str = String(str); + if (position === undefined || position > str.length) { + position = str.length; + } + position -= searchString.length; + const lastIndex = str.indexOf(searchString, position); + return lastIndex !== -1 && lastIndex === position; +} -var pkcs5 = forge.pkcs5 = forge.pkcs5 || {}; -var crypto; -if(forge.util.isNodejs && !forge.options.usePureJavaScript) { - crypto = __nccwpck_require__(6113); +/** + * Returns new array from array like object or null if failed + * + * @param {*} [thing] + * + * @returns {?Array} + */ +const toArray = (thing) => { + if (!thing) return null; + if (isArray(thing)) return thing; + let i = thing.length; + if (!isNumber(i)) return null; + const arr = new Array(i); + while (i-- > 0) { + arr[i] = thing[i]; + } + return arr; } /** - * Derives a key from a password. + * Checking if the Uint8Array exists and if it does, it returns a function that checks if the + * thing passed in is an instance of Uint8Array * - * @param p the password as a binary-encoded string of bytes. - * @param s the salt as a binary-encoded string of bytes. - * @param c the iteration count, a positive integer. - * @param dkLen the intended length, in bytes, of the derived key, - * (max: 2^32 - 1) * hash length of the PRF. - * @param [md] the message digest (or algorithm identifier as a string) to use - * in the PRF, defaults to SHA-1. - * @param [callback(err, key)] presence triggers asynchronous version, called - * once the operation completes. + * @param {TypedArray} * - * @return the derived key, as a binary-encoded string of bytes, for the - * synchronous version (if no callback is specified). + * @returns {Array} */ -module.exports = forge.pbkdf2 = pkcs5.pbkdf2 = function( - p, s, c, dkLen, md, callback) { - if(typeof md === 'function') { - callback = md; - md = null; - } +// eslint-disable-next-line func-names +const isTypedArray = (TypedArray => { + // eslint-disable-next-line func-names + return thing => { + return TypedArray && thing instanceof TypedArray; + }; +})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array)); - // use native implementation if possible and not disabled, note that - // some node versions only support SHA-1, others allow digest to be changed - if(forge.util.isNodejs && !forge.options.usePureJavaScript && - crypto.pbkdf2 && (md === null || typeof md !== 'object') && - (crypto.pbkdf2Sync.length > 4 || (!md || md === 'sha1'))) { - if(typeof md !== 'string') { - // default prf to SHA-1 - md = 'sha1'; - } - p = Buffer.from(p, 'binary'); - s = Buffer.from(s, 'binary'); - if(!callback) { - if(crypto.pbkdf2Sync.length === 4) { - return crypto.pbkdf2Sync(p, s, c, dkLen).toString('binary'); - } - return crypto.pbkdf2Sync(p, s, c, dkLen, md).toString('binary'); - } - if(crypto.pbkdf2Sync.length === 4) { - return crypto.pbkdf2(p, s, c, dkLen, function(err, key) { - if(err) { - return callback(err); - } - callback(null, key.toString('binary')); - }); - } - return crypto.pbkdf2(p, s, c, dkLen, md, function(err, key) { - if(err) { - return callback(err); - } - callback(null, key.toString('binary')); - }); - } +/** + * For each entry in the object, call the function with the key and value. + * + * @param {Object} obj - The object to iterate over. + * @param {Function} fn - The function to call for each entry. + * + * @returns {void} + */ +const forEachEntry = (obj, fn) => { + const generator = obj && obj[Symbol.iterator]; - if(typeof md === 'undefined' || md === null) { - // default prf to SHA-1 - md = 'sha1'; - } - if(typeof md === 'string') { - if(!(md in forge.md.algorithms)) { - throw new Error('Unknown hash algorithm: ' + md); - } - md = forge.md[md].create(); + const iterator = generator.call(obj); + + let result; + + while ((result = iterator.next()) && !result.done) { + const pair = result.value; + fn.call(obj, pair[0], pair[1]); } +} - var hLen = md.digestLength; +/** + * It takes a regular expression and a string, and returns an array of all the matches + * + * @param {string} regExp - The regular expression to match against. + * @param {string} str - The string to search. + * + * @returns {Array} + */ +const matchAll = (regExp, str) => { + let matches; + const arr = []; - /* 1. If dkLen > (2^32 - 1) * hLen, output "derived key too long" and - stop. */ - if(dkLen > (0xFFFFFFFF * hLen)) { - var err = new Error('Derived key is too long.'); - if(callback) { - return callback(err); - } - throw err; + while ((matches = regExp.exec(str)) !== null) { + arr.push(matches); } - /* 2. Let len be the number of hLen-octet blocks in the derived key, - rounding up, and let r be the number of octets in the last - block: + return arr; +} - len = CEIL(dkLen / hLen), - r = dkLen - (len - 1) * hLen. */ - var len = Math.ceil(dkLen / hLen); - var r = dkLen - (len - 1) * hLen; +/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */ +const isHTMLForm = kindOfTest('HTMLFormElement'); - /* 3. For each block of the derived key apply the function F defined - below to the password P, the salt S, the iteration count c, and - the block index to compute the block: +const toCamelCase = str => { + return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, + function replacer(m, p1, p2) { + return p1.toUpperCase() + p2; + } + ); +}; - T_1 = F(P, S, c, 1), - T_2 = F(P, S, c, 2), - ... - T_len = F(P, S, c, len), +/* Creating a function that will check if an object has a property. */ +const utils_hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype); - where the function F is defined as the exclusive-or sum of the - first c iterates of the underlying pseudorandom function PRF - applied to the password P and the concatenation of the salt S - and the block index i: +/** + * Determine if a value is a RegExp object + * + * @param {*} val The value to test + * + * @returns {boolean} True if value is a RegExp object, otherwise false + */ +const isRegExp = kindOfTest('RegExp'); - F(P, S, c, i) = u_1 XOR u_2 XOR ... XOR u_c +const reduceDescriptors = (obj, reducer) => { + const descriptors = Object.getOwnPropertyDescriptors(obj); + const reducedDescriptors = {}; - where + forEach(descriptors, (descriptor, name) => { + let ret; + if ((ret = reducer(descriptor, name, obj)) !== false) { + reducedDescriptors[name] = ret || descriptor; + } + }); - u_1 = PRF(P, S || INT(i)), - u_2 = PRF(P, u_1), - ... - u_c = PRF(P, u_{c-1}). + Object.defineProperties(obj, reducedDescriptors); +} - Here, INT(i) is a four-octet encoding of the integer i, most - significant octet first. */ - var prf = forge.hmac.create(); - prf.start(md, p); - var dk = ''; - var xor, u_c, u_c1; +/** + * Makes all methods read-only + * @param {Object} obj + */ - // sync version - if(!callback) { - for(var i = 1; i <= len; ++i) { - // PRF(P, S || INT(i)) (first iteration) - prf.start(null, null); - prf.update(s); - prf.update(forge.util.int32ToBytes(i)); - xor = u_c1 = prf.digest().getBytes(); +const freezeMethods = (obj) => { + reduceDescriptors(obj, (descriptor, name) => { + // skip restricted props in strict mode + if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) { + return false; + } - // PRF(P, u_{c-1}) (other iterations) - for(var j = 2; j <= c; ++j) { - prf.start(null, null); - prf.update(u_c1); - u_c = prf.digest().getBytes(); - // F(p, s, c, i) - xor = forge.util.xorBytes(xor, u_c, hLen); - u_c1 = u_c; - } + const value = obj[name]; - /* 4. Concatenate the blocks and extract the first dkLen octets to - produce a derived key DK: + if (!isFunction(value)) return; - DK = T_1 || T_2 || ... || T_len<0..r-1> */ - dk += (i < len) ? xor : xor.substr(0, r); + descriptor.enumerable = false; + + if ('writable' in descriptor) { + descriptor.writable = false; + return; } - /* 5. Output the derived key DK. */ - return dk; - } - // async version - var i = 1, j; - function outer() { - if(i > len) { - // done - return callback(null, dk); + if (!descriptor.set) { + descriptor.set = () => { + throw Error('Can not rewrite read-only method \'' + name + '\''); + }; } + }); +} - // PRF(P, S || INT(i)) (first iteration) - prf.start(null, null); - prf.update(s); - prf.update(forge.util.int32ToBytes(i)); - xor = u_c1 = prf.digest().getBytes(); +const toObjectSet = (arrayOrString, delimiter) => { + const obj = {}; - // PRF(P, u_{c-1}) (other iterations) - j = 2; - inner(); + const define = (arr) => { + arr.forEach(value => { + obj[value] = true; + }); } - function inner() { - if(j <= c) { - prf.start(null, null); - prf.update(u_c1); - u_c = prf.digest().getBytes(); - // F(p, s, c, i) - xor = forge.util.xorBytes(xor, u_c, hLen); - u_c1 = u_c; - ++j; - return forge.util.setImmediate(inner); - } + isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter)); - /* 4. Concatenate the blocks and extract the first dkLen octets to - produce a derived key DK: + return obj; +} - DK = T_1 || T_2 || ... || T_len<0..r-1> */ - dk += (i < len) ? xor : xor.substr(0, r); +const noop = () => {} - ++i; - outer(); - } +const toFiniteNumber = (value, defaultValue) => { + value = +value; + return Number.isFinite(value) ? value : defaultValue; +} - outer(); -}; +const ALPHA = 'abcdefghijklmnopqrstuvwxyz' +const DIGIT = '0123456789'; -/***/ }), +const ALPHABET = { + DIGIT, + ALPHA, + ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT +} -/***/ 57334: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => { + let str = ''; + const {length} = alphabet; + while (size--) { + str += alphabet[Math.random() * length|0] + } + + return str; +} /** - * Javascript implementation of basic PEM (Privacy Enhanced Mail) algorithms. - * - * See: RFC 1421. - * - * @author Dave Longley - * - * Copyright (c) 2013-2014 Digital Bazaar, Inc. - * - * A Forge PEM object has the following fields: - * - * type: identifies the type of message (eg: "RSA PRIVATE KEY"). - * - * procType: identifies the type of processing performed on the message, - * it has two subfields: version and type, eg: 4,ENCRYPTED. - * - * contentDomain: identifies the type of content in the message, typically - * only uses the value: "RFC822". - * - * dekInfo: identifies the message encryption algorithm and mode and includes - * any parameters for the algorithm, it has two subfields: algorithm and - * parameters, eg: DES-CBC,F8143EDE5960C597. + * If the thing is a FormData object, return true, otherwise return false. * - * headers: contains all other PEM encapsulated headers -- where order is - * significant (for pairing data like recipient ID + key info). + * @param {unknown} thing - The thing to check. * - * body: the binary-encoded body. + * @returns {boolean} */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(36536); +function isSpecCompliantForm(thing) { + return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]); +} -// shortcut for pem API -var pem = module.exports = forge.pem = forge.pem || {}; +const toJSONObject = (obj) => { + const stack = new Array(10); -/** - * Encodes (serializes) the given PEM object. - * - * @param msg the PEM message object to encode. - * @param options the options to use: - * maxline the maximum characters per line for the body, (default: 64). - * - * @return the PEM-formatted string. - */ -pem.encode = function(msg, options) { - options = options || {}; - var rval = '-----BEGIN ' + msg.type + '-----\r\n'; + const visit = (source, i) => { - // encode special headers - var header; - if(msg.procType) { - header = { - name: 'Proc-Type', - values: [String(msg.procType.version), msg.procType.type] - }; - rval += foldHeader(header); - } - if(msg.contentDomain) { - header = {name: 'Content-Domain', values: [msg.contentDomain]}; - rval += foldHeader(header); - } - if(msg.dekInfo) { - header = {name: 'DEK-Info', values: [msg.dekInfo.algorithm]}; - if(msg.dekInfo.parameters) { - header.values.push(msg.dekInfo.parameters); - } - rval += foldHeader(header); - } + if (isObject(source)) { + if (stack.indexOf(source) >= 0) { + return; + } - if(msg.headers) { - // encode all other headers - for(var i = 0; i < msg.headers.length; ++i) { - rval += foldHeader(msg.headers[i]); + if(!('toJSON' in source)) { + stack[i] = source; + const target = isArray(source) ? [] : {}; + + forEach(source, (value, key) => { + const reducedValue = visit(value, i + 1); + !isUndefined(reducedValue) && (target[key] = reducedValue); + }); + + stack[i] = undefined; + + return target; + } } - } - // terminate header - if(msg.procType) { - rval += '\r\n'; + return source; } - // add body - rval += forge.util.encode64(msg.body, options.maxline || 64) + '\r\n'; + return visit(obj, 0); +} + +const isAsyncFn = kindOfTest('AsyncFunction'); + +const isThenable = (thing) => + thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch); + +/* harmony default export */ const utils = ({ + isArray, + isArrayBuffer, + isBuffer: utils_isBuffer, + isFormData, + isArrayBufferView, + isString, + isNumber, + isBoolean, + isObject, + isPlainObject, + isUndefined, + isDate, + isFile, + isBlob: utils_isBlob, + isRegExp, + isFunction, + isStream, + isURLSearchParams, + isTypedArray, + isFileList, + forEach, + merge: utils_merge, + extend, + trim, + stripBOM, + inherits, + toFlatObject, + kindOf, + kindOfTest, + endsWith, + toArray, + forEachEntry, + matchAll, + isHTMLForm, + hasOwnProperty: utils_hasOwnProperty, + hasOwnProp: utils_hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection + reduceDescriptors, + freezeMethods, + toObjectSet, + toCamelCase, + noop, + toFiniteNumber, + findKey, + global: _global, + isContextDefined, + ALPHABET, + generateString, + isSpecCompliantForm, + toJSONObject, + isAsyncFn, + isThenable +}); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/core/AxiosError.js + + - rval += '-----END ' + msg.type + '-----\r\n'; - return rval; -}; /** - * Decodes (deserializes) all PEM messages found in the given string. + * Create an Error with the specified message, config, error code, request and response. * - * @param str the PEM-formatted string to decode. + * @param {string} message The error message. + * @param {string} [code] The error code (for example, 'ECONNABORTED'). + * @param {Object} [config] The config. + * @param {Object} [request] The request. + * @param {Object} [response] The response. * - * @return the PEM message objects in an array. + * @returns {Error} The created error. */ -pem.decode = function(str) { - var rval = []; +function AxiosError(message, code, config, request, response) { + Error.call(this); - // split string into PEM messages (be lenient w/EOF on BEGIN line) - var rMessage = /\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g; - var rHeader = /([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/; - var rCRLF = /\r?\n/; - var match; - while(true) { - match = rMessage.exec(str); - if(!match) { - break; - } + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + this.stack = (new Error()).stack; + } - // accept "NEW CERTIFICATE REQUEST" as "CERTIFICATE REQUEST" - // https://datatracker.ietf.org/doc/html/rfc7468#section-7 - var type = match[1]; - if(type === 'NEW CERTIFICATE REQUEST') { - type = 'CERTIFICATE REQUEST'; - } + this.message = message; + this.name = 'AxiosError'; + code && (this.code = code); + config && (this.config = config); + request && (this.request = request); + response && (this.response = response); +} - var msg = { - type: type, - procType: null, - contentDomain: null, - dekInfo: null, - headers: [], - body: forge.util.decode64(match[3]) +utils.inherits(AxiosError, Error, { + toJSON: function toJSON() { + return { + // Standard + message: this.message, + name: this.name, + // Microsoft + description: this.description, + number: this.number, + // Mozilla + fileName: this.fileName, + lineNumber: this.lineNumber, + columnNumber: this.columnNumber, + stack: this.stack, + // Axios + config: utils.toJSONObject(this.config), + code: this.code, + status: this.response && this.response.status ? this.response.status : null }; - rval.push(msg); + } +}); - // no headers - if(!match[2]) { - continue; - } +const AxiosError_prototype = AxiosError.prototype; +const descriptors = {}; - // parse headers - var lines = match[2].split(rCRLF); - var li = 0; - while(match && li < lines.length) { - // get line, trim any rhs whitespace - var line = lines[li].replace(/\s+$/, ''); +[ + 'ERR_BAD_OPTION_VALUE', + 'ERR_BAD_OPTION', + 'ECONNABORTED', + 'ETIMEDOUT', + 'ERR_NETWORK', + 'ERR_FR_TOO_MANY_REDIRECTS', + 'ERR_DEPRECATED', + 'ERR_BAD_RESPONSE', + 'ERR_BAD_REQUEST', + 'ERR_CANCELED', + 'ERR_NOT_SUPPORT', + 'ERR_INVALID_URL' +// eslint-disable-next-line func-names +].forEach(code => { + descriptors[code] = {value: code}; +}); - // RFC2822 unfold any following folded lines - for(var nl = li + 1; nl < lines.length; ++nl) { - var next = lines[nl]; - if(!/\s/.test(next[0])) { - break; - } - line += next; - li = nl; - } +Object.defineProperties(AxiosError, descriptors); +Object.defineProperty(AxiosError_prototype, 'isAxiosError', {value: true}); - // parse header - match = line.match(rHeader); - if(match) { - var header = {name: match[1], values: []}; - var values = match[2].split(','); - for(var vi = 0; vi < values.length; ++vi) { - header.values.push(ltrim(values[vi])); - } +// eslint-disable-next-line func-names +AxiosError.from = (error, code, config, request, response, customProps) => { + const axiosError = Object.create(AxiosError_prototype); - // Proc-Type must be the first header - if(!msg.procType) { - if(header.name !== 'Proc-Type') { - throw new Error('Invalid PEM formatted message. The first ' + - 'encapsulated header must be "Proc-Type".'); - } else if(header.values.length !== 2) { - throw new Error('Invalid PEM formatted message. The "Proc-Type" ' + - 'header must have two subfields.'); - } - msg.procType = {version: values[0], type: values[1]}; - } else if(!msg.contentDomain && header.name === 'Content-Domain') { - // special-case Content-Domain - msg.contentDomain = values[0] || ''; - } else if(!msg.dekInfo && header.name === 'DEK-Info') { - // special-case DEK-Info - if(header.values.length === 0) { - throw new Error('Invalid PEM formatted message. The "DEK-Info" ' + - 'header must have at least one subfield.'); - } - msg.dekInfo = {algorithm: values[0], parameters: values[1] || null}; - } else { - msg.headers.push(header); - } - } + utils.toFlatObject(error, axiosError, function filter(obj) { + return obj !== Error.prototype; + }, prop => { + return prop !== 'isAxiosError'; + }); - ++li; - } + AxiosError.call(axiosError, error.message, code, config, request, response); - if(msg.procType === 'ENCRYPTED' && !msg.dekInfo) { - throw new Error('Invalid PEM formatted message. The "DEK-Info" ' + - 'header must be present if "Proc-Type" is "ENCRYPTED".'); - } - } + axiosError.cause = error; - if(rval.length === 0) { - throw new Error('Invalid PEM formatted message.'); - } + axiosError.name = error.name; - return rval; + customProps && Object.assign(axiosError, customProps); + + return axiosError; }; -function foldHeader(header) { - var rval = header.name + ': '; +/* harmony default export */ const core_AxiosError = (AxiosError); - // ensure values with CRLF are folded - var values = []; - var insertSpace = function(match, $1) { - return ' ' + $1; - }; - for(var i = 0; i < header.values.length; ++i) { - values.push(header.values[i].replace(/^(\S+\r\n)/, insertSpace)); - } - rval += values.join(',') + '\r\n'; +// EXTERNAL MODULE: ./node_modules/form-data/lib/form_data.js +var form_data = __nccwpck_require__(68111); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/platform/node/classes/FormData.js - // do folding - var length = 0; - var candidate = -1; - for(var i = 0; i < rval.length; ++i, ++length) { - if(length > 65 && candidate !== -1) { - var insert = rval[candidate]; - if(insert === ',') { - ++candidate; - rval = rval.substr(0, candidate) + '\r\n ' + rval.substr(candidate); - } else { - rval = rval.substr(0, candidate) + - '\r\n' + insert + rval.substr(candidate + 1); - } - length = (i - candidate - 1); - candidate = -1; - ++i; - } else if(rval[i] === ' ' || rval[i] === '\t' || rval[i] === ',') { - candidate = i; - } - } - return rval; -} +/* harmony default export */ const classes_FormData = (form_data); -function ltrim(str) { - return str.replace(/^\s+/, ''); -} +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/toFormData.js -/***/ }), -/***/ 39703: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored + /** - * Partial implementation of PKCS#1 v2.2: RSA-OEAP - * - * Modified but based on the following MIT and BSD licensed code: - * - * https://github.com/kjur/jsjws/blob/master/rsa.js: - * - * The 'jsjws'(JSON Web Signature JavaScript Library) License - * - * Copyright (c) 2012 Kenji Urushima - * - * 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. + * Determines if the given thing is a array or js object. * - * 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. + * @param {string} thing - The object or array to be visited. * - * http://webrsa.cvs.sourceforge.net/viewvc/webrsa/Client/RSAES-OAEP.js?content-type=text%2Fplain: + * @returns {boolean} + */ +function isVisitable(thing) { + return utils.isPlainObject(thing) || utils.isArray(thing); +} + +/** + * It removes the brackets from the end of a string * - * RSAES-OAEP.js - * $Id: RSAES-OAEP.js,v 1.1.1.1 2003/03/19 15:37:20 ellispritchard Exp $ - * JavaScript Implementation of PKCS #1 v2.1 RSA CRYPTOGRAPHY STANDARD (RSA Laboratories, June 14, 2002) - * Copyright (C) Ellis Pritchard, Guardian Unlimited 2003. - * Contact: ellis@nukinetics.com - * Distributed under the BSD License. + * @param {string} key - The key of the parameter. * - * Official documentation: http://www.rsa.com/rsalabs/node.asp?id=2125 + * @returns {string} the key without the brackets. + */ +function removeBrackets(key) { + return utils.endsWith(key, '[]') ? key.slice(0, -2) : key; +} + +/** + * It takes a path, a key, and a boolean, and returns a string * - * @author Evan Jones (http://evanjones.ca/) - * @author Dave Longley + * @param {string} path - The path to the current key. + * @param {string} key - The key of the current object being iterated over. + * @param {string} dots - If true, the key will be rendered with dots instead of brackets. * - * Copyright (c) 2013-2014 Digital Bazaar, Inc. + * @returns {string} The path to the current key. */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(36536); -__nccwpck_require__(68737); -__nccwpck_require__(41447); - -// shortcut for PKCS#1 API -var pkcs1 = module.exports = forge.pkcs1 = forge.pkcs1 || {}; +function renderKey(path, key, dots) { + if (!path) return key; + return path.concat(key).map(function each(token, i) { + // eslint-disable-next-line no-param-reassign + token = removeBrackets(token); + return !dots && i ? '[' + token + ']' : token; + }).join(dots ? '.' : ''); +} /** - * Encode the given RSAES-OAEP message (M) using key, with optional label (L) - * and seed. - * - * This method does not perform RSA encryption, it only encodes the message - * using RSAES-OAEP. + * If the array is an array and none of its elements are visitable, then it's a flat array. * - * @param key the RSA key to use. - * @param message the message to encode. - * @param options the options to use: - * label an optional label to use. - * seed the seed to use. - * md the message digest object to use, undefined for SHA-1. - * mgf1 optional mgf1 parameters: - * md the message digest object to use for MGF1. + * @param {Array} arr - The array to check * - * @return the encoded message bytes. + * @returns {boolean} */ -pkcs1.encode_rsa_oaep = function(key, message, options) { - // parse arguments - var label; - var seed; - var md; - var mgf1Md; - // legacy args (label, seed, md) - if(typeof options === 'string') { - label = options; - seed = arguments[3] || undefined; - md = arguments[4] || undefined; - } else if(options) { - label = options.label || undefined; - seed = options.seed || undefined; - md = options.md || undefined; - if(options.mgf1 && options.mgf1.md) { - mgf1Md = options.mgf1.md; - } - } +function isFlatArray(arr) { + return utils.isArray(arr) && !arr.some(isVisitable); +} - // default OAEP to SHA-1 message digest - if(!md) { - md = forge.md.sha1.create(); - } else { - md.start(); - } +const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) { + return /^is[A-Z]/.test(prop); +}); - // default MGF-1 to same as OAEP - if(!mgf1Md) { - mgf1Md = md; - } +/** + * Convert a data object to FormData + * + * @param {Object} obj + * @param {?Object} [formData] + * @param {?Object} [options] + * @param {Function} [options.visitor] + * @param {Boolean} [options.metaTokens = true] + * @param {Boolean} [options.dots = false] + * @param {?Boolean} [options.indexes = false] + * + * @returns {Object} + **/ - // compute length in bytes and check output - var keyLength = Math.ceil(key.n.bitLength() / 8); - var maxLength = keyLength - 2 * md.digestLength - 2; - if(message.length > maxLength) { - var error = new Error('RSAES-OAEP input message length is too long.'); - error.length = message.length; - error.maxLength = maxLength; - throw error; +/** + * It converts an object into a FormData object + * + * @param {Object} obj - The object to convert to form data. + * @param {string} formData - The FormData object to append to. + * @param {Object} options + * + * @returns + */ +function toFormData(obj, formData, options) { + if (!utils.isObject(obj)) { + throw new TypeError('target must be an object'); } - if(!label) { - label = ''; - } - md.update(label, 'raw'); - var lHash = md.digest(); + // eslint-disable-next-line no-param-reassign + formData = formData || new (classes_FormData || FormData)(); - var PS = ''; - var PS_length = maxLength - message.length; - for(var i = 0; i < PS_length; i++) { - PS += '\x00'; - } + // eslint-disable-next-line no-param-reassign + options = utils.toFlatObject(options, { + metaTokens: true, + dots: false, + indexes: false + }, false, function defined(option, source) { + // eslint-disable-next-line no-eq-null,eqeqeq + return !utils.isUndefined(source[option]); + }); - var DB = lHash.getBytes() + PS + '\x01' + message; + const metaTokens = options.metaTokens; + // eslint-disable-next-line no-use-before-define + const visitor = options.visitor || defaultVisitor; + const dots = options.dots; + const indexes = options.indexes; + const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob; + const useBlob = _Blob && utils.isSpecCompliantForm(formData); - if(!seed) { - seed = forge.random.getBytes(md.digestLength); - } else if(seed.length !== md.digestLength) { - var error = new Error('Invalid RSAES-OAEP seed. The seed length must ' + - 'match the digest length.'); - error.seedLength = seed.length; - error.digestLength = md.digestLength; - throw error; + if (!utils.isFunction(visitor)) { + throw new TypeError('visitor must be a function'); } - var dbMask = rsa_mgf1(seed, keyLength - md.digestLength - 1, mgf1Md); - var maskedDB = forge.util.xorBytes(DB, dbMask, DB.length); - - var seedMask = rsa_mgf1(maskedDB, md.digestLength, mgf1Md); - var maskedSeed = forge.util.xorBytes(seed, seedMask, seed.length); + function convertValue(value) { + if (value === null) return ''; - // return encoded message - return '\x00' + maskedSeed + maskedDB; -}; + if (utils.isDate(value)) { + return value.toISOString(); + } -/** - * Decode the given RSAES-OAEP encoded message (EM) using key, with optional - * label (L). - * - * This method does not perform RSA decryption, it only decodes the message - * using RSAES-OAEP. - * - * @param key the RSA key to use. - * @param em the encoded message to decode. - * @param options the options to use: - * label an optional label to use. - * md the message digest object to use for OAEP, undefined for SHA-1. - * mgf1 optional mgf1 parameters: - * md the message digest object to use for MGF1. - * - * @return the decoded message bytes. - */ -pkcs1.decode_rsa_oaep = function(key, em, options) { - // parse args - var label; - var md; - var mgf1Md; - // legacy args - if(typeof options === 'string') { - label = options; - md = arguments[3] || undefined; - } else if(options) { - label = options.label || undefined; - md = options.md || undefined; - if(options.mgf1 && options.mgf1.md) { - mgf1Md = options.mgf1.md; + if (!useBlob && utils.isBlob(value)) { + throw new core_AxiosError('Blob is not supported. Use a Buffer instead.'); } - } - // compute length in bytes - var keyLength = Math.ceil(key.n.bitLength() / 8); + if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) { + return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value); + } - if(em.length !== keyLength) { - var error = new Error('RSAES-OAEP encoded message length is invalid.'); - error.length = em.length; - error.expectedLength = keyLength; - throw error; + return value; } - // default OAEP to SHA-1 message digest - if(md === undefined) { - md = forge.md.sha1.create(); - } else { - md.start(); - } + /** + * Default visitor. + * + * @param {*} value + * @param {String|Number} key + * @param {Array} path + * @this {FormData} + * + * @returns {boolean} return true to visit the each prop of the value recursively + */ + function defaultVisitor(value, key, path) { + let arr = value; + + if (value && !path && typeof value === 'object') { + if (utils.endsWith(key, '{}')) { + // eslint-disable-next-line no-param-reassign + key = metaTokens ? key : key.slice(0, -2); + // eslint-disable-next-line no-param-reassign + value = JSON.stringify(value); + } else if ( + (utils.isArray(value) && isFlatArray(value)) || + ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value)) + )) { + // eslint-disable-next-line no-param-reassign + key = removeBrackets(key); + + arr.forEach(function each(el, index) { + !(utils.isUndefined(el) || el === null) && formData.append( + // eslint-disable-next-line no-nested-ternary + indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'), + convertValue(el) + ); + }); + return false; + } + } - // default MGF-1 to same as OAEP - if(!mgf1Md) { - mgf1Md = md; - } + if (isVisitable(value)) { + return true; + } - if(keyLength < 2 * md.digestLength + 2) { - throw new Error('RSAES-OAEP key is too short for the hash function.'); - } + formData.append(renderKey(path, key, dots), convertValue(value)); - if(!label) { - label = ''; + return false; } - md.update(label, 'raw'); - var lHash = md.digest().getBytes(); - - // split the message into its parts - var y = em.charAt(0); - var maskedSeed = em.substring(1, md.digestLength + 1); - var maskedDB = em.substring(1 + md.digestLength); - var seedMask = rsa_mgf1(maskedDB, md.digestLength, mgf1Md); - var seed = forge.util.xorBytes(maskedSeed, seedMask, maskedSeed.length); - - var dbMask = rsa_mgf1(seed, keyLength - md.digestLength - 1, mgf1Md); - var db = forge.util.xorBytes(maskedDB, dbMask, maskedDB.length); + const stack = []; - var lHashPrime = db.substring(0, md.digestLength); + const exposedHelpers = Object.assign(predicates, { + defaultVisitor, + convertValue, + isVisitable + }); - // constant time check that all values match what is expected - var error = (y !== '\x00'); + function build(value, path) { + if (utils.isUndefined(value)) return; - // constant time check lHash vs lHashPrime - for(var i = 0; i < md.digestLength; ++i) { - error |= (lHash.charAt(i) !== lHashPrime.charAt(i)); - } + if (stack.indexOf(value) !== -1) { + throw Error('Circular reference detected in ' + path.join('.')); + } - // "constant time" find the 0x1 byte separating the padding (zeros) from the - // message - // TODO: It must be possible to do this in a better/smarter way? - var in_ps = 1; - var index = md.digestLength; - for(var j = md.digestLength; j < db.length; j++) { - var code = db.charCodeAt(j); + stack.push(value); - var is_0 = (code & 0x1) ^ 0x1; + utils.forEach(value, function each(el, key) { + const result = !(utils.isUndefined(el) || el === null) && visitor.call( + formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers + ); - // non-zero if not 0 or 1 in the ps section - var error_mask = in_ps ? 0xfffe : 0x0000; - error |= (code & error_mask); + if (result === true) { + build(el, path ? path.concat(key) : [key]); + } + }); - // latch in_ps to zero after we find 0x1 - in_ps = in_ps & is_0; - index += in_ps; + stack.pop(); } - if(error || db.charCodeAt(index) !== 0x1) { - throw new Error('Invalid RSAES-OAEP padding.'); + if (!utils.isObject(obj)) { + throw new TypeError('data must be an object'); } - return db.substring(index + 1); -}; + build(obj); -function rsa_mgf1(seed, maskLength, hash) { - // default to SHA-1 message digest - if(!hash) { - hash = forge.md.sha1.create(); - } - var t = ''; - var count = Math.ceil(maskLength / hash.digestLength); - for(var i = 0; i < count; ++i) { - var c = String.fromCharCode( - (i >> 24) & 0xFF, (i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF); - hash.start(); - hash.update(seed + c); - t += hash.digest().getBytes(); - } - return t.substring(0, maskLength); + return formData; } +/* harmony default export */ const helpers_toFormData = (toFormData); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/AxiosURLSearchParams.js + -/***/ }), -/***/ 93254: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /** - * Prime number generation API. + * It encodes a string by replacing all characters that are not in the unreserved set with + * their percent-encoded equivalents * - * @author Dave Longley + * @param {string} str - The string to encode. * - * Copyright (c) 2014 Digital Bazaar, Inc. + * @returns {string} The encoded string. */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(36536); -__nccwpck_require__(121); -__nccwpck_require__(68737); +function AxiosURLSearchParams_encode(str) { + const charMap = { + '!': '%21', + "'": '%27', + '(': '%28', + ')': '%29', + '~': '%7E', + '%20': '+', + '%00': '\x00' + }; + return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) { + return charMap[match]; + }); +} -(function() { +/** + * It takes a params object and converts it to a FormData object + * + * @param {Object} params - The parameters to be converted to a FormData object. + * @param {Object} options - The options object passed to the Axios constructor. + * + * @returns {void} + */ +function AxiosURLSearchParams(params, options) { + this._pairs = []; -// forge.prime already defined -if(forge.prime) { - module.exports = forge.prime; - return; + params && helpers_toFormData(params, this, options); } -/* PRIME API */ -var prime = module.exports = forge.prime = forge.prime || {}; +const AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype; + +AxiosURLSearchParams_prototype.append = function append(name, value) { + this._pairs.push([name, value]); +}; + +AxiosURLSearchParams_prototype.toString = function toString(encoder) { + const _encode = encoder ? function(value) { + return encoder.call(this, value, AxiosURLSearchParams_encode); + } : AxiosURLSearchParams_encode; + + return this._pairs.map(function each(pair) { + return _encode(pair[0]) + '=' + _encode(pair[1]); + }, '').join('&'); +}; + +/* harmony default export */ const helpers_AxiosURLSearchParams = (AxiosURLSearchParams); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/buildURL.js + + -var BigInteger = forge.jsbn.BigInteger; -// primes are 30k+i for i = 1, 7, 11, 13, 17, 19, 23, 29 -var GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2]; -var THIRTY = new BigInteger(null); -THIRTY.fromInt(30); -var op_or = function(x, y) {return x|y;}; /** - * Generates a random probable prime with the given number of bits. + * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their + * URI encoded counterparts * - * Alternative algorithms can be specified by name as a string or as an - * object with custom options like so: + * @param {string} val The value to be encoded. * - * { - * name: 'PRIMEINC', - * options: { - * maxBlockTime: , - * millerRabinTests: , - * workerScript: , - * workers: . - * workLoad: the size of the work load, ie: number of possible prime - * numbers for each web worker to check per work assignment, - * (default: 100). - * } - * } + * @returns {string} The encoded value. + */ +function buildURL_encode(val) { + return encodeURIComponent(val). + replace(/%3A/gi, ':'). + replace(/%24/g, '$'). + replace(/%2C/gi, ','). + replace(/%20/g, '+'). + replace(/%5B/gi, '['). + replace(/%5D/gi, ']'); +} + +/** + * Build a URL by appending params to the end * - * @param bits the number of bits for the prime number. - * @param options the options to use. - * [algorithm] the algorithm to use (default: 'PRIMEINC'). - * [prng] a custom crypto-secure pseudo-random number generator to use, - * that must define "getBytesSync". + * @param {string} url The base of the url (e.g., http://www.google.com) + * @param {object} [params] The params to be appended + * @param {?object} options * - * @return callback(err, num) called once the operation completes. + * @returns {string} The formatted url */ -prime.generateProbablePrime = function(bits, options, callback) { - if(typeof options === 'function') { - callback = options; - options = {}; +function buildURL(url, params, options) { + /*eslint no-param-reassign:0*/ + if (!params) { + return url; } - options = options || {}; + + const _encode = options && options.encode || buildURL_encode; - // default to PRIMEINC algorithm - var algorithm = options.algorithm || 'PRIMEINC'; - if(typeof algorithm === 'string') { - algorithm = {name: algorithm}; - } - algorithm.options = algorithm.options || {}; + const serializeFn = options && options.serialize; - // create prng with api that matches BigInteger secure random - var prng = options.prng || forge.random; - var rng = { - // x is an array to fill with bytes - nextBytes: function(x) { - var b = prng.getBytesSync(x.length); - for(var i = 0; i < x.length; ++i) { - x[i] = b.charCodeAt(i); - } - } - }; + let serializedParams; - if(algorithm.name === 'PRIMEINC') { - return primeincFindPrime(bits, rng, algorithm.options, callback); + if (serializeFn) { + serializedParams = serializeFn(params, options); + } else { + serializedParams = utils.isURLSearchParams(params) ? + params.toString() : + new helpers_AxiosURLSearchParams(params, options).toString(_encode); } - throw new Error('Invalid prime generation algorithm: ' + algorithm.name); -}; + if (serializedParams) { + const hashmarkIndex = url.indexOf("#"); -function primeincFindPrime(bits, rng, options, callback) { - if('workers' in options) { - return primeincFindPrimeWithWorkers(bits, rng, options, callback); + if (hashmarkIndex !== -1) { + url = url.slice(0, hashmarkIndex); + } + url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; } - return primeincFindPrimeWithoutWorkers(bits, rng, options, callback); + + return url; } -function primeincFindPrimeWithoutWorkers(bits, rng, options, callback) { - // initialize random number - var num = generateRandom(bits, rng); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/core/InterceptorManager.js - /* Note: All primes are of the form 30k+i for i < 30 and gcd(30, i)=1. The - number we are given is always aligned at 30k + 1. Each time the number is - determined not to be prime we add to get to the next 'i', eg: if the number - was at 30k + 1 we add 6. */ - var deltaIdx = 0; - // get required number of MR tests - var mrTests = getMillerRabinTests(num.bitLength()); - if('millerRabinTests' in options) { - mrTests = options.millerRabinTests; - } - // find prime nearest to 'num' for maxBlockTime ms - // 10 ms gives 5ms of leeway for other calculations before dropping - // below 60fps (1000/60 == 16.67), but in reality, the number will - // likely be higher due to an 'atomic' big int modPow - var maxBlockTime = 10; - if('maxBlockTime' in options) { - maxBlockTime = options.maxBlockTime; + +class InterceptorManager { + constructor() { + this.handlers = []; } - _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback); -} + /** + * Add a new interceptor to the stack + * + * @param {Function} fulfilled The function to handle `then` for a `Promise` + * @param {Function} rejected The function to handle `reject` for a `Promise` + * + * @return {Number} An ID used to remove interceptor later + */ + use(fulfilled, rejected, options) { + this.handlers.push({ + fulfilled, + rejected, + synchronous: options ? options.synchronous : false, + runWhen: options ? options.runWhen : null + }); + return this.handlers.length - 1; + } -function _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback) { - var start = +new Date(); - do { - // overflow, regenerate random number - if(num.bitLength() > bits) { - num = generateRandom(bits, rng); - } - // do primality test - if(num.isProbablePrime(mrTests)) { - return callback(null, num); + /** + * Remove an interceptor from the stack + * + * @param {Number} id The ID that was returned by `use` + * + * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise + */ + eject(id) { + if (this.handlers[id]) { + this.handlers[id] = null; } - // get next potential prime - num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0); - } while(maxBlockTime < 0 || (+new Date() - start < maxBlockTime)); - - // keep trying later - forge.util.setImmediate(function() { - _primeinc(num, bits, rng, deltaIdx, mrTests, maxBlockTime, callback); - }); -} - -// NOTE: This algorithm is indeterminate in nature because workers -// run in parallel looking at different segments of numbers. Even if this -// algorithm is run twice with the same input from a predictable RNG, it -// may produce different outputs. -function primeincFindPrimeWithWorkers(bits, rng, options, callback) { - // web workers unavailable - if(typeof Worker === 'undefined') { - return primeincFindPrimeWithoutWorkers(bits, rng, options, callback); } - // initialize random number - var num = generateRandom(bits, rng); + /** + * Clear all interceptors from the stack + * + * @returns {void} + */ + clear() { + if (this.handlers) { + this.handlers = []; + } + } - // use web workers to generate keys - var numWorkers = options.workers; - var workLoad = options.workLoad || 100; - var range = workLoad * 30 / 8; - var workerScript = options.workerScript || 'forge/prime.worker.js'; - if(numWorkers === -1) { - return forge.util.estimateCores(function(err, cores) { - if(err) { - // default to 2 - cores = 2; + /** + * Iterate over all the registered interceptors + * + * This method is particularly useful for skipping over any + * interceptors that may have become `null` calling `eject`. + * + * @param {Function} fn The function to call for each interceptor + * + * @returns {void} + */ + forEach(fn) { + utils.forEach(this.handlers, function forEachHandler(h) { + if (h !== null) { + fn(h); } - numWorkers = cores - 1; - generate(); }); } - generate(); - - function generate() { - // require at least 1 worker - numWorkers = Math.max(1, numWorkers); - - // TODO: consider optimizing by starting workers outside getPrime() ... - // note that in order to clean up they will have to be made internally - // asynchronous which may actually be slower +} - // start workers immediately - var workers = []; - for(var i = 0; i < numWorkers; ++i) { - // FIXME: fix path or use blob URLs - workers[i] = new Worker(workerScript); - } - var running = numWorkers; +/* harmony default export */ const core_InterceptorManager = (InterceptorManager); - // listen for requests from workers and assign ranges to find prime - for(var i = 0; i < numWorkers; ++i) { - workers[i].addEventListener('message', workerMessage); - } +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/defaults/transitional.js - /* Note: The distribution of random numbers is unknown. Therefore, each - web worker is continuously allocated a range of numbers to check for a - random number until one is found. - Every 30 numbers will be checked just 8 times, because prime numbers - have the form: +/* harmony default export */ const defaults_transitional = ({ + silentJSONParsing: true, + forcedJSONParsing: true, + clarifyTimeoutError: false +}); - 30k+i, for i < 30 and gcd(30, i)=1 (there are 8 values of i for this) +// EXTERNAL MODULE: external "url" +var external_url_ = __nccwpck_require__(57310); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/platform/node/classes/URLSearchParams.js - Therefore, if we want a web worker to run N checks before asking for - a new range of numbers, each range must contain N*30/8 numbers. - For 100 checks (workLoad), this is a range of 375. */ - var found = false; - function workerMessage(e) { - // ignore message, prime already found - if(found) { - return; - } +/* harmony default export */ const classes_URLSearchParams = (external_url_.URLSearchParams); - --running; - var data = e.data; - if(data.found) { - // terminate all workers - for(var i = 0; i < workers.length; ++i) { - workers[i].terminate(); - } - found = true; - return callback(null, new BigInteger(data.prime, 16)); - } +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/platform/node/index.js - // overflow, regenerate random number - if(num.bitLength() > bits) { - num = generateRandom(bits, rng); - } - // assign new range to check - var hex = num.toString(16); - // start prime search - e.target.postMessage({ - hex: hex, - workLoad: workLoad - }); +/* harmony default export */ const node = ({ + isNode: true, + classes: { + URLSearchParams: classes_URLSearchParams, + FormData: classes_FormData, + Blob: typeof Blob !== 'undefined' && Blob || null + }, + protocols: [ 'http', 'https', 'file', 'data' ] +}); - num.dAddOffset(range, 0); - } - } -} +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/platform/common/utils.js +const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined'; /** - * Generates a random number using the given number of bits and RNG. + * Determine if we're running in a standard browser environment * - * @param bits the number of bits for the number. - * @param rng the random number generator to use. + * This allows axios to run in a web worker, and react-native. + * Both environments support XMLHttpRequest, but not fully standard globals. * - * @return the random number. + * web workers: + * typeof window -> undefined + * typeof document -> undefined + * + * react-native: + * navigator.product -> 'ReactNative' + * nativescript + * navigator.product -> 'NativeScript' or 'NS' + * + * @returns {boolean} */ -function generateRandom(bits, rng) { - var num = new BigInteger(bits, rng); - // force MSB set - var bits1 = bits - 1; - if(!num.testBit(bits1)) { - num.bitwiseTo(BigInteger.ONE.shiftLeft(bits1), op_or, num); - } - // align number on 30k+1 boundary - num.dAddOffset(31 - num.mod(THIRTY).byteValue(), 0); - return num; -} +const hasStandardBrowserEnv = ( + (product) => { + return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0 + })(typeof navigator !== 'undefined' && navigator.product); /** - * Returns the required number of Miller-Rabin tests to generate a - * prime with an error probability of (1/2)^80. - * - * See Handbook of Applied Cryptography Chapter 4, Table 4.4. + * Determine if we're running in a standard browser webWorker environment * - * @param bits the bit size. - * - * @return the required number of iterations. + * Although the `isStandardBrowserEnv` method indicates that + * `allows axios to run in a web worker`, the WebWorker will still be + * filtered out due to its judgment standard + * `typeof window !== 'undefined' && typeof document !== 'undefined'`. + * This leads to a problem when axios post `FormData` in webWorker */ -function getMillerRabinTests(bits) { - if(bits <= 100) return 27; - if(bits <= 150) return 18; - if(bits <= 200) return 15; - if(bits <= 250) return 12; - if(bits <= 300) return 9; - if(bits <= 350) return 8; - if(bits <= 400) return 7; - if(bits <= 500) return 6; - if(bits <= 600) return 5; - if(bits <= 800) return 4; - if(bits <= 1250) return 3; - return 2; +const hasStandardBrowserWebWorkerEnv = (() => { + return ( + typeof WorkerGlobalScope !== 'undefined' && + // eslint-disable-next-line no-undef + self instanceof WorkerGlobalScope && + typeof self.importScripts === 'function' + ); +})(); + + + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/platform/index.js + + + +/* harmony default export */ const platform = ({ + ...common_utils_namespaceObject, + ...node +}); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/toURLEncodedForm.js + + + + + + +function toURLEncodedForm(data, options) { + return helpers_toFormData(data, new platform.classes.URLSearchParams(), Object.assign({ + visitor: function(value, key, path, helpers) { + if (platform.isNode && utils.isBuffer(value)) { + this.append(key, value.toString('base64')); + return false; + } + + return helpers.defaultVisitor.apply(this, arguments); + } + }, options)); } -})(); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/formDataToJSON.js -/***/ }), -/***/ 37747: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /** - * A javascript implementation of a cryptographically-secure - * Pseudo Random Number Generator (PRNG). The Fortuna algorithm is followed - * here though the use of SHA-256 is not enforced; when generating an - * a PRNG context, the hashing algorithm and block cipher used for - * the generator are specified via a plugin. + * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z'] * - * @author Dave Longley + * @param {string} name - The name of the property to get. * - * Copyright (c) 2010-2014 Digital Bazaar, Inc. + * @returns An array of strings. */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(36536); - -var _crypto = null; -if(forge.util.isNodejs && !forge.options.usePureJavaScript && - !process.versions['node-webkit']) { - _crypto = __nccwpck_require__(6113); +function parsePropPath(name) { + // foo[x][y][z] + // foo.x.y.z + // foo-x-y-z + // foo x y z + return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => { + return match[0] === '[]' ? '' : match[1] || match[0]; + }); } -/* PRNG API */ -var prng = module.exports = forge.prng = forge.prng || {}; - /** - * Creates a new PRNG context. + * Convert an array to an object. * - * A PRNG plugin must be passed in that will provide: + * @param {Array} arr - The array to convert to an object. * - * 1. A function that initializes the key and seed of a PRNG context. It - * will be given a 16 byte key and a 16 byte seed. Any key expansion - * or transformation of the seed from a byte string into an array of - * integers (or similar) should be performed. - * 2. The cryptographic function used by the generator. It takes a key and - * a seed. - * 3. A seed increment function. It takes the seed and returns seed + 1. - * 4. An api to create a message digest. + * @returns An object with the same keys and values as the array. + */ +function arrayToObject(arr) { + const obj = {}; + const keys = Object.keys(arr); + let i; + const len = keys.length; + let key; + for (i = 0; i < len; i++) { + key = keys[i]; + obj[key] = arr[key]; + } + return obj; +} + +/** + * It takes a FormData object and returns a JavaScript object * - * For an example, see random.js. + * @param {string} formData The FormData object to convert to JSON. * - * @param plugin the PRNG plugin to use. + * @returns {Object | null} The converted object. */ -prng.create = function(plugin) { - var ctx = { - plugin: plugin, - key: null, - seed: null, - time: null, - // number of reseeds so far - reseeds: 0, - // amount of data generated so far - generated: 0, - // no initial key bytes - keyBytes: '' - }; - - // create 32 entropy pools (each is a message digest) - var md = plugin.md; - var pools = new Array(32); - for(var i = 0; i < 32; ++i) { - pools[i] = md.create(); - } - ctx.pools = pools; +function formDataToJSON(formData) { + function buildPath(path, value, target, index) { + let name = path[index++]; + const isNumericKey = Number.isFinite(+name); + const isLast = index >= path.length; + name = !name && utils.isArray(target) ? target.length : name; + + if (isLast) { + if (utils.hasOwnProp(target, name)) { + target[name] = [target[name], value]; + } else { + target[name] = value; + } - // entropy pools are written to cyclically, starting at index 0 - ctx.pool = 0; + return !isNumericKey; + } - /** - * Generates random bytes. The bytes may be generated synchronously or - * asynchronously. Web workers must use the asynchronous interface or - * else the behavior is undefined. - * - * @param count the number of random bytes to generate. - * @param [callback(err, bytes)] called once the operation completes. - * - * @return count random bytes as a string. - */ - ctx.generate = function(count, callback) { - // do synchronously - if(!callback) { - return ctx.generateSync(count); + if (!target[name] || !utils.isObject(target[name])) { + target[name] = []; } - // simple generator using counter-based CBC - var cipher = ctx.plugin.cipher; - var increment = ctx.plugin.increment; - var formatKey = ctx.plugin.formatKey; - var formatSeed = ctx.plugin.formatSeed; - var b = forge.util.createBuffer(); + const result = buildPath(path, value, target[name], index); - // paranoid deviation from Fortuna: - // reset key for every request to protect previously - // generated random bytes should the key be discovered; - // there is no 100ms based reseeding because of this - // forced reseed for every `generate` call - ctx.key = null; + if (result && utils.isArray(target[name])) { + target[name] = arrayToObject(target[name]); + } - generate(); + return !isNumericKey; + } - function generate(err) { - if(err) { - return callback(err); - } + if (utils.isFormData(formData) && utils.isFunction(formData.entries)) { + const obj = {}; - // sufficient bytes generated - if(b.length() >= count) { - return callback(null, b.getBytes(count)); - } + utils.forEachEntry(formData, (name, value) => { + buildPath(parsePropPath(name), value, obj, 0); + }); - // if amount of data generated is greater than 1 MiB, trigger reseed - if(ctx.generated > 0xfffff) { - ctx.key = null; - } + return obj; + } - if(ctx.key === null) { - // prevent stack overflow - return forge.util.nextTick(function() { - _reseed(generate); - }); - } + return null; +} - // generate the random bytes - var bytes = cipher(ctx.key, ctx.seed); - ctx.generated += bytes.length; - b.putBytes(bytes); +/* harmony default export */ const helpers_formDataToJSON = (formDataToJSON); - // generate bytes for a new key and seed - ctx.key = formatKey(cipher(ctx.key, increment(ctx.seed))); - ctx.seed = formatSeed(cipher(ctx.key, ctx.seed)); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/defaults/index.js - forge.util.setImmediate(generate); - } - }; - /** - * Generates random bytes synchronously. - * - * @param count the number of random bytes to generate. - * - * @return count random bytes as a string. - */ - ctx.generateSync = function(count) { - // simple generator using counter-based CBC - var cipher = ctx.plugin.cipher; - var increment = ctx.plugin.increment; - var formatKey = ctx.plugin.formatKey; - var formatSeed = ctx.plugin.formatSeed; - // paranoid deviation from Fortuna: - // reset key for every request to protect previously - // generated random bytes should the key be discovered; - // there is no 100ms based reseeding because of this - // forced reseed for every `generateSync` call - ctx.key = null; - var b = forge.util.createBuffer(); - while(b.length() < count) { - // if amount of data generated is greater than 1 MiB, trigger reseed - if(ctx.generated > 0xfffff) { - ctx.key = null; - } - if(ctx.key === null) { - _reseedSync(); - } - // generate the random bytes - var bytes = cipher(ctx.key, ctx.seed); - ctx.generated += bytes.length; - b.putBytes(bytes); - // generate bytes for a new key and seed - ctx.key = formatKey(cipher(ctx.key, increment(ctx.seed))); - ctx.seed = formatSeed(cipher(ctx.key, ctx.seed)); - } - return b.getBytes(count); - }; - /** - * Private function that asynchronously reseeds a generator. - * - * @param callback(err) called once the operation completes. - */ - function _reseed(callback) { - if(ctx.pools[0].messageLength >= 32) { - _seed(); - return callback(); - } - // not enough seed data... - var needed = (32 - ctx.pools[0].messageLength) << 5; - ctx.seedFile(needed, function(err, bytes) { - if(err) { - return callback(err); - } - ctx.collect(bytes); - _seed(); - callback(); - }); - } - /** - * Private function that synchronously reseeds a generator. - */ - function _reseedSync() { - if(ctx.pools[0].messageLength >= 32) { - return _seed(); +/** + * It takes a string, tries to parse it, and if it fails, it returns the stringified version + * of the input + * + * @param {any} rawValue - The value to be stringified. + * @param {Function} parser - A function that parses a string into a JavaScript object. + * @param {Function} encoder - A function that takes a value and returns a string. + * + * @returns {string} A stringified version of the rawValue. + */ +function stringifySafely(rawValue, parser, encoder) { + if (utils.isString(rawValue)) { + try { + (parser || JSON.parse)(rawValue); + return utils.trim(rawValue); + } catch (e) { + if (e.name !== 'SyntaxError') { + throw e; + } } - // not enough seed data... - var needed = (32 - ctx.pools[0].messageLength) << 5; - ctx.collect(ctx.seedFileSync(needed)); - _seed(); } - /** - * Private function that seeds a generator once enough bytes are available. - */ - function _seed() { - // update reseed count - ctx.reseeds = (ctx.reseeds === 0xffffffff) ? 0 : ctx.reseeds + 1; + return (encoder || JSON.stringify)(rawValue); +} - // goal is to update `key` via: - // key = hash(key + s) - // where 's' is all collected entropy from selected pools, then... +const defaults = { - // create a plugin-based message digest - var md = ctx.plugin.md.create(); + transitional: defaults_transitional, - // consume current key bytes - md.update(ctx.keyBytes); + adapter: ['xhr', 'http'], - // digest the entropy of pools whose index k meet the - // condition 'n mod 2^k == 0' where n is the number of reseeds - var _2powK = 1; - for(var k = 0; k < 32; ++k) { - if(ctx.reseeds % _2powK === 0) { - md.update(ctx.pools[k].digest().getBytes()); - ctx.pools[k].start(); - } - _2powK = _2powK << 1; - } + transformRequest: [function transformRequest(data, headers) { + const contentType = headers.getContentType() || ''; + const hasJSONContentType = contentType.indexOf('application/json') > -1; + const isObjectPayload = utils.isObject(data); - // get digest for key bytes - ctx.keyBytes = md.digest().getBytes(); + if (isObjectPayload && utils.isHTMLForm(data)) { + data = new FormData(data); + } - // paranoid deviation from Fortuna: - // update `seed` via `seed = hash(key)` - // instead of initializing to zero once and only - // ever incrementing it - md.start(); - md.update(ctx.keyBytes); - var seedBytes = md.digest().getBytes(); + const isFormData = utils.isFormData(data); - // update state - ctx.key = ctx.plugin.formatKey(ctx.keyBytes); - ctx.seed = ctx.plugin.formatSeed(seedBytes); - ctx.generated = 0; - } + if (isFormData) { + if (!hasJSONContentType) { + return data; + } + return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data; + } - /** - * The built-in default seedFile. This seedFile is used when entropy - * is needed immediately. - * - * @param needed the number of bytes that are needed. - * - * @return the random bytes. - */ - function defaultSeedFile(needed) { - // use window.crypto.getRandomValues strong source of entropy if available - var getRandomValues = null; - var globalScope = forge.util.globalScope; - var _crypto = globalScope.crypto || globalScope.msCrypto; - if(_crypto && _crypto.getRandomValues) { - getRandomValues = function(arr) { - return _crypto.getRandomValues(arr); - }; + if (utils.isArrayBuffer(data) || + utils.isBuffer(data) || + utils.isStream(data) || + utils.isFile(data) || + utils.isBlob(data) + ) { + return data; + } + if (utils.isArrayBufferView(data)) { + return data.buffer; + } + if (utils.isURLSearchParams(data)) { + headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false); + return data.toString(); } - var b = forge.util.createBuffer(); - if(getRandomValues) { - while(b.length() < needed) { - // max byte length is 65536 before QuotaExceededError is thrown - // http://www.w3.org/TR/WebCryptoAPI/#RandomSource-method-getRandomValues - var count = Math.max(1, Math.min(needed - b.length(), 65536) / 4); - var entropy = new Uint32Array(Math.floor(count)); - try { - getRandomValues(entropy); - for(var i = 0; i < entropy.length; ++i) { - b.putInt32(entropy[i]); - } - } catch(e) { - /* only ignore QuotaExceededError */ - if(!(typeof QuotaExceededError !== 'undefined' && - e instanceof QuotaExceededError)) { - throw e; - } - } + let isFileList; + + if (isObjectPayload) { + if (contentType.indexOf('application/x-www-form-urlencoded') > -1) { + return toURLEncodedForm(data, this.formSerializer).toString(); } - } - // be sad and add some weak random data - if(b.length() < needed) { - /* Draws from Park-Miller "minimal standard" 31 bit PRNG, - implemented with David G. Carta's optimization: with 32 bit math - and without division (Public Domain). */ - var hi, lo, next; - var seed = Math.floor(Math.random() * 0x010000); - while(b.length() < needed) { - lo = 16807 * (seed & 0xFFFF); - hi = 16807 * (seed >> 16); - lo += (hi & 0x7FFF) << 16; - lo += hi >> 15; - lo = (lo & 0x7FFFFFFF) + (lo >> 31); - seed = lo & 0xFFFFFFFF; + if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) { + const _FormData = this.env && this.env.FormData; - // consume lower 3 bytes of seed - for(var i = 0; i < 3; ++i) { - // throw in more pseudo random - next = seed >>> (i << 3); - next ^= Math.floor(Math.random() * 0x0100); - b.putByte(next & 0xFF); - } + return helpers_toFormData( + isFileList ? {'files[]': data} : data, + _FormData && new _FormData(), + this.formSerializer + ); } } - return b.getBytes(needed); - } - // initialize seed file APIs - if(_crypto) { - // use nodejs async API - ctx.seedFile = function(needed, callback) { - _crypto.randomBytes(needed, function(err, bytes) { - if(err) { - return callback(err); - } - callback(null, bytes.toString()); - }); - }; - // use nodejs sync API - ctx.seedFileSync = function(needed) { - return _crypto.randomBytes(needed).toString(); - }; - } else { - ctx.seedFile = function(needed, callback) { + if (isObjectPayload || hasJSONContentType ) { + headers.setContentType('application/json', false); + return stringifySafely(data); + } + + return data; + }], + + transformResponse: [function transformResponse(data) { + const transitional = this.transitional || defaults.transitional; + const forcedJSONParsing = transitional && transitional.forcedJSONParsing; + const JSONRequested = this.responseType === 'json'; + + if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) { + const silentJSONParsing = transitional && transitional.silentJSONParsing; + const strictJSONParsing = !silentJSONParsing && JSONRequested; + try { - callback(null, defaultSeedFile(needed)); - } catch(e) { - callback(e); + return JSON.parse(data); + } catch (e) { + if (strictJSONParsing) { + if (e.name === 'SyntaxError') { + throw core_AxiosError.from(e, core_AxiosError.ERR_BAD_RESPONSE, this, null, this.response); + } + throw e; + } } - }; - ctx.seedFileSync = defaultSeedFile; - } - - /** - * Adds entropy to a prng ctx's accumulator. - * - * @param bytes the bytes of entropy as a string. - */ - ctx.collect = function(bytes) { - // iterate over pools distributing entropy cyclically - var count = bytes.length; - for(var i = 0; i < count; ++i) { - ctx.pools[ctx.pool].update(bytes.substr(i, 1)); - ctx.pool = (ctx.pool === 31) ? 0 : ctx.pool + 1; } - }; - /** - * Collects an integer of n bits. - * - * @param i the integer entropy. - * @param n the number of bits in the integer. - */ - ctx.collectInt = function(i, n) { - var bytes = ''; - for(var x = 0; x < n; x += 8) { - bytes += String.fromCharCode((i >> x) & 0xFF); - } - ctx.collect(bytes); - }; + return data; + }], /** - * Registers a Web Worker to receive immediate entropy from the main thread. - * This method is required until Web Workers can access the native crypto - * API. This method should be called twice for each created worker, once in - * the main thread, and once in the worker itself. - * - * @param worker the worker to register. + * A timeout in milliseconds to abort a request. If set to 0 (default) a + * timeout is not created. */ - ctx.registerWorker = function(worker) { - // worker receives random bytes - if(worker === self) { - ctx.seedFile = function(needed, callback) { - function listener(e) { - var data = e.data; - if(data.forge && data.forge.prng) { - self.removeEventListener('message', listener); - callback(data.forge.prng.err, data.forge.prng.bytes); - } - } - self.addEventListener('message', listener); - self.postMessage({forge: {prng: {needed: needed}}}); - }; - } else { - // main thread sends random bytes upon request - var listener = function(e) { - var data = e.data; - if(data.forge && data.forge.prng) { - ctx.seedFile(data.forge.prng.needed, function(err, bytes) { - worker.postMessage({forge: {prng: {err: err, bytes: bytes}}}); - }); - } - }; - // TODO: do we need to remove the event listener when the worker dies? - worker.addEventListener('message', listener); - } - }; + timeout: 0, + + xsrfCookieName: 'XSRF-TOKEN', + xsrfHeaderName: 'X-XSRF-TOKEN', - return ctx; + maxContentLength: -1, + maxBodyLength: -1, + + env: { + FormData: platform.classes.FormData, + Blob: platform.classes.Blob + }, + + validateStatus: function validateStatus(status) { + return status >= 200 && status < 300; + }, + + headers: { + common: { + 'Accept': 'application/json, text/plain, */*', + 'Content-Type': undefined + } + } }; +utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => { + defaults.headers[method] = {}; +}); + +/* harmony default export */ const lib_defaults = (defaults); -/***/ }), +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/parseHeaders.js -/***/ 68737: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + + + +// RawAxiosHeaders whose duplicates are ignored by node +// c.f. https://nodejs.org/api/http.html#http_message_headers +const ignoreDuplicateOf = utils.toObjectSet([ + 'age', 'authorization', 'content-length', 'content-type', 'etag', + 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', + 'last-modified', 'location', 'max-forwards', 'proxy-authorization', + 'referer', 'retry-after', 'user-agent' +]); /** - * An API for getting cryptographically-secure random bytes. The bytes are - * generated using the Fortuna algorithm devised by Bruce Schneier and - * Niels Ferguson. + * Parse headers into an object * - * Getting strong random bytes is not yet easy to do in javascript. The only - * truish random entropy that can be collected is from the mouse, keyboard, or - * from timing with respect to page loads, etc. This generator makes a poor - * attempt at providing random bytes when those sources haven't yet provided - * enough entropy to initially seed or to reseed the PRNG. + * ``` + * Date: Wed, 27 Aug 2014 08:58:49 GMT + * Content-Type: application/json + * Connection: keep-alive + * Transfer-Encoding: chunked + * ``` * - * @author Dave Longley + * @param {String} rawHeaders Headers needing to be parsed * - * Copyright (c) 2009-2014 Digital Bazaar, Inc. + * @returns {Object} Headers parsed into an object */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(16606); -__nccwpck_require__(3241); -__nccwpck_require__(37747); -__nccwpck_require__(36536); +/* harmony default export */ const parseHeaders = (rawHeaders => { + const parsed = {}; + let key; + let val; + let i; -(function() { + rawHeaders && rawHeaders.split('\n').forEach(function parser(line) { + i = line.indexOf(':'); + key = line.substring(0, i).trim().toLowerCase(); + val = line.substring(i + 1).trim(); -// forge.random already defined -if(forge.random && forge.random.getBytes) { - module.exports = forge.random; - return; -} + if (!key || (parsed[key] && ignoreDuplicateOf[key])) { + return; + } -(function(jQuery) { + if (key === 'set-cookie') { + if (parsed[key]) { + parsed[key].push(val); + } else { + parsed[key] = [val]; + } + } else { + parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; + } + }); -// the default prng plugin, uses AES-128 -var prng_aes = {}; -var _prng_aes_output = new Array(4); -var _prng_aes_buffer = forge.util.createBuffer(); -prng_aes.formatKey = function(key) { - // convert the key into 32-bit integers - var tmp = forge.util.createBuffer(key); - key = new Array(4); - key[0] = tmp.getInt32(); - key[1] = tmp.getInt32(); - key[2] = tmp.getInt32(); - key[3] = tmp.getInt32(); + return parsed; +}); - // return the expanded key - return forge.aes._expandKey(key, false); -}; -prng_aes.formatSeed = function(seed) { - // convert seed into 32-bit integers - var tmp = forge.util.createBuffer(seed); - seed = new Array(4); - seed[0] = tmp.getInt32(); - seed[1] = tmp.getInt32(); - seed[2] = tmp.getInt32(); - seed[3] = tmp.getInt32(); - return seed; -}; -prng_aes.cipher = function(key, seed) { - forge.aes._updateBlock(key, seed, _prng_aes_output, false); - _prng_aes_buffer.putInt32(_prng_aes_output[0]); - _prng_aes_buffer.putInt32(_prng_aes_output[1]); - _prng_aes_buffer.putInt32(_prng_aes_output[2]); - _prng_aes_buffer.putInt32(_prng_aes_output[3]); - return _prng_aes_buffer.getBytes(); -}; -prng_aes.increment = function(seed) { - // FIXME: do we care about carry or signed issues? - ++seed[3]; - return seed; -}; -prng_aes.md = forge.md.sha256; +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/core/AxiosHeaders.js -/** - * Creates a new PRNG. - */ -function spawnPrng() { - var ctx = forge.prng.create(prng_aes); - /** - * Gets random bytes. If a native secure crypto API is unavailable, this - * method tries to make the bytes more unpredictable by drawing from data that - * can be collected from the user of the browser, eg: mouse movement. - * - * If a callback is given, this method will be called asynchronously. - * - * @param count the number of random bytes to get. - * @param [callback(err, bytes)] called once the operation completes. - * - * @return the random bytes in a string. - */ - ctx.getBytes = function(count, callback) { - return ctx.generate(count, callback); - }; - /** - * Gets random bytes asynchronously. If a native secure crypto API is - * unavailable, this method tries to make the bytes more unpredictable by - * drawing from data that can be collected from the user of the browser, - * eg: mouse movement. - * - * @param count the number of random bytes to get. - * - * @return the random bytes in a string. - */ - ctx.getBytesSync = function(count) { - return ctx.generate(count); - }; - return ctx; -} -// create default prng context -var _ctx = spawnPrng(); +const $internals = Symbol('internals'); -// add other sources of entropy only if window.crypto.getRandomValues is not -// available -- otherwise this source will be automatically used by the prng -var getRandomValues = null; -var globalScope = forge.util.globalScope; -var _crypto = globalScope.crypto || globalScope.msCrypto; -if(_crypto && _crypto.getRandomValues) { - getRandomValues = function(arr) { - return _crypto.getRandomValues(arr); - }; +function normalizeHeader(header) { + return header && String(header).trim().toLowerCase(); } -if(forge.options.usePureJavaScript || - (!forge.util.isNodejs && !getRandomValues)) { - // if this is a web worker, do not use weak entropy, instead register to - // receive strong entropy asynchronously from the main thread - if(typeof window === 'undefined' || window.document === undefined) { - // FIXME: +function normalizeValue(value) { + if (value === false || value == null) { + return value; } - // get load time entropy - _ctx.collectInt(+new Date(), 32); + return utils.isArray(value) ? value.map(normalizeValue) : String(value); +} - // add some entropy from navigator object - if(typeof(navigator) !== 'undefined') { - var _navBytes = ''; - for(var key in navigator) { - try { - if(typeof(navigator[key]) == 'string') { - _navBytes += navigator[key]; - } - } catch(e) { - /* Some navigator keys might not be accessible, e.g. the geolocation - attribute throws an exception if touched in Mozilla chrome:// - context. +function parseTokens(str) { + const tokens = Object.create(null); + const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; + let match; - Silently ignore this and just don't use this as a source of - entropy. */ - } - } - _ctx.collect(_navBytes); - _navBytes = null; + while ((match = tokensRE.exec(str))) { + tokens[match[1]] = match[2]; } - // add mouse and keyboard collectors if jquery is available - if(jQuery) { - // set up mouse entropy capture - jQuery().mousemove(function(e) { - // add mouse coords - _ctx.collectInt(e.clientX, 16); - _ctx.collectInt(e.clientY, 16); - }); + return tokens; +} - // set up keyboard entropy capture - jQuery().keypress(function(e) { - _ctx.collectInt(e.charCode, 8); - }); +const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim()); + +function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) { + if (utils.isFunction(filter)) { + return filter.call(this, value, header); } -} -/* Random API */ -if(!forge.random) { - forge.random = _ctx; -} else { - // extend forge.random with _ctx - for(var key in _ctx) { - forge.random[key] = _ctx[key]; + if (isHeaderNameFilter) { + value = header; } -} -// expose spawn PRNG -forge.random.createInstance = spawnPrng; + if (!utils.isString(value)) return; -module.exports = forge.random; + if (utils.isString(filter)) { + return value.indexOf(filter) !== -1; + } -})(typeof(jQuery) !== 'undefined' ? jQuery : null); + if (utils.isRegExp(filter)) { + return filter.test(value); + } +} -})(); +function formatHeader(header) { + return header.trim() + .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => { + return char.toUpperCase() + str; + }); +} +function buildAccessors(obj, header) { + const accessorName = utils.toCamelCase(' ' + header); -/***/ }), + ['get', 'set', 'has'].forEach(methodName => { + Object.defineProperty(obj, methodName + accessorName, { + value: function(arg1, arg2, arg3) { + return this[methodName].call(this, header, arg1, arg2, arg3); + }, + configurable: true + }); + }); +} -/***/ 87938: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +class AxiosHeaders { + constructor(headers) { + headers && this.set(headers); + } -/** - * RC2 implementation. - * - * @author Stefan Siegl - * - * Copyright (c) 2012 Stefan Siegl - * - * Information on the RC2 cipher is available from RFC #2268, - * http://www.ietf.org/rfc/rfc2268.txt - */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(36536); + set(header, valueOrRewrite, rewrite) { + const self = this; -var piTable = [ - 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d, - 0xc6, 0x7e, 0x37, 0x83, 0x2b, 0x76, 0x53, 0x8e, 0x62, 0x4c, 0x64, 0x88, 0x44, 0x8b, 0xfb, 0xa2, - 0x17, 0x9a, 0x59, 0xf5, 0x87, 0xb3, 0x4f, 0x13, 0x61, 0x45, 0x6d, 0x8d, 0x09, 0x81, 0x7d, 0x32, - 0xbd, 0x8f, 0x40, 0xeb, 0x86, 0xb7, 0x7b, 0x0b, 0xf0, 0x95, 0x21, 0x22, 0x5c, 0x6b, 0x4e, 0x82, - 0x54, 0xd6, 0x65, 0x93, 0xce, 0x60, 0xb2, 0x1c, 0x73, 0x56, 0xc0, 0x14, 0xa7, 0x8c, 0xf1, 0xdc, - 0x12, 0x75, 0xca, 0x1f, 0x3b, 0xbe, 0xe4, 0xd1, 0x42, 0x3d, 0xd4, 0x30, 0xa3, 0x3c, 0xb6, 0x26, - 0x6f, 0xbf, 0x0e, 0xda, 0x46, 0x69, 0x07, 0x57, 0x27, 0xf2, 0x1d, 0x9b, 0xbc, 0x94, 0x43, 0x03, - 0xf8, 0x11, 0xc7, 0xf6, 0x90, 0xef, 0x3e, 0xe7, 0x06, 0xc3, 0xd5, 0x2f, 0xc8, 0x66, 0x1e, 0xd7, - 0x08, 0xe8, 0xea, 0xde, 0x80, 0x52, 0xee, 0xf7, 0x84, 0xaa, 0x72, 0xac, 0x35, 0x4d, 0x6a, 0x2a, - 0x96, 0x1a, 0xd2, 0x71, 0x5a, 0x15, 0x49, 0x74, 0x4b, 0x9f, 0xd0, 0x5e, 0x04, 0x18, 0xa4, 0xec, - 0xc2, 0xe0, 0x41, 0x6e, 0x0f, 0x51, 0xcb, 0xcc, 0x24, 0x91, 0xaf, 0x50, 0xa1, 0xf4, 0x70, 0x39, - 0x99, 0x7c, 0x3a, 0x85, 0x23, 0xb8, 0xb4, 0x7a, 0xfc, 0x02, 0x36, 0x5b, 0x25, 0x55, 0x97, 0x31, - 0x2d, 0x5d, 0xfa, 0x98, 0xe3, 0x8a, 0x92, 0xae, 0x05, 0xdf, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9, - 0xd3, 0x00, 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, 0x58, 0xe2, 0x89, 0xa9, - 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e, - 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad -]; + function setHeader(_value, _header, _rewrite) { + const lHeader = normalizeHeader(_header); -var s = [1, 2, 3, 5]; + if (!lHeader) { + throw new Error('header name must be a non-empty string'); + } -/** - * Rotate a word left by given number of bits. - * - * Bits that are shifted out on the left are put back in on the right - * hand side. - * - * @param word The word to shift left. - * @param bits The number of bits to shift by. - * @return The rotated word. - */ -var rol = function(word, bits) { - return ((word << bits) & 0xffff) | ((word & 0xffff) >> (16 - bits)); -}; + const key = utils.findKey(self, lHeader); -/** - * Rotate a word right by given number of bits. - * - * Bits that are shifted out on the right are put back in on the left - * hand side. - * - * @param word The word to shift right. - * @param bits The number of bits to shift by. - * @return The rotated word. - */ -var ror = function(word, bits) { - return ((word & 0xffff) >> bits) | ((word << (16 - bits)) & 0xffff); -}; + if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) { + self[key || _header] = normalizeValue(_value); + } + } -/* RC2 API */ -module.exports = forge.rc2 = forge.rc2 || {}; + const setHeaders = (headers, _rewrite) => + utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite)); -/** - * Perform RC2 key expansion as per RFC #2268, section 2. - * - * @param key variable-length user key (between 1 and 128 bytes) - * @param effKeyBits number of effective key bits (default: 128) - * @return the expanded RC2 key (ByteBuffer of 128 bytes) - */ -forge.rc2.expandKey = function(key, effKeyBits) { - if(typeof key === 'string') { - key = forge.util.createBuffer(key); + if (utils.isPlainObject(header) || header instanceof this.constructor) { + setHeaders(header, valueOrRewrite) + } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) { + setHeaders(parseHeaders(header), valueOrRewrite); + } else { + header != null && setHeader(valueOrRewrite, header, rewrite); + } + + return this; } - effKeyBits = effKeyBits || 128; - /* introduce variables that match the names used in RFC #2268 */ - var L = key; - var T = key.length(); - var T1 = effKeyBits; - var T8 = Math.ceil(T1 / 8); - var TM = 0xff >> (T1 & 0x07); - var i; + get(header, parser) { + header = normalizeHeader(header); - for(i = T; i < 128; i++) { - L.putByte(piTable[(L.at(i - 1) + L.at(i - T)) & 0xff]); - } + if (header) { + const key = utils.findKey(this, header); - L.setAt(128 - T8, piTable[L.at(128 - T8) & TM]); + if (key) { + const value = this[key]; - for(i = 127 - T8; i >= 0; i--) { - L.setAt(i, piTable[L.at(i + 1) ^ L.at(i + T8)]); - } + if (!parser) { + return value; + } - return L; -}; + if (parser === true) { + return parseTokens(value); + } -/** - * Creates a RC2 cipher object. - * - * @param key the symmetric key to use (as base for key generation). - * @param bits the number of effective key bits. - * @param encrypt false for decryption, true for encryption. - * - * @return the cipher. - */ -var createCipher = function(key, bits, encrypt) { - var _finish = false, _input = null, _output = null, _iv = null; - var mixRound, mashRound; - var i, j, K = []; + if (utils.isFunction(parser)) { + return parser.call(this, value, key); + } - /* Expand key and fill into K[] Array */ - key = forge.rc2.expandKey(key, bits); - for(i = 0; i < 64; i++) { - K.push(key.getInt16Le()); - } + if (utils.isRegExp(parser)) { + return parser.exec(value); + } - if(encrypt) { - /** - * Perform one mixing round "in place". - * - * @param R Array of four words to perform mixing on. - */ - mixRound = function(R) { - for(i = 0; i < 4; i++) { - R[i] += K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) + - ((~R[(i + 3) % 4]) & R[(i + 1) % 4]); - R[i] = rol(R[i], s[i]); - j++; + throw new TypeError('parser must be boolean|regexp|function'); } - }; + } + } - /** - * Perform one mashing round "in place". - * - * @param R Array of four words to perform mashing on. - */ - mashRound = function(R) { - for(i = 0; i < 4; i++) { - R[i] += K[R[(i + 3) % 4] & 63]; - } - }; - } else { - /** - * Perform one r-mixing round "in place". - * - * @param R Array of four words to perform mixing on. - */ - mixRound = function(R) { - for(i = 3; i >= 0; i--) { - R[i] = ror(R[i], s[i]); - R[i] -= K[j] + (R[(i + 3) % 4] & R[(i + 2) % 4]) + - ((~R[(i + 3) % 4]) & R[(i + 1) % 4]); - j--; - } - }; + has(header, matcher) { + header = normalizeHeader(header); - /** - * Perform one r-mashing round "in place". - * - * @param R Array of four words to perform mashing on. - */ - mashRound = function(R) { - for(i = 3; i >= 0; i--) { - R[i] -= K[R[(i + 3) % 4] & 63]; - } - }; + if (header) { + const key = utils.findKey(this, header); + + return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher))); + } + + return false; } - /** - * Run the specified cipher execution plan. - * - * This function takes four words from the input buffer, applies the IV on - * it (if requested) and runs the provided execution plan. - * - * The plan must be put together in form of a array of arrays. Where the - * outer one is simply a list of steps to perform and the inner one needs - * to have two elements: the first one telling how many rounds to perform, - * the second one telling what to do (i.e. the function to call). - * - * @param {Array} plan The plan to execute. - */ - var runPlan = function(plan) { - var R = []; + delete(header, matcher) { + const self = this; + let deleted = false; - /* Get data from input buffer and fill the four words into R */ - for(i = 0; i < 4; i++) { - var val = _input.getInt16Le(); + function deleteHeader(_header) { + _header = normalizeHeader(_header); - if(_iv !== null) { - if(encrypt) { - /* We're encrypting, apply the IV first. */ - val ^= _iv.getInt16Le(); - } else { - /* We're decryption, keep cipher text for next block. */ - _iv.putInt16Le(val); + if (_header) { + const key = utils.findKey(self, _header); + + if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) { + delete self[key]; + + deleted = true; } } + } - R.push(val & 0xffff); + if (utils.isArray(header)) { + header.forEach(deleteHeader); + } else { + deleteHeader(header); } - /* Reset global "j" variable as per spec. */ - j = encrypt ? 0 : 63; + return deleted; + } - /* Run execution plan. */ - for(var ptr = 0; ptr < plan.length; ptr++) { - for(var ctr = 0; ctr < plan[ptr][0]; ctr++) { - plan[ptr][1](R); + clear(matcher) { + const keys = Object.keys(this); + let i = keys.length; + let deleted = false; + + while (i--) { + const key = keys[i]; + if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) { + delete this[key]; + deleted = true; } } - /* Write back result to output buffer. */ - for(i = 0; i < 4; i++) { - if(_iv !== null) { - if(encrypt) { - /* We're encrypting in CBC-mode, feed back encrypted bytes into - IV buffer to carry it forward to next block. */ - _iv.putInt16Le(R[i]); - } else { - R[i] ^= _iv.getInt16Le(); - } + return deleted; + } + + normalize(format) { + const self = this; + const headers = {}; + + utils.forEach(this, (value, header) => { + const key = utils.findKey(headers, header); + + if (key) { + self[key] = normalizeValue(value); + delete self[header]; + return; } - _output.putInt16Le(R[i]); - } - }; + const normalized = format ? formatHeader(header) : String(header).trim(); - /* Create cipher object */ - var cipher = null; - cipher = { - /** - * Starts or restarts the encryption or decryption process, whichever - * was previously configured. - * - * To use the cipher in CBC mode, iv may be given either as a string - * of bytes, or as a byte buffer. For ECB mode, give null as iv. - * - * @param iv the initialization vector to use, null for ECB mode. - * @param output the output the buffer to write to, null to create one. - */ - start: function(iv, output) { - if(iv) { - /* CBC mode */ - if(typeof iv === 'string') { - iv = forge.util.createBuffer(iv); - } + if (normalized !== header) { + delete self[header]; } - _finish = false; - _input = forge.util.createBuffer(); - _output = output || new forge.util.createBuffer(); - _iv = iv; + self[normalized] = normalizeValue(value); - cipher.output = _output; - }, + headers[normalized] = true; + }); - /** - * Updates the next block. - * - * @param input the buffer to read from. - */ - update: function(input) { - if(!_finish) { - // not finishing, so fill the input buffer with more input - _input.putBuffer(input); - } + return this; + } - while(_input.length() >= 8) { - runPlan([ - [ 5, mixRound ], - [ 1, mashRound ], - [ 6, mixRound ], - [ 1, mashRound ], - [ 5, mixRound ] - ]); - } - }, + concat(...targets) { + return this.constructor.concat(this, ...targets); + } - /** - * Finishes encrypting or decrypting. - * - * @param pad a padding function to use, null for PKCS#7 padding, - * signature(blockSize, buffer, decrypt). - * - * @return true if successful, false on error. - */ - finish: function(pad) { - var rval = true; + toJSON(asStrings) { + const obj = Object.create(null); - if(encrypt) { - if(pad) { - rval = pad(8, _input, !encrypt); - } else { - // add PKCS#7 padding to block (each pad byte is the - // value of the number of pad bytes) - var padding = (_input.length() === 8) ? 8 : (8 - _input.length()); - _input.fillWithByte(padding, padding); - } - } + utils.forEach(this, (value, header) => { + value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value); + }); - if(rval) { - // do final update - _finish = true; - cipher.update(); - } + return obj; + } - if(!encrypt) { - // check for error: input data not a multiple of block size - rval = (_input.length() === 0); - if(rval) { - if(pad) { - rval = pad(8, _output, !encrypt); - } else { - // ensure padding byte count is valid - var len = _output.length(); - var count = _output.at(len - 1); + [Symbol.iterator]() { + return Object.entries(this.toJSON())[Symbol.iterator](); + } - if(count > len) { - rval = false; - } else { - // trim off padding bytes - _output.truncate(count); - } - } - } + toString() { + return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n'); + } + + get [Symbol.toStringTag]() { + return 'AxiosHeaders'; + } + + static from(thing) { + return thing instanceof this ? thing : new this(thing); + } + + static concat(first, ...targets) { + const computed = new this(first); + + targets.forEach((target) => computed.set(target)); + + return computed; + } + + static accessor(header) { + const internals = this[$internals] = (this[$internals] = { + accessors: {} + }); + + const accessors = internals.accessors; + const prototype = this.prototype; + + function defineAccessor(_header) { + const lHeader = normalizeHeader(_header); + + if (!accessors[lHeader]) { + buildAccessors(prototype, _header); + accessors[lHeader] = true; } + } - return rval; + utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header); + + return this; + } +} + +AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']); + +// reserved names hotfix +utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => { + let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set` + return { + get: () => value, + set(headerValue) { + this[mapped] = headerValue; } - }; + } +}); + +utils.freezeMethods(AxiosHeaders); + +/* harmony default export */ const core_AxiosHeaders = (AxiosHeaders); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/core/transformData.js + + + + - return cipher; -}; /** - * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the - * given symmetric key. The output will be stored in the 'output' member - * of the returned cipher. - * - * The key and iv may be given as a string of bytes or a byte buffer. - * The cipher is initialized to use 128 effective key bits. + * Transform the data for a request or a response * - * @param key the symmetric key to use. - * @param iv the initialization vector to use. - * @param output the buffer to write to, null to create one. + * @param {Array|Function} fns A single function or Array of functions + * @param {?Object} response The response object * - * @return the cipher. + * @returns {*} The resulting transformed data */ -forge.rc2.startEncrypting = function(key, iv, output) { - var cipher = forge.rc2.createEncryptionCipher(key, 128); - cipher.start(iv, output); - return cipher; -}; +function transformData(fns, response) { + const config = this || lib_defaults; + const context = response || config; + const headers = core_AxiosHeaders.from(context.headers); + let data = context.data; + + utils.forEach(fns, function transform(fn) { + data = fn.call(config, data, headers.normalize(), response ? response.status : undefined); + }); + + headers.normalize(); + + return data; +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/cancel/isCancel.js + + +function isCancel(value) { + return !!(value && value.__CANCEL__); +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/cancel/CanceledError.js + + + + /** - * Creates an RC2 cipher object to encrypt data in ECB or CBC mode using the - * given symmetric key. - * - * The key may be given as a string of bytes or a byte buffer. - * - * To start encrypting call start() on the cipher with an iv and optional - * output buffer. + * A `CanceledError` is an object that is thrown when an operation is canceled. * - * @param key the symmetric key to use. + * @param {string=} message The message. + * @param {Object=} config The config. + * @param {Object=} request The request. * - * @return the cipher. + * @returns {CanceledError} The created error. */ -forge.rc2.createEncryptionCipher = function(key, bits) { - return createCipher(key, bits, true); -}; +function CanceledError(message, config, request) { + // eslint-disable-next-line no-eq-null,eqeqeq + core_AxiosError.call(this, message == null ? 'canceled' : message, core_AxiosError.ERR_CANCELED, config, request); + this.name = 'CanceledError'; +} + +utils.inherits(CanceledError, core_AxiosError, { + __CANCEL__: true +}); + +/* harmony default export */ const cancel_CanceledError = (CanceledError); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/core/settle.js + + + /** - * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the - * given symmetric key. The output will be stored in the 'output' member - * of the returned cipher. - * - * The key and iv may be given as a string of bytes or a byte buffer. - * The cipher is initialized to use 128 effective key bits. + * Resolve or reject a Promise based on response status. * - * @param key the symmetric key to use. - * @param iv the initialization vector to use. - * @param output the buffer to write to, null to create one. + * @param {Function} resolve A function that resolves the promise. + * @param {Function} reject A function that rejects the promise. + * @param {object} response The response. * - * @return the cipher. + * @returns {object} The response. */ -forge.rc2.startDecrypting = function(key, iv, output) { - var cipher = forge.rc2.createDecryptionCipher(key, 128); - cipher.start(iv, output); - return cipher; -}; +function settle(resolve, reject, response) { + const validateStatus = response.config.validateStatus; + if (!response.status || !validateStatus || validateStatus(response.status)) { + resolve(response); + } else { + reject(new core_AxiosError( + 'Request failed with status code ' + response.status, + [core_AxiosError.ERR_BAD_REQUEST, core_AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], + response.config, + response.request, + response + )); + } +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js + /** - * Creates an RC2 cipher object to decrypt data in ECB or CBC mode using the - * given symmetric key. + * Determines whether the specified URL is absolute * - * The key may be given as a string of bytes or a byte buffer. + * @param {string} url The URL to test * - * To start decrypting call start() on the cipher with an iv and optional - * output buffer. + * @returns {boolean} True if the specified URL is absolute, otherwise false + */ +function isAbsoluteURL(url) { + // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). + // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed + // by any combination of letters, digits, plus, period, or hyphen. + return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url); +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/combineURLs.js + + +/** + * Creates a new URL by combining the specified URLs * - * @param key the symmetric key to use. + * @param {string} baseURL The base URL + * @param {string} relativeURL The relative URL * - * @return the cipher. + * @returns {string} The combined URL */ -forge.rc2.createDecryptionCipher = function(key, bits) { - return createCipher(key, bits, false); -}; +function combineURLs(baseURL, relativeURL) { + return relativeURL + ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') + : baseURL; +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/core/buildFullPath.js + -/***/ }), -/***/ 79626: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /** - * Javascript implementation of basic RSA algorithms. - * - * @author Dave Longley - * - * Copyright (c) 2010-2014 Digital Bazaar, Inc. - * - * The only algorithm currently supported for PKI is RSA. - * - * An RSA key is often stored in ASN.1 DER format. The SubjectPublicKeyInfo - * ASN.1 structure is composed of an algorithm of type AlgorithmIdentifier - * and a subjectPublicKey of type bit string. - * - * The AlgorithmIdentifier contains an Object Identifier (OID) and parameters - * for the algorithm, if any. In the case of RSA, there aren't any. - * - * SubjectPublicKeyInfo ::= SEQUENCE { - * algorithm AlgorithmIdentifier, - * subjectPublicKey BIT STRING - * } - * - * AlgorithmIdentifer ::= SEQUENCE { - * algorithm OBJECT IDENTIFIER, - * parameters ANY DEFINED BY algorithm OPTIONAL - * } - * - * For an RSA public key, the subjectPublicKey is: - * - * RSAPublicKey ::= SEQUENCE { - * modulus INTEGER, -- n - * publicExponent INTEGER -- e - * } - * - * PrivateKeyInfo ::= SEQUENCE { - * version Version, - * privateKeyAlgorithm PrivateKeyAlgorithmIdentifier, - * privateKey PrivateKey, - * attributes [0] IMPLICIT Attributes OPTIONAL - * } - * - * Version ::= INTEGER - * PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier - * PrivateKey ::= OCTET STRING - * Attributes ::= SET OF Attribute - * - * An RSA private key as the following structure: - * - * RSAPrivateKey ::= SEQUENCE { - * version Version, - * modulus INTEGER, -- n - * publicExponent INTEGER, -- e - * privateExponent INTEGER, -- d - * prime1 INTEGER, -- p - * prime2 INTEGER, -- q - * exponent1 INTEGER, -- d mod (p-1) - * exponent2 INTEGER, -- d mod (q-1) - * coefficient INTEGER -- (inverse of q) mod p - * } + * Creates a new URL by combining the baseURL with the requestedURL, + * only when the requestedURL is not already an absolute URL. + * If the requestURL is absolute, this function returns the requestedURL untouched. * - * Version ::= INTEGER + * @param {string} baseURL The base URL + * @param {string} requestedURL Absolute or relative URL to combine * - * The OID for the RSA key algorithm is: 1.2.840.113549.1.1.1 + * @returns {string} The combined full path */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(69197); -__nccwpck_require__(121); -__nccwpck_require__(11750); -__nccwpck_require__(39703); -__nccwpck_require__(93254); -__nccwpck_require__(68737); -__nccwpck_require__(36536); +function buildFullPath(baseURL, requestedURL) { + if (baseURL && !isAbsoluteURL(requestedURL)) { + return combineURLs(baseURL, requestedURL); + } + return requestedURL; +} -if(typeof BigInteger === 'undefined') { - var BigInteger = forge.jsbn.BigInteger; +// EXTERNAL MODULE: ./node_modules/proxy-from-env/index.js +var proxy_from_env = __nccwpck_require__(72946); +// EXTERNAL MODULE: external "util" +var external_util_ = __nccwpck_require__(73837); +// EXTERNAL MODULE: ./node_modules/follow-redirects/index.js +var follow_redirects = __nccwpck_require__(55213); +// EXTERNAL MODULE: external "zlib" +var external_zlib_ = __nccwpck_require__(59796); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/env/data.js +const VERSION = "1.6.2"; +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/parseProtocol.js + + +function parseProtocol(url) { + const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); + return match && match[1] || ''; } -var _crypto = forge.util.isNodejs ? __nccwpck_require__(6113) : null; +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/fromDataURI.js -// shortcut for asn.1 API -var asn1 = forge.asn1; -// shortcut for util API -var util = forge.util; -/* - * RSA encryption and decryption, see RFC 2313. + + + +const DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/; + +/** + * Parse data uri to a Buffer or Blob + * + * @param {String} uri + * @param {?Boolean} asBlob + * @param {?Object} options + * @param {?Function} options.Blob + * + * @returns {Buffer|Blob} */ -forge.pki = forge.pki || {}; -module.exports = forge.pki.rsa = forge.rsa = forge.rsa || {}; -var pki = forge.pki; +function fromDataURI(uri, asBlob, options) { + const _Blob = options && options.Blob || platform.classes.Blob; + const protocol = parseProtocol(uri); -// for finding primes, which are 30k+i for i = 1, 7, 11, 13, 17, 19, 23, 29 -var GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2]; + if (asBlob === undefined && _Blob) { + asBlob = true; + } -// validator for a PrivateKeyInfo structure -var privateKeyValidator = { - // PrivateKeyInfo - name: 'PrivateKeyInfo', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - // Version (INTEGER) - name: 'PrivateKeyInfo.version', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyVersion' - }, { - // privateKeyAlgorithm - name: 'PrivateKeyInfo.privateKeyAlgorithm', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'AlgorithmIdentifier.algorithm', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OID, - constructed: false, - capture: 'privateKeyOid' - }] - }, { - // PrivateKey - name: 'PrivateKeyInfo', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OCTETSTRING, - constructed: false, - capture: 'privateKey' - }] -}; + if (protocol === 'data') { + uri = protocol.length ? uri.slice(protocol.length + 1) : uri; -// validator for an RSA private key -var rsaPrivateKeyValidator = { - // RSAPrivateKey - name: 'RSAPrivateKey', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - // Version (INTEGER) - name: 'RSAPrivateKey.version', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyVersion' - }, { - // modulus (n) - name: 'RSAPrivateKey.modulus', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyModulus' - }, { - // publicExponent (e) - name: 'RSAPrivateKey.publicExponent', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyPublicExponent' - }, { - // privateExponent (d) - name: 'RSAPrivateKey.privateExponent', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyPrivateExponent' - }, { - // prime1 (p) - name: 'RSAPrivateKey.prime1', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyPrime1' - }, { - // prime2 (q) - name: 'RSAPrivateKey.prime2', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyPrime2' - }, { - // exponent1 (d mod (p-1)) - name: 'RSAPrivateKey.exponent1', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyExponent1' - }, { - // exponent2 (d mod (q-1)) - name: 'RSAPrivateKey.exponent2', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyExponent2' - }, { - // coefficient ((inverse of q) mod p) - name: 'RSAPrivateKey.coefficient', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'privateKeyCoefficient' - }] -}; + const match = DATA_URL_PATTERN.exec(uri); -// validator for an RSA public key -var rsaPublicKeyValidator = { - // RSAPublicKey - name: 'RSAPublicKey', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - // modulus (n) - name: 'RSAPublicKey.modulus', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'publicKeyModulus' - }, { - // publicExponent (e) - name: 'RSAPublicKey.exponent', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.INTEGER, - constructed: false, - capture: 'publicKeyExponent' - }] -}; + if (!match) { + throw new core_AxiosError('Invalid URL', core_AxiosError.ERR_INVALID_URL); + } -// validator for an SubjectPublicKeyInfo structure -// Note: Currently only works with an RSA public key -var publicKeyValidator = forge.pki.rsa.publicKeyValidator = { - name: 'SubjectPublicKeyInfo', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - captureAsn1: 'subjectPublicKeyInfo', - value: [{ - name: 'SubjectPublicKeyInfo.AlgorithmIdentifier', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'AlgorithmIdentifier.algorithm', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OID, - constructed: false, - capture: 'publicKeyOid' - }] - }, { - // subjectPublicKey - name: 'SubjectPublicKeyInfo.subjectPublicKey', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.BITSTRING, - constructed: false, - value: [{ - // RSAPublicKey - name: 'SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - optional: true, - captureAsn1: 'rsaPublicKey' - }] - }] -}; + const mime = match[1]; + const isBase64 = match[2]; + const body = match[3]; + const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8'); + + if (asBlob) { + if (!_Blob) { + throw new core_AxiosError('Blob is not supported', core_AxiosError.ERR_NOT_SUPPORT); + } + + return new _Blob([buffer], {type: mime}); + } + + return buffer; + } + + throw new core_AxiosError('Unsupported protocol ' + protocol, core_AxiosError.ERR_NOT_SUPPORT); +} + +// EXTERNAL MODULE: external "stream" +var external_stream_ = __nccwpck_require__(12781); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/throttle.js -// validator for a DigestInfo structure -var digestInfoValidator = { - name: 'DigestInfo', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'DigestInfo.DigestAlgorithm', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.SEQUENCE, - constructed: true, - value: [{ - name: 'DigestInfo.DigestAlgorithm.algorithmIdentifier', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OID, - constructed: false, - capture: 'algorithmIdentifier' - }, { - // NULL paramters - name: 'DigestInfo.DigestAlgorithm.parameters', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.NULL, - // captured only to check existence for md2 and md5 - capture: 'parameters', - optional: true, - constructed: false - }] - }, { - // digest - name: 'DigestInfo.digest', - tagClass: asn1.Class.UNIVERSAL, - type: asn1.Type.OCTETSTRING, - constructed: false, - capture: 'digest' - }] -}; /** - * Wrap digest in DigestInfo object. - * - * This function implements EMSA-PKCS1-v1_5-ENCODE as per RFC 3447. - * - * DigestInfo ::= SEQUENCE { - * digestAlgorithm DigestAlgorithmIdentifier, - * digest Digest - * } - * - * DigestAlgorithmIdentifier ::= AlgorithmIdentifier - * Digest ::= OCTET STRING - * - * @param md the message digest object with the hash to sign. - * - * @return the encoded message (ready for RSA encrytion) + * Throttle decorator + * @param {Function} fn + * @param {Number} freq + * @return {Function} */ -var emsaPkcs1v15encode = function(md) { - // get the oid for the algorithm - var oid; - if(md.algorithm in pki.oids) { - oid = pki.oids[md.algorithm]; - } else { - var error = new Error('Unknown message digest algorithm.'); - error.algorithm = md.algorithm; - throw error; - } - var oidBytes = asn1.oidToDer(oid).getBytes(); +function throttle(fn, freq) { + let timestamp = 0; + const threshold = 1000 / freq; + let timer = null; + return function throttled(force, args) { + const now = Date.now(); + if (force || now - timestamp > threshold) { + if (timer) { + clearTimeout(timer); + timer = null; + } + timestamp = now; + return fn.apply(null, args); + } + if (!timer) { + timer = setTimeout(() => { + timer = null; + timestamp = Date.now(); + return fn.apply(null, args); + }, threshold - (now - timestamp)); + } + }; +} - // create the digest info - var digestInfo = asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []); - var digestAlgorithm = asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []); - digestAlgorithm.value.push(asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.OID, false, oidBytes)); - digestAlgorithm.value.push(asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')); - var digest = asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, - false, md.digest().getBytes()); - digestInfo.value.push(digestAlgorithm); - digestInfo.value.push(digest); +/* harmony default export */ const helpers_throttle = (throttle); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/speedometer.js - // encode digest info - return asn1.toDer(digestInfo).getBytes(); -}; /** - * Performs x^c mod n (RSA encryption or decryption operation). - * - * @param x the number to raise and mod. - * @param key the key to use. - * @param pub true if the key is public, false if private. - * - * @return the result of x^c mod n. + * Calculate data maxRate + * @param {Number} [samplesCount= 10] + * @param {Number} [min= 1000] + * @returns {Function} */ -var _modPow = function(x, key, pub) { - if(pub) { - return x.modPow(key.e, key.n); +function speedometer(samplesCount, min) { + samplesCount = samplesCount || 10; + const bytes = new Array(samplesCount); + const timestamps = new Array(samplesCount); + let head = 0; + let tail = 0; + let firstSampleTS; + + min = min !== undefined ? min : 1000; + + return function push(chunkLength) { + const now = Date.now(); + + const startedAt = timestamps[tail]; + + if (!firstSampleTS) { + firstSampleTS = now; + } + + bytes[head] = chunkLength; + timestamps[head] = now; + + let i = tail; + let bytesCount = 0; + + while (i !== head) { + bytesCount += bytes[i++]; + i = i % samplesCount; + } + + head = (head + 1) % samplesCount; + + if (head === tail) { + tail = (tail + 1) % samplesCount; + } + + if (now - firstSampleTS < min) { + return; + } + + const passed = startedAt && now - startedAt; + + return passed ? Math.round(bytesCount * 1000 / passed) : undefined; + }; +} + +/* harmony default export */ const helpers_speedometer = (speedometer); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/AxiosTransformStream.js + + + + + + + +const kInternals = Symbol('internals'); + +class AxiosTransformStream extends external_stream_.Transform{ + constructor(options) { + options = utils.toFlatObject(options, { + maxRate: 0, + chunkSize: 64 * 1024, + minChunkSize: 100, + timeWindow: 500, + ticksRate: 2, + samplesCount: 15 + }, null, (prop, source) => { + return !utils.isUndefined(source[prop]); + }); + + super({ + readableHighWaterMark: options.chunkSize + }); + + const self = this; + + const internals = this[kInternals] = { + length: options.length, + timeWindow: options.timeWindow, + ticksRate: options.ticksRate, + chunkSize: options.chunkSize, + maxRate: options.maxRate, + minChunkSize: options.minChunkSize, + bytesSeen: 0, + isCaptured: false, + notifiedBytesLoaded: 0, + ts: Date.now(), + bytes: 0, + onReadCallback: null + }; + + const _speedometer = helpers_speedometer(internals.ticksRate * options.samplesCount, internals.timeWindow); + + this.on('newListener', event => { + if (event === 'progress') { + if (!internals.isCaptured) { + internals.isCaptured = true; + } + } + }); + + let bytesNotified = 0; + + internals.updateProgress = helpers_throttle(function throttledHandler() { + const totalBytes = internals.length; + const bytesTransferred = internals.bytesSeen; + const progressBytes = bytesTransferred - bytesNotified; + if (!progressBytes || self.destroyed) return; + + const rate = _speedometer(progressBytes); + + bytesNotified = bytesTransferred; + + process.nextTick(() => { + self.emit('progress', { + 'loaded': bytesTransferred, + 'total': totalBytes, + 'progress': totalBytes ? (bytesTransferred / totalBytes) : undefined, + 'bytes': progressBytes, + 'rate': rate ? rate : undefined, + 'estimated': rate && totalBytes && bytesTransferred <= totalBytes ? + (totalBytes - bytesTransferred) / rate : undefined + }); + }); + }, internals.ticksRate); + + const onFinish = () => { + internals.updateProgress(true); + }; + + this.once('end', onFinish); + this.once('error', onFinish); } - if(!key.p || !key.q) { - // allow calculation without CRT params (slow) - return x.modPow(key.d, key.n); + _read(size) { + const internals = this[kInternals]; + + if (internals.onReadCallback) { + internals.onReadCallback(); + } + + return super._read(size); } - // pre-compute dP, dQ, and qInv if necessary - if(!key.dP) { - key.dP = key.d.mod(key.p.subtract(BigInteger.ONE)); + _transform(chunk, encoding, callback) { + const self = this; + const internals = this[kInternals]; + const maxRate = internals.maxRate; + + const readableHighWaterMark = this.readableHighWaterMark; + + const timeWindow = internals.timeWindow; + + const divider = 1000 / timeWindow; + const bytesThreshold = (maxRate / divider); + const minChunkSize = internals.minChunkSize !== false ? Math.max(internals.minChunkSize, bytesThreshold * 0.01) : 0; + + function pushChunk(_chunk, _callback) { + const bytes = Buffer.byteLength(_chunk); + internals.bytesSeen += bytes; + internals.bytes += bytes; + + if (internals.isCaptured) { + internals.updateProgress(); + } + + if (self.push(_chunk)) { + process.nextTick(_callback); + } else { + internals.onReadCallback = () => { + internals.onReadCallback = null; + process.nextTick(_callback); + }; + } + } + + const transformChunk = (_chunk, _callback) => { + const chunkSize = Buffer.byteLength(_chunk); + let chunkRemainder = null; + let maxChunkSize = readableHighWaterMark; + let bytesLeft; + let passed = 0; + + if (maxRate) { + const now = Date.now(); + + if (!internals.ts || (passed = (now - internals.ts)) >= timeWindow) { + internals.ts = now; + bytesLeft = bytesThreshold - internals.bytes; + internals.bytes = bytesLeft < 0 ? -bytesLeft : 0; + passed = 0; + } + + bytesLeft = bytesThreshold - internals.bytes; + } + + if (maxRate) { + if (bytesLeft <= 0) { + // next time window + return setTimeout(() => { + _callback(null, _chunk); + }, timeWindow - passed); + } + + if (bytesLeft < maxChunkSize) { + maxChunkSize = bytesLeft; + } + } + + if (maxChunkSize && chunkSize > maxChunkSize && (chunkSize - maxChunkSize) > minChunkSize) { + chunkRemainder = _chunk.subarray(maxChunkSize); + _chunk = _chunk.subarray(0, maxChunkSize); + } + + pushChunk(_chunk, chunkRemainder ? () => { + process.nextTick(_callback, null, chunkRemainder); + } : _callback); + }; + + transformChunk(chunk, function transformNextChunk(err, _chunk) { + if (err) { + return callback(err); + } + + if (_chunk) { + transformChunk(_chunk, transformNextChunk); + } else { + callback(null); + } + }); } - if(!key.dQ) { - key.dQ = key.d.mod(key.q.subtract(BigInteger.ONE)); + + setLength(length) { + this[kInternals].length = +length; + return this; } - if(!key.qInv) { - key.qInv = key.q.modInverse(key.p); +} + +/* harmony default export */ const helpers_AxiosTransformStream = (AxiosTransformStream); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/readBlob.js +const {asyncIterator} = Symbol; + +const readBlob = async function* (blob) { + if (blob.stream) { + yield* blob.stream() + } else if (blob.arrayBuffer) { + yield await blob.arrayBuffer() + } else if (blob[asyncIterator]) { + yield* blob[asyncIterator](); + } else { + yield blob; } +} - /* Chinese remainder theorem (CRT) states: +/* harmony default export */ const helpers_readBlob = (readBlob); - Suppose n1, n2, ..., nk are positive integers which are pairwise - coprime (n1 and n2 have no common factors other than 1). For any - integers x1, x2, ..., xk there exists an integer x solving the - system of simultaneous congruences (where ~= means modularly - congruent so a ~= b mod n means a mod n = b mod n): +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/formDataToStream.js - x ~= x1 mod n1 - x ~= x2 mod n2 - ... - x ~= xk mod nk - This system of congruences has a single simultaneous solution x - between 0 and n - 1. Furthermore, each xk solution and x itself - is congruent modulo the product n = n1*n2*...*nk. - So x1 mod n = x2 mod n = xk mod n = x mod n. - The single simultaneous solution x can be solved with the following - equation: - x = sum(xi*ri*si) mod n where ri = n/ni and si = ri^-1 mod ni. - Where x is less than n, xi = x mod ni. +const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_'; - For RSA we are only concerned with k = 2. The modulus n = pq, where - p and q are coprime. The RSA decryption algorithm is: +const formDataToStream_textEncoder = new external_util_.TextEncoder(); - y = x^d mod n +const CRLF = '\r\n'; +const CRLF_BYTES = formDataToStream_textEncoder.encode(CRLF); +const CRLF_BYTES_COUNT = 2; - Given the above: +class FormDataPart { + constructor(name, value) { + const {escapeName} = this.constructor; + const isStringValue = utils.isString(value); - x1 = x^d mod p - r1 = n/p = q - s1 = q^-1 mod p - x2 = x^d mod q - r2 = n/q = p - s2 = p^-1 mod q + let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${ + !isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : '' + }${CRLF}`; - So y = (x1r1s1 + x2r2s2) mod n - = ((x^d mod p)q(q^-1 mod p) + (x^d mod q)p(p^-1 mod q)) mod n + if (isStringValue) { + value = formDataToStream_textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF)); + } else { + headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}` + } - According to Fermat's Little Theorem, if the modulus P is prime, - for any integer A not evenly divisible by P, A^(P-1) ~= 1 mod P. - Since A is not divisible by P it follows that if: - N ~= M mod (P - 1), then A^N mod P = A^M mod P. Therefore: + this.headers = formDataToStream_textEncoder.encode(headers + CRLF); - A^N mod P = A^(M mod (P - 1)) mod P. (The latter takes less effort - to calculate). In order to calculate x^d mod p more quickly the - exponent d mod (p - 1) is stored in the RSA private key (the same - is done for x^d mod q). These values are referred to as dP and dQ - respectively. Therefore we now have: + this.contentLength = isStringValue ? value.byteLength : value.size; - y = ((x^dP mod p)q(q^-1 mod p) + (x^dQ mod q)p(p^-1 mod q)) mod n + this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT; - Since we'll be reducing x^dP by modulo p (same for q) we can also - reduce x by p (and q respectively) before hand. Therefore, let + this.name = name; + this.value = value; + } - xp = ((x mod p)^dP mod p), and - xq = ((x mod q)^dQ mod q), yielding: + async *encode(){ + yield this.headers; - y = (xp*q*(q^-1 mod p) + xq*p*(p^-1 mod q)) mod n + const {value} = this; - This can be further reduced to a simple algorithm that only - requires 1 inverse (the q inverse is used) to be used and stored. - The algorithm is called Garner's algorithm. If qInv is the - inverse of q, we simply calculate: + if(utils.isTypedArray(value)) { + yield value; + } else { + yield* helpers_readBlob(value); + } - y = (qInv*(xp - xq) mod p) * q + xq + yield CRLF_BYTES; + } - However, there are two further complications. First, we need to - ensure that xp > xq to prevent signed BigIntegers from being used - so we add p until this is true (since we will be mod'ing with - p anyway). Then, there is a known timing attack on algorithms - using the CRT. To mitigate this risk, "cryptographic blinding" - should be used. This requires simply generating a random number r - between 0 and n-1 and its inverse and multiplying x by r^e before - calculating y and then multiplying y by r^-1 afterwards. Note that - r must be coprime with n (gcd(r, n) === 1) in order to have an - inverse. - */ + static escapeName(name) { + return String(name).replace(/[\r\n"]/g, (match) => ({ + '\r' : '%0D', + '\n' : '%0A', + '"' : '%22', + }[match])); + } +} - // cryptographic blinding - var r; - do { - r = new BigInteger( - forge.util.bytesToHex(forge.random.getBytes(key.n.bitLength() / 8)), - 16); - } while(r.compareTo(key.n) >= 0 || !r.gcd(key.n).equals(BigInteger.ONE)); - x = x.multiply(r.modPow(key.e, key.n)).mod(key.n); +const formDataToStream = (form, headersHandler, options) => { + const { + tag = 'form-data-boundary', + size = 25, + boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET) + } = options || {}; - // calculate xp and xq - var xp = x.mod(key.p).modPow(key.dP, key.p); - var xq = x.mod(key.q).modPow(key.dQ, key.q); + if(!utils.isFormData(form)) { + throw TypeError('FormData instance required'); + } - // xp must be larger than xq to avoid signed bit usage - while(xp.compareTo(xq) < 0) { - xp = xp.add(key.p); + if (boundary.length < 1 || boundary.length > 70) { + throw Error('boundary must be 10-70 characters long') } - // do last step - var y = xp.subtract(xq) - .multiply(key.qInv).mod(key.p) - .multiply(key.q).add(xq); + const boundaryBytes = formDataToStream_textEncoder.encode('--' + boundary + CRLF); + const footerBytes = formDataToStream_textEncoder.encode('--' + boundary + '--' + CRLF + CRLF); + let contentLength = footerBytes.byteLength; - // remove effect of random for cryptographic blinding - y = y.multiply(r.modInverse(key.n)).mod(key.n); + const parts = Array.from(form.entries()).map(([name, value]) => { + const part = new FormDataPart(name, value); + contentLength += part.size; + return part; + }); - return y; -}; + contentLength += boundaryBytes.byteLength * parts.length; -/** - * NOTE: THIS METHOD IS DEPRECATED, use 'sign' on a private key object or - * 'encrypt' on a public key object instead. - * - * Performs RSA encryption. - * - * The parameter bt controls whether to put padding bytes before the - * message passed in. Set bt to either true or false to disable padding - * completely (in order to handle e.g. EMSA-PSS encoding seperately before), - * signaling whether the encryption operation is a public key operation - * (i.e. encrypting data) or not, i.e. private key operation (data signing). - * - * For PKCS#1 v1.5 padding pass in the block type to use, i.e. either 0x01 - * (for signing) or 0x02 (for encryption). The key operation mode (private - * or public) is derived from this flag in that case). - * - * @param m the message to encrypt as a byte string. - * @param key the RSA key to use. - * @param bt for PKCS#1 v1.5 padding, the block type to use - * (0x01 for private key, 0x02 for public), - * to disable padding: true = public key, false = private key. - * - * @return the encrypted bytes as a string. - */ -pki.rsa.encrypt = function(m, key, bt) { - var pub = bt; - var eb; + contentLength = utils.toFiniteNumber(contentLength); - // get the length of the modulus in bytes - var k = Math.ceil(key.n.bitLength() / 8); + const computedHeaders = { + 'Content-Type': `multipart/form-data; boundary=${boundary}` + } - if(bt !== false && bt !== true) { - // legacy, default to PKCS#1 v1.5 padding - pub = (bt === 0x02); - eb = _encodePkcs1_v1_5(m, key, bt); - } else { - eb = forge.util.createBuffer(); - eb.putBytes(m); + if (Number.isFinite(contentLength)) { + computedHeaders['Content-Length'] = contentLength; } - // load encryption block as big integer 'x' - // FIXME: hex conversion inefficient, get BigInteger w/byte strings - var x = new BigInteger(eb.toHex(), 16); + headersHandler && headersHandler(computedHeaders); - // do RSA encryption - var y = _modPow(x, key, pub); + return external_stream_.Readable.from((async function *() { + for(const part of parts) { + yield boundaryBytes; + yield* part.encode(); + } - // convert y into the encrypted data byte string, if y is shorter in - // bytes than k, then prepend zero bytes to fill up ed - // FIXME: hex conversion inefficient, get BigInteger w/byte strings - var yhex = y.toString(16); - var ed = forge.util.createBuffer(); - var zeros = k - Math.ceil(yhex.length / 2); - while(zeros > 0) { - ed.putByte(0x00); - --zeros; - } - ed.putBytes(forge.util.hexToBytes(yhex)); - return ed.getBytes(); + yield footerBytes; + })()); }; -/** - * NOTE: THIS METHOD IS DEPRECATED, use 'decrypt' on a private key object or - * 'verify' on a public key object instead. - * - * Performs RSA decryption. - * - * The parameter ml controls whether to apply PKCS#1 v1.5 padding - * or not. Set ml = false to disable padding removal completely - * (in order to handle e.g. EMSA-PSS later on) and simply pass back - * the RSA encryption block. - * - * @param ed the encrypted data to decrypt in as a byte string. - * @param key the RSA key to use. - * @param pub true for a public key operation, false for private. - * @param ml the message length, if known, false to disable padding. - * - * @return the decrypted message as a byte string. - */ -pki.rsa.decrypt = function(ed, key, pub, ml) { - // get the length of the modulus in bytes - var k = Math.ceil(key.n.bitLength() / 8); +/* harmony default export */ const helpers_formDataToStream = (formDataToStream); - // error if the length of the encrypted data ED is not k - if(ed.length !== k) { - var error = new Error('Encrypted message length is invalid.'); - error.length = ed.length; - error.expected = k; - throw error; - } +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js - // convert encrypted data into a big integer - // FIXME: hex conversion inefficient, get BigInteger w/byte strings - var y = new BigInteger(forge.util.createBuffer(ed).toHex(), 16); - // y must be less than the modulus or it wasn't the result of - // a previous mod operation (encryption) using that modulus - if(y.compareTo(key.n) >= 0) { - throw new Error('Encrypted message is invalid.'); - } - // do RSA decryption - var x = _modPow(y, key, pub); - // create the encryption block, if x is shorter in bytes than k, then - // prepend zero bytes to fill up eb - // FIXME: hex conversion inefficient, get BigInteger w/byte strings - var xhex = x.toString(16); - var eb = forge.util.createBuffer(); - var zeros = k - Math.ceil(xhex.length / 2); - while(zeros > 0) { - eb.putByte(0x00); - --zeros; +class ZlibHeaderTransformStream extends external_stream_.Transform { + __transform(chunk, encoding, callback) { + this.push(chunk); + callback(); } - eb.putBytes(forge.util.hexToBytes(xhex)); - if(ml !== false) { - // legacy, default to PKCS#1 v1.5 padding - return _decodePkcs1_v1_5(eb.getBytes(), key, pub); + _transform(chunk, encoding, callback) { + if (chunk.length !== 0) { + this._transform = this.__transform; + + // Add Default Compression headers if no zlib headers are present + if (chunk[0] !== 120) { // Hex: 78 + const header = Buffer.alloc(2); + header[0] = 120; // Hex: 78 + header[1] = 156; // Hex: 9C + this.push(header, encoding); + } + } + + this.__transform(chunk, encoding, callback); } +} - // return message - return eb.getBytes(); +/* harmony default export */ const helpers_ZlibHeaderTransformStream = (ZlibHeaderTransformStream); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/callbackify.js + + +const callbackify = (fn, reducer) => { + return utils.isAsyncFn(fn) ? function (...args) { + const cb = args.pop(); + fn.apply(this, args).then((value) => { + try { + reducer ? cb(null, ...reducer(value)) : cb(null, value); + } catch (err) { + cb(err); + } + }, cb); + } : fn; +} + +/* harmony default export */ const helpers_callbackify = (callbackify); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/adapters/http.js + + + + + + + + + + + + + + + + + + + + + + + + + + + +const zlibOptions = { + flush: external_zlib_.constants.Z_SYNC_FLUSH, + finishFlush: external_zlib_.constants.Z_SYNC_FLUSH }; +const brotliOptions = { + flush: external_zlib_.constants.BROTLI_OPERATION_FLUSH, + finishFlush: external_zlib_.constants.BROTLI_OPERATION_FLUSH +} + +const isBrotliSupported = utils.isFunction(external_zlib_.createBrotliDecompress); + +const {http: httpFollow, https: httpsFollow} = follow_redirects; + +const isHttps = /https:?/; + +const supportedProtocols = platform.protocols.map(protocol => { + return protocol + ':'; +}); + /** - * Creates an RSA key-pair generation state object. It is used to allow - * key-generation to be performed in steps. It also allows for a UI to - * display progress updates. + * If the proxy or config beforeRedirects functions are defined, call them with the options + * object. * - * @param bits the size for the private key in bits, defaults to 2048. - * @param e the public exponent to use, defaults to 65537 (0x10001). - * @param [options] the options to use. - * prng a custom crypto-secure pseudo-random number generator to use, - * that must define "getBytesSync". - * algorithm the algorithm to use (default: 'PRIMEINC'). + * @param {Object} options - The options object that was passed to the request. * - * @return the state object to use to generate the key-pair. + * @returns {Object} */ -pki.rsa.createKeyPairGenerationState = function(bits, e, options) { - // TODO: migrate step-based prime generation code to forge.prime +function dispatchBeforeRedirect(options) { + if (options.beforeRedirects.proxy) { + options.beforeRedirects.proxy(options); + } + if (options.beforeRedirects.config) { + options.beforeRedirects.config(options); + } +} - // set default bits - if(typeof(bits) === 'string') { - bits = parseInt(bits, 10); +/** + * If the proxy or config afterRedirects functions are defined, call them with the options + * + * @param {http.ClientRequestArgs} options + * @param {AxiosProxyConfig} configProxy configuration from Axios options object + * @param {string} location + * + * @returns {http.ClientRequestArgs} + */ +function setProxy(options, configProxy, location) { + let proxy = configProxy; + if (!proxy && proxy !== false) { + const proxyUrl = (0,proxy_from_env/* getProxyForUrl */.j)(location); + if (proxyUrl) { + proxy = new URL(proxyUrl); + } } - bits = bits || 2048; + if (proxy) { + // Basic proxy authorization + if (proxy.username) { + proxy.auth = (proxy.username || '') + ':' + (proxy.password || ''); + } - // create prng with api that matches BigInteger secure random - options = options || {}; - var prng = options.prng || forge.random; - var rng = { - // x is an array to fill with bytes - nextBytes: function(x) { - var b = prng.getBytesSync(x.length); - for(var i = 0; i < x.length; ++i) { - x[i] = b.charCodeAt(i); + if (proxy.auth) { + // Support proxy auth object form + if (proxy.auth.username || proxy.auth.password) { + proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || ''); } + const base64 = Buffer + .from(proxy.auth, 'utf8') + .toString('base64'); + options.headers['Proxy-Authorization'] = 'Basic ' + base64; + } + + options.headers.host = options.hostname + (options.port ? ':' + options.port : ''); + const proxyHost = proxy.hostname || proxy.host; + options.hostname = proxyHost; + // Replace 'host' since options is not a URL object + options.host = proxyHost; + options.port = proxy.port; + options.path = location; + if (proxy.protocol) { + options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`; } + } + + options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) { + // Configure proxy for redirected request, passing the original config proxy to apply + // the exact same logic as if the redirected request was performed by axios directly. + setProxy(redirectOptions, configProxy, redirectOptions.href); }; +} - var algorithm = options.algorithm || 'PRIMEINC'; +const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(process) === 'process'; - // create PRIMEINC algorithm state - var rval; - if(algorithm === 'PRIMEINC') { - rval = { - algorithm: algorithm, - state: 0, - bits: bits, - rng: rng, - eInt: e || 65537, - e: new BigInteger(null), - p: null, - q: null, - qBits: bits >> 1, - pBits: bits - (bits >> 1), - pqState: 0, - num: null, - keys: null +// temporary hotfix + +const wrapAsync = (asyncExecutor) => { + return new Promise((resolve, reject) => { + let onDone; + let isDone; + + const done = (value, isRejected) => { + if (isDone) return; + isDone = true; + onDone && onDone(value, isRejected); + } + + const _resolve = (value) => { + done(value); + resolve(value); }; - rval.e.fromInt(rval.eInt); - } else { - throw new Error('Invalid key generation algorithm: ' + algorithm); - } - return rval; + const _reject = (reason) => { + done(reason, true); + reject(reason); + } + + asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject); + }) }; -/** - * Attempts to runs the key-generation algorithm for at most n seconds - * (approximately) using the given state. When key-generation has completed, - * the keys will be stored in state.keys. - * - * To use this function to update a UI while generating a key or to prevent - * causing browser lockups/warnings, set "n" to a value other than 0. A - * simple pattern for generating a key and showing a progress indicator is: - * - * var state = pki.rsa.createKeyPairGenerationState(2048); - * var step = function() { - * // step key-generation, run algorithm for 100 ms, repeat - * if(!forge.pki.rsa.stepKeyPairGenerationState(state, 100)) { - * setTimeout(step, 1); - * } else { - * // key-generation complete - * // TODO: turn off progress indicator here - * // TODO: use the generated key-pair in "state.keys" - * } - * }; - * // TODO: turn on progress indicator here - * setTimeout(step, 0); - * - * @param state the state to use. - * @param n the maximum number of milliseconds to run the algorithm for, 0 - * to run the algorithm to completion. - * - * @return true if the key-generation completed, false if not. - */ -pki.rsa.stepKeyPairGenerationState = function(state, n) { - // set default algorithm if not set - if(!('algorithm' in state)) { - state.algorithm = 'PRIMEINC'; +const resolveFamily = ({address, family}) => { + if (!utils.isString(address)) { + throw TypeError('address must be a string'); } + return ({ + address, + family: family || (address.indexOf('.') < 0 ? 6 : 4) + }); +} - // TODO: migrate step-based prime generation code to forge.prime - // TODO: abstract as PRIMEINC algorithm +const buildAddressEntry = (address, family) => resolveFamily(utils.isObject(address) ? address : {address, family}); - // do key generation (based on Tom Wu's rsa.js, see jsbn.js license) - // with some minor optimizations and designed to run in steps +/*eslint consistent-return:0*/ +/* harmony default export */ const adapters_http = (isHttpAdapterSupported && function httpAdapter(config) { + return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) { + let {data, lookup, family} = config; + const {responseType, responseEncoding} = config; + const method = config.method.toUpperCase(); + let isDone; + let rejected = false; + let req; + + if (lookup) { + const _lookup = helpers_callbackify(lookup, (value) => utils.isArray(value) ? value : [value]); + // hotfix to support opt.all option which is required for node 20.x + lookup = (hostname, opt, cb) => { + _lookup(hostname, opt, (err, arg0, arg1) => { + const addresses = utils.isArray(arg0) ? arg0.map(addr => buildAddressEntry(addr)) : [buildAddressEntry(arg0, arg1)]; + + opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family); + }); + } + } - // local state vars - var THIRTY = new BigInteger(null); - THIRTY.fromInt(30); - var deltaIdx = 0; - var op_or = function(x, y) {return x | y;}; + // temporary internal emitter until the AxiosRequest class will be implemented + const emitter = new external_events_(); - // keep stepping until time limit is reached or done - var t1 = +new Date(); - var t2; - var total = 0; - while(state.keys === null && (n <= 0 || total < n)) { - // generate p or q - if(state.state === 0) { - /* Note: All primes are of the form: + const onFinished = () => { + if (config.cancelToken) { + config.cancelToken.unsubscribe(abort); + } - 30k+i, for i < 30 and gcd(30, i)=1, where there are 8 values for i + if (config.signal) { + config.signal.removeEventListener('abort', abort); + } - When we generate a random number, we always align it at 30k + 1. Each - time the number is determined not to be prime we add to get to the - next 'i', eg: if the number was at 30k + 1 we add 6. */ - var bits = (state.p === null) ? state.pBits : state.qBits; - var bits1 = bits - 1; + emitter.removeAllListeners(); + } - // get a random number - if(state.pqState === 0) { - state.num = new BigInteger(bits, state.rng); - // force MSB set - if(!state.num.testBit(bits1)) { - state.num.bitwiseTo( - BigInteger.ONE.shiftLeft(bits1), op_or, state.num); - } - // align number on 30k+1 boundary - state.num.dAddOffset(31 - state.num.mod(THIRTY).byteValue(), 0); - deltaIdx = 0; + onDone((value, isRejected) => { + isDone = true; + if (isRejected) { + rejected = true; + onFinished(); + } + }); - ++state.pqState; - } else if(state.pqState === 1) { - // try to make the number a prime - if(state.num.bitLength() > bits) { - // overflow, try again - state.pqState = 0; - // do primality test - } else if(state.num.isProbablePrime( - _getMillerRabinTests(state.num.bitLength()))) { - ++state.pqState; - } else { - // get next potential prime - state.num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0); - } - } else if(state.pqState === 2) { - // ensure number is coprime with e - state.pqState = - (state.num.subtract(BigInteger.ONE).gcd(state.e) - .compareTo(BigInteger.ONE) === 0) ? 3 : 0; - } else if(state.pqState === 3) { - // store p or q - state.pqState = 0; - if(state.p === null) { - state.p = state.num; - } else { - state.q = state.num; - } + function abort(reason) { + emitter.emit('abort', !reason || reason.type ? new cancel_CanceledError(null, config, req) : reason); + } - // advance state if both p and q are ready - if(state.p !== null && state.q !== null) { - ++state.state; + emitter.once('abort', reject); + + if (config.cancelToken || config.signal) { + config.cancelToken && config.cancelToken.subscribe(abort); + if (config.signal) { + config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort); + } + } + + // Parse url + const fullPath = buildFullPath(config.baseURL, config.url); + const parsed = new URL(fullPath, 'http://localhost'); + const protocol = parsed.protocol || supportedProtocols[0]; + + if (protocol === 'data:') { + let convertedData; + + if (method !== 'GET') { + return settle(resolve, reject, { + status: 405, + statusText: 'method not allowed', + headers: {}, + config + }); + } + + try { + convertedData = fromDataURI(config.url, responseType === 'blob', { + Blob: config.env && config.env.Blob + }); + } catch (err) { + throw core_AxiosError.from(err, core_AxiosError.ERR_BAD_REQUEST, config); + } + + if (responseType === 'text') { + convertedData = convertedData.toString(responseEncoding); + + if (!responseEncoding || responseEncoding === 'utf8') { + convertedData = utils.stripBOM(convertedData); } - state.num = null; + } else if (responseType === 'stream') { + convertedData = external_stream_.Readable.from(convertedData); } - } else if(state.state === 1) { - // ensure p is larger than q (swap them if not) - if(state.p.compareTo(state.q) < 0) { - state.num = state.p; - state.p = state.q; - state.q = state.num; + + return settle(resolve, reject, { + data: convertedData, + status: 200, + statusText: 'OK', + headers: new core_AxiosHeaders(), + config + }); + } + + if (supportedProtocols.indexOf(protocol) === -1) { + return reject(new core_AxiosError( + 'Unsupported protocol ' + protocol, + core_AxiosError.ERR_BAD_REQUEST, + config + )); + } + + const headers = core_AxiosHeaders.from(config.headers).normalize(); + + // Set User-Agent (required by some servers) + // See https://github.com/axios/axios/issues/69 + // User-Agent is specified; handle case where no UA header is desired + // Only set header if it hasn't been set in config + headers.set('User-Agent', 'axios/' + VERSION, false); + + const onDownloadProgress = config.onDownloadProgress; + const onUploadProgress = config.onUploadProgress; + const maxRate = config.maxRate; + let maxUploadRate = undefined; + let maxDownloadRate = undefined; + + // support for spec compliant FormData objects + if (utils.isSpecCompliantForm(data)) { + const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i); + + data = helpers_formDataToStream(data, (formHeaders) => { + headers.set(formHeaders); + }, { + tag: `axios-${VERSION}-boundary`, + boundary: userBoundary && userBoundary[1] || undefined + }); + // support for https://www.npmjs.com/package/form-data api + } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) { + headers.set(data.getHeaders()); + + if (!headers.hasContentLength()) { + try { + const knownLength = await external_util_.promisify(data.getLength).call(data); + Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength); + /*eslint no-empty:0*/ + } catch (e) { + } } - ++state.state; - } else if(state.state === 2) { - // compute phi: (p - 1)(q - 1) (Euler's totient function) - state.p1 = state.p.subtract(BigInteger.ONE); - state.q1 = state.q.subtract(BigInteger.ONE); - state.phi = state.p1.multiply(state.q1); - ++state.state; - } else if(state.state === 3) { - // ensure e and phi are coprime - if(state.phi.gcd(state.e).compareTo(BigInteger.ONE) === 0) { - // phi and e are coprime, advance - ++state.state; + } else if (utils.isBlob(data)) { + data.size && headers.setContentType(data.type || 'application/octet-stream'); + headers.setContentLength(data.size || 0); + data = external_stream_.Readable.from(helpers_readBlob(data)); + } else if (data && !utils.isStream(data)) { + if (Buffer.isBuffer(data)) { + // Nothing to do... + } else if (utils.isArrayBuffer(data)) { + data = Buffer.from(new Uint8Array(data)); + } else if (utils.isString(data)) { + data = Buffer.from(data, 'utf-8'); } else { - // phi and e aren't coprime, so generate a new p and q - state.p = null; - state.q = null; - state.state = 0; + return reject(new core_AxiosError( + 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', + core_AxiosError.ERR_BAD_REQUEST, + config + )); } - } else if(state.state === 4) { - // create n, ensure n is has the right number of bits - state.n = state.p.multiply(state.q); - // ensure n is right number of bits - if(state.n.bitLength() === state.bits) { - // success, advance - ++state.state; - } else { - // failed, get new q - state.q = null; - state.state = 0; + // Add Content-Length header if data exists + headers.setContentLength(data.length, false); + + if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) { + return reject(new core_AxiosError( + 'Request body larger than maxBodyLength limit', + core_AxiosError.ERR_BAD_REQUEST, + config + )); } - } else if(state.state === 5) { - // set keys - var d = state.e.modInverse(state.phi); - state.keys = { - privateKey: pki.rsa.setPrivateKey( - state.n, state.e, d, state.p, state.q, - d.mod(state.p1), d.mod(state.q1), - state.q.modInverse(state.p)), - publicKey: pki.rsa.setPublicKey(state.n, state.e) - }; } - // update timing - t2 = +new Date(); - total += t2 - t1; - t1 = t2; - } - - return state.keys !== null; -}; + const contentLength = utils.toFiniteNumber(headers.getContentLength()); -/** - * Generates an RSA public-private key pair in a single call. - * - * To generate a key-pair in steps (to allow for progress updates and to - * prevent blocking or warnings in slow browsers) then use the key-pair - * generation state functions. - * - * To generate a key-pair asynchronously (either through web-workers, if - * available, or by breaking up the work on the main thread), pass a - * callback function. - * - * @param [bits] the size for the private key in bits, defaults to 2048. - * @param [e] the public exponent to use, defaults to 65537. - * @param [options] options for key-pair generation, if given then 'bits' - * and 'e' must *not* be given: - * bits the size for the private key in bits, (default: 2048). - * e the public exponent to use, (default: 65537 (0x10001)). - * workerScript the worker script URL. - * workers the number of web workers (if supported) to use, - * (default: 2). - * workLoad the size of the work load, ie: number of possible prime - * numbers for each web worker to check per work assignment, - * (default: 100). - * prng a custom crypto-secure pseudo-random number generator to use, - * that must define "getBytesSync". Disables use of native APIs. - * algorithm the algorithm to use (default: 'PRIMEINC'). - * @param [callback(err, keypair)] called once the operation completes. - * - * @return an object with privateKey and publicKey properties. - */ -pki.rsa.generateKeyPair = function(bits, e, options, callback) { - // (bits), (options), (callback) - if(arguments.length === 1) { - if(typeof bits === 'object') { - options = bits; - bits = undefined; - } else if(typeof bits === 'function') { - callback = bits; - bits = undefined; + if (utils.isArray(maxRate)) { + maxUploadRate = maxRate[0]; + maxDownloadRate = maxRate[1]; + } else { + maxUploadRate = maxDownloadRate = maxRate; } - } else if(arguments.length === 2) { - // (bits, e), (bits, options), (bits, callback), (options, callback) - if(typeof bits === 'number') { - if(typeof e === 'function') { - callback = e; - e = undefined; - } else if(typeof e !== 'number') { - options = e; - e = undefined; + + if (data && (onUploadProgress || maxUploadRate)) { + if (!utils.isStream(data)) { + data = external_stream_.Readable.from(data, {objectMode: false}); } + + data = external_stream_.pipeline([data, new helpers_AxiosTransformStream({ + length: contentLength, + maxRate: utils.toFiniteNumber(maxUploadRate) + })], utils.noop); + + onUploadProgress && data.on('progress', progress => { + onUploadProgress(Object.assign(progress, { + upload: true + })); + }); + } + + // HTTP basic authentication + let auth = undefined; + if (config.auth) { + const username = config.auth.username || ''; + const password = config.auth.password || ''; + auth = username + ':' + password; + } + + if (!auth && parsed.username) { + const urlUsername = parsed.username; + const urlPassword = parsed.password; + auth = urlUsername + ':' + urlPassword; + } + + auth && headers.delete('authorization'); + + let path; + + try { + path = buildURL( + parsed.pathname + parsed.search, + config.params, + config.paramsSerializer + ).replace(/^\?/, ''); + } catch (err) { + const customErr = new Error(err.message); + customErr.config = config; + customErr.url = config.url; + customErr.exists = true; + return reject(customErr); + } + + headers.set( + 'Accept-Encoding', + 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false + ); + + const options = { + path, + method: method, + headers: headers.toJSON(), + agents: { http: config.httpAgent, https: config.httpsAgent }, + auth, + protocol, + family, + beforeRedirect: dispatchBeforeRedirect, + beforeRedirects: {} + }; + + // cacheable-lookup integration hotfix + !utils.isUndefined(lookup) && (options.lookup = lookup); + + if (config.socketPath) { + options.socketPath = config.socketPath; } else { - options = bits; - callback = e; - bits = undefined; - e = undefined; + options.hostname = parsed.hostname; + options.port = parsed.port; + setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path); } - } else if(arguments.length === 3) { - // (bits, e, options), (bits, e, callback), (bits, options, callback) - if(typeof e === 'number') { - if(typeof options === 'function') { - callback = options; - options = undefined; + + let transport; + const isHttpsRequest = isHttps.test(options.protocol); + options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent; + if (config.transport) { + transport = config.transport; + } else if (config.maxRedirects === 0) { + transport = isHttpsRequest ? external_https_ : external_http_; + } else { + if (config.maxRedirects) { + options.maxRedirects = config.maxRedirects; } + if (config.beforeRedirect) { + options.beforeRedirects.config = config.beforeRedirect; + } + transport = isHttpsRequest ? httpsFollow : httpFollow; + } + + if (config.maxBodyLength > -1) { + options.maxBodyLength = config.maxBodyLength; } else { - callback = options; - options = e; - e = undefined; + // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited + options.maxBodyLength = Infinity; } - } - options = options || {}; - if(bits === undefined) { - bits = options.bits || 2048; - } - if(e === undefined) { - e = options.e || 0x10001; - } - // use native code if permitted, available, and parameters are acceptable - if(!forge.options.usePureJavaScript && !options.prng && - bits >= 256 && bits <= 16384 && (e === 0x10001 || e === 3)) { - if(callback) { - // try native async - if(_detectNodeCrypto('generateKeyPair')) { - return _crypto.generateKeyPair('rsa', { - modulusLength: bits, - publicExponent: e, - publicKeyEncoding: { - type: 'spki', - format: 'pem' - }, - privateKeyEncoding: { - type: 'pkcs8', - format: 'pem' + if (config.insecureHTTPParser) { + options.insecureHTTPParser = config.insecureHTTPParser; + } + + // Create the request + req = transport.request(options, function handleResponse(res) { + if (req.destroyed) return; + + const streams = [res]; + + const responseLength = +res.headers['content-length']; + + if (onDownloadProgress) { + const transformStream = new helpers_AxiosTransformStream({ + length: utils.toFiniteNumber(responseLength), + maxRate: utils.toFiniteNumber(maxDownloadRate) + }); + + onDownloadProgress && transformStream.on('progress', progress => { + onDownloadProgress(Object.assign(progress, { + download: true + })); + }); + + streams.push(transformStream); + } + + // decompress the response body transparently if required + let responseStream = res; + + // return the last request in case of redirects + const lastRequest = res.req || req; + + // if decompress disabled we should not decompress + if (config.decompress !== false && res.headers['content-encoding']) { + // if no content, but headers still say that it is encoded, + // remove the header not confuse downstream operations + if (method === 'HEAD' || res.statusCode === 204) { + delete res.headers['content-encoding']; + } + + switch ((res.headers['content-encoding'] || '').toLowerCase()) { + /*eslint default-case:0*/ + case 'gzip': + case 'x-gzip': + case 'compress': + case 'x-compress': + // add the unzipper to the body stream processing pipeline + streams.push(external_zlib_.createUnzip(zlibOptions)); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'deflate': + streams.push(new helpers_ZlibHeaderTransformStream()); + + // add the unzipper to the body stream processing pipeline + streams.push(external_zlib_.createUnzip(zlibOptions)); + + // remove the content-encoding in order to not confuse downstream operations + delete res.headers['content-encoding']; + break; + case 'br': + if (isBrotliSupported) { + streams.push(external_zlib_.createBrotliDecompress(brotliOptions)); + delete res.headers['content-encoding']; } - }, function(err, pub, priv) { - if(err) { - return callback(err); + } + } + + responseStream = streams.length > 1 ? external_stream_.pipeline(streams, utils.noop) : streams[0]; + + const offListeners = external_stream_.finished(responseStream, () => { + offListeners(); + onFinished(); + }); + + const response = { + status: res.statusCode, + statusText: res.statusMessage, + headers: new core_AxiosHeaders(res.headers), + config, + request: lastRequest + }; + + if (responseType === 'stream') { + response.data = responseStream; + settle(resolve, reject, response); + } else { + const responseBuffer = []; + let totalResponseBytes = 0; + + responseStream.on('data', function handleStreamData(chunk) { + responseBuffer.push(chunk); + totalResponseBytes += chunk.length; + + // make sure the content length is not over the maxContentLength if specified + if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) { + // stream.destroy() emit aborted event before calling reject() on Node.js v16 + rejected = true; + responseStream.destroy(); + reject(new core_AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', + core_AxiosError.ERR_BAD_RESPONSE, config, lastRequest)); } - callback(null, { - privateKey: pki.privateKeyFromPem(priv), - publicKey: pki.publicKeyFromPem(pub) - }); }); - } - if(_detectSubtleCrypto('generateKey') && - _detectSubtleCrypto('exportKey')) { - // use standard native generateKey - return util.globalScope.crypto.subtle.generateKey({ - name: 'RSASSA-PKCS1-v1_5', - modulusLength: bits, - publicExponent: _intToUint8Array(e), - hash: {name: 'SHA-256'} - }, true /* key can be exported*/, ['sign', 'verify']) - .then(function(pair) { - return util.globalScope.crypto.subtle.exportKey( - 'pkcs8', pair.privateKey); - // avoiding catch(function(err) {...}) to support IE <= 8 - }).then(undefined, function(err) { - callback(err); - }).then(function(pkcs8) { - if(pkcs8) { - var privateKey = pki.privateKeyFromAsn1( - asn1.fromDer(forge.util.createBuffer(pkcs8))); - callback(null, { - privateKey: privateKey, - publicKey: pki.setRsaPublicKey(privateKey.n, privateKey.e) - }); + + responseStream.on('aborted', function handlerStreamAborted() { + if (rejected) { + return; + } + + const err = new core_AxiosError( + 'maxContentLength size of ' + config.maxContentLength + ' exceeded', + core_AxiosError.ERR_BAD_RESPONSE, + config, + lastRequest + ); + responseStream.destroy(err); + reject(err); + }); + + responseStream.on('error', function handleStreamError(err) { + if (req.destroyed) return; + reject(core_AxiosError.from(err, null, config, lastRequest)); + }); + + responseStream.on('end', function handleStreamEnd() { + try { + let responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer); + if (responseType !== 'arraybuffer') { + responseData = responseData.toString(responseEncoding); + if (!responseEncoding || responseEncoding === 'utf8') { + responseData = utils.stripBOM(responseData); + } + } + response.data = responseData; + } catch (err) { + return reject(core_AxiosError.from(err, null, config, response.request, response)); } + settle(resolve, reject, response); }); } - if(_detectSubtleMsCrypto('generateKey') && - _detectSubtleMsCrypto('exportKey')) { - var genOp = util.globalScope.msCrypto.subtle.generateKey({ - name: 'RSASSA-PKCS1-v1_5', - modulusLength: bits, - publicExponent: _intToUint8Array(e), - hash: {name: 'SHA-256'} - }, true /* key can be exported*/, ['sign', 'verify']); - genOp.oncomplete = function(e) { - var pair = e.target.result; - var exportOp = util.globalScope.msCrypto.subtle.exportKey( - 'pkcs8', pair.privateKey); - exportOp.oncomplete = function(e) { - var pkcs8 = e.target.result; - var privateKey = pki.privateKeyFromAsn1( - asn1.fromDer(forge.util.createBuffer(pkcs8))); - callback(null, { - privateKey: privateKey, - publicKey: pki.setRsaPublicKey(privateKey.n, privateKey.e) - }); - }; - exportOp.onerror = function(err) { - callback(err); - }; - }; - genOp.onerror = function(err) { - callback(err); - }; - return; + + emitter.once('abort', err => { + if (!responseStream.destroyed) { + responseStream.emit('error', err); + responseStream.destroy(); + } + }); + }); + + emitter.once('abort', err => { + reject(err); + req.destroy(err); + }); + + // Handle errors + req.on('error', function handleRequestError(err) { + // @todo remove + // if (req.aborted && err.code !== AxiosError.ERR_FR_TOO_MANY_REDIRECTS) return; + reject(core_AxiosError.from(err, null, config, req)); + }); + + // set tcp keep alive to prevent drop connection by peer + req.on('socket', function handleRequestSocket(socket) { + // default interval of sending ack packet is 1 minute + socket.setKeepAlive(true, 1000 * 60); + }); + + // Handle request timeout + if (config.timeout) { + // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types. + const timeout = parseInt(config.timeout, 10); + + if (Number.isNaN(timeout)) { + reject(new core_AxiosError( + 'error trying to parse `config.timeout` to int', + core_AxiosError.ERR_BAD_OPTION_VALUE, + config, + req + )); + + return; + } + + // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system. + // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET. + // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up. + // And then these socket which be hang up will devouring CPU little by little. + // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect. + req.setTimeout(timeout, function handleRequestTimeout() { + if (isDone) return; + let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; + const transitional = config.transitional || defaults_transitional; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(new core_AxiosError( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED, + config, + req + )); + abort(); + }); + } + + + // Send the request + if (utils.isStream(data)) { + let ended = false; + let errored = false; + + data.on('end', () => { + ended = true; + }); + + data.once('error', err => { + errored = true; + req.destroy(err); + }); + + data.on('close', () => { + if (!ended && !errored) { + abort(new cancel_CanceledError('Request stream has been aborted', config, req)); + } + }); + + data.pipe(req); + } else { + req.end(data); + } + }); +}); + +const __setProxy = (/* unused pure expression or super */ null && (setProxy)); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/cookies.js + + + +/* harmony default export */ const cookies = (platform.hasStandardBrowserEnv ? + + // Standard browser envs support document.cookie + { + write(name, value, expires, path, domain, secure) { + const cookie = [name + '=' + encodeURIComponent(value)]; + + utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString()); + + utils.isString(path) && cookie.push('path=' + path); + + utils.isString(domain) && cookie.push('domain=' + domain); + + secure === true && cookie.push('secure'); + + document.cookie = cookie.join('; '); + }, + + read(name) { + const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); + return (match ? decodeURIComponent(match[3]) : null); + }, + + remove(name) { + this.write(name, '', Date.now() - 86400000); + } + } + + : + + // Non-standard browser env (web workers, react-native) lack needed support. + { + write() {}, + read() { + return null; + }, + remove() {} + }); + + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js + + + + + +/* harmony default export */ const isURLSameOrigin = (platform.hasStandardBrowserEnv ? + +// Standard browser envs have full support of the APIs needed to test +// whether the request URL is of the same origin as current location. + (function standardBrowserEnv() { + const msie = /(msie|trident)/i.test(navigator.userAgent); + const urlParsingNode = document.createElement('a'); + let originURL; + + /** + * Parse a URL to discover its components + * + * @param {String} url The URL to be parsed + * @returns {Object} + */ + function resolveURL(url) { + let href = url; + + if (msie) { + // IE needs attribute set twice to normalize properties + urlParsingNode.setAttribute('href', href); + href = urlParsingNode.href; + } + + urlParsingNode.setAttribute('href', href); + + // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils + return { + href: urlParsingNode.href, + protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', + host: urlParsingNode.host, + search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', + hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', + hostname: urlParsingNode.hostname, + port: urlParsingNode.port, + pathname: (urlParsingNode.pathname.charAt(0) === '/') ? + urlParsingNode.pathname : + '/' + urlParsingNode.pathname + }; + } + + originURL = resolveURL(window.location.href); + + /** + * Determine if a URL shares the same origin as the current location + * + * @param {String} requestURL The URL to test + * @returns {boolean} True if URL shares the same origin, otherwise false + */ + return function isURLSameOrigin(requestURL) { + const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; + return (parsed.protocol === originURL.protocol && + parsed.host === originURL.host); + }; + })() : + + // Non standard browser envs (web workers, react-native) lack needed support. + (function nonStandardBrowserEnv() { + return function isURLSameOrigin() { + return true; + }; + })()); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/adapters/xhr.js + + + + + + + + + + + + + + + + +function progressEventReducer(listener, isDownloadStream) { + let bytesNotified = 0; + const _speedometer = helpers_speedometer(50, 250); + + return e => { + const loaded = e.loaded; + const total = e.lengthComputable ? e.total : undefined; + const progressBytes = loaded - bytesNotified; + const rate = _speedometer(progressBytes); + const inRange = loaded <= total; + + bytesNotified = loaded; + + const data = { + loaded, + total, + progress: total ? (loaded / total) : undefined, + bytes: progressBytes, + rate: rate ? rate : undefined, + estimated: rate && total && inRange ? (total - loaded) / rate : undefined, + event: e + }; + + data[isDownloadStream ? 'download' : 'upload'] = true; + + listener(data); + }; +} + +const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined'; + +/* harmony default export */ const xhr = (isXHRAdapterSupported && function (config) { + return new Promise(function dispatchXhrRequest(resolve, reject) { + let requestData = config.data; + const requestHeaders = core_AxiosHeaders.from(config.headers).normalize(); + let {responseType, withXSRFToken} = config; + let onCanceled; + function done() { + if (config.cancelToken) { + config.cancelToken.unsubscribe(onCanceled); + } + + if (config.signal) { + config.signal.removeEventListener('abort', onCanceled); } - } else { - // try native sync - if(_detectNodeCrypto('generateKeyPairSync')) { - var keypair = _crypto.generateKeyPairSync('rsa', { - modulusLength: bits, - publicExponent: e, - publicKeyEncoding: { - type: 'spki', - format: 'pem' - }, - privateKeyEncoding: { - type: 'pkcs8', - format: 'pem' - } - }); - return { - privateKey: pki.privateKeyFromPem(keypair.privateKey), - publicKey: pki.publicKeyFromPem(keypair.publicKey) - }; + } + + let contentType; + + if (utils.isFormData(requestData)) { + if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) { + requestHeaders.setContentType(false); // Let the browser set it + } else if ((contentType = requestHeaders.getContentType()) !== false) { + // fix semicolon duplication issue for ReactNative FormData implementation + const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : []; + requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; ')); } } - } - // use JavaScript implementation - var state = pki.rsa.createKeyPairGenerationState(bits, e, options); - if(!callback) { - pki.rsa.stepKeyPairGenerationState(state, 0); - return state.keys; - } - _generateKeyPair(state, options, callback); -}; + let request = new XMLHttpRequest(); -/** - * Sets an RSA public key from BigIntegers modulus and exponent. - * - * @param n the modulus. - * @param e the exponent. - * - * @return the public key. - */ -pki.setRsaPublicKey = pki.rsa.setPublicKey = function(n, e) { - var key = { - n: n, - e: e - }; + // HTTP basic authentication + if (config.auth) { + const username = config.auth.username || ''; + const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : ''; + requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password)); + } - /** - * Encrypts the given data with this public key. Newer applications - * should use the 'RSA-OAEP' decryption scheme, 'RSAES-PKCS1-V1_5' is for - * legacy applications. - * - * @param data the byte string to encrypt. - * @param scheme the encryption scheme to use: - * 'RSAES-PKCS1-V1_5' (default), - * 'RSA-OAEP', - * 'RAW', 'NONE', or null to perform raw RSA encryption, - * an object with an 'encode' property set to a function - * with the signature 'function(data, key)' that returns - * a binary-encoded string representing the encoded data. - * @param schemeOptions any scheme-specific options. - * - * @return the encrypted byte string. - */ - key.encrypt = function(data, scheme, schemeOptions) { - if(typeof scheme === 'string') { - scheme = scheme.toUpperCase(); - } else if(scheme === undefined) { - scheme = 'RSAES-PKCS1-V1_5'; + const fullPath = buildFullPath(config.baseURL, config.url); + + request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true); + + // Set the request timeout in MS + request.timeout = config.timeout; + + function onloadend() { + if (!request) { + return; + } + // Prepare the response + const responseHeaders = core_AxiosHeaders.from( + 'getAllResponseHeaders' in request && request.getAllResponseHeaders() + ); + const responseData = !responseType || responseType === 'text' || responseType === 'json' ? + request.responseText : request.response; + const response = { + data: responseData, + status: request.status, + statusText: request.statusText, + headers: responseHeaders, + config, + request + }; + + settle(function _resolve(value) { + resolve(value); + done(); + }, function _reject(err) { + reject(err); + done(); + }, response); + + // Clean up request + request = null; } - if(scheme === 'RSAES-PKCS1-V1_5') { - scheme = { - encode: function(m, key, pub) { - return _encodePkcs1_v1_5(m, key, 0x02).getBytes(); + if ('onloadend' in request) { + // Use onloadend if available + request.onloadend = onloadend; + } else { + // Listen for ready state to emulate onloadend + request.onreadystatechange = function handleLoad() { + if (!request || request.readyState !== 4) { + return; } - }; - } else if(scheme === 'RSA-OAEP' || scheme === 'RSAES-OAEP') { - scheme = { - encode: function(m, key) { - return forge.pkcs1.encode_rsa_oaep(key, m, schemeOptions); + + // The request errored out and we didn't get a response, this will be + // handled by onerror instead + // With one exception: request that using file: protocol, most browsers + // will return status as 0 even though it's a successful request + if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) { + return; } + // readystate handler is calling before onerror or ontimeout handlers, + // so we should call onloadend on the next 'tick' + setTimeout(onloadend); }; - } else if(['RAW', 'NONE', 'NULL', null].indexOf(scheme) !== -1) { - scheme = {encode: function(e) {return e;}}; - } else if(typeof scheme === 'string') { - throw new Error('Unsupported encryption scheme: "' + scheme + '".'); } - // do scheme-based encoding then rsa encryption - var e = scheme.encode(data, key, true); - return pki.rsa.encrypt(e, key, true); - }; + // Handle browser request cancellation (as opposed to a manual cancellation) + request.onabort = function handleAbort() { + if (!request) { + return; + } - /** - * Verifies the given signature against the given digest. - * - * PKCS#1 supports multiple (currently two) signature schemes: - * RSASSA-PKCS1-V1_5 and RSASSA-PSS. - * - * By default this implementation uses the "old scheme", i.e. - * RSASSA-PKCS1-V1_5, in which case once RSA-decrypted, the - * signature is an OCTET STRING that holds a DigestInfo. - * - * DigestInfo ::= SEQUENCE { - * digestAlgorithm DigestAlgorithmIdentifier, - * digest Digest - * } - * DigestAlgorithmIdentifier ::= AlgorithmIdentifier - * Digest ::= OCTET STRING - * - * To perform PSS signature verification, provide an instance - * of Forge PSS object as the scheme parameter. - * - * @param digest the message digest hash to compare against the signature, - * as a binary-encoded string. - * @param signature the signature to verify, as a binary-encoded string. - * @param scheme signature verification scheme to use: - * 'RSASSA-PKCS1-V1_5' or undefined for RSASSA PKCS#1 v1.5, - * a Forge PSS object for RSASSA-PSS, - * 'NONE' or null for none, DigestInfo will not be expected, but - * PKCS#1 v1.5 padding will still be used. - * @param options optional verify options - * _parseAllDigestBytes testing flag to control parsing of all - * digest bytes. Unsupported and not for general usage. - * (default: true) - * - * @return true if the signature was verified, false if not. - */ - key.verify = function(digest, signature, scheme, options) { - if(typeof scheme === 'string') { - scheme = scheme.toUpperCase(); - } else if(scheme === undefined) { - scheme = 'RSASSA-PKCS1-V1_5'; + reject(new core_AxiosError('Request aborted', core_AxiosError.ECONNABORTED, config, request)); + + // Clean up request + request = null; + }; + + // Handle low level network errors + request.onerror = function handleError() { + // Real errors are hidden from us by the browser + // onerror should only fire if it's a network error + reject(new core_AxiosError('Network Error', core_AxiosError.ERR_NETWORK, config, request)); + + // Clean up request + request = null; + }; + + // Handle timeout + request.ontimeout = function handleTimeout() { + let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded'; + const transitional = config.transitional || defaults_transitional; + if (config.timeoutErrorMessage) { + timeoutErrorMessage = config.timeoutErrorMessage; + } + reject(new core_AxiosError( + timeoutErrorMessage, + transitional.clarifyTimeoutError ? core_AxiosError.ETIMEDOUT : core_AxiosError.ECONNABORTED, + config, + request)); + + // Clean up request + request = null; + }; + + // Add xsrf header + // This is only done if running in a standard browser environment. + // Specifically not if we're in a web worker, or react-native. + if(platform.hasStandardBrowserEnv) { + withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config)); + + if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) { + // Add xsrf header + const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName); + + if (xsrfValue) { + requestHeaders.set(config.xsrfHeaderName, xsrfValue); + } + } } - if(options === undefined) { - options = { - _parseAllDigestBytes: true - }; + + // Remove Content-Type if data is undefined + requestData === undefined && requestHeaders.setContentType(null); + + // Add headers to the request + if ('setRequestHeader' in request) { + utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) { + request.setRequestHeader(key, val); + }); } - if(!('_parseAllDigestBytes' in options)) { - options._parseAllDigestBytes = true; + + // Add withCredentials to request if needed + if (!utils.isUndefined(config.withCredentials)) { + request.withCredentials = !!config.withCredentials; } - if(scheme === 'RSASSA-PKCS1-V1_5') { - scheme = { - verify: function(digest, d) { - // remove padding - d = _decodePkcs1_v1_5(d, key, true); - // d is ASN.1 BER-encoded DigestInfo - var obj = asn1.fromDer(d, { - parseAllBytes: options._parseAllDigestBytes - }); + // Add responseType to request if needed + if (responseType && responseType !== 'json') { + request.responseType = config.responseType; + } - // validate DigestInfo - var capture = {}; - var errors = []; - if(!asn1.validate(obj, digestInfoValidator, capture, errors)) { - var error = new Error( - 'ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 ' + - 'DigestInfo value.'); - error.errors = errors; - throw error; - } - // check hash algorithm identifier - // see PKCS1-v1-5DigestAlgorithms in RFC 8017 - // FIXME: add support to vaidator for strict value choices - var oid = asn1.derToOid(capture.algorithmIdentifier); - if(!(oid === forge.oids.md2 || - oid === forge.oids.md5 || - oid === forge.oids.sha1 || - oid === forge.oids.sha224 || - oid === forge.oids.sha256 || - oid === forge.oids.sha384 || - oid === forge.oids.sha512 || - oid === forge.oids['sha512-224'] || - oid === forge.oids['sha512-256'])) { - var error = new Error( - 'Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.'); - error.oid = oid; - throw error; - } + // Handle progress if needed + if (typeof config.onDownloadProgress === 'function') { + request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true)); + } - // special check for md2 and md5 that NULL parameters exist - if(oid === forge.oids.md2 || oid === forge.oids.md5) { - if(!('parameters' in capture)) { - throw new Error( - 'ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 ' + - 'DigestInfo value. ' + - 'Missing algorithm identifer NULL parameters.'); - } - } + // Not all browsers support upload events + if (typeof config.onUploadProgress === 'function' && request.upload) { + request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress)); + } - // compare the given digest to the decrypted one - return digest === capture.digest; - } - }; - } else if(scheme === 'NONE' || scheme === 'NULL' || scheme === null) { - scheme = { - verify: function(digest, d) { - // remove padding - d = _decodePkcs1_v1_5(d, key, true); - return digest === d; + if (config.cancelToken || config.signal) { + // Handle cancellation + // eslint-disable-next-line func-names + onCanceled = cancel => { + if (!request) { + return; } + reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel); + request.abort(); + request = null; }; + + config.cancelToken && config.cancelToken.subscribe(onCanceled); + if (config.signal) { + config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled); + } } - // do rsa decryption w/o any decoding, then verify -- which does decoding - var d = pki.rsa.decrypt(signature, key, true, false); - return scheme.verify(digest, d, key.n.bitLength()); - }; + const protocol = parseProtocol(fullPath); - return key; -}; + if (protocol && platform.protocols.indexOf(protocol) === -1) { + reject(new core_AxiosError('Unsupported protocol ' + protocol + ':', core_AxiosError.ERR_BAD_REQUEST, config)); + return; + } -/** - * Sets an RSA private key from BigIntegers modulus, exponent, primes, - * prime exponents, and modular multiplicative inverse. - * - * @param n the modulus. - * @param e the public exponent. - * @param d the private exponent ((inverse of e) mod n). - * @param p the first prime. - * @param q the second prime. - * @param dP exponent1 (d mod (p-1)). - * @param dQ exponent2 (d mod (q-1)). - * @param qInv ((inverse of q) mod p) - * - * @return the private key. - */ -pki.setRsaPrivateKey = pki.rsa.setPrivateKey = function( - n, e, d, p, q, dP, dQ, qInv) { - var key = { - n: n, - e: e, - d: d, - p: p, - q: q, - dP: dP, - dQ: dQ, - qInv: qInv - }; - /** - * Decrypts the given data with this private key. The decryption scheme - * must match the one used to encrypt the data. - * - * @param data the byte string to decrypt. - * @param scheme the decryption scheme to use: - * 'RSAES-PKCS1-V1_5' (default), - * 'RSA-OAEP', - * 'RAW', 'NONE', or null to perform raw RSA decryption. - * @param schemeOptions any scheme-specific options. - * - * @return the decrypted byte string. - */ - key.decrypt = function(data, scheme, schemeOptions) { - if(typeof scheme === 'string') { - scheme = scheme.toUpperCase(); - } else if(scheme === undefined) { - scheme = 'RSAES-PKCS1-V1_5'; + // Send the request + request.send(requestData || null); + }); +}); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/adapters/adapters.js + + + + + +const knownAdapters = { + http: adapters_http, + xhr: xhr +} + +utils.forEach(knownAdapters, (fn, value) => { + if (fn) { + try { + Object.defineProperty(fn, 'name', {value}); + } catch (e) { + // eslint-disable-next-line no-empty } + Object.defineProperty(fn, 'adapterName', {value}); + } +}); - // do rsa decryption w/o any decoding - var d = pki.rsa.decrypt(data, key, false, false); +const renderReason = (reason) => `- ${reason}`; - if(scheme === 'RSAES-PKCS1-V1_5') { - scheme = {decode: _decodePkcs1_v1_5}; - } else if(scheme === 'RSA-OAEP' || scheme === 'RSAES-OAEP') { - scheme = { - decode: function(d, key) { - return forge.pkcs1.decode_rsa_oaep(key, d, schemeOptions); +const isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false; + +/* harmony default export */ const adapters = ({ + getAdapter: (adapters) => { + adapters = utils.isArray(adapters) ? adapters : [adapters]; + + const {length} = adapters; + let nameOrAdapter; + let adapter; + + const rejectedReasons = {}; + + for (let i = 0; i < length; i++) { + nameOrAdapter = adapters[i]; + let id; + + adapter = nameOrAdapter; + + if (!isResolvedHandle(nameOrAdapter)) { + adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()]; + + if (adapter === undefined) { + throw new core_AxiosError(`Unknown adapter '${id}'`); } - }; - } else if(['RAW', 'NONE', 'NULL', null].indexOf(scheme) !== -1) { - scheme = {decode: function(d) {return d;}}; - } else { - throw new Error('Unsupported encryption scheme: "' + scheme + '".'); + } + + if (adapter) { + break; + } + + rejectedReasons[id || '#' + i] = adapter; } - // decode according to scheme - return scheme.decode(d, key, false); - }; + if (!adapter) { - /** - * Signs the given digest, producing a signature. - * - * PKCS#1 supports multiple (currently two) signature schemes: - * RSASSA-PKCS1-V1_5 and RSASSA-PSS. - * - * By default this implementation uses the "old scheme", i.e. - * RSASSA-PKCS1-V1_5. In order to generate a PSS signature, provide - * an instance of Forge PSS object as the scheme parameter. - * - * @param md the message digest object with the hash to sign. - * @param scheme the signature scheme to use: - * 'RSASSA-PKCS1-V1_5' or undefined for RSASSA PKCS#1 v1.5, - * a Forge PSS object for RSASSA-PSS, - * 'NONE' or null for none, DigestInfo will not be used but - * PKCS#1 v1.5 padding will still be used. - * - * @return the signature as a byte string. - */ - key.sign = function(md, scheme) { - /* Note: The internal implementation of RSA operations is being - transitioned away from a PKCS#1 v1.5 hard-coded scheme. Some legacy - code like the use of an encoding block identifier 'bt' will eventually - be removed. */ + const reasons = Object.entries(rejectedReasons) + .map(([id, state]) => `adapter ${id} ` + + (state === false ? 'is not supported by the environment' : 'is not available in the build') + ); - // private key operation - var bt = false; + let s = length ? + (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) : + 'as no adapter specified'; - if(typeof scheme === 'string') { - scheme = scheme.toUpperCase(); + throw new core_AxiosError( + `There is no suitable adapter to dispatch the request ` + s, + 'ERR_NOT_SUPPORT' + ); } - if(scheme === undefined || scheme === 'RSASSA-PKCS1-V1_5') { - scheme = {encode: emsaPkcs1v15encode}; - bt = 0x01; - } else if(scheme === 'NONE' || scheme === 'NULL' || scheme === null) { - scheme = {encode: function() {return md;}}; - bt = 0x01; - } + return adapter; + }, + adapters: knownAdapters +}); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/core/dispatchRequest.js + + + + + + - // encode and then encrypt - var d = scheme.encode(md, key.n.bitLength()); - return pki.rsa.encrypt(d, key, bt); - }; - return key; -}; /** - * Wraps an RSAPrivateKey ASN.1 object in an ASN.1 PrivateKeyInfo object. + * Throws a `CanceledError` if cancellation has been requested. * - * @param rsaKey the ASN.1 RSAPrivateKey. + * @param {Object} config The config that is to be used for the request * - * @return the ASN.1 PrivateKeyInfo. + * @returns {void} */ -pki.wrapRsaPrivateKey = function(rsaKey) { - // PrivateKeyInfo - return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // version (0) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - asn1.integerToDer(0).getBytes()), - // privateKeyAlgorithm - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - asn1.create( - asn1.Class.UNIVERSAL, asn1.Type.OID, false, - asn1.oidToDer(pki.oids.rsaEncryption).getBytes()), - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '') - ]), - // PrivateKey - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false, - asn1.toDer(rsaKey).getBytes()) - ]); -}; +function throwIfCancellationRequested(config) { + if (config.cancelToken) { + config.cancelToken.throwIfRequested(); + } + + if (config.signal && config.signal.aborted) { + throw new cancel_CanceledError(null, config); + } +} /** - * Converts a private key from an ASN.1 object. + * Dispatch a request to the server using the configured adapter. * - * @param obj the ASN.1 representation of a PrivateKeyInfo containing an - * RSAPrivateKey or an RSAPrivateKey. + * @param {object} config The config that is to be used for the request * - * @return the private key. + * @returns {Promise} The Promise to be fulfilled */ -pki.privateKeyFromAsn1 = function(obj) { - // get PrivateKeyInfo - var capture = {}; - var errors = []; - if(asn1.validate(obj, privateKeyValidator, capture, errors)) { - obj = asn1.fromDer(forge.util.createBuffer(capture.privateKey)); - } +function dispatchRequest(config) { + throwIfCancellationRequested(config); - // get RSAPrivateKey - capture = {}; - errors = []; - if(!asn1.validate(obj, rsaPrivateKeyValidator, capture, errors)) { - var error = new Error('Cannot read private key. ' + - 'ASN.1 object does not contain an RSAPrivateKey.'); - error.errors = errors; - throw error; + config.headers = core_AxiosHeaders.from(config.headers); + + // Transform request data + config.data = transformData.call( + config, + config.transformRequest + ); + + if (['post', 'put', 'patch'].indexOf(config.method) !== -1) { + config.headers.setContentType('application/x-www-form-urlencoded', false); } - // Note: Version is currently ignored. - // capture.privateKeyVersion - // FIXME: inefficient, get a BigInteger that uses byte strings - var n, e, d, p, q, dP, dQ, qInv; - n = forge.util.createBuffer(capture.privateKeyModulus).toHex(); - e = forge.util.createBuffer(capture.privateKeyPublicExponent).toHex(); - d = forge.util.createBuffer(capture.privateKeyPrivateExponent).toHex(); - p = forge.util.createBuffer(capture.privateKeyPrime1).toHex(); - q = forge.util.createBuffer(capture.privateKeyPrime2).toHex(); - dP = forge.util.createBuffer(capture.privateKeyExponent1).toHex(); - dQ = forge.util.createBuffer(capture.privateKeyExponent2).toHex(); - qInv = forge.util.createBuffer(capture.privateKeyCoefficient).toHex(); + const adapter = adapters.getAdapter(config.adapter || lib_defaults.adapter); - // set private key - return pki.setRsaPrivateKey( - new BigInteger(n, 16), - new BigInteger(e, 16), - new BigInteger(d, 16), - new BigInteger(p, 16), - new BigInteger(q, 16), - new BigInteger(dP, 16), - new BigInteger(dQ, 16), - new BigInteger(qInv, 16)); -}; + return adapter(config).then(function onAdapterResolution(response) { + throwIfCancellationRequested(config); -/** - * Converts a private key to an ASN.1 RSAPrivateKey. - * - * @param key the private key. - * - * @return the ASN.1 representation of an RSAPrivateKey. - */ -pki.privateKeyToAsn1 = pki.privateKeyToRSAPrivateKey = function(key) { - // RSAPrivateKey - return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // version (0 = only 2 primes, 1 multiple primes) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - asn1.integerToDer(0).getBytes()), - // modulus (n) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.n)), - // publicExponent (e) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.e)), - // privateExponent (d) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.d)), - // privateKeyPrime1 (p) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.p)), - // privateKeyPrime2 (q) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.q)), - // privateKeyExponent1 (dP) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.dP)), - // privateKeyExponent2 (dQ) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.dQ)), - // coefficient (qInv) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.qInv)) - ]); -}; + // Transform response data + response.data = transformData.call( + config, + config.transformResponse, + response + ); + + response.headers = core_AxiosHeaders.from(response.headers); + + return response; + }, function onAdapterRejection(reason) { + if (!isCancel(reason)) { + throwIfCancellationRequested(config); + + // Transform response data + if (reason && reason.response) { + reason.response.data = transformData.call( + config, + config.transformResponse, + reason.response + ); + reason.response.headers = core_AxiosHeaders.from(reason.response.headers); + } + } + + return Promise.reject(reason); + }); +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/core/mergeConfig.js + + + + + +const headersToObject = (thing) => thing instanceof core_AxiosHeaders ? thing.toJSON() : thing; /** - * Converts a public key from an ASN.1 SubjectPublicKeyInfo or RSAPublicKey. + * Config-specific merge-function which creates a new config-object + * by merging two configuration objects together. * - * @param obj the asn1 representation of a SubjectPublicKeyInfo or RSAPublicKey. + * @param {Object} config1 + * @param {Object} config2 * - * @return the public key. + * @returns {Object} New object resulting from merging config2 to config1 */ -pki.publicKeyFromAsn1 = function(obj) { - // get SubjectPublicKeyInfo - var capture = {}; - var errors = []; - if(asn1.validate(obj, publicKeyValidator, capture, errors)) { - // get oid - var oid = asn1.derToOid(capture.publicKeyOid); - if(oid !== pki.oids.rsaEncryption) { - var error = new Error('Cannot read public key. Unknown OID.'); - error.oid = oid; - throw error; +function mergeConfig(config1, config2) { + // eslint-disable-next-line no-param-reassign + config2 = config2 || {}; + const config = {}; + + function getMergedValue(target, source, caseless) { + if (utils.isPlainObject(target) && utils.isPlainObject(source)) { + return utils.merge.call({caseless}, target, source); + } else if (utils.isPlainObject(source)) { + return utils.merge({}, source); + } else if (utils.isArray(source)) { + return source.slice(); } - obj = capture.rsaPublicKey; + return source; } - // get RSA params - errors = []; - if(!asn1.validate(obj, rsaPublicKeyValidator, capture, errors)) { - var error = new Error('Cannot read public key. ' + - 'ASN.1 object does not contain an RSAPublicKey.'); - error.errors = errors; - throw error; + // eslint-disable-next-line consistent-return + function mergeDeepProperties(a, b, caseless) { + if (!utils.isUndefined(b)) { + return getMergedValue(a, b, caseless); + } else if (!utils.isUndefined(a)) { + return getMergedValue(undefined, a, caseless); + } } - // FIXME: inefficient, get a BigInteger that uses byte strings - var n = forge.util.createBuffer(capture.publicKeyModulus).toHex(); - var e = forge.util.createBuffer(capture.publicKeyExponent).toHex(); + // eslint-disable-next-line consistent-return + function valueFromConfig2(a, b) { + if (!utils.isUndefined(b)) { + return getMergedValue(undefined, b); + } + } - // set public key - return pki.setRsaPublicKey( - new BigInteger(n, 16), - new BigInteger(e, 16)); -}; + // eslint-disable-next-line consistent-return + function defaultToConfig2(a, b) { + if (!utils.isUndefined(b)) { + return getMergedValue(undefined, b); + } else if (!utils.isUndefined(a)) { + return getMergedValue(undefined, a); + } + } -/** - * Converts a public key to an ASN.1 SubjectPublicKeyInfo. - * - * @param key the public key. - * - * @return the asn1 representation of a SubjectPublicKeyInfo. - */ -pki.publicKeyToAsn1 = pki.publicKeyToSubjectPublicKeyInfo = function(key) { - // SubjectPublicKeyInfo - return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // AlgorithmIdentifier - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // algorithm - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false, - asn1.oidToDer(pki.oids.rsaEncryption).getBytes()), - // parameters (null) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '') - ]), - // subjectPublicKey - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, [ - pki.publicKeyToRSAPublicKey(key) - ]) - ]); -}; + // eslint-disable-next-line consistent-return + function mergeDirectKeys(a, b, prop) { + if (prop in config2) { + return getMergedValue(a, b); + } else if (prop in config1) { + return getMergedValue(undefined, a); + } + } + + const mergeMap = { + url: valueFromConfig2, + method: valueFromConfig2, + data: valueFromConfig2, + baseURL: defaultToConfig2, + transformRequest: defaultToConfig2, + transformResponse: defaultToConfig2, + paramsSerializer: defaultToConfig2, + timeout: defaultToConfig2, + timeoutMessage: defaultToConfig2, + withCredentials: defaultToConfig2, + withXSRFToken: defaultToConfig2, + adapter: defaultToConfig2, + responseType: defaultToConfig2, + xsrfCookieName: defaultToConfig2, + xsrfHeaderName: defaultToConfig2, + onUploadProgress: defaultToConfig2, + onDownloadProgress: defaultToConfig2, + decompress: defaultToConfig2, + maxContentLength: defaultToConfig2, + maxBodyLength: defaultToConfig2, + beforeRedirect: defaultToConfig2, + transport: defaultToConfig2, + httpAgent: defaultToConfig2, + httpsAgent: defaultToConfig2, + cancelToken: defaultToConfig2, + socketPath: defaultToConfig2, + responseEncoding: defaultToConfig2, + validateStatus: mergeDirectKeys, + headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true) + }; + + utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) { + const merge = mergeMap[prop] || mergeDeepProperties; + const configValue = merge(config1[prop], config2[prop], prop); + (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue); + }); + + return config; +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/validator.js + + + + + +const validators = {}; + +// eslint-disable-next-line func-names +['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => { + validators[type] = function validator(thing) { + return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type; + }; +}); + +const deprecatedWarnings = {}; /** - * Converts a public key to an ASN.1 RSAPublicKey. + * Transitional option validator * - * @param key the public key. + * @param {function|boolean?} validator - set to false if the transitional option has been removed + * @param {string?} version - deprecated version / removed since version + * @param {string?} message - some message with additional info * - * @return the asn1 representation of a RSAPublicKey. + * @returns {function} */ -pki.publicKeyToRSAPublicKey = function(key) { - // RSAPublicKey - return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [ - // modulus (n) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.n)), - // publicExponent (e) - asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false, - _bnToBytes(key.e)) - ]); +validators.transitional = function transitional(validator, version, message) { + function formatMessage(opt, desc) { + return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : ''); + } + + // eslint-disable-next-line func-names + return (value, opt, opts) => { + if (validator === false) { + throw new core_AxiosError( + formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), + core_AxiosError.ERR_DEPRECATED + ); + } + + if (version && !deprecatedWarnings[opt]) { + deprecatedWarnings[opt] = true; + // eslint-disable-next-line no-console + console.warn( + formatMessage( + opt, + ' has been deprecated since v' + version + ' and will be removed in the near future' + ) + ); + } + + return validator ? validator(value, opt, opts) : true; + }; }; /** - * Encodes a message using PKCS#1 v1.5 padding. + * Assert object's properties type * - * @param m the message to encode. - * @param key the RSA key to use. - * @param bt the block type to use, i.e. either 0x01 (for signing) or 0x02 - * (for encryption). + * @param {object} options + * @param {object} schema + * @param {boolean?} allowUnknown * - * @return the padded byte buffer. + * @returns {object} */ -function _encodePkcs1_v1_5(m, key, bt) { - var eb = forge.util.createBuffer(); - - // get the length of the modulus in bytes - var k = Math.ceil(key.n.bitLength() / 8); - /* use PKCS#1 v1.5 padding */ - if(m.length > (k - 11)) { - var error = new Error('Message is too long for PKCS#1 v1.5 padding.'); - error.length = m.length; - error.max = k - 11; - throw error; +function assertOptions(options, schema, allowUnknown) { + if (typeof options !== 'object') { + throw new core_AxiosError('options must be an object', core_AxiosError.ERR_BAD_OPTION_VALUE); + } + const keys = Object.keys(options); + let i = keys.length; + while (i-- > 0) { + const opt = keys[i]; + const validator = schema[opt]; + if (validator) { + const value = options[opt]; + const result = value === undefined || validator(value, opt, options); + if (result !== true) { + throw new core_AxiosError('option ' + opt + ' must be ' + result, core_AxiosError.ERR_BAD_OPTION_VALUE); + } + continue; + } + if (allowUnknown !== true) { + throw new core_AxiosError('Unknown option ' + opt, core_AxiosError.ERR_BAD_OPTION); + } } +} - /* A block type BT, a padding string PS, and the data D shall be - formatted into an octet string EB, the encryption block: +/* harmony default export */ const validator = ({ + assertOptions, + validators +}); - EB = 00 || BT || PS || 00 || D +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/core/Axios.js - The block type BT shall be a single octet indicating the structure of - the encryption block. For this version of the document it shall have - value 00, 01, or 02. For a private-key operation, the block type - shall be 00 or 01. For a public-key operation, it shall be 02. - The padding string PS shall consist of k-3-||D|| octets. For block - type 00, the octets shall have value 00; for block type 01, they - shall have value FF; and for block type 02, they shall be - pseudorandomly generated and nonzero. This makes the length of the - encryption block EB equal to k. */ - // build the encryption block - eb.putByte(0x00); - eb.putByte(bt); - // create the padding - var padNum = k - 3 - m.length; - var padByte; - // private key op - if(bt === 0x00 || bt === 0x01) { - padByte = (bt === 0x00) ? 0x00 : 0xFF; - for(var i = 0; i < padNum; ++i) { - eb.putByte(padByte); - } - } else { - // public key op - // pad with random non-zero values - while(padNum > 0) { - var numZeros = 0; - var padBytes = forge.random.getBytes(padNum); - for(var i = 0; i < padNum; ++i) { - padByte = padBytes.charCodeAt(i); - if(padByte === 0) { - ++numZeros; - } else { - eb.putByte(padByte); - } - } - padNum = numZeros; - } - } - // zero followed by message - eb.putByte(0x00); - eb.putBytes(m); - return eb; -} + + + + + +const Axios_validators = validator.validators; /** - * Decodes a message using PKCS#1 v1.5 padding. + * Create a new instance of Axios * - * @param em the message to decode. - * @param key the RSA key to use. - * @param pub true if the key is a public key, false if it is private. - * @param ml the message length, if specified. + * @param {Object} instanceConfig The default config for the instance * - * @return the decoded bytes. + * @return {Axios} A new instance of Axios */ -function _decodePkcs1_v1_5(em, key, pub, ml) { - // get the length of the modulus in bytes - var k = Math.ceil(key.n.bitLength() / 8); - - /* It is an error if any of the following conditions occurs: +class Axios { + constructor(instanceConfig) { + this.defaults = instanceConfig; + this.interceptors = { + request: new core_InterceptorManager(), + response: new core_InterceptorManager() + }; + } - 1. The encryption block EB cannot be parsed unambiguously. - 2. The padding string PS consists of fewer than eight octets - or is inconsisent with the block type BT. - 3. The decryption process is a public-key operation and the block - type BT is not 00 or 01, or the decryption process is a - private-key operation and the block type is not 02. + /** + * Dispatch a request + * + * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) + * @param {?Object} config + * + * @returns {Promise} The Promise to be fulfilled */ + request(configOrUrl, config) { + /*eslint no-param-reassign:0*/ + // Allow for axios('example/url'[, config]) a la fetch API + if (typeof configOrUrl === 'string') { + config = config || {}; + config.url = configOrUrl; + } else { + config = configOrUrl || {}; + } - // parse the encryption block - var eb = forge.util.createBuffer(em); - var first = eb.getByte(); - var bt = eb.getByte(); - if(first !== 0x00 || - (pub && bt !== 0x00 && bt !== 0x01) || - (!pub && bt != 0x02) || - (pub && bt === 0x00 && typeof(ml) === 'undefined')) { - throw new Error('Encryption block is invalid.'); - } + config = mergeConfig(this.defaults, config); - var padNum = 0; - if(bt === 0x00) { - // check all padding bytes for 0x00 - padNum = k - 3 - ml; - for(var i = 0; i < padNum; ++i) { - if(eb.getByte() !== 0x00) { - throw new Error('Encryption block is invalid.'); + const {transitional, paramsSerializer, headers} = config; + + if (transitional !== undefined) { + validator.assertOptions(transitional, { + silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean), + forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean), + clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean) + }, false); + } + + if (paramsSerializer != null) { + if (utils.isFunction(paramsSerializer)) { + config.paramsSerializer = { + serialize: paramsSerializer + } + } else { + validator.assertOptions(paramsSerializer, { + encode: Axios_validators.function, + serialize: Axios_validators.function + }, true); } } - } else if(bt === 0x01) { - // find the first byte that isn't 0xFF, should be after all padding - padNum = 0; - while(eb.length() > 1) { - if(eb.getByte() !== 0xFF) { - --eb.read; - break; + + // Set config.method + config.method = (config.method || this.defaults.method || 'get').toLowerCase(); + + // Flatten headers + let contextHeaders = headers && utils.merge( + headers.common, + headers[config.method] + ); + + headers && utils.forEach( + ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], + (method) => { + delete headers[method]; } - ++padNum; + ); + + config.headers = core_AxiosHeaders.concat(contextHeaders, headers); + + // filter out skipped interceptors + const requestInterceptorChain = []; + let synchronousRequestInterceptors = true; + this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { + if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) { + return; + } + + synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous; + + requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected); + }); + + const responseInterceptorChain = []; + this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { + responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected); + }); + + let promise; + let i = 0; + let len; + + if (!synchronousRequestInterceptors) { + const chain = [dispatchRequest.bind(this), undefined]; + chain.unshift.apply(chain, requestInterceptorChain); + chain.push.apply(chain, responseInterceptorChain); + len = chain.length; + + promise = Promise.resolve(config); + + while (i < len) { + promise = promise.then(chain[i++], chain[i++]); + } + + return promise; } - } else if(bt === 0x02) { - // look for 0x00 byte - padNum = 0; - while(eb.length() > 1) { - if(eb.getByte() === 0x00) { - --eb.read; + + len = requestInterceptorChain.length; + + let newConfig = config; + + i = 0; + + while (i < len) { + const onFulfilled = requestInterceptorChain[i++]; + const onRejected = requestInterceptorChain[i++]; + try { + newConfig = onFulfilled(newConfig); + } catch (error) { + onRejected.call(this, error); break; } - ++padNum; } - } - // zero must be 0x00 and padNum must be (k - 3 - message length) - var zero = eb.getByte(); - if(zero !== 0x00 || padNum !== (k - 3 - eb.length())) { - throw new Error('Encryption block is invalid.'); + try { + promise = dispatchRequest.call(this, newConfig); + } catch (error) { + return Promise.reject(error); + } + + i = 0; + len = responseInterceptorChain.length; + + while (i < len) { + promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]); + } + + return promise; } - return eb.getBytes(); + getUri(config) { + config = mergeConfig(this.defaults, config); + const fullPath = buildFullPath(config.baseURL, config.url); + return buildURL(fullPath, config.params, config.paramsSerializer); + } } +// Provide aliases for supported request methods +utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { + /*eslint func-names:0*/ + Axios.prototype[method] = function(url, config) { + return this.request(mergeConfig(config || {}, { + method, + url, + data: (config || {}).data + })); + }; +}); + +utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { + /*eslint func-names:0*/ + + function generateHTTPMethod(isForm) { + return function httpMethod(url, data, config) { + return this.request(mergeConfig(config || {}, { + method, + headers: isForm ? { + 'Content-Type': 'multipart/form-data' + } : {}, + url, + data + })); + }; + } + + Axios.prototype[method] = generateHTTPMethod(); + + Axios.prototype[method + 'Form'] = generateHTTPMethod(true); +}); + +/* harmony default export */ const core_Axios = (Axios); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/cancel/CancelToken.js + + + + /** - * Runs the key-generation algorithm asynchronously, either in the background - * via Web Workers, or using the main thread and setImmediate. + * A `CancelToken` is an object that can be used to request cancellation of an operation. * - * @param state the key-pair generation state. - * @param [options] options for key-pair generation: - * workerScript the worker script URL. - * workers the number of web workers (if supported) to use, - * (default: 2, -1 to use estimated cores minus one). - * workLoad the size of the work load, ie: number of possible prime - * numbers for each web worker to check per work assignment, - * (default: 100). - * @param callback(err, keypair) called once the operation completes. + * @param {Function} executor The executor function. + * + * @returns {CancelToken} */ -function _generateKeyPair(state, options, callback) { - if(typeof options === 'function') { - callback = options; - options = {}; - } - options = options || {}; - - var opts = { - algorithm: { - name: options.algorithm || 'PRIMEINC', - options: { - workers: options.workers || 2, - workLoad: options.workLoad || 100, - workerScript: options.workerScript - } +class CancelToken { + constructor(executor) { + if (typeof executor !== 'function') { + throw new TypeError('executor must be a function.'); } - }; - if('prng' in options) { - opts.prng = options.prng; - } - generate(); + let resolvePromise; - function generate() { - // find p and then q (done in series to simplify) - getPrime(state.pBits, function(err, num) { - if(err) { - return callback(err); - } - state.p = num; - if(state.q !== null) { - return finish(err, state.q); + this.promise = new Promise(function promiseExecutor(resolve) { + resolvePromise = resolve; + }); + + const token = this; + + // eslint-disable-next-line func-names + this.promise.then(cancel => { + if (!token._listeners) return; + + let i = token._listeners.length; + + while (i-- > 0) { + token._listeners[i](cancel); } - getPrime(state.qBits, finish); + token._listeners = null; }); - } - function getPrime(bits, callback) { - forge.prime.generateProbablePrime(bits, opts, callback); - } + // eslint-disable-next-line func-names + this.promise.then = onfulfilled => { + let _resolve; + // eslint-disable-next-line func-names + const promise = new Promise(resolve => { + token.subscribe(resolve); + _resolve = resolve; + }).then(onfulfilled); + + promise.cancel = function reject() { + token.unsubscribe(_resolve); + }; - function finish(err, num) { - if(err) { - return callback(err); - } + return promise; + }; + + executor(function cancel(message, config, request) { + if (token.reason) { + // Cancellation has already been requested + return; + } - // set q - state.q = num; + token.reason = new cancel_CanceledError(message, config, request); + resolvePromise(token.reason); + }); + } - // ensure p is larger than q (swap them if not) - if(state.p.compareTo(state.q) < 0) { - var tmp = state.p; - state.p = state.q; - state.q = tmp; + /** + * Throws a `CanceledError` if cancellation has been requested. + */ + throwIfRequested() { + if (this.reason) { + throw this.reason; } + } - // ensure p is coprime with e - if(state.p.subtract(BigInteger.ONE).gcd(state.e) - .compareTo(BigInteger.ONE) !== 0) { - state.p = null; - generate(); + /** + * Subscribe to the cancel signal + */ + + subscribe(listener) { + if (this.reason) { + listener(this.reason); return; } - // ensure q is coprime with e - if(state.q.subtract(BigInteger.ONE).gcd(state.e) - .compareTo(BigInteger.ONE) !== 0) { - state.q = null; - getPrime(state.qBits, finish); - return; + if (this._listeners) { + this._listeners.push(listener); + } else { + this._listeners = [listener]; } + } - // compute phi: (p - 1)(q - 1) (Euler's totient function) - state.p1 = state.p.subtract(BigInteger.ONE); - state.q1 = state.q.subtract(BigInteger.ONE); - state.phi = state.p1.multiply(state.q1); + /** + * Unsubscribe from the cancel signal + */ - // ensure e and phi are coprime - if(state.phi.gcd(state.e).compareTo(BigInteger.ONE) !== 0) { - // phi and e aren't coprime, so generate a new p and q - state.p = state.q = null; - generate(); + unsubscribe(listener) { + if (!this._listeners) { return; } - - // create n, ensure n is has the right number of bits - state.n = state.p.multiply(state.q); - if(state.n.bitLength() !== state.bits) { - // failed, get new q - state.q = null; - getPrime(state.qBits, finish); - return; + const index = this._listeners.indexOf(listener); + if (index !== -1) { + this._listeners.splice(index, 1); } + } - // set keys - var d = state.e.modInverse(state.phi); - state.keys = { - privateKey: pki.rsa.setPrivateKey( - state.n, state.e, d, state.p, state.q, - d.mod(state.p1), d.mod(state.q1), - state.q.modInverse(state.p)), - publicKey: pki.rsa.setPublicKey(state.n, state.e) + /** + * Returns an object that contains a new `CancelToken` and a function that, when called, + * cancels the `CancelToken`. + */ + static source() { + let cancel; + const token = new CancelToken(function executor(c) { + cancel = c; + }); + return { + token, + cancel }; - - callback(null, state.keys); } } -/** - * Converts a positive BigInteger into 2's-complement big-endian bytes. - * - * @param b the big integer to convert. - * - * @return the bytes. - */ -function _bnToBytes(b) { - // prepend 0x00 if first byte >= 0x80 - var hex = b.toString(16); - if(hex[0] >= '8') { - hex = '00' + hex; - } - var bytes = forge.util.hexToBytes(hex); +/* harmony default export */ const cancel_CancelToken = (CancelToken); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/spread.js - // ensure integer is minimally-encoded - if(bytes.length > 1 && - // leading 0x00 for positive integer - ((bytes.charCodeAt(0) === 0 && - (bytes.charCodeAt(1) & 0x80) === 0) || - // leading 0xFF for negative integer - (bytes.charCodeAt(0) === 0xFF && - (bytes.charCodeAt(1) & 0x80) === 0x80))) { - return bytes.substr(1); - } - return bytes; -} /** - * Returns the required number of Miller-Rabin tests to generate a - * prime with an error probability of (1/2)^80. + * Syntactic sugar for invoking a function and expanding an array for arguments. * - * See Handbook of Applied Cryptography Chapter 4, Table 4.4. + * Common use case would be to use `Function.prototype.apply`. * - * @param bits the bit size. + * ```js + * function f(x, y, z) {} + * var args = [1, 2, 3]; + * f.apply(null, args); + * ``` * - * @return the required number of iterations. + * With `spread` this example can be re-written. + * + * ```js + * spread(function(x, y, z) {})([1, 2, 3]); + * ``` + * + * @param {Function} callback + * + * @returns {Function} */ -function _getMillerRabinTests(bits) { - if(bits <= 100) return 27; - if(bits <= 150) return 18; - if(bits <= 200) return 15; - if(bits <= 250) return 12; - if(bits <= 300) return 9; - if(bits <= 350) return 8; - if(bits <= 400) return 7; - if(bits <= 500) return 6; - if(bits <= 600) return 5; - if(bits <= 800) return 4; - if(bits <= 1250) return 3; - return 2; +function spread(callback) { + return function wrap(arr) { + return callback.apply(null, arr); + }; } +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/isAxiosError.js + + + + /** - * Performs feature detection on the Node crypto interface. + * Determines whether the payload is an error thrown by Axios * - * @param fn the feature (function) to detect. + * @param {*} payload The value to test * - * @return true if detected, false if not. + * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false */ -function _detectNodeCrypto(fn) { - return forge.util.isNodejs && typeof _crypto[fn] === 'function'; -} +function isAxiosError(payload) { + return utils.isObject(payload) && (payload.isAxiosError === true); +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/helpers/HttpStatusCode.js +const HttpStatusCode = { + Continue: 100, + SwitchingProtocols: 101, + Processing: 102, + EarlyHints: 103, + Ok: 200, + Created: 201, + Accepted: 202, + NonAuthoritativeInformation: 203, + NoContent: 204, + ResetContent: 205, + PartialContent: 206, + MultiStatus: 207, + AlreadyReported: 208, + ImUsed: 226, + MultipleChoices: 300, + MovedPermanently: 301, + Found: 302, + SeeOther: 303, + NotModified: 304, + UseProxy: 305, + Unused: 306, + TemporaryRedirect: 307, + PermanentRedirect: 308, + BadRequest: 400, + Unauthorized: 401, + PaymentRequired: 402, + Forbidden: 403, + NotFound: 404, + MethodNotAllowed: 405, + NotAcceptable: 406, + ProxyAuthenticationRequired: 407, + RequestTimeout: 408, + Conflict: 409, + Gone: 410, + LengthRequired: 411, + PreconditionFailed: 412, + PayloadTooLarge: 413, + UriTooLong: 414, + UnsupportedMediaType: 415, + RangeNotSatisfiable: 416, + ExpectationFailed: 417, + ImATeapot: 418, + MisdirectedRequest: 421, + UnprocessableEntity: 422, + Locked: 423, + FailedDependency: 424, + TooEarly: 425, + UpgradeRequired: 426, + PreconditionRequired: 428, + TooManyRequests: 429, + RequestHeaderFieldsTooLarge: 431, + UnavailableForLegalReasons: 451, + InternalServerError: 500, + NotImplemented: 501, + BadGateway: 502, + ServiceUnavailable: 503, + GatewayTimeout: 504, + HttpVersionNotSupported: 505, + VariantAlsoNegotiates: 506, + InsufficientStorage: 507, + LoopDetected: 508, + NotExtended: 510, + NetworkAuthenticationRequired: 511, +}; + +Object.entries(HttpStatusCode).forEach(([key, value]) => { + HttpStatusCode[value] = key; +}); + +/* harmony default export */ const helpers_HttpStatusCode = (HttpStatusCode); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/axios/lib/axios.js + + + + + + + + + + + + + + + + + + + /** - * Performs feature detection on the SubtleCrypto interface. + * Create an instance of Axios * - * @param fn the feature (function) to detect. + * @param {Object} defaultConfig The default config for the instance * - * @return true if detected, false if not. + * @returns {Axios} A new instance of Axios */ -function _detectSubtleCrypto(fn) { - return (typeof util.globalScope !== 'undefined' && - typeof util.globalScope.crypto === 'object' && - typeof util.globalScope.crypto.subtle === 'object' && - typeof util.globalScope.crypto.subtle[fn] === 'function'); +function createInstance(defaultConfig) { + const context = new core_Axios(defaultConfig); + const instance = bind(core_Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, core_Axios.prototype, context, {allOwnKeys: true}); + + // Copy context to instance + utils.extend(instance, context, null, {allOwnKeys: true}); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +const axios_axios = createInstance(lib_defaults); + +// Expose Axios class to allow class inheritance +axios_axios.Axios = core_Axios; + +// Expose Cancel & CancelToken +axios_axios.CanceledError = cancel_CanceledError; +axios_axios.CancelToken = cancel_CancelToken; +axios_axios.isCancel = isCancel; +axios_axios.VERSION = VERSION; +axios_axios.toFormData = helpers_toFormData; + +// Expose AxiosError class +axios_axios.AxiosError = core_AxiosError; + +// alias for CanceledError for backward compatibility +axios_axios.Cancel = axios_axios.CanceledError; + +// Expose all/spread +axios_axios.all = function all(promises) { + return Promise.all(promises); +}; + +axios_axios.spread = spread; + +// Expose isAxiosError +axios_axios.isAxiosError = isAxiosError; + +// Expose mergeConfig +axios_axios.mergeConfig = mergeConfig; + +axios_axios.AxiosHeaders = core_AxiosHeaders; + +axios_axios.formToJSON = thing => helpers_formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing); + +axios_axios.getAdapter = adapters.getAdapter; + +axios_axios.HttpStatusCode = helpers_HttpStatusCode; + +axios_axios.default = axios_axios; + +// this module should only have a default export +/* harmony default export */ const lib_axios = (axios_axios); + +// EXTERNAL MODULE: ./node_modules/@aws-sdk/lib-storage/dist-cjs/index.js +var lib_storage_dist_cjs = __nccwpck_require__(20488); +// EXTERNAL MODULE: external "fs" +var external_fs_ = __nccwpck_require__(57147); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function sdk_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str + } + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch + } + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + } } +var sdk_node_modules_multiformats_vendor_base_x_src = sdk_node_modules_multiformats_vendor_base_x_base; + +var sdk_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = sdk_node_modules_multiformats_vendor_base_x_src; + +/* harmony default export */ const sdk_node_modules_multiformats_vendor_base_x = (sdk_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/multiformats/src/bytes.js +const sdk_node_modules_multiformats_src_bytes_empty = new Uint8Array(0) /** - * Performs feature detection on the deprecated Microsoft Internet Explorer - * outdated SubtleCrypto interface. This function should only be used after - * checking for the modern, standard SubtleCrypto interface. - * - * @param fn the feature (function) to detect. - * - * @return true if detected, false if not. + * @param {Uint8Array} d */ -function _detectSubtleMsCrypto(fn) { - return (typeof util.globalScope !== 'undefined' && - typeof util.globalScope.msCrypto === 'object' && - typeof util.globalScope.msCrypto.subtle === 'object' && - typeof util.globalScope.msCrypto.subtle[fn] === 'function'); +const sdk_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') + +/** + * @param {string} hex + */ +const sdk_node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : sdk_node_modules_multiformats_src_bytes_empty } -function _intToUint8Array(x) { - var bytes = forge.util.hexToBytes(x.toString(16)); - var buffer = new Uint8Array(bytes.length); - for(var i = 0; i < bytes.length; ++i) { - buffer[i] = bytes.charCodeAt(i); +/** + * @param {Uint8Array} aa + * @param {Uint8Array} bb + */ +const sdk_node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false } - return buffer; -} -function _privateKeyFromJwk(jwk) { - if(jwk.kty !== 'RSA') { - throw new Error( - 'Unsupported key algorithm "' + jwk.kty + '"; algorithm must be "RSA".'); + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false + } } - return pki.setRsaPrivateKey( - _base64ToBigInt(jwk.n), - _base64ToBigInt(jwk.e), - _base64ToBigInt(jwk.d), - _base64ToBigInt(jwk.p), - _base64ToBigInt(jwk.q), - _base64ToBigInt(jwk.dp), - _base64ToBigInt(jwk.dq), - _base64ToBigInt(jwk.qi)); + + return true } -function _publicKeyFromJwk(jwk) { - if(jwk.kty !== 'RSA') { - throw new Error('Key algorithm must be "RSA".'); +/** + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} + */ +const sdk_node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) } - return pki.setRsaPublicKey( - _base64ToBigInt(jwk.n), - _base64ToBigInt(jwk.e)); + throw new Error('Unknown type, must be binary type') } -function _base64ToBigInt(b64) { - return new BigInteger(forge.util.bytesToHex(forge.util.decode64(b64)), 16); -} +/** + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} + */ +const sdk_node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) +/** + * @param {string} str + * @returns {Uint8Array} + */ +const sdk_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) -/***/ }), +/** + * @param {Uint8Array} b + * @returns {string} + */ +const sdk_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) + + + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/multiformats/src/bases/base.js + + +// Linter can't see that API is used in types. +// eslint-disable-next-line -/***/ 41447: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { /** - * Secure Hash Algorithm with 160-bit digest (SHA-1) implementation. - * - * @author Dave Longley + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. * - * Copyright (c) 2010-2015 Digital Bazaar, Inc. + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(80554); -__nccwpck_require__(36536); +class sdk_node_modules_multiformats_src_bases_base_Encoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + */ + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + } -var sha1 = module.exports = forge.sha1 = forge.sha1 || {}; -forge.md.sha1 = forge.md.algorithms.sha1 = sha1; + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') + } + } +} /** - * Creates a SHA-1 message digest object. + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. * - * @return a message digest object. + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} */ -sha1.create = function() { - // do initialization as necessary - if(!_initialized) { - _init(); +class sdk_node_modules_multiformats_src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') + } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode } - // SHA-1 state contains five 32-bit integers - var _state = null; - - // input buffer - var _input = forge.util.createBuffer(); + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) + } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') + } + } - // used for word storage - var _w = new Array(80); + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return sdk_node_modules_multiformats_src_bases_base_or(this, decoder) + } +} - // message digest object - var md = { - algorithm: 'sha1', - blockLength: 64, - digestLength: 20, - // 56-bit length of message so far (does not including padding) - messageLength: 0, - // true message length - fullMessageLength: null, - // size of message length in bytes - messageLengthSize: 8 - }; +/** + * @template {string} Prefix + * @typedef {Record>} Decoders + */ +/** + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} + */ +class sdk_node_modules_multiformats_src_bases_base_ComposedDecoder { /** - * Starts the digest. - * - * @return this digest object. + * @param {Decoders} decoders */ - md.start = function() { - // up to 56-bit message length for convenience - md.messageLength = 0; - - // full message length (set md.messageLength64 for backwards-compatibility) - md.fullMessageLength = md.messageLength64 = []; - var int32s = md.messageLengthSize / 4; - for(var i = 0; i < int32s; ++i) { - md.fullMessageLength.push(0); - } - _input = forge.util.createBuffer(); - _state = { - h0: 0x67452301, - h1: 0xEFCDAB89, - h2: 0x98BADCFE, - h3: 0x10325476, - h4: 0xC3D2E1F0 - }; - return md; - }; - // start digest automatically for first time - md.start(); + constructor (decoders) { + this.decoders = decoders + } /** - * Updates the digest with the given message input. The given input can - * treated as raw input (no encoding will be applied) or an encoding of - * 'utf8' maybe given to encode the input using UTF-8. - * - * @param msg the message input to update with. - * @param encoding the encoding to use (default: 'raw', other: 'utf8'). - * - * @return this digest object. + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} */ - md.update = function(msg, encoding) { - if(encoding === 'utf8') { - msg = forge.util.encodeUtf8(msg); - } + or (decoder) { + return sdk_node_modules_multiformats_src_bases_base_or(this, decoder) + } - // update message length - var len = msg.length; - md.messageLength += len; - len = [(len / 0x100000000) >>> 0, len >>> 0]; - for(var i = md.fullMessageLength.length - 1; i >= 0; --i) { - md.fullMessageLength[i] += len[1]; - len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0); - md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0; - len[0] = ((len[1] / 0x100000000) >>> 0); + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) } + } +} - // add bytes to input buffer - _input.putBytes(msg); - - // process bytes - _update(_state, _w, _input); +/** + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} + */ +const sdk_node_modules_multiformats_src_bases_base_or = (left, right) => new sdk_node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) - // compact input buffer every 2K or if empty - if(_input.read > 2048 || _input.length() === 0) { - _input.compact(); - } +/** + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} + */ +class sdk_node_modules_multiformats_src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new sdk_node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new sdk_node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode) + } - return md; - }; + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) + } /** - * Produces the digest. - * - * @return a byte buffer containing the digest value. + * @param {string} input */ - md.digest = function() { - /* Note: Here we copy the remaining bytes in the input buffer and - add the appropriate SHA-1 padding. Then we do the final update - on a copy of the state so that if the user wants to get - intermediate digests they can do so. */ + decode (input) { + return this.decoder.decode(input) + } +} - /* Determine the number of bytes that must be added to the message - to ensure its length is congruent to 448 mod 512. In other words, - the data to be digested must be a multiple of 512 bits (or 128 bytes). - This data includes the message, some padding, and the length of the - message. Since the length of the message will be encoded as 8 bytes (64 - bits), that means that the last segment of the data must have 56 bytes - (448 bits) of message and padding. Therefore, the length of the message - plus the padding must be congruent to 448 mod 512 because - 512 - 128 = 448. +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} + */ +const sdk_node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new sdk_node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode) - In order to fill up the message length it must be filled with - padding that begins with 1 bit followed by all 0 bits. Padding - must *always* be present, so if the message length is already - congruent to 448 mod 512, then 512 padding bits must be added. */ +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} + */ +const sdk_node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = sdk_node_modules_multiformats_vendor_base_x(alphabet, name) + return sdk_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => sdk_node_modules_multiformats_src_bytes_coerce(decode(text)) + }) +} - var finalBlock = forge.util.createBuffer(); - finalBlock.putBytes(_input.bytes()); +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const sdk_node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i + } - // compute remaining size to be digested (include message length size) - var remaining = ( - md.fullMessageLength[md.fullMessageLength.length - 1] + - md.messageLengthSize); + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end + } - // add padding for overflow blockSize - overflow - // _padding starts with 1 byte with first bit is set (byte value 128), then - // there may be up to (blockSize - 1) other pad bytes - var overflow = remaining & (md.blockLength - 1); - finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow)); + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) - // serialize message length in bits in big-endian order; since length - // is stored in bytes we multiply by 8 and add carry from next int - var next, carry; - var bits = md.fullMessageLength[0] * 8; - for(var i = 0; i < md.fullMessageLength.length - 1; ++i) { - next = md.fullMessageLength[i + 1] * 8; - carry = (next / 0x100000000) >>> 0; - bits += carry; - finalBlock.putInt32(bits >>> 0); - bits = next >>> 0; + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) } - finalBlock.putInt32(bits); - - var s2 = { - h0: _state.h0, - h1: _state.h1, - h2: _state.h2, - h3: _state.h3, - h4: _state.h4 - }; - _update(s2, _w, finalBlock); - var rval = forge.util.createBuffer(); - rval.putInt32(s2.h0); - rval.putInt32(s2.h1); - rval.putInt32(s2.h2); - rval.putInt32(s2.h3); - rval.putInt32(s2.h4); - return rval; - }; - return md; -}; + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar -// sha-1 padding bytes not initialized yet -var _padding = null; -var _initialized = false; + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) + } + } -/** - * Initializes the constant tables. - */ -function _init() { - // create padding - _padding = String.fromCharCode(128); - _padding += forge.util.fillString(String.fromCharCode(0x00), 64); + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') + } - // now initialized - _initialized = true; + return out } /** - * Updates a SHA-1 state with the given byte buffer. - * - * @param s the SHA-1 state to update. - * @param w the array to use to store words. - * @param bytes the byte buffer to update with. + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} */ -function _update(s, w, bytes) { - // consume 512 bit (64 byte) chunks - var t, a, b, c, d, e, f, i; - var len = bytes.length(); - while(len >= 64) { - // the w array will be populated with sixteen 32-bit big-endian words - // and then extended into 80 32-bit words according to SHA-1 algorithm - // and for 32-79 using Max Locktyukhin's optimization +const sdk_node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' - // initialize hash value for this chunk - a = s.h0; - b = s.h1; - c = s.h2; - d = s.h3; - e = s.h4; + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 - // round 1 - for(i = 0; i < 16; ++i) { - t = bytes.getInt32(); - w[i] = t; - f = d ^ (b & (c ^ d)); - t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t; - e = d; - d = c; - // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug - c = ((b << 30) | (b >>> 2)) >>> 0; - b = a; - a = t; - } - for(; i < 20; ++i) { - t = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]); - t = (t << 1) | (t >>> 31); - w[i] = t; - f = d ^ (b & (c ^ d)); - t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t; - e = d; - d = c; - // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug - c = ((b << 30) | (b >>> 2)) >>> 0; - b = a; - a = t; - } - // round 2 - for(; i < 32; ++i) { - t = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]); - t = (t << 1) | (t >>> 31); - w[i] = t; - f = b ^ c ^ d; - t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t; - e = d; - d = c; - // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug - c = ((b << 30) | (b >>> 2)) >>> 0; - b = a; - a = t; - } - for(; i < 40; ++i) { - t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]); - t = (t << 2) | (t >>> 30); - w[i] = t; - f = b ^ c ^ d; - t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t; - e = d; - d = c; - // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug - c = ((b << 30) | (b >>> 2)) >>> 0; - b = a; - a = t; - } - // round 3 - for(; i < 60; ++i) { - t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]); - t = (t << 2) | (t >>> 30); - w[i] = t; - f = (b & c) | (d & (b ^ c)); - t = ((a << 5) | (a >>> 27)) + f + e + 0x8F1BBCDC + t; - e = d; - d = c; - // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug - c = ((b << 30) | (b >>> 2)) >>> 0; - b = a; - a = t; - } - // round 4 - for(; i < 80; ++i) { - t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]); - t = (t << 2) | (t >>> 30); - w[i] = t; - f = b ^ c ^ d; - t = ((a << 5) | (a >>> 27)) + f + e + 0xCA62C1D6 + t; - e = d; - d = c; - // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug - c = ((b << 30) | (b >>> 2)) >>> 0; - b = a; - a = t; + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] } - - // update hash state - s.h0 = (s.h0 + a) | 0; - s.h1 = (s.h1 + b) | 0; - s.h2 = (s.h2 + c) | 0; - s.h3 = (s.h3 + d) | 0; - s.h4 = (s.h4 + e) | 0; - - len -= 64; } -} + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] + } -/***/ }), + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' + } + } -/***/ 3241: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return out +} /** - * Secure Hash Algorithm with 256-bit digest (SHA-256) implementation. - * - * See FIPS 180-2 for details. + * RFC4648 Factory * - * @author Dave Longley - * - * Copyright (c) 2010-2015 Digital Bazaar, Inc. + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(80554); -__nccwpck_require__(36536); +const sdk_node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return sdk_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return sdk_node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return sdk_node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) + } + }) +} -var sha256 = module.exports = forge.sha256 = forge.sha256 || {}; -forge.md.sha256 = forge.md.algorithms.sha256 = sha256; +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/multiformats/src/bases/base32.js -/** - * Creates a SHA-256 message digest object. - * - * @return a message digest object. - */ -sha256.create = function() { - // do initialization as necessary - if(!_initialized) { - _init(); - } - // SHA-256 state contains eight 32-bit integers - var _state = null; +const sdk_node_modules_multiformats_src_bases_base32_base32 = sdk_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) - // input buffer - var _input = forge.util.createBuffer(); +const sdk_node_modules_multiformats_src_bases_base32_base32upper = sdk_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) - // used for word storage - var _w = new Array(64); +const sdk_node_modules_multiformats_src_bases_base32_base32pad = sdk_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) - // message digest object - var md = { - algorithm: 'sha256', - blockLength: 64, - digestLength: 32, - // 56-bit length of message so far (does not including padding) - messageLength: 0, - // true message length - fullMessageLength: null, - // size of message length in bytes - messageLengthSize: 8 - }; +const sdk_node_modules_multiformats_src_bases_base32_base32padupper = sdk_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) - /** - * Starts the digest. - * - * @return this digest object. - */ - md.start = function() { - // up to 56-bit message length for convenience - md.messageLength = 0; +const sdk_node_modules_multiformats_src_bases_base32_base32hex = sdk_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) - // full message length (set md.messageLength64 for backwards-compatibility) - md.fullMessageLength = md.messageLength64 = []; - var int32s = md.messageLengthSize / 4; - for(var i = 0; i < int32s; ++i) { - md.fullMessageLength.push(0); - } - _input = forge.util.createBuffer(); - _state = { - h0: 0x6A09E667, - h1: 0xBB67AE85, - h2: 0x3C6EF372, - h3: 0xA54FF53A, - h4: 0x510E527F, - h5: 0x9B05688C, - h6: 0x1F83D9AB, - h7: 0x5BE0CD19 - }; - return md; - }; - // start digest automatically for first time - md.start(); +const sdk_node_modules_multiformats_src_bases_base32_base32hexupper = sdk_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) - /** - * Updates the digest with the given message input. The given input can - * treated as raw input (no encoding will be applied) or an encoding of - * 'utf8' maybe given to encode the input using UTF-8. - * - * @param msg the message input to update with. - * @param encoding the encoding to use (default: 'raw', other: 'utf8'). - * - * @return this digest object. - */ - md.update = function(msg, encoding) { - if(encoding === 'utf8') { - msg = forge.util.encodeUtf8(msg); - } +const sdk_node_modules_multiformats_src_bases_base32_base32hexpad = sdk_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) - // update message length - var len = msg.length; - md.messageLength += len; - len = [(len / 0x100000000) >>> 0, len >>> 0]; - for(var i = md.fullMessageLength.length - 1; i >= 0; --i) { - md.fullMessageLength[i] += len[1]; - len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0); - md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0; - len[0] = ((len[1] / 0x100000000) >>> 0); - } +const sdk_node_modules_multiformats_src_bases_base32_base32hexpadupper = sdk_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) - // add bytes to input buffer - _input.putBytes(msg); +const sdk_node_modules_multiformats_src_bases_base32_base32z = sdk_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) - // process bytes - _update(_state, _w, _input); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/multiformats/src/bases/base58.js - // compact input buffer every 2K or if empty - if(_input.read > 2048 || _input.length() === 0) { - _input.compact(); - } - return md; - }; +const sdk_node_modules_multiformats_src_bases_base58_base58btc = sdk_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) - /** - * Produces the digest. - * - * @return a byte buffer containing the digest value. - */ - md.digest = function() { - /* Note: Here we copy the remaining bytes in the input buffer and - add the appropriate SHA-256 padding. Then we do the final update - on a copy of the state so that if the user wants to get - intermediate digests they can do so. */ +const sdk_node_modules_multiformats_src_bases_base58_base58flickr = sdk_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) - /* Determine the number of bytes that must be added to the message - to ensure its length is congruent to 448 mod 512. In other words, - the data to be digested must be a multiple of 512 bits (or 128 bytes). - This data includes the message, some padding, and the length of the - message. Since the length of the message will be encoded as 8 bytes (64 - bits), that means that the last segment of the data must have 56 bytes - (448 bits) of message and padding. Therefore, the length of the message - plus the padding must be congruent to 448 mod 512 because - 512 - 128 = 448. +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/multiformats/vendor/varint.js +var sdk_node_modules_multiformats_vendor_varint_encode_1 = sdk_node_modules_multiformats_vendor_varint_encode; - In order to fill up the message length it must be filled with - padding that begins with 1 bit followed by all 0 bits. Padding - must *always* be present, so if the message length is already - congruent to 448 mod 512, then 512 padding bits must be added. */ +var sdk_node_modules_multiformats_vendor_varint_MSB = 0x80 + , sdk_node_modules_multiformats_vendor_varint_REST = 0x7F + , sdk_node_modules_multiformats_vendor_varint_MSBALL = ~sdk_node_modules_multiformats_vendor_varint_REST + , sdk_node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31); - var finalBlock = forge.util.createBuffer(); - finalBlock.putBytes(_input.bytes()); +function sdk_node_modules_multiformats_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; - // compute remaining size to be digested (include message length size) - var remaining = ( - md.fullMessageLength[md.fullMessageLength.length - 1] + - md.messageLengthSize); + while(num >= sdk_node_modules_multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | sdk_node_modules_multiformats_vendor_varint_MSB; + num /= 128; + } + while(num & sdk_node_modules_multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | sdk_node_modules_multiformats_vendor_varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + + sdk_node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out +} - // add padding for overflow blockSize - overflow - // _padding starts with 1 byte with first bit is set (byte value 128), then - // there may be up to (blockSize - 1) other pad bytes - var overflow = remaining & (md.blockLength - 1); - finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow)); +var sdk_node_modules_multiformats_vendor_varint_decode = sdk_node_modules_multiformats_vendor_varint_read; - // serialize message length in bits in big-endian order; since length - // is stored in bytes we multiply by 8 and add carry from next int - var next, carry; - var bits = md.fullMessageLength[0] * 8; - for(var i = 0; i < md.fullMessageLength.length - 1; ++i) { - next = md.fullMessageLength[i + 1] * 8; - carry = (next / 0x100000000) >>> 0; - bits += carry; - finalBlock.putInt32(bits >>> 0); - bits = next >>> 0; +var sdk_node_modules_multiformats_vendor_varint_MSB$1 = 0x80 + , sdk_node_modules_multiformats_vendor_varint_REST$1 = 0x7F; + +function sdk_node_modules_multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; + + do { + if (counter >= l) { + sdk_node_modules_multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') } - finalBlock.putInt32(bits); + b = buf[counter++]; + res += shift < 28 + ? (b & sdk_node_modules_multiformats_vendor_varint_REST$1) << shift + : (b & sdk_node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= sdk_node_modules_multiformats_vendor_varint_MSB$1) - var s2 = { - h0: _state.h0, - h1: _state.h1, - h2: _state.h2, - h3: _state.h3, - h4: _state.h4, - h5: _state.h5, - h6: _state.h6, - h7: _state.h7 - }; - _update(s2, _w, finalBlock); - var rval = forge.util.createBuffer(); - rval.putInt32(s2.h0); - rval.putInt32(s2.h1); - rval.putInt32(s2.h2); - rval.putInt32(s2.h3); - rval.putInt32(s2.h4); - rval.putInt32(s2.h5); - rval.putInt32(s2.h6); - rval.putInt32(s2.h7); - return rval; - }; + sdk_node_modules_multiformats_vendor_varint_read.bytes = counter - offset; + + return res +} + +var sdk_node_modules_multiformats_vendor_varint_N1 = Math.pow(2, 7); +var sdk_node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14); +var sdk_node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21); +var sdk_node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28); +var sdk_node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35); +var sdk_node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42); +var sdk_node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49); +var sdk_node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56); +var sdk_node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63); + +var sdk_node_modules_multiformats_vendor_varint_length = function (value) { + return ( + value < sdk_node_modules_multiformats_vendor_varint_N1 ? 1 + : value < sdk_node_modules_multiformats_vendor_varint_N2 ? 2 + : value < sdk_node_modules_multiformats_vendor_varint_N3 ? 3 + : value < sdk_node_modules_multiformats_vendor_varint_N4 ? 4 + : value < sdk_node_modules_multiformats_vendor_varint_N5 ? 5 + : value < sdk_node_modules_multiformats_vendor_varint_N6 ? 6 + : value < sdk_node_modules_multiformats_vendor_varint_N7 ? 7 + : value < sdk_node_modules_multiformats_vendor_varint_N8 ? 8 + : value < sdk_node_modules_multiformats_vendor_varint_N9 ? 9 + : 10 + ) +}; - return md; +var sdk_node_modules_multiformats_vendor_varint_varint = { + encode: sdk_node_modules_multiformats_vendor_varint_encode_1 + , decode: sdk_node_modules_multiformats_vendor_varint_decode + , encodingLength: sdk_node_modules_multiformats_vendor_varint_length }; -// sha-256 padding bytes not initialized yet -var _padding = null; -var _initialized = false; +var sdk_node_modules_multiformats_vendor_varint_brrp_varint = sdk_node_modules_multiformats_vendor_varint_varint; + +/* harmony default export */ const sdk_node_modules_multiformats_vendor_varint = (sdk_node_modules_multiformats_vendor_varint_brrp_varint); + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/multiformats/src/varint.js -// table of constants -var _k = null; /** - * Initializes the constant tables. + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} */ -function _init() { - // create padding - _padding = String.fromCharCode(128); - _padding += forge.util.fillString(String.fromCharCode(0x00), 64); +const sdk_node_modules_multiformats_src_varint_decode = (data, offset = 0) => { + const code = sdk_node_modules_multiformats_vendor_varint.decode(data, offset) + return [code, sdk_node_modules_multiformats_vendor_varint.decode.bytes] +} - // create K table for SHA-256 - _k = [ - 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, - 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, - 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, - 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, - 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, - 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, - 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, - 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, - 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, - 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, - 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, - 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, - 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, - 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, - 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, - 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]; +/** + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] + */ +const sdk_node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + sdk_node_modules_multiformats_vendor_varint.encode(int, target, offset) + return target +} - // now initialized - _initialized = true; +/** + * @param {number} int + * @returns {number} + */ +const sdk_node_modules_multiformats_src_varint_encodingLength = (int) => { + return sdk_node_modules_multiformats_vendor_varint.encodingLength(int) } +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/multiformats/src/hashes/digest.js + + + /** - * Updates a SHA-256 state with the given byte buffer. + * Creates a multihash digest. * - * @param s the SHA-256 state to update. - * @param w the array to use to store words. - * @param bytes the byte buffer to update with. + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest */ -function _update(s, w, bytes) { - // consume 512 bit (64 byte) chunks - var t1, t2, s0, s1, ch, maj, i, a, b, c, d, e, f, g, h; - var len = bytes.length(); - while(len >= 64) { - // the w array will be populated with sixteen 32-bit big-endian words - // and then extended into 64 32-bit words according to SHA-256 - for(i = 0; i < 16; ++i) { - w[i] = bytes.getInt32(); - } - for(; i < 64; ++i) { - // XOR word 2 words ago rot right 17, rot right 19, shft right 10 - t1 = w[i - 2]; - t1 = - ((t1 >>> 17) | (t1 << 15)) ^ - ((t1 >>> 19) | (t1 << 13)) ^ - (t1 >>> 10); - // XOR word 15 words ago rot right 7, rot right 18, shft right 3 - t2 = w[i - 15]; - t2 = - ((t2 >>> 7) | (t2 << 25)) ^ - ((t2 >>> 18) | (t2 << 14)) ^ - (t2 >>> 3); - // sum(t1, word 7 ago, t2, word 16 ago) modulo 2^32 - w[i] = (t1 + w[i - 7] + t2 + w[i - 16]) | 0; - } +const sdk_node_modules_multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = sdk_node_modules_multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + sdk_node_modules_multiformats_src_varint_encodingLength(size) - // initialize hash value for this chunk - a = s.h0; - b = s.h1; - c = s.h2; - d = s.h3; - e = s.h4; - f = s.h5; - g = s.h6; - h = s.h7; + const bytes = new Uint8Array(digestOffset + size) + sdk_node_modules_multiformats_src_varint_encodeTo(code, bytes, 0) + sdk_node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) - // round function - for(i = 0; i < 64; ++i) { - // Sum1(e) - s1 = - ((e >>> 6) | (e << 26)) ^ - ((e >>> 11) | (e << 21)) ^ - ((e >>> 25) | (e << 7)); - // Ch(e, f, g) (optimized the same way as SHA-1) - ch = g ^ (e & (f ^ g)); - // Sum0(a) - s0 = - ((a >>> 2) | (a << 30)) ^ - ((a >>> 13) | (a << 19)) ^ - ((a >>> 22) | (a << 10)); - // Maj(a, b, c) (optimized the same way as SHA-1) - maj = (a & b) | (c & (a ^ b)); + return new sdk_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} - // main algorithm - t1 = h + s1 + ch + _k[i] + w[i]; - t2 = s0 + maj; - h = g; - g = f; - f = e; - // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug - // can't truncate with `| 0` - e = (d + t1) >>> 0; - d = c; - c = b; - b = a; - // `>>> 0` necessary to avoid iOS/Safari 10 optimization bug - // can't truncate with `| 0` - a = (t1 + t2) >>> 0; - } +/** + * Turns bytes representation of multihash digest into an instance. + * + * @param {Uint8Array} multihash + * @returns {MultihashDigest} + */ +const sdk_node_modules_multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = sdk_node_modules_multiformats_src_bytes_coerce(multihash) + const [code, sizeOffset] = sdk_node_modules_multiformats_src_varint_decode(bytes) + const [size, digestOffset] = sdk_node_modules_multiformats_src_varint_decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) - // update hash state - s.h0 = (s.h0 + a) | 0; - s.h1 = (s.h1 + b) | 0; - s.h2 = (s.h2 + c) | 0; - s.h3 = (s.h3 + d) | 0; - s.h4 = (s.h4 + e) | 0; - s.h5 = (s.h5 + f) | 0; - s.h6 = (s.h6 + g) | 0; - s.h7 = (s.h7 + h) | 0; - len -= 64; + if (digest.byteLength !== size) { + throw new Error('Incorrect length') } + + return new sdk_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) } +/** + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} + */ +const sdk_node_modules_multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { + return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) -/***/ }), + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + sdk_node_modules_multiformats_src_bytes_equals(a.bytes, data.bytes) + ) + } +} -/***/ 34531: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/** + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest + */ /** - * Secure Hash Algorithm with a 1024-bit block size implementation. - * - * This includes: SHA-512, SHA-384, SHA-512/224, and SHA-512/256. For - * SHA-256 (block size 512 bits), see sha256.js. - * - * See FIPS 180-4 for details. + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. * - * @author Dave Longley - * - * Copyright (c) 2014-2015 Digital Bazaar, Inc. + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} */ -var forge = __nccwpck_require__(96630); -__nccwpck_require__(80554); -__nccwpck_require__(36536); +class sdk_node_modules_multiformats_src_hashes_digest_Digest { + /** + * Creates a multihash digest. + * + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes + */ + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes + } +} -var sha512 = module.exports = forge.sha512 = forge.sha512 || {}; +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/multiformats/src/cid.js -// SHA-512 -forge.md.sha512 = forge.md.algorithms.sha512 = sha512; -// SHA-384 -var sha384 = forge.sha384 = forge.sha512.sha384 = forge.sha512.sha384 || {}; -sha384.create = function() { - return sha512.create('SHA-384'); -}; -forge.md.sha384 = forge.md.algorithms.sha384 = sha384; -// SHA-512/256 -forge.sha512.sha256 = forge.sha512.sha256 || { - create: function() { - return sha512.create('SHA-512/256'); + +// Linter can see that API is used in types. +// eslint-disable-next-line + + + +// This way TS will also expose all the types from module + + +/** + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} + */ +const sdk_node_modules_multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return sdk_node_modules_multiformats_src_cid_toStringV0( + bytes, + sdk_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || sdk_node_modules_multiformats_src_bases_base58_base58btc.encoder + ) + default: + return sdk_node_modules_multiformats_src_cid_toStringV1( + bytes, + sdk_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || sdk_node_modules_multiformats_src_bases_base32_base32.encoder) + ) } -}; -forge.md['sha512/256'] = forge.md.algorithms['sha512/256'] = - forge.sha512.sha256; +} -// SHA-512/224 -forge.sha512.sha224 = forge.sha512.sha224 || { - create: function() { - return sha512.create('SHA-512/224'); +/** + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} + */ +const sdk_node_modules_multiformats_src_cid_toJSON = (link) => ({ + '/': sdk_node_modules_multiformats_src_cid_format(link) +}) + +/** + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json + */ +const sdk_node_modules_multiformats_src_cid_fromJSON = (json) => + sdk_node_modules_multiformats_src_cid_CID.parse(json['/']) + +/** @type {WeakMap>} */ +const sdk_node_modules_multiformats_src_cid_cache = new WeakMap() + +/** + * @param {API.UnknownLink} cid + * @returns {Map} + */ +const sdk_node_modules_multiformats_src_cid_baseCache = cid => { + const baseCache = sdk_node_modules_multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + sdk_node_modules_multiformats_src_cid_cache.set(cid, baseCache) + return baseCache } -}; -forge.md['sha512/224'] = forge.md.algorithms['sha512/224'] = - forge.sha512.sha224; + return baseCache +} /** - * Creates a SHA-2 message digest object. - * - * @param algorithm the algorithm to use (SHA-512, SHA-384, SHA-512/224, - * SHA-512/256). - * - * @return a message digest object. + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} */ -sha512.create = function(algorithm) { - // do initialization as necessary - if(!_initialized) { - _init(); + +class sdk_node_modules_multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes + + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes } - if(typeof algorithm === 'undefined') { - algorithm = 'SHA-512'; + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this } - if(!(algorithm in _states)) { - throw new Error('Invalid SHA-512 algorithm: ' + algorithm); + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset } - // SHA-512 state contains eight 64-bit integers (each as two 32-bit ints) - var _state = _states[algorithm]; - var _h = null; + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } - // input buffer - var _input = forge.util.createBuffer(); + /** + * @returns {CID} + */ + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) + } + case 1: { + const { code, multihash } = this - // used for 64-bit word storage - var _w = new Array(80); - for(var wi = 0; wi < 80; ++wi) { - _w[wi] = new Array(2); + if (code !== sdk_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } + + // sha2-256 + if (multihash.code !== sdk_node_modules_multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') + } + + return /** @type {CID} */ ( + sdk_node_modules_multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) + } + } } - // determine digest length by algorithm name (default) - var digestLength = 64; - switch(algorithm) { - case 'SHA-384': - digestLength = 48; - break; - case 'SHA-512/256': - digestLength = 32; - break; - case 'SHA-512/224': - digestLength = 28; - break; + /** + * @returns {CID} + */ + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = sdk_node_modules_multiformats_src_hashes_digest_create(code, digest) + return /** @type {CID} */ ( + sdk_node_modules_multiformats_src_cid_CID.createV1(this.code, multihash) + ) + } + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) + } + } } - // message digest object - var md = { - // SHA-512 => sha512 - algorithm: algorithm.replace('-', '').toLowerCase(), - blockLength: 128, - digestLength: digestLength, - // 56-bit length of message so far (does not including padding) - messageLength: 0, - // true message length - fullMessageLength: null, - // size of message length in bytes - messageLengthSize: 16 - }; + /** + * @param {unknown} other + * @returns {other is CID} + */ + equals (other) { + return sdk_node_modules_multiformats_src_cid_CID.equals(this, other) + } /** - * Starts the digest. - * - * @return this digest object. + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} */ - md.start = function() { - // up to 56-bit message length for convenience - md.messageLength = 0; + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + sdk_node_modules_multiformats_src_hashes_digest_equals(self.multihash, unknown.multihash) + ) + } - // full message length (set md.messageLength128 for backwards-compatibility) - md.fullMessageLength = md.messageLength128 = []; - var int32s = md.messageLengthSize / 4; - for(var i = 0; i < int32s; ++i) { - md.fullMessageLength.push(0); - } - _input = forge.util.createBuffer(); - _h = new Array(_state.length); - for(var i = 0; i < _state.length; ++i) { - _h[i] = _state[i].slice(0); - } - return md; - }; - // start digest automatically for first time - md.start(); + /** + * @param {API.MultibaseEncoder} [base] + * @returns {string} + */ + toString (base) { + return sdk_node_modules_multiformats_src_cid_format(this, base) + } /** - * Updates the digest with the given message input. The given input can - * treated as raw input (no encoding will be applied) or an encoding of - * 'utf8' maybe given to encode the input using UTF-8. - * - * @param msg the message input to update with. - * @param encoding the encoding to use (default: 'raw', other: 'utf8'). - * - * @return this digest object. + * @returns {API.LinkJSON} */ - md.update = function(msg, encoding) { - if(encoding === 'utf8') { - msg = forge.util.encodeUtf8(msg); - } + toJSON () { + return { '/': sdk_node_modules_multiformats_src_cid_format(this) } + } - // update message length - var len = msg.length; - md.messageLength += len; - len = [(len / 0x100000000) >>> 0, len >>> 0]; - for(var i = md.fullMessageLength.length - 1; i >= 0; --i) { - md.fullMessageLength[i] += len[1]; - len[1] = len[0] + ((md.fullMessageLength[i] / 0x100000000) >>> 0); - md.fullMessageLength[i] = md.fullMessageLength[i] >>> 0; - len[0] = ((len[1] / 0x100000000) >>> 0); - } + link () { + return this + } - // add bytes to input buffer - _input.putBytes(msg); + get [Symbol.toStringTag] () { + return 'CID' + } - // process bytes - _update(_h, _w, _input); + // Legacy - // compact input buffer every 2K or if empty - if(_input.read > 2048 || _input.length() === 0) { - _input.compact(); + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` + } + + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} + */ + static asCID (input) { + if (input == null) { + return null } - return md; - }; + const value = /** @type {any} */ (input) + if (value instanceof sdk_node_modules_multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new sdk_node_modules_multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || sdk_node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[sdk_node_modules_multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (sdk_node_modules_multiformats_src_hashes_digest_decode(multihash)) + return sdk_node_modules_multiformats_src_cid_CID.create(version, code, digest) + } else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null + } + } /** - * Produces the digest. * - * @return a byte buffer containing the digest value. + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} */ - md.digest = function() { - /* Note: Here we copy the remaining bytes in the input buffer and - add the appropriate SHA-512 padding. Then we do the final update - on a copy of the state so that if the user wants to get - intermediate digests they can do so. */ + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') + } - /* Determine the number of bytes that must be added to the message - to ensure its length is congruent to 896 mod 1024. In other words, - the data to be digested must be a multiple of 1024 bits (or 128 bytes). - This data includes the message, some padding, and the length of the - message. Since the length of the message will be encoded as 16 bytes (128 - bits), that means that the last segment of the data must have 112 bytes - (896 bits) of message and padding. Therefore, the length of the message - plus the padding must be congruent to 896 mod 1024 because - 1024 - 128 = 896. + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } - In order to fill up the message length it must be filled with - padding that begins with 1 bit followed by all 0 bits. Padding - must *always* be present, so if the message length is already - congruent to 896 mod 1024, then 1024 padding bits must be added. */ + switch (version) { + case 0: { + if (code !== sdk_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${sdk_node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new sdk_node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes) + } + } + case 1: { + const bytes = sdk_node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new sdk_node_modules_multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') + } + } + } - var finalBlock = forge.util.createBuffer(); - finalBlock.putBytes(_input.bytes()); + /** + * Simplified version of `create` for CIDv0. + * + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} + */ + static createV0 (digest) { + return sdk_node_modules_multiformats_src_cid_CID.create(0, sdk_node_modules_multiformats_src_cid_DAG_PB_CODE, digest) + } - // compute remaining size to be digested (include message length size) - var remaining = ( - md.fullMessageLength[md.fullMessageLength.length - 1] + - md.messageLengthSize); + /** + * Simplified version of `create` for CIDv1. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} + */ + static createV1 (code, digest) { + return sdk_node_modules_multiformats_src_cid_CID.create(1, code, digest) + } - // add padding for overflow blockSize - overflow - // _padding starts with 1 byte with first bit is set (byte value 128), then - // there may be up to (blockSize - 1) other pad bytes - var overflow = remaining & (md.blockLength - 1); - finalBlock.putBytes(_padding.substr(0, md.blockLength - overflow)); + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} + */ + static decode (bytes) { + const [cid, remainder] = sdk_node_modules_multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') + } + return cid + } - // serialize message length in bits in big-endian order; since length - // is stored in bytes we multiply by 8 and add carry from next int - var next, carry; - var bits = md.fullMessageLength[0] * 8; - for(var i = 0; i < md.fullMessageLength.length - 1; ++i) { - next = md.fullMessageLength[i + 1] * 8; - carry = (next / 0x100000000) >>> 0; - bits += carry; - finalBlock.putInt32(bits >>> 0); - bits = next >>> 0; + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} + */ + static decodeFirst (bytes) { + const specs = sdk_node_modules_multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = sdk_node_modules_multiformats_src_bytes_coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') } - finalBlock.putInt32(bits); + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new sdk_node_modules_multiformats_src_hashes_digest_Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? sdk_node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : sdk_node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] + } - var h = new Array(_h.length); - for(var i = 0; i < _h.length; ++i) { - h[i] = _h[i].slice(0); + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} + */ + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = sdk_node_modules_multiformats_src_varint_decode(initialBytes.subarray(offset)) + offset += length + return i } - _update(h, _w, finalBlock); - var rval = forge.util.createBuffer(); - var hlen; - if(algorithm === 'SHA-512') { - hlen = h.length; - } else if(algorithm === 'SHA-384') { - hlen = h.length - 2; + + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (sdk_node_modules_multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 } else { - hlen = h.length - 4; - } - for(var i = 0; i < hlen; ++i) { - rval.putInt32(h[i][0]); - if(i !== hlen - 1 || algorithm !== 'SHA-512/224') { - rval.putInt32(h[i][1]); - } + codec = /** @type {C} */ (next()) } - return rval; - }; - return md; -}; + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } -// sha-512 padding bytes not initialized yet -var _padding = null; -var _initialized = false; + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize -// table of constants -var _k = null; + return { version, codec, multihashCode, digestSize, multihashSize, size } + } -// initial hash states -var _states = null; + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + * + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} + */ + static parse (source, base) { + const [prefix, bytes] = sdk_node_modules_multiformats_src_cid_parseCIDtoBytes(source, base) -/** - * Initializes the constant tables. - */ -function _init() { - // create padding - _padding = String.fromCharCode(128); - _padding += forge.util.fillString(String.fromCharCode(0x00), 128); + const cid = sdk_node_modules_multiformats_src_cid_CID.decode(bytes) - // create K table for SHA-512 - _k = [ - [0x428a2f98, 0xd728ae22], [0x71374491, 0x23ef65cd], - [0xb5c0fbcf, 0xec4d3b2f], [0xe9b5dba5, 0x8189dbbc], - [0x3956c25b, 0xf348b538], [0x59f111f1, 0xb605d019], - [0x923f82a4, 0xaf194f9b], [0xab1c5ed5, 0xda6d8118], - [0xd807aa98, 0xa3030242], [0x12835b01, 0x45706fbe], - [0x243185be, 0x4ee4b28c], [0x550c7dc3, 0xd5ffb4e2], - [0x72be5d74, 0xf27b896f], [0x80deb1fe, 0x3b1696b1], - [0x9bdc06a7, 0x25c71235], [0xc19bf174, 0xcf692694], - [0xe49b69c1, 0x9ef14ad2], [0xefbe4786, 0x384f25e3], - [0x0fc19dc6, 0x8b8cd5b5], [0x240ca1cc, 0x77ac9c65], - [0x2de92c6f, 0x592b0275], [0x4a7484aa, 0x6ea6e483], - [0x5cb0a9dc, 0xbd41fbd4], [0x76f988da, 0x831153b5], - [0x983e5152, 0xee66dfab], [0xa831c66d, 0x2db43210], - [0xb00327c8, 0x98fb213f], [0xbf597fc7, 0xbeef0ee4], - [0xc6e00bf3, 0x3da88fc2], [0xd5a79147, 0x930aa725], - [0x06ca6351, 0xe003826f], [0x14292967, 0x0a0e6e70], - [0x27b70a85, 0x46d22ffc], [0x2e1b2138, 0x5c26c926], - [0x4d2c6dfc, 0x5ac42aed], [0x53380d13, 0x9d95b3df], - [0x650a7354, 0x8baf63de], [0x766a0abb, 0x3c77b2a8], - [0x81c2c92e, 0x47edaee6], [0x92722c85, 0x1482353b], - [0xa2bfe8a1, 0x4cf10364], [0xa81a664b, 0xbc423001], - [0xc24b8b70, 0xd0f89791], [0xc76c51a3, 0x0654be30], - [0xd192e819, 0xd6ef5218], [0xd6990624, 0x5565a910], - [0xf40e3585, 0x5771202a], [0x106aa070, 0x32bbd1b8], - [0x19a4c116, 0xb8d2d0c8], [0x1e376c08, 0x5141ab53], - [0x2748774c, 0xdf8eeb99], [0x34b0bcb5, 0xe19b48a8], - [0x391c0cb3, 0xc5c95a63], [0x4ed8aa4a, 0xe3418acb], - [0x5b9cca4f, 0x7763e373], [0x682e6ff3, 0xd6b2b8a3], - [0x748f82ee, 0x5defb2fc], [0x78a5636f, 0x43172f60], - [0x84c87814, 0xa1f0ab72], [0x8cc70208, 0x1a6439ec], - [0x90befffa, 0x23631e28], [0xa4506ceb, 0xde82bde9], - [0xbef9a3f7, 0xb2c67915], [0xc67178f2, 0xe372532b], - [0xca273ece, 0xea26619c], [0xd186b8c7, 0x21c0c207], - [0xeada7dd6, 0xcde0eb1e], [0xf57d4f7f, 0xee6ed178], - [0x06f067aa, 0x72176fba], [0x0a637dc5, 0xa2c898a6], - [0x113f9804, 0xbef90dae], [0x1b710b35, 0x131c471b], - [0x28db77f5, 0x23047d84], [0x32caab7b, 0x40c72493], - [0x3c9ebe0a, 0x15c9bebc], [0x431d67c4, 0x9c100d4c], - [0x4cc5d4be, 0xcb3e42b6], [0x597f299c, 0xfc657e2a], - [0x5fcb6fab, 0x3ad6faec], [0x6c44198c, 0x4a475817] - ]; + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') + } - // initial hash states - _states = {}; - _states['SHA-512'] = [ - [0x6a09e667, 0xf3bcc908], - [0xbb67ae85, 0x84caa73b], - [0x3c6ef372, 0xfe94f82b], - [0xa54ff53a, 0x5f1d36f1], - [0x510e527f, 0xade682d1], - [0x9b05688c, 0x2b3e6c1f], - [0x1f83d9ab, 0xfb41bd6b], - [0x5be0cd19, 0x137e2179] - ]; - _states['SHA-384'] = [ - [0xcbbb9d5d, 0xc1059ed8], - [0x629a292a, 0x367cd507], - [0x9159015a, 0x3070dd17], - [0x152fecd8, 0xf70e5939], - [0x67332667, 0xffc00b31], - [0x8eb44a87, 0x68581511], - [0xdb0c2e0d, 0x64f98fa7], - [0x47b5481d, 0xbefa4fa4] - ]; - _states['SHA-512/256'] = [ - [0x22312194, 0xFC2BF72C], - [0x9F555FA3, 0xC84C64C2], - [0x2393B86B, 0x6F53B151], - [0x96387719, 0x5940EABD], - [0x96283EE2, 0xA88EFFE3], - [0xBE5E1E25, 0x53863992], - [0x2B0199FC, 0x2C85B8AA], - [0x0EB72DDC, 0x81C52CA2] - ]; - _states['SHA-512/224'] = [ - [0x8C3D37C8, 0x19544DA2], - [0x73E19966, 0x89DCD4D6], - [0x1DFAB7AE, 0x32FF9C82], - [0x679DD514, 0x582F9FCF], - [0x0F6D2B69, 0x7BD44DA8], - [0x77E36F73, 0x04C48942], - [0x3F9D85A8, 0x6A1D36C8], - [0x1112E6AD, 0x91D692A1] - ]; + // Cache string representation to avoid computing it on `this.toString()` + sdk_node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source) - // now initialized - _initialized = true; + return cid + } } /** - * Updates a SHA-512 state with the given byte buffer. - * - * @param s the SHA-512 state to update. - * @param w the array to use to store words. - * @param bytes the byte buffer to update with. + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} */ -function _update(s, w, bytes) { - // consume 512 bit (128 byte) chunks - var t1_hi, t1_lo; - var t2_hi, t2_lo; - var s0_hi, s0_lo; - var s1_hi, s1_lo; - var ch_hi, ch_lo; - var maj_hi, maj_lo; - var a_hi, a_lo; - var b_hi, b_lo; - var c_hi, c_lo; - var d_hi, d_lo; - var e_hi, e_lo; - var f_hi, f_lo; - var g_hi, g_lo; - var h_hi, h_lo; - var i, hi, lo, w2, w7, w15, w16; - var len = bytes.length(); - while(len >= 128) { - // the w array will be populated with sixteen 64-bit big-endian words - // and then extended into 64 64-bit words according to SHA-512 - for(i = 0; i < 16; ++i) { - w[i][0] = bytes.getInt32() >>> 0; - w[i][1] = bytes.getInt32() >>> 0; +const sdk_node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || sdk_node_modules_multiformats_src_bases_base58_base58btc + return [ + /** @type {Prefix} */ (sdk_node_modules_multiformats_src_bases_base58_base58btc.prefix), + decoder.decode(`${sdk_node_modules_multiformats_src_bases_base58_base58btc.prefix}${source}`) + ] } - for(; i < 80; ++i) { - // for word 2 words ago: ROTR 19(x) ^ ROTR 61(x) ^ SHR 6(x) - w2 = w[i - 2]; - hi = w2[0]; - lo = w2[1]; - - // high bits - t1_hi = ( - ((hi >>> 19) | (lo << 13)) ^ // ROTR 19 - ((lo >>> 29) | (hi << 3)) ^ // ROTR 61/(swap + ROTR 29) - (hi >>> 6)) >>> 0; // SHR 6 - // low bits - t1_lo = ( - ((hi << 13) | (lo >>> 19)) ^ // ROTR 19 - ((lo << 3) | (hi >>> 29)) ^ // ROTR 61/(swap + ROTR 29) - ((hi << 26) | (lo >>> 6))) >>> 0; // SHR 6 + case sdk_node_modules_multiformats_src_bases_base58_base58btc.prefix: { + const decoder = base || sdk_node_modules_multiformats_src_bases_base58_base58btc + return [/** @type {Prefix} */(sdk_node_modules_multiformats_src_bases_base58_base58btc.prefix), decoder.decode(source)] + } + case sdk_node_modules_multiformats_src_bases_base32_base32.prefix: { + const decoder = base || sdk_node_modules_multiformats_src_bases_base32_base32 + return [/** @type {Prefix} */(sdk_node_modules_multiformats_src_bases_base32_base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) + } + return [/** @type {Prefix} */(source[0]), base.decode(source)] + } + } +} - // for word 15 words ago: ROTR 1(x) ^ ROTR 8(x) ^ SHR 7(x) - w15 = w[i - 15]; - hi = w15[0]; - lo = w15[1]; +/** + * + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base + */ +const sdk_node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== sdk_node_modules_multiformats_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) + } - // high bits - t2_hi = ( - ((hi >>> 1) | (lo << 31)) ^ // ROTR 1 - ((hi >>> 8) | (lo << 24)) ^ // ROTR 8 - (hi >>> 7)) >>> 0; // SHR 7 - // low bits - t2_lo = ( - ((hi << 31) | (lo >>> 1)) ^ // ROTR 1 - ((hi << 24) | (lo >>> 8)) ^ // ROTR 8 - ((hi << 25) | (lo >>> 7))) >>> 0; // SHR 7 + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} - // sum(t1, word 7 ago, t2, word 16 ago) modulo 2^64 (carry lo overflow) - w7 = w[i - 7]; - w16 = w[i - 16]; - lo = (t1_lo + w7[1] + t2_lo + w16[1]); - w[i][0] = (t1_hi + w7[0] + t2_hi + w16[0] + - ((lo / 0x100000000) >>> 0)) >>> 0; - w[i][1] = lo >>> 0; - } +/** + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base + */ +const sdk_node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} - // initialize hash value for this chunk - a_hi = s[0][0]; - a_lo = s[0][1]; - b_hi = s[1][0]; - b_lo = s[1][1]; - c_hi = s[2][0]; - c_lo = s[2][1]; - d_hi = s[3][0]; - d_lo = s[3][1]; - e_hi = s[4][0]; - e_lo = s[4][1]; - f_hi = s[5][0]; - f_lo = s[5][1]; - g_hi = s[6][0]; - g_lo = s[6][1]; - h_hi = s[7][0]; - h_lo = s[7][1]; +const sdk_node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70 +const sdk_node_modules_multiformats_src_cid_SHA_256_CODE = 0x12 - // round function - for(i = 0; i < 80; ++i) { - // Sum1(e) = ROTR 14(e) ^ ROTR 18(e) ^ ROTR 41(e) - s1_hi = ( - ((e_hi >>> 14) | (e_lo << 18)) ^ // ROTR 14 - ((e_hi >>> 18) | (e_lo << 14)) ^ // ROTR 18 - ((e_lo >>> 9) | (e_hi << 23))) >>> 0; // ROTR 41/(swap + ROTR 9) - s1_lo = ( - ((e_hi << 18) | (e_lo >>> 14)) ^ // ROTR 14 - ((e_hi << 14) | (e_lo >>> 18)) ^ // ROTR 18 - ((e_lo << 23) | (e_hi >>> 9))) >>> 0; // ROTR 41/(swap + ROTR 9) +/** + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} + */ +const sdk_node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = sdk_node_modules_multiformats_src_varint_encodingLength(version) + const hashOffset = codeOffset + sdk_node_modules_multiformats_src_varint_encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + sdk_node_modules_multiformats_src_varint_encodeTo(version, bytes, 0) + sdk_node_modules_multiformats_src_varint_encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes +} - // Ch(e, f, g) (optimized the same way as SHA-1) - ch_hi = (g_hi ^ (e_hi & (f_hi ^ g_hi))) >>> 0; - ch_lo = (g_lo ^ (e_lo & (f_lo ^ g_lo))) >>> 0; +const sdk_node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') - // Sum0(a) = ROTR 28(a) ^ ROTR 34(a) ^ ROTR 39(a) - s0_hi = ( - ((a_hi >>> 28) | (a_lo << 4)) ^ // ROTR 28 - ((a_lo >>> 2) | (a_hi << 30)) ^ // ROTR 34/(swap + ROTR 2) - ((a_lo >>> 7) | (a_hi << 25))) >>> 0; // ROTR 39/(swap + ROTR 7) - s0_lo = ( - ((a_hi << 4) | (a_lo >>> 28)) ^ // ROTR 28 - ((a_lo << 30) | (a_hi >>> 2)) ^ // ROTR 34/(swap + ROTR 2) - ((a_lo << 25) | (a_hi >>> 7))) >>> 0; // ROTR 39/(swap + ROTR 7) +// EXTERNAL MODULE: ./node_modules/@filebase/sdk/node_modules/varint/index.js +var sdk_node_modules_varint = __nccwpck_require__(59800); +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/decoder-common.js - // Maj(a, b, c) (optimized the same way as SHA-1) - maj_hi = ((a_hi & b_hi) | (c_hi & (a_hi ^ b_hi))) >>> 0; - maj_lo = ((a_lo & b_lo) | (c_lo & (a_lo ^ b_lo))) >>> 0; - // main algorithm - // t1 = (h + s1 + ch + _k[i] + _w[i]) modulo 2^64 (carry lo overflow) - lo = (h_lo + s1_lo + ch_lo + _k[i][1] + w[i][1]); - t1_hi = (h_hi + s1_hi + ch_hi + _k[i][0] + w[i][0] + - ((lo / 0x100000000) >>> 0)) >>> 0; - t1_lo = lo >>> 0; +const decoder_common_CIDV0_BYTES = { + SHA2_256: 0x12, + LENGTH: 0x20, + DAG_PB: 0x70 +} - // t2 = s0 + maj modulo 2^64 (carry lo overflow) - lo = s0_lo + maj_lo; - t2_hi = (s0_hi + maj_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - t2_lo = lo >>> 0; +const decoder_common_V2_HEADER_LENGTH = /* characteristics */ 16 /* v1 offset */ + 8 /* v1 size */ + 8 /* index offset */ + 8 - h_hi = g_hi; - h_lo = g_lo; +/** + * Decodes varint and seeks the buffer + * + * ```js + * // needs bytes to be read first + * const bytes = reader.upTo(8) // maybe async + * ``` + * + * @param {Uint8Array} bytes + * @param {import('./coding').Seekable} seeker + * @returns {number} + */ +function decoder_common_decodeVarint (bytes, seeker) { + if (!bytes.length) { + throw new Error('Unexpected end of data') + } + const i = sdk_node_modules_varint.decode(bytes) + seeker.seek(/** @type {number} */(sdk_node_modules_varint.decode.bytes)) + return i +} - g_hi = f_hi; - g_lo = f_lo; +/** + * Decode v2 header + * + * ```js + * // needs bytes to be read first + * const bytes = reader.exactly(V2_HEADER_LENGTH, true) // maybe async + * ``` + * + * @param {Uint8Array} bytes + * @returns {import('./coding').CarV2FixedHeader} + */ +function decoder_common_decodeV2Header (bytes) { + const dv = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength) + let offset = 0 + const header = { + version: 2, + /** @type {[bigint, bigint]} */ + characteristics: [ + dv.getBigUint64(offset, true), + dv.getBigUint64(offset += 8, true) + ], + dataOffset: Number(dv.getBigUint64(offset += 8, true)), + dataSize: Number(dv.getBigUint64(offset += 8, true)), + indexOffset: Number(dv.getBigUint64(offset += 8, true)) + } + return header +} - f_hi = e_hi; - f_lo = e_lo; +/** + * Checks the length of the multihash to be read afterwards + * + * ```js + * // needs bytes to be read first + * const bytes = reader.upTo(8) // maybe async + * ``` + * + * @param {Uint8Array} bytes + */ +function decoder_common_getMultihashLength (bytes) { + // | code | length | .... | + // where both code and length are varints, so we have to decode + // them first before we can know total length - // e = (d + t1) modulo 2^64 (carry lo overflow) - lo = d_lo + t1_lo; - e_hi = (d_hi + t1_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - e_lo = lo >>> 0; + varint.decode(bytes) // code + const codeLength = /** @type {number} */(varint.decode.bytes) + const length = varint.decode(bytes.subarray(varint.decode.bytes)) + const lengthLength = /** @type {number} */(varint.decode.bytes) + const mhLength = codeLength + lengthLength + length - d_hi = c_hi; - d_lo = c_lo; + return mhLength +} - c_hi = b_hi; - c_lo = b_lo; +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/header-validator.js +/** Auto-generated with @ipld/schema@v4.2.0 at Thu Sep 14 2023 from IPLD Schema: + * + * # CarV1HeaderOrV2Pragma is a more relaxed form, and can parse {version:x} where + * # roots are optional. This is typically useful for the {verison:2} CARv2 + * # pragma. + * + * type CarV1HeaderOrV2Pragma struct { + * roots optional [&Any] + * # roots is _not_ optional for CarV1 but we defer that check within code to + * # gracefully handle the V2 case where it's just {version:X} + * version Int + * } + * + * # CarV1Header is the strict form of the header, and requires roots to be + * # present. This is compatible with the CARv1 specification. + * + * # type CarV1Header struct { + * # roots [&Any] + * # version Int + * # } + * + */ - b_hi = a_hi; - b_lo = a_lo; +const Kinds = { + Null: /** @returns {undefined|null} */ (/** @type {any} */ obj) => obj === null ? obj : undefined, + Int: /** @returns {undefined|number} */ (/** @type {any} */ obj) => Number.isInteger(obj) ? obj : undefined, + Float: /** @returns {undefined|number} */ (/** @type {any} */ obj) => typeof obj === 'number' && Number.isFinite(obj) ? obj : undefined, + String: /** @returns {undefined|string} */ (/** @type {any} */ obj) => typeof obj === 'string' ? obj : undefined, + Bool: /** @returns {undefined|boolean} */ (/** @type {any} */ obj) => typeof obj === 'boolean' ? obj : undefined, + Bytes: /** @returns {undefined|Uint8Array} */ (/** @type {any} */ obj) => obj instanceof Uint8Array ? obj : undefined, + Link: /** @returns {undefined|object} */ (/** @type {any} */ obj) => obj !== null && typeof obj === 'object' && obj.asCID === obj ? obj : undefined, + List: /** @returns {undefined|Array} */ (/** @type {any} */ obj) => Array.isArray(obj) ? obj : undefined, + Map: /** @returns {undefined|object} */ (/** @type {any} */ obj) => obj !== null && typeof obj === 'object' && obj.asCID !== obj && !Array.isArray(obj) && !(obj instanceof Uint8Array) ? obj : undefined +} +/** @type {{ [k in string]: (obj:any)=>undefined|any}} */ +const Types = { + 'CarV1HeaderOrV2Pragma > roots (anon) > valueType (anon)': Kinds.Link, + 'CarV1HeaderOrV2Pragma > roots (anon)': /** @returns {undefined|any} */ (/** @type {any} */ obj) => { + if (Kinds.List(obj) === undefined) { + return undefined + } + for (let i = 0; i < obj.length; i++) { + let v = obj[i] + v = Types['CarV1HeaderOrV2Pragma > roots (anon) > valueType (anon)'](v) + if (v === undefined) { + return undefined + } + if (v !== obj[i]) { + const ret = obj.slice(0, i) + for (let j = i; j < obj.length; j++) { + let v = obj[j] + v = Types['CarV1HeaderOrV2Pragma > roots (anon) > valueType (anon)'](v) + if (v === undefined) { + return undefined + } + ret.push(v) + } + return ret + } + } + return obj + }, + Int: Kinds.Int, + CarV1HeaderOrV2Pragma: /** @returns {undefined|any} */ (/** @type {any} */ obj) => { + if (Kinds.Map(obj) === undefined) { + return undefined + } + const entries = Object.entries(obj) + /** @type {{[k in string]: any}} */ + let ret = obj + let requiredCount = 1 + for (let i = 0; i < entries.length; i++) { + const [key, value] = entries[i] + switch (key) { + case 'roots': + { + const v = Types['CarV1HeaderOrV2Pragma > roots (anon)'](obj[key]) + if (v === undefined) { + return undefined + } + if (v !== value || ret !== obj) { + if (ret === obj) { + /** @type {{[k in string]: any}} */ + ret = {} + for (let j = 0; j < i; j++) { + ret[entries[j][0]] = entries[j][1] + } + } + ret.roots = v + } + } + break + case 'version': + { + requiredCount-- + const v = Types.Int(obj[key]) + if (v === undefined) { + return undefined + } + if (v !== value || ret !== obj) { + if (ret === obj) { + /** @type {{[k in string]: any}} */ + ret = {} + for (let j = 0; j < i; j++) { + ret[entries[j][0]] = entries[j][1] + } + } + ret.version = v + } + } + break + default: + return undefined + } + } - // a = (t1 + t2) modulo 2^64 (carry lo overflow) - lo = t1_lo + t2_lo; - a_hi = (t1_hi + t2_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - a_lo = lo >>> 0; + if (requiredCount > 0) { + return undefined + } + return ret + } +} +/** @type {{ [k in string]: (obj:any)=>undefined|any}} */ +const Reprs = { + 'CarV1HeaderOrV2Pragma > roots (anon) > valueType (anon)': Kinds.Link, + 'CarV1HeaderOrV2Pragma > roots (anon)': /** @returns {undefined|any} */ (/** @type {any} */ obj) => { + if (Kinds.List(obj) === undefined) { + return undefined + } + for (let i = 0; i < obj.length; i++) { + let v = obj[i] + v = Reprs['CarV1HeaderOrV2Pragma > roots (anon) > valueType (anon)'](v) + if (v === undefined) { + return undefined + } + if (v !== obj[i]) { + const ret = obj.slice(0, i) + for (let j = i; j < obj.length; j++) { + let v = obj[j] + v = Reprs['CarV1HeaderOrV2Pragma > roots (anon) > valueType (anon)'](v) + if (v === undefined) { + return undefined + } + ret.push(v) + } + return ret + } + } + return obj + }, + Int: Kinds.Int, + CarV1HeaderOrV2Pragma: /** @returns {undefined|any} */ (/** @type {any} */ obj) => { + if (Kinds.Map(obj) === undefined) { + return undefined + } + const entries = Object.entries(obj) + /** @type {{[k in string]: any}} */ + let ret = obj + let requiredCount = 1 + for (let i = 0; i < entries.length; i++) { + const [key, value] = entries[i] + switch (key) { + case 'roots': + { + const v = Reprs['CarV1HeaderOrV2Pragma > roots (anon)'](value) + if (v === undefined) { + return undefined + } + if (v !== value || ret !== obj) { + if (ret === obj) { + /** @type {{[k in string]: any}} */ + ret = {} + for (let j = 0; j < i; j++) { + ret[entries[j][0]] = entries[j][1] + } + } + ret.roots = v + } + } + break + case 'version': + { + requiredCount-- + const v = Reprs.Int(value) + if (v === undefined) { + return undefined + } + if (v !== value || ret !== obj) { + if (ret === obj) { + /** @type {{[k in string]: any}} */ + ret = {} + for (let j = 0; j < i; j++) { + ret[entries[j][0]] = entries[j][1] + } + } + ret.version = v + } + } + break + default: + return undefined + } } + if (requiredCount > 0) { + return undefined + } + return ret + } +} - // update hash state (additional modulo 2^64) - lo = s[0][1] + a_lo; - s[0][0] = (s[0][0] + a_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - s[0][1] = lo >>> 0; +const header_validator_CarV1HeaderOrV2Pragma = { + toTyped: Types.CarV1HeaderOrV2Pragma, + toRepresentation: Reprs.CarV1HeaderOrV2Pragma +} - lo = s[1][1] + b_lo; - s[1][0] = (s[1][0] + b_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - s[1][1] = lo >>> 0; +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/buffer-decoder.js - lo = s[2][1] + c_lo; - s[2][0] = (s[2][0] + c_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - s[2][1] = lo >>> 0; - lo = s[3][1] + d_lo; - s[3][0] = (s[3][0] + d_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - s[3][1] = lo >>> 0; - lo = s[4][1] + e_lo; - s[4][0] = (s[4][0] + e_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - s[4][1] = lo >>> 0; - lo = s[5][1] + f_lo; - s[5][0] = (s[5][0] + f_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - s[5][1] = lo >>> 0; - lo = s[6][1] + g_lo; - s[6][0] = (s[6][0] + g_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - s[6][1] = lo >>> 0; - lo = s[7][1] + h_lo; - s[7][0] = (s[7][0] + h_hi + ((lo / 0x100000000) >>> 0)) >>> 0; - s[7][1] = lo >>> 0; +/** + * @typedef {import('./api').Block} Block + * @typedef {import('./api').BlockHeader} BlockHeader + * @typedef {import('./api').BlockIndex} BlockIndex + * @typedef {import('./coding').BytesBufferReader} BytesBufferReader + * @typedef {import('./coding').CarHeader} CarHeader + * @typedef {import('./coding').CarV2Header} CarV2Header + * @typedef {import('./coding').CarV2FixedHeader} CarV2FixedHeader + */ - len -= 128; +/** + * Reads header data from a `BytesReader`. The header may either be in the form + * of a `CarHeader` or `CarV2Header` depending on the CAR being read. + * + * @name decoder.readHeader(reader) + * @param {BytesBufferReader} reader + * @param {number} [strictVersion] + * @returns {CarHeader | CarV2Header} + */ +function readHeader (reader, strictVersion) { + const length = decodeVarint(reader.upTo(8), reader) + if (length === 0) { + throw new Error('Invalid CAR header (zero length)') + } + const header = reader.exactly(length, true) + const block = decodeDagCbor(header) + if (CarV1HeaderOrV2Pragma.toTyped(block) === undefined) { + throw new Error('Invalid CAR header format') + } + if ((block.version !== 1 && block.version !== 2) || (strictVersion !== undefined && block.version !== strictVersion)) { + throw new Error(`Invalid CAR version: ${block.version}${strictVersion !== undefined ? ` (expected ${strictVersion})` : ''}`) } + if (block.version === 1) { + // CarV1HeaderOrV2Pragma makes roots optional, let's make it mandatory + if (!Array.isArray(block.roots)) { + throw new Error('Invalid CAR header format') + } + return block + } + // version 2 + if (block.roots !== undefined) { + throw new Error('Invalid CAR header format') + } + const v2Header = decodeV2Header(reader.exactly(V2_HEADER_LENGTH, true)) + reader.seek(v2Header.dataOffset - reader.pos) + const v1Header = readHeader(reader, 1) + return Object.assign(v1Header, v2Header) } +/** + * Reads CID sync + * + * @param {BytesBufferReader} reader + * @returns {CID} + */ +function readCid (reader) { + const first = reader.exactly(2, false) + if (first[0] === CIDV0_BYTES.SHA2_256 && first[1] === CIDV0_BYTES.LENGTH) { + // cidv0 32-byte sha2-256 + const bytes = reader.exactly(34, true) + const multihash = Digest.decode(bytes) + return CID.create(0, CIDV0_BYTES.DAG_PB, multihash) + } -/***/ }), + const version = decodeVarint(reader.upTo(8), reader) + if (version !== 1) { + throw new Error(`Unexpected CID version (${version})`) + } + const codec = decodeVarint(reader.upTo(8), reader) + const bytes = reader.exactly(getMultihashLength(reader.upTo(8)), true) + const multihash = Digest.decode(bytes) + return CID.create(version, codec, multihash) +} -/***/ 36536: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/** + * Reads the leading data of an individual block from CAR data from a + * `BytesBufferReader`. Returns a `BlockHeader` object which contains + * `{ cid, length, blockLength }` which can be used to either index the block + * or read the block binary data. + * + * @name async decoder.readBlockHead(reader) + * @param {BytesBufferReader} reader + * @returns {BlockHeader} + */ +function readBlockHead (reader) { + // length includes a CID + Binary, where CID has a variable length + // we have to deal with + const start = reader.pos + let length = decodeVarint(reader.upTo(8), reader) + if (length === 0) { + throw new Error('Invalid CAR section (zero length)') + } + length += (reader.pos - start) + const cid = readCid(reader) + const blockLength = length - Number(reader.pos - start) // subtract CID length + + return { cid, length, blockLength } +} /** - * Utility functions for web applications. - * - * @author Dave Longley + * Returns Car header and blocks from a Uint8Array * - * Copyright (c) 2010-2018 Digital Bazaar, Inc. + * @param {Uint8Array} bytes + * @returns {{ header : CarHeader | CarV2Header , blocks: Block[]}} */ -var forge = __nccwpck_require__(96630); -var baseN = __nccwpck_require__(12390); +function buffer_decoder_fromBytes (bytes) { + let reader = buffer_decoder_bytesReader(bytes) + const header = readHeader(reader) + if (header.version === 2) { + const v1length = reader.pos - header.dataOffset + reader = limitReader(reader, header.dataSize - v1length) + } -/* Utilities API */ -var util = module.exports = forge.util = forge.util || {}; + const blocks = [] + while (reader.upTo(8).length > 0) { + const { cid, blockLength } = readBlockHead(reader) -// define setImmediate and nextTick -(function() { - // use native nextTick (unless we're in webpack) - // webpack (or better node-libs-browser polyfill) sets process.browser. - // this way we can detect webpack properly - if(typeof process !== 'undefined' && process.nextTick && !process.browser) { - util.nextTick = process.nextTick; - if(typeof setImmediate === 'function') { - util.setImmediate = setImmediate; - } else { - // polyfill setImmediate with nextTick, older versions of node - // (those w/o setImmediate) won't totally starve IO - util.setImmediate = util.nextTick; - } - return; + blocks.push({ cid, bytes: reader.exactly(blockLength, true) }) } - // polyfill nextTick with native setImmediate - if(typeof setImmediate === 'function') { - util.setImmediate = function() { return setImmediate.apply(undefined, arguments); }; - util.nextTick = function(callback) { - return setImmediate(callback); - }; - return; + return { + header, blocks } +} - /* Note: A polyfill upgrade pattern is used here to allow combining - polyfills. For example, MutationObserver is fast, but blocks UI updates, - so it needs to allow UI updates periodically, so it falls back on - postMessage or setTimeout. */ +/** + * Creates a `BytesBufferReader` from a `Uint8Array`. + * + * @name decoder.bytesReader(bytes) + * @param {Uint8Array} bytes + * @returns {BytesBufferReader} + */ +function buffer_decoder_bytesReader (bytes) { + let pos = 0 - // polyfill with setTimeout - util.setImmediate = function(callback) { - setTimeout(callback, 0); - }; + /** @type {BytesBufferReader} */ + return { + upTo (length) { + return bytes.subarray(pos, pos + Math.min(length, bytes.length - pos)) + }, - // upgrade polyfill to use postMessage - if(typeof window !== 'undefined' && - typeof window.postMessage === 'function') { - var msg = 'forge.setImmediate'; - var callbacks = []; - util.setImmediate = function(callback) { - callbacks.push(callback); - // only send message when one hasn't been sent in - // the current turn of the event loop - if(callbacks.length === 1) { - window.postMessage(msg, '*'); - } - }; - function handler(event) { - if(event.source === window && event.data === msg) { - event.stopPropagation(); - var copy = callbacks.slice(); - callbacks.length = 0; - copy.forEach(function(callback) { - callback(); - }); + exactly (length, seek = false) { + if (length > bytes.length - pos) { + throw new Error('Unexpected end of data') } - } - window.addEventListener('message', handler, true); - } - // upgrade polyfill to use MutationObserver - if(typeof MutationObserver !== 'undefined') { - // polyfill with MutationObserver - var now = Date.now(); - var attr = true; - var div = document.createElement('div'); - var callbacks = []; - new MutationObserver(function() { - var copy = callbacks.slice(); - callbacks.length = 0; - copy.forEach(function(callback) { - callback(); - }); - }).observe(div, {attributes: true}); - var oldSetImmediate = util.setImmediate; - util.setImmediate = function(callback) { - if(Date.now() - now > 15) { - now = Date.now(); - oldSetImmediate(callback); - } else { - callbacks.push(callback); - // only trigger observer when it hasn't been triggered in - // the current turn of the event loop - if(callbacks.length === 1) { - div.setAttribute('a', attr = !attr); - } + const out = bytes.subarray(pos, pos + length) + if (seek) { + pos += length } - }; + return out + }, + + seek (length) { + pos += length + }, + + get pos () { + return pos + } } +} - util.nextTick = util.setImmediate; -})(); +/** + * Wraps a `BytesBufferReader` in a limiting `BytesBufferReader` which limits maximum read + * to `byteLimit` bytes. It _does not_ update `pos` of the original + * `BytesBufferReader`. + * + * @name decoder.limitReader(reader, byteLimit) + * @param {BytesBufferReader} reader + * @param {number} byteLimit + * @returns {BytesBufferReader} + */ +function limitReader (reader, byteLimit) { + let bytesRead = 0 -// check if running under Node.js -util.isNodejs = - typeof process !== 'undefined' && process.versions && process.versions.node; + /** @type {BytesBufferReader} */ + return { + upTo (length) { + let bytes = reader.upTo(length) + if (bytes.length + bytesRead > byteLimit) { + bytes = bytes.subarray(0, byteLimit - bytesRead) + } + return bytes + }, + + exactly (length, seek = false) { + const bytes = reader.exactly(length, seek) + if (bytes.length + bytesRead > byteLimit) { + throw new Error('Unexpected end of data') + } + if (seek) { + bytesRead += length + } + return bytes + }, + seek (length) { + bytesRead += length + reader.seek(length) + }, -// 'self' will also work in Web Workers (instance of WorkerGlobalScope) while -// it will point to `window` in the main thread. -// To remain compatible with older browsers, we fall back to 'window' if 'self' -// is not available. -util.globalScope = (function() { - if(util.isNodejs) { - return global; + get pos () { + return reader.pos + } } +} - return typeof self === 'undefined' ? window : self; -})(); - -// define isArray -util.isArray = Array.isArray || function(x) { - return Object.prototype.toString.call(x) === '[object Array]'; -}; +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/buffer-reader-browser.js -// define isArrayBuffer -util.isArrayBuffer = function(x) { - return typeof ArrayBuffer !== 'undefined' && x instanceof ArrayBuffer; -}; -// define isArrayBufferView -util.isArrayBufferView = function(x) { - return x && util.isArrayBuffer(x.buffer) && x.byteLength !== undefined; -}; +/** + * @typedef {import('multiformats').CID} CID + * @typedef {import('./api').Block} Block + * @typedef {import('./api').CarBufferReader} ICarBufferReader + * @typedef {import('./coding').CarHeader} CarHeader + * @typedef {import('./coding').CarV2Header} CarV2Header + */ /** - * Ensure a bits param is 8, 16, 24, or 32. Used to validate input for - * algorithms where bit manipulation, JavaScript limitations, and/or algorithm - * design only allow for byte operations of a limited size. + * Provides blockstore-like access to a CAR. * - * @param n number of bits. + * Implements the `RootsBufferReader` interface: + * {@link ICarBufferReader.getRoots `getRoots()`}. And the `BlockBufferReader` interface: + * {@link ICarBufferReader.get `get()`}, {@link ICarBufferReader.has `has()`}, + * {@link ICarBufferReader.blocks `blocks()`} and + * {@link ICarBufferReader.cids `cids()`}. * - * Throw Error if n invalid. + * Load this class with either `import { CarBufferReader } from '@ipld/car/buffer-reader'` + * (`const { CarBufferReader } = require('@ipld/car/buffer-reader')`). Or + * `import { CarBufferReader } from '@ipld/car'` (`const { CarBufferReader } = require('@ipld/car')`). + * The former will likely result in smaller bundle sizes where this is + * important. + * + * @name CarBufferReader + * @class + * @implements {ICarBufferReader} + * @property {number} version The version number of the CAR referenced by this + * reader (should be `1` or `2`). */ -function _checkBitsParam(n) { - if(!(n === 8 || n === 16 || n === 24 || n === 32)) { - throw new Error('Only 8, 16, 24, or 32 bits supported: ' + n); +class CarBufferReader { + /** + * @constructs CarBufferReader + * @param {CarHeader|CarV2Header} header + * @param {Block[]} blocks + */ + constructor (header, blocks) { + this._header = header + this._blocks = blocks + this._cids = undefined + } + + /** + * @property version + * @memberof CarBufferReader + * @instance + */ + get version () { + return this._header.version + } + + /** + * Get the list of roots defined by the CAR referenced by this reader. May be + * zero or more `CID`s. + * + * @function + * @memberof CarBufferReader + * @instance + * @returns {CID[]} + */ + getRoots () { + return this._header.roots + } + + /** + * Check whether a given `CID` exists within the CAR referenced by this + * reader. + * + * @function + * @memberof CarBufferReader + * @instance + * @param {CID} key + * @returns {boolean} + */ + has (key) { + return this._blocks.some(b => b.cid.equals(key)) + } + + /** + * Fetch a `Block` (a `{ cid:CID, bytes:Uint8Array }` pair) from the CAR + * referenced by this reader matching the provided `CID`. In the case where + * the provided `CID` doesn't exist within the CAR, `undefined` will be + * returned. + * + * @function + * @memberof CarBufferReader + * @instance + * @param {CID} key + * @returns {Block | undefined} + */ + get (key) { + return this._blocks.find(b => b.cid.equals(key)) + } + + /** + * Returns a `Block[]` of the `Block`s (`{ cid:CID, bytes:Uint8Array }` pairs) contained within + * the CAR referenced by this reader. + * + * @function + * @memberof CarBufferReader + * @instance + * @returns {Block[]} + */ + blocks () { + return this._blocks + } + + /** + * Returns a `CID[]` of the `CID`s contained within the CAR referenced by this reader. + * + * @function + * @memberof CarBufferReader + * @instance + * @returns {CID[]} + */ + cids () { + if (!this._cids) { + this._cids = this._blocks.map(b => b.cid) + } + return this._cids + } + + /** + * Instantiate a {@link CarBufferReader} from a `Uint8Array` blob. This performs a + * decode fully in memory and maintains the decoded state in memory for full + * access to the data via the `CarReader` API. + * + * @static + * @memberof CarBufferReader + * @param {Uint8Array} bytes + * @returns {CarBufferReader} + */ + static fromBytes (bytes) { + if (!(bytes instanceof Uint8Array)) { + throw new TypeError('fromBytes() requires a Uint8Array') + } + + const { header, blocks } = BufferDecoder.fromBytes(bytes) + return new CarBufferReader(header, blocks) } } -// TODO: set ByteBuffer to best available backing -util.ByteBuffer = ByteStringBuffer; +const __browser = true + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/buffer-reader.js + -/** Buffer w/BinaryString backing */ /** - * Constructor for a binary string backed byte buffer. - * - * @param [b] the bytes to wrap (either encoded as string, one byte per - * character, or as an ArrayBuffer or Typed Array). + * @typedef {import('./api').Block} Block + * @typedef {import('./api').BlockIndex} BlockIndex + * @typedef {import('./api').CarBufferReader} ICarBufferReader */ -function ByteStringBuffer(b) { - // TODO: update to match DataBuffer API - // the data in this buffer - this.data = ''; - // the pointer for reading from this buffer - this.read = 0; +const fsread = external_fs_.readSync - if(typeof b === 'string') { - this.data = b; - } else if(util.isArrayBuffer(b) || util.isArrayBufferView(b)) { - if(typeof Buffer !== 'undefined' && b instanceof Buffer) { - this.data = b.toString('binary'); +/** + * @class + * @implements {ICarBufferReader} + */ +class buffer_reader_CarBufferReader extends (/* unused pure expression or super */ null && (BrowserCarBufferReader)) { + /** + * Reads a block directly from a file descriptor for an open CAR file. This + * function is **only available in Node.js** and not a browser environment. + * + * This function can be used in connection with {@link CarIndexer} which emits + * the `BlockIndex` objects that are required by this function. + * + * The user is responsible for opening and closing the file used in this call. + * + * @static + * @memberof CarBufferReader + * @param {number} fd - A file descriptor from the + * Node.js `fs` module. An integer, from `fs.open()`. + * @param {BlockIndex} blockIndex - An index pointing to the location of the + * Block required. This `BlockIndex` should take the form: + * `{cid:CID, blockLength:number, blockOffset:number}`. + * @returns {Block} A `{ cid:CID, bytes:Uint8Array }` pair. + */ + static readRaw (fd, blockIndex) { + const { cid, blockLength, blockOffset } = blockIndex + const bytes = new Uint8Array(blockLength) + let read + if (typeof fd === 'number') { + read = fsread(fd, bytes, 0, blockLength, blockOffset) } else { - // convert native buffer to forge buffer - // FIXME: support native buffers internally instead - var arr = new Uint8Array(b); - try { - this.data = String.fromCharCode.apply(null, arr); - } catch(e) { - for(var i = 0; i < arr.length; ++i) { - this.putByte(arr[i]); - } - } + throw new TypeError('Bad fd') } - } else if(b instanceof ByteStringBuffer || - (typeof b === 'object' && typeof b.data === 'string' && - typeof b.read === 'number')) { - // copy existing buffer - this.data = b.data; - this.read = b.read; + if (read !== blockLength) { + throw new Error(`Failed to read entire block (${read} instead of ${blockLength})`) + } + return { cid, bytes } } +} - // used for v8 optimization - this._constructedStringLength = 0; +const buffer_reader_browser = false + +;// CONCATENATED MODULE: ./node_modules/cborg/lib/length.js + + + +/** + * @typedef {import('../interface').EncodeOptions} EncodeOptions + * @typedef {import('../interface').TokenTypeEncoder} TokenTypeEncoder + * @typedef {import('../interface').TokenOrNestedTokens} TokenOrNestedTokens + */ + +const length_cborEncoders = makeCborEncoders() + +/** @type {EncodeOptions} */ +const length_defaultEncodeOptions = { + float64: false, + quickEncodeToken: quickEncodeToken } -util.ByteStringBuffer = ByteStringBuffer; -/* Note: This is an optimization for V8-based browsers. When V8 concatenates - a string, the strings are only joined logically using a "cons string" or - "constructed/concatenated string". These containers keep references to one - another and can result in very large memory usage. For example, if a 2MB - string is constructed by concatenating 4 bytes together at a time, the - memory usage will be ~44MB; so ~22x increase. The strings are only joined - together when an operation requiring their joining takes place, such as - substr(). This function is called when adding data to this buffer to ensure - these types of strings are periodically joined to reduce the memory - footprint. */ -var _MAX_CONSTRUCTED_STRING_LENGTH = 4096; -util.ByteStringBuffer.prototype._optimizeConstructedString = function(x) { - this._constructedStringLength += x; - if(this._constructedStringLength > _MAX_CONSTRUCTED_STRING_LENGTH) { - // this substr() should cause the constructed string to join - this.data.substr(0, 1); - this._constructedStringLength = 0; - } -}; +/** + * Calculate the byte length of the given data when encoded as CBOR with the + * options provided. + * This calculation will be accurate if the same options are used as when + * performing a normal encode. Some encode options can change the encoding + * output length. + * + * @param {any} data + * @param {EncodeOptions} [options] + * @returns {number} + */ +function encodedLength (data, options) { + options = Object.assign({}, length_defaultEncodeOptions, options) + options.mapSorter = undefined // won't change the length + const tokens = objectToTokens(data, options) + return length_tokensToLength(tokens, length_cborEncoders, options) +} /** - * Gets the number of bytes in this buffer. - * - * @return the number of bytes in this buffer. + * Calculate the byte length of the data as represented by the given tokens when + * encoded as CBOR with the options provided. + * This function is for advanced users and would not normally be called + * directly. See `encodedLength()` for appropriate use. + * + * @param {TokenOrNestedTokens} tokens + * @param {TokenTypeEncoder[]} [encoders] + * @param {EncodeOptions} [options] */ -util.ByteStringBuffer.prototype.length = function() { - return this.data.length - this.read; -}; +function length_tokensToLength (tokens, encoders = length_cborEncoders, options = length_defaultEncodeOptions) { + if (Array.isArray(tokens)) { + let len = 0 + for (const token of tokens) { + len += length_tokensToLength(token, encoders, options) + } + return len + } else { + const encoder = encoders[tokens.type.major] + /* c8 ignore next 3 */ + if (encoder.encodedSize === undefined || typeof encoder.encodedSize !== 'function') { + throw new Error(`Encoder for ${tokens.type.name} does not have an encodedSize()`) + } + return encoder.encodedSize(tokens, options) + } +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/buffer-writer.js + + + + /** - * Gets whether or not this buffer is empty. - * - * @return true if this buffer is empty, false if not. + * @typedef {import('./api').CID} CID + * @typedef {import('./api').Block} Block + * @typedef {import('./api').CarBufferWriter} Writer + * @typedef {import('./api').CarBufferWriterOptions} Options + * @typedef {import('./coding').CarEncoder} CarEncoder */ -util.ByteStringBuffer.prototype.isEmpty = function() { - return this.length() <= 0; -}; /** - * Puts a byte in this buffer. - * - * @param b the byte to put. + * A simple CAR writer that writes to a pre-allocated buffer. * - * @return this buffer. + * @class + * @name CarBufferWriter + * @implements {Writer} */ -util.ByteStringBuffer.prototype.putByte = function(b) { - return this.putBytes(String.fromCharCode(b)); -}; +class CarBufferWriter { + /** + * @param {Uint8Array} bytes + * @param {number} headerSize + */ + constructor (bytes, headerSize) { + /** @readonly */ + this.bytes = bytes + this.byteOffset = headerSize + + /** + * @readonly + * @type {CID[]} + */ + this.roots = [] + this.headerSize = headerSize + } + + /** + * Add a root to this writer, to be used to create a header when the CAR is + * finalized with {@link CarBufferWriter.close `close()`} + * + * @param {CID} root + * @param {{resize?:boolean}} [options] + * @returns {CarBufferWriter} + */ + addRoot (root, options) { + addRoot(this, root, options) + return this + } + + /** + * Write a `Block` (a `{ cid:CID, bytes:Uint8Array }` pair) to the archive. + * Throws if there is not enough capacity. + * + * @param {Block} block - A `{ cid:CID, bytes:Uint8Array }` pair. + * @returns {CarBufferWriter} + */ + write (block) { + addBlock(this, block) + return this + } + + /** + * Finalize the CAR and return it as a `Uint8Array`. + * + * @param {object} [options] + * @param {boolean} [options.resize] + * @returns {Uint8Array} + */ + close (options) { + return buffer_writer_close(this, options) + } +} /** - * Puts a byte in this buffer N times. - * - * @param b the byte to put. - * @param n the number of bytes of value b to put. - * - * @return this buffer. + * @param {CarBufferWriter} writer + * @param {CID} root + * @param {{resize?:boolean}} [options] */ -util.ByteStringBuffer.prototype.fillWithByte = function(b, n) { - b = String.fromCharCode(b); - var d = this.data; - while(n > 0) { - if(n & 1) { - d += b; - } - n >>>= 1; - if(n > 0) { - b += b; +const addRoot = (writer, root, options = {}) => { + const { resize = false } = options + const { bytes, headerSize, byteOffset, roots } = writer + writer.roots.push(root) + const size = headerLength(writer) + // If there is not enough space for the new root + if (size > headerSize) { + // Check if we root would fit if we were to resize the head. + if (size - headerSize + byteOffset < bytes.byteLength) { + // If resize is enabled resize head + if (resize) { + resizeHeader(writer, size) + // otherwise remove head and throw an error suggesting to resize + } else { + roots.pop() + throw new RangeError(`Header of size ${headerSize} has no capacity for new root ${root}. + However there is a space in the buffer and you could call addRoot(root, { resize: root }) to resize header to make a space for this root.`) + } + // If head would not fit even with resize pop new root and throw error + } else { + roots.pop() + throw new RangeError(`Buffer has no capacity for a new root ${root}`) } } - this.data = d; - this._optimizeConstructedString(n); - return this; -}; +} /** - * Puts bytes in this buffer. - * - * @param bytes the bytes (as a binary encoded string) to put. + * Calculates number of bytes required for storing given block in CAR. Useful in + * estimating size of an `ArrayBuffer` for the `CarBufferWriter`. * - * @return this buffer. + * @name CarBufferWriter.blockLength(Block) + * @param {Block} block + * @returns {number} */ -util.ByteStringBuffer.prototype.putBytes = function(bytes) { - this.data += bytes; - this._optimizeConstructedString(bytes.length); - return this; -}; +const blockLength = ({ cid, bytes }) => { + const size = cid.bytes.byteLength + bytes.byteLength + return varint.encodingLength(size) + size +} /** - * Puts a UTF-16 encoded string into this buffer. - * - * @param str the string to put. - * - * @return this buffer. + * @param {CarBufferWriter} writer + * @param {Block} block */ -util.ByteStringBuffer.prototype.putString = function(str) { - return this.putBytes(util.encodeUtf8(str)); -}; +const addBlock = (writer, { cid, bytes }) => { + const byteLength = cid.bytes.byteLength + bytes.byteLength + const size = varint.encode(byteLength) + if (writer.byteOffset + size.length + byteLength > writer.bytes.byteLength) { + throw new RangeError('Buffer has no capacity for this block') + } else { + writeBytes(writer, size) + writeBytes(writer, cid.bytes) + writeBytes(writer, bytes) + } +} /** - * Puts a 16-bit integer in this buffer in big-endian order. - * - * @param i the 16-bit integer. - * - * @return this buffer. + * @param {CarBufferWriter} writer + * @param {object} [options] + * @param {boolean} [options.resize] */ -util.ByteStringBuffer.prototype.putInt16 = function(i) { - return this.putBytes( - String.fromCharCode(i >> 8 & 0xFF) + - String.fromCharCode(i & 0xFF)); -}; +const buffer_writer_close = (writer, options = {}) => { + const { resize = false } = options + const { roots, bytes, byteOffset, headerSize } = writer + + const headerBytes = CBOR.encode({ version: 1, roots }) + const varintBytes = varint.encode(headerBytes.length) + + const size = varintBytes.length + headerBytes.byteLength + const offset = headerSize - size + + // If header size estimate was accurate we just write header and return + // view into buffer. + if (offset === 0) { + writeHeader(writer, varintBytes, headerBytes) + return bytes.subarray(0, byteOffset) + // If header was overestimated and `{resize: true}` is passed resize header + } else if (resize) { + resizeHeader(writer, size) + writeHeader(writer, varintBytes, headerBytes) + return bytes.subarray(0, writer.byteOffset) + } else { + throw new RangeError(`Header size was overestimated. +You can use close({ resize: true }) to resize header`) + } +} /** - * Puts a 24-bit integer in this buffer in big-endian order. - * - * @param i the 24-bit integer. - * - * @return this buffer. + * @param {CarBufferWriter} writer + * @param {number} byteLength */ -util.ByteStringBuffer.prototype.putInt24 = function(i) { - return this.putBytes( - String.fromCharCode(i >> 16 & 0xFF) + - String.fromCharCode(i >> 8 & 0xFF) + - String.fromCharCode(i & 0xFF)); -}; +const resizeHeader = (writer, byteLength) => { + const { bytes, headerSize } = writer + // Move data section to a new offset + bytes.set(bytes.subarray(headerSize, writer.byteOffset), byteLength) + // Update header size & byteOffset + writer.byteOffset += byteLength - headerSize + writer.headerSize = byteLength +} /** - * Puts a 32-bit integer in this buffer in big-endian order. - * - * @param i the 32-bit integer. - * - * @return this buffer. + * @param {CarBufferWriter} writer + * @param {number[]|Uint8Array} bytes */ -util.ByteStringBuffer.prototype.putInt32 = function(i) { - return this.putBytes( - String.fromCharCode(i >> 24 & 0xFF) + - String.fromCharCode(i >> 16 & 0xFF) + - String.fromCharCode(i >> 8 & 0xFF) + - String.fromCharCode(i & 0xFF)); -}; +const writeBytes = (writer, bytes) => { + writer.bytes.set(bytes, writer.byteOffset) + writer.byteOffset += bytes.length +} /** - * Puts a 16-bit integer in this buffer in little-endian order. - * - * @param i the 16-bit integer. - * - * @return this buffer. + * @param {{bytes:Uint8Array}} writer + * @param {number[]} varint + * @param {Uint8Array} header */ -util.ByteStringBuffer.prototype.putInt16Le = function(i) { - return this.putBytes( - String.fromCharCode(i & 0xFF) + - String.fromCharCode(i >> 8 & 0xFF)); -}; +const writeHeader = ({ bytes }, varint, header) => { + bytes.set(varint) + bytes.set(header, varint.length) +} + +const headerPreludeTokens = [ + new token_Token(token_Type.map, 2), + new token_Token(token_Type.string, 'version'), + new token_Token(token_Type.uint, 1), + new token_Token(token_Type.string, 'roots') +] + +const CID_TAG = new token_Token(token_Type.tag, 42) /** - * Puts a 24-bit integer in this buffer in little-endian order. - * - * @param i the 24-bit integer. + * Calculates header size given the array of byteLength for roots. * - * @return this buffer. + * @name CarBufferWriter.calculateHeaderLength(rootLengths) + * @param {number[]} rootLengths + * @returns {number} */ -util.ByteStringBuffer.prototype.putInt24Le = function(i) { - return this.putBytes( - String.fromCharCode(i & 0xFF) + - String.fromCharCode(i >> 8 & 0xFF) + - String.fromCharCode(i >> 16 & 0xFF)); -}; +const calculateHeaderLength = (rootLengths) => { + const tokens = [...headerPreludeTokens] + tokens.push(new Token(Type.array, rootLengths.length)) + for (const rootLength of rootLengths) { + tokens.push(CID_TAG) + tokens.push(new Token(Type.bytes, { length: rootLength + 1 })) + } + const length = tokensToLength(tokens) // no options needed here because we have simple tokens + return varint.encodingLength(length) + length +} /** - * Puts a 32-bit integer in this buffer in little-endian order. - * - * @param i the 32-bit integer. + * Calculates header size given the array of roots. * - * @return this buffer. + * @name CarBufferWriter.headerLength({ roots }) + * @param {object} options + * @param {CID[]} options.roots + * @returns {number} */ -util.ByteStringBuffer.prototype.putInt32Le = function(i) { - return this.putBytes( - String.fromCharCode(i & 0xFF) + - String.fromCharCode(i >> 8 & 0xFF) + - String.fromCharCode(i >> 16 & 0xFF) + - String.fromCharCode(i >> 24 & 0xFF)); -}; +const headerLength = ({ roots }) => + calculateHeaderLength(roots.map(cid => cid.bytes.byteLength)) /** - * Puts an n-bit integer in this buffer in big-endian order. - * - * @param i the n-bit integer. - * @param n the number of bits in the integer (8, 16, 24, or 32). + * Estimates header size given a count of the roots and the expected byte length + * of the root CIDs. The default length works for a standard CIDv1 with a + * single-byte multihash code, such as SHA2-256 (i.e. the most common CIDv1). * - * @return this buffer. + * @name CarBufferWriter.estimateHeaderLength(rootCount[, rootByteLength]) + * @param {number} rootCount + * @param {number} [rootByteLength] + * @returns {number} */ -util.ByteStringBuffer.prototype.putInt = function(i, n) { - _checkBitsParam(n); - var bytes = ''; - do { - n -= 8; - bytes += String.fromCharCode((i >> n) & 0xFF); - } while(n > 0); - return this.putBytes(bytes); -}; +const estimateHeaderLength = (rootCount, rootByteLength = 36) => + calculateHeaderLength(new Array(rootCount).fill(rootByteLength)) /** - * Puts a signed n-bit integer in this buffer in big-endian order. Two's - * complement representation is used. - * - * @param i the n-bit integer. - * @param n the number of bits in the integer (8, 16, 24, or 32). - * - * @return this buffer. + * Creates synchronous CAR writer that can be used to encode blocks into a given + * buffer. Optionally you could pass `byteOffset` and `byteLength` to specify a + * range inside buffer to write into. If car file is going to have `roots` you + * need to either pass them under `options.roots` (from which header size will + * be calculated) or provide `options.headerSize` to allocate required space + * in the buffer. You may also provide known `roots` and `headerSize` to + * allocate space for the roots that may not be known ahead of time. + * + * Note: Incorrect `headerSize` may lead to copying bytes inside a buffer + * which will have a negative impact on performance. + * + * @name CarBufferWriter.createWriter(buffer[, options]) + * @param {ArrayBuffer} buffer + * @param {object} [options] + * @param {CID[]} [options.roots] + * @param {number} [options.byteOffset] + * @param {number} [options.byteLength] + * @param {number} [options.headerSize] + * @returns {CarBufferWriter} */ -util.ByteStringBuffer.prototype.putSignedInt = function(i, n) { - // putInt checks n - if(i < 0) { - i += 2 << (n - 1); +const createWriter = (buffer, options = {}) => { + const { + roots = [], + byteOffset = 0, + byteLength = buffer.byteLength, + headerSize = headerLength({ roots }) + } = options + const bytes = new Uint8Array(buffer, byteOffset, byteLength) + + const writer = new CarBufferWriter(bytes, headerSize) + for (const root of roots) { + writer.addRoot(root) } - return this.putInt(i, n); -}; + + return writer +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/decoder.js + + + + + /** - * Puts the given buffer into this buffer. - * - * @param buffer the buffer to put into this one. - * - * @return this buffer. + * @typedef {import('./api').Block} Block + * @typedef {import('./api').BlockHeader} BlockHeader + * @typedef {import('./api').BlockIndex} BlockIndex + * @typedef {import('./coding').BytesReader} BytesReader + * @typedef {import('./coding').CarHeader} CarHeader + * @typedef {import('./coding').CarV2Header} CarV2Header + * @typedef {import('./coding').CarV2FixedHeader} CarV2FixedHeader + * @typedef {import('./coding').CarDecoder} CarDecoder */ -util.ByteStringBuffer.prototype.putBuffer = function(buffer) { - return this.putBytes(buffer.getBytes()); -}; /** - * Gets a byte from this buffer and advances the read pointer by 1. + * Reads header data from a `BytesReader`. The header may either be in the form + * of a `CarHeader` or `CarV2Header` depending on the CAR being read. * - * @return the byte. + * @name async decoder.readHeader(reader) + * @param {BytesReader} reader + * @param {number} [strictVersion] + * @returns {Promise} */ -util.ByteStringBuffer.prototype.getByte = function() { - return this.data.charCodeAt(this.read++); -}; +async function decoder_readHeader (reader, strictVersion) { + const length = decoder_common_decodeVarint(await reader.upTo(8), reader) + if (length === 0) { + throw new Error('Invalid CAR header (zero length)') + } + const header = await reader.exactly(length, true) + const block = dag_cbor_src_decode(header) + if (header_validator_CarV1HeaderOrV2Pragma.toTyped(block) === undefined) { + throw new Error('Invalid CAR header format') + } + if ((block.version !== 1 && block.version !== 2) || (strictVersion !== undefined && block.version !== strictVersion)) { + throw new Error(`Invalid CAR version: ${block.version}${strictVersion !== undefined ? ` (expected ${strictVersion})` : ''}`) + } + if (block.version === 1) { + // CarV1HeaderOrV2Pragma makes roots optional, let's make it mandatory + if (!Array.isArray(block.roots)) { + throw new Error('Invalid CAR header format') + } + return block + } + // version 2 + if (block.roots !== undefined) { + throw new Error('Invalid CAR header format') + } + const v2Header = decoder_common_decodeV2Header(await reader.exactly(decoder_common_V2_HEADER_LENGTH, true)) + reader.seek(v2Header.dataOffset - reader.pos) + const v1Header = await decoder_readHeader(reader, 1) + return Object.assign(v1Header, v2Header) +} /** - * Gets a uint16 from this buffer in big-endian order and advances the read - * pointer by 2. - * - * @return the uint16. + * @param {BytesReader} reader + * @returns {Promise} */ -util.ByteStringBuffer.prototype.getInt16 = function() { - var rval = ( - this.data.charCodeAt(this.read) << 8 ^ - this.data.charCodeAt(this.read + 1)); - this.read += 2; - return rval; -}; +async function decoder_readCid (reader) { + const first = await reader.exactly(2, false) + if (first[0] === CIDV0_BYTES.SHA2_256 && first[1] === CIDV0_BYTES.LENGTH) { + // cidv0 32-byte sha2-256 + const bytes = await reader.exactly(34, true) + const multihash = Digest.decode(bytes) + return CID.create(0, CIDV0_BYTES.DAG_PB, multihash) + } + + const version = decodeVarint(await reader.upTo(8), reader) + if (version !== 1) { + throw new Error(`Unexpected CID version (${version})`) + } + const codec = decodeVarint(await reader.upTo(8), reader) + const bytes = await reader.exactly(getMultihashLength(await reader.upTo(8)), true) + const multihash = Digest.decode(bytes) + return CID.create(version, codec, multihash) +} /** - * Gets a uint24 from this buffer in big-endian order and advances the read - * pointer by 3. - * - * @return the uint24. + * Reads the leading data of an individual block from CAR data from a + * `BytesReader`. Returns a `BlockHeader` object which contains + * `{ cid, length, blockLength }` which can be used to either index the block + * or read the block binary data. + * + * @name async decoder.readBlockHead(reader) + * @param {BytesReader} reader + * @returns {Promise} */ -util.ByteStringBuffer.prototype.getInt24 = function() { - var rval = ( - this.data.charCodeAt(this.read) << 16 ^ - this.data.charCodeAt(this.read + 1) << 8 ^ - this.data.charCodeAt(this.read + 2)); - this.read += 3; - return rval; -}; +async function decoder_readBlockHead (reader) { + // length includes a CID + Binary, where CID has a variable length + // we have to deal with + const start = reader.pos + let length = decodeVarint(await reader.upTo(8), reader) + if (length === 0) { + throw new Error('Invalid CAR section (zero length)') + } + length += (reader.pos - start) + const cid = await decoder_readCid(reader) + const blockLength = length - Number(reader.pos - start) // subtract CID length + + return { cid, length, blockLength } +} /** - * Gets a uint32 from this buffer in big-endian order and advances the read - * pointer by 4. - * - * @return the word. + * @param {BytesReader} reader + * @returns {Promise} */ -util.ByteStringBuffer.prototype.getInt32 = function() { - var rval = ( - this.data.charCodeAt(this.read) << 24 ^ - this.data.charCodeAt(this.read + 1) << 16 ^ - this.data.charCodeAt(this.read + 2) << 8 ^ - this.data.charCodeAt(this.read + 3)); - this.read += 4; - return rval; -}; +async function readBlock (reader) { + const { cid, blockLength } = await decoder_readBlockHead(reader) + const bytes = await reader.exactly(blockLength, true) + return { bytes, cid } +} /** - * Gets a uint16 from this buffer in little-endian order and advances the read - * pointer by 2. - * - * @return the uint16. + * @param {BytesReader} reader + * @returns {Promise} */ -util.ByteStringBuffer.prototype.getInt16Le = function() { - var rval = ( - this.data.charCodeAt(this.read) ^ - this.data.charCodeAt(this.read + 1) << 8); - this.read += 2; - return rval; -}; +async function readBlockIndex (reader) { + const offset = reader.pos + const { cid, length, blockLength } = await decoder_readBlockHead(reader) + const index = { cid, length, blockLength, offset, blockOffset: reader.pos } + reader.seek(index.blockLength) + return index +} /** - * Gets a uint24 from this buffer in little-endian order and advances the read - * pointer by 3. + * Creates a `CarDecoder` from a `BytesReader`. The `CarDecoder` is as async + * interface that will consume the bytes from the `BytesReader` to yield a + * `header()` and either `blocks()` or `blocksIndex()` data. * - * @return the uint24. + * @name decoder.createDecoder(reader) + * @param {BytesReader} reader + * @returns {CarDecoder} */ -util.ByteStringBuffer.prototype.getInt24Le = function() { - var rval = ( - this.data.charCodeAt(this.read) ^ - this.data.charCodeAt(this.read + 1) << 8 ^ - this.data.charCodeAt(this.read + 2) << 16); - this.read += 3; - return rval; -}; +function decoder_createDecoder (reader) { + const headerPromise = (async () => { + const header = await decoder_readHeader(reader) + if (header.version === 2) { + const v1length = reader.pos - header.dataOffset + reader = decoder_limitReader(reader, header.dataSize - v1length) + } + return header + })() + + return { + header: () => headerPromise, + + async * blocks () { + await headerPromise + while ((await reader.upTo(8)).length > 0) { + yield await readBlock(reader) + } + }, + + async * blocksIndex () { + await headerPromise + while ((await reader.upTo(8)).length > 0) { + yield await readBlockIndex(reader) + } + } + } +} /** - * Gets a uint32 from this buffer in little-endian order and advances the read - * pointer by 4. + * Creates a `BytesReader` from a `Uint8Array`. * - * @return the word. + * @name decoder.bytesReader(bytes) + * @param {Uint8Array} bytes + * @returns {BytesReader} */ -util.ByteStringBuffer.prototype.getInt32Le = function() { - var rval = ( - this.data.charCodeAt(this.read) ^ - this.data.charCodeAt(this.read + 1) << 8 ^ - this.data.charCodeAt(this.read + 2) << 16 ^ - this.data.charCodeAt(this.read + 3) << 24); - this.read += 4; - return rval; -}; +function decoder_bytesReader (bytes) { + let pos = 0 + + /** @type {BytesReader} */ + return { + async upTo (length) { + const out = bytes.subarray(pos, pos + Math.min(length, bytes.length - pos)) + return out + }, + + async exactly (length, seek = false) { + if (length > bytes.length - pos) { + throw new Error('Unexpected end of data') + } + const out = bytes.subarray(pos, pos + length) + if (seek) { + pos += length + } + return out + }, + + seek (length) { + pos += length + }, + + get pos () { + return pos + } + } +} /** - * Gets an n-bit integer from this buffer in big-endian order and advances the - * read pointer by ceil(n/8). - * - * @param n the number of bits in the integer (8, 16, 24, or 32). - * - * @return the integer. + * @ignore + * reusable reader for streams and files, we just need a way to read an + * additional chunk (of some undetermined size) and a way to close the + * reader when finished + * @param {() => Promise} readChunk + * @returns {BytesReader} */ -util.ByteStringBuffer.prototype.getInt = function(n) { - _checkBitsParam(n); - var rval = 0; - do { - // TODO: Use (rval * 0x100) if adding support for 33 to 53 bits. - rval = (rval << 8) + this.data.charCodeAt(this.read++); - n -= 8; - } while(n > 0); - return rval; -}; +function chunkReader (readChunk /*, closer */) { + let pos = 0 + let have = 0 + let offset = 0 + let currentChunk = new Uint8Array(0) + + const read = async (/** @type {number} */ length) => { + have = currentChunk.length - offset + const bufa = [currentChunk.subarray(offset)] + while (have < length) { + const chunk = await readChunk() + if (chunk == null) { + break + } + /* c8 ignore next 8 */ + // undo this ignore ^ when we have a fd implementation that can seek() + if (have < 0) { // because of a seek() + /* c8 ignore next 4 */ + // toohard to test the else + if (chunk.length > have) { + bufa.push(chunk.subarray(-have)) + } // else discard + } else { + bufa.push(chunk) + } + have += chunk.length + } + currentChunk = new Uint8Array(bufa.reduce((p, c) => p + c.length, 0)) + let off = 0 + for (const b of bufa) { + currentChunk.set(b, off) + off += b.length + } + offset = 0 + } + + /** @type {BytesReader} */ + return { + async upTo (length) { + if (currentChunk.length - offset < length) { + await read(length) + } + return currentChunk.subarray(offset, offset + Math.min(currentChunk.length - offset, length)) + }, + + async exactly (length, seek = false) { + if (currentChunk.length - offset < length) { + await read(length) + } + if (currentChunk.length - offset < length) { + throw new Error('Unexpected end of data') + } + const out = currentChunk.subarray(offset, offset + length) + if (seek) { + pos += length + offset += length + } + return out + }, + + seek (length) { + pos += length + offset += length + }, + + get pos () { + return pos + } + } +} /** - * Gets a signed n-bit integer from this buffer in big-endian order, using - * two's complement, and advances the read pointer by n/8. - * - * @param n the number of bits in the integer (8, 16, 24, or 32). + * Creates a `BytesReader` from an `AsyncIterable`, which allows for + * consumption of CAR data from a streaming source. * - * @return the integer. + * @name decoder.asyncIterableReader(asyncIterable) + * @param {AsyncIterable} asyncIterable + * @returns {BytesReader} */ -util.ByteStringBuffer.prototype.getSignedInt = function(n) { - // getInt checks n - var x = this.getInt(n); - var max = 2 << (n - 2); - if(x >= max) { - x -= max << 1; +function decoder_asyncIterableReader (asyncIterable) { + const iterator = asyncIterable[Symbol.asyncIterator]() + + async function readChunk () { + const next = await iterator.next() + if (next.done) { + return null + } + return next.value } - return x; -}; + + return chunkReader(readChunk) +} /** - * Reads bytes out as a binary encoded string and clears them from the - * buffer. Note that the resulting string is binary encoded (in node.js this - * encoding is referred to as `binary`, it is *not* `utf8`). - * - * @param count the number of bytes to read, undefined or null for all. - * - * @return a binary encoded string of bytes. + * Wraps a `BytesReader` in a limiting `BytesReader` which limits maximum read + * to `byteLimit` bytes. It _does not_ update `pos` of the original + * `BytesReader`. + * + * @name decoder.limitReader(reader, byteLimit) + * @param {BytesReader} reader + * @param {number} byteLimit + * @returns {BytesReader} */ -util.ByteStringBuffer.prototype.getBytes = function(count) { - var rval; - if(count) { - // read count bytes - count = Math.min(this.length(), count); - rval = this.data.slice(this.read, this.read + count); - this.read += count; - } else if(count === 0) { - rval = ''; - } else { - // read all bytes, optimize to only copy when needed - rval = (this.read === 0) ? this.data : this.data.slice(this.read); - this.clear(); +function decoder_limitReader (reader, byteLimit) { + let bytesRead = 0 + + /** @type {BytesReader} */ + return { + async upTo (length) { + let bytes = await reader.upTo(length) + if (bytes.length + bytesRead > byteLimit) { + bytes = bytes.subarray(0, byteLimit - bytesRead) + } + return bytes + }, + + async exactly (length, seek = false) { + const bytes = await reader.exactly(length, seek) + if (bytes.length + bytesRead > byteLimit) { + throw new Error('Unexpected end of data') + } + if (seek) { + bytesRead += length + } + return bytes + }, + + seek (length) { + bytesRead += length + reader.seek(length) + }, + + get pos () { + return reader.pos + } } - return rval; -}; +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/indexer.js + /** - * Gets a binary encoded string of the bytes from this buffer without - * modifying the read pointer. - * - * @param count the number of bytes to get, omit to get all. - * - * @return a string full of binary encoded characters. + * @typedef {import('multiformats').CID} CID + * @typedef {import('./api').Block} Block + * @typedef {import('./api').RootsReader} RootsReader + * @typedef {import('./api').BlockIndex} BlockIndex + * @typedef {import('./coding').BytesReader} BytesReader */ -util.ByteStringBuffer.prototype.bytes = function(count) { - return (typeof(count) === 'undefined' ? - this.data.slice(this.read) : - this.data.slice(this.read, this.read + count)); -}; /** - * Gets a byte at the given index without modifying the read pointer. + * Provides an iterator over all of the `Block`s in a CAR, returning their CIDs + * and byte-location information. Implements an `AsyncIterable`. + * Where a `BlockIndex` is a + * `{ cid:CID, length:number, offset:number, blockLength:number, blockOffset:number }`. * - * @param i the byte index. + * As an implementer of `AsyncIterable`, this class can be used directly in a + * `for await (const blockIndex of iterator) {}` loop. Where the `iterator` is + * constructed using {@link CarIndexer.fromBytes} or + * {@link CarIndexer.fromIterable}. * - * @return the byte. + * An iteration can only be performce _once_ per instantiation. + * + * `CarIndexer` also implements the `RootsReader` interface and provides + * the {@link CarIndexer.getRoots `getRoots()`} method. + * + * Load this class with either + * `import { CarIndexer } from '@ipld/car/indexer'` + * (`const { CarIndexer } = require('@ipld/car/indexer')`). Or + * `import { CarIndexer } from '@ipld/car'` + * (`const { CarIndexer } = require('@ipld/car')`). The former will likely + * result in smaller bundle sizes where this is important. + * + * @name CarIndexer + * @class + * @implements {RootsReader} + * @implements {AsyncIterable} + * @property {number} version The version number of the CAR referenced by this + * reader (should be `1`). */ -util.ByteStringBuffer.prototype.at = function(i) { - return this.data.charCodeAt(this.read + i); -}; +class indexer_CarIndexer { + /** + * @param {number} version + * @param {CID[]} roots + * @param {AsyncGenerator} iterator + */ + constructor (version, roots, iterator) { + this._version = version + this._roots = roots + this._iterator = iterator + } + + get version () { + return this._version + } + + /** + * Get the list of roots defined by the CAR referenced by this indexer. May be + * zero or more `CID`s. + * + * @function + * @memberof CarIndexer + * @instance + * @async + * @returns {Promise} + */ + async getRoots () { + return this._roots + } + + /** + * @returns {AsyncIterator} + */ + [Symbol.asyncIterator] () { + return this._iterator + } + + /** + * Instantiate a {@link CarIndexer} from a `Uint8Array` blob. Only the header + * is decoded initially, the remainder is processed and emitted via the + * iterator as it is consumed. + * + * @async + * @static + * @memberof CarIndexer + * @param {Uint8Array} bytes + * @returns {Promise} + */ + static async fromBytes (bytes) { + if (!(bytes instanceof Uint8Array)) { + throw new TypeError('fromBytes() requires a Uint8Array') + } + return decodeIndexerComplete(bytesReader(bytes)) + } + + /** + * Instantiate a {@link CarIndexer} from a `AsyncIterable`, + * such as a [modern Node.js stream](https://nodejs.org/api/stream.html#stream_streams_compatibility_with_async_generators_and_async_iterators). + * is decoded initially, the remainder is processed and emitted via the + * iterator as it is consumed. + * + * @async + * @static + * @memberof CarIndexer + * @param {AsyncIterable} asyncIterable + * @returns {Promise} + */ + static async fromIterable (asyncIterable) { + if (!asyncIterable || !(typeof asyncIterable[Symbol.asyncIterator] === 'function')) { + throw new TypeError('fromIterable() requires an async iterable') + } + return decodeIndexerComplete(asyncIterableReader(asyncIterable)) + } +} /** - * Puts a byte at the given index without modifying the read pointer. - * - * @param i the byte index. - * @param b the byte to put. - * - * @return this buffer. + * @private + * @param {BytesReader} reader + * @returns {Promise} */ -util.ByteStringBuffer.prototype.setAt = function(i, b) { - this.data = this.data.substr(0, this.read + i) + - String.fromCharCode(b) + - this.data.substr(this.read + i + 1); - return this; -}; +async function decodeIndexerComplete (reader) { + const decoder = createDecoder(reader) + const { version, roots } = await decoder.header() + + return new indexer_CarIndexer(version, roots, decoder.blocksIndex()) +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/reader-browser.js + /** - * Gets the last byte without modifying the read pointer. - * - * @return the last byte. + * @typedef {import('multiformats').CID} CID + * @typedef {import('./api').Block} Block + * @typedef {import('./api').CarReader} CarReaderIface + * @typedef {import('./coding').BytesReader} BytesReader + * @typedef {import('./coding').CarHeader} CarHeader + * @typedef {import('./coding').CarV2Header} CarV2Header */ -util.ByteStringBuffer.prototype.last = function() { - return this.data.charCodeAt(this.data.length - 1); -}; /** - * Creates a copy of this buffer. + * Provides blockstore-like access to a CAR. * - * @return the copy. + * Implements the `RootsReader` interface: + * {@link CarReader.getRoots `getRoots()`}. And the `BlockReader` interface: + * {@link CarReader.get `get()`}, {@link CarReader.has `has()`}, + * {@link CarReader.blocks `blocks()`} (defined as a `BlockIterator`) and + * {@link CarReader.cids `cids()`} (defined as a `CIDIterator`). + * + * Load this class with either `import { CarReader } from '@ipld/car/reader'` + * (`const { CarReader } = require('@ipld/car/reader')`). Or + * `import { CarReader } from '@ipld/car'` (`const { CarReader } = require('@ipld/car')`). + * The former will likely result in smaller bundle sizes where this is + * important. + * + * @name CarReader + * @class + * @implements {CarReaderIface} + * @property {number} version The version number of the CAR referenced by this + * reader (should be `1` or `2`). */ -util.ByteStringBuffer.prototype.copy = function() { - var c = util.createBuffer(this.data); - c.read = this.read; - return c; -}; +class CarReader { + /** + * @constructs CarReader + * @param {CarHeader|CarV2Header} header + * @param {Block[]} blocks + */ + constructor (header, blocks) { + this._header = header + this._blocks = blocks + this._keys = blocks.map((b) => b.cid.toString()) + } + + /** + * @property + * @memberof CarReader + * @instance + */ + get version () { + return this._header.version + } + + /** + * Get the list of roots defined by the CAR referenced by this reader. May be + * zero or more `CID`s. + * + * @function + * @memberof CarReader + * @instance + * @async + * @returns {Promise} + */ + async getRoots () { + return this._header.roots + } + + /** + * Check whether a given `CID` exists within the CAR referenced by this + * reader. + * + * @function + * @memberof CarReader + * @instance + * @async + * @param {CID} key + * @returns {Promise} + */ + async has (key) { + return this._keys.indexOf(key.toString()) > -1 + } + + /** + * Fetch a `Block` (a `{ cid:CID, bytes:Uint8Array }` pair) from the CAR + * referenced by this reader matching the provided `CID`. In the case where + * the provided `CID` doesn't exist within the CAR, `undefined` will be + * returned. + * + * @function + * @memberof CarReader + * @instance + * @async + * @param {CID} key + * @returns {Promise} + */ + async get (key) { + const index = this._keys.indexOf(key.toString()) + return index > -1 ? this._blocks[index] : undefined + } + + /** + * Returns a `BlockIterator` (`AsyncIterable`) that iterates over all + * of the `Block`s (`{ cid:CID, bytes:Uint8Array }` pairs) contained within + * the CAR referenced by this reader. + * + * @function + * @memberof CarReader + * @instance + * @async + * @generator + * @returns {AsyncGenerator} + */ + async * blocks () { + for (const block of this._blocks) { + yield block + } + } + + /** + * Returns a `CIDIterator` (`AsyncIterable`) that iterates over all of + * the `CID`s contained within the CAR referenced by this reader. + * + * @function + * @memberof CarReader + * @instance + * @async + * @generator + * @returns {AsyncGenerator} + */ + async * cids () { + for (const block of this._blocks) { + yield block.cid + } + } + + /** + * Instantiate a {@link CarReader} from a `Uint8Array` blob. This performs a + * decode fully in memory and maintains the decoded state in memory for full + * access to the data via the `CarReader` API. + * + * @async + * @static + * @memberof CarReader + * @param {Uint8Array} bytes + * @returns {Promise} + */ + static async fromBytes (bytes) { + if (!(bytes instanceof Uint8Array)) { + throw new TypeError('fromBytes() requires a Uint8Array') + } + return decodeReaderComplete(bytesReader(bytes)) + } + + /** + * Instantiate a {@link CarReader} from a `AsyncIterable`, such as + * a [modern Node.js stream](https://nodejs.org/api/stream.html#stream_streams_compatibility_with_async_generators_and_async_iterators). + * This performs a decode fully in memory and maintains the decoded state in + * memory for full access to the data via the `CarReader` API. + * + * Care should be taken for large archives; this API may not be appropriate + * where memory is a concern or the archive is potentially larger than the + * amount of memory that the runtime can handle. + * + * @async + * @static + * @memberof CarReader + * @param {AsyncIterable} asyncIterable + * @returns {Promise} + */ + static async fromIterable (asyncIterable) { + if (!asyncIterable || !(typeof asyncIterable[Symbol.asyncIterator] === 'function')) { + throw new TypeError('fromIterable() requires an async iterable') + } + return decodeReaderComplete(asyncIterableReader(asyncIterable)) + } +} /** - * Compacts this buffer. - * - * @return this buffer. + * @private + * @param {BytesReader} reader + * @returns {Promise} */ -util.ByteStringBuffer.prototype.compact = function() { - if(this.read > 0) { - this.data = this.data.slice(this.read); - this.read = 0; +async function decodeReaderComplete (reader) { + const decoder = createDecoder(reader) + const header = await decoder.header() + const blocks = [] + for await (const block of decoder.blocks()) { + blocks.push(block) } - return this; -}; + + return new CarReader(header, blocks) +} + +const reader_browser_browser = true + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/reader.js + + + /** - * Clears this buffer. - * - * @return this buffer. + * @typedef {import('./api').Block} Block + * @typedef {import('./api').BlockIndex} BlockIndex + * @typedef {import('./api').CarReader} CarReaderIface */ -util.ByteStringBuffer.prototype.clear = function() { - this.data = ''; - this.read = 0; - return this; -}; + +const reader_fsread = (0,external_util_.promisify)(external_fs_.read) /** - * Shortens this buffer by triming bytes off of the end of this buffer. - * - * @param count the number of bytes to trim off. - * - * @return this buffer. + * @class + * @implements {CarReaderIface} */ -util.ByteStringBuffer.prototype.truncate = function(count) { - var len = Math.max(0, this.length() - count); - this.data = this.data.substr(this.read, len); - this.read = 0; - return this; -}; +class reader_CarReader extends (/* unused pure expression or super */ null && (BrowserCarReader)) { + /** + * Reads a block directly from a file descriptor for an open CAR file. This + * function is **only available in Node.js** and not a browser environment. + * + * This function can be used in connection with {@link CarIndexer} which emits + * the `BlockIndex` objects that are required by this function. + * + * The user is responsible for opening and closing the file used in this call. + * + * @async + * @static + * @memberof CarReader + * @param {fs.promises.FileHandle | number} fd - A file descriptor from the + * Node.js `fs` module. Either an integer, from `fs.open()` or a `FileHandle` + * from `fs.promises.open()`. + * @param {BlockIndex} blockIndex - An index pointing to the location of the + * Block required. This `BlockIndex` should take the form: + * `{cid:CID, blockLength:number, blockOffset:number}`. + * @returns {Promise} A `{ cid:CID, bytes:Uint8Array }` pair. + */ + static async readRaw (fd, blockIndex) { + const { cid, blockLength, blockOffset } = blockIndex + const bytes = new Uint8Array(blockLength) + let read + if (typeof fd === 'number') { + read = (await reader_fsread(fd, bytes, 0, blockLength, blockOffset)).bytesRead + } else if (typeof fd === 'object' && typeof fd.read === 'function') { // FileDescriptor + read = (await fd.read(bytes, 0, blockLength, blockOffset)).bytesRead + } else { + throw new TypeError('Bad fd') + } + if (read !== blockLength) { + throw new Error(`Failed to read entire block (${read} instead of ${blockLength})`) + } + return { cid, bytes } + } +} + +const reader_browser = false + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/indexed-reader.js + + + + + /** - * Converts this buffer to a hexadecimal string. - * - * @return a hexadecimal string. + * @typedef {import('fs').promises.FileHandle} FileHandle + * @typedef {import('./api').Block} Block + * @typedef {import('./api').BlockIndex} BlockIndex + * @typedef {import('./api').CarReader} CarReaderIface + * @typedef {import('./reader-browser').CarReader} CarReader + * @typedef {{ blockLength:number, blockOffset:number }} RawLocation */ -util.ByteStringBuffer.prototype.toHex = function() { - var rval = ''; - for(var i = this.read; i < this.data.length; ++i) { - var b = this.data.charCodeAt(i); - if(b < 16) { - rval += '0'; + +/** + * A form of {@link CarReader} that pre-indexes a CAR archive from a file and + * provides random access to blocks within the file using the index data. This + * function is **only available in Node.js** and not a browser environment. + * + * For large CAR files, using this form of `CarReader` can be singificantly more + * efficient in terms of memory. The index consists of a list of `CID`s and + * their location within the archive (see {@link CarIndexer}). For large numbers + * of blocks, this index can also occupy a significant amount of memory. In some + * cases it may be necessary to expand the memory capacity of a Node.js instance + * to allow this index to fit. (e.g. by running with + * `NODE_OPTIONS="--max-old-space-size=16384"`). + * + * As an `CarIndexedReader` instance maintains an open file descriptor for its + * CAR file, an additional {@link CarReader#close} method is attached. This + * _must_ be called to have full clean-up of resources after use. + * + * Load this class with either + * `import { CarIndexedReader } from '@ipld/car/indexed-reader'` + * (`const { CarIndexedReader } = require('@ipld/car/indexed-reader')`). Or + * `import { CarIndexedReader } from '@ipld/car'` + * (`const { CarIndexedReader } = require('@ipld/car')`). The former will likely + * result in smaller bundle sizes where this is important. + * + * @name CarIndexedReader + * @class + * @implements {CarReaderIface} + * @extends {CarReader} + * @property {number} version The version number of the CAR referenced by this + * reader (should be `1`). + */ +class CarIndexedReader { + /** + * @param {number} version + * @param {string} path + * @param {CID[]} roots + * @param {Map} index + * @param {string[]} order + */ + constructor (version, path, roots, index, order) { + this._version = version + this._path = path + this._roots = roots + this._index = index + this._order = order + this._fd = null + } + + get version () { + return this._version + } + + /** + * See {@link CarReader#getRoots} + * + * @function + * @memberof CarIndexedReader + * @instance + * @async + * @returns {Promise} + */ + async getRoots () { + return this._roots + } + + /** + * See {@link CarReader#has} + * + * @function + * @memberof CarIndexedReader + * @instance + * @async + * @param {CID} key + * @returns {Promise} + */ + async has (key) { + return this._index.has(key.toString()) + } + + /** + * See {@link CarReader#get} + * + * @function + * @memberof CarIndexedReader + * @instance + * @async + * @param {CID} key + * @returns {Promise} + */ + async get (key) { + const blockIndex = this._index.get(key.toString()) + if (!blockIndex) { + return undefined } - rval += b.toString(16); + if (!this._fd) { + this._fd = await fs.promises.open(this._path, 'r') + } + const readIndex = { + cid: key, + length: 0, + offset: 0, + blockLength: blockIndex.blockLength, + blockOffset: blockIndex.blockOffset + } + return NodeCarReader.readRaw(this._fd, readIndex) } - return rval; -}; + + /** + * See {@link CarReader#blocks} + * + * @function + * @memberof CarIndexedReader + * @instance + * @async + * @generator + * @returns {AsyncGenerator} + */ + async * blocks () { + for (const cidStr of this._order) { + const block = await this.get(CID.parse(cidStr)) + /* c8 ignore next 3 */ + if (!block) { + throw new Error('Unexpected internal error') + } + yield block + } + } + + /** + * See {@link CarReader#cids} + * + * @function + * @memberof CarIndexedReader + * @instance + * @async + * @generator + * @returns {AsyncGenerator} + */ + async * cids () { + for (const cidStr of this._order) { + yield CID.parse(cidStr) + } + } + + /** + * Close the underlying file descriptor maintained by this `CarIndexedReader`. + * This must be called for proper resource clean-up to occur. + * + * @function + * @memberof CarIndexedReader + * @instance + * @async + * @returns {Promise} + */ + async close () { + if (this._fd) { + return this._fd.close() + } + } + + /** + * Instantiate an {@link CarIndexedReader} from a file with the provided + * `path`. The CAR file is first indexed with a full path that collects `CID`s + * and block locations. This index is maintained in memory. Subsequent reads + * operate on a read-only file descriptor, fetching the block from its in-file + * location. + * + * For large archives, the initial indexing may take some time. The returned + * `Promise` will resolve only after this is complete. + * + * @async + * @static + * @memberof CarIndexedReader + * @param {string} path + * @returns {Promise} + */ + static async fromFile (path) { + if (typeof path !== 'string') { + throw new TypeError('fromFile() requires a file path string') + } + + const iterable = await CarIndexer.fromIterable(Readable.from(fs.createReadStream(path))) + /** @type {Map} */ + const index = new Map() + /** @type {string[]} */ + const order = [] + for await (const { cid, blockLength, blockOffset } of iterable) { + const cidStr = cid.toString() + index.set(cidStr, { blockLength, blockOffset }) + order.push(cidStr) + } + return new CarIndexedReader(iterable.version, path, await iterable.getRoots(), index, order) + } +} + +const indexed_reader_browser = false + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/iterator.js + /** - * Converts this buffer to a UTF-16 string (standard JavaScript string). - * - * @return a UTF-16 string. + * @typedef {import('multiformats').CID} CID + * @typedef {import('./api').Block} Block + * @typedef {import('./api').RootsReader} RootsReader + * @typedef {import('./coding').BytesReader} BytesReader */ -util.ByteStringBuffer.prototype.toString = function() { - return util.decodeUtf8(this.bytes()); -}; -/** End Buffer w/BinaryString backing */ +/** + * @class + * @implements {RootsReader} + * @property {number} version The version number of the CAR referenced by this reader (should be `1`). + */ +class CarIteratorBase { + /** + * @param {number} version + * @param {CID[]} roots + * @param {AsyncIterable|void} iterable + */ + constructor (version, roots, iterable) { + this._version = version + this._roots = roots + this._iterable = iterable + this._decoded = false + } -/** Buffer w/UInt8Array backing */ + get version () { + return this._version + } + + /** + * @returns {Promise} + */ + async getRoots () { + return this._roots + } +} /** - * FIXME: Experimental. Do not use yet. + * Provides an iterator over all of the `Block`s in a CAR. Implements a + * `BlockIterator` interface, or `AsyncIterable`. Where a `Block` is + * a `{ cid:CID, bytes:Uint8Array }` pair. * - * Constructor for an ArrayBuffer-backed byte buffer. + * As an implementer of `AsyncIterable`, this class can be used directly in a + * `for await (const block of iterator) {}` loop. Where the `iterator` is + * constructed using {@link CarBlockiterator.fromBytes} or + * {@link CarBlockiterator.fromIterable}. * - * The buffer may be constructed from a string, an ArrayBuffer, DataView, or a - * TypedArray. + * An iteration can only be performce _once_ per instantiation. * - * If a string is given, its encoding should be provided as an option, - * otherwise it will default to 'binary'. A 'binary' string is encoded such - * that each character is one byte in length and size. + * `CarBlockIterator` also implements the `RootsReader` interface and provides + * the {@link CarBlockiterator.getRoots `getRoots()`} method. * - * If an ArrayBuffer, DataView, or TypedArray is given, it will be used - * *directly* without any copying. Note that, if a write to the buffer requires - * more space, the buffer will allocate a new backing ArrayBuffer to - * accommodate. The starting read and write offsets for the buffer may be - * given as options. + * Load this class with either + * `import { CarBlockIterator } from '@ipld/car/iterator'` + * (`const { CarBlockIterator } = require('@ipld/car/iterator')`). Or + * `import { CarBlockIterator } from '@ipld/car'` + * (`const { CarBlockIterator } = require('@ipld/car')`). * - * @param [b] the initial bytes for this buffer. - * @param options the options to use: - * [readOffset] the starting read offset to use (default: 0). - * [writeOffset] the starting write offset to use (default: the - * length of the first parameter). - * [growSize] the minimum amount, in bytes, to grow the buffer by to - * accommodate writes (default: 1024). - * [encoding] the encoding ('binary', 'utf8', 'utf16', 'hex') for the - * first parameter, if it is a string (default: 'binary'). + * @name CarBlockIterator + * @class + * @implements {RootsReader} + * @implements {AsyncIterable} + * @property {number} version The version number of the CAR referenced by this + * iterator (should be `1`). */ -function DataBuffer(b, options) { - // default options - options = options || {}; +class CarBlockIterator extends (/* unused pure expression or super */ null && (CarIteratorBase)) { + // inherited method + /** + * Get the list of roots defined by the CAR referenced by this iterator. May be + * zero or more `CID`s. + * + * @function getRoots + * @memberof CarBlockIterator + * @instance + * @async + * @returns {Promise} + */ - // pointers for read from/write to buffer - this.read = options.readOffset || 0; - this.growSize = options.growSize || 1024; + /** + * @returns {AsyncIterator} + */ + [Symbol.asyncIterator] () { + if (this._decoded) { + throw new Error('Cannot decode more than once') + } + /* c8 ignore next 3 */ + if (!this._iterable) { + throw new Error('Block iterable not found') + } + this._decoded = true + return this._iterable[Symbol.asyncIterator]() + } - var isArrayBuffer = util.isArrayBuffer(b); - var isArrayBufferView = util.isArrayBufferView(b); - if(isArrayBuffer || isArrayBufferView) { - // use ArrayBuffer directly - if(isArrayBuffer) { - this.data = new DataView(b); - } else { - // TODO: adjust read/write offset based on the type of view - // or specify that this must be done in the options ... that the - // offsets are byte-based - this.data = new DataView(b.buffer, b.byteOffset, b.byteLength); + /** + * Instantiate a {@link CarBlockIterator} from a `Uint8Array` blob. Rather + * than decoding the entire byte array prior to returning the iterator, as in + * {@link CarReader.fromBytes}, only the header is decoded and the remainder + * of the CAR is parsed as the `Block`s as yielded. + * + * @async + * @static + * @memberof CarBlockIterator + * @param {Uint8Array} bytes + * @returns {Promise} + */ + static async fromBytes (bytes) { + const { version, roots, iterator } = await iterator_fromBytes(bytes) + return new CarBlockIterator(version, roots, iterator) + } + + /** + * Instantiate a {@link CarBlockIterator} from a `AsyncIterable`, + * such as a [modern Node.js stream](https://nodejs.org/api/stream.html#stream_streams_compatibility_with_async_generators_and_async_iterators). + * Rather than decoding the entire byte array prior to returning the iterator, + * as in {@link CarReader.fromIterable}, only the header is decoded and the + * remainder of the CAR is parsed as the `Block`s as yielded. + * + * @async + * @static + * @param {AsyncIterable} asyncIterable + * @returns {Promise} + */ + static async fromIterable (asyncIterable) { + const { version, roots, iterator } = await fromIterable(asyncIterable) + return new CarBlockIterator(version, roots, iterator) + } +} + +/** + * Provides an iterator over all of the `CID`s in a CAR. Implements a + * `CIDIterator` interface, or `AsyncIterable`. Similar to + * {@link CarBlockIterator} but only yields the CIDs in the CAR. + * + * As an implementer of `AsyncIterable`, this class can be used directly in a + * `for await (const cid of iterator) {}` loop. Where the `iterator` is + * constructed using {@link CarCIDiterator.fromBytes} or + * {@link CarCIDiterator.fromIterable}. + * + * An iteration can only be performce _once_ per instantiation. + * + * `CarCIDIterator` also implements the `RootsReader` interface and provides + * the {@link CarCIDiterator.getRoots `getRoots()`} method. + * + * Load this class with either + * `import { CarCIDIterator } from '@ipld/car/iterator'` + * (`const { CarCIDIterator } = require('@ipld/car/iterator')`). Or + * `import { CarCIDIterator } from '@ipld/car'` + * (`const { CarCIDIterator } = require('@ipld/car')`). + * + * @name CarCIDIterator + * @class + * @implements {RootsReader} + * @implements {AsyncIterable} + * @property {number} version The version number of the CAR referenced by this + * iterator (should be `1`). + */ +class CarCIDIterator extends (/* unused pure expression or super */ null && (CarIteratorBase)) { + // inherited method + /** + * Get the list of roots defined by the CAR referenced by this iterator. May be + * zero or more `CID`s. + * + * @function getRoots + * @memberof CarCIDIterator + * @instance + * @async + * @returns {Promise} + */ + + /** + * @returns {AsyncIterator} + */ + [Symbol.asyncIterator] () { + if (this._decoded) { + throw new Error('Cannot decode more than once') + } + /* c8 ignore next 3 */ + if (!this._iterable) { + throw new Error('Block iterable not found') + } + this._decoded = true + const iterable = this._iterable[Symbol.asyncIterator]() + return { + async next () { + const next = await iterable.next() + if (next.done) { + return next + } + return { done: false, value: next.value.cid } + } } - this.write = ('writeOffset' in options ? - options.writeOffset : this.data.byteLength); - return; } - // initialize to empty array buffer and add any given bytes using putBytes - this.data = new DataView(new ArrayBuffer(0)); - this.write = 0; - - if(b !== null && b !== undefined) { - this.putBytes(b); + /** + * Instantiate a {@link CarCIDIterator} from a `Uint8Array` blob. Rather + * than decoding the entire byte array prior to returning the iterator, as in + * {@link CarReader.fromBytes}, only the header is decoded and the remainder + * of the CAR is parsed as the `CID`s as yielded. + * + * @async + * @static + * @memberof CarCIDIterator + * @param {Uint8Array} bytes + * @returns {Promise} + */ + static async fromBytes (bytes) { + const { version, roots, iterator } = await iterator_fromBytes(bytes) + return new CarCIDIterator(version, roots, iterator) } - if('writeOffset' in options) { - this.write = options.writeOffset; + /** + * Instantiate a {@link CarCIDIterator} from a `AsyncIterable`, + * such as a [modern Node.js stream](https://nodejs.org/api/stream.html#stream_streams_compatibility_with_async_generators_and_async_iterators). + * Rather than decoding the entire byte array prior to returning the iterator, + * as in {@link CarReader.fromIterable}, only the header is decoded and the + * remainder of the CAR is parsed as the `CID`s as yielded. + * + * @async + * @static + * @memberof CarCIDIterator + * @param {AsyncIterable} asyncIterable + * @returns {Promise} + */ + static async fromIterable (asyncIterable) { + const { version, roots, iterator } = await fromIterable(asyncIterable) + return new CarCIDIterator(version, roots, iterator) } } -util.DataBuffer = DataBuffer; /** - * Gets the number of bytes in this buffer. - * - * @return the number of bytes in this buffer. + * @param {Uint8Array} bytes + * @returns {Promise<{ version:number, roots:CID[], iterator:AsyncIterable}>} */ -util.DataBuffer.prototype.length = function() { - return this.write - this.read; -}; +async function iterator_fromBytes (bytes) { + if (!(bytes instanceof Uint8Array)) { + throw new TypeError('fromBytes() requires a Uint8Array') + } + return decodeIterator(bytesReader(bytes)) +} /** - * Gets whether or not this buffer is empty. - * - * @return true if this buffer is empty, false if not. + * @param {AsyncIterable} asyncIterable + * @returns {Promise<{ version:number, roots:CID[], iterator:AsyncIterable}>} */ -util.DataBuffer.prototype.isEmpty = function() { - return this.length() <= 0; -}; +async function fromIterable (asyncIterable) { + if (!asyncIterable || !(typeof asyncIterable[Symbol.asyncIterator] === 'function')) { + throw new TypeError('fromIterable() requires an async iterable') + } + return decodeIterator(asyncIterableReader(asyncIterable)) +} /** - * Ensures this buffer has enough empty space to accommodate the given number - * of bytes. An optional parameter may be given that indicates a minimum - * amount to grow the buffer if necessary. If the parameter is not given, - * the buffer will be grown by some previously-specified default amount - * or heuristic. - * - * @param amount the number of bytes to accommodate. - * @param [growSize] the minimum amount, in bytes, to grow the buffer by if - * necessary. + * @private + * @param {BytesReader} reader + * @returns {Promise<{ version:number, roots:CID[], iterator:AsyncIterable}>} */ -util.DataBuffer.prototype.accommodate = function(amount, growSize) { - if(this.length() >= amount) { - return this; - } - growSize = Math.max(growSize || this.growSize, amount); +async function decodeIterator (reader) { + const decoder = createDecoder(reader) + const { version, roots } = await decoder.header() + return { version, roots, iterator: decoder.blocks() } +} + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/encoder.js - // grow buffer - var src = new Uint8Array( - this.data.buffer, this.data.byteOffset, this.data.byteLength); - var dst = new Uint8Array(this.length() + growSize); - dst.set(src); - this.data = new DataView(dst.buffer); - return this; -}; /** - * Puts a byte in this buffer. - * - * @param b the byte to put. - * - * @return this buffer. + * @typedef {import('multiformats').CID} CID + * @typedef {import('./api').Block} Block + * @typedef {import('./coding').CarEncoder} CarEncoder + * @typedef {import('./coding').IteratorChannel_Writer} IteratorChannel_Writer */ -util.DataBuffer.prototype.putByte = function(b) { - this.accommodate(1); - this.data.setUint8(this.write++, b); - return this; -}; /** - * Puts a byte in this buffer N times. - * - * @param b the byte to put. - * @param n the number of bytes of value b to put. + * Create a header from an array of roots. * - * @return this buffer. + * @param {CID[]} roots + * @returns {Uint8Array} */ -util.DataBuffer.prototype.fillWithByte = function(b, n) { - this.accommodate(n); - for(var i = 0; i < n; ++i) { - this.data.setUint8(b); - } - return this; -}; +function createHeader (roots) { + const headerBytes = dag_cbor_src_encode({ version: 1, roots }) + const varintBytes = sdk_node_modules_varint.encode(headerBytes.length) + const header = new Uint8Array(varintBytes.length + headerBytes.length) + header.set(varintBytes, 0) + header.set(headerBytes, varintBytes.length) + return header +} /** - * Puts bytes in this buffer. The bytes may be given as a string, an - * ArrayBuffer, a DataView, or a TypedArray. - * - * @param bytes the bytes to put. - * @param [encoding] the encoding for the first parameter ('binary', 'utf8', - * 'utf16', 'hex'), if it is a string (default: 'binary'). - * - * @return this buffer. + * @param {IteratorChannel_Writer} writer + * @returns {CarEncoder} */ -util.DataBuffer.prototype.putBytes = function(bytes, encoding) { - if(util.isArrayBufferView(bytes)) { - var src = new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength); - var len = src.byteLength - src.byteOffset; - this.accommodate(len); - var dst = new Uint8Array(this.data.buffer, this.write); - dst.set(src); - this.write += len; - return this; +function createEncoder (writer) { + // none of this is wrapped in a mutex, that needs to happen above this to + // avoid overwrites + + return { + /** + * @param {CID[]} roots + * @returns {Promise} + */ + async setRoots (roots) { + const bytes = createHeader(roots) + await writer.write(bytes) + }, + + /** + * @param {Block} block + * @returns {Promise} + */ + async writeBlock (block) { + const { cid, bytes } = block + await writer.write(new Uint8Array(sdk_node_modules_varint.encode(cid.bytes.length + bytes.length))) + await writer.write(cid.bytes) + if (bytes.length) { + // zero-length blocks are valid, but it'd be safer if we didn't write them + await writer.write(bytes) + } + }, + + /** + * @returns {Promise} + */ + async close () { + await writer.end() + } } +} - if(util.isArrayBuffer(bytes)) { - var src = new Uint8Array(bytes); - this.accommodate(src.byteLength); - var dst = new Uint8Array(this.data.buffer); - dst.set(src, this.write); - this.write += src.byteLength; - return this; + + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/iterator-channel.js +/** + * @template {any} T + * @typedef {import('./coding').IteratorChannel} IteratorChannel + */ + +function iterator_channel_noop () {} + +/** + * @template {any} T + * @returns {IteratorChannel} + */ +function iterator_channel_create () { + /** @type {T[]} */ + const chunkQueue = [] + /** @type {Promise | null} */ + let drainer = null + let drainerResolver = iterator_channel_noop + let ended = false + /** @type {Promise> | null} */ + let outWait = null + let outWaitResolver = iterator_channel_noop + + const makeDrainer = () => { + if (!drainer) { + drainer = new Promise((resolve) => { + drainerResolver = () => { + drainer = null + drainerResolver = iterator_channel_noop + resolve() + } + }) + } + return drainer } - // bytes is a util.DataBuffer or equivalent - if(bytes instanceof util.DataBuffer || - (typeof bytes === 'object' && - typeof bytes.read === 'number' && typeof bytes.write === 'number' && - util.isArrayBufferView(bytes.data))) { - var src = new Uint8Array(bytes.data.byteLength, bytes.read, bytes.length()); - this.accommodate(src.byteLength); - var dst = new Uint8Array(bytes.data.byteLength, this.write); - dst.set(src); - this.write += src.byteLength; - return this; + /** + * @returns {IteratorChannel} + */ + const writer = { + /** + * @param {T} chunk + * @returns {Promise} + */ + write (chunk) { + chunkQueue.push(chunk) + const drainer = makeDrainer() + outWaitResolver() + return drainer + }, + + async end () { + ended = true + const drainer = makeDrainer() + outWaitResolver() + await drainer + } } - if(bytes instanceof util.ByteStringBuffer) { - // copy binary string and process as the same as a string parameter below - bytes = bytes.data; - encoding = 'binary'; + /** @type {AsyncIterator} */ + const iterator = { + /** @returns {Promise>} */ + async next () { + const chunk = chunkQueue.shift() + if (chunk) { + if (chunkQueue.length === 0) { + drainerResolver() + } + return { done: false, value: chunk } + } + + if (ended) { + drainerResolver() + return { done: true, value: undefined } + } + + if (!outWait) { + outWait = new Promise((resolve) => { + outWaitResolver = () => { + outWait = null + outWaitResolver = iterator_channel_noop + return resolve(iterator.next()) + } + }) + } + + return outWait + } } - // string conversion - encoding = encoding || 'binary'; - if(typeof bytes === 'string') { - var view; + return { writer, iterator } +} - // decode from string - if(encoding === 'hex') { - this.accommodate(Math.ceil(bytes.length / 2)); - view = new Uint8Array(this.data.buffer, this.write); - this.write += util.binary.hex.decode(bytes, view, this.write); - return this; +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/writer-browser.js + + + + + +/** + * @typedef {import('./api').Block} Block + * @typedef {import('./api').BlockWriter} BlockWriter + * @typedef {import('./api').WriterChannel} WriterChannel + * @typedef {import('./coding').CarEncoder} CarEncoder + * @typedef {import('./coding').IteratorChannel} IteratorChannel + */ + +/** + * Provides a writer interface for the creation of CAR files. + * + * Creation of a `CarWriter` involves the instatiation of an input / output pair + * in the form of a `WriterChannel`, which is a + * `{ writer:CarWriter, out:AsyncIterable }` pair. These two + * components form what can be thought of as a stream-like interface. The + * `writer` component (an instantiated `CarWriter`), has methods to + * {@link CarWriter.put `put()`} new blocks and {@link CarWriter.put `close()`} + * the writing operation (finalising the CAR archive). The `out` component is + * an `AsyncIterable` that yields the bytes of the archive. This can be + * redirected to a file or other sink. In Node.js, you can use the + * [`Readable.from()`](https://nodejs.org/api/stream.html#stream_stream_readable_from_iterable_options) + * API to convert this to a standard Node.js stream, or it can be directly fed + * to a + * [`stream.pipeline()`](https://nodejs.org/api/stream.html#stream_stream_pipeline_source_transforms_destination_callback). + * + * The channel will provide a form of backpressure. The `Promise` from a + * `write()` won't resolve until the resulting data is drained from the `out` + * iterable. + * + * It is also possible to ignore the `Promise` from `write()` calls and allow + * the generated data to queue in memory. This should be avoided for large CAR + * archives of course due to the memory costs and potential for memory overflow. + * + * Load this class with either + * `import { CarWriter } from '@ipld/car/writer'` + * (`const { CarWriter } = require('@ipld/car/writer')`). Or + * `import { CarWriter } from '@ipld/car'` + * (`const { CarWriter } = require('@ipld/car')`). The former will likely + * result in smaller bundle sizes where this is important. + * + * @name CarWriter + * @class + * @implements {BlockWriter} + */ +class writer_browser_CarWriter { + /** + * @param {CID[]} roots + * @param {CarEncoder} encoder + */ + constructor (roots, encoder) { + this._encoder = encoder + /** @type {Promise} */ + this._mutex = encoder.setRoots(roots) + this._ended = false + } + + /** + * Write a `Block` (a `{ cid:CID, bytes:Uint8Array }` pair) to the archive. + * + * @function + * @memberof CarWriter + * @instance + * @async + * @param {Block} block - A `{ cid:CID, bytes:Uint8Array }` pair. + * @returns {Promise} The returned promise will only resolve once the + * bytes this block generates are written to the `out` iterable. + */ + async put (block) { + if (!(block.bytes instanceof Uint8Array) || !block.cid) { + throw new TypeError('Can only write {cid, bytes} objects') } - if(encoding === 'base64') { - this.accommodate(Math.ceil(bytes.length / 4) * 3); - view = new Uint8Array(this.data.buffer, this.write); - this.write += util.binary.base64.decode(bytes, view, this.write); - return this; + if (this._ended) { + throw new Error('Already closed') } - - // encode text as UTF-8 bytes - if(encoding === 'utf8') { - // encode as UTF-8 then decode string as raw binary - bytes = util.encodeUtf8(bytes); - encoding = 'binary'; + const cid = sdk_node_modules_multiformats_src_cid_CID.asCID(block.cid) + if (!cid) { + throw new TypeError('Can only write {cid, bytes} objects') } + this._mutex = this._mutex.then(() => this._encoder.writeBlock({ cid, bytes: block.bytes })) + return this._mutex + } - // decode string as raw binary - if(encoding === 'binary' || encoding === 'raw') { - // one byte per character - this.accommodate(bytes.length); - view = new Uint8Array(this.data.buffer, this.write); - this.write += util.binary.raw.decode(view); - return this; + /** + * Finalise the CAR archive and signal that the `out` iterable should end once + * any remaining bytes are written. + * + * @function + * @memberof CarWriter + * @instance + * @async + * @returns {Promise} + */ + async close () { + if (this._ended) { + throw new Error('Already closed') } + await this._mutex + this._ended = true + return this._encoder.close() + } - // encode text as UTF-16 bytes - if(encoding === 'utf16') { - // two bytes per character - this.accommodate(bytes.length * 2); - view = new Uint16Array(this.data.buffer, this.write); - this.write += util.text.utf16.encode(view); - return this; - } + /** + * Create a new CAR writer "channel" which consists of a + * `{ writer:CarWriter, out:AsyncIterable }` pair. + * + * @async + * @static + * @memberof CarWriter + * @param {CID[] | CID | void} roots + * @returns {WriterChannel} The channel takes the form of + * `{ writer:CarWriter, out:AsyncIterable }`. + */ + static create (roots) { + roots = toRoots(roots) + const { encoder, iterator } = encodeWriter() + const writer = new writer_browser_CarWriter(roots, encoder) + const out = new CarWriterOut(iterator) + return { writer, out } + } - throw new Error('Invalid encoding: ' + encoding); + /** + * Create a new CAR appender "channel" which consists of a + * `{ writer:CarWriter, out:AsyncIterable }` pair. + * This appender does not consider roots and does not produce a CAR header. + * It is designed to append blocks to an _existing_ CAR archive. It is + * expected that `out` will be concatenated onto the end of an existing + * archive that already has a properly formatted header. + * + * @async + * @static + * @memberof CarWriter + * @returns {WriterChannel} The channel takes the form of + * `{ writer:CarWriter, out:AsyncIterable }`. + */ + static createAppender () { + const { encoder, iterator } = encodeWriter() + encoder.setRoots = () => Promise.resolve() + const writer = new writer_browser_CarWriter([], encoder) + const out = new CarWriterOut(iterator) + return { writer, out } } - throw Error('Invalid parameter: ' + bytes); -}; + /** + * Update the list of roots in the header of an existing CAR as represented + * in a Uint8Array. + * + * This operation is an _overwrite_, the total length of the CAR will not be + * modified. A rejection will occur if the new header will not be the same + * length as the existing header, in which case the CAR will not be modified. + * It is the responsibility of the user to ensure that the roots being + * replaced encode as the same length as the new roots. + * + * The byte array passed in an argument will be modified and also returned + * upon successful modification. + * + * @async + * @static + * @memberof CarWriter + * @param {Uint8Array} bytes + * @param {CID[]} roots - A new list of roots to replace the existing list in + * the CAR header. The new header must take up the same number of bytes as the + * existing header, so the roots should collectively be the same byte length + * as the existing roots. + * @returns {Promise} + */ + static async updateRootsInBytes (bytes, roots) { + const reader = decoder_bytesReader(bytes) + await decoder_readHeader(reader) + const newHeader = createHeader(roots) + if (Number(reader.pos) !== newHeader.length) { + throw new Error(`updateRoots() can only overwrite a header of the same length (old header is ${reader.pos} bytes, new header is ${newHeader.length} bytes)`) + } + bytes.set(newHeader, 0) + return bytes + } +} /** - * Puts the given buffer into this buffer. - * - * @param buffer the buffer to put into this one. - * - * @return this buffer. + * @class + * @implements {AsyncIterable} */ -util.DataBuffer.prototype.putBuffer = function(buffer) { - this.putBytes(buffer); - buffer.clear(); - return this; -}; +class CarWriterOut { + /** + * @param {AsyncIterator} iterator + */ + constructor (iterator) { + this._iterator = iterator + } + + [Symbol.asyncIterator] () { + if (this._iterating) { + throw new Error('Multiple iterator not supported') + } + this._iterating = true + return this._iterator + } +} + +function encodeWriter () { + /** @type {IteratorChannel} */ + const iw = iterator_channel_create() + const { writer, iterator } = iw + const encoder = createEncoder(writer) + return { encoder, iterator } +} /** - * Puts a string into this buffer. - * - * @param str the string to put. - * @param [encoding] the encoding for the string (default: 'utf16'). - * - * @return this buffer. + * @private + * @param {CID[] | CID | void} roots + * @returns {CID[]} */ -util.DataBuffer.prototype.putString = function(str) { - return this.putBytes(str, 'utf16'); -}; +function toRoots (roots) { + if (roots === undefined) { + return [] + } + + if (!Array.isArray(roots)) { + const cid = sdk_node_modules_multiformats_src_cid_CID.asCID(roots) + if (!cid) { + throw new TypeError('roots must be a single CID or an array of CIDs') + } + return [cid] + } + + const _roots = [] + for (const root of roots) { + const _root = sdk_node_modules_multiformats_src_cid_CID.asCID(root) + if (!_root) { + throw new TypeError('roots must be a single CID or an array of CIDs') + } + _roots.push(_root) + } + return _roots +} + +const writer_browser_browser = true + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/writer.js + + + + + + +const writer_fsread = (0,external_util_.promisify)(external_fs_.read) +const fswrite = (0,external_util_.promisify)(external_fs_.write) /** - * Puts a 16-bit integer in this buffer in big-endian order. - * - * @param i the 16-bit integer. - * - * @return this buffer. + * @typedef {import('multiformats/cid').CID} CID + * @typedef {import('./api').BlockWriter} BlockWriter */ -util.DataBuffer.prototype.putInt16 = function(i) { - this.accommodate(2); - this.data.setInt16(this.write, i); - this.write += 2; - return this; -}; /** - * Puts a 24-bit integer in this buffer in big-endian order. - * - * @param i the 24-bit integer. - * - * @return this buffer. + * @class + * @implements {BlockWriter} */ -util.DataBuffer.prototype.putInt24 = function(i) { - this.accommodate(3); - this.data.setInt16(this.write, i >> 8 & 0xFFFF); - this.data.setInt8(this.write, i >> 16 & 0xFF); - this.write += 3; - return this; -}; +class CarWriter extends writer_browser_CarWriter { + /** + * Update the list of roots in the header of an existing CAR file. The first + * argument must be a file descriptor for CAR file that is open in read and + * write mode (not append), e.g. `fs.open` or `fs.promises.open` with `'r+'` + * mode. + * + * This operation is an _overwrite_, the total length of the CAR will not be + * modified. A rejection will occur if the new header will not be the same + * length as the existing header, in which case the CAR will not be modified. + * It is the responsibility of the user to ensure that the roots being + * replaced encode as the same length as the new roots. + * + * This function is **only available in Node.js** and not a browser + * environment. + * + * @async + * @static + * @memberof CarWriter + * @param {fs.promises.FileHandle | number} fd - A file descriptor from the + * Node.js `fs` module. Either an integer, from `fs.open()` or a `FileHandle` + * from `fs.promises.open()`. + * @param {CID[]} roots - A new list of roots to replace the existing list in + * the CAR header. The new header must take up the same number of bytes as the + * existing header, so the roots should collectively be the same byte length + * as the existing roots. + * @returns {Promise} + */ + static async updateRootsInFile (fd, roots) { + const chunkSize = 256 + /** @type {Uint8Array} */ + let bytes + let offset = 0 + + /** @type {() => Promise} */ + let readChunk + if (typeof fd === 'number') { + readChunk = async () => (await writer_fsread(fd, bytes, 0, chunkSize, offset)).bytesRead + } else if (typeof fd === 'object' && typeof fd.read === 'function') { // FileDescriptor + readChunk = async () => (await fd.read(bytes, 0, chunkSize, offset)).bytesRead + } else { + throw new TypeError('Bad fd') + } + const fdReader = chunkReader(async () => { + bytes = new Uint8Array(chunkSize) // need a new chunk each time, can't reuse old + const read = await readChunk() + offset += read + /* eslint no-warning-comments: 0 */ + // TODO: test header > 256 bytes + return read < chunkSize ? bytes.subarray(0, read) : bytes + }) + + await decoder_readHeader(fdReader) + const newHeader = createHeader(roots) + if (fdReader.pos !== newHeader.length) { + throw new Error(`updateRoots() can only overwrite a header of the same length (old header is ${fdReader.pos} bytes, new header is ${newHeader.length} bytes)`) + } + if (typeof fd === 'number') { + await fswrite(fd, newHeader, 0, newHeader.length, 0) + } else if (typeof fd === 'object' && typeof fd.read === 'function') { // FileDescriptor + await fd.write(newHeader, 0, newHeader.length, 0) + } + } +} + +const writer_browser = false + +;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/@ipld/car/src/index.js + + + + + + + +// @see https://www.iana.org/assignments/media-types/application/vnd.ipld.car +const contentType = 'application/vnd.ipld.car' + + + +;// CONCATENATED MODULE: ./node_modules/it-drain/dist/src/index.js /** - * Puts a 32-bit integer in this buffer in big-endian order. + * @packageDocumentation * - * @param i the 32-bit integer. + * Mostly useful for tests or when you want to be explicit about consuming an iterable without doing anything with any yielded values. * - * @return this buffer. - */ -util.DataBuffer.prototype.putInt32 = function(i) { - this.accommodate(4); - this.data.setInt32(this.write, i); - this.write += 4; - return this; -}; - -/** - * Puts a 16-bit integer in this buffer in little-endian order. + * @example * - * @param i the 16-bit integer. + * ```javascript + * import drain from 'it-drain' * - * @return this buffer. - */ -util.DataBuffer.prototype.putInt16Le = function(i) { - this.accommodate(2); - this.data.setInt16(this.write, i, true); - this.write += 2; - return this; -}; - -/** - * Puts a 24-bit integer in this buffer in little-endian order. + * // This can also be an iterator, generator, etc + * const values = [0, 1, 2, 3, 4] * - * @param i the 24-bit integer. + * drain(values) + * ``` * - * @return this buffer. - */ -util.DataBuffer.prototype.putInt24Le = function(i) { - this.accommodate(3); - this.data.setInt8(this.write, i >> 16 & 0xFF); - this.data.setInt16(this.write, i >> 8 & 0xFFFF, true); - this.write += 3; - return this; -}; - -/** - * Puts a 32-bit integer in this buffer in little-endian order. + * Async sources must be awaited: * - * @param i the 32-bit integer. + * ```javascript + * import drain from 'it-drain' * - * @return this buffer. + * const values = async function * { + * yield * [0, 1, 2, 3, 4] + * } + * + * await drain(values()) + * ``` */ -util.DataBuffer.prototype.putInt32Le = function(i) { - this.accommodate(4); - this.data.setInt32(this.write, i, true); - this.write += 4; - return this; -}; - +function dist_src_isAsyncIterable(thing) { + return thing[Symbol.asyncIterator] != null; +} +function src_drain(source) { + if (dist_src_isAsyncIterable(source)) { + return (async () => { + for await (const _ of source) { } // eslint-disable-line no-unused-vars,no-empty,@typescript-eslint/no-unused-vars + })(); + } + else { + for (const _ of source) { } // eslint-disable-line no-unused-vars,no-empty,@typescript-eslint/no-unused-vars + } +} +/* harmony default export */ const it_drain_dist_src = (src_drain); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/it-peekable/dist/src/index.js /** - * Puts an n-bit integer in this buffer in big-endian order. + * @packageDocumentation * - * @param i the n-bit integer. - * @param n the number of bits in the integer (8, 16, 24, or 32). + * Lets you look at the contents of an async iterator and decide what to do * - * @return this buffer. - */ -util.DataBuffer.prototype.putInt = function(i, n) { - _checkBitsParam(n); - this.accommodate(n / 8); - do { - n -= 8; - this.data.setInt8(this.write++, (i >> n) & 0xFF); - } while(n > 0); - return this; -}; - -/** - * Puts a signed n-bit integer in this buffer in big-endian order. Two's - * complement representation is used. + * @example * - * @param i the n-bit integer. - * @param n the number of bits in the integer. + * ```javascript + * import peekable from 'it-peekable' * - * @return this buffer. - */ -util.DataBuffer.prototype.putSignedInt = function(i, n) { - _checkBitsParam(n); - this.accommodate(n / 8); - if(i < 0) { - i += 2 << (n - 1); - } - return this.putInt(i, n); -}; - -/** - * Gets a byte from this buffer and advances the read pointer by 1. + * // This can also be an iterator, generator, etc + * const values = [0, 1, 2, 3, 4] * - * @return the byte. - */ -util.DataBuffer.prototype.getByte = function() { - return this.data.getInt8(this.read++); -}; - -/** - * Gets a uint16 from this buffer in big-endian order and advances the read - * pointer by 2. + * const it = peekable(value) * - * @return the uint16. - */ -util.DataBuffer.prototype.getInt16 = function() { - var rval = this.data.getInt16(this.read); - this.read += 2; - return rval; -}; - -/** - * Gets a uint24 from this buffer in big-endian order and advances the read - * pointer by 3. + * const first = it.peek() * - * @return the uint24. - */ -util.DataBuffer.prototype.getInt24 = function() { - var rval = ( - this.data.getInt16(this.read) << 8 ^ - this.data.getInt8(this.read + 2)); - this.read += 3; - return rval; -}; - -/** - * Gets a uint32 from this buffer in big-endian order and advances the read - * pointer by 4. + * console.info(first) // 0 * - * @return the word. - */ -util.DataBuffer.prototype.getInt32 = function() { - var rval = this.data.getInt32(this.read); - this.read += 4; - return rval; -}; - -/** - * Gets a uint16 from this buffer in little-endian order and advances the read - * pointer by 2. + * it.push(first) * - * @return the uint16. - */ -util.DataBuffer.prototype.getInt16Le = function() { - var rval = this.data.getInt16(this.read, true); - this.read += 2; - return rval; -}; - -/** - * Gets a uint24 from this buffer in little-endian order and advances the read - * pointer by 3. + * console.info([...it]) + * // [ 0, 1, 2, 3, 4 ] + * ``` * - * @return the uint24. - */ -util.DataBuffer.prototype.getInt24Le = function() { - var rval = ( - this.data.getInt8(this.read) ^ - this.data.getInt16(this.read + 1, true) << 8); - this.read += 3; - return rval; -}; - -/** - * Gets a uint32 from this buffer in little-endian order and advances the read - * pointer by 4. + * Async sources must be awaited: * - * @return the word. - */ -util.DataBuffer.prototype.getInt32Le = function() { - var rval = this.data.getInt32(this.read, true); - this.read += 4; - return rval; -}; - -/** - * Gets an n-bit integer from this buffer in big-endian order and advances the - * read pointer by n/8. + * ```javascript + * import peekable from 'it-peekable' * - * @param n the number of bits in the integer (8, 16, 24, or 32). + * const values = async function * () { + * yield * [0, 1, 2, 3, 4] + * } * - * @return the integer. - */ -util.DataBuffer.prototype.getInt = function(n) { - _checkBitsParam(n); - var rval = 0; - do { - // TODO: Use (rval * 0x100) if adding support for 33 to 53 bits. - rval = (rval << 8) + this.data.getInt8(this.read++); - n -= 8; - } while(n > 0); - return rval; -}; - -/** - * Gets a signed n-bit integer from this buffer in big-endian order, using - * two's complement, and advances the read pointer by n/8. + * const it = peekable(values()) * - * @param n the number of bits in the integer (8, 16, 24, or 32). + * const first = await it.peek() * - * @return the integer. - */ -util.DataBuffer.prototype.getSignedInt = function(n) { - // getInt checks n - var x = this.getInt(n); - var max = 2 << (n - 2); - if(x >= max) { - x -= max << 1; - } - return x; -}; - -/** - * Reads bytes out as a binary encoded string and clears them from the - * buffer. + * console.info(first) // 0 * - * @param count the number of bytes to read, undefined or null for all. + * it.push(first) * - * @return a binary encoded string of bytes. + * console.info(await all(it)) + * // [ 0, 1, 2, 3, 4 ] + * ``` */ -util.DataBuffer.prototype.getBytes = function(count) { - // TODO: deprecate this method, it is poorly named and - // this.toString('binary') replaces it - // add a toTypedArray()/toArrayBuffer() function - var rval; - if(count) { - // read count bytes - count = Math.min(this.length(), count); - rval = this.data.slice(this.read, this.read + count); - this.read += count; - } else if(count === 0) { - rval = ''; - } else { - // read all bytes, optimize to only copy when needed - rval = (this.read === 0) ? this.data : this.data.slice(this.read); - this.clear(); - } - return rval; -}; - +function peekable(iterable) { + // @ts-expect-error can't use Symbol.asyncIterator to index iterable since it might be Iterable + const [iterator, symbol] = iterable[Symbol.asyncIterator] != null + // @ts-expect-error can't use Symbol.asyncIterator to index iterable since it might be Iterable + ? [iterable[Symbol.asyncIterator](), Symbol.asyncIterator] + // @ts-expect-error can't use Symbol.iterator to index iterable since it might be AsyncIterable + : [iterable[Symbol.iterator](), Symbol.iterator]; + const queue = []; + // @ts-expect-error can't use symbol to index peekable + return { + peek: () => { + return iterator.next(); + }, + push: (value) => { + queue.push(value); + }, + next: () => { + if (queue.length > 0) { + return { + done: false, + value: queue.shift() + }; + } + return iterator.next(); + }, + [symbol]() { + return this; + } + }; +} +/* harmony default export */ const it_peekable_dist_src = (peekable); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/it-map/dist/src/index.js /** - * Gets a binary encoded string of the bytes from this buffer without - * modifying the read pointer. + * @packageDocumentation * - * @param count the number of bytes to get, omit to get all. + * Convert one value from an (async)iterator into another. * - * @return a string full of binary encoded characters. - */ -util.DataBuffer.prototype.bytes = function(count) { - // TODO: deprecate this method, it is poorly named, add "getString()" - return (typeof(count) === 'undefined' ? - this.data.slice(this.read) : - this.data.slice(this.read, this.read + count)); -}; - -/** - * Gets a byte at the given index without modifying the read pointer. + * @example * - * @param i the byte index. + * ```javascript + * import map from 'it-map' * - * @return the byte. - */ -util.DataBuffer.prototype.at = function(i) { - return this.data.getUint8(this.read + i); -}; - -/** - * Puts a byte at the given index without modifying the read pointer. + * // This can also be an iterator, generator, etc + * const values = [0, 1, 2, 3, 4] * - * @param i the byte index. - * @param b the byte to put. + * const result = map(values, (val) => val++) * - * @return this buffer. - */ -util.DataBuffer.prototype.setAt = function(i, b) { - this.data.setUint8(i, b); - return this; -}; - -/** - * Gets the last byte without modifying the read pointer. + * console.info(result) // [1, 2, 3, 4, 5] + * ``` * - * @return the last byte. + * Async sources and transforms must be awaited: + * + * ```javascript + * import map from 'it-map' + * + * const values = async function * () { + * yield * [0, 1, 2, 3, 4] + * } + * + * const result = await map(values(), async (val) => val++) + * + * console.info(result) // [1, 2, 3, 4, 5] + * ``` */ -util.DataBuffer.prototype.last = function() { - return this.data.getUint8(this.write - 1); -}; + +function it_map_dist_src_isAsyncIterable(thing) { + return thing[Symbol.asyncIterator] != null; +} +function src_map(source, func) { + if (it_map_dist_src_isAsyncIterable(source)) { + return (async function* () { + for await (const val of source) { + yield func(val); + } + })(); + } + // if mapping function returns a promise we have to return an async generator + const peekable = it_peekable_dist_src(source); + const { value, done } = peekable.next(); + if (done === true) { + return (function* () { }()); + } + const res = func(value); + // @ts-expect-error .then is not present on O + if (typeof res.then === 'function') { + return (async function* () { + yield await res; + for await (const val of peekable) { + yield func(val); + } + })(); + } + const fn = func; + return (function* () { + yield res; + for (const val of peekable) { + yield fn(val); + } + })(); +} +/* harmony default export */ const it_map_dist_src = (src_map); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/p-defer/index.js +function pDefer() { + const deferred = {}; + + deferred.promise = new Promise((resolve, reject) => { + deferred.resolve = resolve; + deferred.reject = reject; + }); + + return deferred; +} + +// EXTERNAL MODULE: ./node_modules/eventemitter3/index.js +var eventemitter3 = __nccwpck_require__(27929); +;// CONCATENATED MODULE: ./node_modules/eventemitter3/index.mjs + + + +/* harmony default export */ const node_modules_eventemitter3 = ((/* unused pure expression or super */ null && (EventEmitter))); + +;// CONCATENATED MODULE: ./node_modules/p-timeout/index.js +class TimeoutError extends Error { + constructor(message) { + super(message); + this.name = 'TimeoutError'; + } +} /** - * Creates a copy of this buffer. - * - * @return the copy. - */ -util.DataBuffer.prototype.copy = function() { - return new util.DataBuffer(this); -}; +An error to be thrown when the request is aborted by AbortController. +DOMException is thrown instead of this Error when DOMException is available. +*/ +class p_timeout_AbortError extends Error { + constructor(message) { + super(); + this.name = 'AbortError'; + this.message = message; + } +} /** - * Compacts this buffer. - * - * @return this buffer. - */ -util.DataBuffer.prototype.compact = function() { - if(this.read > 0) { - var src = new Uint8Array(this.data.buffer, this.read); - var dst = new Uint8Array(src.byteLength); - dst.set(src); - this.data = new DataView(dst); - this.write -= this.read; - this.read = 0; - } - return this; -}; +TODO: Remove AbortError and just throw DOMException when targeting Node 18. +*/ +const getDOMException = errorMessage => globalThis.DOMException === undefined ? + new p_timeout_AbortError(errorMessage) : + new DOMException(errorMessage); /** - * Clears this buffer. - * - * @return this buffer. - */ -util.DataBuffer.prototype.clear = function() { - this.data = new DataView(new ArrayBuffer(0)); - this.read = this.write = 0; - return this; +TODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18. +*/ +const getAbortedReason = signal => { + const reason = signal.reason === undefined ? + getDOMException('This operation was aborted.') : + signal.reason; + + return reason instanceof Error ? reason : getDOMException(reason); }; -/** - * Shortens this buffer by triming bytes off of the end of this buffer. - * - * @param count the number of bytes to trim off. - * - * @return this buffer. - */ -util.DataBuffer.prototype.truncate = function(count) { - this.write = Math.max(0, this.length() - count); - this.read = Math.min(this.read, this.write); - return this; +function pTimeout(promise, milliseconds, fallback, options) { + let timer; + + const cancelablePromise = new Promise((resolve, reject) => { + if (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) { + throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${milliseconds}\``); + } + + if (milliseconds === Number.POSITIVE_INFINITY) { + resolve(promise); + return; + } + + options = { + customTimers: {setTimeout, clearTimeout}, + ...options + }; + + if (options.signal) { + const {signal} = options; + if (signal.aborted) { + reject(getAbortedReason(signal)); + } + + signal.addEventListener('abort', () => { + reject(getAbortedReason(signal)); + }); + } + + timer = options.customTimers.setTimeout.call(undefined, () => { + if (typeof fallback === 'function') { + try { + resolve(fallback()); + } catch (error) { + reject(error); + } + + return; + } + + const message = typeof fallback === 'string' ? fallback : `Promise timed out after ${milliseconds} milliseconds`; + const timeoutError = fallback instanceof Error ? fallback : new TimeoutError(message); + + if (typeof promise.cancel === 'function') { + promise.cancel(); + } + + reject(timeoutError); + }, milliseconds); + + (async () => { + try { + resolve(await promise); + } catch (error) { + reject(error); + } finally { + options.customTimers.clearTimeout.call(undefined, timer); + } + })(); + }); + + cancelablePromise.clear = () => { + clearTimeout(timer); + timer = undefined; + }; + + return cancelablePromise; +} + +;// CONCATENATED MODULE: ./node_modules/p-queue/dist/lower-bound.js +// Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound +// Used to compute insertion index to keep queue sorted after insertion +function lowerBound(array, value, comparator) { + let first = 0; + let count = array.length; + while (count > 0) { + const step = Math.trunc(count / 2); + let it = first + step; + if (comparator(array[it], value) <= 0) { + first = ++it; + count -= step + 1; + } + else { + count = step; + } + } + return first; +} + +;// CONCATENATED MODULE: ./node_modules/p-queue/dist/priority-queue.js +var priority_queue_classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; +var _PriorityQueue_queue; -/** - * Converts this buffer to a hexadecimal string. - * - * @return a hexadecimal string. - */ -util.DataBuffer.prototype.toHex = function() { - var rval = ''; - for(var i = this.read; i < this.data.byteLength; ++i) { - var b = this.data.getUint8(i); - if(b < 16) { - rval += '0'; +class PriorityQueue { + constructor() { + _PriorityQueue_queue.set(this, []); } - rval += b.toString(16); - } - return rval; + enqueue(run, options) { + options = { + priority: 0, + ...options, + }; + const element = { + priority: options.priority, + run, + }; + if (this.size && priority_queue_classPrivateFieldGet(this, _PriorityQueue_queue, "f")[this.size - 1].priority >= options.priority) { + priority_queue_classPrivateFieldGet(this, _PriorityQueue_queue, "f").push(element); + return; + } + const index = lowerBound(priority_queue_classPrivateFieldGet(this, _PriorityQueue_queue, "f"), element, (a, b) => b.priority - a.priority); + priority_queue_classPrivateFieldGet(this, _PriorityQueue_queue, "f").splice(index, 0, element); + } + dequeue() { + const item = priority_queue_classPrivateFieldGet(this, _PriorityQueue_queue, "f").shift(); + return item === null || item === void 0 ? void 0 : item.run; + } + filter(options) { + return priority_queue_classPrivateFieldGet(this, _PriorityQueue_queue, "f").filter((element) => element.priority === options.priority).map((element) => element.run); + } + get size() { + return priority_queue_classPrivateFieldGet(this, _PriorityQueue_queue, "f").length; + } +} +_PriorityQueue_queue = new WeakMap(); +/* harmony default export */ const priority_queue = (PriorityQueue); + +;// CONCATENATED MODULE: ./node_modules/p-queue/dist/index.js +var dist_classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { + if (kind === "m") throw new TypeError("Private method is not writable"); + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); + return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; +var dist_classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { + if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); + if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); + return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); +}; +var _PQueue_instances, _PQueue_carryoverConcurrencyCount, _PQueue_isIntervalIgnored, _PQueue_intervalCount, _PQueue_intervalCap, _PQueue_interval, _PQueue_intervalEnd, _PQueue_intervalId, _PQueue_timeoutId, _PQueue_queue, _PQueue_queueClass, _PQueue_pending, _PQueue_concurrency, _PQueue_isPaused, _PQueue_throwOnTimeout, _PQueue_doesIntervalAllowAnother_get, _PQueue_doesConcurrentAllowAnother_get, _PQueue_next, _PQueue_onResumeInterval, _PQueue_isIntervalPaused_get, _PQueue_tryToStartAnother, _PQueue_initializeIntervalIfNeeded, _PQueue_onInterval, _PQueue_processQueue, _PQueue_throwOnAbort, _PQueue_onEvent; + + /** - * Converts this buffer to a string, using the given encoding. If no - * encoding is given, 'utf8' (UTF-8) is used. - * - * @param [encoding] the encoding to use: 'binary', 'utf8', 'utf16', 'hex', - * 'base64' (default: 'utf8'). - * - * @return a string representation of the bytes in this buffer. - */ -util.DataBuffer.prototype.toString = function(encoding) { - var view = new Uint8Array(this.data, this.read, this.length()); - encoding = encoding || 'utf8'; +The error thrown by `queue.add()` when a job is aborted before it is run. See `signal`. +*/ +class dist_AbortError extends Error { +} +/** +Promise queue with concurrency control. +*/ +class PQueue extends eventemitter3 { + // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()` + constructor(options) { + var _a, _b, _c, _d; + super(); + _PQueue_instances.add(this); + _PQueue_carryoverConcurrencyCount.set(this, void 0); + _PQueue_isIntervalIgnored.set(this, void 0); + _PQueue_intervalCount.set(this, 0); + _PQueue_intervalCap.set(this, void 0); + _PQueue_interval.set(this, void 0); + _PQueue_intervalEnd.set(this, 0); + _PQueue_intervalId.set(this, void 0); + _PQueue_timeoutId.set(this, void 0); + _PQueue_queue.set(this, void 0); + _PQueue_queueClass.set(this, void 0); + _PQueue_pending.set(this, 0); + // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194 + _PQueue_concurrency.set(this, void 0); + _PQueue_isPaused.set(this, void 0); + _PQueue_throwOnTimeout.set(this, void 0); + /** + Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already. + + Applies to each future operation. + */ + Object.defineProperty(this, "timeout", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + options = { + carryoverConcurrencyCount: false, + intervalCap: Number.POSITIVE_INFINITY, + interval: 0, + concurrency: Number.POSITIVE_INFINITY, + autoStart: true, + queueClass: priority_queue, + ...options, + }; + if (!(typeof options.intervalCap === 'number' && options.intervalCap >= 1)) { + throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${(_b = (_a = options.intervalCap) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : ''}\` (${typeof options.intervalCap})`); + } + if (options.interval === undefined || !(Number.isFinite(options.interval) && options.interval >= 0)) { + throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${(_d = (_c = options.interval) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : ''}\` (${typeof options.interval})`); + } + dist_classPrivateFieldSet(this, _PQueue_carryoverConcurrencyCount, options.carryoverConcurrencyCount, "f"); + dist_classPrivateFieldSet(this, _PQueue_isIntervalIgnored, options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0, "f"); + dist_classPrivateFieldSet(this, _PQueue_intervalCap, options.intervalCap, "f"); + dist_classPrivateFieldSet(this, _PQueue_interval, options.interval, "f"); + dist_classPrivateFieldSet(this, _PQueue_queue, new options.queueClass(), "f"); + dist_classPrivateFieldSet(this, _PQueue_queueClass, options.queueClass, "f"); + this.concurrency = options.concurrency; + this.timeout = options.timeout; + dist_classPrivateFieldSet(this, _PQueue_throwOnTimeout, options.throwOnTimeout === true, "f"); + dist_classPrivateFieldSet(this, _PQueue_isPaused, options.autoStart === false, "f"); + } + get concurrency() { + return dist_classPrivateFieldGet(this, _PQueue_concurrency, "f"); + } + set concurrency(newConcurrency) { + if (!(typeof newConcurrency === 'number' && newConcurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`); + } + dist_classPrivateFieldSet(this, _PQueue_concurrency, newConcurrency, "f"); + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_processQueue).call(this); + } + async add(function_, options = {}) { + options = { + timeout: this.timeout, + throwOnTimeout: dist_classPrivateFieldGet(this, _PQueue_throwOnTimeout, "f"), + ...options, + }; + return new Promise((resolve, reject) => { + dist_classPrivateFieldGet(this, _PQueue_queue, "f").enqueue(async () => { + var _a; + var _b, _c; + dist_classPrivateFieldSet(this, _PQueue_pending, (_b = dist_classPrivateFieldGet(this, _PQueue_pending, "f"), _b++, _b), "f"); + dist_classPrivateFieldSet(this, _PQueue_intervalCount, (_c = dist_classPrivateFieldGet(this, _PQueue_intervalCount, "f"), _c++, _c), "f"); + try { + // TODO: Use options.signal?.throwIfAborted() when targeting Node.js 18 + if ((_a = options.signal) === null || _a === void 0 ? void 0 : _a.aborted) { + // TODO: Use ABORT_ERR code when targeting Node.js 16 (https://nodejs.org/docs/latest-v16.x/api/errors.html#abort_err) + throw new dist_AbortError('The task was aborted.'); + } + let operation = function_({ signal: options.signal }); + if (options.timeout) { + operation = pTimeout(Promise.resolve(operation), options.timeout); + } + if (options.signal) { + operation = Promise.race([operation, dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_throwOnAbort).call(this, options.signal)]); + } + const result = await operation; + resolve(result); + this.emit('completed', result); + } + catch (error) { + if (error instanceof TimeoutError && !options.throwOnTimeout) { + resolve(); + return; + } + reject(error); + this.emit('error', error); + } + finally { + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_next).call(this); + } + }, options); + this.emit('add'); + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_tryToStartAnother).call(this); + }); + } + async addAll(functions, options) { + return Promise.all(functions.map(async (function_) => this.add(function_, options))); + } + /** + Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.) + */ + start() { + if (!dist_classPrivateFieldGet(this, _PQueue_isPaused, "f")) { + return this; + } + dist_classPrivateFieldSet(this, _PQueue_isPaused, false, "f"); + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_processQueue).call(this); + return this; + } + /** + Put queue execution on hold. + */ + pause() { + dist_classPrivateFieldSet(this, _PQueue_isPaused, true, "f"); + } + /** + Clear the queue. + */ + clear() { + dist_classPrivateFieldSet(this, _PQueue_queue, new (dist_classPrivateFieldGet(this, _PQueue_queueClass, "f"))(), "f"); + } + /** + Can be called multiple times. Useful if you for example add additional items at a later time. - // encode to string - if(encoding === 'binary' || encoding === 'raw') { - return util.binary.raw.encode(view); + @returns A promise that settles when the queue becomes empty. + */ + async onEmpty() { + // Instantly resolve if the queue is empty + if (dist_classPrivateFieldGet(this, _PQueue_queue, "f").size === 0) { + return; + } + await dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_onEvent).call(this, 'empty'); + } + /** + @returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`. + + If you want to avoid having the queue grow beyond a certain size you can `await queue.onSizeLessThan()` before adding a new item. + + Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation. + */ + async onSizeLessThan(limit) { + // Instantly resolve if the queue is empty. + if (dist_classPrivateFieldGet(this, _PQueue_queue, "f").size < limit) { + return; + } + await dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_onEvent).call(this, 'next', () => dist_classPrivateFieldGet(this, _PQueue_queue, "f").size < limit); + } + /** + The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet. + + @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`. + */ + async onIdle() { + // Instantly resolve if none pending and if nothing else is queued + if (dist_classPrivateFieldGet(this, _PQueue_pending, "f") === 0 && dist_classPrivateFieldGet(this, _PQueue_queue, "f").size === 0) { + return; + } + await dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_onEvent).call(this, 'idle'); + } + /** + Size of the queue, the number of queued items waiting to run. + */ + get size() { + return dist_classPrivateFieldGet(this, _PQueue_queue, "f").size; + } + /** + Size of the queue, filtered by the given options. + + For example, this can be used to find the number of items remaining in the queue with a specific priority level. + */ + sizeBy(options) { + // eslint-disable-next-line unicorn/no-array-callback-reference + return dist_classPrivateFieldGet(this, _PQueue_queue, "f").filter(options).length; + } + /** + Number of running items (no longer in the queue). + */ + get pending() { + return dist_classPrivateFieldGet(this, _PQueue_pending, "f"); + } + /** + Whether the queue is currently paused. + */ + get isPaused() { + return dist_classPrivateFieldGet(this, _PQueue_isPaused, "f"); + } +} +_PQueue_carryoverConcurrencyCount = new WeakMap(), _PQueue_isIntervalIgnored = new WeakMap(), _PQueue_intervalCount = new WeakMap(), _PQueue_intervalCap = new WeakMap(), _PQueue_interval = new WeakMap(), _PQueue_intervalEnd = new WeakMap(), _PQueue_intervalId = new WeakMap(), _PQueue_timeoutId = new WeakMap(), _PQueue_queue = new WeakMap(), _PQueue_queueClass = new WeakMap(), _PQueue_pending = new WeakMap(), _PQueue_concurrency = new WeakMap(), _PQueue_isPaused = new WeakMap(), _PQueue_throwOnTimeout = new WeakMap(), _PQueue_instances = new WeakSet(), _PQueue_doesIntervalAllowAnother_get = function _PQueue_doesIntervalAllowAnother_get() { + return dist_classPrivateFieldGet(this, _PQueue_isIntervalIgnored, "f") || dist_classPrivateFieldGet(this, _PQueue_intervalCount, "f") < dist_classPrivateFieldGet(this, _PQueue_intervalCap, "f"); +}, _PQueue_doesConcurrentAllowAnother_get = function _PQueue_doesConcurrentAllowAnother_get() { + return dist_classPrivateFieldGet(this, _PQueue_pending, "f") < dist_classPrivateFieldGet(this, _PQueue_concurrency, "f"); +}, _PQueue_next = function _PQueue_next() { + var _a; + dist_classPrivateFieldSet(this, _PQueue_pending, (_a = dist_classPrivateFieldGet(this, _PQueue_pending, "f"), _a--, _a), "f"); + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_tryToStartAnother).call(this); + this.emit('next'); +}, _PQueue_onResumeInterval = function _PQueue_onResumeInterval() { + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_onInterval).call(this); + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_initializeIntervalIfNeeded).call(this); + dist_classPrivateFieldSet(this, _PQueue_timeoutId, undefined, "f"); +}, _PQueue_isIntervalPaused_get = function _PQueue_isIntervalPaused_get() { + const now = Date.now(); + if (dist_classPrivateFieldGet(this, _PQueue_intervalId, "f") === undefined) { + const delay = dist_classPrivateFieldGet(this, _PQueue_intervalEnd, "f") - now; + if (delay < 0) { + // Act as the interval was done + // We don't need to resume it here because it will be resumed on line 160 + dist_classPrivateFieldSet(this, _PQueue_intervalCount, (dist_classPrivateFieldGet(this, _PQueue_carryoverConcurrencyCount, "f")) ? dist_classPrivateFieldGet(this, _PQueue_pending, "f") : 0, "f"); + } + else { + // Act as the interval is pending + if (dist_classPrivateFieldGet(this, _PQueue_timeoutId, "f") === undefined) { + dist_classPrivateFieldSet(this, _PQueue_timeoutId, setTimeout(() => { + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_onResumeInterval).call(this); + }, delay), "f"); + } + return true; + } + } + return false; +}, _PQueue_tryToStartAnother = function _PQueue_tryToStartAnother() { + if (dist_classPrivateFieldGet(this, _PQueue_queue, "f").size === 0) { + // We can clear the interval ("pause") + // Because we can redo it later ("resume") + if (dist_classPrivateFieldGet(this, _PQueue_intervalId, "f")) { + clearInterval(dist_classPrivateFieldGet(this, _PQueue_intervalId, "f")); + } + dist_classPrivateFieldSet(this, _PQueue_intervalId, undefined, "f"); + this.emit('empty'); + if (dist_classPrivateFieldGet(this, _PQueue_pending, "f") === 0) { + this.emit('idle'); + } + return false; + } + if (!dist_classPrivateFieldGet(this, _PQueue_isPaused, "f")) { + const canInitializeInterval = !dist_classPrivateFieldGet(this, _PQueue_instances, "a", _PQueue_isIntervalPaused_get); + if (dist_classPrivateFieldGet(this, _PQueue_instances, "a", _PQueue_doesIntervalAllowAnother_get) && dist_classPrivateFieldGet(this, _PQueue_instances, "a", _PQueue_doesConcurrentAllowAnother_get)) { + const job = dist_classPrivateFieldGet(this, _PQueue_queue, "f").dequeue(); + if (!job) { + return false; + } + this.emit('active'); + job(); + if (canInitializeInterval) { + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_initializeIntervalIfNeeded).call(this); + } + return true; + } + } + return false; +}, _PQueue_initializeIntervalIfNeeded = function _PQueue_initializeIntervalIfNeeded() { + if (dist_classPrivateFieldGet(this, _PQueue_isIntervalIgnored, "f") || dist_classPrivateFieldGet(this, _PQueue_intervalId, "f") !== undefined) { + return; + } + dist_classPrivateFieldSet(this, _PQueue_intervalId, setInterval(() => { + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_onInterval).call(this); + }, dist_classPrivateFieldGet(this, _PQueue_interval, "f")), "f"); + dist_classPrivateFieldSet(this, _PQueue_intervalEnd, Date.now() + dist_classPrivateFieldGet(this, _PQueue_interval, "f"), "f"); +}, _PQueue_onInterval = function _PQueue_onInterval() { + if (dist_classPrivateFieldGet(this, _PQueue_intervalCount, "f") === 0 && dist_classPrivateFieldGet(this, _PQueue_pending, "f") === 0 && dist_classPrivateFieldGet(this, _PQueue_intervalId, "f")) { + clearInterval(dist_classPrivateFieldGet(this, _PQueue_intervalId, "f")); + dist_classPrivateFieldSet(this, _PQueue_intervalId, undefined, "f"); + } + dist_classPrivateFieldSet(this, _PQueue_intervalCount, dist_classPrivateFieldGet(this, _PQueue_carryoverConcurrencyCount, "f") ? dist_classPrivateFieldGet(this, _PQueue_pending, "f") : 0, "f"); + dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_processQueue).call(this); +}, _PQueue_processQueue = function _PQueue_processQueue() { + // eslint-disable-next-line no-empty + while (dist_classPrivateFieldGet(this, _PQueue_instances, "m", _PQueue_tryToStartAnother).call(this)) { } +}, _PQueue_throwOnAbort = async function _PQueue_throwOnAbort(signal) { + return new Promise((_resolve, reject) => { + signal.addEventListener('abort', () => { + // TODO: Reject with signal.throwIfAborted() when targeting Node.js 18 + // TODO: Use ABORT_ERR code when targeting Node.js 16 (https://nodejs.org/docs/latest-v16.x/api/errors.html#abort_err) + reject(new dist_AbortError('The task was aborted.')); + }, { once: true }); + }); +}, _PQueue_onEvent = async function _PQueue_onEvent(event, filter) { + return new Promise(resolve => { + const listener = () => { + if (filter && !filter()) { + return; + } + this.off(event, listener); + resolve(); + }; + this.on(event, listener); + }); +}; +/* harmony default export */ const dist = (PQueue); + +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function car_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; } - if(encoding === 'hex') { - return util.binary.hex.encode(view); + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; } - if(encoding === 'base64') { - return util.binary.base64.encode(view); + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str } - - // decode to text - if(encoding === 'utf8') { - return util.text.utf8.decode(view); + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch } - if(encoding === 'utf16') { - return util.text.utf16.decode(view); + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + } +} +var car_node_modules_multiformats_vendor_base_x_src = car_node_modules_multiformats_vendor_base_x_base; - throw new Error('Invalid encoding: ' + encoding); -}; +var car_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = car_node_modules_multiformats_vendor_base_x_src; -/** End Buffer w/UInt8Array backing */ +/* harmony default export */ const car_node_modules_multiformats_vendor_base_x = (car_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); + +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/src/bytes.js +const car_node_modules_multiformats_src_bytes_empty = new Uint8Array(0) /** - * Creates a buffer that stores bytes. A value may be given to populate the - * buffer with data. This value can either be string of encoded bytes or a - * regular string of characters. When passing a string of binary encoded - * bytes, the encoding `raw` should be given. This is also the default. When - * passing a string of characters, the encoding `utf8` should be given. - * - * @param [input] a string with encoded bytes to store in the buffer. - * @param [encoding] (default: 'raw', other: 'utf8'). + * @param {Uint8Array} d */ -util.createBuffer = function(input, encoding) { - // TODO: deprecate, use new ByteBuffer() instead - encoding = encoding || 'raw'; - if(input !== undefined && encoding === 'utf8') { - input = util.encodeUtf8(input); - } - return new util.ByteBuffer(input); -}; +const car_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') /** - * Fills a string with a particular value. If you want the string to be a byte - * string, pass in String.fromCharCode(theByte). - * - * @param c the character to fill the string with, use String.fromCharCode - * to fill the string with a byte value. - * @param n the number of characters of value c to fill with. - * - * @return the filled string. + * @param {string} hex */ -util.fillString = function(c, n) { - var s = ''; - while(n > 0) { - if(n & 1) { - s += c; - } - n >>>= 1; - if(n > 0) { - c += c; - } - } - return s; -}; +const car_node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : car_node_modules_multiformats_src_bytes_empty +} /** - * Performs a per byte XOR between two byte strings and returns the result as a - * string of bytes. - * - * @param s1 first string of bytes. - * @param s2 second string of bytes. - * @param n the number of bytes to XOR. - * - * @return the XOR'd result. + * @param {Uint8Array} aa + * @param {Uint8Array} bb */ -util.xorBytes = function(s1, s2, n) { - var s3 = ''; - var b = ''; - var t = ''; - var i = 0; - var c = 0; - for(; n > 0; --n, ++i) { - b = s1.charCodeAt(i) ^ s2.charCodeAt(i); - if(c >= 10) { - s3 += t; - t = ''; - c = 0; +const car_node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false + } + + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false } - t += String.fromCharCode(b); - ++c; } - s3 += t; - return s3; -}; + + return true +} /** - * Converts a hex string into a 'binary' encoded string of bytes. - * - * @param hex the hexadecimal string to convert. - * - * @return the binary-encoded string of bytes. + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} */ -util.hexToBytes = function(hex) { - // TODO: deprecate: "Deprecated. Use util.binary.hex.decode instead." - var rval = ''; - var i = 0; - if(hex.length & 1 == 1) { - // odd number of characters, convert first character alone - i = 1; - rval += String.fromCharCode(parseInt(hex[0], 16)); - } - // convert 2 characters (1 byte) at a time - for(; i < hex.length; i += 2) { - rval += String.fromCharCode(parseInt(hex.substr(i, 2), 16)); +const car_node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) } - return rval; -}; + throw new Error('Unknown type, must be binary type') +} /** - * Converts a 'binary' encoded string of bytes to hex. - * - * @param bytes the byte string to convert. - * - * @return the string of hexadecimal characters. + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} */ -util.bytesToHex = function(bytes) { - // TODO: deprecate: "Deprecated. Use util.binary.hex.encode instead." - return util.createBuffer(bytes).toHex(); -}; +const car_node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) /** - * Converts an 32-bit integer to 4-big-endian byte string. - * - * @param i the integer. - * - * @return the byte string. + * @param {string} str + * @returns {Uint8Array} */ -util.int32ToBytes = function(i) { - return ( - String.fromCharCode(i >> 24 & 0xFF) + - String.fromCharCode(i >> 16 & 0xFF) + - String.fromCharCode(i >> 8 & 0xFF) + - String.fromCharCode(i & 0xFF)); -}; - -// base64 characters, reverse mapping -var _base64 = - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; -var _base64Idx = [ -/*43 -43 = 0*/ -/*'+', 1, 2, 3,'/' */ - 62, -1, -1, -1, 63, - -/*'0','1','2','3','4','5','6','7','8','9' */ - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, +const car_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) -/*15, 16, 17,'=', 19, 20, 21 */ - -1, -1, -1, 64, -1, -1, -1, +/** + * @param {Uint8Array} b + * @returns {string} + */ +const car_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) -/*65 - 43 = 22*/ -/*'A','B','C','D','E','F','G','H','I','J','K','L','M', */ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -/*'N','O','P','Q','R','S','T','U','V','W','X','Y','Z' */ - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -/*91 - 43 = 48 */ -/*48, 49, 50, 51, 52, 53 */ - -1, -1, -1, -1, -1, -1, +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/src/bases/base.js -/*97 - 43 = 54*/ -/*'a','b','c','d','e','f','g','h','i','j','k','l','m' */ - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, -/*'n','o','p','q','r','s','t','u','v','w','x','y','z' */ - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51 -]; +// Linter can't see that API is used in types. +// eslint-disable-next-line -// base58 characters (Bitcoin alphabet) -var _base58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; /** - * Base64 encodes a 'binary' encoded string of bytes. + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. * - * @param input the binary encoded string of bytes to base64-encode. - * @param maxline the maximum number of encoded characters per line to use, - * defaults to none. - * - * @return the base64-encoded output. + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} */ -util.encode64 = function(input, maxline) { - // TODO: deprecate: "Deprecated. Use util.binary.base64.encode instead." - var line = ''; - var output = ''; - var chr1, chr2, chr3; - var i = 0; - while(i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); +class car_node_modules_multiformats_src_bases_base_Encoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + */ + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + } - // encode 4 character group - line += _base64.charAt(chr1 >> 2); - line += _base64.charAt(((chr1 & 3) << 4) | (chr2 >> 4)); - if(isNaN(chr2)) { - line += '=='; + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` } else { - line += _base64.charAt(((chr2 & 15) << 2) | (chr3 >> 6)); - line += isNaN(chr3) ? '=' : _base64.charAt(chr3 & 63); - } - - if(maxline && line.length > maxline) { - output += line.substr(0, maxline) + '\r\n'; - line = line.substr(maxline); + throw Error('Unknown type, must be binary type') } } - output += line; - return output; -}; +} /** - * Base64 decodes a string into a 'binary' encoded string of bytes. - * - * @param input the base64-encoded input. + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. * - * @return the binary encoded string. + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} */ -util.decode64 = function(input) { - // TODO: deprecate: "Deprecated. Use util.binary.base64.decode instead." - - // remove all non-base64 characters - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); - - var output = ''; - var enc1, enc2, enc3, enc4; - var i = 0; - - while(i < input.length) { - enc1 = _base64Idx[input.charCodeAt(i++) - 43]; - enc2 = _base64Idx[input.charCodeAt(i++) - 43]; - enc3 = _base64Idx[input.charCodeAt(i++) - 43]; - enc4 = _base64Idx[input.charCodeAt(i++) - 43]; +class car_node_modules_multiformats_src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') + } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode + } - output += String.fromCharCode((enc1 << 2) | (enc2 >> 4)); - if(enc3 !== 64) { - // decoded at least 2 bytes - output += String.fromCharCode(((enc2 & 15) << 4) | (enc3 >> 2)); - if(enc4 !== 64) { - // decoded 3 bytes - output += String.fromCharCode(((enc3 & 3) << 6) | enc4); + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') } } - return output; -}; + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return car_node_modules_multiformats_src_bases_base_or(this, decoder) + } +} /** - * Encodes the given string of characters (a standard JavaScript - * string) as a binary encoded string where the bytes represent - * a UTF-8 encoded string of characters. Non-ASCII characters will be - * encoded as multiple bytes according to UTF-8. - * - * @param str a standard string of characters to encode. - * - * @return the binary encoded string. + * @template {string} Prefix + * @typedef {Record>} Decoders */ -util.encodeUtf8 = function(str) { - return unescape(encodeURIComponent(str)); -}; /** - * Decodes a binary encoded string that contains bytes that - * represent a UTF-8 encoded string of characters -- into a - * string of characters (a standard JavaScript string). - * - * @param str the binary encoded string to decode. - * - * @return the resulting standard string of characters. + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} */ -util.decodeUtf8 = function(str) { - return decodeURIComponent(escape(str)); -}; +class car_node_modules_multiformats_src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders + } -// binary encoding/decoding tools -// FIXME: Experimental. Do not use yet. -util.binary = { - raw: {}, - hex: {}, - base64: {}, - base58: {}, - baseN : { - encode: baseN.encode, - decode: baseN.decode + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return car_node_modules_multiformats_src_bases_base_or(this, decoder) } -}; + + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) + } + } +} /** - * Encodes a Uint8Array as a binary-encoded string. This encoding uses - * a value between 0 and 255 for each character. - * - * @param bytes the Uint8Array to encode. - * - * @return the binary-encoded string. + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} */ -util.binary.raw.encode = function(bytes) { - return String.fromCharCode.apply(null, bytes); -}; +const car_node_modules_multiformats_src_bases_base_or = (left, right) => new car_node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) /** - * Decodes a binary-encoded string to a Uint8Array. This encoding uses - * a value between 0 and 255 for each character. - * - * @param str the binary-encoded string to decode. - * @param [output] an optional Uint8Array to write the output to; if it - * is too small, an exception will be thrown. - * @param [offset] the start offset for writing to the output (default: 0). - * - * @return the Uint8Array or the number of bytes written if output was given. + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} */ -util.binary.raw.decode = function(str, output, offset) { - var out = output; - if(!out) { - out = new Uint8Array(str.length); +class car_node_modules_multiformats_src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new car_node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new car_node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode) } - offset = offset || 0; - var j = offset; - for(var i = 0; i < str.length; ++i) { - out[j++] = str.charCodeAt(i); + + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) } - return output ? (j - offset) : out; -}; + + /** + * @param {string} input + */ + decode (input) { + return this.decoder.decode(input) + } +} /** - * Encodes a 'binary' string, ArrayBuffer, DataView, TypedArray, or - * ByteBuffer as a string of hexadecimal characters. - * - * @param bytes the bytes to convert. - * - * @return the string of hexadecimal characters. + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} */ -util.binary.hex.encode = util.bytesToHex; +const car_node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new car_node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode) /** - * Decodes a hex-encoded string to a Uint8Array. - * - * @param hex the hexadecimal string to convert. - * @param [output] an optional Uint8Array to write the output to; if it - * is too small, an exception will be thrown. - * @param [offset] the start offset for writing to the output (default: 0). - * - * @return the Uint8Array or the number of bytes written if output was given. + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} */ -util.binary.hex.decode = function(hex, output, offset) { - var out = output; - if(!out) { - out = new Uint8Array(Math.ceil(hex.length / 2)); +const car_node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = car_node_modules_multiformats_vendor_base_x(alphabet, name) + return car_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => car_node_modules_multiformats_src_bytes_coerce(decode(text)) + }) +} + +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const car_node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i } - offset = offset || 0; - var i = 0, j = offset; - if(hex.length & 1) { - // odd number of characters, convert first character alone - i = 1; - out[j++] = parseInt(hex[0], 16); + + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end } - // convert 2 characters (1 byte) at a time - for(; i < hex.length; i += 2) { - out[j++] = parseInt(hex.substr(i, 2), 16); + + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) + + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) + } + + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar + + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) + } } - return output ? (j - offset) : out; -}; + + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') + } + + return out +} /** - * Base64-encodes a Uint8Array. - * - * @param input the Uint8Array to encode. - * @param maxline the maximum number of encoded characters per line to use, - * defaults to none. - * - * @return the base64-encoded output string. + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} */ -util.binary.base64.encode = function(input, maxline) { - var line = ''; - var output = ''; - var chr1, chr2, chr3; - var i = 0; - while(i < input.byteLength) { - chr1 = input[i++]; - chr2 = input[i++]; - chr3 = input[i++]; +const car_node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' - // encode 4 character group - line += _base64.charAt(chr1 >> 2); - line += _base64.charAt(((chr1 & 3) << 4) | (chr2 >> 4)); - if(isNaN(chr2)) { - line += '=='; - } else { - line += _base64.charAt(((chr2 & 15) << 2) | (chr3 >> 6)); - line += isNaN(chr3) ? '=' : _base64.charAt(chr3 & 63); + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 + + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] } + } - if(maxline && line.length > maxline) { - output += line.substr(0, maxline) + '\r\n'; - line = line.substr(maxline); + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] + } + + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' } } - output += line; - return output; -}; + + return out +} /** - * Decodes a base64-encoded string to a Uint8Array. - * - * @param input the base64-encoded input string. - * @param [output] an optional Uint8Array to write the output to; if it - * is too small, an exception will be thrown. - * @param [offset] the start offset for writing to the output (default: 0). + * RFC4648 Factory * - * @return the Uint8Array or the number of bytes written if output was given. + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar */ -util.binary.base64.decode = function(input, output, offset) { - var out = output; - if(!out) { - out = new Uint8Array(Math.ceil(input.length / 4) * 3); - } +const car_node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return car_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return car_node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return car_node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) + } + }) +} - // remove all non-base64 characters - input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/src/bases/base64.js +// @ts-check + + + +const car_node_modules_multiformats_src_bases_base64_base64 = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) + +const car_node_modules_multiformats_src_bases_base64_base64pad = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) + +const car_node_modules_multiformats_src_bases_base64_base64url = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) + +const car_node_modules_multiformats_src_bases_base64_base64urlpad = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) + +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/src/bases/base32.js + + +const car_node_modules_multiformats_src_bases_base32_base32 = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) + +const car_node_modules_multiformats_src_bases_base32_base32upper = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) + +const car_node_modules_multiformats_src_bases_base32_base32pad = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) + +const car_node_modules_multiformats_src_bases_base32_base32padupper = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) + +const car_node_modules_multiformats_src_bases_base32_base32hex = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) + +const car_node_modules_multiformats_src_bases_base32_base32hexupper = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) + +const car_node_modules_multiformats_src_bases_base32_base32hexpad = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) + +const car_node_modules_multiformats_src_bases_base32_base32hexpadupper = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) + +const car_node_modules_multiformats_src_bases_base32_base32z = car_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) + +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/src/bases/base58.js + + +const car_node_modules_multiformats_src_bases_base58_base58btc = car_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) + +const car_node_modules_multiformats_src_bases_base58_base58flickr = car_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) + +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/vendor/varint.js +var car_node_modules_multiformats_vendor_varint_encode_1 = car_node_modules_multiformats_vendor_varint_encode; +var car_node_modules_multiformats_vendor_varint_MSB = 0x80 + , car_node_modules_multiformats_vendor_varint_REST = 0x7F + , car_node_modules_multiformats_vendor_varint_MSBALL = ~car_node_modules_multiformats_vendor_varint_REST + , car_node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31); + +function car_node_modules_multiformats_vendor_varint_encode(num, out, offset) { + out = out || []; offset = offset || 0; - var enc1, enc2, enc3, enc4; - var i = 0, j = offset; + var oldOffset = offset; - while(i < input.length) { - enc1 = _base64Idx[input.charCodeAt(i++) - 43]; - enc2 = _base64Idx[input.charCodeAt(i++) - 43]; - enc3 = _base64Idx[input.charCodeAt(i++) - 43]; - enc4 = _base64Idx[input.charCodeAt(i++) - 43]; + while(num >= car_node_modules_multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | car_node_modules_multiformats_vendor_varint_MSB; + num /= 128; + } + while(num & car_node_modules_multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | car_node_modules_multiformats_vendor_varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + + car_node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out +} - out[j++] = (enc1 << 2) | (enc2 >> 4); - if(enc3 !== 64) { - // decoded at least 2 bytes - out[j++] = ((enc2 & 15) << 4) | (enc3 >> 2); - if(enc4 !== 64) { - // decoded 3 bytes - out[j++] = ((enc3 & 3) << 6) | enc4; - } +var car_node_modules_multiformats_vendor_varint_decode = car_node_modules_multiformats_vendor_varint_read; + +var car_node_modules_multiformats_vendor_varint_MSB$1 = 0x80 + , car_node_modules_multiformats_vendor_varint_REST$1 = 0x7F; + +function car_node_modules_multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; + + do { + if (counter >= l) { + car_node_modules_multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') } - } + b = buf[counter++]; + res += shift < 28 + ? (b & car_node_modules_multiformats_vendor_varint_REST$1) << shift + : (b & car_node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= car_node_modules_multiformats_vendor_varint_MSB$1) - // make sure result is the exact decoded length - return output ? (j - offset) : out.subarray(0, j); -}; + car_node_modules_multiformats_vendor_varint_read.bytes = counter - offset; -// add support for base58 encoding/decoding with Bitcoin alphabet -util.binary.base58.encode = function(input, maxline) { - return util.binary.baseN.encode(input, _base58, maxline); -}; -util.binary.base58.decode = function(input, maxline) { - return util.binary.baseN.decode(input, _base58, maxline); + return res +} + +var car_node_modules_multiformats_vendor_varint_N1 = Math.pow(2, 7); +var car_node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14); +var car_node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21); +var car_node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28); +var car_node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35); +var car_node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42); +var car_node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49); +var car_node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56); +var car_node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63); + +var car_node_modules_multiformats_vendor_varint_length = function (value) { + return ( + value < car_node_modules_multiformats_vendor_varint_N1 ? 1 + : value < car_node_modules_multiformats_vendor_varint_N2 ? 2 + : value < car_node_modules_multiformats_vendor_varint_N3 ? 3 + : value < car_node_modules_multiformats_vendor_varint_N4 ? 4 + : value < car_node_modules_multiformats_vendor_varint_N5 ? 5 + : value < car_node_modules_multiformats_vendor_varint_N6 ? 6 + : value < car_node_modules_multiformats_vendor_varint_N7 ? 7 + : value < car_node_modules_multiformats_vendor_varint_N8 ? 8 + : value < car_node_modules_multiformats_vendor_varint_N9 ? 9 + : 10 + ) }; -// text encoding/decoding tools -// FIXME: Experimental. Do not use yet. -util.text = { - utf8: {}, - utf16: {} +var car_node_modules_multiformats_vendor_varint_varint = { + encode: car_node_modules_multiformats_vendor_varint_encode_1 + , decode: car_node_modules_multiformats_vendor_varint_decode + , encodingLength: car_node_modules_multiformats_vendor_varint_length }; +var car_node_modules_multiformats_vendor_varint_brrp_varint = car_node_modules_multiformats_vendor_varint_varint; + +/* harmony default export */ const car_node_modules_multiformats_vendor_varint = (car_node_modules_multiformats_vendor_varint_brrp_varint); + +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/src/varint.js + + /** - * Encodes the given string as UTF-8 in a Uint8Array. - * - * @param str the string to encode. - * @param [output] an optional Uint8Array to write the output to; if it - * is too small, an exception will be thrown. - * @param [offset] the start offset for writing to the output (default: 0). - * - * @return the Uint8Array or the number of bytes written if output was given. + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} */ -util.text.utf8.encode = function(str, output, offset) { - str = util.encodeUtf8(str); - var out = output; - if(!out) { - out = new Uint8Array(str.length); - } - offset = offset || 0; - var j = offset; - for(var i = 0; i < str.length; ++i) { - out[j++] = str.charCodeAt(i); - } - return output ? (j - offset) : out; -}; +const car_node_modules_multiformats_src_varint_decode = (data, offset = 0) => { + const code = car_node_modules_multiformats_vendor_varint.decode(data, offset) + return [code, car_node_modules_multiformats_vendor_varint.decode.bytes] +} /** - * Decodes the UTF-8 contents from a Uint8Array. - * - * @param bytes the Uint8Array to decode. - * - * @return the resulting string. + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] */ -util.text.utf8.decode = function(bytes) { - return util.decodeUtf8(String.fromCharCode.apply(null, bytes)); -}; +const car_node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + car_node_modules_multiformats_vendor_varint.encode(int, target, offset) + return target +} /** - * Encodes the given string as UTF-16 in a Uint8Array. - * - * @param str the string to encode. - * @param [output] an optional Uint8Array to write the output to; if it - * is too small, an exception will be thrown. - * @param [offset] the start offset for writing to the output (default: 0). - * - * @return the Uint8Array or the number of bytes written if output was given. + * @param {number} int + * @returns {number} */ -util.text.utf16.encode = function(str, output, offset) { - var out = output; - if(!out) { - out = new Uint8Array(str.length * 2); - } - var view = new Uint16Array(out.buffer); - offset = offset || 0; - var j = offset; - var k = offset; - for(var i = 0; i < str.length; ++i) { - view[k++] = str.charCodeAt(i); - j += 2; - } - return output ? (j - offset) : out; -}; +const car_node_modules_multiformats_src_varint_encodingLength = (int) => { + return car_node_modules_multiformats_vendor_varint.encodingLength(int) +} + +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/src/hashes/digest.js + + /** - * Decodes the UTF-16 contents from a Uint8Array. - * - * @param bytes the Uint8Array to decode. + * Creates a multihash digest. * - * @return the resulting string. + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest */ -util.text.utf16.decode = function(bytes) { - return String.fromCharCode.apply(null, new Uint16Array(bytes.buffer)); -}; +const car_node_modules_multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = car_node_modules_multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + car_node_modules_multiformats_src_varint_encodingLength(size) + + const bytes = new Uint8Array(digestOffset + size) + car_node_modules_multiformats_src_varint_encodeTo(code, bytes, 0) + car_node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) + + return new car_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} /** - * Deflates the given data using a flash interface. - * - * @param api the flash interface. - * @param bytes the data. - * @param raw true to return only raw deflate data, false to include zlib - * header and trailer. + * Turns bytes representation of multihash digest into an instance. * - * @return the deflated data as a string. + * @param {Uint8Array} multihash + * @returns {MultihashDigest} */ -util.deflate = function(api, bytes, raw) { - bytes = util.decode64(api.deflate(util.encode64(bytes)).rval); +const car_node_modules_multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = car_node_modules_multiformats_src_bytes_coerce(multihash) + const [code, sizeOffset] = car_node_modules_multiformats_src_varint_decode(bytes) + const [size, digestOffset] = car_node_modules_multiformats_src_varint_decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) - // strip zlib header and trailer if necessary - if(raw) { - // zlib header is 2 bytes (CMF,FLG) where FLG indicates that - // there is a 4-byte DICT (alder-32) block before the data if - // its 5th bit is set - var start = 2; - var flg = bytes.charCodeAt(1); - if(flg & 0x20) { - start = 6; - } - // zlib trailer is 4 bytes of adler-32 - bytes = bytes.substring(start, bytes.length - 4); + if (digest.byteLength !== size) { + throw new Error('Incorrect length') } - return bytes; -}; + return new car_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} /** - * Inflates the given data using a flash interface. - * - * @param api the flash interface. - * @param bytes the data. - * @param raw true if the incoming data has no zlib header or trailer and is - * raw DEFLATE data. - * - * @return the inflated data as a string, null on error. + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} */ -util.inflate = function(api, bytes, raw) { - // TODO: add zlib header and trailer if necessary/possible - var rval = api.inflate(util.encode64(bytes)).rval; - return (rval === null) ? null : util.decode64(rval); -}; +const car_node_modules_multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { + return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) + + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + car_node_modules_multiformats_src_bytes_equals(a.bytes, data.bytes) + ) + } +} /** - * Sets a storage object. + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest + */ + +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. * - * @param api the storage interface. - * @param id the storage ID to use. - * @param obj the storage object, null to remove. + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} */ -var _setStorageObject = function(api, id, obj) { - if(!api) { - throw new Error('WebStorage not available.'); +class car_node_modules_multiformats_src_hashes_digest_Digest { + /** + * Creates a multihash digest. + * + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes + */ + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes } +} - var rval; - if(obj === null) { - rval = api.removeItem(id); - } else { - // json-encode and base64-encode object - obj = util.encode64(JSON.stringify(obj)); - rval = api.setItem(id, obj); +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/src/cid.js + + + + +// Linter can see that API is used in types. +// eslint-disable-next-line + + + +// This way TS will also expose all the types from module + + +/** + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} + */ +const car_node_modules_multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return car_node_modules_multiformats_src_cid_toStringV0( + bytes, + car_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || car_node_modules_multiformats_src_bases_base58_base58btc.encoder + ) + default: + return car_node_modules_multiformats_src_cid_toStringV1( + bytes, + car_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || car_node_modules_multiformats_src_bases_base32_base32.encoder) + ) } +} - // handle potential flash error - if(typeof(rval) !== 'undefined' && rval.rval !== true) { - var error = new Error(rval.error.message); - error.id = rval.error.id; - error.name = rval.error.name; - throw error; +/** + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} + */ +const car_node_modules_multiformats_src_cid_toJSON = (link) => ({ + '/': car_node_modules_multiformats_src_cid_format(link) +}) + +/** + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json + */ +const car_node_modules_multiformats_src_cid_fromJSON = (json) => + car_node_modules_multiformats_src_cid_CID.parse(json['/']) + +/** @type {WeakMap>} */ +const car_node_modules_multiformats_src_cid_cache = new WeakMap() + +/** + * @param {API.UnknownLink} cid + * @returns {Map} + */ +const car_node_modules_multiformats_src_cid_baseCache = cid => { + const baseCache = car_node_modules_multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + car_node_modules_multiformats_src_cid_cache.set(cid, baseCache) + return baseCache } -}; + return baseCache +} /** - * Gets a storage object. - * - * @param api the storage interface. - * @param id the storage ID to use. - * - * @return the storage object entry or null if none exists. + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} */ -var _getStorageObject = function(api, id) { - if(!api) { - throw new Error('WebStorage not available.'); + +class car_node_modules_multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes + + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes } - // get the existing entry - var rval = api.getItem(id); + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this + } - /* Note: We check api.init because we can't do (api == localStorage) - on IE because of "Class doesn't support Automation" exception. Only - the flash api has an init method so this works too, but we need a - better solution in the future. */ + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset + } - // flash returns item wrapped in an object, handle special case - if(api.init) { - if(rval.rval === null) { - if(rval.error) { - var error = new Error(rval.error.message); - error.id = rval.error.id; - error.name = rval.error.name; - throw error; + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } + + /** + * @returns {CID} + */ + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) } - // no error, but also no item - rval = null; + case 1: { + const { code, multihash } = this + + if (code !== car_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } + + // sha2-256 + if (multihash.code !== car_node_modules_multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') + } + + return /** @type {CID} */ ( + car_node_modules_multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) + } + } + } + + /** + * @returns {CID} + */ + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = car_node_modules_multiformats_src_hashes_digest_create(code, digest) + return /** @type {CID} */ ( + car_node_modules_multiformats_src_cid_CID.createV1(this.code, multihash) + ) + } + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) + } + } + } + + /** + * @param {unknown} other + * @returns {other is CID} + */ + equals (other) { + return car_node_modules_multiformats_src_cid_CID.equals(this, other) + } + + /** + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} + */ + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + car_node_modules_multiformats_src_hashes_digest_equals(self.multihash, unknown.multihash) + ) + } + + /** + * @param {API.MultibaseEncoder} [base] + * @returns {string} + */ + toString (base) { + return car_node_modules_multiformats_src_cid_format(this, base) + } + + /** + * @returns {API.LinkJSON} + */ + toJSON () { + return { '/': car_node_modules_multiformats_src_cid_format(this) } + } + + link () { + return this + } + + get [Symbol.toStringTag] () { + return 'CID' + } + + // Legacy + + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` + } + + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} + */ + static asCID (input) { + if (input == null) { + return null + } + + const value = /** @type {any} */ (input) + if (value instanceof car_node_modules_multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new car_node_modules_multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || car_node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[car_node_modules_multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (car_node_modules_multiformats_src_hashes_digest_decode(multihash)) + return car_node_modules_multiformats_src_cid_CID.create(version, code, digest) } else { - rval = rval.rval; + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null } } - // handle decoding - if(rval !== null) { - // base64-decode and json-decode data - rval = JSON.parse(util.decode64(rval)); + /** + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} + */ + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') + } + + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } + + switch (version) { + case 0: { + if (code !== car_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${car_node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new car_node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes) + } + } + case 1: { + const bytes = car_node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new car_node_modules_multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') + } + } } - return rval; -}; + /** + * Simplified version of `create` for CIDv0. + * + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} + */ + static createV0 (digest) { + return car_node_modules_multiformats_src_cid_CID.create(0, car_node_modules_multiformats_src_cid_DAG_PB_CODE, digest) + } + + /** + * Simplified version of `create` for CIDv1. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} + */ + static createV1 (code, digest) { + return car_node_modules_multiformats_src_cid_CID.create(1, code, digest) + } + + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} + */ + static decode (bytes) { + const [cid, remainder] = car_node_modules_multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') + } + return cid + } + + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} + */ + static decodeFirst (bytes) { + const specs = car_node_modules_multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = car_node_modules_multiformats_src_bytes_coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') + } + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new car_node_modules_multiformats_src_hashes_digest_Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? car_node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : car_node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] + } + + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} + */ + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = car_node_modules_multiformats_src_varint_decode(initialBytes.subarray(offset)) + offset += length + return i + } + + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (car_node_modules_multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 + } else { + codec = /** @type {C} */ (next()) + } + + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } + + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize + + return { version, codec, multihashCode, digestSize, multihashSize, size } + } + + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + * + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} + */ + static parse (source, base) { + const [prefix, bytes] = car_node_modules_multiformats_src_cid_parseCIDtoBytes(source, base) + + const cid = car_node_modules_multiformats_src_cid_CID.decode(bytes) + + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') + } + + // Cache string representation to avoid computing it on `this.toString()` + car_node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source) + + return cid + } +} + +/** + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} + */ +const car_node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || car_node_modules_multiformats_src_bases_base58_base58btc + return [ + /** @type {Prefix} */ (car_node_modules_multiformats_src_bases_base58_base58btc.prefix), + decoder.decode(`${car_node_modules_multiformats_src_bases_base58_base58btc.prefix}${source}`) + ] + } + case car_node_modules_multiformats_src_bases_base58_base58btc.prefix: { + const decoder = base || car_node_modules_multiformats_src_bases_base58_base58btc + return [/** @type {Prefix} */(car_node_modules_multiformats_src_bases_base58_base58btc.prefix), decoder.decode(source)] + } + case car_node_modules_multiformats_src_bases_base32_base32.prefix: { + const decoder = base || car_node_modules_multiformats_src_bases_base32_base32 + return [/** @type {Prefix} */(car_node_modules_multiformats_src_bases_base32_base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) + } + return [/** @type {Prefix} */(source[0]), base.decode(source)] + } + } +} /** - * Stores an item in local storage. * - * @param api the storage interface. - * @param id the storage ID to use. - * @param key the key for the item. - * @param data the data for the item (any javascript object/primitive). + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base */ -var _setItem = function(api, id, key, data) { - // get storage object - var obj = _getStorageObject(api, id); - if(obj === null) { - // create a new storage object - obj = {}; +const car_node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== car_node_modules_multiformats_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) } - // update key - obj[key] = data; - // set storage object - _setStorageObject(api, id, obj); -}; + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} + +/** + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base + */ +const car_node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} + +const car_node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70 +const car_node_modules_multiformats_src_cid_SHA_256_CODE = 0x12 + +/** + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} + */ +const car_node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = car_node_modules_multiformats_src_varint_encodingLength(version) + const hashOffset = codeOffset + car_node_modules_multiformats_src_varint_encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + car_node_modules_multiformats_src_varint_encodeTo(version, bytes, 0) + car_node_modules_multiformats_src_varint_encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes +} + +const car_node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') + +;// CONCATENATED MODULE: ./node_modules/@helia/car/node_modules/multiformats/src/codecs/raw.js +// @ts-check + + /** - * Gets an item from local storage. - * - * @param api the storage interface. - * @param id the storage ID to use. - * @param key the key for the item. - * - * @return the item. + * @template T + * @typedef {import('./interface.js').ByteView} ByteView */ -var _getItem = function(api, id, key) { - // get storage object - var rval = _getStorageObject(api, id); - if(rval !== null) { - // return data at key - rval = (key in rval) ? rval[key] : null; - } - return rval; -}; +const car_node_modules_multiformats_src_codecs_raw_name = 'raw' +const car_node_modules_multiformats_src_codecs_raw_code = 0x55 /** - * Removes an item from local storage. - * - * @param api the storage interface. - * @param id the storage ID to use. - * @param key the key for the item. + * @param {Uint8Array} node + * @returns {ByteView} */ -var _removeItem = function(api, id, key) { - // get storage object - var obj = _getStorageObject(api, id); - if(obj !== null && key in obj) { - // remove key - delete obj[key]; +const car_node_modules_multiformats_src_codecs_raw_encode = (node) => coerce(node) - // see if entry has no keys remaining - var empty = true; - for(var prop in obj) { - empty = false; - break; +/** + * @param {ByteView} data + * @returns {Uint8Array} + */ +const car_node_modules_multiformats_src_codecs_raw_decode = (data) => coerce(data) + +;// CONCATENATED MODULE: ./node_modules/@helia/car/dist/src/utils/dag-walkers.js +/* eslint max-depth: ["error", 7] */ + + + + + + + +/** + * Dag walker for dag-pb CIDs + */ +const dagPbWalker = { + codec: code, + async *walk(block) { + const node = src_decode(block); + yield* node.Links.map(l => l.Hash); } - if(empty) { - // remove entry entirely if no keys are left - obj = null; +}; +/** + * Dag walker for raw CIDs + */ +const rawWalker = { + codec: car_node_modules_multiformats_src_codecs_raw_code, + async *walk() { + // no embedded CIDs in a raw block } - - // set storage object - _setStorageObject(api, id, obj); - } }; - +// https://github.com/ipfs/go-ipfs/issues/3570#issuecomment-273931692 +const dag_walkers_CID_TAG = 42; /** - * Clears the local disk storage identified by the given ID. - * - * @param api the storage interface. - * @param id the storage ID to use. + * Dag walker for dag-cbor CIDs. Does not actually use dag-cbor since + * all we are interested in is extracting the the CIDs from the block + * so we can just use cborg for that. */ -var _clearItems = function(api, id) { - _setStorageObject(api, id, null); +const cborWalker = { + codec: 0x71, + async *walk(block) { + const cids = []; + const tags = []; + tags[dag_walkers_CID_TAG] = (bytes) => { + if (bytes[0] !== 0) { + throw new Error('Invalid CID for CBOR tag 42; expected leading 0x00'); + } + const cid = car_node_modules_multiformats_src_cid_CID.decode(bytes.subarray(1)); // ignore leading 0x00 + cids.push(cid); + return cid; + }; + decode_decode(block, { + tags + }); + yield* cids; + } }; - /** - * Calls a storage function. - * - * @param func the function to call. - * @param args the arguments for the function. - * @param location the location argument. - * - * @return the return value from the function. + * Borrowed from @ipld/dag-json */ -var _callStorageFunction = function(func, args, location) { - var rval = null; - - // default storage types - if(typeof(location) === 'undefined') { - location = ['web', 'flash']; - } - - // apply storage types in order of preference - var type; - var done = false; - var exception = null; - for(var idx in location) { - type = location[idx]; - try { - if(type === 'flash' || type === 'both') { - if(args[0] === null) { - throw new Error('Flash local storage not available.'); +class dag_walkers_DagJsonTokenizer extends Tokenizer { + tokenBuffer; + constructor(data, options) { + super(data, options); + this.tokenBuffer = []; + } + done() { + return this.tokenBuffer.length === 0 && super.done(); + } + _next() { + if (this.tokenBuffer.length > 0) { + // @ts-expect-error https://github.com/Microsoft/TypeScript/issues/30406 + return this.tokenBuffer.pop(); } - rval = func.apply(this, args); - done = (type === 'flash'); - } - if(type === 'web' || type === 'both') { - args[0] = localStorage; - rval = func.apply(this, args); - done = true; - } - } catch(ex) { - exception = ex; + return super.next(); } - if(done) { - break; + /** + * Implements rules outlined in https://github.com/ipld/specs/pull/356 + */ + next() { + const token = this._next(); + if (token.type === token_Type.map) { + const keyToken = this._next(); + if (keyToken.type === token_Type.string && keyToken.value === '/') { + const valueToken = this._next(); + if (valueToken.type === token_Type.string) { // *must* be a CID + const breakToken = this._next(); // swallow the end-of-map token + if (breakToken.type !== token_Type["break"]) { + throw new Error('Invalid encoded CID form'); + } + this.tokenBuffer.push(valueToken); // CID.parse will pick this up after our tag token + return new token_Token(token_Type.tag, 42, 0); + } + if (valueToken.type === token_Type.map) { + const innerKeyToken = this._next(); + if (innerKeyToken.type === token_Type.string && innerKeyToken.value === 'bytes') { + const innerValueToken = this._next(); + if (innerValueToken.type === token_Type.string) { // *must* be Bytes + for (let i = 0; i < 2; i++) { + const breakToken = this._next(); // swallow two end-of-map tokens + if (breakToken.type !== token_Type["break"]) { + throw new Error('Invalid encoded Bytes form'); + } + } + const bytes = car_node_modules_multiformats_src_bases_base64_base64.decode(`m${innerValueToken.value}`); + return new token_Token(token_Type.bytes, bytes, innerValueToken.value.length); + } + this.tokenBuffer.push(innerValueToken); // bail + } + this.tokenBuffer.push(innerKeyToken); // bail + } + this.tokenBuffer.push(valueToken); // bail + } + this.tokenBuffer.push(keyToken); // bail + } + return token; + } +} +/** + * Dag walker for dag-json CIDs. Does not actually use dag-json since + * all we are interested in is extracting the the CIDs from the block + * so we can just use cborg/json for that. + */ +const jsonWalker = { + codec: 0x0129, + async *walk(block) { + const cids = []; + const tags = []; + tags[dag_walkers_CID_TAG] = (string) => { + const cid = car_node_modules_multiformats_src_cid_CID.parse(string); + cids.push(cid); + return cid; + }; + json_decode_decode(block, { + tags, + tokenizer: new dag_walkers_DagJsonTokenizer(block, { + tags, + allowIndefinite: true, + allowUndefined: true, + allowNaN: true, + allowInfinity: true, + allowBigInt: true, + strict: false, + rejectDuplicateMapKeys: false + }) + }); + yield* cids; } - } - - if(!done) { - throw exception; - } - - return rval; }; - +//# sourceMappingURL=dag-walkers.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/car/dist/src/index.js /** - * Stores an item on local disk. + * @packageDocumentation * - * The available types of local storage include 'flash', 'web', and 'both'. + * `@helia/car` provides `import` and `export` methods to read/write Car files to {@link https://github.com/ipfs/helia Helia}'s blockstore. * - * The type 'flash' refers to flash local storage (SharedObject). In order - * to use flash local storage, the 'api' parameter must be valid. The type - * 'web' refers to WebStorage, if supported by the browser. The type 'both' - * refers to storing using both 'flash' and 'web', not just one or the - * other. + * See the {@link Car} interface for all available operations. * - * The location array should list the storage types to use in order of - * preference: + * By default it supports `dag-pb`, `dag-cbor`, `dag-json` and `raw` CIDs, more esoteric DAG walkers can be passed as an init option. * - * ['flash']: flash only storage - * ['web']: web only storage - * ['both']: try to store in both - * ['flash','web']: store in flash first, but if not available, 'web' - * ['web','flash']: store in web first, but if not available, 'flash' + * @example * - * The location array defaults to: ['web', 'flash'] + * ```typescript + * import { createHelia } from 'helia' + * import { unixfs } from '@helia/unixfs' + * import { car } from '@helia/car' + * import { CarWriter } from '@ipld/car' + * import { Readable } from 'node:stream' + * import nodeFs from 'node:fs' * - * @param api the flash interface, null to use only WebStorage. - * @param id the storage ID to use. - * @param key the key for the item. - * @param data the data for the item (any javascript object/primitive). - * @param location an array with the preferred types of storage to use. - */ -util.setItem = function(api, id, key, data, location) { - _callStorageFunction(_setItem, arguments, location); -}; - -/** - * Gets an item on local disk. + * const helia = createHelia({ + * // ... helia config + * }) + * const fs = unixfs(helia) * - * Set setItem() for details on storage types. + * // add some UnixFS data + * const cid = await fs.addBytes(fileData1) * - * @param api the flash interface, null to use only WebStorage. - * @param id the storage ID to use. - * @param key the key for the item. - * @param location an array with the preferred types of storage to use. + * // export it as a Car + * const c = car(helia) + * const { writer, out } = await CarWriter.create(cid) * - * @return the item. - */ -util.getItem = function(api, id, key, location) { - return _callStorageFunction(_getItem, arguments, location); -}; - -/** - * Removes an item on local disk. + * // `out` needs to be directed somewhere, see the @ipld/car docs for more information + * Readable.from(out).pipe(nodeFs.createWriteStream('example.car')) * - * Set setItem() for details on storage types. + * // write the DAG behind `cid` into the writer + * await c.export(cid, writer) + * ``` * - * @param api the flash interface. - * @param id the storage ID to use. - * @param key the key for the item. - * @param location an array with the preferred types of storage to use. - */ -util.removeItem = function(api, id, key, location) { - _callStorageFunction(_removeItem, arguments, location); -}; - -/** - * Clears the local disk storage identified by the given ID. + * @example * - * Set setItem() for details on storage types. + * ```typescript + * import { createHelia } from 'helia' + * import { unixfs } from '@helia/unixfs' + * import { car } from '@helia/car' + * import { CarReader } from '@ipld/car' + * import { Readable } from 'node:stream' + * import nodeFs from 'node:fs' * - * @param api the flash interface if flash is available. - * @param id the storage ID to use. - * @param location an array with the preferred types of storage to use. + * const helia = createHelia({ + * // ... helia config + * }) + * + * // import the car + * const inStream = nodeFs.createReadStream('example.car') + * const reader = await CarReader.fromIterable(inStream) + * + * await c.import(reader) + * ``` */ -util.clearItems = function(api, id, location) { - _callStorageFunction(_clearItems, arguments, location); -}; + + + + +const DEFAULT_DAG_WALKERS = [ + rawWalker, + dagPbWalker, + cborWalker, + jsonWalker +]; +const DAG_WALK_QUEUE_CONCURRENCY = 1; +class DefaultCar { + components; + dagWalkers; + constructor(components, init) { + this.components = components; + this.dagWalkers = {}; + [...DEFAULT_DAG_WALKERS, ...(init.dagWalkers ?? [])].forEach(dagWalker => { + this.dagWalkers[dagWalker.codec] = dagWalker; + }); + } + async import(reader, options) { + await it_drain_dist_src(this.components.blockstore.putMany(it_map_dist_src(reader.blocks(), ({ cid, bytes }) => ({ cid, block: bytes })), options)); + } + async export(root, writer, options) { + const deferred = pDefer(); + const roots = Array.isArray(root) ? root : [root]; + // use a queue to walk the DAG instead of recursion so we can traverse very large DAGs + const queue = new dist({ + concurrency: DAG_WALK_QUEUE_CONCURRENCY + }); + queue.on('idle', () => { + deferred.resolve(); + }); + queue.on('error', (err) => { + deferred.resolve(err); + }); + for (const root of roots) { + void queue.add(async () => { + await this.#walkDag(root, queue, async (cid, bytes) => { + await writer.put({ cid, bytes }); + }, options); + }); + } + // wait for the writer to end + try { + await deferred.promise; + } + finally { + await writer.close(); + } + } + /** + * Walk the DAG behind the passed CID, ensure all blocks are present in the blockstore + * and update the pin count for them + */ + async #walkDag(cid, queue, withBlock, options) { + const dagWalker = this.dagWalkers[cid.code]; + if (dagWalker == null) { + throw new Error(`No dag walker found for cid codec ${cid.code}`); + } + const block = await this.components.blockstore.get(cid, options); + await withBlock(cid, block); + // walk dag, ensure all blocks are present + for await (const cid of dagWalker.walk(block)) { + void queue.add(async () => { + await this.#walkDag(cid, queue, withBlock, options); + }); + } + } +} /** - * Check if an object is empty. + * Create a {@link Car} instance for use with {@link https://github.com/ipfs/helia Helia} + */ +function car(helia, init = {}) { + return new DefaultCar(helia, init); +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/it-first/dist/src/index.js +/** + * @packageDocumentation * - * Taken from: - * http://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object-from-json/679937#679937 + * Return the first value in an (async)iterable * - * @param object the object to check. + * @example + * + * ```javascript + * import first from 'it-first' + * + * // This can also be an iterator, generator, etc + * const values = [0, 1, 2, 3, 4] + * + * const res = first(values) + * + * console.info(res) // 0 + * ``` + * + * Async sources must be awaited: + * + * ```javascript + * import first from 'it-first' + * + * const values = async function * () { + * yield * [0, 1, 2, 3, 4] + * } + * + * const res = await first(values()) + * + * console.info(res) // 0 + * ``` */ -util.isEmpty = function(obj) { - for(var prop in obj) { - if(obj.hasOwnProperty(prop)) { - return false; +function it_first_dist_src_isAsyncIterable(thing) { + return thing[Symbol.asyncIterator] != null; +} +function src_first(source) { + if (it_first_dist_src_isAsyncIterable(source)) { + return (async () => { + for await (const entry of source) { // eslint-disable-line no-unreachable-loop + return entry; + } + return undefined; + })(); } - } - return true; -}; - + for (const entry of source) { // eslint-disable-line no-unreachable-loop + return entry; + } + return undefined; +} +/* harmony default export */ const it_first_dist_src = (src_first); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/it-batch/dist/src/index.js /** - * Format with simple printf-style interpolation. + * @packageDocumentation * - * %%: literal '%' - * %s,%o: convert next argument into a string. + * The final batch may be smaller than the max. * - * @param format the string to format. - * @param ... arguments to interpolate into the format string. + * @example + * + * ```javascript + * import batch from 'it-batch' + * import all from 'it-all' + * + * // This can also be an iterator, generator, etc + * const values = [0, 1, 2, 3, 4] + * const batchSize = 2 + * + * const result = all(batch(values, batchSize)) + * + * console.info(result) // [0, 1], [2, 3], [4] + * ``` + * + * Async sources must be awaited: + * + * ```javascript + * import batch from 'it-batch' + * import all from 'it-all' + * + * const values = async function * () { + * yield * [0, 1, 2, 3, 4] + * } + * + * const batchSize = 2 + * const result = await all(batch(values(), batchSize)) + * + * console.info(result) // [0, 1], [2, 3], [4] + * ``` */ -util.format = function(format) { - var re = /%./g; - // current match - var match; - // current part - var part; - // current arg index - var argi = 0; - // collected parts to recombine later - var parts = []; - // last index found - var last = 0; - // loop while matches remain - while((match = re.exec(format))) { - part = format.substring(last, re.lastIndex - 2); - // don't add empty strings (ie, parts between %s%s) - if(part.length > 0) { - parts.push(part); - } - last = re.lastIndex; - // switch on % code - var code = match[0][1]; - switch(code) { - case 's': - case 'o': - // check if enough arguments were given - if(argi < arguments.length) { - parts.push(arguments[argi++ + 1]); - } else { - parts.push(''); - } - break; - // FIXME: do proper formating for numbers, etc - //case 'f': - //case 'd': - case '%': - parts.push('%'); - break; - default: - parts.push('<%' + code + '?>'); +function it_batch_dist_src_isAsyncIterable(thing) { + return thing[Symbol.asyncIterator] != null; +} +function batch(source, size = 1) { + size = Number(size); + if (it_batch_dist_src_isAsyncIterable(source)) { + return (async function* () { + let things = []; + if (size < 1) { + size = 1; + } + if (size !== Math.round(size)) { + throw new Error('Batch size must be an integer'); + } + for await (const thing of source) { + things.push(thing); + while (things.length >= size) { + yield things.slice(0, size); + things = things.slice(size); + } + } + while (things.length > 0) { + yield things.slice(0, size); + things = things.slice(size); + } + }()); } - } - // add trailing part of format string - parts.push(format.substring(last)); - return parts.join(''); -}; - + return (function* () { + let things = []; + if (size < 1) { + size = 1; + } + if (size !== Math.round(size)) { + throw new Error('Batch size must be an integer'); + } + for (const thing of source) { + things.push(thing); + while (things.length >= size) { + yield things.slice(0, size); + things = things.slice(size); + } + } + while (things.length > 0) { + yield things.slice(0, size); + things = things.slice(size); + } + }()); +} +/* harmony default export */ const it_batch_dist_src = (batch); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/it-parallel-batch/dist/src/index.js /** - * Formats a number. + * @packageDocumentation * - * http://snipplr.com/view/5945/javascript-numberformat--ported-from-php/ + * Takes an async iterator that emits promise-returning functions, invokes them in parallel and emits the results in the same order as the input. + * + * The final batch may be smaller than the batch size. + * + * @example + * + * ```javascript + * import parallelBatch from 'it-parallel-batch' + * import all from 'it-all' + * import delay from 'delay' + * + * // This can also be an iterator, async iterator, generator, etc + * const input = [ + * async () => { + * await delay(500) + * + * return 1 + * }, + * async () => { + * await delay(200) + * + * return 2 + * }, + * async () => { + * await delay(100) + * + * return 3 + * } + * ] + * + * const batchSize = 2 + * + * const result = await all(parallelBatch(input, batchSize)) + * + * console.info(result) // [1, 2, 3] + * ``` */ -util.formatNumber = function(number, decimals, dec_point, thousands_sep) { - // http://kevin.vanzonneveld.net - // + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com) - // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) - // + bugfix by: Michael White (http://crestidg.com) - // + bugfix by: Benjamin Lupton - // + bugfix by: Allan Jensen (http://www.winternet.no) - // + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com) - // * example 1: number_format(1234.5678, 2, '.', ''); - // * returns 1: 1234.57 - - var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals; - var d = dec_point === undefined ? ',' : dec_point; - var t = thousands_sep === undefined ? - '.' : thousands_sep, s = n < 0 ? '-' : ''; - var i = parseInt((n = Math.abs(+n || 0).toFixed(c)), 10) + ''; - var j = (i.length > 3) ? i.length % 3 : 0; - return s + (j ? i.substr(0, j) + t : '') + - i.substr(j).replace(/(\d{3})(?=\d)/g, '$1' + t) + - (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ''); -}; /** - * Formats a byte size. - * - * http://snipplr.com/view/5949/format-humanize-file-byte-size-presentation-in-javascript/ + * Takes an (async) iterator that emits promise-returning functions, + * invokes them in parallel and emits the results as they become available but + * in the same order as the input */ -util.formatSize = function(size) { - if(size >= 1073741824) { - size = util.formatNumber(size / 1073741824, 2, '.', '') + ' GiB'; - } else if(size >= 1048576) { - size = util.formatNumber(size / 1048576, 2, '.', '') + ' MiB'; - } else if(size >= 1024) { - size = util.formatNumber(size / 1024, 0) + ' KiB'; - } else { - size = util.formatNumber(size, 0) + ' bytes'; - } - return size; -}; - +async function* parallelBatch(source, size = 1) { + for await (const tasks of it_batch_dist_src(source, size)) { + const things = tasks.map(async (p) => { + return p().then(value => ({ ok: true, value }), err => ({ ok: false, err })); + }); + for (let i = 0; i < things.length; i++) { + const result = await things[i]; + if (result.ok) { + yield result.value; + } + else { + throw result.err; + } + } + } +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/uint8arraylist/node_modules/uint8arrays/dist/src/util/as-uint8array.js /** - * Converts an IPv4 or IPv6 string representation into bytes (in network order). - * - * @param ip the IPv4 or IPv6 address to convert. - * - * @return the 4-byte IPv6 or 16-byte IPv6 address or null if the address can't - * be parsed. + * To guarantee Uint8Array semantics, convert nodejs Buffers + * into vanilla Uint8Arrays */ -util.bytesFromIP = function(ip) { - if(ip.indexOf('.') !== -1) { - return util.bytesFromIPv4(ip); - } - if(ip.indexOf(':') !== -1) { - return util.bytesFromIPv6(ip); - } - return null; -}; +function uint8arrays_dist_src_util_as_uint8array_asUint8Array(buf) { + if (globalThis.Buffer != null) { + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + return buf; +} +//# sourceMappingURL=as-uint8array.js.map +;// CONCATENATED MODULE: ./node_modules/uint8arraylist/node_modules/uint8arrays/dist/src/alloc.js /** - * Converts an IPv4 string representation into bytes (in network order). - * - * @param ip the IPv4 address to convert. - * - * @return the 4-byte address or null if the address can't be parsed. + * Returns a `Uint8Array` of the requested size. Referenced memory will + * be initialized to 0. */ -util.bytesFromIPv4 = function(ip) { - ip = ip.split('.'); - if(ip.length !== 4) { - return null; - } - var b = util.createBuffer(); - for(var i = 0; i < ip.length; ++i) { - var num = parseInt(ip[i], 10); - if(isNaN(num)) { - return null; +function node_modules_uint8arrays_dist_src_alloc_alloc(size = 0) { + if (globalThis.Buffer?.alloc != null) { + return uint8arrays_dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.alloc(size)); } - b.putByte(num); - } - return b.getBytes(); -}; + return new Uint8Array(size); +} +/** + * Where possible returns a Uint8Array of the requested size that references + * uninitialized memory. Only use if you are certain you will immediately + * overwrite every value in the returned `Uint8Array`. + */ +function uint8arrays_dist_src_alloc_allocUnsafe(size = 0) { + if (globalThis.Buffer?.allocUnsafe != null) { + return uint8arrays_dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.allocUnsafe(size)); + } + return new Uint8Array(size); +} +//# sourceMappingURL=alloc.js.map +;// CONCATENATED MODULE: ./node_modules/uint8arraylist/node_modules/uint8arrays/dist/src/concat.js + /** - * Converts an IPv6 string representation into bytes (in network order). - * - * @param ip the IPv6 address to convert. - * - * @return the 16-byte address or null if the address can't be parsed. + * Returns a new Uint8Array created by concatenating the passed ArrayLikes */ -util.bytesFromIPv6 = function(ip) { - var blanks = 0; - ip = ip.split(':').filter(function(e) { - if(e.length === 0) ++blanks; - return true; - }); - var zeros = (8 - ip.length + blanks) * 2; - var b = util.createBuffer(); - for(var i = 0; i < 8; ++i) { - if(!ip[i] || ip[i].length === 0) { - b.fillWithByte(0, zeros); - zeros = 0; - continue; +function dist_src_concat_concat(arrays, length) { + if (length == null) { + length = arrays.reduce((acc, curr) => acc + curr.length, 0); } - var bytes = util.hexToBytes(ip[i]); - if(bytes.length < 2) { - b.putByte(0); + const output = uint8arrays_dist_src_alloc_allocUnsafe(length); + let offset = 0; + for (const arr of arrays) { + output.set(arr, offset); + offset += arr.length; } - b.putBytes(bytes); - } - return b.getBytes(); -}; - + return uint8arrays_dist_src_util_as_uint8array_asUint8Array(output); +} +//# sourceMappingURL=concat.js.map +;// CONCATENATED MODULE: ./node_modules/uint8arraylist/node_modules/uint8arrays/dist/src/equals.js /** - * Converts 4-bytes into an IPv4 string representation or 16-bytes into - * an IPv6 string representation. The bytes must be in network order. - * - * @param bytes the bytes to convert. - * - * @return the IPv4 or IPv6 string representation if 4 or 16 bytes, - * respectively, are given, otherwise null. + * Returns true if the two passed Uint8Arrays have the same content */ -util.bytesToIP = function(bytes) { - if(bytes.length === 4) { - return util.bytesToIPv4(bytes); - } - if(bytes.length === 16) { - return util.bytesToIPv6(bytes); - } - return null; -}; - +function uint8arrays_dist_src_equals_equals(a, b) { + if (a === b) { + return true; + } + if (a.byteLength !== b.byteLength) { + return false; + } + for (let i = 0; i < a.byteLength; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; +} +//# sourceMappingURL=equals.js.map +;// CONCATENATED MODULE: ./node_modules/uint8arraylist/dist/src/index.js /** - * Converts 4-bytes into an IPv4 string representation. The bytes must be - * in network order. + * @packageDocumentation * - * @param bytes the bytes to convert. + * A class that lets you do operations over a list of Uint8Arrays without + * copying them. * - * @return the IPv4 string representation or null for an invalid # of bytes. + * ```js + * import { Uint8ArrayList } from 'uint8arraylist' + * + * const list = new Uint8ArrayList() + * list.append(Uint8Array.from([0, 1, 2])) + * list.append(Uint8Array.from([3, 4, 5])) + * + * list.subarray() + * // -> Uint8Array([0, 1, 2, 3, 4, 5]) + * + * list.consume(3) + * list.subarray() + * // -> Uint8Array([3, 4, 5]) + * + * // you can also iterate over the list + * for (const buf of list) { + * // ..do something with `buf` + * } + * + * list.subarray(0, 1) + * // -> Uint8Array([0]) + * ``` + * + * ## Converting Uint8ArrayLists to Uint8Arrays + * + * There are two ways to turn a `Uint8ArrayList` into a `Uint8Array` - `.slice` and `.subarray` and one way to turn a `Uint8ArrayList` into a `Uint8ArrayList` with different contents - `.sublist`. + * + * ### slice + * + * Slice follows the same semantics as [Uint8Array.slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/slice) in that it creates a new `Uint8Array` and copies bytes into it using an optional offset & length. + * + * ```js + * const list = new Uint8ArrayList() + * list.append(Uint8Array.from([0, 1, 2])) + * list.append(Uint8Array.from([3, 4, 5])) + * + * list.slice(0, 1) + * // -> Uint8Array([0]) + * ``` + * + * ### subarray + * + * Subarray attempts to follow the same semantics as [Uint8Array.subarray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray) with one important different - this is a no-copy operation, unless the requested bytes span two internal buffers in which case it is a copy operation. + * + * ```js + * const list = new Uint8ArrayList() + * list.append(Uint8Array.from([0, 1, 2])) + * list.append(Uint8Array.from([3, 4, 5])) + * + * list.subarray(0, 1) + * // -> Uint8Array([0]) - no-copy + * + * list.subarray(2, 5) + * // -> Uint8Array([2, 3, 4]) - copy + * ``` + * + * ### sublist + * + * Sublist creates and returns a new `Uint8ArrayList` that shares the underlying buffers with the original so is always a no-copy operation. + * + * ```js + * const list = new Uint8ArrayList() + * list.append(Uint8Array.from([0, 1, 2])) + * list.append(Uint8Array.from([3, 4, 5])) + * + * list.sublist(0, 1) + * // -> Uint8ArrayList([0]) - no-copy + * + * list.sublist(2, 5) + * // -> Uint8ArrayList([2], [3, 4]) - no-copy + * ``` + * + * ## Inspiration + * + * Borrows liberally from [bl](https://www.npmjs.com/package/bl) but only uses native JS types. */ -util.bytesToIPv4 = function(bytes) { - if(bytes.length !== 4) { - return null; - } - var ip = []; - for(var i = 0; i < bytes.length; ++i) { - ip.push(bytes.charCodeAt(i)); - } - return ip.join('.'); -}; + + +const uint8arraylist_dist_src_symbol = Symbol.for('@achingbrain/uint8arraylist'); +function findBufAndOffset(bufs, index) { + if (index == null || index < 0) { + throw new RangeError('index is out of bounds'); + } + let offset = 0; + for (const buf of bufs) { + const bufEnd = offset + buf.byteLength; + if (index < bufEnd) { + return { + buf, + index: index - offset + }; + } + offset = bufEnd; + } + throw new RangeError('index is out of bounds'); +} /** - * Converts 16-bytes into an IPv16 string representation. The bytes must be - * in network order. + * Check if object is a CID instance * - * @param bytes the bytes to convert. + * @example * - * @return the IPv16 string representation or null for an invalid # of bytes. + * ```js + * import { isUint8ArrayList, Uint8ArrayList } from 'uint8arraylist' + * + * isUint8ArrayList(true) // false + * isUint8ArrayList([]) // false + * isUint8ArrayList(new Uint8ArrayList()) // true + * ``` */ -util.bytesToIPv6 = function(bytes) { - if(bytes.length !== 16) { - return null; - } - var ip = []; - var zeroGroups = []; - var zeroMaxGroup = 0; - for(var i = 0; i < bytes.length; i += 2) { - var hex = util.bytesToHex(bytes[i] + bytes[i + 1]); - // canonicalize zero representation - while(hex[0] === '0' && hex !== '0') { - hex = hex.substr(1); +function isUint8ArrayList(value) { + return Boolean(value?.[uint8arraylist_dist_src_symbol]); +} +class src_Uint8ArrayList { + bufs; + length; + [uint8arraylist_dist_src_symbol] = true; + constructor(...data) { + this.bufs = []; + this.length = 0; + if (data.length > 0) { + this.appendAll(data); + } } - if(hex === '0') { - var last = zeroGroups[zeroGroups.length - 1]; - var idx = ip.length; - if(!last || idx !== last.end + 1) { - zeroGroups.push({start: idx, end: idx}); - } else { - last.end = idx; - if((last.end - last.start) > - (zeroGroups[zeroMaxGroup].end - zeroGroups[zeroMaxGroup].start)) { - zeroMaxGroup = zeroGroups.length - 1; + *[Symbol.iterator]() { + yield* this.bufs; + } + get byteLength() { + return this.length; + } + /** + * Add one or more `bufs` to the end of this Uint8ArrayList + */ + append(...bufs) { + this.appendAll(bufs); + } + /** + * Add all `bufs` to the end of this Uint8ArrayList + */ + appendAll(bufs) { + let length = 0; + for (const buf of bufs) { + if (buf instanceof Uint8Array) { + length += buf.byteLength; + this.bufs.push(buf); + } + else if (isUint8ArrayList(buf)) { + length += buf.byteLength; + this.bufs.push(...buf.bufs); + } + else { + throw new Error('Could not append value, must be an Uint8Array or a Uint8ArrayList'); + } } - } + this.length += length; } - ip.push(hex); - } - if(zeroGroups.length > 0) { - var group = zeroGroups[zeroMaxGroup]; - // only shorten group of length > 0 - if(group.end - group.start > 0) { - ip.splice(group.start, group.end - group.start + 1, ''); - if(group.start === 0) { - ip.unshift(''); + /** + * Add one or more `bufs` to the start of this Uint8ArrayList + */ + prepend(...bufs) { + this.prependAll(bufs); + } + /** + * Add all `bufs` to the start of this Uint8ArrayList + */ + prependAll(bufs) { + let length = 0; + for (const buf of bufs.reverse()) { + if (buf instanceof Uint8Array) { + length += buf.byteLength; + this.bufs.unshift(buf); + } + else if (isUint8ArrayList(buf)) { + length += buf.byteLength; + this.bufs.unshift(...buf.bufs); + } + else { + throw new Error('Could not prepend value, must be an Uint8Array or a Uint8ArrayList'); + } + } + this.length += length; + } + /** + * Read the value at `index` + */ + get(index) { + const res = findBufAndOffset(this.bufs, index); + return res.buf[res.index]; + } + /** + * Set the value at `index` to `value` + */ + set(index, value) { + const res = findBufAndOffset(this.bufs, index); + res.buf[res.index] = value; + } + /** + * Copy bytes from `buf` to the index specified by `offset` + */ + write(buf, offset = 0) { + if (buf instanceof Uint8Array) { + for (let i = 0; i < buf.length; i++) { + this.set(offset + i, buf[i]); + } + } + else if (isUint8ArrayList(buf)) { + for (let i = 0; i < buf.length; i++) { + this.set(offset + i, buf.get(i)); + } + } + else { + throw new Error('Could not write value, must be an Uint8Array or a Uint8ArrayList'); + } + } + /** + * Remove bytes from the front of the pool + */ + consume(bytes) { + // first, normalize the argument, in accordance with how Buffer does it + bytes = Math.trunc(bytes); + // do nothing if not a positive number + if (Number.isNaN(bytes) || bytes <= 0) { + return; + } + // if consuming all bytes, skip iterating + if (bytes === this.byteLength) { + this.bufs = []; + this.length = 0; + return; + } + while (this.bufs.length > 0) { + if (bytes >= this.bufs[0].byteLength) { + bytes -= this.bufs[0].byteLength; + this.length -= this.bufs[0].byteLength; + this.bufs.shift(); + } + else { + this.bufs[0] = this.bufs[0].subarray(bytes); + this.length -= bytes; + break; + } + } + } + /** + * Extracts a section of an array and returns a new array. + * + * This is a copy operation as it is with Uint8Arrays and Arrays + * - note this is different to the behaviour of Node Buffers. + */ + slice(beginInclusive, endExclusive) { + const { bufs, length } = this._subList(beginInclusive, endExclusive); + return dist_src_concat_concat(bufs, length); + } + /** + * Returns a alloc from the given start and end element index. + * + * In the best case where the data extracted comes from a single Uint8Array + * internally this is a no-copy operation otherwise it is a copy operation. + */ + subarray(beginInclusive, endExclusive) { + const { bufs, length } = this._subList(beginInclusive, endExclusive); + if (bufs.length === 1) { + return bufs[0]; + } + return dist_src_concat_concat(bufs, length); + } + /** + * Returns a allocList from the given start and end element index. + * + * This is a no-copy operation. + */ + sublist(beginInclusive, endExclusive) { + const { bufs, length } = this._subList(beginInclusive, endExclusive); + const list = new src_Uint8ArrayList(); + list.length = length; + // don't loop, just set the bufs + list.bufs = [...bufs]; + return list; + } + _subList(beginInclusive, endExclusive) { + beginInclusive = beginInclusive ?? 0; + endExclusive = endExclusive ?? this.length; + if (beginInclusive < 0) { + beginInclusive = this.length + beginInclusive; + } + if (endExclusive < 0) { + endExclusive = this.length + endExclusive; + } + if (beginInclusive < 0 || endExclusive > this.length) { + throw new RangeError('index is out of bounds'); + } + if (beginInclusive === endExclusive) { + return { bufs: [], length: 0 }; + } + if (beginInclusive === 0 && endExclusive === this.length) { + return { bufs: this.bufs, length: this.length }; + } + const bufs = []; + let offset = 0; + for (let i = 0; i < this.bufs.length; i++) { + const buf = this.bufs[i]; + const bufStart = offset; + const bufEnd = bufStart + buf.byteLength; + // for next loop + offset = bufEnd; + if (beginInclusive >= bufEnd) { + // start after this buf + continue; + } + const sliceStartInBuf = beginInclusive >= bufStart && beginInclusive < bufEnd; + const sliceEndsInBuf = endExclusive > bufStart && endExclusive <= bufEnd; + if (sliceStartInBuf && sliceEndsInBuf) { + // slice is wholly contained within this buffer + if (beginInclusive === bufStart && endExclusive === bufEnd) { + // requested whole buffer + bufs.push(buf); + break; + } + // requested part of buffer + const start = beginInclusive - bufStart; + bufs.push(buf.subarray(start, start + (endExclusive - beginInclusive))); + break; + } + if (sliceStartInBuf) { + // slice starts in this buffer + if (beginInclusive === 0) { + // requested whole buffer + bufs.push(buf); + continue; + } + // requested part of buffer + bufs.push(buf.subarray(beginInclusive - bufStart)); + continue; + } + if (sliceEndsInBuf) { + if (endExclusive === bufEnd) { + // requested whole buffer + bufs.push(buf); + break; + } + // requested part of buffer + bufs.push(buf.subarray(0, endExclusive - bufStart)); + break; + } + // slice started before this buffer and ends after it + bufs.push(buf); + } + return { bufs, length: endExclusive - beginInclusive }; + } + indexOf(search, offset = 0) { + if (!isUint8ArrayList(search) && !(search instanceof Uint8Array)) { + throw new TypeError('The "value" argument must be a Uint8ArrayList or Uint8Array'); + } + const needle = search instanceof Uint8Array ? search : search.subarray(); + offset = Number(offset ?? 0); + if (isNaN(offset)) { + offset = 0; + } + if (offset < 0) { + offset = this.length + offset; + } + if (offset < 0) { + offset = 0; + } + if (search.length === 0) { + return offset > this.length ? this.length : offset; + } + // https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string-search_algorithm + const M = needle.byteLength; + if (M === 0) { + throw new TypeError('search must be at least 1 byte long'); + } + // radix + const radix = 256; + const rightmostPositions = new Int32Array(radix); + // position of the rightmost occurrence of the byte c in the pattern + for (let c = 0; c < radix; c++) { + // -1 for bytes not in pattern + rightmostPositions[c] = -1; + } + for (let j = 0; j < M; j++) { + // rightmost position for bytes in pattern + rightmostPositions[needle[j]] = j; + } + // Return offset of first match, -1 if no match + const right = rightmostPositions; + const lastIndex = this.byteLength - needle.byteLength; + const lastPatIndex = needle.byteLength - 1; + let skip; + for (let i = offset; i <= lastIndex; i += skip) { + skip = 0; + for (let j = lastPatIndex; j >= 0; j--) { + const char = this.get(i + j); + if (needle[j] !== char) { + skip = Math.max(1, j - right[char]); + break; + } + } + if (skip === 0) { + return i; + } + } + return -1; + } + getInt8(byteOffset) { + const buf = this.subarray(byteOffset, byteOffset + 1); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getInt8(0); + } + setInt8(byteOffset, value) { + const buf = uint8arrays_dist_src_alloc_allocUnsafe(1); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setInt8(0, value); + this.write(buf, byteOffset); + } + getInt16(byteOffset, littleEndian) { + const buf = this.subarray(byteOffset, byteOffset + 2); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getInt16(0, littleEndian); + } + setInt16(byteOffset, value, littleEndian) { + const buf = node_modules_uint8arrays_dist_src_alloc_alloc(2); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setInt16(0, value, littleEndian); + this.write(buf, byteOffset); + } + getInt32(byteOffset, littleEndian) { + const buf = this.subarray(byteOffset, byteOffset + 4); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getInt32(0, littleEndian); + } + setInt32(byteOffset, value, littleEndian) { + const buf = node_modules_uint8arrays_dist_src_alloc_alloc(4); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setInt32(0, value, littleEndian); + this.write(buf, byteOffset); + } + getBigInt64(byteOffset, littleEndian) { + const buf = this.subarray(byteOffset, byteOffset + 8); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getBigInt64(0, littleEndian); + } + setBigInt64(byteOffset, value, littleEndian) { + const buf = node_modules_uint8arrays_dist_src_alloc_alloc(8); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setBigInt64(0, value, littleEndian); + this.write(buf, byteOffset); + } + getUint8(byteOffset) { + const buf = this.subarray(byteOffset, byteOffset + 1); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getUint8(0); + } + setUint8(byteOffset, value) { + const buf = uint8arrays_dist_src_alloc_allocUnsafe(1); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setUint8(0, value); + this.write(buf, byteOffset); + } + getUint16(byteOffset, littleEndian) { + const buf = this.subarray(byteOffset, byteOffset + 2); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getUint16(0, littleEndian); + } + setUint16(byteOffset, value, littleEndian) { + const buf = node_modules_uint8arrays_dist_src_alloc_alloc(2); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setUint16(0, value, littleEndian); + this.write(buf, byteOffset); + } + getUint32(byteOffset, littleEndian) { + const buf = this.subarray(byteOffset, byteOffset + 4); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getUint32(0, littleEndian); + } + setUint32(byteOffset, value, littleEndian) { + const buf = node_modules_uint8arrays_dist_src_alloc_alloc(4); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setUint32(0, value, littleEndian); + this.write(buf, byteOffset); + } + getBigUint64(byteOffset, littleEndian) { + const buf = this.subarray(byteOffset, byteOffset + 8); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getBigUint64(0, littleEndian); + } + setBigUint64(byteOffset, value, littleEndian) { + const buf = node_modules_uint8arrays_dist_src_alloc_alloc(8); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setBigUint64(0, value, littleEndian); + this.write(buf, byteOffset); + } + getFloat32(byteOffset, littleEndian) { + const buf = this.subarray(byteOffset, byteOffset + 4); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getFloat32(0, littleEndian); + } + setFloat32(byteOffset, value, littleEndian) { + const buf = node_modules_uint8arrays_dist_src_alloc_alloc(4); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setFloat32(0, value, littleEndian); + this.write(buf, byteOffset); + } + getFloat64(byteOffset, littleEndian) { + const buf = this.subarray(byteOffset, byteOffset + 8); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + return view.getFloat64(0, littleEndian); + } + setFloat64(byteOffset, value, littleEndian) { + const buf = node_modules_uint8arrays_dist_src_alloc_alloc(8); + const view = new DataView(buf.buffer, buf.byteOffset, buf.byteLength); + view.setFloat64(0, value, littleEndian); + this.write(buf, byteOffset); + } + equals(other) { + if (other == null) { + return false; + } + if (!(other instanceof src_Uint8ArrayList)) { + return false; + } + if (other.bufs.length !== this.bufs.length) { + return false; + } + for (let i = 0; i < this.bufs.length; i++) { + if (!uint8arrays_dist_src_equals_equals(this.bufs[i], other.bufs[i])) { + return false; + } + } + return true; + } + /** + * Create a Uint8ArrayList from a pre-existing list of Uint8Arrays. Use this + * method if you know the total size of all the Uint8Arrays ahead of time. + */ + static fromUint8Arrays(bufs, length) { + const list = new src_Uint8ArrayList(); + list.bufs = bufs; + if (length == null) { + length = bufs.reduce((acc, curr) => acc + curr.byteLength, 0); + } + list.length = length; + return list; + } +} +/* +function indexOf (needle: Uint8Array, haystack: Uint8Array, offset = 0) { + for (let i = offset; i < haystack.byteLength; i++) { + for (let j = 0; j < needle.length; j++) { + if (haystack[i + j] !== needle[j]) { + break } - if(group.end === 7) { - ip.push(''); + + if (j === needle.byteLength -1) { + return i } } + + if (haystack.byteLength - i < needle.byteLength) { + break + } } - return ip.join(':'); -}; + return -1 +} +*/ +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/chunker/fixed-size.js + +const DEFAULT_CHUNK_SIZE = 262144; +const fixedSize = (options = {}) => { + const chunkSize = options.chunkSize ?? DEFAULT_CHUNK_SIZE; + return async function* fixedSizeChunker(source) { + let list = new src_Uint8ArrayList(); + let currentLength = 0; + let emitted = false; + for await (const buffer of source) { + list.append(buffer); + currentLength += buffer.length; + while (currentLength >= chunkSize) { + yield list.slice(0, chunkSize); + emitted = true; + // throw away consumed bytes + if (chunkSize === list.length) { + list = new src_Uint8ArrayList(); + currentLength = 0; + } + else { + const newBl = new src_Uint8ArrayList(); + newBl.append(list.sublist(chunkSize)); + list = newBl; + // update our offset + currentLength -= chunkSize; + } + } + } + if (!emitted || currentLength > 0) { + // return any remaining bytes + yield list.subarray(0, currentLength); + } + }; +}; +//# sourceMappingURL=fixed-size.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/utils/float.js +const f32 = new Float32Array([-0]); +const f8b = new Uint8Array(f32.buffer); /** - * Estimates the number of processes that can be run concurrently. If - * creating Web Workers, keep in mind that the main JavaScript process needs - * its own core. + * Writes a 32 bit float to a buffer using little endian byte order + */ +function writeFloatLE(val, buf, pos) { + f32[0] = val; + buf[pos] = f8b[0]; + buf[pos + 1] = f8b[1]; + buf[pos + 2] = f8b[2]; + buf[pos + 3] = f8b[3]; +} +/** + * Writes a 32 bit float to a buffer using big endian byte order + */ +function writeFloatBE(val, buf, pos) { + f32[0] = val; + buf[pos] = f8b[3]; + buf[pos + 1] = f8b[2]; + buf[pos + 2] = f8b[1]; + buf[pos + 3] = f8b[0]; +} +/** + * Reads a 32 bit float from a buffer using little endian byte order + */ +function readFloatLE(buf, pos) { + f8b[0] = buf[pos]; + f8b[1] = buf[pos + 1]; + f8b[2] = buf[pos + 2]; + f8b[3] = buf[pos + 3]; + return f32[0]; +} +/** + * Reads a 32 bit float from a buffer using big endian byte order + */ +function readFloatBE(buf, pos) { + f8b[3] = buf[pos]; + f8b[2] = buf[pos + 1]; + f8b[1] = buf[pos + 2]; + f8b[0] = buf[pos + 3]; + return f32[0]; +} +const f64 = new Float64Array([-0]); +const d8b = new Uint8Array(f64.buffer); +/** + * Writes a 64 bit double to a buffer using little endian byte order + */ +function writeDoubleLE(val, buf, pos) { + f64[0] = val; + buf[pos] = d8b[0]; + buf[pos + 1] = d8b[1]; + buf[pos + 2] = d8b[2]; + buf[pos + 3] = d8b[3]; + buf[pos + 4] = d8b[4]; + buf[pos + 5] = d8b[5]; + buf[pos + 6] = d8b[6]; + buf[pos + 7] = d8b[7]; +} +/** + * Writes a 64 bit double to a buffer using big endian byte order + */ +function writeDoubleBE(val, buf, pos) { + f64[0] = val; + buf[pos] = d8b[7]; + buf[pos + 1] = d8b[6]; + buf[pos + 2] = d8b[5]; + buf[pos + 3] = d8b[4]; + buf[pos + 4] = d8b[3]; + buf[pos + 5] = d8b[2]; + buf[pos + 6] = d8b[1]; + buf[pos + 7] = d8b[0]; +} +/** + * Reads a 64 bit double from a buffer using little endian byte order + */ +function readDoubleLE(buf, pos) { + d8b[0] = buf[pos]; + d8b[1] = buf[pos + 1]; + d8b[2] = buf[pos + 2]; + d8b[3] = buf[pos + 3]; + d8b[4] = buf[pos + 4]; + d8b[5] = buf[pos + 5]; + d8b[6] = buf[pos + 6]; + d8b[7] = buf[pos + 7]; + return f64[0]; +} +/** + * Reads a 64 bit double from a buffer using big endian byte order + */ +function readDoubleBE(buf, pos) { + d8b[7] = buf[pos]; + d8b[6] = buf[pos + 1]; + d8b[5] = buf[pos + 2]; + d8b[4] = buf[pos + 3]; + d8b[3] = buf[pos + 4]; + d8b[2] = buf[pos + 5]; + d8b[1] = buf[pos + 6]; + d8b[0] = buf[pos + 7]; + return f64[0]; +} +//# sourceMappingURL=float.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/utils/longbits.js +// the largest BigInt we can safely downcast to a Number +const MAX_SAFE_NUMBER_INTEGER = BigInt(Number.MAX_SAFE_INTEGER); +const MIN_SAFE_NUMBER_INTEGER = BigInt(Number.MIN_SAFE_INTEGER); +/** + * Constructs new long bits. * - * @param options the options to use: - * update true to force an update (not use the cached value). - * @param callback(err, max) called once the operation completes. + * @classdesc Helper class for working with the low and high bits of a 64 bit value. + * @memberof util + * @function Object() { [native code] } + * @param {number} lo - Low 32 bits, unsigned + * @param {number} hi - High 32 bits, unsigned */ -util.estimateCores = function(options, callback) { - if(typeof options === 'function') { - callback = options; - options = {}; - } - options = options || {}; - if('cores' in util && !options.update) { - return callback(null, util.cores); - } - if(typeof navigator !== 'undefined' && - 'hardwareConcurrency' in navigator && - navigator.hardwareConcurrency > 0) { - util.cores = navigator.hardwareConcurrency; - return callback(null, util.cores); - } - if(typeof Worker === 'undefined') { - // workers not available - util.cores = 1; - return callback(null, util.cores); - } - if(typeof Blob === 'undefined') { - // can't estimate, default to 2 - util.cores = 2; - return callback(null, util.cores); - } +class LongBits { + lo; + hi; + constructor(lo, hi) { + // note that the casts below are theoretically unnecessary as of today, but older statically + // generated converter code might still call the ctor with signed 32bits. kept for compat. + /** + * Low bits + */ + this.lo = lo | 0; + /** + * High bits + */ + this.hi = hi | 0; + } + /** + * Converts this long bits to a possibly unsafe JavaScript number + */ + toNumber(unsigned = false) { + if (!unsigned && (this.hi >>> 31) > 0) { + const lo = ~this.lo + 1 >>> 0; + let hi = ~this.hi >>> 0; + if (lo === 0) { + hi = hi + 1 >>> 0; + } + return -(lo + hi * 4294967296); + } + return this.lo + this.hi * 4294967296; + } + /** + * Converts this long bits to a bigint + */ + toBigInt(unsigned = false) { + if (unsigned) { + return BigInt(this.lo >>> 0) + (BigInt(this.hi >>> 0) << 32n); + } + if ((this.hi >>> 31) !== 0) { + const lo = ~this.lo + 1 >>> 0; + let hi = ~this.hi >>> 0; + if (lo === 0) { + hi = hi + 1 >>> 0; + } + return -(BigInt(lo) + (BigInt(hi) << 32n)); + } + return BigInt(this.lo >>> 0) + (BigInt(this.hi >>> 0) << 32n); + } + /** + * Converts this long bits to a string + */ + toString(unsigned = false) { + return this.toBigInt(unsigned).toString(); + } + /** + * Zig-zag encodes this long bits + */ + zzEncode() { + const mask = this.hi >> 31; + this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; + this.lo = (this.lo << 1 ^ mask) >>> 0; + return this; + } + /** + * Zig-zag decodes this long bits + */ + zzDecode() { + const mask = -(this.lo & 1); + this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; + this.hi = (this.hi >>> 1 ^ mask) >>> 0; + return this; + } + /** + * Calculates the length of this longbits when encoded as a varint. + */ + length() { + const part0 = this.lo; + const part1 = (this.lo >>> 28 | this.hi << 4) >>> 0; + const part2 = this.hi >>> 24; + return part2 === 0 + ? part1 === 0 + ? part0 < 16384 + ? part0 < 128 ? 1 : 2 + : part0 < 2097152 ? 3 : 4 + : part1 < 16384 + ? part1 < 128 ? 5 : 6 + : part1 < 2097152 ? 7 : 8 + : part2 < 128 ? 9 : 10; + } + /** + * Constructs new long bits from the specified number + */ + static fromBigInt(value) { + if (value === 0n) { + return zero; + } + if (value < MAX_SAFE_NUMBER_INTEGER && value > MIN_SAFE_NUMBER_INTEGER) { + return this.fromNumber(Number(value)); + } + const negative = value < 0n; + if (negative) { + value = -value; + } + let hi = value >> 32n; + let lo = value - (hi << 32n); + if (negative) { + hi = ~hi | 0n; + lo = ~lo | 0n; + if (++lo > TWO_32) { + lo = 0n; + if (++hi > TWO_32) { + hi = 0n; + } + } + } + return new LongBits(Number(lo), Number(hi)); + } + /** + * Constructs new long bits from the specified number + */ + static fromNumber(value) { + if (value === 0) { + return zero; + } + const sign = value < 0; + if (sign) { + value = -value; + } + let lo = value >>> 0; + let hi = (value - lo) / 4294967296 >>> 0; + if (sign) { + hi = ~hi >>> 0; + lo = ~lo >>> 0; + if (++lo > 4294967295) { + lo = 0; + if (++hi > 4294967295) { + hi = 0; + } + } + } + return new LongBits(lo, hi); + } + /** + * Constructs new long bits from a number, long or string + */ + static from(value) { + if (typeof value === 'number') { + return LongBits.fromNumber(value); + } + if (typeof value === 'bigint') { + return LongBits.fromBigInt(value); + } + if (typeof value === 'string') { + return LongBits.fromBigInt(BigInt(value)); + } + return value.low != null || value.high != null ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; + } +} +const zero = new LongBits(0, 0); +zero.toBigInt = function () { return 0n; }; +zero.zzEncode = zero.zzDecode = function () { return this; }; +zero.length = function () { return 1; }; +const TWO_32 = 4294967296n; +//# sourceMappingURL=longbits.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/utils/utf8.js +/** + * Calculates the UTF8 byte length of a string + */ +function utf8_length(string) { + let len = 0; + let c = 0; + for (let i = 0; i < string.length; ++i) { + c = string.charCodeAt(i); + if (c < 128) { + len += 1; + } + else if (c < 2048) { + len += 2; + } + else if ((c & 0xFC00) === 0xD800 && (string.charCodeAt(i + 1) & 0xFC00) === 0xDC00) { + ++i; + len += 4; + } + else { + len += 3; + } + } + return len; +} +/** + * Reads UTF8 bytes as a string + */ +function utf8_read(buffer, start, end) { + const len = end - start; + if (len < 1) { + return ''; + } + let parts; + const chunk = []; + let i = 0; // char offset + let t; // temporary + while (start < end) { + t = buffer[start++]; + if (t < 128) { + chunk[i++] = t; + } + else if (t > 191 && t < 224) { + chunk[i++] = (t & 31) << 6 | buffer[start++] & 63; + } + else if (t > 239 && t < 365) { + t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000; + chunk[i++] = 0xD800 + (t >> 10); + chunk[i++] = 0xDC00 + (t & 1023); + } + else { + chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63; + } + if (i > 8191) { + (parts ?? (parts = [])).push(String.fromCharCode.apply(String, chunk)); + i = 0; + } + } + if (parts != null) { + if (i > 0) { + parts.push(String.fromCharCode.apply(String, chunk.slice(0, i))); + } + return parts.join(''); + } + return String.fromCharCode.apply(String, chunk.slice(0, i)); +} +/** + * Writes a string as UTF8 bytes + */ +function write(string, buffer, offset) { + const start = offset; + let c1; // character 1 + let c2; // character 2 + for (let i = 0; i < string.length; ++i) { + c1 = string.charCodeAt(i); + if (c1 < 128) { + buffer[offset++] = c1; + } + else if (c1 < 2048) { + buffer[offset++] = c1 >> 6 | 192; + buffer[offset++] = c1 & 63 | 128; + } + else if ((c1 & 0xFC00) === 0xD800 && ((c2 = string.charCodeAt(i + 1)) & 0xFC00) === 0xDC00) { + c1 = 0x10000 + ((c1 & 0x03FF) << 10) + (c2 & 0x03FF); + ++i; + buffer[offset++] = c1 >> 18 | 240; + buffer[offset++] = c1 >> 12 & 63 | 128; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + else { + buffer[offset++] = c1 >> 12 | 224; + buffer[offset++] = c1 >> 6 & 63 | 128; + buffer[offset++] = c1 & 63 | 128; + } + } + return offset - start; +} +//# sourceMappingURL=utf8.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/utils/reader.js - // create worker concurrency estimation code as blob - var blobUrl = URL.createObjectURL(new Blob(['(', - function() { - self.addEventListener('message', function(e) { - // run worker for 4 ms - var st = Date.now(); - var et = st + 4; - while(Date.now() < et); - self.postMessage({st: st, et: et}); - }); - }.toString(), - ')()'], {type: 'application/javascript'})); - // take 5 samples using 16 workers - sample([], 5, 16); - function sample(max, samples, numWorkers) { - if(samples === 0) { - // get overlap average - var avg = Math.floor(max.reduce(function(avg, x) { - return avg + x; - }, 0) / max.length); - util.cores = Math.max(1, avg); - URL.revokeObjectURL(blobUrl); - return callback(null, util.cores); +/* istanbul ignore next */ +function indexOutOfRange(reader, writeLength) { + return RangeError(`index out of range: ${reader.pos} + ${writeLength ?? 1} > ${reader.len}`); +} +function readFixed32End(buf, end) { + return (buf[end - 4] | + buf[end - 3] << 8 | + buf[end - 2] << 16 | + buf[end - 1] << 24) >>> 0; +} +/** + * Constructs a new reader instance using the specified buffer. + */ +class Uint8ArrayReader { + buf; + pos; + len; + _slice = Uint8Array.prototype.subarray; + constructor(buffer) { + /** + * Read buffer + */ + this.buf = buffer; + /** + * Read buffer position + */ + this.pos = 0; + /** + * Read buffer length + */ + this.len = buffer.length; + } + /** + * Reads a varint as an unsigned 32 bit value + */ + uint32() { + let value = 4294967295; + value = (this.buf[this.pos] & 127) >>> 0; + if (this.buf[this.pos++] < 128) + return value; + value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; + if (this.buf[this.pos++] < 128) + return value; + value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; + if (this.buf[this.pos++] < 128) + return value; + value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; + if (this.buf[this.pos++] < 128) + return value; + value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; + if (this.buf[this.pos++] < 128) + return value; + if ((this.pos += 5) > this.len) { + this.pos = this.len; + throw indexOutOfRange(this, 10); + } + return value; + } + /** + * Reads a varint as a signed 32 bit value + */ + int32() { + return this.uint32() | 0; + } + /** + * Reads a zig-zag encoded varint as a signed 32 bit value + */ + sint32() { + const value = this.uint32(); + return value >>> 1 ^ -(value & 1) | 0; + } + /** + * Reads a varint as a boolean + */ + bool() { + return this.uint32() !== 0; + } + /** + * Reads fixed 32 bits as an unsigned 32 bit integer + */ + fixed32() { + if (this.pos + 4 > this.len) { + throw indexOutOfRange(this, 4); + } + const res = readFixed32End(this.buf, this.pos += 4); + return res; + } + /** + * Reads fixed 32 bits as a signed 32 bit integer + */ + sfixed32() { + if (this.pos + 4 > this.len) { + throw indexOutOfRange(this, 4); + } + const res = readFixed32End(this.buf, this.pos += 4) | 0; + return res; + } + /** + * Reads a float (32 bit) as a number + */ + float() { + if (this.pos + 4 > this.len) { + throw indexOutOfRange(this, 4); + } + const value = readFloatLE(this.buf, this.pos); + this.pos += 4; + return value; + } + /** + * Reads a double (64 bit float) as a number + */ + double() { + /* istanbul ignore if */ + if (this.pos + 8 > this.len) { + throw indexOutOfRange(this, 4); + } + const value = readDoubleLE(this.buf, this.pos); + this.pos += 8; + return value; + } + /** + * Reads a sequence of bytes preceded by its length as a varint + */ + bytes() { + const length = this.uint32(); + const start = this.pos; + const end = this.pos + length; + /* istanbul ignore if */ + if (end > this.len) { + throw indexOutOfRange(this, length); + } + this.pos += length; + return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1 + ? new Uint8Array(0) + : this.buf.subarray(start, end); + } + /** + * Reads a string preceded by its byte length as a varint + */ + string() { + const bytes = this.bytes(); + return utf8_read(bytes, 0, bytes.length); + } + /** + * Skips the specified number of bytes if specified, otherwise skips a varint + */ + skip(length) { + if (typeof length === 'number') { + /* istanbul ignore if */ + if (this.pos + length > this.len) { + throw indexOutOfRange(this, length); + } + this.pos += length; + } + else { + do { + /* istanbul ignore if */ + if (this.pos >= this.len) { + throw indexOutOfRange(this); + } + } while ((this.buf[this.pos++] & 128) !== 0); + } + return this; + } + /** + * Skips the next element of the specified wire type + */ + skipType(wireType) { + switch (wireType) { + case 0: + this.skip(); + break; + case 1: + this.skip(8); + break; + case 2: + this.skip(this.uint32()); + break; + case 3: + while ((wireType = this.uint32() & 7) !== 4) { + this.skipType(wireType); + } + break; + case 5: + this.skip(4); + break; + /* istanbul ignore next */ + default: + throw Error(`invalid wire type ${wireType} at offset ${this.pos}`); + } + return this; + } + readLongVarint() { + // tends to deopt with local vars for octet etc. + const bits = new LongBits(0, 0); + let i = 0; + if (this.len - this.pos > 4) { // fast route (lo) + for (; i < 4; ++i) { + // 1st..4th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) { + return bits; + } + } + // 5th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; + bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; + if (this.buf[this.pos++] < 128) { + return bits; + } + i = 0; + } + else { + for (; i < 3; ++i) { + /* istanbul ignore if */ + if (this.pos >= this.len) { + throw indexOutOfRange(this); + } + // 1st..3th + bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; + if (this.buf[this.pos++] < 128) { + return bits; + } + } + // 4th + bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; + return bits; + } + if (this.len - this.pos > 4) { // fast route (hi) + for (; i < 5; ++i) { + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) { + return bits; + } + } + } + else { + for (; i < 5; ++i) { + if (this.pos >= this.len) { + throw indexOutOfRange(this); + } + // 6th..10th + bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; + if (this.buf[this.pos++] < 128) { + return bits; + } + } + } + throw Error('invalid varint encoding'); + } + readFixed64() { + if (this.pos + 8 > this.len) { + throw indexOutOfRange(this, 8); + } + const lo = readFixed32End(this.buf, this.pos += 4); + const hi = readFixed32End(this.buf, this.pos += 4); + return new LongBits(lo, hi); + } + /** + * Reads a varint as a signed 64 bit value + */ + int64() { + return this.readLongVarint().toBigInt(); + } + /** + * Reads a varint as a signed 64 bit value returned as a possibly unsafe + * JavaScript number + */ + int64Number() { + return this.readLongVarint().toNumber(); + } + /** + * Reads a varint as a signed 64 bit value returned as a string + */ + int64String() { + return this.readLongVarint().toString(); + } + /** + * Reads a varint as an unsigned 64 bit value + */ + uint64() { + return this.readLongVarint().toBigInt(true); + } + /** + * Reads a varint as an unsigned 64 bit value returned as a possibly unsafe + * JavaScript number + */ + uint64Number() { + return this.readLongVarint().toNumber(true); + } + /** + * Reads a varint as an unsigned 64 bit value returned as a string + */ + uint64String() { + return this.readLongVarint().toString(true); + } + /** + * Reads a zig-zag encoded varint as a signed 64 bit value + */ + sint64() { + return this.readLongVarint().zzDecode().toBigInt(); + } + /** + * Reads a zig-zag encoded varint as a signed 64 bit value returned as a + * possibly unsafe JavaScript number + */ + sint64Number() { + return this.readLongVarint().zzDecode().toNumber(); } - map(numWorkers, function(err, results) { - max.push(reduce(numWorkers, results)); - sample(max, samples - 1, numWorkers); - }); - } - - function map(numWorkers, callback) { - var workers = []; - var results = []; - for(var i = 0; i < numWorkers; ++i) { - var worker = new Worker(blobUrl); - worker.addEventListener('message', function(e) { - results.push(e.data); - if(results.length === numWorkers) { - for(var i = 0; i < numWorkers; ++i) { - workers[i].terminate(); - } - callback(null, results); - } - }); - workers.push(worker); + /** + * Reads a zig-zag encoded varint as a signed 64 bit value returned as a + * string + */ + sint64String() { + return this.readLongVarint().zzDecode().toString(); } - for(var i = 0; i < numWorkers; ++i) { - workers[i].postMessage(i); + /** + * Reads fixed 64 bits + */ + fixed64() { + return this.readFixed64().toBigInt(); } - } - - function reduce(numWorkers, results) { - // find overlapping time windows - var overlaps = []; - for(var n = 0; n < numWorkers; ++n) { - var r1 = results[n]; - var overlap = overlaps[n] = []; - for(var i = 0; i < numWorkers; ++i) { - if(n === i) { - continue; - } - var r2 = results[i]; - if((r1.st > r2.st && r1.st < r2.et) || - (r2.st > r1.st && r2.st < r1.et)) { - overlap.push(i); - } - } + /** + * Reads fixed 64 bits returned as a possibly unsafe JavaScript number + */ + fixed64Number() { + return this.readFixed64().toNumber(); + } + /** + * Reads fixed 64 bits returned as a string + */ + fixed64String() { + return this.readFixed64().toString(); + } + /** + * Reads zig-zag encoded fixed 64 bits + */ + sfixed64() { + return this.readFixed64().toBigInt(); + } + /** + * Reads zig-zag encoded fixed 64 bits returned as a possibly unsafe + * JavaScript number + */ + sfixed64Number() { + return this.readFixed64().toNumber(); + } + /** + * Reads zig-zag encoded fixed 64 bits returned as a string + */ + sfixed64String() { + return this.readFixed64().toString(); } - // get maximum overlaps ... don't include overlapping worker itself - // as the main JS process was also being scheduled during the work and - // would have to be subtracted from the estimate anyway - return overlaps.reduce(function(max, overlap) { - return Math.max(max, overlap.length); - }, 0); - } -}; - - -/***/ }), - -/***/ 57175: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -var wrappy = __nccwpck_require__(79019) -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f } - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f +function createReader(buf) { + return new Uint8ArrayReader(buf instanceof Uint8Array ? buf : buf.subarray()); } +//# sourceMappingURL=reader.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/decode.js +function decodeMessage(buf, codec) { + const reader = createReader(buf); + return codec.decode(reader); +} +//# sourceMappingURL=decode.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/uint8arrays/dist/src/util/as-uint8array.js +/** + * To guarantee Uint8Array semantics, convert nodejs Buffers + * into vanilla Uint8Arrays + */ +function node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(buf) { + if (globalThis.Buffer != null) { + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + return buf; +} +//# sourceMappingURL=as-uint8array.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/uint8arrays/dist/src/alloc.js -/***/ }), - -/***/ 31368: -/***/ ((module) => { - -"use strict"; - - -const pDefer = () => { - const deferred = {}; - - deferred.promise = new Promise((resolve, reject) => { - deferred.resolve = resolve; - deferred.reject = reject; - }); - - return deferred; -}; - -module.exports = pDefer; - - -/***/ }), - -/***/ 93963: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -const Fifo = __nccwpck_require__(20375) -const defer = __nccwpck_require__(31368) - -module.exports = class PFifo { - constructor () { - this._buffer = new Fifo() - this._waitingConsumers = new Fifo() +/** + * Returns a `Uint8Array` of the requested size. Referenced memory will + * be initialized to 0. + */ +function protons_runtime_node_modules_uint8arrays_dist_src_alloc_alloc(size = 0) { + if (globalThis.Buffer?.alloc != null) { + return asUint8Array(globalThis.Buffer.alloc(size)); + } + return new Uint8Array(size); +} +/** + * Where possible returns a Uint8Array of the requested size that references + * uninitialized memory. Only use if you are certain you will immediately + * overwrite every value in the returned `Uint8Array`. + */ +function node_modules_uint8arrays_dist_src_alloc_allocUnsafe(size = 0) { + if (globalThis.Buffer?.allocUnsafe != null) { + return node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.allocUnsafe(size)); + } + return new Uint8Array(size); +} +//# sourceMappingURL=alloc.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function protons_runtime_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; } - - push (chunk) { - const { promise, resolve } = defer() - this._buffer.push({ chunk, resolve }) - this._consume() - return promise + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; } - - _consume () { - while (!this._waitingConsumers.isEmpty() && !this._buffer.isEmpty()) { - const nextConsumer = this._waitingConsumers.shift() - const nextChunk = this._buffer.shift() - nextConsumer.resolve(nextChunk.chunk) - nextChunk.resolve() + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str } - - shift () { - const { promise, resolve } = defer() - this._waitingConsumers.push({ resolve }) - this._consume() - return promise + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch } - - isEmpty () { - return this._buffer.isEmpty() + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode } } +var protons_runtime_node_modules_multiformats_vendor_base_x_src = protons_runtime_node_modules_multiformats_vendor_base_x_base; +var protons_runtime_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = protons_runtime_node_modules_multiformats_vendor_base_x_src; -/***/ }), - -/***/ 35632: -/***/ ((module) => { - -"use strict"; - - -var durationRE = /(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([\p{L}]*)/uig - -module.exports = parse -// enable default import syntax in typescript -module.exports["default"] = parse - -/** - * conversion ratios - */ - -parse.nanosecond = -parse.ns = 1 / 1e6 - -parse['µs'] = -parse['μs'] = -parse.us = -parse.microsecond = 1 / 1e3 - -parse.millisecond = -parse.ms = -parse[''] = 1 - -parse.second = -parse.sec = -parse.s = parse.ms * 1000 - -parse.minute = -parse.min = -parse.m = parse.s * 60 - -parse.hour = -parse.hr = -parse.h = parse.m * 60 - -parse.day = -parse.d = parse.h * 24 - -parse.week = -parse.wk = -parse.w = parse.d * 7 - -parse.month = -parse.b = -parse.d * (365.25 / 12) - -parse.year = -parse.yr = -parse.y = parse.d * 365.25 - -/** - * convert `str` to ms - * - * @param {String} str - * @param {String} format - * @return {Number} - */ - -function parse(str='', format='ms'){ - var result = null - // ignore commas/placeholders - str = (str+'').replace(/(\d)[,_](\d)/g, '$1$2') - str.replace(durationRE, function(_, n, units){ - units = unitRatio(units) - if (units) result = (result || 0) + parseFloat(n, 10) * units - }) - - return result && (result / (unitRatio(format) || 1)) -} - -function unitRatio(str) { - return parse[str] || parse[str.toLowerCase().replace(/s$/, '')] -} - +/* harmony default export */ const protons_runtime_node_modules_multiformats_vendor_base_x = (protons_runtime_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); -/***/ }), - -/***/ 63923: -/***/ ((module, exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bytes.js +const protons_runtime_node_modules_multiformats_src_bytes_empty = new Uint8Array(0) -"use strict"; -/* - * Id is an object representation of a peer Id. a peer Id is a multihash +/** + * @param {Uint8Array} d */ +const protons_runtime_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') - - -const { CID } = __nccwpck_require__(24247) -const b32 = __nccwpck_require__(70784) -const b36 = __nccwpck_require__(76443) -const b58 = __nccwpck_require__(49108) -const b64 = __nccwpck_require__(98197) -const { base58btc } = __nccwpck_require__(49108) -const { base32 } = __nccwpck_require__(70784) -const { base16 } = __nccwpck_require__(98085) -const Digest = __nccwpck_require__(81168) -const cryptoKeys = __nccwpck_require__(13041) -const withIs = __nccwpck_require__(86421) -const { PeerIdProto } = __nccwpck_require__(42656) -const { equals: uint8ArrayEquals } = __nccwpck_require__(94646) -const { fromString: uint8ArrayFromString } = __nccwpck_require__(39451) -const { toString: uint8ArrayToString } = __nccwpck_require__(2771) -const { identity } = __nccwpck_require__(53863) - -const bases = { - ...b32, - ...b36, - ...b58, - ...b64 +/** + * @param {string} hex + */ +const protons_runtime_node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : protons_runtime_node_modules_multiformats_src_bytes_empty } -const baseDecoder = Object.keys(bases).reduce( - (acc, curr) => acc.or(bases[curr]), - base32.decoder -) - -// these values are from https://github.com/multiformats/multicodec/blob/master/table.csv -const DAG_PB_CODE = 0x70 -const LIBP2P_KEY_CODE = 0x72 -class PeerId { - constructor (id, privKey, pubKey) { - if (!(id instanceof Uint8Array)) { - throw new Error('invalid id provided') - } +/** + * @param {Uint8Array} aa + * @param {Uint8Array} bb + */ +const protons_runtime_node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false + } - if (privKey && pubKey && !uint8ArrayEquals(privKey.public.bytes, pubKey.bytes)) { - throw new Error('inconsistent arguments') + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false } - - this._id = id - this._idB58String = base58btc.encode(this.id).substring(1) - this._privKey = privKey - this._pubKey = pubKey } - get id () { - return this._id - } + return true +} - set id (val) { - throw new Error('Id is immutable') +/** + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} + */ +const protons_runtime_node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) } + throw new Error('Unknown type, must be binary type') +} - get privKey () { - return this._privKey - } +/** + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} + */ +const protons_runtime_node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) - set privKey (privKey) { - this._privKey = privKey - } +/** + * @param {string} str + * @returns {Uint8Array} + */ +const protons_runtime_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) - get pubKey () { - if (this._pubKey) { - return this._pubKey - } +/** + * @param {Uint8Array} b + * @returns {string} + */ +const protons_runtime_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) - if (this._privKey) { - return this._privKey.public - } - try { - const decoded = Digest.decode(this.id) - if (decoded.code === identity.code) { - this._pubKey = cryptoKeys.unmarshalPublicKey(decoded.digest) - } - } catch (_) { - // Ignore, there is no valid public key - } +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base.js - return this._pubKey - } - set pubKey (pubKey) { - this._pubKey = pubKey - } +// Linter can't see that API is used in types. +// eslint-disable-next-line - // Return the protobuf version of the public key, matching go ipfs formatting - marshalPubKey () { - if (this.pubKey) { - return cryptoKeys.marshalPublicKey(this.pubKey) - } - } - // Return the protobuf version of the private key, matching go ipfs formatting - marshalPrivKey () { - if (this.privKey) { - return cryptoKeys.marshalPrivateKey(this.privKey) - } +/** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} + */ +class protons_runtime_node_modules_multiformats_src_bases_base_Encoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + */ + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode } - // Return the protobuf version of the peer-id - marshal (excludePriv) { - return PeerIdProto.encode({ - id: this.toBytes(), - pubKey: this.marshalPubKey(), - privKey: excludePriv ? null : this.marshalPrivKey() - }).finish() + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') + } } +} - toPrint () { - let pid = this.toB58String() - // All sha256 nodes start with Qm - // We can skip the Qm to make the peer.ID more useful - if (pid.startsWith('Qm')) { - pid = pid.slice(2) - } - let maxRunes = 6 - if (pid.length < maxRunes) { - maxRunes = pid.length +/** + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} + */ +class protons_runtime_node_modules_multiformats_src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') } - - return '' + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode } - // return the jsonified version of the key, matching the formatting - // of go-ipfs for its config file - toJSON () { - return { - id: this.toB58String(), - privKey: toB64Opt(this.marshalPrivKey()), - pubKey: toB64Opt(this.marshalPubKey()) + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) + } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') } } - // encode/decode functions - toHexString () { - return base16.encode(this.id).substring(1) + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return protons_runtime_node_modules_multiformats_src_bases_base_or(this, decoder) } +} - toBytes () { - return this.id - } +/** + * @template {string} Prefix + * @typedef {Record>} Decoders + */ - toB58String () { - return this._idB58String +/** + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} + */ +class protons_runtime_node_modules_multiformats_src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders } - // return self-describing String representation - // in default format from RFC 0001: https://github.com/libp2p/specs/pull/209 - toString () { - if (!this._idCIDString) { - const cid = CID.createV1(LIBP2P_KEY_CODE, Digest.decode(this.id)) - - Object.defineProperty(this, '_idCIDString', { - value: cid.toString(), - enumerable: false - }) - } - return this._idCIDString + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return protons_runtime_node_modules_multiformats_src_bases_base_or(this, decoder) } /** - * Checks the equality of `this` peer against a given PeerId. - * - * @param {Uint8Array|PeerId} id - * @returns {boolean} + * @param {string} input + * @returns {Uint8Array} */ - equals (id) { - if (id instanceof Uint8Array) { - return uint8ArrayEquals(this.id, id) - } else if (id.id) { - return uint8ArrayEquals(this.id, id.id) + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) } else { - throw new Error('not valid Id') + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) } } +} + +/** + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} + */ +const protons_runtime_node_modules_multiformats_src_bases_base_or = (left, right) => new protons_runtime_node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) +/** + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} + */ +class protons_runtime_node_modules_multiformats_src_bases_base_Codec { /** - * Checks the equality of `this` peer against a given PeerId. - * - * @deprecated Use `.equals` - * @param {Uint8Array|PeerId} id - * @returns {boolean} + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode */ - isEqual (id) { - return this.equals(id) + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new protons_runtime_node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new protons_runtime_node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode) } - /* - * Check if this PeerId instance is valid (privKey -> pubKey -> Id) + /** + * @param {Uint8Array} input */ - isValid () { - // TODO: needs better checking - return Boolean(this.privKey && - this.privKey.public && - this.privKey.public.bytes && - this.pubKey.bytes instanceof Uint8Array && - uint8ArrayEquals(this.privKey.public.bytes, this.pubKey.bytes)) + encode (input) { + return this.encoder.encode(input) } /** - * Check if the PeerId has an inline public key. - * - * @returns {boolean} + * @param {string} input */ - hasInlinePublicKey () { - try { - const decoded = Digest.decode(this.id) - - if (decoded.code === identity.code) { - return true - } - } catch (_) { - // Ignore, there is no valid public key - } - - return false + decode (input) { + return this.decoder.decode(input) } } -const PeerIdWithIs = withIs(PeerId, { - className: 'PeerId', - symbolName: '@libp2p/js-peer-id/PeerId' -}) - -exports = module.exports = PeerIdWithIs - -const computeDigest = (pubKey) => { - if (pubKey.bytes.length <= 42) { - return Digest.create(identity.code, pubKey.bytes).bytes - } else { - return pubKey.hash() - } -} +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} + */ +const protons_runtime_node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new protons_runtime_node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode) -const computePeerId = async (privKey, pubKey) => { - const digest = await computeDigest(pubKey) - return new PeerIdWithIs(digest, privKey, pubKey) +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} + */ +const protons_runtime_node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = protons_runtime_node_modules_multiformats_vendor_base_x(alphabet, name) + return protons_runtime_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => protons_runtime_node_modules_multiformats_src_bytes_coerce(decode(text)) + }) } -// generation -exports.create = async (opts) => { - opts = opts || {} - opts.bits = opts.bits || 2048 - opts.keyType = opts.keyType || 'RSA' - - const key = await cryptoKeys.generateKeyPair(opts.keyType, opts.bits) - return computePeerId(key, key.public) -} +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const protons_runtime_node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i + } -exports.createFromHexString = (str) => { - return new PeerIdWithIs(base16.decode('f' + str)) -} + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end + } -exports.createFromBytes = (buf) => { - try { - const cid = CID.decode(buf) + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) - if (!validMulticodec(cid)) { - throw new Error('Supplied PeerID CID is invalid') + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) } - return exports.createFromCID(cid) - } catch { - const digest = Digest.decode(buf) + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar - if (digest.code !== identity.code) { - throw new Error('Supplied PeerID CID is invalid') + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) } - - return new PeerIdWithIs(buf) } -} - -exports.createFromB58String = (str) => { - return exports.createFromBytes(base58btc.decode('z' + str)) -} - -const validMulticodec = (cid) => { - // supported: 'libp2p-key' (CIDv1) and 'dag-pb' (CIDv0 converted to CIDv1) - return cid.code === LIBP2P_KEY_CODE || cid.code === DAG_PB_CODE -} - -exports.createFromCID = (cid) => { - cid = CID.asCID(cid) - if (!cid || !validMulticodec(cid)) { - throw new Error('Supplied PeerID CID is invalid') + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') } - return new PeerIdWithIs(cid.multihash.bytes) + return out } -// Public Key input will be a Uint8Array -exports.createFromPubKey = async (key) => { - let buf = key +/** + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} + */ +const protons_runtime_node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' - if (typeof buf === 'string') { - buf = uint8ArrayFromString(key, 'base64pad') - } + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 - if (!(buf instanceof Uint8Array)) { - throw new Error('Supplied key is neither a base64 string nor a Uint8Array') + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] + } } - const pubKey = await cryptoKeys.unmarshalPublicKey(buf) - return computePeerId(undefined, pubKey) -} - -// Private key input will be a string -exports.createFromPrivKey = async (key) => { - if (typeof key === 'string') { - key = uint8ArrayFromString(key, 'base64pad') + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] } - if (!(key instanceof Uint8Array)) { - throw new Error('Supplied key is neither a base64 string nor a Uint8Array') + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' + } } - const privKey = await cryptoKeys.unmarshalPrivateKey(key) - return computePeerId(privKey, privKey.public) + return out } -exports.createFromJSON = async (obj) => { - const id = base58btc.decode('z' + obj.id) - const rawPrivKey = obj.privKey && uint8ArrayFromString(obj.privKey, 'base64pad') - const rawPubKey = obj.pubKey && uint8ArrayFromString(obj.pubKey, 'base64pad') - const pub = rawPubKey && await cryptoKeys.unmarshalPublicKey(rawPubKey) - - if (!rawPrivKey) { - return new PeerIdWithIs(id, undefined, pub) - } - - const privKey = await cryptoKeys.unmarshalPrivateKey(rawPrivKey) - const privDigest = await computeDigest(privKey.public) - - let pubDigest - - if (pub) { - pubDigest = await computeDigest(pub) - } - - if (pub && !uint8ArrayEquals(privDigest, pubDigest)) { - throw new Error('Public and private key do not match') - } +/** + * RFC4648 Factory + * + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar + */ +const protons_runtime_node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return protons_runtime_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return protons_runtime_node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return protons_runtime_node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) + } + }) +} - if (id && !uint8ArrayEquals(privDigest, id)) { - throw new Error('Id and private key do not match') - } +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base10.js - return new PeerIdWithIs(id, privKey, pub) -} -exports.createFromProtobuf = async (buf) => { - if (typeof buf === 'string') { - buf = uint8ArrayFromString(buf, 'base16') - } +const protons_runtime_node_modules_multiformats_src_bases_base10_base10 = protons_runtime_node_modules_multiformats_src_bases_base_baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}) - let { id, privKey, pubKey } = PeerIdProto.decode(buf) +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base16.js +// @ts-check - privKey = privKey ? await cryptoKeys.unmarshalPrivateKey(privKey) : false - pubKey = pubKey ? await cryptoKeys.unmarshalPublicKey(pubKey) : false - let pubDigest - let privDigest - if (privKey) { - privDigest = await computeDigest(privKey.public) - } +const protons_runtime_node_modules_multiformats_src_bases_base16_base16 = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'f', + name: 'base16', + alphabet: '0123456789abcdef', + bitsPerChar: 4 +}) - if (pubKey) { - pubDigest = await computeDigest(pubKey) - } +const protons_runtime_node_modules_multiformats_src_bases_base16_base16upper = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'F', + name: 'base16upper', + alphabet: '0123456789ABCDEF', + bitsPerChar: 4 +}) - if (privKey) { - if (pubKey) { - if (!uint8ArrayEquals(privDigest, pubDigest)) { - throw new Error('Public and private key do not match') - } - } - return new PeerIdWithIs(privDigest, privKey, privKey.public) - } +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base2.js +// @ts-check - // TODO: val id and pubDigest - if (pubKey) { - return new PeerIdWithIs(pubDigest, undefined, pubKey) - } - if (id) { - return new PeerIdWithIs(id) - } +const protons_runtime_node_modules_multiformats_src_bases_base2_base2 = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}) - throw new Error('Protobuf did not contain any usable key material') -} +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base256emoji.js -exports.parse = (str) => { - if (str.charAt(0) === '1' || str.charAt(0) === 'Q') { - // identity hash ed25519 key or sha2-256 hash of rsa public key - // base58btc encoded either way - str = `z${str}` - } - return exports.createFromBytes(baseDecoder.decode(str)) -} +const protons_runtime_node_modules_multiformats_src_bases_base256emoji_alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂') +const protons_runtime_node_modules_multiformats_src_bases_base256emoji_alphabetBytesToChars = /** @type {string[]} */ (protons_runtime_node_modules_multiformats_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[i] = c; return p }, /** @type {string[]} */([]))) +const protons_runtime_node_modules_multiformats_src_bases_base256emoji_alphabetCharsToBytes = /** @type {number[]} */ (protons_runtime_node_modules_multiformats_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[/** @type {number} */ (c.codePointAt(0))] = i; return p }, /** @type {number[]} */([]))) -exports.isPeerId = (peerId) => { - return Boolean(typeof peerId === 'object' && - peerId._id && - peerId._idB58String) +/** + * @param {Uint8Array} data + * @returns {string} + */ +function protons_runtime_node_modules_multiformats_src_bases_base256emoji_encode (data) { + return data.reduce((p, c) => { + p += protons_runtime_node_modules_multiformats_src_bases_base256emoji_alphabetBytesToChars[c] + return p + }, '') } -function toB64Opt (val) { - if (val) { - return uint8ArrayToString(val, 'base64pad') +/** + * @param {string} str + * @returns {Uint8Array} + */ +function protons_runtime_node_modules_multiformats_src_bases_base256emoji_decode (str) { + const byts = [] + for (const char of str) { + const byt = protons_runtime_node_modules_multiformats_src_bases_base256emoji_alphabetCharsToBytes[/** @type {number} */ (char.codePointAt(0))] + if (byt === undefined) { + throw new Error(`Non-base256emoji character: ${char}`) + } + byts.push(byt) } + return new Uint8Array(byts) } +const protons_runtime_node_modules_multiformats_src_bases_base256emoji_base256emoji = protons_runtime_node_modules_multiformats_src_bases_base_from({ + prefix: '🚀', + name: 'base256emoji', + encode: protons_runtime_node_modules_multiformats_src_bases_base256emoji_encode, + decode: protons_runtime_node_modules_multiformats_src_bases_base256emoji_decode +}) -/***/ }), - -/***/ 42656: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; -/*eslint-disable*/ - - -var $protobuf = __nccwpck_require__(63616); - -// Common aliases -var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - -// Exported root namespace -var $root = $protobuf.roots["libp2p-peer-id"] || ($protobuf.roots["libp2p-peer-id"] = {}); - -$root.PeerIdProto = (function() { - - /** - * Properties of a PeerIdProto. - * @exports IPeerIdProto - * @interface IPeerIdProto - * @property {Uint8Array} id PeerIdProto id - * @property {Uint8Array|null} [pubKey] PeerIdProto pubKey - * @property {Uint8Array|null} [privKey] PeerIdProto privKey - */ - - /** - * Constructs a new PeerIdProto. - * @exports PeerIdProto - * @classdesc Represents a PeerIdProto. - * @implements IPeerIdProto - * @constructor - * @param {IPeerIdProto=} [p] Properties to set - */ - function PeerIdProto(p) { - if (p) - for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) - if (p[ks[i]] != null) - this[ks[i]] = p[ks[i]]; - } +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base32.js - /** - * PeerIdProto id. - * @member {Uint8Array} id - * @memberof PeerIdProto - * @instance - */ - PeerIdProto.prototype.id = $util.newBuffer([]); - /** - * PeerIdProto pubKey. - * @member {Uint8Array} pubKey - * @memberof PeerIdProto - * @instance - */ - PeerIdProto.prototype.pubKey = $util.newBuffer([]); +const protons_runtime_node_modules_multiformats_src_bases_base32_base32 = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) - /** - * PeerIdProto privKey. - * @member {Uint8Array} privKey - * @memberof PeerIdProto - * @instance - */ - PeerIdProto.prototype.privKey = $util.newBuffer([]); +const protons_runtime_node_modules_multiformats_src_bases_base32_base32upper = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) - /** - * Encodes the specified PeerIdProto message. Does not implicitly {@link PeerIdProto.verify|verify} messages. - * @function encode - * @memberof PeerIdProto - * @static - * @param {IPeerIdProto} m PeerIdProto message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeerIdProto.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - w.uint32(10).bytes(m.id); - if (m.pubKey != null && Object.hasOwnProperty.call(m, "pubKey")) - w.uint32(18).bytes(m.pubKey); - if (m.privKey != null && Object.hasOwnProperty.call(m, "privKey")) - w.uint32(26).bytes(m.privKey); - return w; - }; +const protons_runtime_node_modules_multiformats_src_bases_base32_base32pad = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) - /** - * Decodes a PeerIdProto message from the specified reader or buffer. - * @function decode - * @memberof PeerIdProto - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {PeerIdProto} PeerIdProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeerIdProto.decode = function decode(r, l) { - if (!(r instanceof $Reader)) - r = $Reader.create(r); - var c = l === undefined ? r.len : r.pos + l, m = new $root.PeerIdProto(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.id = r.bytes(); - break; - case 2: - m.pubKey = r.bytes(); - break; - case 3: - m.privKey = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - if (!m.hasOwnProperty("id")) - throw $util.ProtocolError("missing required 'id'", { instance: m }); - return m; - }; +const protons_runtime_node_modules_multiformats_src_bases_base32_base32padupper = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) - /** - * Creates a PeerIdProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof PeerIdProto - * @static - * @param {Object.} d Plain object - * @returns {PeerIdProto} PeerIdProto - */ - PeerIdProto.fromObject = function fromObject(d) { - if (d instanceof $root.PeerIdProto) - return d; - var m = new $root.PeerIdProto(); - if (d.id != null) { - if (typeof d.id === "string") - $util.base64.decode(d.id, m.id = $util.newBuffer($util.base64.length(d.id)), 0); - else if (d.id.length) - m.id = d.id; - } - if (d.pubKey != null) { - if (typeof d.pubKey === "string") - $util.base64.decode(d.pubKey, m.pubKey = $util.newBuffer($util.base64.length(d.pubKey)), 0); - else if (d.pubKey.length) - m.pubKey = d.pubKey; - } - if (d.privKey != null) { - if (typeof d.privKey === "string") - $util.base64.decode(d.privKey, m.privKey = $util.newBuffer($util.base64.length(d.privKey)), 0); - else if (d.privKey.length) - m.privKey = d.privKey; - } - return m; - }; +const protons_runtime_node_modules_multiformats_src_bases_base32_base32hex = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) - /** - * Creates a plain object from a PeerIdProto message. Also converts values to other types if specified. - * @function toObject - * @memberof PeerIdProto - * @static - * @param {PeerIdProto} m PeerIdProto - * @param {$protobuf.IConversionOptions} [o] Conversion options - * @returns {Object.} Plain object - */ - PeerIdProto.toObject = function toObject(m, o) { - if (!o) - o = {}; - var d = {}; - if (o.defaults) { - if (o.bytes === String) - d.id = ""; - else { - d.id = []; - if (o.bytes !== Array) - d.id = $util.newBuffer(d.id); - } - if (o.bytes === String) - d.pubKey = ""; - else { - d.pubKey = []; - if (o.bytes !== Array) - d.pubKey = $util.newBuffer(d.pubKey); - } - if (o.bytes === String) - d.privKey = ""; - else { - d.privKey = []; - if (o.bytes !== Array) - d.privKey = $util.newBuffer(d.privKey); - } - } - if (m.id != null && m.hasOwnProperty("id")) { - d.id = o.bytes === String ? $util.base64.encode(m.id, 0, m.id.length) : o.bytes === Array ? Array.prototype.slice.call(m.id) : m.id; - } - if (m.pubKey != null && m.hasOwnProperty("pubKey")) { - d.pubKey = o.bytes === String ? $util.base64.encode(m.pubKey, 0, m.pubKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.pubKey) : m.pubKey; - } - if (m.privKey != null && m.hasOwnProperty("privKey")) { - d.privKey = o.bytes === String ? $util.base64.encode(m.privKey, 0, m.privKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.privKey) : m.privKey; - } - return d; - }; +const protons_runtime_node_modules_multiformats_src_bases_base32_base32hexupper = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) - /** - * Converts this PeerIdProto to JSON. - * @function toJSON - * @memberof PeerIdProto - * @instance - * @returns {Object.} JSON object - */ - PeerIdProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; +const protons_runtime_node_modules_multiformats_src_bases_base32_base32hexpad = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) - return PeerIdProto; -})(); +const protons_runtime_node_modules_multiformats_src_bases_base32_base32hexpadupper = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) -module.exports = $root; +const protons_runtime_node_modules_multiformats_src_bases_base32_base32z = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base36.js -/***/ }), -/***/ 63616: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const protons_runtime_node_modules_multiformats_src_bases_base36_base36 = protons_runtime_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}) -"use strict"; -// minimal library entry point. +const protons_runtime_node_modules_multiformats_src_bases_base36_base36upper = protons_runtime_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}) +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base58.js -module.exports = __nccwpck_require__(18828); +const protons_runtime_node_modules_multiformats_src_bases_base58_base58btc = protons_runtime_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) -/***/ }), +const protons_runtime_node_modules_multiformats_src_bases_base58_base58flickr = protons_runtime_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) -/***/ 18828: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base64.js +// @ts-check -"use strict"; -var protobuf = exports; -/** - * Build type, one of `"full"`, `"light"` or `"minimal"`. - * @name build - * @type {string} - * @const - */ -protobuf.build = "minimal"; +const protons_runtime_node_modules_multiformats_src_bases_base64_base64 = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) -// Serialization -protobuf.Writer = __nccwpck_require__(64693); -protobuf.BufferWriter = __nccwpck_require__(42788); -protobuf.Reader = __nccwpck_require__(37994); -protobuf.BufferReader = __nccwpck_require__(18940); +const protons_runtime_node_modules_multiformats_src_bases_base64_base64pad = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) -// Utility -protobuf.util = __nccwpck_require__(39807); -protobuf.rpc = __nccwpck_require__(46688); -protobuf.roots = __nccwpck_require__(20563); -protobuf.configure = configure; +const protons_runtime_node_modules_multiformats_src_bases_base64_base64url = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) -/* istanbul ignore next */ -/** - * Reconfigures the library according to the environment. - * @returns {undefined} - */ -function configure() { - protobuf.util._configure(); - protobuf.Writer._configure(protobuf.BufferWriter); - protobuf.Reader._configure(protobuf.BufferReader); -} +const protons_runtime_node_modules_multiformats_src_bases_base64_base64urlpad = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) -// Set up buffer utility according to the environment -configure(); +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/base8.js +// @ts-check -/***/ }), -/***/ 37994: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const protons_runtime_node_modules_multiformats_src_bases_base8_base8 = protons_runtime_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}) -"use strict"; +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/bases/identity.js +// @ts-check -module.exports = Reader; -var util = __nccwpck_require__(39807); -var BufferReader; // cyclic -var LongBits = util.LongBits, - utf8 = util.utf8; +const protons_runtime_node_modules_multiformats_src_bases_identity_identity = protons_runtime_node_modules_multiformats_src_bases_base_from({ + prefix: '\x00', + name: 'identity', + encode: (buf) => protons_runtime_node_modules_multiformats_src_bytes_toString(buf), + decode: (str) => protons_runtime_node_modules_multiformats_src_bytes_fromString(str) +}) -/* istanbul ignore next */ -function indexOutOfRange(reader, writeLength) { - return RangeError("index out of range: " + reader.pos + " + " + (writeLength || 1) + " > " + reader.len); -} +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/codecs/json.js +// @ts-check /** - * Constructs a new reader instance using the specified buffer. - * @classdesc Wire format reader using `Uint8Array` if available, otherwise `Array`. - * @constructor - * @param {Uint8Array} buffer Buffer to read from + * @template T + * @typedef {import('./interface.js').ByteView} ByteView */ -function Reader(buffer) { - - /** - * Read buffer. - * @type {Uint8Array} - */ - this.buf = buffer; - - /** - * Read buffer position. - * @type {number} - */ - this.pos = 0; - /** - * Read buffer length. - * @type {number} - */ - this.len = buffer.length; -} +const protons_runtime_node_modules_multiformats_src_codecs_json_textEncoder = new TextEncoder() +const protons_runtime_node_modules_multiformats_src_codecs_json_textDecoder = new TextDecoder() -var create_array = typeof Uint8Array !== "undefined" - ? function create_typed_array(buffer) { - if (buffer instanceof Uint8Array || Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - } - /* istanbul ignore next */ - : function create_array(buffer) { - if (Array.isArray(buffer)) - return new Reader(buffer); - throw Error("illegal buffer"); - }; +const protons_runtime_node_modules_multiformats_src_codecs_json_name = 'json' +const protons_runtime_node_modules_multiformats_src_codecs_json_code = 0x0200 -var create = function create() { - return util.Buffer - ? function create_buffer_setup(buffer) { - return (Reader.create = function create_buffer(buffer) { - return util.Buffer.isBuffer(buffer) - ? new BufferReader(buffer) - /* istanbul ignore next */ - : create_array(buffer); - })(buffer); - } - /* istanbul ignore next */ - : create_array; -}; +/** + * @template T + * @param {T} node + * @returns {ByteView} + */ +const protons_runtime_node_modules_multiformats_src_codecs_json_encode = (node) => protons_runtime_node_modules_multiformats_src_codecs_json_textEncoder.encode(JSON.stringify(node)) /** - * Creates a new reader using the specified buffer. - * @function - * @param {Uint8Array|Buffer} buffer Buffer to read from - * @returns {Reader|BufferReader} A {@link BufferReader} if `buffer` is a Buffer, otherwise a {@link Reader} - * @throws {Error} If `buffer` is not a valid buffer + * @template T + * @param {ByteView} data + * @returns {T} */ -Reader.create = create(); +const protons_runtime_node_modules_multiformats_src_codecs_json_decode = (data) => JSON.parse(protons_runtime_node_modules_multiformats_src_codecs_json_textDecoder.decode(data)) + +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/codecs/raw.js +// @ts-check + -Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */ util.Array.prototype.slice; /** - * Reads a varint as an unsigned 32 bit value. - * @function - * @returns {number} Value read + * @template T + * @typedef {import('./interface.js').ByteView} ByteView */ -Reader.prototype.uint32 = (function read_uint32_setup() { - var value = 4294967295; // optimizer type-hint, tends to deopt otherwise (?!) - return function read_uint32() { - value = ( this.buf[this.pos] & 127 ) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 7) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 14) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 127) << 21) >>> 0; if (this.buf[this.pos++] < 128) return value; - value = (value | (this.buf[this.pos] & 15) << 28) >>> 0; if (this.buf[this.pos++] < 128) return value; - /* istanbul ignore if */ - if ((this.pos += 5) > this.len) { - this.pos = this.len; - throw indexOutOfRange(this, 10); - } - return value; - }; -})(); +const protons_runtime_node_modules_multiformats_src_codecs_raw_name = 'raw' +const protons_runtime_node_modules_multiformats_src_codecs_raw_code = 0x55 /** - * Reads a varint as a signed 32 bit value. - * @returns {number} Value read + * @param {Uint8Array} node + * @returns {ByteView} */ -Reader.prototype.int32 = function read_int32() { - return this.uint32() | 0; -}; +const protons_runtime_node_modules_multiformats_src_codecs_raw_encode = (node) => protons_runtime_node_modules_multiformats_src_bytes_coerce(node) /** - * Reads a zig-zag encoded varint as a signed 32 bit value. - * @returns {number} Value read + * @param {ByteView} data + * @returns {Uint8Array} */ -Reader.prototype.sint32 = function read_sint32() { - var value = this.uint32(); - return value >>> 1 ^ -(value & 1) | 0; -}; +const protons_runtime_node_modules_multiformats_src_codecs_raw_decode = (data) => protons_runtime_node_modules_multiformats_src_bytes_coerce(data) -/* eslint-disable no-invalid-this */ +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/vendor/varint.js +var protons_runtime_node_modules_multiformats_vendor_varint_encode_1 = protons_runtime_node_modules_multiformats_vendor_varint_encode; -function readLongVarint() { - // tends to deopt with local vars for octet etc. - var bits = new LongBits(0, 0); - var i = 0; - if (this.len - this.pos > 4) { // fast route (lo) - for (; i < 4; ++i) { - // 1st..4th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 5th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << 28) >>> 0; - bits.hi = (bits.hi | (this.buf[this.pos] & 127) >> 4) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - i = 0; - } else { - for (; i < 3; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 1st..3th - bits.lo = (bits.lo | (this.buf[this.pos] & 127) << i * 7) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - // 4th - bits.lo = (bits.lo | (this.buf[this.pos++] & 127) << i * 7) >>> 0; - return bits; - } - if (this.len - this.pos > 4) { // fast route (hi) - for (; i < 5; ++i) { - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } - } else { - for (; i < 5; ++i) { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - // 6th..10th - bits.hi = (bits.hi | (this.buf[this.pos] & 127) << i * 7 + 3) >>> 0; - if (this.buf[this.pos++] < 128) - return bits; - } +var protons_runtime_node_modules_multiformats_vendor_varint_MSB = 0x80 + , protons_runtime_node_modules_multiformats_vendor_varint_REST = 0x7F + , protons_runtime_node_modules_multiformats_vendor_varint_MSBALL = ~protons_runtime_node_modules_multiformats_vendor_varint_REST + , protons_runtime_node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31); + +function protons_runtime_node_modules_multiformats_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + + while(num >= protons_runtime_node_modules_multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | protons_runtime_node_modules_multiformats_vendor_varint_MSB; + num /= 128; + } + while(num & protons_runtime_node_modules_multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | protons_runtime_node_modules_multiformats_vendor_varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + + protons_runtime_node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out +} + +var protons_runtime_node_modules_multiformats_vendor_varint_decode = protons_runtime_node_modules_multiformats_vendor_varint_read; + +var protons_runtime_node_modules_multiformats_vendor_varint_MSB$1 = 0x80 + , protons_runtime_node_modules_multiformats_vendor_varint_REST$1 = 0x7F; + +function protons_runtime_node_modules_multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; + + do { + if (counter >= l) { + protons_runtime_node_modules_multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') } - /* istanbul ignore next */ - throw Error("invalid varint encoding"); + b = buf[counter++]; + res += shift < 28 + ? (b & protons_runtime_node_modules_multiformats_vendor_varint_REST$1) << shift + : (b & protons_runtime_node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= protons_runtime_node_modules_multiformats_vendor_varint_MSB$1) + + protons_runtime_node_modules_multiformats_vendor_varint_read.bytes = counter - offset; + + return res } -/* eslint-enable no-invalid-this */ +var protons_runtime_node_modules_multiformats_vendor_varint_N1 = Math.pow(2, 7); +var protons_runtime_node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14); +var protons_runtime_node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21); +var protons_runtime_node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28); +var protons_runtime_node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35); +var protons_runtime_node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42); +var protons_runtime_node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49); +var protons_runtime_node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56); +var protons_runtime_node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63); + +var protons_runtime_node_modules_multiformats_vendor_varint_length = function (value) { + return ( + value < protons_runtime_node_modules_multiformats_vendor_varint_N1 ? 1 + : value < protons_runtime_node_modules_multiformats_vendor_varint_N2 ? 2 + : value < protons_runtime_node_modules_multiformats_vendor_varint_N3 ? 3 + : value < protons_runtime_node_modules_multiformats_vendor_varint_N4 ? 4 + : value < protons_runtime_node_modules_multiformats_vendor_varint_N5 ? 5 + : value < protons_runtime_node_modules_multiformats_vendor_varint_N6 ? 6 + : value < protons_runtime_node_modules_multiformats_vendor_varint_N7 ? 7 + : value < protons_runtime_node_modules_multiformats_vendor_varint_N8 ? 8 + : value < protons_runtime_node_modules_multiformats_vendor_varint_N9 ? 9 + : 10 + ) +}; + +var protons_runtime_node_modules_multiformats_vendor_varint_varint = { + encode: protons_runtime_node_modules_multiformats_vendor_varint_encode_1 + , decode: protons_runtime_node_modules_multiformats_vendor_varint_decode + , encodingLength: protons_runtime_node_modules_multiformats_vendor_varint_length +}; + +var protons_runtime_node_modules_multiformats_vendor_varint_brrp_varint = protons_runtime_node_modules_multiformats_vendor_varint_varint; + +/* harmony default export */ const protons_runtime_node_modules_multiformats_vendor_varint = (protons_runtime_node_modules_multiformats_vendor_varint_brrp_varint); + +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/varint.js + /** - * Reads a varint as a signed 64 bit value. - * @name Reader#int64 - * @function - * @returns {Long} Value read + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} */ +const protons_runtime_node_modules_multiformats_src_varint_decode = (data, offset = 0) => { + const code = varint.decode(data, offset) + return [code, varint.decode.bytes] +} /** - * Reads a varint as an unsigned 64 bit value. - * @name Reader#uint64 - * @function - * @returns {Long} Value read + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] */ +const protons_runtime_node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + protons_runtime_node_modules_multiformats_vendor_varint.encode(int, target, offset) + return target +} /** - * Reads a zig-zag encoded varint as a signed 64 bit value. - * @name Reader#sint64 - * @function - * @returns {Long} Value read + * @param {number} int + * @returns {number} */ +const protons_runtime_node_modules_multiformats_src_varint_encodingLength = (int) => { + return protons_runtime_node_modules_multiformats_vendor_varint.encodingLength(int) +} + +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/hashes/digest.js + + /** - * Reads a varint as a boolean. - * @returns {boolean} Value read + * Creates a multihash digest. + * + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest */ -Reader.prototype.bool = function read_bool() { - return this.uint32() !== 0; -}; +const protons_runtime_node_modules_multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = protons_runtime_node_modules_multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + protons_runtime_node_modules_multiformats_src_varint_encodingLength(size) -function readFixed32_end(buf, end) { // note that this uses `end`, not `pos` - return (buf[end - 4] - | buf[end - 3] << 8 - | buf[end - 2] << 16 - | buf[end - 1] << 24) >>> 0; + const bytes = new Uint8Array(digestOffset + size) + protons_runtime_node_modules_multiformats_src_varint_encodeTo(code, bytes, 0) + protons_runtime_node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) + + return new protons_runtime_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) } /** - * Reads fixed 32 bits as an unsigned 32 bit integer. - * @returns {number} Value read + * Turns bytes representation of multihash digest into an instance. + * + * @param {Uint8Array} multihash + * @returns {MultihashDigest} */ -Reader.prototype.fixed32 = function read_fixed32() { +const protons_runtime_node_modules_multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = coerce(multihash) + const [code, sizeOffset] = varint.decode(bytes) + const [size, digestOffset] = varint.decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); + if (digest.byteLength !== size) { + throw new Error('Incorrect length') + } - return readFixed32_end(this.buf, this.pos += 4); -}; + return new protons_runtime_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} /** - * Reads fixed 32 bits as a signed 32 bit integer. - * @returns {number} Value read + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} */ -Reader.prototype.sfixed32 = function read_sfixed32() { +const protons_runtime_node_modules_multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { + return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + equalBytes(a.bytes, data.bytes) + ) + } +} - return readFixed32_end(this.buf, this.pos += 4) | 0; -}; +/** + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest + */ -/* eslint-disable no-invalid-this */ +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + * + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} + */ +class protons_runtime_node_modules_multiformats_src_hashes_digest_Digest { + /** + * Creates a multihash digest. + * + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes + */ + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes + } +} -function readFixed64(/* this: Reader */) { +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/hashes/identity.js - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 8); - return new LongBits(readFixed32_end(this.buf, this.pos += 4), readFixed32_end(this.buf, this.pos += 4)); -} -/* eslint-enable no-invalid-this */ +const protons_runtime_node_modules_multiformats_src_hashes_identity_code = 0x0 +const protons_runtime_node_modules_multiformats_src_hashes_identity_name = 'identity' + +/** @type {(input:Uint8Array) => Uint8Array} */ +const protons_runtime_node_modules_multiformats_src_hashes_identity_encode = protons_runtime_node_modules_multiformats_src_bytes_coerce /** - * Reads fixed 64 bits. - * @name Reader#fixed64 - * @function - * @returns {Long} Value read + * @param {Uint8Array} input + * @returns {Digest.Digest} */ +const protons_runtime_node_modules_multiformats_src_hashes_identity_digest = (input) => protons_runtime_node_modules_multiformats_src_hashes_digest_create(protons_runtime_node_modules_multiformats_src_hashes_identity_code, protons_runtime_node_modules_multiformats_src_hashes_identity_encode(input)) + +const protons_runtime_node_modules_multiformats_src_hashes_identity_identity = { code: protons_runtime_node_modules_multiformats_src_hashes_identity_code, name: protons_runtime_node_modules_multiformats_src_hashes_identity_name, encode: protons_runtime_node_modules_multiformats_src_hashes_identity_encode, digest: protons_runtime_node_modules_multiformats_src_hashes_identity_digest } + +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/hashes/hasher.js + /** - * Reads zig-zag encoded fixed 64 bits. - * @name Reader#sfixed64 - * @function - * @returns {Long} Value read + * @template {string} Name + * @template {number} Code + * @param {object} options + * @param {Name} options.name + * @param {Code} options.code + * @param {(input: Uint8Array) => Await} options.encode */ +const protons_runtime_node_modules_multiformats_src_hashes_hasher_from = ({ name, code, encode }) => new protons_runtime_node_modules_multiformats_src_hashes_hasher_Hasher(name, code, encode) /** - * Reads a float (32 bit) as a number. - * @function - * @returns {number} Value read + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. + * + * @template {string} Name + * @template {number} Code + * @class + * @implements {MultihashHasher} */ -Reader.prototype.float = function read_float() { +class protons_runtime_node_modules_multiformats_src_hashes_hasher_Hasher { + /** + * + * @param {Name} name + * @param {Code} code + * @param {(input: Uint8Array) => Await} encode + */ + constructor (name, code, encode) { + this.name = name + this.code = code + this.encode = encode + } - /* istanbul ignore if */ - if (this.pos + 4 > this.len) - throw indexOutOfRange(this, 4); + /** + * @param {Uint8Array} input + * @returns {Await>} + */ + digest (input) { + if (input instanceof Uint8Array) { + const result = this.encode(input) + return result instanceof Uint8Array + ? protons_runtime_node_modules_multiformats_src_hashes_digest_create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => protons_runtime_node_modules_multiformats_src_hashes_digest_create(this.code, digest)) + } else { + throw Error('Unknown type, must be binary type') + /* c8 ignore next 1 */ + } + } +} - var value = util.float.readFloatLE(this.buf, this.pos); - this.pos += 4; - return value; -}; +/** + * @template {number} Alg + * @typedef {import('./interface.js').MultihashHasher} MultihashHasher + */ /** - * Reads a double (64 bit float) as a number. - * @function - * @returns {number} Value read + * @template T + * @typedef {Promise|T} Await */ -Reader.prototype.double = function read_double() { - /* istanbul ignore if */ - if (this.pos + 8 > this.len) - throw indexOutOfRange(this, 4); +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/hashes/sha2.js +// @ts-check + + + + + +const protons_runtime_node_modules_multiformats_src_hashes_sha2_sha256 = protons_runtime_node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-256', + code: 0x12, + encode: (input) => protons_runtime_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha256').update(input).digest()) +}) + +const protons_runtime_node_modules_multiformats_src_hashes_sha2_sha512 = protons_runtime_node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-512', + code: 0x13, + encode: input => protons_runtime_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha512').update(input).digest()) +}) + +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/cid.js + + + + +// Linter can see that API is used in types. +// eslint-disable-next-line + + + +// This way TS will also expose all the types from module - var value = util.float.readDoubleLE(this.buf, this.pos); - this.pos += 8; - return value; -}; /** - * Reads a sequence of bytes preceeded by its length as a varint. - * @returns {Uint8Array} Value read + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} */ -Reader.prototype.bytes = function read_bytes() { - var length = this.uint32(), - start = this.pos, - end = this.pos + length; - - /* istanbul ignore if */ - if (end > this.len) - throw indexOutOfRange(this, length); +const protons_runtime_node_modules_multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return protons_runtime_node_modules_multiformats_src_cid_toStringV0( + bytes, + protons_runtime_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || base58btc.encoder + ) + default: + return protons_runtime_node_modules_multiformats_src_cid_toStringV1( + bytes, + protons_runtime_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || base32.encoder) + ) + } +} - this.pos += length; - if (Array.isArray(this.buf)) // plain array - return this.buf.slice(start, end); - return start === end // fix for IE 10/Win8 and others' subarray returning array of size 1 - ? new this.buf.constructor(0) - : this._slice.call(this.buf, start, end); -}; +/** + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} + */ +const protons_runtime_node_modules_multiformats_src_cid_toJSON = (link) => ({ + '/': protons_runtime_node_modules_multiformats_src_cid_format(link) +}) /** - * Reads a string preceeded by its byte length as a varint. - * @returns {string} Value read + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json */ -Reader.prototype.string = function read_string() { - var bytes = this.bytes(); - return utf8.read(bytes, 0, bytes.length); -}; +const protons_runtime_node_modules_multiformats_src_cid_fromJSON = (json) => + protons_runtime_node_modules_multiformats_src_cid_CID.parse(json['/']) + +/** @type {WeakMap>} */ +const protons_runtime_node_modules_multiformats_src_cid_cache = new WeakMap() /** - * Skips the specified number of bytes if specified, otherwise skips a varint. - * @param {number} [length] Length if known, otherwise a varint is assumed - * @returns {Reader} `this` + * @param {API.UnknownLink} cid + * @returns {Map} */ -Reader.prototype.skip = function skip(length) { - if (typeof length === "number") { - /* istanbul ignore if */ - if (this.pos + length > this.len) - throw indexOutOfRange(this, length); - this.pos += length; - } else { - do { - /* istanbul ignore if */ - if (this.pos >= this.len) - throw indexOutOfRange(this); - } while (this.buf[this.pos++] & 128); - } - return this; -}; +const protons_runtime_node_modules_multiformats_src_cid_baseCache = cid => { + const baseCache = protons_runtime_node_modules_multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + protons_runtime_node_modules_multiformats_src_cid_cache.set(cid, baseCache) + return baseCache + } + return baseCache +} /** - * Skips the next element of the specified wire type. - * @param {number} wireType Wire type received - * @returns {Reader} `this` + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} */ -Reader.prototype.skipType = function(wireType) { - switch (wireType) { - case 0: - this.skip(); - break; - case 1: - this.skip(8); - break; - case 2: - this.skip(this.uint32()); - break; - case 3: - while ((wireType = this.uint32() & 7) !== 4) { - this.skipType(wireType); - } - break; - case 5: - this.skip(4); - break; - /* istanbul ignore next */ - default: - throw Error("invalid wire type " + wireType + " at offset " + this.pos); +class protons_runtime_node_modules_multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes + + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes + } + + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this + } + + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset + } + + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } + + /** + * @returns {CID} + */ + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) + } + case 1: { + const { code, multihash } = this + + if (code !== protons_runtime_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } + + // sha2-256 + if (multihash.code !== protons_runtime_node_modules_multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') + } + + return /** @type {CID} */ ( + protons_runtime_node_modules_multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) + } } - return this; -}; + } -Reader._configure = function(BufferReader_) { - BufferReader = BufferReader_; - Reader.create = create(); - BufferReader._configure(); + /** + * @returns {CID} + */ + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = Digest.create(code, digest) + return /** @type {CID} */ ( + protons_runtime_node_modules_multiformats_src_cid_CID.createV1(this.code, multihash) + ) + } + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) + } + } + } - var fn = util.Long ? "toLong" : /* istanbul ignore next */ "toNumber"; - util.merge(Reader.prototype, { + /** + * @param {unknown} other + * @returns {other is CID} + */ + equals (other) { + return protons_runtime_node_modules_multiformats_src_cid_CID.equals(this, other) + } - int64: function read_int64() { - return readLongVarint.call(this)[fn](false); - }, + /** + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} + */ + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + Digest.equals(self.multihash, unknown.multihash) + ) + } - uint64: function read_uint64() { - return readLongVarint.call(this)[fn](true); - }, + /** + * @param {API.MultibaseEncoder} [base] + * @returns {string} + */ + toString (base) { + return protons_runtime_node_modules_multiformats_src_cid_format(this, base) + } - sint64: function read_sint64() { - return readLongVarint.call(this).zzDecode()[fn](false); - }, + /** + * @returns {API.LinkJSON} + */ + toJSON () { + return { '/': protons_runtime_node_modules_multiformats_src_cid_format(this) } + } - fixed64: function read_fixed64() { - return readFixed64.call(this)[fn](true); - }, + link () { + return this + } - sfixed64: function read_sfixed64() { - return readFixed64.call(this)[fn](false); + get [Symbol.toStringTag] () { + return 'CID' + } + + // Legacy + + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` + } + + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} + */ + static asCID (input) { + if (input == null) { + return null + } + + const value = /** @type {any} */ (input) + if (value instanceof protons_runtime_node_modules_multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new protons_runtime_node_modules_multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || protons_runtime_node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[protons_runtime_node_modules_multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (Digest.decode(multihash)) + return protons_runtime_node_modules_multiformats_src_cid_CID.create(version, code, digest) + } else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null + } + } + + /** + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} + */ + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') + } + + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } + + switch (version) { + case 0: { + if (code !== protons_runtime_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${protons_runtime_node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new protons_runtime_node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes) } + } + case 1: { + const bytes = protons_runtime_node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new protons_runtime_node_modules_multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') + } + } + } - }); -}; + /** + * Simplified version of `create` for CIDv0. + * + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} + */ + static createV0 (digest) { + return protons_runtime_node_modules_multiformats_src_cid_CID.create(0, protons_runtime_node_modules_multiformats_src_cid_DAG_PB_CODE, digest) + } + /** + * Simplified version of `create` for CIDv1. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} + */ + static createV1 (code, digest) { + return protons_runtime_node_modules_multiformats_src_cid_CID.create(1, code, digest) + } -/***/ }), + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} + */ + static decode (bytes) { + const [cid, remainder] = protons_runtime_node_modules_multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') + } + return cid + } -/***/ 18940: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} + */ + static decodeFirst (bytes) { + const specs = protons_runtime_node_modules_multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') + } + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new Digest.Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? protons_runtime_node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : protons_runtime_node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] + } -"use strict"; + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} + */ + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = varint.decode(initialBytes.subarray(offset)) + offset += length + return i + } -module.exports = BufferReader; + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (protons_runtime_node_modules_multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 + } else { + codec = /** @type {C} */ (next()) + } -// extends Reader -var Reader = __nccwpck_require__(37994); -(BufferReader.prototype = Object.create(Reader.prototype)).constructor = BufferReader; + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } -var util = __nccwpck_require__(39807); + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize + + return { version, codec, multihashCode, digestSize, multihashSize, size } + } + + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + * + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} + */ + static parse (source, base) { + const [prefix, bytes] = protons_runtime_node_modules_multiformats_src_cid_parseCIDtoBytes(source, base) + + const cid = protons_runtime_node_modules_multiformats_src_cid_CID.decode(bytes) + + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') + } + + // Cache string representation to avoid computing it on `this.toString()` + protons_runtime_node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source) + + return cid + } +} /** - * Constructs a new buffer reader instance. - * @classdesc Wire format reader using node buffers. - * @extends Reader - * @constructor - * @param {Buffer} buffer Buffer to read from + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} */ -function BufferReader(buffer) { - Reader.call(this, buffer); - - /** - * Read buffer. - * @name BufferReader#buf - * @type {Buffer} - */ +const protons_runtime_node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || base58btc + return [ + /** @type {Prefix} */ (base58btc.prefix), + decoder.decode(`${base58btc.prefix}${source}`) + ] + } + case base58btc.prefix: { + const decoder = base || base58btc + return [/** @type {Prefix} */(base58btc.prefix), decoder.decode(source)] + } + case base32.prefix: { + const decoder = base || base32 + return [/** @type {Prefix} */(base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) + } + return [/** @type {Prefix} */(source[0]), base.decode(source)] + } + } } -BufferReader._configure = function () { - /* istanbul ignore else */ - if (util.Buffer) - BufferReader.prototype._slice = util.Buffer.prototype.slice; -}; +/** + * + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base + */ +const protons_runtime_node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) + } + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} /** - * @override + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base */ -BufferReader.prototype.string = function read_string_buffer() { - var len = this.uint32(); // modifies pos - return this.buf.utf8Slice - ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + len, this.len)) - : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + len, this.len)); -}; +const protons_runtime_node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid + } else { + return cid + } +} + +const protons_runtime_node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70 +const protons_runtime_node_modules_multiformats_src_cid_SHA_256_CODE = 0x12 /** - * Reads a sequence of bytes preceeded by its length as a varint. - * @name BufferReader#bytes - * @function - * @returns {Buffer} Value read + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} */ +const protons_runtime_node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = varint.encodingLength(version) + const hashOffset = codeOffset + varint.encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + varint.encodeTo(version, bytes, 0) + varint.encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes +} -BufferReader._configure(); +const protons_runtime_node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/index.js -/***/ }), -/***/ 20563: -/***/ ((module) => { -"use strict"; -module.exports = {}; -/** - * Named roots. - * This is where pbjs stores generated structures (the option `-r, --root` specifies a name). - * Can also be used manually to make roots available accross modules. - * @name roots - * @type {Object.} - * @example - * // pbjs -r myroot -o compiled.js ... - * - * // in another module: - * require("./compiled.js"); - * - * // in any subsequent module: - * var root = protobuf.roots["myroot"]; - */ +// This way TS will also expose all the types from module -/***/ }), -/***/ 46688: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/multiformats/src/basics.js +// @ts-check + + + + + + + + + + + + + + + + + +const protons_runtime_node_modules_multiformats_src_basics_bases = { ...protons_runtime_node_modules_multiformats_src_bases_identity_namespaceObject, ...protons_runtime_node_modules_multiformats_src_bases_base2_namespaceObject, ...protons_runtime_node_modules_multiformats_src_bases_base8_namespaceObject, ...protons_runtime_node_modules_multiformats_src_bases_base10_namespaceObject, ...protons_runtime_node_modules_multiformats_src_bases_base16_namespaceObject, ...protons_runtime_node_modules_multiformats_src_bases_base32_namespaceObject, ...protons_runtime_node_modules_multiformats_src_bases_base36_namespaceObject, ...protons_runtime_node_modules_multiformats_src_bases_base58_namespaceObject, ...protons_runtime_node_modules_multiformats_src_bases_base64_namespaceObject, ...protons_runtime_node_modules_multiformats_src_bases_base256emoji_namespaceObject } +const protons_runtime_node_modules_multiformats_src_basics_hashes = { ...protons_runtime_node_modules_multiformats_src_hashes_sha2_namespaceObject, ...protons_runtime_node_modules_multiformats_src_hashes_identity_namespaceObject } +const protons_runtime_node_modules_multiformats_src_basics_codecs = { raw: protons_runtime_node_modules_multiformats_src_codecs_raw_namespaceObject, json: protons_runtime_node_modules_multiformats_src_codecs_json_namespaceObject } + + + +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/uint8arrays/dist/src/util/bases.js + + +function src_util_bases_createCodec(name, prefix, encode, decode) { + return { + name, + prefix, + encoder: { + name, + prefix, + encode + }, + decoder: { + decode + } + }; +} +const src_util_bases_string = src_util_bases_createCodec('utf8', 'u', (buf) => { + const decoder = new TextDecoder('utf8'); + return 'u' + decoder.decode(buf); +}, (str) => { + const encoder = new TextEncoder(); + return encoder.encode(str.substring(1)); +}); +const src_util_bases_ascii = src_util_bases_createCodec('ascii', 'a', (buf) => { + let string = 'a'; + for (let i = 0; i < buf.length; i++) { + string += String.fromCharCode(buf[i]); + } + return string; +}, (str) => { + str = str.substring(1); + const buf = node_modules_uint8arrays_dist_src_alloc_allocUnsafe(str.length); + for (let i = 0; i < str.length; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}); +const src_util_bases_BASES = { + utf8: src_util_bases_string, + 'utf-8': src_util_bases_string, + hex: protons_runtime_node_modules_multiformats_src_basics_bases.base16, + latin1: src_util_bases_ascii, + ascii: src_util_bases_ascii, + binary: src_util_bases_ascii, + ...protons_runtime_node_modules_multiformats_src_basics_bases +}; +/* harmony default export */ const uint8arrays_dist_src_util_bases = (src_util_bases_BASES); +//# sourceMappingURL=bases.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/node_modules/uint8arrays/dist/src/from-string.js -/** - * Streaming RPC helpers. - * @namespace - */ -var rpc = exports; /** - * RPC implementation passed to {@link Service#create} performing a service request on network level, i.e. by utilizing http requests or websockets. - * @typedef RPCImpl - * @type {function} - * @param {Method|rpc.ServiceMethod,Message<{}>>} method Reflected or static method being called - * @param {Uint8Array} requestData Request data - * @param {RPCImplCallback} callback Callback function - * @returns {undefined} - * @example - * function rpcImpl(method, requestData, callback) { - * if (protobuf.util.lcFirst(method.name) !== "myMethod") // compatible with static code - * throw Error("no such method"); - * asynchronouslyObtainAResponse(requestData, function(err, responseData) { - * callback(err, responseData); - * }); - * } + * Create a `Uint8Array` from the passed string + * + * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module. + * + * Also `ascii` which is similar to node's 'binary' encoding. */ +function uint8arrays_dist_src_from_string_fromString(string, encoding = 'utf8') { + const base = uint8arrays_dist_src_util_bases[encoding]; + if (base == null) { + throw new Error(`Unsupported encoding "${encoding}"`); + } + if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) { + return node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.from(string, 'utf-8')); + } + // add multibase prefix + return base.decoder.decode(`${base.prefix}${string}`); // eslint-disable-line @typescript-eslint/restrict-template-expressions +} +//# sourceMappingURL=from-string.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/utils/pool.js /** - * Node-style callback as used by {@link RPCImpl}. - * @typedef RPCImplCallback - * @type {function} - * @param {Error|null} error Error, if any, otherwise `null` - * @param {Uint8Array|null} [response] Response data or `null` to signal end of stream, if there hasn't been an error - * @returns {undefined} + * A general purpose buffer pool */ +function pool_pool(size) { + const SIZE = size ?? 8192; + const MAX = SIZE >>> 1; + let slab; + let offset = SIZE; + return function poolAlloc(size) { + if (size < 1 || size > MAX) { + return node_modules_uint8arrays_dist_src_alloc_allocUnsafe(size); + } + if (offset + size > SIZE) { + slab = node_modules_uint8arrays_dist_src_alloc_allocUnsafe(SIZE); + offset = 0; + } + const buf = slab.subarray(offset, offset += size); + if ((offset & 7) !== 0) { + // align to 32 bit + offset = (offset | 7) + 1; + } + return buf; + }; +} +//# sourceMappingURL=pool.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/utils/writer.js -rpc.Service = __nccwpck_require__(80063); - - -/***/ }), - -/***/ 80063: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -module.exports = Service; -var util = __nccwpck_require__(39807); -// Extends EventEmitter -(Service.prototype = Object.create(util.EventEmitter.prototype)).constructor = Service; /** - * A service method callback as used by {@link rpc.ServiceMethod|ServiceMethod}. + * Constructs a new writer operation instance. + * + * @classdesc Scheduled writer operation + */ +class Op { + /** + * Function to call + */ + fn; + /** + * Value byte length + */ + len; + /** + * Next operation + */ + next; + /** + * Value to write + */ + val; + constructor(fn, len, val) { + this.fn = fn; + this.len = len; + this.next = undefined; + this.val = val; // type varies + } +} +/* istanbul ignore next */ +function writer_noop() { } // eslint-disable-line no-empty-function +/** + * Constructs a new writer state instance + */ +class State { + /** + * Current head + */ + head; + /** + * Current tail + */ + tail; + /** + * Current buffer length + */ + len; + /** + * Next state + */ + next; + constructor(writer) { + this.head = writer.head; + this.tail = writer.tail; + this.len = writer.len; + this.next = writer.states; + } +} +const bufferPool = pool_pool(); +/** + * Allocates a buffer of the specified size + */ +function writer_alloc(size) { + if (globalThis.Buffer != null) { + return node_modules_uint8arrays_dist_src_alloc_allocUnsafe(size); + } + return bufferPool(size); +} +/** + * When a value is written, the writer calculates its byte length and puts it into a linked + * list of operations to perform when finish() is called. This both allows us to allocate + * buffers of the exact required size and reduces the amount of work we have to do compared + * to first calculating over objects and then encoding over objects. In our case, the encoding + * part is just a linked list walk calling operations with already prepared values. + */ +class Uint8ArrayWriter { + /** + * Current length + */ + len; + /** + * Operations head + */ + head; + /** + * Operations tail + */ + tail; + /** + * Linked forked states + */ + states; + constructor() { + this.len = 0; + this.head = new Op(writer_noop, 0, 0); + this.tail = this.head; + this.states = null; + } + /** + * Pushes a new operation to the queue + */ + _push(fn, len, val) { + this.tail = this.tail.next = new Op(fn, len, val); + this.len += len; + return this; + } + /** + * Writes an unsigned 32 bit value as a varint + */ + uint32(value) { + // here, the call to this.push has been inlined and a varint specific Op subclass is used. + // uint32 is by far the most frequently used operation and benefits significantly from this. + this.len += (this.tail = this.tail.next = new VarintOp((value = value >>> 0) < + 128 + ? 1 + : value < 16384 + ? 2 + : value < 2097152 + ? 3 + : value < 268435456 + ? 4 + : 5, value)).len; + return this; + } + /** + * Writes a signed 32 bit value as a varint` + */ + int32(value) { + return value < 0 + ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec + : this.uint32(value); + } + /** + * Writes a 32 bit value as a varint, zig-zag encoded + */ + sint32(value) { + return this.uint32((value << 1 ^ value >> 31) >>> 0); + } + /** + * Writes an unsigned 64 bit value as a varint + */ + uint64(value) { + const bits = LongBits.fromBigInt(value); + return this._push(writeVarint64, bits.length(), bits); + } + /** + * Writes an unsigned 64 bit value as a varint + */ + uint64Number(value) { + const bits = LongBits.fromNumber(value); + return this._push(writeVarint64, bits.length(), bits); + } + /** + * Writes an unsigned 64 bit value as a varint + */ + uint64String(value) { + return this.uint64(BigInt(value)); + } + /** + * Writes a signed 64 bit value as a varint + */ + int64(value) { + return this.uint64(value); + } + /** + * Writes a signed 64 bit value as a varint + */ + int64Number(value) { + return this.uint64Number(value); + } + /** + * Writes a signed 64 bit value as a varint + */ + int64String(value) { + return this.uint64String(value); + } + /** + * Writes a signed 64 bit value as a varint, zig-zag encoded + */ + sint64(value) { + const bits = LongBits.fromBigInt(value).zzEncode(); + return this._push(writeVarint64, bits.length(), bits); + } + /** + * Writes a signed 64 bit value as a varint, zig-zag encoded + */ + sint64Number(value) { + const bits = LongBits.fromNumber(value).zzEncode(); + return this._push(writeVarint64, bits.length(), bits); + } + /** + * Writes a signed 64 bit value as a varint, zig-zag encoded + */ + sint64String(value) { + return this.sint64(BigInt(value)); + } + /** + * Writes a boolish value as a varint + */ + bool(value) { + return this._push(writeByte, 1, value ? 1 : 0); + } + /** + * Writes an unsigned 32 bit value as fixed 32 bits + */ + fixed32(value) { + return this._push(writeFixed32, 4, value >>> 0); + } + /** + * Writes a signed 32 bit value as fixed 32 bits + */ + sfixed32(value) { + return this.fixed32(value); + } + /** + * Writes an unsigned 64 bit value as fixed 64 bits + */ + fixed64(value) { + const bits = LongBits.fromBigInt(value); + return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); + } + /** + * Writes an unsigned 64 bit value as fixed 64 bits + */ + fixed64Number(value) { + const bits = LongBits.fromNumber(value); + return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); + } + /** + * Writes an unsigned 64 bit value as fixed 64 bits + */ + fixed64String(value) { + return this.fixed64(BigInt(value)); + } + /** + * Writes a signed 64 bit value as fixed 64 bits + */ + sfixed64(value) { + return this.fixed64(value); + } + /** + * Writes a signed 64 bit value as fixed 64 bits + */ + sfixed64Number(value) { + return this.fixed64Number(value); + } + /** + * Writes a signed 64 bit value as fixed 64 bits + */ + sfixed64String(value) { + return this.fixed64String(value); + } + /** + * Writes a float (32 bit) + */ + float(value) { + return this._push(writeFloatLE, 4, value); + } + /** + * Writes a double (64 bit float). + * + * @function + * @param {number} value - Value to write + * @returns {Writer} `this` + */ + double(value) { + return this._push(writeDoubleLE, 8, value); + } + /** + * Writes a sequence of bytes + */ + bytes(value) { + const len = value.length >>> 0; + if (len === 0) { + return this._push(writeByte, 1, 0); + } + return this.uint32(len)._push(writer_writeBytes, len, value); + } + /** + * Writes a string + */ + string(value) { + const len = utf8_length(value); + return len !== 0 + ? this.uint32(len)._push(write, len, value) + : this._push(writeByte, 1, 0); + } + /** + * Forks this writer's state by pushing it to a stack. + * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. + */ + fork() { + this.states = new State(this); + this.head = this.tail = new Op(writer_noop, 0, 0); + this.len = 0; + return this; + } + /** + * Resets this instance to the last state + */ + reset() { + if (this.states != null) { + this.head = this.states.head; + this.tail = this.states.tail; + this.len = this.states.len; + this.states = this.states.next; + } + else { + this.head = this.tail = new Op(writer_noop, 0, 0); + this.len = 0; + } + return this; + } + /** + * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. + */ + ldelim() { + const head = this.head; + const tail = this.tail; + const len = this.len; + this.reset().uint32(len); + if (len !== 0) { + this.tail.next = head.next; // skip noop + this.tail = tail; + this.len += len; + } + return this; + } + /** + * Finishes the write operation + */ + finish() { + let head = this.head.next; // skip noop + const buf = writer_alloc(this.len); + let pos = 0; + while (head != null) { + head.fn(head.val, buf, pos); + pos += head.len; + head = head.next; + } + // this.head = this.tail = null; + return buf; + } +} +function writeByte(val, buf, pos) { + buf[pos] = val & 255; +} +function writeVarint32(val, buf, pos) { + while (val > 127) { + buf[pos++] = val & 127 | 128; + val >>>= 7; + } + buf[pos] = val; +} +/** + * Constructs a new varint writer operation instance. * - * Differs from {@link RPCImplCallback} in that it is an actual callback of a service method which may not return `response = null`. - * @typedef rpc.ServiceMethodCallback - * @template TRes extends Message - * @type {function} - * @param {Error|null} error Error, if any - * @param {TRes} [response] Response message - * @returns {undefined} - */ - -/** - * A service method part of a {@link rpc.Service} as created by {@link Service.create}. - * @typedef rpc.ServiceMethod - * @template TReq extends Message - * @template TRes extends Message - * @type {function} - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} [callback] Node-style callback called with the error, if any, and the response message - * @returns {Promise>} Promise if `callback` has been omitted, otherwise `undefined` + * @classdesc Scheduled varint writer operation */ - +class VarintOp extends Op { + next; + constructor(len, val) { + super(writeVarint32, len, val); + this.next = undefined; + } +} +function writeVarint64(val, buf, pos) { + while (val.hi !== 0) { + buf[pos++] = val.lo & 127 | 128; + val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; + val.hi >>>= 7; + } + while (val.lo > 127) { + buf[pos++] = val.lo & 127 | 128; + val.lo = val.lo >>> 7; + } + buf[pos++] = val.lo; +} +function writeFixed32(val, buf, pos) { + buf[pos] = val & 255; + buf[pos + 1] = val >>> 8 & 255; + buf[pos + 2] = val >>> 16 & 255; + buf[pos + 3] = val >>> 24; +} +function writer_writeBytes(val, buf, pos) { + buf.set(val, pos); +} +if (globalThis.Buffer != null) { + Uint8ArrayWriter.prototype.bytes = function (value) { + const len = value.length >>> 0; + this.uint32(len); + if (len > 0) { + this._push(writeBytesBuffer, len, value); + } + return this; + }; + Uint8ArrayWriter.prototype.string = function (value) { + const len = globalThis.Buffer.byteLength(value); + this.uint32(len); + if (len > 0) { + this._push(writeStringBuffer, len, value); + } + return this; + }; +} +function writeBytesBuffer(val, buf, pos) { + buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) + // also works for plain array values +} +function writeStringBuffer(val, buf, pos) { + if (val.length < 40) { + // plain js is faster for short strings (probably due to redundant assertions) + write(val, buf, pos); + // @ts-expect-error buf isn't a Uint8Array? + } + else if (buf.utf8Write != null) { + // @ts-expect-error buf isn't a Uint8Array? + buf.utf8Write(val, pos); + } + else { + buf.set(uint8arrays_dist_src_from_string_fromString(val), pos); + } +} /** - * Constructs a new RPC service instance. - * @classdesc An RPC service as returned by {@link Service#create}. - * @exports rpc.Service - * @extends util.EventEmitter - * @constructor - * @param {RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * Creates a new writer */ -function Service(rpcImpl, requestDelimited, responseDelimited) { - - if (typeof rpcImpl !== "function") - throw TypeError("rpcImpl must be a function"); - - util.EventEmitter.call(this); +function writer_createWriter() { + return new Uint8ArrayWriter(); +} +//# sourceMappingURL=writer.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/encode.js - /** - * RPC implementation. Becomes `null` once the service is ended. - * @type {RPCImpl|null} - */ - this.rpcImpl = rpcImpl; +function encodeMessage(message, codec) { + const w = writer_createWriter(); + codec.encode(message, w, { + lengthDelimited: false + }); + return w.finish(); +} +//# sourceMappingURL=encode.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/codec.js +// https://developers.google.com/protocol-buffers/docs/encoding#structure +var CODEC_TYPES; +(function (CODEC_TYPES) { + CODEC_TYPES[CODEC_TYPES["VARINT"] = 0] = "VARINT"; + CODEC_TYPES[CODEC_TYPES["BIT64"] = 1] = "BIT64"; + CODEC_TYPES[CODEC_TYPES["LENGTH_DELIMITED"] = 2] = "LENGTH_DELIMITED"; + CODEC_TYPES[CODEC_TYPES["START_GROUP"] = 3] = "START_GROUP"; + CODEC_TYPES[CODEC_TYPES["END_GROUP"] = 4] = "END_GROUP"; + CODEC_TYPES[CODEC_TYPES["BIT32"] = 5] = "BIT32"; +})(CODEC_TYPES || (CODEC_TYPES = {})); +function codec_createCodec(name, type, encode, decode) { + return { + name, + type, + encode, + decode + }; +} +//# sourceMappingURL=codec.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/codecs/enum.js - /** - * Whether requests are length-delimited. - * @type {boolean} - */ - this.requestDelimited = Boolean(requestDelimited); +function enumeration(v) { + function findValue(val) { + // Use the reverse mapping to look up the enum key for the stored value + // https://www.typescriptlang.org/docs/handbook/enums.html#reverse-mappings + if (v[val.toString()] == null) { + throw new Error('Invalid enum value'); + } + return v[val]; + } + const encode = function enumEncode(val, writer) { + const enumValue = findValue(val); + writer.int32(enumValue); + }; + const decode = function enumDecode(reader) { + const val = reader.int32(); + return findValue(val); + }; + // @ts-expect-error yeah yeah + return codec_createCodec('enum', CODEC_TYPES.VARINT, encode, decode); +} +//# sourceMappingURL=enum.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/codecs/message.js - /** - * Whether responses are length-delimited. - * @type {boolean} - */ - this.responseDelimited = Boolean(responseDelimited); +function message(encode, decode) { + return codec_createCodec('message', CODEC_TYPES.LENGTH_DELIMITED, encode, decode); } +//# sourceMappingURL=message.js.map +;// CONCATENATED MODULE: ./node_modules/protons-runtime/dist/src/index.js -/** - * Calls a service method through {@link rpc.Service#rpcImpl|rpcImpl}. - * @param {Method|rpc.ServiceMethod} method Reflected or static method - * @param {Constructor} requestCtor Request constructor - * @param {Constructor} responseCtor Response constructor - * @param {TReq|Properties} request Request message or plain object - * @param {rpc.ServiceMethodCallback} callback Service callback - * @returns {undefined} - * @template TReq extends Message - * @template TRes extends Message - */ -Service.prototype.rpcCall = function rpcCall(method, requestCtor, responseCtor, request, callback) { - if (!request) - throw TypeError("request must be specified"); - var self = this; - if (!callback) - return util.asPromise(rpcCall, self, method, requestCtor, responseCtor, request); - if (!self.rpcImpl) { - setTimeout(function() { callback(Error("already ended")); }, 0); - return undefined; - } - try { - return self.rpcImpl( - method, - requestCtor[self.requestDelimited ? "encodeDelimited" : "encode"](request).finish(), - function rpcCallback(err, response) { - if (err) { - self.emit("error", err, method); - return callback(err); +class src_CodeError extends Error { + code; + constructor(message, code, options) { + super(message, options); + this.code = code; + } +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs/dist/src/unixfs.js +/* eslint-disable import/export */ +/* eslint-disable complexity */ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */ +/* eslint-disable @typescript-eslint/no-empty-interface */ + +var unixfs_Data; +(function (Data) { + let DataType; + (function (DataType) { + DataType["Raw"] = "Raw"; + DataType["Directory"] = "Directory"; + DataType["File"] = "File"; + DataType["Metadata"] = "Metadata"; + DataType["Symlink"] = "Symlink"; + DataType["HAMTShard"] = "HAMTShard"; + })(DataType = Data.DataType || (Data.DataType = {})); + let __DataTypeValues; + (function (__DataTypeValues) { + __DataTypeValues[__DataTypeValues["Raw"] = 0] = "Raw"; + __DataTypeValues[__DataTypeValues["Directory"] = 1] = "Directory"; + __DataTypeValues[__DataTypeValues["File"] = 2] = "File"; + __DataTypeValues[__DataTypeValues["Metadata"] = 3] = "Metadata"; + __DataTypeValues[__DataTypeValues["Symlink"] = 4] = "Symlink"; + __DataTypeValues[__DataTypeValues["HAMTShard"] = 5] = "HAMTShard"; + })(__DataTypeValues || (__DataTypeValues = {})); + (function (DataType) { + DataType.codec = () => { + return enumeration(__DataTypeValues); + }; + })(DataType = Data.DataType || (Data.DataType = {})); + let _codec; + Data.codec = () => { + if (_codec == null) { + _codec = message((obj, w, opts = {}) => { + if (opts.lengthDelimited !== false) { + w.fork(); } - - if (response === null) { - self.end(/* endedByRPC */ true); - return undefined; + if (obj.Type != null) { + w.uint32(8); + Data.DataType.codec().encode(obj.Type, w); } - - if (!(response instanceof responseCtor)) { - try { - response = responseCtor[self.responseDelimited ? "decodeDelimited" : "decode"](response); - } catch (err) { - self.emit("error", err, method); - return callback(err); + if (obj.Data != null) { + w.uint32(18); + w.bytes(obj.Data); + } + if (obj.filesize != null) { + w.uint32(24); + w.uint64(obj.filesize); + } + if (obj.blocksizes != null) { + for (const value of obj.blocksizes) { + w.uint32(32); + w.uint64(value); } } - - self.emit("data", response, method); - return callback(null, response); + if (obj.hashType != null) { + w.uint32(40); + w.uint64(obj.hashType); + } + if (obj.fanout != null) { + w.uint32(48); + w.uint64(obj.fanout); + } + if (obj.mode != null) { + w.uint32(56); + w.uint32(obj.mode); + } + if (obj.mtime != null) { + w.uint32(66); + unixfs_UnixTime.codec().encode(obj.mtime, w); + } + if (opts.lengthDelimited !== false) { + w.ldelim(); + } + }, (reader, length) => { + const obj = { + blocksizes: [] + }; + const end = length == null ? reader.len : reader.pos + length; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + obj.Type = Data.DataType.codec().decode(reader); + break; + case 2: + obj.Data = reader.bytes(); + break; + case 3: + obj.filesize = reader.uint64(); + break; + case 4: + obj.blocksizes.push(reader.uint64()); + break; + case 5: + obj.hashType = reader.uint64(); + break; + case 6: + obj.fanout = reader.uint64(); + break; + case 7: + obj.mode = reader.uint32(); + break; + case 8: + obj.mtime = unixfs_UnixTime.codec().decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return obj; + }); + } + return _codec; + }; + Data.encode = (obj) => { + return encodeMessage(obj, Data.codec()); + }; + Data.decode = (buf) => { + return decodeMessage(buf, Data.codec()); + }; +})(unixfs_Data || (unixfs_Data = {})); +var unixfs_UnixTime; +(function (UnixTime) { + let _codec; + UnixTime.codec = () => { + if (_codec == null) { + _codec = message((obj, w, opts = {}) => { + if (opts.lengthDelimited !== false) { + w.fork(); + } + if (obj.Seconds != null) { + w.uint32(8); + w.int64(obj.Seconds); + } + if (obj.FractionalNanoseconds != null) { + w.uint32(21); + w.fixed32(obj.FractionalNanoseconds); + } + if (opts.lengthDelimited !== false) { + w.ldelim(); + } + }, (reader, length) => { + const obj = {}; + const end = length == null ? reader.len : reader.pos + length; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + obj.Seconds = reader.int64(); + break; + case 2: + obj.FractionalNanoseconds = reader.fixed32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return obj; + }); + } + return _codec; + }; + UnixTime.encode = (obj) => { + return encodeMessage(obj, UnixTime.codec()); + }; + UnixTime.decode = (buf) => { + return decodeMessage(buf, UnixTime.codec()); + }; +})(unixfs_UnixTime || (unixfs_UnixTime = {})); +var unixfs_Metadata; +(function (Metadata) { + let _codec; + Metadata.codec = () => { + if (_codec == null) { + _codec = message((obj, w, opts = {}) => { + if (opts.lengthDelimited !== false) { + w.fork(); + } + if (obj.MimeType != null) { + w.uint32(10); + w.string(obj.MimeType); + } + if (opts.lengthDelimited !== false) { + w.ldelim(); + } + }, (reader, length) => { + const obj = {}; + const end = length == null ? reader.len : reader.pos + length; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + obj.MimeType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return obj; + }); + } + return _codec; + }; + Metadata.encode = (obj) => { + return encodeMessage(obj, Metadata.codec()); + }; + Metadata.decode = (buf) => { + return decodeMessage(buf, Metadata.codec()); + }; +})(unixfs_Metadata || (unixfs_Metadata = {})); +//# sourceMappingURL=unixfs.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs/dist/src/index.js + + +const src_types = { + Raw: 'raw', + Directory: 'directory', + File: 'file', + Metadata: 'metadata', + Symlink: 'symlink', + HAMTShard: 'hamt-sharded-directory' +}; +const src_dirTypes = [ + 'directory', + 'hamt-sharded-directory' +]; +const src_DEFAULT_FILE_MODE = parseInt('0644', 8); +const src_DEFAULT_DIRECTORY_MODE = parseInt('0755', 8); +class src_UnixFS { + /** + * Decode from protobuf https://github.com/ipfs/specs/blob/master/UNIXFS.md + */ + static unmarshal(marshaled) { + const message = unixfs_Data.decode(marshaled); + const data = new src_UnixFS({ + type: src_types[message.Type != null ? message.Type.toString() : 'File'], + data: message.Data, + blockSizes: message.blocksizes, + mode: message.mode, + mtime: message.mtime != null + ? { + secs: message.mtime.Seconds ?? 0n, + nsecs: message.mtime.FractionalNanoseconds + } + : undefined, + fanout: message.fanout + }); + // make sure we honour the original mode + data._originalMode = message.mode ?? 0; + return data; + } + type; + data; + blockSizes; + hashType; + fanout; + mtime; + _mode; + _originalMode; + constructor(options = { + type: 'file' + }) { + const { type, data, blockSizes, hashType, fanout, mtime, mode } = options; + if (type != null && !Object.values(src_types).includes(type)) { + throw err_code(new Error('Type: ' + type + ' is not valid'), 'ERR_INVALID_TYPE'); + } + this.type = type ?? 'file'; + this.data = data; + this.hashType = hashType; + this.fanout = fanout; + this.blockSizes = blockSizes ?? []; + this._originalMode = 0; + this.mode = mode; + this.mtime = mtime; + } + set mode(mode) { + if (mode == null) { + this._mode = this.isDirectory() ? src_DEFAULT_DIRECTORY_MODE : src_DEFAULT_FILE_MODE; + } + else { + this._mode = (mode & 0xFFF); + } + } + get mode() { + return this._mode; + } + isDirectory() { + return src_dirTypes.includes(this.type); + } + addBlockSize(size) { + this.blockSizes.push(size); + } + removeBlockSize(index) { + this.blockSizes.splice(index, 1); + } + /** + * Returns `0n` for directories or `data.length + sum(blockSizes)` for everything else + */ + fileSize() { + if (this.isDirectory()) { + // dirs don't have file size + return 0n; + } + let sum = 0n; + this.blockSizes.forEach((size) => { + sum += size; + }); + if (this.data != null) { + sum += BigInt(this.data.length); + } + return sum; + } + /** + * encode to protobuf Uint8Array + */ + marshal() { + let type; + switch (this.type) { + case 'raw': + type = unixfs_Data.DataType.Raw; + break; + case 'directory': + type = unixfs_Data.DataType.Directory; + break; + case 'file': + type = unixfs_Data.DataType.File; + break; + case 'metadata': + type = unixfs_Data.DataType.Metadata; + break; + case 'symlink': + type = unixfs_Data.DataType.Symlink; + break; + case 'hamt-sharded-directory': + type = unixfs_Data.DataType.HAMTShard; + break; + default: + throw err_code(new Error(`Type: ${type} is not valid`), 'ERR_INVALID_TYPE'); + } + let data = this.data; + if (this.data == null || this.data.length === 0) { + data = undefined; + } + let mode; + if (this.mode != null) { + mode = (this._originalMode & 0xFFFFF000) | (this.mode ?? 0); + if (mode === src_DEFAULT_FILE_MODE && !this.isDirectory()) { + mode = undefined; } - ); - } catch (err) { - self.emit("error", err, method); - setTimeout(function() { callback(err); }, 0); - return undefined; + if (mode === src_DEFAULT_DIRECTORY_MODE && this.isDirectory()) { + mode = undefined; + } + } + let mtime; + if (this.mtime != null) { + mtime = { + Seconds: this.mtime.secs, + FractionalNanoseconds: this.mtime.nsecs + }; + } + return unixfs_Data.encode({ + Type: type, + Data: data, + filesize: this.isDirectory() ? undefined : this.fileSize(), + blocksizes: this.blockSizes, + hashType: this.hashType, + fanout: this.fanout, + mode, + mtime + }); } -}; +} + +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bytes.js +const multiformats_dist_src_bytes_empty = new Uint8Array(0); +function multiformats_dist_src_bytes_toHex(d) { + return d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), ''); +} +function multiformats_dist_src_bytes_fromHex(hex) { + const hexes = hex.match(/../g); + return hexes != null ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : multiformats_dist_src_bytes_empty; +} +function multiformats_dist_src_bytes_equals(aa, bb) { + if (aa === bb) + return true; + if (aa.byteLength !== bb.byteLength) { + return false; + } + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false; + } + } + return true; +} +function node_modules_multiformats_dist_src_bytes_coerce(o) { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') + return o; + if (o instanceof ArrayBuffer) + return new Uint8Array(o); + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength); + } + throw new Error('Unknown type, must be binary type'); +} +function multiformats_dist_src_bytes_isBinary(o) { + return o instanceof ArrayBuffer || ArrayBuffer.isView(o); +} +function multiformats_dist_src_bytes_fromString(str) { + return new TextEncoder().encode(str); +} +function node_modules_multiformats_dist_src_bytes_toString(b) { + return new TextDecoder().decode(b); +} +//# sourceMappingURL=bytes.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/codecs/raw.js +const dist_src_codecs_raw_name = 'raw'; +const dist_src_codecs_raw_code = 0x55; +function dist_src_codecs_raw_encode(node) { + return node_modules_multiformats_dist_src_bytes_coerce(node); +} +function dist_src_codecs_raw_decode(data) { + return node_modules_multiformats_dist_src_bytes_coerce(data); +} +//# sourceMappingURL=raw.js.map +;// CONCATENATED MODULE: ./node_modules/progress-events/dist/src/index.js /** - * Ends this service and emits the `end` event. - * @param {boolean} [endedByRPC=false] Whether the service has been ended by the RPC implementation. - * @returns {rpc.Service} `this` + * An implementation of the ProgressEvent interface, this is essentially + * a typed `CustomEvent` with a `type` property that lets us disambiguate + * events passed to `progress` callbacks. */ -Service.prototype.end = function end(endedByRPC) { - if (this.rpcImpl) { - if (!endedByRPC) // signal end to rpcImpl - this.rpcImpl(null, null, null); - this.rpcImpl = null; - this.emit("end").off(); +class CustomProgressEvent extends Event { + constructor(type, detail) { + super(type); + this.detail = detail; } - return this; -}; - - -/***/ }), - -/***/ 67489: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -module.exports = LongBits; - -var util = __nccwpck_require__(39807); - +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/vendor/base-x.js +/* eslint-disable */ +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. /** - * Constructs new long bits. - * @classdesc Helper class for working with the low and high bits of a 64 bit value. - * @memberof util - * @constructor - * @param {number} lo Low 32 bits, unsigned - * @param {number} hi High 32 bits, unsigned + * @param {string} ALPHABET + * @param {any} name */ -function LongBits(lo, hi) { - - // note that the casts below are theoretically unnecessary as of today, but older statically - // generated converter code might still call the ctor with signed 32bits. kept for compat. - +function dist_src_vendor_base_x_base(ALPHABET, name) { + if (ALPHABET.length >= 255) { + throw new TypeError('Alphabet too long'); + } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { + throw new TypeError(x + ' is ambiguous'); + } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up /** - * Low bits. - * @type {number} + * @param {any[] | Iterable} source */ - this.lo = lo >>> 0; - + function encode(source) { + // @ts-ignore + if (source instanceof Uint8Array) + ; + else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } + else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { + throw new TypeError('Expected Uint8Array'); + } + if (source.length === 0) { + return ''; + } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { + str += ALPHABET.charAt(b58[it2]); + } + return str; + } /** - * High bits. - * @type {number} + * @param {string | string[]} source */ - this.hi = hi >>> 0; + function decodeUnsafe(source) { + if (typeof source !== 'string') { + throw new TypeError('Expected String'); + } + if (source.length === 0) { + return new Uint8Array(); + } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { + return; + } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { + return; + } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { + return; + } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch; + } + /** + * @param {string | string[]} string + */ + function decode(string) { + var buffer = decodeUnsafe(string); + if (buffer) { + return buffer; + } + throw new Error(`Non-${name} character`); + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + }; } +var dist_src_vendor_base_x_src = dist_src_vendor_base_x_base; +var dist_src_vendor_base_x_brrp_multiformats_scope_baseX = dist_src_vendor_base_x_src; +/* harmony default export */ const multiformats_dist_src_vendor_base_x = (dist_src_vendor_base_x_brrp_multiformats_scope_baseX); +//# sourceMappingURL=base-x.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base.js -/** - * Zero bits. - * @memberof util.LongBits - * @type {util.LongBits} - */ -var zero = LongBits.zero = new LongBits(0, 0); - -zero.toNumber = function() { return 0; }; -zero.zzEncode = zero.zzDecode = function() { return this; }; -zero.length = function() { return 1; }; /** - * Zero hash. - * @memberof util.LongBits - * @type {string} + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. */ -var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0"; - +class multiformats_dist_src_bases_base_Encoder { + name; + prefix; + baseEncode; + constructor(name, prefix, baseEncode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + } + encode(bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}`; + } + else { + throw Error('Unknown type, must be binary type'); + } + } +} /** - * Constructs new long bits from the specified number. - * @param {number} value Value - * @returns {util.LongBits} Instance + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. */ -LongBits.fromNumber = function fromNumber(value) { - if (value === 0) - return zero; - var sign = value < 0; - if (sign) - value = -value; - var lo = value >>> 0, - hi = (value - lo) / 4294967296 >>> 0; - if (sign) { - hi = ~hi >>> 0; - lo = ~lo >>> 0; - if (++lo > 4294967295) { - lo = 0; - if (++hi > 4294967295) - hi = 0; +class multiformats_dist_src_bases_base_Decoder { + name; + prefix; + baseDecode; + prefixCodePoint; + constructor(name, prefix, baseDecode) { + this.name = name; + this.prefix = prefix; + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character'); + } + this.prefixCodePoint = prefix.codePointAt(0); + this.baseDecode = baseDecode; + } + decode(text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`); + } + return this.baseDecode(text.slice(this.prefix.length)); + } + else { + throw Error('Can only multibase decode strings'); } } - return new LongBits(lo, hi); -}; - + or(decoder) { + return multiformats_dist_src_bases_base_or(this, decoder); + } +} +class multiformats_dist_src_bases_base_ComposedDecoder { + decoders; + constructor(decoders) { + this.decoders = decoders; + } + or(decoder) { + return multiformats_dist_src_bases_base_or(this, decoder); + } + decode(input) { + const prefix = input[0]; + const decoder = this.decoders[prefix]; + if (decoder != null) { + return decoder.decode(input); + } + else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`); + } + } +} +function multiformats_dist_src_bases_base_or(left, right) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return new multiformats_dist_src_bases_base_ComposedDecoder({ + ...(left.decoders ?? { [left.prefix]: left }), + ...(right.decoders ?? { [right.prefix]: right }) + }); +} +class multiformats_dist_src_bases_base_Codec { + name; + prefix; + baseEncode; + baseDecode; + encoder; + decoder; + constructor(name, prefix, baseEncode, baseDecode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + this.baseDecode = baseDecode; + this.encoder = new multiformats_dist_src_bases_base_Encoder(name, prefix, baseEncode); + this.decoder = new multiformats_dist_src_bases_base_Decoder(name, prefix, baseDecode); + } + encode(input) { + return this.encoder.encode(input); + } + decode(input) { + return this.decoder.decode(input); + } +} +function multiformats_dist_src_bases_base_from({ name, prefix, encode, decode }) { + return new multiformats_dist_src_bases_base_Codec(name, prefix, encode, decode); +} +function multiformats_dist_src_bases_base_baseX({ name, prefix, alphabet }) { + const { encode, decode } = multiformats_dist_src_vendor_base_x(alphabet, name); + return multiformats_dist_src_bases_base_from({ + prefix, + name, + encode, + decode: (text) => node_modules_multiformats_dist_src_bytes_coerce(decode(text)) + }); +} +function multiformats_dist_src_bases_base_decode(string, alphabet, bitsPerChar, name) { + // Build the character lookup table: + const codes = {}; + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i; + } + // Count the padding bytes: + let end = string.length; + while (string[end - 1] === '=') { + --end; + } + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0); + // Parse the data: + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + let written = 0; // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]]; + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`); + } + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value; + bits += bitsPerChar; + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8; + out[written++] = 0xff & (buffer >> bits); + } + } + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || (0xff & (buffer << (8 - bits))) !== 0) { + throw new SyntaxError('Unexpected end of data'); + } + return out; +} +function multiformats_dist_src_bases_base_encode(data, alphabet, bitsPerChar) { + const pad = alphabet[alphabet.length - 1] === '='; + const mask = (1 << bitsPerChar) - 1; + let out = ''; + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i]; + bits += 8; + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar; + out += alphabet[mask & (buffer >> bits)]; + } + } + // Partial character: + if (bits !== 0) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))]; + } + // Add padding characters until we hit a byte boundary: + if (pad) { + while (((out.length * bitsPerChar) & 7) !== 0) { + out += '='; + } + } + return out; +} /** - * Constructs new long bits from a number, long or string. - * @param {Long|number|string} value Value - * @returns {util.LongBits} Instance + * RFC4648 Factory */ -LongBits.from = function from(value) { - if (typeof value === "number") - return LongBits.fromNumber(value); - if (util.isString(value)) { - /* istanbul ignore else */ - if (util.Long) - value = util.Long.fromString(value); - else - return LongBits.fromNumber(parseInt(value, 10)); - } - return value.low || value.high ? new LongBits(value.low >>> 0, value.high >>> 0) : zero; -}; +function multiformats_dist_src_bases_base_rfc4648({ name, prefix, bitsPerChar, alphabet }) { + return multiformats_dist_src_bases_base_from({ + prefix, + name, + encode(input) { + return multiformats_dist_src_bases_base_encode(input, alphabet, bitsPerChar); + }, + decode(input) { + return multiformats_dist_src_bases_base_decode(input, alphabet, bitsPerChar, name); + } + }); +} +//# sourceMappingURL=base.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base32.js + +const multiformats_dist_src_bases_base32_base32 = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}); +const multiformats_dist_src_bases_base32_base32upper = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}); +const multiformats_dist_src_bases_base32_base32pad = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}); +const multiformats_dist_src_bases_base32_base32padupper = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}); +const multiformats_dist_src_bases_base32_base32hex = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}); +const multiformats_dist_src_bases_base32_base32hexupper = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}); +const multiformats_dist_src_bases_base32_base32hexpad = multiformats_dist_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}); +const multiformats_dist_src_bases_base32_base32hexpadupper = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}); +const multiformats_dist_src_bases_base32_base32z = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}); +//# sourceMappingURL=base32.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base58.js +const multiformats_dist_src_bases_base58_base58btc = multiformats_dist_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}); +const multiformats_dist_src_bases_base58_base58flickr = multiformats_dist_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}); +//# sourceMappingURL=base58.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/vendor/varint.js +/* eslint-disable */ +var dist_src_vendor_varint_encode_1 = multiformats_dist_src_vendor_varint_encode; +var dist_src_vendor_varint_MSB = 0x80, dist_src_vendor_varint_REST = 0x7F, dist_src_vendor_varint_MSBALL = ~dist_src_vendor_varint_REST, dist_src_vendor_varint_INT = Math.pow(2, 31); /** - * Converts this long bits to a possibly unsafe JavaScript number. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {number} Possibly unsafe number + * @param {number} num + * @param {number[]} out + * @param {number} offset */ -LongBits.prototype.toNumber = function toNumber(unsigned) { - if (!unsigned && this.hi >>> 31) { - var lo = ~this.lo + 1 >>> 0, - hi = ~this.hi >>> 0; - if (!lo) - hi = hi + 1 >>> 0; - return -(lo + hi * 4294967296); +function multiformats_dist_src_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while (num >= dist_src_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | dist_src_vendor_varint_MSB; + num /= 128; } - return this.lo + this.hi * 4294967296; -}; - + while (num & dist_src_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | dist_src_vendor_varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + // @ts-ignore + multiformats_dist_src_vendor_varint_encode.bytes = offset - oldOffset + 1; + return out; +} +var multiformats_dist_src_vendor_varint_decode = dist_src_vendor_varint_read; +var dist_src_vendor_varint_MSB$1 = 0x80, dist_src_vendor_varint_REST$1 = 0x7F; /** - * Converts this long bits to a long. - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long} Long + * @param {string | any[]} buf + * @param {number} offset */ -LongBits.prototype.toLong = function toLong(unsigned) { - return util.Long - ? new util.Long(this.lo | 0, this.hi | 0, Boolean(unsigned)) - /* istanbul ignore next */ - : { low: this.lo | 0, high: this.hi | 0, unsigned: Boolean(unsigned) }; -}; +function dist_src_vendor_varint_read(buf, offset) { + var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + do { + if (counter >= l) { + // @ts-ignore + dist_src_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint'); + } + b = buf[counter++]; + res += shift < 28 + ? (b & dist_src_vendor_varint_REST$1) << shift + : (b & dist_src_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= dist_src_vendor_varint_MSB$1); + // @ts-ignore + dist_src_vendor_varint_read.bytes = counter - offset; + return res; +} +var dist_src_vendor_varint_N1 = Math.pow(2, 7); +var dist_src_vendor_varint_N2 = Math.pow(2, 14); +var dist_src_vendor_varint_N3 = Math.pow(2, 21); +var dist_src_vendor_varint_N4 = Math.pow(2, 28); +var dist_src_vendor_varint_N5 = Math.pow(2, 35); +var dist_src_vendor_varint_N6 = Math.pow(2, 42); +var dist_src_vendor_varint_N7 = Math.pow(2, 49); +var dist_src_vendor_varint_N8 = Math.pow(2, 56); +var dist_src_vendor_varint_N9 = Math.pow(2, 63); +var multiformats_dist_src_vendor_varint_length = function (/** @type {number} */ value) { + return (value < dist_src_vendor_varint_N1 ? 1 + : value < dist_src_vendor_varint_N2 ? 2 + : value < dist_src_vendor_varint_N3 ? 3 + : value < dist_src_vendor_varint_N4 ? 4 + : value < dist_src_vendor_varint_N5 ? 5 + : value < dist_src_vendor_varint_N6 ? 6 + : value < dist_src_vendor_varint_N7 ? 7 + : value < dist_src_vendor_varint_N8 ? 8 + : value < dist_src_vendor_varint_N9 ? 9 + : 10); +}; +var multiformats_dist_src_vendor_varint_varint = { + encode: dist_src_vendor_varint_encode_1, + decode: multiformats_dist_src_vendor_varint_decode, + encodingLength: multiformats_dist_src_vendor_varint_length +}; +var dist_src_vendor_varint_brrp_varint = multiformats_dist_src_vendor_varint_varint; +/* harmony default export */ const node_modules_multiformats_dist_src_vendor_varint = (dist_src_vendor_varint_brrp_varint); +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/varint.js + +function ipfs_unixfs_importer_node_modules_multiformats_dist_src_varint_decode(data, offset = 0) { + const code = node_modules_multiformats_dist_src_vendor_varint.decode(data, offset); + return [code, node_modules_multiformats_dist_src_vendor_varint.decode.bytes]; +} +function multiformats_dist_src_varint_encodeTo(int, target, offset = 0) { + node_modules_multiformats_dist_src_vendor_varint.encode(int, target, offset); + return target; +} +function multiformats_dist_src_varint_encodingLength(int) { + return node_modules_multiformats_dist_src_vendor_varint.encodingLength(int); +} +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/hashes/digest.js -var charCodeAt = String.prototype.charCodeAt; /** - * Constructs new long bits from the specified 8 characters long hash. - * @param {string} hash Hash - * @returns {util.LongBits} Bits + * Creates a multihash digest. */ -LongBits.fromHash = function fromHash(hash) { - if (hash === zeroHash) - return zero; - return new LongBits( - ( charCodeAt.call(hash, 0) - | charCodeAt.call(hash, 1) << 8 - | charCodeAt.call(hash, 2) << 16 - | charCodeAt.call(hash, 3) << 24) >>> 0 - , - ( charCodeAt.call(hash, 4) - | charCodeAt.call(hash, 5) << 8 - | charCodeAt.call(hash, 6) << 16 - | charCodeAt.call(hash, 7) << 24) >>> 0 - ); -}; - +function multiformats_dist_src_hashes_digest_create(code, digest) { + const size = digest.byteLength; + const sizeOffset = multiformats_dist_src_varint_encodingLength(code); + const digestOffset = sizeOffset + multiformats_dist_src_varint_encodingLength(size); + const bytes = new Uint8Array(digestOffset + size); + multiformats_dist_src_varint_encodeTo(code, bytes, 0); + multiformats_dist_src_varint_encodeTo(size, bytes, sizeOffset); + bytes.set(digest, digestOffset); + return new multiformats_dist_src_hashes_digest_Digest(code, size, digest, bytes); +} /** - * Converts this long bits to a 8 characters long hash. - * @returns {string} Hash + * Turns bytes representation of multihash digest into an instance. */ -LongBits.prototype.toHash = function toHash() { - return String.fromCharCode( - this.lo & 255, - this.lo >>> 8 & 255, - this.lo >>> 16 & 255, - this.lo >>> 24 , - this.hi & 255, - this.hi >>> 8 & 255, - this.hi >>> 16 & 255, - this.hi >>> 24 - ); -}; - +function multiformats_dist_src_hashes_digest_decode(multihash) { + const bytes = node_modules_multiformats_dist_src_bytes_coerce(multihash); + const [code, sizeOffset] = ipfs_unixfs_importer_node_modules_multiformats_dist_src_varint_decode(bytes); + const [size, digestOffset] = ipfs_unixfs_importer_node_modules_multiformats_dist_src_varint_decode(bytes.subarray(sizeOffset)); + const digest = bytes.subarray(sizeOffset + digestOffset); + if (digest.byteLength !== size) { + throw new Error('Incorrect length'); + } + return new multiformats_dist_src_hashes_digest_Digest(code, size, digest, bytes); +} +function multiformats_dist_src_hashes_digest_equals(a, b) { + if (a === b) { + return true; + } + else { + const data = b; + return (a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + multiformats_dist_src_bytes_equals(a.bytes, data.bytes)); + } +} /** - * Zig-zag encodes this long bits. - * @returns {util.LongBits} `this` + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. */ -LongBits.prototype.zzEncode = function zzEncode() { - var mask = this.hi >> 31; - this.hi = ((this.hi << 1 | this.lo >>> 31) ^ mask) >>> 0; - this.lo = ( this.lo << 1 ^ mask) >>> 0; - return this; -}; +class multiformats_dist_src_hashes_digest_Digest { + code; + size; + digest; + bytes; + /** + * Creates a multihash digest. + */ + constructor(code, size, digest, bytes) { + this.code = code; + this.size = size; + this.digest = digest; + this.bytes = bytes; + } +} +//# sourceMappingURL=digest.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/cid.js -/** - * Zig-zag decodes this long bits. - * @returns {util.LongBits} `this` - */ -LongBits.prototype.zzDecode = function zzDecode() { - var mask = -(this.lo & 1); - this.lo = ((this.lo >>> 1 | this.hi << 31) ^ mask) >>> 0; - this.hi = ( this.hi >>> 1 ^ mask) >>> 0; - return this; -}; -/** - * Calculates the length of this longbits when encoded as a varint. - * @returns {number} Length - */ -LongBits.prototype.length = function length() { - var part0 = this.lo, - part1 = (this.lo >>> 28 | this.hi << 4) >>> 0, - part2 = this.hi >>> 24; - return part2 === 0 - ? part1 === 0 - ? part0 < 16384 - ? part0 < 128 ? 1 : 2 - : part0 < 2097152 ? 3 : 4 - : part1 < 16384 - ? part1 < 128 ? 5 : 6 - : part1 < 2097152 ? 7 : 8 - : part2 < 128 ? 9 : 10; -}; -/***/ }), -/***/ 39807: -/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { +// This way TS will also expose all the types from module -"use strict"; +function multiformats_dist_src_cid_format(link, base) { + const { bytes, version } = link; + switch (version) { + case 0: + return multiformats_dist_src_cid_toStringV0(bytes, multiformats_dist_src_cid_baseCache(link), base ?? multiformats_dist_src_bases_base58_base58btc.encoder); + default: + return multiformats_dist_src_cid_toStringV1(bytes, multiformats_dist_src_cid_baseCache(link), (base ?? multiformats_dist_src_bases_base32_base32.encoder)); + } +} +function multiformats_dist_src_cid_toJSON(link) { + return { + '/': multiformats_dist_src_cid_format(link) + }; +} +function multiformats_dist_src_cid_fromJSON(json) { + return node_modules_multiformats_dist_src_cid_CID.parse(json['/']); +} +const multiformats_dist_src_cid_cache = new WeakMap(); +function multiformats_dist_src_cid_baseCache(cid) { + const baseCache = multiformats_dist_src_cid_cache.get(cid); + if (baseCache == null) { + const baseCache = new Map(); + multiformats_dist_src_cid_cache.set(cid, baseCache); + return baseCache; + } + return baseCache; +} +class node_modules_multiformats_dist_src_cid_CID { + code; + version; + multihash; + bytes; + '/'; + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param multihash - (Multi)hash of the of the content. + */ + constructor(version, code, multihash, bytes) { + this.code = code; + this.version = version; + this.multihash = multihash; + this.bytes = bytes; + // flag to serializers that this is a CID and + // should be treated specially + this['/'] = bytes; + } + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID() { + return this; + } + // ArrayBufferView + get byteOffset() { + return this.bytes.byteOffset; + } + // ArrayBufferView + get byteLength() { + return this.bytes.byteLength; + } + toV0() { + switch (this.version) { + case 0: { + return this; + } + case 1: { + const { code, multihash } = this; + if (code !== multiformats_dist_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0'); + } + // sha2-256 + if (multihash.code !== multiformats_dist_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0'); + } + return (node_modules_multiformats_dist_src_cid_CID.createV0(multihash)); + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`); + } + } + } + toV1() { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash; + const multihash = multiformats_dist_src_hashes_digest_create(code, digest); + return (node_modules_multiformats_dist_src_cid_CID.createV1(this.code, multihash)); + } + case 1: { + return this; + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`); + } + } + } + equals(other) { + return node_modules_multiformats_dist_src_cid_CID.equals(this, other); + } + static equals(self, other) { + const unknown = other; + return (unknown != null && + self.code === unknown.code && + self.version === unknown.version && + multiformats_dist_src_hashes_digest_equals(self.multihash, unknown.multihash)); + } + toString(base) { + return multiformats_dist_src_cid_format(this, base); + } + toJSON() { + return { '/': multiformats_dist_src_cid_format(this) }; + } + link() { + return this; + } + [Symbol.toStringTag] = 'CID'; + // Legacy + [Symbol.for('nodejs.util.inspect.custom')]() { + return `CID(${this.toString()})`; + } + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + */ + static asCID(input) { + if (input == null) { + return null; + } + const value = input; + if (value instanceof node_modules_multiformats_dist_src_cid_CID) { + // If value is instance of CID then we're all set. + return value; + } + else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value; + return new node_modules_multiformats_dist_src_cid_CID(version, code, multihash, bytes ?? multiformats_dist_src_cid_encodeCID(version, code, multihash.bytes)); + } + else if (value[multiformats_dist_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value; + const digest = multiformats_dist_src_hashes_digest_decode(multihash); + return node_modules_multiformats_dist_src_cid_CID.create(version, code, digest); + } + else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null; + } + } + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param digest - (Multi)hash of the of the content. + */ + static create(version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported'); + } + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest'); + } + switch (version) { + case 0: { + if (code !== multiformats_dist_src_cid_DAG_PB_CODE) { + throw new Error(`Version 0 CID must use dag-pb (code: ${multiformats_dist_src_cid_DAG_PB_CODE}) block encoding`); + } + else { + return new node_modules_multiformats_dist_src_cid_CID(version, code, digest, digest.bytes); + } + } + case 1: { + const bytes = multiformats_dist_src_cid_encodeCID(version, code, digest.bytes); + return new node_modules_multiformats_dist_src_cid_CID(version, code, digest, bytes); + } + default: { + throw new Error('Invalid version'); + } + } + } + /** + * Simplified version of `create` for CIDv0. + */ + static createV0(digest) { + return node_modules_multiformats_dist_src_cid_CID.create(0, multiformats_dist_src_cid_DAG_PB_CODE, digest); + } + /** + * Simplified version of `create` for CIDv1. + * + * @param code - Content encoding format code. + * @param digest - Multihash of the content. + */ + static createV1(code, digest) { + return node_modules_multiformats_dist_src_cid_CID.create(1, code, digest); + } + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + */ + static decode(bytes) { + const [cid, remainder] = node_modules_multiformats_dist_src_cid_CID.decodeFirst(bytes); + if (remainder.length !== 0) { + throw new Error('Incorrect length'); + } + return cid; + } + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + */ + static decodeFirst(bytes) { + const specs = node_modules_multiformats_dist_src_cid_CID.inspectBytes(bytes); + const prefixSize = specs.size - specs.multihashSize; + const multihashBytes = node_modules_multiformats_dist_src_bytes_coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize)); + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length'); + } + const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize); + const digest = new multiformats_dist_src_hashes_digest_Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes); + const cid = specs.version === 0 + ? node_modules_multiformats_dist_src_cid_CID.createV0(digest) + : node_modules_multiformats_dist_src_cid_CID.createV1(specs.codec, digest); + return [cid, bytes.subarray(specs.size)]; + } + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + */ + static inspectBytes(initialBytes) { + let offset = 0; + const next = () => { + const [i, length] = ipfs_unixfs_importer_node_modules_multiformats_dist_src_varint_decode(initialBytes.subarray(offset)); + offset += length; + return i; + }; + let version = next(); + let codec = multiformats_dist_src_cid_DAG_PB_CODE; + if (version === 18) { + // CIDv0 + version = 0; + offset = 0; + } + else { + codec = next(); + } + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`); + } + const prefixSize = offset; + const multihashCode = next(); // multihash code + const digestSize = next(); // multihash length + const size = offset + digestSize; + const multihashSize = size - prefixSize; + return { version, codec, multihashCode, digestSize, multihashSize, size }; + } + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + */ + static parse(source, base) { + const [prefix, bytes] = multiformats_dist_src_cid_parseCIDtoBytes(source, base); + const cid = node_modules_multiformats_dist_src_cid_CID.decode(bytes); + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix'); + } + // Cache string representation to avoid computing it on `this.toString()` + multiformats_dist_src_cid_baseCache(cid).set(prefix, source); + return cid; + } +} +function multiformats_dist_src_cid_parseCIDtoBytes(source, base) { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base ?? multiformats_dist_src_bases_base58_base58btc; + return [ + multiformats_dist_src_bases_base58_base58btc.prefix, + decoder.decode(`${multiformats_dist_src_bases_base58_base58btc.prefix}${source}`) + ]; + } + case multiformats_dist_src_bases_base58_base58btc.prefix: { + const decoder = base ?? multiformats_dist_src_bases_base58_base58btc; + return [multiformats_dist_src_bases_base58_base58btc.prefix, decoder.decode(source)]; + } + case multiformats_dist_src_bases_base32_base32.prefix: { + const decoder = base ?? multiformats_dist_src_bases_base32_base32; + return [multiformats_dist_src_bases_base32_base32.prefix, decoder.decode(source)]; + } + default: { + if (base == null) { + throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided'); + } + return [source[0], base.decode(source)]; + } + } +} +function multiformats_dist_src_cid_toStringV0(bytes, cache, base) { + const { prefix } = base; + if (prefix !== multiformats_dist_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`); + } + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes).slice(1); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +function multiformats_dist_src_cid_toStringV1(bytes, cache, base) { + const { prefix } = base; + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +const multiformats_dist_src_cid_DAG_PB_CODE = 0x70; +const multiformats_dist_src_cid_SHA_256_CODE = 0x12; +function multiformats_dist_src_cid_encodeCID(version, code, multihash) { + const codeOffset = multiformats_dist_src_varint_encodingLength(version); + const hashOffset = codeOffset + multiformats_dist_src_varint_encodingLength(code); + const bytes = new Uint8Array(hashOffset + multihash.byteLength); + multiformats_dist_src_varint_encodeTo(version, bytes, 0); + multiformats_dist_src_varint_encodeTo(code, bytes, codeOffset); + bytes.set(multihash, hashOffset); + return bytes; +} +const multiformats_dist_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID'); +//# sourceMappingURL=cid.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/hashes/hasher.js -var util = exports; +function dist_src_hashes_hasher_from({ name, code, encode }) { + return new dist_src_hashes_hasher_Hasher(name, code, encode); +} +/** + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. + */ +class dist_src_hashes_hasher_Hasher { + name; + code; + encode; + constructor(name, code, encode) { + this.name = name; + this.code = code; + this.encode = encode; + } + digest(input) { + if (input instanceof Uint8Array) { + const result = this.encode(input); + return result instanceof Uint8Array + ? multiformats_dist_src_hashes_digest_create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => multiformats_dist_src_hashes_digest_create(this.code, digest)); + } + else { + throw Error('Unknown type, must be binary type'); + /* c8 ignore next 1 */ + } + } +} +//# sourceMappingURL=hasher.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/hashes/sha2.js -// used to return a Promise where callback is omitted -util.asPromise = __nccwpck_require__(66619); -// converts to / from base64 encoded strings -util.base64 = __nccwpck_require__(37366); -// base class of rpc.Service -util.EventEmitter = __nccwpck_require__(98873); +const dist_src_hashes_sha2_sha256 = dist_src_hashes_hasher_from({ + name: 'sha2-256', + code: 0x12, + encode: (input) => node_modules_multiformats_dist_src_bytes_coerce(external_crypto_.createHash('sha256').update(input).digest()) +}); +const dist_src_hashes_sha2_sha512 = dist_src_hashes_hasher_from({ + name: 'sha2-512', + code: 0x13, + encode: input => node_modules_multiformats_dist_src_bytes_coerce(external_crypto_.createHash('sha512').update(input).digest()) +}); +//# sourceMappingURL=sha2.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/utils/persist.js -// float handling accross browsers -util.float = __nccwpck_require__(13001); -// requires modules optionally and hides the call from bundlers -util.inquire = __nccwpck_require__(74097); -// converts to / from utf8 encoded strings -util.utf8 = __nccwpck_require__(42114); +const persist = async (buffer, blockstore, options) => { + if (options.codec == null) { + options.codec = src_namespaceObject; + } + const multihash = await dist_src_hashes_sha2_sha256.digest(buffer); + const cid = node_modules_multiformats_dist_src_cid_CID.create(options.cidVersion, options.codec.code, multihash); + await blockstore.put(cid, buffer, options); + return cid; +}; +//# sourceMappingURL=persist.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/dag-builder/buffer-importer.js -// provides a node-like buffer pool in the browser -util.pool = __nccwpck_require__(15177); -// utility to work with the low and high bits of a 64 bit value -util.LongBits = __nccwpck_require__(67489); -/** - * Whether running within node or not. - * @memberof util - * @type {boolean} - */ -util.isNode = Boolean(typeof global !== "undefined" - && global - && global.process - && global.process.versions - && global.process.versions.node); -/** - * Global object reference. - * @memberof util - * @type {Object} - */ -util.global = util.isNode && global - || typeof window !== "undefined" && window - || typeof self !== "undefined" && self - || this; // eslint-disable-line no-invalid-this -/** - * An immuable empty array. - * @memberof util - * @type {Array.<*>} - * @const - */ -util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */ []; // used on prototypes +function defaultBufferImporter(options) { + return async function* bufferImporter(file, blockstore) { + let bytesWritten = 0n; + for await (let block of file.content) { + yield async () => { + let unixfs; + const opts = { + codec: src_namespaceObject, + cidVersion: options.cidVersion, + onProgress: options.onProgress + }; + if (options.rawLeaves) { + opts.codec = dist_src_codecs_raw_namespaceObject; + opts.cidVersion = 1; + } + else { + unixfs = new src_UnixFS({ + type: options.leafType, + data: block + }); + block = src_encode({ + Data: unixfs.marshal(), + Links: [] + }); + } + const cid = await persist(block, blockstore, opts); + bytesWritten += BigInt(block.byteLength); + options.onProgress?.(new CustomProgressEvent('unixfs:importer:progress:file:write', { + bytesWritten, + cid, + path: file.path + })); + return { + cid, + unixfs, + size: BigInt(block.length), + block + }; + }; + } + }; +} +//# sourceMappingURL=buffer-importer.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/dag-builder/dir.js -/** - * An immutable empty object. - * @type {Object} - * @const - */ -util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes -/** - * Tests if the specified value is an integer. - * @function - * @param {*} value Value to test - * @returns {boolean} `true` if the value is an integer - */ -util.isInteger = Number.isInteger || /* istanbul ignore next */ function isInteger(value) { - return typeof value === "number" && isFinite(value) && Math.floor(value) === value; -}; -/** - * Tests if the specified value is a string. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a string - */ -util.isString = function isString(value) { - return typeof value === "string" || value instanceof String; +const dirBuilder = async (dir, blockstore, options) => { + const unixfs = new src_UnixFS({ + type: 'directory', + mtime: dir.mtime, + mode: dir.mode + }); + const block = src_encode(prepare({ Data: unixfs.marshal() })); + const cid = await persist(block, blockstore, options); + const path = dir.path; + return { + cid, + path, + unixfs, + size: BigInt(block.length), + originalPath: dir.originalPath, + block + }; }; +//# sourceMappingURL=dir.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/dag-builder/file.js -/** - * Tests if the specified value is a non-null object. - * @param {*} value Value to test - * @returns {boolean} `true` if the value is a non-null object - */ -util.isObject = function isObject(value) { - return value && typeof value === "object"; -}; -/** - * Checks if a property on a message is considered to be present. - * This is an alias of {@link util.isSet}. - * @function - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isset = -/** - * Checks if a property on a message is considered to be present. - * @param {Object} obj Plain object or message instance - * @param {string} prop Property name - * @returns {boolean} `true` if considered to be present, otherwise `false` - */ -util.isSet = function isSet(obj, prop) { - var value = obj[prop]; - if (value != null && obj.hasOwnProperty(prop)) // eslint-disable-line eqeqeq, no-prototype-builtins - return typeof value !== "object" || (Array.isArray(value) ? value.length : Object.keys(value).length) > 0; - return false; -}; -/** - * Any compatible Buffer instance. - * This is a minimal stand-alone definition of a Buffer instance. The actual type is that exported by node's typings. - * @interface Buffer - * @extends Uint8Array - */ -/** - * Node's Buffer class if available. - * @type {Constructor} - */ -util.Buffer = (function() { - try { - var Buffer = util.inquire("buffer").Buffer; - // refuse to use non-node buffers if not explicitly assigned (perf reasons): - return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; - } catch (e) { - /* istanbul ignore next */ - return null; + +async function* buildFileBatch(file, blockstore, options) { + let count = -1; + let previous; + for await (const entry of parallelBatch(options.bufferImporter(file, blockstore), options.blockWriteConcurrency)) { + count++; + if (count === 0) { + // cache the first entry if case there aren't any more + previous = { + ...entry, + single: true + }; + continue; + } + else if (count === 1 && (previous != null)) { + // we have the second block of a multiple block import so yield the first + yield { + ...previous, + block: undefined, + single: undefined + }; + previous = undefined; + } + // yield the second or later block of a multiple block import + yield { + ...entry, + block: undefined + }; } -})(); + if (previous != null) { + yield previous; + } +} +function isSingleBlockImport(result) { + return result.single === true; +} +const reduce = (file, blockstore, options) => { + const reducer = async function (leaves) { + if (leaves.length === 1 && isSingleBlockImport(leaves[0]) && options.reduceSingleLeafToSelf) { + const leaf = leaves[0]; + let node = leaf.block; + if (isSingleBlockImport(leaf) && (file.mtime !== undefined || file.mode !== undefined)) { + // only one leaf node which is a raw leaf - we have metadata so convert it into a + // UnixFS entry otherwise we'll have nowhere to store the metadata + leaf.unixfs = new src_UnixFS({ + type: 'file', + mtime: file.mtime, + mode: file.mode, + data: leaf.block + }); + node = { Data: leaf.unixfs.marshal(), Links: [] }; + leaf.block = src_encode(prepare(node)); + leaf.cid = await persist(leaf.block, blockstore, { + ...options, + cidVersion: options.cidVersion + }); + leaf.size = BigInt(leaf.block.length); + } + options.onProgress?.(new CustomProgressEvent('unixfs:importer:progress:file:layout', { + cid: leaf.cid, + path: leaf.originalPath + })); + return { + cid: leaf.cid, + path: file.path, + unixfs: leaf.unixfs, + size: leaf.size, + originalPath: leaf.originalPath + }; + } + // create a parent node and add all the leaves + const f = new src_UnixFS({ + type: 'file', + mtime: file.mtime, + mode: file.mode + }); + const links = leaves + .filter(leaf => { + if (leaf.cid.code === dist_src_codecs_raw_code && leaf.size > 0) { + return true; + } + if ((leaf.unixfs != null) && (leaf.unixfs.data == null) && leaf.unixfs.fileSize() > 0n) { + return true; + } + return Boolean(leaf.unixfs?.data?.length); + }) + .map((leaf) => { + if (leaf.cid.code === dist_src_codecs_raw_code) { + // node is a leaf buffer + f.addBlockSize(leaf.size); + return { + Name: '', + Tsize: Number(leaf.size), + Hash: leaf.cid + }; + } + if ((leaf.unixfs == null) || (leaf.unixfs.data == null)) { + // node is an intermediate node + f.addBlockSize(leaf.unixfs?.fileSize() ?? 0n); + } + else { + // node is a unixfs 'file' leaf node + f.addBlockSize(BigInt(leaf.unixfs.data.length)); + } + return { + Name: '', + Tsize: Number(leaf.size), + Hash: leaf.cid + }; + }); + const node = { + Data: f.marshal(), + Links: links + }; + const block = src_encode(prepare(node)); + const cid = await persist(block, blockstore, options); + options.onProgress?.(new CustomProgressEvent('unixfs:importer:progress:file:layout', { + cid, + path: file.originalPath + })); + return { + cid, + path: file.path, + unixfs: f, + size: BigInt(block.length + node.Links.reduce((acc, curr) => acc + (curr.Tsize ?? 0), 0)), + originalPath: file.originalPath, + block + }; + }; + return reducer; +}; +const fileBuilder = async (file, block, options) => { + return options.layout(buildFileBatch(file, block, options), reduce(file, block, options)); +}; +//# sourceMappingURL=file.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/dag-builder/index.js -// Internal alias of or polyfull for Buffer.from. -util._Buffer_from = null; -// Internal alias of or polyfill for Buffer.allocUnsafe. -util._Buffer_allocUnsafe = null; -/** - * Creates a new buffer of whatever type supported by the environment. - * @param {number|number[]} [sizeOrArray=0] Buffer size or number array - * @returns {Uint8Array|Buffer} Buffer - */ -util.newBuffer = function newBuffer(sizeOrArray) { - /* istanbul ignore next */ - return typeof sizeOrArray === "number" - ? util.Buffer - ? util._Buffer_allocUnsafe(sizeOrArray) - : new util.Array(sizeOrArray) - : util.Buffer - ? util._Buffer_from(sizeOrArray) - : typeof Uint8Array === "undefined" - ? sizeOrArray - : new Uint8Array(sizeOrArray); -}; +function dag_builder_isIterable(thing) { + return Symbol.iterator in thing; +} +function dag_builder_isAsyncIterable(thing) { + return Symbol.asyncIterator in thing; +} +function contentAsAsyncIterable(content) { + try { + if (content instanceof Uint8Array) { + return (async function* () { + yield content; + }()); + } + else if (dag_builder_isIterable(content)) { + return (async function* () { + yield* content; + }()); + } + else if (dag_builder_isAsyncIterable(content)) { + return content; + } + } + catch { + throw err_code(new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); + } + throw err_code(new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); +} +function defaultDagBuilder(options) { + return async function* dagBuilder(source, blockstore) { + for await (const entry of source) { + let originalPath; + if (entry.path != null) { + originalPath = entry.path; + entry.path = entry.path + .split('/') + .filter(path => path != null && path !== '.') + .join('/'); + } + if (isFileCandidate(entry)) { + const file = { + path: entry.path, + mtime: entry.mtime, + mode: entry.mode, + content: (async function* () { + let bytesRead = 0n; + for await (const chunk of options.chunker(options.chunkValidator(contentAsAsyncIterable(entry.content)))) { + const currentChunkSize = BigInt(chunk.byteLength); + bytesRead += currentChunkSize; + options.onProgress?.(new CustomProgressEvent('unixfs:importer:progress:file:read', { + bytesRead, + chunkSize: currentChunkSize, + path: entry.path + })); + yield chunk; + } + })(), + originalPath + }; + yield async () => fileBuilder(file, blockstore, options); + } + else if (entry.path != null) { + const dir = { + path: entry.path, + mtime: entry.mtime, + mode: entry.mode, + originalPath + }; + yield async () => dirBuilder(dir, blockstore, options); + } + else { + throw new Error('Import candidate must have content or path or both'); + } + } + }; +} +function isFileCandidate(entry) { + return entry.content != null; +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/uint8arrays/dist/src/util/as-uint8array.js /** - * Array implementation used in the browser. `Uint8Array` if supported, otherwise `Array`. - * @type {Constructor} + * To guarantee Uint8Array semantics, convert nodejs Buffers + * into vanilla Uint8Arrays */ -util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array; +function ipfs_unixfs_importer_node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(buf) { + if (globalThis.Buffer != null) { + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + return buf; +} +//# sourceMappingURL=as-uint8array.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base10.js -/** - * Any compatible Long instance. - * This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js. - * @interface Long - * @property {number} low Low bits - * @property {number} high High bits - * @property {boolean} unsigned Whether unsigned or not - */ +const dist_src_bases_base10_base10 = multiformats_dist_src_bases_base_baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}); +//# sourceMappingURL=base10.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base16.js + +const dist_src_bases_base16_base16 = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'f', + name: 'base16', + alphabet: '0123456789abcdef', + bitsPerChar: 4 +}); +const dist_src_bases_base16_base16upper = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'F', + name: 'base16upper', + alphabet: '0123456789ABCDEF', + bitsPerChar: 4 +}); +//# sourceMappingURL=base16.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base2.js + +const dist_src_bases_base2_base2 = multiformats_dist_src_bases_base_rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}); +//# sourceMappingURL=base2.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base256emoji.js + +const dist_src_bases_base256emoji_alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂'); +const dist_src_bases_base256emoji_alphabetBytesToChars = (dist_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[i] = c; return p; }, ([]))); +const dist_src_bases_base256emoji_alphabetCharsToBytes = (dist_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[c.codePointAt(0)] = i; return p; }, ([]))); +function dist_src_bases_base256emoji_encode(data) { + return data.reduce((p, c) => { + p += dist_src_bases_base256emoji_alphabetBytesToChars[c]; + return p; + }, ''); +} +function dist_src_bases_base256emoji_decode(str) { + const byts = []; + for (const char of str) { + const byt = dist_src_bases_base256emoji_alphabetCharsToBytes[char.codePointAt(0)]; + if (byt === undefined) { + throw new Error(`Non-base256emoji character: ${char}`); + } + byts.push(byt); + } + return new Uint8Array(byts); +} +const dist_src_bases_base256emoji_base256emoji = multiformats_dist_src_bases_base_from({ + prefix: '🚀', + name: 'base256emoji', + encode: dist_src_bases_base256emoji_encode, + decode: dist_src_bases_base256emoji_decode +}); +//# sourceMappingURL=base256emoji.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base36.js + +const dist_src_bases_base36_base36 = multiformats_dist_src_bases_base_baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}); +const dist_src_bases_base36_base36upper = multiformats_dist_src_bases_base_baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}); +//# sourceMappingURL=base36.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base64.js + +const dist_src_bases_base64_base64 = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}); +const dist_src_bases_base64_base64pad = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}); +const dist_src_bases_base64_base64url = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}); +const dist_src_bases_base64_base64urlpad = multiformats_dist_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}); +//# sourceMappingURL=base64.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/base8.js + +const dist_src_bases_base8_base8 = multiformats_dist_src_bases_base_rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}); +//# sourceMappingURL=base8.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/bases/identity.js + +const dist_src_bases_identity_identity = multiformats_dist_src_bases_base_from({ + prefix: '\x00', + name: 'identity', + encode: (buf) => node_modules_multiformats_dist_src_bytes_toString(buf), + decode: (str) => multiformats_dist_src_bytes_fromString(str) +}); +//# sourceMappingURL=identity.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/codecs/json.js +const dist_src_codecs_json_textEncoder = new TextEncoder(); +const dist_src_codecs_json_textDecoder = new TextDecoder(); +const dist_src_codecs_json_name = 'json'; +const dist_src_codecs_json_code = 0x0200; +function dist_src_codecs_json_encode(node) { + return dist_src_codecs_json_textEncoder.encode(JSON.stringify(node)); +} +function dist_src_codecs_json_decode(data) { + return JSON.parse(dist_src_codecs_json_textDecoder.decode(data)); +} +//# sourceMappingURL=json.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/hashes/identity.js + + +const dist_src_hashes_identity_code = 0x0; +const dist_src_hashes_identity_name = 'identity'; +const dist_src_hashes_identity_encode = node_modules_multiformats_dist_src_bytes_coerce; +function dist_src_hashes_identity_digest(input) { + return multiformats_dist_src_hashes_digest_create(dist_src_hashes_identity_code, dist_src_hashes_identity_encode(input)); +} +const dist_src_hashes_identity_identity = { code: dist_src_hashes_identity_code, name: dist_src_hashes_identity_name, encode: dist_src_hashes_identity_encode, digest: dist_src_hashes_identity_digest }; +//# sourceMappingURL=identity.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/index.js /** - * Long.js's Long class if available. - * @type {Constructor} + * @packageDocumentation + * + * This library defines common interfaces and low level building blocks for various interrelated multiformat technologies (multicodec, multihash, multibase, and CID). They can be used to implement custom base encoders / decoders / codecs, codec encoders /decoders and multihash hashers that comply to the interface that layers above assume. + * + * This library provides implementations for most basics and many others can be found in linked repositories. + * + * ```TypeScript + * import { CID } from 'multiformats/cid' + * import * as json from 'multiformats/codecs/json' + * import { sha256 } from 'multiformats/hashes/sha2' + * + * const bytes = json.encode({ hello: 'world' }) + * + * const hash = await sha256.digest(bytes) + * const cid = CID.create(1, json.code, hash) + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * ``` + * + * ## Creating Blocks + * + * ```TypeScript + * import * as Block from 'multiformats/block' + * import * as codec from '@ipld/dag-cbor' + * import { sha256 as hasher } from 'multiformats/hashes/sha2' + * + * const value = { hello: 'world' } + * + * // encode a block + * let block = await Block.encode({ value, codec, hasher }) + * + * block.value // { hello: 'world' } + * block.bytes // Uint8Array + * block.cid // CID() w/ sha2-256 hash address and dag-cbor codec + * + * // you can also decode blocks from their binary state + * block = await Block.decode({ bytes: block.bytes, codec, hasher }) + * + * // if you have the cid you can also verify the hash on decode + * block = await Block.create({ bytes: block.bytes, cid: block.cid, codec, hasher }) + * ``` + * + * ## Multibase Encoders / Decoders / Codecs + * + * CIDs can be serialized to string representation using multibase encoders that implement [`MultibaseEncoder`](https://github.com/multiformats/js-multiformats/blob/master/src/bases/interface.ts) interface. This library provides quite a few implementations that can be imported: + * + * ```TypeScript + * import { base64 } from "multiformats/bases/base64" + * cid.toString(base64.encoder) + * //> 'mAYAEEiCTojlxqRTl6svwqNJRVM2jCcPBxy+7mRTUfGDzy2gViA' + * ``` + * + * Parsing CID string serialized CIDs requires multibase decoder that implements [`MultibaseDecoder`](https://github.com/multiformats/js-multiformats/blob/master/src/bases/interface.ts) interface. This library provides a decoder for every encoder it provides: + * + * ```TypeScript + * CID.parse('mAYAEEiCTojlxqRTl6svwqNJRVM2jCcPBxy+7mRTUfGDzy2gViA', base64.decoder) + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * ``` + * + * Dual of multibase encoder & decoder is defined as multibase codec and it exposes + * them as `encoder` and `decoder` properties. For added convenience codecs also + * implement `MultibaseEncoder` and `MultibaseDecoder` interfaces so they could be + * used as either or both: + * + * ```TypeScript + * cid.toString(base64) + * CID.parse(cid.toString(base64), base64) + * ``` + * + * **Note:** CID implementation comes bundled with `base32` and `base58btc` + * multibase codecs so that CIDs can be base serialized to (version specific) + * default base encoding and parsed without having to supply base encoders/decoders: + * + * ```TypeScript + * const v1 = CID.parse('bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea') + * v1.toString() + * //> 'bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea' + * + * const v0 = CID.parse('QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n') + * v0.toString() + * //> 'QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n' + * v0.toV1().toString() + * //> 'bafybeihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku' + * ``` + * + * ## Multicodec Encoders / Decoders / Codecs + * + * This library defines [`BlockEncoder`, `BlockDecoder` and `BlockCodec` interfaces](https://github.com/multiformats/js-multiformats/blob/master/src/codecs/interface.ts). + * Codec implementations should conform to the `BlockCodec` interface which implements both `BlockEncoder` and `BlockDecoder`. + * Here is an example implementation of JSON `BlockCodec`. + * + * ```TypeScript + * export const { name, code, encode, decode } = { + * name: 'json', + * code: 0x0200, + * encode: json => new TextEncoder().encode(JSON.stringify(json)), + * decode: bytes => JSON.parse(new TextDecoder().decode(bytes)) + * } + * ``` + * + * ## Multihash Hashers + * + * This library defines [`MultihashHasher` and `MultihashDigest` interfaces](https://github.com/multiformats/js-multiformats/blob/master/src/hashes/interface.ts) and convinient function for implementing them: + * + * ```TypeScript + * import * as hasher from 'multiformats/hashes/hasher' + * + * const sha256 = hasher.from({ + * // As per multiformats table + * // https://github.com/multiformats/multicodec/blob/master/table.csv#L9 + * name: 'sha2-256', + * code: 0x12, + * + * encode: (input) => new Uint8Array(crypto.createHash('sha256').update(input).digest()) + * }) + * + * const hash = await sha256.digest(json.encode({ hello: 'world' })) + * CID.create(1, json.code, hash) + * + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * ``` + * + * ## Traversal + * + * This library contains higher-order functions for traversing graphs of data easily. + * + * `walk()` walks through the links in each block of a DAG calling a user-supplied loader function for each one, in depth-first order with no duplicate block visits. The loader should return a `Block` object and can be used to inspect and collect block ordering for a full DAG walk. The loader should `throw` on error, and return `null` if a block should be skipped by `walk()`. + * + * ```TypeScript + * import { walk } from 'multiformats/traversal' + * import * as Block from 'multiformats/block' + * import * as codec from 'multiformats/codecs/json' + * import { sha256 as hasher } from 'multiformats/hashes/sha2' + * + * // build a DAG (a single block for this simple example) + * const value = { hello: 'world' } + * const block = await Block.encode({ value, codec, hasher }) + * const { cid } = block + * console.log(cid) + * //> CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea) + * + * // create a loader function that also collects CIDs of blocks in + * // their traversal order + * const load = (cid, blocks) => async (cid) => { + * // fetch a block using its cid + * // e.g.: const block = await fetchBlockByCID(cid) + * blocks.push(cid) + * return block + * } + * + * // collect blocks in this DAG starting from the root `cid` + * const blocks = [] + * await walk({ cid, load: load(cid, blocks) }) + * + * console.log(blocks) + * //> [CID(bagaaierasords4njcts6vs7qvdjfcvgnume4hqohf65zsfguprqphs3icwea)] + * ``` + * + * ## Legacy interface + * + * [`blockcodec-to-ipld-format`](https://github.com/ipld/js-blockcodec-to-ipld-format) converts a multiformats [`BlockCodec`](https://github.com/multiformats/js-multiformats/blob/master/src/codecs/interface.ts#L21) into an + * [`interface-ipld-format`](https://github.com/ipld/interface-ipld-format) for use with the [`ipld`](https://github.com/ipld/ipld) package. This can help bridge IPLD codecs implemented using the structure and interfaces defined here to existing code that assumes, or requires `interface-ipld-format`. This bridge also includes the relevant TypeScript definitions. + * + * ## Implementations + * + * By default, no base encodings (other than base32 & base58btc), hash functions, + * or codec implementations are exposed by `multiformats`, you need to + * import the ones you need yourself. + * + * ### Multibase codecs + * + * | bases | import | repo | + * | ------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------- | + * | `base16` | `multiformats/bases/base16` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * | `base32`, `base32pad`, `base32hex`, `base32hexpad`, `base32z` | `multiformats/bases/base32` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * | `base64`, `base64pad`, `base64url`, `base64urlpad` | `multiformats/bases/base64` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * | `base58btc`, `base58flick4` | `multiformats/bases/base58` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) | + * + * Other (less useful) bases implemented in [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/bases) include: `base2`, `base8`, `base10`, `base36` and `base256emoji`. + * + * ### Multihash hashers + * + * | hashes | import | repo | + * | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------ | + * | `sha2-256`, `sha2-512` | `multiformats/hashes/sha2` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/hashes) | + * | `sha3-224`, `sha3-256`, `sha3-384`,`sha3-512`, `shake-128`, `shake-256`, `keccak-224`, `keccak-256`, `keccak-384`, `keccak-512` | `@multiformats/sha3` | [multiformats/js-sha3](https://github.com/multiformats/js-sha3) | + * | `identity` | `multiformats/hashes/identity` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/hashes/identity.js) | + * | `murmur3-128`, `murmur3-32` | `@multiformats/murmur3` | [multiformats/js-murmur3](https://github.com/multiformats/js-murmur3) | + * | `blake2b-*`, `blake2s-*` | `@multiformats/blake2` | [multiformats/js-blake2](https://github.com/multiformats/js-blake2) | + * + * ### IPLD codecs (multicodec) + * + * | codec | import | repo | + * | ---------- | -------------------------- | ------------------------------------------------------------------------------------------------------ | + * | `raw` | `multiformats/codecs/raw` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/codecs) | + * | `json` | `multiformats/codecs/json` | [multiformats/js-multiformats](https://github.com/multiformats/js-multiformats/tree/master/src/codecs) | + * | `dag-cbor` | `@ipld/dag-cbor` | [ipld/js-dag-cbor](https://github.com/ipld/js-dag-cbor) | + * | `dag-json` | `@ipld/dag-json` | [ipld/js-dag-json](https://github.com/ipld/js-dag-json) | + * | `dag-pb` | `@ipld/dag-pb` | [ipld/js-dag-pb](https://github.com/ipld/js-dag-pb) | + * | `dag-jose` | `dag-jose` | [ceramicnetwork/js-dag-jose](https://github.com/ceramicnetwork/js-dag-jose) | */ -util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long - || /* istanbul ignore next */ util.global.Long - || util.inquire("long"); -/** - * Regular expression used to verify 2 bit (`bool`) map keys. - * @type {RegExp} - * @const - */ -util.key2Re = /^true|false|0|1$/; -/** - * Regular expression used to verify 32 bit (`int32` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key32Re = /^-?(?:0|[1-9][0-9]*)$/; -/** - * Regular expression used to verify 64 bit (`int64` etc.) map keys. - * @type {RegExp} - * @const - */ -util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/; -/** - * Converts a number or long to an 8 characters long hash string. - * @param {Long|number} value Value to convert - * @returns {string} Hash - */ -util.longToHash = function longToHash(value) { - return value - ? util.LongBits.from(value).toHash() - : util.LongBits.zeroHash; -}; -/** - * Converts an 8 characters long hash string to a long or number. - * @param {string} hash Hash - * @param {boolean} [unsigned=false] Whether unsigned or not - * @returns {Long|number} Original value - */ -util.longFromHash = function longFromHash(hash, unsigned) { - var bits = util.LongBits.fromHash(hash); - if (util.Long) - return util.Long.fromBits(bits.lo, bits.hi, unsigned); - return bits.toNumber(Boolean(unsigned)); -}; +// This way TS will also expose all the types from module -/** - * Merges the properties of the source object into the destination object. - * @memberof util - * @param {Object.} dst Destination object - * @param {Object.} src Source object - * @param {boolean} [ifNotSet=false] Merges only if the key is not already set - * @returns {Object.} Destination object - */ -function merge(dst, src, ifNotSet) { // used by converters - for (var keys = Object.keys(src), i = 0; i < keys.length; ++i) - if (dst[keys[i]] === undefined || !ifNotSet) - dst[keys[i]] = src[keys[i]]; - return dst; -} -util.merge = merge; +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats/dist/src/basics.js -/** - * Converts the first character of a string to lower case. - * @param {string} str String to convert - * @returns {string} Converted string - */ -util.lcFirst = function lcFirst(str) { - return str.charAt(0).toLowerCase() + str.substring(1); -}; -/** - * Creates a custom error constructor. - * @memberof util - * @param {string} name Error name - * @returns {Constructor} Custom error constructor - */ -function newError(name) { - function CustomError(message, properties) { - if (!(this instanceof CustomError)) - return new CustomError(message, properties); - // Error.call(this, message); - // ^ just returns a new error instance because the ctor can be called as a function - Object.defineProperty(this, "message", { get: function() { return message; } }); - /* istanbul ignore next */ - if (Error.captureStackTrace) // node - Error.captureStackTrace(this, CustomError); - else - Object.defineProperty(this, "stack", { value: new Error().stack || "" }); - if (properties) - merge(this, properties); - } - (CustomError.prototype = Object.create(Error.prototype)).constructor = CustomError; - Object.defineProperty(CustomError.prototype, "name", { get: function() { return name; } }); - CustomError.prototype.toString = function toString() { - return this.name + ": " + this.message; - }; - return CustomError; -} -util.newError = newError; -/** - * Constructs a new protocol error. - * @classdesc Error subclass indicating a protocol specifc error. - * @memberof util - * @extends Error - * @template T extends Message - * @constructor - * @param {string} message Error message - * @param {Object.} [properties] Additional properties - * @example - * try { - * MyMessage.decode(someBuffer); // throws if required fields are missing - * } catch (e) { - * if (e instanceof ProtocolError && e.instance) - * console.log("decoded so far: " + JSON.stringify(e.instance)); - * } - */ -util.ProtocolError = newError("ProtocolError"); -/** - * So far decoded message instance. - * @name util.ProtocolError#instance - * @type {Message} - */ +const dist_src_basics_bases = { ...dist_src_bases_identity_namespaceObject, ...dist_src_bases_base2_namespaceObject, ...dist_src_bases_base8_namespaceObject, ...dist_src_bases_base10_namespaceObject, ...dist_src_bases_base16_namespaceObject, ...multiformats_dist_src_bases_base32_namespaceObject, ...dist_src_bases_base36_namespaceObject, ...multiformats_dist_src_bases_base58_namespaceObject, ...multiformats_dist_src_bases_base64_namespaceObject, ...dist_src_bases_base256emoji_namespaceObject }; +const dist_src_basics_hashes = { ...dist_src_hashes_sha2_namespaceObject, ...dist_src_hashes_identity_namespaceObject }; +const dist_src_basics_codecs = { raw: dist_src_codecs_raw_namespaceObject, json: dist_src_codecs_json_namespaceObject }; -/** - * A OneOf getter as returned by {@link util.oneOfGetter}. - * @typedef OneOfGetter - * @type {function} - * @returns {string|undefined} Set field name, if any - */ +//# sourceMappingURL=basics.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/uint8arrays/dist/src/alloc.js /** - * Builds a getter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfGetter} Unbound getter + * Returns a `Uint8Array` of the requested size. Referenced memory will + * be initialized to 0. */ -util.oneOfGetter = function getOneOf(fieldNames) { - var fieldMap = {}; - for (var i = 0; i < fieldNames.length; ++i) - fieldMap[fieldNames[i]] = 1; - - /** - * @returns {string|undefined} Set field name, if any - * @this Object - * @ignore - */ - return function() { // eslint-disable-line consistent-return - for (var keys = Object.keys(this), i = keys.length - 1; i > -1; --i) - if (fieldMap[keys[i]] === 1 && this[keys[i]] !== undefined && this[keys[i]] !== null) - return keys[i]; - }; -}; - +function ipfs_unixfs_importer_node_modules_uint8arrays_dist_src_alloc_alloc(size = 0) { + if (globalThis.Buffer?.alloc != null) { + return asUint8Array(globalThis.Buffer.alloc(size)); + } + return new Uint8Array(size); +} /** - * A OneOf setter as returned by {@link util.oneOfSetter}. - * @typedef OneOfSetter - * @type {function} - * @param {string|undefined} value Field name - * @returns {undefined} + * Where possible returns a Uint8Array of the requested size that references + * uninitialized memory. Only use if you are certain you will immediately + * overwrite every value in the returned `Uint8Array`. */ +function ipfs_unixfs_importer_node_modules_uint8arrays_dist_src_alloc_allocUnsafe(size = 0) { + if (globalThis.Buffer?.allocUnsafe != null) { + return ipfs_unixfs_importer_node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.allocUnsafe(size)); + } + return new Uint8Array(size); +} +//# sourceMappingURL=alloc.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/uint8arrays/dist/src/util/bases.js -/** - * Builds a setter for a oneof's present field name. - * @param {string[]} fieldNames Field names - * @returns {OneOfSetter} Unbound setter - */ -util.oneOfSetter = function setOneOf(fieldNames) { - /** - * @param {string} name Field name - * @returns {undefined} - * @this Object - * @ignore - */ - return function(name) { - for (var i = 0; i < fieldNames.length; ++i) - if (fieldNames[i] !== name) - delete this[fieldNames[i]]; +function dist_src_util_bases_createCodec(name, prefix, encode, decode) { + return { + name, + prefix, + encoder: { + name, + prefix, + encode + }, + decoder: { + decode + } }; +} +const dist_src_util_bases_string = dist_src_util_bases_createCodec('utf8', 'u', (buf) => { + const decoder = new TextDecoder('utf8'); + return 'u' + decoder.decode(buf); +}, (str) => { + const encoder = new TextEncoder(); + return encoder.encode(str.substring(1)); +}); +const dist_src_util_bases_ascii = dist_src_util_bases_createCodec('ascii', 'a', (buf) => { + let string = 'a'; + for (let i = 0; i < buf.length; i++) { + string += String.fromCharCode(buf[i]); + } + return string; +}, (str) => { + str = str.substring(1); + const buf = ipfs_unixfs_importer_node_modules_uint8arrays_dist_src_alloc_allocUnsafe(str.length); + for (let i = 0; i < str.length; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}); +const dist_src_util_bases_BASES = { + utf8: dist_src_util_bases_string, + 'utf-8': dist_src_util_bases_string, + hex: dist_src_basics_bases.base16, + latin1: dist_src_util_bases_ascii, + ascii: dist_src_util_bases_ascii, + binary: dist_src_util_bases_ascii, + ...dist_src_basics_bases }; +/* harmony default export */ const node_modules_uint8arrays_dist_src_util_bases = (dist_src_util_bases_BASES); +//# sourceMappingURL=bases.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/uint8arrays/dist/src/from-string.js + /** - * Default conversion options used for {@link Message#toJSON} implementations. - * - * These options are close to proto3's JSON mapping with the exception that internal types like Any are handled just like messages. More precisely: + * Create a `Uint8Array` from the passed string * - * - Longs become strings - * - Enums become string keys - * - Bytes become base64 encoded strings - * - (Sub-)Messages become plain objects - * - Maps become plain objects with all string keys - * - Repeated fields become arrays - * - NaN and Infinity for float and double fields become strings + * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module. * - * @type {IConversionOptions} - * @see https://developers.google.com/protocol-buffers/docs/proto3?hl=en#json + * Also `ascii` which is similar to node's 'binary' encoding. */ -util.toJSONOptions = { - longs: String, - enums: String, - bytes: String, - json: true -}; - -// Sets up buffer utility according to the environment (called in index-minimal) -util._configure = function() { - var Buffer = util.Buffer; - /* istanbul ignore if */ - if (!Buffer) { - util._Buffer_from = util._Buffer_allocUnsafe = null; - return; +function node_modules_uint8arrays_dist_src_from_string_fromString(string, encoding = 'utf8') { + const base = node_modules_uint8arrays_dist_src_util_bases[encoding]; + if (base == null) { + throw new Error(`Unsupported encoding "${encoding}"`); } - // because node 4.x buffers are incompatible & immutable - // see: https://github.com/dcodeIO/protobuf.js/pull/665 - util._Buffer_from = Buffer.from !== Uint8Array.from && Buffer.from || - /* istanbul ignore next */ - function Buffer_from(value, encoding) { - return new Buffer(value, encoding); - }; - util._Buffer_allocUnsafe = Buffer.allocUnsafe || - /* istanbul ignore next */ - function Buffer_allocUnsafe(size) { - return new Buffer(size); - }; -}; - - -/***/ }), - -/***/ 64693: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; + if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) { + return ipfs_unixfs_importer_node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.from(string, 'utf-8')); + } + // add multibase prefix + return base.decoder.decode(`${base.prefix}${string}`); // eslint-disable-line @typescript-eslint/restrict-template-expressions +} +//# sourceMappingURL=from-string.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/dag-builder/validate-chunks.js -module.exports = Writer; -var util = __nccwpck_require__(39807); +const defaultChunkValidator = () => { + return async function* validateChunks(source) { + for await (const content of source) { + if (content.length === undefined) { + throw err_code(new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); + } + if (typeof content === 'string' || content instanceof String) { + yield node_modules_uint8arrays_dist_src_from_string_fromString(content.toString()); + } + else if (Array.isArray(content)) { + yield Uint8Array.from(content); + } + else if (content instanceof Uint8Array) { + yield content; + } + else { + throw err_code(new Error('Content was invalid'), 'ERR_INVALID_CONTENT'); + } + } + }; +}; +//# sourceMappingURL=validate-chunks.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/layout/balanced.js -var BufferWriter; // cyclic +const DEFAULT_MAX_CHILDREN_PER_NODE = 174; +function balanced(options) { + const maxChildrenPerNode = options?.maxChildrenPerNode ?? DEFAULT_MAX_CHILDREN_PER_NODE; + return async function balancedLayout(source, reduce) { + const roots = []; + for await (const chunked of it_batch_dist_src(source, maxChildrenPerNode)) { + roots.push(await reduce(chunked)); + } + if (roots.length > 1) { + return balancedLayout(roots, reduce); + } + return roots[0]; + }; +} +//# sourceMappingURL=balanced.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/dir.js -var LongBits = util.LongBits, - base64 = util.base64, - utf8 = util.utf8; +class Dir { + options; + root; + dir; + path; + dirty; + flat; + parent; + parentKey; + unixfs; + mode; + mtime; + cid; + size; + nodeSize; + constructor(props, options) { + this.options = options ?? {}; + this.root = props.root; + this.dir = props.dir; + this.path = props.path; + this.dirty = props.dirty; + this.flat = props.flat; + this.parent = props.parent; + this.parentKey = props.parentKey; + this.unixfs = props.unixfs; + this.mode = props.mode; + this.mtime = props.mtime; + } +} +// we use these to calculate the node size to use as a check for whether a directory +// should be sharded or not. Since CIDs have a constant length and We're only +// interested in the data length and not the actual content identifier we can use +// any old CID instead of having to hash the data which is expensive. +const CID_V0 = node_modules_multiformats_dist_src_cid_CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'); +const CID_V1 = node_modules_multiformats_dist_src_cid_CID.parse('zdj7WbTaiJT1fgatdet9Ei9iDB5hdCxkbVyhyh8YTUnXMiwYi'); +//# sourceMappingURL=dir.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/dir-flat.js + + + + +class DirFlat extends Dir { + _children; + constructor(props, options) { + super(props, options); + this._children = new Map(); + } + async put(name, value) { + this.cid = undefined; + this.size = undefined; + this.nodeSize = undefined; + this._children.set(name, value); + } + async get(name) { + return Promise.resolve(this._children.get(name)); + } + childCount() { + return this._children.size; + } + directChildrenCount() { + return this.childCount(); + } + onlyChild() { + return this._children.values().next().value; + } + async *eachChildSeries() { + for (const [key, child] of this._children.entries()) { + yield { + key, + child + }; + } + } + estimateNodeSize() { + if (this.nodeSize !== undefined) { + return this.nodeSize; + } + this.nodeSize = 0; + // estimate size only based on DAGLink name and CID byte lengths + // https://github.com/ipfs/go-unixfsnode/blob/37b47f1f917f1b2f54c207682f38886e49896ef9/data/builder/directory.go#L81-L96 + for (const [name, child] of this._children.entries()) { + if (child.size != null && (child.cid != null)) { + this.nodeSize += name.length + (this.options.cidVersion === 1 ? CID_V1.bytes.byteLength : CID_V0.bytes.byteLength); + } + } + return this.nodeSize; + } + async *flush(block) { + const links = []; + for (const [name, child] of this._children.entries()) { + let result = child; + if (child instanceof Dir) { + for await (const entry of child.flush(block)) { + result = entry; + yield entry; + } + } + if (result.size != null && (result.cid != null)) { + links.push({ + Name: name, + Tsize: Number(result.size), + Hash: result.cid + }); + } + } + const unixfs = new src_UnixFS({ + type: 'directory', + mtime: this.mtime, + mode: this.mode + }); + const node = { Data: unixfs.marshal(), Links: links }; + const buffer = src_encode(prepare(node)); + const cid = await persist(buffer, block, this.options); + const size = buffer.length + node.Links.reduce( + /** + * @param {number} acc + * @param {PBLink} curr + */ + (acc, curr) => acc + (curr.Tsize == null ? 0 : curr.Tsize), 0); + this.cid = cid; + this.size = size; + yield { + cid, + unixfs, + path: this.path, + size: BigInt(size) + }; + } +} +//# sourceMappingURL=dir-flat.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bytes.js +const unixfs_node_modules_multiformats_src_bytes_empty = new Uint8Array(0) /** - * Constructs a new writer operation instance. - * @classdesc Scheduled writer operation. - * @constructor - * @param {function(*, Uint8Array, number)} fn Function to call - * @param {number} len Value byte length - * @param {*} val Value to write - * @ignore + * @param {Uint8Array} d */ -function Op(fn, len, val) { - - /** - * Function to call. - * @type {function(Uint8Array, number, *)} - */ - this.fn = fn; - - /** - * Value byte length. - * @type {number} - */ - this.len = len; - - /** - * Next operation. - * @type {Writer.Op|undefined} - */ - this.next = undefined; +const unixfs_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') - /** - * Value to write. - * @type {*} - */ - this.val = val; // type varies +/** + * @param {string} hex + */ +const unixfs_node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : unixfs_node_modules_multiformats_src_bytes_empty } -/* istanbul ignore next */ -function noop() {} // eslint-disable-line no-empty-function - /** - * Constructs a new writer state instance. - * @classdesc Copied writer state. - * @memberof Writer - * @constructor - * @param {Writer} writer Writer to copy state from - * @ignore + * @param {Uint8Array} aa + * @param {Uint8Array} bb */ -function State(writer) { - - /** - * Current head. - * @type {Writer.Op} - */ - this.head = writer.head; - - /** - * Current tail. - * @type {Writer.Op} - */ - this.tail = writer.tail; +const unixfs_node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false + } - /** - * Current buffer length. - * @type {number} - */ - this.len = writer.len; + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false + } + } - /** - * Next state. - * @type {State|null} - */ - this.next = writer.states; + return true } /** - * Constructs a new writer instance. - * @classdesc Wire format writer using `Uint8Array` if available, otherwise `Array`. - * @constructor + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} */ -function Writer() { - - /** - * Current length. - * @type {number} - */ - this.len = 0; - - /** - * Operations head. - * @type {Object} - */ - this.head = new Op(noop, 0, 0); - - /** - * Operations tail - * @type {Object} - */ - this.tail = this.head; - - /** - * Linked forked states. - * @type {Object|null} - */ - this.states = null; - - // When a value is written, the writer calculates its byte length and puts it into a linked - // list of operations to perform when finish() is called. This both allows us to allocate - // buffers of the exact required size and reduces the amount of work we have to do compared - // to first calculating over objects and then encoding over objects. In our case, the encoding - // part is just a linked list walk calling operations with already prepared values. +const unixfs_node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) + } + throw new Error('Unknown type, must be binary type') } -var create = function create() { - return util.Buffer - ? function create_buffer_setup() { - return (Writer.create = function create_buffer() { - return new BufferWriter(); - })(); - } - /* istanbul ignore next */ - : function create_array() { - return new Writer(); - }; -}; - /** - * Creates a new writer. - * @function - * @returns {BufferWriter|Writer} A {@link BufferWriter} when Buffers are supported, otherwise a {@link Writer} + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} */ -Writer.create = create(); +const unixfs_node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) /** - * Allocates a buffer of the specified size. - * @param {number} size Buffer size - * @returns {Uint8Array} Buffer + * @param {string} str + * @returns {Uint8Array} */ -Writer.alloc = function alloc(size) { - return new util.Array(size); -}; - -// Use Uint8Array buffer pool in the browser, just like node does with buffers -/* istanbul ignore else */ -if (util.Array !== Array) - Writer.alloc = util.pool(Writer.alloc, util.Array.prototype.subarray); +const unixfs_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) /** - * Pushes a new operation to the queue. - * @param {function(Uint8Array, number, *)} fn Function to call - * @param {number} len Value byte length - * @param {number} val Value to write - * @returns {Writer} `this` - * @private + * @param {Uint8Array} b + * @returns {string} */ -Writer.prototype._push = function push(fn, len, val) { - this.tail = this.tail.next = new Op(fn, len, val); - this.len += len; - return this; -}; +const unixfs_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) -function writeByte(val, buf, pos) { - buf[pos] = val & 255; -} -function writeVarint32(val, buf, pos) { - while (val > 127) { - buf[pos++] = val & 127 | 128; - val >>>= 7; + +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function unixfs_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); } - buf[pos] = val; + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str + } + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch + } + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + } } +var unixfs_node_modules_multiformats_vendor_base_x_src = unixfs_node_modules_multiformats_vendor_base_x_base; -/** - * Constructs a new varint writer operation instance. - * @classdesc Scheduled varint writer operation. - * @extends Op - * @constructor - * @param {number} len Value byte length - * @param {number} val Value to write - * @ignore - */ -function VarintOp(len, val) { - this.len = len; - this.next = undefined; - this.val = val; -} +var unixfs_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = unixfs_node_modules_multiformats_vendor_base_x_src; -VarintOp.prototype = Object.create(Op.prototype); -VarintOp.prototype.fn = writeVarint32; +/* harmony default export */ const unixfs_node_modules_multiformats_vendor_base_x = (unixfs_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); -/** - * Writes an unsigned 32 bit value as a varint. - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.uint32 = function write_uint32(value) { - // here, the call to this.push has been inlined and a varint specific Op subclass is used. - // uint32 is by far the most frequently used operation and benefits significantly from this. - this.len += (this.tail = this.tail.next = new VarintOp( - (value = value >>> 0) - < 128 ? 1 - : value < 16384 ? 2 - : value < 2097152 ? 3 - : value < 268435456 ? 4 - : 5, - value)).len; - return this; -}; +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base.js + + +// Linter can't see that API is used in types. +// eslint-disable-next-line -/** - * Writes a signed 32 bit value as a varint. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.int32 = function write_int32(value) { - return value < 0 - ? this._push(writeVarint64, 10, LongBits.fromNumber(value)) // 10 bytes per spec - : this.uint32(value); -}; /** - * Writes a 32 bit value as a varint, zig-zag encoded. - * @param {number} value Value to write - * @returns {Writer} `this` + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} */ -Writer.prototype.sint32 = function write_sint32(value) { - return this.uint32((value << 1 ^ value >> 31) >>> 0); -}; +class unixfs_node_modules_multiformats_src_bases_base_Encoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + */ + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + } -function writeVarint64(val, buf, pos) { - while (val.hi) { - buf[pos++] = val.lo & 127 | 128; - val.lo = (val.lo >>> 7 | val.hi << 25) >>> 0; - val.hi >>>= 7; - } - while (val.lo > 127) { - buf[pos++] = val.lo & 127 | 128; - val.lo = val.lo >>> 7; + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') } - buf[pos++] = val.lo; + } } /** - * Writes an unsigned 64 bit value as a varint. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. + * @template {string} Prefix */ -Writer.prototype.uint64 = function write_uint64(value) { - var bits = LongBits.from(value); - return this._push(writeVarint64, bits.length(), bits); -}; - /** - * Writes a signed 64 bit value as a varint. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} */ -Writer.prototype.int64 = Writer.prototype.uint64; +class unixfs_node_modules_multiformats_src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') + } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode + } + + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) + } + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') + } + } + + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return unixfs_node_modules_multiformats_src_bases_base_or(this, decoder) + } +} /** - * Writes a signed 64 bit value as a varint, zig-zag encoded. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. + * @template {string} Prefix + * @typedef {Record>} Decoders */ -Writer.prototype.sint64 = function write_sint64(value) { - var bits = LongBits.from(value).zzEncode(); - return this._push(writeVarint64, bits.length(), bits); -}; /** - * Writes a boolish value as a varint. - * @param {boolean} value Value to write - * @returns {Writer} `this` + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} */ -Writer.prototype.bool = function write_bool(value) { - return this._push(writeByte, 1, value ? 1 : 0); -}; +class unixfs_node_modules_multiformats_src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders + } -function writeFixed32(val, buf, pos) { - buf[pos ] = val & 255; - buf[pos + 1] = val >>> 8 & 255; - buf[pos + 2] = val >>> 16 & 255; - buf[pos + 3] = val >>> 24; + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return unixfs_node_modules_multiformats_src_bases_base_or(this, decoder) + } + + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) + } + } } /** - * Writes an unsigned 32 bit value as fixed 32 bits. - * @param {number} value Value to write - * @returns {Writer} `this` + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} */ -Writer.prototype.fixed32 = function write_fixed32(value) { - return this._push(writeFixed32, 4, value >>> 0); -}; +const unixfs_node_modules_multiformats_src_bases_base_or = (left, right) => new unixfs_node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) /** - * Writes a signed 32 bit value as fixed 32 bits. - * @function - * @param {number} value Value to write - * @returns {Writer} `this` + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} */ -Writer.prototype.sfixed32 = Writer.prototype.fixed32; +class unixfs_node_modules_multiformats_src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new unixfs_node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new unixfs_node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode) + } -/** - * Writes an unsigned 64 bit value as fixed 64 bits. - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. - */ -Writer.prototype.fixed64 = function write_fixed64(value) { - var bits = LongBits.from(value); - return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi); -}; + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) + } + + /** + * @param {string} input + */ + decode (input) { + return this.decoder.decode(input) + } +} /** - * Writes a signed 64 bit value as fixed 64 bits. - * @function - * @param {Long|number|string} value Value to write - * @returns {Writer} `this` - * @throws {TypeError} If `value` is a string and no long library is present. + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} */ -Writer.prototype.sfixed64 = Writer.prototype.fixed64; +const unixfs_node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new unixfs_node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode) /** - * Writes a float (32 bit). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} */ -Writer.prototype.float = function write_float(value) { - return this._push(util.float.writeFloatLE, 4, value); -}; +const unixfs_node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = unixfs_node_modules_multiformats_vendor_base_x(alphabet, name) + return unixfs_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => unixfs_node_modules_multiformats_src_bytes_coerce(decode(text)) + }) +} /** - * Writes a double (64 bit float). - * @function - * @param {number} value Value to write - * @returns {Writer} `this` + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} */ -Writer.prototype.double = function write_double(value) { - return this._push(util.float.writeDoubleLE, 8, value); -}; +const unixfs_node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i + } -var writeBytes = util.Array.prototype.set - ? function writeBytes_set(val, buf, pos) { - buf.set(val, pos); // also works for plain array values + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end + } + + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) + + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) } - /* istanbul ignore next */ - : function writeBytes_for(val, buf, pos) { - for (var i = 0; i < val.length; ++i) - buf[pos + i] = val[i]; - }; -/** - * Writes a sequence of bytes. - * @param {Uint8Array|string} value Buffer or base64 encoded string to write - * @returns {Writer} `this` - */ -Writer.prototype.bytes = function write_bytes(value) { - var len = value.length >>> 0; - if (!len) - return this._push(writeByte, 1, 0); - if (util.isString(value)) { - var buf = Writer.alloc(len = base64.length(value)); - base64.decode(value, buf, 0); - value = buf; + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar + + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) } - return this.uint32(len)._push(writeBytes, len, value); -}; + } -/** - * Writes a string. - * @param {string} value Value to write - * @returns {Writer} `this` - */ -Writer.prototype.string = function write_string(value) { - var len = utf8.length(value); - return len - ? this.uint32(len)._push(utf8.write, len, value) - : this._push(writeByte, 1, 0); -}; + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') + } -/** - * Forks this writer's state by pushing it to a stack. - * Calling {@link Writer#reset|reset} or {@link Writer#ldelim|ldelim} resets the writer to the previous state. - * @returns {Writer} `this` - */ -Writer.prototype.fork = function fork() { - this.states = new State(this); - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; - return this; -}; + return out +} /** - * Resets this instance to the last state. - * @returns {Writer} `this` + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} */ -Writer.prototype.reset = function reset() { - if (this.states) { - this.head = this.states.head; - this.tail = this.states.tail; - this.len = this.states.len; - this.states = this.states.next; - } else { - this.head = this.tail = new Op(noop, 0, 0); - this.len = 0; +const unixfs_node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' + + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 + + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] } - return this; -}; + } -/** - * Resets to the last state and appends the fork state's current write length as a varint followed by its operations. - * @returns {Writer} `this` - */ -Writer.prototype.ldelim = function ldelim() { - var head = this.head, - tail = this.tail, - len = this.len; - this.reset().uint32(len); - if (len) { - this.tail.next = head.next; // skip noop - this.tail = tail; - this.len += len; + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] + } + + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' } - return this; -}; + } + + return out +} /** - * Finishes the write operation. - * @returns {Uint8Array} Finished buffer + * RFC4648 Factory + * + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar */ -Writer.prototype.finish = function finish() { - var head = this.head.next, // skip noop - buf = this.constructor.alloc(this.len), - pos = 0; - while (head) { - head.fn(head.val, buf, pos); - pos += head.len; - head = head.next; +const unixfs_node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return unixfs_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return unixfs_node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return unixfs_node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) } - // this.head = this.tail = null; - return buf; -}; + }) +} -Writer._configure = function(BufferWriter_) { - BufferWriter = BufferWriter_; - Writer.create = create(); - BufferWriter._configure(); -}; +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base32.js -/***/ }), +const unixfs_node_modules_multiformats_src_bases_base32_base32 = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) -/***/ 42788: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const unixfs_node_modules_multiformats_src_bases_base32_base32upper = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) -"use strict"; +const unixfs_node_modules_multiformats_src_bases_base32_base32pad = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) -module.exports = BufferWriter; +const unixfs_node_modules_multiformats_src_bases_base32_base32padupper = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) -// extends Writer -var Writer = __nccwpck_require__(64693); -(BufferWriter.prototype = Object.create(Writer.prototype)).constructor = BufferWriter; +const unixfs_node_modules_multiformats_src_bases_base32_base32hex = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) -var util = __nccwpck_require__(39807); +const unixfs_node_modules_multiformats_src_bases_base32_base32hexupper = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) -/** - * Constructs a new buffer writer instance. - * @classdesc Wire format writer using node buffers. - * @extends Writer - * @constructor - */ -function BufferWriter() { - Writer.call(this); -} +const unixfs_node_modules_multiformats_src_bases_base32_base32hexpad = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) -BufferWriter._configure = function () { - /** - * Allocates a buffer of the specified size. - * @function - * @param {number} size Buffer size - * @returns {Buffer} Buffer - */ - BufferWriter.alloc = util._Buffer_allocUnsafe; +const unixfs_node_modules_multiformats_src_bases_base32_base32hexpadupper = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) - BufferWriter.writeBytesBuffer = util.Buffer && util.Buffer.prototype instanceof Uint8Array && util.Buffer.prototype.set.name === "set" - ? function writeBytesBuffer_set(val, buf, pos) { - buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited) - // also works for plain array values - } - /* istanbul ignore next */ - : function writeBytesBuffer_copy(val, buf, pos) { - if (val.copy) // Buffer values - val.copy(buf, pos, 0, val.length); - else for (var i = 0; i < val.length;) // plain array values - buf[pos++] = val[i++]; - }; -}; +const unixfs_node_modules_multiformats_src_bases_base32_base32z = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base58.js -/** - * @override - */ -BufferWriter.prototype.bytes = function write_bytes_buffer(value) { - if (util.isString(value)) - value = util._Buffer_from(value, "base64"); - var len = value.length >>> 0; - this.uint32(len); - if (len) - this._push(BufferWriter.writeBytesBuffer, len, value); - return this; -}; -function writeStringBuffer(val, buf, pos) { - if (val.length < 40) // plain js is faster for short strings (probably due to redundant assertions) - util.utf8.write(val, buf, pos); - else if (buf.utf8Write) - buf.utf8Write(val, pos); - else - buf.write(val, pos); -} +const unixfs_node_modules_multiformats_src_bases_base58_base58btc = unixfs_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) -/** - * @override - */ -BufferWriter.prototype.string = function write_string_buffer(value) { - var len = util.Buffer.byteLength(value); - this.uint32(len); - if (len) - this._push(writeStringBuffer, len, value); - return this; -}; +const unixfs_node_modules_multiformats_src_bases_base58_base58flickr = unixfs_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/vendor/varint.js +var unixfs_node_modules_multiformats_vendor_varint_encode_1 = unixfs_node_modules_multiformats_vendor_varint_encode; -/** - * Finishes the write operation. - * @name BufferWriter#finish - * @function - * @returns {Buffer} Finished buffer - */ +var unixfs_node_modules_multiformats_vendor_varint_MSB = 0x80 + , unixfs_node_modules_multiformats_vendor_varint_REST = 0x7F + , unixfs_node_modules_multiformats_vendor_varint_MSBALL = ~unixfs_node_modules_multiformats_vendor_varint_REST + , unixfs_node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31); -BufferWriter._configure(); +function unixfs_node_modules_multiformats_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + + while(num >= unixfs_node_modules_multiformats_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | unixfs_node_modules_multiformats_vendor_varint_MSB; + num /= 128; + } + while(num & unixfs_node_modules_multiformats_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | unixfs_node_modules_multiformats_vendor_varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + + unixfs_node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1; + + return out +} + +var unixfs_node_modules_multiformats_vendor_varint_decode = unixfs_node_modules_multiformats_vendor_varint_read; + +var unixfs_node_modules_multiformats_vendor_varint_MSB$1 = 0x80 + , unixfs_node_modules_multiformats_vendor_varint_REST$1 = 0x7F; + +function unixfs_node_modules_multiformats_vendor_varint_read(buf, offset) { + var res = 0 + , offset = offset || 0 + , shift = 0 + , counter = offset + , b + , l = buf.length; + do { + if (counter >= l) { + unixfs_node_modules_multiformats_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint') + } + b = buf[counter++]; + res += shift < 28 + ? (b & unixfs_node_modules_multiformats_vendor_varint_REST$1) << shift + : (b & unixfs_node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= unixfs_node_modules_multiformats_vendor_varint_MSB$1) -/***/ }), + unixfs_node_modules_multiformats_vendor_varint_read.bytes = counter - offset; -/***/ 2682: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + return res +} +var unixfs_node_modules_multiformats_vendor_varint_N1 = Math.pow(2, 7); +var unixfs_node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14); +var unixfs_node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21); +var unixfs_node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28); +var unixfs_node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35); +var unixfs_node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42); +var unixfs_node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49); +var unixfs_node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56); +var unixfs_node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63); -const { instantiateSync } = __nccwpck_require__(63088); -const fs = __nccwpck_require__(57147) +var unixfs_node_modules_multiformats_vendor_varint_length = function (value) { + return ( + value < unixfs_node_modules_multiformats_vendor_varint_N1 ? 1 + : value < unixfs_node_modules_multiformats_vendor_varint_N2 ? 2 + : value < unixfs_node_modules_multiformats_vendor_varint_N3 ? 3 + : value < unixfs_node_modules_multiformats_vendor_varint_N4 ? 4 + : value < unixfs_node_modules_multiformats_vendor_varint_N5 ? 5 + : value < unixfs_node_modules_multiformats_vendor_varint_N6 ? 6 + : value < unixfs_node_modules_multiformats_vendor_varint_N7 ? 7 + : value < unixfs_node_modules_multiformats_vendor_varint_N8 ? 8 + : value < unixfs_node_modules_multiformats_vendor_varint_N9 ? 9 + : 10 + ) +}; -loadWebAssembly.supported = typeof WebAssembly !== 'undefined' +var unixfs_node_modules_multiformats_vendor_varint_varint = { + encode: unixfs_node_modules_multiformats_vendor_varint_encode_1 + , decode: unixfs_node_modules_multiformats_vendor_varint_decode + , encodingLength: unixfs_node_modules_multiformats_vendor_varint_length +}; -async function loadWebAssembly (imp = {}) { - if (!loadWebAssembly.supported) return null - - return instantiateSync(fs.readFileSync(__nccwpck_require__.ab + "rabin.wasm"), imp); -} -module.exports = loadWebAssembly +var unixfs_node_modules_multiformats_vendor_varint_brrp_varint = unixfs_node_modules_multiformats_vendor_varint_varint; +/* harmony default export */ const unixfs_node_modules_multiformats_vendor_varint = (unixfs_node_modules_multiformats_vendor_varint_brrp_varint); -/***/ }), +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/varint.js -/***/ 41333: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const Rabin = __nccwpck_require__(91098) -const getRabin = __nccwpck_require__(2682) +/** + * @param {Uint8Array} data + * @param {number} [offset=0] + * @returns {[number, number]} + */ +const unixfs_node_modules_multiformats_src_varint_decode = (data, offset = 0) => { + const code = unixfs_node_modules_multiformats_vendor_varint.decode(data, offset) + return [code, unixfs_node_modules_multiformats_vendor_varint.decode.bytes] +} -const create = async (avg, min, max, windowSize, polynomial) => { - const compiled = await getRabin() - return new Rabin(compiled, avg, min, max, windowSize, polynomial) +/** + * @param {number} int + * @param {Uint8Array} target + * @param {number} [offset=0] + */ +const unixfs_node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => { + unixfs_node_modules_multiformats_vendor_varint.encode(int, target, offset) + return target } -module.exports = { - Rabin, - create +/** + * @param {number} int + * @returns {number} + */ +const unixfs_node_modules_multiformats_src_varint_encodingLength = (int) => { + return unixfs_node_modules_multiformats_vendor_varint.encodingLength(int) } +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/hashes/digest.js -/***/ }), -/***/ 91098: -/***/ ((module) => { /** - * Rabin fingerprinting + * Creates a multihash digest. * - * @class Rabin + * @template {number} Code + * @param {Code} code + * @param {Uint8Array} digest */ -class Rabin { - /** - * Creates an instance of Rabin. - * @param { import("./../dist/rabin-wasm") } asModule - * @param {number} [bits=12] - * @param {number} [min=8 * 1024] - * @param {number} [max=32 * 1024] - * @param {number} polynomial - * @memberof Rabin - */ - constructor(asModule, bits = 12, min = 8 * 1024, max = 32 * 1024, windowSize = 64, polynomial) { - this.bits = bits - this.min = min - this.max = max - this.asModule = asModule - this.rabin = new asModule.Rabin(bits, min, max, windowSize, polynomial) - this.polynomial = polynomial - } +const unixfs_node_modules_multiformats_src_hashes_digest_create = (code, digest) => { + const size = digest.byteLength + const sizeOffset = unixfs_node_modules_multiformats_src_varint_encodingLength(code) + const digestOffset = sizeOffset + unixfs_node_modules_multiformats_src_varint_encodingLength(size) - /** - * Fingerprints the buffer - * - * @param {Uint8Array} buf - * @returns {Array} - * @memberof Rabin - */ - fingerprint(buf) { - const { - __retain, - __release, - __allocArray, - __getInt32Array, - Int32Array_ID, - Uint8Array_ID - } = this.asModule + const bytes = new Uint8Array(digestOffset + size) + unixfs_node_modules_multiformats_src_varint_encodeTo(code, bytes, 0) + unixfs_node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset) + bytes.set(digest, digestOffset) - const lengths = new Int32Array(Math.ceil(buf.length/this.min)) - const lengthsPtr = __retain(__allocArray(Int32Array_ID, lengths)) - const pointer = __retain(__allocArray(Uint8Array_ID, buf)) + return new unixfs_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) +} - const out = this.rabin.fingerprint(pointer, lengthsPtr) - const processed = __getInt32Array(out) +/** + * Turns bytes representation of multihash digest into an instance. + * + * @param {Uint8Array} multihash + * @returns {MultihashDigest} + */ +const unixfs_node_modules_multiformats_src_hashes_digest_decode = (multihash) => { + const bytes = unixfs_node_modules_multiformats_src_bytes_coerce(multihash) + const [code, sizeOffset] = unixfs_node_modules_multiformats_src_varint_decode(bytes) + const [size, digestOffset] = unixfs_node_modules_multiformats_src_varint_decode(bytes.subarray(sizeOffset)) + const digest = bytes.subarray(sizeOffset + digestOffset) - __release(pointer) - __release(lengthsPtr) + if (digest.byteLength !== size) { + throw new Error('Incorrect length') + } - const end = processed.indexOf(0); - return end >= 0 ? processed.subarray(0, end) : processed; - } + return new unixfs_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes) } -module.exports = Rabin +/** + * @param {MultihashDigest} a + * @param {unknown} b + * @returns {b is MultihashDigest} + */ +const unixfs_node_modules_multiformats_src_hashes_digest_equals = (a, b) => { + if (a === b) { + return true + } else { + const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b) -/***/ }), + return ( + a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + unixfs_node_modules_multiformats_src_bytes_equals(a.bytes, data.bytes) + ) + } +} -/***/ 25213: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/** + * @typedef {import('./interface.js').MultihashDigest} MultihashDigest + */ -"use strict"; -/* eslint-disable node/no-deprecated-api */ +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + * + * @template {number} Code + * @template {number} Size + * @class + * @implements {MultihashDigest} + */ +class unixfs_node_modules_multiformats_src_hashes_digest_Digest { + /** + * Creates a multihash digest. + * + * @param {Code} code + * @param {Size} size + * @param {Uint8Array} digest + * @param {Uint8Array} bytes + */ + constructor (code, size, digest, bytes) { + this.code = code + this.size = size + this.digest = digest + this.bytes = bytes + } +} +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/cid.js -var buffer = __nccwpck_require__(14300) -var Buffer = buffer.Buffer -var safer = {} -var key +// Linter can see that API is used in types. +// eslint-disable-next-line -for (key in buffer) { - if (!buffer.hasOwnProperty(key)) continue - if (key === 'SlowBuffer' || key === 'Buffer') continue - safer[key] = buffer[key] -} -var Safer = safer.Buffer = {} -for (key in Buffer) { - if (!Buffer.hasOwnProperty(key)) continue - if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue - Safer[key] = Buffer[key] -} -safer.Buffer.prototype = Buffer.prototype +// This way TS will also expose all the types from module -if (!Safer.from || Safer.from === Uint8Array.from) { - Safer.from = function (value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) - } - if (value && typeof value.length === 'undefined') { - throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) - } - return Buffer(value, encodingOrOffset, length) - } -} -if (!Safer.alloc) { - Safer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - var buf = Buffer(size) - if (!fill || fill.length === 0) { - buf.fill(0) - } else if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - return buf +/** + * @template {API.Link} T + * @template {string} Prefix + * @param {T} link + * @param {API.MultibaseEncoder} [base] + * @returns {API.ToString} + */ +const unixfs_node_modules_multiformats_src_cid_format = (link, base) => { + const { bytes, version } = link + switch (version) { + case 0: + return unixfs_node_modules_multiformats_src_cid_toStringV0( + bytes, + unixfs_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder<"z">} */ (base) || unixfs_node_modules_multiformats_src_bases_base58_base58btc.encoder + ) + default: + return unixfs_node_modules_multiformats_src_cid_toStringV1( + bytes, + unixfs_node_modules_multiformats_src_cid_baseCache(link), + /** @type {API.MultibaseEncoder} */ (base || unixfs_node_modules_multiformats_src_bases_base32_base32.encoder) + ) } } -if (!safer.kStringMaxLength) { - try { - safer.kStringMaxLength = process.binding('buffer').kStringMaxLength - } catch (e) { - // we can't determine kStringMaxLength in environments where process.binding - // is unsupported, so let's not set it - } -} +/** + * @template {API.UnknownLink} Link + * @param {Link} link + * @returns {API.LinkJSON} + */ +const unixfs_node_modules_multiformats_src_cid_toJSON = (link) => ({ + '/': unixfs_node_modules_multiformats_src_cid_format(link) +}) -if (!safer.constants) { - safer.constants = { - MAX_LENGTH: safer.kMaxLength - } - if (safer.kStringMaxLength) { - safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength +/** + * @template {API.UnknownLink} Link + * @param {API.LinkJSON} json + */ +const unixfs_node_modules_multiformats_src_cid_fromJSON = (json) => + unixfs_node_modules_multiformats_src_cid_CID.parse(json['/']) + +/** @type {WeakMap>} */ +const unixfs_node_modules_multiformats_src_cid_cache = new WeakMap() + +/** + * @param {API.UnknownLink} cid + * @returns {Map} + */ +const unixfs_node_modules_multiformats_src_cid_baseCache = cid => { + const baseCache = unixfs_node_modules_multiformats_src_cid_cache.get(cid) + if (baseCache == null) { + const baseCache = new Map() + unixfs_node_modules_multiformats_src_cid_cache.set(cid, baseCache) + return baseCache } + return baseCache } -module.exports = safer +/** + * @template {unknown} [Data=unknown] + * @template {number} [Format=number] + * @template {number} [Alg=number] + * @template {API.Version} [Version=API.Version] + * @implements {API.Link} + */ +class unixfs_node_modules_multiformats_src_cid_CID { + /** + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content. + * @param {Uint8Array} bytes + */ + constructor (version, code, multihash, bytes) { + /** @readonly */ + this.code = code + /** @readonly */ + this.version = version + /** @readonly */ + this.multihash = multihash + /** @readonly */ + this.bytes = bytes -/***/ }), + // flag to serializers that this is a CID and + // should be treated specially + /** @readonly */ + this['/'] = bytes + } -/***/ 447: -/***/ ((module) => { + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID () { + return this + } -"use strict"; + // ArrayBufferView + get byteOffset () { + return this.bytes.byteOffset + } + // ArrayBufferView + get byteLength () { + return this.bytes.byteLength + } -// JS treats subjects of bitwise operators as SIGNED 32 bit numbers, -// which means the maximum amount of bits we can store inside each byte -// is 7.. -const BITS_PER_BYTE = 7 + /** + * @returns {CID} + */ + toV0 () { + switch (this.version) { + case 0: { + return /** @type {CID} */ (this) + } + case 1: { + const { code, multihash } = this -module.exports = class SparseArray { - constructor () { - this._bitArrays = [] - this._data = [] - this._length = 0 - this._changedLength = false - this._changedData = false + if (code !== unixfs_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0') + } + + // sha2-256 + if (multihash.code !== unixfs_node_modules_multiformats_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0') + } + + return /** @type {CID} */ ( + unixfs_node_modules_multiformats_src_cid_CID.createV0( + /** @type {API.MultihashDigest} */ (multihash) + ) + ) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 0. This is a bug please report` + ) + } + } } - set (index, value) { - let pos = this._internalPositionFor(index, false) - if (value === undefined) { - // unsetting - if (pos !== -1) { - // remove item from bit array and array itself - this._unsetInternalPos(pos) - this._unsetBit(index) - this._changedLength = true - this._changedData = true + /** + * @returns {CID} + */ + toV1 () { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash + const multihash = unixfs_node_modules_multiformats_src_hashes_digest_create(code, digest) + return /** @type {CID} */ ( + unixfs_node_modules_multiformats_src_cid_CID.createV1(this.code, multihash) + ) } - } else { - let needsSort = false - if (pos === -1) { - pos = this._data.length - this._setBit(index) - this._changedData = true - } else { - needsSort = true + case 1: { + return /** @type {CID} */ (this) + } + default: { + throw Error( + `Can not convert CID version ${this.version} to version 1. This is a bug please report` + ) } - this._setInternalPos(pos, index, value, needsSort) - this._changedLength = true } } - unset (index) { - this.set(index, undefined) + /** + * @param {unknown} other + * @returns {other is CID} + */ + equals (other) { + return unixfs_node_modules_multiformats_src_cid_CID.equals(this, other) } - get (index) { - this._sortData() - const pos = this._internalPositionFor(index, true) - if (pos === -1) { - return undefined - } - return this._data[pos][1] + /** + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {API.Link} self + * @param {unknown} other + * @returns {other is CID} + */ + static equals (self, other) { + const unknown = + /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ ( + other + ) + return ( + unknown && + self.code === unknown.code && + self.version === unknown.version && + unixfs_node_modules_multiformats_src_hashes_digest_equals(self.multihash, unknown.multihash) + ) } - push (value) { - this.set(this.length, value) - return this.length + /** + * @param {API.MultibaseEncoder} [base] + * @returns {string} + */ + toString (base) { + return unixfs_node_modules_multiformats_src_cid_format(this, base) } - get length () { - this._sortData() - if (this._changedLength) { - const last = this._data[this._data.length - 1] - this._length = last ? last[0] + 1 : 0 - this._changedLength = false - } - return this._length + /** + * @returns {API.LinkJSON} + */ + toJSON () { + return { '/': unixfs_node_modules_multiformats_src_cid_format(this) } } - forEach (iterator) { - let i = 0 - while(i < this.length) { - iterator(this.get(i), i, this) - i++ - } + link () { + return this } - map (iterator) { - let i = 0 - let mapped = new Array(this.length) - while(i < this.length) { - mapped[i] = iterator(this.get(i), i, this) - i++ - } - return mapped + get [Symbol.toStringTag] () { + return 'CID' } - reduce (reducer, initialValue) { - let i = 0 - let acc = initialValue - while(i < this.length) { - const value = this.get(i) - acc = reducer(acc, value, i) - i++ - } - return acc + // Legacy + + [Symbol.for('nodejs.util.inspect.custom')] () { + return `CID(${this.toString()})` } - find (finder) { - let i = 0, found, last - while ((i < this.length) && !found) { - last = this.get(i) - found = finder(last) - i++ + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @template {unknown} U + * @param {API.Link|U} input + * @returns {CID|null} + */ + static asCID (input) { + if (input == null) { + return null } - return found ? last : undefined - } - _internalPositionFor (index, noCreate) { - const bytePos = this._bytePosFor(index, noCreate) - if (bytePos >= this._bitArrays.length) { - return -1 + const value = /** @type {any} */ (input) + if (value instanceof unixfs_node_modules_multiformats_src_cid_CID) { + // If value is instance of CID then we're all set. + return value + } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value + return new unixfs_node_modules_multiformats_src_cid_CID( + version, + code, + /** @type {API.MultihashDigest} */ (multihash), + bytes || unixfs_node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes) + ) + } else if (value[unixfs_node_modules_multiformats_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value + const digest = + /** @type {API.MultihashDigest} */ + (unixfs_node_modules_multiformats_src_hashes_digest_decode(multihash)) + return unixfs_node_modules_multiformats_src_cid_CID.create(version, code, digest) + } else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null } - const byte = this._bitArrays[bytePos] - const bitPos = index - bytePos * BITS_PER_BYTE - const exists = (byte & (1 << bitPos)) > 0 - if (!exists) { - return -1 + } + + /** + * + * @template {unknown} Data + * @template {number} Format + * @template {number} Alg + * @template {API.Version} Version + * @param {Version} version - Version of the CID + * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param {API.MultihashDigest} digest - (Multi)hash of the of the content. + * @returns {CID} + */ + static create (version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported') } - const previousPopCount = this._bitArrays.slice(0, bytePos).reduce(popCountReduce, 0) - const mask = ~(0xffffffff << (bitPos + 1)) - const bytePopCount = popCount(byte & mask) - const arrayPos = previousPopCount + bytePopCount - 1 - return arrayPos - } + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest') + } - _bytePosFor (index, noCreate) { - const bytePos = Math.floor(index / BITS_PER_BYTE) - const targetLength = bytePos + 1 - while (!noCreate && this._bitArrays.length < targetLength) { - this._bitArrays.push(0) + switch (version) { + case 0: { + if (code !== unixfs_node_modules_multiformats_src_cid_DAG_PB_CODE) { + throw new Error( + `Version 0 CID must use dag-pb (code: ${unixfs_node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding` + ) + } else { + return new unixfs_node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes) + } + } + case 1: { + const bytes = unixfs_node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes) + return new unixfs_node_modules_multiformats_src_cid_CID(version, code, digest, bytes) + } + default: { + throw new Error('Invalid version') + } } - return bytePos } - _setBit (index) { - const bytePos = this._bytePosFor(index, false) - this._bitArrays[bytePos] |= (1 << (index - (bytePos * BITS_PER_BYTE))) + /** + * Simplified version of `create` for CIDv0. + * + * @template {unknown} [T=unknown] + * @param {API.MultihashDigest} digest - Multihash. + * @returns {CID} + */ + static createV0 (digest) { + return unixfs_node_modules_multiformats_src_cid_CID.create(0, unixfs_node_modules_multiformats_src_cid_DAG_PB_CODE, digest) } - _unsetBit(index) { - const bytePos = this._bytePosFor(index, false) - this._bitArrays[bytePos] &= ~(1 << (index - (bytePos * BITS_PER_BYTE))) + /** + * Simplified version of `create` for CIDv1. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @param {Code} code - Content encoding format code. + * @param {API.MultihashDigest} digest - Miltihash of the content. + * @returns {CID} + */ + static createV1 (code, digest) { + return unixfs_node_modules_multiformats_src_cid_CID.create(1, code, digest) } - _setInternalPos(pos, index, value, needsSort) { - const data =this._data - const elem = [index, value] - if (needsSort) { - this._sortData() - data[pos] = elem - } else { - // new element. just shove it into the array - // but be nice about where we shove it - // in order to make sorting it later easier - if (data.length) { - if (data[data.length - 1][0] >= index) { - data.push(elem) - } else if (data[0][0] <= index) { - data.unshift(elem) - } else { - const randomIndex = Math.round(data.length / 2) - this._data = data.slice(0, randomIndex).concat(elem).concat(data.slice(randomIndex)) - } - } else { - this._data.push(elem) - } - this._changedData = true - this._changedLength = true + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + * + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ByteView>} bytes + * @returns {CID} + */ + static decode (bytes) { + const [cid, remainder] = unixfs_node_modules_multiformats_src_cid_CID.decodeFirst(bytes) + if (remainder.length) { + throw new Error('Incorrect length') } + return cid } - _unsetInternalPos (pos) { - this._data.splice(pos, 1) + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} bytes + * @returns {[CID, Uint8Array]} + */ + static decodeFirst (bytes) { + const specs = unixfs_node_modules_multiformats_src_cid_CID.inspectBytes(bytes) + const prefixSize = specs.size - specs.multihashSize + const multihashBytes = unixfs_node_modules_multiformats_src_bytes_coerce( + bytes.subarray(prefixSize, prefixSize + specs.multihashSize) + ) + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length') + } + const digestBytes = multihashBytes.subarray( + specs.multihashSize - specs.digestSize + ) + const digest = new unixfs_node_modules_multiformats_src_hashes_digest_Digest( + specs.multihashCode, + specs.digestSize, + digestBytes, + multihashBytes + ) + const cid = + specs.version === 0 + ? unixfs_node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest)) + : unixfs_node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest) + return [/** @type {CID} */(cid), bytes.subarray(specs.size)] } - _sortData () { - if (this._changedData) { - this._data.sort(sortInternal) + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + * + * @template {unknown} T + * @template {number} C + * @template {number} A + * @template {API.Version} V + * @param {API.ByteView>} initialBytes + * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }} + */ + static inspectBytes (initialBytes) { + let offset = 0 + const next = () => { + const [i, length] = unixfs_node_modules_multiformats_src_varint_decode(initialBytes.subarray(offset)) + offset += length + return i } - this._changedData = false + let version = /** @type {V} */ (next()) + let codec = /** @type {C} */ (unixfs_node_modules_multiformats_src_cid_DAG_PB_CODE) + if (/** @type {number} */(version) === 18) { + // CIDv0 + version = /** @type {V} */ (0) + offset = 0 + } else { + codec = /** @type {C} */ (next()) + } + + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`) + } + + const prefixSize = offset + const multihashCode = /** @type {A} */ (next()) // multihash code + const digestSize = next() // multihash length + const size = offset + digestSize + const multihashSize = size - prefixSize + + return { version, codec, multihashCode, digestSize, multihashSize, size } } - bitField () { - const bytes = [] - let pendingBitsForResultingByte = 8 - let pendingBitsForNewByte = 0 - let resultingByte = 0 - let newByte - const pending = this._bitArrays.slice() - while (pending.length || pendingBitsForNewByte) { - if (pendingBitsForNewByte === 0) { - newByte = pending.shift() - pendingBitsForNewByte = 7 - } + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + * + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {CID} + */ + static parse (source, base) { + const [prefix, bytes] = unixfs_node_modules_multiformats_src_cid_parseCIDtoBytes(source, base) - const usingBits = Math.min(pendingBitsForNewByte, pendingBitsForResultingByte) - const mask = ~(0b11111111 << usingBits) - const masked = newByte & mask - resultingByte |= masked << (8 - pendingBitsForResultingByte) - newByte = newByte >>> usingBits - pendingBitsForNewByte -= usingBits - pendingBitsForResultingByte -= usingBits + const cid = unixfs_node_modules_multiformats_src_cid_CID.decode(bytes) - if (!pendingBitsForResultingByte || (!pendingBitsForNewByte && !pending.length)) { - bytes.push(resultingByte) - resultingByte = 0 - pendingBitsForResultingByte = 8 - } + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix') } - // remove trailing zeroes - for(var i = bytes.length - 1; i > 0; i--) { - const value = bytes[i] - if (value === 0) { - bytes.pop() - } else { - break - } - } + // Cache string representation to avoid computing it on `this.toString()` + unixfs_node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source) - return bytes + return cid } +} - compactArray () { - this._sortData() - return this._data.map(valueOnly) +/** + * @template {string} Prefix + * @template {unknown} Data + * @template {number} Code + * @template {number} Alg + * @template {API.Version} Ver + * @param {API.ToString, Prefix>} source + * @param {API.MultibaseDecoder} [base] + * @returns {[Prefix, API.ByteView>]} + */ +const unixfs_node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base || unixfs_node_modules_multiformats_src_bases_base58_base58btc + return [ + /** @type {Prefix} */ (unixfs_node_modules_multiformats_src_bases_base58_base58btc.prefix), + decoder.decode(`${unixfs_node_modules_multiformats_src_bases_base58_base58btc.prefix}${source}`) + ] + } + case unixfs_node_modules_multiformats_src_bases_base58_base58btc.prefix: { + const decoder = base || unixfs_node_modules_multiformats_src_bases_base58_base58btc + return [/** @type {Prefix} */(unixfs_node_modules_multiformats_src_bases_base58_base58btc.prefix), decoder.decode(source)] + } + case unixfs_node_modules_multiformats_src_bases_base32_base32.prefix: { + const decoder = base || unixfs_node_modules_multiformats_src_bases_base32_base32 + return [/** @type {Prefix} */(unixfs_node_modules_multiformats_src_bases_base32_base32.prefix), decoder.decode(source)] + } + default: { + if (base == null) { + throw Error( + 'To parse non base32 or base58btc encoded CID multibase decoder must be provided' + ) + } + return [/** @type {Prefix} */(source[0]), base.decode(source)] + } } } -function popCountReduce (count, byte) { - return count + popCount(byte) -} +/** + * + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder<'z'>} base + */ +const unixfs_node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => { + const { prefix } = base + if (prefix !== unixfs_node_modules_multiformats_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`) + } -function popCount(_v) { - let v = _v - v = v - ((v >> 1) & 0x55555555) // reuse input as temporary - v = (v & 0x33333333) + ((v >> 2) & 0x33333333) // temp - return ((v + (v >> 4) & 0xF0F0F0F) * 0x1010101) >> 24 + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes).slice(1) + cache.set(prefix, cid) + return cid + } else { + return cid + } } -function sortInternal (a, b) { - return a[0] - b[0] +/** + * @template {string} Prefix + * @param {Uint8Array} bytes + * @param {Map} cache + * @param {API.MultibaseEncoder} base + */ +const unixfs_node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => { + const { prefix } = base + const cid = cache.get(prefix) + if (cid == null) { + const cid = base.encode(bytes) + cache.set(prefix, cid) + return cid + } else { + return cid + } } -function valueOnly (elem) { - return elem[1] +const unixfs_node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70 +const unixfs_node_modules_multiformats_src_cid_SHA_256_CODE = 0x12 + +/** + * @param {API.Version} version + * @param {number} code + * @param {Uint8Array} multihash + * @returns {Uint8Array} + */ +const unixfs_node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => { + const codeOffset = unixfs_node_modules_multiformats_src_varint_encodingLength(version) + const hashOffset = codeOffset + unixfs_node_modules_multiformats_src_varint_encodingLength(code) + const bytes = new Uint8Array(hashOffset + multihash.byteLength) + unixfs_node_modules_multiformats_src_varint_encodeTo(version, bytes, 0) + unixfs_node_modules_multiformats_src_varint_encodeTo(code, bytes, codeOffset) + bytes.set(multihash, hashOffset) + return bytes } -/***/ }), +const unixfs_node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID') -/***/ 79546: -/***/ ((module) => { +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/hashes/hasher.js -module.exports = readable => { - // Node.js stream - if (readable[Symbol.asyncIterator]) return readable - // Browser ReadableStream - if (readable.getReader) { - return (async function * () { - const reader = readable.getReader() +/** + * @template {string} Name + * @template {number} Code + * @param {object} options + * @param {Name} options.name + * @param {Code} options.code + * @param {(input: Uint8Array) => Await} options.encode + */ +const unixfs_node_modules_multiformats_src_hashes_hasher_from = ({ name, code, encode }) => new unixfs_node_modules_multiformats_src_hashes_hasher_Hasher(name, code, encode) - try { - while (true) { - const { done, value } = await reader.read() - if (done) return - yield value - } - } finally { - reader.releaseLock() - } - })() +/** + * Hasher represents a hashing algorithm implementation that produces as + * `MultihashDigest`. + * + * @template {string} Name + * @template {number} Code + * @class + * @implements {MultihashHasher} + */ +class unixfs_node_modules_multiformats_src_hashes_hasher_Hasher { + /** + * + * @param {Name} name + * @param {Code} code + * @param {(input: Uint8Array) => Await} encode + */ + constructor (name, code, encode) { + this.name = name + this.code = code + this.encode = encode } - throw new Error('unknown stream') + /** + * @param {Uint8Array} input + * @returns {Await>} + */ + digest (input) { + if (input instanceof Uint8Array) { + const result = this.encode(input) + return result instanceof Uint8Array + ? unixfs_node_modules_multiformats_src_hashes_digest_create(this.code, result) + /* c8 ignore next 1 */ + : result.then(digest => unixfs_node_modules_multiformats_src_hashes_digest_create(this.code, digest)) + } else { + throw Error('Unknown type, must be binary type') + /* c8 ignore next 1 */ + } + } } +/** + * @template {number} Alg + * @typedef {import('./interface.js').MultihashHasher} MultihashHasher + */ -/***/ }), +/** + * @template T + * @typedef {Promise|T} Await + */ -/***/ 76463: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/index.js -"use strict"; -const os = __nccwpck_require__(22037); -const hasFlag = __nccwpck_require__(24099); -const env = process.env; -let forceColor; -if (hasFlag('no-color') || - hasFlag('no-colors') || - hasFlag('color=false')) { - forceColor = false; -} else if (hasFlag('color') || - hasFlag('colors') || - hasFlag('color=true') || - hasFlag('color=always')) { - forceColor = true; -} -if ('FORCE_COLOR' in env) { - forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0; -} -function translateLevel(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; +// This way TS will also expose all the types from module + + + + +// EXTERNAL MODULE: ./node_modules/murmurhash3js-revisited/index.js +var murmurhash3js_revisited = __nccwpck_require__(16665); +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/@multiformats/murmur3/src/index.js + + +// @ts-expect-error no types + + +/** + * @param {number} number + * @returns {Uint8Array} + */ +function fromNumberTo32BitBuf (number) { + const bytes = new Array(4) + for (let i = 0; i < 4; i++) { + bytes[i] = number & 0xff + number = number >> 8 + } + return new Uint8Array(bytes) } -function supportsColor(stream) { - if (forceColor === false) { - return 0; - } +const murmur332 = unixfs_node_modules_multiformats_src_hashes_hasher_from({ + name: 'murmur3-32', + code: 0x23, + encode: (input) => fromNumberTo32BitBuf(murmurhash3js_revisited.x86.hash32(input)) +}) - if (hasFlag('color=16m') || - hasFlag('color=full') || - hasFlag('color=truecolor')) { - return 3; - } +const murmur3128 = unixfs_node_modules_multiformats_src_hashes_hasher_from({ + name: 'murmur3-128', + code: 0x22, + encode: (input) => unixfs_node_modules_multiformats_src_bytes_fromHex(murmurhash3js_revisited.x64.hash128(input)) +}) - if (hasFlag('color=256')) { - return 2; - } +// A special-use 0x22 that truncates 64 bits, specifically for use in the UnixFS HAMT +const murmur364 = unixfs_node_modules_multiformats_src_hashes_hasher_from({ + name: 'murmur3-x64-64', + code: 0x22, + encode: (input) => unixfs_node_modules_multiformats_src_bytes_fromHex(murmurhash3js_revisited.x64.hash128(input)).subarray(0, 8) +}) - if (stream && !stream.isTTY && forceColor !== true) { - return 0; - } +// EXTERNAL MODULE: ./node_modules/sparse-array/index.js +var sparse_array = __nccwpck_require__(59969); +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/uint8arrays/dist/src/util/as-uint8array.js +/** + * To guarantee Uint8Array semantics, convert nodejs Buffers + * into vanilla Uint8Arrays + */ +function unixfs_node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(buf) { + if (globalThis.Buffer != null) { + return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength); + } + return buf; +} +//# sourceMappingURL=as-uint8array.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base10.js - const min = forceColor ? 1 : 0; - if (process.platform === 'win32') { - // Node.js 7.5.0 is the first version of Node.js to include a patch to - // libuv that enables 256 color output on Windows. Anything earlier and it - // won't work. However, here we target Node.js 8 at minimum as it is an LTS - // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows - // release that supports 256 colors. Windows 10 build 14931 is the first release - // that supports 16m/TrueColor. - const osRelease = os.release().split('.'); - if ( - Number(process.versions.node.split('.')[0]) >= 8 && - Number(osRelease[0]) >= 10 && - Number(osRelease[2]) >= 10586 - ) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } +const unixfs_node_modules_multiformats_src_bases_base10_base10 = unixfs_node_modules_multiformats_src_bases_base_baseX({ + prefix: '9', + name: 'base10', + alphabet: '0123456789' +}) - return 1; - } +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base16.js +// @ts-check - if ('CI' in env) { - if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') { - return 1; - } - return min; - } - if ('TEAMCITY_VERSION' in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } +const unixfs_node_modules_multiformats_src_bases_base16_base16 = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'f', + name: 'base16', + alphabet: '0123456789abcdef', + bitsPerChar: 4 +}) - if (env.COLORTERM === 'truecolor') { - return 3; - } +const unixfs_node_modules_multiformats_src_bases_base16_base16upper = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'F', + name: 'base16upper', + alphabet: '0123456789ABCDEF', + bitsPerChar: 4 +}) - if ('TERM_PROGRAM' in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10); +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base2.js +// @ts-check - switch (env.TERM_PROGRAM) { - case 'iTerm.app': - return version >= 3 ? 3 : 2; - case 'Apple_Terminal': - return 2; - // No default - } - } - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } +const unixfs_node_modules_multiformats_src_bases_base2_base2 = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '0', + name: 'base2', + alphabet: '01', + bitsPerChar: 1 +}) - if ('COLORTERM' in env) { - return 1; - } +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base256emoji.js - if (env.TERM === 'dumb') { - return min; - } - return min; +const unixfs_node_modules_multiformats_src_bases_base256emoji_alphabet = Array.from('🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂') +const unixfs_node_modules_multiformats_src_bases_base256emoji_alphabetBytesToChars = /** @type {string[]} */ (unixfs_node_modules_multiformats_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[i] = c; return p }, /** @type {string[]} */([]))) +const unixfs_node_modules_multiformats_src_bases_base256emoji_alphabetCharsToBytes = /** @type {number[]} */ (unixfs_node_modules_multiformats_src_bases_base256emoji_alphabet.reduce((p, c, i) => { p[/** @type {number} */ (c.codePointAt(0))] = i; return p }, /** @type {number[]} */([]))) + +/** + * @param {Uint8Array} data + * @returns {string} + */ +function unixfs_node_modules_multiformats_src_bases_base256emoji_encode (data) { + return data.reduce((p, c) => { + p += unixfs_node_modules_multiformats_src_bases_base256emoji_alphabetBytesToChars[c] + return p + }, '') } -function getSupportLevel(stream) { - const level = supportsColor(stream); - return translateLevel(level); +/** + * @param {string} str + * @returns {Uint8Array} + */ +function unixfs_node_modules_multiformats_src_bases_base256emoji_decode (str) { + const byts = [] + for (const char of str) { + const byt = unixfs_node_modules_multiformats_src_bases_base256emoji_alphabetCharsToBytes[/** @type {number} */ (char.codePointAt(0))] + if (byt === undefined) { + throw new Error(`Non-base256emoji character: ${char}`) + } + byts.push(byt) + } + return new Uint8Array(byts) } -module.exports = { - supportsColor: getSupportLevel, - stdout: getSupportLevel(process.stdout), - stderr: getSupportLevel(process.stderr) -}; +const unixfs_node_modules_multiformats_src_bases_base256emoji_base256emoji = unixfs_node_modules_multiformats_src_bases_base_from({ + prefix: '🚀', + name: 'base256emoji', + encode: unixfs_node_modules_multiformats_src_bases_base256emoji_encode, + decode: unixfs_node_modules_multiformats_src_bases_base256emoji_decode +}) +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base36.js -/***/ }), -/***/ 16563: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +const unixfs_node_modules_multiformats_src_bases_base36_base36 = unixfs_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'k', + name: 'base36', + alphabet: '0123456789abcdefghijklmnopqrstuvwxyz' +}) -module.exports = __nccwpck_require__(63918); +const unixfs_node_modules_multiformats_src_bases_base36_base36upper = unixfs_node_modules_multiformats_src_bases_base_baseX({ + prefix: 'K', + name: 'base36upper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' +}) +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base64.js +// @ts-check -/***/ }), -/***/ 63918: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +const unixfs_node_modules_multiformats_src_bases_base64_base64 = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) +const unixfs_node_modules_multiformats_src_bases_base64_base64pad = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) -var net = __nccwpck_require__(41808); -var tls = __nccwpck_require__(24404); -var http = __nccwpck_require__(13685); -var https = __nccwpck_require__(95687); -var events = __nccwpck_require__(82361); -var assert = __nccwpck_require__(39491); -var util = __nccwpck_require__(73837); +const unixfs_node_modules_multiformats_src_bases_base64_base64url = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) +const unixfs_node_modules_multiformats_src_bases_base64_base64urlpad = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) -exports.httpOverHttp = httpOverHttp; -exports.httpsOverHttp = httpsOverHttp; -exports.httpOverHttps = httpOverHttps; -exports.httpsOverHttps = httpsOverHttps; +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/base8.js +// @ts-check -function httpOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - return agent; -} -function httpsOverHttp(options) { - var agent = new TunnelingAgent(options); - agent.request = http.request; - agent.createSocket = createSecureSocket; - agent.defaultPort = 443; - return agent; -} +const unixfs_node_modules_multiformats_src_bases_base8_base8 = unixfs_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: '7', + name: 'base8', + alphabet: '01234567', + bitsPerChar: 3 +}) -function httpOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.request; - return agent; -} +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/bases/identity.js +// @ts-check -function httpsOverHttps(options) { - var agent = new TunnelingAgent(options); - agent.request = https.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.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) { - // Detect the request to connect same origin server, - // reuse the connection. - self.requests.splice(i, 1); - pending.request.onSocket(socket); - return; - } - } - socket.destroy(); - self.removeSocket(socket); - }); -} -util.inherits(TunnelingAgent, events.EventEmitter); +const unixfs_node_modules_multiformats_src_bases_identity_identity = unixfs_node_modules_multiformats_src_bases_base_from({ + prefix: '\x00', + name: 'identity', + encode: (buf) => unixfs_node_modules_multiformats_src_bytes_toString(buf), + decode: (str) => unixfs_node_modules_multiformats_src_bytes_fromString(str) +}) -TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) { - var self = this; - var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress)); +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/codecs/json.js +// @ts-check - if (self.sockets.length >= this.maxSockets) { - // We are over limit so we'll add it to the queue. - self.requests.push(options); - return; - } +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ - // If we are under maxSockets create a new one. - self.createSocket(options, function(socket) { - socket.on('free', onFree); - socket.on('close', onCloseOrRemove); - socket.on('agentRemove', onCloseOrRemove); - req.onSocket(socket); +const unixfs_node_modules_multiformats_src_codecs_json_textEncoder = new TextEncoder() +const unixfs_node_modules_multiformats_src_codecs_json_textDecoder = new TextDecoder() - function onFree() { - self.emit('free', socket, options); - } +const unixfs_node_modules_multiformats_src_codecs_json_name = 'json' +const unixfs_node_modules_multiformats_src_codecs_json_code = 0x0200 - function onCloseOrRemove(err) { - self.removeSocket(socket); - socket.removeListener('free', onFree); - socket.removeListener('close', onCloseOrRemove); - socket.removeListener('agentRemove', onCloseOrRemove); - } - }); -}; +/** + * @template T + * @param {T} node + * @returns {ByteView} + */ +const unixfs_node_modules_multiformats_src_codecs_json_encode = (node) => unixfs_node_modules_multiformats_src_codecs_json_textEncoder.encode(JSON.stringify(node)) -TunnelingAgent.prototype.createSocket = function createSocket(options, cb) { - var self = this; - var placeholder = {}; - self.sockets.push(placeholder); +/** + * @template T + * @param {ByteView} data + * @returns {T} + */ +const unixfs_node_modules_multiformats_src_codecs_json_decode = (data) => JSON.parse(unixfs_node_modules_multiformats_src_codecs_json_textDecoder.decode(data)) - 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'); - } +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/codecs/raw.js +// @ts-check - debug('making CONNECT request'); - var connectReq = self.request(connectOptions); - connectReq.useChunkedEncodingByDefault = false; // for v0.6 - connectReq.once('response', onResponse); // for v0.6 - connectReq.once('upgrade', onUpgrade); // for v0.6 - connectReq.once('connect', onConnect); // for v0.7 or later - connectReq.once('error', onError); - connectReq.end(); - function onResponse(res) { - // Very hacky. This is necessary to avoid http-parser leaks. - res.upgrade = true; - } - function onUpgrade(res, socket, head) { - // Hacky. - process.nextTick(function() { - onConnect(res, socket, head); - }); - } +/** + * @template T + * @typedef {import('./interface.js').ByteView} ByteView + */ - function onConnect(res, socket, head) { - connectReq.removeAllListeners(); - socket.removeAllListeners(); +const unixfs_node_modules_multiformats_src_codecs_raw_name = 'raw' +const unixfs_node_modules_multiformats_src_codecs_raw_code = 0x55 + +/** + * @param {Uint8Array} node + * @returns {ByteView} + */ +const unixfs_node_modules_multiformats_src_codecs_raw_encode = (node) => unixfs_node_modules_multiformats_src_bytes_coerce(node) + +/** + * @param {ByteView} data + * @returns {Uint8Array} + */ +const unixfs_node_modules_multiformats_src_codecs_raw_decode = (data) => unixfs_node_modules_multiformats_src_bytes_coerce(data) + +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/hashes/identity.js + + + +const unixfs_node_modules_multiformats_src_hashes_identity_code = 0x0 +const unixfs_node_modules_multiformats_src_hashes_identity_name = 'identity' + +/** @type {(input:Uint8Array) => Uint8Array} */ +const unixfs_node_modules_multiformats_src_hashes_identity_encode = unixfs_node_modules_multiformats_src_bytes_coerce + +/** + * @param {Uint8Array} input + * @returns {Digest.Digest} + */ +const unixfs_node_modules_multiformats_src_hashes_identity_digest = (input) => unixfs_node_modules_multiformats_src_hashes_digest_create(unixfs_node_modules_multiformats_src_hashes_identity_code, unixfs_node_modules_multiformats_src_hashes_identity_encode(input)) + +const unixfs_node_modules_multiformats_src_hashes_identity_identity = { code: unixfs_node_modules_multiformats_src_hashes_identity_code, name: unixfs_node_modules_multiformats_src_hashes_identity_name, encode: unixfs_node_modules_multiformats_src_hashes_identity_encode, digest: unixfs_node_modules_multiformats_src_hashes_identity_digest } + +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/hashes/sha2.js +// @ts-check + + + + + +const unixfs_node_modules_multiformats_src_hashes_sha2_sha256 = unixfs_node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-256', + code: 0x12, + encode: (input) => unixfs_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha256').update(input).digest()) +}) + +const unixfs_node_modules_multiformats_src_hashes_sha2_sha512 = unixfs_node_modules_multiformats_src_hashes_hasher_from({ + name: 'sha2-512', + code: 0x13, + encode: input => unixfs_node_modules_multiformats_src_bytes_coerce(external_crypto_.createHash('sha512').update(input).digest()) +}) + +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/multiformats/src/basics.js +// @ts-check - if (res.statusCode !== 200) { - debug('tunneling socket could not be established, statusCode=%d', - res.statusCode); - socket.destroy(); - var error = 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 = 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 = 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) { - // If we have pending requests and a socket gets closed a new one - // needs to be created to take over in the pool for the one that closed. - 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: socket, - servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host - }); - // 0 is dummy port for v0.6 - var secureSocket = tls.connect(0, tlsOptions); - self.sockets[self.sockets.indexOf(socket)] = secureSocket; - cb(secureSocket); - }); -} -function toOptions(host, port, localAddress) { - if (typeof host === 'string') { // since v0.10 - return { - host: host, - port: port, - localAddress: localAddress - }; - } - return host; // for v0.11 or later -} -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] !== undefined) { - 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; // for test -/***/ }), -/***/ 17225: -/***/ ((__unused_webpack_module, exports) => { -"use strict"; +const unixfs_node_modules_multiformats_src_basics_bases = { ...unixfs_node_modules_multiformats_src_bases_identity_namespaceObject, ...unixfs_node_modules_multiformats_src_bases_base2_namespaceObject, ...unixfs_node_modules_multiformats_src_bases_base8_namespaceObject, ...unixfs_node_modules_multiformats_src_bases_base10_namespaceObject, ...unixfs_node_modules_multiformats_src_bases_base16_namespaceObject, ...unixfs_node_modules_multiformats_src_bases_base32_namespaceObject, ...unixfs_node_modules_multiformats_src_bases_base36_namespaceObject, ...unixfs_node_modules_multiformats_src_bases_base58_namespaceObject, ...unixfs_node_modules_multiformats_src_bases_base64_namespaceObject, ...unixfs_node_modules_multiformats_src_bases_base256emoji_namespaceObject } +const unixfs_node_modules_multiformats_src_basics_hashes = { ...unixfs_node_modules_multiformats_src_hashes_sha2_namespaceObject, ...unixfs_node_modules_multiformats_src_hashes_identity_namespaceObject } +const unixfs_node_modules_multiformats_src_basics_codecs = { raw: unixfs_node_modules_multiformats_src_codecs_raw_namespaceObject, json: unixfs_node_modules_multiformats_src_codecs_json_namespaceObject } -Object.defineProperty(exports, "__esModule", ({ value: true })); -function concat(arrays, length) { - if (!length) { - length = arrays.reduce((acc, curr) => acc + curr.length, 0); - } - const output = new Uint8Array(length); - let offset = 0; - for (const arr of arrays) { - output.set(arr, offset); - offset += arr.length; - } - return output; -} -exports.concat = concat; +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/uint8arrays/dist/src/alloc.js +/** + * Returns a `Uint8Array` of the requested size. Referenced memory will + * be initialized to 0. + */ +function unixfs_node_modules_uint8arrays_dist_src_alloc_alloc(size = 0) { + if (globalThis.Buffer?.alloc != null) { + return asUint8Array(globalThis.Buffer.alloc(size)); + } + return new Uint8Array(size); +} +/** + * Where possible returns a Uint8Array of the requested size that references + * uninitialized memory. Only use if you are certain you will immediately + * overwrite every value in the returned `Uint8Array`. + */ +function unixfs_node_modules_uint8arrays_dist_src_alloc_allocUnsafe(size = 0) { + if (globalThis.Buffer?.allocUnsafe != null) { + return unixfs_node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.allocUnsafe(size)); + } + return new Uint8Array(size); +} +//# sourceMappingURL=alloc.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/uint8arrays/dist/src/util/bases.js -/***/ }), -/***/ 94646: -/***/ ((__unused_webpack_module, exports) => { +function uint8arrays_dist_src_util_bases_createCodec(name, prefix, encode, decode) { + return { + name, + prefix, + encoder: { + name, + prefix, + encode + }, + decoder: { + decode + } + }; +} +const uint8arrays_dist_src_util_bases_string = uint8arrays_dist_src_util_bases_createCodec('utf8', 'u', (buf) => { + const decoder = new TextDecoder('utf8'); + return 'u' + decoder.decode(buf); +}, (str) => { + const encoder = new TextEncoder(); + return encoder.encode(str.substring(1)); +}); +const uint8arrays_dist_src_util_bases_ascii = uint8arrays_dist_src_util_bases_createCodec('ascii', 'a', (buf) => { + let string = 'a'; + for (let i = 0; i < buf.length; i++) { + string += String.fromCharCode(buf[i]); + } + return string; +}, (str) => { + str = str.substring(1); + const buf = unixfs_node_modules_uint8arrays_dist_src_alloc_allocUnsafe(str.length); + for (let i = 0; i < str.length; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; +}); +const uint8arrays_dist_src_util_bases_BASES = { + utf8: uint8arrays_dist_src_util_bases_string, + 'utf-8': uint8arrays_dist_src_util_bases_string, + hex: unixfs_node_modules_multiformats_src_basics_bases.base16, + latin1: uint8arrays_dist_src_util_bases_ascii, + ascii: uint8arrays_dist_src_util_bases_ascii, + binary: uint8arrays_dist_src_util_bases_ascii, + ...unixfs_node_modules_multiformats_src_basics_bases +}; +/* harmony default export */ const unixfs_node_modules_uint8arrays_dist_src_util_bases = (uint8arrays_dist_src_util_bases_BASES); +//# sourceMappingURL=bases.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/uint8arrays/dist/src/from-string.js -"use strict"; +/** + * Create a `Uint8Array` from the passed string + * + * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module. + * + * Also `ascii` which is similar to node's 'binary' encoding. + */ +function unixfs_node_modules_uint8arrays_dist_src_from_string_fromString(string, encoding = 'utf8') { + const base = unixfs_node_modules_uint8arrays_dist_src_util_bases[encoding]; + if (base == null) { + throw new Error(`Unsupported encoding "${encoding}"`); + } + if ((encoding === 'utf8' || encoding === 'utf-8') && globalThis.Buffer != null && globalThis.Buffer.from != null) { + return unixfs_node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(globalThis.Buffer.from(string, 'utf-8')); + } + // add multibase prefix + return base.decoder.decode(`${base.prefix}${string}`); // eslint-disable-line @typescript-eslint/restrict-template-expressions +} +//# sourceMappingURL=from-string.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/hamt-sharding/dist/src/bucket.js +// @ts-expect-error -Object.defineProperty(exports, "__esModule", ({ value: true })); -function equals(a, b) { - if (a === b) { - return true; - } - if (a.byteLength !== b.byteLength) { - return false; - } - for (let i = 0; i < a.byteLength; i++) { - if (a[i] !== b[i]) { - return false; +class Bucket { + constructor(options, parent, posAtParent = 0) { + this._options = options; + this._popCount = 0; + this._parent = parent; + this._posAtParent = posAtParent; + this._children = new sparse_array(); + this.key = null; + } + async put(key, value) { + const place = await this._findNewBucketAndPos(key); + await place.bucket._putAt(place, key, value); + } + async get(key) { + const child = await this._findChild(key); + if (child != null) { + return child.value; + } + } + async del(key) { + const place = await this._findPlace(key); + const child = place.bucket._at(place.pos); + if (child != null && child.key === key) { + place.bucket._delAt(place.pos); + } + } + leafCount() { + const children = this._children.compactArray(); + return children.reduce((acc, child) => { + if (child instanceof Bucket) { + return acc + child.leafCount(); + } + return acc + 1; + }, 0); } - } - return true; + childrenCount() { + return this._children.length; + } + onlyChild() { + return this._children.get(0); + } + *eachLeafSeries() { + const children = this._children.compactArray(); + for (const child of children) { + if (child instanceof Bucket) { + yield* child.eachLeafSeries(); + } + else { + yield child; + } + } + } + serialize(map, reduce) { + const acc = []; + // serialize to a custom non-sparse representation + return reduce(this._children.reduce((acc, child, index) => { + if (child != null) { + if (child instanceof Bucket) { + acc.push(child.serialize(map, reduce)); + } + else { + acc.push(map(child, index)); + } + } + return acc; + }, acc)); + } + async asyncTransform(asyncMap, asyncReduce) { + return await asyncTransformBucket(this, asyncMap, asyncReduce); + } + toJSON() { + return this.serialize(mapNode, reduceNodes); + } + prettyPrint() { + return JSON.stringify(this.toJSON(), null, ' '); + } + tableSize() { + return Math.pow(2, this._options.bits); + } + async _findChild(key) { + const result = await this._findPlace(key); + const child = result.bucket._at(result.pos); + if (child instanceof Bucket) { + // should not be possible, this._findPlace should always + // return a location for a child, not a bucket + return undefined; + } + if (child != null && child.key === key) { + return child; + } + } + async _findPlace(key) { + const hashValue = this._options.hash(typeof key === 'string' ? unixfs_node_modules_uint8arrays_dist_src_from_string_fromString(key) : key); + const index = await hashValue.take(this._options.bits); + const child = this._children.get(index); + if (child instanceof Bucket) { + return await child._findPlace(hashValue); + } + return { + bucket: this, + pos: index, + hash: hashValue, + existingChild: child + }; + } + async _findNewBucketAndPos(key) { + const place = await this._findPlace(key); + if ((place.existingChild != null) && place.existingChild.key !== key) { + // conflict + const bucket = new Bucket(this._options, place.bucket, place.pos); + place.bucket._putObjectAt(place.pos, bucket); + // put the previous value + const newPlace = await bucket._findPlace(place.existingChild.hash); + newPlace.bucket._putAt(newPlace, place.existingChild.key, place.existingChild.value); + return await bucket._findNewBucketAndPos(place.hash); + } + // no conflict, we found the place + return place; + } + _putAt(place, key, value) { + this._putObjectAt(place.pos, { + key: key, + value: value, + hash: place.hash + }); + } + _putObjectAt(pos, object) { + if (this._children.get(pos) == null) { + this._popCount++; + } + this._children.set(pos, object); + } + _delAt(pos) { + if (pos === -1) { + throw new Error('Invalid position'); + } + if (this._children.get(pos) != null) { + this._popCount--; + } + this._children.unset(pos); + this._level(); + } + _level() { + if (this._parent != null && this._popCount <= 1) { + if (this._popCount === 1) { + // remove myself from parent, replacing me with my only child + const onlyChild = this._children.find(exists); + if ((onlyChild != null) && !(onlyChild instanceof Bucket)) { + const hash = onlyChild.hash; + hash.untake(this._options.bits); + const place = { + pos: this._posAtParent, + hash: hash, + bucket: this._parent + }; + this._parent._putAt(place, onlyChild.key, onlyChild.value); + } + } + else { + this._parent._delAt(this._posAtParent); + } + } + } + _at(index) { + return this._children.get(index); + } +} +function exists(o) { + return Boolean(o); +} +function mapNode(node, _) { + return node.key; +} +function reduceNodes(nodes) { + return nodes; +} +async function asyncTransformBucket(bucket, asyncMap, asyncReduce) { + const output = []; + for (const child of bucket._children.compactArray()) { + if (child instanceof Bucket) { + await asyncTransformBucket(child, asyncMap, asyncReduce); + } + else { + const mappedChildren = await asyncMap(child); + output.push({ + bitField: bucket._children.bitField(), + children: mappedChildren + }); + } + } + return await asyncReduce(output); +} +//# sourceMappingURL=bucket.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/hamt-sharding/dist/src/consumable-buffer.js +const START_MASKS = [ + 0b11111111, + 0b11111110, + 0b11111100, + 0b11111000, + 0b11110000, + 0b11100000, + 0b11000000, + 0b10000000 +]; +const STOP_MASKS = [ + 0b00000001, + 0b00000011, + 0b00000111, + 0b00001111, + 0b00011111, + 0b00111111, + 0b01111111, + 0b11111111 +]; +class ConsumableBuffer { + constructor(value) { + this._value = value; + this._currentBytePos = value.length - 1; + this._currentBitPos = 7; + } + availableBits() { + return this._currentBitPos + 1 + this._currentBytePos * 8; + } + totalBits() { + return this._value.length * 8; + } + take(bits) { + let pendingBits = bits; + let result = 0; + while (pendingBits > 0 && this._haveBits()) { + const byte = this._value[this._currentBytePos]; + const availableBits = this._currentBitPos + 1; + const taking = Math.min(availableBits, pendingBits); + const value = byteBitsToInt(byte, availableBits - taking, taking); + result = (result << taking) + value; + pendingBits -= taking; + this._currentBitPos -= taking; + if (this._currentBitPos < 0) { + this._currentBitPos = 7; + this._currentBytePos--; + } + } + return result; + } + untake(bits) { + this._currentBitPos += bits; + while (this._currentBitPos > 7) { + this._currentBitPos -= 8; + this._currentBytePos += 1; + } + } + _haveBits() { + return this._currentBytePos >= 0; + } +} +function byteBitsToInt(byte, start, length) { + const mask = maskFor(start, length); + return (byte & mask) >>> start; +} +function maskFor(start, length) { + return START_MASKS[start] & STOP_MASKS[Math.min(length + start - 1, 7)]; } +//# sourceMappingURL=consumable-buffer.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/uint8arrays/dist/src/concat.js -exports.equals = equals; +/** + * Returns a new Uint8Array created by concatenating the passed ArrayLikes + */ +function uint8arrays_dist_src_concat_concat(arrays, length) { + if (length == null) { + length = arrays.reduce((acc, curr) => acc + curr.length, 0); + } + const output = unixfs_node_modules_uint8arrays_dist_src_alloc_allocUnsafe(length); + let offset = 0; + for (const arr of arrays) { + output.set(arr, offset); + offset += arr.length; + } + return unixfs_node_modules_uint8arrays_dist_src_util_as_uint8array_asUint8Array(output); +} +//# sourceMappingURL=concat.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/hamt-sharding/dist/src/consumable-hash.js -/***/ }), -/***/ 39451: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +function wrapHash(hashFn) { + function hashing(value) { + if (value instanceof InfiniteHash) { + // already a hash. return it + return value; + } + else { + return new InfiniteHash(value, hashFn); + } + } + return hashing; +} +class InfiniteHash { + constructor(value, hashFn) { + if (!(value instanceof Uint8Array)) { + throw new Error('can only hash Uint8Arrays'); + } + this._value = value; + this._hashFn = hashFn; + this._depth = -1; + this._availableBits = 0; + this._currentBufferIndex = 0; + this._buffers = []; + } + async take(bits) { + let pendingBits = bits; + while (this._availableBits < pendingBits) { + await this._produceMoreBits(); + } + let result = 0; + while (pendingBits > 0) { + const hash = this._buffers[this._currentBufferIndex]; + const available = Math.min(hash.availableBits(), pendingBits); + const took = hash.take(available); + result = (result << available) + took; + pendingBits -= available; + this._availableBits -= available; + if (hash.availableBits() === 0) { + this._currentBufferIndex++; + } + } + return result; + } + untake(bits) { + let pendingBits = bits; + while (pendingBits > 0) { + const hash = this._buffers[this._currentBufferIndex]; + const availableForUntake = Math.min(hash.totalBits() - hash.availableBits(), pendingBits); + hash.untake(availableForUntake); + pendingBits -= availableForUntake; + this._availableBits += availableForUntake; + if (this._currentBufferIndex > 0 && hash.totalBits() === hash.availableBits()) { + this._depth--; + this._currentBufferIndex--; + } + } + } + async _produceMoreBits() { + this._depth++; + const value = this._depth > 0 ? uint8arrays_dist_src_concat_concat([this._value, Uint8Array.from([this._depth])]) : this._value; + const hashValue = await this._hashFn(value); + const buffer = new ConsumableBuffer(hashValue); + this._buffers.push(buffer); + this._availableBits += buffer.availableBits(); + } +} +//# sourceMappingURL=consumable-hash.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/hamt-sharding/dist/src/index.js -"use strict"; +function createHAMT(options) { + if (options == null || options.hashFn == null) { + throw new Error('please define an options.hashFn'); + } + const bucketOptions = { + bits: options.bits ?? 8, + hash: wrapHash(options.hashFn) + }; + return new Bucket(bucketOptions); +} -Object.defineProperty(exports, "__esModule", ({ value: true })); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/dir-sharded.js -var bases = __nccwpck_require__(91476); -function fromString(string, encoding = 'utf8') { - const base = bases[encoding]; - if (!base) { - throw new Error(`Unsupported encoding "${ encoding }"`); - } - return base.decoder.decode(`${ base.prefix }${ string }`); -} -exports.fromString = fromString; -/***/ }), -/***/ 2771: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +async function hamtHashFn(buf) { + return (await murmur3128.encode(buf)) + // Murmur3 outputs 128 bit but, accidentally, IPFS Go's + // implementation only uses the first 64, so we must do the same + // for parity.. + .slice(0, 8) + // Invert buffer because that's how Go impl does it + .reverse(); +} +const HAMT_HASH_CODE = BigInt(0x22); +const DEFAULT_FANOUT_BITS = 8; +class DirSharded extends Dir { + _bucket; + constructor(props, options) { + super(props, options); + this._bucket = createHAMT({ + hashFn: hamtHashFn, + bits: options.shardFanoutBits ?? DEFAULT_FANOUT_BITS + }); + } + async put(name, value) { + this.cid = undefined; + this.size = undefined; + this.nodeSize = undefined; + await this._bucket.put(name, value); + } + async get(name) { + return this._bucket.get(name); + } + childCount() { + return this._bucket.leafCount(); + } + directChildrenCount() { + return this._bucket.childrenCount(); + } + onlyChild() { + return this._bucket.onlyChild(); + } + async *eachChildSeries() { + for await (const { key, value } of this._bucket.eachLeafSeries()) { + yield { + key, + child: value + }; + } + } + estimateNodeSize() { + if (this.nodeSize !== undefined) { + return this.nodeSize; + } + this.nodeSize = calculateSize(this._bucket, this, this.options); + return this.nodeSize; + } + async *flush(blockstore) { + for await (const entry of flush(this._bucket, blockstore, this, this.options)) { + yield { + ...entry, + path: this.path + }; + } + } +} +/* harmony default export */ const dir_sharded = (DirSharded); +async function* flush(bucket, blockstore, shardRoot, options) { + const children = bucket._children; + const padLength = (bucket.tableSize() - 1).toString(16).length; + const links = []; + let childrenSize = 0n; + for (let i = 0; i < children.length; i++) { + const child = children.get(i); + if (child == null) { + continue; + } + const labelPrefix = i.toString(16).toUpperCase().padStart(padLength, '0'); + if (child instanceof Bucket) { + let shard; + for await (const subShard of flush(child, blockstore, null, options)) { + shard = subShard; + } + if (shard == null) { + throw new Error('Could not flush sharded directory, no subshard found'); + } + links.push({ + Name: labelPrefix, + Tsize: Number(shard.size), + Hash: shard.cid + }); + childrenSize += shard.size; + } + else if (isDir(child.value)) { + const dir = child.value; + let flushedDir; + for await (const entry of dir.flush(blockstore)) { + flushedDir = entry; + yield flushedDir; + } + if (flushedDir == null) { + throw new Error('Did not flush dir'); + } + const label = labelPrefix + child.key; + links.push({ + Name: label, + Tsize: Number(flushedDir.size), + Hash: flushedDir.cid + }); + childrenSize += flushedDir.size; + } + else { + const value = child.value; + if (value.cid == null) { + continue; + } + const label = labelPrefix + child.key; + const size = value.size; + links.push({ + Name: label, + Tsize: Number(size), + Hash: value.cid + }); + childrenSize += BigInt(size ?? 0); + } + } + // go-ipfs uses little endian, that's why we have to + // reverse the bit field before storing it + const data = Uint8Array.from(children.bitField().reverse()); + const dir = new src_UnixFS({ + type: 'hamt-sharded-directory', + data, + fanout: BigInt(bucket.tableSize()), + hashType: HAMT_HASH_CODE, + mtime: shardRoot?.mtime, + mode: shardRoot?.mode + }); + const node = { + Data: dir.marshal(), + Links: links + }; + const buffer = src_encode(prepare(node)); + const cid = await persist(buffer, blockstore, options); + const size = BigInt(buffer.byteLength) + childrenSize; + yield { + cid, + unixfs: dir, + size + }; +} +function isDir(obj) { + return typeof obj.flush === 'function'; +} +function calculateSize(bucket, shardRoot, options) { + const children = bucket._children; + const padLength = (bucket.tableSize() - 1).toString(16).length; + const links = []; + for (let i = 0; i < children.length; i++) { + const child = children.get(i); + if (child == null) { + continue; + } + const labelPrefix = i.toString(16).toUpperCase().padStart(padLength, '0'); + if (child instanceof Bucket) { + const size = calculateSize(child, null, options); + links.push({ + Name: labelPrefix, + Tsize: Number(size), + Hash: options.cidVersion === 0 ? CID_V0 : CID_V1 + }); + } + else if (typeof child.value.flush === 'function') { + const dir = child.value; + const size = dir.nodeSize(); + links.push({ + Name: labelPrefix + child.key, + Tsize: Number(size), + Hash: options.cidVersion === 0 ? CID_V0 : CID_V1 + }); + } + else { + const value = child.value; + if (value.cid == null) { + continue; + } + const label = labelPrefix + child.key; + const size = value.size; + links.push({ + Name: label, + Tsize: Number(size), + Hash: value.cid + }); + } + } + // go-ipfs uses little endian, that's why we have to + // reverse the bit field before storing it + const data = Uint8Array.from(children.bitField().reverse()); + const dir = new src_UnixFS({ + type: 'hamt-sharded-directory', + data, + fanout: BigInt(bucket.tableSize()), + hashType: HAMT_HASH_CODE, + mtime: shardRoot?.mtime, + mode: shardRoot?.mode + }); + const buffer = src_encode(prepare({ + Data: dir.marshal(), + Links: links + })); + return buffer.length; +} +//# sourceMappingURL=dir-sharded.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/flat-to-shard.js -"use strict"; + +async function flatToShard(child, dir, threshold, options) { + let newDir = dir; + if (dir instanceof DirFlat && dir.estimateNodeSize() > threshold) { + newDir = await convertToShard(dir, options); + } + const parent = newDir.parent; + if (parent != null) { + if (newDir !== dir) { + if (child != null) { + child.parent = newDir; + } + if (newDir.parentKey == null) { + throw new Error('No parent key found'); + } + await parent.put(newDir.parentKey, newDir); + } + return flatToShard(newDir, parent, threshold, options); + } + return newDir; +} +async function convertToShard(oldDir, options) { + const newDir = new dir_sharded({ + root: oldDir.root, + dir: true, + parent: oldDir.parent, + parentKey: oldDir.parentKey, + path: oldDir.path, + dirty: oldDir.dirty, + flat: false, + mtime: oldDir.mtime, + mode: oldDir.mode + }, options); + for await (const { key, child } of oldDir.eachChildSeries()) { + await newDir.put(key, child); + } + return newDir; +} +//# sourceMappingURL=flat-to-shard.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/utils/to-path-components.js +const toPathComponents = (path = '') => { + // split on / unless escaped with \ + return path.split(/(? 1)) { + yield* flushAndYield(tree, block); + } + else { + for await (const unwrapped of tree.eachChildSeries()) { + if (unwrapped == null) { + continue; + } + yield* flushAndYield(unwrapped.child, block); + } + } + }; } +//# sourceMappingURL=tree-builder.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/index.js -exports.toString = toString; -/***/ }), -/***/ 91476: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -"use strict"; -var basics = __nccwpck_require__(42916); -function createCodec(name, prefix, encode, decode) { - return { - name, - prefix, - encoder: { - name, - prefix, - encode - }, - decoder: { decode } - }; + +/** + * The importer creates UnixFS DAGs and stores the blocks that make + * them up in the passed blockstore. + * + * @example + * + * ```typescript + * import { importer } from 'ipfs-unixfs-importer' + * import { MemoryBlockstore } from 'blockstore-core' + * + * // store blocks in memory, other blockstores are available + * const blockstore = new MemoryBlockstore() + * + * const input = [{ + * path: './foo.txt', + * content: Uint8Array.from([0, 1, 2, 3, 4]) + * }, { + * path: './bar.txt', + * content: Uint8Array.from([0, 1, 2, 3, 4]) + * }] + * + * for await (const entry of importer(input, blockstore)) { + * console.info(entry) + * // { cid: CID(), ... } + * } + * ``` + */ +async function* importer(source, blockstore, options = {}) { + let candidates; + if (Symbol.asyncIterator in source || Symbol.iterator in source) { + candidates = source; + } + else { + candidates = [source]; + } + const wrapWithDirectory = options.wrapWithDirectory ?? false; + const shardSplitThresholdBytes = options.shardSplitThresholdBytes ?? 262144; + const shardFanoutBits = options.shardFanoutBits ?? 8; + const cidVersion = options.cidVersion ?? 1; + const rawLeaves = options.rawLeaves ?? true; + const leafType = options.leafType ?? 'file'; + const fileImportConcurrency = options.fileImportConcurrency ?? 50; + const blockWriteConcurrency = options.blockWriteConcurrency ?? 10; + const reduceSingleLeafToSelf = options.reduceSingleLeafToSelf ?? true; + const chunker = options.chunker ?? fixedSize(); + const chunkValidator = options.chunkValidator ?? defaultChunkValidator(); + const buildDag = options.dagBuilder ?? defaultDagBuilder({ + chunker, + chunkValidator, + wrapWithDirectory, + layout: options.layout ?? balanced(), + bufferImporter: options.bufferImporter ?? defaultBufferImporter({ + cidVersion, + rawLeaves, + leafType, + onProgress: options.onProgress + }), + blockWriteConcurrency, + reduceSingleLeafToSelf, + cidVersion, + onProgress: options.onProgress + }); + const buildTree = options.treeBuilder ?? defaultTreeBuilder({ + wrapWithDirectory, + shardSplitThresholdBytes, + shardFanoutBits, + cidVersion, + onProgress: options.onProgress + }); + for await (const entry of buildTree(parallelBatch(buildDag(candidates, blockstore), fileImportConcurrency), blockstore)) { + yield { + cid: entry.cid, + path: entry.path, + unixfs: entry.unixfs, + size: entry.size + }; + } } -const string = createCodec('utf8', 'u', buf => { - const decoder = new TextDecoder('utf8'); - return 'u' + decoder.decode(buf); -}, str => { - const encoder = new TextEncoder(); - return encoder.encode(str.substring(1)); -}); -const ascii = createCodec('ascii', 'a', buf => { - let string = 'a'; - for (let i = 0; i < buf.length; i++) { - string += String.fromCharCode(buf[i]); - } - return string; -}, str => { - str = str.substring(1); - const buf = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - buf[i] = str.charCodeAt(i); - } - return buf; -}); -const BASES = { - utf8: string, - 'utf-8': string, - hex: basics.bases.base16, - latin1: ascii, - ascii: ascii, - binary: ascii, - ...basics.bases +/** + * `importFile` is similar to `importer` except it accepts a single + * `FileCandidate` and returns a promise of a single `ImportResult` + * instead of a stream of results. + * + * @example + * + * ```typescript + * import { importFile } from 'ipfs-unixfs-importer' + * import { MemoryBlockstore } from 'blockstore-core' + * + * // store blocks in memory, other blockstores are available + * const blockstore = new MemoryBlockstore() + * + * const input: FileCandidate = { + * path: './foo.txt', + * content: Uint8Array.from([0, 1, 2, 3, 4]) + * } + * + * const entry = await importFile(input, blockstore) + * ``` + */ +async function importFile(content, blockstore, options = {}) { + const result = await it_first_dist_src(importer([content], blockstore, options)); + if (result == null) { + throw err_code(new Error('Nothing imported'), 'ERR_INVALID_PARAMS'); + } + return result; +} +/** + * `importDir` is similar to `importer` except it accepts a single + * `DirectoryCandidate` and returns a promise of a single `ImportResult` + * instead of a stream of results. + * + * @example + * + * ```typescript + * import { importDirectory } from 'ipfs-unixfs-importer' + * import { MemoryBlockstore } from 'blockstore-core' + * + * // store blocks in memory, other blockstores are available + * const blockstore = new MemoryBlockstore() + * + * const input: DirectoryCandidate = { + * path: './foo.txt' + * } + * + * const entry = await importDirectory(input, blockstore) + * ``` + */ +async function importDirectory(content, blockstore, options = {}) { + const result = await it_first_dist_src(importer([content], blockstore, options)); + if (result == null) { + throw err_code(new Error('Nothing imported'), 'ERR_INVALID_PARAMS'); + } + return result; +} +/** + * `importBytes` accepts a single Uint8Array and returns a promise + * of a single `ImportResult`. + * + * @example + * + * ```typescript + * import { importBytes } from 'ipfs-unixfs-importer' + * import { MemoryBlockstore } from 'blockstore-core' + * + * // store blocks in memory, other blockstores are available + * const blockstore = new MemoryBlockstore() + * + * const input = Uint8Array.from([0, 1, 2, 3, 4]) + * + * const entry = await importBytes(input, blockstore) + * ``` + */ +async function importBytes(buf, blockstore, options = {}) { + return importFile({ + content: buf + }, blockstore, options); +} +/** + * `importByteStream` accepts a single stream of Uint8Arrays and + * returns a promise of a single `ImportResult`. + * + * @example + * + * ```typescript + * import { importByteStream } from 'ipfs-unixfs-importer' + * import { MemoryBlockstore } from 'blockstore-core' + * + * // store blocks in memory, other blockstores are available + * const blockstore = new MemoryBlockstore() + * + * const input = [ + * Uint8Array.from([0, 1, 2, 3, 4]), + * Uint8Array.from([5, 6, 7, 8, 9]) + * ] + * + * const entry = await importByteStream(input, blockstore) + * ``` + */ +async function importByteStream(bufs, blockstore, options = {}) { + return importFile({ + content: bufs + }, blockstore, options); +} +//# sourceMappingURL=index.js.map +// EXTERNAL MODULE: ./node_modules/rabin-wasm/src/index.js +var rabin_wasm_src = __nccwpck_require__(55340); +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/chunker/rabin.js + +// @ts-expect-error no types + + +const DEFAULT_MIN_CHUNK_SIZE = 262144; +const DEFAULT_MAX_CHUNK_SIZE = 262144; +const DEFAULT_AVG_CHUNK_SIZE = 262144; +const DEFAULT_WINDOW = 16; +async function* chunker(source, r) { + const buffers = new Uint8ArrayList(); + for await (const chunk of source) { + buffers.append(chunk); + const sizes = r.fingerprint(chunk); + for (let i = 0; i < sizes.length; i++) { + const size = sizes[i]; + const buf = buffers.slice(0, size); + buffers.consume(size); + yield buf; + } + } + if (buffers.length > 0) { + yield buffers.subarray(0); + } +} +const rabin = (options = {}) => { + let min = options.minChunkSize ?? DEFAULT_MIN_CHUNK_SIZE; + let max = options.maxChunkSize ?? DEFAULT_MAX_CHUNK_SIZE; + let avg = options.avgChunkSize ?? DEFAULT_AVG_CHUNK_SIZE; + const window = options.window ?? DEFAULT_WINDOW; + // if only avg was passed, calculate min/max from that + if (options.avgChunkSize != null && options.minChunkSize == null && options.maxChunkSize == null) { + min = avg / 3; + max = avg + (avg / 2); + } + const isInvalidChunkSizes = [min, avg, max].some((size) => size == null || isNaN(size)); + if (isInvalidChunkSizes) { + if (options.avgChunkSize != null) { + throw errcode(new Error('please specify a valid average chunk size number'), 'ERR_INVALID_AVG_CHUNK_SIZE'); + } + throw errcode(new Error('please specify valid numbers for (min|max|avg)ChunkSize'), 'ERR_INVALID_CHUNK_SIZE'); + } + // validate min/max/avg in the same way as go + if (min < 16) { + throw errcode(new Error('rabin min must be greater than 16'), 'ERR_INVALID_MIN_CHUNK_SIZE'); + } + if (max < min) { + max = min; + } + if (avg < min) { + avg = min; + } + const sizepow = Math.floor(Math.log2(avg)); + return async function* rabinChunker(source) { + const r = await create(sizepow, min, max, window); + for await (const chunk of chunker(source, r)) { + yield chunk; + } + }; }; - -module.exports = BASES; +//# sourceMappingURL=rabin.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/dist/src/chunker/index.js -/***/ }), +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/add.js -/***/ 35770: -/***/ ((__unused_webpack_module, exports) => { -"use strict"; +/** + * Default importer settings match Filecoin + */ +const defaultImporterSettings = { + cidVersion: 1, + rawLeaves: true, + layout: balanced({ + maxChildrenPerNode: 1024 + }), + chunker: fixedSize({ + chunkSize: 1048576 + }) +}; +async function* addAll(source, blockstore, options = {}) { + yield* importer(source, blockstore, { + ...defaultImporterSettings, + ...options + }); +} +async function addBytes(bytes, blockstore, options = {}) { + const { cid } = await importBytes(bytes, blockstore, { + ...defaultImporterSettings, + ...options + }); + return cid; +} +async function addByteStream(bytes, blockstore, options = {}) { + const { cid } = await importByteStream(bytes, blockstore, { + ...defaultImporterSettings, + ...options + }); + return cid; +} +async function addFile(file, blockstore, options = {}) { + const { cid } = await importFile(file, blockstore, { + ...defaultImporterSettings, + ...options + }); + return cid; +} +async function addDirectory(dir, blockstore, options = {}) { + const { cid } = await importDirectory({ + ...dir, + path: dir.path ?? '-' + }, blockstore, { + ...defaultImporterSettings, + ...options + }); + return cid; +} +//# sourceMappingURL=add.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/bytes.js +const node_modules_multiformats_dist_src_bytes_empty = new Uint8Array(0); +function node_modules_multiformats_dist_src_bytes_toHex(d) { + return d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), ''); +} +function node_modules_multiformats_dist_src_bytes_fromHex(hex) { + const hexes = hex.match(/../g); + return hexes != null ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : node_modules_multiformats_dist_src_bytes_empty; +} +function node_modules_multiformats_dist_src_bytes_equals(aa, bb) { + if (aa === bb) + return true; + if (aa.byteLength !== bb.byteLength) { + return false; + } + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false; + } + } + return true; +} +function ipfs_unixfs_exporter_node_modules_multiformats_dist_src_bytes_coerce(o) { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') + return o; + if (o instanceof ArrayBuffer) + return new Uint8Array(o); + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength); + } + throw new Error('Unknown type, must be binary type'); +} +function node_modules_multiformats_dist_src_bytes_isBinary(o) { + return o instanceof ArrayBuffer || ArrayBuffer.isView(o); +} +function node_modules_multiformats_dist_src_bytes_fromString(str) { + return new TextEncoder().encode(str); +} +function ipfs_unixfs_exporter_node_modules_multiformats_dist_src_bytes_toString(b) { + return new TextDecoder().decode(b); +} +//# sourceMappingURL=bytes.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/vendor/base-x.js +/* eslint-disable */ +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +/** + * @param {string} ALPHABET + * @param {any} name + */ +function multiformats_dist_src_vendor_base_x_base(ALPHABET, name) { + if (ALPHABET.length >= 255) { + throw new TypeError('Alphabet too long'); + } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { + throw new TypeError(x + ' is ambiguous'); + } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + /** + * @param {any[] | Iterable} source + */ + function encode(source) { + // @ts-ignore + if (source instanceof Uint8Array) + ; + else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } + else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { + throw new TypeError('Expected Uint8Array'); + } + if (source.length === 0) { + return ''; + } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { + str += ALPHABET.charAt(b58[it2]); + } + return str; + } + /** + * @param {string | string[]} source + */ + function decodeUnsafe(source) { + if (typeof source !== 'string') { + throw new TypeError('Expected String'); + } + if (source.length === 0) { + return new Uint8Array(); + } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { + return; + } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { + return; + } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { + throw new Error('Non-zero carry'); + } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { + return; + } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch; + } + /** + * @param {string | string[]} string + */ + function decode(string) { + var buffer = decodeUnsafe(string); + if (buffer) { + return buffer; + } + throw new Error(`Non-${name} character`); + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode + }; +} +var multiformats_dist_src_vendor_base_x_src = multiformats_dist_src_vendor_base_x_base; +var multiformats_dist_src_vendor_base_x_brrp_multiformats_scope_baseX = multiformats_dist_src_vendor_base_x_src; +/* harmony default export */ const node_modules_multiformats_dist_src_vendor_base_x = (multiformats_dist_src_vendor_base_x_brrp_multiformats_scope_baseX); +//# sourceMappingURL=base-x.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/bases/base.js -Object.defineProperty(exports, "__esModule", ({ value: true })); -function getUserAgent() { - if (typeof navigator === "object" && "userAgent" in navigator) { - return navigator.userAgent; - } +/** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + */ +class node_modules_multiformats_dist_src_bases_base_Encoder { + name; + prefix; + baseEncode; + constructor(name, prefix, baseEncode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + } + encode(bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}`; + } + else { + throw Error('Unknown type, must be binary type'); + } + } +} +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + */ +class node_modules_multiformats_dist_src_bases_base_Decoder { + name; + prefix; + baseDecode; + prefixCodePoint; + constructor(name, prefix, baseDecode) { + this.name = name; + this.prefix = prefix; + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character'); + } + this.prefixCodePoint = prefix.codePointAt(0); + this.baseDecode = baseDecode; + } + decode(text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`); + } + return this.baseDecode(text.slice(this.prefix.length)); + } + else { + throw Error('Can only multibase decode strings'); + } + } + or(decoder) { + return node_modules_multiformats_dist_src_bases_base_or(this, decoder); + } +} +class node_modules_multiformats_dist_src_bases_base_ComposedDecoder { + decoders; + constructor(decoders) { + this.decoders = decoders; + } + or(decoder) { + return node_modules_multiformats_dist_src_bases_base_or(this, decoder); + } + decode(input) { + const prefix = input[0]; + const decoder = this.decoders[prefix]; + if (decoder != null) { + return decoder.decode(input); + } + else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`); + } + } +} +function node_modules_multiformats_dist_src_bases_base_or(left, right) { + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + return new node_modules_multiformats_dist_src_bases_base_ComposedDecoder({ + ...(left.decoders ?? { [left.prefix]: left }), + ...(right.decoders ?? { [right.prefix]: right }) + }); +} +class node_modules_multiformats_dist_src_bases_base_Codec { + name; + prefix; + baseEncode; + baseDecode; + encoder; + decoder; + constructor(name, prefix, baseEncode, baseDecode) { + this.name = name; + this.prefix = prefix; + this.baseEncode = baseEncode; + this.baseDecode = baseDecode; + this.encoder = new node_modules_multiformats_dist_src_bases_base_Encoder(name, prefix, baseEncode); + this.decoder = new node_modules_multiformats_dist_src_bases_base_Decoder(name, prefix, baseDecode); + } + encode(input) { + return this.encoder.encode(input); + } + decode(input) { + return this.decoder.decode(input); + } +} +function node_modules_multiformats_dist_src_bases_base_from({ name, prefix, encode, decode }) { + return new node_modules_multiformats_dist_src_bases_base_Codec(name, prefix, encode, decode); +} +function node_modules_multiformats_dist_src_bases_base_baseX({ name, prefix, alphabet }) { + const { encode, decode } = node_modules_multiformats_dist_src_vendor_base_x(alphabet, name); + return node_modules_multiformats_dist_src_bases_base_from({ + prefix, + name, + encode, + decode: (text) => ipfs_unixfs_exporter_node_modules_multiformats_dist_src_bytes_coerce(decode(text)) + }); +} +function node_modules_multiformats_dist_src_bases_base_decode(string, alphabet, bitsPerChar, name) { + // Build the character lookup table: + const codes = {}; + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i; + } + // Count the padding bytes: + let end = string.length; + while (string[end - 1] === '=') { + --end; + } + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0); + // Parse the data: + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + let written = 0; // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]]; + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`); + } + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value; + bits += bitsPerChar; + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8; + out[written++] = 0xff & (buffer >> bits); + } + } + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || (0xff & (buffer << (8 - bits))) !== 0) { + throw new SyntaxError('Unexpected end of data'); + } + return out; +} +function node_modules_multiformats_dist_src_bases_base_encode(data, alphabet, bitsPerChar) { + const pad = alphabet[alphabet.length - 1] === '='; + const mask = (1 << bitsPerChar) - 1; + let out = ''; + let bits = 0; // Number of bits currently in the buffer + let buffer = 0; // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i]; + bits += 8; + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar; + out += alphabet[mask & (buffer >> bits)]; + } + } + // Partial character: + if (bits !== 0) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))]; + } + // Add padding characters until we hit a byte boundary: + if (pad) { + while (((out.length * bitsPerChar) & 7) !== 0) { + out += '='; + } + } + return out; +} +/** + * RFC4648 Factory + */ +function node_modules_multiformats_dist_src_bases_base_rfc4648({ name, prefix, bitsPerChar, alphabet }) { + return node_modules_multiformats_dist_src_bases_base_from({ + prefix, + name, + encode(input) { + return node_modules_multiformats_dist_src_bases_base_encode(input, alphabet, bitsPerChar); + }, + decode(input) { + return node_modules_multiformats_dist_src_bases_base_decode(input, alphabet, bitsPerChar, name); + } + }); +} +//# sourceMappingURL=base.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/bases/base32.js - if (typeof process === "object" && "version" in process) { - return `Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`; - } +const node_modules_multiformats_dist_src_bases_base32_base32 = node_modules_multiformats_dist_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}); +const node_modules_multiformats_dist_src_bases_base32_base32upper = node_modules_multiformats_dist_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}); +const node_modules_multiformats_dist_src_bases_base32_base32pad = node_modules_multiformats_dist_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}); +const node_modules_multiformats_dist_src_bases_base32_base32padupper = node_modules_multiformats_dist_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}); +const node_modules_multiformats_dist_src_bases_base32_base32hex = node_modules_multiformats_dist_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}); +const node_modules_multiformats_dist_src_bases_base32_base32hexupper = node_modules_multiformats_dist_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}); +const node_modules_multiformats_dist_src_bases_base32_base32hexpad = node_modules_multiformats_dist_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}); +const node_modules_multiformats_dist_src_bases_base32_base32hexpadupper = node_modules_multiformats_dist_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}); +const node_modules_multiformats_dist_src_bases_base32_base32z = node_modules_multiformats_dist_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}); +//# sourceMappingURL=base32.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/bases/base58.js - return ""; +const node_modules_multiformats_dist_src_bases_base58_base58btc = node_modules_multiformats_dist_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}); +const node_modules_multiformats_dist_src_bases_base58_base58flickr = node_modules_multiformats_dist_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}); +//# sourceMappingURL=base58.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/vendor/varint.js +/* eslint-disable */ +var multiformats_dist_src_vendor_varint_encode_1 = node_modules_multiformats_dist_src_vendor_varint_encode; +var multiformats_dist_src_vendor_varint_MSB = 0x80, multiformats_dist_src_vendor_varint_REST = 0x7F, multiformats_dist_src_vendor_varint_MSBALL = ~multiformats_dist_src_vendor_varint_REST, multiformats_dist_src_vendor_varint_INT = Math.pow(2, 31); +/** + * @param {number} num + * @param {number[]} out + * @param {number} offset + */ +function node_modules_multiformats_dist_src_vendor_varint_encode(num, out, offset) { + out = out || []; + offset = offset || 0; + var oldOffset = offset; + while (num >= multiformats_dist_src_vendor_varint_INT) { + out[offset++] = (num & 0xFF) | multiformats_dist_src_vendor_varint_MSB; + num /= 128; + } + while (num & multiformats_dist_src_vendor_varint_MSBALL) { + out[offset++] = (num & 0xFF) | multiformats_dist_src_vendor_varint_MSB; + num >>>= 7; + } + out[offset] = num | 0; + // @ts-ignore + node_modules_multiformats_dist_src_vendor_varint_encode.bytes = offset - oldOffset + 1; + return out; +} +var node_modules_multiformats_dist_src_vendor_varint_decode = multiformats_dist_src_vendor_varint_read; +var multiformats_dist_src_vendor_varint_MSB$1 = 0x80, multiformats_dist_src_vendor_varint_REST$1 = 0x7F; +/** + * @param {string | any[]} buf + * @param {number} offset + */ +function multiformats_dist_src_vendor_varint_read(buf, offset) { + var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length; + do { + if (counter >= l) { + // @ts-ignore + multiformats_dist_src_vendor_varint_read.bytes = 0; + throw new RangeError('Could not decode varint'); + } + b = buf[counter++]; + res += shift < 28 + ? (b & multiformats_dist_src_vendor_varint_REST$1) << shift + : (b & multiformats_dist_src_vendor_varint_REST$1) * Math.pow(2, shift); + shift += 7; + } while (b >= multiformats_dist_src_vendor_varint_MSB$1); + // @ts-ignore + multiformats_dist_src_vendor_varint_read.bytes = counter - offset; + return res; +} +var multiformats_dist_src_vendor_varint_N1 = Math.pow(2, 7); +var multiformats_dist_src_vendor_varint_N2 = Math.pow(2, 14); +var multiformats_dist_src_vendor_varint_N3 = Math.pow(2, 21); +var multiformats_dist_src_vendor_varint_N4 = Math.pow(2, 28); +var multiformats_dist_src_vendor_varint_N5 = Math.pow(2, 35); +var multiformats_dist_src_vendor_varint_N6 = Math.pow(2, 42); +var multiformats_dist_src_vendor_varint_N7 = Math.pow(2, 49); +var multiformats_dist_src_vendor_varint_N8 = Math.pow(2, 56); +var multiformats_dist_src_vendor_varint_N9 = Math.pow(2, 63); +var node_modules_multiformats_dist_src_vendor_varint_length = function (/** @type {number} */ value) { + return (value < multiformats_dist_src_vendor_varint_N1 ? 1 + : value < multiformats_dist_src_vendor_varint_N2 ? 2 + : value < multiformats_dist_src_vendor_varint_N3 ? 3 + : value < multiformats_dist_src_vendor_varint_N4 ? 4 + : value < multiformats_dist_src_vendor_varint_N5 ? 5 + : value < multiformats_dist_src_vendor_varint_N6 ? 6 + : value < multiformats_dist_src_vendor_varint_N7 ? 7 + : value < multiformats_dist_src_vendor_varint_N8 ? 8 + : value < multiformats_dist_src_vendor_varint_N9 ? 9 + : 10); +}; +var node_modules_multiformats_dist_src_vendor_varint_varint = { + encode: multiformats_dist_src_vendor_varint_encode_1, + decode: node_modules_multiformats_dist_src_vendor_varint_decode, + encodingLength: node_modules_multiformats_dist_src_vendor_varint_length +}; +var multiformats_dist_src_vendor_varint_brrp_varint = node_modules_multiformats_dist_src_vendor_varint_varint; +/* harmony default export */ const ipfs_unixfs_exporter_node_modules_multiformats_dist_src_vendor_varint = (multiformats_dist_src_vendor_varint_brrp_varint); +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/varint.js + +function ipfs_unixfs_exporter_node_modules_multiformats_dist_src_varint_decode(data, offset = 0) { + const code = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_vendor_varint.decode(data, offset); + return [code, ipfs_unixfs_exporter_node_modules_multiformats_dist_src_vendor_varint.decode.bytes]; +} +function node_modules_multiformats_dist_src_varint_encodeTo(int, target, offset = 0) { + ipfs_unixfs_exporter_node_modules_multiformats_dist_src_vendor_varint.encode(int, target, offset); + return target; } +function node_modules_multiformats_dist_src_varint_encodingLength(int) { + return ipfs_unixfs_exporter_node_modules_multiformats_dist_src_vendor_varint.encodingLength(int); +} +//# sourceMappingURL=varint.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/hashes/digest.js -exports.getUserAgent = getUserAgent; -//# sourceMappingURL=index.js.map +/** + * Creates a multihash digest. + */ +function node_modules_multiformats_dist_src_hashes_digest_create(code, digest) { + const size = digest.byteLength; + const sizeOffset = node_modules_multiformats_dist_src_varint_encodingLength(code); + const digestOffset = sizeOffset + node_modules_multiformats_dist_src_varint_encodingLength(size); + const bytes = new Uint8Array(digestOffset + size); + node_modules_multiformats_dist_src_varint_encodeTo(code, bytes, 0); + node_modules_multiformats_dist_src_varint_encodeTo(size, bytes, sizeOffset); + bytes.set(digest, digestOffset); + return new node_modules_multiformats_dist_src_hashes_digest_Digest(code, size, digest, bytes); +} +/** + * Turns bytes representation of multihash digest into an instance. + */ +function node_modules_multiformats_dist_src_hashes_digest_decode(multihash) { + const bytes = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_bytes_coerce(multihash); + const [code, sizeOffset] = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_varint_decode(bytes); + const [size, digestOffset] = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_varint_decode(bytes.subarray(sizeOffset)); + const digest = bytes.subarray(sizeOffset + digestOffset); + if (digest.byteLength !== size) { + throw new Error('Incorrect length'); + } + return new node_modules_multiformats_dist_src_hashes_digest_Digest(code, size, digest, bytes); +} +function node_modules_multiformats_dist_src_hashes_digest_equals(a, b) { + if (a === b) { + return true; + } + else { + const data = b; + return (a.code === data.code && + a.size === data.size && + data.bytes instanceof Uint8Array && + node_modules_multiformats_dist_src_bytes_equals(a.bytes, data.bytes)); + } +} +/** + * Represents a multihash digest which carries information about the + * hashing algorithm and an actual hash digest. + */ +class node_modules_multiformats_dist_src_hashes_digest_Digest { + code; + size; + digest; + bytes; + /** + * Creates a multihash digest. + */ + constructor(code, size, digest, bytes) { + this.code = code; + this.size = size; + this.digest = digest; + this.bytes = bytes; + } +} +//# sourceMappingURL=digest.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/cid.js -/***/ }), -/***/ 49360: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -Object.defineProperty(exports, "v1", ({ - enumerable: true, - get: function () { - return _v.default; - } -})); -Object.defineProperty(exports, "v3", ({ - enumerable: true, - get: function () { - return _v2.default; - } -})); -Object.defineProperty(exports, "v4", ({ - enumerable: true, - get: function () { - return _v3.default; - } -})); -Object.defineProperty(exports, "v5", ({ - enumerable: true, - get: function () { - return _v4.default; - } -})); -Object.defineProperty(exports, "NIL", ({ - enumerable: true, - get: function () { - return _nil.default; - } -})); -Object.defineProperty(exports, "version", ({ - enumerable: true, - get: function () { - return _version.default; - } -})); -Object.defineProperty(exports, "validate", ({ - enumerable: true, - get: function () { - return _validate.default; - } -})); -Object.defineProperty(exports, "stringify", ({ - enumerable: true, - get: function () { - return _stringify.default; - } -})); -Object.defineProperty(exports, "parse", ({ - enumerable: true, - get: function () { - return _parse.default; - } -})); +// This way TS will also expose all the types from module -var _v = _interopRequireDefault(__nccwpck_require__(89125)); +function node_modules_multiformats_dist_src_cid_format(link, base) { + const { bytes, version } = link; + switch (version) { + case 0: + return node_modules_multiformats_dist_src_cid_toStringV0(bytes, node_modules_multiformats_dist_src_cid_baseCache(link), base ?? node_modules_multiformats_dist_src_bases_base58_base58btc.encoder); + default: + return node_modules_multiformats_dist_src_cid_toStringV1(bytes, node_modules_multiformats_dist_src_cid_baseCache(link), (base ?? node_modules_multiformats_dist_src_bases_base32_base32.encoder)); + } +} +function node_modules_multiformats_dist_src_cid_toJSON(link) { + return { + '/': node_modules_multiformats_dist_src_cid_format(link) + }; +} +function node_modules_multiformats_dist_src_cid_fromJSON(json) { + return ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.parse(json['/']); +} +const node_modules_multiformats_dist_src_cid_cache = new WeakMap(); +function node_modules_multiformats_dist_src_cid_baseCache(cid) { + const baseCache = node_modules_multiformats_dist_src_cid_cache.get(cid); + if (baseCache == null) { + const baseCache = new Map(); + node_modules_multiformats_dist_src_cid_cache.set(cid, baseCache); + return baseCache; + } + return baseCache; +} +class ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID { + code; + version; + multihash; + bytes; + '/'; + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param multihash - (Multi)hash of the of the content. + */ + constructor(version, code, multihash, bytes) { + this.code = code; + this.version = version; + this.multihash = multihash; + this.bytes = bytes; + // flag to serializers that this is a CID and + // should be treated specially + this['/'] = bytes; + } + /** + * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes` + * please either use `CID.asCID(cid)` or switch to new signalling mechanism + * + * @deprecated + */ + get asCID() { + return this; + } + // ArrayBufferView + get byteOffset() { + return this.bytes.byteOffset; + } + // ArrayBufferView + get byteLength() { + return this.bytes.byteLength; + } + toV0() { + switch (this.version) { + case 0: { + return this; + } + case 1: { + const { code, multihash } = this; + if (code !== node_modules_multiformats_dist_src_cid_DAG_PB_CODE) { + throw new Error('Cannot convert a non dag-pb CID to CIDv0'); + } + // sha2-256 + if (multihash.code !== node_modules_multiformats_dist_src_cid_SHA_256_CODE) { + throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0'); + } + return (ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.createV0(multihash)); + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`); + } + } + } + toV1() { + switch (this.version) { + case 0: { + const { code, digest } = this.multihash; + const multihash = node_modules_multiformats_dist_src_hashes_digest_create(code, digest); + return (ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.createV1(this.code, multihash)); + } + case 1: { + return this; + } + default: { + throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`); + } + } + } + equals(other) { + return ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.equals(this, other); + } + static equals(self, other) { + const unknown = other; + return (unknown != null && + self.code === unknown.code && + self.version === unknown.version && + node_modules_multiformats_dist_src_hashes_digest_equals(self.multihash, unknown.multihash)); + } + toString(base) { + return node_modules_multiformats_dist_src_cid_format(this, base); + } + toJSON() { + return { '/': node_modules_multiformats_dist_src_cid_format(this) }; + } + link() { + return this; + } + [Symbol.toStringTag] = 'CID'; + // Legacy + [Symbol.for('nodejs.util.inspect.custom')]() { + return `CID(${this.toString()})`; + } + /** + * Takes any input `value` and returns a `CID` instance if it was + * a `CID` otherwise returns `null`. If `value` is instanceof `CID` + * it will return value back. If `value` is not instance of this CID + * class, but is compatible CID it will return new instance of this + * `CID` class. Otherwise returns null. + * + * This allows two different incompatible versions of CID library to + * co-exist and interop as long as binary interface is compatible. + */ + static asCID(input) { + if (input == null) { + return null; + } + const value = input; + if (value instanceof ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID) { + // If value is instance of CID then we're all set. + return value; + } + else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) { + // If value isn't instance of this CID class but `this.asCID === this` or + // `value['/'] === value.bytes` is true it is CID instance coming from a + // different implementation (diff version or duplicate). In that case we + // rebase it to this `CID` implementation so caller is guaranteed to get + // instance with expected API. + const { version, code, multihash, bytes } = value; + return new ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID(version, code, multihash, bytes ?? node_modules_multiformats_dist_src_cid_encodeCID(version, code, multihash.bytes)); + } + else if (value[node_modules_multiformats_dist_src_cid_cidSymbol] === true) { + // If value is a CID from older implementation that used to be tagged via + // symbol we still rebase it to the this `CID` implementation by + // delegating that to a constructor. + const { version, multihash, code } = value; + const digest = node_modules_multiformats_dist_src_hashes_digest_decode(multihash); + return ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.create(version, code, digest); + } + else { + // Otherwise value is not a CID (or an incompatible version of it) in + // which case we return `null`. + return null; + } + } + /** + * @param version - Version of the CID + * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv + * @param digest - (Multi)hash of the of the content. + */ + static create(version, code, digest) { + if (typeof code !== 'number') { + throw new Error('String codecs are no longer supported'); + } + if (!(digest.bytes instanceof Uint8Array)) { + throw new Error('Invalid digest'); + } + switch (version) { + case 0: { + if (code !== node_modules_multiformats_dist_src_cid_DAG_PB_CODE) { + throw new Error(`Version 0 CID must use dag-pb (code: ${node_modules_multiformats_dist_src_cid_DAG_PB_CODE}) block encoding`); + } + else { + return new ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID(version, code, digest, digest.bytes); + } + } + case 1: { + const bytes = node_modules_multiformats_dist_src_cid_encodeCID(version, code, digest.bytes); + return new ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID(version, code, digest, bytes); + } + default: { + throw new Error('Invalid version'); + } + } + } + /** + * Simplified version of `create` for CIDv0. + */ + static createV0(digest) { + return ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.create(0, node_modules_multiformats_dist_src_cid_DAG_PB_CODE, digest); + } + /** + * Simplified version of `create` for CIDv1. + * + * @param code - Content encoding format code. + * @param digest - Multihash of the content. + */ + static createV1(code, digest) { + return ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.create(1, code, digest); + } + /** + * Decoded a CID from its binary representation. The byte array must contain + * only the CID with no additional bytes. + * + * An error will be thrown if the bytes provided do not contain a valid + * binary representation of a CID. + */ + static decode(bytes) { + const [cid, remainder] = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.decodeFirst(bytes); + if (remainder.length !== 0) { + throw new Error('Incorrect length'); + } + return cid; + } + /** + * Decoded a CID from its binary representation at the beginning of a byte + * array. + * + * Returns an array with the first element containing the CID and the second + * element containing the remainder of the original byte array. The remainder + * will be a zero-length byte array if the provided bytes only contained a + * binary CID representation. + */ + static decodeFirst(bytes) { + const specs = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.inspectBytes(bytes); + const prefixSize = specs.size - specs.multihashSize; + const multihashBytes = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_bytes_coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize)); + if (multihashBytes.byteLength !== specs.multihashSize) { + throw new Error('Incorrect length'); + } + const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize); + const digest = new node_modules_multiformats_dist_src_hashes_digest_Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes); + const cid = specs.version === 0 + ? ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.createV0(digest) + : ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.createV1(specs.codec, digest); + return [cid, bytes.subarray(specs.size)]; + } + /** + * Inspect the initial bytes of a CID to determine its properties. + * + * Involves decoding up to 4 varints. Typically this will require only 4 to 6 + * bytes but for larger multicodec code values and larger multihash digest + * lengths these varints can be quite large. It is recommended that at least + * 10 bytes be made available in the `initialBytes` argument for a complete + * inspection. + */ + static inspectBytes(initialBytes) { + let offset = 0; + const next = () => { + const [i, length] = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_varint_decode(initialBytes.subarray(offset)); + offset += length; + return i; + }; + let version = next(); + let codec = node_modules_multiformats_dist_src_cid_DAG_PB_CODE; + if (version === 18) { + // CIDv0 + version = 0; + offset = 0; + } + else { + codec = next(); + } + if (version !== 0 && version !== 1) { + throw new RangeError(`Invalid CID version ${version}`); + } + const prefixSize = offset; + const multihashCode = next(); // multihash code + const digestSize = next(); // multihash length + const size = offset + digestSize; + const multihashSize = size - prefixSize; + return { version, codec, multihashCode, digestSize, multihashSize, size }; + } + /** + * Takes cid in a string representation and creates an instance. If `base` + * decoder is not provided will use a default from the configuration. It will + * throw an error if encoding of the CID is not compatible with supplied (or + * a default decoder). + */ + static parse(source, base) { + const [prefix, bytes] = node_modules_multiformats_dist_src_cid_parseCIDtoBytes(source, base); + const cid = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.decode(bytes); + if (cid.version === 0 && source[0] !== 'Q') { + throw Error('Version 0 CID string must not include multibase prefix'); + } + // Cache string representation to avoid computing it on `this.toString()` + node_modules_multiformats_dist_src_cid_baseCache(cid).set(prefix, source); + return cid; + } +} +function node_modules_multiformats_dist_src_cid_parseCIDtoBytes(source, base) { + switch (source[0]) { + // CIDv0 is parsed differently + case 'Q': { + const decoder = base ?? node_modules_multiformats_dist_src_bases_base58_base58btc; + return [ + node_modules_multiformats_dist_src_bases_base58_base58btc.prefix, + decoder.decode(`${node_modules_multiformats_dist_src_bases_base58_base58btc.prefix}${source}`) + ]; + } + case node_modules_multiformats_dist_src_bases_base58_base58btc.prefix: { + const decoder = base ?? node_modules_multiformats_dist_src_bases_base58_base58btc; + return [node_modules_multiformats_dist_src_bases_base58_base58btc.prefix, decoder.decode(source)]; + } + case node_modules_multiformats_dist_src_bases_base32_base32.prefix: { + const decoder = base ?? node_modules_multiformats_dist_src_bases_base32_base32; + return [node_modules_multiformats_dist_src_bases_base32_base32.prefix, decoder.decode(source)]; + } + default: { + if (base == null) { + throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided'); + } + return [source[0], base.decode(source)]; + } + } +} +function node_modules_multiformats_dist_src_cid_toStringV0(bytes, cache, base) { + const { prefix } = base; + if (prefix !== node_modules_multiformats_dist_src_bases_base58_base58btc.prefix) { + throw Error(`Cannot string encode V0 in ${base.name} encoding`); + } + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes).slice(1); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +function node_modules_multiformats_dist_src_cid_toStringV1(bytes, cache, base) { + const { prefix } = base; + const cid = cache.get(prefix); + if (cid == null) { + const cid = base.encode(bytes); + cache.set(prefix, cid); + return cid; + } + else { + return cid; + } +} +const node_modules_multiformats_dist_src_cid_DAG_PB_CODE = 0x70; +const node_modules_multiformats_dist_src_cid_SHA_256_CODE = 0x12; +function node_modules_multiformats_dist_src_cid_encodeCID(version, code, multihash) { + const codeOffset = node_modules_multiformats_dist_src_varint_encodingLength(version); + const hashOffset = codeOffset + node_modules_multiformats_dist_src_varint_encodingLength(code); + const bytes = new Uint8Array(hashOffset + multihash.byteLength); + node_modules_multiformats_dist_src_varint_encodeTo(version, bytes, 0); + node_modules_multiformats_dist_src_varint_encodeTo(code, bytes, codeOffset); + bytes.set(multihash, hashOffset); + return bytes; +} +const node_modules_multiformats_dist_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID'); +//# sourceMappingURL=cid.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/codecs/raw.js + +const multiformats_dist_src_codecs_raw_name = 'raw'; +const multiformats_dist_src_codecs_raw_code = 0x55; +function multiformats_dist_src_codecs_raw_encode(node) { + return coerce(node); +} +function multiformats_dist_src_codecs_raw_decode(data) { + return coerce(data); +} +//# sourceMappingURL=raw.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats/dist/src/hashes/identity.js + + +const multiformats_dist_src_hashes_identity_code = 0x0; +const multiformats_dist_src_hashes_identity_name = 'identity'; +const multiformats_dist_src_hashes_identity_encode = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_bytes_coerce; +function multiformats_dist_src_hashes_identity_digest(input) { + return node_modules_multiformats_dist_src_hashes_digest_create(multiformats_dist_src_hashes_identity_code, multiformats_dist_src_hashes_identity_encode(input)); +} +const multiformats_dist_src_hashes_identity_identity = { code: multiformats_dist_src_hashes_identity_code, name: multiformats_dist_src_hashes_identity_name, encode: multiformats_dist_src_hashes_identity_encode, digest: multiformats_dist_src_hashes_identity_digest }; +//# sourceMappingURL=identity.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.js + + + +const dag_cbor_resolve = async (cid, name, path, toResolve, resolve, depth, blockstore, options) => { + const block = await blockstore.get(cid, options); + const object = dag_cbor_src_decode(block); + let subObject = object; + let subPath = path; + while (toResolve.length > 0) { + const prop = toResolve[0]; + if (prop in subObject) { + // remove the bit of the path we have resolved + toResolve.shift(); + subPath = `${subPath}/${prop}`; + const subObjectCid = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.asCID(subObject[prop]); + if (subObjectCid != null) { + return { + entry: { + type: 'object', + name, + path, + cid, + node: block, + depth, + size: BigInt(block.length), + content: async function* () { + yield object; + } + }, + next: { + cid: subObjectCid, + name: prop, + path: subPath, + toResolve + } + }; + } + subObject = subObject[prop]; + } + else { + // cannot resolve further + throw err_code(new Error(`No property named ${prop} found in cbor node ${cid}`), 'ERR_NO_PROP'); + } + } + return { + entry: { + type: 'object', + name, + path, + cid, + node: block, + depth, + size: BigInt(block.length), + content: async function* () { + yield object; + } + } + }; +}; +/* harmony default export */ const dag_cbor = (dag_cbor_resolve); +//# sourceMappingURL=dag-cbor.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.js +function extractDataFromBlock(block, blockStart, requestedStart, requestedEnd) { + const blockLength = BigInt(block.length); + const blockEnd = BigInt(blockStart + blockLength); + if (requestedStart >= blockEnd || requestedEnd < blockStart) { + // If we are looking for a byte range that is starts after the start of the block, + // return an empty block. This can happen when internal nodes contain data + return new Uint8Array(0); + } + if (requestedEnd >= blockStart && requestedEnd < blockEnd) { + // If the end byte is in the current block, truncate the block to the end byte + block = block.subarray(0, Number(requestedEnd - blockStart)); + } + if (requestedStart >= blockStart && requestedStart < blockEnd) { + // If the start byte is in the current block, skip to the start byte + block = block.subarray(Number(requestedStart - blockStart)); + } + return block; +} +/* harmony default export */ const extract_data_from_block = (extractDataFromBlock); +//# sourceMappingURL=extract-data-from-block.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.js -var _v2 = _interopRequireDefault(__nccwpck_require__(46530)); +const validateOffsetAndLength = (size, offset = 0, length = size) => { + const fileSize = BigInt(size); + const start = BigInt(offset ?? 0); + let end = BigInt(length); + if (end !== fileSize) { + end = start + end; + } + if (end > fileSize) { + end = fileSize; + } + if (start < 0n) { + throw err_code(new Error('Offset must be greater than or equal to 0'), 'ERR_INVALID_PARAMS'); + } + if (start > fileSize) { + throw err_code(new Error('Offset must be less than the file size'), 'ERR_INVALID_PARAMS'); + } + if (end < 0n) { + throw err_code(new Error('Length must be greater than or equal to 0'), 'ERR_INVALID_PARAMS'); + } + if (end > fileSize) { + throw err_code(new Error('Length must be less than the file size'), 'ERR_INVALID_PARAMS'); + } + return { + start, + end + }; +}; +/* harmony default export */ const validate_offset_and_length = (validateOffsetAndLength); +//# sourceMappingURL=validate-offset-and-length.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/identity.js -var _v3 = _interopRequireDefault(__nccwpck_require__(33930)); -var _v4 = _interopRequireDefault(__nccwpck_require__(22681)); -var _nil = _interopRequireDefault(__nccwpck_require__(51361)); -var _version = _interopRequireDefault(__nccwpck_require__(28987)); -var _validate = _interopRequireDefault(__nccwpck_require__(67848)); +const rawContent = (node) => { + async function* contentGenerator(options = {}) { + const { start, end } = validate_offset_and_length(node.length, options.offset, options.length); + const buf = extract_data_from_block(node, 0n, start, end); + options.onProgress?.(new CustomProgressEvent('unixfs:exporter:progress:identity', { + bytesRead: BigInt(buf.byteLength), + totalBytes: end - start, + fileSize: BigInt(node.byteLength) + })); + yield buf; + } + return contentGenerator; +}; +const identity_resolve = async (cid, name, path, toResolve, resolve, depth, blockstore, options) => { + if (toResolve.length > 0) { + throw err_code(new Error(`No link named ${path} found in raw node ${cid}`), 'ERR_NOT_FOUND'); + } + const buf = node_modules_multiformats_dist_src_hashes_digest_decode(cid.multihash.bytes); + return { + entry: { + type: 'identity', + name, + path, + cid, + content: rawContent(buf.digest), + depth, + size: BigInt(buf.digest.length), + node: buf.digest + } + }; +}; +/* harmony default export */ const resolvers_identity = (identity_resolve); +//# sourceMappingURL=identity.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/raw.js -var _stringify = _interopRequireDefault(__nccwpck_require__(39004)); -var _parse = _interopRequireDefault(__nccwpck_require__(72615)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/***/ }), +const raw_rawContent = (node) => { + async function* contentGenerator(options = {}) { + const { start, end } = validate_offset_and_length(node.length, options.offset, options.length); + const buf = extract_data_from_block(node, 0n, start, end); + options.onProgress?.(new CustomProgressEvent('unixfs:exporter:progress:raw', { + bytesRead: BigInt(buf.byteLength), + totalBytes: end - start, + fileSize: BigInt(node.byteLength) + })); + yield buf; + } + return contentGenerator; +}; +const raw_resolve = async (cid, name, path, toResolve, resolve, depth, blockstore, options) => { + if (toResolve.length > 0) { + throw err_code(new Error(`No link named ${path} found in raw node ${cid}`), 'ERR_NOT_FOUND'); + } + const block = await blockstore.get(cid, options); + return { + entry: { + type: 'raw', + name, + path, + cid, + content: raw_rawContent(block), + depth, + size: BigInt(block.length), + node: block + } + }; +}; +/* harmony default export */ const resolvers_raw = (raw_resolve); +//# sourceMappingURL=raw.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.js -/***/ 1611: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); +// FIXME: this is copy/pasted from ipfs-unixfs-importer/src/options.js +const hashFn = async function (buf) { + return (await murmur3128.encode(buf)) + // Murmur3 outputs 128 bit but, accidentally, IPFS Go's + // implementation only uses the first 64, so we must do the same + // for parity.. + .slice(0, 8) + // Invert buffer because that's how Go impl does it + .reverse(); +}; +const addLinksToHamtBucket = async (links, bucket, rootBucket) => { + const padLength = (bucket.tableSize() - 1).toString(16).length; + await Promise.all(links.map(async (link) => { + if (link.Name == null) { + // TODO(@rvagg): what do? this is technically possible + throw new Error('Unexpected Link without a Name'); + } + if (link.Name.length === padLength) { + const pos = parseInt(link.Name, 16); + bucket._putObjectAt(pos, new Bucket({ + hash: rootBucket._options.hash, + bits: rootBucket._options.bits + }, bucket, pos)); + return; + } + await rootBucket.put(link.Name.substring(2), true); + })); +}; +const toPrefix = (position, padLength) => { + return position + .toString(16) + .toUpperCase() + .padStart(padLength, '0') + .substring(0, padLength); +}; +const toBucketPath = (position) => { + let bucket = position.bucket; + const path = []; + while (bucket._parent != null) { + path.push(bucket); + bucket = bucket._parent; + } + path.push(bucket); + return path.reverse(); +}; +const findShardCid = async (node, name, blockstore, context, options) => { + if (context == null) { + if (node.Data == null) { + throw err_code(new Error('no data in PBNode'), 'ERR_NOT_UNIXFS'); + } + let dir; + try { + dir = src_UnixFS.unmarshal(node.Data); + } + catch (err) { + throw err_code(err, 'ERR_NOT_UNIXFS'); + } + if (dir.type !== 'hamt-sharded-directory') { + throw err_code(new Error('not a HAMT'), 'ERR_NOT_UNIXFS'); + } + if (dir.fanout == null) { + throw err_code(new Error('missing fanout'), 'ERR_NOT_UNIXFS'); + } + const rootBucket = createHAMT({ + hashFn, + bits: Math.log2(Number(dir.fanout)) + }); + context = { + rootBucket, + hamtDepth: 1, + lastBucket: rootBucket + }; + } + const padLength = (context.lastBucket.tableSize() - 1).toString(16).length; + await addLinksToHamtBucket(node.Links, context.lastBucket, context.rootBucket); + const position = await context.rootBucket._findNewBucketAndPos(name); + let prefix = toPrefix(position.pos, padLength); + const bucketPath = toBucketPath(position); + if (bucketPath.length > context.hamtDepth) { + context.lastBucket = bucketPath[context.hamtDepth]; + prefix = toPrefix(context.lastBucket._posAtParent, padLength); + } + const link = node.Links.find(link => { + if (link.Name == null) { + return false; + } + const entryPrefix = link.Name.substring(0, padLength); + const entryName = link.Name.substring(padLength); + if (entryPrefix !== prefix) { + // not the entry or subshard we're looking for + return false; + } + if (entryName !== '' && entryName !== name) { + // not the entry we're looking for + return false; + } + return true; + }); + if (link == null) { + return; + } + if (link.Name != null && link.Name.substring(padLength) === name) { + return link.Hash; + } + context.hamtDepth++; + const block = await blockstore.get(link.Hash, options); + node = src_decode(block); + return findShardCid(node, name, blockstore, context, options); +}; +/* harmony default export */ const find_cid_in_shard = (findShardCid); +//# sourceMappingURL=find-cid-in-shard.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/it-peekable/dist/src/index.js +/** + * @packageDocumentation + * + * Lets you look at the contents of an async iterator and decide what to do + * + * @example + * + * ```javascript + * import peekable from 'it-peekable' + * + * // This can also be an iterator, generator, etc + * const values = [0, 1, 2, 3, 4] + * + * const it = peekable(value) + * + * const first = it.peek() + * + * console.info(first) // 0 + * + * it.push(first) + * + * console.info([...it]) + * // [ 0, 1, 2, 3, 4 ] + * ``` + * + * Async sources must be awaited: + * + * ```javascript + * import peekable from 'it-peekable' + * + * const values = async function * () { + * yield * [0, 1, 2, 3, 4] + * } + * + * const it = peekable(values()) + * + * const first = await it.peek() + * + * console.info(first) // 0 + * + * it.push(first) + * + * console.info(await all(it)) + * // [ 0, 1, 2, 3, 4 ] + * ``` + */ +function src_peekable(iterable) { + // @ts-expect-error can't use Symbol.asyncIterator to index iterable since it might be Iterable + const [iterator, symbol] = iterable[Symbol.asyncIterator] != null + // @ts-expect-error can't use Symbol.asyncIterator to index iterable since it might be Iterable + ? [iterable[Symbol.asyncIterator](), Symbol.asyncIterator] + // @ts-expect-error can't use Symbol.iterator to index iterable since it might be AsyncIterable + : [iterable[Symbol.iterator](), Symbol.iterator]; + const queue = []; + // @ts-expect-error can't use symbol to index peekable + return { + peek: () => { + return iterator.next(); + }, + push: (value) => { + queue.push(value); + }, + next: () => { + if (queue.length > 0) { + return { + done: false, + value: queue.shift() + }; + } + return iterator.next(); + }, + [symbol]() { + return this; + } + }; +} +/* harmony default export */ const node_modules_it_peekable_dist_src = (src_peekable); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/it-filter/dist/src/index.js +/** + * @packageDocumentation + * + * Filter values out of an (async)iterable + * + * @example + * + * ```javascript + * import all from 'it-all' + * import filter from 'it-filter' + * + * // This can also be an iterator, generator, etc + * const values = [0, 1, 2, 3, 4] + * + * const fn = val => val > 2 // Return boolean to keep item + * + * const arr = all(filter(values, fn)) + * + * console.info(arr) // 3, 4 + * ``` + * + * Async sources and filter functions must be awaited: + * + * ```javascript + * import all from 'it-all' + * import filter from 'it-filter' + * + * const values = async function * () { + * yield * [0, 1, 2, 3, 4] + * } + * + * const fn = async val => val > 2 // Return boolean or promise of boolean to keep item + * + * const arr = await all(filter(values, fn)) + * + * console.info(arr) // 3, 4 + * ``` + */ -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function it_filter_dist_src_isAsyncIterable(thing) { + return thing[Symbol.asyncIterator] != null; +} +function src_filter(source, fn) { + if (it_filter_dist_src_isAsyncIterable(source)) { + return (async function* () { + for await (const entry of source) { + if (await fn(entry)) { + yield entry; + } + } + })(); + } + // if mapping function returns a promise we have to return an async generator + const peekable = node_modules_it_peekable_dist_src(source); + const { value, done } = peekable.next(); + if (done === true) { + return (function* () { }()); + } + const res = fn(value); + // @ts-expect-error .then is not present on O + if (typeof res.then === 'function') { + return (async function* () { + if (await res) { + yield value; + } + for await (const entry of peekable) { + if (await fn(entry)) { + yield entry; + } + } + })(); + } + const func = fn; + return (function* () { + if (res === true) { + yield value; + } + for (const entry of peekable) { + if (func(entry)) { + yield entry; + } + } + })(); +} +/* harmony default export */ const it_filter_dist_src = (src_filter); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/it-map/dist/src/index.js +/** + * @packageDocumentation + * + * Convert one value from an (async)iterator into another. + * + * @example + * + * ```javascript + * import map from 'it-map' + * + * // This can also be an iterator, generator, etc + * const values = [0, 1, 2, 3, 4] + * + * const result = map(values, (val) => val++) + * + * console.info(result) // [1, 2, 3, 4, 5] + * ``` + * + * Async sources and transforms must be awaited: + * + * ```javascript + * import map from 'it-map' + * + * const values = async function * () { + * yield * [0, 1, 2, 3, 4] + * } + * + * const result = await map(values(), async (val) => val++) + * + * console.info(result) // [1, 2, 3, 4, 5] + * ``` + */ -function md5(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } +function node_modules_it_map_dist_src_isAsyncIterable(thing) { + return thing[Symbol.asyncIterator] != null; +} +function dist_src_map(source, func) { + if (node_modules_it_map_dist_src_isAsyncIterable(source)) { + return (async function* () { + for await (const val of source) { + yield func(val); + } + })(); + } + // if mapping function returns a promise we have to return an async generator + const peekable = node_modules_it_peekable_dist_src(source); + const { value, done } = peekable.next(); + if (done === true) { + return (function* () { }()); + } + const res = func(value); + // @ts-expect-error .then is not present on O + if (typeof res.then === 'function') { + return (async function* () { + yield await res; + for await (const val of peekable) { + yield func(val); + } + })(); + } + const fn = func; + return (function* () { + yield res; + for (const val of peekable) { + yield fn(val); + } + })(); +} +/* harmony default export */ const node_modules_it_map_dist_src = (dist_src_map); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/it-parallel/node_modules/p-defer/index.js +function p_defer_pDefer() { + const deferred = {}; + + deferred.promise = new Promise((resolve, reject) => { + deferred.resolve = resolve; + deferred.reject = reject; + }); - return _crypto.default.createHash('md5').update(bytes).digest(); + return deferred; } -var _default = md5; -exports["default"] = _default; - -/***/ }), +;// CONCATENATED MODULE: ./node_modules/it-parallel/dist/src/index.js +/** + * @packageDocumentation + * + * Takes an (async) iterable that emits promise-returning functions, invokes them in parallel up to the concurrency limit and emits the results as they become available, optionally in the same order as the input + * + * @example + * + * ```javascript + * import parallel from 'it-parallel' + * import all from 'it-all' + * import delay from 'delay' + * + * // This can also be an iterator, async iterator, generator, etc + * const input = [ + * async () => { + * console.info('start 1') + * await delay(500) + * + * console.info('end 1') + * return 1 + * }, + * async () => { + * console.info('start 2') + * await delay(200) + * + * console.info('end 2') + * return 2 + * }, + * async () => { + * console.info('start 3') + * await delay(100) + * + * console.info('end 3') + * return 3 + * } + * ] + * + * const result = await all(parallel(input, { + * concurrency: 2 + * })) + * + * // output: + * // start 1 + * // start 2 + * // end 2 + * // start 3 + * // end 3 + * // end 1 + * + * console.info(result) // [2, 3, 1] + * ``` + * + * If order is important, pass `ordered: true` as an option: + * + * ```javascript + * const result = await all(parallel(input, { + * concurrency: 2, + * ordered: true + * })) + * + * // output: + * // start 1 + * // start 2 + * // end 2 + * // start 3 + * // end 3 + * // end 1 + * + * console.info(result) // [1, 2, 3] + * ``` + */ -/***/ 51361: -/***/ ((__unused_webpack_module, exports) => { +const src_CustomEvent = globalThis.CustomEvent ?? Event; +/** + * Takes an (async) iterator that emits promise-returning functions, + * invokes them in parallel and emits the results as they become available but + * in the same order as the input + */ +async function* parallel(source, options = {}) { + let concurrency = options.concurrency ?? Infinity; + if (concurrency < 1) { + concurrency = Infinity; + } + const ordered = options.ordered == null ? false : options.ordered; + const emitter = new EventTarget(); + const ops = []; + let slotAvailable = p_defer_pDefer(); + let resultAvailable = p_defer_pDefer(); + let sourceFinished = false; + let sourceErr; + let opErred = false; + emitter.addEventListener('task-complete', () => { + resultAvailable.resolve(); + }); + void Promise.resolve().then(async () => { + try { + for await (const task of source) { + if (ops.length === concurrency) { + slotAvailable = p_defer_pDefer(); + await slotAvailable.promise; + } + if (opErred) { + break; + } + const op = { + done: false + }; + ops.push(op); + task() + .then(result => { + op.done = true; + op.ok = true; + op.value = result; + emitter.dispatchEvent(new src_CustomEvent('task-complete')); + }, err => { + op.done = true; + op.err = err; + emitter.dispatchEvent(new src_CustomEvent('task-complete')); + }); + } + sourceFinished = true; + emitter.dispatchEvent(new src_CustomEvent('task-complete')); + } + catch (err) { + sourceErr = err; + emitter.dispatchEvent(new src_CustomEvent('task-complete')); + } + }); + function valuesAvailable() { + if (ordered) { + return ops[0]?.done; + } + return Boolean(ops.find(op => op.done)); + } + function* yieldOrderedValues() { + while ((ops.length > 0) && ops[0].done) { + const op = ops[0]; + ops.shift(); + if (op.ok) { + yield op.value; + } + else { + // allow the source to exit + opErred = true; + slotAvailable.resolve(); + throw op.err; + } + slotAvailable.resolve(); + } + } + function* yieldUnOrderedValues() { + // more values can become available while we wait for `yield` + // to return control to this function + while (valuesAvailable()) { + for (let i = 0; i < ops.length; i++) { + if (ops[i].done) { + const op = ops[i]; + ops.splice(i, 1); + i--; + if (op.ok) { + yield op.value; + } + else { + opErred = true; + slotAvailable.resolve(); + throw op.err; + } + slotAvailable.resolve(); + } + } + } + } + while (true) { + if (!valuesAvailable()) { + resultAvailable = p_defer_pDefer(); + await resultAvailable.promise; + } + if (sourceErr != null) { + // the source threw an error, propagate it + throw sourceErr; + } + if (ordered) { + yield* yieldOrderedValues(); + } + else { + yield* yieldUnOrderedValues(); + } + if (sourceFinished && ops.length === 0) { + // not waiting for any results and no more tasks so we are done + break; + } + } +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/it-pushable/node_modules/p-defer/index.js +function node_modules_p_defer_pDefer() { + const deferred = {}; -"use strict"; + deferred.promise = new Promise((resolve, reject) => { + deferred.resolve = resolve; + deferred.reject = reject; + }); + return deferred; +} -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = '00000000-0000-0000-0000-000000000000'; -exports["default"] = _default; +;// CONCATENATED MODULE: ./node_modules/it-pushable/dist/src/fifo.js +// ported from https://www.npmjs.com/package/fast-fifo +class FixedFIFO { + buffer; + mask; + top; + btm; + next; + constructor(hwm) { + if (!(hwm > 0) || ((hwm - 1) & hwm) !== 0) { + throw new Error('Max size for a FixedFIFO should be a power of two'); + } + this.buffer = new Array(hwm); + this.mask = hwm - 1; + this.top = 0; + this.btm = 0; + this.next = null; + } + push(data) { + if (this.buffer[this.top] !== undefined) { + return false; + } + this.buffer[this.top] = data; + this.top = (this.top + 1) & this.mask; + return true; + } + shift() { + const last = this.buffer[this.btm]; + if (last === undefined) { + return undefined; + } + this.buffer[this.btm] = undefined; + this.btm = (this.btm + 1) & this.mask; + return last; + } + isEmpty() { + return this.buffer[this.btm] === undefined; + } +} +class FIFO { + size; + hwm; + head; + tail; + constructor(options = {}) { + this.hwm = options.splitLimit ?? 16; + this.head = new FixedFIFO(this.hwm); + this.tail = this.head; + this.size = 0; + } + calculateSize(obj) { + if (obj?.byteLength != null) { + return obj.byteLength; + } + return 1; + } + push(val) { + if (val?.value != null) { + this.size += this.calculateSize(val.value); + } + if (!this.head.push(val)) { + const prev = this.head; + this.head = prev.next = new FixedFIFO(2 * this.head.buffer.length); + this.head.push(val); + } + } + shift() { + let val = this.tail.shift(); + if (val === undefined && (this.tail.next != null)) { + const next = this.tail.next; + this.tail.next = null; + this.tail = next; + val = this.tail.shift(); + } + if (val?.value != null) { + this.size -= this.calculateSize(val.value); + } + return val; + } + isEmpty() { + return this.head.isEmpty(); + } +} +//# sourceMappingURL=fifo.js.map +;// CONCATENATED MODULE: ./node_modules/it-pushable/dist/src/index.js +/** + * @packageDocumentation + * + * An iterable that you can push values into. + * + * @example + * + * ```js + * import { pushable } from 'it-pushable' + * + * const source = pushable() + * + * setTimeout(() => source.push('hello'), 100) + * setTimeout(() => source.push('world'), 200) + * setTimeout(() => source.end(), 300) + * + * const start = Date.now() + * + * for await (const value of source) { + * console.log(`got "${value}" after ${Date.now() - start}ms`) + * } + * console.log(`done after ${Date.now() - start}ms`) + * + * // Output: + * // got "hello" after 105ms + * // got "world" after 207ms + * // done after 309ms + * ``` + * + * @example + * + * ```js + * import { pushableV } from 'it-pushable' + * import all from 'it-all' + * + * const source = pushableV() + * + * source.push(1) + * source.push(2) + * source.push(3) + * source.end() + * + * console.info(await all(source)) + * + * // Output: + * // [ [1, 2, 3] ] + * ``` + */ -/***/ }), -/***/ 72615: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +class src_AbortError extends Error { + type; + code; + constructor(message, code) { + super(message ?? 'The operation was aborted'); + this.type = 'aborted'; + this.code = code ?? 'ABORT_ERR'; + } +} +function src_pushable(options = {}) { + const getNext = (buffer) => { + const next = buffer.shift(); + if (next == null) { + return { done: true }; + } + if (next.error != null) { + throw next.error; + } + return { + done: next.done === true, + // @ts-expect-error if done is false, value will be present + value: next.value + }; + }; + return _pushable(getNext, options); +} +function pushableV(options = {}) { + const getNext = (buffer) => { + let next; + const values = []; + while (!buffer.isEmpty()) { + next = buffer.shift(); + if (next == null) { + break; + } + if (next.error != null) { + throw next.error; + } + if (next.done === false) { + // @ts-expect-error if done is false value should be pushed + values.push(next.value); + } + } + if (next == null) { + return { done: true }; + } + return { + done: next.done === true, + value: values + }; + }; + return _pushable(getNext, options); +} +function _pushable(getNext, options) { + options = options ?? {}; + let onEnd = options.onEnd; + let buffer = new FIFO(); + let pushable; + let onNext; + let ended; + let drain = node_modules_p_defer_pDefer(); + const waitNext = async () => { + try { + if (!buffer.isEmpty()) { + return getNext(buffer); + } + if (ended) { + return { done: true }; + } + return await new Promise((resolve, reject) => { + onNext = (next) => { + onNext = null; + buffer.push(next); + try { + resolve(getNext(buffer)); + } + catch (err) { + reject(err); + } + return pushable; + }; + }); + } + finally { + if (buffer.isEmpty()) { + // settle promise in the microtask queue to give consumers a chance to + // await after calling .push + queueMicrotask(() => { + drain.resolve(); + drain = node_modules_p_defer_pDefer(); + }); + } + } + }; + const bufferNext = (next) => { + if (onNext != null) { + return onNext(next); + } + buffer.push(next); + return pushable; + }; + const bufferError = (err) => { + buffer = new FIFO(); + if (onNext != null) { + return onNext({ error: err }); + } + buffer.push({ error: err }); + return pushable; + }; + const push = (value) => { + if (ended) { + return pushable; + } + // @ts-expect-error `byteLength` is not declared on PushType + if (options?.objectMode !== true && value?.byteLength == null) { + throw new Error('objectMode was not true but tried to push non-Uint8Array value'); + } + return bufferNext({ done: false, value }); + }; + const end = (err) => { + if (ended) + return pushable; + ended = true; + return (err != null) ? bufferError(err) : bufferNext({ done: true }); + }; + const _return = () => { + buffer = new FIFO(); + end(); + return { done: true }; + }; + const _throw = (err) => { + end(err); + return { done: true }; + }; + pushable = { + [Symbol.asyncIterator]() { return this; }, + next: waitNext, + return: _return, + throw: _throw, + push, + end, + get readableLength() { + return buffer.size; + }, + onEmpty: async (options) => { + const signal = options?.signal; + signal?.throwIfAborted(); + if (buffer.isEmpty()) { + return; + } + let cancel; + let listener; + if (signal != null) { + cancel = new Promise((resolve, reject) => { + listener = () => { + reject(new src_AbortError()); + }; + signal.addEventListener('abort', listener); + }); + } + try { + await Promise.race([ + drain.promise, + cancel + ]); + } + finally { + if (listener != null && signal != null) { + signal?.removeEventListener('abort', listener); + } + } + } + }; + if (onEnd == null) { + return pushable; + } + const _pushable = pushable; + pushable = { + [Symbol.asyncIterator]() { return this; }, + next() { + return _pushable.next(); + }, + throw(err) { + _pushable.throw(err); + if (onEnd != null) { + onEnd(err); + onEnd = undefined; + } + return { done: true }; + }, + return() { + _pushable.return(); + if (onEnd != null) { + onEnd(); + onEnd = undefined; + } + return { done: true }; + }, + push, + end(err) { + _pushable.end(err); + if (onEnd != null) { + onEnd(err); + onEnd = undefined; + } + return pushable; + }, + get readableLength() { + return _pushable.readableLength; + }, + onEmpty: (opts) => { + return _pushable.onEmpty(opts); + } + }; + return pushable; +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/it-merge/dist/src/index.js +/** + * @packageDocumentation + * + * Merge several (async)iterables into one, yield values as they arrive. + * + * Nb. sources are iterated over in parallel so the order of emitted items is not guaranteed. + * + * @example + * + * ```javascript + * import merge from 'it-merge' + * import all from 'it-all' + * + * // This can also be an iterator, generator, etc + * const values1 = [0, 1, 2, 3, 4] + * const values2 = [5, 6, 7, 8, 9] + * + * const arr = all(merge(values1, values2)) + * + * console.info(arr) // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 + * ``` + * + * Async sources must be awaited: + * + * ```javascript + * import merge from 'it-merge' + * import all from 'it-all' + * + * // This can also be an iterator, async iterator, generator, etc + * const values1 = async function * () { + * yield * [0, 1, 2, 3, 4] + * } + * const values2 = async function * () { + * yield * [5, 6, 7, 8, 9] + * } + * + * const arr = await all(merge(values1(), values2())) + * + * console.info(arr) // 0, 1, 5, 6, 2, 3, 4, 7, 8, 9 <- nb. order is not guaranteed + * ``` + */ -"use strict"; +function it_merge_dist_src_isAsyncIterable(thing) { + return thing[Symbol.asyncIterator] != null; +} +function src_merge(...sources) { + const syncSources = []; + for (const source of sources) { + if (!it_merge_dist_src_isAsyncIterable(source)) { + syncSources.push(source); + } + } + if (syncSources.length === sources.length) { + // all sources are synchronous + return (function* () { + for (const source of syncSources) { + yield* source; + } + })(); + } + return (async function* () { + const output = src_pushable({ + objectMode: true + }); + void Promise.resolve().then(async () => { + try { + await Promise.all(sources.map(async (source) => { + for await (const item of source) { + output.push(item); + } + })); + output.end(); + } + catch (err) { + output.end(err); + } + }); + yield* output; + })(); +} +/* harmony default export */ const it_merge_dist_src = (src_merge); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/it-pipe/dist/src/index.js -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; +function pipe(first, ...rest) { + if (first == null) { + throw new Error('Empty pipeline'); + } + // Duplex at start: wrap in function and return duplex source + if (isDuplex(first)) { + const duplex = first; + first = () => duplex.source; + // Iterable at start: wrap in function + } + else if (src_isIterable(first) || it_pipe_dist_src_isAsyncIterable(first)) { + const source = first; + first = () => source; + } + const fns = [first, ...rest]; + if (fns.length > 1) { + // Duplex at end: use duplex sink + if (isDuplex(fns[fns.length - 1])) { + fns[fns.length - 1] = fns[fns.length - 1].sink; + } + } + if (fns.length > 2) { + // Duplex in the middle, consume source with duplex sink and return duplex source + for (let i = 1; i < fns.length - 1; i++) { + if (isDuplex(fns[i])) { + fns[i] = duplexPipelineFn(fns[i]); + } + } + } + return rawPipe(...fns); +} +const rawPipe = (...fns) => { + let res; + while (fns.length > 0) { + res = fns.shift()(res); + } + return res; +}; +const it_pipe_dist_src_isAsyncIterable = (obj) => { + return obj?.[Symbol.asyncIterator] != null; +}; +const src_isIterable = (obj) => { + return obj?.[Symbol.iterator] != null; +}; +const isDuplex = (obj) => { + if (obj == null) { + return false; + } + return obj.sink != null && obj.source != null; +}; +const duplexPipelineFn = (duplex) => { + return (source) => { + const p = duplex.sink(source); + if (p?.then != null) { + const stream = src_pushable({ + objectMode: true + }); + p.then(() => { + stream.end(); + }, (err) => { + stream.end(err); + }); + let sourceWrap; + const source = duplex.source; + if (it_pipe_dist_src_isAsyncIterable(source)) { + sourceWrap = async function* () { + yield* source; + stream.end(); + }; + } + else if (src_isIterable(source)) { + sourceWrap = function* () { + yield* source; + stream.end(); + }; + } + else { + throw new Error('Unknown duplex source type - must be Iterable or AsyncIterable'); + } + return it_merge_dist_src(stream, sourceWrap()); + } + return duplex.source; + }; +}; +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.js -var _validate = _interopRequireDefault(__nccwpck_require__(67848)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function parse(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } - let v; - const arr = new Uint8Array(16); // Parse ########-....-....-....-............ - arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; - arr[1] = v >>> 16 & 0xff; - arr[2] = v >>> 8 & 0xff; - arr[3] = v & 0xff; // Parse ........-####-....-....-............ +const directoryContent = (cid, node, unixfs, path, resolve, depth, blockstore) => { + async function* yieldDirectoryContent(options = {}) { + const offset = options.offset ?? 0; + const length = options.length ?? node.Links.length; + const links = node.Links.slice(offset, length); + options.onProgress?.(new CustomProgressEvent('unixfs:exporter:walk:directory', { + cid + })); + yield* pipe(links, source => node_modules_it_map_dist_src(source, link => { + return async () => { + const linkName = link.Name ?? ''; + const linkPath = `${path}/${linkName}`; + const result = await resolve(link.Hash, linkName, linkPath, [], depth + 1, blockstore, options); + return result.entry; + }; + }), source => parallel(source, { ordered: true }), source => it_filter_dist_src(source, entry => entry != null)); + } + return yieldDirectoryContent; +}; +/* harmony default export */ const directory = (directoryContent); +//# sourceMappingURL=directory.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/p-timeout/index.js +class p_timeout_TimeoutError extends Error { + constructor(message) { + super(message); + this.name = 'TimeoutError'; + } +} - arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; - arr[5] = v & 0xff; // Parse ........-....-####-....-............ +/** +An error to be thrown when the request is aborted by AbortController. +DOMException is thrown instead of this Error when DOMException is available. +*/ +class node_modules_p_timeout_AbortError extends Error { + constructor(message) { + super(); + this.name = 'AbortError'; + this.message = message; + } +} - arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; - arr[7] = v & 0xff; // Parse ........-....-....-####-............ +/** +TODO: Remove AbortError and just throw DOMException when targeting Node 18. +*/ +const p_timeout_getDOMException = errorMessage => globalThis.DOMException === undefined + ? new node_modules_p_timeout_AbortError(errorMessage) + : new DOMException(errorMessage); - arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; - arr[9] = v & 0xff; // Parse ........-....-....-....-############ - // (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes) +/** +TODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18. +*/ +const p_timeout_getAbortedReason = signal => { + const reason = signal.reason === undefined + ? p_timeout_getDOMException('This operation was aborted.') + : signal.reason; - arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff; - arr[11] = v / 0x100000000 & 0xff; - arr[12] = v >>> 24 & 0xff; - arr[13] = v >>> 16 & 0xff; - arr[14] = v >>> 8 & 0xff; - arr[15] = v & 0xff; - return arr; -} + return reason instanceof Error ? reason : p_timeout_getDOMException(reason); +}; -var _default = parse; -exports["default"] = _default; +function p_timeout_pTimeout(promise, options) { + const { + milliseconds, + fallback, + message, + customTimers = {setTimeout, clearTimeout}, + } = options; -/***/ }), + let timer; -/***/ 73270: -/***/ ((__unused_webpack_module, exports) => { + const wrappedPromise = new Promise((resolve, reject) => { + if (typeof milliseconds !== 'number' || Math.sign(milliseconds) !== 1) { + throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${milliseconds}\``); + } -"use strict"; + if (options.signal) { + const {signal} = options; + if (signal.aborted) { + reject(p_timeout_getAbortedReason(signal)); + } + signal.addEventListener('abort', () => { + reject(p_timeout_getAbortedReason(signal)); + }); + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; -exports["default"] = _default; + if (milliseconds === Number.POSITIVE_INFINITY) { + promise.then(resolve, reject); + return; + } -/***/ }), + // We create the error outside of `setTimeout` to preserve the stack trace. + const timeoutError = new p_timeout_TimeoutError(); -/***/ 32714: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + timer = customTimers.setTimeout.call(undefined, () => { + if (fallback) { + try { + resolve(fallback()); + } catch (error) { + reject(error); + } -"use strict"; + return; + } + if (typeof promise.cancel === 'function') { + promise.cancel(); + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = rng; + if (message === false) { + resolve(); + } else if (message instanceof Error) { + reject(message); + } else { + timeoutError.message = message ?? `Promise timed out after ${milliseconds} milliseconds`; + reject(timeoutError); + } + }, milliseconds); -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + (async () => { + try { + resolve(await promise); + } catch (error) { + reject(error); + } + })(); + }); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + const cancelablePromise = wrappedPromise.finally(() => { + cancelablePromise.clear(); + }); -const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate + cancelablePromise.clear = () => { + customTimers.clearTimeout.call(undefined, timer); + timer = undefined; + }; -let poolPtr = rnds8Pool.length; + return cancelablePromise; +} -function rng() { - if (poolPtr > rnds8Pool.length - 16) { - _crypto.default.randomFillSync(rnds8Pool); +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/p-queue/dist/lower-bound.js +// Port of lower_bound from https://en.cppreference.com/w/cpp/algorithm/lower_bound +// Used to compute insertion index to keep queue sorted after insertion +function lower_bound_lowerBound(array, value, comparator) { + let first = 0; + let count = array.length; + while (count > 0) { + const step = Math.trunc(count / 2); + let it = first + step; + if (comparator(array[it], value) <= 0) { + first = ++it; + count -= step + 1; + } + else { + count = step; + } + } + return first; +} - poolPtr = 0; - } +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/p-queue/dist/priority-queue.js - return rnds8Pool.slice(poolPtr, poolPtr += 16); +class priority_queue_PriorityQueue { + #queue = []; + enqueue(run, options) { + options = { + priority: 0, + ...options, + }; + const element = { + priority: options.priority, + run, + }; + if (this.size && this.#queue[this.size - 1].priority >= options.priority) { + this.#queue.push(element); + return; + } + const index = lower_bound_lowerBound(this.#queue, element, (a, b) => b.priority - a.priority); + this.#queue.splice(index, 0, element); + } + dequeue() { + const item = this.#queue.shift(); + return item?.run; + } + filter(options) { + return this.#queue.filter((element) => element.priority === options.priority).map((element) => element.run); + } + get size() { + return this.#queue.length; + } } -/***/ }), +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/p-queue/dist/index.js -/***/ 39908: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; +/** +Promise queue with concurrency control. +*/ +class dist_PQueue extends eventemitter3 { + #carryoverConcurrencyCount; + #isIntervalIgnored; + #intervalCount = 0; + #intervalCap; + #interval; + #intervalEnd = 0; + #intervalId; + #timeoutId; + #queue; + #queueClass; + #pending = 0; + // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194 + #concurrency; + #isPaused; + #throwOnTimeout; + /** + Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already. -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + Applies to each future operation. + */ + timeout; + // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()` + constructor(options) { + super(); + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions + options = { + carryoverConcurrencyCount: false, + intervalCap: Number.POSITIVE_INFINITY, + interval: 0, + concurrency: Number.POSITIVE_INFINITY, + autoStart: true, + queueClass: priority_queue_PriorityQueue, + ...options, + }; + if (!(typeof options.intervalCap === 'number' && options.intervalCap >= 1)) { + throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${options.intervalCap?.toString() ?? ''}\` (${typeof options.intervalCap})`); + } + if (options.interval === undefined || !(Number.isFinite(options.interval) && options.interval >= 0)) { + throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${options.interval?.toString() ?? ''}\` (${typeof options.interval})`); + } + this.#carryoverConcurrencyCount = options.carryoverConcurrencyCount; + this.#isIntervalIgnored = options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0; + this.#intervalCap = options.intervalCap; + this.#interval = options.interval; + this.#queue = new options.queueClass(); + this.#queueClass = options.queueClass; + this.concurrency = options.concurrency; + this.timeout = options.timeout; + this.#throwOnTimeout = options.throwOnTimeout === true; + this.#isPaused = options.autoStart === false; + } + get #doesIntervalAllowAnother() { + return this.#isIntervalIgnored || this.#intervalCount < this.#intervalCap; + } + get #doesConcurrentAllowAnother() { + return this.#pending < this.#concurrency; + } + #next() { + this.#pending--; + this.#tryToStartAnother(); + this.emit('next'); + } + #onResumeInterval() { + this.#onInterval(); + this.#initializeIntervalIfNeeded(); + this.#timeoutId = undefined; + } + get #isIntervalPaused() { + const now = Date.now(); + if (this.#intervalId === undefined) { + const delay = this.#intervalEnd - now; + if (delay < 0) { + // Act as the interval was done + // We don't need to resume it here because it will be resumed on line 160 + this.#intervalCount = (this.#carryoverConcurrencyCount) ? this.#pending : 0; + } + else { + // Act as the interval is pending + if (this.#timeoutId === undefined) { + this.#timeoutId = setTimeout(() => { + this.#onResumeInterval(); + }, delay); + } + return true; + } + } + return false; + } + #tryToStartAnother() { + if (this.#queue.size === 0) { + // We can clear the interval ("pause") + // Because we can redo it later ("resume") + if (this.#intervalId) { + clearInterval(this.#intervalId); + } + this.#intervalId = undefined; + this.emit('empty'); + if (this.#pending === 0) { + this.emit('idle'); + } + return false; + } + if (!this.#isPaused) { + const canInitializeInterval = !this.#isIntervalPaused; + if (this.#doesIntervalAllowAnother && this.#doesConcurrentAllowAnother) { + const job = this.#queue.dequeue(); + if (!job) { + return false; + } + this.emit('active'); + job(); + if (canInitializeInterval) { + this.#initializeIntervalIfNeeded(); + } + return true; + } + } + return false; + } + #initializeIntervalIfNeeded() { + if (this.#isIntervalIgnored || this.#intervalId !== undefined) { + return; + } + this.#intervalId = setInterval(() => { + this.#onInterval(); + }, this.#interval); + this.#intervalEnd = Date.now() + this.#interval; + } + #onInterval() { + if (this.#intervalCount === 0 && this.#pending === 0 && this.#intervalId) { + clearInterval(this.#intervalId); + this.#intervalId = undefined; + } + this.#intervalCount = this.#carryoverConcurrencyCount ? this.#pending : 0; + this.#processQueue(); + } + /** + Executes all queued functions until it reaches the limit. + */ + #processQueue() { + // eslint-disable-next-line no-empty + while (this.#tryToStartAnother()) { } + } + get concurrency() { + return this.#concurrency; + } + set concurrency(newConcurrency) { + if (!(typeof newConcurrency === 'number' && newConcurrency >= 1)) { + throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`); + } + this.#concurrency = newConcurrency; + this.#processQueue(); + } + async #throwOnAbort(signal) { + return new Promise((_resolve, reject) => { + signal.addEventListener('abort', () => { + reject(signal.reason); + }, { once: true }); + }); + } + async add(function_, options = {}) { + options = { + timeout: this.timeout, + throwOnTimeout: this.#throwOnTimeout, + ...options, + }; + return new Promise((resolve, reject) => { + this.#queue.enqueue(async () => { + this.#pending++; + this.#intervalCount++; + try { + options.signal?.throwIfAborted(); + let operation = function_({ signal: options.signal }); + if (options.timeout) { + operation = p_timeout_pTimeout(Promise.resolve(operation), { milliseconds: options.timeout }); + } + if (options.signal) { + operation = Promise.race([operation, this.#throwOnAbort(options.signal)]); + } + const result = await operation; + resolve(result); + this.emit('completed', result); + } + catch (error) { + if (error instanceof p_timeout_TimeoutError && !options.throwOnTimeout) { + resolve(); + return; + } + reject(error); + this.emit('error', error); + } + finally { + this.#next(); + } + }, options); + this.emit('add'); + this.#tryToStartAnother(); + }); + } + async addAll(functions, options) { + return Promise.all(functions.map(async (function_) => this.add(function_, options))); + } + /** + Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.) + */ + start() { + if (!this.#isPaused) { + return this; + } + this.#isPaused = false; + this.#processQueue(); + return this; + } + /** + Put queue execution on hold. + */ + pause() { + this.#isPaused = true; + } + /** + Clear the queue. + */ + clear() { + this.#queue = new this.#queueClass(); + } + /** + Can be called multiple times. Useful if you for example add additional items at a later time. -var _crypto = _interopRequireDefault(__nccwpck_require__(6113)); + @returns A promise that settles when the queue becomes empty. + */ + async onEmpty() { + // Instantly resolve if the queue is empty + if (this.#queue.size === 0) { + return; + } + await this.#onEvent('empty'); + } + /** + @returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`. -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + If you want to avoid having the queue grow beyond a certain size you can `await queue.onSizeLessThan()` before adding a new item. -function sha1(bytes) { - if (Array.isArray(bytes)) { - bytes = Buffer.from(bytes); - } else if (typeof bytes === 'string') { - bytes = Buffer.from(bytes, 'utf8'); - } + Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation. + */ + async onSizeLessThan(limit) { + // Instantly resolve if the queue is empty. + if (this.#queue.size < limit) { + return; + } + await this.#onEvent('next', () => this.#queue.size < limit); + } + /** + The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet. - return _crypto.default.createHash('sha1').update(bytes).digest(); + @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`. + */ + async onIdle() { + // Instantly resolve if none pending and if nothing else is queued + if (this.#pending === 0 && this.#queue.size === 0) { + return; + } + await this.#onEvent('idle'); + } + async #onEvent(event, filter) { + return new Promise(resolve => { + const listener = () => { + if (filter && !filter()) { + return; + } + this.off(event, listener); + resolve(); + }; + this.on(event, listener); + }); + } + /** + Size of the queue, the number of queued items waiting to run. + */ + get size() { + return this.#queue.size; + } + /** + Size of the queue, filtered by the given options. + + For example, this can be used to find the number of items remaining in the queue with a specific priority level. + */ + sizeBy(options) { + // eslint-disable-next-line unicorn/no-array-callback-reference + return this.#queue.filter(options).length; + } + /** + Number of running items (no longer in the queue). + */ + get pending() { + return this.#pending; + } + /** + Whether the queue is currently paused. + */ + get isPaused() { + return this.#isPaused; + } } -var _default = sha1; -exports["default"] = _default; +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.js -/***/ }), -/***/ 39004: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(67848)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -const byteToHex = []; -for (let i = 0; i < 256; ++i) { - byteToHex.push((i + 0x100).toString(16).substr(1)); -} -function stringify(arr, offset = 0) { - // Note: Be careful editing this code! It's been tuned for performance - // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434 - const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one - // of the following: - // - One or more input array values don't map to a hex octet (leading to - // "undefined" in the uuid) - // - Invalid input values for the RFC `version` or `variant` fields - if (!(0, _validate.default)(uuid)) { - throw TypeError('Stringified UUID is invalid'); - } - return uuid; +async function walkDAG(blockstore, node, queue, streamPosition, start, end, options) { + // a `raw` node + if (node instanceof Uint8Array) { + const buf = extract_data_from_block(node, streamPosition, start, end); + queue.push(buf); + return; + } + if (node.Data == null) { + throw err_code(new Error('no data in PBNode'), 'ERR_NOT_UNIXFS'); + } + let file; + try { + file = src_UnixFS.unmarshal(node.Data); + } + catch (err) { + throw err_code(err, 'ERR_NOT_UNIXFS'); + } + // might be a unixfs `raw` node or have data on intermediate nodes + if (file.data != null) { + const data = file.data; + const buf = extract_data_from_block(data, streamPosition, start, end); + queue.push(buf); + streamPosition += BigInt(buf.byteLength); + } + const childOps = []; + if (node.Links.length !== file.blockSizes.length) { + throw err_code(new Error('Inconsistent block sizes and dag links'), 'ERR_NOT_UNIXFS'); + } + for (let i = 0; i < node.Links.length; i++) { + const childLink = node.Links[i]; + const childStart = streamPosition; // inclusive + const childEnd = childStart + file.blockSizes[i]; // exclusive + if ((start >= childStart && start < childEnd) || // child has offset byte + (end >= childStart && end <= childEnd) || // child has end byte + (start < childStart && end > childEnd)) { // child is between offset and end bytes + childOps.push({ + link: childLink, + blockStart: streamPosition + }); + } + streamPosition = childEnd; + if (streamPosition > end) { + break; + } + } + await pipe(childOps, (source) => node_modules_it_map_dist_src(source, (op) => { + return async () => { + const block = await blockstore.get(op.link.Hash, options); + return { + ...op, + block + }; + }; + }), (source) => parallel(source, { + ordered: true + }), async (source) => { + for await (const { link, block, blockStart } of source) { + let child; + switch (link.Hash.code) { + case code: + child = src_decode(block); + break; + case multiformats_dist_src_codecs_raw_code: + child = block; + break; + default: + queue.end(err_code(new Error(`Unsupported codec: ${link.Hash.code}`), 'ERR_NOT_UNIXFS')); + return; + } + // create a queue for this child - we use a queue instead of recursion + // to avoid overflowing the stack + const childQueue = new dist_PQueue({ + concurrency: 1 + }); + // if any of the child jobs error, end the read queue with the error + childQueue.on('error', error => { + queue.end(error); + }); + // if the job rejects the 'error' event will be emitted on the child queue + void childQueue.add(async () => { + options.onProgress?.(new CustomProgressEvent('unixfs:exporter:walk:file', { + cid: link.Hash + })); + await walkDAG(blockstore, child, queue, blockStart, start, end, options); + }); + // wait for this child to complete before moving on to the next + await childQueue.onIdle(); + } + }); + if (streamPosition >= end) { + queue.end(); + } } +const fileContent = (cid, node, unixfs, path, resolve, depth, blockstore) => { + async function* yieldFileContent(options = {}) { + const fileSize = unixfs.fileSize(); + if (fileSize === undefined) { + throw new Error('File was a directory'); + } + const { start, end } = validate_offset_and_length(fileSize, options.offset, options.length); + if (end === 0n) { + return; + } + let read = 0n; + const wanted = end - start; + const queue = src_pushable(); + options.onProgress?.(new CustomProgressEvent('unixfs:exporter:walk:file', { + cid + })); + void walkDAG(blockstore, node, queue, 0n, start, end, options) + .catch(err => { + queue.end(err); + }); + for await (const buf of queue) { + if (buf == null) { + continue; + } + read += BigInt(buf.byteLength); + if (read > wanted) { + queue.end(); + throw err_code(new Error('Read too many bytes - the file size reported by the UnixFS data in the root node may be incorrect'), 'ERR_OVER_READ'); + } + if (read === wanted) { + queue.end(); + } + options.onProgress?.(new CustomProgressEvent('unixfs:exporter:progress:unixfs:file', { + bytesRead: read, + totalBytes: wanted, + fileSize + })); + yield buf; + } + if (read < wanted) { + throw err_code(new Error('Traversed entire DAG but did not read enough bytes'), 'ERR_UNDER_READ'); + } + } + return yieldFileContent; +}; +/* harmony default export */ const file = (fileContent); +//# sourceMappingURL=file.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js -var _default = stringify; -exports["default"] = _default; - -/***/ }), - -/***/ 89125: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _rng = _interopRequireDefault(__nccwpck_require__(32714)); -var _stringify = _interopRequireDefault(__nccwpck_require__(39004)); -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const hamtShardedDirectoryContent = (cid, node, unixfs, path, resolve, depth, blockstore) => { + function yieldHamtDirectoryContent(options = {}) { + options.onProgress?.(new CustomProgressEvent('unixfs:exporter:walk:hamt-sharded-directory', { + cid + })); + return listDirectory(node, path, resolve, depth, blockstore, options); + } + return yieldHamtDirectoryContent; +}; +async function* listDirectory(node, path, resolve, depth, blockstore, options) { + const links = node.Links; + if (node.Data == null) { + throw err_code(new Error('no data in PBNode'), 'ERR_NOT_UNIXFS'); + } + let dir; + try { + dir = src_UnixFS.unmarshal(node.Data); + } + catch (err) { + throw err_code(err, 'ERR_NOT_UNIXFS'); + } + if (dir.fanout == null) { + throw err_code(new Error('missing fanout'), 'ERR_NOT_UNIXFS'); + } + const padLength = (dir.fanout - 1n).toString(16).length; + const results = pipe(links, source => node_modules_it_map_dist_src(source, link => { + return async () => { + const name = link.Name != null ? link.Name.substring(padLength) : null; + if (name != null && name !== '') { + const result = await resolve(link.Hash, name, `${path}/${name}`, [], depth + 1, blockstore, options); + return { entries: result.entry == null ? [] : [result.entry] }; + } + else { + // descend into subshard + const block = await blockstore.get(link.Hash, options); + node = src_decode(block); + options.onProgress?.(new CustomProgressEvent('unixfs:exporter:walk:hamt-sharded-directory', { + cid: link.Hash + })); + return { entries: listDirectory(node, path, resolve, depth, blockstore, options) }; + } + }; + }), source => parallel(source, { ordered: true })); + for await (const { entries } of results) { + yield* entries; + } +} +/* harmony default export */ const hamt_sharded_directory = (hamtShardedDirectoryContent); +//# sourceMappingURL=hamt-sharded-directory.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.js -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html -let _nodeId; -let _clockseq; // Previous uuid creation time -let _lastMSecs = 0; -let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details -function v1(options, buf, offset) { - let i = buf && offset || 0; - const b = buf || new Array(16); - options = options || {}; - let node = options.node || _nodeId; - let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - if (node == null || clockseq == null) { - const seedBytes = options.random || (options.rng || _rng.default)(); - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; +const findLinkCid = (node, name) => { + const link = node.Links.find(link => link.Name === name); + return link?.Hash; +}; +const contentExporters = { + raw: file, + file: file, + directory: directory, + 'hamt-sharded-directory': hamt_sharded_directory, + metadata: (cid, node, unixfs, path, resolve, depth, blockstore) => { + return () => []; + }, + symlink: (cid, node, unixfs, path, resolve, depth, blockstore) => { + return () => []; } - - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; +}; +// @ts-expect-error types are wrong +const unixFsResolver = async (cid, name, path, toResolve, resolve, depth, blockstore, options) => { + const block = await blockstore.get(cid, options); + const node = src_decode(block); + let unixfs; + let next; + if (name == null) { + name = cid.toString(); } - } // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - - - let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - - let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs) - - const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression - - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; - } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval + if (node.Data == null) { + throw err_code(new Error('no data in PBNode'), 'ERR_NOT_UNIXFS'); + } + try { + unixfs = src_UnixFS.unmarshal(node.Data); + } + catch (err) { + // non-UnixFS dag-pb node? It could happen. + throw err_code(err, 'ERR_NOT_UNIXFS'); + } + if (path == null) { + path = name; + } + if (toResolve.length > 0) { + let linkCid; + if (unixfs?.type === 'hamt-sharded-directory') { + // special case - unixfs v1 hamt shards + linkCid = await find_cid_in_shard(node, toResolve[0], blockstore); + } + else { + linkCid = findLinkCid(node, toResolve[0]); + } + if (linkCid == null) { + throw err_code(new Error('file does not exist'), 'ERR_NOT_FOUND'); + } + // remove the path component we have resolved + const nextName = toResolve.shift(); + const nextPath = `${path}/${nextName}`; + next = { + cid: linkCid, + toResolve, + name: nextName ?? '', + path: nextPath + }; + } + const content = contentExporters[unixfs.type](cid, node, unixfs, path, resolve, depth, blockstore); + if (content == null) { + throw err_code(new Error('could not find content exporter'), 'ERR_NOT_FOUND'); + } + if (unixfs.isDirectory()) { + return { + entry: { + type: 'directory', + name, + path, + cid, + content, + unixfs, + depth, + node, + size: unixfs.fileSize() + }, + next + }; + } + return { + entry: { + type: 'file', + name, + path, + cid, + content, + unixfs, + depth, + node, + size: unixfs.fileSize() + }, + next + }; +}; +/* harmony default export */ const unixfs_v1 = (unixFsResolver); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/resolvers/index.js - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; - } // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); - } - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; // `time_low` - const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; // `time_mid` - const tmh = msecs / 0x100000000 * 10000 & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version +const resolvers_resolvers = { + [code]: unixfs_v1, + [multiformats_dist_src_codecs_raw_code]: resolvers_raw, + [src_code]: dag_cbor, + [multiformats_dist_src_hashes_identity_identity.code]: resolvers_identity +}; +const resolvers_resolve = async (cid, name, path, toResolve, depth, blockstore, options) => { + const resolver = resolvers_resolvers[cid.code]; + if (resolver == null) { + throw err_code(new Error(`No resolver for code ${cid.code}`), 'ERR_NO_RESOLVER'); + } + return resolver(cid, name, path, toResolve, resolvers_resolve, depth, blockstore, options); +}; +/* harmony default export */ const dist_src_resolvers = (resolvers_resolve); +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/dist/src/index.js - b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low` - b[i++] = clockseq & 0xff; // `node` - for (let n = 0; n < 6; ++n) { - b[i + n] = node[n]; +const src_toPathComponents = (path = '') => { + // split on / unless escaped with \ + return (path + .trim() + .match(/([^\\^/]|\\\/)+/g) ?? []) + .filter(Boolean); +}; +const cidAndRest = (path) => { + if (path instanceof Uint8Array) { + return { + cid: ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.decode(path), + toResolve: [] + }; + } + const cid = ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.asCID(path); + if (cid != null) { + return { + cid, + toResolve: [] + }; + } + if (typeof path === 'string') { + if (path.indexOf('/ipfs/') === 0) { + path = path.substring(6); + } + const output = src_toPathComponents(path); + return { + cid: ipfs_unixfs_exporter_node_modules_multiformats_dist_src_cid_CID.parse(output[0]), + toResolve: output.slice(1) + }; + } + throw err_code(new Error(`Unknown path type ${path}`), 'ERR_BAD_PATH'); +}; +async function* walkPath(path, blockstore, options = {}) { + let { cid, toResolve } = cidAndRest(path); + let name = cid.toString(); + let entryPath = name; + const startingDepth = toResolve.length; + while (true) { + const result = await dist_src_resolvers(cid, name, entryPath, toResolve, startingDepth, blockstore, options); + if (result.entry == null && result.next == null) { + throw err_code(new Error(`Could not resolve ${path}`), 'ERR_NOT_FOUND'); + } + if (result.entry != null) { + yield result.entry; + } + if (result.next == null) { + return; + } + // resolve further parts + toResolve = result.next.toResolve; + cid = result.next.cid; + name = result.next.name; + entryPath = result.next.path; + } +} +async function exporter(path, blockstore, options = {}) { + const result = await dist_src(walkPath(path, blockstore, options)); + if (result == null) { + throw err_code(new Error(`Could not resolve ${path}`), 'ERR_NOT_FOUND'); + } + return result; +} +async function* recursive(path, blockstore, options = {}) { + const node = await exporter(path, blockstore, options); + if (node == null) { + return; + } + yield node; + if (node.type === 'directory') { + for await (const child of recurse(node, options)) { + yield child; + } + } + async function* recurse(node, options) { + for await (const file of node.content(options)) { + yield file; + if (file instanceof Uint8Array) { + continue; + } + if (file.type === 'directory') { + yield* recurse(file, options); + } + } + } +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/errors.js +class UnixFSError extends Error { + name; + code; + constructor(message, name, code) { + super(message); + this.name = name; + this.code = code; + } +} +class NotUnixFSError extends UnixFSError { + constructor(message = 'not a Unixfs node') { + super(message, 'NotUnixFSError', 'ERR_NOT_UNIXFS'); + } +} +class InvalidPBNodeError extends UnixFSError { + constructor(message = 'invalid PBNode') { + super(message, 'InvalidPBNodeError', 'ERR_INVALID_PBNODE'); + } +} +class errors_UnknownError extends UnixFSError { + constructor(message = 'unknown error') { + super(message, 'InvalidPBNodeError', 'ERR_UNKNOWN_ERROR'); + } +} +class AlreadyExistsError extends UnixFSError { + constructor(message = 'path already exists') { + super(message, 'AlreadyExistsError', 'ERR_ALREADY_EXISTS'); + } +} +class DoesNotExistError extends UnixFSError { + constructor(message = 'path does not exist') { + super(message, 'DoesNotExistError', 'ERR_DOES_NOT_EXIST'); + } +} +class NoContentError extends UnixFSError { + constructor(message = 'no content') { + super(message, 'NoContentError', 'ERR_NO_CONTENT'); + } +} +class NotAFileError extends UnixFSError { + constructor(message = 'not a file') { + super(message, 'NotAFileError', 'ERR_NOT_A_FILE'); + } +} +class NotADirectoryError extends UnixFSError { + constructor(message = 'not a directory') { + super(message, 'NotADirectoryError', 'ERR_NOT_A_DIRECTORY'); + } +} +class errors_InvalidParametersError extends UnixFSError { + constructor(message = 'invalid parameters') { + super(message, 'InvalidParametersError', 'ERR_INVALID_PARAMETERS'); + } +} +//# sourceMappingURL=errors.js.map +;// CONCATENATED MODULE: ./node_modules/@libp2p/logger/node_modules/multiformats/vendor/base-x.js +// base-x encoding / decoding +// Copyright (c) 2018 base-x contributors +// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp) +// Distributed under the MIT software license, see the accompanying +// file LICENSE or http://www.opensource.org/licenses/mit-license.php. +function logger_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) { + if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') } + var BASE_MAP = new Uint8Array(256); + for (var j = 0; j < BASE_MAP.length; j++) { + BASE_MAP[j] = 255; + } + for (var i = 0; i < ALPHABET.length; i++) { + var x = ALPHABET.charAt(i); + var xc = x.charCodeAt(0); + if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') } + BASE_MAP[xc] = i; + } + var BASE = ALPHABET.length; + var LEADER = ALPHABET.charAt(0); + var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up + var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up + function encode (source) { + if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) { + source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength); + } else if (Array.isArray(source)) { + source = Uint8Array.from(source); + } + if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') } + if (source.length === 0) { return '' } + // Skip & count leading zeroes. + var zeroes = 0; + var length = 0; + var pbegin = 0; + var pend = source.length; + while (pbegin !== pend && source[pbegin] === 0) { + pbegin++; + zeroes++; + } + // Allocate enough space in big-endian base58 representation. + var size = ((pend - pbegin) * iFACTOR + 1) >>> 0; + var b58 = new Uint8Array(size); + // Process the bytes. + while (pbegin !== pend) { + var carry = source[pbegin]; + // Apply "b58 = b58 * 256 + ch". + var i = 0; + for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) { + carry += (256 * b58[it1]) >>> 0; + b58[it1] = (carry % BASE) >>> 0; + carry = (carry / BASE) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + pbegin++; + } + // Skip leading zeroes in base58 result. + var it2 = size - length; + while (it2 !== size && b58[it2] === 0) { + it2++; + } + // Translate the result into a string. + var str = LEADER.repeat(zeroes); + for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); } + return str + } + function decodeUnsafe (source) { + if (typeof source !== 'string') { throw new TypeError('Expected String') } + if (source.length === 0) { return new Uint8Array() } + var psz = 0; + // Skip leading spaces. + if (source[psz] === ' ') { return } + // Skip and count leading '1's. + var zeroes = 0; + var length = 0; + while (source[psz] === LEADER) { + zeroes++; + psz++; + } + // Allocate enough space in big-endian base256 representation. + var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up. + var b256 = new Uint8Array(size); + // Process the characters. + while (source[psz]) { + // Decode character + var carry = BASE_MAP[source.charCodeAt(psz)]; + // Invalid character + if (carry === 255) { return } + var i = 0; + for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) { + carry += (BASE * b256[it3]) >>> 0; + b256[it3] = (carry % 256) >>> 0; + carry = (carry / 256) >>> 0; + } + if (carry !== 0) { throw new Error('Non-zero carry') } + length = i; + psz++; + } + // Skip trailing spaces. + if (source[psz] === ' ') { return } + // Skip leading zeroes in b256. + var it4 = size - length; + while (it4 !== size && b256[it4] === 0) { + it4++; + } + var vch = new Uint8Array(zeroes + (size - it4)); + var j = zeroes; + while (it4 !== size) { + vch[j++] = b256[it4++]; + } + return vch + } + function decode (string) { + var buffer = decodeUnsafe(string); + if (buffer) { return buffer } + throw new Error(`Non-${name} character`) + } + return { + encode: encode, + decodeUnsafe: decodeUnsafe, + decode: decode } - - return buf || (0, _stringify.default)(b); } +var logger_node_modules_multiformats_vendor_base_x_src = logger_node_modules_multiformats_vendor_base_x_base; -var _default = v1; -exports["default"] = _default; - -/***/ }), - -/***/ 46530: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +var logger_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = logger_node_modules_multiformats_vendor_base_x_src; -"use strict"; +/* harmony default export */ const logger_node_modules_multiformats_vendor_base_x = (logger_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX); +;// CONCATENATED MODULE: ./node_modules/@libp2p/logger/node_modules/multiformats/src/bytes.js +const logger_node_modules_multiformats_src_bytes_empty = new Uint8Array(0) -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; +/** + * @param {Uint8Array} d + */ +const logger_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '') -var _v = _interopRequireDefault(__nccwpck_require__(60535)); +/** + * @param {string} hex + */ +const logger_node_modules_multiformats_src_bytes_fromHex = hex => { + const hexes = hex.match(/../g) + return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : logger_node_modules_multiformats_src_bytes_empty +} -var _md = _interopRequireDefault(__nccwpck_require__(1611)); +/** + * @param {Uint8Array} aa + * @param {Uint8Array} bb + */ +const logger_node_modules_multiformats_src_bytes_equals = (aa, bb) => { + if (aa === bb) return true + if (aa.byteLength !== bb.byteLength) { + return false + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + for (let ii = 0; ii < aa.byteLength; ii++) { + if (aa[ii] !== bb[ii]) { + return false + } + } -const v3 = (0, _v.default)('v3', 0x30, _md.default); -var _default = v3; -exports["default"] = _default; + return true +} -/***/ }), +/** + * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o + * @returns {Uint8Array} + */ +const logger_node_modules_multiformats_src_bytes_coerce = o => { + if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o + if (o instanceof ArrayBuffer) return new Uint8Array(o) + if (ArrayBuffer.isView(o)) { + return new Uint8Array(o.buffer, o.byteOffset, o.byteLength) + } + throw new Error('Unknown type, must be binary type') +} -/***/ 60535: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/** + * @param {any} o + * @returns {o is ArrayBuffer|ArrayBufferView} + */ +const logger_node_modules_multiformats_src_bytes_isBinary = o => + o instanceof ArrayBuffer || ArrayBuffer.isView(o) -"use strict"; +/** + * @param {string} str + * @returns {Uint8Array} + */ +const logger_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str) +/** + * @param {Uint8Array} b + * @returns {string} + */ +const logger_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b) -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = _default; -exports.URL = exports.DNS = void 0; -var _stringify = _interopRequireDefault(__nccwpck_require__(39004)); -var _parse = _interopRequireDefault(__nccwpck_require__(72615)); +;// CONCATENATED MODULE: ./node_modules/@libp2p/logger/node_modules/multiformats/src/bases/base.js -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function stringToBytes(str) { - str = unescape(encodeURIComponent(str)); // UTF8 escape +// Linter can't see that API is used in types. +// eslint-disable-next-line - const bytes = []; - for (let i = 0; i < str.length; ++i) { - bytes.push(str.charCodeAt(i)); +/** + * Class represents both BaseEncoder and MultibaseEncoder meaning it + * can be used to encode to multibase or base encode without multibase + * prefix. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseEncoder} + * @implements {API.BaseEncoder} + */ +class logger_node_modules_multiformats_src_bases_base_Encoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + */ + constructor (name, prefix, baseEncode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode } - return bytes; -} - -const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8'; -exports.DNS = DNS; -const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'; -exports.URL = URL; - -function _default(name, version, hashfunc) { - function generateUUID(value, namespace, buf, offset) { - if (typeof value === 'string') { - value = stringToBytes(value); + /** + * @param {Uint8Array} bytes + * @returns {API.Multibase} + */ + encode (bytes) { + if (bytes instanceof Uint8Array) { + return `${this.prefix}${this.baseEncode(bytes)}` + } else { + throw Error('Unknown type, must be binary type') } + } +} - if (typeof namespace === 'string') { - namespace = (0, _parse.default)(namespace); +/** + * @template {string} Prefix + */ +/** + * Class represents both BaseDecoder and MultibaseDecoder so it could be used + * to decode multibases (with matching prefix) or just base decode strings + * with corresponding base encoding. + * + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.UnibaseDecoder} + * @implements {API.BaseDecoder} + */ +class logger_node_modules_multiformats_src_bases_base_Decoder { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseDecode) { + this.name = name + this.prefix = prefix + /* c8 ignore next 3 */ + if (prefix.codePointAt(0) === undefined) { + throw new Error('Invalid prefix character') } + /** @private */ + this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0)) + this.baseDecode = baseDecode + } - if (namespace.length !== 16) { - throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)'); - } // Compute hash of namespace and value, Per 4.3 - // Future: Use spread syntax when supported on all platforms, e.g. `bytes = - // hashfunc([...namespace, ... value])` - - - let bytes = new Uint8Array(16 + value.length); - bytes.set(namespace); - bytes.set(value, namespace.length); - bytes = hashfunc(bytes); - bytes[6] = bytes[6] & 0x0f | version; - bytes[8] = bytes[8] & 0x3f | 0x80; - - if (buf) { - offset = offset || 0; - - for (let i = 0; i < 16; ++i) { - buf[offset + i] = bytes[i]; + /** + * @param {string} text + */ + decode (text) { + if (typeof text === 'string') { + if (text.codePointAt(0) !== this.prefixCodePoint) { + throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`) } - - return buf; + return this.baseDecode(text.slice(this.prefix.length)) + } else { + throw Error('Can only multibase decode strings') } + } - return (0, _stringify.default)(bytes); - } // Function#name is not settable on some platforms (#270) + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return logger_node_modules_multiformats_src_bases_base_or(this, decoder) + } +} +/** + * @template {string} Prefix + * @typedef {Record>} Decoders + */ - try { - generateUUID.name = name; // eslint-disable-next-line no-empty - } catch (err) {} // For CommonJS default export support +/** + * @template {string} Prefix + * @implements {API.MultibaseDecoder} + * @implements {API.CombobaseDecoder} + */ +class logger_node_modules_multiformats_src_bases_base_ComposedDecoder { + /** + * @param {Decoders} decoders + */ + constructor (decoders) { + this.decoders = decoders + } + /** + * @template {string} OtherPrefix + * @param {API.UnibaseDecoder|ComposedDecoder} decoder + * @returns {ComposedDecoder} + */ + or (decoder) { + return logger_node_modules_multiformats_src_bases_base_or(this, decoder) + } - generateUUID.DNS = DNS; - generateUUID.URL = URL; - return generateUUID; + /** + * @param {string} input + * @returns {Uint8Array} + */ + decode (input) { + const prefix = /** @type {Prefix} */ (input[0]) + const decoder = this.decoders[prefix] + if (decoder) { + return decoder.decode(input) + } else { + throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`) + } + } } -/***/ }), - -/***/ 33930: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +/** + * @template {string} L + * @template {string} R + * @param {API.UnibaseDecoder|API.CombobaseDecoder} left + * @param {API.UnibaseDecoder|API.CombobaseDecoder} right + * @returns {ComposedDecoder} + */ +const logger_node_modules_multiformats_src_bases_base_or = (left, right) => new logger_node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({ + ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }), + ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right }) +})) +/** + * @class + * @template {string} Base + * @template {string} Prefix + * @implements {API.MultibaseCodec} + * @implements {API.MultibaseEncoder} + * @implements {API.MultibaseDecoder} + * @implements {API.BaseCodec} + * @implements {API.BaseEncoder} + * @implements {API.BaseDecoder} + */ +class logger_node_modules_multiformats_src_bases_base_Codec { + /** + * @param {Base} name + * @param {Prefix} prefix + * @param {(bytes:Uint8Array) => string} baseEncode + * @param {(text:string) => Uint8Array} baseDecode + */ + constructor (name, prefix, baseEncode, baseDecode) { + this.name = name + this.prefix = prefix + this.baseEncode = baseEncode + this.baseDecode = baseDecode + this.encoder = new logger_node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode) + this.decoder = new logger_node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode) + } -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + /** + * @param {Uint8Array} input + */ + encode (input) { + return this.encoder.encode(input) + } -var _rng = _interopRequireDefault(__nccwpck_require__(32714)); + /** + * @param {string} input + */ + decode (input) { + return this.decoder.decode(input) + } +} -var _stringify = _interopRequireDefault(__nccwpck_require__(39004)); +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {(bytes:Uint8Array) => string} options.encode + * @param {(input:string) => Uint8Array} options.decode + * @returns {Codec} + */ +const logger_node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) => + new logger_node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode) -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +/** + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @returns {Codec} + */ +const logger_node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => { + const { encode, decode } = logger_node_modules_multiformats_vendor_base_x(alphabet, name) + return logger_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode, + /** + * @param {string} text + */ + decode: text => logger_node_modules_multiformats_src_bytes_coerce(decode(text)) + }) +} -function v4(options, buf, offset) { - options = options || {}; +/** + * @param {string} string + * @param {string} alphabet + * @param {number} bitsPerChar + * @param {string} name + * @returns {Uint8Array} + */ +const logger_node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => { + // Build the character lookup table: + /** @type {Record} */ + const codes = {} + for (let i = 0; i < alphabet.length; ++i) { + codes[alphabet[i]] = i + } - const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + // Count the padding bytes: + let end = string.length + while (string[end - 1] === '=') { + --end + } + // Allocate the output: + const out = new Uint8Array((end * bitsPerChar / 8) | 0) - rnds[6] = rnds[6] & 0x0f | 0x40; - rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided + // Parse the data: + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + let written = 0 // Next byte to write + for (let i = 0; i < end; ++i) { + // Read one character from the string: + const value = codes[string[i]] + if (value === undefined) { + throw new SyntaxError(`Non-${name} character`) + } - if (buf) { - offset = offset || 0; + // Append the bits to the buffer: + buffer = (buffer << bitsPerChar) | value + bits += bitsPerChar - for (let i = 0; i < 16; ++i) { - buf[offset + i] = rnds[i]; + // Write out some bits if the buffer has a byte's worth: + if (bits >= 8) { + bits -= 8 + out[written++] = 0xff & (buffer >> bits) } + } - return buf; + // Verify that we have received just enough bits: + if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) { + throw new SyntaxError('Unexpected end of data') } - return (0, _stringify.default)(rnds); + return out } -var _default = v4; -exports["default"] = _default; - -/***/ }), - -/***/ 22681: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - +/** + * @param {Uint8Array} data + * @param {string} alphabet + * @param {number} bitsPerChar + * @returns {string} + */ +const logger_node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => { + const pad = alphabet[alphabet.length - 1] === '=' + const mask = (1 << bitsPerChar) - 1 + let out = '' -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; + let bits = 0 // Number of bits currently in the buffer + let buffer = 0 // Bits waiting to be written out, MSB first + for (let i = 0; i < data.length; ++i) { + // Slurp data into the buffer: + buffer = (buffer << 8) | data[i] + bits += 8 -var _v = _interopRequireDefault(__nccwpck_require__(60535)); + // Write out as much as we can: + while (bits > bitsPerChar) { + bits -= bitsPerChar + out += alphabet[mask & (buffer >> bits)] + } + } -var _sha = _interopRequireDefault(__nccwpck_require__(39908)); + // Partial character: + if (bits) { + out += alphabet[mask & (buffer << (bitsPerChar - bits))] + } -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + // Add padding characters until we hit a byte boundary: + if (pad) { + while ((out.length * bitsPerChar) & 7) { + out += '=' + } + } -const v5 = (0, _v.default)('v5', 0x50, _sha.default); -var _default = v5; -exports["default"] = _default; + return out +} -/***/ }), +/** + * RFC4648 Factory + * + * @template {string} Base + * @template {string} Prefix + * @param {object} options + * @param {Base} options.name + * @param {Prefix} options.prefix + * @param {string} options.alphabet + * @param {number} options.bitsPerChar + */ +const logger_node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => { + return logger_node_modules_multiformats_src_bases_base_from({ + prefix, + name, + encode (input) { + return logger_node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar) + }, + decode (input) { + return logger_node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name) + } + }) +} -/***/ 67848: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +;// CONCATENATED MODULE: ./node_modules/@libp2p/logger/node_modules/multiformats/src/bases/base32.js -"use strict"; +const logger_node_modules_multiformats_src_bases_base32_base32 = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'b', + name: 'base32', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567', + bitsPerChar: 5 +}) -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; +const logger_node_modules_multiformats_src_bases_base32_base32upper = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'B', + name: 'base32upper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', + bitsPerChar: 5 +}) -var _regex = _interopRequireDefault(__nccwpck_require__(73270)); +const logger_node_modules_multiformats_src_bases_base32_base32pad = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'c', + name: 'base32pad', + alphabet: 'abcdefghijklmnopqrstuvwxyz234567=', + bitsPerChar: 5 +}) -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const logger_node_modules_multiformats_src_bases_base32_base32padupper = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'C', + name: 'base32padupper', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=', + bitsPerChar: 5 +}) -function validate(uuid) { - return typeof uuid === 'string' && _regex.default.test(uuid); -} +const logger_node_modules_multiformats_src_bases_base32_base32hex = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'v', + name: 'base32hex', + alphabet: '0123456789abcdefghijklmnopqrstuv', + bitsPerChar: 5 +}) -var _default = validate; -exports["default"] = _default; +const logger_node_modules_multiformats_src_bases_base32_base32hexupper = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'V', + name: 'base32hexupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV', + bitsPerChar: 5 +}) -/***/ }), +const logger_node_modules_multiformats_src_bases_base32_base32hexpad = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 't', + name: 'base32hexpad', + alphabet: '0123456789abcdefghijklmnopqrstuv=', + bitsPerChar: 5 +}) -/***/ 28987: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const logger_node_modules_multiformats_src_bases_base32_base32hexpadupper = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'T', + name: 'base32hexpadupper', + alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=', + bitsPerChar: 5 +}) -"use strict"; +const logger_node_modules_multiformats_src_bases_base32_base32z = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'h', + name: 'base32z', + alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769', + bitsPerChar: 5 +}) +;// CONCATENATED MODULE: ./node_modules/@libp2p/logger/node_modules/multiformats/src/bases/base58.js -Object.defineProperty(exports, "__esModule", ({ - value: true -})); -exports["default"] = void 0; -var _validate = _interopRequireDefault(__nccwpck_require__(67848)); +const logger_node_modules_multiformats_src_bases_base58_base58btc = logger_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58btc', + prefix: 'z', + alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' +}) -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const logger_node_modules_multiformats_src_bases_base58_base58flickr = logger_node_modules_multiformats_src_bases_base_baseX({ + name: 'base58flickr', + prefix: 'Z', + alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ' +}) -function version(uuid) { - if (!(0, _validate.default)(uuid)) { - throw TypeError('Invalid UUID'); - } +;// CONCATENATED MODULE: ./node_modules/@libp2p/logger/node_modules/multiformats/src/bases/base64.js +// @ts-check - return parseInt(uuid.substr(14, 1), 16); -} -var _default = version; -exports["default"] = _default; -/***/ }), +const logger_node_modules_multiformats_src_bases_base64_base64 = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'm', + name: 'base64', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + bitsPerChar: 6 +}) -/***/ 21628: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +const logger_node_modules_multiformats_src_bases_base64_base64pad = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'M', + name: 'base64pad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + bitsPerChar: 6 +}) -"use strict"; +const logger_node_modules_multiformats_src_bases_base64_base64url = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'u', + name: 'base64url', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_', + bitsPerChar: 6 +}) +const logger_node_modules_multiformats_src_bases_base64_base64urlpad = logger_node_modules_multiformats_src_bases_base_rfc4648({ + prefix: 'U', + name: 'base64urlpad', + alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=', + bitsPerChar: 6 +}) -exports.TextEncoder = - typeof TextEncoder !== "undefined" ? TextEncoder : (__nccwpck_require__(73837).TextEncoder) +;// CONCATENATED MODULE: ./node_modules/@libp2p/logger/dist/src/index.js +/** + * @packageDocumentation + * + * A logger for libp2p based on the venerable [debug](https://www.npmjs.com/package/debug) + * module. + * + * @example + * + * ```JavaScript + * import { logger } from '@libp2p/logger' + * + * const log = logger('libp2p:my:component:name') + * + * log('something happened: %s', 'it was ok') + * log.error('something bad happened: %o', err) + * + * log('with this peer: %p', aPeerId) + * log('and this base58btc: %b', aUint8Array) + * log('and this base32: %t', aUint8Array) + * ``` + * ```console + * $ DEBUG=libp2p:* node index.js + * something happened: it was ok + * something bad happened: + * with this peer: 12D3Foo + * with this base58btc: Qmfoo + * with this base32: bafyfoo + * ``` + */ -exports.TextDecoder = - typeof TextDecoder !== "undefined" ? TextDecoder : (__nccwpck_require__(73837).TextDecoder) -/***/ }), -/***/ 10078: -/***/ (function(__unused_webpack_module, exports) { +// Add a formatter for converting to a base58 string +debug_src.formatters.b = (v) => { + return v == null ? 'undefined' : logger_node_modules_multiformats_src_bases_base58_base58btc.baseEncode(v); +}; +// Add a formatter for converting to a base32 string +debug_src.formatters.t = (v) => { + return v == null ? 'undefined' : logger_node_modules_multiformats_src_bases_base32_base32.baseEncode(v); +}; +// Add a formatter for converting to a base64 string +debug_src.formatters.m = (v) => { + return v == null ? 'undefined' : logger_node_modules_multiformats_src_bases_base64_base64.baseEncode(v); +}; +// Add a formatter for stringifying peer ids +debug_src.formatters.p = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +// Add a formatter for stringifying CIDs +debug_src.formatters.c = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +// Add a formatter for stringifying Datastore keys +debug_src.formatters.k = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +// Add a formatter for stringifying Multiaddrs +debug_src.formatters.a = (v) => { + return v == null ? 'undefined' : v.toString(); +}; +function dist_src_createDisabledLogger(namespace) { + const logger = () => { }; + logger.enabled = false; + logger.color = ''; + logger.diff = 0; + logger.log = () => { }; + logger.namespace = namespace; + logger.destroy = () => true; + logger.extend = () => logger; + return logger; +} /** - * web-streams-polyfill v3.2.1 + * Create a component logger that will prefix any log messages with a truncated + * peer id. + * + * @example + * + * ```TypeScript + * import { peerLogger } from '@libp2p/logger' + * import { peerIdFromString } from '@libp2p/peer-id' + * + * const peerId = peerIdFromString('12D3FooBar') + * const logger = peerLogger(peerId) + * + * const log = logger.forComponent('my-component') + * log.info('hello world') + * // logs "12…oBar:my-component hello world" + * ``` */ -(function (global, factory) { - true ? factory(exports) : - 0; -}(this, (function (exports) { 'use strict'; - - /// - var SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? - Symbol : - function (description) { return "Symbol(" + description + ")"; }; +function peerLogger(peerId, options = {}) { + return prefixLogger(truncatePeerId(peerId, options)); +} +/** + * Create a component logger that will prefix any log messages with the passed + * string. + * + * @example + * + * ```TypeScript + * import { prefixLogger } from '@libp2p/logger' + * + * const logger = prefixLogger('my-node') + * + * const log = logger.forComponent('my-component') + * log.info('hello world') + * // logs "my-node:my-component hello world" + * ``` + */ +function prefixLogger(prefix) { + return { + forComponent(name) { + return dist_src_logger(`${prefix}:${name}`); + } + }; +} +/** + * Create a component logger + * + * @example + * + * ```TypeScript + * import { defaultLogger } from '@libp2p/logger' + * import { peerIdFromString } from '@libp2p/peer-id' + * + * const logger = defaultLogger() + * + * const log = logger.forComponent('my-component') + * log.info('hello world') + * // logs "my-component hello world" + * ``` + */ +function defaultLogger() { + return { + forComponent(name) { + return dist_src_logger(name); + } + }; +} +/** + * Creates a logger for the passed component name. + * + * @example + * + * ```TypeScript + * import { logger } from '@libp2p/logger' + * + * const log = logger('my-component') + * log.info('hello world') + * // logs "my-component hello world" + * ``` + */ +function dist_src_logger(name) { + // trace logging is a no-op by default + let trace = dist_src_createDisabledLogger(`${name}:trace`); + // look at all the debug names and see if trace logging has explicitly been enabled + if (debug_src.enabled(`${name}:trace`) && debug_src.names.map(r => r.toString()).find(n => n.includes(':trace')) != null) { + trace = debug_src(`${name}:trace`); + } + return Object.assign(debug_src(name), { + error: debug_src(`${name}:error`), + trace + }); +} +function dist_src_disable() { + debug.disable(); +} +function dist_src_enable(namespaces) { + debug.enable(namespaces); +} +function dist_src_enabled(namespaces) { + return debug.enabled(namespaces); +} +//# sourceMappingURL=index.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/consumable-hash.js - /// - function noop() { - return undefined; - } - function getGlobals() { - if (typeof self !== 'undefined') { - return self; +function consumable_hash_wrapHash(hashFn) { + function hashing(value) { + if (value instanceof consumable_hash_InfiniteHash) { + // already a hash. return it + return value; } - else if (typeof window !== 'undefined') { - return window; + else { + return new consumable_hash_InfiniteHash(value, hashFn); + } + } + return hashing; +} +class consumable_hash_InfiniteHash { + _value; + _hashFn; + _depth; + _availableBits; + _currentBufferIndex; + _buffers; + constructor(value, hashFn) { + if (!(value instanceof Uint8Array)) { + throw new Error('can only hash Uint8Arrays'); + } + this._value = value; + this._hashFn = hashFn; + this._depth = -1; + this._availableBits = 0; + this._currentBufferIndex = 0; + this._buffers = []; + } + async take(bits) { + let pendingBits = bits; + while (this._availableBits < pendingBits) { + await this._produceMoreBits(); + } + let result = 0; + while (pendingBits > 0) { + const hash = this._buffers[this._currentBufferIndex]; + const available = Math.min(hash.availableBits(), pendingBits); + const took = hash.take(available); + result = (result << available) + took; + pendingBits -= available; + this._availableBits -= available; + if (hash.availableBits() === 0) { + this._currentBufferIndex++; + } } - else if (typeof global !== 'undefined') { - return global; + return result; + } + untake(bits) { + let pendingBits = bits; + while (pendingBits > 0) { + const hash = this._buffers[this._currentBufferIndex]; + const availableForUntake = Math.min(hash.totalBits() - hash.availableBits(), pendingBits); + hash.untake(availableForUntake); + pendingBits -= availableForUntake; + this._availableBits += availableForUntake; + if (this._currentBufferIndex > 0 && hash.totalBits() === hash.availableBits()) { + this._depth--; + this._currentBufferIndex--; + } } - return undefined; } - var globals = getGlobals(); - - function typeIsObject(x) { - return (typeof x === 'object' && x !== null) || typeof x === 'function'; + async _produceMoreBits() { + this._depth++; + const value = this._depth > 0 ? uint8arrays_dist_src_concat_concat([this._value, Uint8Array.from([this._depth])]) : this._value; + const hashValue = await this._hashFn(value); + const buffer = new consumable_hash_ConsumableBuffer(hashValue); + this._buffers.push(buffer); + this._availableBits += buffer.availableBits(); + } +} +const consumable_hash_START_MASKS = [ + 0b11111111, + 0b11111110, + 0b11111100, + 0b11111000, + 0b11110000, + 0b11100000, + 0b11000000, + 0b10000000 +]; +const consumable_hash_STOP_MASKS = [ + 0b00000001, + 0b00000011, + 0b00000111, + 0b00001111, + 0b00011111, + 0b00111111, + 0b01111111, + 0b11111111 +]; +class consumable_hash_ConsumableBuffer { + _value; + _currentBytePos; + _currentBitPos; + constructor(value) { + this._value = value; + this._currentBytePos = value.length - 1; + this._currentBitPos = 7; + } + availableBits() { + return this._currentBitPos + 1 + this._currentBytePos * 8; + } + totalBits() { + return this._value.length * 8; + } + take(bits) { + let pendingBits = bits; + let result = 0; + while (pendingBits > 0 && this._haveBits()) { + const byte = this._value[this._currentBytePos]; + const availableBits = this._currentBitPos + 1; + const taking = Math.min(availableBits, pendingBits); + const value = consumable_hash_byteBitsToInt(byte, availableBits - taking, taking); + result = (result << taking) + value; + pendingBits -= taking; + this._currentBitPos -= taking; + if (this._currentBitPos < 0) { + this._currentBitPos = 7; + this._currentBytePos--; + } + } + return result; } - var rethrowAssertionErrorRejection = noop; - - var originalPromise = Promise; - var originalPromiseThen = Promise.prototype.then; - var originalPromiseResolve = Promise.resolve.bind(originalPromise); - var originalPromiseReject = Promise.reject.bind(originalPromise); - function newPromise(executor) { - return new originalPromise(executor); + untake(bits) { + this._currentBitPos += bits; + while (this._currentBitPos > 7) { + this._currentBitPos -= 8; + this._currentBytePos += 1; + } } - function promiseResolvedWith(value) { - return originalPromiseResolve(value); + _haveBits() { + return this._currentBytePos >= 0; } - function promiseRejectedWith(reason) { - return originalPromiseReject(reason); +} +function consumable_hash_byteBitsToInt(byte, start, length) { + const mask = consumable_hash_maskFor(start, length); + return (byte & mask) >>> start; +} +function consumable_hash_maskFor(start, length) { + return consumable_hash_START_MASKS[start] & consumable_hash_STOP_MASKS[Math.min(length + start - 1, 7)]; +} +//# sourceMappingURL=consumable-hash.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/hamt-constants.js + +const hamtHashCode = BigInt(murmur3128.code); +const hamtBucketBits = 8; +async function hamt_constants_hamtHashFn(buf) { + return (await murmur3128.encode(buf)) + // Murmur3 outputs 128 bit but, accidentally, IPFS Go's + // implementation only uses the first 64, so we must do the same + // for parity.. + .subarray(0, 8) + // Invert buffer because that's how Go impl does it + .reverse(); +} +//# sourceMappingURL=hamt-constants.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/persist.js + + + +const persist_persist = async (buffer, blockstore, options) => { + if (options.codec == null) { + options.codec = src_namespaceObject; } - function PerformPromiseThen(promise, onFulfilled, onRejected) { - // There doesn't appear to be any way to correctly emulate the behaviour from JavaScript, so this is just an - // approximation. - return originalPromiseThen.call(promise, onFulfilled, onRejected); + const multihash = await unixfs_node_modules_multiformats_src_hashes_sha2_sha256.digest(buffer); + const cid = unixfs_node_modules_multiformats_src_cid_CID.create(options.cidVersion, options.codec.code, multihash); + await blockstore.put(cid, buffer, { + ...options, + signal: options.signal + }); + return cid; +}; +//# sourceMappingURL=persist.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/dir-sharded.js + + + + + + +class dir_sharded_Dir { + options; + root; + dir; + path; + dirty; + flat; + parent; + parentKey; + unixfs; + mode; + mtime; + cid; + size; + nodeSize; + constructor(props, options) { + this.options = options ?? {}; + this.root = props.root; + this.dir = props.dir; + this.path = props.path; + this.dirty = props.dirty; + this.flat = props.flat; + this.parent = props.parent; + this.parentKey = props.parentKey; + this.unixfs = props.unixfs; + this.mode = props.mode; + this.mtime = props.mtime; + } +} +class dir_sharded_DirSharded extends dir_sharded_Dir { + _bucket; + constructor(props, options) { + super(props, options); + this._bucket = createHAMT({ + hashFn: hamt_constants_hamtHashFn, + bits: 8 + }); } - function uponPromise(promise, onFulfilled, onRejected) { - PerformPromiseThen(PerformPromiseThen(promise, onFulfilled, onRejected), undefined, rethrowAssertionErrorRejection); + async put(name, value) { + this.cid = undefined; + this.size = undefined; + this.nodeSize = undefined; + await this._bucket.put(name, value); } - function uponFulfillment(promise, onFulfilled) { - uponPromise(promise, onFulfilled); + async get(name) { + return this._bucket.get(name); } - function uponRejection(promise, onRejected) { - uponPromise(promise, undefined, onRejected); + childCount() { + return this._bucket.leafCount(); } - function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) { - return PerformPromiseThen(promise, fulfillmentHandler, rejectionHandler); + directChildrenCount() { + return this._bucket.childrenCount(); } - function setPromiseIsHandledToTrue(promise) { - PerformPromiseThen(promise, undefined, rethrowAssertionErrorRejection); + onlyChild() { + return this._bucket.onlyChild(); } - var queueMicrotask = (function () { - var globalQueueMicrotask = globals && globals.queueMicrotask; - if (typeof globalQueueMicrotask === 'function') { - return globalQueueMicrotask; - } - var resolvedPromise = promiseResolvedWith(undefined); - return function (fn) { return PerformPromiseThen(resolvedPromise, fn); }; - })(); - function reflectCall(F, V, args) { - if (typeof F !== 'function') { - throw new TypeError('Argument is not a function'); + async *eachChildSeries() { + for await (const { key, value } of this._bucket.eachLeafSeries()) { + yield { + key, + child: value + }; } - return Function.prototype.apply.call(F, V, args); } - function promiseCall(F, V, args) { - try { - return promiseResolvedWith(reflectCall(F, V, args)); - } - catch (value) { - return promiseRejectedWith(value); + estimateNodeSize() { + if (this.nodeSize !== undefined) { + return this.nodeSize; } + this.nodeSize = dir_sharded_calculateSize(this._bucket, this, this.options); + return this.nodeSize; } - - // Original from Chromium - // https://chromium.googlesource.com/chromium/src/+/0aee4434a4dba42a42abaea9bfbc0cd196a63bc1/third_party/blink/renderer/core/streams/SimpleQueue.js - var QUEUE_MAX_ARRAY_SIZE = 16384; - /** - * Simple queue structure. - * - * Avoids scalability issues with using a packed array directly by using - * multiple arrays in a linked list and keeping the array size bounded. - */ - var SimpleQueue = /** @class */ (function () { - function SimpleQueue() { - this._cursor = 0; - this._size = 0; - // _front and _back are always defined. - this._front = { - _elements: [], - _next: undefined + async *flush(blockstore) { + for await (const entry of dir_sharded_flush(this._bucket, blockstore, this, this.options)) { + yield { + ...entry, + path: this.path }; - this._back = this._front; - // The cursor is used to avoid calling Array.shift(). - // It contains the index of the front element of the array inside the - // front-most node. It is always in the range [0, QUEUE_MAX_ARRAY_SIZE). - this._cursor = 0; - // When there is only one node, size === elements.length - cursor. - this._size = 0; } - Object.defineProperty(SimpleQueue.prototype, "length", { - get: function () { - return this._size; - }, - enumerable: false, - configurable: true - }); - // For exception safety, this method is structured in order: - // 1. Read state - // 2. Calculate required state mutations - // 3. Perform state mutations - SimpleQueue.prototype.push = function (element) { - var oldBack = this._back; - var newBack = oldBack; - if (oldBack._elements.length === QUEUE_MAX_ARRAY_SIZE - 1) { - newBack = { - _elements: [], - _next: undefined - }; - } - // push() is the mutation most likely to throw an exception, so it - // goes first. - oldBack._elements.push(element); - if (newBack !== oldBack) { - this._back = newBack; - oldBack._next = newBack; + } +} +async function* dir_sharded_flush(bucket, blockstore, shardRoot, options) { + const children = bucket._children; + const links = []; + let childrenSize = 0n; + for (let i = 0; i < children.length; i++) { + const child = children.get(i); + if (child == null) { + continue; + } + const labelPrefix = i.toString(16).toUpperCase().padStart(2, '0'); + if (child instanceof Bucket) { + let shard; + for await (const subShard of dir_sharded_flush(child, blockstore, null, options)) { + shard = subShard; } - ++this._size; - }; - // Like push(), shift() follows the read -> calculate -> mutate pattern for - // exception safety. - SimpleQueue.prototype.shift = function () { // must not be called on an empty queue - var oldFront = this._front; - var newFront = oldFront; - var oldCursor = this._cursor; - var newCursor = oldCursor + 1; - var elements = oldFront._elements; - var element = elements[oldCursor]; - if (newCursor === QUEUE_MAX_ARRAY_SIZE) { - newFront = oldFront._next; - newCursor = 0; + if (shard == null) { + throw new Error('Could not flush sharded directory, no subshard found'); } - // No mutations before this point. - --this._size; - this._cursor = newCursor; - if (oldFront !== newFront) { - this._front = newFront; + links.push({ + Name: labelPrefix, + Tsize: Number(shard.size), + Hash: shard.cid + }); + childrenSize += shard.size; + } + else if (dir_sharded_isDir(child.value)) { + const dir = child.value; + let flushedDir; + for await (const entry of dir.flush(blockstore)) { + flushedDir = entry; + yield flushedDir; } - // Permit shifted element to be garbage collected. - elements[oldCursor] = undefined; - return element; - }; - // The tricky thing about forEach() is that it can be called - // re-entrantly. The queue may be mutated inside the callback. It is easy to - // see that push() within the callback has no negative effects since the end - // of the queue is checked for on every iteration. If shift() is called - // repeatedly within the callback then the next iteration may return an - // element that has been removed. In this case the callback will be called - // with undefined values until we either "catch up" with elements that still - // exist or reach the back of the queue. - SimpleQueue.prototype.forEach = function (callback) { - var i = this._cursor; - var node = this._front; - var elements = node._elements; - while (i !== elements.length || node._next !== undefined) { - if (i === elements.length) { - node = node._next; - elements = node._elements; - i = 0; - if (elements.length === 0) { - break; - } - } - callback(elements[i]); - ++i; + if (flushedDir == null) { + throw new Error('Did not flush dir'); } - }; - // Return the element that would be returned if shift() was called now, - // without modifying the queue. - SimpleQueue.prototype.peek = function () { // must not be called on an empty queue - var front = this._front; - var cursor = this._cursor; - return front._elements[cursor]; - }; - return SimpleQueue; - }()); - - function ReadableStreamReaderGenericInitialize(reader, stream) { - reader._ownerReadableStream = stream; - stream._reader = reader; - if (stream._state === 'readable') { - defaultReaderClosedPromiseInitialize(reader); - } - else if (stream._state === 'closed') { - defaultReaderClosedPromiseInitializeAsResolved(reader); + const label = labelPrefix + child.key; + links.push({ + Name: label, + Tsize: Number(flushedDir.size), + Hash: flushedDir.cid + }); + childrenSize += flushedDir.size; } else { - defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError); + const value = child.value; + if (value.cid == null) { + continue; + } + const label = labelPrefix + child.key; + const size = value.size; + links.push({ + Name: label, + Tsize: Number(size), + Hash: value.cid + }); + childrenSize += BigInt(size ?? 0); + } + } + // go-ipfs uses little endian, that's why we have to + // reverse the bit field before storing it + const data = Uint8Array.from(children.bitField().reverse()); + const dir = new src_UnixFS({ + type: 'hamt-sharded-directory', + data, + fanout: BigInt(bucket.tableSize()), + hashType: hamtHashCode, + mtime: shardRoot?.mtime, + mode: shardRoot?.mode + }); + const node = { + Data: dir.marshal(), + Links: links + }; + const buffer = src_encode(prepare(node)); + const cid = await persist_persist(buffer, blockstore, options); + const size = BigInt(buffer.byteLength) + childrenSize; + yield { + cid, + unixfs: dir, + size + }; +} +function dir_sharded_isDir(obj) { + return typeof obj.flush === 'function'; +} +function dir_sharded_calculateSize(bucket, shardRoot, options) { + const children = bucket._children; + const links = []; + for (let i = 0; i < children.length; i++) { + const child = children.get(i); + if (child == null) { + continue; } - } - // A client of ReadableStreamDefaultReader and ReadableStreamBYOBReader may use these functions directly to bypass state - // check. - function ReadableStreamReaderGenericCancel(reader, reason) { - var stream = reader._ownerReadableStream; - return ReadableStreamCancel(stream, reason); - } - function ReadableStreamReaderGenericRelease(reader) { - if (reader._ownerReadableStream._state === 'readable') { - defaultReaderClosedPromiseReject(reader, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")); + const labelPrefix = i.toString(16).toUpperCase().padStart(2, '0'); + if (child instanceof Bucket) { + const size = dir_sharded_calculateSize(child, null, options); + links.push({ + Name: labelPrefix, + Tsize: Number(size), + Hash: options.cidVersion === 0 ? dir_sharded_CID_V0 : dir_sharded_CID_V1 + }); + } + else if (typeof child.value.flush === 'function') { + const dir = child.value; + const size = dir.nodeSize(); + links.push({ + Name: labelPrefix + child.key, + Tsize: Number(size), + Hash: options.cidVersion === 0 ? dir_sharded_CID_V0 : dir_sharded_CID_V1 + }); } else { - defaultReaderClosedPromiseResetToRejected(reader, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")); + const value = child.value; + if (value.cid == null) { + continue; + } + const label = labelPrefix + child.key; + const size = value.size; + links.push({ + Name: label, + Tsize: Number(size), + Hash: value.cid + }); } - reader._ownerReadableStream._reader = undefined; - reader._ownerReadableStream = undefined; } - // Helper functions for the readers. - function readerLockException(name) { - return new TypeError('Cannot ' + name + ' a stream using a released reader'); - } - // Helper functions for the ReadableStreamDefaultReader. - function defaultReaderClosedPromiseInitialize(reader) { - reader._closedPromise = newPromise(function (resolve, reject) { - reader._closedPromise_resolve = resolve; - reader._closedPromise_reject = reject; + // go-ipfs uses little endian, that's why we have to + // reverse the bit field before storing it + const data = Uint8Array.from(children.bitField().reverse()); + const dir = new src_UnixFS({ + type: 'hamt-sharded-directory', + data, + fanout: BigInt(bucket.tableSize()), + hashType: hamtHashCode, + mtime: shardRoot?.mtime, + mode: shardRoot?.mode + }); + const buffer = src_encode(prepare({ + Data: dir.marshal(), + Links: links + })); + return buffer.length; +} +// we use these to calculate the node size to use as a check for whether a directory +// should be sharded or not. Since CIDs have a constant length and We're only +// interested in the data length and not the actual content identifier we can use +// any old CID instead of having to hash the data which is expensive. +const dir_sharded_CID_V0 = unixfs_node_modules_multiformats_src_cid_CID.parse('QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn'); +const dir_sharded_CID_V1 = unixfs_node_modules_multiformats_src_cid_CID.parse('zdj7WbTaiJT1fgatdet9Ei9iDB5hdCxkbVyhyh8YTUnXMiwYi'); +//# sourceMappingURL=dir-sharded.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/hamt-utils.js + + + + +// @ts-expect-error no types + + + + + + +const hamt_utils_log = dist_src_logger('helia:unixfs:commands:utils:hamt-utils'); +const hamt_utils_toPrefix = (position) => { + return position + .toString(16) + .toUpperCase() + .padStart(2, '0') + .substring(0, 2); +}; +const createShard = async (blockstore, contents, options) => { + const shard = new dir_sharded_DirSharded({ + root: true, + dir: true, + parent: undefined, + parentKey: undefined, + path: '', + dirty: true, + flat: false, + mtime: options.mtime, + mode: options.mode + }, options); + for (let i = 0; i < contents.length; i++) { + await shard._bucket.put(contents[i].name, { + size: contents[i].size, + cid: contents[i].cid }); } - function defaultReaderClosedPromiseInitializeAsRejected(reader, reason) { - defaultReaderClosedPromiseInitialize(reader); - defaultReaderClosedPromiseReject(reader, reason); - } - function defaultReaderClosedPromiseInitializeAsResolved(reader) { - defaultReaderClosedPromiseInitialize(reader); - defaultReaderClosedPromiseResolve(reader); + const res = await dist_src(shard.flush(blockstore)); + if (res == null) { + throw new Error('Flushing shard yielded no result'); } - function defaultReaderClosedPromiseReject(reader, reason) { - if (reader._closedPromise_reject === undefined) { - return; + return res; +}; +const updateShardedDirectory = async (path, blockstore, options) => { + // persist any metadata on the shard root + const shardRoot = src_UnixFS.unmarshal(path[0].node.Data ?? new Uint8Array(0)); + // this is always the same + const fanout = BigInt(Math.pow(2, hamtBucketBits)); + // start from the leaf and ascend to the root + path.reverse(); + let cid; + let node; + for (let i = 0; i < path.length; i++) { + const isRoot = i === path.length - 1; + const segment = path[i]; + // go-ipfs uses little endian, that's why we have to + // reverse the bit field before storing it + const data = Uint8Array.from(segment.children.bitField().reverse()); + const dir = new src_UnixFS({ + type: 'hamt-sharded-directory', + data, + fanout, + hashType: hamtHashCode + }); + if (isRoot) { + dir.mtime = shardRoot.mtime; + dir.mode = shardRoot.mode; + } + node = { + Data: dir.marshal(), + Links: segment.node.Links + }; + const block = src_encode(prepare(node)); + cid = await persist_persist(block, blockstore, options); + if (!isRoot) { + // update link in parent sub-shard + const nextSegment = path[i + 1]; + if (nextSegment == null) { + throw new Error('Was not operating on shard root but also had no parent?'); + } + hamt_utils_log('updating link in parent sub-shard with prefix %s', nextSegment.prefix); + nextSegment.node.Links = nextSegment.node.Links.filter(l => l.Name !== nextSegment.prefix); + nextSegment.node.Links.push({ + Name: nextSegment.prefix, + Hash: cid, + Tsize: segment.node.Links.reduce((acc, curr) => acc + (curr.Tsize ?? 0), block.byteLength) + }); } - setPromiseIsHandledToTrue(reader._closedPromise); - reader._closedPromise_reject(reason); - reader._closedPromise_resolve = undefined; - reader._closedPromise_reject = undefined; } - function defaultReaderClosedPromiseResetToRejected(reader, reason) { - defaultReaderClosedPromiseInitializeAsRejected(reader, reason); + if (cid == null || node == null) { + throw new Error('Noting persisted'); } - function defaultReaderClosedPromiseResolve(reader) { - if (reader._closedPromise_resolve === undefined) { - return; + return { cid, node }; +}; +const recreateShardedDirectory = async (cid, fileName, blockstore, options) => { + const wrapped = consumable_hash_wrapHash(hamt_constants_hamtHashFn); + const hash = wrapped(unixfs_node_modules_uint8arrays_dist_src_from_string_fromString(fileName)); + const path = []; + // descend the HAMT, loading each layer as we head towards the target child + while (true) { + const block = await blockstore.get(cid, options); + const node = src_decode(block); + const children = new sparse_array(); + const index = await hash.take(hamtBucketBits); + const prefix = hamt_utils_toPrefix(index); + path.push({ + prefix, + children, + node + }); + let childLink; + // update sparsearray child layout - the bitfield is used as the data field for the + // intermediate DAG node so this is required to generate consistent hashes + for (const link of node.Links) { + const linkName = link.Name ?? ''; + if (linkName.length < 2) { + throw new Error('Invalid HAMT - link name was too short'); + } + const position = parseInt(linkName.substring(0, 2), 16); + children.set(position, true); + // we found the child we are looking for + if (linkName.startsWith(prefix)) { + childLink = link; + } } - reader._closedPromise_resolve(undefined); - reader._closedPromise_resolve = undefined; - reader._closedPromise_reject = undefined; + if (childLink == null) { + hamt_utils_log('no link found with prefix %s for %s', prefix, fileName); + // hash.untake(hamtBucketBits) + break; + } + const linkName = childLink.Name ?? ''; + if (linkName.length < 2) { + throw new Error('Invalid HAMT - link name was too short'); + } + if (linkName.length === 2) { + // found sub-shard + cid = childLink.Hash; + hamt_utils_log('descend into sub-shard with prefix %s', linkName); + continue; + } + break; } + return { path, hash }; +}; +//# sourceMappingURL=hamt-utils.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/is-over-shard-threshold.js - var AbortSteps = SymbolPolyfill('[[AbortSteps]]'); - var ErrorSteps = SymbolPolyfill('[[ErrorSteps]]'); - var CancelSteps = SymbolPolyfill('[[CancelSteps]]'); - var PullSteps = SymbolPolyfill('[[PullSteps]]'); - - /// - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite#Polyfill - var NumberIsFinite = Number.isFinite || function (x) { - return typeof x === 'number' && isFinite(x); - }; - /// - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc#Polyfill - var MathTrunc = Math.trunc || function (v) { - return v < 0 ? Math.ceil(v) : Math.floor(v); - }; - // https://heycam.github.io/webidl/#idl-dictionaries - function isDictionary(x) { - return typeof x === 'object' || typeof x === 'function'; - } - function assertDictionary(obj, context) { - if (obj !== undefined && !isDictionary(obj)) { - throw new TypeError(context + " is not an object."); - } - } - // https://heycam.github.io/webidl/#idl-callback-functions - function assertFunction(x, context) { - if (typeof x !== 'function') { - throw new TypeError(context + " is not a function."); - } +/** + * Estimate node size only based on DAGLink name and CID byte lengths + * https://github.com/ipfs/go-unixfsnode/blob/37b47f1f917f1b2f54c207682f38886e49896ef9/data/builder/directory.go#L81-L96 + * + * If the node is a hamt sharded directory the calculation is based on if it was a regular directory. + */ +async function isOverShardThreshold(node, blockstore, threshold, options) { + if (node.Data == null) { + throw new Error('DagPB node had no data'); } - // https://heycam.github.io/webidl/#idl-object - function isObject(x) { - return (typeof x === 'object' && x !== null) || typeof x === 'function'; + const unixfs = src_UnixFS.unmarshal(node.Data); + let size; + if (unixfs.type === 'directory') { + size = estimateNodeSize(node); } - function assertObject(x, context) { - if (!isObject(x)) { - throw new TypeError(context + " is not an object."); - } + else if (unixfs.type === 'hamt-sharded-directory') { + size = await estimateShardSize(node, 0, threshold, blockstore, options); } - function assertRequiredArgument(x, position, context) { - if (x === undefined) { - throw new TypeError("Parameter " + position + " is required in '" + context + "'."); - } + else { + throw new Error('Can only estimate the size of directories or shards'); } - function assertRequiredField(x, field, context) { - if (x === undefined) { - throw new TypeError(field + " is required in '" + context + "'."); - } + return size > threshold; +} +function estimateNodeSize(node) { + let size = 0; + // estimate size only based on DAGLink name and CID byte lengths + // https://github.com/ipfs/go-unixfsnode/blob/37b47f1f917f1b2f54c207682f38886e49896ef9/data/builder/directory.go#L81-L96 + for (const link of node.Links) { + size += (link.Name ?? '').length; + size += link.Hash.version === 1 ? dir_sharded_CID_V1.bytes.byteLength : dir_sharded_CID_V0.bytes.byteLength; } - // https://heycam.github.io/webidl/#idl-unrestricted-double - function convertUnrestrictedDouble(value) { - return Number(value); + return size; +} +async function estimateShardSize(node, current, max, blockstore, options) { + if (current > max) { + return max; } - function censorNegativeZero(x) { - return x === 0 ? 0 : x; + if (node.Data == null) { + return current; } - function integerPart(x) { - return censorNegativeZero(MathTrunc(x)); + const unixfs = src_UnixFS.unmarshal(node.Data); + if (!unixfs.isDirectory()) { + return current; } - // https://heycam.github.io/webidl/#idl-unsigned-long-long - function convertUnsignedLongLongWithEnforceRange(value, context) { - var lowerBound = 0; - var upperBound = Number.MAX_SAFE_INTEGER; - var x = Number(value); - x = censorNegativeZero(x); - if (!NumberIsFinite(x)) { - throw new TypeError(context + " is not a finite number"); - } - x = integerPart(x); - if (x < lowerBound || x > upperBound) { - throw new TypeError(context + " is outside the accepted range of " + lowerBound + " to " + upperBound + ", inclusive"); - } - if (!NumberIsFinite(x) || x === 0) { - return 0; + for (const link of node.Links) { + let name = link.Name ?? ''; + // remove hamt hash prefix from name + name = name.substring(2); + current += name.length; + current += link.Hash.bytes.byteLength; + if (link.Hash.code === code) { + const block = await blockstore.get(link.Hash, options); + const node = src_decode(block); + current += await estimateShardSize(node, current, max, blockstore, options); } - // TODO Use BigInt if supported? - // let xBigInt = BigInt(integerPart(x)); - // xBigInt = BigInt.asUintN(64, xBigInt); - // return Number(xBigInt); - return x; } + return current; +} +//# sourceMappingURL=is-over-shard-threshold.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/add-link.js - function assertReadableStream(x, context) { - if (!IsReadableStream(x)) { - throw new TypeError(context + " is not a ReadableStream."); - } - } - // Abstract operations for the ReadableStream. - function AcquireReadableStreamDefaultReader(stream) { - return new ReadableStreamDefaultReader(stream); - } - // ReadableStream API exposed for controllers. - function ReadableStreamAddReadRequest(stream, readRequest) { - stream._reader._readRequests.push(readRequest); - } - function ReadableStreamFulfillReadRequest(stream, chunk, done) { - var reader = stream._reader; - var readRequest = reader._readRequests.shift(); - if (done) { - readRequest._closeSteps(); - } - else { - readRequest._chunkSteps(chunk); - } + + + +// @ts-expect-error no types + + + + + + + +const add_link_log = dist_src_logger('helia:unixfs:components:utils:add-link'); +async function addLink(parent, child, blockstore, options) { + if (parent.node.Data == null) { + throw new errors_InvalidParametersError('Invalid parent passed to addLink'); } - function ReadableStreamGetNumReadRequests(stream) { - return stream._reader._readRequests.length; + const meta = src_UnixFS.unmarshal(parent.node.Data); + if (meta.type === 'hamt-sharded-directory') { + add_link_log('adding link to sharded directory'); + return addToShardedDirectory(parent, child, blockstore, options); } - function ReadableStreamHasDefaultReader(stream) { - var reader = stream._reader; - if (reader === undefined) { - return false; - } - if (!IsReadableStreamDefaultReader(reader)) { - return false; - } - return true; + add_link_log(`adding ${child.Name} (${child.Hash}) to regular directory`); + const result = await addToDirectory(parent, child, blockstore, options); + if (await isOverShardThreshold(result.node, blockstore, options.shardSplitThresholdBytes, options)) { + add_link_log('converting directory to sharded directory'); + const converted = await convertToShardedDirectory(result, blockstore); + result.cid = converted.cid; + result.node = src_decode(await blockstore.get(converted.cid, options)); } - /** - * A default reader vended by a {@link ReadableStream}. - * - * @public - */ - var ReadableStreamDefaultReader = /** @class */ (function () { - function ReadableStreamDefaultReader(stream) { - assertRequiredArgument(stream, 1, 'ReadableStreamDefaultReader'); - assertReadableStream(stream, 'First parameter'); - if (IsReadableStreamLocked(stream)) { - throw new TypeError('This stream has already been locked for exclusive reading by another reader'); - } - ReadableStreamReaderGenericInitialize(this, stream); - this._readRequests = new SimpleQueue(); + return result; +} +const convertToShardedDirectory = async (parent, blockstore) => { + if (parent.node.Data == null) { + throw new errors_InvalidParametersError('Invalid parent passed to convertToShardedDirectory'); + } + const unixfs = src_UnixFS.unmarshal(parent.node.Data); + const result = await createShard(blockstore, parent.node.Links.map(link => ({ + name: (link.Name ?? ''), + size: BigInt(link.Tsize ?? 0), + cid: link.Hash + })), { + mode: unixfs.mode, + mtime: unixfs.mtime, + cidVersion: parent.cid.version + }); + add_link_log(`converted directory to sharded directory ${result.cid}`); + return result; +}; +const addToDirectory = async (parent, child, blockstore, options) => { + // Remove existing link if it exists + const parentLinks = parent.node.Links.filter((link) => { + const matches = link.Name === child.Name; + if (matches && !options.allowOverwriting) { + throw new AlreadyExistsError(); } - Object.defineProperty(ReadableStreamDefaultReader.prototype, "closed", { - /** - * Returns a promise that will be fulfilled when the stream becomes closed, - * or rejected if the stream ever errors or the reader's lock is released before the stream finishes closing. - */ - get: function () { - if (!IsReadableStreamDefaultReader(this)) { - return promiseRejectedWith(defaultReaderBrandCheckException('closed')); - } - return this._closedPromise; - }, - enumerable: false, - configurable: true - }); - /** - * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}. - */ - ReadableStreamDefaultReader.prototype.cancel = function (reason) { - if (reason === void 0) { reason = undefined; } - if (!IsReadableStreamDefaultReader(this)) { - return promiseRejectedWith(defaultReaderBrandCheckException('cancel')); - } - if (this._ownerReadableStream === undefined) { - return promiseRejectedWith(readerLockException('cancel')); - } - return ReadableStreamReaderGenericCancel(this, reason); - }; - /** - * Returns a promise that allows access to the next chunk from the stream's internal queue, if available. - * - * If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source. - */ - ReadableStreamDefaultReader.prototype.read = function () { - if (!IsReadableStreamDefaultReader(this)) { - return promiseRejectedWith(defaultReaderBrandCheckException('read')); - } - if (this._ownerReadableStream === undefined) { - return promiseRejectedWith(readerLockException('read from')); - } - var resolvePromise; - var rejectPromise; - var promise = newPromise(function (resolve, reject) { - resolvePromise = resolve; - rejectPromise = reject; - }); - var readRequest = { - _chunkSteps: function (chunk) { return resolvePromise({ value: chunk, done: false }); }, - _closeSteps: function () { return resolvePromise({ value: undefined, done: true }); }, - _errorSteps: function (e) { return rejectPromise(e); } - }; - ReadableStreamDefaultReaderRead(this, readRequest); - return promise; - }; - /** - * Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active. - * If the associated stream is errored when the lock is released, the reader will appear errored in the same way - * from now on; otherwise, the reader will appear closed. - * - * A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by - * the reader's {@link ReadableStreamDefaultReader.read | read()} method has not yet been settled. Attempting to - * do so will throw a `TypeError` and leave the reader locked to the stream. - */ - ReadableStreamDefaultReader.prototype.releaseLock = function () { - if (!IsReadableStreamDefaultReader(this)) { - throw defaultReaderBrandCheckException('releaseLock'); - } - if (this._ownerReadableStream === undefined) { - return; - } - if (this._readRequests.length > 0) { - throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); - } - ReadableStreamReaderGenericRelease(this); - }; - return ReadableStreamDefaultReader; - }()); - Object.defineProperties(ReadableStreamDefaultReader.prototype, { - cancel: { enumerable: true }, - read: { enumerable: true }, - releaseLock: { enumerable: true }, - closed: { enumerable: true } + return !matches; }); - if (typeof SymbolPolyfill.toStringTag === 'symbol') { - Object.defineProperty(ReadableStreamDefaultReader.prototype, SymbolPolyfill.toStringTag, { - value: 'ReadableStreamDefaultReader', - configurable: true - }); + parentLinks.push(child); + if (parent.node.Data == null) { + throw new InvalidPBNodeError('Parent node with no data passed to addToDirectory'); + } + const node = src_UnixFS.unmarshal(parent.node.Data); + let data; + if (node.mtime != null) { + // Update mtime if previously set + const ms = Date.now(); + const secs = Math.floor(ms / 1000); + node.mtime = { + secs: BigInt(secs), + nsecs: (ms - (secs * 1000)) * 1000 + }; + data = node.marshal(); } - // Abstract operations for the readers. - function IsReadableStreamDefaultReader(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_readRequests')) { - return false; - } - return x instanceof ReadableStreamDefaultReader; + else { + data = parent.node.Data; } - function ReadableStreamDefaultReaderRead(reader, readRequest) { - var stream = reader._ownerReadableStream; - stream._disturbed = true; - if (stream._state === 'closed') { - readRequest._closeSteps(); + parent.node = prepare({ + Data: data, + Links: parentLinks + }); + // Persist the new parent PbNode + const buf = src_encode(parent.node); + const hash = await unixfs_node_modules_multiformats_src_hashes_sha2_sha256.digest(buf); + const cid = unixfs_node_modules_multiformats_src_cid_CID.create(parent.cid.version, code, hash); + await blockstore.put(cid, buf); + return { + node: parent.node, + cid + }; +}; +const addToShardedDirectory = async (parent, child, blockstore, options) => { + const { path, hash } = await recreateShardedDirectory(parent.cid, child.Name, blockstore, options); + const finalSegment = path[path.length - 1]; + if (finalSegment == null) { + throw new Error('Invalid HAMT, could not generate path'); + } + // find the next prefix + // const index = await hash.take(hamtBucketBits) + const prefix = finalSegment.prefix; + const index = parseInt(prefix, 16); + add_link_log('next prefix for %s is %s', child.Name, prefix); + const linkName = `${prefix}${child.Name}`; + const existingLink = finalSegment.node.Links.find(l => (l.Name ?? '').startsWith(prefix)); + if (existingLink != null) { + add_link_log('link %s was present in shard', linkName); + // link is already present in shard + if (existingLink.Name === linkName) { + // file with same name is already present in shard + if (!options.allowOverwriting) { + throw new AlreadyExistsError(); + } + add_link_log('overwriting %s in subshard', child.Name); + finalSegment.node.Links = finalSegment.node.Links.filter(l => l.Name !== linkName); + finalSegment.node.Links.push({ + Name: linkName, + Hash: child.Hash, + Tsize: child.Tsize + }); } - else if (stream._state === 'errored') { - readRequest._errorSteps(stream._storedError); + else if (existingLink.Name?.length === 2) { + throw new Error('Existing link was subshard?!'); } else { - stream._readableStreamController[PullSteps](readRequest); + // conflict, add a new HAMT segment + add_link_log('prefix %s already exists, creating new subshard', prefix); + // find the sibling we are going to replace + const index = finalSegment.node.Links.findIndex(l => l.Name?.startsWith(prefix)); + const sibling = finalSegment.node.Links.splice(index, 1)[0]; + // give the sibling a new HAMT prefix + const siblingName = (sibling.Name ?? '').substring(2); + const wrapped = consumable_hash_wrapHash(hamt_constants_hamtHashFn); + const siblingHash = wrapped(unixfs_node_modules_uint8arrays_dist_src_from_string_fromString(siblingName)); + // discard hash bits until we reach the subshard depth + for (let i = 0; i < path.length; i++) { + await siblingHash.take(hamtBucketBits); + } + while (true) { + const siblingIndex = await siblingHash.take(hamtBucketBits); + const siblingPrefix = hamt_utils_toPrefix(siblingIndex); + sibling.Name = `${siblingPrefix}${siblingName}`; + // calculate the target file's HAMT prefix in the new sub-shard + const newIndex = await hash.take(hamtBucketBits); + const newPrefix = hamt_utils_toPrefix(newIndex); + if (siblingPrefix === newPrefix) { + // the two sibling names have caused another conflict - add an intermediate node to + // the HAMT and try again + // create the child locations + const children = new sparse_array(); + children.set(newIndex, true); + path.push({ + prefix: newPrefix, + children, + node: { + Links: [] + } + }); + continue; + } + // create the child locations + const children = new sparse_array(); + children.set(newIndex, true); + children.set(siblingIndex, true); + // add our new segment + path.push({ + prefix, + children, + node: { + Links: [ + sibling, { + Name: `${newPrefix}${child.Name}`, + Hash: child.Hash, + Tsize: child.Tsize + } + ] + } + }); + break; + } } } - // Helper functions for the ReadableStreamDefaultReader. - function defaultReaderBrandCheckException(name) { - return new TypeError("ReadableStreamDefaultReader.prototype." + name + " can only be used on a ReadableStreamDefaultReader"); + else { + add_link_log('link %s was not present in sub-shard', linkName); + // add new link to shard + child.Name = linkName; + finalSegment.node.Links.push(child); + finalSegment.children.set(index, true); + add_link_log('adding %s to existing sub-shard', linkName); } + return updateShardedDirectory(path, blockstore, options); +}; +//# sourceMappingURL=add-link.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/cid-to-directory.js - /// - var _a; - var AsyncIteratorPrototype; - if (typeof SymbolPolyfill.asyncIterator === 'symbol') { - // We're running inside a ES2018+ environment, but we're compiling to an older syntax. - // We cannot access %AsyncIteratorPrototype% without non-ES2018 syntax, but we can re-create it. - AsyncIteratorPrototype = (_a = {}, - // 25.1.3.1 %AsyncIteratorPrototype% [ @@asyncIterator ] ( ) - // https://tc39.github.io/ecma262/#sec-asynciteratorprototype-asynciterator - _a[SymbolPolyfill.asyncIterator] = function () { - return this; - }, - _a); - Object.defineProperty(AsyncIteratorPrototype, SymbolPolyfill.asyncIterator, { enumerable: false }); - } - /// - var ReadableStreamAsyncIteratorImpl = /** @class */ (function () { - function ReadableStreamAsyncIteratorImpl(reader, preventCancel) { - this._ongoingPromise = undefined; - this._isFinished = false; - this._reader = reader; - this._preventCancel = preventCancel; - } - ReadableStreamAsyncIteratorImpl.prototype.next = function () { - var _this = this; - var nextSteps = function () { return _this._nextSteps(); }; - this._ongoingPromise = this._ongoingPromise ? - transformPromiseWith(this._ongoingPromise, nextSteps, nextSteps) : - nextSteps(); - return this._ongoingPromise; - }; - ReadableStreamAsyncIteratorImpl.prototype.return = function (value) { - var _this = this; - var returnSteps = function () { return _this._returnSteps(value); }; - return this._ongoingPromise ? - transformPromiseWith(this._ongoingPromise, returnSteps, returnSteps) : - returnSteps(); - }; - ReadableStreamAsyncIteratorImpl.prototype._nextSteps = function () { - var _this = this; - if (this._isFinished) { - return Promise.resolve({ value: undefined, done: true }); - } - var reader = this._reader; - if (reader._ownerReadableStream === undefined) { - return promiseRejectedWith(readerLockException('iterate')); - } - var resolvePromise; - var rejectPromise; - var promise = newPromise(function (resolve, reject) { - resolvePromise = resolve; - rejectPromise = reject; - }); - var readRequest = { - _chunkSteps: function (chunk) { - _this._ongoingPromise = undefined; - // This needs to be delayed by one microtask, otherwise we stop pulling too early which breaks a test. - // FIXME Is this a bug in the specification, or in the test? - queueMicrotask(function () { return resolvePromise({ value: chunk, done: false }); }); - }, - _closeSteps: function () { - _this._ongoingPromise = undefined; - _this._isFinished = true; - ReadableStreamReaderGenericRelease(reader); - resolvePromise({ value: undefined, done: true }); - }, - _errorSteps: function (reason) { - _this._ongoingPromise = undefined; - _this._isFinished = true; - ReadableStreamReaderGenericRelease(reader); - rejectPromise(reason); - } - }; - ReadableStreamDefaultReaderRead(reader, readRequest); - return promise; - }; - ReadableStreamAsyncIteratorImpl.prototype._returnSteps = function (value) { - if (this._isFinished) { - return Promise.resolve({ value: value, done: true }); - } - this._isFinished = true; - var reader = this._reader; - if (reader._ownerReadableStream === undefined) { - return promiseRejectedWith(readerLockException('finish iterating')); - } - if (!this._preventCancel) { - var result = ReadableStreamReaderGenericCancel(reader, value); - ReadableStreamReaderGenericRelease(reader); - return transformPromiseWith(result, function () { return ({ value: value, done: true }); }); - } - ReadableStreamReaderGenericRelease(reader); - return promiseResolvedWith({ value: value, done: true }); - }; - return ReadableStreamAsyncIteratorImpl; - }()); - var ReadableStreamAsyncIteratorPrototype = { - next: function () { - if (!IsReadableStreamAsyncIterator(this)) { - return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next')); - } - return this._asyncIteratorImpl.next(); - }, - return: function (value) { - if (!IsReadableStreamAsyncIterator(this)) { - return promiseRejectedWith(streamAsyncIteratorBrandCheckException('return')); - } - return this._asyncIteratorImpl.return(value); - } +async function cidToDirectory(cid, blockstore, options = {}) { + const entry = await exporter(cid, blockstore, options); + if (entry.type !== 'directory') { + throw new NotADirectoryError(`${cid.toString()} was not a UnixFS directory`); + } + return { + cid, + node: entry.node }; - if (AsyncIteratorPrototype !== undefined) { - Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype); +} +//# sourceMappingURL=cid-to-directory.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/cid-to-pblink.js + + + +async function cidToPBLink(cid, name, blockstore, options) { + const sourceEntry = await exporter(cid, blockstore, options); + if (sourceEntry.type !== 'directory' && sourceEntry.type !== 'file' && sourceEntry.type !== 'raw') { + throw new NotUnixFSError(`${cid.toString()} was not a UnixFS node`); } - // Abstract operations for the ReadableStream. - function AcquireReadableStreamAsyncIterator(stream, preventCancel) { - var reader = AcquireReadableStreamDefaultReader(stream); - var impl = new ReadableStreamAsyncIteratorImpl(reader, preventCancel); - var iterator = Object.create(ReadableStreamAsyncIteratorPrototype); - iterator._asyncIteratorImpl = impl; - return iterator; + return { + Name: name, + Tsize: sourceEntry.node instanceof Uint8Array ? sourceEntry.node.byteLength : dagNodeTsize(sourceEntry.node), + Hash: cid + }; +} +function dagNodeTsize(node) { + const linkSizes = node.Links.reduce((acc, curr) => acc + (curr.Tsize ?? 0), 0); + return src_encode(node).byteLength + linkSizes; +} +//# sourceMappingURL=cid-to-pblink.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/resolve.js + + + + + + +const resolve_log = dist_src_logger('helia:unixfs:components:utils:resolve'); +async function resolve_resolve(cid, path, blockstore, options) { + if (path == null || path === '') { + return { cid }; } - function IsReadableStreamAsyncIterator(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_asyncIteratorImpl')) { - return false; + resolve_log('resolve "%s" under %c', path, cid); + const parts = path.split('/').filter(Boolean); + const segments = [{ + name: '', + cid, + size: 0n + }]; + for (let i = 0; i < parts.length; i++) { + const part = parts[i]; + const result = await exporter(cid, blockstore, options); + resolve_log('resolving "%s"', part, result); + if (result.type === 'file') { + if (i < parts.length - 1) { + throw new errors_InvalidParametersError('Path was invalid'); + } + cid = result.cid; } - try { - // noinspection SuspiciousTypeOfGuard - return x._asyncIteratorImpl instanceof - ReadableStreamAsyncIteratorImpl; + else if (result.type === 'directory') { + let dirCid; + for await (const entry of result.content()) { + if (entry.name === part) { + dirCid = entry.cid; + break; + } + } + if (dirCid == null) { + throw new DoesNotExistError('Could not find path in directory'); + } + cid = dirCid; + segments.push({ + name: part, + cid, + size: result.size + }); } - catch (_a) { - return false; + else { + throw new errors_InvalidParametersError('Could not resolve path'); } } - // Helper functions for the ReadableStream. - function streamAsyncIteratorBrandCheckException(name) { - return new TypeError("ReadableStreamAsyncIterator." + name + " can only be used on a ReadableSteamAsyncIterator"); + resolve_log('resolved %s to %c', path, cid); + return { + cid, + path, + segments + }; +} +/** + * Where we have descended into a DAG to update a child node, ascend up the DAG creating + * new hashes and blocks for the changed content + */ +async function updatePathCids(cid, result, blockstore, options) { + if (result.segments == null || result.segments.length === 0) { + return cid; + } + let child = result.segments.pop(); + if (child == null) { + throw new Error('Insufficient segments'); + } + child.cid = cid; + result.segments.reverse(); + for (const parent of result.segments) { + const [directory, pblink] = await Promise.all([ + cidToDirectory(parent.cid, blockstore, options), + cidToPBLink(child.cid, child.name, blockstore, options) + ]); + const result = await addLink(directory, pblink, blockstore, { + ...options, + allowOverwriting: true, + cidVersion: cid.version + }); + cid = result.cid; + parent.cid = cid; + child = parent; } + return cid; +} +//# sourceMappingURL=resolve.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/cat.js - /// - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill - var NumberIsNaN = Number.isNaN || function (x) { - // eslint-disable-next-line no-self-compare - return x !== x; - }; - function CreateArrayFromList(elements) { - // We use arrays to represent lists, so this is basically a no-op. - // Do a slice though just in case we happen to depend on the unique-ness. - return elements.slice(); + + +const mergeOptions = node_modules_merge_options.bind({ ignoreUndefined: true }); +const cat_defaultOptions = {}; +async function* cat(cid, blockstore, options = {}) { + const opts = mergeOptions(cat_defaultOptions, options); + const resolved = await resolve_resolve(cid, opts.path, blockstore, opts); + const result = await exporter(resolved.cid, blockstore, opts); + if (result.type !== 'file' && result.type !== 'raw') { + throw new NotAFileError(); } - function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n) { - new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset); + if (result.content == null) { + throw new NoContentError(); } - // Not implemented correctly - function TransferArrayBuffer(O) { - return O; + yield* result.content(opts); +} +//# sourceMappingURL=cat.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/constants.js +const SHARD_SPLIT_THRESHOLD_BYTES = 262144; +//# sourceMappingURL=constants.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/chmod.js + + + + + + + + + + + + + + + +const chmod_mergeOptions = node_modules_merge_options.bind({ ignoreUndefined: true }); +const chmod_log = dist_src_logger('helia:unixfs:chmod'); +const chmod_defaultOptions = { + recursive: false, + shardSplitThresholdBytes: SHARD_SPLIT_THRESHOLD_BYTES +}; +async function chmod(cid, mode, blockstore, options = {}) { + const opts = chmod_mergeOptions(chmod_defaultOptions, options); + const resolved = await resolve_resolve(cid, opts.path, blockstore, options); + chmod_log('chmod %c %d', resolved.cid, mode); + if (opts.recursive) { + // recursively export from root CID, change perms of each entry then reimport + // but do not reimport files, only manipulate dag-pb nodes + const root = await pipe(async function* () { + for await (const entry of recursive(resolved.cid, blockstore, options)) { + let metadata; + let links = []; + if (entry.type === 'raw') { + // convert to UnixFS + metadata = new src_UnixFS({ type: 'file', data: entry.node }); + } + else if (entry.type === 'file' || entry.type === 'directory') { + metadata = entry.unixfs; + links = entry.node.Links; + } + else { + throw new NotUnixFSError(); + } + metadata.mode = mode; + const node = { + Data: metadata.marshal(), + Links: links + }; + yield { + path: entry.path, + content: node + }; + } + }, + // @ts-expect-error cannot combine progress types + (source) => importer(source, blockstore, { + ...opts, + dagBuilder: async function* (source, block) { + for await (const entry of source) { + yield async function () { + // @ts-expect-error cannot derive type + const node = entry.content; + const buf = src_encode(node); + const updatedCid = await persist_persist(buf, block, { + ...opts, + cidVersion: cid.version + }); + if (node.Data == null) { + throw new InvalidPBNodeError(`${updatedCid} had no data`); + } + const unixfs = src_UnixFS.unmarshal(node.Data); + return { + cid: updatedCid, + size: BigInt(buf.length), + path: entry.path, + unixfs + }; + }; + } + } + }), async (nodes) => dist_src(nodes)); + if (root == null) { + throw new errors_UnknownError(`Could not chmod ${resolved.cid.toString()}`); + } + return updatePathCids(root.cid, resolved, blockstore, opts); } - // Not implemented correctly - // eslint-disable-next-line @typescript-eslint/no-unused-vars - function IsDetachedBuffer(O) { - return false; + const block = await blockstore.get(resolved.cid, options); + let metadata; + let links = []; + if (resolved.cid.code === unixfs_node_modules_multiformats_src_codecs_raw_code) { + // convert to UnixFS + metadata = new src_UnixFS({ type: 'file', data: block }); } - function ArrayBufferSlice(buffer, begin, end) { - // ArrayBuffer.prototype.slice is not available on IE10 - // https://www.caniuse.com/mdn-javascript_builtins_arraybuffer_slice - if (buffer.slice) { - return buffer.slice(begin, end); + else { + const node = src_decode(block); + if (node.Data == null) { + throw new InvalidPBNodeError(`${resolved.cid.toString()} had no data`); } - var length = end - begin; - var slice = new ArrayBuffer(length); - CopyDataBlockBytes(slice, 0, buffer, begin, length); - return slice; + links = node.Links; + metadata = src_UnixFS.unmarshal(node.Data); } + metadata.mode = mode; + const updatedBlock = src_encode({ + Data: metadata.marshal(), + Links: links + }); + const hash = await unixfs_node_modules_multiformats_src_hashes_sha2_sha256.digest(updatedBlock); + const updatedCid = unixfs_node_modules_multiformats_src_cid_CID.create(resolved.cid.version, code, hash); + await blockstore.put(updatedCid, updatedBlock); + return updatePathCids(updatedCid, resolved, blockstore, opts); +} +//# sourceMappingURL=chmod.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/cp.js - function IsNonNegativeNumber(v) { - if (typeof v !== 'number') { - return false; - } - if (NumberIsNaN(v)) { - return false; - } - if (v < 0) { - return false; - } - return true; - } - function CloneAsUint8Array(O) { - var buffer = ArrayBufferSlice(O.buffer, O.byteOffset, O.byteOffset + O.byteLength); - return new Uint8Array(buffer); - } - function DequeueValue(container) { - var pair = container._queue.shift(); - container._queueTotalSize -= pair.size; - if (container._queueTotalSize < 0) { - container._queueTotalSize = 0; - } - return pair.value; + + + + + +const cp_mergeOptions = node_modules_merge_options.bind({ ignoreUndefined: true }); +const cp_log = dist_src_logger('helia:unixfs:cp'); +const cp_defaultOptions = { + force: false, + shardSplitThresholdBytes: SHARD_SPLIT_THRESHOLD_BYTES +}; +async function cp(source, target, name, blockstore, options = {}) { + const opts = cp_mergeOptions(cp_defaultOptions, options); + if (name.includes('/')) { + throw new errors_InvalidParametersError('Name must not have slashes'); } - function EnqueueValueWithSize(container, value, size) { - if (!IsNonNegativeNumber(size) || size === Infinity) { - throw new RangeError('Size must be a finite, non-NaN, non-negative number.'); - } - container._queue.push({ value: value, size: size }); - container._queueTotalSize += size; + const [directory, pblink] = await Promise.all([ + cidToDirectory(target, blockstore, opts), + cidToPBLink(source, name, blockstore, opts) + ]); + cp_log('Adding %c as "%s" to %c', source, name, target); + const result = await addLink(directory, pblink, blockstore, { + allowOverwriting: opts.force, + cidVersion: target.version, + ...opts + }); + return result.cid; +} +//# sourceMappingURL=cp.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/ls.js + + + + +const ls_mergeOptions = node_modules_merge_options.bind({ ignoreUndefined: true }); +const ls_defaultOptions = {}; +async function* ls(cid, blockstore, options = {}) { + const opts = ls_mergeOptions(ls_defaultOptions, options); + const resolved = await resolve_resolve(cid, opts.path, blockstore, opts); + const result = await exporter(resolved.cid, blockstore); + if (result.type === 'file' || result.type === 'raw') { + yield result; + return; } - function PeekQueueValue(container) { - var pair = container._queue.peek(); - return pair.value; + if (result.content == null) { + throw new NoContentError(); } - function ResetQueue(container) { - container._queue = new SimpleQueue(); - container._queueTotalSize = 0; + if (result.type !== 'directory') { + throw new NotADirectoryError(); } + yield* result.content({ + offset: options.offset, + length: options.length + }); +} +//# sourceMappingURL=ls.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/mkdir.js - /** - * A pull-into request in a {@link ReadableByteStreamController}. - * - * @public - */ - var ReadableStreamBYOBRequest = /** @class */ (function () { - function ReadableStreamBYOBRequest() { - throw new TypeError('Illegal constructor'); - } - Object.defineProperty(ReadableStreamBYOBRequest.prototype, "view", { - /** - * Returns the view for writing in to, or `null` if the BYOB request has already been responded to. - */ - get: function () { - if (!IsReadableStreamBYOBRequest(this)) { - throw byobRequestBrandCheckException('view'); - } - return this._view; - }, - enumerable: false, - configurable: true - }); - ReadableStreamBYOBRequest.prototype.respond = function (bytesWritten) { - if (!IsReadableStreamBYOBRequest(this)) { - throw byobRequestBrandCheckException('respond'); - } - assertRequiredArgument(bytesWritten, 1, 'respond'); - bytesWritten = convertUnsignedLongLongWithEnforceRange(bytesWritten, 'First parameter'); - if (this._associatedReadableByteStreamController === undefined) { - throw new TypeError('This BYOB request has been invalidated'); - } - if (IsDetachedBuffer(this._view.buffer)) ; - ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten); - }; - ReadableStreamBYOBRequest.prototype.respondWithNewView = function (view) { - if (!IsReadableStreamBYOBRequest(this)) { - throw byobRequestBrandCheckException('respondWithNewView'); - } - assertRequiredArgument(view, 1, 'respondWithNewView'); - if (!ArrayBuffer.isView(view)) { - throw new TypeError('You can only respond with array buffer views'); - } - if (this._associatedReadableByteStreamController === undefined) { - throw new TypeError('This BYOB request has been invalidated'); - } - if (IsDetachedBuffer(view.buffer)) ; - ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view); - }; - return ReadableStreamBYOBRequest; - }()); - Object.defineProperties(ReadableStreamBYOBRequest.prototype, { - respond: { enumerable: true }, - respondWithNewView: { enumerable: true }, - view: { enumerable: true } + + + + + + + + + + + +const mkdir_mergeOptions = node_modules_merge_options.bind({ ignoreUndefined: true }); +const mkdir_log = dist_src_logger('helia:unixfs:mkdir'); +const mkdir_defaultOptions = { + cidVersion: 1, + force: false, + shardSplitThresholdBytes: SHARD_SPLIT_THRESHOLD_BYTES +}; +async function mkdir(parentCid, dirname, blockstore, options = {}) { + const opts = mkdir_mergeOptions(mkdir_defaultOptions, options); + if (dirname.includes('/')) { + throw new errors_InvalidParametersError('Path must not have slashes'); + } + const entry = await exporter(parentCid, blockstore, options); + if (entry.type !== 'directory') { + throw new NotADirectoryError(`${parentCid.toString()} was not a UnixFS directory`); + } + mkdir_log('creating %s', dirname); + const metadata = new src_UnixFS({ + type: 'directory', + mode: opts.mode, + mtime: opts.mtime }); - if (typeof SymbolPolyfill.toStringTag === 'symbol') { - Object.defineProperty(ReadableStreamBYOBRequest.prototype, SymbolPolyfill.toStringTag, { - value: 'ReadableStreamBYOBRequest', - configurable: true - }); + // Persist the new parent PBNode + const node = { + Data: metadata.marshal(), + Links: [] + }; + const buf = src_encode(node); + const hash = await unixfs_node_modules_multiformats_src_hashes_sha2_sha256.digest(buf); + const emptyDirCid = unixfs_node_modules_multiformats_src_cid_CID.create(opts.cidVersion, code, hash); + await blockstore.put(emptyDirCid, buf); + const [directory, pblink] = await Promise.all([ + cidToDirectory(parentCid, blockstore, opts), + cidToPBLink(emptyDirCid, dirname, blockstore, opts) + ]); + mkdir_log('adding empty dir called %s to %c', dirname, parentCid); + const result = await addLink(directory, pblink, blockstore, { + ...opts, + allowOverwriting: opts.force + }); + return result.cid; +} +//# sourceMappingURL=mkdir.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/utils/remove-link.js + + + + + + + + +const remove_link_log = dist_src_logger('helia:unixfs:utils:remove-link'); +async function removeLink(parent, name, blockstore, options) { + if (parent.node.Data == null) { + throw new InvalidPBNodeError('Parent node had no data'); } - /** - * Allows control of a {@link ReadableStream | readable byte stream}'s state and internal queue. - * - * @public - */ - var ReadableByteStreamController = /** @class */ (function () { - function ReadableByteStreamController() { - throw new TypeError('Illegal constructor'); + const meta = src_UnixFS.unmarshal(parent.node.Data); + if (meta.type === 'hamt-sharded-directory') { + remove_link_log(`removing ${name} from sharded directory`); + const result = await removeFromShardedDirectory(parent, name, blockstore, options); + if (!(await isOverShardThreshold(result.node, blockstore, options.shardSplitThresholdBytes, options))) { + remove_link_log('converting shard to flat directory %c', parent.cid); + return convertToFlatDirectory(result, blockstore, options); } - Object.defineProperty(ReadableByteStreamController.prototype, "byobRequest", { - /** - * Returns the current BYOB pull request, or `null` if there isn't one. - */ - get: function () { - if (!IsReadableByteStreamController(this)) { - throw byteStreamControllerBrandCheckException('byobRequest'); - } - return ReadableByteStreamControllerGetBYOBRequest(this); - }, - enumerable: false, - configurable: true - }); - Object.defineProperty(ReadableByteStreamController.prototype, "desiredSize", { - /** - * Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is - * over-full. An underlying byte source ought to use this information to determine when and how to apply backpressure. - */ - get: function () { - if (!IsReadableByteStreamController(this)) { - throw byteStreamControllerBrandCheckException('desiredSize'); - } - return ReadableByteStreamControllerGetDesiredSize(this); - }, - enumerable: false, - configurable: true - }); - /** - * Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from - * the stream, but once those are read, the stream will become closed. - */ - ReadableByteStreamController.prototype.close = function () { - if (!IsReadableByteStreamController(this)) { - throw byteStreamControllerBrandCheckException('close'); - } - if (this._closeRequested) { - throw new TypeError('The stream has already been closed; do not close it again!'); - } - var state = this._controlledReadableByteStream._state; - if (state !== 'readable') { - throw new TypeError("The stream (in " + state + " state) is not in the readable state and cannot be closed"); - } - ReadableByteStreamControllerClose(this); - }; - ReadableByteStreamController.prototype.enqueue = function (chunk) { - if (!IsReadableByteStreamController(this)) { - throw byteStreamControllerBrandCheckException('enqueue'); - } - assertRequiredArgument(chunk, 1, 'enqueue'); - if (!ArrayBuffer.isView(chunk)) { - throw new TypeError('chunk must be an array buffer view'); - } - if (chunk.byteLength === 0) { - throw new TypeError('chunk must have non-zero byteLength'); - } - if (chunk.buffer.byteLength === 0) { - throw new TypeError("chunk's buffer must have non-zero byteLength"); - } - if (this._closeRequested) { - throw new TypeError('stream is closed or draining'); - } - var state = this._controlledReadableByteStream._state; - if (state !== 'readable') { - throw new TypeError("The stream (in " + state + " state) is not in the readable state and cannot be enqueued to"); - } - ReadableByteStreamControllerEnqueue(this, chunk); - }; - /** - * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`. - */ - ReadableByteStreamController.prototype.error = function (e) { - if (e === void 0) { e = undefined; } - if (!IsReadableByteStreamController(this)) { - throw byteStreamControllerBrandCheckException('error'); + return result; + } + remove_link_log(`removing link ${name} regular directory`); + return removeFromDirectory(parent, name, blockstore, options); +} +const removeFromDirectory = async (parent, name, blockstore, options) => { + // Remove existing link if it exists + parent.node.Links = parent.node.Links.filter((link) => { + return link.Name !== name; + }); + const parentBlock = src_encode(parent.node); + const parentCid = await persist_persist(parentBlock, blockstore, { + ...options, + cidVersion: parent.cid.version + }); + remove_link_log(`Updated regular directory ${parentCid}`); + return { + node: parent.node, + cid: parentCid + }; +}; +const removeFromShardedDirectory = async (parent, name, blockstore, options) => { + const { path } = await recreateShardedDirectory(parent.cid, name, blockstore, options); + const finalSegment = path[path.length - 1]; + if (finalSegment == null) { + throw new Error('Invalid HAMT, could not generate path'); + } + const linkName = finalSegment.node.Links.filter(l => (l.Name ?? '').substring(2) === name).map(l => l.Name).pop(); + if (linkName == null) { + throw new Error('File not found'); + } + const prefix = linkName.substring(0, 2); + const index = parseInt(prefix, 16); + // remove the file from the shard + finalSegment.node.Links = finalSegment.node.Links.filter(link => link.Name !== linkName); + finalSegment.children.unset(index); + if (finalSegment.node.Links.length === 1) { + // replace the subshard with the last remaining file in the parent + while (true) { + if (path.length === 1) { + break; } - ReadableByteStreamControllerError(this, e); - }; - /** @internal */ - ReadableByteStreamController.prototype[CancelSteps] = function (reason) { - ReadableByteStreamControllerClearPendingPullIntos(this); - ResetQueue(this); - var result = this._cancelAlgorithm(reason); - ReadableByteStreamControllerClearAlgorithms(this); - return result; - }; - /** @internal */ - ReadableByteStreamController.prototype[PullSteps] = function (readRequest) { - var stream = this._controlledReadableByteStream; - if (this._queueTotalSize > 0) { - var entry = this._queue.shift(); - this._queueTotalSize -= entry.byteLength; - ReadableByteStreamControllerHandleQueueDrain(this); - var view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength); - readRequest._chunkSteps(view); - return; + const segment = path[path.length - 1]; + if (segment == null || segment.node.Links.length > 1) { + break; } - var autoAllocateChunkSize = this._autoAllocateChunkSize; - if (autoAllocateChunkSize !== undefined) { - var buffer = void 0; - try { - buffer = new ArrayBuffer(autoAllocateChunkSize); - } - catch (bufferE) { - readRequest._errorSteps(bufferE); - return; - } - var pullIntoDescriptor = { - buffer: buffer, - bufferByteLength: autoAllocateChunkSize, - byteOffset: 0, - byteLength: autoAllocateChunkSize, - bytesFilled: 0, - elementSize: 1, - viewConstructor: Uint8Array, - readerType: 'default' - }; - this._pendingPullIntos.push(pullIntoDescriptor); + // remove final segment + path.pop(); + const nextSegment = path[path.length - 1]; + if (nextSegment == null) { + break; } - ReadableStreamAddReadRequest(stream, readRequest); - ReadableByteStreamControllerCallPullIfNeeded(this); - }; - return ReadableByteStreamController; - }()); - Object.defineProperties(ReadableByteStreamController.prototype, { - close: { enumerable: true }, - enqueue: { enumerable: true }, - error: { enumerable: true }, - byobRequest: { enumerable: true }, - desiredSize: { enumerable: true } - }); - if (typeof SymbolPolyfill.toStringTag === 'symbol') { - Object.defineProperty(ReadableByteStreamController.prototype, SymbolPolyfill.toStringTag, { - value: 'ReadableByteStreamController', - configurable: true - }); - } - // Abstract operations for the ReadableByteStreamController. - function IsReadableByteStreamController(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableByteStream')) { - return false; - } - return x instanceof ReadableByteStreamController; - } - function IsReadableStreamBYOBRequest(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_associatedReadableByteStreamController')) { - return false; + const link = segment.node.Links[0]; + nextSegment.node.Links = nextSegment.node.Links.filter(l => !(l.Name ?? '').startsWith(nextSegment.prefix)); + nextSegment.node.Links.push({ + Hash: link.Hash, + Name: `${nextSegment.prefix}${(link.Name ?? '').substring(2)}`, + Tsize: link.Tsize + }); } - return x instanceof ReadableStreamBYOBRequest; } - function ReadableByteStreamControllerCallPullIfNeeded(controller) { - var shouldPull = ReadableByteStreamControllerShouldCallPull(controller); - if (!shouldPull) { - return; - } - if (controller._pulling) { - controller._pullAgain = true; - return; - } - controller._pulling = true; - // TODO: Test controller argument - var pullPromise = controller._pullAlgorithm(); - uponPromise(pullPromise, function () { - controller._pulling = false; - if (controller._pullAgain) { - controller._pullAgain = false; - ReadableByteStreamControllerCallPullIfNeeded(controller); - } - }, function (e) { - ReadableByteStreamControllerError(controller, e); - }); + return updateShardedDirectory(path, blockstore, options); +}; +const convertToFlatDirectory = async (parent, blockstore, options) => { + if (parent.node.Data == null) { + throw new errors_InvalidParametersError('Invalid parent passed to convertToFlatDirectory'); } - function ReadableByteStreamControllerClearPendingPullIntos(controller) { - ReadableByteStreamControllerInvalidateBYOBRequest(controller); - controller._pendingPullIntos = new SimpleQueue(); + const rootNode = { + Links: [] + }; + const dir = await exporter(parent.cid, blockstore); + if (dir.type !== 'directory') { + throw new Error('Unexpected node type'); } - function ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) { - var done = false; - if (stream._state === 'closed') { - done = true; - } - var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); - if (pullIntoDescriptor.readerType === 'default') { - ReadableStreamFulfillReadRequest(stream, filledView, done); + for await (const entry of dir.content()) { + let tsize = 0; + if (entry.node instanceof Uint8Array) { + tsize = entry.node.byteLength; } else { - ReadableStreamFulfillReadIntoRequest(stream, filledView, done); + tsize = src_encode(entry.node).length; } + rootNode.Links.push({ + Hash: entry.cid, + Name: entry.name, + Tsize: tsize + }); } - function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) { - var bytesFilled = pullIntoDescriptor.bytesFilled; - var elementSize = pullIntoDescriptor.elementSize; - return new pullIntoDescriptor.viewConstructor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize); + // copy mode/mtime over if set + const oldUnixfs = src_UnixFS.unmarshal(parent.node.Data); + rootNode.Data = new src_UnixFS({ type: 'directory', mode: oldUnixfs.mode, mtime: oldUnixfs.mtime }).marshal(); + const block = src_encode(prepare(rootNode)); + const cid = await persist_persist(block, blockstore, { + codec: src_namespaceObject, + cidVersion: parent.cid.version, + signal: options.signal + }); + return { + cid, + node: rootNode + }; +}; +//# sourceMappingURL=remove-link.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/rm.js + + + + + + +const rm_mergeOptions = node_modules_merge_options.bind({ ignoreUndefined: true }); +const rm_log = dist_src_logger('helia:unixfs:rm'); +const rm_defaultOptions = { + shardSplitThresholdBytes: SHARD_SPLIT_THRESHOLD_BYTES +}; +async function rm(target, name, blockstore, options = {}) { + const opts = rm_mergeOptions(rm_defaultOptions, options); + if (name.includes('/')) { + throw new errors_InvalidParametersError('Name must not have slashes'); } - function ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) { - controller._queue.push({ buffer: buffer, byteOffset: byteOffset, byteLength: byteLength }); - controller._queueTotalSize += byteLength; + const directory = await cidToDirectory(target, blockstore, opts); + rm_log('Removing %s from %c', name, target); + const result = await removeLink(directory, name, blockstore, { + ...opts, + cidVersion: target.version + }); + return result.cid; +} +//# sourceMappingURL=rm.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/stat.js + + + + + + + + +const stat_mergeOptions = node_modules_merge_options.bind({ ignoreUndefined: true }); +const stat_log = dist_src_logger('helia:unixfs:stat'); +const stat_defaultOptions = {}; +async function stat(cid, blockstore, options = {}) { + const opts = stat_mergeOptions(stat_defaultOptions, options); + const resolved = await resolve_resolve(cid, options.path, blockstore, opts); + stat_log('stat %c', resolved.cid); + const result = await exporter(resolved.cid, blockstore, opts); + if (result.type !== 'file' && result.type !== 'directory' && result.type !== 'raw') { + throw new NotUnixFSError(); } - function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) { - var elementSize = pullIntoDescriptor.elementSize; - var currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize; - var maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled); - var maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy; - var maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize; - var totalBytesToCopyRemaining = maxBytesToCopy; - var ready = false; - if (maxAlignedBytes > currentAlignedBytes) { - totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled; - ready = true; - } - var queue = controller._queue; - while (totalBytesToCopyRemaining > 0) { - var headOfQueue = queue.peek(); - var bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength); - var destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; - CopyDataBlockBytes(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy); - if (headOfQueue.byteLength === bytesToCopy) { - queue.shift(); + let fileSize = 0n; + let dagSize = 0n; + let localFileSize = 0n; + let localDagSize = 0n; + let blocks = 0; + let mode; + let mtime; + const type = result.type; + let unixfs; + if (result.type === 'raw') { + fileSize = BigInt(result.node.byteLength); + dagSize = BigInt(result.node.byteLength); + localFileSize = BigInt(result.node.byteLength); + localDagSize = BigInt(result.node.byteLength); + blocks = 1; + } + if (result.type === 'directory') { + fileSize = 0n; + dagSize = BigInt(result.unixfs.marshal().byteLength); + localFileSize = 0n; + localDagSize = dagSize; + blocks = 1; + mode = result.unixfs.mode; + mtime = result.unixfs.mtime; + unixfs = result.unixfs; + } + if (result.type === 'file') { + const results = await inspectDag(resolved.cid, blockstore, opts); + fileSize = result.unixfs.fileSize(); + dagSize = BigInt((result.node.Data?.byteLength ?? 0) + result.node.Links.reduce((acc, curr) => acc + (curr.Tsize ?? 0), 0)); + localFileSize = BigInt(results.localFileSize); + localDagSize = BigInt(results.localDagSize); + blocks = results.blocks; + mode = result.unixfs.mode; + mtime = result.unixfs.mtime; + unixfs = result.unixfs; + } + return { + cid: resolved.cid, + mode, + mtime, + fileSize, + dagSize, + localFileSize, + localDagSize, + blocks, + type, + unixfs + }; +} +async function inspectDag(cid, blockstore, options) { + const results = { + localFileSize: 0, + localDagSize: 0, + blocks: 0 + }; + if (await blockstore.has(cid, options)) { + const block = await blockstore.get(cid, options); + results.blocks++; + results.localDagSize += block.byteLength; + if (cid.code === unixfs_node_modules_multiformats_src_codecs_raw_code) { + results.localFileSize += block.byteLength; + } + else if (cid.code === code) { + const pbNode = src_decode(block); + if (pbNode.Links.length > 0) { + // intermediate node + for (const link of pbNode.Links) { + const linkResult = await inspectDag(link.Hash, blockstore, options); + results.localFileSize += linkResult.localFileSize; + results.localDagSize += linkResult.localDagSize; + results.blocks += linkResult.blocks; + } } else { - headOfQueue.byteOffset += bytesToCopy; - headOfQueue.byteLength -= bytesToCopy; + // leaf node + if (pbNode.Data == null) { + throw new InvalidPBNodeError(`PBNode ${cid.toString()} had no data`); + } + const unixfs = src_UnixFS.unmarshal(pbNode.Data); + if (unixfs.data == null) { + throw new InvalidPBNodeError(`UnixFS node ${cid.toString()} had no data`); + } + results.localFileSize += unixfs.data.byteLength ?? 0; } - controller._queueTotalSize -= bytesToCopy; - ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor); - totalBytesToCopyRemaining -= bytesToCopy; - } - return ready; - } - function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) { - pullIntoDescriptor.bytesFilled += size; - } - function ReadableByteStreamControllerHandleQueueDrain(controller) { - if (controller._queueTotalSize === 0 && controller._closeRequested) { - ReadableByteStreamControllerClearAlgorithms(controller); - ReadableStreamClose(controller._controlledReadableByteStream); } else { - ReadableByteStreamControllerCallPullIfNeeded(controller); - } - } - function ReadableByteStreamControllerInvalidateBYOBRequest(controller) { - if (controller._byobRequest === null) { - return; + throw new errors_UnknownError(`${cid.toString()} was neither DAG_PB nor RAW`); } - controller._byobRequest._associatedReadableByteStreamController = undefined; - controller._byobRequest._view = null; - controller._byobRequest = null; } - function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) { - while (controller._pendingPullIntos.length > 0) { - if (controller._queueTotalSize === 0) { - return; + return results; +} +//# sourceMappingURL=stat.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/commands/touch.js + + + + + + + + + + + + + + + +const touch_mergeOptions = node_modules_merge_options.bind({ ignoreUndefined: true }); +const touch_log = dist_src_logger('helia:unixfs:touch'); +const touch_defaultOptions = { + recursive: false, + shardSplitThresholdBytes: SHARD_SPLIT_THRESHOLD_BYTES +}; +async function touch(cid, blockstore, options = {}) { + const opts = touch_mergeOptions(touch_defaultOptions, options); + const resolved = await resolve_resolve(cid, opts.path, blockstore, opts); + const mtime = opts.mtime ?? { + secs: BigInt(Math.round(Date.now() / 1000)), + nsecs: 0 + }; + touch_log('touch %c %o', resolved.cid, mtime); + if (opts.recursive) { + // recursively export from root CID, change perms of each entry then reimport + // but do not reimport files, only manipulate dag-pb nodes + const root = await pipe(async function* () { + for await (const entry of recursive(resolved.cid, blockstore)) { + let metadata; + let links; + if (entry.type === 'raw') { + metadata = new src_UnixFS({ data: entry.node }); + links = []; + } + else if (entry.type === 'file' || entry.type === 'directory') { + metadata = entry.unixfs; + links = entry.node.Links; + } + else { + throw new NotUnixFSError(); + } + metadata.mtime = mtime; + const node = { + Data: metadata.marshal(), + Links: links + }; + yield { + path: entry.path, + content: node + }; } - var pullIntoDescriptor = controller._pendingPullIntos.peek(); - if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) { - ReadableByteStreamControllerShiftPendingPullInto(controller); - ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); + }, + // @ts-expect-error blockstore types are incompatible + (source) => importer(source, blockstore, { + ...opts, + dagBuilder: async function* (source, block) { + for await (const entry of source) { + yield async function () { + // @ts-expect-error cannot derive type + const node = entry.content; + const buf = src_encode(node); + const updatedCid = await persist_persist(buf, block, { + ...opts, + cidVersion: cid.version + }); + if (node.Data == null) { + throw new InvalidPBNodeError(`${updatedCid} had no data`); + } + const unixfs = src_UnixFS.unmarshal(node.Data); + return { + cid: updatedCid, + size: BigInt(buf.length), + path: entry.path, + unixfs + }; + }; + } } + }), async (nodes) => dist_src(nodes)); + if (root == null) { + throw new errors_UnknownError(`Could not chmod ${resolved.cid.toString()}`); } + return updatePathCids(root.cid, resolved, blockstore, opts); } - function ReadableByteStreamControllerPullInto(controller, view, readIntoRequest) { - var stream = controller._controlledReadableByteStream; - var elementSize = 1; - if (view.constructor !== DataView) { - elementSize = view.constructor.BYTES_PER_ELEMENT; + const block = await blockstore.get(resolved.cid, options); + let metadata; + let links = []; + if (resolved.cid.code === unixfs_node_modules_multiformats_src_codecs_raw_code) { + metadata = new src_UnixFS({ data: block }); + } + else { + const node = src_decode(block); + links = node.Links; + if (node.Data == null) { + throw new InvalidPBNodeError(`${resolved.cid.toString()} had no data`); } - var ctor = view.constructor; - // try { - var buffer = TransferArrayBuffer(view.buffer); - // } catch (e) { - // readIntoRequest._errorSteps(e); - // return; - // } - var pullIntoDescriptor = { - buffer: buffer, - bufferByteLength: buffer.byteLength, - byteOffset: view.byteOffset, - byteLength: view.byteLength, - bytesFilled: 0, - elementSize: elementSize, - viewConstructor: ctor, - readerType: 'byob' - }; - if (controller._pendingPullIntos.length > 0) { - controller._pendingPullIntos.push(pullIntoDescriptor); - // No ReadableByteStreamControllerCallPullIfNeeded() call since: - // - No change happens on desiredSize - // - The source has already been notified of that there's at least 1 pending read(view) - ReadableStreamAddReadIntoRequest(stream, readIntoRequest); - return; + metadata = src_UnixFS.unmarshal(node.Data); + } + metadata.mtime = mtime; + const updatedBlock = src_encode({ + Data: metadata.marshal(), + Links: links + }); + const hash = await unixfs_node_modules_multiformats_src_hashes_sha2_sha256.digest(updatedBlock); + const updatedCid = unixfs_node_modules_multiformats_src_cid_CID.create(resolved.cid.version, code, hash); + await blockstore.put(updatedCid, updatedBlock); + return updatePathCids(updatedCid, resolved, blockstore, opts); +} +//# sourceMappingURL=touch.js.map +;// CONCATENATED MODULE: external "fs/promises" +const promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("fs/promises"); +// EXTERNAL MODULE: external "path" +var external_path_ = __nccwpck_require__(71017); +// EXTERNAL MODULE: ./node_modules/@helia/unixfs/node_modules/brace-expansion/index.js +var brace_expansion = __nccwpck_require__(74405); +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/minimatch/dist/mjs/assert-valid-pattern.js +const MAX_PATTERN_LENGTH = 1024 * 64; +const assertValidPattern = (pattern) => { + if (typeof pattern !== 'string') { + throw new TypeError('invalid pattern'); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError('pattern is too long'); + } +}; +//# sourceMappingURL=assert-valid-pattern.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/minimatch/dist/mjs/brace-expressions.js +// translate the various posix character classes into unicode properties +// this works across all unicode locales +// { : [, /u flag required, negated] +const posixClasses = { + '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true], + '[:alpha:]': ['\\p{L}\\p{Nl}', true], + '[:ascii:]': ['\\x' + '00-\\x' + '7f', false], + '[:blank:]': ['\\p{Zs}\\t', true], + '[:cntrl:]': ['\\p{Cc}', true], + '[:digit:]': ['\\p{Nd}', true], + '[:graph:]': ['\\p{Z}\\p{C}', true, true], + '[:lower:]': ['\\p{Ll}', true], + '[:print:]': ['\\p{C}', true], + '[:punct:]': ['\\p{P}', true], + '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true], + '[:upper:]': ['\\p{Lu}', true], + '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true], + '[:xdigit:]': ['A-Fa-f0-9', false], +}; +// only need to escape a few things inside of brace expressions +// escapes: [ \ ] - +const braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&'); +// escape all regexp magic characters +const regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// everything has already been escaped, we just have to join +const rangesToString = (ranges) => ranges.join(''); +// takes a glob string at a posix brace expression, and returns +// an equivalent regular expression source, and boolean indicating +// whether the /u flag needs to be applied, and the number of chars +// consumed to parse the character class. +// This also removes out of order ranges, and returns ($.) if the +// entire class just no good. +const parseClass = (glob, position) => { + const pos = position; + /* c8 ignore start */ + if (glob.charAt(pos) !== '[') { + throw new Error('not in a brace expression'); + } + /* c8 ignore stop */ + const ranges = []; + const negs = []; + let i = pos + 1; + let sawStart = false; + let uflag = false; + let escaping = false; + let negate = false; + let endPos = pos; + let rangeStart = ''; + WHILE: while (i < glob.length) { + const c = glob.charAt(i); + if ((c === '!' || c === '^') && i === pos + 1) { + negate = true; + i++; + continue; } - if (stream._state === 'closed') { - var emptyView = new ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0); - readIntoRequest._closeSteps(emptyView); - return; + if (c === ']' && sawStart && !escaping) { + endPos = i + 1; + break; } - if (controller._queueTotalSize > 0) { - if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) { - var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); - ReadableByteStreamControllerHandleQueueDrain(controller); - readIntoRequest._chunkSteps(filledView); - return; + sawStart = true; + if (c === '\\') { + if (!escaping) { + escaping = true; + i++; + continue; } - if (controller._closeRequested) { - var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); - ReadableByteStreamControllerError(controller, e); - readIntoRequest._errorSteps(e); - return; + // escaped \ char, fall through and treat like normal char + } + if (c === '[' && !escaping) { + // either a posix class, a collation equivalent, or just a [ + for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) { + if (glob.startsWith(cls, i)) { + // invalid, [a-[] is fine, but not [a-[:alpha]] + if (rangeStart) { + return ['$.', false, glob.length - pos, true]; + } + i += cls.length; + if (neg) + negs.push(unip); + else + ranges.push(unip); + uflag = uflag || u; + continue WHILE; + } } } - controller._pendingPullIntos.push(pullIntoDescriptor); - ReadableStreamAddReadIntoRequest(stream, readIntoRequest); - ReadableByteStreamControllerCallPullIfNeeded(controller); - } - function ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) { - var stream = controller._controlledReadableByteStream; - if (ReadableStreamHasBYOBReader(stream)) { - while (ReadableStreamGetNumReadIntoRequests(stream) > 0) { - var pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller); - ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor); + // now it's just a normal character, effectively + escaping = false; + if (rangeStart) { + // throw this range away if it's not valid, but others + // can still match. + if (c > rangeStart) { + ranges.push(braceEscape(rangeStart) + '-' + braceEscape(c)); + } + else if (c === rangeStart) { + ranges.push(braceEscape(c)); } + rangeStart = ''; + i++; + continue; } - } - function ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) { - ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor); - if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) { - return; + // now might be the start of a range. + // can be either c-d or c-] or c] or c] at this point + if (glob.startsWith('-]', i + 1)) { + ranges.push(braceEscape(c + '-')); + i += 2; + continue; } - ReadableByteStreamControllerShiftPendingPullInto(controller); - var remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize; - if (remainderSize > 0) { - var end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; - var remainder = ArrayBufferSlice(pullIntoDescriptor.buffer, end - remainderSize, end); - ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength); + if (glob.startsWith('-', i + 1)) { + rangeStart = c; + i += 2; + continue; } - pullIntoDescriptor.bytesFilled -= remainderSize; - ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); - ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); + // not the start of a range, just a single character + ranges.push(braceEscape(c)); + i++; } - function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) { - var firstDescriptor = controller._pendingPullIntos.peek(); - ReadableByteStreamControllerInvalidateBYOBRequest(controller); - var state = controller._controlledReadableByteStream._state; - if (state === 'closed') { - ReadableByteStreamControllerRespondInClosedState(controller); + if (endPos < i) { + // didn't see the end of the class, not a valid class, + // but might still be valid as a literal match. + return ['', false, 0, false]; + } + // if we got no ranges and no negates, then we have a range that + // cannot possibly match anything, and that poisons the whole glob + if (!ranges.length && !negs.length) { + return ['$.', false, glob.length - pos, true]; + } + // if we got one positive range, and it's a single character, then that's + // not actually a magic pattern, it's just that one literal character. + // we should not treat that as "magic", we should just return the literal + // character. [_] is a perfectly valid way to escape glob magic chars. + if (negs.length === 0 && + ranges.length === 1 && + /^\\?.$/.test(ranges[0]) && + !negate) { + const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0]; + return [regexpEscape(r), false, endPos - pos, false]; + } + const sranges = '[' + (negate ? '^' : '') + rangesToString(ranges) + ']'; + const snegs = '[' + (negate ? '' : '^') + rangesToString(negs) + ']'; + const comb = ranges.length && negs.length + ? '(' + sranges + '|' + snegs + ')' + : ranges.length + ? sranges + : snegs; + return [comb, uflag, endPos - pos, true]; +}; +//# sourceMappingURL=brace-expressions.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/minimatch/dist/mjs/unescape.js +/** + * Un-escape a string that has been escaped with {@link escape}. + * + * If the {@link windowsPathsNoEscape} option is used, then square-brace + * escapes are removed, but not backslash escapes. For example, it will turn + * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`, + * becuase `\` is a path separator in `windowsPathsNoEscape` mode. + * + * When `windowsPathsNoEscape` is not set, then both brace escapes and + * backslash escapes are removed. + * + * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped + * or unescaped. + */ +const unescape_unescape = (s, { windowsPathsNoEscape = false, } = {}) => { + return windowsPathsNoEscape + ? s.replace(/\[([^\/\\])\]/g, '$1') + : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1'); +}; +//# sourceMappingURL=unescape.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/minimatch/dist/mjs/ast.js +// parse a single path portion + + +const ast_types = new Set(['!', '?', '+', '*', '@']); +const isExtglobType = (c) => ast_types.has(c); +// Patterns that get prepended to bind to the start of either the +// entire string, or just a single path portion, to prevent dots +// and/or traversal patterns, when needed. +// Exts don't need the ^ or / bit, because the root binds that already. +const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))'; +const startNoDot = '(?!\\.)'; +// characters that indicate a start of pattern needs the "no dots" bit, +// because a dot *might* be matched. ( is not in the list, because in +// the case of a child extglob, it will handle the prevention itself. +const addPatternStart = new Set(['[', '.']); +// cases where traversal is A-OK, no dot prevention needed +const justDots = new Set(['..', '.']); +const reSpecials = new Set('().*{}+?[]^$\\!'); +const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +// any single thing other than / +const qmark = '[^/]'; +// * => any number of characters +const star = qmark + '*?'; +// use + when we need to ensure that *something* matches, because the * is +// the only thing in the path portion. +const starNoEmpty = qmark + '+?'; +// remove the \ chars that we added if we end up doing a nonmagic compare +// const deslash = (s: string) => s.replace(/\\(.)/g, '$1') +class AST { + type; + #root; + #hasMagic; + #uflag = false; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + #toString; + // set to true if it's an extglob with no children + // (which really means one child of '') + #emptyExt = false; + constructor(type, parent, options = {}) { + this.type = type; + // extglobs are inherently magical + if (type) + this.#hasMagic = true; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === '!' && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; + } + get hasMagic() { + /* c8 ignore start */ + if (this.#hasMagic !== undefined) + return this.#hasMagic; + /* c8 ignore stop */ + for (const p of this.#parts) { + if (typeof p === 'string') + continue; + if (p.type || p.hasMagic) + return (this.#hasMagic = true); + } + // note: will be undefined until we generate the regexp src and find out + return this.#hasMagic; + } + // reconstructs the pattern + toString() { + if (this.#toString !== undefined) + return this.#toString; + if (!this.type) { + return (this.#toString = this.#parts.map(p => String(p)).join('')); } else { - ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor); + return (this.#toString = + this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); } - ReadableByteStreamControllerCallPullIfNeeded(controller); } - function ReadableByteStreamControllerShiftPendingPullInto(controller) { - var descriptor = controller._pendingPullIntos.shift(); - return descriptor; + #fillNegs() { + /* c8 ignore start */ + if (this !== this.#root) + throw new Error('should only call on root'); + if (this.#filledNegs) + return this; + /* c8 ignore stop */ + // call toString() once to fill this out + this.toString(); + this.#filledNegs = true; + let n; + while ((n = this.#negs.pop())) { + if (n.type !== '!') + continue; + // walk up the tree, appending everthing that comes AFTER parentIndex + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + /* c8 ignore start */ + if (typeof part === 'string') { + throw new Error('string part in extglob AST??'); + } + /* c8 ignore stop */ + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; } - function ReadableByteStreamControllerShouldCallPull(controller) { - var stream = controller._controlledReadableByteStream; - if (stream._state !== 'readable') { - return false; + push(...parts) { + for (const p of parts) { + if (p === '') + continue; + /* c8 ignore start */ + if (typeof p !== 'string' && !(p instanceof AST && p.#parent === this)) { + throw new Error('invalid part: ' + p); + } + /* c8 ignore stop */ + this.#parts.push(p); } - if (controller._closeRequested) { + } + toJSON() { + const ret = this.type === null + ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON())) + : [this.type, ...this.#parts.map(p => p.toJSON())]; + if (this.isStart() && !this.type) + ret.unshift([]); + if (this.isEnd() && + (this === this.#root || + (this.#root.#filledNegs && this.#parent?.type === '!'))) { + ret.push({}); + } + return ret; + } + isStart() { + if (this.#root === this) + return true; + // if (this.type) return !!this.#parent?.isStart() + if (!this.#parent?.isStart()) return false; + if (this.#parentIndex === 0) + return true; + // if everything AHEAD of this is a negation, then it's still the "start" + const p = this.#parent; + for (let i = 0; i < this.#parentIndex; i++) { + const pp = p.#parts[i]; + if (!(pp instanceof AST && pp.type === '!')) { + return false; + } } - if (!controller._started) { + return true; + } + isEnd() { + if (this.#root === this) + return true; + if (this.#parent?.type === '!') + return true; + if (!this.#parent?.isEnd()) return false; + if (!this.type) + return this.#parent?.isEnd(); + // if not root, it'll always have a parent + /* c8 ignore start */ + const pl = this.#parent ? this.#parent.#parts.length : 0; + /* c8 ignore stop */ + return this.#parentIndex === pl - 1; + } + copyIn(part) { + if (typeof part === 'string') + this.push(part); + else + this.push(part.clone(this)); + } + clone(parent) { + const c = new AST(this.type, parent); + for (const p of this.#parts) { + c.copyIn(p); + } + return c; + } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + let inBrace = false; + let braceStart = -1; + let braceNeg = false; + if (ast.type === null) { + // outside of a extglob, append until we find a start + let i = pos; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i) === '(') { + ast.push(acc); + acc = ''; + const ext = new AST(c, ast); + i = AST.#parseAST(str, ext, i, opt); + ast.push(ext); + continue; + } + acc += c; + } + ast.push(acc); + return i; + } + // some kind of extglob, pos is at the ( + // find the next | or ) + let i = pos + 1; + let part = new AST(null, ast); + const parts = []; + let acc = ''; + while (i < str.length) { + const c = str.charAt(i++); + // still accumulate escapes at this point, but we do ignore + // starts that are escaped + if (escaping || c === '\\') { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === '^' || c === '!') { + braceNeg = true; + } + } + else if (c === ']' && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } + else if (c === '[') { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === '(') { + part.push(acc); + acc = ''; + const ext = new AST(c, part); + part.push(ext); + i = AST.#parseAST(str, ext, i, opt); + continue; + } + if (c === '|') { + part.push(acc); + acc = ''; + parts.push(part); + part = new AST(null, ast); + continue; + } + if (c === ')') { + if (acc === '' && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ''; + ast.push(...parts, part); + return i; + } + acc += c; + } + // unfinished extglob + // if we got here, it was a malformed extglob! not an extglob, but + // maybe something else in there. + ast.type = null; + ast.#hasMagic = undefined; + ast.#parts = [str.substring(pos - 1)]; + return i; + } + static fromGlob(pattern, options = {}) { + const ast = new AST(null, undefined, options); + AST.#parseAST(pattern, ast, 0, options); + return ast; + } + // returns the regular expression if there's magic, or the unescaped + // string if not. + toMMPattern() { + // should only be called on root + /* c8 ignore start */ + if (this !== this.#root) + return this.#root.toMMPattern(); + /* c8 ignore stop */ + const glob = this.toString(); + const [re, body, hasMagic, uflag] = this.toRegExpSource(); + // if we're in nocase mode, and not nocaseMagicOnly, then we do + // still need a regular expression if we have to case-insensitively + // match capital/lowercase characters. + const anyMagic = hasMagic || + this.#hasMagic || + (this.#options.nocase && + !this.#options.nocaseMagicOnly && + glob.toUpperCase() !== glob.toLowerCase()); + if (!anyMagic) { + return body; + } + const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : ''); + return Object.assign(new RegExp(`^${re}$`, flags), { + _src: re, + _glob: glob, + }); + } + // returns the string match, the regexp source, whether there's magic + // in the regexp (so a regular expression is required) and whether or + // not the uflag is needed for the regular expression (for posix classes) + // TODO: instead of injecting the start/end at this point, just return + // the BODY of the regexp, along with the start/end portions suitable + // for binding the start/end in either a joined full-path makeRe context + // (where we bind to (^|/), or a standalone matchPart context (where + // we bind to ^, and not /). Otherwise slashes get duped! + // + // In part-matching mode, the start is: + // - if not isStart: nothing + // - if traversal possible, but not allowed: ^(?!\.\.?$) + // - if dots allowed or not possible: ^ + // - if dots possible and not allowed: ^(?!\.) + // end is: + // - if not isEnd(): nothing + // - else: $ + // + // In full-path matching mode, we put the slash at the START of the + // pattern, so start is: + // - if first pattern: same as part-matching mode + // - if not isStart(): nothing + // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/)) + // - if dots allowed or not possible: / + // - if dots possible and not allowed: /(?!\.) + // end is: + // - if last pattern, same as part-matching mode + // - else nothing + // + // Always put the (?:$|/) on negated tails, though, because that has to be + // there to bind the end of the negated pattern portion, and it's easier to + // just stick it in now rather than try to inject it later in the middle of + // the pattern. + // + // We can just always return the same end, and leave it up to the caller + // to know whether it's going to be used joined or in parts. + // And, if the start is adjusted slightly, can do the same there: + // - if not isStart: nothing + // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$) + // - if dots allowed or not possible: (?:/|^) + // - if dots possible and not allowed: (?:/|^)(?!\.) + // + // But it's better to have a simpler binding without a conditional, for + // performance, so probably better to return both start options. + // + // Then the caller just ignores the end if it's not the first pattern, + // and the start always gets applied. + // + // But that's always going to be $ if it's the ending pattern, or nothing, + // so the caller can just attach $ at the end of the pattern when building. + // + // So the todo is: + // - better detect what kind of start is needed + // - return both flavors of starting pattern + // - attach $ at the end of the pattern when creating the actual RegExp + // + // Ah, but wait, no, that all only applies to the root when the first pattern + // is not an extglob. If the first pattern IS an extglob, then we need all + // that dot prevention biz to live in the extglob portions, because eg + // +(*|.x*) can match .xy but not .yx. + // + // So, return the two flavors if it's #root and the first child is not an + // AST, otherwise leave it to the child AST to handle it, and there, + // use the (?:^|/) style of start binding. + // + // Even simplified further: + // - Since the start for a join is eg /(?!\.) and the start for a part + // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root + // or start or whatever) and prepend ^ or / at the Regexp construction. + toRegExpSource(allowDot) { + const dot = allowDot ?? !!this.#options.dot; + if (this.#root === this) + this.#fillNegs(); + if (!this.type) { + const noEmpty = this.isStart() && this.isEnd(); + const src = this.#parts + .map(p => { + const [re, _, hasMagic, uflag] = typeof p === 'string' + ? AST.#parseGlob(p, this.#hasMagic, noEmpty) + : p.toRegExpSource(allowDot); + this.#hasMagic = this.#hasMagic || hasMagic; + this.#uflag = this.#uflag || uflag; + return re; + }) + .join(''); + let start = ''; + if (this.isStart()) { + if (typeof this.#parts[0] === 'string') { + // this is the string that will match the start of the pattern, + // so we need to protect against dots and such. + // '.' and '..' cannot match unless the pattern is that exactly, + // even if it starts with . or dot:true is set. + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); + if (!dotTravAllowed) { + const aps = addPatternStart; + // check if we have a possibility of matching . or .., + // and prevent that. + const needNoTrav = + // dots are allowed, and the pattern starts with [ or . + (dot && aps.has(src.charAt(0))) || + // the pattern starts with \., and then [ or . + (src.startsWith('\\.') && aps.has(src.charAt(2))) || + // the pattern starts with \.\., and then [ or . + (src.startsWith('\\.\\.') && aps.has(src.charAt(4))); + // no need to prevent dots if it can't match a dot, or if a + // sub-pattern will be preventing it anyway. + const needNoDot = !dot && !allowDot && aps.has(src.charAt(0)); + start = needNoTrav ? startNoTraversal : needNoDot ? startNoDot : ''; + } + } + } + // append the "end of path portion" pattern to negation tails + let end = ''; + if (this.isEnd() && + this.#root.#filledNegs && + this.#parent?.type === '!') { + end = '(?:$|\\/)'; + } + const final = start + src + end; + return [ + final, + unescape_unescape(src), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; } - if (ReadableStreamHasDefaultReader(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { - return true; + // We need to calculate the body *twice* if it's a repeat pattern + // at the start, once in nodot mode, then again in dot mode, so a + // pattern like *(?) can match 'x.y' + const repeated = this.type === '*' || this.type === '+'; + // some kind of extglob + const start = this.type === '!' ? '(?:(?!(?:' : '(?:'; + let body = this.#partsToRegExp(dot); + if (this.isStart() && this.isEnd() && !body && this.type !== '!') { + // invalid extglob, has to at least be *something* present, if it's + // the entire path portion. + const s = this.toString(); + this.#parts = [s]; + this.type = null; + this.#hasMagic = undefined; + return [s, unescape_unescape(this.toString()), false, false]; + } + // XXX abstract out this map method + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot + ? '' + : this.#partsToRegExp(true); + if (bodyDotAllowed === body) { + bodyDotAllowed = ''; + } + if (bodyDotAllowed) { + body = `(?:${body})(?:${bodyDotAllowed})*?`; + } + // an empty !() is exactly equivalent to a starNoEmpty + let final = ''; + if (this.type === '!' && this.#emptyExt) { + final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty; } - if (ReadableStreamHasBYOBReader(stream) && ReadableStreamGetNumReadIntoRequests(stream) > 0) { - return true; + else { + const close = this.type === '!' + ? // !() must match something,but !(x) can match '' + '))' + + (this.isStart() && !dot && !allowDot ? startNoDot : '') + + star + + ')' + : this.type === '@' + ? ')' + : this.type === '?' + ? ')?' + : this.type === '+' && bodyDotAllowed + ? ')' + : this.type === '*' && bodyDotAllowed + ? `)?` + : `)${this.type}`; + final = start + body + close; } - var desiredSize = ReadableByteStreamControllerGetDesiredSize(controller); - if (desiredSize > 0) { - return true; + return [ + final, + unescape_unescape(body), + (this.#hasMagic = !!this.#hasMagic), + this.#uflag, + ]; + } + #partsToRegExp(dot) { + return this.#parts + .map(p => { + // extglob ASTs should only contain parent ASTs + /* c8 ignore start */ + if (typeof p === 'string') { + throw new Error('string type in extglob ast??'); + } + /* c8 ignore stop */ + // can ignore hasMagic, because extglobs are already always magic + const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }) + .filter(p => !(this.isStart() && this.isEnd()) || !!p) + .join('|'); + } + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ''; + let uflag = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? '\\' : '') + c; + continue; + } + if (c === '\\') { + if (i === glob.length - 1) { + re += '\\\\'; + } + else { + escaping = true; + } + continue; + } + if (c === '[') { + const [src, needUflag, consumed, magic] = parseClass(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; + } + } + if (c === '*') { + if (noEmpty && glob === '*') + re += starNoEmpty; + else + re += star; + hasMagic = true; + continue; + } + if (c === '?') { + re += qmark; + hasMagic = true; + continue; + } + re += regExpEscape(c); } + return [re, unescape_unescape(glob), !!hasMagic, uflag]; + } +} +//# sourceMappingURL=ast.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/minimatch/dist/mjs/escape.js +/** + * Escape all magic characters in a glob pattern. + * + * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape} + * option is used, then characters are escaped by wrapping in `[]`, because + * a magic character wrapped in a character class can only be satisfied by + * that exact character. In this mode, `\` is _not_ escaped, because it is + * not interpreted as a magic character, but instead as a path separator. + */ +const escape_escape = (s, { windowsPathsNoEscape = false, } = {}) => { + // don't need to escape +@! because we escape the parens + // that make those magic, and escaping ! as [!] isn't valid, + // because [!]] is a valid glob class meaning not ']'. + return windowsPathsNoEscape + ? s.replace(/[?*()[\]]/g, '[$&]') + : s.replace(/[?*()[\]\\]/g, '\\$&'); +}; +//# sourceMappingURL=escape.js.map +;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/minimatch/dist/mjs/index.js + + + + + +const mjs_minimatch = (p, pattern, options = {}) => { + assertValidPattern(pattern); + // shortcut: comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { return false; } - function ReadableByteStreamControllerClearAlgorithms(controller) { - controller._pullAlgorithm = undefined; - controller._cancelAlgorithm = undefined; + return new Minimatch(pattern, options).match(p); +}; +// Optimized checking for the most common glob patterns. +const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); +const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); +const starDotExtTestNocase = (ext) => { + ext = ext.toLowerCase(); + return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext); +}; +const starDotExtTestNocaseDot = (ext) => { + ext = ext.toLowerCase(); + return (f) => f.toLowerCase().endsWith(ext); +}; +const starDotStarRE = /^\*+\.\*+$/; +const starDotStarTest = (f) => !f.startsWith('.') && f.includes('.'); +const starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.'); +const dotStarRE = /^\.\*+$/; +const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); +const starRE = /^\*+$/; +const starTest = (f) => f.length !== 0 && !f.startsWith('.'); +const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; +const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksTestNocase = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestNocaseDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + if (!ext) + return noext; + ext = ext.toLowerCase(); + return (f) => noext(f) && f.toLowerCase().endsWith(ext); +}; +const qmarksTestDot = ([$0, ext = '']) => { + const noext = qmarksTestNoExtDot([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTest = ([$0, ext = '']) => { + const noext = qmarksTestNoExt([$0]); + return !ext ? noext : (f) => noext(f) && f.endsWith(ext); +}; +const qmarksTestNoExt = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && !f.startsWith('.'); +}; +const qmarksTestNoExtDot = ([$0]) => { + const len = $0.length; + return (f) => f.length === len && f !== '.' && f !== '..'; +}; +/* c8 ignore start */ +const defaultPlatform = (typeof process === 'object' && process + ? (typeof process.env === 'object' && + process.env && + process.env.__MINIMATCH_TESTING_PLATFORM__) || + process.platform + : 'posix'); +const mjs_path = { + win32: { sep: '\\' }, + posix: { sep: '/' }, +}; +/* c8 ignore stop */ +const sep = defaultPlatform === 'win32' ? mjs_path.win32.sep : mjs_path.posix.sep; +mjs_minimatch.sep = sep; +const GLOBSTAR = Symbol('globstar **'); +mjs_minimatch.GLOBSTAR = GLOBSTAR; +// any single thing other than / +// don't need to escape / when using new RegExp() +const mjs_qmark = '[^/]'; +// * => any number of characters +const mjs_star = mjs_qmark + '*?'; +// ** when dots are allowed. Anything goes, except .. and . +// not (^ or / followed by one or two dots followed by $ or /), +// followed by anything, any number of times. +const twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?'; +// not a ^ or / followed by a dot, +// followed by anything, any number of times. +const twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?'; +const mjs_filter = (pattern, options = {}) => (p) => mjs_minimatch(p, pattern, options); +mjs_minimatch.filter = mjs_filter; +const ext = (a, b = {}) => Object.assign({}, a, b); +const mjs_defaults = (def) => { + if (!def || typeof def !== 'object' || !Object.keys(def).length) { + return mjs_minimatch; + } + const orig = mjs_minimatch; + const m = (p, pattern, options = {}) => orig(p, pattern, ext(def, options)); + return Object.assign(m, { + Minimatch: class Minimatch extends orig.Minimatch { + constructor(pattern, options = {}) { + super(pattern, ext(def, options)); + } + static defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + } + }, + AST: class AST extends orig.AST { + /* c8 ignore start */ + constructor(type, parent, options = {}) { + super(type, parent, ext(def, options)); + } + /* c8 ignore stop */ + static fromGlob(pattern, options = {}) { + return orig.AST.fromGlob(pattern, ext(def, options)); + } + }, + unescape: (s, options = {}) => orig.unescape(s, ext(def, options)), + escape: (s, options = {}) => orig.escape(s, ext(def, options)), + filter: (pattern, options = {}) => orig.filter(pattern, ext(def, options)), + defaults: (options) => orig.defaults(ext(def, options)), + makeRe: (pattern, options = {}) => orig.makeRe(pattern, ext(def, options)), + braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, ext(def, options)), + match: (list, pattern, options = {}) => orig.match(list, pattern, ext(def, options)), + sep: orig.sep, + GLOBSTAR: GLOBSTAR, + }); +}; +mjs_minimatch.defaults = mjs_defaults; +// Brace expansion: +// a{b,c}d -> abd acd +// a{b,}c -> abc ac +// a{0..3}d -> a0d a1d a2d a3d +// a{b,c{d,e}f}g -> abg acdfg acefg +// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg +// +// Invalid sets are not expanded. +// a{2..}b -> a{2..}b +// a{b}c -> a{b}c +const braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern); + // Thanks to Yeting Li for + // improving this regexp to avoid a ReDOS vulnerability. + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + // shortcut. no need to expand. + return [pattern]; } - // A client of ReadableByteStreamController may use these functions directly to bypass state check. - function ReadableByteStreamControllerClose(controller) { - var stream = controller._controlledReadableByteStream; - if (controller._closeRequested || stream._state !== 'readable') { - return; - } - if (controller._queueTotalSize > 0) { - controller._closeRequested = true; - return; + return brace_expansion(pattern); +}; +mjs_minimatch.braceExpand = braceExpand; +// parse a component of the expanded set. +// At this point, no pattern may contain "/" in it +// so we're going to return a 2d array, where each entry is the full +// pattern, split on '/', and then turned into a regular expression. +// A regexp is made at the end which joins each array with an +// escaped /, and another full one which joins each regexp with |. +// +// Following the lead of Bash 4.1, note that "**" only has special meaning +// when it is the *only* thing in a path portion. Otherwise, any series +// of * is equivalent to a single *. Globstar behavior is enabled by +// default, and can be disabled by setting options.noglobstar. +const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe(); +mjs_minimatch.makeRe = makeRe; +const match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter(f => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; +}; +mjs_minimatch.match = match; +// replace stuff like \* with * +const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/; +const mjs_regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'); +class Minimatch { + options; + set; + pattern; + windowsPathsNoEscape; + nonegate; + negate; + comment; + empty; + preserveMultipleSlashes; + partial; + globSet; + globParts; + nocase; + isWindows; + platform; + windowsNoMagicRoot; + regexp; + constructor(pattern, options = {}) { + assertValidPattern(pattern); + options = options || {}; + this.options = options; + this.pattern = pattern; + this.platform = options.platform || defaultPlatform; + this.isWindows = this.platform === 'win32'; + this.windowsPathsNoEscape = + !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, '/'); + } + this.preserveMultipleSlashes = !!options.preserveMultipleSlashes; + this.regexp = null; + this.negate = false; + this.nonegate = !!options.nonegate; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.nocase = !!this.options.nocase; + this.windowsNoMagicRoot = + options.windowsNoMagicRoot !== undefined + ? options.windowsNoMagicRoot + : !!(this.isWindows && this.nocase); + this.globSet = []; + this.globParts = []; + this.set = []; + // make the set of regexps etc. + this.make(); + } + hasMagic() { + if (this.options.magicalBraces && this.set.length > 1) { + return true; } - if (controller._pendingPullIntos.length > 0) { - var firstPendingPullInto = controller._pendingPullIntos.peek(); - if (firstPendingPullInto.bytesFilled > 0) { - var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); - ReadableByteStreamControllerError(controller, e); - throw e; + for (const pattern of this.set) { + for (const part of pattern) { + if (typeof part !== 'string') + return true; } } - ReadableByteStreamControllerClearAlgorithms(controller); - ReadableStreamClose(stream); + return false; } - function ReadableByteStreamControllerEnqueue(controller, chunk) { - var stream = controller._controlledReadableByteStream; - if (controller._closeRequested || stream._state !== 'readable') { + debug(..._) { } + make() { + const pattern = this.pattern; + const options = this.options; + // empty patterns and comments match nothing. + if (!options.nocomment && pattern.charAt(0) === '#') { + this.comment = true; return; } - var buffer = chunk.buffer; - var byteOffset = chunk.byteOffset; - var byteLength = chunk.byteLength; - var transferredBuffer = TransferArrayBuffer(buffer); - if (controller._pendingPullIntos.length > 0) { - var firstPendingPullInto = controller._pendingPullIntos.peek(); - if (IsDetachedBuffer(firstPendingPullInto.buffer)) ; - firstPendingPullInto.buffer = TransferArrayBuffer(firstPendingPullInto.buffer); + if (!pattern) { + this.empty = true; + return; } - ReadableByteStreamControllerInvalidateBYOBRequest(controller); - if (ReadableStreamHasDefaultReader(stream)) { - if (ReadableStreamGetNumReadRequests(stream) === 0) { - ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + // step 1: figure out negation, etc. + this.parseNegate(); + // step 2: expand braces + this.globSet = [...new Set(this.braceExpand())]; + if (options.debug) { + this.debug = (...args) => console.error(...args); + } + this.debug(this.pattern, this.globSet); + // step 3: now we have a set, so turn each one into a series of + // path-portion matching patterns. + // These will be regexps, except in the case of "**", which is + // set to the GLOBSTAR object for globstar behavior, + // and will not contain any / characters + // + // First, we preprocess to make the glob pattern sets a bit simpler + // and deduped. There are some perf-killing patterns that can cause + // problems with a glob walk, but we can simplify them down a bit. + const rawGlobParts = this.globSet.map(s => this.slashSplit(s)); + this.globParts = this.preprocess(rawGlobParts); + this.debug(this.pattern, this.globParts); + // glob --> regexps + let set = this.globParts.map((s, _, __) => { + if (this.isWindows && this.windowsNoMagicRoot) { + // check if it's a drive or unc path. + const isUNC = s[0] === '' && + s[1] === '' && + (s[2] === '?' || !globMagic.test(s[2])) && + !globMagic.test(s[3]); + const isDrive = /^[a-z]:/i.test(s[0]); + if (isUNC) { + return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]; + } + else if (isDrive) { + return [s[0], ...s.slice(1).map(ss => this.parse(ss))]; + } } - else { - if (controller._pendingPullIntos.length > 0) { - ReadableByteStreamControllerShiftPendingPullInto(controller); + return s.map(ss => this.parse(ss)); + }); + this.debug(this.pattern, set); + // filter out everything that didn't compile properly. + this.set = set.filter(s => s.indexOf(false) === -1); + // do not treat the ? in UNC paths as magic + if (this.isWindows) { + for (let i = 0; i < this.set.length; i++) { + const p = this.set[i]; + if (p[0] === '' && + p[1] === '' && + this.globParts[i][2] === '?' && + typeof p[3] === 'string' && + /^[a-z]:$/i.test(p[3])) { + p[2] = '?'; } - var transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength); - ReadableStreamFulfillReadRequest(stream, transferredView, false); } } - else if (ReadableStreamHasBYOBReader(stream)) { - // TODO: Ideally in this branch detaching should happen only if the buffer is not consumed fully. - ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); - ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); + this.debug(this.pattern, this.set); + } + // various transforms to equivalent pattern sets that are + // faster to process in a filesystem walk. The goal is to + // eliminate what we can, and push all ** patterns as far + // to the right as possible, even if it increases the number + // of patterns that we have to process. + preprocess(globParts) { + // if we're not in globstar mode, then turn all ** into * + if (this.options.noglobstar) { + for (let i = 0; i < globParts.length; i++) { + for (let j = 0; j < globParts[i].length; j++) { + if (globParts[i][j] === '**') { + globParts[i][j] = '*'; + } + } + } } - else { - ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + const { optimizationLevel = 1 } = this.options; + if (optimizationLevel >= 2) { + // aggressive optimization for the purpose of fs walking + globParts = this.firstPhasePreProcess(globParts); + globParts = this.secondPhasePreProcess(globParts); } - ReadableByteStreamControllerCallPullIfNeeded(controller); - } - function ReadableByteStreamControllerError(controller, e) { - var stream = controller._controlledReadableByteStream; - if (stream._state !== 'readable') { - return; + else if (optimizationLevel >= 1) { + // just basic optimizations to remove some .. parts + globParts = this.levelOneOptimize(globParts); } - ReadableByteStreamControllerClearPendingPullIntos(controller); - ResetQueue(controller); - ReadableByteStreamControllerClearAlgorithms(controller); - ReadableStreamError(stream, e); + else { + globParts = this.adjascentGlobstarOptimize(globParts); + } + return globParts; + } + // just get rid of adjascent ** portions + adjascentGlobstarOptimize(globParts) { + return globParts.map(parts => { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let i = gs; + while (parts[i + 1] === '**') { + i++; + } + if (i !== gs) { + parts.splice(gs, i - gs); + } + } + return parts; + }); } - function ReadableByteStreamControllerGetBYOBRequest(controller) { - if (controller._byobRequest === null && controller._pendingPullIntos.length > 0) { - var firstDescriptor = controller._pendingPullIntos.peek(); - var view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled); - var byobRequest = Object.create(ReadableStreamBYOBRequest.prototype); - SetUpReadableStreamBYOBRequest(byobRequest, controller, view); - controller._byobRequest = byobRequest; - } - return controller._byobRequest; + // get rid of adjascent ** and resolve .. portions + levelOneOptimize(globParts) { + return globParts.map(parts => { + parts = parts.reduce((set, part) => { + const prev = set[set.length - 1]; + if (part === '**' && prev === '**') { + return set; + } + if (part === '..') { + if (prev && prev !== '..' && prev !== '.' && prev !== '**') { + set.pop(); + return set; + } + } + set.push(part); + return set; + }, []); + return parts.length === 0 ? [''] : parts; + }); } - function ReadableByteStreamControllerGetDesiredSize(controller) { - var state = controller._controlledReadableByteStream._state; - if (state === 'errored') { - return null; - } - if (state === 'closed') { - return 0; + levelTwoFileOptimize(parts) { + if (!Array.isArray(parts)) { + parts = this.slashSplit(parts); } - return controller._strategyHWM - controller._queueTotalSize; + let didSomething = false; + do { + didSomething = false; + //
// -> 
/
+            if (!this.preserveMultipleSlashes) {
+                for (let i = 1; i < parts.length - 1; i++) {
+                    const p = parts[i];
+                    // don't squeeze out UNC patterns
+                    if (i === 1 && p === '' && parts[0] === '')
+                        continue;
+                    if (p === '.' || p === '') {
+                        didSomething = true;
+                        parts.splice(i, 1);
+                        i--;
+                    }
+                }
+                if (parts[0] === '.' &&
+                    parts.length === 2 &&
+                    (parts[1] === '.' || parts[1] === '')) {
+                    didSomething = true;
+                    parts.pop();
+                }
+            }
+            // 
/

/../ ->

/
+            let dd = 0;
+            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                const p = parts[dd - 1];
+                if (p && p !== '.' && p !== '..' && p !== '**') {
+                    didSomething = true;
+                    parts.splice(dd - 1, 2);
+                    dd -= 2;
+                }
+            }
+        } while (didSomething);
+        return parts.length === 0 ? [''] : parts;
+    }
+    // First phase: single-pattern processing
+    // 
 is 1 or more portions
+    //  is 1 or more portions
+    // 

is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + //

// -> 
/
+    // 
/

/../ ->

/
+    // **/**/ -> **/
+    //
+    // **/*/ -> */**/ <== not valid because ** doesn't follow
+    // this WOULD be allowed if ** did follow symlinks, or * didn't
+    firstPhasePreProcess(globParts) {
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + //

/**/**/ -> 
/**/
+                        gss++;
+                    }
+                    // eg, if gs is 2 and gss is 4, that means we have 3 **
+                    // parts, and can remove 2 of them.
+                    if (gss > gs) {
+                        parts.splice(gs + 1, gss - gs);
+                    }
+                    let next = parts[gs + 1];
+                    const p = parts[gs + 2];
+                    const p2 = parts[gs + 3];
+                    if (next !== '..')
+                        continue;
+                    if (!p ||
+                        p === '.' ||
+                        p === '..' ||
+                        !p2 ||
+                        p2 === '.' ||
+                        p2 === '..') {
+                        continue;
+                    }
+                    didSomething = true;
+                    // edit parts in place, and push the new one
+                    parts.splice(gs, 1);
+                    const other = parts.slice(0);
+                    other[gs] = '**';
+                    globParts.push(other);
+                    gs--;
+                }
+                // 
// -> 
/
+                if (!this.preserveMultipleSlashes) {
+                    for (let i = 1; i < parts.length - 1; i++) {
+                        const p = parts[i];
+                        // don't squeeze out UNC patterns
+                        if (i === 1 && p === '' && parts[0] === '')
+                            continue;
+                        if (p === '.' || p === '') {
+                            didSomething = true;
+                            parts.splice(i, 1);
+                            i--;
+                        }
+                    }
+                    if (parts[0] === '.' &&
+                        parts.length === 2 &&
+                        (parts[1] === '.' || parts[1] === '')) {
+                        didSomething = true;
+                        parts.pop();
+                    }
+                }
+                // 
/

/../ ->

/
+                let dd = 0;
+                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                    const p = parts[dd - 1];
+                    if (p && p !== '.' && p !== '..' && p !== '**') {
+                        didSomething = true;
+                        const needDot = dd === 1 && parts[dd + 1] === '**';
+                        const splin = needDot ? ['.'] : [];
+                        parts.splice(dd - 1, 2, ...splin);
+                        if (parts.length === 0)
+                            parts.push('');
+                        dd -= 2;
+                    }
+                }
+            }
+        } while (didSomething);
+        return globParts;
     }
-    function ReadableByteStreamControllerRespond(controller, bytesWritten) {
-        var firstDescriptor = controller._pendingPullIntos.peek();
-        var state = controller._controlledReadableByteStream._state;
-        if (state === 'closed') {
-            if (bytesWritten !== 0) {
-                throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream');
+    // second phase: multi-pattern dedupes
+    // {
/*/,
/

/} ->

/*/
+    // {
/,
/} -> 
/
+    // {
/**/,
/} -> 
/**/
+    //
+    // {
/**/,
/**/

/} ->

/**/
+    // ^-- not valid because ** doens't follow symlinks
+    secondPhasePreProcess(globParts) {
+        for (let i = 0; i < globParts.length - 1; i++) {
+            for (let j = i + 1; j < globParts.length; j++) {
+                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+                if (!matched)
+                    continue;
+                globParts[i] = matched;
+                globParts[j] = [];
             }
         }
-        else {
-            if (bytesWritten === 0) {
-                throw new TypeError('bytesWritten must be greater than 0 when calling respond() on a readable stream');
+        return globParts.filter(gs => gs.length);
+    }
+    partsMatch(a, b, emptyGSMatch = false) {
+        let ai = 0;
+        let bi = 0;
+        let result = [];
+        let which = '';
+        while (ai < a.length && bi < b.length) {
+            if (a[ai] === b[bi]) {
+                result.push(which === 'b' ? b[bi] : a[ai]);
+                ai++;
+                bi++;
             }
-            if (firstDescriptor.bytesFilled + bytesWritten > firstDescriptor.byteLength) {
-                throw new RangeError('bytesWritten out of range');
+            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
+                result.push(a[ai]);
+                ai++;
+            }
+            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
+                result.push(b[bi]);
+                bi++;
+            }
+            else if (a[ai] === '*' &&
+                b[bi] &&
+                (this.options.dot || !b[bi].startsWith('.')) &&
+                b[bi] !== '**') {
+                if (which === 'b')
+                    return false;
+                which = 'a';
+                result.push(a[ai]);
+                ai++;
+                bi++;
+            }
+            else if (b[bi] === '*' &&
+                a[ai] &&
+                (this.options.dot || !a[ai].startsWith('.')) &&
+                a[ai] !== '**') {
+                if (which === 'a')
+                    return false;
+                which = 'b';
+                result.push(b[bi]);
+                ai++;
+                bi++;
+            }
+            else {
+                return false;
             }
         }
-        firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer);
-        ReadableByteStreamControllerRespondInternal(controller, bytesWritten);
+        // if we fall out of the loop, it means they two are identical
+        // as long as their lengths match
+        return a.length === b.length && result;
     }
-    function ReadableByteStreamControllerRespondWithNewView(controller, view) {
-        var firstDescriptor = controller._pendingPullIntos.peek();
-        var state = controller._controlledReadableByteStream._state;
-        if (state === 'closed') {
-            if (view.byteLength !== 0) {
-                throw new TypeError('The view\'s length must be 0 when calling respondWithNewView() on a closed stream');
+    parseNegate() {
+        if (this.nonegate)
+            return;
+        const pattern = this.pattern;
+        let negate = false;
+        let negateOffset = 0;
+        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
+            negate = !negate;
+            negateOffset++;
+        }
+        if (negateOffset)
+            this.pattern = pattern.slice(negateOffset);
+        this.negate = negate;
+    }
+    // set partial to true to test if, for example,
+    // "/a/b" matches the start of "/*/b/*/d"
+    // Partial means, if you run out of file before you run
+    // out of pattern, then that's fine, as long as all
+    // the parts match.
+    matchOne(file, pattern, partial = false) {
+        const options = this.options;
+        // UNC paths like //?/X:/... can match X:/... and vice versa
+        // Drive letters in absolute drive or unc paths are always compared
+        // case-insensitively.
+        if (this.isWindows) {
+            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
+            const fileUNC = !fileDrive &&
+                file[0] === '' &&
+                file[1] === '' &&
+                file[2] === '?' &&
+                /^[a-z]:$/i.test(file[3]);
+            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
+            const patternUNC = !patternDrive &&
+                pattern[0] === '' &&
+                pattern[1] === '' &&
+                pattern[2] === '?' &&
+                typeof pattern[3] === 'string' &&
+                /^[a-z]:$/i.test(pattern[3]);
+            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
+            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
+            if (typeof fdi === 'number' && typeof pdi === 'number') {
+                const [fd, pd] = [file[fdi], pattern[pdi]];
+                if (fd.toLowerCase() === pd.toLowerCase()) {
+                    pattern[pdi] = fd;
+                    if (pdi > fdi) {
+                        pattern = pattern.slice(pdi);
+                    }
+                    else if (fdi > pdi) {
+                        file = file.slice(fdi);
+                    }
+                }
             }
         }
-        else {
-            if (view.byteLength === 0) {
-                throw new TypeError('The view\'s length must be greater than 0 when calling respondWithNewView() on a readable stream');
+        // resolve and reduce . and .. portions in the file as well.
+        // dont' need to do the second phase, because it's only one string[]
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            file = this.levelTwoFileOptimize(file);
+        }
+        this.debug('matchOne', this, { file, pattern });
+        this.debug('matchOne', file.length, pattern.length);
+        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+            this.debug('matchOne loop');
+            var p = pattern[pi];
+            var f = file[fi];
+            this.debug(pattern, p, f);
+            // should be impossible.
+            // some invalid regexp stuff in the set.
+            /* c8 ignore start */
+            if (p === false) {
+                return false;
             }
+            /* c8 ignore stop */
+            if (p === GLOBSTAR) {
+                this.debug('GLOBSTAR', [pattern, p, f]);
+                // "**"
+                // a/**/b/**/c would match the following:
+                // a/b/x/y/z/c
+                // a/x/y/z/b/c
+                // a/b/x/b/x/c
+                // a/b/c
+                // To do this, take the rest of the pattern after
+                // the **, and see if it would match the file remainder.
+                // If so, return success.
+                // If not, the ** "swallows" a segment, and try again.
+                // This is recursively awful.
+                //
+                // a/**/b/**/c matching a/b/x/y/z/c
+                // - a matches a
+                // - doublestar
+                //   - matchOne(b/x/y/z/c, b/**/c)
+                //     - b matches b
+                //     - doublestar
+                //       - matchOne(x/y/z/c, c) -> no
+                //       - matchOne(y/z/c, c) -> no
+                //       - matchOne(z/c, c) -> no
+                //       - matchOne(c, c) yes, hit
+                var fr = fi;
+                var pr = pi + 1;
+                if (pr === pl) {
+                    this.debug('** at the end');
+                    // a ** at the end will just swallow the rest.
+                    // We have found a match.
+                    // however, it will not swallow /.x, unless
+                    // options.dot is set.
+                    // . and .. are *never* matched by **, for explosively
+                    // exponential reasons.
+                    for (; fi < fl; fi++) {
+                        if (file[fi] === '.' ||
+                            file[fi] === '..' ||
+                            (!options.dot && file[fi].charAt(0) === '.'))
+                            return false;
+                    }
+                    return true;
+                }
+                // ok, let's see if we can swallow whatever we can.
+                while (fr < fl) {
+                    var swallowee = file[fr];
+                    this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
+                    // XXX remove this slice.  Just pass the start index.
+                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+                        this.debug('globstar found match!', fr, fl, swallowee);
+                        // found a match.
+                        return true;
+                    }
+                    else {
+                        // can't swallow "." or ".." ever.
+                        // can only swallow ".foo" when explicitly asked.
+                        if (swallowee === '.' ||
+                            swallowee === '..' ||
+                            (!options.dot && swallowee.charAt(0) === '.')) {
+                            this.debug('dot detected!', file, fr, pattern, pr);
+                            break;
+                        }
+                        // ** swallows a segment, and continue.
+                        this.debug('globstar swallow a segment, and continue');
+                        fr++;
+                    }
+                }
+                // no match was found.
+                // However, in partial mode, we can't say this is necessarily over.
+                /* c8 ignore start */
+                if (partial) {
+                    // ran out of file
+                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
+                    if (fr === fl) {
+                        return true;
+                    }
+                }
+                /* c8 ignore stop */
+                return false;
+            }
+            // something other than **
+            // non-magic patterns just have to match exactly
+            // patterns with magic have been turned into regexps.
+            let hit;
+            if (typeof p === 'string') {
+                hit = f === p;
+                this.debug('string match', p, f, hit);
+            }
+            else {
+                hit = p.test(f);
+                this.debug('pattern match', p, f, hit);
+            }
+            if (!hit)
+                return false;
         }
-        if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) {
-            throw new RangeError('The region specified by view does not match byobRequest');
-        }
-        if (firstDescriptor.bufferByteLength !== view.buffer.byteLength) {
-            throw new RangeError('The buffer of view has different capacity than byobRequest');
-        }
-        if (firstDescriptor.bytesFilled + view.byteLength > firstDescriptor.byteLength) {
-            throw new RangeError('The region specified by view is larger than byobRequest');
-        }
-        var viewByteLength = view.byteLength;
-        firstDescriptor.buffer = TransferArrayBuffer(view.buffer);
-        ReadableByteStreamControllerRespondInternal(controller, viewByteLength);
-    }
-    function SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize) {
-        controller._controlledReadableByteStream = stream;
-        controller._pullAgain = false;
-        controller._pulling = false;
-        controller._byobRequest = null;
-        // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.
-        controller._queue = controller._queueTotalSize = undefined;
-        ResetQueue(controller);
-        controller._closeRequested = false;
-        controller._started = false;
-        controller._strategyHWM = highWaterMark;
-        controller._pullAlgorithm = pullAlgorithm;
-        controller._cancelAlgorithm = cancelAlgorithm;
-        controller._autoAllocateChunkSize = autoAllocateChunkSize;
-        controller._pendingPullIntos = new SimpleQueue();
-        stream._readableStreamController = controller;
-        var startResult = startAlgorithm();
-        uponPromise(promiseResolvedWith(startResult), function () {
-            controller._started = true;
-            ReadableByteStreamControllerCallPullIfNeeded(controller);
-        }, function (r) {
-            ReadableByteStreamControllerError(controller, r);
-        });
-    }
-    function SetUpReadableByteStreamControllerFromUnderlyingSource(stream, underlyingByteSource, highWaterMark) {
-        var controller = Object.create(ReadableByteStreamController.prototype);
-        var startAlgorithm = function () { return undefined; };
-        var pullAlgorithm = function () { return promiseResolvedWith(undefined); };
-        var cancelAlgorithm = function () { return promiseResolvedWith(undefined); };
-        if (underlyingByteSource.start !== undefined) {
-            startAlgorithm = function () { return underlyingByteSource.start(controller); };
-        }
-        if (underlyingByteSource.pull !== undefined) {
-            pullAlgorithm = function () { return underlyingByteSource.pull(controller); };
+        // Note: ending in / means that we'll get a final ""
+        // at the end of the pattern.  This can only match a
+        // corresponding "" at the end of the file.
+        // If the file ends in /, then it can only match a
+        // a pattern that ends in /, unless the pattern just
+        // doesn't have any more for it. But, a/b/ should *not*
+        // match "a/b/*", even though "" matches against the
+        // [^/]*? pattern, except in partial mode, where it might
+        // simply not be reached yet.
+        // However, a/b/ should still satisfy a/*
+        // now either we fell off the end of the pattern, or we're done.
+        if (fi === fl && pi === pl) {
+            // ran out of pattern and filename at the same time.
+            // an exact hit!
+            return true;
         }
-        if (underlyingByteSource.cancel !== undefined) {
-            cancelAlgorithm = function (reason) { return underlyingByteSource.cancel(reason); };
+        else if (fi === fl) {
+            // ran out of file, but still had pattern left.
+            // this is ok if we're doing the match as part of
+            // a glob fs traversal.
+            return partial;
         }
-        var autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize;
-        if (autoAllocateChunkSize === 0) {
-            throw new TypeError('autoAllocateChunkSize must be greater than 0');
+        else if (pi === pl) {
+            // ran out of pattern, still have file left.
+            // this is only acceptable if we're on the very last
+            // empty segment of a file with a trailing slash.
+            // a/* should match a/b/
+            return fi === fl - 1 && file[fi] === '';
+            /* c8 ignore start */
         }
-        SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize);
-    }
-    function SetUpReadableStreamBYOBRequest(request, controller, view) {
-        request._associatedReadableByteStreamController = controller;
-        request._view = view;
-    }
-    // Helper functions for the ReadableStreamBYOBRequest.
-    function byobRequestBrandCheckException(name) {
-        return new TypeError("ReadableStreamBYOBRequest.prototype." + name + " can only be used on a ReadableStreamBYOBRequest");
-    }
-    // Helper functions for the ReadableByteStreamController.
-    function byteStreamControllerBrandCheckException(name) {
-        return new TypeError("ReadableByteStreamController.prototype." + name + " can only be used on a ReadableByteStreamController");
+        else {
+            // should be unreachable.
+            throw new Error('wtf?');
+        }
+        /* c8 ignore stop */
     }
-
-    // Abstract operations for the ReadableStream.
-    function AcquireReadableStreamBYOBReader(stream) {
-        return new ReadableStreamBYOBReader(stream);
+    braceExpand() {
+        return braceExpand(this.pattern, this.options);
     }
-    // ReadableStream API exposed for controllers.
-    function ReadableStreamAddReadIntoRequest(stream, readIntoRequest) {
-        stream._reader._readIntoRequests.push(readIntoRequest);
+    parse(pattern) {
+        assertValidPattern(pattern);
+        const options = this.options;
+        // shortcuts
+        if (pattern === '**')
+            return GLOBSTAR;
+        if (pattern === '')
+            return '';
+        // far and away, the most common glob pattern parts are
+        // *, *.*, and *.  Add a fast check method for those.
+        let m;
+        let fastTest = null;
+        if ((m = pattern.match(starRE))) {
+            fastTest = options.dot ? starTestDot : starTest;
+        }
+        else if ((m = pattern.match(starDotExtRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? starDotExtTestNocaseDot
+                    : starDotExtTestNocase
+                : options.dot
+                    ? starDotExtTestDot
+                    : starDotExtTest)(m[1]);
+        }
+        else if ((m = pattern.match(qmarksRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? qmarksTestNocaseDot
+                    : qmarksTestNocase
+                : options.dot
+                    ? qmarksTestDot
+                    : qmarksTest)(m);
+        }
+        else if ((m = pattern.match(starDotStarRE))) {
+            fastTest = options.dot ? starDotStarTestDot : starDotStarTest;
+        }
+        else if ((m = pattern.match(dotStarRE))) {
+            fastTest = dotStarTest;
+        }
+        const re = AST.fromGlob(pattern, this.options).toMMPattern();
+        return fastTest ? Object.assign(re, { test: fastTest }) : re;
+    }
+    makeRe() {
+        if (this.regexp || this.regexp === false)
+            return this.regexp;
+        // at this point, this.set is a 2d array of partial
+        // pattern strings, or "**".
+        //
+        // It's better to use .match().  This function shouldn't
+        // be used, really, but it's pretty convenient sometimes,
+        // when you just want to work with a regex.
+        const set = this.set;
+        if (!set.length) {
+            this.regexp = false;
+            return this.regexp;
+        }
+        const options = this.options;
+        const twoStar = options.noglobstar
+            ? mjs_star
+            : options.dot
+                ? twoStarDot
+                : twoStarNoDot;
+        const flags = new Set(options.nocase ? ['i'] : []);
+        // regexpify non-globstar patterns
+        // if ** is only item, then we just do one twoStar
+        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
+        // if ** is last, append (\/twoStar|) to previous
+        // if ** is in the middle, append (\/|\/twoStar\/) to previous
+        // then filter out GLOBSTAR symbols
+        let re = set
+            .map(pattern => {
+            const pp = pattern.map(p => {
+                if (p instanceof RegExp) {
+                    for (const f of p.flags.split(''))
+                        flags.add(f);
+                }
+                return typeof p === 'string'
+                    ? mjs_regExpEscape(p)
+                    : p === GLOBSTAR
+                        ? GLOBSTAR
+                        : p._src;
+            });
+            pp.forEach((p, i) => {
+                const next = pp[i + 1];
+                const prev = pp[i - 1];
+                if (p !== GLOBSTAR || prev === GLOBSTAR) {
+                    return;
+                }
+                if (prev === undefined) {
+                    if (next !== undefined && next !== GLOBSTAR) {
+                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
+                    }
+                    else {
+                        pp[i] = twoStar;
+                    }
+                }
+                else if (next === undefined) {
+                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
+                }
+                else if (next !== GLOBSTAR) {
+                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
+                    pp[i + 1] = GLOBSTAR;
+                }
+            });
+            return pp.filter(p => p !== GLOBSTAR).join('/');
+        })
+            .join('|');
+        // need to wrap in parens if we had more than one thing with |,
+        // otherwise only the first will be anchored to ^ and the last to $
+        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
+        // must match entire pattern
+        // ending in a * or ** will make it less strict.
+        re = '^' + open + re + close + '$';
+        // can match anything, as long as it's not this.
+        if (this.negate)
+            re = '^(?!' + re + ').+$';
+        try {
+            this.regexp = new RegExp(re, [...flags].join(''));
+            /* c8 ignore start */
+        }
+        catch (ex) {
+            // should be impossible
+            this.regexp = false;
+        }
+        /* c8 ignore stop */
+        return this.regexp;
     }
-    function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) {
-        var reader = stream._reader;
-        var readIntoRequest = reader._readIntoRequests.shift();
-        if (done) {
-            readIntoRequest._closeSteps(chunk);
+    slashSplit(p) {
+        // if p starts with // on windows, we preserve that
+        // so that UNC paths aren't broken.  Otherwise, any number of
+        // / characters are coalesced into one, unless
+        // preserveMultipleSlashes is set to true.
+        if (this.preserveMultipleSlashes) {
+            return p.split('/');
+        }
+        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+            // add an extra '' for the one we lose
+            return ['', ...p.split(/\/+/)];
         }
         else {
-            readIntoRequest._chunkSteps(chunk);
+            return p.split(/\/+/);
         }
     }
-    function ReadableStreamGetNumReadIntoRequests(stream) {
-        return stream._reader._readIntoRequests.length;
-    }
-    function ReadableStreamHasBYOBReader(stream) {
-        var reader = stream._reader;
-        if (reader === undefined) {
+    match(f, partial = this.partial) {
+        this.debug('match', f, this.pattern);
+        // short-circuit in the case of busted things.
+        // comments, etc.
+        if (this.comment) {
             return false;
         }
-        if (!IsReadableStreamBYOBReader(reader)) {
-            return false;
+        if (this.empty) {
+            return f === '';
         }
-        return true;
-    }
-    /**
-     * A BYOB reader vended by a {@link ReadableStream}.
-     *
-     * @public
-     */
-    var ReadableStreamBYOBReader = /** @class */ (function () {
-        function ReadableStreamBYOBReader(stream) {
-            assertRequiredArgument(stream, 1, 'ReadableStreamBYOBReader');
-            assertReadableStream(stream, 'First parameter');
-            if (IsReadableStreamLocked(stream)) {
-                throw new TypeError('This stream has already been locked for exclusive reading by another reader');
-            }
-            if (!IsReadableByteStreamController(stream._readableStreamController)) {
-                throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte ' +
-                    'source');
-            }
-            ReadableStreamReaderGenericInitialize(this, stream);
-            this._readIntoRequests = new SimpleQueue();
+        if (f === '/' && partial) {
+            return true;
         }
-        Object.defineProperty(ReadableStreamBYOBReader.prototype, "closed", {
-            /**
-             * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or
-             * the reader's lock is released before the stream finishes closing.
-             */
-            get: function () {
-                if (!IsReadableStreamBYOBReader(this)) {
-                    return promiseRejectedWith(byobReaderBrandCheckException('closed'));
-                }
-                return this._closedPromise;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        /**
-         * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}.
-         */
-        ReadableStreamBYOBReader.prototype.cancel = function (reason) {
-            if (reason === void 0) { reason = undefined; }
-            if (!IsReadableStreamBYOBReader(this)) {
-                return promiseRejectedWith(byobReaderBrandCheckException('cancel'));
-            }
-            if (this._ownerReadableStream === undefined) {
-                return promiseRejectedWith(readerLockException('cancel'));
-            }
-            return ReadableStreamReaderGenericCancel(this, reason);
-        };
-        /**
-         * Attempts to reads bytes into view, and returns a promise resolved with the result.
-         *
-         * If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source.
-         */
-        ReadableStreamBYOBReader.prototype.read = function (view) {
-            if (!IsReadableStreamBYOBReader(this)) {
-                return promiseRejectedWith(byobReaderBrandCheckException('read'));
-            }
-            if (!ArrayBuffer.isView(view)) {
-                return promiseRejectedWith(new TypeError('view must be an array buffer view'));
-            }
-            if (view.byteLength === 0) {
-                return promiseRejectedWith(new TypeError('view must have non-zero byteLength'));
-            }
-            if (view.buffer.byteLength === 0) {
-                return promiseRejectedWith(new TypeError("view's buffer must have non-zero byteLength"));
-            }
-            if (IsDetachedBuffer(view.buffer)) ;
-            if (this._ownerReadableStream === undefined) {
-                return promiseRejectedWith(readerLockException('read from'));
-            }
-            var resolvePromise;
-            var rejectPromise;
-            var promise = newPromise(function (resolve, reject) {
-                resolvePromise = resolve;
-                rejectPromise = reject;
-            });
-            var readIntoRequest = {
-                _chunkSteps: function (chunk) { return resolvePromise({ value: chunk, done: false }); },
-                _closeSteps: function (chunk) { return resolvePromise({ value: chunk, done: true }); },
-                _errorSteps: function (e) { return rejectPromise(e); }
-            };
-            ReadableStreamBYOBReaderRead(this, view, readIntoRequest);
-            return promise;
-        };
-        /**
-         * Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active.
-         * If the associated stream is errored when the lock is released, the reader will appear errored in the same way
-         * from now on; otherwise, the reader will appear closed.
-         *
-         * A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by
-         * the reader's {@link ReadableStreamBYOBReader.read | read()} method has not yet been settled. Attempting to
-         * do so will throw a `TypeError` and leave the reader locked to the stream.
-         */
-        ReadableStreamBYOBReader.prototype.releaseLock = function () {
-            if (!IsReadableStreamBYOBReader(this)) {
-                throw byobReaderBrandCheckException('releaseLock');
+        const options = this.options;
+        // windows: need to use /, not \
+        if (this.isWindows) {
+            f = f.split('\\').join('/');
+        }
+        // treat the test path as a set of pathparts.
+        const ff = this.slashSplit(f);
+        this.debug(this.pattern, 'split', ff);
+        // just ONE of the pattern sets in this.set needs to match
+        // in order for it to be valid.  If negating, then just one
+        // match means that we have failed.
+        // Either way, return on the first hit.
+        const set = this.set;
+        this.debug(this.pattern, 'set', set);
+        // Find the basename of the path by looking for the last non-empty segment
+        let filename = ff[ff.length - 1];
+        if (!filename) {
+            for (let i = ff.length - 2; !filename && i >= 0; i--) {
+                filename = ff[i];
             }
-            if (this._ownerReadableStream === undefined) {
-                return;
+        }
+        for (let i = 0; i < set.length; i++) {
+            const pattern = set[i];
+            let file = ff;
+            if (options.matchBase && pattern.length === 1) {
+                file = [filename];
             }
-            if (this._readIntoRequests.length > 0) {
-                throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled');
+            const hit = this.matchOne(file, pattern, partial);
+            if (hit) {
+                if (options.flipNegate) {
+                    return true;
+                }
+                return !this.negate;
             }
-            ReadableStreamReaderGenericRelease(this);
-        };
-        return ReadableStreamBYOBReader;
-    }());
-    Object.defineProperties(ReadableStreamBYOBReader.prototype, {
-        cancel: { enumerable: true },
-        read: { enumerable: true },
-        releaseLock: { enumerable: true },
-        closed: { enumerable: true }
-    });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(ReadableStreamBYOBReader.prototype, SymbolPolyfill.toStringTag, {
-            value: 'ReadableStreamBYOBReader',
-            configurable: true
-        });
-    }
-    // Abstract operations for the readers.
-    function IsReadableStreamBYOBReader(x) {
-        if (!typeIsObject(x)) {
-            return false;
         }
-        if (!Object.prototype.hasOwnProperty.call(x, '_readIntoRequests')) {
+        // didn't get any hits.  this is success if it's a negative
+        // pattern, failure otherwise.
+        if (options.flipNegate) {
             return false;
         }
-        return x instanceof ReadableStreamBYOBReader;
+        return this.negate;
     }
-    function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest) {
-        var stream = reader._ownerReadableStream;
-        stream._disturbed = true;
-        if (stream._state === 'errored') {
-            readIntoRequest._errorSteps(stream._storedError);
-        }
-        else {
-            ReadableByteStreamControllerPullInto(stream._readableStreamController, view, readIntoRequest);
+    static defaults(def) {
+        return mjs_minimatch.defaults(def).Minimatch;
+    }
+}
+/* c8 ignore start */
+
+
+
+/* c8 ignore stop */
+mjs_minimatch.AST = AST;
+mjs_minimatch.Minimatch = Minimatch;
+mjs_minimatch.escape = escape_escape;
+mjs_minimatch.unescape = unescape_unescape;
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/node_modules/it-glob/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * Like [`glob`](https://npmjs.com/package/glob) but async iterable.
+ *
+ * @example
+ *
+ * ```javascript
+ * import glob from 'it-glob'
+ *
+ * const options = {
+ *   cwd // defaults to process.cwd
+ *   absolute // return absolute paths, defaults to false
+ *   nodir // only yield file paths, skip directories
+ *
+ *   // all other options are passed to minimatch
+ * }
+ *
+ * for await (const path of glob('/path/to/file', '**\/*', options)) {
+ *  console.info(path)
+ * }
+ * ```
+ *
+ * See the [minimatch docs](https://www.npmjs.com/package/minimatch#options) for the full list of options.
+ */
+
+
+
+/**
+ * Async iterable filename pattern matcher
+ */
+async function* src_glob(dir, pattern, options = {}) {
+    const absoluteDir = path.resolve(dir);
+    const relativeDir = path.relative(options.cwd ?? process.cwd(), dir);
+    const stats = await fs.stat(absoluteDir);
+    if (stats.isDirectory()) {
+        for await (const entry of _glob(absoluteDir, '', pattern, options)) {
+            yield entry;
         }
+        return;
     }
-    // Helper functions for the ReadableStreamBYOBReader.
-    function byobReaderBrandCheckException(name) {
-        return new TypeError("ReadableStreamBYOBReader.prototype." + name + " can only be used on a ReadableStreamBYOBReader");
+    if (minimatch(relativeDir, pattern, options)) {
+        yield options.absolute === true ? absoluteDir : relativeDir;
     }
-
-    function ExtractHighWaterMark(strategy, defaultHWM) {
-        var highWaterMark = strategy.highWaterMark;
-        if (highWaterMark === undefined) {
-            return defaultHWM;
+}
+async function* _glob(base, dir, pattern, options) {
+    for await (const entry of await fs.opendir(path.join(base, dir))) {
+        const relativeEntryPath = path.join(dir, entry.name);
+        const absoluteEntryPath = path.join(base, dir, entry.name);
+        let match = minimatch(relativeEntryPath, pattern, options);
+        const isDirectory = entry.isDirectory();
+        if (isDirectory && options.nodir === true) {
+            match = false;
         }
-        if (NumberIsNaN(highWaterMark) || highWaterMark < 0) {
-            throw new RangeError('Invalid highWaterMark');
+        if (match) {
+            yield options.absolute === true ? absoluteEntryPath : relativeEntryPath;
         }
-        return highWaterMark;
-    }
-    function ExtractSizeAlgorithm(strategy) {
-        var size = strategy.size;
-        if (!size) {
-            return function () { return 1; };
+        if (isDirectory) {
+            yield* _glob(base, relativeEntryPath, pattern, options);
         }
-        return size;
     }
+}
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/utils/glob-source.js
 
-    function convertQueuingStrategy(init, context) {
-        assertDictionary(init, context);
-        var highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark;
-        var size = init === null || init === void 0 ? void 0 : init.size;
-        return {
-            highWaterMark: highWaterMark === undefined ? undefined : convertUnrestrictedDouble(highWaterMark),
-            size: size === undefined ? undefined : convertQueuingStrategySize(size, context + " has member 'size' that")
+
+
+
+
+
+/**
+ * Create an async iterator that yields paths that match requested glob pattern
+ */
+async function* glob_source_globSource(cwd, pattern, options = {}) {
+    if (typeof pattern !== 'string') {
+        throw new InvalidParametersError('Pattern must be a string');
+    }
+    if (!Path.isAbsolute(cwd)) {
+        cwd = Path.resolve(process.cwd(), cwd);
+    }
+    const globOptions = Object.assign({}, {
+        nodir: false,
+        realpath: false,
+        absolute: true,
+        dot: Boolean(options.hidden),
+        follow: options.followSymlinks != null ? options.followSymlinks : true
+    });
+    for await (const p of glob(cwd, pattern, globOptions)) {
+        const stat = await fsp.stat(p);
+        let mode = options.mode;
+        if (options.preserveMode === true) {
+            mode = stat.mode;
+        }
+        let mtime = options.mtime;
+        if (options.preserveMtime === true) {
+            mtime = stat.mtime;
+        }
+        yield {
+            path: toPosix(p.replace(cwd, '')),
+            content: stat.isFile() ? fs.createReadStream(p) : undefined,
+            mode,
+            mtime: toMtime(mtime)
         };
     }
-    function convertQueuingStrategySize(fn, context) {
-        assertFunction(fn, context);
-        return function (chunk) { return convertUnrestrictedDouble(fn(chunk)); };
+}
+const toPosix = (path) => path.replace(/\\/g, '/');
+//# sourceMappingURL=glob-source.js.map
+;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/utils/url-source.js
+
+function urlSource(url, options) {
+    return {
+        path: decodeURIComponent(new URL(url).pathname.split('/').pop() ?? ''),
+        content: readURLContent(url, options)
+    };
+}
+async function* readURLContent(url, options) {
+    const response = await globalThis.fetch(url, options);
+    if (response.body == null) {
+        throw new UnknownError('HTTP response did not have a body');
+    }
+    const reader = response.body.getReader();
+    try {
+        while (true) {
+            const { done, value } = await reader.read();
+            if (done) {
+                return;
+            }
+            if (value != null) {
+                yield value;
+            }
+        }
+    }
+    finally {
+        reader.releaseLock();
     }
+}
+//# sourceMappingURL=url-source.js.map
+;// CONCATENATED MODULE: ./node_modules/@helia/unixfs/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * `@helia/unixfs` is an implementation of a {@link https://github.com/ipfs/specs/blob/main/UNIXFS.md UnixFS filesystem} compatible with {@link https://github.com/ipfs/helia Helia}.
+ *
+ * See the {@link UnixFS UnixFS interface} for all available operations.
+ *
+ * @example
+ *
+ * ```typescript
+ * import { createHelia } from 'helia'
+ * import { unixfs } from '@helia/unixfs'
+ *
+ * const helia = createHelia({
+ *   // ... helia config
+ * })
+ * const fs = unixfs(helia)
+ *
+ * // create an empty dir and a file, then add the file to the dir
+ * const emptyDirCid = await fs.addDirectory()
+ * const fileCid = await fs.addBytes(Uint8Array.from([0, 1, 2, 3]))
+ * const updateDirCid = await fs.cp(fileCid, emptyDirCid, 'foo.txt')
+ *
+ * // or doing the same thing as a stream
+ * for await (const entry of fs.addAll([{
+ *   path: 'foo.txt',
+ *   content: Uint8Array.from([0, 1, 2, 3])
+ * }])) {
+ *   console.info(entry)
+ * }
+ * ```
+ *
+ * @example
+ *
+ * Recursively adding a directory (Node.js-compatibly environments only):
+ *
+ * ```typescript
+ * import { globSource } from '@helia/unixfs'
+ *
+ * for await (const entry of fs.addAll(globSource('path/to/containing/dir', 'glob-pattern'))) {
+ *   console.info(entry)
+ * }
+ * ```
+ */
 
-    function convertUnderlyingSink(original, context) {
-        assertDictionary(original, context);
-        var abort = original === null || original === void 0 ? void 0 : original.abort;
-        var close = original === null || original === void 0 ? void 0 : original.close;
-        var start = original === null || original === void 0 ? void 0 : original.start;
-        var type = original === null || original === void 0 ? void 0 : original.type;
-        var write = original === null || original === void 0 ? void 0 : original.write;
-        return {
-            abort: abort === undefined ?
-                undefined :
-                convertUnderlyingSinkAbortCallback(abort, original, context + " has member 'abort' that"),
-            close: close === undefined ?
-                undefined :
-                convertUnderlyingSinkCloseCallback(close, original, context + " has member 'close' that"),
-            start: start === undefined ?
-                undefined :
-                convertUnderlyingSinkStartCallback(start, original, context + " has member 'start' that"),
-            write: write === undefined ?
-                undefined :
-                convertUnderlyingSinkWriteCallback(write, original, context + " has member 'write' that"),
-            type: type
-        };
+
+
+
+
+
+
+
+
+class DefaultUnixFS {
+    components;
+    constructor(components) {
+        this.components = components;
     }
-    function convertUnderlyingSinkAbortCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function (reason) { return promiseCall(fn, original, [reason]); };
+    async *addAll(source, options = {}) {
+        yield* addAll(source, this.components.blockstore, options);
     }
-    function convertUnderlyingSinkCloseCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function () { return promiseCall(fn, original, []); };
+    async addBytes(bytes, options = {}) {
+        return addBytes(bytes, this.components.blockstore, options);
     }
-    function convertUnderlyingSinkStartCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function (controller) { return reflectCall(fn, original, [controller]); };
+    async addByteStream(bytes, options = {}) {
+        return addByteStream(bytes, this.components.blockstore, options);
     }
-    function convertUnderlyingSinkWriteCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function (chunk, controller) { return promiseCall(fn, original, [chunk, controller]); };
+    async addFile(file, options = {}) {
+        return addFile(file, this.components.blockstore, options);
     }
-
-    function assertWritableStream(x, context) {
-        if (!IsWritableStream(x)) {
-            throw new TypeError(context + " is not a WritableStream.");
-        }
+    async addDirectory(dir = {}, options = {}) {
+        return addDirectory(dir, this.components.blockstore, options);
+    }
+    async *cat(cid, options = {}) {
+        yield* cat(cid, this.components.blockstore, options);
+    }
+    async chmod(cid, mode, options = {}) {
+        return chmod(cid, mode, this.components.blockstore, options);
+    }
+    async cp(source, target, name, options = {}) {
+        return cp(source, target, name, this.components.blockstore, options);
+    }
+    async *ls(cid, options = {}) {
+        yield* ls(cid, this.components.blockstore, options);
+    }
+    async mkdir(cid, dirname, options = {}) {
+        return mkdir(cid, dirname, this.components.blockstore, options);
+    }
+    async rm(cid, path, options = {}) {
+        return rm(cid, path, this.components.blockstore, options);
     }
+    async stat(cid, options = {}) {
+        return stat(cid, this.components.blockstore, options);
+    }
+    async touch(cid, options = {}) {
+        return touch(cid, this.components.blockstore, options);
+    }
+}
+/**
+ * Create a {@link UnixFS} instance for use with {@link https://github.com/ipfs/helia Helia}
+ */
+function unixfs(helia) {
+    return new DefaultUnixFS(helia);
+}
 
-    function isAbortSignal(value) {
-        if (typeof value !== 'object' || value === null) {
-            return false;
-        }
-        try {
-            return typeof value.aborted === 'boolean';
-        }
-        catch (_a) {
-            // AbortSignal.prototype.aborted throws if its brand check fails
+
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: external "node:fs/promises"
+const external_node_fs_promises_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:fs/promises");
+// EXTERNAL MODULE: external "node:util"
+var external_node_util_ = __nccwpck_require__(47261);
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/dist/src/errors.js
+
+function openFailedError(err) {
+    err = err ?? new Error('Open failed');
+    return err_code(err, 'ERR_OPEN_FAILED');
+}
+function closeFailedError(err) {
+    err = err ?? new Error('Close failed');
+    return err_code(err, 'ERR_CLOSE_FAILED');
+}
+function putFailedError(err) {
+    err = err ?? new Error('Put failed');
+    return err_code(err, 'ERR_PUT_FAILED');
+}
+function getFailedError(err) {
+    err = err ?? new Error('Get failed');
+    return err_code(err, 'ERR_GET_FAILED');
+}
+function deleteFailedError(err) {
+    err = err ?? new Error('Delete failed');
+    return err_code(err, 'ERR_DELETE_FAILED');
+}
+function hasFailedError(err) {
+    err = err ?? new Error('Has failed');
+    return err_code(err, 'ERR_HAS_FAILED');
+}
+function notFoundError(err) {
+    err = err ?? new Error('Not Found');
+    return err_code(err, 'ERR_NOT_FOUND');
+}
+function abortedError(err) {
+    err = err ?? new Error('Aborted');
+    return err_code(err, 'ERR_ABORTED');
+}
+//# sourceMappingURL=errors.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/bytes.js
+const blockstore_core_node_modules_multiformats_dist_src_bytes_empty = new Uint8Array(0);
+function blockstore_core_node_modules_multiformats_dist_src_bytes_toHex(d) {
+    return d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '');
+}
+function blockstore_core_node_modules_multiformats_dist_src_bytes_fromHex(hex) {
+    const hexes = hex.match(/../g);
+    return hexes != null ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : blockstore_core_node_modules_multiformats_dist_src_bytes_empty;
+}
+function blockstore_core_node_modules_multiformats_dist_src_bytes_equals(aa, bb) {
+    if (aa === bb)
+        return true;
+    if (aa.byteLength !== bb.byteLength) {
+        return false;
+    }
+    for (let ii = 0; ii < aa.byteLength; ii++) {
+        if (aa[ii] !== bb[ii]) {
             return false;
         }
     }
-    var supportsAbortController = typeof AbortController === 'function';
-    /**
-     * Construct a new AbortController, if supported by the platform.
-     *
-     * @internal
-     */
-    function createAbortController() {
-        if (supportsAbortController) {
-            return new AbortController();
-        }
-        return undefined;
+    return true;
+}
+function blockstore_core_node_modules_multiformats_dist_src_bytes_coerce(o) {
+    if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array')
+        return o;
+    if (o instanceof ArrayBuffer)
+        return new Uint8Array(o);
+    if (ArrayBuffer.isView(o)) {
+        return new Uint8Array(o.buffer, o.byteOffset, o.byteLength);
     }
-
+    throw new Error('Unknown type, must be binary type');
+}
+function blockstore_core_node_modules_multiformats_dist_src_bytes_isBinary(o) {
+    return o instanceof ArrayBuffer || ArrayBuffer.isView(o);
+}
+function blockstore_core_node_modules_multiformats_dist_src_bytes_fromString(str) {
+    return new TextEncoder().encode(str);
+}
+function blockstore_core_node_modules_multiformats_dist_src_bytes_toString(b) {
+    return new TextDecoder().decode(b);
+}
+//# sourceMappingURL=bytes.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/vendor/base-x.js
+/* eslint-disable */
+// base-x encoding / decoding
+// Copyright (c) 2018 base-x contributors
+// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
+// Distributed under the MIT software license, see the accompanying
+// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
+/**
+ * @param {string} ALPHABET
+ * @param {any} name
+ */
+function node_modules_multiformats_dist_src_vendor_base_x_base(ALPHABET, name) {
+    if (ALPHABET.length >= 255) {
+        throw new TypeError('Alphabet too long');
+    }
+    var BASE_MAP = new Uint8Array(256);
+    for (var j = 0; j < BASE_MAP.length; j++) {
+        BASE_MAP[j] = 255;
+    }
+    for (var i = 0; i < ALPHABET.length; i++) {
+        var x = ALPHABET.charAt(i);
+        var xc = x.charCodeAt(0);
+        if (BASE_MAP[xc] !== 255) {
+            throw new TypeError(x + ' is ambiguous');
+        }
+        BASE_MAP[xc] = i;
+    }
+    var BASE = ALPHABET.length;
+    var LEADER = ALPHABET.charAt(0);
+    var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
+    var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
     /**
-     * A writable stream represents a destination for data, into which you can write.
-     *
-     * @public
+     * @param {any[] | Iterable} source
      */
-    var WritableStream = /** @class */ (function () {
-        function WritableStream(rawUnderlyingSink, rawStrategy) {
-            if (rawUnderlyingSink === void 0) { rawUnderlyingSink = {}; }
-            if (rawStrategy === void 0) { rawStrategy = {}; }
-            if (rawUnderlyingSink === undefined) {
-                rawUnderlyingSink = null;
-            }
-            else {
-                assertObject(rawUnderlyingSink, 'First parameter');
-            }
-            var strategy = convertQueuingStrategy(rawStrategy, 'Second parameter');
-            var underlyingSink = convertUnderlyingSink(rawUnderlyingSink, 'First parameter');
-            InitializeWritableStream(this);
-            var type = underlyingSink.type;
-            if (type !== undefined) {
-                throw new RangeError('Invalid type is specified');
-            }
-            var sizeAlgorithm = ExtractSizeAlgorithm(strategy);
-            var highWaterMark = ExtractHighWaterMark(strategy, 1);
-            SetUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, highWaterMark, sizeAlgorithm);
+    function encode(source) {
+        // @ts-ignore
+        if (source instanceof Uint8Array)
+            ;
+        else if (ArrayBuffer.isView(source)) {
+            source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
         }
-        Object.defineProperty(WritableStream.prototype, "locked", {
-            /**
-             * Returns whether or not the writable stream is locked to a writer.
-             */
-            get: function () {
-                if (!IsWritableStream(this)) {
-                    throw streamBrandCheckException$2('locked');
-                }
-                return IsWritableStreamLocked(this);
-            },
-            enumerable: false,
-            configurable: true
-        });
-        /**
-         * Aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be
-         * immediately moved to an errored state, with any queued-up writes discarded. This will also execute any abort
-         * mechanism of the underlying sink.
-         *
-         * The returned promise will fulfill if the stream shuts down successfully, or reject if the underlying sink signaled
-         * that there was an error doing so. Additionally, it will reject with a `TypeError` (without attempting to cancel
-         * the stream) if the stream is currently locked.
-         */
-        WritableStream.prototype.abort = function (reason) {
-            if (reason === void 0) { reason = undefined; }
-            if (!IsWritableStream(this)) {
-                return promiseRejectedWith(streamBrandCheckException$2('abort'));
-            }
-            if (IsWritableStreamLocked(this)) {
-                return promiseRejectedWith(new TypeError('Cannot abort a stream that already has a writer'));
-            }
-            return WritableStreamAbort(this, reason);
-        };
-        /**
-         * Closes the stream. The underlying sink will finish processing any previously-written chunks, before invoking its
-         * close behavior. During this time any further attempts to write will fail (without erroring the stream).
-         *
-         * The method returns a promise that will fulfill if all remaining chunks are successfully written and the stream
-         * successfully closes, or rejects if an error is encountered during this process. Additionally, it will reject with
-         * a `TypeError` (without attempting to cancel the stream) if the stream is currently locked.
-         */
-        WritableStream.prototype.close = function () {
-            if (!IsWritableStream(this)) {
-                return promiseRejectedWith(streamBrandCheckException$2('close'));
-            }
-            if (IsWritableStreamLocked(this)) {
-                return promiseRejectedWith(new TypeError('Cannot close a stream that already has a writer'));
-            }
-            if (WritableStreamCloseQueuedOrInFlight(this)) {
-                return promiseRejectedWith(new TypeError('Cannot close an already-closing stream'));
+        else if (Array.isArray(source)) {
+            source = Uint8Array.from(source);
+        }
+        if (!(source instanceof Uint8Array)) {
+            throw new TypeError('Expected Uint8Array');
+        }
+        if (source.length === 0) {
+            return '';
+        }
+        // Skip & count leading zeroes.
+        var zeroes = 0;
+        var length = 0;
+        var pbegin = 0;
+        var pend = source.length;
+        while (pbegin !== pend && source[pbegin] === 0) {
+            pbegin++;
+            zeroes++;
+        }
+        // Allocate enough space in big-endian base58 representation.
+        var size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
+        var b58 = new Uint8Array(size);
+        // Process the bytes.
+        while (pbegin !== pend) {
+            var carry = source[pbegin];
+            // Apply "b58 = b58 * 256 + ch".
+            var i = 0;
+            for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
+                carry += (256 * b58[it1]) >>> 0;
+                b58[it1] = (carry % BASE) >>> 0;
+                carry = (carry / BASE) >>> 0;
             }
-            return WritableStreamClose(this);
-        };
-        /**
-         * Creates a {@link WritableStreamDefaultWriter | writer} and locks the stream to the new writer. While the stream
-         * is locked, no other writer can be acquired until this one is released.
-         *
-         * This functionality is especially useful for creating abstractions that desire the ability to write to a stream
-         * without interruption or interleaving. By getting a writer for the stream, you can ensure nobody else can write at
-         * the same time, which would cause the resulting written data to be unpredictable and probably useless.
-         */
-        WritableStream.prototype.getWriter = function () {
-            if (!IsWritableStream(this)) {
-                throw streamBrandCheckException$2('getWriter');
+            if (carry !== 0) {
+                throw new Error('Non-zero carry');
             }
-            return AcquireWritableStreamDefaultWriter(this);
-        };
-        return WritableStream;
-    }());
-    Object.defineProperties(WritableStream.prototype, {
-        abort: { enumerable: true },
-        close: { enumerable: true },
-        getWriter: { enumerable: true },
-        locked: { enumerable: true }
-    });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(WritableStream.prototype, SymbolPolyfill.toStringTag, {
-            value: 'WritableStream',
-            configurable: true
-        });
-    }
-    // Abstract operations for the WritableStream.
-    function AcquireWritableStreamDefaultWriter(stream) {
-        return new WritableStreamDefaultWriter(stream);
-    }
-    // Throws if and only if startAlgorithm throws.
-    function CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) {
-        if (highWaterMark === void 0) { highWaterMark = 1; }
-        if (sizeAlgorithm === void 0) { sizeAlgorithm = function () { return 1; }; }
-        var stream = Object.create(WritableStream.prototype);
-        InitializeWritableStream(stream);
-        var controller = Object.create(WritableStreamDefaultController.prototype);
-        SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm);
-        return stream;
-    }
-    function InitializeWritableStream(stream) {
-        stream._state = 'writable';
-        // The error that will be reported by new method calls once the state becomes errored. Only set when [[state]] is
-        // 'erroring' or 'errored'. May be set to an undefined value.
-        stream._storedError = undefined;
-        stream._writer = undefined;
-        // Initialize to undefined first because the constructor of the controller checks this
-        // variable to validate the caller.
-        stream._writableStreamController = undefined;
-        // This queue is placed here instead of the writer class in order to allow for passing a writer to the next data
-        // producer without waiting for the queued writes to finish.
-        stream._writeRequests = new SimpleQueue();
-        // Write requests are removed from _writeRequests when write() is called on the underlying sink. This prevents
-        // them from being erroneously rejected on error. If a write() call is in-flight, the request is stored here.
-        stream._inFlightWriteRequest = undefined;
-        // The promise that was returned from writer.close(). Stored here because it may be fulfilled after the writer
-        // has been detached.
-        stream._closeRequest = undefined;
-        // Close request is removed from _closeRequest when close() is called on the underlying sink. This prevents it
-        // from being erroneously rejected on error. If a close() call is in-flight, the request is stored here.
-        stream._inFlightCloseRequest = undefined;
-        // The promise that was returned from writer.abort(). This may also be fulfilled after the writer has detached.
-        stream._pendingAbortRequest = undefined;
-        // The backpressure signal set by the controller.
-        stream._backpressure = false;
-    }
-    function IsWritableStream(x) {
-        if (!typeIsObject(x)) {
-            return false;
+            length = i;
+            pbegin++;
         }
-        if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) {
-            return false;
+        // Skip leading zeroes in base58 result.
+        var it2 = size - length;
+        while (it2 !== size && b58[it2] === 0) {
+            it2++;
         }
-        return x instanceof WritableStream;
-    }
-    function IsWritableStreamLocked(stream) {
-        if (stream._writer === undefined) {
-            return false;
+        // Translate the result into a string.
+        var str = LEADER.repeat(zeroes);
+        for (; it2 < size; ++it2) {
+            str += ALPHABET.charAt(b58[it2]);
         }
-        return true;
+        return str;
     }
-    function WritableStreamAbort(stream, reason) {
-        var _a;
-        if (stream._state === 'closed' || stream._state === 'errored') {
-            return promiseResolvedWith(undefined);
+    /**
+     * @param {string | string[]} source
+     */
+    function decodeUnsafe(source) {
+        if (typeof source !== 'string') {
+            throw new TypeError('Expected String');
         }
-        stream._writableStreamController._abortReason = reason;
-        (_a = stream._writableStreamController._abortController) === null || _a === void 0 ? void 0 : _a.abort();
-        // TypeScript narrows the type of `stream._state` down to 'writable' | 'erroring',
-        // but it doesn't know that signaling abort runs author code that might have changed the state.
-        // Widen the type again by casting to WritableStreamState.
-        var state = stream._state;
-        if (state === 'closed' || state === 'errored') {
-            return promiseResolvedWith(undefined);
+        if (source.length === 0) {
+            return new Uint8Array();
         }
-        if (stream._pendingAbortRequest !== undefined) {
-            return stream._pendingAbortRequest._promise;
+        var psz = 0;
+        // Skip leading spaces.
+        if (source[psz] === ' ') {
+            return;
         }
-        var wasAlreadyErroring = false;
-        if (state === 'erroring') {
-            wasAlreadyErroring = true;
-            // reason will not be used, so don't keep a reference to it.
-            reason = undefined;
+        // Skip and count leading '1's.
+        var zeroes = 0;
+        var length = 0;
+        while (source[psz] === LEADER) {
+            zeroes++;
+            psz++;
         }
-        var promise = newPromise(function (resolve, reject) {
-            stream._pendingAbortRequest = {
-                _promise: undefined,
-                _resolve: resolve,
-                _reject: reject,
-                _reason: reason,
-                _wasAlreadyErroring: wasAlreadyErroring
-            };
-        });
-        stream._pendingAbortRequest._promise = promise;
-        if (!wasAlreadyErroring) {
-            WritableStreamStartErroring(stream, reason);
+        // Allocate enough space in big-endian base256 representation.
+        var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
+        var b256 = new Uint8Array(size);
+        // Process the characters.
+        while (source[psz]) {
+            // Decode character
+            var carry = BASE_MAP[source.charCodeAt(psz)];
+            // Invalid character
+            if (carry === 255) {
+                return;
+            }
+            var i = 0;
+            for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
+                carry += (BASE * b256[it3]) >>> 0;
+                b256[it3] = (carry % 256) >>> 0;
+                carry = (carry / 256) >>> 0;
+            }
+            if (carry !== 0) {
+                throw new Error('Non-zero carry');
+            }
+            length = i;
+            psz++;
         }
-        return promise;
-    }
-    function WritableStreamClose(stream) {
-        var state = stream._state;
-        if (state === 'closed' || state === 'errored') {
-            return promiseRejectedWith(new TypeError("The stream (in " + state + " state) is not in the writable state and cannot be closed"));
+        // Skip trailing spaces.
+        if (source[psz] === ' ') {
+            return;
         }
-        var promise = newPromise(function (resolve, reject) {
-            var closeRequest = {
-                _resolve: resolve,
-                _reject: reject
-            };
-            stream._closeRequest = closeRequest;
-        });
-        var writer = stream._writer;
-        if (writer !== undefined && stream._backpressure && state === 'writable') {
-            defaultWriterReadyPromiseResolve(writer);
+        // Skip leading zeroes in b256.
+        var it4 = size - length;
+        while (it4 !== size && b256[it4] === 0) {
+            it4++;
         }
-        WritableStreamDefaultControllerClose(stream._writableStreamController);
-        return promise;
-    }
-    // WritableStream API exposed for controllers.
-    function WritableStreamAddWriteRequest(stream) {
-        var promise = newPromise(function (resolve, reject) {
-            var writeRequest = {
-                _resolve: resolve,
-                _reject: reject
-            };
-            stream._writeRequests.push(writeRequest);
-        });
-        return promise;
+        var vch = new Uint8Array(zeroes + (size - it4));
+        var j = zeroes;
+        while (it4 !== size) {
+            vch[j++] = b256[it4++];
+        }
+        return vch;
     }
-    function WritableStreamDealWithRejection(stream, error) {
-        var state = stream._state;
-        if (state === 'writable') {
-            WritableStreamStartErroring(stream, error);
-            return;
+    /**
+     * @param {string | string[]} string
+     */
+    function decode(string) {
+        var buffer = decodeUnsafe(string);
+        if (buffer) {
+            return buffer;
         }
-        WritableStreamFinishErroring(stream);
+        throw new Error(`Non-${name} character`);
     }
-    function WritableStreamStartErroring(stream, reason) {
-        var controller = stream._writableStreamController;
-        stream._state = 'erroring';
-        stream._storedError = reason;
-        var writer = stream._writer;
-        if (writer !== undefined) {
-            WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason);
+    return {
+        encode: encode,
+        decodeUnsafe: decodeUnsafe,
+        decode: decode
+    };
+}
+var node_modules_multiformats_dist_src_vendor_base_x_src = node_modules_multiformats_dist_src_vendor_base_x_base;
+var node_modules_multiformats_dist_src_vendor_base_x_brrp_multiformats_scope_baseX = node_modules_multiformats_dist_src_vendor_base_x_src;
+/* harmony default export */ const blockstore_core_node_modules_multiformats_dist_src_vendor_base_x = (node_modules_multiformats_dist_src_vendor_base_x_brrp_multiformats_scope_baseX);
+//# sourceMappingURL=base-x.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/bases/base.js
+
+
+/**
+ * Class represents both BaseEncoder and MultibaseEncoder meaning it
+ * can be used to encode to multibase or base encode without multibase
+ * prefix.
+ */
+class blockstore_core_node_modules_multiformats_dist_src_bases_base_Encoder {
+    name;
+    prefix;
+    baseEncode;
+    constructor(name, prefix, baseEncode) {
+        this.name = name;
+        this.prefix = prefix;
+        this.baseEncode = baseEncode;
+    }
+    encode(bytes) {
+        if (bytes instanceof Uint8Array) {
+            return `${this.prefix}${this.baseEncode(bytes)}`;
         }
-        if (!WritableStreamHasOperationMarkedInFlight(stream) && controller._started) {
-            WritableStreamFinishErroring(stream);
+        else {
+            throw Error('Unknown type, must be binary type');
         }
     }
-    function WritableStreamFinishErroring(stream) {
-        stream._state = 'errored';
-        stream._writableStreamController[ErrorSteps]();
-        var storedError = stream._storedError;
-        stream._writeRequests.forEach(function (writeRequest) {
-            writeRequest._reject(storedError);
-        });
-        stream._writeRequests = new SimpleQueue();
-        if (stream._pendingAbortRequest === undefined) {
-            WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
-            return;
+}
+/**
+ * Class represents both BaseDecoder and MultibaseDecoder so it could be used
+ * to decode multibases (with matching prefix) or just base decode strings
+ * with corresponding base encoding.
+ */
+class blockstore_core_node_modules_multiformats_dist_src_bases_base_Decoder {
+    name;
+    prefix;
+    baseDecode;
+    prefixCodePoint;
+    constructor(name, prefix, baseDecode) {
+        this.name = name;
+        this.prefix = prefix;
+        /* c8 ignore next 3 */
+        if (prefix.codePointAt(0) === undefined) {
+            throw new Error('Invalid prefix character');
+        }
+        this.prefixCodePoint = prefix.codePointAt(0);
+        this.baseDecode = baseDecode;
+    }
+    decode(text) {
+        if (typeof text === 'string') {
+            if (text.codePointAt(0) !== this.prefixCodePoint) {
+                throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
+            }
+            return this.baseDecode(text.slice(this.prefix.length));
         }
-        var abortRequest = stream._pendingAbortRequest;
-        stream._pendingAbortRequest = undefined;
-        if (abortRequest._wasAlreadyErroring) {
-            abortRequest._reject(storedError);
-            WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
-            return;
+        else {
+            throw Error('Can only multibase decode strings');
         }
-        var promise = stream._writableStreamController[AbortSteps](abortRequest._reason);
-        uponPromise(promise, function () {
-            abortRequest._resolve();
-            WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
-        }, function (reason) {
-            abortRequest._reject(reason);
-            WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);
-        });
     }
-    function WritableStreamFinishInFlightWrite(stream) {
-        stream._inFlightWriteRequest._resolve(undefined);
-        stream._inFlightWriteRequest = undefined;
+    or(decoder) {
+        return blockstore_core_node_modules_multiformats_dist_src_bases_base_or(this, decoder);
     }
-    function WritableStreamFinishInFlightWriteWithError(stream, error) {
-        stream._inFlightWriteRequest._reject(error);
-        stream._inFlightWriteRequest = undefined;
-        WritableStreamDealWithRejection(stream, error);
+}
+class blockstore_core_node_modules_multiformats_dist_src_bases_base_ComposedDecoder {
+    decoders;
+    constructor(decoders) {
+        this.decoders = decoders;
     }
-    function WritableStreamFinishInFlightClose(stream) {
-        stream._inFlightCloseRequest._resolve(undefined);
-        stream._inFlightCloseRequest = undefined;
-        var state = stream._state;
-        if (state === 'erroring') {
-            // The error was too late to do anything, so it is ignored.
-            stream._storedError = undefined;
-            if (stream._pendingAbortRequest !== undefined) {
-                stream._pendingAbortRequest._resolve();
-                stream._pendingAbortRequest = undefined;
-            }
+    or(decoder) {
+        return blockstore_core_node_modules_multiformats_dist_src_bases_base_or(this, decoder);
+    }
+    decode(input) {
+        const prefix = input[0];
+        const decoder = this.decoders[prefix];
+        if (decoder != null) {
+            return decoder.decode(input);
         }
-        stream._state = 'closed';
-        var writer = stream._writer;
-        if (writer !== undefined) {
-            defaultWriterClosedPromiseResolve(writer);
+        else {
+            throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
         }
     }
-    function WritableStreamFinishInFlightCloseWithError(stream, error) {
-        stream._inFlightCloseRequest._reject(error);
-        stream._inFlightCloseRequest = undefined;
-        // Never execute sink abort() after sink close().
-        if (stream._pendingAbortRequest !== undefined) {
-            stream._pendingAbortRequest._reject(error);
-            stream._pendingAbortRequest = undefined;
+}
+function blockstore_core_node_modules_multiformats_dist_src_bases_base_or(left, right) {
+    // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
+    return new blockstore_core_node_modules_multiformats_dist_src_bases_base_ComposedDecoder({
+        ...(left.decoders ?? { [left.prefix]: left }),
+        ...(right.decoders ?? { [right.prefix]: right })
+    });
+}
+class blockstore_core_node_modules_multiformats_dist_src_bases_base_Codec {
+    name;
+    prefix;
+    baseEncode;
+    baseDecode;
+    encoder;
+    decoder;
+    constructor(name, prefix, baseEncode, baseDecode) {
+        this.name = name;
+        this.prefix = prefix;
+        this.baseEncode = baseEncode;
+        this.baseDecode = baseDecode;
+        this.encoder = new blockstore_core_node_modules_multiformats_dist_src_bases_base_Encoder(name, prefix, baseEncode);
+        this.decoder = new blockstore_core_node_modules_multiformats_dist_src_bases_base_Decoder(name, prefix, baseDecode);
+    }
+    encode(input) {
+        return this.encoder.encode(input);
+    }
+    decode(input) {
+        return this.decoder.decode(input);
+    }
+}
+function blockstore_core_node_modules_multiformats_dist_src_bases_base_from({ name, prefix, encode, decode }) {
+    return new blockstore_core_node_modules_multiformats_dist_src_bases_base_Codec(name, prefix, encode, decode);
+}
+function blockstore_core_node_modules_multiformats_dist_src_bases_base_baseX({ name, prefix, alphabet }) {
+    const { encode, decode } = blockstore_core_node_modules_multiformats_dist_src_vendor_base_x(alphabet, name);
+    return blockstore_core_node_modules_multiformats_dist_src_bases_base_from({
+        prefix,
+        name,
+        encode,
+        decode: (text) => blockstore_core_node_modules_multiformats_dist_src_bytes_coerce(decode(text))
+    });
+}
+function blockstore_core_node_modules_multiformats_dist_src_bases_base_decode(string, alphabet, bitsPerChar, name) {
+    // Build the character lookup table:
+    const codes = {};
+    for (let i = 0; i < alphabet.length; ++i) {
+        codes[alphabet[i]] = i;
+    }
+    // Count the padding bytes:
+    let end = string.length;
+    while (string[end - 1] === '=') {
+        --end;
+    }
+    // Allocate the output:
+    const out = new Uint8Array((end * bitsPerChar / 8) | 0);
+    // Parse the data:
+    let bits = 0; // Number of bits currently in the buffer
+    let buffer = 0; // Bits waiting to be written out, MSB first
+    let written = 0; // Next byte to write
+    for (let i = 0; i < end; ++i) {
+        // Read one character from the string:
+        const value = codes[string[i]];
+        if (value === undefined) {
+            throw new SyntaxError(`Non-${name} character`);
+        }
+        // Append the bits to the buffer:
+        buffer = (buffer << bitsPerChar) | value;
+        bits += bitsPerChar;
+        // Write out some bits if the buffer has a byte's worth:
+        if (bits >= 8) {
+            bits -= 8;
+            out[written++] = 0xff & (buffer >> bits);
+        }
+    }
+    // Verify that we have received just enough bits:
+    if (bits >= bitsPerChar || (0xff & (buffer << (8 - bits))) !== 0) {
+        throw new SyntaxError('Unexpected end of data');
+    }
+    return out;
+}
+function blockstore_core_node_modules_multiformats_dist_src_bases_base_encode(data, alphabet, bitsPerChar) {
+    const pad = alphabet[alphabet.length - 1] === '=';
+    const mask = (1 << bitsPerChar) - 1;
+    let out = '';
+    let bits = 0; // Number of bits currently in the buffer
+    let buffer = 0; // Bits waiting to be written out, MSB first
+    for (let i = 0; i < data.length; ++i) {
+        // Slurp data into the buffer:
+        buffer = (buffer << 8) | data[i];
+        bits += 8;
+        // Write out as much as we can:
+        while (bits > bitsPerChar) {
+            bits -= bitsPerChar;
+            out += alphabet[mask & (buffer >> bits)];
         }
-        WritableStreamDealWithRejection(stream, error);
     }
-    // TODO(ricea): Fix alphabetical order.
-    function WritableStreamCloseQueuedOrInFlight(stream) {
-        if (stream._closeRequest === undefined && stream._inFlightCloseRequest === undefined) {
-            return false;
+    // Partial character:
+    if (bits !== 0) {
+        out += alphabet[mask & (buffer << (bitsPerChar - bits))];
+    }
+    // Add padding characters until we hit a byte boundary:
+    if (pad) {
+        while (((out.length * bitsPerChar) & 7) !== 0) {
+            out += '=';
         }
-        return true;
     }
-    function WritableStreamHasOperationMarkedInFlight(stream) {
-        if (stream._inFlightWriteRequest === undefined && stream._inFlightCloseRequest === undefined) {
-            return false;
+    return out;
+}
+/**
+ * RFC4648 Factory
+ */
+function blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({ name, prefix, bitsPerChar, alphabet }) {
+    return blockstore_core_node_modules_multiformats_dist_src_bases_base_from({
+        prefix,
+        name,
+        encode(input) {
+            return blockstore_core_node_modules_multiformats_dist_src_bases_base_encode(input, alphabet, bitsPerChar);
+        },
+        decode(input) {
+            return blockstore_core_node_modules_multiformats_dist_src_bases_base_decode(input, alphabet, bitsPerChar, name);
         }
-        return true;
+    });
+}
+//# sourceMappingURL=base.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/bases/base32.js
+
+const blockstore_core_node_modules_multiformats_dist_src_bases_base32_base32 = blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({
+    prefix: 'b',
+    name: 'base32',
+    alphabet: 'abcdefghijklmnopqrstuvwxyz234567',
+    bitsPerChar: 5
+});
+const blockstore_core_node_modules_multiformats_dist_src_bases_base32_base32upper = blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({
+    prefix: 'B',
+    name: 'base32upper',
+    alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',
+    bitsPerChar: 5
+});
+const blockstore_core_node_modules_multiformats_dist_src_bases_base32_base32pad = blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({
+    prefix: 'c',
+    name: 'base32pad',
+    alphabet: 'abcdefghijklmnopqrstuvwxyz234567=',
+    bitsPerChar: 5
+});
+const blockstore_core_node_modules_multiformats_dist_src_bases_base32_base32padupper = blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({
+    prefix: 'C',
+    name: 'base32padupper',
+    alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=',
+    bitsPerChar: 5
+});
+const blockstore_core_node_modules_multiformats_dist_src_bases_base32_base32hex = blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({
+    prefix: 'v',
+    name: 'base32hex',
+    alphabet: '0123456789abcdefghijklmnopqrstuv',
+    bitsPerChar: 5
+});
+const blockstore_core_node_modules_multiformats_dist_src_bases_base32_base32hexupper = blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({
+    prefix: 'V',
+    name: 'base32hexupper',
+    alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV',
+    bitsPerChar: 5
+});
+const blockstore_core_node_modules_multiformats_dist_src_bases_base32_base32hexpad = blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({
+    prefix: 't',
+    name: 'base32hexpad',
+    alphabet: '0123456789abcdefghijklmnopqrstuv=',
+    bitsPerChar: 5
+});
+const blockstore_core_node_modules_multiformats_dist_src_bases_base32_base32hexpadupper = blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({
+    prefix: 'T',
+    name: 'base32hexpadupper',
+    alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=',
+    bitsPerChar: 5
+});
+const blockstore_core_node_modules_multiformats_dist_src_bases_base32_base32z = blockstore_core_node_modules_multiformats_dist_src_bases_base_rfc4648({
+    prefix: 'h',
+    name: 'base32z',
+    alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769',
+    bitsPerChar: 5
+});
+//# sourceMappingURL=base32.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/bases/base58.js
+
+const blockstore_core_node_modules_multiformats_dist_src_bases_base58_base58btc = blockstore_core_node_modules_multiformats_dist_src_bases_base_baseX({
+    name: 'base58btc',
+    prefix: 'z',
+    alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
+});
+const blockstore_core_node_modules_multiformats_dist_src_bases_base58_base58flickr = blockstore_core_node_modules_multiformats_dist_src_bases_base_baseX({
+    name: 'base58flickr',
+    prefix: 'Z',
+    alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'
+});
+//# sourceMappingURL=base58.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/vendor/varint.js
+/* eslint-disable */
+var node_modules_multiformats_dist_src_vendor_varint_encode_1 = blockstore_core_node_modules_multiformats_dist_src_vendor_varint_encode;
+var node_modules_multiformats_dist_src_vendor_varint_MSB = 0x80, node_modules_multiformats_dist_src_vendor_varint_REST = 0x7F, node_modules_multiformats_dist_src_vendor_varint_MSBALL = ~node_modules_multiformats_dist_src_vendor_varint_REST, node_modules_multiformats_dist_src_vendor_varint_INT = Math.pow(2, 31);
+/**
+ * @param {number} num
+ * @param {number[]} out
+ * @param {number} offset
+ */
+function blockstore_core_node_modules_multiformats_dist_src_vendor_varint_encode(num, out, offset) {
+    out = out || [];
+    offset = offset || 0;
+    var oldOffset = offset;
+    while (num >= node_modules_multiformats_dist_src_vendor_varint_INT) {
+        out[offset++] = (num & 0xFF) | node_modules_multiformats_dist_src_vendor_varint_MSB;
+        num /= 128;
     }
-    function WritableStreamMarkCloseRequestInFlight(stream) {
-        stream._inFlightCloseRequest = stream._closeRequest;
-        stream._closeRequest = undefined;
+    while (num & node_modules_multiformats_dist_src_vendor_varint_MSBALL) {
+        out[offset++] = (num & 0xFF) | node_modules_multiformats_dist_src_vendor_varint_MSB;
+        num >>>= 7;
     }
-    function WritableStreamMarkFirstWriteRequestInFlight(stream) {
-        stream._inFlightWriteRequest = stream._writeRequests.shift();
+    out[offset] = num | 0;
+    // @ts-ignore
+    blockstore_core_node_modules_multiformats_dist_src_vendor_varint_encode.bytes = offset - oldOffset + 1;
+    return out;
+}
+var blockstore_core_node_modules_multiformats_dist_src_vendor_varint_decode = node_modules_multiformats_dist_src_vendor_varint_read;
+var node_modules_multiformats_dist_src_vendor_varint_MSB$1 = 0x80, node_modules_multiformats_dist_src_vendor_varint_REST$1 = 0x7F;
+/**
+ * @param {string | any[]} buf
+ * @param {number} offset
+ */
+function node_modules_multiformats_dist_src_vendor_varint_read(buf, offset) {
+    var res = 0, offset = offset || 0, shift = 0, counter = offset, b, l = buf.length;
+    do {
+        if (counter >= l) {
+            // @ts-ignore
+            node_modules_multiformats_dist_src_vendor_varint_read.bytes = 0;
+            throw new RangeError('Could not decode varint');
+        }
+        b = buf[counter++];
+        res += shift < 28
+            ? (b & node_modules_multiformats_dist_src_vendor_varint_REST$1) << shift
+            : (b & node_modules_multiformats_dist_src_vendor_varint_REST$1) * Math.pow(2, shift);
+        shift += 7;
+    } while (b >= node_modules_multiformats_dist_src_vendor_varint_MSB$1);
+    // @ts-ignore
+    node_modules_multiformats_dist_src_vendor_varint_read.bytes = counter - offset;
+    return res;
+}
+var node_modules_multiformats_dist_src_vendor_varint_N1 = Math.pow(2, 7);
+var node_modules_multiformats_dist_src_vendor_varint_N2 = Math.pow(2, 14);
+var node_modules_multiformats_dist_src_vendor_varint_N3 = Math.pow(2, 21);
+var node_modules_multiformats_dist_src_vendor_varint_N4 = Math.pow(2, 28);
+var node_modules_multiformats_dist_src_vendor_varint_N5 = Math.pow(2, 35);
+var node_modules_multiformats_dist_src_vendor_varint_N6 = Math.pow(2, 42);
+var node_modules_multiformats_dist_src_vendor_varint_N7 = Math.pow(2, 49);
+var node_modules_multiformats_dist_src_vendor_varint_N8 = Math.pow(2, 56);
+var node_modules_multiformats_dist_src_vendor_varint_N9 = Math.pow(2, 63);
+var blockstore_core_node_modules_multiformats_dist_src_vendor_varint_length = function (/** @type {number} */ value) {
+    return (value < node_modules_multiformats_dist_src_vendor_varint_N1 ? 1
+        : value < node_modules_multiformats_dist_src_vendor_varint_N2 ? 2
+            : value < node_modules_multiformats_dist_src_vendor_varint_N3 ? 3
+                : value < node_modules_multiformats_dist_src_vendor_varint_N4 ? 4
+                    : value < node_modules_multiformats_dist_src_vendor_varint_N5 ? 5
+                        : value < node_modules_multiformats_dist_src_vendor_varint_N6 ? 6
+                            : value < node_modules_multiformats_dist_src_vendor_varint_N7 ? 7
+                                : value < node_modules_multiformats_dist_src_vendor_varint_N8 ? 8
+                                    : value < node_modules_multiformats_dist_src_vendor_varint_N9 ? 9
+                                        : 10);
+};
+var blockstore_core_node_modules_multiformats_dist_src_vendor_varint_varint = {
+    encode: node_modules_multiformats_dist_src_vendor_varint_encode_1,
+    decode: blockstore_core_node_modules_multiformats_dist_src_vendor_varint_decode,
+    encodingLength: blockstore_core_node_modules_multiformats_dist_src_vendor_varint_length
+};
+var node_modules_multiformats_dist_src_vendor_varint_brrp_varint = (/* unused pure expression or super */ null && (blockstore_core_node_modules_multiformats_dist_src_vendor_varint_varint));
+/* harmony default export */ const blockstore_core_node_modules_multiformats_dist_src_vendor_varint = ((/* unused pure expression or super */ null && (node_modules_multiformats_dist_src_vendor_varint_brrp_varint)));
+//# sourceMappingURL=varint.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/varint.js
+
+function blockstore_core_node_modules_multiformats_dist_src_varint_decode(data, offset = 0) {
+    const code = varint.decode(data, offset);
+    return [code, varint.decode.bytes];
+}
+function blockstore_core_node_modules_multiformats_dist_src_varint_encodeTo(int, target, offset = 0) {
+    varint.encode(int, target, offset);
+    return target;
+}
+function blockstore_core_node_modules_multiformats_dist_src_varint_encodingLength(int) {
+    return varint.encodingLength(int);
+}
+//# sourceMappingURL=varint.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/hashes/digest.js
+
+
+/**
+ * Creates a multihash digest.
+ */
+function blockstore_core_node_modules_multiformats_dist_src_hashes_digest_create(code, digest) {
+    const size = digest.byteLength;
+    const sizeOffset = varint.encodingLength(code);
+    const digestOffset = sizeOffset + varint.encodingLength(size);
+    const bytes = new Uint8Array(digestOffset + size);
+    varint.encodeTo(code, bytes, 0);
+    varint.encodeTo(size, bytes, sizeOffset);
+    bytes.set(digest, digestOffset);
+    return new blockstore_core_node_modules_multiformats_dist_src_hashes_digest_Digest(code, size, digest, bytes);
+}
+/**
+ * Turns bytes representation of multihash digest into an instance.
+ */
+function blockstore_core_node_modules_multiformats_dist_src_hashes_digest_decode(multihash) {
+    const bytes = coerce(multihash);
+    const [code, sizeOffset] = varint.decode(bytes);
+    const [size, digestOffset] = varint.decode(bytes.subarray(sizeOffset));
+    const digest = bytes.subarray(sizeOffset + digestOffset);
+    if (digest.byteLength !== size) {
+        throw new Error('Incorrect length');
+    }
+    return new blockstore_core_node_modules_multiformats_dist_src_hashes_digest_Digest(code, size, digest, bytes);
+}
+function blockstore_core_node_modules_multiformats_dist_src_hashes_digest_equals(a, b) {
+    if (a === b) {
+        return true;
     }
-    function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) {
-        if (stream._closeRequest !== undefined) {
-            stream._closeRequest._reject(stream._storedError);
-            stream._closeRequest = undefined;
-        }
-        var writer = stream._writer;
-        if (writer !== undefined) {
-            defaultWriterClosedPromiseReject(writer, stream._storedError);
-        }
+    else {
+        const data = b;
+        return (a.code === data.code &&
+            a.size === data.size &&
+            data.bytes instanceof Uint8Array &&
+            equalBytes(a.bytes, data.bytes));
     }
-    function WritableStreamUpdateBackpressure(stream, backpressure) {
-        var writer = stream._writer;
-        if (writer !== undefined && backpressure !== stream._backpressure) {
-            if (backpressure) {
-                defaultWriterReadyPromiseReset(writer);
-            }
-            else {
-                defaultWriterReadyPromiseResolve(writer);
-            }
-        }
-        stream._backpressure = backpressure;
+}
+/**
+ * Represents a multihash digest which carries information about the
+ * hashing algorithm and an actual hash digest.
+ */
+class blockstore_core_node_modules_multiformats_dist_src_hashes_digest_Digest {
+    code;
+    size;
+    digest;
+    bytes;
+    /**
+     * Creates a multihash digest.
+     */
+    constructor(code, size, digest, bytes) {
+        this.code = code;
+        this.size = size;
+        this.digest = digest;
+        this.bytes = bytes;
+    }
+}
+//# sourceMappingURL=digest.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/cid.js
+
+
+
+
+
+// This way TS will also expose all the types from module
+
+function blockstore_core_node_modules_multiformats_dist_src_cid_format(link, base) {
+    const { bytes, version } = link;
+    switch (version) {
+        case 0:
+            return blockstore_core_node_modules_multiformats_dist_src_cid_toStringV0(bytes, blockstore_core_node_modules_multiformats_dist_src_cid_baseCache(link), base ?? base58btc.encoder);
+        default:
+            return blockstore_core_node_modules_multiformats_dist_src_cid_toStringV1(bytes, blockstore_core_node_modules_multiformats_dist_src_cid_baseCache(link), (base ?? base32.encoder));
     }
+}
+function blockstore_core_node_modules_multiformats_dist_src_cid_toJSON(link) {
+    return {
+        '/': blockstore_core_node_modules_multiformats_dist_src_cid_format(link)
+    };
+}
+function blockstore_core_node_modules_multiformats_dist_src_cid_fromJSON(json) {
+    return blockstore_core_node_modules_multiformats_dist_src_cid_CID.parse(json['/']);
+}
+const blockstore_core_node_modules_multiformats_dist_src_cid_cache = new WeakMap();
+function blockstore_core_node_modules_multiformats_dist_src_cid_baseCache(cid) {
+    const baseCache = blockstore_core_node_modules_multiformats_dist_src_cid_cache.get(cid);
+    if (baseCache == null) {
+        const baseCache = new Map();
+        blockstore_core_node_modules_multiformats_dist_src_cid_cache.set(cid, baseCache);
+        return baseCache;
+    }
+    return baseCache;
+}
+class blockstore_core_node_modules_multiformats_dist_src_cid_CID {
+    code;
+    version;
+    multihash;
+    bytes;
+    '/';
     /**
-     * A default writer vended by a {@link WritableStream}.
-     *
-     * @public
+     * @param version - Version of the CID
+     * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
+     * @param multihash - (Multi)hash of the of the content.
      */
-    var WritableStreamDefaultWriter = /** @class */ (function () {
-        function WritableStreamDefaultWriter(stream) {
-            assertRequiredArgument(stream, 1, 'WritableStreamDefaultWriter');
-            assertWritableStream(stream, 'First parameter');
-            if (IsWritableStreamLocked(stream)) {
-                throw new TypeError('This stream has already been locked for exclusive writing by another writer');
-            }
-            this._ownerWritableStream = stream;
-            stream._writer = this;
-            var state = stream._state;
-            if (state === 'writable') {
-                if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._backpressure) {
-                    defaultWriterReadyPromiseInitialize(this);
-                }
-                else {
-                    defaultWriterReadyPromiseInitializeAsResolved(this);
-                }
-                defaultWriterClosedPromiseInitialize(this);
-            }
-            else if (state === 'erroring') {
-                defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError);
-                defaultWriterClosedPromiseInitialize(this);
-            }
-            else if (state === 'closed') {
-                defaultWriterReadyPromiseInitializeAsResolved(this);
-                defaultWriterClosedPromiseInitializeAsResolved(this);
-            }
-            else {
-                var storedError = stream._storedError;
-                defaultWriterReadyPromiseInitializeAsRejected(this, storedError);
-                defaultWriterClosedPromiseInitializeAsRejected(this, storedError);
-            }
-        }
-        Object.defineProperty(WritableStreamDefaultWriter.prototype, "closed", {
-            /**
-             * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or
-             * the writer’s lock is released before the stream finishes closing.
-             */
-            get: function () {
-                if (!IsWritableStreamDefaultWriter(this)) {
-                    return promiseRejectedWith(defaultWriterBrandCheckException('closed'));
-                }
-                return this._closedPromise;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        Object.defineProperty(WritableStreamDefaultWriter.prototype, "desiredSize", {
-            /**
-             * Returns the desired size to fill the stream’s internal queue. It can be negative, if the queue is over-full.
-             * A producer can use this information to determine the right amount of data to write.
-             *
-             * It will be `null` if the stream cannot be successfully written to (due to either being errored, or having an abort
-             * queued up). It will return zero if the stream is closed. And the getter will throw an exception if invoked when
-             * the writer’s lock is released.
-             */
-            get: function () {
-                if (!IsWritableStreamDefaultWriter(this)) {
-                    throw defaultWriterBrandCheckException('desiredSize');
-                }
-                if (this._ownerWritableStream === undefined) {
-                    throw defaultWriterLockException('desiredSize');
-                }
-                return WritableStreamDefaultWriterGetDesiredSize(this);
-            },
-            enumerable: false,
-            configurable: true
-        });
-        Object.defineProperty(WritableStreamDefaultWriter.prototype, "ready", {
-            /**
-             * Returns a promise that will be fulfilled when the desired size to fill the stream’s internal queue transitions
-             * from non-positive to positive, signaling that it is no longer applying backpressure. Once the desired size dips
-             * back to zero or below, the getter will return a new promise that stays pending until the next transition.
-             *
-             * If the stream becomes errored or aborted, or the writer’s lock is released, the returned promise will become
-             * rejected.
-             */
-            get: function () {
-                if (!IsWritableStreamDefaultWriter(this)) {
-                    return promiseRejectedWith(defaultWriterBrandCheckException('ready'));
-                }
-                return this._readyPromise;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        /**
-         * If the reader is active, behaves the same as {@link WritableStream.abort | stream.abort(reason)}.
-         */
-        WritableStreamDefaultWriter.prototype.abort = function (reason) {
-            if (reason === void 0) { reason = undefined; }
-            if (!IsWritableStreamDefaultWriter(this)) {
-                return promiseRejectedWith(defaultWriterBrandCheckException('abort'));
-            }
-            if (this._ownerWritableStream === undefined) {
-                return promiseRejectedWith(defaultWriterLockException('abort'));
-            }
-            return WritableStreamDefaultWriterAbort(this, reason);
-        };
-        /**
-         * If the reader is active, behaves the same as {@link WritableStream.close | stream.close()}.
-         */
-        WritableStreamDefaultWriter.prototype.close = function () {
-            if (!IsWritableStreamDefaultWriter(this)) {
-                return promiseRejectedWith(defaultWriterBrandCheckException('close'));
-            }
-            var stream = this._ownerWritableStream;
-            if (stream === undefined) {
-                return promiseRejectedWith(defaultWriterLockException('close'));
-            }
-            if (WritableStreamCloseQueuedOrInFlight(stream)) {
-                return promiseRejectedWith(new TypeError('Cannot close an already-closing stream'));
-            }
-            return WritableStreamDefaultWriterClose(this);
-        };
-        /**
-         * Releases the writer’s lock on the corresponding stream. After the lock is released, the writer is no longer active.
-         * If the associated stream is errored when the lock is released, the writer will appear errored in the same way from
-         * now on; otherwise, the writer will appear closed.
-         *
-         * Note that the lock can still be released even if some ongoing writes have not yet finished (i.e. even if the
-         * promises returned from previous calls to {@link WritableStreamDefaultWriter.write | write()} have not yet settled).
-         * It’s not necessary to hold the lock on the writer for the duration of the write; the lock instead simply prevents
-         * other producers from writing in an interleaved manner.
-         */
-        WritableStreamDefaultWriter.prototype.releaseLock = function () {
-            if (!IsWritableStreamDefaultWriter(this)) {
-                throw defaultWriterBrandCheckException('releaseLock');
-            }
-            var stream = this._ownerWritableStream;
-            if (stream === undefined) {
-                return;
-            }
-            WritableStreamDefaultWriterRelease(this);
-        };
-        WritableStreamDefaultWriter.prototype.write = function (chunk) {
-            if (chunk === void 0) { chunk = undefined; }
-            if (!IsWritableStreamDefaultWriter(this)) {
-                return promiseRejectedWith(defaultWriterBrandCheckException('write'));
-            }
-            if (this._ownerWritableStream === undefined) {
-                return promiseRejectedWith(defaultWriterLockException('write to'));
-            }
-            return WritableStreamDefaultWriterWrite(this, chunk);
-        };
-        return WritableStreamDefaultWriter;
-    }());
-    Object.defineProperties(WritableStreamDefaultWriter.prototype, {
-        abort: { enumerable: true },
-        close: { enumerable: true },
-        releaseLock: { enumerable: true },
-        write: { enumerable: true },
-        closed: { enumerable: true },
-        desiredSize: { enumerable: true },
-        ready: { enumerable: true }
-    });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(WritableStreamDefaultWriter.prototype, SymbolPolyfill.toStringTag, {
-            value: 'WritableStreamDefaultWriter',
-            configurable: true
-        });
+    constructor(version, code, multihash, bytes) {
+        this.code = code;
+        this.version = version;
+        this.multihash = multihash;
+        this.bytes = bytes;
+        // flag to serializers that this is a CID and
+        // should be treated specially
+        this['/'] = bytes;
     }
-    // Abstract operations for the WritableStreamDefaultWriter.
-    function IsWritableStreamDefaultWriter(x) {
-        if (!typeIsObject(x)) {
-            return false;
-        }
-        if (!Object.prototype.hasOwnProperty.call(x, '_ownerWritableStream')) {
-            return false;
-        }
-        return x instanceof WritableStreamDefaultWriter;
+    /**
+     * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes`
+     * please either use `CID.asCID(cid)` or switch to new signalling mechanism
+     *
+     * @deprecated
+     */
+    get asCID() {
+        return this;
     }
-    // A client of WritableStreamDefaultWriter may use these functions directly to bypass state check.
-    function WritableStreamDefaultWriterAbort(writer, reason) {
-        var stream = writer._ownerWritableStream;
-        return WritableStreamAbort(stream, reason);
+    // ArrayBufferView
+    get byteOffset() {
+        return this.bytes.byteOffset;
     }
-    function WritableStreamDefaultWriterClose(writer) {
-        var stream = writer._ownerWritableStream;
-        return WritableStreamClose(stream);
+    // ArrayBufferView
+    get byteLength() {
+        return this.bytes.byteLength;
     }
-    function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) {
-        var stream = writer._ownerWritableStream;
-        var state = stream._state;
-        if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') {
-            return promiseResolvedWith(undefined);
-        }
-        if (state === 'errored') {
-            return promiseRejectedWith(stream._storedError);
+    toV0() {
+        switch (this.version) {
+            case 0: {
+                return this;
+            }
+            case 1: {
+                const { code, multihash } = this;
+                if (code !== blockstore_core_node_modules_multiformats_dist_src_cid_DAG_PB_CODE) {
+                    throw new Error('Cannot convert a non dag-pb CID to CIDv0');
+                }
+                // sha2-256
+                if (multihash.code !== blockstore_core_node_modules_multiformats_dist_src_cid_SHA_256_CODE) {
+                    throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0');
+                }
+                return (blockstore_core_node_modules_multiformats_dist_src_cid_CID.createV0(multihash));
+            }
+            default: {
+                throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`);
+            }
         }
-        return WritableStreamDefaultWriterClose(writer);
     }
-    function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) {
-        if (writer._closedPromiseState === 'pending') {
-            defaultWriterClosedPromiseReject(writer, error);
-        }
-        else {
-            defaultWriterClosedPromiseResetToRejected(writer, error);
+    toV1() {
+        switch (this.version) {
+            case 0: {
+                const { code, digest } = this.multihash;
+                const multihash = Digest.create(code, digest);
+                return (blockstore_core_node_modules_multiformats_dist_src_cid_CID.createV1(this.code, multihash));
+            }
+            case 1: {
+                return this;
+            }
+            default: {
+                throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`);
+            }
         }
     }
-    function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) {
-        if (writer._readyPromiseState === 'pending') {
-            defaultWriterReadyPromiseReject(writer, error);
-        }
-        else {
-            defaultWriterReadyPromiseResetToRejected(writer, error);
-        }
+    equals(other) {
+        return blockstore_core_node_modules_multiformats_dist_src_cid_CID.equals(this, other);
     }
-    function WritableStreamDefaultWriterGetDesiredSize(writer) {
-        var stream = writer._ownerWritableStream;
-        var state = stream._state;
-        if (state === 'errored' || state === 'erroring') {
-            return null;
-        }
-        if (state === 'closed') {
-            return 0;
-        }
-        return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController);
+    static equals(self, other) {
+        const unknown = other;
+        return (unknown != null &&
+            self.code === unknown.code &&
+            self.version === unknown.version &&
+            Digest.equals(self.multihash, unknown.multihash));
     }
-    function WritableStreamDefaultWriterRelease(writer) {
-        var stream = writer._ownerWritableStream;
-        var releasedError = new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");
-        WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError);
-        // The state transitions to "errored" before the sink abort() method runs, but the writer.closed promise is not
-        // rejected until afterwards. This means that simply testing state will not work.
-        WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError);
-        stream._writer = undefined;
-        writer._ownerWritableStream = undefined;
+    toString(base) {
+        return blockstore_core_node_modules_multiformats_dist_src_cid_format(this, base);
     }
-    function WritableStreamDefaultWriterWrite(writer, chunk) {
-        var stream = writer._ownerWritableStream;
-        var controller = stream._writableStreamController;
-        var chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk);
-        if (stream !== writer._ownerWritableStream) {
-            return promiseRejectedWith(defaultWriterLockException('write to'));
+    toJSON() {
+        return { '/': blockstore_core_node_modules_multiformats_dist_src_cid_format(this) };
+    }
+    link() {
+        return this;
+    }
+    [Symbol.toStringTag] = 'CID';
+    // Legacy
+    [Symbol.for('nodejs.util.inspect.custom')]() {
+        return `CID(${this.toString()})`;
+    }
+    /**
+     * Takes any input `value` and returns a `CID` instance if it was
+     * a `CID` otherwise returns `null`. If `value` is instanceof `CID`
+     * it will return value back. If `value` is not instance of this CID
+     * class, but is compatible CID it will return new instance of this
+     * `CID` class. Otherwise returns null.
+     *
+     * This allows two different incompatible versions of CID library to
+     * co-exist and interop as long as binary interface is compatible.
+     */
+    static asCID(input) {
+        if (input == null) {
+            return null;
         }
-        var state = stream._state;
-        if (state === 'errored') {
-            return promiseRejectedWith(stream._storedError);
+        const value = input;
+        if (value instanceof blockstore_core_node_modules_multiformats_dist_src_cid_CID) {
+            // If value is instance of CID then we're all set.
+            return value;
         }
-        if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') {
-            return promiseRejectedWith(new TypeError('The stream is closing or closed and cannot be written to'));
+        else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) {
+            // If value isn't instance of this CID class but `this.asCID === this` or
+            // `value['/'] === value.bytes` is true it is CID instance coming from a
+            // different implementation (diff version or duplicate). In that case we
+            // rebase it to this `CID` implementation so caller is guaranteed to get
+            // instance with expected API.
+            const { version, code, multihash, bytes } = value;
+            return new blockstore_core_node_modules_multiformats_dist_src_cid_CID(version, code, multihash, bytes ?? blockstore_core_node_modules_multiformats_dist_src_cid_encodeCID(version, code, multihash.bytes));
+        }
+        else if (value[blockstore_core_node_modules_multiformats_dist_src_cid_cidSymbol] === true) {
+            // If value is a CID from older implementation that used to be tagged via
+            // symbol we still rebase it to the this `CID` implementation by
+            // delegating that to a constructor.
+            const { version, multihash, code } = value;
+            const digest = Digest.decode(multihash);
+            return blockstore_core_node_modules_multiformats_dist_src_cid_CID.create(version, code, digest);
         }
-        if (state === 'erroring') {
-            return promiseRejectedWith(stream._storedError);
+        else {
+            // Otherwise value is not a CID (or an incompatible version of it) in
+            // which case we return `null`.
+            return null;
         }
-        var promise = WritableStreamAddWriteRequest(stream);
-        WritableStreamDefaultControllerWrite(controller, chunk, chunkSize);
-        return promise;
     }
-    var closeSentinel = {};
     /**
-     * Allows control of a {@link WritableStream | writable stream}'s state and internal queue.
-     *
-     * @public
+     * @param version - Version of the CID
+     * @param code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
+     * @param digest - (Multi)hash of the of the content.
      */
-    var WritableStreamDefaultController = /** @class */ (function () {
-        function WritableStreamDefaultController() {
-            throw new TypeError('Illegal constructor');
+    static create(version, code, digest) {
+        if (typeof code !== 'number') {
+            throw new Error('String codecs are no longer supported');
         }
-        Object.defineProperty(WritableStreamDefaultController.prototype, "abortReason", {
-            /**
-             * The reason which was passed to `WritableStream.abort(reason)` when the stream was aborted.
-             *
-             * @deprecated
-             *  This property has been removed from the specification, see https://github.com/whatwg/streams/pull/1177.
-             *  Use {@link WritableStreamDefaultController.signal}'s `reason` instead.
-             */
-            get: function () {
-                if (!IsWritableStreamDefaultController(this)) {
-                    throw defaultControllerBrandCheckException$2('abortReason');
-                }
-                return this._abortReason;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        Object.defineProperty(WritableStreamDefaultController.prototype, "signal", {
-            /**
-             * An `AbortSignal` that can be used to abort the pending write or close operation when the stream is aborted.
-             */
-            get: function () {
-                if (!IsWritableStreamDefaultController(this)) {
-                    throw defaultControllerBrandCheckException$2('signal');
+        if (!(digest.bytes instanceof Uint8Array)) {
+            throw new Error('Invalid digest');
+        }
+        switch (version) {
+            case 0: {
+                if (code !== blockstore_core_node_modules_multiformats_dist_src_cid_DAG_PB_CODE) {
+                    throw new Error(`Version 0 CID must use dag-pb (code: ${blockstore_core_node_modules_multiformats_dist_src_cid_DAG_PB_CODE}) block encoding`);
                 }
-                if (this._abortController === undefined) {
-                    // Older browsers or older Node versions may not support `AbortController` or `AbortSignal`.
-                    // We don't want to bundle and ship an `AbortController` polyfill together with our polyfill,
-                    // so instead we only implement support for `signal` if we find a global `AbortController` constructor.
-                    throw new TypeError('WritableStreamDefaultController.prototype.signal is not supported');
+                else {
+                    return new blockstore_core_node_modules_multiformats_dist_src_cid_CID(version, code, digest, digest.bytes);
                 }
-                return this._abortController.signal;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        /**
-         * Closes the controlled writable stream, making all future interactions with it fail with the given error `e`.
-         *
-         * This method is rarely used, since usually it suffices to return a rejected promise from one of the underlying
-         * sink's methods. However, it can be useful for suddenly shutting down a stream in response to an event outside the
-         * normal lifecycle of interactions with the underlying sink.
-         */
-        WritableStreamDefaultController.prototype.error = function (e) {
-            if (e === void 0) { e = undefined; }
-            if (!IsWritableStreamDefaultController(this)) {
-                throw defaultControllerBrandCheckException$2('error');
             }
-            var state = this._controlledWritableStream._state;
-            if (state !== 'writable') {
-                // The stream is closed, errored or will be soon. The sink can't do anything useful if it gets an error here, so
-                // just treat it as a no-op.
-                return;
+            case 1: {
+                const bytes = blockstore_core_node_modules_multiformats_dist_src_cid_encodeCID(version, code, digest.bytes);
+                return new blockstore_core_node_modules_multiformats_dist_src_cid_CID(version, code, digest, bytes);
+            }
+            default: {
+                throw new Error('Invalid version');
             }
-            WritableStreamDefaultControllerError(this, e);
-        };
-        /** @internal */
-        WritableStreamDefaultController.prototype[AbortSteps] = function (reason) {
-            var result = this._abortAlgorithm(reason);
-            WritableStreamDefaultControllerClearAlgorithms(this);
-            return result;
-        };
-        /** @internal */
-        WritableStreamDefaultController.prototype[ErrorSteps] = function () {
-            ResetQueue(this);
-        };
-        return WritableStreamDefaultController;
-    }());
-    Object.defineProperties(WritableStreamDefaultController.prototype, {
-        abortReason: { enumerable: true },
-        signal: { enumerable: true },
-        error: { enumerable: true }
-    });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(WritableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
-            value: 'WritableStreamDefaultController',
-            configurable: true
-        });
-    }
-    // Abstract operations implementing interface required by the WritableStream.
-    function IsWritableStreamDefaultController(x) {
-        if (!typeIsObject(x)) {
-            return false;
-        }
-        if (!Object.prototype.hasOwnProperty.call(x, '_controlledWritableStream')) {
-            return false;
-        }
-        return x instanceof WritableStreamDefaultController;
-    }
-    function SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) {
-        controller._controlledWritableStream = stream;
-        stream._writableStreamController = controller;
-        // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.
-        controller._queue = undefined;
-        controller._queueTotalSize = undefined;
-        ResetQueue(controller);
-        controller._abortReason = undefined;
-        controller._abortController = createAbortController();
-        controller._started = false;
-        controller._strategySizeAlgorithm = sizeAlgorithm;
-        controller._strategyHWM = highWaterMark;
-        controller._writeAlgorithm = writeAlgorithm;
-        controller._closeAlgorithm = closeAlgorithm;
-        controller._abortAlgorithm = abortAlgorithm;
-        var backpressure = WritableStreamDefaultControllerGetBackpressure(controller);
-        WritableStreamUpdateBackpressure(stream, backpressure);
-        var startResult = startAlgorithm();
-        var startPromise = promiseResolvedWith(startResult);
-        uponPromise(startPromise, function () {
-            controller._started = true;
-            WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
-        }, function (r) {
-            controller._started = true;
-            WritableStreamDealWithRejection(stream, r);
-        });
-    }
-    function SetUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, highWaterMark, sizeAlgorithm) {
-        var controller = Object.create(WritableStreamDefaultController.prototype);
-        var startAlgorithm = function () { return undefined; };
-        var writeAlgorithm = function () { return promiseResolvedWith(undefined); };
-        var closeAlgorithm = function () { return promiseResolvedWith(undefined); };
-        var abortAlgorithm = function () { return promiseResolvedWith(undefined); };
-        if (underlyingSink.start !== undefined) {
-            startAlgorithm = function () { return underlyingSink.start(controller); };
-        }
-        if (underlyingSink.write !== undefined) {
-            writeAlgorithm = function (chunk) { return underlyingSink.write(chunk, controller); };
-        }
-        if (underlyingSink.close !== undefined) {
-            closeAlgorithm = function () { return underlyingSink.close(); };
-        }
-        if (underlyingSink.abort !== undefined) {
-            abortAlgorithm = function (reason) { return underlyingSink.abort(reason); };
         }
-        SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm);
     }
-    // ClearAlgorithms may be called twice. Erroring the same stream in multiple ways will often result in redundant calls.
-    function WritableStreamDefaultControllerClearAlgorithms(controller) {
-        controller._writeAlgorithm = undefined;
-        controller._closeAlgorithm = undefined;
-        controller._abortAlgorithm = undefined;
-        controller._strategySizeAlgorithm = undefined;
+    /**
+     * Simplified version of `create` for CIDv0.
+     */
+    static createV0(digest) {
+        return blockstore_core_node_modules_multiformats_dist_src_cid_CID.create(0, blockstore_core_node_modules_multiformats_dist_src_cid_DAG_PB_CODE, digest);
     }
-    function WritableStreamDefaultControllerClose(controller) {
-        EnqueueValueWithSize(controller, closeSentinel, 0);
-        WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+    /**
+     * Simplified version of `create` for CIDv1.
+     *
+     * @param code - Content encoding format code.
+     * @param digest - Multihash of the content.
+     */
+    static createV1(code, digest) {
+        return blockstore_core_node_modules_multiformats_dist_src_cid_CID.create(1, code, digest);
     }
-    function WritableStreamDefaultControllerGetChunkSize(controller, chunk) {
-        try {
-            return controller._strategySizeAlgorithm(chunk);
-        }
-        catch (chunkSizeE) {
-            WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE);
-            return 1;
+    /**
+     * Decoded a CID from its binary representation. The byte array must contain
+     * only the CID with no additional bytes.
+     *
+     * An error will be thrown if the bytes provided do not contain a valid
+     * binary representation of a CID.
+     */
+    static decode(bytes) {
+        const [cid, remainder] = blockstore_core_node_modules_multiformats_dist_src_cid_CID.decodeFirst(bytes);
+        if (remainder.length !== 0) {
+            throw new Error('Incorrect length');
         }
+        return cid;
     }
-    function WritableStreamDefaultControllerGetDesiredSize(controller) {
-        return controller._strategyHWM - controller._queueTotalSize;
+    /**
+     * Decoded a CID from its binary representation at the beginning of a byte
+     * array.
+     *
+     * Returns an array with the first element containing the CID and the second
+     * element containing the remainder of the original byte array. The remainder
+     * will be a zero-length byte array if the provided bytes only contained a
+     * binary CID representation.
+     */
+    static decodeFirst(bytes) {
+        const specs = blockstore_core_node_modules_multiformats_dist_src_cid_CID.inspectBytes(bytes);
+        const prefixSize = specs.size - specs.multihashSize;
+        const multihashBytes = coerce(bytes.subarray(prefixSize, prefixSize + specs.multihashSize));
+        if (multihashBytes.byteLength !== specs.multihashSize) {
+            throw new Error('Incorrect length');
+        }
+        const digestBytes = multihashBytes.subarray(specs.multihashSize - specs.digestSize);
+        const digest = new Digest.Digest(specs.multihashCode, specs.digestSize, digestBytes, multihashBytes);
+        const cid = specs.version === 0
+            ? blockstore_core_node_modules_multiformats_dist_src_cid_CID.createV0(digest)
+            : blockstore_core_node_modules_multiformats_dist_src_cid_CID.createV1(specs.codec, digest);
+        return [cid, bytes.subarray(specs.size)];
     }
-    function WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) {
-        try {
-            EnqueueValueWithSize(controller, chunk, chunkSize);
+    /**
+     * Inspect the initial bytes of a CID to determine its properties.
+     *
+     * Involves decoding up to 4 varints. Typically this will require only 4 to 6
+     * bytes but for larger multicodec code values and larger multihash digest
+     * lengths these varints can be quite large. It is recommended that at least
+     * 10 bytes be made available in the `initialBytes` argument for a complete
+     * inspection.
+     */
+    static inspectBytes(initialBytes) {
+        let offset = 0;
+        const next = () => {
+            const [i, length] = varint.decode(initialBytes.subarray(offset));
+            offset += length;
+            return i;
+        };
+        let version = next();
+        let codec = blockstore_core_node_modules_multiformats_dist_src_cid_DAG_PB_CODE;
+        if (version === 18) {
+            // CIDv0
+            version = 0;
+            offset = 0;
         }
-        catch (enqueueE) {
-            WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE);
-            return;
+        else {
+            codec = next();
         }
-        var stream = controller._controlledWritableStream;
-        if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._state === 'writable') {
-            var backpressure = WritableStreamDefaultControllerGetBackpressure(controller);
-            WritableStreamUpdateBackpressure(stream, backpressure);
+        if (version !== 0 && version !== 1) {
+            throw new RangeError(`Invalid CID version ${version}`);
         }
-        WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
+        const prefixSize = offset;
+        const multihashCode = next(); // multihash code
+        const digestSize = next(); // multihash length
+        const size = offset + digestSize;
+        const multihashSize = size - prefixSize;
+        return { version, codec, multihashCode, digestSize, multihashSize, size };
     }
-    // Abstract operations for the WritableStreamDefaultController.
-    function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) {
-        var stream = controller._controlledWritableStream;
-        if (!controller._started) {
-            return;
-        }
-        if (stream._inFlightWriteRequest !== undefined) {
-            return;
-        }
-        var state = stream._state;
-        if (state === 'erroring') {
-            WritableStreamFinishErroring(stream);
-            return;
+    /**
+     * Takes cid in a string representation and creates an instance. If `base`
+     * decoder is not provided will use a default from the configuration. It will
+     * throw an error if encoding of the CID is not compatible with supplied (or
+     * a default decoder).
+     */
+    static parse(source, base) {
+        const [prefix, bytes] = blockstore_core_node_modules_multiformats_dist_src_cid_parseCIDtoBytes(source, base);
+        const cid = blockstore_core_node_modules_multiformats_dist_src_cid_CID.decode(bytes);
+        if (cid.version === 0 && source[0] !== 'Q') {
+            throw Error('Version 0 CID string must not include multibase prefix');
+        }
+        // Cache string representation to avoid computing it on `this.toString()`
+        blockstore_core_node_modules_multiformats_dist_src_cid_baseCache(cid).set(prefix, source);
+        return cid;
+    }
+}
+function blockstore_core_node_modules_multiformats_dist_src_cid_parseCIDtoBytes(source, base) {
+    switch (source[0]) {
+        // CIDv0 is parsed differently
+        case 'Q': {
+            const decoder = base ?? base58btc;
+            return [
+                base58btc.prefix,
+                decoder.decode(`${base58btc.prefix}${source}`)
+            ];
         }
-        if (controller._queue.length === 0) {
-            return;
+        case base58btc.prefix: {
+            const decoder = base ?? base58btc;
+            return [base58btc.prefix, decoder.decode(source)];
         }
-        var value = PeekQueueValue(controller);
-        if (value === closeSentinel) {
-            WritableStreamDefaultControllerProcessClose(controller);
+        case base32.prefix: {
+            const decoder = base ?? base32;
+            return [base32.prefix, decoder.decode(source)];
         }
-        else {
-            WritableStreamDefaultControllerProcessWrite(controller, value);
+        default: {
+            if (base == null) {
+                throw Error('To parse non base32 or base58btc encoded CID multibase decoder must be provided');
+            }
+            return [source[0], base.decode(source)];
         }
     }
-    function WritableStreamDefaultControllerErrorIfNeeded(controller, error) {
-        if (controller._controlledWritableStream._state === 'writable') {
-            WritableStreamDefaultControllerError(controller, error);
+}
+function blockstore_core_node_modules_multiformats_dist_src_cid_toStringV0(bytes, cache, base) {
+    const { prefix } = base;
+    if (prefix !== base58btc.prefix) {
+        throw Error(`Cannot string encode V0 in ${base.name} encoding`);
+    }
+    const cid = cache.get(prefix);
+    if (cid == null) {
+        const cid = base.encode(bytes).slice(1);
+        cache.set(prefix, cid);
+        return cid;
+    }
+    else {
+        return cid;
+    }
+}
+function blockstore_core_node_modules_multiformats_dist_src_cid_toStringV1(bytes, cache, base) {
+    const { prefix } = base;
+    const cid = cache.get(prefix);
+    if (cid == null) {
+        const cid = base.encode(bytes);
+        cache.set(prefix, cid);
+        return cid;
+    }
+    else {
+        return cid;
+    }
+}
+const blockstore_core_node_modules_multiformats_dist_src_cid_DAG_PB_CODE = 0x70;
+const blockstore_core_node_modules_multiformats_dist_src_cid_SHA_256_CODE = 0x12;
+function blockstore_core_node_modules_multiformats_dist_src_cid_encodeCID(version, code, multihash) {
+    const codeOffset = varint.encodingLength(version);
+    const hashOffset = codeOffset + varint.encodingLength(code);
+    const bytes = new Uint8Array(hashOffset + multihash.byteLength);
+    varint.encodeTo(version, bytes, 0);
+    varint.encodeTo(code, bytes, codeOffset);
+    bytes.set(multihash, hashOffset);
+    return bytes;
+}
+const blockstore_core_node_modules_multiformats_dist_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID');
+//# sourceMappingURL=cid.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats/dist/src/codecs/raw.js
+
+const node_modules_multiformats_dist_src_codecs_raw_name = 'raw';
+const node_modules_multiformats_dist_src_codecs_raw_code = 0x55;
+function node_modules_multiformats_dist_src_codecs_raw_encode(node) {
+    return coerce(node);
+}
+function node_modules_multiformats_dist_src_codecs_raw_decode(data) {
+    return coerce(data);
+}
+//# sourceMappingURL=raw.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/dist/src/memory.js
+
+
+
+
+
+
+class MemoryBlockstore extends (/* unused pure expression or super */ null && (BaseBlockstore)) {
+    data;
+    constructor() {
+        super();
+        this.data = new Map();
+    }
+    put(key, val) {
+        this.data.set(base32.encode(key.multihash.bytes), val);
+        return key;
+    }
+    get(key) {
+        const buf = this.data.get(base32.encode(key.multihash.bytes));
+        if (buf == null) {
+            throw Errors.notFoundError();
         }
+        return buf;
     }
-    function WritableStreamDefaultControllerProcessClose(controller) {
-        var stream = controller._controlledWritableStream;
-        WritableStreamMarkCloseRequestInFlight(stream);
-        DequeueValue(controller);
-        var sinkClosePromise = controller._closeAlgorithm();
-        WritableStreamDefaultControllerClearAlgorithms(controller);
-        uponPromise(sinkClosePromise, function () {
-            WritableStreamFinishInFlightClose(stream);
-        }, function (reason) {
-            WritableStreamFinishInFlightCloseWithError(stream, reason);
-        });
+    has(key) {
+        return this.data.has(base32.encode(key.multihash.bytes));
     }
-    function WritableStreamDefaultControllerProcessWrite(controller, chunk) {
-        var stream = controller._controlledWritableStream;
-        WritableStreamMarkFirstWriteRequestInFlight(stream);
-        var sinkWritePromise = controller._writeAlgorithm(chunk);
-        uponPromise(sinkWritePromise, function () {
-            WritableStreamFinishInFlightWrite(stream);
-            var state = stream._state;
-            DequeueValue(controller);
-            if (!WritableStreamCloseQueuedOrInFlight(stream) && state === 'writable') {
-                var backpressure = WritableStreamDefaultControllerGetBackpressure(controller);
-                WritableStreamUpdateBackpressure(stream, backpressure);
-            }
-            WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);
-        }, function (reason) {
-            if (stream._state === 'writable') {
-                WritableStreamDefaultControllerClearAlgorithms(controller);
-            }
-            WritableStreamFinishInFlightWriteWithError(stream, reason);
-        });
+    async delete(key) {
+        this.data.delete(base32.encode(key.multihash.bytes));
     }
-    function WritableStreamDefaultControllerGetBackpressure(controller) {
-        var desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller);
-        return desiredSize <= 0;
+    async *getAll() {
+        for (const [key, value] of this.data.entries()) {
+            yield {
+                cid: CID.createV1(raw.code, Digest.decode(base32.decode(key))),
+                block: value
+            };
+        }
     }
-    // A client of WritableStreamDefaultController may use these functions directly to bypass state check.
-    function WritableStreamDefaultControllerError(controller, error) {
-        var stream = controller._controlledWritableStream;
-        WritableStreamDefaultControllerClearAlgorithms(controller);
-        WritableStreamStartErroring(stream, error);
+}
+//# sourceMappingURL=memory.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/dist/src/black-hole.js
+
+
+class BlackHoleBlockstore extends (/* unused pure expression or super */ null && (BaseBlockstore)) {
+    put(key) {
+        return key;
     }
-    // Helper functions for the WritableStream.
-    function streamBrandCheckException$2(name) {
-        return new TypeError("WritableStream.prototype." + name + " can only be used on a WritableStream");
+    get() {
+        throw Errors.notFoundError();
     }
-    // Helper functions for the WritableStreamDefaultController.
-    function defaultControllerBrandCheckException$2(name) {
-        return new TypeError("WritableStreamDefaultController.prototype." + name + " can only be used on a WritableStreamDefaultController");
+    has() {
+        return false;
     }
-    // Helper functions for the WritableStreamDefaultWriter.
-    function defaultWriterBrandCheckException(name) {
-        return new TypeError("WritableStreamDefaultWriter.prototype." + name + " can only be used on a WritableStreamDefaultWriter");
+    async delete() {
     }
-    function defaultWriterLockException(name) {
-        return new TypeError('Cannot ' + name + ' a stream using a released writer');
+    async *getAll() {
     }
-    function defaultWriterClosedPromiseInitialize(writer) {
-        writer._closedPromise = newPromise(function (resolve, reject) {
-            writer._closedPromise_resolve = resolve;
-            writer._closedPromise_reject = reject;
-            writer._closedPromiseState = 'pending';
-        });
+}
+//# sourceMappingURL=black-hole.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/vendor/base-x.js
+// base-x encoding / decoding
+// Copyright (c) 2018 base-x contributors
+// Copyright (c) 2014-2018 The Bitcoin Core developers (base58.cpp)
+// Distributed under the MIT software license, see the accompanying
+// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
+function blockstore_fs_node_modules_multiformats_vendor_base_x_base (ALPHABET, name) {
+  if (ALPHABET.length >= 255) { throw new TypeError('Alphabet too long') }
+  var BASE_MAP = new Uint8Array(256);
+  for (var j = 0; j < BASE_MAP.length; j++) {
+    BASE_MAP[j] = 255;
+  }
+  for (var i = 0; i < ALPHABET.length; i++) {
+    var x = ALPHABET.charAt(i);
+    var xc = x.charCodeAt(0);
+    if (BASE_MAP[xc] !== 255) { throw new TypeError(x + ' is ambiguous') }
+    BASE_MAP[xc] = i;
+  }
+  var BASE = ALPHABET.length;
+  var LEADER = ALPHABET.charAt(0);
+  var FACTOR = Math.log(BASE) / Math.log(256); // log(BASE) / log(256), rounded up
+  var iFACTOR = Math.log(256) / Math.log(BASE); // log(256) / log(BASE), rounded up
+  function encode (source) {
+    if (source instanceof Uint8Array) ; else if (ArrayBuffer.isView(source)) {
+      source = new Uint8Array(source.buffer, source.byteOffset, source.byteLength);
+    } else if (Array.isArray(source)) {
+      source = Uint8Array.from(source);
     }
-    function defaultWriterClosedPromiseInitializeAsRejected(writer, reason) {
-        defaultWriterClosedPromiseInitialize(writer);
-        defaultWriterClosedPromiseReject(writer, reason);
+    if (!(source instanceof Uint8Array)) { throw new TypeError('Expected Uint8Array') }
+    if (source.length === 0) { return '' }
+        // Skip & count leading zeroes.
+    var zeroes = 0;
+    var length = 0;
+    var pbegin = 0;
+    var pend = source.length;
+    while (pbegin !== pend && source[pbegin] === 0) {
+      pbegin++;
+      zeroes++;
     }
-    function defaultWriterClosedPromiseInitializeAsResolved(writer) {
-        defaultWriterClosedPromiseInitialize(writer);
-        defaultWriterClosedPromiseResolve(writer);
+        // Allocate enough space in big-endian base58 representation.
+    var size = ((pend - pbegin) * iFACTOR + 1) >>> 0;
+    var b58 = new Uint8Array(size);
+        // Process the bytes.
+    while (pbegin !== pend) {
+      var carry = source[pbegin];
+            // Apply "b58 = b58 * 256 + ch".
+      var i = 0;
+      for (var it1 = size - 1; (carry !== 0 || i < length) && (it1 !== -1); it1--, i++) {
+        carry += (256 * b58[it1]) >>> 0;
+        b58[it1] = (carry % BASE) >>> 0;
+        carry = (carry / BASE) >>> 0;
+      }
+      if (carry !== 0) { throw new Error('Non-zero carry') }
+      length = i;
+      pbegin++;
     }
-    function defaultWriterClosedPromiseReject(writer, reason) {
-        if (writer._closedPromise_reject === undefined) {
-            return;
-        }
-        setPromiseIsHandledToTrue(writer._closedPromise);
-        writer._closedPromise_reject(reason);
-        writer._closedPromise_resolve = undefined;
-        writer._closedPromise_reject = undefined;
-        writer._closedPromiseState = 'rejected';
+        // Skip leading zeroes in base58 result.
+    var it2 = size - length;
+    while (it2 !== size && b58[it2] === 0) {
+      it2++;
     }
-    function defaultWriterClosedPromiseResetToRejected(writer, reason) {
-        defaultWriterClosedPromiseInitializeAsRejected(writer, reason);
+        // Translate the result into a string.
+    var str = LEADER.repeat(zeroes);
+    for (; it2 < size; ++it2) { str += ALPHABET.charAt(b58[it2]); }
+    return str
+  }
+  function decodeUnsafe (source) {
+    if (typeof source !== 'string') { throw new TypeError('Expected String') }
+    if (source.length === 0) { return new Uint8Array() }
+    var psz = 0;
+        // Skip leading spaces.
+    if (source[psz] === ' ') { return }
+        // Skip and count leading '1's.
+    var zeroes = 0;
+    var length = 0;
+    while (source[psz] === LEADER) {
+      zeroes++;
+      psz++;
     }
-    function defaultWriterClosedPromiseResolve(writer) {
-        if (writer._closedPromise_resolve === undefined) {
-            return;
-        }
-        writer._closedPromise_resolve(undefined);
-        writer._closedPromise_resolve = undefined;
-        writer._closedPromise_reject = undefined;
-        writer._closedPromiseState = 'resolved';
+        // Allocate enough space in big-endian base256 representation.
+    var size = (((source.length - psz) * FACTOR) + 1) >>> 0; // log(58) / log(256), rounded up.
+    var b256 = new Uint8Array(size);
+        // Process the characters.
+    while (source[psz]) {
+            // Decode character
+      var carry = BASE_MAP[source.charCodeAt(psz)];
+            // Invalid character
+      if (carry === 255) { return }
+      var i = 0;
+      for (var it3 = size - 1; (carry !== 0 || i < length) && (it3 !== -1); it3--, i++) {
+        carry += (BASE * b256[it3]) >>> 0;
+        b256[it3] = (carry % 256) >>> 0;
+        carry = (carry / 256) >>> 0;
+      }
+      if (carry !== 0) { throw new Error('Non-zero carry') }
+      length = i;
+      psz++;
     }
-    function defaultWriterReadyPromiseInitialize(writer) {
-        writer._readyPromise = newPromise(function (resolve, reject) {
-            writer._readyPromise_resolve = resolve;
-            writer._readyPromise_reject = reject;
-        });
-        writer._readyPromiseState = 'pending';
+        // Skip trailing spaces.
+    if (source[psz] === ' ') { return }
+        // Skip leading zeroes in b256.
+    var it4 = size - length;
+    while (it4 !== size && b256[it4] === 0) {
+      it4++;
     }
-    function defaultWriterReadyPromiseInitializeAsRejected(writer, reason) {
-        defaultWriterReadyPromiseInitialize(writer);
-        defaultWriterReadyPromiseReject(writer, reason);
+    var vch = new Uint8Array(zeroes + (size - it4));
+    var j = zeroes;
+    while (it4 !== size) {
+      vch[j++] = b256[it4++];
     }
-    function defaultWriterReadyPromiseInitializeAsResolved(writer) {
-        defaultWriterReadyPromiseInitialize(writer);
-        defaultWriterReadyPromiseResolve(writer);
+    return vch
+  }
+  function decode (string) {
+    var buffer = decodeUnsafe(string);
+    if (buffer) { return buffer }
+    throw new Error(`Non-${name} character`)
+  }
+  return {
+    encode: encode,
+    decodeUnsafe: decodeUnsafe,
+    decode: decode
+  }
+}
+var blockstore_fs_node_modules_multiformats_vendor_base_x_src = blockstore_fs_node_modules_multiformats_vendor_base_x_base;
+
+var blockstore_fs_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX = blockstore_fs_node_modules_multiformats_vendor_base_x_src;
+
+/* harmony default export */ const blockstore_fs_node_modules_multiformats_vendor_base_x = (blockstore_fs_node_modules_multiformats_vendor_base_x_brrp_multiformats_scope_baseX);
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/src/bytes.js
+const blockstore_fs_node_modules_multiformats_src_bytes_empty = new Uint8Array(0)
+
+/**
+ * @param {Uint8Array} d
+ */
+const blockstore_fs_node_modules_multiformats_src_bytes_toHex = d => d.reduce((hex, byte) => hex + byte.toString(16).padStart(2, '0'), '')
+
+/**
+ * @param {string} hex
+ */
+const blockstore_fs_node_modules_multiformats_src_bytes_fromHex = hex => {
+  const hexes = hex.match(/../g)
+  return hexes ? new Uint8Array(hexes.map(b => parseInt(b, 16))) : blockstore_fs_node_modules_multiformats_src_bytes_empty
+}
+
+/**
+ * @param {Uint8Array} aa
+ * @param {Uint8Array} bb
+ */
+const blockstore_fs_node_modules_multiformats_src_bytes_equals = (aa, bb) => {
+  if (aa === bb) return true
+  if (aa.byteLength !== bb.byteLength) {
+    return false
+  }
+
+  for (let ii = 0; ii < aa.byteLength; ii++) {
+    if (aa[ii] !== bb[ii]) {
+      return false
     }
-    function defaultWriterReadyPromiseReject(writer, reason) {
-        if (writer._readyPromise_reject === undefined) {
-            return;
-        }
-        setPromiseIsHandledToTrue(writer._readyPromise);
-        writer._readyPromise_reject(reason);
-        writer._readyPromise_resolve = undefined;
-        writer._readyPromise_reject = undefined;
-        writer._readyPromiseState = 'rejected';
+  }
+
+  return true
+}
+
+/**
+ * @param {ArrayBufferView|ArrayBuffer|Uint8Array} o
+ * @returns {Uint8Array}
+ */
+const blockstore_fs_node_modules_multiformats_src_bytes_coerce = o => {
+  if (o instanceof Uint8Array && o.constructor.name === 'Uint8Array') return o
+  if (o instanceof ArrayBuffer) return new Uint8Array(o)
+  if (ArrayBuffer.isView(o)) {
+    return new Uint8Array(o.buffer, o.byteOffset, o.byteLength)
+  }
+  throw new Error('Unknown type, must be binary type')
+}
+
+/**
+ * @param {any} o
+ * @returns {o is ArrayBuffer|ArrayBufferView}
+ */
+const blockstore_fs_node_modules_multiformats_src_bytes_isBinary = o =>
+  o instanceof ArrayBuffer || ArrayBuffer.isView(o)
+
+/**
+ * @param {string} str
+ * @returns {Uint8Array}
+ */
+const blockstore_fs_node_modules_multiformats_src_bytes_fromString = str => (new TextEncoder()).encode(str)
+
+/**
+ * @param {Uint8Array} b
+ * @returns {string}
+ */
+const blockstore_fs_node_modules_multiformats_src_bytes_toString = b => (new TextDecoder()).decode(b)
+
+
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/src/bases/base.js
+
+
+// Linter can't see that API is used in types.
+// eslint-disable-next-line
+
+
+/**
+ * Class represents both BaseEncoder and MultibaseEncoder meaning it
+ * can be used to encode to multibase or base encode without multibase
+ * prefix.
+ *
+ * @class
+ * @template {string} Base
+ * @template {string} Prefix
+ * @implements {API.MultibaseEncoder}
+ * @implements {API.BaseEncoder}
+ */
+class blockstore_fs_node_modules_multiformats_src_bases_base_Encoder {
+  /**
+   * @param {Base} name
+   * @param {Prefix} prefix
+   * @param {(bytes:Uint8Array) => string} baseEncode
+   */
+  constructor (name, prefix, baseEncode) {
+    this.name = name
+    this.prefix = prefix
+    this.baseEncode = baseEncode
+  }
+
+  /**
+   * @param {Uint8Array} bytes
+   * @returns {API.Multibase}
+   */
+  encode (bytes) {
+    if (bytes instanceof Uint8Array) {
+      return `${this.prefix}${this.baseEncode(bytes)}`
+    } else {
+      throw Error('Unknown type, must be binary type')
     }
-    function defaultWriterReadyPromiseReset(writer) {
-        defaultWriterReadyPromiseInitialize(writer);
+  }
+}
+
+/**
+ * @template {string} Prefix
+ */
+/**
+ * Class represents both BaseDecoder and MultibaseDecoder so it could be used
+ * to decode multibases (with matching prefix) or just base decode strings
+ * with corresponding base encoding.
+ *
+ * @class
+ * @template {string} Base
+ * @template {string} Prefix
+ * @implements {API.MultibaseDecoder}
+ * @implements {API.UnibaseDecoder}
+ * @implements {API.BaseDecoder}
+ */
+class blockstore_fs_node_modules_multiformats_src_bases_base_Decoder {
+  /**
+   * @param {Base} name
+   * @param {Prefix} prefix
+   * @param {(text:string) => Uint8Array} baseDecode
+   */
+  constructor (name, prefix, baseDecode) {
+    this.name = name
+    this.prefix = prefix
+    /* c8 ignore next 3 */
+    if (prefix.codePointAt(0) === undefined) {
+      throw new Error('Invalid prefix character')
     }
-    function defaultWriterReadyPromiseResetToRejected(writer, reason) {
-        defaultWriterReadyPromiseInitializeAsRejected(writer, reason);
+    /** @private */
+    this.prefixCodePoint = /** @type {number} */ (prefix.codePointAt(0))
+    this.baseDecode = baseDecode
+  }
+
+  /**
+   * @param {string} text
+   */
+  decode (text) {
+    if (typeof text === 'string') {
+      if (text.codePointAt(0) !== this.prefixCodePoint) {
+        throw Error(`Unable to decode multibase string ${JSON.stringify(text)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`)
+      }
+      return this.baseDecode(text.slice(this.prefix.length))
+    } else {
+      throw Error('Can only multibase decode strings')
     }
-    function defaultWriterReadyPromiseResolve(writer) {
-        if (writer._readyPromise_resolve === undefined) {
-            return;
-        }
-        writer._readyPromise_resolve(undefined);
-        writer._readyPromise_resolve = undefined;
-        writer._readyPromise_reject = undefined;
-        writer._readyPromiseState = 'fulfilled';
+  }
+
+  /**
+   * @template {string} OtherPrefix
+   * @param {API.UnibaseDecoder|ComposedDecoder} decoder
+   * @returns {ComposedDecoder}
+   */
+  or (decoder) {
+    return blockstore_fs_node_modules_multiformats_src_bases_base_or(this, decoder)
+  }
+}
+
+/**
+ * @template {string} Prefix
+ * @typedef {Record>} Decoders
+ */
+
+/**
+ * @template {string} Prefix
+ * @implements {API.MultibaseDecoder}
+ * @implements {API.CombobaseDecoder}
+ */
+class blockstore_fs_node_modules_multiformats_src_bases_base_ComposedDecoder {
+  /**
+   * @param {Decoders} decoders
+   */
+  constructor (decoders) {
+    this.decoders = decoders
+  }
+
+  /**
+   * @template {string} OtherPrefix
+   * @param {API.UnibaseDecoder|ComposedDecoder} decoder
+   * @returns {ComposedDecoder}
+   */
+  or (decoder) {
+    return blockstore_fs_node_modules_multiformats_src_bases_base_or(this, decoder)
+  }
+
+  /**
+   * @param {string} input
+   * @returns {Uint8Array}
+   */
+  decode (input) {
+    const prefix = /** @type {Prefix} */ (input[0])
+    const decoder = this.decoders[prefix]
+    if (decoder) {
+      return decoder.decode(input)
+    } else {
+      throw RangeError(`Unable to decode multibase string ${JSON.stringify(input)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)
     }
+  }
+}
 
-    /// 
-    var NativeDOMException = typeof DOMException !== 'undefined' ? DOMException : undefined;
+/**
+ * @template {string} L
+ * @template {string} R
+ * @param {API.UnibaseDecoder|API.CombobaseDecoder} left
+ * @param {API.UnibaseDecoder|API.CombobaseDecoder} right
+ * @returns {ComposedDecoder}
+ */
+const blockstore_fs_node_modules_multiformats_src_bases_base_or = (left, right) => new blockstore_fs_node_modules_multiformats_src_bases_base_ComposedDecoder(/** @type {Decoders} */({
+  ...(left.decoders || { [/** @type API.UnibaseDecoder */(left).prefix]: left }),
+  ...(right.decoders || { [/** @type API.UnibaseDecoder */(right).prefix]: right })
+}))
 
-    /// 
-    function isDOMExceptionConstructor(ctor) {
-        if (!(typeof ctor === 'function' || typeof ctor === 'object')) {
-            return false;
-        }
-        try {
-            new ctor();
-            return true;
-        }
-        catch (_a) {
-            return false;
-        }
+/**
+ * @class
+ * @template {string} Base
+ * @template {string} Prefix
+ * @implements {API.MultibaseCodec}
+ * @implements {API.MultibaseEncoder}
+ * @implements {API.MultibaseDecoder}
+ * @implements {API.BaseCodec}
+ * @implements {API.BaseEncoder}
+ * @implements {API.BaseDecoder}
+ */
+class blockstore_fs_node_modules_multiformats_src_bases_base_Codec {
+  /**
+   * @param {Base} name
+   * @param {Prefix} prefix
+   * @param {(bytes:Uint8Array) => string} baseEncode
+   * @param {(text:string) => Uint8Array} baseDecode
+   */
+  constructor (name, prefix, baseEncode, baseDecode) {
+    this.name = name
+    this.prefix = prefix
+    this.baseEncode = baseEncode
+    this.baseDecode = baseDecode
+    this.encoder = new blockstore_fs_node_modules_multiformats_src_bases_base_Encoder(name, prefix, baseEncode)
+    this.decoder = new blockstore_fs_node_modules_multiformats_src_bases_base_Decoder(name, prefix, baseDecode)
+  }
+
+  /**
+   * @param {Uint8Array} input
+   */
+  encode (input) {
+    return this.encoder.encode(input)
+  }
+
+  /**
+   * @param {string} input
+   */
+  decode (input) {
+    return this.decoder.decode(input)
+  }
+}
+
+/**
+ * @template {string} Base
+ * @template {string} Prefix
+ * @param {object} options
+ * @param {Base} options.name
+ * @param {Prefix} options.prefix
+ * @param {(bytes:Uint8Array) => string} options.encode
+ * @param {(input:string) => Uint8Array} options.decode
+ * @returns {Codec}
+ */
+const blockstore_fs_node_modules_multiformats_src_bases_base_from = ({ name, prefix, encode, decode }) =>
+  new blockstore_fs_node_modules_multiformats_src_bases_base_Codec(name, prefix, encode, decode)
+
+/**
+ * @template {string} Base
+ * @template {string} Prefix
+ * @param {object} options
+ * @param {Base} options.name
+ * @param {Prefix} options.prefix
+ * @param {string} options.alphabet
+ * @returns {Codec}
+ */
+const blockstore_fs_node_modules_multiformats_src_bases_base_baseX = ({ prefix, name, alphabet }) => {
+  const { encode, decode } = blockstore_fs_node_modules_multiformats_vendor_base_x(alphabet, name)
+  return blockstore_fs_node_modules_multiformats_src_bases_base_from({
+    prefix,
+    name,
+    encode,
+    /**
+     * @param {string} text
+     */
+    decode: text => blockstore_fs_node_modules_multiformats_src_bytes_coerce(decode(text))
+  })
+}
+
+/**
+ * @param {string} string
+ * @param {string} alphabet
+ * @param {number} bitsPerChar
+ * @param {string} name
+ * @returns {Uint8Array}
+ */
+const blockstore_fs_node_modules_multiformats_src_bases_base_decode = (string, alphabet, bitsPerChar, name) => {
+  // Build the character lookup table:
+  /** @type {Record} */
+  const codes = {}
+  for (let i = 0; i < alphabet.length; ++i) {
+    codes[alphabet[i]] = i
+  }
+
+  // Count the padding bytes:
+  let end = string.length
+  while (string[end - 1] === '=') {
+    --end
+  }
+
+  // Allocate the output:
+  const out = new Uint8Array((end * bitsPerChar / 8) | 0)
+
+  // Parse the data:
+  let bits = 0 // Number of bits currently in the buffer
+  let buffer = 0 // Bits waiting to be written out, MSB first
+  let written = 0 // Next byte to write
+  for (let i = 0; i < end; ++i) {
+    // Read one character from the string:
+    const value = codes[string[i]]
+    if (value === undefined) {
+      throw new SyntaxError(`Non-${name} character`)
     }
-    function createDOMExceptionPolyfill() {
-        // eslint-disable-next-line no-shadow
-        var ctor = function DOMException(message, name) {
-            this.message = message || '';
-            this.name = name || 'Error';
-            if (Error.captureStackTrace) {
-                Error.captureStackTrace(this, this.constructor);
-            }
-        };
-        ctor.prototype = Object.create(Error.prototype);
-        Object.defineProperty(ctor.prototype, 'constructor', { value: ctor, writable: true, configurable: true });
-        return ctor;
+
+    // Append the bits to the buffer:
+    buffer = (buffer << bitsPerChar) | value
+    bits += bitsPerChar
+
+    // Write out some bits if the buffer has a byte's worth:
+    if (bits >= 8) {
+      bits -= 8
+      out[written++] = 0xff & (buffer >> bits)
     }
-    // eslint-disable-next-line no-redeclare
-    var DOMException$1 = isDOMExceptionConstructor(NativeDOMException) ? NativeDOMException : createDOMExceptionPolyfill();
+  }
 
-    function ReadableStreamPipeTo(source, dest, preventClose, preventAbort, preventCancel, signal) {
-        var reader = AcquireReadableStreamDefaultReader(source);
-        var writer = AcquireWritableStreamDefaultWriter(dest);
-        source._disturbed = true;
-        var shuttingDown = false;
-        // This is used to keep track of the spec's requirement that we wait for ongoing writes during shutdown.
-        var currentWrite = promiseResolvedWith(undefined);
-        return newPromise(function (resolve, reject) {
-            var abortAlgorithm;
-            if (signal !== undefined) {
-                abortAlgorithm = function () {
-                    var error = new DOMException$1('Aborted', 'AbortError');
-                    var actions = [];
-                    if (!preventAbort) {
-                        actions.push(function () {
-                            if (dest._state === 'writable') {
-                                return WritableStreamAbort(dest, error);
-                            }
-                            return promiseResolvedWith(undefined);
-                        });
-                    }
-                    if (!preventCancel) {
-                        actions.push(function () {
-                            if (source._state === 'readable') {
-                                return ReadableStreamCancel(source, error);
-                            }
-                            return promiseResolvedWith(undefined);
-                        });
-                    }
-                    shutdownWithAction(function () { return Promise.all(actions.map(function (action) { return action(); })); }, true, error);
-                };
-                if (signal.aborted) {
-                    abortAlgorithm();
-                    return;
-                }
-                signal.addEventListener('abort', abortAlgorithm);
-            }
-            // Using reader and writer, read all chunks from this and write them to dest
-            // - Backpressure must be enforced
-            // - Shutdown must stop all activity
-            function pipeLoop() {
-                return newPromise(function (resolveLoop, rejectLoop) {
-                    function next(done) {
-                        if (done) {
-                            resolveLoop();
-                        }
-                        else {
-                            // Use `PerformPromiseThen` instead of `uponPromise` to avoid
-                            // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers
-                            PerformPromiseThen(pipeStep(), next, rejectLoop);
-                        }
-                    }
-                    next(false);
-                });
-            }
-            function pipeStep() {
-                if (shuttingDown) {
-                    return promiseResolvedWith(true);
-                }
-                return PerformPromiseThen(writer._readyPromise, function () {
-                    return newPromise(function (resolveRead, rejectRead) {
-                        ReadableStreamDefaultReaderRead(reader, {
-                            _chunkSteps: function (chunk) {
-                                currentWrite = PerformPromiseThen(WritableStreamDefaultWriterWrite(writer, chunk), undefined, noop);
-                                resolveRead(false);
-                            },
-                            _closeSteps: function () { return resolveRead(true); },
-                            _errorSteps: rejectRead
-                        });
-                    });
-                });
-            }
-            // Errors must be propagated forward
-            isOrBecomesErrored(source, reader._closedPromise, function (storedError) {
-                if (!preventAbort) {
-                    shutdownWithAction(function () { return WritableStreamAbort(dest, storedError); }, true, storedError);
-                }
-                else {
-                    shutdown(true, storedError);
-                }
-            });
-            // Errors must be propagated backward
-            isOrBecomesErrored(dest, writer._closedPromise, function (storedError) {
-                if (!preventCancel) {
-                    shutdownWithAction(function () { return ReadableStreamCancel(source, storedError); }, true, storedError);
-                }
-                else {
-                    shutdown(true, storedError);
-                }
-            });
-            // Closing must be propagated forward
-            isOrBecomesClosed(source, reader._closedPromise, function () {
-                if (!preventClose) {
-                    shutdownWithAction(function () { return WritableStreamDefaultWriterCloseWithErrorPropagation(writer); });
-                }
-                else {
-                    shutdown();
-                }
-            });
-            // Closing must be propagated backward
-            if (WritableStreamCloseQueuedOrInFlight(dest) || dest._state === 'closed') {
-                var destClosed_1 = new TypeError('the destination writable stream closed before all data could be piped to it');
-                if (!preventCancel) {
-                    shutdownWithAction(function () { return ReadableStreamCancel(source, destClosed_1); }, true, destClosed_1);
-                }
-                else {
-                    shutdown(true, destClosed_1);
-                }
-            }
-            setPromiseIsHandledToTrue(pipeLoop());
-            function waitForWritesToFinish() {
-                // Another write may have started while we were waiting on this currentWrite, so we have to be sure to wait
-                // for that too.
-                var oldCurrentWrite = currentWrite;
-                return PerformPromiseThen(currentWrite, function () { return oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined; });
-            }
-            function isOrBecomesErrored(stream, promise, action) {
-                if (stream._state === 'errored') {
-                    action(stream._storedError);
-                }
-                else {
-                    uponRejection(promise, action);
-                }
-            }
-            function isOrBecomesClosed(stream, promise, action) {
-                if (stream._state === 'closed') {
-                    action();
-                }
-                else {
-                    uponFulfillment(promise, action);
-                }
-            }
-            function shutdownWithAction(action, originalIsError, originalError) {
-                if (shuttingDown) {
-                    return;
-                }
-                shuttingDown = true;
-                if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) {
-                    uponFulfillment(waitForWritesToFinish(), doTheRest);
-                }
-                else {
-                    doTheRest();
-                }
-                function doTheRest() {
-                    uponPromise(action(), function () { return finalize(originalIsError, originalError); }, function (newError) { return finalize(true, newError); });
-                }
-            }
-            function shutdown(isError, error) {
-                if (shuttingDown) {
-                    return;
-                }
-                shuttingDown = true;
-                if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) {
-                    uponFulfillment(waitForWritesToFinish(), function () { return finalize(isError, error); });
-                }
-                else {
-                    finalize(isError, error);
-                }
-            }
-            function finalize(isError, error) {
-                WritableStreamDefaultWriterRelease(writer);
-                ReadableStreamReaderGenericRelease(reader);
-                if (signal !== undefined) {
-                    signal.removeEventListener('abort', abortAlgorithm);
-                }
-                if (isError) {
-                    reject(error);
-                }
-                else {
-                    resolve(undefined);
-                }
-            }
-        });
+  // Verify that we have received just enough bits:
+  if (bits >= bitsPerChar || 0xff & (buffer << (8 - bits))) {
+    throw new SyntaxError('Unexpected end of data')
+  }
+
+  return out
+}
+
+/**
+ * @param {Uint8Array} data
+ * @param {string} alphabet
+ * @param {number} bitsPerChar
+ * @returns {string}
+ */
+const blockstore_fs_node_modules_multiformats_src_bases_base_encode = (data, alphabet, bitsPerChar) => {
+  const pad = alphabet[alphabet.length - 1] === '='
+  const mask = (1 << bitsPerChar) - 1
+  let out = ''
+
+  let bits = 0 // Number of bits currently in the buffer
+  let buffer = 0 // Bits waiting to be written out, MSB first
+  for (let i = 0; i < data.length; ++i) {
+    // Slurp data into the buffer:
+    buffer = (buffer << 8) | data[i]
+    bits += 8
+
+    // Write out as much as we can:
+    while (bits > bitsPerChar) {
+      bits -= bitsPerChar
+      out += alphabet[mask & (buffer >> bits)]
+    }
+  }
+
+  // Partial character:
+  if (bits) {
+    out += alphabet[mask & (buffer << (bitsPerChar - bits))]
+  }
+
+  // Add padding characters until we hit a byte boundary:
+  if (pad) {
+    while ((out.length * bitsPerChar) & 7) {
+      out += '='
+    }
+  }
+
+  return out
+}
+
+/**
+ * RFC4648 Factory
+ *
+ * @template {string} Base
+ * @template {string} Prefix
+ * @param {object} options
+ * @param {Base} options.name
+ * @param {Prefix} options.prefix
+ * @param {string} options.alphabet
+ * @param {number} options.bitsPerChar
+ */
+const blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648 = ({ name, prefix, bitsPerChar, alphabet }) => {
+  return blockstore_fs_node_modules_multiformats_src_bases_base_from({
+    prefix,
+    name,
+    encode (input) {
+      return blockstore_fs_node_modules_multiformats_src_bases_base_encode(input, alphabet, bitsPerChar)
+    },
+    decode (input) {
+      return blockstore_fs_node_modules_multiformats_src_bases_base_decode(input, alphabet, bitsPerChar, name)
     }
+  })
+}
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/src/bases/base32.js
+
+
+const blockstore_fs_node_modules_multiformats_src_bases_base32_base32 = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'b',
+  name: 'base32',
+  alphabet: 'abcdefghijklmnopqrstuvwxyz234567',
+  bitsPerChar: 5
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base32_base32upper = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'B',
+  name: 'base32upper',
+  alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567',
+  bitsPerChar: 5
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base32_base32pad = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'c',
+  name: 'base32pad',
+  alphabet: 'abcdefghijklmnopqrstuvwxyz234567=',
+  bitsPerChar: 5
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base32_base32padupper = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'C',
+  name: 'base32padupper',
+  alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=',
+  bitsPerChar: 5
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base32_base32hex = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'v',
+  name: 'base32hex',
+  alphabet: '0123456789abcdefghijklmnopqrstuv',
+  bitsPerChar: 5
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base32_base32hexupper = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'V',
+  name: 'base32hexupper',
+  alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV',
+  bitsPerChar: 5
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base32_base32hexpad = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 't',
+  name: 'base32hexpad',
+  alphabet: '0123456789abcdefghijklmnopqrstuv=',
+  bitsPerChar: 5
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base32_base32hexpadupper = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'T',
+  name: 'base32hexpadupper',
+  alphabet: '0123456789ABCDEFGHIJKLMNOPQRSTUV=',
+  bitsPerChar: 5
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base32_base32z = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'h',
+  name: 'base32z',
+  alphabet: 'ybndrfg8ejkmcpqxot1uwisza345h769',
+  bitsPerChar: 5
+})
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/src/bases/base58.js
+
+
+const blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc = blockstore_fs_node_modules_multiformats_src_bases_base_baseX({
+  name: 'base58btc',
+  prefix: 'z',
+  alphabet: '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base58_base58flickr = blockstore_fs_node_modules_multiformats_src_bases_base_baseX({
+  name: 'base58flickr',
+  prefix: 'Z',
+  alphabet: '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'
+})
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/src/bases/base64.js
+// @ts-check
 
-    /**
-     * Allows control of a {@link ReadableStream | readable stream}'s state and internal queue.
-     *
-     * @public
-     */
-    var ReadableStreamDefaultController = /** @class */ (function () {
-        function ReadableStreamDefaultController() {
-            throw new TypeError('Illegal constructor');
+
+
+const blockstore_fs_node_modules_multiformats_src_bases_base64_base64 = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'm',
+  name: 'base64',
+  alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
+  bitsPerChar: 6
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base64_base64pad = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'M',
+  name: 'base64pad',
+  alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
+  bitsPerChar: 6
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base64_base64url = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'u',
+  name: 'base64url',
+  alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',
+  bitsPerChar: 6
+})
+
+const blockstore_fs_node_modules_multiformats_src_bases_base64_base64urlpad = blockstore_fs_node_modules_multiformats_src_bases_base_rfc4648({
+  prefix: 'U',
+  name: 'base64urlpad',
+  alphabet: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=',
+  bitsPerChar: 6
+})
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/@libp2p/logger/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * A logger for libp2p based on the venerable [debug](https://www.npmjs.com/package/debug) module.
+ *
+ * @example
+ *
+ * ```JavaScript
+ * import { logger } from '@libp2p/logger'
+ *
+ * const log = logger('libp2p:my:component:name')
+ *
+ * log('something happened: %s', 'it was ok')
+ * log.error('something bad happened: %o', err)
+ *
+ * log('with this peer: %p', aPeerId)
+ * log('and this base58btc: %b', aUint8Array)
+ * log('and this base32: %t', aUint8Array)
+ *  ```
+ * ```console
+ * $ DEBUG=libp2p:* node index.js
+ * something happened: it was ok
+ * something bad happened: 
+ * with this peer: 12D3Foo
+ * with this base58btc: Qmfoo
+ * with this base32: bafyfoo
+ * ```
+ */
+
+
+
+
+
+// Add a formatter for converting to a base58 string
+debug_src.formatters.b = (v) => {
+    return v == null ? 'undefined' : blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc.baseEncode(v);
+};
+// Add a formatter for converting to a base32 string
+debug_src.formatters.t = (v) => {
+    return v == null ? 'undefined' : blockstore_fs_node_modules_multiformats_src_bases_base32_base32.baseEncode(v);
+};
+// Add a formatter for converting to a base64 string
+debug_src.formatters.m = (v) => {
+    return v == null ? 'undefined' : blockstore_fs_node_modules_multiformats_src_bases_base64_base64.baseEncode(v);
+};
+// Add a formatter for stringifying peer ids
+debug_src.formatters.p = (v) => {
+    return v == null ? 'undefined' : v.toString();
+};
+// Add a formatter for stringifying CIDs
+debug_src.formatters.c = (v) => {
+    return v == null ? 'undefined' : v.toString();
+};
+// Add a formatter for stringifying Datastore keys
+debug_src.formatters.k = (v) => {
+    return v == null ? 'undefined' : v.toString();
+};
+// Add a formatter for stringifying Multiaddrs
+debug_src.formatters.a = (v) => {
+    return v == null ? 'undefined' : v.toString();
+};
+function logger_dist_src_createDisabledLogger(namespace) {
+    const logger = () => { };
+    logger.enabled = false;
+    logger.color = '';
+    logger.diff = 0;
+    logger.log = () => { };
+    logger.namespace = namespace;
+    logger.destroy = () => true;
+    logger.extend = () => logger;
+    return logger;
+}
+/**
+ * Create a component logger that will prefix any log messages with a truncated
+ * peer id.
+ *
+ * @example
+ *
+ * ```TypeScript
+ * import { peerLogger } from '@libp2p/logger'
+ * import { peerIdFromString } from '@libp2p/peer-id'
+ *
+ * const peerId = peerIdFromString('12D3FooBar')
+ * const logger = peerLogger(peerId)
+ *
+ * const log = logger.forComponent('my-component')
+ * log.info('hello world')
+ * // logs "12…oBar:my-component hello world"
+ * ```
+ */
+function src_peerLogger(peerId, options = {}) {
+    return src_prefixLogger(truncatePeerId(peerId, options));
+}
+/**
+ * Create a component logger that will prefix any log messages with the passed
+ * string.
+ *
+ * @example
+ *
+ * ```TypeScript
+ * import { prefixLogger } from '@libp2p/logger'
+ *
+ * const logger = prefixLogger('my-node')
+ *
+ * const log = logger.forComponent('my-component')
+ * log.info('hello world')
+ * // logs "my-node:my-component hello world"
+ * ```
+ */
+function src_prefixLogger(prefix) {
+    return {
+        forComponent(name) {
+            return logger_dist_src_logger(`${prefix}:${name}`);
         }
-        Object.defineProperty(ReadableStreamDefaultController.prototype, "desiredSize", {
-            /**
-             * Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is
-             * over-full. An underlying source ought to use this information to determine when and how to apply backpressure.
-             */
-            get: function () {
-                if (!IsReadableStreamDefaultController(this)) {
-                    throw defaultControllerBrandCheckException$1('desiredSize');
-                }
-                return ReadableStreamDefaultControllerGetDesiredSize(this);
-            },
-            enumerable: false,
-            configurable: true
-        });
-        /**
-         * Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from
-         * the stream, but once those are read, the stream will become closed.
-         */
-        ReadableStreamDefaultController.prototype.close = function () {
-            if (!IsReadableStreamDefaultController(this)) {
-                throw defaultControllerBrandCheckException$1('close');
-            }
-            if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) {
-                throw new TypeError('The stream is not in a state that permits close');
-            }
-            ReadableStreamDefaultControllerClose(this);
-        };
-        ReadableStreamDefaultController.prototype.enqueue = function (chunk) {
-            if (chunk === void 0) { chunk = undefined; }
-            if (!IsReadableStreamDefaultController(this)) {
-                throw defaultControllerBrandCheckException$1('enqueue');
-            }
-            if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) {
-                throw new TypeError('The stream is not in a state that permits enqueue');
-            }
-            return ReadableStreamDefaultControllerEnqueue(this, chunk);
-        };
-        /**
-         * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`.
-         */
-        ReadableStreamDefaultController.prototype.error = function (e) {
-            if (e === void 0) { e = undefined; }
-            if (!IsReadableStreamDefaultController(this)) {
-                throw defaultControllerBrandCheckException$1('error');
-            }
-            ReadableStreamDefaultControllerError(this, e);
-        };
-        /** @internal */
-        ReadableStreamDefaultController.prototype[CancelSteps] = function (reason) {
-            ResetQueue(this);
-            var result = this._cancelAlgorithm(reason);
-            ReadableStreamDefaultControllerClearAlgorithms(this);
-            return result;
-        };
-        /** @internal */
-        ReadableStreamDefaultController.prototype[PullSteps] = function (readRequest) {
-            var stream = this._controlledReadableStream;
-            if (this._queue.length > 0) {
-                var chunk = DequeueValue(this);
-                if (this._closeRequested && this._queue.length === 0) {
-                    ReadableStreamDefaultControllerClearAlgorithms(this);
-                    ReadableStreamClose(stream);
-                }
-                else {
-                    ReadableStreamDefaultControllerCallPullIfNeeded(this);
-                }
-                readRequest._chunkSteps(chunk);
-            }
-            else {
-                ReadableStreamAddReadRequest(stream, readRequest);
-                ReadableStreamDefaultControllerCallPullIfNeeded(this);
-            }
-        };
-        return ReadableStreamDefaultController;
-    }());
-    Object.defineProperties(ReadableStreamDefaultController.prototype, {
-        close: { enumerable: true },
-        enqueue: { enumerable: true },
-        error: { enumerable: true },
-        desiredSize: { enumerable: true }
+    };
+}
+/**
+ * Create a component logger
+ *
+ * @example
+ *
+ * ```TypeScript
+ * import { defaultLogger } from '@libp2p/logger'
+ * import { peerIdFromString } from '@libp2p/peer-id'
+ *
+ * const logger = defaultLogger()
+ *
+ * const log = logger.forComponent('my-component')
+ * log.info('hello world')
+ * // logs "my-component hello world"
+ * ```
+ */
+function src_defaultLogger() {
+    return {
+        forComponent(name) {
+            return logger_dist_src_logger(name);
+        }
+    };
+}
+/**
+ * Creates a logger for the passed component name.
+ *
+ * @example
+ *
+ * ```TypeScript
+ * import { logger } from '@libp2p/logger'
+ *
+ * const log = logger('my-component')
+ * log.info('hello world')
+ * // logs "my-component hello world"
+ * ```
+ */
+function logger_dist_src_logger(name) {
+    // trace logging is a no-op by default
+    let trace = logger_dist_src_createDisabledLogger(`${name}:trace`);
+    // look at all the debug names and see if trace logging has explicitly been enabled
+    if (debug_src.enabled(`${name}:trace`) && debug_src.names.map(r => r.toString()).find(n => n.includes(':trace')) != null) {
+        trace = debug_src(`${name}:trace`);
+    }
+    return Object.assign(debug_src(name), {
+        error: debug_src(`${name}:error`),
+        trace
     });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(ReadableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
-            value: 'ReadableStreamDefaultController',
-            configurable: true
-        });
+}
+function logger_dist_src_disable() {
+    debug.disable();
+}
+function logger_dist_src_enable(namespaces) {
+    debug.enable(namespaces);
+}
+function logger_dist_src_enabled(namespaces) {
+    return debug.enabled(namespaces);
+}
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/dist/src/tiered.js
+
+
+
+
+
+
+
+const tiered_log = logger_dist_src_logger('blockstore:core:tiered');
+/**
+ * A blockstore that can combine multiple stores. Puts and deletes
+ * will write through to all blockstores. Has and get will
+ * try each store sequentially. getAll will use every store but also
+ * deduplicate any yielded pairs.
+ */
+class TieredBlockstore extends (/* unused pure expression or super */ null && (BaseBlockstore)) {
+    stores;
+    constructor(stores) {
+        super();
+        this.stores = stores.slice();
     }
-    // Abstract operations for the ReadableStreamDefaultController.
-    function IsReadableStreamDefaultController(x) {
-        if (!typeIsObject(x)) {
-            return false;
+    async put(key, value, options) {
+        try {
+            await Promise.all(this.stores.map(async (store) => { await store.put(key, value, options); }));
+            return key;
         }
-        if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableStream')) {
-            return false;
+        catch (err) {
+            throw Errors.putFailedError(err);
         }
-        return x instanceof ReadableStreamDefaultController;
     }
-    function ReadableStreamDefaultControllerCallPullIfNeeded(controller) {
-        var shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller);
-        if (!shouldPull) {
-            return;
-        }
-        if (controller._pulling) {
-            controller._pullAgain = true;
-            return;
+    async get(key, options) {
+        for (const store of this.stores) {
+            try {
+                const res = await store.get(key, options);
+                if (res != null)
+                    return res;
+            }
+            catch (err) {
+                tiered_log.error(err);
+            }
         }
-        controller._pulling = true;
-        var pullPromise = controller._pullAlgorithm();
-        uponPromise(pullPromise, function () {
-            controller._pulling = false;
-            if (controller._pullAgain) {
-                controller._pullAgain = false;
-                ReadableStreamDefaultControllerCallPullIfNeeded(controller);
+        throw Errors.notFoundError();
+    }
+    async has(key, options) {
+        for (const s of this.stores) {
+            if (await s.has(key, options)) {
+                return true;
             }
-        }, function (e) {
-            ReadableStreamDefaultControllerError(controller, e);
-        });
+        }
+        return false;
     }
-    function ReadableStreamDefaultControllerShouldCallPull(controller) {
-        var stream = controller._controlledReadableStream;
-        if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {
-            return false;
+    async delete(key, options) {
+        try {
+            await Promise.all(this.stores.map(async (store) => { await store.delete(key, options); }));
         }
-        if (!controller._started) {
-            return false;
+        catch (err) {
+            throw Errors.deleteFailedError(err);
         }
-        if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {
-            return true;
+    }
+    async *putMany(source, options = {}) {
+        let error;
+        const pushables = this.stores.map(store => {
+            const source = pushable({
+                objectMode: true
+            });
+            drain(store.putMany(source, options))
+                .catch(err => {
+                // store threw while putting, make sure we bubble the error up
+                error = err;
+            });
+            return source;
+        });
+        try {
+            for await (const pair of source) {
+                if (error != null) {
+                    throw error;
+                }
+                pushables.forEach(p => p.push(pair));
+                yield pair.cid;
+            }
         }
-        var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller);
-        if (desiredSize > 0) {
-            return true;
+        finally {
+            pushables.forEach(p => p.end());
         }
-        return false;
-    }
-    function ReadableStreamDefaultControllerClearAlgorithms(controller) {
-        controller._pullAlgorithm = undefined;
-        controller._cancelAlgorithm = undefined;
-        controller._strategySizeAlgorithm = undefined;
     }
-    // A client of ReadableStreamDefaultController may use these functions directly to bypass state check.
-    function ReadableStreamDefaultControllerClose(controller) {
-        if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {
-            return;
+    async *deleteMany(source, options = {}) {
+        let error;
+        const pushables = this.stores.map(store => {
+            const source = pushable({
+                objectMode: true
+            });
+            drain(store.deleteMany(source, options))
+                .catch(err => {
+                // store threw while deleting, make sure we bubble the error up
+                error = err;
+            });
+            return source;
+        });
+        try {
+            for await (const key of source) {
+                if (error != null) {
+                    throw error;
+                }
+                pushables.forEach(p => p.push(key));
+                yield key;
+            }
         }
-        var stream = controller._controlledReadableStream;
-        controller._closeRequested = true;
-        if (controller._queue.length === 0) {
-            ReadableStreamDefaultControllerClearAlgorithms(controller);
-            ReadableStreamClose(stream);
+        finally {
+            pushables.forEach(p => p.end());
         }
     }
-    function ReadableStreamDefaultControllerEnqueue(controller, chunk) {
-        if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {
-            return;
+    async *getAll(options) {
+        // deduplicate yielded pairs
+        const seen = new Set();
+        yield* filter(merge(...this.stores.map(s => s.getAll(options))), (pair) => {
+            const cidStr = pair.cid.toString();
+            if (seen.has(cidStr)) {
+                return false;
+            }
+            seen.add(cidStr);
+            return true;
+        });
+    }
+}
+//# sourceMappingURL=tiered.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/blockstore-core/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * Various Blockstore implementations are available.
+ *
+ * ## Implementations
+ *
+ * - Base: [`src/base`](src/base.ts)
+ * - Memory: [`src/memory`](src/memory.ts)
+ * - BlackHole: ['src/black-hole](src/black-hole.ts)
+ * - Tiered: ['src/tiered](src/tiered.ts)
+ *
+ * @example BaseBlockstore
+ *
+ * Provides a complete implementation of the Blockstore interface.  You must implement `.get`, `.put`, etc.
+ *
+ * ```js
+ * import { BaseBlockstore } from 'blockstore-core/base'
+ *
+ * class MyCustomBlockstore extends BaseBlockstore {
+ *   put (key, val, options) {
+ *     // store a block
+ *   }
+ *
+ *   get (key, options) {
+ *     // retrieve a block
+ *   }
+ *
+ *   // ...etc
+ * }
+ * ```
+ *
+ * @example MemoryBlockstore
+ *
+ * A simple Blockstore that stores blocks in memory.
+ *
+ * ```js
+ * import { MemoryBlockstore } from 'blockstore-core/memory'
+ *
+ * const store = new MemoryBlockstore()
+ * ```
+ *
+ * @example BlackHoleBlockstore
+ *
+ * A Blockstore that does not store any blocks.
+ *
+ * ```js
+ * import { BlackHoleBlockstore } from 'blockstore-core/black-hole'
+ *
+ * const store = new BlackHoleBlockstore()
+ * ```
+ *
+ * @example TieredBlockstore
+ *
+ * A tiered blockstore wraps one or more blockstores and will query each in parallel to retrieve a block - the operation will succeed if any wrapped store has the block.
+ *
+ * Writes are invoked on all wrapped blockstores.
+ *
+ * ```js
+ * import { TieredBlockstore } from 'blockstore-core/tiered'
+ *
+ * const store = new TieredBlockstore([
+ *   store1,
+ *   store2,
+ *   // ...etc
+ * ])
+ * ```
+ */
+
+
+
+
+
+const src_Errors = {
+    ...blockstore_core_dist_src_errors_namespaceObject
+};
+//# sourceMappingURL=index.js.map
+// EXTERNAL MODULE: ./node_modules/fast-write-atomic/index.js
+var fast_write_atomic = __nccwpck_require__(27865);
+// EXTERNAL MODULE: ./node_modules/blockstore-fs/node_modules/brace-expansion/index.js
+var node_modules_brace_expansion = __nccwpck_require__(11401);
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/minimatch/dist/mjs/assert-valid-pattern.js
+const assert_valid_pattern_MAX_PATTERN_LENGTH = 1024 * 64;
+const assert_valid_pattern_assertValidPattern = (pattern) => {
+    if (typeof pattern !== 'string') {
+        throw new TypeError('invalid pattern');
+    }
+    if (pattern.length > assert_valid_pattern_MAX_PATTERN_LENGTH) {
+        throw new TypeError('pattern is too long');
+    }
+};
+//# sourceMappingURL=assert-valid-pattern.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/minimatch/dist/mjs/brace-expressions.js
+// translate the various posix character classes into unicode properties
+// this works across all unicode locales
+// { : [, /u flag required, negated]
+const brace_expressions_posixClasses = {
+    '[:alnum:]': ['\\p{L}\\p{Nl}\\p{Nd}', true],
+    '[:alpha:]': ['\\p{L}\\p{Nl}', true],
+    '[:ascii:]': ['\\x' + '00-\\x' + '7f', false],
+    '[:blank:]': ['\\p{Zs}\\t', true],
+    '[:cntrl:]': ['\\p{Cc}', true],
+    '[:digit:]': ['\\p{Nd}', true],
+    '[:graph:]': ['\\p{Z}\\p{C}', true, true],
+    '[:lower:]': ['\\p{Ll}', true],
+    '[:print:]': ['\\p{C}', true],
+    '[:punct:]': ['\\p{P}', true],
+    '[:space:]': ['\\p{Z}\\t\\r\\n\\v\\f', true],
+    '[:upper:]': ['\\p{Lu}', true],
+    '[:word:]': ['\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}', true],
+    '[:xdigit:]': ['A-Fa-f0-9', false],
+};
+// only need to escape a few things inside of brace expressions
+// escapes: [ \ ] -
+const brace_expressions_braceEscape = (s) => s.replace(/[[\]\\-]/g, '\\$&');
+// escape all regexp magic characters
+const brace_expressions_regexpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+// everything has already been escaped, we just have to join
+const brace_expressions_rangesToString = (ranges) => ranges.join('');
+// takes a glob string at a posix brace expression, and returns
+// an equivalent regular expression source, and boolean indicating
+// whether the /u flag needs to be applied, and the number of chars
+// consumed to parse the character class.
+// This also removes out of order ranges, and returns ($.) if the
+// entire class just no good.
+const brace_expressions_parseClass = (glob, position) => {
+    const pos = position;
+    /* c8 ignore start */
+    if (glob.charAt(pos) !== '[') {
+        throw new Error('not in a brace expression');
+    }
+    /* c8 ignore stop */
+    const ranges = [];
+    const negs = [];
+    let i = pos + 1;
+    let sawStart = false;
+    let uflag = false;
+    let escaping = false;
+    let negate = false;
+    let endPos = pos;
+    let rangeStart = '';
+    WHILE: while (i < glob.length) {
+        const c = glob.charAt(i);
+        if ((c === '!' || c === '^') && i === pos + 1) {
+            negate = true;
+            i++;
+            continue;
         }
-        var stream = controller._controlledReadableStream;
-        if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {
-            ReadableStreamFulfillReadRequest(stream, chunk, false);
+        if (c === ']' && sawStart && !escaping) {
+            endPos = i + 1;
+            break;
         }
-        else {
-            var chunkSize = void 0;
-            try {
-                chunkSize = controller._strategySizeAlgorithm(chunk);
+        sawStart = true;
+        if (c === '\\') {
+            if (!escaping) {
+                escaping = true;
+                i++;
+                continue;
             }
-            catch (chunkSizeE) {
-                ReadableStreamDefaultControllerError(controller, chunkSizeE);
-                throw chunkSizeE;
+            // escaped \ char, fall through and treat like normal char
+        }
+        if (c === '[' && !escaping) {
+            // either a posix class, a collation equivalent, or just a [
+            for (const [cls, [unip, u, neg]] of Object.entries(brace_expressions_posixClasses)) {
+                if (glob.startsWith(cls, i)) {
+                    // invalid, [a-[] is fine, but not [a-[:alpha]]
+                    if (rangeStart) {
+                        return ['$.', false, glob.length - pos, true];
+                    }
+                    i += cls.length;
+                    if (neg)
+                        negs.push(unip);
+                    else
+                        ranges.push(unip);
+                    uflag = uflag || u;
+                    continue WHILE;
+                }
             }
-            try {
-                EnqueueValueWithSize(controller, chunk, chunkSize);
+        }
+        // now it's just a normal character, effectively
+        escaping = false;
+        if (rangeStart) {
+            // throw this range away if it's not valid, but others
+            // can still match.
+            if (c > rangeStart) {
+                ranges.push(brace_expressions_braceEscape(rangeStart) + '-' + brace_expressions_braceEscape(c));
             }
-            catch (enqueueE) {
-                ReadableStreamDefaultControllerError(controller, enqueueE);
-                throw enqueueE;
+            else if (c === rangeStart) {
+                ranges.push(brace_expressions_braceEscape(c));
             }
+            rangeStart = '';
+            i++;
+            continue;
         }
-        ReadableStreamDefaultControllerCallPullIfNeeded(controller);
-    }
-    function ReadableStreamDefaultControllerError(controller, e) {
-        var stream = controller._controlledReadableStream;
-        if (stream._state !== 'readable') {
-            return;
-        }
-        ResetQueue(controller);
-        ReadableStreamDefaultControllerClearAlgorithms(controller);
-        ReadableStreamError(stream, e);
-    }
-    function ReadableStreamDefaultControllerGetDesiredSize(controller) {
-        var state = controller._controlledReadableStream._state;
-        if (state === 'errored') {
-            return null;
-        }
-        if (state === 'closed') {
-            return 0;
+        // now might be the start of a range.
+        // can be either c-d or c-] or c] or c] at this point
+        if (glob.startsWith('-]', i + 1)) {
+            ranges.push(brace_expressions_braceEscape(c + '-'));
+            i += 2;
+            continue;
         }
-        return controller._strategyHWM - controller._queueTotalSize;
-    }
-    // This is used in the implementation of TransformStream.
-    function ReadableStreamDefaultControllerHasBackpressure(controller) {
-        if (ReadableStreamDefaultControllerShouldCallPull(controller)) {
-            return false;
+        if (glob.startsWith('-', i + 1)) {
+            rangeStart = c;
+            i += 2;
+            continue;
         }
-        return true;
+        // not the start of a range, just a single character
+        ranges.push(brace_expressions_braceEscape(c));
+        i++;
     }
-    function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) {
-        var state = controller._controlledReadableStream._state;
-        if (!controller._closeRequested && state === 'readable') {
-            return true;
+    if (endPos < i) {
+        // didn't see the end of the class, not a valid class,
+        // but might still be valid as a literal match.
+        return ['', false, 0, false];
+    }
+    // if we got no ranges and no negates, then we have a range that
+    // cannot possibly match anything, and that poisons the whole glob
+    if (!ranges.length && !negs.length) {
+        return ['$.', false, glob.length - pos, true];
+    }
+    // if we got one positive range, and it's a single character, then that's
+    // not actually a magic pattern, it's just that one literal character.
+    // we should not treat that as "magic", we should just return the literal
+    // character. [_] is a perfectly valid way to escape glob magic chars.
+    if (negs.length === 0 &&
+        ranges.length === 1 &&
+        /^\\?.$/.test(ranges[0]) &&
+        !negate) {
+        const r = ranges[0].length === 2 ? ranges[0].slice(-1) : ranges[0];
+        return [brace_expressions_regexpEscape(r), false, endPos - pos, false];
+    }
+    const sranges = '[' + (negate ? '^' : '') + brace_expressions_rangesToString(ranges) + ']';
+    const snegs = '[' + (negate ? '' : '^') + brace_expressions_rangesToString(negs) + ']';
+    const comb = ranges.length && negs.length
+        ? '(' + sranges + '|' + snegs + ')'
+        : ranges.length
+            ? sranges
+            : snegs;
+    return [comb, uflag, endPos - pos, true];
+};
+//# sourceMappingURL=brace-expressions.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/minimatch/dist/mjs/unescape.js
+/**
+ * Un-escape a string that has been escaped with {@link escape}.
+ *
+ * If the {@link windowsPathsNoEscape} option is used, then square-brace
+ * escapes are removed, but not backslash escapes.  For example, it will turn
+ * the string `'[*]'` into `*`, but it will not turn `'\\*'` into `'*'`,
+ * becuase `\` is a path separator in `windowsPathsNoEscape` mode.
+ *
+ * When `windowsPathsNoEscape` is not set, then both brace escapes and
+ * backslash escapes are removed.
+ *
+ * Slashes (and backslashes in `windowsPathsNoEscape` mode) cannot be escaped
+ * or unescaped.
+ */
+const mjs_unescape_unescape = (s, { windowsPathsNoEscape = false, } = {}) => {
+    return windowsPathsNoEscape
+        ? s.replace(/\[([^\/\\])\]/g, '$1')
+        : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2').replace(/\\([^\/])/g, '$1');
+};
+//# sourceMappingURL=unescape.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/minimatch/dist/mjs/ast.js
+// parse a single path portion
+
+
+const mjs_ast_types = new Set(['!', '?', '+', '*', '@']);
+const ast_isExtglobType = (c) => mjs_ast_types.has(c);
+// Patterns that get prepended to bind to the start of either the
+// entire string, or just a single path portion, to prevent dots
+// and/or traversal patterns, when needed.
+// Exts don't need the ^ or / bit, because the root binds that already.
+const ast_startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
+const ast_startNoDot = '(?!\\.)';
+// characters that indicate a start of pattern needs the "no dots" bit,
+// because a dot *might* be matched. ( is not in the list, because in
+// the case of a child extglob, it will handle the prevention itself.
+const ast_addPatternStart = new Set(['[', '.']);
+// cases where traversal is A-OK, no dot prevention needed
+const ast_justDots = new Set(['..', '.']);
+const ast_reSpecials = new Set('().*{}+?[]^$\\!');
+const ast_regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+// any single thing other than /
+const ast_qmark = '[^/]';
+// * => any number of characters
+const ast_star = ast_qmark + '*?';
+// use + when we need to ensure that *something* matches, because the * is
+// the only thing in the path portion.
+const ast_starNoEmpty = ast_qmark + '+?';
+// remove the \ chars that we added if we end up doing a nonmagic compare
+// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
+class ast_AST {
+    type;
+    #root;
+    #hasMagic;
+    #uflag = false;
+    #parts = [];
+    #parent;
+    #parentIndex;
+    #negs;
+    #filledNegs = false;
+    #options;
+    #toString;
+    // set to true if it's an extglob with no children
+    // (which really means one child of '')
+    #emptyExt = false;
+    constructor(type, parent, options = {}) {
+        this.type = type;
+        // extglobs are inherently magical
+        if (type)
+            this.#hasMagic = true;
+        this.#parent = parent;
+        this.#root = this.#parent ? this.#parent.#root : this;
+        this.#options = this.#root === this ? options : this.#root.#options;
+        this.#negs = this.#root === this ? [] : this.#root.#negs;
+        if (type === '!' && !this.#root.#filledNegs)
+            this.#negs.push(this);
+        this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
+    }
+    get hasMagic() {
+        /* c8 ignore start */
+        if (this.#hasMagic !== undefined)
+            return this.#hasMagic;
+        /* c8 ignore stop */
+        for (const p of this.#parts) {
+            if (typeof p === 'string')
+                continue;
+            if (p.type || p.hasMagic)
+                return (this.#hasMagic = true);
         }
-        return false;
-    }
-    function SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) {
-        controller._controlledReadableStream = stream;
-        controller._queue = undefined;
-        controller._queueTotalSize = undefined;
-        ResetQueue(controller);
-        controller._started = false;
-        controller._closeRequested = false;
-        controller._pullAgain = false;
-        controller._pulling = false;
-        controller._strategySizeAlgorithm = sizeAlgorithm;
-        controller._strategyHWM = highWaterMark;
-        controller._pullAlgorithm = pullAlgorithm;
-        controller._cancelAlgorithm = cancelAlgorithm;
-        stream._readableStreamController = controller;
-        var startResult = startAlgorithm();
-        uponPromise(promiseResolvedWith(startResult), function () {
-            controller._started = true;
-            ReadableStreamDefaultControllerCallPullIfNeeded(controller);
-        }, function (r) {
-            ReadableStreamDefaultControllerError(controller, r);
-        });
+        // note: will be undefined until we generate the regexp src and find out
+        return this.#hasMagic;
     }
-    function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream, underlyingSource, highWaterMark, sizeAlgorithm) {
-        var controller = Object.create(ReadableStreamDefaultController.prototype);
-        var startAlgorithm = function () { return undefined; };
-        var pullAlgorithm = function () { return promiseResolvedWith(undefined); };
-        var cancelAlgorithm = function () { return promiseResolvedWith(undefined); };
-        if (underlyingSource.start !== undefined) {
-            startAlgorithm = function () { return underlyingSource.start(controller); };
-        }
-        if (underlyingSource.pull !== undefined) {
-            pullAlgorithm = function () { return underlyingSource.pull(controller); };
-        }
-        if (underlyingSource.cancel !== undefined) {
-            cancelAlgorithm = function (reason) { return underlyingSource.cancel(reason); };
+    // reconstructs the pattern
+    toString() {
+        if (this.#toString !== undefined)
+            return this.#toString;
+        if (!this.type) {
+            return (this.#toString = this.#parts.map(p => String(p)).join(''));
         }
-        SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm);
-    }
-    // Helper functions for the ReadableStreamDefaultController.
-    function defaultControllerBrandCheckException$1(name) {
-        return new TypeError("ReadableStreamDefaultController.prototype." + name + " can only be used on a ReadableStreamDefaultController");
-    }
-
-    function ReadableStreamTee(stream, cloneForBranch2) {
-        if (IsReadableByteStreamController(stream._readableStreamController)) {
-            return ReadableByteStreamTee(stream);
+        else {
+            return (this.#toString =
+                this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')');
         }
-        return ReadableStreamDefaultTee(stream);
     }
-    function ReadableStreamDefaultTee(stream, cloneForBranch2) {
-        var reader = AcquireReadableStreamDefaultReader(stream);
-        var reading = false;
-        var readAgain = false;
-        var canceled1 = false;
-        var canceled2 = false;
-        var reason1;
-        var reason2;
-        var branch1;
-        var branch2;
-        var resolveCancelPromise;
-        var cancelPromise = newPromise(function (resolve) {
-            resolveCancelPromise = resolve;
-        });
-        function pullAlgorithm() {
-            if (reading) {
-                readAgain = true;
-                return promiseResolvedWith(undefined);
-            }
-            reading = true;
-            var readRequest = {
-                _chunkSteps: function (chunk) {
-                    // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using
-                    // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let
-                    // successful synchronously-available reads get ahead of asynchronously-available errors.
-                    queueMicrotask(function () {
-                        readAgain = false;
-                        var chunk1 = chunk;
-                        var chunk2 = chunk;
-                        // There is no way to access the cloning code right now in the reference implementation.
-                        // If we add one then we'll need an implementation for serializable objects.
-                        // if (!canceled2 && cloneForBranch2) {
-                        //   chunk2 = StructuredDeserialize(StructuredSerialize(chunk2));
-                        // }
-                        if (!canceled1) {
-                            ReadableStreamDefaultControllerEnqueue(branch1._readableStreamController, chunk1);
-                        }
-                        if (!canceled2) {
-                            ReadableStreamDefaultControllerEnqueue(branch2._readableStreamController, chunk2);
-                        }
-                        reading = false;
-                        if (readAgain) {
-                            pullAlgorithm();
+    #fillNegs() {
+        /* c8 ignore start */
+        if (this !== this.#root)
+            throw new Error('should only call on root');
+        if (this.#filledNegs)
+            return this;
+        /* c8 ignore stop */
+        // call toString() once to fill this out
+        this.toString();
+        this.#filledNegs = true;
+        let n;
+        while ((n = this.#negs.pop())) {
+            if (n.type !== '!')
+                continue;
+            // walk up the tree, appending everthing that comes AFTER parentIndex
+            let p = n;
+            let pp = p.#parent;
+            while (pp) {
+                for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
+                    for (const part of n.#parts) {
+                        /* c8 ignore start */
+                        if (typeof part === 'string') {
+                            throw new Error('string part in extglob AST??');
                         }
-                    });
-                },
-                _closeSteps: function () {
-                    reading = false;
-                    if (!canceled1) {
-                        ReadableStreamDefaultControllerClose(branch1._readableStreamController);
-                    }
-                    if (!canceled2) {
-                        ReadableStreamDefaultControllerClose(branch2._readableStreamController);
-                    }
-                    if (!canceled1 || !canceled2) {
-                        resolveCancelPromise(undefined);
+                        /* c8 ignore stop */
+                        part.copyIn(pp.#parts[i]);
                     }
-                },
-                _errorSteps: function () {
-                    reading = false;
                 }
-            };
-            ReadableStreamDefaultReaderRead(reader, readRequest);
-            return promiseResolvedWith(undefined);
-        }
-        function cancel1Algorithm(reason) {
-            canceled1 = true;
-            reason1 = reason;
-            if (canceled2) {
-                var compositeReason = CreateArrayFromList([reason1, reason2]);
-                var cancelResult = ReadableStreamCancel(stream, compositeReason);
-                resolveCancelPromise(cancelResult);
+                p = pp;
+                pp = p.#parent;
             }
-            return cancelPromise;
         }
-        function cancel2Algorithm(reason) {
-            canceled2 = true;
-            reason2 = reason;
-            if (canceled1) {
-                var compositeReason = CreateArrayFromList([reason1, reason2]);
-                var cancelResult = ReadableStreamCancel(stream, compositeReason);
-                resolveCancelPromise(cancelResult);
+        return this;
+    }
+    push(...parts) {
+        for (const p of parts) {
+            if (p === '')
+                continue;
+            /* c8 ignore start */
+            if (typeof p !== 'string' && !(p instanceof ast_AST && p.#parent === this)) {
+                throw new Error('invalid part: ' + p);
             }
-            return cancelPromise;
-        }
-        function startAlgorithm() {
-            // do nothing
+            /* c8 ignore stop */
+            this.#parts.push(p);
         }
-        branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm);
-        branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm);
-        uponRejection(reader._closedPromise, function (r) {
-            ReadableStreamDefaultControllerError(branch1._readableStreamController, r);
-            ReadableStreamDefaultControllerError(branch2._readableStreamController, r);
-            if (!canceled1 || !canceled2) {
-                resolveCancelPromise(undefined);
+    }
+    toJSON() {
+        const ret = this.type === null
+            ? this.#parts.slice().map(p => (typeof p === 'string' ? p : p.toJSON()))
+            : [this.type, ...this.#parts.map(p => p.toJSON())];
+        if (this.isStart() && !this.type)
+            ret.unshift([]);
+        if (this.isEnd() &&
+            (this === this.#root ||
+                (this.#root.#filledNegs && this.#parent?.type === '!'))) {
+            ret.push({});
+        }
+        return ret;
+    }
+    isStart() {
+        if (this.#root === this)
+            return true;
+        // if (this.type) return !!this.#parent?.isStart()
+        if (!this.#parent?.isStart())
+            return false;
+        if (this.#parentIndex === 0)
+            return true;
+        // if everything AHEAD of this is a negation, then it's still the "start"
+        const p = this.#parent;
+        for (let i = 0; i < this.#parentIndex; i++) {
+            const pp = p.#parts[i];
+            if (!(pp instanceof ast_AST && pp.type === '!')) {
+                return false;
             }
-        });
-        return [branch1, branch2];
+        }
+        return true;
     }
-    function ReadableByteStreamTee(stream) {
-        var reader = AcquireReadableStreamDefaultReader(stream);
-        var reading = false;
-        var readAgainForBranch1 = false;
-        var readAgainForBranch2 = false;
-        var canceled1 = false;
-        var canceled2 = false;
-        var reason1;
-        var reason2;
-        var branch1;
-        var branch2;
-        var resolveCancelPromise;
-        var cancelPromise = newPromise(function (resolve) {
-            resolveCancelPromise = resolve;
-        });
-        function forwardReaderError(thisReader) {
-            uponRejection(thisReader._closedPromise, function (r) {
-                if (thisReader !== reader) {
-                    return;
-                }
-                ReadableByteStreamControllerError(branch1._readableStreamController, r);
-                ReadableByteStreamControllerError(branch2._readableStreamController, r);
-                if (!canceled1 || !canceled2) {
-                    resolveCancelPromise(undefined);
+    isEnd() {
+        if (this.#root === this)
+            return true;
+        if (this.#parent?.type === '!')
+            return true;
+        if (!this.#parent?.isEnd())
+            return false;
+        if (!this.type)
+            return this.#parent?.isEnd();
+        // if not root, it'll always have a parent
+        /* c8 ignore start */
+        const pl = this.#parent ? this.#parent.#parts.length : 0;
+        /* c8 ignore stop */
+        return this.#parentIndex === pl - 1;
+    }
+    copyIn(part) {
+        if (typeof part === 'string')
+            this.push(part);
+        else
+            this.push(part.clone(this));
+    }
+    clone(parent) {
+        const c = new ast_AST(this.type, parent);
+        for (const p of this.#parts) {
+            c.copyIn(p);
+        }
+        return c;
+    }
+    static #parseAST(str, ast, pos, opt) {
+        let escaping = false;
+        let inBrace = false;
+        let braceStart = -1;
+        let braceNeg = false;
+        if (ast.type === null) {
+            // outside of a extglob, append until we find a start
+            let i = pos;
+            let acc = '';
+            while (i < str.length) {
+                const c = str.charAt(i++);
+                // still accumulate escapes at this point, but we do ignore
+                // starts that are escaped
+                if (escaping || c === '\\') {
+                    escaping = !escaping;
+                    acc += c;
+                    continue;
                 }
-            });
-        }
-        function pullWithDefaultReader() {
-            if (IsReadableStreamBYOBReader(reader)) {
-                ReadableStreamReaderGenericRelease(reader);
-                reader = AcquireReadableStreamDefaultReader(stream);
-                forwardReaderError(reader);
-            }
-            var readRequest = {
-                _chunkSteps: function (chunk) {
-                    // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using
-                    // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let
-                    // successful synchronously-available reads get ahead of asynchronously-available errors.
-                    queueMicrotask(function () {
-                        readAgainForBranch1 = false;
-                        readAgainForBranch2 = false;
-                        var chunk1 = chunk;
-                        var chunk2 = chunk;
-                        if (!canceled1 && !canceled2) {
-                            try {
-                                chunk2 = CloneAsUint8Array(chunk);
-                            }
-                            catch (cloneE) {
-                                ReadableByteStreamControllerError(branch1._readableStreamController, cloneE);
-                                ReadableByteStreamControllerError(branch2._readableStreamController, cloneE);
-                                resolveCancelPromise(ReadableStreamCancel(stream, cloneE));
-                                return;
-                            }
-                        }
-                        if (!canceled1) {
-                            ReadableByteStreamControllerEnqueue(branch1._readableStreamController, chunk1);
-                        }
-                        if (!canceled2) {
-                            ReadableByteStreamControllerEnqueue(branch2._readableStreamController, chunk2);
-                        }
-                        reading = false;
-                        if (readAgainForBranch1) {
-                            pull1Algorithm();
-                        }
-                        else if (readAgainForBranch2) {
-                            pull2Algorithm();
+                if (inBrace) {
+                    if (i === braceStart + 1) {
+                        if (c === '^' || c === '!') {
+                            braceNeg = true;
                         }
-                    });
-                },
-                _closeSteps: function () {
-                    reading = false;
-                    if (!canceled1) {
-                        ReadableByteStreamControllerClose(branch1._readableStreamController);
-                    }
-                    if (!canceled2) {
-                        ReadableByteStreamControllerClose(branch2._readableStreamController);
-                    }
-                    if (branch1._readableStreamController._pendingPullIntos.length > 0) {
-                        ReadableByteStreamControllerRespond(branch1._readableStreamController, 0);
                     }
-                    if (branch2._readableStreamController._pendingPullIntos.length > 0) {
-                        ReadableByteStreamControllerRespond(branch2._readableStreamController, 0);
-                    }
-                    if (!canceled1 || !canceled2) {
-                        resolveCancelPromise(undefined);
+                    else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
+                        inBrace = false;
                     }
-                },
-                _errorSteps: function () {
-                    reading = false;
+                    acc += c;
+                    continue;
                 }
-            };
-            ReadableStreamDefaultReaderRead(reader, readRequest);
-        }
-        function pullWithBYOBReader(view, forBranch2) {
-            if (IsReadableStreamDefaultReader(reader)) {
-                ReadableStreamReaderGenericRelease(reader);
-                reader = AcquireReadableStreamBYOBReader(stream);
-                forwardReaderError(reader);
+                else if (c === '[') {
+                    inBrace = true;
+                    braceStart = i;
+                    braceNeg = false;
+                    acc += c;
+                    continue;
+                }
+                if (!opt.noext && ast_isExtglobType(c) && str.charAt(i) === '(') {
+                    ast.push(acc);
+                    acc = '';
+                    const ext = new ast_AST(c, ast);
+                    i = ast_AST.#parseAST(str, ext, i, opt);
+                    ast.push(ext);
+                    continue;
+                }
+                acc += c;
             }
-            var byobBranch = forBranch2 ? branch2 : branch1;
-            var otherBranch = forBranch2 ? branch1 : branch2;
-            var readIntoRequest = {
-                _chunkSteps: function (chunk) {
-                    // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using
-                    // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let
-                    // successful synchronously-available reads get ahead of asynchronously-available errors.
-                    queueMicrotask(function () {
-                        readAgainForBranch1 = false;
-                        readAgainForBranch2 = false;
-                        var byobCanceled = forBranch2 ? canceled2 : canceled1;
-                        var otherCanceled = forBranch2 ? canceled1 : canceled2;
-                        if (!otherCanceled) {
-                            var clonedChunk = void 0;
-                            try {
-                                clonedChunk = CloneAsUint8Array(chunk);
-                            }
-                            catch (cloneE) {
-                                ReadableByteStreamControllerError(byobBranch._readableStreamController, cloneE);
-                                ReadableByteStreamControllerError(otherBranch._readableStreamController, cloneE);
-                                resolveCancelPromise(ReadableStreamCancel(stream, cloneE));
-                                return;
-                            }
-                            if (!byobCanceled) {
-                                ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);
-                            }
-                            ReadableByteStreamControllerEnqueue(otherBranch._readableStreamController, clonedChunk);
-                        }
-                        else if (!byobCanceled) {
-                            ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);
-                        }
-                        reading = false;
-                        if (readAgainForBranch1) {
-                            pull1Algorithm();
-                        }
-                        else if (readAgainForBranch2) {
-                            pull2Algorithm();
-                        }
-                    });
-                },
-                _closeSteps: function (chunk) {
-                    reading = false;
-                    var byobCanceled = forBranch2 ? canceled2 : canceled1;
-                    var otherCanceled = forBranch2 ? canceled1 : canceled2;
-                    if (!byobCanceled) {
-                        ReadableByteStreamControllerClose(byobBranch._readableStreamController);
-                    }
-                    if (!otherCanceled) {
-                        ReadableByteStreamControllerClose(otherBranch._readableStreamController);
-                    }
-                    if (chunk !== undefined) {
-                        if (!byobCanceled) {
-                            ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);
-                        }
-                        if (!otherCanceled && otherBranch._readableStreamController._pendingPullIntos.length > 0) {
-                            ReadableByteStreamControllerRespond(otherBranch._readableStreamController, 0);
-                        }
-                    }
-                    if (!byobCanceled || !otherCanceled) {
-                        resolveCancelPromise(undefined);
+            ast.push(acc);
+            return i;
+        }
+        // some kind of extglob, pos is at the (
+        // find the next | or )
+        let i = pos + 1;
+        let part = new ast_AST(null, ast);
+        const parts = [];
+        let acc = '';
+        while (i < str.length) {
+            const c = str.charAt(i++);
+            // still accumulate escapes at this point, but we do ignore
+            // starts that are escaped
+            if (escaping || c === '\\') {
+                escaping = !escaping;
+                acc += c;
+                continue;
+            }
+            if (inBrace) {
+                if (i === braceStart + 1) {
+                    if (c === '^' || c === '!') {
+                        braceNeg = true;
                     }
-                },
-                _errorSteps: function () {
-                    reading = false;
                 }
-            };
-            ReadableStreamBYOBReaderRead(reader, view, readIntoRequest);
-        }
-        function pull1Algorithm() {
-            if (reading) {
-                readAgainForBranch1 = true;
-                return promiseResolvedWith(undefined);
+                else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
+                    inBrace = false;
+                }
+                acc += c;
+                continue;
             }
-            reading = true;
-            var byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch1._readableStreamController);
-            if (byobRequest === null) {
-                pullWithDefaultReader();
+            else if (c === '[') {
+                inBrace = true;
+                braceStart = i;
+                braceNeg = false;
+                acc += c;
+                continue;
             }
-            else {
-                pullWithBYOBReader(byobRequest._view, false);
+            if (ast_isExtglobType(c) && str.charAt(i) === '(') {
+                part.push(acc);
+                acc = '';
+                const ext = new ast_AST(c, part);
+                part.push(ext);
+                i = ast_AST.#parseAST(str, ext, i, opt);
+                continue;
             }
-            return promiseResolvedWith(undefined);
-        }
-        function pull2Algorithm() {
-            if (reading) {
-                readAgainForBranch2 = true;
-                return promiseResolvedWith(undefined);
+            if (c === '|') {
+                part.push(acc);
+                acc = '';
+                parts.push(part);
+                part = new ast_AST(null, ast);
+                continue;
             }
-            reading = true;
-            var byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch2._readableStreamController);
-            if (byobRequest === null) {
-                pullWithDefaultReader();
+            if (c === ')') {
+                if (acc === '' && ast.#parts.length === 0) {
+                    ast.#emptyExt = true;
+                }
+                part.push(acc);
+                acc = '';
+                ast.push(...parts, part);
+                return i;
             }
-            else {
-                pullWithBYOBReader(byobRequest._view, true);
+            acc += c;
+        }
+        // unfinished extglob
+        // if we got here, it was a malformed extglob! not an extglob, but
+        // maybe something else in there.
+        ast.type = null;
+        ast.#hasMagic = undefined;
+        ast.#parts = [str.substring(pos - 1)];
+        return i;
+    }
+    static fromGlob(pattern, options = {}) {
+        const ast = new ast_AST(null, undefined, options);
+        ast_AST.#parseAST(pattern, ast, 0, options);
+        return ast;
+    }
+    // returns the regular expression if there's magic, or the unescaped
+    // string if not.
+    toMMPattern() {
+        // should only be called on root
+        /* c8 ignore start */
+        if (this !== this.#root)
+            return this.#root.toMMPattern();
+        /* c8 ignore stop */
+        const glob = this.toString();
+        const [re, body, hasMagic, uflag] = this.toRegExpSource();
+        // if we're in nocase mode, and not nocaseMagicOnly, then we do
+        // still need a regular expression if we have to case-insensitively
+        // match capital/lowercase characters.
+        const anyMagic = hasMagic ||
+            this.#hasMagic ||
+            (this.#options.nocase &&
+                !this.#options.nocaseMagicOnly &&
+                glob.toUpperCase() !== glob.toLowerCase());
+        if (!anyMagic) {
+            return body;
+        }
+        const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
+        return Object.assign(new RegExp(`^${re}$`, flags), {
+            _src: re,
+            _glob: glob,
+        });
+    }
+    // returns the string match, the regexp source, whether there's magic
+    // in the regexp (so a regular expression is required) and whether or
+    // not the uflag is needed for the regular expression (for posix classes)
+    // TODO: instead of injecting the start/end at this point, just return
+    // the BODY of the regexp, along with the start/end portions suitable
+    // for binding the start/end in either a joined full-path makeRe context
+    // (where we bind to (^|/), or a standalone matchPart context (where
+    // we bind to ^, and not /).  Otherwise slashes get duped!
+    //
+    // In part-matching mode, the start is:
+    // - if not isStart: nothing
+    // - if traversal possible, but not allowed: ^(?!\.\.?$)
+    // - if dots allowed or not possible: ^
+    // - if dots possible and not allowed: ^(?!\.)
+    // end is:
+    // - if not isEnd(): nothing
+    // - else: $
+    //
+    // In full-path matching mode, we put the slash at the START of the
+    // pattern, so start is:
+    // - if first pattern: same as part-matching mode
+    // - if not isStart(): nothing
+    // - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
+    // - if dots allowed or not possible: /
+    // - if dots possible and not allowed: /(?!\.)
+    // end is:
+    // - if last pattern, same as part-matching mode
+    // - else nothing
+    //
+    // Always put the (?:$|/) on negated tails, though, because that has to be
+    // there to bind the end of the negated pattern portion, and it's easier to
+    // just stick it in now rather than try to inject it later in the middle of
+    // the pattern.
+    //
+    // We can just always return the same end, and leave it up to the caller
+    // to know whether it's going to be used joined or in parts.
+    // And, if the start is adjusted slightly, can do the same there:
+    // - if not isStart: nothing
+    // - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
+    // - if dots allowed or not possible: (?:/|^)
+    // - if dots possible and not allowed: (?:/|^)(?!\.)
+    //
+    // But it's better to have a simpler binding without a conditional, for
+    // performance, so probably better to return both start options.
+    //
+    // Then the caller just ignores the end if it's not the first pattern,
+    // and the start always gets applied.
+    //
+    // But that's always going to be $ if it's the ending pattern, or nothing,
+    // so the caller can just attach $ at the end of the pattern when building.
+    //
+    // So the todo is:
+    // - better detect what kind of start is needed
+    // - return both flavors of starting pattern
+    // - attach $ at the end of the pattern when creating the actual RegExp
+    //
+    // Ah, but wait, no, that all only applies to the root when the first pattern
+    // is not an extglob. If the first pattern IS an extglob, then we need all
+    // that dot prevention biz to live in the extglob portions, because eg
+    // +(*|.x*) can match .xy but not .yx.
+    //
+    // So, return the two flavors if it's #root and the first child is not an
+    // AST, otherwise leave it to the child AST to handle it, and there,
+    // use the (?:^|/) style of start binding.
+    //
+    // Even simplified further:
+    // - Since the start for a join is eg /(?!\.) and the start for a part
+    // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
+    // or start or whatever) and prepend ^ or / at the Regexp construction.
+    toRegExpSource(allowDot) {
+        const dot = allowDot ?? !!this.#options.dot;
+        if (this.#root === this)
+            this.#fillNegs();
+        if (!this.type) {
+            const noEmpty = this.isStart() && this.isEnd();
+            const src = this.#parts
+                .map(p => {
+                const [re, _, hasMagic, uflag] = typeof p === 'string'
+                    ? ast_AST.#parseGlob(p, this.#hasMagic, noEmpty)
+                    : p.toRegExpSource(allowDot);
+                this.#hasMagic = this.#hasMagic || hasMagic;
+                this.#uflag = this.#uflag || uflag;
+                return re;
+            })
+                .join('');
+            let start = '';
+            if (this.isStart()) {
+                if (typeof this.#parts[0] === 'string') {
+                    // this is the string that will match the start of the pattern,
+                    // so we need to protect against dots and such.
+                    // '.' and '..' cannot match unless the pattern is that exactly,
+                    // even if it starts with . or dot:true is set.
+                    const dotTravAllowed = this.#parts.length === 1 && ast_justDots.has(this.#parts[0]);
+                    if (!dotTravAllowed) {
+                        const aps = ast_addPatternStart;
+                        // check if we have a possibility of matching . or ..,
+                        // and prevent that.
+                        const needNoTrav = 
+                        // dots are allowed, and the pattern starts with [ or .
+                        (dot && aps.has(src.charAt(0))) ||
+                            // the pattern starts with \., and then [ or .
+                            (src.startsWith('\\.') && aps.has(src.charAt(2))) ||
+                            // the pattern starts with \.\., and then [ or .
+                            (src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
+                        // no need to prevent dots if it can't match a dot, or if a
+                        // sub-pattern will be preventing it anyway.
+                        const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
+                        start = needNoTrav ? ast_startNoTraversal : needNoDot ? ast_startNoDot : '';
+                    }
+                }
             }
-            return promiseResolvedWith(undefined);
-        }
-        function cancel1Algorithm(reason) {
-            canceled1 = true;
-            reason1 = reason;
-            if (canceled2) {
-                var compositeReason = CreateArrayFromList([reason1, reason2]);
-                var cancelResult = ReadableStreamCancel(stream, compositeReason);
-                resolveCancelPromise(cancelResult);
+            // append the "end of path portion" pattern to negation tails
+            let end = '';
+            if (this.isEnd() &&
+                this.#root.#filledNegs &&
+                this.#parent?.type === '!') {
+                end = '(?:$|\\/)';
             }
-            return cancelPromise;
+            const final = start + src + end;
+            return [
+                final,
+                mjs_unescape_unescape(src),
+                (this.#hasMagic = !!this.#hasMagic),
+                this.#uflag,
+            ];
         }
-        function cancel2Algorithm(reason) {
-            canceled2 = true;
-            reason2 = reason;
-            if (canceled1) {
-                var compositeReason = CreateArrayFromList([reason1, reason2]);
-                var cancelResult = ReadableStreamCancel(stream, compositeReason);
-                resolveCancelPromise(cancelResult);
-            }
-            return cancelPromise;
+        // We need to calculate the body *twice* if it's a repeat pattern
+        // at the start, once in nodot mode, then again in dot mode, so a
+        // pattern like *(?) can match 'x.y'
+        const repeated = this.type === '*' || this.type === '+';
+        // some kind of extglob
+        const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
+        let body = this.#partsToRegExp(dot);
+        if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
+            // invalid extglob, has to at least be *something* present, if it's
+            // the entire path portion.
+            const s = this.toString();
+            this.#parts = [s];
+            this.type = null;
+            this.#hasMagic = undefined;
+            return [s, mjs_unescape_unescape(this.toString()), false, false];
+        }
+        // XXX abstract out this map method
+        let bodyDotAllowed = !repeated || allowDot || dot || !ast_startNoDot
+            ? ''
+            : this.#partsToRegExp(true);
+        if (bodyDotAllowed === body) {
+            bodyDotAllowed = '';
+        }
+        if (bodyDotAllowed) {
+            body = `(?:${body})(?:${bodyDotAllowed})*?`;
+        }
+        // an empty !() is exactly equivalent to a starNoEmpty
+        let final = '';
+        if (this.type === '!' && this.#emptyExt) {
+            final = (this.isStart() && !dot ? ast_startNoDot : '') + ast_starNoEmpty;
         }
-        function startAlgorithm() {
-            return;
+        else {
+            const close = this.type === '!'
+                ? // !() must match something,but !(x) can match ''
+                    '))' +
+                        (this.isStart() && !dot && !allowDot ? ast_startNoDot : '') +
+                        ast_star +
+                        ')'
+                : this.type === '@'
+                    ? ')'
+                    : this.type === '?'
+                        ? ')?'
+                        : this.type === '+' && bodyDotAllowed
+                            ? ')'
+                            : this.type === '*' && bodyDotAllowed
+                                ? `)?`
+                                : `)${this.type}`;
+            final = start + body + close;
         }
-        branch1 = CreateReadableByteStream(startAlgorithm, pull1Algorithm, cancel1Algorithm);
-        branch2 = CreateReadableByteStream(startAlgorithm, pull2Algorithm, cancel2Algorithm);
-        forwardReaderError(reader);
-        return [branch1, branch2];
-    }
-
-    function convertUnderlyingDefaultOrByteSource(source, context) {
-        assertDictionary(source, context);
-        var original = source;
-        var autoAllocateChunkSize = original === null || original === void 0 ? void 0 : original.autoAllocateChunkSize;
-        var cancel = original === null || original === void 0 ? void 0 : original.cancel;
-        var pull = original === null || original === void 0 ? void 0 : original.pull;
-        var start = original === null || original === void 0 ? void 0 : original.start;
-        var type = original === null || original === void 0 ? void 0 : original.type;
-        return {
-            autoAllocateChunkSize: autoAllocateChunkSize === undefined ?
-                undefined :
-                convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize, context + " has member 'autoAllocateChunkSize' that"),
-            cancel: cancel === undefined ?
-                undefined :
-                convertUnderlyingSourceCancelCallback(cancel, original, context + " has member 'cancel' that"),
-            pull: pull === undefined ?
-                undefined :
-                convertUnderlyingSourcePullCallback(pull, original, context + " has member 'pull' that"),
-            start: start === undefined ?
-                undefined :
-                convertUnderlyingSourceStartCallback(start, original, context + " has member 'start' that"),
-            type: type === undefined ? undefined : convertReadableStreamType(type, context + " has member 'type' that")
-        };
-    }
-    function convertUnderlyingSourceCancelCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function (reason) { return promiseCall(fn, original, [reason]); };
-    }
-    function convertUnderlyingSourcePullCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function (controller) { return promiseCall(fn, original, [controller]); };
-    }
-    function convertUnderlyingSourceStartCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function (controller) { return reflectCall(fn, original, [controller]); };
+        return [
+            final,
+            mjs_unescape_unescape(body),
+            (this.#hasMagic = !!this.#hasMagic),
+            this.#uflag,
+        ];
     }
-    function convertReadableStreamType(type, context) {
-        type = "" + type;
-        if (type !== 'bytes') {
-            throw new TypeError(context + " '" + type + "' is not a valid enumeration value for ReadableStreamType");
+    #partsToRegExp(dot) {
+        return this.#parts
+            .map(p => {
+            // extglob ASTs should only contain parent ASTs
+            /* c8 ignore start */
+            if (typeof p === 'string') {
+                throw new Error('string type in extglob ast??');
+            }
+            /* c8 ignore stop */
+            // can ignore hasMagic, because extglobs are already always magic
+            const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
+            this.#uflag = this.#uflag || uflag;
+            return re;
+        })
+            .filter(p => !(this.isStart() && this.isEnd()) || !!p)
+            .join('|');
+    }
+    static #parseGlob(glob, hasMagic, noEmpty = false) {
+        let escaping = false;
+        let re = '';
+        let uflag = false;
+        for (let i = 0; i < glob.length; i++) {
+            const c = glob.charAt(i);
+            if (escaping) {
+                escaping = false;
+                re += (ast_reSpecials.has(c) ? '\\' : '') + c;
+                continue;
+            }
+            if (c === '\\') {
+                if (i === glob.length - 1) {
+                    re += '\\\\';
+                }
+                else {
+                    escaping = true;
+                }
+                continue;
+            }
+            if (c === '[') {
+                const [src, needUflag, consumed, magic] = brace_expressions_parseClass(glob, i);
+                if (consumed) {
+                    re += src;
+                    uflag = uflag || needUflag;
+                    i += consumed - 1;
+                    hasMagic = hasMagic || magic;
+                    continue;
+                }
+            }
+            if (c === '*') {
+                if (noEmpty && glob === '*')
+                    re += ast_starNoEmpty;
+                else
+                    re += ast_star;
+                hasMagic = true;
+                continue;
+            }
+            if (c === '?') {
+                re += ast_qmark;
+                hasMagic = true;
+                continue;
+            }
+            re += ast_regExpEscape(c);
         }
-        return type;
+        return [re, mjs_unescape_unescape(glob), !!hasMagic, uflag];
     }
+}
+//# sourceMappingURL=ast.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/minimatch/dist/mjs/escape.js
+/**
+ * Escape all magic characters in a glob pattern.
+ *
+ * If the {@link windowsPathsNoEscape | GlobOptions.windowsPathsNoEscape}
+ * option is used, then characters are escaped by wrapping in `[]`, because
+ * a magic character wrapped in a character class can only be satisfied by
+ * that exact character.  In this mode, `\` is _not_ escaped, because it is
+ * not interpreted as a magic character, but instead as a path separator.
+ */
+const mjs_escape_escape = (s, { windowsPathsNoEscape = false, } = {}) => {
+    // don't need to escape +@! because we escape the parens
+    // that make those magic, and escaping ! as [!] isn't valid,
+    // because [!]] is a valid glob class meaning not ']'.
+    return windowsPathsNoEscape
+        ? s.replace(/[?*()[\]]/g, '[$&]')
+        : s.replace(/[?*()[\]\\]/g, '\\$&');
+};
+//# sourceMappingURL=escape.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/minimatch/dist/mjs/index.js
 
-    function convertReaderOptions(options, context) {
-        assertDictionary(options, context);
-        var mode = options === null || options === void 0 ? void 0 : options.mode;
-        return {
-            mode: mode === undefined ? undefined : convertReadableStreamReaderMode(mode, context + " has member 'mode' that")
-        };
-    }
-    function convertReadableStreamReaderMode(mode, context) {
-        mode = "" + mode;
-        if (mode !== 'byob') {
-            throw new TypeError(context + " '" + mode + "' is not a valid enumeration value for ReadableStreamReaderMode");
-        }
-        return mode;
-    }
 
-    function convertIteratorOptions(options, context) {
-        assertDictionary(options, context);
-        var preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel;
-        return { preventCancel: Boolean(preventCancel) };
-    }
 
-    function convertPipeOptions(options, context) {
-        assertDictionary(options, context);
-        var preventAbort = options === null || options === void 0 ? void 0 : options.preventAbort;
-        var preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel;
-        var preventClose = options === null || options === void 0 ? void 0 : options.preventClose;
-        var signal = options === null || options === void 0 ? void 0 : options.signal;
-        if (signal !== undefined) {
-            assertAbortSignal(signal, context + " has member 'signal' that");
-        }
-        return {
-            preventAbort: Boolean(preventAbort),
-            preventCancel: Boolean(preventCancel),
-            preventClose: Boolean(preventClose),
-            signal: signal
-        };
+
+
+const dist_mjs_minimatch = (p, pattern, options = {}) => {
+    assert_valid_pattern_assertValidPattern(pattern);
+    // shortcut: comments match nothing.
+    if (!options.nocomment && pattern.charAt(0) === '#') {
+        return false;
     }
-    function assertAbortSignal(signal, context) {
-        if (!isAbortSignal(signal)) {
-            throw new TypeError(context + " is not an AbortSignal.");
-        }
+    return new mjs_Minimatch(pattern, options).match(p);
+};
+// Optimized checking for the most common glob patterns.
+const mjs_starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/;
+const mjs_starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext);
+const mjs_starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
+const mjs_starDotExtTestNocase = (ext) => {
+    ext = ext.toLowerCase();
+    return (f) => !f.startsWith('.') && f.toLowerCase().endsWith(ext);
+};
+const mjs_starDotExtTestNocaseDot = (ext) => {
+    ext = ext.toLowerCase();
+    return (f) => f.toLowerCase().endsWith(ext);
+};
+const mjs_starDotStarRE = /^\*+\.\*+$/;
+const mjs_starDotStarTest = (f) => !f.startsWith('.') && f.includes('.');
+const mjs_starDotStarTestDot = (f) => f !== '.' && f !== '..' && f.includes('.');
+const mjs_dotStarRE = /^\.\*+$/;
+const mjs_dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.');
+const mjs_starRE = /^\*+$/;
+const mjs_starTest = (f) => f.length !== 0 && !f.startsWith('.');
+const mjs_starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..';
+const mjs_qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/;
+const mjs_qmarksTestNocase = ([$0, ext = '']) => {
+    const noext = mjs_qmarksTestNoExt([$0]);
+    if (!ext)
+        return noext;
+    ext = ext.toLowerCase();
+    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
+};
+const mjs_qmarksTestNocaseDot = ([$0, ext = '']) => {
+    const noext = mjs_qmarksTestNoExtDot([$0]);
+    if (!ext)
+        return noext;
+    ext = ext.toLowerCase();
+    return (f) => noext(f) && f.toLowerCase().endsWith(ext);
+};
+const mjs_qmarksTestDot = ([$0, ext = '']) => {
+    const noext = mjs_qmarksTestNoExtDot([$0]);
+    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
+};
+const mjs_qmarksTest = ([$0, ext = '']) => {
+    const noext = mjs_qmarksTestNoExt([$0]);
+    return !ext ? noext : (f) => noext(f) && f.endsWith(ext);
+};
+const mjs_qmarksTestNoExt = ([$0]) => {
+    const len = $0.length;
+    return (f) => f.length === len && !f.startsWith('.');
+};
+const mjs_qmarksTestNoExtDot = ([$0]) => {
+    const len = $0.length;
+    return (f) => f.length === len && f !== '.' && f !== '..';
+};
+/* c8 ignore start */
+const mjs_defaultPlatform = (typeof process === 'object' && process
+    ? (typeof process.env === 'object' &&
+        process.env &&
+        process.env.__MINIMATCH_TESTING_PLATFORM__) ||
+        process.platform
+    : 'posix');
+const dist_mjs_path = {
+    win32: { sep: '\\' },
+    posix: { sep: '/' },
+};
+/* c8 ignore stop */
+const mjs_sep = mjs_defaultPlatform === 'win32' ? dist_mjs_path.win32.sep : dist_mjs_path.posix.sep;
+dist_mjs_minimatch.sep = mjs_sep;
+const mjs_GLOBSTAR = Symbol('globstar **');
+dist_mjs_minimatch.GLOBSTAR = mjs_GLOBSTAR;
+// any single thing other than /
+// don't need to escape / when using new RegExp()
+const dist_mjs_qmark = '[^/]';
+// * => any number of characters
+const dist_mjs_star = dist_mjs_qmark + '*?';
+// ** when dots are allowed.  Anything goes, except .. and .
+// not (^ or / followed by one or two dots followed by $ or /),
+// followed by anything, any number of times.
+const mjs_twoStarDot = '(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?';
+// not a ^ or / followed by a dot,
+// followed by anything, any number of times.
+const mjs_twoStarNoDot = '(?:(?!(?:\\/|^)\\.).)*?';
+const dist_mjs_filter = (pattern, options = {}) => (p) => dist_mjs_minimatch(p, pattern, options);
+dist_mjs_minimatch.filter = dist_mjs_filter;
+const mjs_ext = (a, b = {}) => Object.assign({}, a, b);
+const dist_mjs_defaults = (def) => {
+    if (!def || typeof def !== 'object' || !Object.keys(def).length) {
+        return dist_mjs_minimatch;
+    }
+    const orig = dist_mjs_minimatch;
+    const m = (p, pattern, options = {}) => orig(p, pattern, mjs_ext(def, options));
+    return Object.assign(m, {
+        Minimatch: class Minimatch extends orig.Minimatch {
+            constructor(pattern, options = {}) {
+                super(pattern, mjs_ext(def, options));
+            }
+            static defaults(options) {
+                return orig.defaults(mjs_ext(def, options)).Minimatch;
+            }
+        },
+        AST: class AST extends orig.AST {
+            /* c8 ignore start */
+            constructor(type, parent, options = {}) {
+                super(type, parent, mjs_ext(def, options));
+            }
+            /* c8 ignore stop */
+            static fromGlob(pattern, options = {}) {
+                return orig.AST.fromGlob(pattern, mjs_ext(def, options));
+            }
+        },
+        unescape: (s, options = {}) => orig.unescape(s, mjs_ext(def, options)),
+        escape: (s, options = {}) => orig.escape(s, mjs_ext(def, options)),
+        filter: (pattern, options = {}) => orig.filter(pattern, mjs_ext(def, options)),
+        defaults: (options) => orig.defaults(mjs_ext(def, options)),
+        makeRe: (pattern, options = {}) => orig.makeRe(pattern, mjs_ext(def, options)),
+        braceExpand: (pattern, options = {}) => orig.braceExpand(pattern, mjs_ext(def, options)),
+        match: (list, pattern, options = {}) => orig.match(list, pattern, mjs_ext(def, options)),
+        sep: orig.sep,
+        GLOBSTAR: mjs_GLOBSTAR,
+    });
+};
+dist_mjs_minimatch.defaults = dist_mjs_defaults;
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+const mjs_braceExpand = (pattern, options = {}) => {
+    assert_valid_pattern_assertValidPattern(pattern);
+    // Thanks to Yeting Li  for
+    // improving this regexp to avoid a ReDOS vulnerability.
+    if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
+        // shortcut. no need to expand.
+        return [pattern];
     }
-
-    function convertReadableWritablePair(pair, context) {
-        assertDictionary(pair, context);
-        var readable = pair === null || pair === void 0 ? void 0 : pair.readable;
-        assertRequiredField(readable, 'readable', 'ReadableWritablePair');
-        assertReadableStream(readable, context + " has member 'readable' that");
-        var writable = pair === null || pair === void 0 ? void 0 : pair.writable;
-        assertRequiredField(writable, 'writable', 'ReadableWritablePair');
-        assertWritableStream(writable, context + " has member 'writable' that");
-        return { readable: readable, writable: writable };
+    return node_modules_brace_expansion(pattern);
+};
+dist_mjs_minimatch.braceExpand = mjs_braceExpand;
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion.  Otherwise, any series
+// of * is equivalent to a single *.  Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+const mjs_makeRe = (pattern, options = {}) => new mjs_Minimatch(pattern, options).makeRe();
+dist_mjs_minimatch.makeRe = mjs_makeRe;
+const mjs_match = (list, pattern, options = {}) => {
+    const mm = new mjs_Minimatch(pattern, options);
+    list = list.filter(f => mm.match(f));
+    if (mm.options.nonull && !list.length) {
+        list.push(pattern);
     }
-
-    /**
-     * A readable stream represents a source of data, from which you can read.
-     *
-     * @public
-     */
-    var ReadableStream = /** @class */ (function () {
-        function ReadableStream(rawUnderlyingSource, rawStrategy) {
-            if (rawUnderlyingSource === void 0) { rawUnderlyingSource = {}; }
-            if (rawStrategy === void 0) { rawStrategy = {}; }
-            if (rawUnderlyingSource === undefined) {
-                rawUnderlyingSource = null;
+    return list;
+};
+dist_mjs_minimatch.match = mjs_match;
+// replace stuff like \* with *
+const mjs_globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
+const dist_mjs_regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
+class mjs_Minimatch {
+    options;
+    set;
+    pattern;
+    windowsPathsNoEscape;
+    nonegate;
+    negate;
+    comment;
+    empty;
+    preserveMultipleSlashes;
+    partial;
+    globSet;
+    globParts;
+    nocase;
+    isWindows;
+    platform;
+    windowsNoMagicRoot;
+    regexp;
+    constructor(pattern, options = {}) {
+        assert_valid_pattern_assertValidPattern(pattern);
+        options = options || {};
+        this.options = options;
+        this.pattern = pattern;
+        this.platform = options.platform || mjs_defaultPlatform;
+        this.isWindows = this.platform === 'win32';
+        this.windowsPathsNoEscape =
+            !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
+        if (this.windowsPathsNoEscape) {
+            this.pattern = this.pattern.replace(/\\/g, '/');
+        }
+        this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
+        this.regexp = null;
+        this.negate = false;
+        this.nonegate = !!options.nonegate;
+        this.comment = false;
+        this.empty = false;
+        this.partial = !!options.partial;
+        this.nocase = !!this.options.nocase;
+        this.windowsNoMagicRoot =
+            options.windowsNoMagicRoot !== undefined
+                ? options.windowsNoMagicRoot
+                : !!(this.isWindows && this.nocase);
+        this.globSet = [];
+        this.globParts = [];
+        this.set = [];
+        // make the set of regexps etc.
+        this.make();
+    }
+    hasMagic() {
+        if (this.options.magicalBraces && this.set.length > 1) {
+            return true;
+        }
+        for (const pattern of this.set) {
+            for (const part of pattern) {
+                if (typeof part !== 'string')
+                    return true;
             }
-            else {
-                assertObject(rawUnderlyingSource, 'First parameter');
+        }
+        return false;
+    }
+    debug(..._) { }
+    make() {
+        const pattern = this.pattern;
+        const options = this.options;
+        // empty patterns and comments match nothing.
+        if (!options.nocomment && pattern.charAt(0) === '#') {
+            this.comment = true;
+            return;
+        }
+        if (!pattern) {
+            this.empty = true;
+            return;
+        }
+        // step 1: figure out negation, etc.
+        this.parseNegate();
+        // step 2: expand braces
+        this.globSet = [...new Set(this.braceExpand())];
+        if (options.debug) {
+            this.debug = (...args) => console.error(...args);
+        }
+        this.debug(this.pattern, this.globSet);
+        // step 3: now we have a set, so turn each one into a series of
+        // path-portion matching patterns.
+        // These will be regexps, except in the case of "**", which is
+        // set to the GLOBSTAR object for globstar behavior,
+        // and will not contain any / characters
+        //
+        // First, we preprocess to make the glob pattern sets a bit simpler
+        // and deduped.  There are some perf-killing patterns that can cause
+        // problems with a glob walk, but we can simplify them down a bit.
+        const rawGlobParts = this.globSet.map(s => this.slashSplit(s));
+        this.globParts = this.preprocess(rawGlobParts);
+        this.debug(this.pattern, this.globParts);
+        // glob --> regexps
+        let set = this.globParts.map((s, _, __) => {
+            if (this.isWindows && this.windowsNoMagicRoot) {
+                // check if it's a drive or unc path.
+                const isUNC = s[0] === '' &&
+                    s[1] === '' &&
+                    (s[2] === '?' || !mjs_globMagic.test(s[2])) &&
+                    !mjs_globMagic.test(s[3]);
+                const isDrive = /^[a-z]:/i.test(s[0]);
+                if (isUNC) {
+                    return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))];
+                }
+                else if (isDrive) {
+                    return [s[0], ...s.slice(1).map(ss => this.parse(ss))];
+                }
             }
-            var strategy = convertQueuingStrategy(rawStrategy, 'Second parameter');
-            var underlyingSource = convertUnderlyingDefaultOrByteSource(rawUnderlyingSource, 'First parameter');
-            InitializeReadableStream(this);
-            if (underlyingSource.type === 'bytes') {
-                if (strategy.size !== undefined) {
-                    throw new RangeError('The strategy for a byte stream cannot have a size function');
+            return s.map(ss => this.parse(ss));
+        });
+        this.debug(this.pattern, set);
+        // filter out everything that didn't compile properly.
+        this.set = set.filter(s => s.indexOf(false) === -1);
+        // do not treat the ? in UNC paths as magic
+        if (this.isWindows) {
+            for (let i = 0; i < this.set.length; i++) {
+                const p = this.set[i];
+                if (p[0] === '' &&
+                    p[1] === '' &&
+                    this.globParts[i][2] === '?' &&
+                    typeof p[3] === 'string' &&
+                    /^[a-z]:$/i.test(p[3])) {
+                    p[2] = '?';
                 }
-                var highWaterMark = ExtractHighWaterMark(strategy, 0);
-                SetUpReadableByteStreamControllerFromUnderlyingSource(this, underlyingSource, highWaterMark);
             }
-            else {
-                var sizeAlgorithm = ExtractSizeAlgorithm(strategy);
-                var highWaterMark = ExtractHighWaterMark(strategy, 1);
-                SetUpReadableStreamDefaultControllerFromUnderlyingSource(this, underlyingSource, highWaterMark, sizeAlgorithm);
+        }
+        this.debug(this.pattern, this.set);
+    }
+    // various transforms to equivalent pattern sets that are
+    // faster to process in a filesystem walk.  The goal is to
+    // eliminate what we can, and push all ** patterns as far
+    // to the right as possible, even if it increases the number
+    // of patterns that we have to process.
+    preprocess(globParts) {
+        // if we're not in globstar mode, then turn all ** into *
+        if (this.options.noglobstar) {
+            for (let i = 0; i < globParts.length; i++) {
+                for (let j = 0; j < globParts[i].length; j++) {
+                    if (globParts[i][j] === '**') {
+                        globParts[i][j] = '*';
+                    }
+                }
             }
         }
-        Object.defineProperty(ReadableStream.prototype, "locked", {
-            /**
-             * Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}.
-             */
-            get: function () {
-                if (!IsReadableStream(this)) {
-                    throw streamBrandCheckException$1('locked');
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            // aggressive optimization for the purpose of fs walking
+            globParts = this.firstPhasePreProcess(globParts);
+            globParts = this.secondPhasePreProcess(globParts);
+        }
+        else if (optimizationLevel >= 1) {
+            // just basic optimizations to remove some .. parts
+            globParts = this.levelOneOptimize(globParts);
+        }
+        else {
+            globParts = this.adjascentGlobstarOptimize(globParts);
+        }
+        return globParts;
+    }
+    // just get rid of adjascent ** portions
+    adjascentGlobstarOptimize(globParts) {
+        return globParts.map(parts => {
+            let gs = -1;
+            while (-1 !== (gs = parts.indexOf('**', gs + 1))) {
+                let i = gs;
+                while (parts[i + 1] === '**') {
+                    i++;
+                }
+                if (i !== gs) {
+                    parts.splice(gs, i - gs);
                 }
-                return IsReadableStreamLocked(this);
-            },
-            enumerable: false,
-            configurable: true
-        });
-        /**
-         * Cancels the stream, signaling a loss of interest in the stream by a consumer.
-         *
-         * The supplied `reason` argument will be given to the underlying source's {@link UnderlyingSource.cancel | cancel()}
-         * method, which might or might not use it.
-         */
-        ReadableStream.prototype.cancel = function (reason) {
-            if (reason === void 0) { reason = undefined; }
-            if (!IsReadableStream(this)) {
-                return promiseRejectedWith(streamBrandCheckException$1('cancel'));
             }
-            if (IsReadableStreamLocked(this)) {
-                return promiseRejectedWith(new TypeError('Cannot cancel a stream that already has a reader'));
+            return parts;
+        });
+    }
+    // get rid of adjascent ** and resolve .. portions
+    levelOneOptimize(globParts) {
+        return globParts.map(parts => {
+            parts = parts.reduce((set, part) => {
+                const prev = set[set.length - 1];
+                if (part === '**' && prev === '**') {
+                    return set;
+                }
+                if (part === '..') {
+                    if (prev && prev !== '..' && prev !== '.' && prev !== '**') {
+                        set.pop();
+                        return set;
+                    }
+                }
+                set.push(part);
+                return set;
+            }, []);
+            return parts.length === 0 ? [''] : parts;
+        });
+    }
+    levelTwoFileOptimize(parts) {
+        if (!Array.isArray(parts)) {
+            parts = this.slashSplit(parts);
+        }
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
// -> 
/
+            if (!this.preserveMultipleSlashes) {
+                for (let i = 1; i < parts.length - 1; i++) {
+                    const p = parts[i];
+                    // don't squeeze out UNC patterns
+                    if (i === 1 && p === '' && parts[0] === '')
+                        continue;
+                    if (p === '.' || p === '') {
+                        didSomething = true;
+                        parts.splice(i, 1);
+                        i--;
+                    }
+                }
+                if (parts[0] === '.' &&
+                    parts.length === 2 &&
+                    (parts[1] === '.' || parts[1] === '')) {
+                    didSomething = true;
+                    parts.pop();
+                }
             }
-            return ReadableStreamCancel(this, reason);
-        };
-        ReadableStream.prototype.getReader = function (rawOptions) {
-            if (rawOptions === void 0) { rawOptions = undefined; }
-            if (!IsReadableStream(this)) {
-                throw streamBrandCheckException$1('getReader');
+            // 
/

/../ ->

/
+            let dd = 0;
+            while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                const p = parts[dd - 1];
+                if (p && p !== '.' && p !== '..' && p !== '**') {
+                    didSomething = true;
+                    parts.splice(dd - 1, 2);
+                    dd -= 2;
+                }
             }
-            var options = convertReaderOptions(rawOptions, 'First parameter');
-            if (options.mode === undefined) {
-                return AcquireReadableStreamDefaultReader(this);
+        } while (didSomething);
+        return parts.length === 0 ? [''] : parts;
+    }
+    // First phase: single-pattern processing
+    // 
 is 1 or more portions
+    //  is 1 or more portions
+    // 

is any portion other than ., .., '', or ** + // is . or '' + // + // **/.. is *brutal* for filesystem walking performance, because + // it effectively resets the recursive walk each time it occurs, + // and ** cannot be reduced out by a .. pattern part like a regexp + // or most strings (other than .., ., and '') can be. + // + //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + //

// -> 
/
+    // 
/

/../ ->

/
+    // **/**/ -> **/
+    //
+    // **/*/ -> */**/ <== not valid because ** doesn't follow
+    // this WOULD be allowed if ** did follow symlinks, or * didn't
+    firstPhasePreProcess(globParts) {
+        let didSomething = false;
+        do {
+            didSomething = false;
+            // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/} + for (let parts of globParts) { + let gs = -1; + while (-1 !== (gs = parts.indexOf('**', gs + 1))) { + let gss = gs; + while (parts[gss + 1] === '**') { + //

/**/**/ -> 
/**/
+                        gss++;
+                    }
+                    // eg, if gs is 2 and gss is 4, that means we have 3 **
+                    // parts, and can remove 2 of them.
+                    if (gss > gs) {
+                        parts.splice(gs + 1, gss - gs);
+                    }
+                    let next = parts[gs + 1];
+                    const p = parts[gs + 2];
+                    const p2 = parts[gs + 3];
+                    if (next !== '..')
+                        continue;
+                    if (!p ||
+                        p === '.' ||
+                        p === '..' ||
+                        !p2 ||
+                        p2 === '.' ||
+                        p2 === '..') {
+                        continue;
+                    }
+                    didSomething = true;
+                    // edit parts in place, and push the new one
+                    parts.splice(gs, 1);
+                    const other = parts.slice(0);
+                    other[gs] = '**';
+                    globParts.push(other);
+                    gs--;
+                }
+                // 
// -> 
/
+                if (!this.preserveMultipleSlashes) {
+                    for (let i = 1; i < parts.length - 1; i++) {
+                        const p = parts[i];
+                        // don't squeeze out UNC patterns
+                        if (i === 1 && p === '' && parts[0] === '')
+                            continue;
+                        if (p === '.' || p === '') {
+                            didSomething = true;
+                            parts.splice(i, 1);
+                            i--;
+                        }
+                    }
+                    if (parts[0] === '.' &&
+                        parts.length === 2 &&
+                        (parts[1] === '.' || parts[1] === '')) {
+                        didSomething = true;
+                        parts.pop();
+                    }
+                }
+                // 
/

/../ ->

/
+                let dd = 0;
+                while (-1 !== (dd = parts.indexOf('..', dd + 1))) {
+                    const p = parts[dd - 1];
+                    if (p && p !== '.' && p !== '..' && p !== '**') {
+                        didSomething = true;
+                        const needDot = dd === 1 && parts[dd + 1] === '**';
+                        const splin = needDot ? ['.'] : [];
+                        parts.splice(dd - 1, 2, ...splin);
+                        if (parts.length === 0)
+                            parts.push('');
+                        dd -= 2;
+                    }
+                }
             }
-            return AcquireReadableStreamBYOBReader(this);
-        };
-        ReadableStream.prototype.pipeThrough = function (rawTransform, rawOptions) {
-            if (rawOptions === void 0) { rawOptions = {}; }
-            if (!IsReadableStream(this)) {
-                throw streamBrandCheckException$1('pipeThrough');
+        } while (didSomething);
+        return globParts;
+    }
+    // second phase: multi-pattern dedupes
+    // {
/*/,
/

/} ->

/*/
+    // {
/,
/} -> 
/
+    // {
/**/,
/} -> 
/**/
+    //
+    // {
/**/,
/**/

/} ->

/**/
+    // ^-- not valid because ** doens't follow symlinks
+    secondPhasePreProcess(globParts) {
+        for (let i = 0; i < globParts.length - 1; i++) {
+            for (let j = i + 1; j < globParts.length; j++) {
+                const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
+                if (!matched)
+                    continue;
+                globParts[i] = matched;
+                globParts[j] = [];
             }
-            assertRequiredArgument(rawTransform, 1, 'pipeThrough');
-            var transform = convertReadableWritablePair(rawTransform, 'First parameter');
-            var options = convertPipeOptions(rawOptions, 'Second parameter');
-            if (IsReadableStreamLocked(this)) {
-                throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream');
+        }
+        return globParts.filter(gs => gs.length);
+    }
+    partsMatch(a, b, emptyGSMatch = false) {
+        let ai = 0;
+        let bi = 0;
+        let result = [];
+        let which = '';
+        while (ai < a.length && bi < b.length) {
+            if (a[ai] === b[bi]) {
+                result.push(which === 'b' ? b[bi] : a[ai]);
+                ai++;
+                bi++;
             }
-            if (IsWritableStreamLocked(transform.writable)) {
-                throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream');
+            else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {
+                result.push(a[ai]);
+                ai++;
             }
-            var promise = ReadableStreamPipeTo(this, transform.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal);
-            setPromiseIsHandledToTrue(promise);
-            return transform.readable;
-        };
-        ReadableStream.prototype.pipeTo = function (destination, rawOptions) {
-            if (rawOptions === void 0) { rawOptions = {}; }
-            if (!IsReadableStream(this)) {
-                return promiseRejectedWith(streamBrandCheckException$1('pipeTo'));
+            else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {
+                result.push(b[bi]);
+                bi++;
             }
-            if (destination === undefined) {
-                return promiseRejectedWith("Parameter 1 is required in 'pipeTo'.");
+            else if (a[ai] === '*' &&
+                b[bi] &&
+                (this.options.dot || !b[bi].startsWith('.')) &&
+                b[bi] !== '**') {
+                if (which === 'b')
+                    return false;
+                which = 'a';
+                result.push(a[ai]);
+                ai++;
+                bi++;
             }
-            if (!IsWritableStream(destination)) {
-                return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));
+            else if (b[bi] === '*' &&
+                a[ai] &&
+                (this.options.dot || !a[ai].startsWith('.')) &&
+                a[ai] !== '**') {
+                if (which === 'a')
+                    return false;
+                which = 'b';
+                result.push(b[bi]);
+                ai++;
+                bi++;
             }
-            var options;
-            try {
-                options = convertPipeOptions(rawOptions, 'Second parameter');
+            else {
+                return false;
             }
-            catch (e) {
-                return promiseRejectedWith(e);
+        }
+        // if we fall out of the loop, it means they two are identical
+        // as long as their lengths match
+        return a.length === b.length && result;
+    }
+    parseNegate() {
+        if (this.nonegate)
+            return;
+        const pattern = this.pattern;
+        let negate = false;
+        let negateOffset = 0;
+        for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {
+            negate = !negate;
+            negateOffset++;
+        }
+        if (negateOffset)
+            this.pattern = pattern.slice(negateOffset);
+        this.negate = negate;
+    }
+    // set partial to true to test if, for example,
+    // "/a/b" matches the start of "/*/b/*/d"
+    // Partial means, if you run out of file before you run
+    // out of pattern, then that's fine, as long as all
+    // the parts match.
+    matchOne(file, pattern, partial = false) {
+        const options = this.options;
+        // UNC paths like //?/X:/... can match X:/... and vice versa
+        // Drive letters in absolute drive or unc paths are always compared
+        // case-insensitively.
+        if (this.isWindows) {
+            const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0]);
+            const fileUNC = !fileDrive &&
+                file[0] === '' &&
+                file[1] === '' &&
+                file[2] === '?' &&
+                /^[a-z]:$/i.test(file[3]);
+            const patternDrive = typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0]);
+            const patternUNC = !patternDrive &&
+                pattern[0] === '' &&
+                pattern[1] === '' &&
+                pattern[2] === '?' &&
+                typeof pattern[3] === 'string' &&
+                /^[a-z]:$/i.test(pattern[3]);
+            const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined;
+            const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined;
+            if (typeof fdi === 'number' && typeof pdi === 'number') {
+                const [fd, pd] = [file[fdi], pattern[pdi]];
+                if (fd.toLowerCase() === pd.toLowerCase()) {
+                    pattern[pdi] = fd;
+                    if (pdi > fdi) {
+                        pattern = pattern.slice(pdi);
+                    }
+                    else if (fdi > pdi) {
+                        file = file.slice(fdi);
+                    }
+                }
             }
-            if (IsReadableStreamLocked(this)) {
-                return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream'));
+        }
+        // resolve and reduce . and .. portions in the file as well.
+        // dont' need to do the second phase, because it's only one string[]
+        const { optimizationLevel = 1 } = this.options;
+        if (optimizationLevel >= 2) {
+            file = this.levelTwoFileOptimize(file);
+        }
+        this.debug('matchOne', this, { file, pattern });
+        this.debug('matchOne', file.length, pattern.length);
+        for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
+            this.debug('matchOne loop');
+            var p = pattern[pi];
+            var f = file[fi];
+            this.debug(pattern, p, f);
+            // should be impossible.
+            // some invalid regexp stuff in the set.
+            /* c8 ignore start */
+            if (p === false) {
+                return false;
             }
-            if (IsWritableStreamLocked(destination)) {
-                return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream'));
+            /* c8 ignore stop */
+            if (p === mjs_GLOBSTAR) {
+                this.debug('GLOBSTAR', [pattern, p, f]);
+                // "**"
+                // a/**/b/**/c would match the following:
+                // a/b/x/y/z/c
+                // a/x/y/z/b/c
+                // a/b/x/b/x/c
+                // a/b/c
+                // To do this, take the rest of the pattern after
+                // the **, and see if it would match the file remainder.
+                // If so, return success.
+                // If not, the ** "swallows" a segment, and try again.
+                // This is recursively awful.
+                //
+                // a/**/b/**/c matching a/b/x/y/z/c
+                // - a matches a
+                // - doublestar
+                //   - matchOne(b/x/y/z/c, b/**/c)
+                //     - b matches b
+                //     - doublestar
+                //       - matchOne(x/y/z/c, c) -> no
+                //       - matchOne(y/z/c, c) -> no
+                //       - matchOne(z/c, c) -> no
+                //       - matchOne(c, c) yes, hit
+                var fr = fi;
+                var pr = pi + 1;
+                if (pr === pl) {
+                    this.debug('** at the end');
+                    // a ** at the end will just swallow the rest.
+                    // We have found a match.
+                    // however, it will not swallow /.x, unless
+                    // options.dot is set.
+                    // . and .. are *never* matched by **, for explosively
+                    // exponential reasons.
+                    for (; fi < fl; fi++) {
+                        if (file[fi] === '.' ||
+                            file[fi] === '..' ||
+                            (!options.dot && file[fi].charAt(0) === '.'))
+                            return false;
+                    }
+                    return true;
+                }
+                // ok, let's see if we can swallow whatever we can.
+                while (fr < fl) {
+                    var swallowee = file[fr];
+                    this.debug('\nglobstar while', file, fr, pattern, pr, swallowee);
+                    // XXX remove this slice.  Just pass the start index.
+                    if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+                        this.debug('globstar found match!', fr, fl, swallowee);
+                        // found a match.
+                        return true;
+                    }
+                    else {
+                        // can't swallow "." or ".." ever.
+                        // can only swallow ".foo" when explicitly asked.
+                        if (swallowee === '.' ||
+                            swallowee === '..' ||
+                            (!options.dot && swallowee.charAt(0) === '.')) {
+                            this.debug('dot detected!', file, fr, pattern, pr);
+                            break;
+                        }
+                        // ** swallows a segment, and continue.
+                        this.debug('globstar swallow a segment, and continue');
+                        fr++;
+                    }
+                }
+                // no match was found.
+                // However, in partial mode, we can't say this is necessarily over.
+                /* c8 ignore start */
+                if (partial) {
+                    // ran out of file
+                    this.debug('\n>>> no match, partial?', file, fr, pattern, pr);
+                    if (fr === fl) {
+                        return true;
+                    }
+                }
+                /* c8 ignore stop */
+                return false;
             }
-            return ReadableStreamPipeTo(this, destination, options.preventClose, options.preventAbort, options.preventCancel, options.signal);
-        };
-        /**
-         * Tees this readable stream, returning a two-element array containing the two resulting branches as
-         * new {@link ReadableStream} instances.
-         *
-         * Teeing a stream will lock it, preventing any other consumer from acquiring a reader.
-         * To cancel the stream, cancel both of the resulting branches; a composite cancellation reason will then be
-         * propagated to the stream's underlying source.
-         *
-         * Note that the chunks seen in each branch will be the same object. If the chunks are not immutable,
-         * this could allow interference between the two branches.
-         */
-        ReadableStream.prototype.tee = function () {
-            if (!IsReadableStream(this)) {
-                throw streamBrandCheckException$1('tee');
+            // something other than **
+            // non-magic patterns just have to match exactly
+            // patterns with magic have been turned into regexps.
+            let hit;
+            if (typeof p === 'string') {
+                hit = f === p;
+                this.debug('string match', p, f, hit);
             }
-            var branches = ReadableStreamTee(this);
-            return CreateArrayFromList(branches);
-        };
-        ReadableStream.prototype.values = function (rawOptions) {
-            if (rawOptions === void 0) { rawOptions = undefined; }
-            if (!IsReadableStream(this)) {
-                throw streamBrandCheckException$1('values');
+            else {
+                hit = p.test(f);
+                this.debug('pattern match', p, f, hit);
             }
-            var options = convertIteratorOptions(rawOptions, 'First parameter');
-            return AcquireReadableStreamAsyncIterator(this, options.preventCancel);
-        };
-        return ReadableStream;
-    }());
-    Object.defineProperties(ReadableStream.prototype, {
-        cancel: { enumerable: true },
-        getReader: { enumerable: true },
-        pipeThrough: { enumerable: true },
-        pipeTo: { enumerable: true },
-        tee: { enumerable: true },
-        values: { enumerable: true },
-        locked: { enumerable: true }
-    });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.toStringTag, {
-            value: 'ReadableStream',
-            configurable: true
-        });
-    }
-    if (typeof SymbolPolyfill.asyncIterator === 'symbol') {
-        Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.asyncIterator, {
-            value: ReadableStream.prototype.values,
-            writable: true,
-            configurable: true
-        });
+            if (!hit)
+                return false;
+        }
+        // Note: ending in / means that we'll get a final ""
+        // at the end of the pattern.  This can only match a
+        // corresponding "" at the end of the file.
+        // If the file ends in /, then it can only match a
+        // a pattern that ends in /, unless the pattern just
+        // doesn't have any more for it. But, a/b/ should *not*
+        // match "a/b/*", even though "" matches against the
+        // [^/]*? pattern, except in partial mode, where it might
+        // simply not be reached yet.
+        // However, a/b/ should still satisfy a/*
+        // now either we fell off the end of the pattern, or we're done.
+        if (fi === fl && pi === pl) {
+            // ran out of pattern and filename at the same time.
+            // an exact hit!
+            return true;
+        }
+        else if (fi === fl) {
+            // ran out of file, but still had pattern left.
+            // this is ok if we're doing the match as part of
+            // a glob fs traversal.
+            return partial;
+        }
+        else if (pi === pl) {
+            // ran out of pattern, still have file left.
+            // this is only acceptable if we're on the very last
+            // empty segment of a file with a trailing slash.
+            // a/* should match a/b/
+            return fi === fl - 1 && file[fi] === '';
+            /* c8 ignore start */
+        }
+        else {
+            // should be unreachable.
+            throw new Error('wtf?');
+        }
+        /* c8 ignore stop */
     }
-    // Abstract operations for the ReadableStream.
-    // Throws if and only if startAlgorithm throws.
-    function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) {
-        if (highWaterMark === void 0) { highWaterMark = 1; }
-        if (sizeAlgorithm === void 0) { sizeAlgorithm = function () { return 1; }; }
-        var stream = Object.create(ReadableStream.prototype);
-        InitializeReadableStream(stream);
-        var controller = Object.create(ReadableStreamDefaultController.prototype);
-        SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm);
-        return stream;
+    braceExpand() {
+        return mjs_braceExpand(this.pattern, this.options);
     }
-    // Throws if and only if startAlgorithm throws.
-    function CreateReadableByteStream(startAlgorithm, pullAlgorithm, cancelAlgorithm) {
-        var stream = Object.create(ReadableStream.prototype);
-        InitializeReadableStream(stream);
-        var controller = Object.create(ReadableByteStreamController.prototype);
-        SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, 0, undefined);
-        return stream;
+    parse(pattern) {
+        assert_valid_pattern_assertValidPattern(pattern);
+        const options = this.options;
+        // shortcuts
+        if (pattern === '**')
+            return mjs_GLOBSTAR;
+        if (pattern === '')
+            return '';
+        // far and away, the most common glob pattern parts are
+        // *, *.*, and *.  Add a fast check method for those.
+        let m;
+        let fastTest = null;
+        if ((m = pattern.match(mjs_starRE))) {
+            fastTest = options.dot ? mjs_starTestDot : mjs_starTest;
+        }
+        else if ((m = pattern.match(mjs_starDotExtRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? mjs_starDotExtTestNocaseDot
+                    : mjs_starDotExtTestNocase
+                : options.dot
+                    ? mjs_starDotExtTestDot
+                    : mjs_starDotExtTest)(m[1]);
+        }
+        else if ((m = pattern.match(mjs_qmarksRE))) {
+            fastTest = (options.nocase
+                ? options.dot
+                    ? mjs_qmarksTestNocaseDot
+                    : mjs_qmarksTestNocase
+                : options.dot
+                    ? mjs_qmarksTestDot
+                    : mjs_qmarksTest)(m);
+        }
+        else if ((m = pattern.match(mjs_starDotStarRE))) {
+            fastTest = options.dot ? mjs_starDotStarTestDot : mjs_starDotStarTest;
+        }
+        else if ((m = pattern.match(mjs_dotStarRE))) {
+            fastTest = mjs_dotStarTest;
+        }
+        const re = ast_AST.fromGlob(pattern, this.options).toMMPattern();
+        return fastTest ? Object.assign(re, { test: fastTest }) : re;
+    }
+    makeRe() {
+        if (this.regexp || this.regexp === false)
+            return this.regexp;
+        // at this point, this.set is a 2d array of partial
+        // pattern strings, or "**".
+        //
+        // It's better to use .match().  This function shouldn't
+        // be used, really, but it's pretty convenient sometimes,
+        // when you just want to work with a regex.
+        const set = this.set;
+        if (!set.length) {
+            this.regexp = false;
+            return this.regexp;
+        }
+        const options = this.options;
+        const twoStar = options.noglobstar
+            ? dist_mjs_star
+            : options.dot
+                ? mjs_twoStarDot
+                : mjs_twoStarNoDot;
+        const flags = new Set(options.nocase ? ['i'] : []);
+        // regexpify non-globstar patterns
+        // if ** is only item, then we just do one twoStar
+        // if ** is first, and there are more, prepend (\/|twoStar\/)? to next
+        // if ** is last, append (\/twoStar|) to previous
+        // if ** is in the middle, append (\/|\/twoStar\/) to previous
+        // then filter out GLOBSTAR symbols
+        let re = set
+            .map(pattern => {
+            const pp = pattern.map(p => {
+                if (p instanceof RegExp) {
+                    for (const f of p.flags.split(''))
+                        flags.add(f);
+                }
+                return typeof p === 'string'
+                    ? dist_mjs_regExpEscape(p)
+                    : p === mjs_GLOBSTAR
+                        ? mjs_GLOBSTAR
+                        : p._src;
+            });
+            pp.forEach((p, i) => {
+                const next = pp[i + 1];
+                const prev = pp[i - 1];
+                if (p !== mjs_GLOBSTAR || prev === mjs_GLOBSTAR) {
+                    return;
+                }
+                if (prev === undefined) {
+                    if (next !== undefined && next !== mjs_GLOBSTAR) {
+                        pp[i + 1] = '(?:\\/|' + twoStar + '\\/)?' + next;
+                    }
+                    else {
+                        pp[i] = twoStar;
+                    }
+                }
+                else if (next === undefined) {
+                    pp[i - 1] = prev + '(?:\\/|' + twoStar + ')?';
+                }
+                else if (next !== mjs_GLOBSTAR) {
+                    pp[i - 1] = prev + '(?:\\/|\\/' + twoStar + '\\/)' + next;
+                    pp[i + 1] = mjs_GLOBSTAR;
+                }
+            });
+            return pp.filter(p => p !== mjs_GLOBSTAR).join('/');
+        })
+            .join('|');
+        // need to wrap in parens if we had more than one thing with |,
+        // otherwise only the first will be anchored to ^ and the last to $
+        const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', ''];
+        // must match entire pattern
+        // ending in a * or ** will make it less strict.
+        re = '^' + open + re + close + '$';
+        // can match anything, as long as it's not this.
+        if (this.negate)
+            re = '^(?!' + re + ').+$';
+        try {
+            this.regexp = new RegExp(re, [...flags].join(''));
+            /* c8 ignore start */
+        }
+        catch (ex) {
+            // should be impossible
+            this.regexp = false;
+        }
+        /* c8 ignore stop */
+        return this.regexp;
     }
-    function InitializeReadableStream(stream) {
-        stream._state = 'readable';
-        stream._reader = undefined;
-        stream._storedError = undefined;
-        stream._disturbed = false;
+    slashSplit(p) {
+        // if p starts with // on windows, we preserve that
+        // so that UNC paths aren't broken.  Otherwise, any number of
+        // / characters are coalesced into one, unless
+        // preserveMultipleSlashes is set to true.
+        if (this.preserveMultipleSlashes) {
+            return p.split('/');
+        }
+        else if (this.isWindows && /^\/\/[^\/]+/.test(p)) {
+            // add an extra '' for the one we lose
+            return ['', ...p.split(/\/+/)];
+        }
+        else {
+            return p.split(/\/+/);
+        }
     }
-    function IsReadableStream(x) {
-        if (!typeIsObject(x)) {
+    match(f, partial = this.partial) {
+        this.debug('match', f, this.pattern);
+        // short-circuit in the case of busted things.
+        // comments, etc.
+        if (this.comment) {
             return false;
         }
-        if (!Object.prototype.hasOwnProperty.call(x, '_readableStreamController')) {
+        if (this.empty) {
+            return f === '';
+        }
+        if (f === '/' && partial) {
+            return true;
+        }
+        const options = this.options;
+        // windows: need to use /, not \
+        if (this.isWindows) {
+            f = f.split('\\').join('/');
+        }
+        // treat the test path as a set of pathparts.
+        const ff = this.slashSplit(f);
+        this.debug(this.pattern, 'split', ff);
+        // just ONE of the pattern sets in this.set needs to match
+        // in order for it to be valid.  If negating, then just one
+        // match means that we have failed.
+        // Either way, return on the first hit.
+        const set = this.set;
+        this.debug(this.pattern, 'set', set);
+        // Find the basename of the path by looking for the last non-empty segment
+        let filename = ff[ff.length - 1];
+        if (!filename) {
+            for (let i = ff.length - 2; !filename && i >= 0; i--) {
+                filename = ff[i];
+            }
+        }
+        for (let i = 0; i < set.length; i++) {
+            const pattern = set[i];
+            let file = ff;
+            if (options.matchBase && pattern.length === 1) {
+                file = [filename];
+            }
+            const hit = this.matchOne(file, pattern, partial);
+            if (hit) {
+                if (options.flipNegate) {
+                    return true;
+                }
+                return !this.negate;
+            }
+        }
+        // didn't get any hits.  this is success if it's a negative
+        // pattern, failure otherwise.
+        if (options.flipNegate) {
             return false;
         }
-        return x instanceof ReadableStream;
+        return this.negate;
     }
-    function IsReadableStreamLocked(stream) {
-        if (stream._reader === undefined) {
-            return false;
+    static defaults(def) {
+        return dist_mjs_minimatch.defaults(def).Minimatch;
+    }
+}
+/* c8 ignore start */
+
+
+
+/* c8 ignore stop */
+dist_mjs_minimatch.AST = ast_AST;
+dist_mjs_minimatch.Minimatch = mjs_Minimatch;
+dist_mjs_minimatch.escape = mjs_escape_escape;
+dist_mjs_minimatch.unescape = mjs_unescape_unescape;
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/it-glob/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * Like [`glob`](https://npmjs.com/package/glob) but async iterable.
+ *
+ * @example
+ *
+ * ```javascript
+ * import glob from 'it-glob'
+ *
+ * const options = {
+ *   cwd // defaults to process.cwd
+ *   absolute // return absolute paths, defaults to false
+ *   nodir // only yield file paths, skip directories
+ *
+ *   // all other options are passed to minimatch
+ * }
+ *
+ * for await (const path of glob('/path/to/file', '**\/*', options)) {
+ *  console.info(path)
+ * }
+ * ```
+ *
+ * See the [minimatch docs](https://www.npmjs.com/package/minimatch#options) for the full list of options.
+ */
+
+
+
+/**
+ * Async iterable filename pattern matcher
+ */
+async function* dist_src_glob(dir, pattern, options = {}) {
+    const absoluteDir = external_path_.resolve(dir);
+    const relativeDir = external_path_.relative(options.cwd ?? process.cwd(), dir);
+    const stats = await promises_namespaceObject.stat(absoluteDir);
+    if (stats.isDirectory()) {
+        for await (const entry of it_glob_dist_src_glob(absoluteDir, '', pattern, options)) {
+            yield entry;
         }
-        return true;
+        return;
     }
-    // ReadableStream API exposed for controllers.
-    function ReadableStreamCancel(stream, reason) {
-        stream._disturbed = true;
-        if (stream._state === 'closed') {
-            return promiseResolvedWith(undefined);
+    if (dist_mjs_minimatch(relativeDir, pattern, options)) {
+        yield options.absolute === true ? absoluteDir : relativeDir;
+    }
+}
+async function* it_glob_dist_src_glob(base, dir, pattern, options) {
+    for await (const entry of await promises_namespaceObject.opendir(external_path_.join(base, dir))) {
+        const relativeEntryPath = external_path_.join(dir, entry.name);
+        const absoluteEntryPath = external_path_.join(base, dir, entry.name);
+        let match = dist_mjs_minimatch(relativeEntryPath, pattern, options);
+        const isDirectory = entry.isDirectory();
+        if (isDirectory && options.nodir === true) {
+            match = false;
         }
-        if (stream._state === 'errored') {
-            return promiseRejectedWith(stream._storedError);
+        if (match) {
+            yield options.absolute === true ? absoluteEntryPath : relativeEntryPath;
         }
-        ReadableStreamClose(stream);
-        var reader = stream._reader;
-        if (reader !== undefined && IsReadableStreamBYOBReader(reader)) {
-            reader._readIntoRequests.forEach(function (readIntoRequest) {
-                readIntoRequest._closeSteps(undefined);
-            });
-            reader._readIntoRequests = new SimpleQueue();
+        if (isDirectory) {
+            yield* it_glob_dist_src_glob(base, relativeEntryPath, pattern, options);
         }
-        var sourceCancelPromise = stream._readableStreamController[CancelSteps](reason);
-        return transformPromiseWith(sourceCancelPromise, noop);
     }
-    function ReadableStreamClose(stream) {
-        stream._state = 'closed';
-        var reader = stream._reader;
-        if (reader === undefined) {
-            return;
+}
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/it-peekable/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * Lets you look at the contents of an async iterator and decide what to do
+ *
+ * @example
+ *
+ * ```javascript
+ * import peekable from 'it-peekable'
+ *
+ * // This can also be an iterator, generator, etc
+ * const values = [0, 1, 2, 3, 4]
+ *
+ * const it = peekable(value)
+ *
+ * const first = it.peek()
+ *
+ * console.info(first) // 0
+ *
+ * it.push(first)
+ *
+ * console.info([...it])
+ * // [ 0, 1, 2, 3, 4 ]
+ * ```
+ *
+ * Async sources must be awaited:
+ *
+ * ```javascript
+ * import peekable from 'it-peekable'
+ *
+ * const values = async function * () {
+ *   yield * [0, 1, 2, 3, 4]
+ * }
+ *
+ * const it = peekable(values())
+ *
+ * const first = await it.peek()
+ *
+ * console.info(first) // 0
+ *
+ * it.push(first)
+ *
+ * console.info(await all(it))
+ * // [ 0, 1, 2, 3, 4 ]
+ * ```
+ */
+function dist_src_peekable(iterable) {
+    // @ts-expect-error can't use Symbol.asyncIterator to index iterable since it might be Iterable
+    const [iterator, symbol] = iterable[Symbol.asyncIterator] != null
+        // @ts-expect-error can't use Symbol.asyncIterator to index iterable since it might be Iterable
+        ? [iterable[Symbol.asyncIterator](), Symbol.asyncIterator]
+        // @ts-expect-error can't use Symbol.iterator to index iterable since it might be AsyncIterable
+        : [iterable[Symbol.iterator](), Symbol.iterator];
+    const queue = [];
+    // @ts-expect-error can't use symbol to index peekable
+    return {
+        peek: () => {
+            return iterator.next();
+        },
+        push: (value) => {
+            queue.push(value);
+        },
+        next: () => {
+            if (queue.length > 0) {
+                return {
+                    done: false,
+                    value: queue.shift()
+                };
+            }
+            return iterator.next();
+        },
+        [symbol]() {
+            return this;
         }
-        defaultReaderClosedPromiseResolve(reader);
-        if (IsReadableStreamDefaultReader(reader)) {
-            reader._readRequests.forEach(function (readRequest) {
-                readRequest._closeSteps();
-            });
-            reader._readRequests = new SimpleQueue();
+    };
+}
+/* harmony default export */ const blockstore_fs_node_modules_it_peekable_dist_src = (dist_src_peekable);
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/it-map/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * Convert one value from an (async)iterator into another.
+ *
+ * @example
+ *
+ * ```javascript
+ * import map from 'it-map'
+ *
+ * // This can also be an iterator, generator, etc
+ * const values = [0, 1, 2, 3, 4]
+ *
+ * const result = map(values, (val) => val++)
+ *
+ * console.info(result) // [1, 2, 3, 4, 5]
+ * ```
+ *
+ * Async sources and transforms must be awaited:
+ *
+ * ```javascript
+ * import map from 'it-map'
+ *
+ * const values = async function * () {
+ *   yield * [0, 1, 2, 3, 4]
+ * }
+ *
+ * const result = await map(values(), async (val) => val++)
+ *
+ * console.info(result) // [1, 2, 3, 4, 5]
+ * ```
+ */
+
+function blockstore_fs_node_modules_it_map_dist_src_isAsyncIterable(thing) {
+    return thing[Symbol.asyncIterator] != null;
+}
+function it_map_dist_src_map(source, func) {
+    if (blockstore_fs_node_modules_it_map_dist_src_isAsyncIterable(source)) {
+        return (async function* () {
+            for await (const val of source) {
+                yield func(val);
+            }
+        })();
+    }
+    // if mapping function returns a promise we have to return an async generator
+    const peekable = blockstore_fs_node_modules_it_peekable_dist_src(source);
+    const { value, done } = peekable.next();
+    if (done === true) {
+        return (function* () { }());
+    }
+    const res = func(value);
+    // @ts-expect-error .then is not present on O
+    if (typeof res.then === 'function') {
+        return (async function* () {
+            yield await res;
+            for await (const val of peekable) {
+                yield func(val);
+            }
+        })();
+    }
+    const fn = func;
+    return (function* () {
+        yield res;
+        for (const val of peekable) {
+            yield fn(val);
         }
+    })();
+}
+/* harmony default export */ const blockstore_fs_node_modules_it_map_dist_src = (it_map_dist_src_map);
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/it-batch/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * The final batch may be smaller than the max.
+ *
+ * @example
+ *
+ * ```javascript
+ * import batch from 'it-batch'
+ * import all from 'it-all'
+ *
+ * // This can also be an iterator, generator, etc
+ * const values = [0, 1, 2, 3, 4]
+ * const batchSize = 2
+ *
+ * const result = all(batch(values, batchSize))
+ *
+ * console.info(result) // [0, 1], [2, 3], [4]
+ * ```
+ *
+ * Async sources must be awaited:
+ *
+ * ```javascript
+ * import batch from 'it-batch'
+ * import all from 'it-all'
+ *
+ * const values = async function * () {
+ *   yield * [0, 1, 2, 3, 4]
+ * }
+ *
+ * const batchSize = 2
+ * const result = await all(batch(values(), batchSize))
+ *
+ * console.info(result) // [0, 1], [2, 3], [4]
+ * ```
+ */
+function node_modules_it_batch_dist_src_isAsyncIterable(thing) {
+    return thing[Symbol.asyncIterator] != null;
+}
+function src_batch(source, size = 1) {
+    size = Number(size);
+    if (node_modules_it_batch_dist_src_isAsyncIterable(source)) {
+        return (async function* () {
+            let things = [];
+            if (size < 1) {
+                size = 1;
+            }
+            if (size !== Math.round(size)) {
+                throw new Error('Batch size must be an integer');
+            }
+            for await (const thing of source) {
+                things.push(thing);
+                while (things.length >= size) {
+                    yield things.slice(0, size);
+                    things = things.slice(size);
+                }
+            }
+            while (things.length > 0) {
+                yield things.slice(0, size);
+                things = things.slice(size);
+            }
+        }());
     }
-    function ReadableStreamError(stream, e) {
-        stream._state = 'errored';
-        stream._storedError = e;
-        var reader = stream._reader;
-        if (reader === undefined) {
-            return;
+    return (function* () {
+        let things = [];
+        if (size < 1) {
+            size = 1;
         }
-        defaultReaderClosedPromiseReject(reader, e);
-        if (IsReadableStreamDefaultReader(reader)) {
-            reader._readRequests.forEach(function (readRequest) {
-                readRequest._errorSteps(e);
-            });
-            reader._readRequests = new SimpleQueue();
+        if (size !== Math.round(size)) {
+            throw new Error('Batch size must be an integer');
         }
-        else {
-            reader._readIntoRequests.forEach(function (readIntoRequest) {
-                readIntoRequest._errorSteps(e);
-            });
-            reader._readIntoRequests = new SimpleQueue();
+        for (const thing of source) {
+            things.push(thing);
+            while (things.length >= size) {
+                yield things.slice(0, size);
+                things = things.slice(size);
+            }
+        }
+        while (things.length > 0) {
+            yield things.slice(0, size);
+            things = things.slice(size);
+        }
+    }());
+}
+/* harmony default export */ const node_modules_it_batch_dist_src = (src_batch);
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/it-parallel-batch/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * Takes an async iterator that emits promise-returning functions, invokes them in parallel and emits the results in the same order as the input.
+ *
+ * The final batch may be smaller than the batch size.
+ *
+ * @example
+ *
+ * ```javascript
+ * import parallelBatch from 'it-parallel-batch'
+ * import all from 'it-all'
+ * import delay from 'delay'
+ *
+ * // This can also be an iterator, async iterator, generator, etc
+ * const input = [
+ *   async () => {
+ *     await delay(500)
+ *
+ *     return 1
+ *   },
+ *   async () => {
+ *     await delay(200)
+ *
+ *     return 2
+ *   },
+ *   async () => {
+ *     await delay(100)
+ *
+ *     return 3
+ *   }
+ * ]
+ *
+ * const batchSize = 2
+ *
+ * const result = await all(parallelBatch(input, batchSize))
+ *
+ * console.info(result) // [1, 2, 3]
+ * ```
+ */
+
+/**
+ * Takes an (async) iterator that emits promise-returning functions,
+ * invokes them in parallel and emits the results as they become available but
+ * in the same order as the input
+ */
+async function* src_parallelBatch(source, size = 1) {
+    for await (const tasks of node_modules_it_batch_dist_src(source, size)) {
+        const things = tasks.map(async (p) => {
+            return p().then(value => ({ ok: true, value }), err => ({ ok: false, err }));
+        });
+        for (let i = 0; i < things.length; i++) {
+            const result = await things[i];
+            if (result.ok) {
+                yield result.value;
+            }
+            else {
+                throw result.err;
+            }
         }
     }
-    // Helper functions for the ReadableStream.
-    function streamBrandCheckException$1(name) {
-        return new TypeError("ReadableStream.prototype." + name + " can only be used on a ReadableStream");
+}
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/vendor/varint.js
+var blockstore_fs_node_modules_multiformats_vendor_varint_encode_1 = blockstore_fs_node_modules_multiformats_vendor_varint_encode;
+
+var blockstore_fs_node_modules_multiformats_vendor_varint_MSB = 0x80
+  , blockstore_fs_node_modules_multiformats_vendor_varint_REST = 0x7F
+  , blockstore_fs_node_modules_multiformats_vendor_varint_MSBALL = ~blockstore_fs_node_modules_multiformats_vendor_varint_REST
+  , blockstore_fs_node_modules_multiformats_vendor_varint_INT = Math.pow(2, 31);
+
+function blockstore_fs_node_modules_multiformats_vendor_varint_encode(num, out, offset) {
+  out = out || [];
+  offset = offset || 0;
+  var oldOffset = offset;
+
+  while(num >= blockstore_fs_node_modules_multiformats_vendor_varint_INT) {
+    out[offset++] = (num & 0xFF) | blockstore_fs_node_modules_multiformats_vendor_varint_MSB;
+    num /= 128;
+  }
+  while(num & blockstore_fs_node_modules_multiformats_vendor_varint_MSBALL) {
+    out[offset++] = (num & 0xFF) | blockstore_fs_node_modules_multiformats_vendor_varint_MSB;
+    num >>>= 7;
+  }
+  out[offset] = num | 0;
+  
+  blockstore_fs_node_modules_multiformats_vendor_varint_encode.bytes = offset - oldOffset + 1;
+  
+  return out
+}
+
+var blockstore_fs_node_modules_multiformats_vendor_varint_decode = blockstore_fs_node_modules_multiformats_vendor_varint_read;
+
+var blockstore_fs_node_modules_multiformats_vendor_varint_MSB$1 = 0x80
+  , blockstore_fs_node_modules_multiformats_vendor_varint_REST$1 = 0x7F;
+
+function blockstore_fs_node_modules_multiformats_vendor_varint_read(buf, offset) {
+  var res    = 0
+    , offset = offset || 0
+    , shift  = 0
+    , counter = offset
+    , b
+    , l = buf.length;
+
+  do {
+    if (counter >= l) {
+      blockstore_fs_node_modules_multiformats_vendor_varint_read.bytes = 0;
+      throw new RangeError('Could not decode varint')
     }
+    b = buf[counter++];
+    res += shift < 28
+      ? (b & blockstore_fs_node_modules_multiformats_vendor_varint_REST$1) << shift
+      : (b & blockstore_fs_node_modules_multiformats_vendor_varint_REST$1) * Math.pow(2, shift);
+    shift += 7;
+  } while (b >= blockstore_fs_node_modules_multiformats_vendor_varint_MSB$1)
 
-    function convertQueuingStrategyInit(init, context) {
-        assertDictionary(init, context);
-        var highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark;
-        assertRequiredField(highWaterMark, 'highWaterMark', 'QueuingStrategyInit');
-        return {
-            highWaterMark: convertUnrestrictedDouble(highWaterMark)
-        };
+  blockstore_fs_node_modules_multiformats_vendor_varint_read.bytes = counter - offset;
+
+  return res
+}
+
+var blockstore_fs_node_modules_multiformats_vendor_varint_N1 = Math.pow(2,  7);
+var blockstore_fs_node_modules_multiformats_vendor_varint_N2 = Math.pow(2, 14);
+var blockstore_fs_node_modules_multiformats_vendor_varint_N3 = Math.pow(2, 21);
+var blockstore_fs_node_modules_multiformats_vendor_varint_N4 = Math.pow(2, 28);
+var blockstore_fs_node_modules_multiformats_vendor_varint_N5 = Math.pow(2, 35);
+var blockstore_fs_node_modules_multiformats_vendor_varint_N6 = Math.pow(2, 42);
+var blockstore_fs_node_modules_multiformats_vendor_varint_N7 = Math.pow(2, 49);
+var blockstore_fs_node_modules_multiformats_vendor_varint_N8 = Math.pow(2, 56);
+var blockstore_fs_node_modules_multiformats_vendor_varint_N9 = Math.pow(2, 63);
+
+var blockstore_fs_node_modules_multiformats_vendor_varint_length = function (value) {
+  return (
+    value < blockstore_fs_node_modules_multiformats_vendor_varint_N1 ? 1
+  : value < blockstore_fs_node_modules_multiformats_vendor_varint_N2 ? 2
+  : value < blockstore_fs_node_modules_multiformats_vendor_varint_N3 ? 3
+  : value < blockstore_fs_node_modules_multiformats_vendor_varint_N4 ? 4
+  : value < blockstore_fs_node_modules_multiformats_vendor_varint_N5 ? 5
+  : value < blockstore_fs_node_modules_multiformats_vendor_varint_N6 ? 6
+  : value < blockstore_fs_node_modules_multiformats_vendor_varint_N7 ? 7
+  : value < blockstore_fs_node_modules_multiformats_vendor_varint_N8 ? 8
+  : value < blockstore_fs_node_modules_multiformats_vendor_varint_N9 ? 9
+  :              10
+  )
+};
+
+var blockstore_fs_node_modules_multiformats_vendor_varint_varint = {
+    encode: blockstore_fs_node_modules_multiformats_vendor_varint_encode_1
+  , decode: blockstore_fs_node_modules_multiformats_vendor_varint_decode
+  , encodingLength: blockstore_fs_node_modules_multiformats_vendor_varint_length
+};
+
+var blockstore_fs_node_modules_multiformats_vendor_varint_brrp_varint = blockstore_fs_node_modules_multiformats_vendor_varint_varint;
+
+/* harmony default export */ const blockstore_fs_node_modules_multiformats_vendor_varint = (blockstore_fs_node_modules_multiformats_vendor_varint_brrp_varint);
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/src/varint.js
+
+
+/**
+ * @param {Uint8Array} data
+ * @param {number} [offset=0]
+ * @returns {[number, number]}
+ */
+const blockstore_fs_node_modules_multiformats_src_varint_decode = (data, offset = 0) => {
+  const code = blockstore_fs_node_modules_multiformats_vendor_varint.decode(data, offset)
+  return [code, blockstore_fs_node_modules_multiformats_vendor_varint.decode.bytes]
+}
+
+/**
+ * @param {number} int
+ * @param {Uint8Array} target
+ * @param {number} [offset=0]
+ */
+const blockstore_fs_node_modules_multiformats_src_varint_encodeTo = (int, target, offset = 0) => {
+  blockstore_fs_node_modules_multiformats_vendor_varint.encode(int, target, offset)
+  return target
+}
+
+/**
+ * @param {number} int
+ * @returns {number}
+ */
+const blockstore_fs_node_modules_multiformats_src_varint_encodingLength = (int) => {
+  return blockstore_fs_node_modules_multiformats_vendor_varint.encodingLength(int)
+}
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/src/hashes/digest.js
+
+
+
+/**
+ * Creates a multihash digest.
+ *
+ * @template {number} Code
+ * @param {Code} code
+ * @param {Uint8Array} digest
+ */
+const blockstore_fs_node_modules_multiformats_src_hashes_digest_create = (code, digest) => {
+  const size = digest.byteLength
+  const sizeOffset = blockstore_fs_node_modules_multiformats_src_varint_encodingLength(code)
+  const digestOffset = sizeOffset + blockstore_fs_node_modules_multiformats_src_varint_encodingLength(size)
+
+  const bytes = new Uint8Array(digestOffset + size)
+  blockstore_fs_node_modules_multiformats_src_varint_encodeTo(code, bytes, 0)
+  blockstore_fs_node_modules_multiformats_src_varint_encodeTo(size, bytes, sizeOffset)
+  bytes.set(digest, digestOffset)
+
+  return new blockstore_fs_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes)
+}
+
+/**
+ * Turns bytes representation of multihash digest into an instance.
+ *
+ * @param {Uint8Array} multihash
+ * @returns {MultihashDigest}
+ */
+const blockstore_fs_node_modules_multiformats_src_hashes_digest_decode = (multihash) => {
+  const bytes = blockstore_fs_node_modules_multiformats_src_bytes_coerce(multihash)
+  const [code, sizeOffset] = blockstore_fs_node_modules_multiformats_src_varint_decode(bytes)
+  const [size, digestOffset] = blockstore_fs_node_modules_multiformats_src_varint_decode(bytes.subarray(sizeOffset))
+  const digest = bytes.subarray(sizeOffset + digestOffset)
+
+  if (digest.byteLength !== size) {
+    throw new Error('Incorrect length')
+  }
+
+  return new blockstore_fs_node_modules_multiformats_src_hashes_digest_Digest(code, size, digest, bytes)
+}
+
+/**
+ * @param {MultihashDigest} a
+ * @param {unknown} b
+ * @returns {b is MultihashDigest}
+ */
+const blockstore_fs_node_modules_multiformats_src_hashes_digest_equals = (a, b) => {
+  if (a === b) {
+    return true
+  } else {
+    const data = /** @type {{code?:unknown, size?:unknown, bytes?:unknown}} */(b)
+
+    return (
+      a.code === data.code &&
+      a.size === data.size &&
+      data.bytes instanceof Uint8Array &&
+      blockstore_fs_node_modules_multiformats_src_bytes_equals(a.bytes, data.bytes)
+    )
+  }
+}
+
+/**
+ * @typedef {import('./interface.js').MultihashDigest} MultihashDigest
+ */
+
+/**
+ * Represents a multihash digest which carries information about the
+ * hashing algorithm and an actual hash digest.
+ *
+ * @template {number} Code
+ * @template {number} Size
+ * @class
+ * @implements {MultihashDigest}
+ */
+class blockstore_fs_node_modules_multiformats_src_hashes_digest_Digest {
+  /**
+   * Creates a multihash digest.
+   *
+   * @param {Code} code
+   * @param {Size} size
+   * @param {Uint8Array} digest
+   * @param {Uint8Array} bytes
+   */
+  constructor (code, size, digest, bytes) {
+    this.code = code
+    this.size = size
+    this.digest = digest
+    this.bytes = bytes
+  }
+}
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/node_modules/multiformats/src/cid.js
+
+
+
+
+// Linter can see that API is used in types.
+// eslint-disable-next-line
+
+
+
+// This way TS will also expose all the types from module
+
+
+/**
+ * @template {API.Link} T
+ * @template {string} Prefix
+ * @param {T} link
+ * @param {API.MultibaseEncoder} [base]
+ * @returns {API.ToString}
+ */
+const blockstore_fs_node_modules_multiformats_src_cid_format = (link, base) => {
+  const { bytes, version } = link
+  switch (version) {
+    case 0:
+      return blockstore_fs_node_modules_multiformats_src_cid_toStringV0(
+        bytes,
+        blockstore_fs_node_modules_multiformats_src_cid_baseCache(link),
+        /** @type {API.MultibaseEncoder<"z">} */ (base) || blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc.encoder
+      )
+    default:
+      return blockstore_fs_node_modules_multiformats_src_cid_toStringV1(
+        bytes,
+        blockstore_fs_node_modules_multiformats_src_cid_baseCache(link),
+        /** @type {API.MultibaseEncoder} */ (base || blockstore_fs_node_modules_multiformats_src_bases_base32_base32.encoder)
+      )
+  }
+}
+
+/**
+ * @template {API.UnknownLink} Link
+ * @param {Link} link
+ * @returns {API.LinkJSON}
+ */
+const blockstore_fs_node_modules_multiformats_src_cid_toJSON = (link) => ({
+  '/': blockstore_fs_node_modules_multiformats_src_cid_format(link)
+})
+
+/**
+ * @template {API.UnknownLink} Link
+ * @param {API.LinkJSON} json
+ */
+const blockstore_fs_node_modules_multiformats_src_cid_fromJSON = (json) =>
+  blockstore_fs_node_modules_multiformats_src_cid_CID.parse(json['/'])
+
+/** @type {WeakMap>} */
+const blockstore_fs_node_modules_multiformats_src_cid_cache = new WeakMap()
+
+/**
+ * @param {API.UnknownLink} cid
+ * @returns {Map}
+ */
+const blockstore_fs_node_modules_multiformats_src_cid_baseCache = cid => {
+  const baseCache = blockstore_fs_node_modules_multiformats_src_cid_cache.get(cid)
+  if (baseCache == null) {
+    const baseCache = new Map()
+    blockstore_fs_node_modules_multiformats_src_cid_cache.set(cid, baseCache)
+    return baseCache
+  }
+  return baseCache
+}
+
+/**
+ * @template {unknown} [Data=unknown]
+ * @template {number} [Format=number]
+ * @template {number} [Alg=number]
+ * @template {API.Version} [Version=API.Version]
+ * @implements {API.Link}
+ */
+
+class blockstore_fs_node_modules_multiformats_src_cid_CID {
+  /**
+   * @param {Version} version - Version of the CID
+   * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
+   * @param {API.MultihashDigest} multihash - (Multi)hash of the of the content.
+   * @param {Uint8Array} bytes
+   */
+  constructor (version, code, multihash, bytes) {
+    /** @readonly */
+    this.code = code
+    /** @readonly */
+    this.version = version
+    /** @readonly */
+    this.multihash = multihash
+    /** @readonly */
+    this.bytes = bytes
+
+    // flag to serializers that this is a CID and
+    // should be treated specially
+    /** @readonly */
+    this['/'] = bytes
+  }
+
+  /**
+   * Signalling `cid.asCID === cid` has been replaced with `cid['/'] === cid.bytes`
+   * please either use `CID.asCID(cid)` or switch to new signalling mechanism
+   *
+   * @deprecated
+   */
+  get asCID () {
+    return this
+  }
+
+  // ArrayBufferView
+  get byteOffset () {
+    return this.bytes.byteOffset
+  }
+
+  // ArrayBufferView
+  get byteLength () {
+    return this.bytes.byteLength
+  }
+
+  /**
+   * @returns {CID}
+   */
+  toV0 () {
+    switch (this.version) {
+      case 0: {
+        return /** @type {CID} */ (this)
+      }
+      case 1: {
+        const { code, multihash } = this
+
+        if (code !== blockstore_fs_node_modules_multiformats_src_cid_DAG_PB_CODE) {
+          throw new Error('Cannot convert a non dag-pb CID to CIDv0')
+        }
+
+        // sha2-256
+        if (multihash.code !== blockstore_fs_node_modules_multiformats_src_cid_SHA_256_CODE) {
+          throw new Error('Cannot convert non sha2-256 multihash CID to CIDv0')
+        }
+
+        return /** @type {CID} */ (
+          blockstore_fs_node_modules_multiformats_src_cid_CID.createV0(
+            /** @type {API.MultihashDigest} */ (multihash)
+          )
+        )
+      }
+      default: {
+        throw Error(
+          `Can not convert CID version ${this.version} to version 0. This is a bug please report`
+        )
+      }
     }
+  }
 
-    // The size function must not have a prototype property nor be a constructor
-    var byteLengthSizeFunction = function (chunk) {
-        return chunk.byteLength;
-    };
-    try {
-        Object.defineProperty(byteLengthSizeFunction, 'name', {
-            value: 'size',
-            configurable: true
-        });
+  /**
+   * @returns {CID}
+   */
+  toV1 () {
+    switch (this.version) {
+      case 0: {
+        const { code, digest } = this.multihash
+        const multihash = blockstore_fs_node_modules_multiformats_src_hashes_digest_create(code, digest)
+        return /** @type {CID} */ (
+          blockstore_fs_node_modules_multiformats_src_cid_CID.createV1(this.code, multihash)
+        )
+      }
+      case 1: {
+        return /** @type {CID} */ (this)
+      }
+      default: {
+        throw Error(
+          `Can not convert CID version ${this.version} to version 1. This is a bug please report`
+        )
+      }
     }
-    catch (_a) {
-        // This property is non-configurable in older browsers, so ignore if this throws.
-        // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility
+  }
+
+  /**
+   * @param {unknown} other
+   * @returns {other is CID}
+   */
+  equals (other) {
+    return blockstore_fs_node_modules_multiformats_src_cid_CID.equals(this, other)
+  }
+
+  /**
+   * @template {unknown} Data
+   * @template {number} Format
+   * @template {number} Alg
+   * @template {API.Version} Version
+   * @param {API.Link} self
+   * @param {unknown} other
+   * @returns {other is CID}
+   */
+  static equals (self, other) {
+    const unknown =
+      /** @type {{code?:unknown, version?:unknown, multihash?:unknown}} */ (
+        other
+      )
+    return (
+      unknown &&
+      self.code === unknown.code &&
+      self.version === unknown.version &&
+      blockstore_fs_node_modules_multiformats_src_hashes_digest_equals(self.multihash, unknown.multihash)
+    )
+  }
+
+  /**
+   * @param {API.MultibaseEncoder} [base]
+   * @returns {string}
+   */
+  toString (base) {
+    return blockstore_fs_node_modules_multiformats_src_cid_format(this, base)
+  }
+
+  /**
+   * @returns {API.LinkJSON}
+   */
+  toJSON () {
+    return { '/': blockstore_fs_node_modules_multiformats_src_cid_format(this) }
+  }
+
+  link () {
+    return this
+  }
+
+  get [Symbol.toStringTag] () {
+    return 'CID'
+  }
+
+  // Legacy
+
+  [Symbol.for('nodejs.util.inspect.custom')] () {
+    return `CID(${this.toString()})`
+  }
+
+  /**
+   * Takes any input `value` and returns a `CID` instance if it was
+   * a `CID` otherwise returns `null`. If `value` is instanceof `CID`
+   * it will return value back. If `value` is not instance of this CID
+   * class, but is compatible CID it will return new instance of this
+   * `CID` class. Otherwise returns null.
+   *
+   * This allows two different incompatible versions of CID library to
+   * co-exist and interop as long as binary interface is compatible.
+   *
+   * @template {unknown} Data
+   * @template {number} Format
+   * @template {number} Alg
+   * @template {API.Version} Version
+   * @template {unknown} U
+   * @param {API.Link|U} input
+   * @returns {CID|null}
+   */
+  static asCID (input) {
+    if (input == null) {
+      return null
     }
-    /**
-     * A queuing strategy that counts the number of bytes in each chunk.
-     *
-     * @public
-     */
-    var ByteLengthQueuingStrategy = /** @class */ (function () {
-        function ByteLengthQueuingStrategy(options) {
-            assertRequiredArgument(options, 1, 'ByteLengthQueuingStrategy');
-            options = convertQueuingStrategyInit(options, 'First parameter');
-            this._byteLengthQueuingStrategyHighWaterMark = options.highWaterMark;
-        }
-        Object.defineProperty(ByteLengthQueuingStrategy.prototype, "highWaterMark", {
-            /**
-             * Returns the high water mark provided to the constructor.
-             */
-            get: function () {
-                if (!IsByteLengthQueuingStrategy(this)) {
-                    throw byteLengthBrandCheckException('highWaterMark');
-                }
-                return this._byteLengthQueuingStrategyHighWaterMark;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        Object.defineProperty(ByteLengthQueuingStrategy.prototype, "size", {
-            /**
-             * Measures the size of `chunk` by returning the value of its `byteLength` property.
-             */
-            get: function () {
-                if (!IsByteLengthQueuingStrategy(this)) {
-                    throw byteLengthBrandCheckException('size');
-                }
-                return byteLengthSizeFunction;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        return ByteLengthQueuingStrategy;
-    }());
-    Object.defineProperties(ByteLengthQueuingStrategy.prototype, {
-        highWaterMark: { enumerable: true },
-        size: { enumerable: true }
-    });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(ByteLengthQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {
-            value: 'ByteLengthQueuingStrategy',
-            configurable: true
-        });
+
+    const value = /** @type {any} */ (input)
+    if (value instanceof blockstore_fs_node_modules_multiformats_src_cid_CID) {
+      // If value is instance of CID then we're all set.
+      return value
+    } else if ((value['/'] != null && value['/'] === value.bytes) || value.asCID === value) {
+      // If value isn't instance of this CID class but `this.asCID === this` or
+      // `value['/'] === value.bytes` is true it is CID instance coming from a
+      // different implementation (diff version or duplicate). In that case we
+      // rebase it to this `CID` implementation so caller is guaranteed to get
+      // instance with expected API.
+      const { version, code, multihash, bytes } = value
+      return new blockstore_fs_node_modules_multiformats_src_cid_CID(
+        version,
+        code,
+        /** @type {API.MultihashDigest} */ (multihash),
+        bytes || blockstore_fs_node_modules_multiformats_src_cid_encodeCID(version, code, multihash.bytes)
+      )
+    } else if (value[blockstore_fs_node_modules_multiformats_src_cid_cidSymbol] === true) {
+      // If value is a CID from older implementation that used to be tagged via
+      // symbol we still rebase it to the this `CID` implementation by
+      // delegating that to a constructor.
+      const { version, multihash, code } = value
+      const digest =
+        /** @type {API.MultihashDigest} */
+        (blockstore_fs_node_modules_multiformats_src_hashes_digest_decode(multihash))
+      return blockstore_fs_node_modules_multiformats_src_cid_CID.create(version, code, digest)
+    } else {
+      // Otherwise value is not a CID (or an incompatible version of it) in
+      // which case we return `null`.
+      return null
     }
-    // Helper functions for the ByteLengthQueuingStrategy.
-    function byteLengthBrandCheckException(name) {
-        return new TypeError("ByteLengthQueuingStrategy.prototype." + name + " can only be used on a ByteLengthQueuingStrategy");
+  }
+
+  /**
+   *
+   * @template {unknown} Data
+   * @template {number} Format
+   * @template {number} Alg
+   * @template {API.Version} Version
+   * @param {Version} version - Version of the CID
+   * @param {Format} code - Code of the codec content is encoded in, see https://github.com/multiformats/multicodec/blob/master/table.csv
+   * @param {API.MultihashDigest} digest - (Multi)hash of the of the content.
+   * @returns {CID}
+   */
+  static create (version, code, digest) {
+    if (typeof code !== 'number') {
+      throw new Error('String codecs are no longer supported')
     }
-    function IsByteLengthQueuingStrategy(x) {
-        if (!typeIsObject(x)) {
-            return false;
-        }
-        if (!Object.prototype.hasOwnProperty.call(x, '_byteLengthQueuingStrategyHighWaterMark')) {
-            return false;
+
+    if (!(digest.bytes instanceof Uint8Array)) {
+      throw new Error('Invalid digest')
+    }
+
+    switch (version) {
+      case 0: {
+        if (code !== blockstore_fs_node_modules_multiformats_src_cid_DAG_PB_CODE) {
+          throw new Error(
+            `Version 0 CID must use dag-pb (code: ${blockstore_fs_node_modules_multiformats_src_cid_DAG_PB_CODE}) block encoding`
+          )
+        } else {
+          return new blockstore_fs_node_modules_multiformats_src_cid_CID(version, code, digest, digest.bytes)
         }
-        return x instanceof ByteLengthQueuingStrategy;
+      }
+      case 1: {
+        const bytes = blockstore_fs_node_modules_multiformats_src_cid_encodeCID(version, code, digest.bytes)
+        return new blockstore_fs_node_modules_multiformats_src_cid_CID(version, code, digest, bytes)
+      }
+      default: {
+        throw new Error('Invalid version')
+      }
     }
+  }
 
-    // The size function must not have a prototype property nor be a constructor
-    var countSizeFunction = function () {
-        return 1;
-    };
-    try {
-        Object.defineProperty(countSizeFunction, 'name', {
-            value: 'size',
-            configurable: true
-        });
+  /**
+   * Simplified version of `create` for CIDv0.
+   *
+   * @template {unknown} [T=unknown]
+   * @param {API.MultihashDigest} digest - Multihash.
+   * @returns {CID}
+   */
+  static createV0 (digest) {
+    return blockstore_fs_node_modules_multiformats_src_cid_CID.create(0, blockstore_fs_node_modules_multiformats_src_cid_DAG_PB_CODE, digest)
+  }
+
+  /**
+   * Simplified version of `create` for CIDv1.
+   *
+   * @template {unknown} Data
+   * @template {number} Code
+   * @template {number} Alg
+   * @param {Code} code - Content encoding format code.
+   * @param {API.MultihashDigest} digest - Miltihash of the content.
+   * @returns {CID}
+   */
+  static createV1 (code, digest) {
+    return blockstore_fs_node_modules_multiformats_src_cid_CID.create(1, code, digest)
+  }
+
+  /**
+   * Decoded a CID from its binary representation. The byte array must contain
+   * only the CID with no additional bytes.
+   *
+   * An error will be thrown if the bytes provided do not contain a valid
+   * binary representation of a CID.
+   *
+   * @template {unknown} Data
+   * @template {number} Code
+   * @template {number} Alg
+   * @template {API.Version} Ver
+   * @param {API.ByteView>} bytes
+   * @returns {CID}
+   */
+  static decode (bytes) {
+    const [cid, remainder] = blockstore_fs_node_modules_multiformats_src_cid_CID.decodeFirst(bytes)
+    if (remainder.length) {
+      throw new Error('Incorrect length')
     }
-    catch (_a) {
-        // This property is non-configurable in older browsers, so ignore if this throws.
-        // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#browser_compatibility
+    return cid
+  }
+
+  /**
+   * Decoded a CID from its binary representation at the beginning of a byte
+   * array.
+   *
+   * Returns an array with the first element containing the CID and the second
+   * element containing the remainder of the original byte array. The remainder
+   * will be a zero-length byte array if the provided bytes only contained a
+   * binary CID representation.
+   *
+   * @template {unknown} T
+   * @template {number} C
+   * @template {number} A
+   * @template {API.Version} V
+   * @param {API.ByteView>} bytes
+   * @returns {[CID, Uint8Array]}
+   */
+  static decodeFirst (bytes) {
+    const specs = blockstore_fs_node_modules_multiformats_src_cid_CID.inspectBytes(bytes)
+    const prefixSize = specs.size - specs.multihashSize
+    const multihashBytes = blockstore_fs_node_modules_multiformats_src_bytes_coerce(
+      bytes.subarray(prefixSize, prefixSize + specs.multihashSize)
+    )
+    if (multihashBytes.byteLength !== specs.multihashSize) {
+      throw new Error('Incorrect length')
     }
-    /**
-     * A queuing strategy that counts the number of chunks.
-     *
-     * @public
-     */
-    var CountQueuingStrategy = /** @class */ (function () {
-        function CountQueuingStrategy(options) {
-            assertRequiredArgument(options, 1, 'CountQueuingStrategy');
-            options = convertQueuingStrategyInit(options, 'First parameter');
-            this._countQueuingStrategyHighWaterMark = options.highWaterMark;
-        }
-        Object.defineProperty(CountQueuingStrategy.prototype, "highWaterMark", {
-            /**
-             * Returns the high water mark provided to the constructor.
-             */
-            get: function () {
-                if (!IsCountQueuingStrategy(this)) {
-                    throw countBrandCheckException('highWaterMark');
-                }
-                return this._countQueuingStrategyHighWaterMark;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        Object.defineProperty(CountQueuingStrategy.prototype, "size", {
-            /**
-             * Measures the size of `chunk` by always returning 1.
-             * This ensures that the total queue size is a count of the number of chunks in the queue.
-             */
-            get: function () {
-                if (!IsCountQueuingStrategy(this)) {
-                    throw countBrandCheckException('size');
-                }
-                return countSizeFunction;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        return CountQueuingStrategy;
-    }());
-    Object.defineProperties(CountQueuingStrategy.prototype, {
-        highWaterMark: { enumerable: true },
-        size: { enumerable: true }
-    });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(CountQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {
-            value: 'CountQueuingStrategy',
-            configurable: true
-        });
+    const digestBytes = multihashBytes.subarray(
+      specs.multihashSize - specs.digestSize
+    )
+    const digest = new blockstore_fs_node_modules_multiformats_src_hashes_digest_Digest(
+      specs.multihashCode,
+      specs.digestSize,
+      digestBytes,
+      multihashBytes
+    )
+    const cid =
+      specs.version === 0
+        ? blockstore_fs_node_modules_multiformats_src_cid_CID.createV0(/** @type {API.MultihashDigest} */ (digest))
+        : blockstore_fs_node_modules_multiformats_src_cid_CID.createV1(specs.codec, digest)
+    return [/** @type {CID} */(cid), bytes.subarray(specs.size)]
+  }
+
+  /**
+   * Inspect the initial bytes of a CID to determine its properties.
+   *
+   * Involves decoding up to 4 varints. Typically this will require only 4 to 6
+   * bytes but for larger multicodec code values and larger multihash digest
+   * lengths these varints can be quite large. It is recommended that at least
+   * 10 bytes be made available in the `initialBytes` argument for a complete
+   * inspection.
+   *
+   * @template {unknown} T
+   * @template {number} C
+   * @template {number} A
+   * @template {API.Version} V
+   * @param {API.ByteView>} initialBytes
+   * @returns {{ version:V, codec:C, multihashCode:A, digestSize:number, multihashSize:number, size:number }}
+   */
+  static inspectBytes (initialBytes) {
+    let offset = 0
+    const next = () => {
+      const [i, length] = blockstore_fs_node_modules_multiformats_src_varint_decode(initialBytes.subarray(offset))
+      offset += length
+      return i
     }
-    // Helper functions for the CountQueuingStrategy.
-    function countBrandCheckException(name) {
-        return new TypeError("CountQueuingStrategy.prototype." + name + " can only be used on a CountQueuingStrategy");
+
+    let version = /** @type {V} */ (next())
+    let codec = /** @type {C} */ (blockstore_fs_node_modules_multiformats_src_cid_DAG_PB_CODE)
+    if (/** @type {number} */(version) === 18) {
+      // CIDv0
+      version = /** @type {V} */ (0)
+      offset = 0
+    } else {
+      codec = /** @type {C} */ (next())
     }
-    function IsCountQueuingStrategy(x) {
-        if (!typeIsObject(x)) {
-            return false;
-        }
-        if (!Object.prototype.hasOwnProperty.call(x, '_countQueuingStrategyHighWaterMark')) {
-            return false;
-        }
-        return x instanceof CountQueuingStrategy;
+
+    if (version !== 0 && version !== 1) {
+      throw new RangeError(`Invalid CID version ${version}`)
     }
 
-    function convertTransformer(original, context) {
-        assertDictionary(original, context);
-        var flush = original === null || original === void 0 ? void 0 : original.flush;
-        var readableType = original === null || original === void 0 ? void 0 : original.readableType;
-        var start = original === null || original === void 0 ? void 0 : original.start;
-        var transform = original === null || original === void 0 ? void 0 : original.transform;
-        var writableType = original === null || original === void 0 ? void 0 : original.writableType;
-        return {
-            flush: flush === undefined ?
-                undefined :
-                convertTransformerFlushCallback(flush, original, context + " has member 'flush' that"),
-            readableType: readableType,
-            start: start === undefined ?
-                undefined :
-                convertTransformerStartCallback(start, original, context + " has member 'start' that"),
-            transform: transform === undefined ?
-                undefined :
-                convertTransformerTransformCallback(transform, original, context + " has member 'transform' that"),
-            writableType: writableType
-        };
+    const prefixSize = offset
+    const multihashCode = /** @type {A} */ (next()) // multihash code
+    const digestSize = next() // multihash length
+    const size = offset + digestSize
+    const multihashSize = size - prefixSize
+
+    return { version, codec, multihashCode, digestSize, multihashSize, size }
+  }
+
+  /**
+   * Takes cid in a string representation and creates an instance. If `base`
+   * decoder is not provided will use a default from the configuration. It will
+   * throw an error if encoding of the CID is not compatible with supplied (or
+   * a default decoder).
+   *
+   * @template {string} Prefix
+   * @template {unknown} Data
+   * @template {number} Code
+   * @template {number} Alg
+   * @template {API.Version} Ver
+   * @param {API.ToString, Prefix>} source
+   * @param {API.MultibaseDecoder} [base]
+   * @returns {CID}
+   */
+  static parse (source, base) {
+    const [prefix, bytes] = blockstore_fs_node_modules_multiformats_src_cid_parseCIDtoBytes(source, base)
+
+    const cid = blockstore_fs_node_modules_multiformats_src_cid_CID.decode(bytes)
+
+    if (cid.version === 0 && source[0] !== 'Q') {
+      throw Error('Version 0 CID string must not include multibase prefix')
     }
-    function convertTransformerFlushCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function (controller) { return promiseCall(fn, original, [controller]); };
+
+    // Cache string representation to avoid computing it on `this.toString()`
+    blockstore_fs_node_modules_multiformats_src_cid_baseCache(cid).set(prefix, source)
+
+    return cid
+  }
+}
+
+/**
+ * @template {string} Prefix
+ * @template {unknown} Data
+ * @template {number} Code
+ * @template {number} Alg
+ * @template {API.Version} Ver
+ * @param {API.ToString, Prefix>} source
+ * @param {API.MultibaseDecoder} [base]
+ * @returns {[Prefix, API.ByteView>]}
+ */
+const blockstore_fs_node_modules_multiformats_src_cid_parseCIDtoBytes = (source, base) => {
+  switch (source[0]) {
+    // CIDv0 is parsed differently
+    case 'Q': {
+      const decoder = base || blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc
+      return [
+        /** @type {Prefix} */ (blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc.prefix),
+        decoder.decode(`${blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc.prefix}${source}`)
+      ]
     }
-    function convertTransformerStartCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function (controller) { return reflectCall(fn, original, [controller]); };
+    case blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc.prefix: {
+      const decoder = base || blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc
+      return [/** @type {Prefix} */(blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc.prefix), decoder.decode(source)]
     }
-    function convertTransformerTransformCallback(fn, original, context) {
-        assertFunction(fn, context);
-        return function (chunk, controller) { return promiseCall(fn, original, [chunk, controller]); };
+    case blockstore_fs_node_modules_multiformats_src_bases_base32_base32.prefix: {
+      const decoder = base || blockstore_fs_node_modules_multiformats_src_bases_base32_base32
+      return [/** @type {Prefix} */(blockstore_fs_node_modules_multiformats_src_bases_base32_base32.prefix), decoder.decode(source)]
     }
+    default: {
+      if (base == null) {
+        throw Error(
+          'To parse non base32 or base58btc encoded CID multibase decoder must be provided'
+        )
+      }
+      return [/** @type {Prefix} */(source[0]), base.decode(source)]
+    }
+  }
+}
 
-    // Class TransformStream
-    /**
-     * A transform stream consists of a pair of streams: a {@link WritableStream | writable stream},
-     * known as its writable side, and a {@link ReadableStream | readable stream}, known as its readable side.
-     * In a manner specific to the transform stream in question, writes to the writable side result in new data being
-     * made available for reading from the readable side.
-     *
-     * @public
-     */
-    var TransformStream = /** @class */ (function () {
-        function TransformStream(rawTransformer, rawWritableStrategy, rawReadableStrategy) {
-            if (rawTransformer === void 0) { rawTransformer = {}; }
-            if (rawWritableStrategy === void 0) { rawWritableStrategy = {}; }
-            if (rawReadableStrategy === void 0) { rawReadableStrategy = {}; }
-            if (rawTransformer === undefined) {
-                rawTransformer = null;
-            }
-            var writableStrategy = convertQueuingStrategy(rawWritableStrategy, 'Second parameter');
-            var readableStrategy = convertQueuingStrategy(rawReadableStrategy, 'Third parameter');
-            var transformer = convertTransformer(rawTransformer, 'First parameter');
-            if (transformer.readableType !== undefined) {
-                throw new RangeError('Invalid readableType specified');
-            }
-            if (transformer.writableType !== undefined) {
-                throw new RangeError('Invalid writableType specified');
-            }
-            var readableHighWaterMark = ExtractHighWaterMark(readableStrategy, 0);
-            var readableSizeAlgorithm = ExtractSizeAlgorithm(readableStrategy);
-            var writableHighWaterMark = ExtractHighWaterMark(writableStrategy, 1);
-            var writableSizeAlgorithm = ExtractSizeAlgorithm(writableStrategy);
-            var startPromise_resolve;
-            var startPromise = newPromise(function (resolve) {
-                startPromise_resolve = resolve;
-            });
-            InitializeTransformStream(this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm);
-            SetUpTransformStreamDefaultControllerFromTransformer(this, transformer);
-            if (transformer.start !== undefined) {
-                startPromise_resolve(transformer.start(this._transformStreamController));
-            }
-            else {
-                startPromise_resolve(undefined);
-            }
+/**
+ *
+ * @param {Uint8Array} bytes
+ * @param {Map} cache
+ * @param {API.MultibaseEncoder<'z'>} base
+ */
+const blockstore_fs_node_modules_multiformats_src_cid_toStringV0 = (bytes, cache, base) => {
+  const { prefix } = base
+  if (prefix !== blockstore_fs_node_modules_multiformats_src_bases_base58_base58btc.prefix) {
+    throw Error(`Cannot string encode V0 in ${base.name} encoding`)
+  }
+
+  const cid = cache.get(prefix)
+  if (cid == null) {
+    const cid = base.encode(bytes).slice(1)
+    cache.set(prefix, cid)
+    return cid
+  } else {
+    return cid
+  }
+}
+
+/**
+ * @template {string} Prefix
+ * @param {Uint8Array} bytes
+ * @param {Map} cache
+ * @param {API.MultibaseEncoder} base
+ */
+const blockstore_fs_node_modules_multiformats_src_cid_toStringV1 = (bytes, cache, base) => {
+  const { prefix } = base
+  const cid = cache.get(prefix)
+  if (cid == null) {
+    const cid = base.encode(bytes)
+    cache.set(prefix, cid)
+    return cid
+  } else {
+    return cid
+  }
+}
+
+const blockstore_fs_node_modules_multiformats_src_cid_DAG_PB_CODE = 0x70
+const blockstore_fs_node_modules_multiformats_src_cid_SHA_256_CODE = 0x12
+
+/**
+ * @param {API.Version} version
+ * @param {number} code
+ * @param {Uint8Array} multihash
+ * @returns {Uint8Array}
+ */
+const blockstore_fs_node_modules_multiformats_src_cid_encodeCID = (version, code, multihash) => {
+  const codeOffset = blockstore_fs_node_modules_multiformats_src_varint_encodingLength(version)
+  const hashOffset = codeOffset + blockstore_fs_node_modules_multiformats_src_varint_encodingLength(code)
+  const bytes = new Uint8Array(hashOffset + multihash.byteLength)
+  blockstore_fs_node_modules_multiformats_src_varint_encodeTo(version, bytes, 0)
+  blockstore_fs_node_modules_multiformats_src_varint_encodeTo(code, bytes, codeOffset)
+  bytes.set(multihash, hashOffset)
+  return bytes
+}
+
+const blockstore_fs_node_modules_multiformats_src_cid_cidSymbol = Symbol.for('@ipld/js-cid/CID')
+
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/dist/src/sharding.js
+
+
+
+/**
+ * A sharding strategy that takes the last few characters of a multibase encoded
+ * CID and uses them as the directory to store the block in. This prevents
+ * storing all blocks in a single directory which would overwhelm most
+ * filesystems.
+ */
+class NextToLast {
+    extension;
+    prefixLength;
+    base;
+    constructor(init = {}) {
+        this.extension = init.extension ?? '.data';
+        this.prefixLength = init.prefixLength ?? 2;
+        this.base = init.base ?? blockstore_fs_node_modules_multiformats_src_bases_base32_base32upper;
+    }
+    encode(cid) {
+        const str = this.base.encoder.encode(cid.multihash.bytes);
+        const prefix = str.substring(str.length - this.prefixLength);
+        return {
+            dir: prefix,
+            file: `${str}${this.extension}`
+        };
+    }
+    decode(str) {
+        let fileName = external_node_path_namespaceObject.basename(str);
+        if (fileName.endsWith(this.extension)) {
+            fileName = fileName.substring(0, fileName.length - this.extension.length);
         }
-        Object.defineProperty(TransformStream.prototype, "readable", {
-            /**
-             * The readable side of the transform stream.
-             */
-            get: function () {
-                if (!IsTransformStream(this)) {
-                    throw streamBrandCheckException('readable');
-                }
-                return this._readable;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        Object.defineProperty(TransformStream.prototype, "writable", {
-            /**
-             * The writable side of the transform stream.
-             */
-            get: function () {
-                if (!IsTransformStream(this)) {
-                    throw streamBrandCheckException('writable');
-                }
-                return this._writable;
-            },
-            enumerable: false,
-            configurable: true
-        });
-        return TransformStream;
-    }());
-    Object.defineProperties(TransformStream.prototype, {
-        readable: { enumerable: true },
-        writable: { enumerable: true }
-    });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(TransformStream.prototype, SymbolPolyfill.toStringTag, {
-            value: 'TransformStream',
-            configurable: true
-        });
+        return blockstore_fs_node_modules_multiformats_src_cid_CID.decode(this.base.decoder.decode(fileName));
     }
-    function InitializeTransformStream(stream, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm) {
-        function startAlgorithm() {
-            return startPromise;
+}
+/**
+ * A sharding strategy that does not do any sharding and stores all files
+ * in one directory. Only for testing, do not use in production.
+ */
+class FlatDirectory {
+    extension;
+    base;
+    constructor(init = {}) {
+        this.extension = init.extension ?? '.data';
+        this.base = init.base ?? base32upper;
+    }
+    encode(cid) {
+        const str = this.base.encoder.encode(cid.multihash.bytes);
+        return {
+            dir: '',
+            file: `${str}${this.extension}`
+        };
+    }
+    decode(str) {
+        let fileName = path.basename(str);
+        if (fileName.endsWith(this.extension)) {
+            fileName = fileName.substring(0, fileName.length - this.extension.length);
         }
-        function writeAlgorithm(chunk) {
-            return TransformStreamDefaultSinkWriteAlgorithm(stream, chunk);
+        return CID.decode(this.base.decoder.decode(fileName));
+    }
+}
+//# sourceMappingURL=sharding.js.map
+;// CONCATENATED MODULE: ./node_modules/blockstore-fs/dist/src/index.js
+/**
+ * @packageDocumentation
+ *
+ * A Blockstore implementation that stores blocks in the local filesystem.
+ *
+ * @example
+ *
+ * ```js
+ * import { FsBlockstore } from 'blockstore-fs'
+ *
+ * const store = new FsBlockstore('path/to/store')
+ * ```
+ */
+
+
+
+
+// @ts-expect-error no types
+
+
+
+
+
+const writeAtomic = (0,external_node_util_.promisify)(fast_write_atomic);
+/**
+ * Write a file atomically
+ */
+async function writeFile(file, contents) {
+    try {
+        await writeAtomic(file, contents);
+    }
+    catch (err) {
+        if (err.code === 'EPERM' && err.syscall === 'rename') {
+            // fast-write-atomic writes a file to a temp location before renaming it.
+            // On Windows, if the final file already exists this error is thrown.
+            // No such error is thrown on Linux/Mac
+            // Make sure we can read & write to this file
+            await external_node_fs_promises_namespaceObject.access(file, external_node_fs_promises_namespaceObject.constants.F_OK | external_node_fs_promises_namespaceObject.constants.W_OK);
+            // The file was created by another context - this means there were
+            // attempts to write the same block by two different function calls
+            return;
         }
-        function abortAlgorithm(reason) {
-            return TransformStreamDefaultSinkAbortAlgorithm(stream, reason);
+        throw err;
+    }
+}
+/**
+ * A blockstore backed by the file system
+ */
+class FsBlockstore {
+    path;
+    createIfMissing;
+    errorIfExists;
+    putManyConcurrency;
+    getManyConcurrency;
+    deleteManyConcurrency;
+    shardingStrategy;
+    constructor(location, init = {}) {
+        this.path = external_node_path_namespaceObject.resolve(location);
+        this.createIfMissing = init.createIfMissing ?? true;
+        this.errorIfExists = init.errorIfExists ?? false;
+        this.deleteManyConcurrency = init.deleteManyConcurrency ?? 50;
+        this.getManyConcurrency = init.getManyConcurrency ?? 50;
+        this.putManyConcurrency = init.putManyConcurrency ?? 50;
+        this.shardingStrategy = init.shardingStrategy ?? new NextToLast();
+    }
+    async open() {
+        try {
+            await external_node_fs_promises_namespaceObject.access(this.path, external_node_fs_promises_namespaceObject.constants.F_OK | external_node_fs_promises_namespaceObject.constants.W_OK);
+            if (this.errorIfExists) {
+                throw src_Errors.openFailedError(new Error(`Blockstore directory: ${this.path} already exists`));
+            }
         }
-        function closeAlgorithm() {
-            return TransformStreamDefaultSinkCloseAlgorithm(stream);
+        catch (err) {
+            if (err.code === 'ENOENT') {
+                if (this.createIfMissing) {
+                    await external_node_fs_promises_namespaceObject.mkdir(this.path, { recursive: true });
+                    return;
+                }
+                else {
+                    throw src_Errors.openFailedError(new Error(`Blockstore directory: ${this.path} does not exist`));
+                }
+            }
+            throw err;
         }
-        stream._writable = CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, writableHighWaterMark, writableSizeAlgorithm);
-        function pullAlgorithm() {
-            return TransformStreamDefaultSourcePullAlgorithm(stream);
+    }
+    async close() {
+        await Promise.resolve();
+    }
+    async put(key, val) {
+        const { dir, file } = this.shardingStrategy.encode(key);
+        try {
+            if (dir != null && dir !== '') {
+                await external_node_fs_promises_namespaceObject.mkdir(external_node_path_namespaceObject.join(this.path, dir), {
+                    recursive: true
+                });
+            }
+            await writeFile(external_node_path_namespaceObject.join(this.path, dir, file), val);
+            return key;
         }
-        function cancelAlgorithm(reason) {
-            TransformStreamErrorWritableAndUnblockWrite(stream, reason);
-            return promiseResolvedWith(undefined);
+        catch (err) {
+            throw src_Errors.putFailedError(err);
         }
-        stream._readable = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, readableHighWaterMark, readableSizeAlgorithm);
-        // The [[backpressure]] slot is set to undefined so that it can be initialised by TransformStreamSetBackpressure.
-        stream._backpressure = undefined;
-        stream._backpressureChangePromise = undefined;
-        stream._backpressureChangePromise_resolve = undefined;
-        TransformStreamSetBackpressure(stream, true);
-        stream._transformStreamController = undefined;
     }
-    function IsTransformStream(x) {
-        if (!typeIsObject(x)) {
-            return false;
+    async *putMany(source) {
+        yield* src_parallelBatch(blockstore_fs_node_modules_it_map_dist_src(source, ({ cid, block }) => {
+            return async () => {
+                await this.put(cid, block);
+                return cid;
+            };
+        }), this.putManyConcurrency);
+    }
+    async get(key) {
+        const { dir, file } = this.shardingStrategy.encode(key);
+        try {
+            return await external_node_fs_promises_namespaceObject.readFile(external_node_path_namespaceObject.join(this.path, dir, file));
         }
-        if (!Object.prototype.hasOwnProperty.call(x, '_transformStreamController')) {
-            return false;
+        catch (err) {
+            throw src_Errors.notFoundError(err);
         }
-        return x instanceof TransformStream;
     }
-    // This is a no-op if both sides are already errored.
-    function TransformStreamError(stream, e) {
-        ReadableStreamDefaultControllerError(stream._readable._readableStreamController, e);
-        TransformStreamErrorWritableAndUnblockWrite(stream, e);
+    async *getMany(source) {
+        yield* src_parallelBatch(blockstore_fs_node_modules_it_map_dist_src(source, key => {
+            return async () => {
+                return {
+                    cid: key,
+                    block: await this.get(key)
+                };
+            };
+        }), this.getManyConcurrency);
     }
-    function TransformStreamErrorWritableAndUnblockWrite(stream, e) {
-        TransformStreamDefaultControllerClearAlgorithms(stream._transformStreamController);
-        WritableStreamDefaultControllerErrorIfNeeded(stream._writable._writableStreamController, e);
-        if (stream._backpressure) {
-            // Pretend that pull() was called to permit any pending write() calls to complete. TransformStreamSetBackpressure()
-            // cannot be called from enqueue() or pull() once the ReadableStream is errored, so this will will be the final time
-            // _backpressure is set.
-            TransformStreamSetBackpressure(stream, false);
+    async delete(key) {
+        const { dir, file } = this.shardingStrategy.encode(key);
+        try {
+            await external_node_fs_promises_namespaceObject.unlink(external_node_path_namespaceObject.join(this.path, dir, file));
         }
-    }
-    function TransformStreamSetBackpressure(stream, backpressure) {
-        // Passes also when called during construction.
-        if (stream._backpressureChangePromise !== undefined) {
-            stream._backpressureChangePromise_resolve();
+        catch (err) {
+            if (err.code === 'ENOENT') {
+                return;
+            }
+            throw src_Errors.deleteFailedError(err);
         }
-        stream._backpressureChangePromise = newPromise(function (resolve) {
-            stream._backpressureChangePromise_resolve = resolve;
-        });
-        stream._backpressure = backpressure;
     }
-    // Class TransformStreamDefaultController
+    async *deleteMany(source) {
+        yield* src_parallelBatch(blockstore_fs_node_modules_it_map_dist_src(source, key => {
+            return async () => {
+                await this.delete(key);
+                return key;
+            };
+        }), this.deleteManyConcurrency);
+    }
     /**
-     * Allows control of the {@link ReadableStream} and {@link WritableStream} of the associated {@link TransformStream}.
-     *
-     * @public
+     * Check for the existence of the given key
      */
-    var TransformStreamDefaultController = /** @class */ (function () {
-        function TransformStreamDefaultController() {
-            throw new TypeError('Illegal constructor');
+    async has(key) {
+        const { dir, file } = this.shardingStrategy.encode(key);
+        try {
+            await external_node_fs_promises_namespaceObject.access(external_node_path_namespaceObject.join(this.path, dir, file));
         }
-        Object.defineProperty(TransformStreamDefaultController.prototype, "desiredSize", {
-            /**
-             * Returns the desired size to fill the readable side’s internal queue. It can be negative, if the queue is over-full.
-             */
-            get: function () {
-                if (!IsTransformStreamDefaultController(this)) {
-                    throw defaultControllerBrandCheckException('desiredSize');
-                }
-                var readableController = this._controlledTransformStream._readable._readableStreamController;
-                return ReadableStreamDefaultControllerGetDesiredSize(readableController);
-            },
-            enumerable: false,
-            configurable: true
+        catch (err) {
+            return false;
+        }
+        return true;
+    }
+    async *getAll() {
+        const pattern = `**/*${this.shardingStrategy.extension}`
+            .split(external_node_path_namespaceObject.sep)
+            .join('/');
+        const files = dist_src_glob(this.path, pattern, {
+            absolute: true
         });
-        TransformStreamDefaultController.prototype.enqueue = function (chunk) {
-            if (chunk === void 0) { chunk = undefined; }
-            if (!IsTransformStreamDefaultController(this)) {
-                throw defaultControllerBrandCheckException('enqueue');
-            }
-            TransformStreamDefaultControllerEnqueue(this, chunk);
-        };
-        /**
-         * Errors both the readable side and the writable side of the controlled transform stream, making all future
-         * interactions with it fail with the given error `e`. Any chunks queued for transformation will be discarded.
-         */
-        TransformStreamDefaultController.prototype.error = function (reason) {
-            if (reason === void 0) { reason = undefined; }
-            if (!IsTransformStreamDefaultController(this)) {
-                throw defaultControllerBrandCheckException('error');
+        for await (const file of files) {
+            try {
+                const buf = await external_node_fs_promises_namespaceObject.readFile(file);
+                const pair = {
+                    cid: this.shardingStrategy.decode(file),
+                    block: buf
+                };
+                yield pair;
             }
-            TransformStreamDefaultControllerError(this, reason);
-        };
-        /**
-         * Closes the readable side and errors the writable side of the controlled transform stream. This is useful when the
-         * transformer only needs to consume a portion of the chunks written to the writable side.
-         */
-        TransformStreamDefaultController.prototype.terminate = function () {
-            if (!IsTransformStreamDefaultController(this)) {
-                throw defaultControllerBrandCheckException('terminate');
+            catch (err) {
+                // if keys are removed from the blockstore while the query is
+                // running, we may encounter missing files.
+                if (err.code !== 'ENOENT') {
+                    throw err;
+                }
             }
-            TransformStreamDefaultControllerTerminate(this);
-        };
-        return TransformStreamDefaultController;
-    }());
-    Object.defineProperties(TransformStreamDefaultController.prototype, {
-        enqueue: { enumerable: true },
-        error: { enumerable: true },
-        terminate: { enumerable: true },
-        desiredSize: { enumerable: true }
+        }
+    }
+}
+//# sourceMappingURL=index.js.map
+;// CONCATENATED MODULE: external "node:os"
+const external_node_os_namespaceObject = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("node:os");
+// EXTERNAL MODULE: external "node:stream"
+var external_node_stream_ = __nccwpck_require__(84492);
+// EXTERNAL MODULE: ./node_modules/@filebase/sdk/node_modules/uuid/dist/index.js
+var uuid_dist = __nccwpck_require__(74700);
+;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/node_modules/uuid/wrapper.mjs
+
+const v1 = uuid_dist.v1;
+const v3 = uuid_dist.v3;
+const v4 = uuid_dist.v4;
+const v5 = uuid_dist.v5;
+const NIL = uuid_dist/* NIL */.zR;
+const version = uuid_dist/* version */.i8;
+const wrapper_validate = uuid_dist/* validate */.Gu;
+const stringify = uuid_dist/* stringify */.Pz;
+const wrapper_parse = uuid_dist/* parse */.Qc;
+
+;// CONCATENATED MODULE: ./node_modules/@filebase/sdk/dist/index.mjs
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+var __accessCheck$4 = (obj, member, msg) => {
+  if (!member.has(obj))
+    throw TypeError("Cannot " + msg);
+};
+var __privateGet$4 = (obj, member, getter) => {
+  __accessCheck$4(obj, member, "read from private field");
+  return getter ? getter.call(obj) : member.get(obj);
+};
+var __privateAdd$4 = (obj, member, value) => {
+  if (member.has(obj))
+    throw TypeError("Cannot add the same private member more than once");
+  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
+};
+var __privateSet$4 = (obj, member, value, setter) => {
+  __accessCheck$4(obj, member, "write to private field");
+  setter ? setter.call(obj, value) : member.set(obj, value);
+  return value;
+};
+var _DEFAULT_ENDPOINT$4, _DEFAULT_REGION$1, _client$4;
+class BucketManager {
+  /**
+   * @summary Creates a new instance of the constructor.
+   * @param {string} clientKey - The access key ID for authentication.
+   * @param {string} clientSecret - The secret access key for authentication.
+   * @tutorial quickstart-bucket
+   * @example
+   * import { BucketManager } from "@filebase/sdk";
+   * const bucketManager = new BucketManager("KEY_FROM_DASHBOARD", "SECRET_FROM_DASHBOARD");
+   */
+  constructor(clientKey, clientSecret) {
+    __privateAdd$4(this, _DEFAULT_ENDPOINT$4, "https://s3.filebase.com");
+    __privateAdd$4(this, _DEFAULT_REGION$1, "us-east-1");
+    __privateAdd$4(this, _client$4, void 0);
+    const clientEndpoint = process.env.NODE_ENV === "test" ? process.env.TEST_S3_ENDPOINT || __privateGet$4(this, _DEFAULT_ENDPOINT$4) : __privateGet$4(this, _DEFAULT_ENDPOINT$4), clientConfiguration = {
+      credentials: {
+        accessKeyId: clientKey,
+        secretAccessKey: clientSecret
+      },
+      endpoint: clientEndpoint,
+      region: __privateGet$4(this, _DEFAULT_REGION$1),
+      forcePathStyle: true
+    };
+    __privateSet$4(this, _client$4, new S3Client(clientConfiguration));
+  }
+  /**
+   * @typedef {Object} bucket
+   * @property {string} Name The name of the bucket
+   * @property {date} Date the bucket was created
+   */
+  /**
+   * @summary Creates a new bucket with the specified name.
+   * @param {string} name - The name of the bucket to create.
+   * @returns {Promise} - A promise that resolves when the bucket is created.
+   * @example
+   * // Create bucket with name of `create-bucket-example`
+   * await bucketManager.create(`create-bucket-example`);
+   */
+  async create(name) {
+    const command = new CreateBucketCommand({
+      Bucket: name
     });
-    if (typeof SymbolPolyfill.toStringTag === 'symbol') {
-        Object.defineProperty(TransformStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {
-            value: 'TransformStreamDefaultController',
-            configurable: true
-        });
+    return await __privateGet$4(this, _client$4).send(command);
+  }
+  /**
+   * @summary Lists the buckets in the client.
+   * @returns {Promise>} - A promise that resolves with an array of objects representing the buckets in the client.
+   * @example
+   * // List all buckets
+   * await bucketManager.list();
+   */
+  async list() {
+    const command = new ListBucketsCommand({}), { Buckets } = await __privateGet$4(this, _client$4).send(command);
+    return Buckets;
+  }
+  /**
+   * @summary Deletes the specified bucket.
+   * @param {string} name - The name of the bucket to delete.
+   * @returns {Promise} - A promise that resolves when the bucket is deleted.
+   * @example
+   * // Delete bucket with name of `bucket-name-to-delete`
+   * await bucketManager.delete(`bucket-name-to-delete`);
+   */
+  async delete(name) {
+    const command = new DeleteBucketCommand({
+      Bucket: name
+    });
+    await __privateGet$4(this, _client$4).send(command);
+    return true;
+  }
+  /**
+   * @summary Sets the privacy of a given bucket.
+   * @param {string} name - The name of the bucket to toggle.
+   * @param {boolean} targetState - The new target state. [true=private,false=public]
+   * @returns {Promise} A promise that resolves to true if the bucket was successfully toggled.
+   * @example
+   * // Toggle bucket with label of `toggle-bucket-example`
+   * await bucketManager.setPrivacy(`toggle-bucket-example`, true);  // Enabled
+   * await bucketManager.setPrivacy(`toggle-bucket-example`, false); // Disabled
+   */
+  async setPrivacy(name, targetState) {
+    const command = new PutBucketAclCommand({
+      Bucket: name,
+      ACL: targetState ? "private" : "public-read"
+    });
+    await __privateGet$4(this, _client$4).send(command);
+    return true;
+  }
+  /**
+   * @summary Gets the privacy of a given bucket
+   * @param {string} name - The name of the bucket to query.
+   * @returns {Promise} A promise that resolves to true if the bucket is private.
+   */
+  async getPrivacy(name) {
+    const command = new GetBucketAclCommand({
+      Bucket: name
+    });
+    const response = await __privateGet$4(this, _client$4).send(command), readPermission = response.Grants.find((grant) => {
+      return grant.Grantee.Type === "Group" && grant.Permission === "READ";
+    });
+    return !(typeof readPermission !== "undefined");
+  }
+}
+_DEFAULT_ENDPOINT$4 = new WeakMap();
+_DEFAULT_REGION$1 = new WeakMap();
+_client$4 = new WeakMap();
+
+const GATEWAY_DEFAULT_TIMEOUT = 6e4;
+async function downloadFromGateway(cid, options) {
+  if (typeof options.endpoint !== "string") {
+    throw new Error(`Default Gateway must be set`);
+  }
+  const downloadHeaders = {};
+  if (options.token) {
+    downloadHeaders["x-filebase-gateway-token"] = options.token;
+  }
+  const downloadResponse = await lib_axios.request({
+    method: "GET",
+    baseURL: options.endpoint,
+    url: `/ipfs/${cid}`,
+    headers: downloadHeaders,
+    type: "stream",
+    timeout: options?.timeout || GATEWAY_DEFAULT_TIMEOUT
+  });
+  return downloadResponse.data;
+}
+function apiErrorHandler(err) {
+  if (err?.response && err?.response?.status && (err.response.status.toString()[0] === "4" || err.response.status.toString()[0] === "5")) {
+    throw new Error(
+      err.response.data.error?.details || err.response.data.error?.reason || err
+    );
+  }
+  throw err;
+}
+
+var __accessCheck$3 = (obj, member, msg) => {
+  if (!member.has(obj))
+    throw TypeError("Cannot " + msg);
+};
+var __privateGet$3 = (obj, member, getter) => {
+  __accessCheck$3(obj, member, "read from private field");
+  return getter ? getter.call(obj) : member.get(obj);
+};
+var __privateAdd$3 = (obj, member, value) => {
+  if (member.has(obj))
+    throw TypeError("Cannot add the same private member more than once");
+  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
+};
+var __privateSet$3 = (obj, member, value, setter) => {
+  __accessCheck$3(obj, member, "write to private field");
+  setter ? setter.call(obj, value) : member.set(obj, value);
+  return value;
+};
+var _DEFAULT_ENDPOINT$3, _DEFAULT_TIMEOUT$2, _client$3;
+class GatewayManager {
+  /**
+   * @summary Creates a new instance of the constructor.
+   * @param {string} clientKey - The access key ID for authentication.
+   * @param {string} clientSecret - The secret access key for authentication.
+   * @tutorial quickstart-gateway
+   * @example
+   * import { GatewayManager } from "@filebase/sdk";
+   * const gatewayManager = new GatewayManager("KEY_FROM_DASHBOARD", "SECRET_FROM_DASHBOARD");
+   */
+  constructor(clientKey, clientSecret) {
+    __privateAdd$3(this, _DEFAULT_ENDPOINT$3, "https://api.filebase.io");
+    __privateAdd$3(this, _DEFAULT_TIMEOUT$2, 6e4);
+    __privateAdd$3(this, _client$3, void 0);
+    const clientEndpoint = process.env.NODE_ENV === "test" ? process.env.TEST_GW_ENDPOINT || __privateGet$3(this, _DEFAULT_ENDPOINT$3) : __privateGet$3(this, _DEFAULT_ENDPOINT$3), encodedToken = Buffer.from(`${clientKey}:${clientSecret}`).toString(
+      "base64"
+    ), baseURL = `${clientEndpoint}/v1/gateways`;
+    __privateSet$3(this, _client$3, axios.create({
+      baseURL,
+      timeout: __privateGet$3(this, _DEFAULT_TIMEOUT$2),
+      headers: { Authorization: `Bearer ${encodedToken}` }
+    }));
+  }
+  /**
+   * @typedef {Object} gateway
+   * @property {string} name Name for the gateway
+   * @property {string} domain Custom Domain for the gateway
+   * @property {boolean} enabled Whether the gateway is enabled or not
+   * @property {string} private Whether the gateway is scoped to users content
+   * @property {date} created_at Date the gateway was created
+   * @property {date} updated_at Date the gateway was last updated
+   */
+  /**
+   * @typedef {Object} gatewayOptions
+   * @property {boolean} [domain] Optional Domain to allow for using a Custom Domain
+   * @property {string} [enabled] Optional Toggle to use for enabling the gateway
+   * @property {boolean} [private] Optional Boolean determining if gateway is Public or Private
+   */
+  /**
+   * @summary Creates a gateway with the given name and options
+   * @param {string} name Unique name across entire platform for the gateway.  Must be a valid subdomain name.
+   * @param {gatewayOptions} [options]
+   * @returns {Promise} - A promise that resolves to the value of a gateway.
+   * @example
+   * // Create gateway with name of `create-gateway-example` and a custom domain of `cname.mycustomdomain.com`.
+   * // The custom domain must already exist and have a CNAME record pointed at `create-gateway-example.myfilebase.com`.
+   * await gatewayManager.create(`create-gateway-example`, {
+   *   domain: `cname.mycustomdomain.com`
+   * });
+   */
+  async create(name, options = {}) {
+    try {
+      let createOptions = {
+        name
+      };
+      if (typeof options.domain === "string") {
+        createOptions.domain = options.domain;
+      }
+      if (typeof options.enabled === "boolean") {
+        createOptions.enabled = options.enabled;
+      }
+      if (typeof options.private === "boolean") {
+        createOptions.private = options.private;
+      }
+      const createResponse = await __privateGet$3(this, _client$3).request({
+        method: "POST",
+        data: createOptions
+      });
+      return createResponse.data;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    // Transform Stream Default Controller Abstract Operations
-    function IsTransformStreamDefaultController(x) {
-        if (!typeIsObject(x)) {
-            return false;
+  }
+  /**
+   * @summary Deletes a gateway with the given name.
+   * @param {string} name - The name of the gateway to delete.
+   * @returns {Promise} - A promise that resolves to true if the gateway was successfully deleted.
+   * @example
+   * // Delete gateway with name of `delete-gateway-example`
+   * await gatewayManager.delete(`delete-name-example`);
+   */
+  async delete(name) {
+    try {
+      await __privateGet$3(this, _client$3).request({
+        method: "DELETE",
+        url: `/${name}`,
+        validateStatus: (status) => {
+          return status === 204;
         }
-        if (!Object.prototype.hasOwnProperty.call(x, '_controlledTransformStream')) {
-            return false;
+      });
+      return true;
+    } catch (err) {
+      apiErrorHandler(err);
+    }
+  }
+  /**
+   * @summary Returns the value of a gateway
+   * @param {string} name - Parameter representing the name to get.
+   * @returns {Promise} - A promise that resolves to the value of a gateway.
+   * @example
+   * // Get gateway with name of `gateway-get-example`
+   * await gatewayManager.get(`gateway-get-example`);
+   */
+  async get(name) {
+    try {
+      const getResponse = await __privateGet$3(this, _client$3).request({
+        method: "GET",
+        url: `/${name}`,
+        validateStatus: (status) => {
+          return status === 200 || status === 404;
         }
-        return x instanceof TransformStreamDefaultController;
+      });
+      return getResponse.status === 200 ? getResponse.data : false;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    function SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm) {
-        controller._controlledTransformStream = stream;
-        stream._transformStreamController = controller;
-        controller._transformAlgorithm = transformAlgorithm;
-        controller._flushAlgorithm = flushAlgorithm;
+  }
+  /**
+   * @summary Returns a list of gateways
+   * @returns {Promise>} - A promise that resolves to an array of gateways.
+   * @example
+   * // List all gateways
+   * await gatewayManager.list();
+   */
+  async list() {
+    try {
+      const getResponse = await __privateGet$3(this, _client$3).request({
+        method: "GET"
+      });
+      return getResponse.data;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    function SetUpTransformStreamDefaultControllerFromTransformer(stream, transformer) {
-        var controller = Object.create(TransformStreamDefaultController.prototype);
-        var transformAlgorithm = function (chunk) {
-            try {
-                TransformStreamDefaultControllerEnqueue(controller, chunk);
-                return promiseResolvedWith(undefined);
-            }
-            catch (transformResultE) {
-                return promiseRejectedWith(transformResultE);
-            }
-        };
-        var flushAlgorithm = function () { return promiseResolvedWith(undefined); };
-        if (transformer.transform !== undefined) {
-            transformAlgorithm = function (chunk) { return transformer.transform(chunk, controller); };
+  }
+  /**
+   * @summary Updates the specified gateway.
+   * @param {string} name - The name of the gateway to update.
+   * @param {gatewayOptions} options - The options for the update operation.
+   *
+   * @returns {Promise} - A Promise that resolves to true if the gateway was updated.
+   * @example
+   * // Update gateway with name of `update-gateway-example` and set the gateway to only serve CIDs pinned by user.
+   * await gatewayManager.update(`update-gateway-example`, {
+   *   private: true
+   * });
+   */
+  async update(name, options) {
+    try {
+      const updateOptions = {
+        name
+      };
+      if (options?.domain) {
+        updateOptions.domain = String(options.private);
+      }
+      if (options?.enabled) {
+        updateOptions.enabled = Boolean(options.enabled);
+      }
+      if (options?.private) {
+        updateOptions.private = Boolean(options.private);
+      }
+      await __privateGet$3(this, _client$3).request({
+        method: "PUT",
+        url: `/${name}`,
+        data: updateOptions,
+        validateStatus: (status) => {
+          return status === 200;
         }
-        if (transformer.flush !== undefined) {
-            flushAlgorithm = function () { return transformer.flush(controller); };
+      });
+      return true;
+    } catch (err) {
+      apiErrorHandler(err);
+    }
+  }
+  /**
+   * @summary Toggles the enabled state of a given gateway.
+   * @param {string} name - The name of the gateway to toggle.
+   * @param {boolean} targetState - The new target state.
+   * @returns {Promise} A promise that resolves to true if the gateway was successfully toggled.
+   * @example
+   * // Toggle gateway with label of `toggle-gateway-example`
+   * await gatewayManager.toggle(`toggle-gateway-example`, true);  // Enabled
+   * await gatewayManager.toggle(`toggle-gateway-example`, false); // Disabled
+   */
+  async toggle(name, targetState) {
+    try {
+      await __privateGet$3(this, _client$3).request({
+        method: "PUT",
+        url: `/${name}`,
+        data: {
+          enabled: Boolean(targetState)
+        },
+        validateStatus: (status) => {
+          return status === 200;
         }
-        SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm);
+      });
+      return true;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    function TransformStreamDefaultControllerClearAlgorithms(controller) {
-        controller._transformAlgorithm = undefined;
-        controller._flushAlgorithm = undefined;
+  }
+}
+_DEFAULT_ENDPOINT$3 = new WeakMap();
+_DEFAULT_TIMEOUT$2 = new WeakMap();
+_client$3 = new WeakMap();
+
+var __accessCheck$2 = (obj, member, msg) => {
+  if (!member.has(obj))
+    throw TypeError("Cannot " + msg);
+};
+var __privateGet$2 = (obj, member, getter) => {
+  __accessCheck$2(obj, member, "read from private field");
+  return getter ? getter.call(obj) : member.get(obj);
+};
+var __privateAdd$2 = (obj, member, value) => {
+  if (member.has(obj))
+    throw TypeError("Cannot add the same private member more than once");
+  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
+};
+var __privateSet$2 = (obj, member, value, setter) => {
+  __accessCheck$2(obj, member, "write to private field");
+  setter ? setter.call(obj, value) : member.set(obj, value);
+  return value;
+};
+var _DEFAULT_ENDPOINT$2, _DEFAULT_TIMEOUT$1, _client$2;
+class NameManager {
+  /**
+   * @summary Creates a new instance of the constructor.
+   * @param {string} clientKey - The access key ID for authentication.
+   * @param {string} clientSecret - The secret access key for authentication.
+   * @tutorial quickstart-name
+   * @example
+   * import { NameManager } from "@filebase/sdk";
+   * const nameManager = new NameManager("KEY_FROM_DASHBOARD", "SECRET_FROM_DASHBOARD");
+   */
+  constructor(clientKey, clientSecret) {
+    __privateAdd$2(this, _DEFAULT_ENDPOINT$2, "https://api.filebase.io");
+    __privateAdd$2(this, _DEFAULT_TIMEOUT$1, 6e4);
+    __privateAdd$2(this, _client$2, void 0);
+    const clientEndpoint = process.env.NODE_ENV === "test" ? process.env.TEST_NAME_ENDPOINT || __privateGet$2(this, _DEFAULT_ENDPOINT$2) : __privateGet$2(this, _DEFAULT_ENDPOINT$2), encodedToken = Buffer.from(`${clientKey}:${clientSecret}`).toString(
+      "base64"
+    ), baseURL = `${clientEndpoint}/v1/names`;
+    __privateSet$2(this, _client$2, lib_axios.create({
+      baseURL,
+      timeout: __privateGet$2(this, _DEFAULT_TIMEOUT$1),
+      headers: { Authorization: `Bearer ${encodedToken}` }
+    }));
+  }
+  /**
+   * @typedef {Object} name
+   * @property {string} label Descriptive label for the Key
+   * @property {string} network_key IPNS Key CID
+   * @property {string} cid Value that name Publishes
+   * @property {number} sequence Version Number for the name
+   * @property {boolean} enabled Whether the name is being Published or not
+   * @property {date} published_at Date the name was last published to the DHT
+   * @property {date} created_at Date the name was created
+   * @property {date} updated_at Date the name was last updated
+   */
+  /**
+   * @typedef {Object} nameOptions
+   * @property {boolean} [enabled] Whether the name is enabled or not.
+   */
+  /**
+   * @summary Creates a new IPNS name with the given name as the label and CID.
+   * @param {string} label - The label of the new IPNS name.
+   * @param {string} cid - The CID of the IPNS name.
+   * @param {nameOptions} [options] - Additional options for the IPNS name.
+   * @returns {Promise} - A Promise that resolves with the response JSON.
+   * @example
+   * // Create IPNS name with label of `create-name-example` and CID of `QmdmQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm`
+   * await nameManager.create(`create-name-example`, `QmdmQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm`);
+   */
+  async create(label, cid, options = {
+    enabled: true
+  }) {
+    try {
+      const createResponse = await __privateGet$2(this, _client$2).request({
+        method: "POST",
+        data: {
+          label,
+          cid,
+          enabled: options?.enabled !== false
+        }
+      });
+      return createResponse.data;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    function TransformStreamDefaultControllerEnqueue(controller, chunk) {
-        var stream = controller._controlledTransformStream;
-        var readableController = stream._readable._readableStreamController;
-        if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController)) {
-            throw new TypeError('Readable side is not in a state that permits enqueue');
+  }
+  /**
+   * @summary Imports a user's IPNS private key.
+   * @param {string} label - The label for the IPNS name.
+   * @param {string} cid - The CID (Content Identifier) of the data.
+   * @param {string} privateKey - The existing private key encoded in Base64.
+   * @param {nameOptions} [options] - Additional options for the IPNS name.
+   * @returns {Promise} - A Promise that resolves to the server response.
+   * @example
+   * // Import IPNS private key with label of `create-name-example`, CID of `QmdmQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm`
+   * // and a private key encoded with base64
+   * await nameManager.import(
+   *  `create-name-example`,
+   *  `QmdmQXB2mzChmMeKY47C43LxUdg1NDJ5MWcKMKxDu7RgQm`
+   *  `BASE64_ENCODED_PRIVATEKEY`
+   * );
+   */
+  async import(label, cid, privateKey, options = {
+    enabled: true
+  }) {
+    try {
+      const importResponse = await __privateGet$2(this, _client$2).request({
+        method: "POST",
+        data: {
+          label,
+          cid,
+          network_private_key: privateKey,
+          enabled: options?.enabled !== false
         }
-        // We throttle transform invocations based on the backpressure of the ReadableStream, but we still
-        // accept TransformStreamDefaultControllerEnqueue() calls.
-        try {
-            ReadableStreamDefaultControllerEnqueue(readableController, chunk);
+      });
+      return importResponse.data;
+    } catch (err) {
+      apiErrorHandler(err);
+    }
+  }
+  /**
+   * @summary Updates the specified name with the given CID.
+   * @param {string} label - The label of the name to update.
+   * @param {string} cid - The cid to associate with the name.
+   * @param {nameOptions} options - The options for the set operation.
+   *
+   * @returns {Promise} - A Promise that resolves to true if the IPNS name was updated.
+   * @example
+   * // Update name with label of `update-name-example` and set the value of the IPNS name.
+   * await nameManager.update(`update-name-example`, `bafybeidt4nmaci476lyon2mvgfmwyzysdazienhxs2bqnfpdainzjuwjom`);
+   */
+  async update(label, cid, options = {}) {
+    try {
+      const updateOptions = {
+        cid
+      };
+      if (options?.enabled) {
+        updateOptions.enabled = Boolean(options.enabled);
+      }
+      await __privateGet$2(this, _client$2).request({
+        method: "PUT",
+        url: `/${label}`,
+        data: updateOptions,
+        validateStatus: (status) => {
+          return status === 200;
         }
-        catch (e) {
-            // This happens when readableStrategy.size() throws.
-            TransformStreamErrorWritableAndUnblockWrite(stream, e);
-            throw stream._readable._storedError;
+      });
+      return true;
+    } catch (err) {
+      apiErrorHandler(err);
+    }
+  }
+  /**
+   * @summary Returns the value of an IPNS name
+   * @param {string} label - Parameter representing the label of the name to resolve.
+   * @returns {Promise} - A promise that resolves to the value of a name.
+   * @example
+   * // Get IPNS name with label of `list-name-example`
+   * await nameManager.get(`list-name-example`);
+   */
+  async get(label) {
+    try {
+      const getResponse = await __privateGet$2(this, _client$2).request({
+        method: "GET",
+        url: `/${label}`,
+        validateStatus: (status) => {
+          return status === 200 || status === 404;
         }
-        var backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController);
-        if (backpressure !== stream._backpressure) {
-            TransformStreamSetBackpressure(stream, true);
+      });
+      return getResponse.status === 200 ? getResponse.data : false;
+    } catch (err) {
+      apiErrorHandler(err);
+    }
+  }
+  /**
+   * @summary Returns a list of IPNS names
+   * @returns {Promise>} - A promise that resolves to an array of names.
+   * @example
+   * // List all IPNS names
+   * await nameManager.list();
+   */
+  async list() {
+    try {
+      const listResponse = await __privateGet$2(this, _client$2).request({
+        method: "GET"
+      });
+      return listResponse.data;
+    } catch (err) {
+      apiErrorHandler(err);
+    }
+  }
+  /**
+   * @summary Deletes an IPNS name with the given label.
+   * @param {string} label - The label of the IPNS name to delete.
+   * @returns {Promise} - A promise that resolves to true if the IPNS name was successfully deleted.
+   * @example
+   * // List IPNS name with label of `delete-name-example`
+   * await nameManager.delete(`delete-name-example`);
+   */
+  async delete(label) {
+    try {
+      await __privateGet$2(this, _client$2).request({
+        method: "DELETE",
+        url: `/${label}`,
+        validateStatus: (status) => {
+          return status === 204;
         }
+      });
+      return true;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    function TransformStreamDefaultControllerError(controller, e) {
-        TransformStreamError(controller._controlledTransformStream, e);
+  }
+  /**
+   * @summary Toggles the enabled state of a given IPNS name.
+   * @param {string} label - The label of the IPNS name to toggle.
+   * @param {boolean} targetState - The new target state.
+   * @returns {Promise} A promise that resolves to true if the IPNS name was successfully toggled.
+   * @example
+   * // Toggle IPNS name with label of `toggle-name-example`
+   * await nameManager.toggle(`toggle-name-example`, true);  // Enabled
+   * await nameManager.toggle(`toggle-name-example`, false); // Disabled
+   */
+  async toggle(label, targetState) {
+    try {
+      await __privateGet$2(this, _client$2).request({
+        method: "PUT",
+        url: `/${label}`,
+        data: {
+          enabled: targetState
+        },
+        validateStatus: (status) => {
+          return status === 200;
+        }
+      });
+      return true;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    function TransformStreamDefaultControllerPerformTransform(controller, chunk) {
-        var transformPromise = controller._transformAlgorithm(chunk);
-        return transformPromiseWith(transformPromise, undefined, function (r) {
-            TransformStreamError(controller._controlledTransformStream, r);
-            throw r;
+  }
+}
+_DEFAULT_ENDPOINT$2 = new WeakMap();
+_DEFAULT_TIMEOUT$1 = new WeakMap();
+_client$2 = new WeakMap();
+
+var __accessCheck$1 = (obj, member, msg) => {
+  if (!member.has(obj))
+    throw TypeError("Cannot " + msg);
+};
+var __privateGet$1 = (obj, member, getter) => {
+  __accessCheck$1(obj, member, "read from private field");
+  return getter ? getter.call(obj) : member.get(obj);
+};
+var __privateAdd$1 = (obj, member, value) => {
+  if (member.has(obj))
+    throw TypeError("Cannot add the same private member more than once");
+  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
+};
+var __privateSet$1 = (obj, member, value, setter) => {
+  __accessCheck$1(obj, member, "write to private field");
+  setter ? setter.call(obj, value) : member.set(obj, value);
+  return value;
+};
+var __privateMethod$1 = (obj, member, method) => {
+  __accessCheck$1(obj, member, "access private method");
+  return method;
+};
+var _DEFAULT_ENDPOINT$1, _DEFAULT_REGION, _DEFAULT_MAX_CONCURRENT_UPLOADS, _client$1, _credentials$1, _defaultBucket$1, _gatewayConfiguration$1, _maxConcurrentUploads, _routeDownload, routeDownload_fn;
+class ObjectManager {
+  /**
+   * @typedef {Object} objectManagerOptions Optional settings for the constructor.
+   * @property {string} [bucket] Default bucket to use.
+   * @property {objectDownloadOptions} [gateway] Default gateway to use.
+   * @property {number} [maxConcurrentUploads] The maximum number of concurrent uploads.
+   */
+  /**
+   * @typedef {Object} objectDownloadOptions Optional settings for downloading objects
+   * @property {string} endpoint Default gateway to use.
+   * @property {string} [token] Token for the default gateway.
+   * @property {number} [timeout=60000] Timeout for the default gateway
+   */
+  /**
+   * @summary Creates a new instance of the constructor.
+   * @param {string} clientKey - The access key ID for authentication.
+   * @param {string} clientSecret - The secret access key for authentication.
+   * @param {objectManagerOptions} options - Optional settings for the constructor.
+   * @tutorial quickstart-object
+   * @example
+   * import { ObjectManager } from "@filebase/sdk";
+   * const objectManager = new ObjectManager("KEY_FROM_DASHBOARD", "SECRET_FROM_DASHBOARD", {
+   *   bucket: "my-default-bucket",
+   *   maxConcurrentUploads: 4,
+   *   gateway: {
+   *     endpoint: "https://my-default-gateway.mydomain.com
+   *     token: SUPER_SECRET_GATEWAY_TOKEN
+   *   }
+   * });
+   */
+  constructor(clientKey, clientSecret, options) {
+    __privateAdd$1(this, _routeDownload);
+    __privateAdd$1(this, _DEFAULT_ENDPOINT$1, "https://s3.filebase.com");
+    __privateAdd$1(this, _DEFAULT_REGION, "us-east-1");
+    __privateAdd$1(this, _DEFAULT_MAX_CONCURRENT_UPLOADS, 4);
+    __privateAdd$1(this, _client$1, void 0);
+    __privateAdd$1(this, _credentials$1, void 0);
+    __privateAdd$1(this, _defaultBucket$1, void 0);
+    __privateAdd$1(this, _gatewayConfiguration$1, void 0);
+    __privateAdd$1(this, _maxConcurrentUploads, void 0);
+    const clientEndpoint = process.env.NODE_ENV === "test" ? process.env.TEST_S3_ENDPOINT || __privateGet$1(this, _DEFAULT_ENDPOINT$1) : __privateGet$1(this, _DEFAULT_ENDPOINT$1), clientConfiguration = {
+      credentials: {
+        accessKeyId: clientKey,
+        secretAccessKey: clientSecret
+      },
+      endpoint: clientEndpoint,
+      region: __privateGet$1(this, _DEFAULT_REGION),
+      forcePathStyle: true
+    };
+    __privateSet$1(this, _defaultBucket$1, options?.bucket);
+    __privateSet$1(this, _maxConcurrentUploads, options?.maxConcurrentUploads || __privateGet$1(this, _DEFAULT_MAX_CONCURRENT_UPLOADS));
+    __privateSet$1(this, _credentials$1, {
+      key: clientKey,
+      secret: clientSecret
+    });
+    __privateSet$1(this, _client$1, new dist_cjs.S3Client(clientConfiguration));
+    __privateSet$1(this, _gatewayConfiguration$1, {
+      endpoint: options?.gateway?.endpoint,
+      token: options?.gateway?.token,
+      timeout: options?.gateway?.timeout
+    });
+  }
+  /**
+   * @typedef {Object} objectOptions
+   * @property {string} [bucket] - The bucket to pin the IPFS CID into.
+   */
+  /**
+   * @typedef {Object} objectHeadResult
+   * @property {string} cid The CID of the uploaded object
+   * @property {function} download Convenience function to download the object via S3 or the selected gateway
+   * @property {array} [entries] If a directory then returns an array of the containing objects
+   * @property {string} entries.cid The CID of the uploaded object
+   * @property {string} entries.path The path of the object
+   */
+  /**
+   * If the source parameter is an array of objects, it will pack multiple files into a CAR file for upload.
+   * The method returns a Promise that resolves to an object containing the CID (Content Identifier) of the uploaded file
+   * and an optional entries object when uploading a CAR file.
+   *
+   * @summary Uploads a file or a CAR file to the specified bucket.
+   * @param {string} key - The key or path of the file in the bucket.
+   * @param {Buffer|ReadableStream|Array} source - The content of the object to be uploaded.
+   *    If an array of files is provided, each file should have a 'path' property specifying the path of the file
+   *    and a 'content' property specifying the content of the file.  The SDK will then construct a CAR file locally
+   *    and use that as the content of the object to be uploaded.
+   * @param {Object} [metadata] Optional metadata for pin object
+   * @param {objectOptions} [options] - The options for uploading the object.
+   * @returns {Promise}
+   * @example
+   * // Upload Object
+   * await objectManager.upload("my-object", Buffer.from("Hello World!"));
+   * // Upload Object with Metadata
+   * await objectManager.upload("my-custom-object", Buffer.from("Hello Big World!"), {
+   *   "application": "my-filebase-app"
+   * });
+   * // Upload Directory
+   * await objectManager.upload("my-first-directory", [
+   *  {
+   *   path: "/testObjects/1.txt",
+   *   content: Buffer.from("upload test object", "utf-8"),
+   *  },
+   *  {
+   *   path: "/testObjects/deep/1.txt",
+   *   content: Buffer.from("upload deep test object", "utf-8"),
+   *  },
+   *  {
+   *   path: "/topLevel.txt",
+   *   content: Buffer.from("upload top level test object", "utf-8"),
+   *  },
+   * ]);
+   */
+  async upload(key, source, metadata, options) {
+    const uploadUUID = v4();
+    const bucket = options?.bucket || __privateGet$1(this, _defaultBucket$1), uploadOptions = {
+      client: __privateGet$1(this, _client$1),
+      params: {
+        Bucket: bucket,
+        Key: key,
+        Body: source,
+        Metadata: metadata || {}
+      },
+      queueSize: __privateGet$1(this, _maxConcurrentUploads),
+      partSize: 26843546
+      //25.6Mb || 250Gb Max File Size
+    };
+    let parsedEntries = {};
+    if (Array.isArray(source)) {
+      uploadOptions.params.Metadata = {
+        ...uploadOptions.params.Metadata,
+        import: "car"
+      };
+      let temporaryCarFilePath, temporaryBlockstoreDir;
+      try {
+        temporaryBlockstoreDir = external_node_path_namespaceObject.resolve(
+          external_node_os_namespaceObject.tmpdir(),
+          "filebase-sdk",
+          "uploads",
+          uploadUUID
+        );
+        temporaryCarFilePath = `${temporaryBlockstoreDir}/main.car`;
+        await (0,external_node_fs_promises_namespaceObject.mkdir)(temporaryBlockstoreDir, { recursive: true });
+        const temporaryBlockstore = new FsBlockstore(temporaryBlockstoreDir);
+        const heliaFs = unixfs({
+          blockstore: temporaryBlockstore
         });
+        for (let sourceEntry of source) {
+          sourceEntry.path = sourceEntry.path[0] === "/" ? `/${uploadUUID}${sourceEntry.path}` : `/${uploadUUID}/${sourceEntry.path}`;
+        }
+        for await (const entry of heliaFs.addAll(source)) {
+          parsedEntries[entry.path] = entry;
+        }
+        const rootEntry = parsedEntries[uploadUUID];
+        const carExporter = car({ blockstore: temporaryBlockstore }), { writer, out } = CarWriter.create([rootEntry.cid]);
+        const output = (0,external_node_fs_namespaceObject.createWriteStream)(temporaryCarFilePath);
+        external_node_stream_.Readable.from(out).pipe(output);
+        await carExporter.export(rootEntry.cid, writer);
+        uploadOptions.params.Body = (0,external_node_fs_namespaceObject.createReadStream)(temporaryCarFilePath);
+        const parallelUploads3 = new lib_storage_dist_cjs.Upload(uploadOptions);
+        await parallelUploads3.done();
+        await temporaryBlockstore.close();
+      } finally {
+        if (typeof temporaryBlockstoreDir !== "undefined") {
+          await (0,external_node_fs_promises_namespaceObject.rm)(temporaryBlockstoreDir, { recursive: true, force: true });
+        }
+      }
+    } else {
+      const parallelUploads3 = new lib_storage_dist_cjs.Upload(uploadOptions);
+      await parallelUploads3.done();
+    }
+    const command = new dist_cjs.HeadObjectCommand({
+      Bucket: bucket,
+      Key: key,
+      Body: source
+    }), headResult = await __privateGet$1(this, _client$1).send(command), responseCid = headResult.Metadata.cid;
+    if (Object.keys(parsedEntries).length === 0) {
+      return {
+        cid: responseCid,
+        download: () => {
+          return __privateMethod$1(this, _routeDownload, routeDownload_fn).call(this, responseCid, key, options);
+        }
+      };
     }
-    function TransformStreamDefaultControllerTerminate(controller) {
-        var stream = controller._controlledTransformStream;
-        var readableController = stream._readable._readableStreamController;
-        ReadableStreamDefaultControllerClose(readableController);
-        var error = new TypeError('TransformStream terminated');
-        TransformStreamErrorWritableAndUnblockWrite(stream, error);
+    return {
+      cid: responseCid,
+      download: () => {
+        return __privateMethod$1(this, _routeDownload, routeDownload_fn).call(this, responseCid, key, options);
+      },
+      entries: parsedEntries
+    };
+  }
+  /**
+   * @summary Gets an objects info and metadata using the S3 API.
+   * @param {string} key - The key of the object to be inspected.
+   * @param {objectOptions} [options] - The options for inspecting the object.
+   * @returns {Promise}
+   */
+  async get(key, options) {
+    const bucket = options?.bucket || __privateGet$1(this, _defaultBucket$1);
+    try {
+      const command = new dist_cjs.HeadObjectCommand({
+        Bucket: bucket,
+        Key: key
+      }), response = await __privateGet$1(this, _client$1).send(command);
+      response.download = () => {
+        return __privateMethod$1(this, _routeDownload, routeDownload_fn).call(this, response.Metadata.cid, key, options);
+      };
+      return response;
+    } catch (err) {
+      if (err.name === "NotFound") {
+        return false;
+      }
+      throw err;
     }
-    // TransformStreamDefaultSink Algorithms
-    function TransformStreamDefaultSinkWriteAlgorithm(stream, chunk) {
-        var controller = stream._transformStreamController;
-        if (stream._backpressure) {
-            var backpressureChangePromise = stream._backpressureChangePromise;
-            return transformPromiseWith(backpressureChangePromise, function () {
-                var writable = stream._writable;
-                var state = writable._state;
-                if (state === 'erroring') {
-                    throw writable._storedError;
-                }
-                return TransformStreamDefaultControllerPerformTransform(controller, chunk);
-            });
-        }
-        return TransformStreamDefaultControllerPerformTransform(controller, chunk);
+  }
+  /**
+   * @summary Downloads an object from the specified bucket using the provided key.
+   * @param {string} key - The key of the object to be downloaded.
+   * @param {objectOptions} [options] - The options for downloading the object..
+   * @returns {Promise} - A promise that resolves with the contents of the downloaded object as a Stream.
+   * @example
+   * // Download object with name of `download-object-example`
+   * await objectManager.download(`download-object-example`);
+   */
+  async download(key, options) {
+    if (typeof __privateGet$1(this, _gatewayConfiguration$1).endpoint === "string") {
+      const objectToFetch = await this.get(key, options);
+      return objectToFetch.download();
+    } else {
+      const command = new dist_cjs.GetObjectCommand({
+        Bucket: options?.bucket || __privateGet$1(this, _defaultBucket$1),
+        Key: key
+      }), response = await __privateGet$1(this, _client$1).send(command);
+      return response.Body;
     }
-    function TransformStreamDefaultSinkAbortAlgorithm(stream, reason) {
-        // abort() is not called synchronously, so it is possible for abort() to be called when the stream is already
-        // errored.
-        TransformStreamError(stream, reason);
-        return promiseResolvedWith(undefined);
+  }
+  /**
+   * @typedef {Object} listObjectsResult
+   * @property {boolean} IsTruncated Indicates if more results exist on the server
+   * @property {string} NextContinuationToken ContinuationToken used to paginate list requests
+   * @property {Array} Contents List of Keys stored in the S3 Bucket
+   * @property {string} Contents.Key Key of the Object
+   * @property {string} Contents.LastModified Date Last Modified of the Object
+   * @property {string} Contents.CID CID of the Object
+   * @property {string} Contents.ETag ETag of the Object
+   * @property {number} Contents.Size Size in Bytes of the Object
+   * @property {string} Contents.StorageClass Class of Storage of the Object
+   * @property {function} Contents.download Convenience function to download the item using the S3 gateway
+   */
+  /**
+   * @typedef {Object} listObjectOptions
+   * @property {string} [Bucket] The name of the bucket. If not provided, the default bucket will be used.
+   * @property {string} [ContinuationToken=null] Continues listing from this objects name.
+   * @property {string} [Delimiter=null] Character used to group keys
+   * @property {number} [MaxKeys=1000] The maximum number of objects to retrieve. Defaults to 1000.
+   */
+  /**
+   * Retrieves a list of objects from a specified bucket.
+   *
+   * @param {listObjectOptions} options - The options for listing objects.
+   * @returns {Promise} - A promise that resolves to an array of objects.
+   * @example
+   * // List objects in bucket with a limit of 1000
+   * await objectManager.list({
+   *   MaxKeys: 1000
+   * });
+   */
+  async list(options = {
+    Bucket: __privateGet$1(this, _defaultBucket$1),
+    ContinuationToken: null,
+    Delimiter: null,
+    MaxKeys: 1e3
+  }) {
+    if (options?.MaxKeys && options.MaxKeys > 1e5) {
+      throw new Error(`MaxKeys Maximum value is 100000`);
     }
-    function TransformStreamDefaultSinkCloseAlgorithm(stream) {
-        // stream._readable cannot change after construction, so caching it across a call to user code is safe.
-        var readable = stream._readable;
-        var controller = stream._transformStreamController;
-        var flushPromise = controller._flushAlgorithm();
-        TransformStreamDefaultControllerClearAlgorithms(controller);
-        // Return a promise that is fulfilled with undefined on success.
-        return transformPromiseWith(flushPromise, function () {
-            if (readable._state === 'errored') {
-                throw readable._storedError;
-            }
-            ReadableStreamDefaultControllerClose(readable._readableStreamController);
-        }, function (r) {
-            TransformStreamError(stream, r);
-            throw readable._storedError;
-        });
+    const bucket = options?.Bucket || __privateGet$1(this, _defaultBucket$1), limit = options?.MaxKeys || 1e3, commandOptions = {
+      Bucket: bucket,
+      MaxKeys: limit
+    }, command = new dist_cjs.ListObjectsV2Command({
+      ...options,
+      ...commandOptions
+    });
+    const { Contents, IsTruncated, NextContinuationToken } = await __privateGet$1(this, _client$1).send(command);
+    return { Contents, IsTruncated, NextContinuationToken };
+  }
+  /**
+   * @summary Deletes an object from the specified bucket using the provided key.
+   * @param {string} key - The key of the object to be deleted.
+   * @param {objectOptions} [options] - The options for deleting the file.
+   * @returns {Promise} - A Promise that resolves with the result of the delete operation.
+   * @example
+   * // Delete object with name of `delete-object-example`
+   * await objectManager.delete(`delete-object-example`);
+   */
+  async delete(key, options) {
+    const command = new dist_cjs.DeleteObjectCommand({
+      Bucket: options?.bucket || __privateGet$1(this, _defaultBucket$1),
+      Key: key
+    });
+    await __privateGet$1(this, _client$1).send(command);
+    return true;
+  }
+  /**
+   * @typedef {Object} copyObjectOptions
+   * @property {string} [sourceBucket] The source bucket from where the object is to be copied.
+   * @property {string} [destinationKey] The key of the object in the destination bucket. By default, it is the same as the sourceKey.
+   */
+  /**
+   * If the destinationKey is not provided, the object will be copied with the same key as the sourceKey.
+   *
+   * @summary Copy the object from sourceKey in the sourceBucket to destinationKey in the destinationBucket.
+   * @param {string} sourceKey - The key of the object to be copied from the sourceBucket.
+   * @param {string} destinationBucket - The bucket where the object will be copied to.
+   * @param {copyObjectOptions} [options] - Additional options for the copy operation.
+   *
+   * @returns {Promise} - A Promise that resolves with the result of the copy operation.
+   * @example
+   * // Copy object `copy-object-test` from `copy-object-test-pass-src` to `copy-object-test-pass-dest`
+   * // TIP: Set bucket on constructor and it will be used as the default source for copying objects.
+   * await objectManager.copy(`copy-object-test`, `copy-object-dest`, {
+   *   sourceBucket: `copy-object-src`
+   * });
+   */
+  async copy(sourceKey, destinationBucket, options = {
+    sourceBucket: __privateGet$1(this, _defaultBucket$1),
+    destinationKey: void 0
+  }) {
+    const copySource = `${options?.sourceBucket || __privateGet$1(this, _defaultBucket$1)}/${sourceKey}`, command = new dist_cjs.CopyObjectCommand({
+      CopySource: copySource,
+      Bucket: destinationBucket,
+      Key: options?.destinationKey || sourceKey
+    });
+    await __privateGet$1(this, _client$1).send(command);
+    return true;
+  }
+}
+_DEFAULT_ENDPOINT$1 = new WeakMap();
+_DEFAULT_REGION = new WeakMap();
+_DEFAULT_MAX_CONCURRENT_UPLOADS = new WeakMap();
+_client$1 = new WeakMap();
+_credentials$1 = new WeakMap();
+_defaultBucket$1 = new WeakMap();
+_gatewayConfiguration$1 = new WeakMap();
+_maxConcurrentUploads = new WeakMap();
+_routeDownload = new WeakSet();
+routeDownload_fn = async function(cid, key, options) {
+  return typeof __privateGet$1(this, _gatewayConfiguration$1).endpoint !== "undefined" ? downloadFromGateway(cid, __privateGet$1(this, _gatewayConfiguration$1)) : this.download(key, options);
+};
+
+var __accessCheck = (obj, member, msg) => {
+  if (!member.has(obj))
+    throw TypeError("Cannot " + msg);
+};
+var __privateGet = (obj, member, getter) => {
+  __accessCheck(obj, member, "read from private field");
+  return getter ? getter.call(obj) : member.get(obj);
+};
+var __privateAdd = (obj, member, value) => {
+  if (member.has(obj))
+    throw TypeError("Cannot add the same private member more than once");
+  member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
+};
+var __privateSet = (obj, member, value, setter) => {
+  __accessCheck(obj, member, "write to private field");
+  setter ? setter.call(obj, value) : member.set(obj, value);
+  return value;
+};
+var __privateMethod = (obj, member, method) => {
+  __accessCheck(obj, member, "access private method");
+  return method;
+};
+var _DEFAULT_ENDPOINT, _DEFAULT_TIMEOUT, _client, _credentials, _gatewayConfiguration, _defaultBucket, _getEncodedToken, getEncodedToken_fn;
+class PinManager {
+  /**
+   * @typedef {Object} pinManagerOptions Optional settings for the constructor.
+   * @property {string} [bucket] Default bucket to use.
+   * @property {pinDownloadOptions} [gateway] Default gateway to use.
+   */
+  /**
+   * @typedef {Object} pinDownloadOptions Optional settings for downloading pins
+   * @property {string} endpoint Default gateway to use.
+   * @property {string} [token] Token for the default gateway.
+   * @property {number} [timeout=60000] Timeout for the default gateway
+   */
+  /**
+   * @summary Creates a new instance of the constructor.
+   * @param {string} clientKey - The access key ID for authentication.
+   * @param {string} clientSecret - The secret access key for authentication.
+   * @param {pinManagerOptions} [options] - Optional settings for the constructor.
+   * @tutorial quickstart-pin
+   * @example
+   * import { PinManager } from "@filebase/sdk";
+   * const pinManager = new PinManager("KEY_FROM_DASHBOARD", "SECRET_FROM_DASHBOARD", {
+   *   bucket: "my-default-bucket",
+   *   gateway: {
+   *     endpoint: "https://my-default-gateway.mydomain.com
+   *     token: SUPER_SECRET_GATEWAY_TOKEN
+   *   }
+   * });
+   */
+  constructor(clientKey, clientSecret, options) {
+    __privateAdd(this, _getEncodedToken);
+    __privateAdd(this, _DEFAULT_ENDPOINT, "https://api.filebase.io");
+    __privateAdd(this, _DEFAULT_TIMEOUT, 6e4);
+    __privateAdd(this, _client, void 0);
+    __privateAdd(this, _credentials, void 0);
+    __privateAdd(this, _gatewayConfiguration, void 0);
+    __privateAdd(this, _defaultBucket, void 0);
+    __privateSet(this, _defaultBucket, options?.bucket);
+    const PSAClientEndpoint = process.env.NODE_ENV === "test" ? process.env.TEST_NAME_ENDPOINT || __privateGet(this, _DEFAULT_ENDPOINT) : __privateGet(this, _DEFAULT_ENDPOINT), baseURL = `${PSAClientEndpoint}/v1/ipfs/pins`;
+    __privateSet(this, _credentials, {
+      key: clientKey,
+      secret: clientSecret
+    });
+    __privateSet(this, _client, axios.create({
+      baseURL,
+      timeout: __privateGet(this, _DEFAULT_TIMEOUT)
+    }));
+    __privateSet(this, _gatewayConfiguration, {
+      endpoint: options?.gateway?.endpoint,
+      token: options?.gateway?.token,
+      timeout: options?.gateway?.timeout || __privateGet(this, _DEFAULT_TIMEOUT)
+    });
+  }
+  /**
+   * @typedef {Object} pinStatus
+   * @property {string} requestid Globally unique identifier of the pin request; can be used to check the status of ongoing pinning, or pin removal
+   * @property {string} status Status a pin object can have at a pinning service. ("queued","pinning","pinned","failed")
+   * @property {string} created Immutable timestamp indicating when a pin request entered a pinning service; can be used for filtering results and pagination
+   * @property {Object} pin Pin object
+   * @property {string} pin.cid Content Identifier (CID) pinned recursively
+   * @property {string} pin.name Name for pinned data; can be used for lookups later
+   * @property {Array} pin.origins Optional list of multiaddrs known to provide the data
+   * @property {Object} pin.meta Optional metadata for pin object
+   * @property {Array} delegates List of multiaddrs designated by pinning service that will receive the pin data
+   * @property {object} [info] Optional info for PinStatus response
+   * @property {function} download Convenience function to download pin
+   */
+  /**
+   * @typedef {Object} pinOptions
+   * @property {string} [bucket] - The bucket to pin the IPFS CID into.
+   */
+  /**
+   * @typedef {Object} listPinOptions
+   * @property {Array} [cid] Return pin objects responsible for pinning the specified CID(s); be aware that using longer hash functions introduces further constraints on the number of CIDs that will fit under the limit of 2000 characters per URL in browser contexts
+   * @property {string} [name] Return pin objects with specified name (by default a case-sensitive, exact match)
+   * @property {string} [match] Customize the text matching strategy applied when the name filter is present; exact (the default) is a case-sensitive exact match, partial matches anywhere in the name, iexact and ipartial are case-insensitive versions of the exact and partial strategies
+   * @property {Array} [status] Return pin objects for pins with the specified status (when missing, service defaults to pinned only)
+   * @property {string} [before] Return results created (queued) before provided timestamp
+   * @property {string} [after] Return results created (queued) after provided timestamp
+   * @property {number} [limit] Max records to return
+   * @property {Object} [meta] Return pin objects that match specified metadata keys passed as a string representation of a JSON object; when implementing a client library, make sure the parameter is URL-encoded to ensure safe transport
+   */
+  /**
+   * @typedef {Object} listPinResults
+   * @property {number} count Total number of pin objects that exist for passed query filters
+   * @property {Array} Array of PinStatus results
+   */
+  /**
+   * @summary List the pins in a given bucket
+   * @param {listPinOptions} [listOptions]
+   * @param {pinOptions} [options]
+   * @returns {Promise}
+   * @example
+   * // List pins in bucket with a limit of 1000
+   * await pinManager.list({
+   *   limit: 1000
+   * });
+   */
+  async list(listOptions, options) {
+    try {
+      const encodedToken = __privateMethod(this, _getEncodedToken, getEncodedToken_fn).call(this, options?.bucket), getResponse = await __privateGet(this, _client).request({
+        method: "GET",
+        params: listOptions,
+        headers: { Authorization: `Bearer ${encodedToken}` }
+      });
+      for (let pinStatus of getResponse.data.results) {
+        pinStatus.download = () => {
+          return this.download(pinStatus.pin.cid);
+        };
+      }
+      return getResponse.data;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    // TransformStreamDefaultSource Algorithms
-    function TransformStreamDefaultSourcePullAlgorithm(stream) {
-        // Invariant. Enforced by the promises returned by start() and pull().
-        TransformStreamSetBackpressure(stream, false);
-        // Prevent the next pull() call until there is backpressure.
-        return stream._backpressureChangePromise;
+  }
+  /**
+   * @summary Create a pin in the selected bucket
+   * @param {string} key Key or path of the file in the bucket
+   * @param {string} cid Content Identifier (CID) to be pinned recursively
+   * @param {Object} [metadata] Optional metadata for pin object
+   * @param {pinOptions} [options] Options for pinning the object
+   * @returns {Promise}
+   * @example
+   * // Create Pin with Metadata
+   * await pinManager.create("my-pin", "QmTJkc7crTuPG7xRmCQSz1yioBpCW3juFBtJPXhQfdCqGF", {
+   *   "application": "my-custom-app-on-filebase"
+   * });
+   */
+  async create(key, cid, metadata, options) {
+    try {
+      const encodedToken = __privateMethod(this, _getEncodedToken, getEncodedToken_fn).call(this, options?.bucket), pinStatus = await __privateGet(this, _client).request({
+        method: "POST",
+        data: {
+          cid,
+          name: key,
+          meta: metadata
+        },
+        headers: { Authorization: `Bearer ${encodedToken}` }
+      });
+      pinStatus.data.download = () => {
+        return this.download(pinStatus.data.pin.cid);
+      };
+      return pinStatus.data;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    // Helper functions for the TransformStreamDefaultController.
-    function defaultControllerBrandCheckException(name) {
-        return new TypeError("TransformStreamDefaultController.prototype." + name + " can only be used on a TransformStreamDefaultController");
+  }
+  /**
+   * @typedef {Object} replacePinOptions
+   * @augments pinOptions
+   * @property {Object} [metadata] Optional metadata to set on pin during replacement
+   * @property {string} [name] Optional name for pin to set during replacement
+   */
+  /**
+   * @summary Replace a pinned object in the selected bucket
+   * @param {string} requestid Unique ID for the pinned object
+   * @param {string} cid Content Identifier (CID) to be pinned recursively
+   * @param {replacePinOptions} [options] Options for pinning the object
+   * @returns {Promise}
+   * @example
+   * // Replace Pin with Metadata
+   * await pinManager.create("qr4231213", "QmTJkc7crTuPG7xRmCQSz1yioBpCW3juFBtJPXhQfdCqGF", {
+   *   "revision": Date.now()
+   * }
+   */
+  async replace(requestid, cid, options) {
+    try {
+      let replaceData = {
+        cid,
+        meta: options?.metadata || {}
+      };
+      if (options?.name) {
+        replaceData.name = options.name;
+      }
+      const encodedToken = __privateMethod(this, _getEncodedToken, getEncodedToken_fn).call(this, options?.bucket), pinStatusResult = await __privateGet(this, _client).request({
+        method: "POST",
+        url: `/${requestid}`,
+        data: replaceData,
+        validateStatus: (status) => {
+          return status === 200;
+        },
+        headers: { Authorization: `Bearer ${encodedToken}` }
+      });
+      const pinStatus = pinStatusResult.data;
+      pinStatus.download = () => {
+        return this.download(pinStatus.pin.cid);
+      };
+      return pinStatus;
+    } catch (err) {
+      apiErrorHandler(err);
     }
-    // Helper functions for the TransformStream.
-    function streamBrandCheckException(name) {
-        return new TypeError("TransformStream.prototype." + name + " can only be used on a TransformStream");
+  }
+  /**
+   * @summary Download a pin from the selected IPFS gateway
+   * @param {string} cid
+   * @param {pinDownloadOptions} [options]
+   * @returns {Promise}
+   * @example
+   * // Download Pin by CID
+   * await pinManager.download("QmTJkc7crTuPG7xRmCQSz1yioBpCW3juFBtJPXhQfdCqGF");
+   */
+  async download(cid, options) {
+    const downloadOptions = Object.assign(__privateGet(this, _gatewayConfiguration), options);
+    return downloadFromGateway(cid, downloadOptions);
+  }
+  /**
+   * @summary Get details about a pinned object
+   * @param {string} requestid Globally unique identifier of the pin request
+   * @param {pinOptions} [options] Options for getting the pin
+   * @returns {Promise}
+   * @example
+   * // Get Pin Info by RequestId
+   * await pinManager.get("qr4231214");
+   */
+  async get(requestid, options) {
+    try {
+      const encodedToken = __privateMethod(this, _getEncodedToken, getEncodedToken_fn).call(this, options?.bucket), getResponseResult = await __privateGet(this, _client).request({
+        method: "GET",
+        url: `/${requestid}`,
+        headers: { Authorization: `Bearer ${encodedToken}` },
+        validateStatus: (status) => {
+          return status === 200 || status === 404;
+        }
+      });
+      if (getResponseResult.status === 404) {
+        return false;
+      }
+      const pinStatus = getResponseResult.data;
+      pinStatus.download = () => {
+        return this.download(pinStatus.pin.cid);
+      };
+      return pinStatus;
+    } catch (err) {
+      apiErrorHandler(err);
     }
+  }
+  /**
+   * @summary Delete a pinned object from the selected bucket
+   * @param requestid Globally unique identifier of the pin request
+   * @param {pinOptions} [options] Options for deleting the pin
+   * @returns {Promise}
+   * @example
+   * // Delete Pin by RequestId
+   * await pinManager.delete("qr4231213");
+   */
+  async delete(requestid, options) {
+    try {
+      const encodedToken = __privateMethod(this, _getEncodedToken, getEncodedToken_fn).call(this, options?.bucket);
+      await __privateGet(this, _client).request({
+        method: "DELETE",
+        url: `/${requestid}`,
+        headers: { Authorization: `Bearer ${encodedToken}` },
+        validateStatus: (status) => {
+          return status === 202;
+        }
+      });
+      return true;
+    } catch (err) {
+      apiErrorHandler(err);
+    }
+  }
+}
+_DEFAULT_ENDPOINT = new WeakMap();
+_DEFAULT_TIMEOUT = new WeakMap();
+_client = new WeakMap();
+_credentials = new WeakMap();
+_gatewayConfiguration = new WeakMap();
+_defaultBucket = new WeakMap();
+_getEncodedToken = new WeakSet();
+getEncodedToken_fn = function(bucket) {
+  bucket = bucket || __privateGet(this, _defaultBucket);
+  return Buffer.from(
+    `${__privateGet(this, _credentials).key}:${__privateGet(this, _credentials).secret}:${bucket}`
+  ).toString("base64");
+};
 
-    exports.ByteLengthQueuingStrategy = ByteLengthQueuingStrategy;
-    exports.CountQueuingStrategy = CountQueuingStrategy;
-    exports.ReadableByteStreamController = ReadableByteStreamController;
-    exports.ReadableStream = ReadableStream;
-    exports.ReadableStreamBYOBReader = ReadableStreamBYOBReader;
-    exports.ReadableStreamBYOBRequest = ReadableStreamBYOBRequest;
-    exports.ReadableStreamDefaultController = ReadableStreamDefaultController;
-    exports.ReadableStreamDefaultReader = ReadableStreamDefaultReader;
-    exports.TransformStream = TransformStream;
-    exports.TransformStreamDefaultController = TransformStreamDefaultController;
-    exports.WritableStream = WritableStream;
-    exports.WritableStreamDefaultController = WritableStreamDefaultController;
-    exports.WritableStreamDefaultWriter = WritableStreamDefaultWriter;
-
-    Object.defineProperty(exports, '__esModule', { value: true });
-
-})));
-//# sourceMappingURL=ponyfill.js.map
-
-
-/***/ }),
 
-/***/ 79019:
-/***/ ((module) => {
 
-// Returns a wrapper function that returns a wrapped callback
-// The wrapper function should do some stuff, and return a
-// presumably different callback function.
-// This makes sure that own properties are retained, so that
-// decorations and such are not lost along the way.
-module.exports = wrappy
-function wrappy (fn, cb) {
-  if (fn && cb) return wrappy(fn)(cb)
+<<<<<<< HEAD
+// EXTERNAL MODULE: ./node_modules/graceful-fs/graceful-fs.js
+var graceful_fs = __nccwpck_require__(20846);
+;// CONCATENATED MODULE: ./node_modules/files-from-path/esm/src/index.js
 
-  if (typeof fn !== 'function')
-    throw new TypeError('need wrapper function')
 
-  Object.keys(fn).forEach(function (k) {
-    wrapper[k] = fn[k]
-  })
 
-  return wrapper
 
-  function wrapper() {
-    var args = new Array(arguments.length)
-    for (var i = 0; i < args.length; i++) {
-      args[i] = arguments[i]
+const defaultfs = {
+  createReadStream: graceful_fs.createReadStream,
+  promises: {
+    stat: (0,external_util_.promisify)(graceful_fs.stat),
+    readdir: (0,external_util_.promisify)(graceful_fs.readdir)
+  }
+};
+async function filesFromPaths(paths, options) {
+  if (typeof paths === 'string') {
+    paths = [paths];
+  }
+  let commonParts;
+  const files = [];
+  for (const p of paths) {
+    for await (const file of filesFromPath(p, options)) {
+      files.push(file);
+      const nameParts = file.name.split(external_path_.sep);
+      if (commonParts == null) {
+        commonParts = nameParts.slice(0, -1);
+        continue;
+      }
+      for (let i = 0; i < commonParts.length; i++) {
+        if (commonParts[i] !== nameParts[i]) {
+          commonParts = commonParts.slice(0, i);
+          break;
+        }
+      }
     }
-    var ret = fn.apply(this, args)
-    var cb = args[args.length-1]
-    if (typeof ret === 'function' && ret !== cb) {
-      Object.keys(cb).forEach(function (k) {
-        ret[k] = cb[k]
-      })
+  }
+  const commonPath = `${ commonParts ?? [].join('/') }/`;
+  const commonPathFiles = files.map(f => ({
+    ...f,
+    name: f.name.slice(commonPath.length)
+  }));
+  return options?.sort == null || options?.sort === true ? commonPathFiles.sort((a, b) => a.name === b.name ? 0 : a.name > b.name ? 1 : -1) : commonPathFiles;
+}
+async function* filesFromPath(filepath, options) {
+  filepath = external_path_.resolve(filepath);
+  const fs = options?.fs ?? defaultfs;
+  const hidden = options?.hidden ?? false;
+  const filter = filepath => {
+    if (!hidden && external_path_.basename(filepath).startsWith('.'))
+      return false;
+    return true;
+  };
+  const name = filepath;
+  const stat = await fs.promises.stat(name);
+  if (!filter(name)) {
+    return;
+  }
+  if (stat.isFile()) {
+    yield {
+      name,
+      stream: () => external_stream_.Readable.toWeb(fs.createReadStream(name)),
+      size: stat.size
+    };
+  } else if (stat.isDirectory()) {
+    yield* filesFromDir(name, filter, options);
+  }
+}
+async function* filesFromDir(dir, filter, options) {
+  const fs = options?.fs ?? defaultfs;
+  const entries = await fs.promises.readdir(external_path_.join(dir), { withFileTypes: true });
+  for (const entry of entries) {
+    if (!filter(entry.name)) {
+      continue;
+    }
+    if (entry.isFile()) {
+      const name = external_path_.join(dir, entry.name);
+      const {size} = await fs.promises.stat(name);
+      yield {
+        name,
+        stream: () => external_stream_.Readable.toWeb(fs.createReadStream(name)),
+        size
+      };
+    } else if (entry.isDirectory()) {
+      yield* filesFromDir(external_path_.join(dir, entry.name), filter);
     }
-    return ret
   }
 }
+;// CONCATENATED MODULE: ./pinners/filebase.js
 
 
-/***/ }),
-
-/***/ 38682:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
 
-const { FilebaseClient } = __nccwpck_require__(5369);
-const { filesFromPath } = __nccwpck_require__(29857);
 
-module.exports = {
+/* harmony default export */ const filebase = ({
   name: "Filebase",
   builder: async (options) => {
     const { filebaseKey, filebaseSecret, filebaseBucket } = options;
 
     if (!filebaseKey) {
-      throw new Error("[filebase] Key is empty. (input `filebaseKey`)");
+      throw new Error("filebaseKey is empty");
     }
 
     if (!filebaseSecret) {
-      throw new Error("[filebase] Secret is empty. (input `filebaseSecret`)");
+      throw new Error("filebaseSecret is empty");
     }
 
     if (!filebaseBucket) {
-      throw new Error("[filebase] Bucket is empty. (input `filebaseBucket`)");
+      throw new Error("filebaseBucket is empty");
     }
 
-    return { key: filebaseKey, secret: filebaseSecret, bucket: filebaseBucket };
+    return {
+      key: filebaseKey,
+      secret: filebaseSecret,
+      bucket: filebaseBucket,
+    };
   },
   upload: async (api, options) => {
     console.log(`Parsing options...`);
-    const { path, pinName, verbose } = options;
+    const { path, pinName, verbose, key } = options;
+    console.log(`Parsed Options: ${JSON.stringify(options)}`);
+
+    let source = path;
+    if (!external_node_path_namespaceObject.isAbsolute(source)) {
+      const dir = (process.env.GITHUB_WORKSPACE || process.cwd()).toString();
+      source = external_node_path_namespaceObject.join(dir, source);
+    }
 
     console.log(`Adding files...`);
+    const filesFromPath = await filesFromPaths(source);
     const files = [];
-    for await (const file of filesFromPath(path, { pathPrefix: path })) {
-      files.push(file);
+    for await (const file of filesFromPath) {
+      files.push({ path: file.name, content: file.stream() });
       if (verbose) {
         console.log(`Added File: ${JSON.stringify(file)}`);
       }
     }
 
+    console.log(`Starting filebase client`);
+    const objectManager = new ObjectManager(api.key, api.secret, {
+      bucket: api.bucket,
+    });
+    console.log(`Started filebase client`);
+
     console.log(`Storing files...`);
-    let tokenString = `${api.key}:${api.secret}:${api.bucket}`;
-    let cid = await FilebaseClient.storeDirectory(
-      {
-        endpoint: "https://s3.filebase.com",
-        token: Buffer.from(tokenString).toString("base64"),
-      },
-      files,
-      pinName
-    );
+    const uploadResult = await objectManager.upload(pinName, files),
+      cid = uploadResult.cid;
     console.log(`Stored files...`);
     console.log(`CID: ${cid}`);
-    console.log(`Done`);
-
-    return {
-      cid: cid,
-      ipfs: cid,
-    };
-  },
-};
-
-
-/***/ }),
-
-/***/ 78700:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-const make = __nccwpck_require__(76333);
-
-module.exports = {
-  ipfs: make(__nccwpck_require__(12820)),
-  pinata: make(__nccwpck_require__(95067)),
-  infura: make(__nccwpck_require__(7855)),
-  filebase: make(__nccwpck_require__(38682))
-};
-
-
-/***/ }),
-
-/***/ 7855:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-const { create, globSource } = __nccwpck_require__(21719);
-const last = __nccwpck_require__(28741);
-const fsPath = __nccwpck_require__(71017);
-
-module.exports = {
-  name: "Infura",
-  builder: async (options) => {
-    const { infuraProjectId, infuraProjectSecret, headers, timeout } = options;
-    if (!infuraProjectId) {
-      throw new Error("[infura] ProjectId is empty. (input `infuraProjectId`)");
-    }
-
-    if (!infuraProjectSecret) {
-      throw new Error(
-        "[infura] ProjectSecret is empty. (input `infuraProjectSecret`)"
-      );
-    }
-
-    const token = Buffer.from(
-      `${infuraProjectId}:${infuraProjectSecret}`
-    ).toString("base64");
-
-    return create({
-      host: "ipfs.infura.io",
-      port: "5001",
-      protocol: "https",
-      headers: {
-        ...headers,
-        authorization: `Basic ${token}`,
-      },
-      timeout,
-    });
-  },
-  upload: async (api, options) => {
-    const { path, pattern, pin } = options;
-    const { cid } = await last(
-      api.addAll(globSource(fsPath.dirname(path), pattern), { pin })
-    );
-
-    if (!cid) throw new Error("Content hash is not found.");
-    return {
-      cid: cid.toString(),
-      ipfs: cid.toString(),
-    };
-  },
-};
-
-
-/***/ }),
-
-/***/ 12820:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-const { create, globSource } = __nccwpck_require__(21719);
-const PeerId = __nccwpck_require__(63923);
-const last = __nccwpck_require__(28741);
-const fsPath = __nccwpck_require__(71017);
-
-module.exports = {
-  name: "IPFS",
-  builder: async (options) => {
-    const { host, port, protocol, timeout, headers } = options;
-
-    return create({ host, port, protocol, timeout, headers });
-  },
-  upload: async (api, options) => {
-    const { path, pattern, pin, timeout, key, verbose } = options;
-    const { cid } = await last(
-      api.addAll(globSource(fsPath.dirname(path), pattern), {
-        pin,
-        timeout,
-      })
-    );
-
-    if (!cid) throw new Error("Content hash is not found.");
 
-    let _key;
+    // Set IPNS name
+    let ipnsKey = null;
     if (key) {
-      const keys = await api.key.list();
-
-      _key = keys.find((k) => k.name === key);
-      if (!_key) {
-        _key = await api.key.gen(key, {
-          type: "rsa",
-          size: 2048,
-        });
-
-        if (verbose) console.log(`Created IPNS key ${JSON.stringify(_key)}`);
+      const nameManager = new NameManager(api.key, api.secret),
+        existingName = await nameManager.get(key);
+      ipnsKey = existingName.network_key;
+
+      if (existingName === false) {
+        console.log(`Creating name...`);
+        await nameManager.create(key, cid);
+        console.log(`Created name...`);
+      } else {
+        console.log(`Updating name...`);
+        await nameManager.update(key, cid);
+        console.log(`Updated name...`);
       }
-
-      await api.name.publish(cid, { key });
     }
 
+    console.log(`Done`);
+
+    if (ipnsKey) {
+      return {
+        cid: cid,
+        ipfs: cid,
+        ipns: ipnsKey,
+      };
+    }
     return {
-      cid: cid.toString(),
-      ipfs: cid.toString(),
-      ipns: _key && PeerId.parse(_key.id).toB58String(),
+      cid: cid,
+      ipfs: cid,
     };
   },
-};
-
-
-/***/ }),
-
-/***/ 76333:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
-
-const fs = __nccwpck_require__(57147);
-const fsPath = __nccwpck_require__(71017);
+});
 
-module.exports =
-  ({ builder, upload }) =>
-  async (options) => {
-    const api = await builder(options);
+;// CONCATENATED MODULE: ./pinners/index.js
 
-    return {
-      upload: async (options) => {
-        const { path } = options;
-        if (!path) {
-          throw new Error("Path is empty");
-        }
 
-        let source = path;
-        if (!fsPath.isAbsolute(source)) {
-          const dir = (
-            process.env.GITHUB_WORKSPACE || process.cwd()
-          ).toString();
-          source = fsPath.join(dir, source);
-        }
 
-        const pattern = fs.lstatSync(source).isDirectory()
-          ? `${fsPath.basename(source)}/**/*`
-          : fsPath.basename(source);
 
-        return upload(api, { ...options, path: source, pattern });
-      },
-    };
-  };
 
 
-/***/ }),
 
-/***/ 95067:
-/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
+/* harmony default export */ const pinners = ({
+  ipfs: maker(ipfs),
+  pinata: maker(pinata),
+  infura: maker(infura),
+  filebase: maker(filebase)
+});
 
-const pinataSDK = __nccwpck_require__(44386);
+;// CONCATENATED MODULE: ./uploader.js
 
-let pinataOptions = {
-  pinataOptions: {
-    cidVersion: 0,
-    wrapWithDirectory: false,
-  },
-};
 
-module.exports = {
-  name: "Pinata",
-  builder: async (options) => {
-    const { pinataKey, pinataSecret } = options;
-    if (!pinataKey) {
-      throw new Error("[pinata] Key is empty. (input `pinataKey`)");
-    }
+/* harmony default export */ const uploader = ({
+  upload: async (options) => {
+    const { service } = options;
 
-    if (!pinataSecret) {
-      throw new Error("[pinata] Secret is empty. (input `pinataSecret`)");
+    if (!Object.keys(pinners).find((key) => key === service)) {
+      throw new Error("Pinning service is not supported");
     }
 
-    return pinataSDK(pinataKey, pinataSecret);
+    const svc = await pinners[service](options);
+    return svc.upload(options);
   },
-  upload: async (api, options) => {
-    const { path, pinName, pinataPinName, verbose } = options;
-    const _pinName = pinName || pinataPinName;
-    if (_pinName) {
-      pinataOptions = {
-        ...pinataOptions,
-        pinataMetadata: {
-          name: _pinName,
-        },
-      };
-    }
+});
 
-    return api.pinFromFS(path, pinataOptions).then((result) => {
-      if (verbose) {
-        console.log(result);
-      }
+;// CONCATENATED MODULE: ./runner.js
 
-      return {
-        cid: result.IpfsHash.toString(),
-        ipfs: result.IpfsHash.toString(),
-      };
-    });
-  },
-};
 
 
-/***/ }),
 
+=======
 /***/ 35806:
 /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
 
@@ -144058,6 +275334,7 @@ const core = __nccwpck_require__(69902);
 const github = __nccwpck_require__(91890);
 
 const uploader = __nccwpck_require__(95130);
+>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05
 
 async function run() {
   try {
@@ -144123,6 +275400,9 @@ async function run() {
   }
 }
 
+<<<<<<< HEAD
+/* harmony default export */ const runner = (run);
+=======
 module.exports = run;
 
 
@@ -144373,70 +275653,70 @@ module.exports = require("zlib");
 
 Object.defineProperty(exports, "__esModule", ({ value: true }));
 
-/**
- * An implementation of the CAR reader interface that is backed by a blockstore.
- *
- * @typedef {import('multiformats').CID} CID
- * @typedef {import('@ipld/car/api').CarReader} CarReader
- * @implements {CarReader}
- */
-class BlockstoreCarReader {
-  /**
-   * @param {number} version
-   * @param {CID[]} roots
-   * @param {import('ipfs-car/blockstore').Blockstore} blockstore
-   */
-  constructor(version, roots, blockstore) {
-    /**
-     * @private
-     */
-    this._version = version;
-    /**
-     * @private
-     */
-    this._roots = roots;
-    /**
-     * @private
-     */
-    this._blockstore = blockstore;
-  }
-
-  get version() {
-    return this._version
-  }
-
-  get blockstore() {
-    return this._blockstore
-  }
-
-  async getRoots() {
-    return this._roots
-  }
-
-  /**
-   * @param {CID} cid
-   */
-  has(cid) {
-    return this._blockstore.has(cid)
-  }
-
-  /**
-   * @param {CID} cid
-   */
-  async get(cid) {
-    const bytes = await this._blockstore.get(cid);
-    return { cid, bytes }
-  }
-
-  blocks() {
-    return this._blockstore.blocks()
-  }
-
-  async *cids() {
-    for await (const b of this.blocks()) {
-      yield b.cid;
-    }
-  }
+/**
+ * An implementation of the CAR reader interface that is backed by a blockstore.
+ *
+ * @typedef {import('multiformats').CID} CID
+ * @typedef {import('@ipld/car/api').CarReader} CarReader
+ * @implements {CarReader}
+ */
+class BlockstoreCarReader {
+  /**
+   * @param {number} version
+   * @param {CID[]} roots
+   * @param {import('ipfs-car/blockstore').Blockstore} blockstore
+   */
+  constructor(version, roots, blockstore) {
+    /**
+     * @private
+     */
+    this._version = version;
+    /**
+     * @private
+     */
+    this._roots = roots;
+    /**
+     * @private
+     */
+    this._blockstore = blockstore;
+  }
+
+  get version() {
+    return this._version
+  }
+
+  get blockstore() {
+    return this._blockstore
+  }
+
+  async getRoots() {
+    return this._roots
+  }
+
+  /**
+   * @param {CID} cid
+   */
+  has(cid) {
+    return this._blockstore.has(cid)
+  }
+
+  /**
+   * @param {CID} cid
+   */
+  async get(cid) {
+    const bytes = await this._blockstore.get(cid);
+    return { cid, bytes }
+  }
+
+  blocks() {
+    return this._blockstore.blocks()
+  }
+
+  async *cids() {
+    for await (const b of this.blocks()) {
+      yield b.cid;
+    }
+  }
 }
 
 exports.BlockstoreCarReader = BlockstoreCarReader;
@@ -144512,794 +275792,794 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
 var pipe__default = /*#__PURE__*/_interopDefaultLegacy(pipe);
 var stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);
 
-/**
- * A client library for the https://filebase.storage/ service. It provides a convenient
- * interface for working with the [Raw HTTP API](https://filebase.storage/#api-docs)
- * from a web browser or [Node.js](https://nodejs.org/) and comes bundled with
- * TS for out-of-the box type inference and better IntelliSense.
- *
- * @example
- * ```js
- * import { FilebaseClient, File, Blob } from "filebase.storage"
- * const client = new FilebaseClient({ token: API_TOKEN })
- *
- * const cid = await client.storeBlob(new Blob(['hello world']))
- * ```
- * @module
- */
-
-const MAX_STORE_RETRIES = 5;
-const MAX_CONCURRENT_UPLOADS = 4;
-const DEFAULT_ENDPOINT = 'https://s3.filebase.com';
-
-/**
- * @typedef {import('./lib/interface.js').Service} Service
- * @typedef {import('./lib/interface.js').CIDString} CIDString
- * @typedef {import('./lib/interface.js').Deal} Deal
- * @typedef {import('./lib/interface.js').FileObject} FileObject
- * @typedef {import('./lib/interface.js').FilesSource} FilesSource
- * @typedef {import('./lib/interface.js').Pin} Pin
- * @typedef {import('./lib/interface.js').CarReader} CarReader
- * @typedef {import('./lib/interface.js').S3ClientConfig} S3ClientConfig
- * @typedef {import('ipfs-car/blockstore').Blockstore} BlockstoreI
- * @typedef {import('./lib/interface.js').RateLimiter} RateLimiter
- */
-
-/**
- * @template {import('./lib/interface.js').TokenInput} T
- * @typedef {import('./lib/interface.js').Token} TokenType
- */
-
-/**
- * Parses Authentication Token
- *
- * @param {string | string[]} tokenToParse
- * @returns {import('./lib/interface.js').ParseTokenResult}
- */
-function parseToken(tokenToParse) {
-  if (Array.isArray(tokenToParse)) {
-    if (typeof tokenToParse[2] === "undefined") {
-      throw new Error(`No Bucket Found`);
-    }
-    return {
-      credentials: tokenToParse,
-      bucket: tokenToParse[2]
-    }
-  }
-
-  const token = atob(tokenToParse).split(':');
-  const bucket = token[2];
-
-  if (typeof token === "undefined" || !Array.isArray(token)) {
-    throw new Error(`Token Not Found`)
-  }
-
-  if (typeof token[0] !== "string") {
-    throw new Error(`Invalid Access Key`)
-  }
-
-  if (typeof token[1] !== "string") {
-    throw new Error(`Invalid Secret Key`)
-  }
-
-  if (typeof bucket === "undefined") {
-    throw new Error(`No Bucket Found`);
-  }
-
-  return {
-    credentials: token,
-    bucket: bucket
-  }
-}
-
-/**
- */
-class FilebaseClient {
-  /**
-   * Constructs a client bound to the given `options.token` and
-   * `options.endpoint`.
-   *
-   * @example
-   * ```js
-   * import { FilebaseClient, File, Blob } from "filebase.storage"
-   * const client = new FilebaseClient({ token: API_TOKEN })
-   *
-   * const cid = await client.storeBlob(new Blob(['hello world']))
-   * ```
-   * Optionally you could pass an alternative API endpoint (e.g. for testing)
-   * @example
-   * ```js
-   * import { FilebaseClient } from "filebase.storage"
-   * const client = new FilebaseClient({
-   *   token: API_TOKEN
-   *   endpoint: new URL('http://localhost:8080/')
-   * })
-   * ```
-   *
-   * @param {{token: string, endpoint?: string, s3config?: S3ClientConfig, bucket?: string}} options
-   */
-  constructor({
-    endpoint = DEFAULT_ENDPOINT,
-    token,
-    s3config,
-    bucket
-  }) {
-    this.endpoint = endpoint;
-
-    if (typeof token === "undefined" && s3config) {
-      this.s3config = s3config;
-      if (typeof this.s3config.credentials === "undefined") {
-        throw new Error(`Must pass credentials`)
-      }
-    } else {
-      const parsedToken = parseToken(token);
-      this.token = parsedToken.credentials;
-      this.bucket = bucket || parsedToken.bucket;
-
-      this.s3config = {
-        credentials: {
-          accessKeyId: this.token[0] || "",
-          secretAccessKey: this.token[1] || ""
-        },
-        endpoint: endpoint,
-        maxAttempts: MAX_STORE_RETRIES,
-        region: "us-east-1",
-        forcePathStyle: true,
-      };
-    }
-  }
-
-  /**
-   * Stores a single file and returns its CID.
-   *
-   * @param {Service} service
-   * @param {Blob} blob
-   * @param {string | null} objectName
-   * @returns {Promise}
-   */
-  static async storeBlob(service, blob, objectName = null) {
-    const blockstore = new fs.FsBlockStore();
-
-    try {
-      const { cid, car } = await FilebaseClient.encodeBlob(blob, { blockstore });
-      await FilebaseClient.storeCar(service, car, objectName || cid.toString());
-
-      return cid.toString();
-    } finally {
-      await blockstore.close();
-    }
-  }
-
-  /**
-   * Stores a CAR file and returns its root CID.
-   *
-   * @param {Service} service
-   * @param {AsyncIterable} car
-   * @param {string} objectName
-   * @param {import('./lib/interface.js').CarStorerOptions} [options]
-   * @returns {Promise}
-   */
-  static async storeCar(
-    { endpoint, token, s3config, bucket },
-    car,
-    objectName ,
-    { onStoredChunk, onComplete, maxRetries} = {}
-  ) {
-    const selectedEndpoint = endpoint || DEFAULT_ENDPOINT;
-
-    if (typeof s3config === "undefined" && typeof token !== "undefined") {
-      const parsedToken = await parseToken(token);
-      this.token = parsedToken.credentials;
-      this.bucket = bucket || parsedToken.bucket;
-
-      s3config = {
-        credentials: {
-          accessKeyId: this.token[0] || "",
-          secretAccessKey: this.token[1] || ""
-        },
-        endpoint: selectedEndpoint,
-        maxAttempts: maxRetries || MAX_STORE_RETRIES,
-        region: "us-east-1",
-        forcePathStyle: true,
-      };
-    } else {
-      this.bucket = bucket;
-    }
-
-    if (typeof s3config === "undefined") {
-      throw new Error(`s3config not defined`)
-    }
-
-    const s3client = new clientS3.S3Client(s3config);
-
-    // Convert to an S3 upload of the full car
-    const readableStream = stream__default['default'].Readable.from(car);
-    onComplete && readableStream.on('finish', onComplete);
-    const parallelUploads3 = new libStorage.Upload({
-      client: s3client,
-      params: {
-        Bucket: this.bucket,
-        Key: objectName,
-        Body: readableStream,
-        Metadata: {
-          import: 'car'
-        },
-      },
-      queueSize: MAX_CONCURRENT_UPLOADS,
-      leavePartsOnError: false, // optional manually handle dropped parts
-    });
-
-    let storedBytes = 0.01;
-    let progressBytes = storedBytes;
-    parallelUploads3.on("httpUploadProgress", (progress) => {
-      if (typeof progress.loaded !== "number") {
-        throw new Error(`Expected Number for Loaded Progress`);
-      }
-      progressBytes = progress.loaded - storedBytes;
-      storedBytes = progress.loaded;
-      onStoredChunk && onStoredChunk(progressBytes);
-    });
-
-    const uploadResult = await parallelUploads3.done();
-    console.dir(uploadResult);
-
-    const headCommand = new clientS3.HeadObjectCommand({
-      Bucket: this.bucket,
-      Key: objectName,
-    });
-    const carHeader = await s3client.send(headCommand);
-
-    if (typeof carHeader.Metadata === "undefined" || typeof carHeader.Metadata['cid'] === "undefined") {
-      throw new Error(`No CID Returned from Remote`)
-    }
-
-    return carHeader.Metadata['cid'];
-  }
-
-  /**
-   * Stores a directory of files and returns a CID. Provided files **MUST**
-   * be within the same directory, otherwise error is raised e.g. `foo/bar.png`,
-   * `foo/bla/baz.json` is ok but `foo/bar.png`, `bla/baz.json` is not.
-   *
-   * @param {Service} service
-   * @param {FilesSource} filesSource
-   * @param {string | null} objectName
-   * @returns {Promise}
-   */
-  static async storeDirectory(service, filesSource, objectName = null) {
-    const blockstore = new fs.FsBlockStore();
-    let cidString;
-    try {
-      const { cid, car } = await FilebaseClient.encodeDirectory(filesSource, {
-        blockstore,
-      });
-      cidString = cid.toString();
-      await FilebaseClient.storeCar(service, car, objectName || cid.toString());
-    } finally {
-      await blockstore.close();
-    }
-
-    return cidString
-  }
-
-  /**
-   * Stores the given token and all resources it references (in the form of a
-   * File or a Blob) along with a metadata JSON as specificed in ERC-1155. The
-   * `token.image` must be either a `File` or a `Blob` instance, which will be
-   * stored and the corresponding content address URL will be saved in the
-   * metadata JSON file under `image` field.
-   *
-   * If `token.properties` contains properties with `File` or `Blob` values,
-   * those also get stored and their URLs will be saved in the metadata JSON
-   * file in their place.
-   *
-   * Note: URLs for `File` objects will retain file names e.g. in case of
-   * `new File([bytes], 'cat.png', { type: 'image/png' })` will be transformed
-   * into a URL that looks like `ipfs://bafy...hash/image/cat.png`. For `Blob`
-   * objects, the URL will not have a file name name or mime type, instead it
-   * will be transformed into a URL that looks like
-   * `ipfs://bafy...hash/image/blob`.
-   *
-   * @template {import('./lib/interface.js').TokenInput} T
-   * @param {Service} service
-   * @param {T} metadata
-   * @param {string | null} objectName
-   * @returns {Promise>}
-   */
-  static async store(service, metadata, objectName = null) {
-    const { token, car, cid } = await FilebaseClient.encodeNFT(metadata);
-    await FilebaseClient.storeCar(service, car, objectName || cid.toString());
-    return token
-  }
-
-  /**
-   * Returns current status of the stored NFT by its CID. Note the NFT must
-   * have previously been stored by this account.
-   *
-   * @param {Service} service
-   * @param {string} cid
-   * @param {string | null} objectName
-   * @returns {Promise}
-   */
-  static async status(
-    { endpoint, token, s3config, bucket },
-    cid,
-    objectName
-  ) {
-    const selectedEndpoint = endpoint || DEFAULT_ENDPOINT;
-
-    if (typeof s3config === "undefined" && typeof token !== "undefined") {
-      const parsedToken = parseToken(token);
-      this.token = parsedToken.credentials;
-      this.bucket = bucket || parsedToken.bucket;
-
-      s3config = {
-        credentials: {
-          accessKeyId: this.token[0] || "",
-          secretAccessKey: this.token[1] || ""
-        },
-        endpoint: selectedEndpoint,
-        maxAttempts: MAX_STORE_RETRIES,
-        region: "us-east-1",
-        forcePathStyle: true,
-      };
-    } else {
-      this.bucket = bucket;
-    }
-
-    if (typeof s3config === "undefined") {
-      throw new Error(`s3config not defined`)
-    }
-
-    const s3client = new clientS3.S3Client(s3config);
-
-    const headCommand = new clientS3.HeadObjectCommand({
-      Bucket: this.bucket,
-      Key: objectName || cid,
-    });
-    const carHeader = await s3client.send(headCommand);
-
-    if (typeof carHeader.Metadata === "undefined" || typeof carHeader.Metadata['cid'] === "undefined") {
-      throw new Error(`No CID Returned from Remote`)
-    }
-
-    if (typeof carHeader['ContentLength'] !== "number") {
-      throw new Error(`Invalid Content Length`)
-    }
-
-    const displayDate = carHeader.LastModified;
-
-    if (typeof displayDate === "undefined") {
-      throw new Error('Invalid Date')
-    }
-
-    return {
-      cid: carHeader.Metadata['cid'],
-      size: carHeader['ContentLength'],
-      deals: [],
-      pin: {
-        cid: carHeader.Metadata['cid'],
-        name: carHeader.Metadata['cid'],
-        status: 'pinned',
-        created: displayDate,
-      },
-      created: displayDate,
-    }
-  }
-
-
-  /**
-   * Removes stored content by its CID from this account. Please note that
-   * even if content is removed from the service other nodes that have
-   * replicated it might still continue providing it.
-   *
-   * @param {Service} service
-   * @param {string} cid
-   * @param {string | null} objectName
-   * @returns {Promise}
-   */
-  static async delete(
-    { endpoint, token, s3config, bucket },
-    cid,
-    objectName = null
-  ) {
-    const selectedEndpoint = endpoint || DEFAULT_ENDPOINT;
-
-    if (typeof s3config === "undefined" && typeof token !== "undefined") {
-      const parsedToken = parseToken(token);
-      this.token = parsedToken.credentials;
-      this.bucket = bucket || parsedToken.bucket;
-
-      s3config = {
-        credentials: {
-          accessKeyId: this.token[0] || "",
-          secretAccessKey: this.token[1] || ""
-        },
-        endpoint: selectedEndpoint,
-        region: "us-east-1",
-        forcePathStyle: true,
-      };
-    } else {
-      this.bucket = bucket;
-    }
-
-    if (typeof s3config === "undefined") {
-      throw new Error(`s3config not defined`)
-    }
-
-    const s3client = new clientS3.S3Client(s3config);
-
-    const deleteCommand = new clientS3.DeleteObjectCommand({
-      Bucket: this.bucket,
-      Key: objectName || cid,
-    });
-
-    await s3client.send(deleteCommand);
-  }
-
-  /**
-   * Encodes the given token and all resources it references (in the form of a
-   * File or a Blob) along with a metadata JSON as specificed in ERC-1155 to a
-   * CAR file. The `token.image` must be either a `File` or a `Blob` instance,
-   * which will be stored and the corresponding content address URL will be
-   * saved in the metadata JSON file under `image` field.
-   *
-   * If `token.properties` contains properties with `File` or `Blob` values,
-   * those also get stored and their URLs will be saved in the metadata JSON
-   * file in their place.
-   *
-   * Note: URLs for `File` objects will retain file names e.g. in case of
-   * `new File([bytes], 'cat.png', { type: 'image/png' })` will be transformed
-   * into a URL that looks like `ipfs://bafy...hash/image/cat.png`. For `Blob`
-   * objects, the URL will not have a file name name or mime type, instead it
-   * will be transformed into a URL that looks like
-   * `ipfs://bafy...hash/image/blob`.
-   *
-   * @example
-   * ```js
-   * const { token, car } = await FilebaseClient.encodeNFT({
-   *   name: 'filebase.storage store test',
-   *   description: 'Test ERC-1155 compatible metadata.',
-   *   image: new File([''], 'pinpie.jpg', { type: 'image/jpg' }),
-   *   properties: {
-   *     custom: 'Custom data can appear here, files are auto uploaded.',
-   *     file: new File([''], 'README.md', { type: 'text/plain' }),
-   *   }
-   * })
-   *
-   * console.log('IPFS URL for the metadata:', token.url)
-   * console.log('metadata.json contents:\n', token.data)
-   * console.log('metadata.json with IPFS gateway URLs:\n', token.embed())
-   *
-   * // Now store the CAR file on filebase.storage
-   * await client.storeCar(car)
-   * ```
-   *
-   * @template {import('./lib/interface.js').TokenInput} T
-   * @param {T} input
-   * @returns {Promise<{ cid: CID, token: TokenType, car: AsyncIterable }>}
-   */
-  static async encodeNFT(input) {
-    validateERC1155(input);
-    return token.Token.encode(input)
-  }
-
-  /**
-   * Encodes a single file to a CAR file and also returns its root CID.
-   *
-   * @example
-   * ```js
-   * const content = new Blob(['hello world'])
-   * const { cid, car } = await FilebaseClient.encodeBlob(content)
-   *
-   * // Root CID of the file
-   * console.log(cid.toString())
-   *
-   * // Now store the CAR file on filebase.storage
-   * await client.storeCar(car)
-   * ```
-   *
-   * @param {Blob} blob
-   * @param {object} [options]
-   * @param {BlockstoreI} [options.blockstore]
-   * @returns {Promise<{ cid: CID, car: AsyncIterable }>}
-   */
-  static async encodeBlob(blob, { blockstore } = {}) {
-    if (blob.size === 0) {
-      throw new Error('Content size is 0, make sure to provide some content')
-    }
-    return packCar([toImportCandidate('blob', blob)], {
-      blockstore,
-      wrapWithDirectory: false,
-    })
-  }
-
-  /**
-   * Encodes a directory of files to a CAR file and also returns the root CID.
-   * Provided files **MUST** be within the same directory, otherwise error is
-   * raised e.g. `foo/bar.png`, `foo/bla/baz.json` is ok but `foo/bar.png`,
-   * `bla/baz.json` is not.
-   *
-   * @example
-   * ```js
-   * const { cid, car } = await FilebaseClient.encodeDirectory([
-   *   new File(['hello world'], 'hello.txt'),
-   *   new File([JSON.stringify({'from': 'incognito'}, null, 2)], 'metadata.json')
-   * ])
-   *
-   * // Root CID of the directory
-   * console.log(cid.toString())
-   *
-   * // Now store the CAR file on filebase.storage
-   * await client.storeCar(car)
-   * ```
-   *
-   * @param {FilesSource} files
-   * @param {object} [options]
-   * @param {BlockstoreI} [options.blockstore]
-   * @returns {Promise<{ cid: CID, car: AsyncIterable }>}
-   */
-  static async encodeDirectory(files, { blockstore } = {}) {
-    let size = 0;
-    const input = pipe__default['default'](files, async function* (files) {
-      for await (const file of files) {
-        yield toImportCandidate(file.name, file);
-        size += file.size;
-      }
-    });
-    const packed = await packCar(input, {
-      blockstore,
-      wrapWithDirectory: true,
-    });
-    if (size === 0) {
-      throw new Error(
-        'Total size of files should exceed 0, make sure to provide some content'
-      )
-    }
-    return packed
-  }
-
-  /**
-   * Stores a single file and returns the corresponding Content Identifier (CID).
-   * Takes a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)
-   * or a [File](https://developer.mozilla.org/en-US/docs/Web/API/File). Note
-   * that no file name or file metadata is retained.
-   *
-   * @example
-   * ```js
-   * const content = new Blob(['hello world'])
-   * const cid = await client.storeBlob(content)
-   * cid //> 'zdj7Wn9FQAURCP6MbwcWuzi7u65kAsXCdjNTkhbJcoaXBusq9'
-   * ```
-   *
-   * @param {Blob} blob
-   * @param {string | null} objectName
-   */
-  storeBlob(blob, objectName = null) {
-    return FilebaseClient.storeBlob(this, blob, objectName)
-  }
-
-  /**
-   * Stores files encoded as a single [Content Addressed Archive
-   * (CAR)](https://github.com/ipld/specs/blob/master/block-layer/content-addressable-archives.md).
-   *
-   * Takes a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)
-   * or a [File](https://developer.mozilla.org/en-US/docs/Web/API/File).
-   *
-   * Returns the corresponding Content Identifier (CID).
-   *
-   * See the [`ipfs-car` docs](https://www.npmjs.com/package/ipfs-car) for more
-   * details on packing a CAR file.
-   *
-   * @example
-   * ```js
-   * import { pack } from 'ipfs-car/pack'
-   * import { CarReader } from '@ipld/car'
-   * const { out, root } = await pack({
-   *  input: fs.createReadStream('pinpie.pdf')
-   * })
-   * const expectedCid = root.toString()
-   * const carReader = await CarReader.fromIterable(out)
-   * const cid = await storage.storeCar(carReader)
-   * console.assert(cid === expectedCid)
-   * ```
-   *
-   * @example
-   * ```
-   * import { packToBlob } from 'ipfs-car/pack/blob'
-   * const data = 'Hello world'
-   * const { root, car } = await packToBlob({ input: [new TextEncoder().encode(data)] })
-   * const expectedCid = root.toString()
-   * const cid = await client.storeCar(car)
-   * console.assert(cid === expectedCid)
-   * ```
-   * @param {AsyncIterable} car
-   * @param {string} objectName
-   * @param {import('./lib/interface.js').CarStorerOptions} [options]
-   */
-  storeCar(car, objectName, options) {
-    return FilebaseClient.storeCar(this, car, objectName, options)
-  }
-
-  /**
-   * Stores a directory of files and returns a CID for the directory.
-   *
-   * @example
-   * ```js
-   * const cid = await client.storeDirectory([
-   *   new File(['hello world'], 'hello.txt'),
-   *   new File([JSON.stringify({'from': 'incognito'}, null, 2)], 'metadata.json')
-   * ])
-   * cid //>
-   * ```
-   *
-   * Argument can be a [FileList](https://developer.mozilla.org/en-US/docs/Web/API/FileList)
-   * instance as well, in which case directory structure will be retained.
-   *
-   * @param {FilesSource} files
-   * @param {string | null} objectName
-   */
-  storeDirectory(files, objectName = null) {
-    return FilebaseClient.storeDirectory(this, files, objectName)
-  }
-
-  /**
-   * Returns current status of the stored NFT by its CID. Note the NFT must
-   * have previously been stored by this account.
-   *
-   * @example
-   * ```js
-   * const status = await client.status('zdj7Wn9FQAURCP6MbwcWuzi7u65kAsXCdjNTkhbJcoaXBusq9')
-   * ```
-   *
-   * @param {string} cid
-   * @param {string | null} objectName
-   */
-  status(cid, objectName = null) {
-    return FilebaseClient.status(this, cid, objectName)
-  }
-
-  /**
-   * Removes stored content by its CID from the service.
-   *
-   * > Please note that even if content is removed from the service other nodes
-   * that have replicated it might still continue providing it.
-   *
-   * @example
-   * ```js
-   * await client.delete('zdj7Wn9FQAURCP6MbwcWuzi7u65kAsXCdjNTkhbJcoaXBusq9')
-   * ```
-   *
-   * @param {string} cid
-   * @param {string | null} objectName
-   */
-  delete(cid, objectName = null) {
-    return FilebaseClient.delete(this, cid, objectName)
-  }
-
-  /**
-   * Stores the given token and all resources it references (in the form of a
-   * File or a Blob) along with a metadata JSON as specificed in
-   * [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155#metadata). The
-   * `token.image` must be either a `File` or a `Blob` instance, which will be
-   * stored and the corresponding content address URL will be saved in the
-   * metadata JSON file under `image` field.
-   *
-   * If `token.properties` contains properties with `File` or `Blob` values,
-   * those also get stored and their URLs will be saved in the metadata JSON
-   * file in their place.
-   *
-   * Note: URLs for `File` objects will retain file names e.g. in case of
-   * `new File([bytes], 'cat.png', { type: 'image/png' })` will be transformed
-   * into a URL that looks like `ipfs://bafy...hash/image/cat.png`. For `Blob`
-   * objects, the URL will not have a file name name or mime type, instead it
-   * will be transformed into a URL that looks like
-   * `ipfs://bafy...hash/image/blob`.
-   *
-   * @example
-   * ```js
-   * const metadata = await client.store({
-   *   name: 'filebase.storage store test',
-   *   description: 'Test ERC-1155 compatible metadata.',
-   *   image: new File([''], 'pinpie.jpg', { type: 'image/jpg' }),
-   *   properties: {
-   *     custom: 'Custom data can appear here, files are auto uploaded.',
-   *     file: new File([''], 'README.md', { type: 'text/plain' }),
-   *   }
-   * })
-   *
-   * console.log('IPFS URL for the metadata:', metadata.url)
-   * console.log('metadata.json contents:\n', metadata.data)
-   * console.log('metadata.json with IPFS gateway URLs:\n', metadata.embed())
-   * ```
-   *
-   * @template {import('./lib/interface.js').TokenInput} T
-   * @param {T} token
-   * @param {string | null} objectName
-   */
-  store(token, objectName = null) {
-    return FilebaseClient.store(this, token, objectName)
-  }
-}
-
-/**
- * Cast an iterable to an asyncIterable
- * @template T
- * @param {Iterable} iterable
- * @returns {AsyncIterable}
- */
-function toAsyncIterable(iterable) {
-  return (async function* () {
-    for (const item of iterable) {
-      yield item;
-    }
-  })()
-}
-
-/**
- * @template {import('./lib/interface.js').TokenInput} T
- * @param {T} metadata
- */
-const validateERC1155 = ({ name, description, image, decimals }) => {
-  // Just validate that expected fields are present
-  if (typeof name !== 'string') {
-    throw new TypeError(
-      'string property `name` identifying the asset is required'
-    )
-  }
-  if (typeof description !== 'string') {
-    throw new TypeError(
-      'string property `description` describing asset is required'
-    )
-  }
-  if (!(image instanceof file.Blob)) {
-    throw new TypeError('property `image` must be a Blob or File object')
-  } else if (!image.type.startsWith('image/')) {
-    console.warn(`According to ERC721 Metadata JSON Schema 'image' must have 'image/*' mime type.
-
-For better interoperability we would highly recommend storing content with different mime type under 'properties' namespace e.g. \`properties: { video: file }\` and using 'image' field for storing a preview image for it instead.
-
-For more context please see ERC-721 specification https://eips.ethereum.org/EIPS/eip-721`);
-  }
-
-  if (typeof decimals !== 'undefined' && typeof decimals !== 'number') {
-    throw new TypeError('property `decimals` must be an integer value')
-  }
-};
-
-/**
- * @param {import('ipfs-car/pack').ImportCandidateStream|Array<{ path: string, content: import('./platform.js').ReadableStream }>} input
- * @param {object} [options]
- * @param {BlockstoreI} [options.blockstore]
- * @param {boolean} [options.wrapWithDirectory]
- */
-const packCar = async (input, { blockstore, wrapWithDirectory } = {}) => {
-  /* c8 ignore next 1 */
-  blockstore = blockstore || new fs.FsBlockStore();
-  const { root: cid, out } = await pack.pack({ input, blockstore, wrapWithDirectory, rawLeaves: false, cidVersion: 0 });
-  const car = new bsCarReader.BlockstoreCarReader(1, [cid], blockstore);
-  return { cid, carReader: car, car: out }
-};
-
-/**
- * Convert the passed blob to an "import candidate" - an object suitable for
- * passing to the ipfs-unixfs-importer. Note: content is an accessor so that
- * the stream is created only when needed.
- *
- * @param {string} path
- * @param {Pick|{ stream: () => AsyncIterable }} blob
- * @returns {import('ipfs-core-types/src/utils.js').ImportCandidate}
- */
-function toImportCandidate(path, blob) {
-  /** @type {AsyncIterable} */
-  let stream;
-  return {
-    path,
-    get content() {
-      stream = stream || blob.stream();
-      return stream
-    },
-  }
+/**
+ * A client library for the https://filebase.storage/ service. It provides a convenient
+ * interface for working with the [Raw HTTP API](https://filebase.storage/#api-docs)
+ * from a web browser or [Node.js](https://nodejs.org/) and comes bundled with
+ * TS for out-of-the box type inference and better IntelliSense.
+ *
+ * @example
+ * ```js
+ * import { FilebaseClient, File, Blob } from "filebase.storage"
+ * const client = new FilebaseClient({ token: API_TOKEN })
+ *
+ * const cid = await client.storeBlob(new Blob(['hello world']))
+ * ```
+ * @module
+ */
+
+const MAX_STORE_RETRIES = 5;
+const MAX_CONCURRENT_UPLOADS = 4;
+const DEFAULT_ENDPOINT = 'https://s3.filebase.com';
+
+/**
+ * @typedef {import('./lib/interface.js').Service} Service
+ * @typedef {import('./lib/interface.js').CIDString} CIDString
+ * @typedef {import('./lib/interface.js').Deal} Deal
+ * @typedef {import('./lib/interface.js').FileObject} FileObject
+ * @typedef {import('./lib/interface.js').FilesSource} FilesSource
+ * @typedef {import('./lib/interface.js').Pin} Pin
+ * @typedef {import('./lib/interface.js').CarReader} CarReader
+ * @typedef {import('./lib/interface.js').S3ClientConfig} S3ClientConfig
+ * @typedef {import('ipfs-car/blockstore').Blockstore} BlockstoreI
+ * @typedef {import('./lib/interface.js').RateLimiter} RateLimiter
+ */
+
+/**
+ * @template {import('./lib/interface.js').TokenInput} T
+ * @typedef {import('./lib/interface.js').Token} TokenType
+ */
+
+/**
+ * Parses Authentication Token
+ *
+ * @param {string | string[]} tokenToParse
+ * @returns {import('./lib/interface.js').ParseTokenResult}
+ */
+function parseToken(tokenToParse) {
+  if (Array.isArray(tokenToParse)) {
+    if (typeof tokenToParse[2] === "undefined") {
+      throw new Error(`No Bucket Found`);
+    }
+    return {
+      credentials: tokenToParse,
+      bucket: tokenToParse[2]
+    }
+  }
+
+  const token = atob(tokenToParse).split(':');
+  const bucket = token[2];
+
+  if (typeof token === "undefined" || !Array.isArray(token)) {
+    throw new Error(`Token Not Found`)
+  }
+
+  if (typeof token[0] !== "string") {
+    throw new Error(`Invalid Access Key`)
+  }
+
+  if (typeof token[1] !== "string") {
+    throw new Error(`Invalid Secret Key`)
+  }
+
+  if (typeof bucket === "undefined") {
+    throw new Error(`No Bucket Found`);
+  }
+
+  return {
+    credentials: token,
+    bucket: bucket
+  }
+}
+
+/**
+ */
+class FilebaseClient {
+  /**
+   * Constructs a client bound to the given `options.token` and
+   * `options.endpoint`.
+   *
+   * @example
+   * ```js
+   * import { FilebaseClient, File, Blob } from "filebase.storage"
+   * const client = new FilebaseClient({ token: API_TOKEN })
+   *
+   * const cid = await client.storeBlob(new Blob(['hello world']))
+   * ```
+   * Optionally you could pass an alternative API endpoint (e.g. for testing)
+   * @example
+   * ```js
+   * import { FilebaseClient } from "filebase.storage"
+   * const client = new FilebaseClient({
+   *   token: API_TOKEN
+   *   endpoint: new URL('http://localhost:8080/')
+   * })
+   * ```
+   *
+   * @param {{token: string, endpoint?: string, s3config?: S3ClientConfig, bucket?: string}} options
+   */
+  constructor({
+    endpoint = DEFAULT_ENDPOINT,
+    token,
+    s3config,
+    bucket
+  }) {
+    this.endpoint = endpoint;
+
+    if (typeof token === "undefined" && s3config) {
+      this.s3config = s3config;
+      if (typeof this.s3config.credentials === "undefined") {
+        throw new Error(`Must pass credentials`)
+      }
+    } else {
+      const parsedToken = parseToken(token);
+      this.token = parsedToken.credentials;
+      this.bucket = bucket || parsedToken.bucket;
+
+      this.s3config = {
+        credentials: {
+          accessKeyId: this.token[0] || "",
+          secretAccessKey: this.token[1] || ""
+        },
+        endpoint: endpoint,
+        maxAttempts: MAX_STORE_RETRIES,
+        region: "us-east-1",
+        forcePathStyle: true,
+      };
+    }
+  }
+
+  /**
+   * Stores a single file and returns its CID.
+   *
+   * @param {Service} service
+   * @param {Blob} blob
+   * @param {string | null} objectName
+   * @returns {Promise}
+   */
+  static async storeBlob(service, blob, objectName = null) {
+    const blockstore = new fs.FsBlockStore();
+
+    try {
+      const { cid, car } = await FilebaseClient.encodeBlob(blob, { blockstore });
+      await FilebaseClient.storeCar(service, car, objectName || cid.toString());
+
+      return cid.toString();
+    } finally {
+      await blockstore.close();
+    }
+  }
+
+  /**
+   * Stores a CAR file and returns its root CID.
+   *
+   * @param {Service} service
+   * @param {AsyncIterable} car
+   * @param {string} objectName
+   * @param {import('./lib/interface.js').CarStorerOptions} [options]
+   * @returns {Promise}
+   */
+  static async storeCar(
+    { endpoint, token, s3config, bucket },
+    car,
+    objectName ,
+    { onStoredChunk, onComplete, maxRetries} = {}
+  ) {
+    const selectedEndpoint = endpoint || DEFAULT_ENDPOINT;
+
+    if (typeof s3config === "undefined" && typeof token !== "undefined") {
+      const parsedToken = await parseToken(token);
+      this.token = parsedToken.credentials;
+      this.bucket = bucket || parsedToken.bucket;
+
+      s3config = {
+        credentials: {
+          accessKeyId: this.token[0] || "",
+          secretAccessKey: this.token[1] || ""
+        },
+        endpoint: selectedEndpoint,
+        maxAttempts: maxRetries || MAX_STORE_RETRIES,
+        region: "us-east-1",
+        forcePathStyle: true,
+      };
+    } else {
+      this.bucket = bucket;
+    }
+
+    if (typeof s3config === "undefined") {
+      throw new Error(`s3config not defined`)
+    }
+
+    const s3client = new clientS3.S3Client(s3config);
+
+    // Convert to an S3 upload of the full car
+    const readableStream = stream__default['default'].Readable.from(car);
+    onComplete && readableStream.on('finish', onComplete);
+    const parallelUploads3 = new libStorage.Upload({
+      client: s3client,
+      params: {
+        Bucket: this.bucket,
+        Key: objectName,
+        Body: readableStream,
+        Metadata: {
+          import: 'car'
+        },
+      },
+      queueSize: MAX_CONCURRENT_UPLOADS,
+      leavePartsOnError: false, // optional manually handle dropped parts
+    });
+
+    let storedBytes = 0.01;
+    let progressBytes = storedBytes;
+    parallelUploads3.on("httpUploadProgress", (progress) => {
+      if (typeof progress.loaded !== "number") {
+        throw new Error(`Expected Number for Loaded Progress`);
+      }
+      progressBytes = progress.loaded - storedBytes;
+      storedBytes = progress.loaded;
+      onStoredChunk && onStoredChunk(progressBytes);
+    });
+
+    const uploadResult = await parallelUploads3.done();
+    console.dir(uploadResult);
+
+    const headCommand = new clientS3.HeadObjectCommand({
+      Bucket: this.bucket,
+      Key: objectName,
+    });
+    const carHeader = await s3client.send(headCommand);
+
+    if (typeof carHeader.Metadata === "undefined" || typeof carHeader.Metadata['cid'] === "undefined") {
+      throw new Error(`No CID Returned from Remote`)
+    }
+
+    return carHeader.Metadata['cid'];
+  }
+
+  /**
+   * Stores a directory of files and returns a CID. Provided files **MUST**
+   * be within the same directory, otherwise error is raised e.g. `foo/bar.png`,
+   * `foo/bla/baz.json` is ok but `foo/bar.png`, `bla/baz.json` is not.
+   *
+   * @param {Service} service
+   * @param {FilesSource} filesSource
+   * @param {string | null} objectName
+   * @returns {Promise}
+   */
+  static async storeDirectory(service, filesSource, objectName = null) {
+    const blockstore = new fs.FsBlockStore();
+    let cidString;
+    try {
+      const { cid, car } = await FilebaseClient.encodeDirectory(filesSource, {
+        blockstore,
+      });
+      cidString = cid.toString();
+      await FilebaseClient.storeCar(service, car, objectName || cid.toString());
+    } finally {
+      await blockstore.close();
+    }
+
+    return cidString
+  }
+
+  /**
+   * Stores the given token and all resources it references (in the form of a
+   * File or a Blob) along with a metadata JSON as specificed in ERC-1155. The
+   * `token.image` must be either a `File` or a `Blob` instance, which will be
+   * stored and the corresponding content address URL will be saved in the
+   * metadata JSON file under `image` field.
+   *
+   * If `token.properties` contains properties with `File` or `Blob` values,
+   * those also get stored and their URLs will be saved in the metadata JSON
+   * file in their place.
+   *
+   * Note: URLs for `File` objects will retain file names e.g. in case of
+   * `new File([bytes], 'cat.png', { type: 'image/png' })` will be transformed
+   * into a URL that looks like `ipfs://bafy...hash/image/cat.png`. For `Blob`
+   * objects, the URL will not have a file name name or mime type, instead it
+   * will be transformed into a URL that looks like
+   * `ipfs://bafy...hash/image/blob`.
+   *
+   * @template {import('./lib/interface.js').TokenInput} T
+   * @param {Service} service
+   * @param {T} metadata
+   * @param {string | null} objectName
+   * @returns {Promise>}
+   */
+  static async store(service, metadata, objectName = null) {
+    const { token, car, cid } = await FilebaseClient.encodeNFT(metadata);
+    await FilebaseClient.storeCar(service, car, objectName || cid.toString());
+    return token
+  }
+
+  /**
+   * Returns current status of the stored NFT by its CID. Note the NFT must
+   * have previously been stored by this account.
+   *
+   * @param {Service} service
+   * @param {string} cid
+   * @param {string | null} objectName
+   * @returns {Promise}
+   */
+  static async status(
+    { endpoint, token, s3config, bucket },
+    cid,
+    objectName
+  ) {
+    const selectedEndpoint = endpoint || DEFAULT_ENDPOINT;
+
+    if (typeof s3config === "undefined" && typeof token !== "undefined") {
+      const parsedToken = parseToken(token);
+      this.token = parsedToken.credentials;
+      this.bucket = bucket || parsedToken.bucket;
+
+      s3config = {
+        credentials: {
+          accessKeyId: this.token[0] || "",
+          secretAccessKey: this.token[1] || ""
+        },
+        endpoint: selectedEndpoint,
+        maxAttempts: MAX_STORE_RETRIES,
+        region: "us-east-1",
+        forcePathStyle: true,
+      };
+    } else {
+      this.bucket = bucket;
+    }
+
+    if (typeof s3config === "undefined") {
+      throw new Error(`s3config not defined`)
+    }
+
+    const s3client = new clientS3.S3Client(s3config);
+
+    const headCommand = new clientS3.HeadObjectCommand({
+      Bucket: this.bucket,
+      Key: objectName || cid,
+    });
+    const carHeader = await s3client.send(headCommand);
+
+    if (typeof carHeader.Metadata === "undefined" || typeof carHeader.Metadata['cid'] === "undefined") {
+      throw new Error(`No CID Returned from Remote`)
+    }
+
+    if (typeof carHeader['ContentLength'] !== "number") {
+      throw new Error(`Invalid Content Length`)
+    }
+
+    const displayDate = carHeader.LastModified;
+
+    if (typeof displayDate === "undefined") {
+      throw new Error('Invalid Date')
+    }
+
+    return {
+      cid: carHeader.Metadata['cid'],
+      size: carHeader['ContentLength'],
+      deals: [],
+      pin: {
+        cid: carHeader.Metadata['cid'],
+        name: carHeader.Metadata['cid'],
+        status: 'pinned',
+        created: displayDate,
+      },
+      created: displayDate,
+    }
+  }
+
+
+  /**
+   * Removes stored content by its CID from this account. Please note that
+   * even if content is removed from the service other nodes that have
+   * replicated it might still continue providing it.
+   *
+   * @param {Service} service
+   * @param {string} cid
+   * @param {string | null} objectName
+   * @returns {Promise}
+   */
+  static async delete(
+    { endpoint, token, s3config, bucket },
+    cid,
+    objectName = null
+  ) {
+    const selectedEndpoint = endpoint || DEFAULT_ENDPOINT;
+
+    if (typeof s3config === "undefined" && typeof token !== "undefined") {
+      const parsedToken = parseToken(token);
+      this.token = parsedToken.credentials;
+      this.bucket = bucket || parsedToken.bucket;
+
+      s3config = {
+        credentials: {
+          accessKeyId: this.token[0] || "",
+          secretAccessKey: this.token[1] || ""
+        },
+        endpoint: selectedEndpoint,
+        region: "us-east-1",
+        forcePathStyle: true,
+      };
+    } else {
+      this.bucket = bucket;
+    }
+
+    if (typeof s3config === "undefined") {
+      throw new Error(`s3config not defined`)
+    }
+
+    const s3client = new clientS3.S3Client(s3config);
+
+    const deleteCommand = new clientS3.DeleteObjectCommand({
+      Bucket: this.bucket,
+      Key: objectName || cid,
+    });
+
+    await s3client.send(deleteCommand);
+  }
+
+  /**
+   * Encodes the given token and all resources it references (in the form of a
+   * File or a Blob) along with a metadata JSON as specificed in ERC-1155 to a
+   * CAR file. The `token.image` must be either a `File` or a `Blob` instance,
+   * which will be stored and the corresponding content address URL will be
+   * saved in the metadata JSON file under `image` field.
+   *
+   * If `token.properties` contains properties with `File` or `Blob` values,
+   * those also get stored and their URLs will be saved in the metadata JSON
+   * file in their place.
+   *
+   * Note: URLs for `File` objects will retain file names e.g. in case of
+   * `new File([bytes], 'cat.png', { type: 'image/png' })` will be transformed
+   * into a URL that looks like `ipfs://bafy...hash/image/cat.png`. For `Blob`
+   * objects, the URL will not have a file name name or mime type, instead it
+   * will be transformed into a URL that looks like
+   * `ipfs://bafy...hash/image/blob`.
+   *
+   * @example
+   * ```js
+   * const { token, car } = await FilebaseClient.encodeNFT({
+   *   name: 'filebase.storage store test',
+   *   description: 'Test ERC-1155 compatible metadata.',
+   *   image: new File([''], 'pinpie.jpg', { type: 'image/jpg' }),
+   *   properties: {
+   *     custom: 'Custom data can appear here, files are auto uploaded.',
+   *     file: new File([''], 'README.md', { type: 'text/plain' }),
+   *   }
+   * })
+   *
+   * console.log('IPFS URL for the metadata:', token.url)
+   * console.log('metadata.json contents:\n', token.data)
+   * console.log('metadata.json with IPFS gateway URLs:\n', token.embed())
+   *
+   * // Now store the CAR file on filebase.storage
+   * await client.storeCar(car)
+   * ```
+   *
+   * @template {import('./lib/interface.js').TokenInput} T
+   * @param {T} input
+   * @returns {Promise<{ cid: CID, token: TokenType, car: AsyncIterable }>}
+   */
+  static async encodeNFT(input) {
+    validateERC1155(input);
+    return token.Token.encode(input)
+  }
+
+  /**
+   * Encodes a single file to a CAR file and also returns its root CID.
+   *
+   * @example
+   * ```js
+   * const content = new Blob(['hello world'])
+   * const { cid, car } = await FilebaseClient.encodeBlob(content)
+   *
+   * // Root CID of the file
+   * console.log(cid.toString())
+   *
+   * // Now store the CAR file on filebase.storage
+   * await client.storeCar(car)
+   * ```
+   *
+   * @param {Blob} blob
+   * @param {object} [options]
+   * @param {BlockstoreI} [options.blockstore]
+   * @returns {Promise<{ cid: CID, car: AsyncIterable }>}
+   */
+  static async encodeBlob(blob, { blockstore } = {}) {
+    if (blob.size === 0) {
+      throw new Error('Content size is 0, make sure to provide some content')
+    }
+    return packCar([toImportCandidate('blob', blob)], {
+      blockstore,
+      wrapWithDirectory: false,
+    })
+  }
+
+  /**
+   * Encodes a directory of files to a CAR file and also returns the root CID.
+   * Provided files **MUST** be within the same directory, otherwise error is
+   * raised e.g. `foo/bar.png`, `foo/bla/baz.json` is ok but `foo/bar.png`,
+   * `bla/baz.json` is not.
+   *
+   * @example
+   * ```js
+   * const { cid, car } = await FilebaseClient.encodeDirectory([
+   *   new File(['hello world'], 'hello.txt'),
+   *   new File([JSON.stringify({'from': 'incognito'}, null, 2)], 'metadata.json')
+   * ])
+   *
+   * // Root CID of the directory
+   * console.log(cid.toString())
+   *
+   * // Now store the CAR file on filebase.storage
+   * await client.storeCar(car)
+   * ```
+   *
+   * @param {FilesSource} files
+   * @param {object} [options]
+   * @param {BlockstoreI} [options.blockstore]
+   * @returns {Promise<{ cid: CID, car: AsyncIterable }>}
+   */
+  static async encodeDirectory(files, { blockstore } = {}) {
+    let size = 0;
+    const input = pipe__default['default'](files, async function* (files) {
+      for await (const file of files) {
+        yield toImportCandidate(file.name, file);
+        size += file.size;
+      }
+    });
+    const packed = await packCar(input, {
+      blockstore,
+      wrapWithDirectory: true,
+    });
+    if (size === 0) {
+      throw new Error(
+        'Total size of files should exceed 0, make sure to provide some content'
+      )
+    }
+    return packed
+  }
+
+  /**
+   * Stores a single file and returns the corresponding Content Identifier (CID).
+   * Takes a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)
+   * or a [File](https://developer.mozilla.org/en-US/docs/Web/API/File). Note
+   * that no file name or file metadata is retained.
+   *
+   * @example
+   * ```js
+   * const content = new Blob(['hello world'])
+   * const cid = await client.storeBlob(content)
+   * cid //> 'zdj7Wn9FQAURCP6MbwcWuzi7u65kAsXCdjNTkhbJcoaXBusq9'
+   * ```
+   *
+   * @param {Blob} blob
+   * @param {string | null} objectName
+   */
+  storeBlob(blob, objectName = null) {
+    return FilebaseClient.storeBlob(this, blob, objectName)
+  }
+
+  /**
+   * Stores files encoded as a single [Content Addressed Archive
+   * (CAR)](https://github.com/ipld/specs/blob/master/block-layer/content-addressable-archives.md).
+   *
+   * Takes a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)
+   * or a [File](https://developer.mozilla.org/en-US/docs/Web/API/File).
+   *
+   * Returns the corresponding Content Identifier (CID).
+   *
+   * See the [`ipfs-car` docs](https://www.npmjs.com/package/ipfs-car) for more
+   * details on packing a CAR file.
+   *
+   * @example
+   * ```js
+   * import { pack } from 'ipfs-car/pack'
+   * import { CarReader } from '@ipld/car'
+   * const { out, root } = await pack({
+   *  input: fs.createReadStream('pinpie.pdf')
+   * })
+   * const expectedCid = root.toString()
+   * const carReader = await CarReader.fromIterable(out)
+   * const cid = await storage.storeCar(carReader)
+   * console.assert(cid === expectedCid)
+   * ```
+   *
+   * @example
+   * ```
+   * import { packToBlob } from 'ipfs-car/pack/blob'
+   * const data = 'Hello world'
+   * const { root, car } = await packToBlob({ input: [new TextEncoder().encode(data)] })
+   * const expectedCid = root.toString()
+   * const cid = await client.storeCar(car)
+   * console.assert(cid === expectedCid)
+   * ```
+   * @param {AsyncIterable} car
+   * @param {string} objectName
+   * @param {import('./lib/interface.js').CarStorerOptions} [options]
+   */
+  storeCar(car, objectName, options) {
+    return FilebaseClient.storeCar(this, car, objectName, options)
+  }
+
+  /**
+   * Stores a directory of files and returns a CID for the directory.
+   *
+   * @example
+   * ```js
+   * const cid = await client.storeDirectory([
+   *   new File(['hello world'], 'hello.txt'),
+   *   new File([JSON.stringify({'from': 'incognito'}, null, 2)], 'metadata.json')
+   * ])
+   * cid //>
+   * ```
+   *
+   * Argument can be a [FileList](https://developer.mozilla.org/en-US/docs/Web/API/FileList)
+   * instance as well, in which case directory structure will be retained.
+   *
+   * @param {FilesSource} files
+   * @param {string | null} objectName
+   */
+  storeDirectory(files, objectName = null) {
+    return FilebaseClient.storeDirectory(this, files, objectName)
+  }
+
+  /**
+   * Returns current status of the stored NFT by its CID. Note the NFT must
+   * have previously been stored by this account.
+   *
+   * @example
+   * ```js
+   * const status = await client.status('zdj7Wn9FQAURCP6MbwcWuzi7u65kAsXCdjNTkhbJcoaXBusq9')
+   * ```
+   *
+   * @param {string} cid
+   * @param {string | null} objectName
+   */
+  status(cid, objectName = null) {
+    return FilebaseClient.status(this, cid, objectName)
+  }
+
+  /**
+   * Removes stored content by its CID from the service.
+   *
+   * > Please note that even if content is removed from the service other nodes
+   * that have replicated it might still continue providing it.
+   *
+   * @example
+   * ```js
+   * await client.delete('zdj7Wn9FQAURCP6MbwcWuzi7u65kAsXCdjNTkhbJcoaXBusq9')
+   * ```
+   *
+   * @param {string} cid
+   * @param {string | null} objectName
+   */
+  delete(cid, objectName = null) {
+    return FilebaseClient.delete(this, cid, objectName)
+  }
+
+  /**
+   * Stores the given token and all resources it references (in the form of a
+   * File or a Blob) along with a metadata JSON as specificed in
+   * [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155#metadata). The
+   * `token.image` must be either a `File` or a `Blob` instance, which will be
+   * stored and the corresponding content address URL will be saved in the
+   * metadata JSON file under `image` field.
+   *
+   * If `token.properties` contains properties with `File` or `Blob` values,
+   * those also get stored and their URLs will be saved in the metadata JSON
+   * file in their place.
+   *
+   * Note: URLs for `File` objects will retain file names e.g. in case of
+   * `new File([bytes], 'cat.png', { type: 'image/png' })` will be transformed
+   * into a URL that looks like `ipfs://bafy...hash/image/cat.png`. For `Blob`
+   * objects, the URL will not have a file name name or mime type, instead it
+   * will be transformed into a URL that looks like
+   * `ipfs://bafy...hash/image/blob`.
+   *
+   * @example
+   * ```js
+   * const metadata = await client.store({
+   *   name: 'filebase.storage store test',
+   *   description: 'Test ERC-1155 compatible metadata.',
+   *   image: new File([''], 'pinpie.jpg', { type: 'image/jpg' }),
+   *   properties: {
+   *     custom: 'Custom data can appear here, files are auto uploaded.',
+   *     file: new File([''], 'README.md', { type: 'text/plain' }),
+   *   }
+   * })
+   *
+   * console.log('IPFS URL for the metadata:', metadata.url)
+   * console.log('metadata.json contents:\n', metadata.data)
+   * console.log('metadata.json with IPFS gateway URLs:\n', metadata.embed())
+   * ```
+   *
+   * @template {import('./lib/interface.js').TokenInput} T
+   * @param {T} token
+   * @param {string | null} objectName
+   */
+  store(token, objectName = null) {
+    return FilebaseClient.store(this, token, objectName)
+  }
+}
+
+/**
+ * Cast an iterable to an asyncIterable
+ * @template T
+ * @param {Iterable} iterable
+ * @returns {AsyncIterable}
+ */
+function toAsyncIterable(iterable) {
+  return (async function* () {
+    for (const item of iterable) {
+      yield item;
+    }
+  })()
+}
+
+/**
+ * @template {import('./lib/interface.js').TokenInput} T
+ * @param {T} metadata
+ */
+const validateERC1155 = ({ name, description, image, decimals }) => {
+  // Just validate that expected fields are present
+  if (typeof name !== 'string') {
+    throw new TypeError(
+      'string property `name` identifying the asset is required'
+    )
+  }
+  if (typeof description !== 'string') {
+    throw new TypeError(
+      'string property `description` describing asset is required'
+    )
+  }
+  if (!(image instanceof file.Blob)) {
+    throw new TypeError('property `image` must be a Blob or File object')
+  } else if (!image.type.startsWith('image/')) {
+    console.warn(`According to ERC721 Metadata JSON Schema 'image' must have 'image/*' mime type.
+
+For better interoperability we would highly recommend storing content with different mime type under 'properties' namespace e.g. \`properties: { video: file }\` and using 'image' field for storing a preview image for it instead.
+
+For more context please see ERC-721 specification https://eips.ethereum.org/EIPS/eip-721`);
+  }
+
+  if (typeof decimals !== 'undefined' && typeof decimals !== 'number') {
+    throw new TypeError('property `decimals` must be an integer value')
+  }
+};
+
+/**
+ * @param {import('ipfs-car/pack').ImportCandidateStream|Array<{ path: string, content: import('./platform.js').ReadableStream }>} input
+ * @param {object} [options]
+ * @param {BlockstoreI} [options.blockstore]
+ * @param {boolean} [options.wrapWithDirectory]
+ */
+const packCar = async (input, { blockstore, wrapWithDirectory } = {}) => {
+  /* c8 ignore next 1 */
+  blockstore = blockstore || new fs.FsBlockStore();
+  const { root: cid, out } = await pack.pack({ input, blockstore, wrapWithDirectory, rawLeaves: false, cidVersion: 0 });
+  const car = new bsCarReader.BlockstoreCarReader(1, [cid], blockstore);
+  return { cid, carReader: car, car: out }
+};
+
+/**
+ * Convert the passed blob to an "import candidate" - an object suitable for
+ * passing to the ipfs-unixfs-importer. Note: content is an accessor so that
+ * the stream is created only when needed.
+ *
+ * @param {string} path
+ * @param {Pick|{ stream: () => AsyncIterable }} blob
+ * @returns {import('ipfs-core-types/src/utils.js').ImportCandidate}
+ */
+function toImportCandidate(path, blob) {
+  /** @type {AsyncIterable} */
+  let stream;
+  return {
+    path,
+    get content() {
+      stream = stream || blob.stream();
+      return stream
+    },
+  }
 }
 
 exports.Token = token;
@@ -145372,391 +276652,391 @@ function _interopNamespace(e) {
 var Block__namespace = /*#__PURE__*/_interopNamespace(Block);
 var dagCbor__namespace = /*#__PURE__*/_interopNamespace(dagCbor);
 
-/**
- * @typedef {import('./gateway.js').GatewayURLOptions} EmbedOptions
- * @typedef {import('./lib/interface.js').TokenInput} TokenInput
- * @typedef {import('ipfs-car/blockstore').Blockstore} Blockstore
- */
-
-/**
- * @template T
- * @typedef {import('./lib/interface.js').Encoded} EncodedBlobUrl
- */
-
-/**
- * @template G
- * @typedef {import('./lib/interface.js').Encoded} EncodedBlobBlob
- */
-
-/**
- * @template {import('./lib/interface.js').TokenInput} T
- * @typedef {import('./lib/interface.js').Token} TokenType
- */
-
-/**
- * @template {TokenInput} T
- * @implements {TokenType}
- */
-class Token {
-  /**
-   * @param {import('./lib/interface.js').CIDString} ipnft
-   * @param {import('./lib/interface.js').EncodedURL} url
-   * @param {import('./lib/interface.js').Encoded} data
-   */
-  constructor(ipnft, url, data) {
-    /** @readonly */
-    this.ipnft = ipnft;
-    /** @readonly */
-    this.url = url;
-    /** @readonly */
-    this.data = data;
-
-    Object.defineProperties(this, {
-      ipnft: { enumerable: true, writable: false },
-      url: { enumerable: true, writable: false },
-      data: { enumerable: false, writable: false },
-    });
-  }
-  /**
-   * @returns {import('./lib/interface.js').Encoded}
-   */
-  embed() {
-    return Token.embed(this)
-  }
-
-  /**
-   * @template {TokenInput} T
-   * @param {{data: import('./lib/interface.js').Encoded}} token
-   * @returns {import('./lib/interface.js').Encoded}
-   */
-  static embed({ data }) {
-    return embed(data, { gateway: gateway.GATEWAY })
-  }
-
-  /**
-   * Takes token input, encodes it as a DAG, wraps it in a CAR and creates a new
-   * Token instance from it. Where values are discovered `Blob` (or `File`)
-   * objects in the given input, they are replaced with IPFS URLs (an `ipfs://`
-   * prefixed CID with an optional path).
-   *
-   * @example
-   * ```js
-   * const cat = new File(['...'], 'cat.png')
-   * const kitty = new File(['...'], 'kitty.png')
-   * const { token, car } = await Token.encode({
-   *   name: 'hello'
-   *   image: cat
-   *   properties: {
-   *     extra: {
-   *       image: kitty
-   *     }
-   *   }
-   * })
-   * ```
-   *
-   * @template {TokenInput} T
-   * @param {T} input
-   * @returns {Promise<{ cid: CID, token: TokenType, car: AsyncIterable }>}
-   */
-  static async encode(input) {
-    const blockstore = new fs.FsBlockStore();
-    const [blobs, meta] = mapTokenInputBlobs(input);
-    /** @type {EncodedBlobUrl} */
-    const data = JSON.parse(JSON.stringify(meta));
-    /** @type {import('./lib/interface.js').Encoded} */
-    const dag = JSON.parse(JSON.stringify(meta));
-
-    for (const [dotPath, blob] of blobs.entries()) {
-      /** @type {string|undefined} */
-      // @ts-ignore blob may be a File!
-      const name = blob.name || 'blob';
-      /** @type {import('./platform.js').ReadableStream} */
-      const content = blob.stream();
-      const { root: cid } = await pack.pack({
-        input: [{ path: name, content }],
-        blockstore,
-        wrapWithDirectory: true,
-      });
-
-      const href = new URL(`ipfs://${cid}/${name}`);
-      const path = dotPath.split('.');
-      setIn(data, path, href);
-      setIn(dag, path, cid);
-    }
-
-    const { root: metadataJsonCid, out } = await pack.pack({
-      input: [{ path: 'metadata.json', content: JSON.stringify(data) }],
-      blockstore,
-      wrapWithDirectory: false,
-    });
-
-    const block = await Block__namespace.encode({
-      value: {
-        ...dag,
-        'metadata.json': metadataJsonCid,
-        type: 'nft',
-      },
-      codec: dagCbor__namespace,
-      hasher: sha2.sha256,
-    });
-    await blockstore.put(block.cid, block.bytes);
-
-    return {
-      cid: block.cid,
-      token: new Token(
-        block.cid.toString(),
-        `ipfs://${block.cid}/metadata.json`,
-        data
-      ),
-      car: out
-    }
-  }
-}
-
-/**
- * @template T
- * @param {EncodedBlobUrl} input
- * @param {EmbedOptions} options
- * @returns {EncodedBlobUrl}
- */
-const embed = (input, options) =>
-  mapWith(input, isURL, embedURL, options);
-
-/**
- * @template {TokenInput} T
- * @param {import('./lib/interface.js').EncodedToken} value
- * @param {Set} paths - Paths were to expect EncodedURLs
- * @returns {Token}
- */
-const decode = ({ ipnft, url, data }, paths) =>
-  new Token(ipnft, url, mapWith(data, isEncodedURL, decodeURL, paths));
-
-/**
- * @param {any} value
- * @returns {value is URL}
- */
-const isURL = (value) => value instanceof URL;
-
-/**
- * @template State
- * @param {State} state
- * @param {import('./lib/interface.js').EncodedURL} url
- * @returns {[State, URL]}
- */
-const decodeURL = (state, url) => [state, new URL(url)];
-
-/**
- * @param {EmbedOptions} context
- * @param {URL} url
- * @returns {[EmbedOptions, URL]}
- */
-const embedURL = (context, url) => [context, gateway.toGatewayURL(url, context)];
-
-/**
- * @param {any} value
- * @returns {value is object}
- */
-const isObject = (value) => typeof value === 'object' && value != null;
-
-/**
- * @param {any} value
- * @param {Set} assetPaths
- * @param {PropertyKey[]} path
- * @returns {value is import('./lib/interface.js').EncodedURL}
- */
-const isEncodedURL = (value, assetPaths, path) =>
-  typeof value === 'string' && assetPaths.has(path.join('.'));
-
-/**
- * Takes token input and encodes it into
- * [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
- * object where form field values are discovered `Blob` (or `File`) objects in
- * the given token and field keys are `.` joined paths where they were discoverd
- * in the token. Additionally encoded `FormData` will also have a field
- * named `meta` containing JSON serialized token with blobs and file values
- * `null` set to null (this allows backend to injest all of the files from
- * `multipart/form-data` request and update provided "meta" data with
- * corresponding file ipfs:// URLs)
- *
- * @example
- * ```js
- * const cat = new File([], 'cat.png')
- * const kitty = new File([], 'kitty.png')
- * const form = encode({
- *   name: 'hello'
- *   image: cat
- *   properties: {
- *     extra: {
- *       image: kitty
- *     }
- *   }
- * })
- * [...form.entries()] //>
- * // [
- * //   ['image', cat],
- * //   ['properties.extra.image', kitty],
- * //   ['meta', '{"name":"hello",image:null,"properties":{"extra":{"kitty": null}}}']
- * // ]
- * ```
- *
- * @template {TokenInput} T
- * @param {EncodedBlobBlob} input
- * @returns {FormData}
- */
-const encode = (input) => {
-  const [map, meta] = mapValueWith(input, isBlob, encodeBlob, new Map(), []);
-  const form = new formData.FormData();
-  for (const [k, v] of map.entries()) {
-    form.set(k, v);
-  }
-  form.set('meta', JSON.stringify(meta));
-  return form
-};
-
-/**
- * @param {Map} data
- * @param {Blob} blob
- * @param {PropertyKey[]} path
- * @returns {[Map, void]}
- */
-const encodeBlob = (data, blob, path) => {
-  data.set(path.join('.'), blob);
-  return [data, undefined]
-};
-
-/**
- * @param {any} value
- * @returns {value is Blob}
- */
-const isBlob = (value) => value instanceof file.Blob;
-
-/**
- * @template {TokenInput} T
- * @param {EncodedBlobBlob} input
- */
-const mapTokenInputBlobs = (input) => {
-  return mapValueWith(input, isBlob, encodeBlob, new Map(), [])
-};
-
-/**
- * Substitues values in the given `input` that match `p(value) == true` with
- * `f(value, context, path)` where `context` is whatever you pass (usually
- * a mutable state) and `path` is a array of keys / indexes where the value
- * was encountered.
- *
- * @template T, I, X, O, State
- * @param {import('./lib/interface.js').Encoded} input - Arbitrary input.
- * @param {(input:any, state:State, path:PropertyKey[]) => input is X} p - Predicate function to determine
- * which values to swap.
- * @param {(state:State, input:X, path:PropertyKey[]) => [State, O]} f - Function
- * that swaps matching values.
- * @param {State} state - Some additional context you need in the process.
- * likey you'll start with `[]`.
- * @returns {import('./lib/interface.js').Encoded}
- */
-const mapWith = (input, p, f, state) => {
-  const [, output] = mapValueWith(input, p, f, state, []);
-  return output
-};
-
-/**
- * @template T, I, X, O, State
- * @param {import('./lib/interface.js').Encoded} input - Arbitrary input.
- * @param {(input:any, state:State, path:PropertyKey[]) => input is X} p - Predicate function to determine
- * which values to swap.
- * @param {(state:State, input:X, path:PropertyKey[]) => [State, O]} f - Function
- * that swaps matching values.
- * @param {State} state - Some additional context you need in the process.
- * @param {PropertyKey[]} path - Path where the value was encountered. Most
- * likey you'll start with `[]`.
- * @returns {[State, import('./lib/interface.js').Encoded]}
- */
-const mapValueWith = (input, p, f, state, path) =>
-  p(input, state, path)
-    ? f(state, input, path)
-    : Array.isArray(input)
-    ? mapArrayWith(input, p, f, state, path)
-    : isObject(input)
-    ? mapObjectWith(input, p, f, state, path)
-    : [state, /** @type {any} */ (input)];
-
-/**
- * Just like `mapWith` except
- *
- * @template State, T, I, X, O
- * @param {import('./lib/interface.js').Encoded} input
- * @param {(input:any, state:State, path:PropertyKey[]) => input is X} p
- * @param {(state: State, input:X, path:PropertyKey[]) => [State, O]} f
- * @param {State} init
- * @param {PropertyKey[]} path
- * @returns {[State, import('./lib/interface.js').Encoded]}
- */
-const mapObjectWith = (input, p, f, init, path) => {
-  let state = init;
-  const output =
-    /** @type {import('./lib/interface.js').Encoded} */ ({});
-  for (const [key, value] of Object.entries(input)) {
-    const [next, out] = mapValueWith(value, p, f, state, [...path, key]);
-    // @ts-ignore
-    output[key] = out;
-    state = next;
-  }
-  return [state, output]
-};
-
-/**
- * Just like `mapWith` except for Arrays.
- *
- * @template I, X, O, State
- * @template {any[]} T
- * @param {T} input
- * @param {(input:any, state:State, path:PropertyKey[]) => input is X} p
- * @param {(state: State, input:X, path:PropertyKey[]) => [State, O]} f
- * @param {State} init
- * @param {PropertyKey[]} path
- * @returns {[State, import('./lib/interface.js').Encoded]}
- */
-const mapArrayWith = (input, p, f, init, path) => {
-  const output = /** @type {unknown[]} */ ([]);
-
-  let state = init;
-  for (const [index, element] of input.entries()) {
-    const [next, out] = mapValueWith(element, p, f, state, [...path, index]);
-    output[index] = out;
-    state = next;
-  }
-
-  return [
-    state,
-    /** @type {import('./lib/interface.js').Encoded} */ (output),
-  ]
-};
-
-/**
- * Sets a given `value` at the given `path` on a passed `object`.
- *
- * @example
- * ```js
- * const obj = { a: { b: { c: 1 }}}
- * setIn(obj, ['a', 'b', 'c'], 5)
- * obj.a.b.c //> 5
- * ```
- *
- * @template V
- * @param {any} object
- * @param {string[]} path
- * @param {V} value
- */
-const setIn = (object, path, value) => {
-  const n = path.length - 1;
-  let target = object;
-  for (let [index, key] of path.entries()) {
-    if (index === n) {
-      target[key] = value;
-    } else {
-      target = target[key];
-    }
-  }
+/**
+ * @typedef {import('./gateway.js').GatewayURLOptions} EmbedOptions
+ * @typedef {import('./lib/interface.js').TokenInput} TokenInput
+ * @typedef {import('ipfs-car/blockstore').Blockstore} Blockstore
+ */
+
+/**
+ * @template T
+ * @typedef {import('./lib/interface.js').Encoded} EncodedBlobUrl
+ */
+
+/**
+ * @template G
+ * @typedef {import('./lib/interface.js').Encoded} EncodedBlobBlob
+ */
+
+/**
+ * @template {import('./lib/interface.js').TokenInput} T
+ * @typedef {import('./lib/interface.js').Token} TokenType
+ */
+
+/**
+ * @template {TokenInput} T
+ * @implements {TokenType}
+ */
+class Token {
+  /**
+   * @param {import('./lib/interface.js').CIDString} ipnft
+   * @param {import('./lib/interface.js').EncodedURL} url
+   * @param {import('./lib/interface.js').Encoded} data
+   */
+  constructor(ipnft, url, data) {
+    /** @readonly */
+    this.ipnft = ipnft;
+    /** @readonly */
+    this.url = url;
+    /** @readonly */
+    this.data = data;
+
+    Object.defineProperties(this, {
+      ipnft: { enumerable: true, writable: false },
+      url: { enumerable: true, writable: false },
+      data: { enumerable: false, writable: false },
+    });
+  }
+  /**
+   * @returns {import('./lib/interface.js').Encoded}
+   */
+  embed() {
+    return Token.embed(this)
+  }
+
+  /**
+   * @template {TokenInput} T
+   * @param {{data: import('./lib/interface.js').Encoded}} token
+   * @returns {import('./lib/interface.js').Encoded}
+   */
+  static embed({ data }) {
+    return embed(data, { gateway: gateway.GATEWAY })
+  }
+
+  /**
+   * Takes token input, encodes it as a DAG, wraps it in a CAR and creates a new
+   * Token instance from it. Where values are discovered `Blob` (or `File`)
+   * objects in the given input, they are replaced with IPFS URLs (an `ipfs://`
+   * prefixed CID with an optional path).
+   *
+   * @example
+   * ```js
+   * const cat = new File(['...'], 'cat.png')
+   * const kitty = new File(['...'], 'kitty.png')
+   * const { token, car } = await Token.encode({
+   *   name: 'hello'
+   *   image: cat
+   *   properties: {
+   *     extra: {
+   *       image: kitty
+   *     }
+   *   }
+   * })
+   * ```
+   *
+   * @template {TokenInput} T
+   * @param {T} input
+   * @returns {Promise<{ cid: CID, token: TokenType, car: AsyncIterable }>}
+   */
+  static async encode(input) {
+    const blockstore = new fs.FsBlockStore();
+    const [blobs, meta] = mapTokenInputBlobs(input);
+    /** @type {EncodedBlobUrl} */
+    const data = JSON.parse(JSON.stringify(meta));
+    /** @type {import('./lib/interface.js').Encoded} */
+    const dag = JSON.parse(JSON.stringify(meta));
+
+    for (const [dotPath, blob] of blobs.entries()) {
+      /** @type {string|undefined} */
+      // @ts-ignore blob may be a File!
+      const name = blob.name || 'blob';
+      /** @type {import('./platform.js').ReadableStream} */
+      const content = blob.stream();
+      const { root: cid } = await pack.pack({
+        input: [{ path: name, content }],
+        blockstore,
+        wrapWithDirectory: true,
+      });
+
+      const href = new URL(`ipfs://${cid}/${name}`);
+      const path = dotPath.split('.');
+      setIn(data, path, href);
+      setIn(dag, path, cid);
+    }
+
+    const { root: metadataJsonCid, out } = await pack.pack({
+      input: [{ path: 'metadata.json', content: JSON.stringify(data) }],
+      blockstore,
+      wrapWithDirectory: false,
+    });
+
+    const block = await Block__namespace.encode({
+      value: {
+        ...dag,
+        'metadata.json': metadataJsonCid,
+        type: 'nft',
+      },
+      codec: dagCbor__namespace,
+      hasher: sha2.sha256,
+    });
+    await blockstore.put(block.cid, block.bytes);
+
+    return {
+      cid: block.cid,
+      token: new Token(
+        block.cid.toString(),
+        `ipfs://${block.cid}/metadata.json`,
+        data
+      ),
+      car: out
+    }
+  }
+}
+
+/**
+ * @template T
+ * @param {EncodedBlobUrl} input
+ * @param {EmbedOptions} options
+ * @returns {EncodedBlobUrl}
+ */
+const embed = (input, options) =>
+  mapWith(input, isURL, embedURL, options);
+
+/**
+ * @template {TokenInput} T
+ * @param {import('./lib/interface.js').EncodedToken} value
+ * @param {Set} paths - Paths were to expect EncodedURLs
+ * @returns {Token}
+ */
+const decode = ({ ipnft, url, data }, paths) =>
+  new Token(ipnft, url, mapWith(data, isEncodedURL, decodeURL, paths));
+
+/**
+ * @param {any} value
+ * @returns {value is URL}
+ */
+const isURL = (value) => value instanceof URL;
+
+/**
+ * @template State
+ * @param {State} state
+ * @param {import('./lib/interface.js').EncodedURL} url
+ * @returns {[State, URL]}
+ */
+const decodeURL = (state, url) => [state, new URL(url)];
+
+/**
+ * @param {EmbedOptions} context
+ * @param {URL} url
+ * @returns {[EmbedOptions, URL]}
+ */
+const embedURL = (context, url) => [context, gateway.toGatewayURL(url, context)];
+
+/**
+ * @param {any} value
+ * @returns {value is object}
+ */
+const isObject = (value) => typeof value === 'object' && value != null;
+
+/**
+ * @param {any} value
+ * @param {Set} assetPaths
+ * @param {PropertyKey[]} path
+ * @returns {value is import('./lib/interface.js').EncodedURL}
+ */
+const isEncodedURL = (value, assetPaths, path) =>
+  typeof value === 'string' && assetPaths.has(path.join('.'));
+
+/**
+ * Takes token input and encodes it into
+ * [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
+ * object where form field values are discovered `Blob` (or `File`) objects in
+ * the given token and field keys are `.` joined paths where they were discoverd
+ * in the token. Additionally encoded `FormData` will also have a field
+ * named `meta` containing JSON serialized token with blobs and file values
+ * `null` set to null (this allows backend to injest all of the files from
+ * `multipart/form-data` request and update provided "meta" data with
+ * corresponding file ipfs:// URLs)
+ *
+ * @example
+ * ```js
+ * const cat = new File([], 'cat.png')
+ * const kitty = new File([], 'kitty.png')
+ * const form = encode({
+ *   name: 'hello'
+ *   image: cat
+ *   properties: {
+ *     extra: {
+ *       image: kitty
+ *     }
+ *   }
+ * })
+ * [...form.entries()] //>
+ * // [
+ * //   ['image', cat],
+ * //   ['properties.extra.image', kitty],
+ * //   ['meta', '{"name":"hello",image:null,"properties":{"extra":{"kitty": null}}}']
+ * // ]
+ * ```
+ *
+ * @template {TokenInput} T
+ * @param {EncodedBlobBlob} input
+ * @returns {FormData}
+ */
+const encode = (input) => {
+  const [map, meta] = mapValueWith(input, isBlob, encodeBlob, new Map(), []);
+  const form = new formData.FormData();
+  for (const [k, v] of map.entries()) {
+    form.set(k, v);
+  }
+  form.set('meta', JSON.stringify(meta));
+  return form
+};
+
+/**
+ * @param {Map} data
+ * @param {Blob} blob
+ * @param {PropertyKey[]} path
+ * @returns {[Map, void]}
+ */
+const encodeBlob = (data, blob, path) => {
+  data.set(path.join('.'), blob);
+  return [data, undefined]
+};
+
+/**
+ * @param {any} value
+ * @returns {value is Blob}
+ */
+const isBlob = (value) => value instanceof file.Blob;
+
+/**
+ * @template {TokenInput} T
+ * @param {EncodedBlobBlob} input
+ */
+const mapTokenInputBlobs = (input) => {
+  return mapValueWith(input, isBlob, encodeBlob, new Map(), [])
+};
+
+/**
+ * Substitues values in the given `input` that match `p(value) == true` with
+ * `f(value, context, path)` where `context` is whatever you pass (usually
+ * a mutable state) and `path` is a array of keys / indexes where the value
+ * was encountered.
+ *
+ * @template T, I, X, O, State
+ * @param {import('./lib/interface.js').Encoded} input - Arbitrary input.
+ * @param {(input:any, state:State, path:PropertyKey[]) => input is X} p - Predicate function to determine
+ * which values to swap.
+ * @param {(state:State, input:X, path:PropertyKey[]) => [State, O]} f - Function
+ * that swaps matching values.
+ * @param {State} state - Some additional context you need in the process.
+ * likey you'll start with `[]`.
+ * @returns {import('./lib/interface.js').Encoded}
+ */
+const mapWith = (input, p, f, state) => {
+  const [, output] = mapValueWith(input, p, f, state, []);
+  return output
+};
+
+/**
+ * @template T, I, X, O, State
+ * @param {import('./lib/interface.js').Encoded} input - Arbitrary input.
+ * @param {(input:any, state:State, path:PropertyKey[]) => input is X} p - Predicate function to determine
+ * which values to swap.
+ * @param {(state:State, input:X, path:PropertyKey[]) => [State, O]} f - Function
+ * that swaps matching values.
+ * @param {State} state - Some additional context you need in the process.
+ * @param {PropertyKey[]} path - Path where the value was encountered. Most
+ * likey you'll start with `[]`.
+ * @returns {[State, import('./lib/interface.js').Encoded]}
+ */
+const mapValueWith = (input, p, f, state, path) =>
+  p(input, state, path)
+    ? f(state, input, path)
+    : Array.isArray(input)
+    ? mapArrayWith(input, p, f, state, path)
+    : isObject(input)
+    ? mapObjectWith(input, p, f, state, path)
+    : [state, /** @type {any} */ (input)];
+
+/**
+ * Just like `mapWith` except
+ *
+ * @template State, T, I, X, O
+ * @param {import('./lib/interface.js').Encoded} input
+ * @param {(input:any, state:State, path:PropertyKey[]) => input is X} p
+ * @param {(state: State, input:X, path:PropertyKey[]) => [State, O]} f
+ * @param {State} init
+ * @param {PropertyKey[]} path
+ * @returns {[State, import('./lib/interface.js').Encoded]}
+ */
+const mapObjectWith = (input, p, f, init, path) => {
+  let state = init;
+  const output =
+    /** @type {import('./lib/interface.js').Encoded} */ ({});
+  for (const [key, value] of Object.entries(input)) {
+    const [next, out] = mapValueWith(value, p, f, state, [...path, key]);
+    // @ts-ignore
+    output[key] = out;
+    state = next;
+  }
+  return [state, output]
+};
+
+/**
+ * Just like `mapWith` except for Arrays.
+ *
+ * @template I, X, O, State
+ * @template {any[]} T
+ * @param {T} input
+ * @param {(input:any, state:State, path:PropertyKey[]) => input is X} p
+ * @param {(state: State, input:X, path:PropertyKey[]) => [State, O]} f
+ * @param {State} init
+ * @param {PropertyKey[]} path
+ * @returns {[State, import('./lib/interface.js').Encoded]}
+ */
+const mapArrayWith = (input, p, f, init, path) => {
+  const output = /** @type {unknown[]} */ ([]);
+
+  let state = init;
+  for (const [index, element] of input.entries()) {
+    const [next, out] = mapValueWith(element, p, f, state, [...path, index]);
+    output[index] = out;
+    state = next;
+  }
+
+  return [
+    state,
+    /** @type {import('./lib/interface.js').Encoded} */ (output),
+  ]
+};
+
+/**
+ * Sets a given `value` at the given `path` on a passed `object`.
+ *
+ * @example
+ * ```js
+ * const obj = { a: { b: { c: 1 }}}
+ * setIn(obj, ['a', 'b', 'c'], 5)
+ * obj.a.b.c //> 5
+ * ```
+ *
+ * @template V
+ * @param {any} object
+ * @param {string[]} path
+ * @param {V} value
+ */
+const setIn = (object, path, value) => {
+  const n = path.length - 1;
+  let target = object;
+  for (let [index, key] of path.entries()) {
+    if (index === n) {
+      target[key] = value;
+    } else {
+      target = target[key];
+    }
+  }
 };
 
 exports.Token = Token;
@@ -148674,6 +279954,7 @@ module.exports = { nanoid, customAlphabet, customRandom, urlAlphabet, random }
 let urlAlphabet =
   'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
 module.exports = { urlAlphabet }
+>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05
 
 
 /***/ }),
@@ -148681,31 +279962,34 @@ module.exports = { urlAlphabet }
 /***/ 50677:
 /***/ ((module) => {
 
-"use strict";
-module.exports = JSON.parse('{"name":"@aws-sdk/client-s3","description":"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native","version":"3.154.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:docs":"typedoc","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","test":"yarn test:unit","test:e2e":"ts-mocha test/**/*.ispec.ts && karma start karma.conf.js","test:unit":"ts-mocha test/**/*.spec.ts"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha1-browser":"2.0.0","@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/client-sts":"3.154.0","@aws-sdk/config-resolver":"3.130.0","@aws-sdk/credential-provider-node":"3.154.0","@aws-sdk/eventstream-serde-browser":"3.127.0","@aws-sdk/eventstream-serde-config-resolver":"3.127.0","@aws-sdk/eventstream-serde-node":"3.127.0","@aws-sdk/fetch-http-handler":"3.131.0","@aws-sdk/hash-blob-browser":"3.127.0","@aws-sdk/hash-node":"3.127.0","@aws-sdk/hash-stream-node":"3.127.0","@aws-sdk/invalid-dependency":"3.127.0","@aws-sdk/md5-js":"3.127.0","@aws-sdk/middleware-bucket-endpoint":"3.127.0","@aws-sdk/middleware-content-length":"3.127.0","@aws-sdk/middleware-expect-continue":"3.127.0","@aws-sdk/middleware-flexible-checksums":"3.127.0","@aws-sdk/middleware-host-header":"3.127.0","@aws-sdk/middleware-location-constraint":"3.127.0","@aws-sdk/middleware-logger":"3.127.0","@aws-sdk/middleware-recursion-detection":"3.127.0","@aws-sdk/middleware-retry":"3.127.0","@aws-sdk/middleware-sdk-s3":"3.127.0","@aws-sdk/middleware-serde":"3.127.0","@aws-sdk/middleware-signing":"3.130.0","@aws-sdk/middleware-ssec":"3.127.0","@aws-sdk/middleware-stack":"3.127.0","@aws-sdk/middleware-user-agent":"3.127.0","@aws-sdk/node-config-provider":"3.127.0","@aws-sdk/node-http-handler":"3.127.0","@aws-sdk/protocol-http":"3.127.0","@aws-sdk/signature-v4-multi-region":"3.130.0","@aws-sdk/smithy-client":"3.142.0","@aws-sdk/types":"3.127.0","@aws-sdk/url-parser":"3.127.0","@aws-sdk/util-base64-browser":"3.109.0","@aws-sdk/util-base64-node":"3.55.0","@aws-sdk/util-body-length-browser":"3.154.0","@aws-sdk/util-body-length-node":"3.55.0","@aws-sdk/util-defaults-mode-browser":"3.142.0","@aws-sdk/util-defaults-mode-node":"3.142.0","@aws-sdk/util-stream-browser":"3.131.0","@aws-sdk/util-stream-node":"3.129.0","@aws-sdk/util-user-agent-browser":"3.127.0","@aws-sdk/util-user-agent-node":"3.127.0","@aws-sdk/util-utf8-browser":"3.109.0","@aws-sdk/util-utf8-node":"3.109.0","@aws-sdk/util-waiter":"3.127.0","@aws-sdk/xml-builder":"3.142.0","entities":"2.2.0","fast-xml-parser":"3.19.0","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.58.0","@tsconfig/recommended":"1.0.1","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^12.7.5","concurrently":"7.0.0","downlevel-dts":"0.7.0","rimraf":"3.0.2","typedoc":"0.19.2","typescript":"~4.6.2"},"overrides":{"typedoc":{"typescript":"~4.6.2"}},"engines":{"node":">=12.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-s3"}}');
+module.exports = JSON.parse('{"name":"@aws-sdk/client-s3","description":"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native","version":"3.478.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3","test":"yarn test:unit","test:e2e":"yarn test:e2e:node && yarn test:e2e:browser","test:e2e:browser":"ts-mocha test/**/*.browser.ispec.ts && karma start karma.conf.js","test:e2e:node":"jest --c jest.config.e2e.js","test:unit":"ts-mocha test/unit/**/*.spec.ts"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha1-browser":"3.0.0","@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/client-sts":"3.478.0","@aws-sdk/core":"3.477.0","@aws-sdk/credential-provider-node":"3.478.0","@aws-sdk/middleware-bucket-endpoint":"3.470.0","@aws-sdk/middleware-expect-continue":"3.468.0","@aws-sdk/middleware-flexible-checksums":"3.468.0","@aws-sdk/middleware-host-header":"3.468.0","@aws-sdk/middleware-location-constraint":"3.468.0","@aws-sdk/middleware-logger":"3.468.0","@aws-sdk/middleware-recursion-detection":"3.468.0","@aws-sdk/middleware-sdk-s3":"3.474.0","@aws-sdk/middleware-signing":"3.468.0","@aws-sdk/middleware-ssec":"3.468.0","@aws-sdk/middleware-user-agent":"3.478.0","@aws-sdk/region-config-resolver":"3.470.0","@aws-sdk/signature-v4-multi-region":"3.474.0","@aws-sdk/types":"3.468.0","@aws-sdk/util-endpoints":"3.478.0","@aws-sdk/util-user-agent-browser":"3.468.0","@aws-sdk/util-user-agent-node":"3.470.0","@aws-sdk/xml-builder":"3.472.0","@smithy/config-resolver":"^2.0.21","@smithy/core":"^1.2.0","@smithy/eventstream-serde-browser":"^2.0.15","@smithy/eventstream-serde-config-resolver":"^2.0.15","@smithy/eventstream-serde-node":"^2.0.15","@smithy/fetch-http-handler":"^2.3.1","@smithy/hash-blob-browser":"^2.0.16","@smithy/hash-node":"^2.0.17","@smithy/hash-stream-node":"^2.0.17","@smithy/invalid-dependency":"^2.0.15","@smithy/md5-js":"^2.0.17","@smithy/middleware-content-length":"^2.0.17","@smithy/middleware-endpoint":"^2.2.3","@smithy/middleware-retry":"^2.0.24","@smithy/middleware-serde":"^2.0.15","@smithy/middleware-stack":"^2.0.9","@smithy/node-config-provider":"^2.1.8","@smithy/node-http-handler":"^2.2.1","@smithy/protocol-http":"^3.0.11","@smithy/smithy-client":"^2.1.18","@smithy/types":"^2.7.0","@smithy/url-parser":"^2.0.15","@smithy/util-base64":"^2.0.1","@smithy/util-body-length-browser":"^2.0.1","@smithy/util-body-length-node":"^2.1.0","@smithy/util-defaults-mode-browser":"^2.0.22","@smithy/util-defaults-mode-node":"^2.0.29","@smithy/util-endpoints":"^1.0.7","@smithy/util-retry":"^2.0.8","@smithy/util-stream":"^2.0.23","@smithy/util-utf8":"^2.0.2","@smithy/util-waiter":"^2.0.15","fast-xml-parser":"4.2.5","tslib":"^2.5.0"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.0.0","@tsconfig/node14":"1.0.3","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-s3"}}');
 
 /***/ }),
 
 /***/ 91092:
 /***/ ((module) => {
 
-"use strict";
-module.exports = JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.154.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:docs":"typedoc","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/config-resolver":"3.130.0","@aws-sdk/fetch-http-handler":"3.131.0","@aws-sdk/hash-node":"3.127.0","@aws-sdk/invalid-dependency":"3.127.0","@aws-sdk/middleware-content-length":"3.127.0","@aws-sdk/middleware-host-header":"3.127.0","@aws-sdk/middleware-logger":"3.127.0","@aws-sdk/middleware-recursion-detection":"3.127.0","@aws-sdk/middleware-retry":"3.127.0","@aws-sdk/middleware-serde":"3.127.0","@aws-sdk/middleware-stack":"3.127.0","@aws-sdk/middleware-user-agent":"3.127.0","@aws-sdk/node-config-provider":"3.127.0","@aws-sdk/node-http-handler":"3.127.0","@aws-sdk/protocol-http":"3.127.0","@aws-sdk/smithy-client":"3.142.0","@aws-sdk/types":"3.127.0","@aws-sdk/url-parser":"3.127.0","@aws-sdk/util-base64-browser":"3.109.0","@aws-sdk/util-base64-node":"3.55.0","@aws-sdk/util-body-length-browser":"3.154.0","@aws-sdk/util-body-length-node":"3.55.0","@aws-sdk/util-defaults-mode-browser":"3.142.0","@aws-sdk/util-defaults-mode-node":"3.142.0","@aws-sdk/util-user-agent-browser":"3.127.0","@aws-sdk/util-user-agent-node":"3.127.0","@aws-sdk/util-utf8-browser":"3.109.0","@aws-sdk/util-utf8-node":"3.109.0","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.58.0","@tsconfig/recommended":"1.0.1","@types/node":"^12.7.5","concurrently":"7.0.0","downlevel-dts":"0.7.0","rimraf":"3.0.2","typedoc":"0.19.2","typescript":"~4.6.2"},"overrides":{"typedoc":{"typescript":"~4.6.2"}},"engines":{"node":">=12.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
+module.exports = JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.478.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/core":"3.477.0","@aws-sdk/middleware-host-header":"3.468.0","@aws-sdk/middleware-logger":"3.468.0","@aws-sdk/middleware-recursion-detection":"3.468.0","@aws-sdk/middleware-user-agent":"3.478.0","@aws-sdk/region-config-resolver":"3.470.0","@aws-sdk/types":"3.468.0","@aws-sdk/util-endpoints":"3.478.0","@aws-sdk/util-user-agent-browser":"3.468.0","@aws-sdk/util-user-agent-node":"3.470.0","@smithy/config-resolver":"^2.0.21","@smithy/core":"^1.2.0","@smithy/fetch-http-handler":"^2.3.1","@smithy/hash-node":"^2.0.17","@smithy/invalid-dependency":"^2.0.15","@smithy/middleware-content-length":"^2.0.17","@smithy/middleware-endpoint":"^2.2.3","@smithy/middleware-retry":"^2.0.24","@smithy/middleware-serde":"^2.0.15","@smithy/middleware-stack":"^2.0.9","@smithy/node-config-provider":"^2.1.8","@smithy/node-http-handler":"^2.2.1","@smithy/protocol-http":"^3.0.11","@smithy/smithy-client":"^2.1.18","@smithy/types":"^2.7.0","@smithy/url-parser":"^2.0.15","@smithy/util-base64":"^2.0.1","@smithy/util-body-length-browser":"^2.0.1","@smithy/util-body-length-node":"^2.1.0","@smithy/util-defaults-mode-browser":"^2.0.22","@smithy/util-defaults-mode-node":"^2.0.29","@smithy/util-endpoints":"^1.0.7","@smithy/util-retry":"^2.0.8","@smithy/util-utf8":"^2.0.2","tslib":"^2.5.0"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.0.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}');
 
 /***/ }),
 
 /***/ 7947:
 /***/ ((module) => {
 
-"use strict";
-module.exports = JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.154.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:docs":"typedoc","build:es":"tsc -p tsconfig.es.json","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"2.0.0","@aws-crypto/sha256-js":"2.0.0","@aws-sdk/config-resolver":"3.130.0","@aws-sdk/credential-provider-node":"3.154.0","@aws-sdk/fetch-http-handler":"3.131.0","@aws-sdk/hash-node":"3.127.0","@aws-sdk/invalid-dependency":"3.127.0","@aws-sdk/middleware-content-length":"3.127.0","@aws-sdk/middleware-host-header":"3.127.0","@aws-sdk/middleware-logger":"3.127.0","@aws-sdk/middleware-recursion-detection":"3.127.0","@aws-sdk/middleware-retry":"3.127.0","@aws-sdk/middleware-sdk-sts":"3.130.0","@aws-sdk/middleware-serde":"3.127.0","@aws-sdk/middleware-signing":"3.130.0","@aws-sdk/middleware-stack":"3.127.0","@aws-sdk/middleware-user-agent":"3.127.0","@aws-sdk/node-config-provider":"3.127.0","@aws-sdk/node-http-handler":"3.127.0","@aws-sdk/protocol-http":"3.127.0","@aws-sdk/smithy-client":"3.142.0","@aws-sdk/types":"3.127.0","@aws-sdk/url-parser":"3.127.0","@aws-sdk/util-base64-browser":"3.109.0","@aws-sdk/util-base64-node":"3.55.0","@aws-sdk/util-body-length-browser":"3.154.0","@aws-sdk/util-body-length-node":"3.55.0","@aws-sdk/util-defaults-mode-browser":"3.142.0","@aws-sdk/util-defaults-mode-node":"3.142.0","@aws-sdk/util-user-agent-browser":"3.127.0","@aws-sdk/util-user-agent-node":"3.127.0","@aws-sdk/util-utf8-browser":"3.109.0","@aws-sdk/util-utf8-node":"3.109.0","entities":"2.2.0","fast-xml-parser":"3.19.0","tslib":"^2.3.1"},"devDependencies":{"@aws-sdk/service-client-documentation-generator":"3.58.0","@tsconfig/recommended":"1.0.1","@types/node":"^12.7.5","concurrently":"7.0.0","downlevel-dts":"0.7.0","rimraf":"3.0.2","typedoc":"0.19.2","typescript":"~4.6.2"},"overrides":{"typedoc":{"typescript":"~4.6.2"}},"engines":{"node":">=12.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}');
+module.exports = JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.478.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"tsc -p tsconfig.cjs.json","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts","test":"yarn test:unit","test:unit":"jest"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"3.0.0","@aws-crypto/sha256-js":"3.0.0","@aws-sdk/core":"3.477.0","@aws-sdk/credential-provider-node":"3.478.0","@aws-sdk/middleware-host-header":"3.468.0","@aws-sdk/middleware-logger":"3.468.0","@aws-sdk/middleware-recursion-detection":"3.468.0","@aws-sdk/middleware-user-agent":"3.478.0","@aws-sdk/region-config-resolver":"3.470.0","@aws-sdk/types":"3.468.0","@aws-sdk/util-endpoints":"3.478.0","@aws-sdk/util-user-agent-browser":"3.468.0","@aws-sdk/util-user-agent-node":"3.470.0","@smithy/config-resolver":"^2.0.21","@smithy/core":"^1.2.0","@smithy/fetch-http-handler":"^2.3.1","@smithy/hash-node":"^2.0.17","@smithy/invalid-dependency":"^2.0.15","@smithy/middleware-content-length":"^2.0.17","@smithy/middleware-endpoint":"^2.2.3","@smithy/middleware-retry":"^2.0.24","@smithy/middleware-serde":"^2.0.15","@smithy/middleware-stack":"^2.0.9","@smithy/node-config-provider":"^2.1.8","@smithy/node-http-handler":"^2.2.1","@smithy/protocol-http":"^3.0.11","@smithy/smithy-client":"^2.1.18","@smithy/types":"^2.7.0","@smithy/url-parser":"^2.0.15","@smithy/util-base64":"^2.0.1","@smithy/util-body-length-browser":"^2.0.1","@smithy/util-body-length-node":"^2.1.0","@smithy/util-defaults-mode-browser":"^2.0.22","@smithy/util-defaults-mode-node":"^2.0.29","@smithy/util-endpoints":"^1.0.7","@smithy/util-middleware":"^2.0.8","@smithy/util-retry":"^2.0.8","@smithy/util-utf8":"^2.0.2","fast-xml-parser":"4.2.5","tslib":"^2.5.0"},"devDependencies":{"@smithy/service-client-documentation-generator":"^2.0.0","@tsconfig/node14":"1.0.3","@types/node":"^14.14.31","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~4.9.5"},"engines":{"node":">=14.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}');
+
+/***/ }),
+
+/***/ 95367:
+/***/ ((module) => {
+
+module.exports = JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}');
 
 /***/ }),
 
 /***/ 53768:
 /***/ ((module) => {
 
-"use strict";
 module.exports = JSON.parse('[["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"],["8940","𪎩𡅅"],["8943","攊"],["8946","丽滝鵎釟"],["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],["89a1","琑糼緍楆竉刧"],["89ab","醌碸酞肼"],["89b0","贋胶𠧧"],["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],["89c1","溚舾甙"],["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],["8a40","𧶄唥"],["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],["8aac","䠋𠆩㿺塳𢶍"],["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],["8ac9","𪘁𠸉𢫏𢳉"],["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],["8ca1","𣏹椙橃𣱣泿"],["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],["8cc9","顨杫䉶圽"],["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],["8d40","𠮟"],["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],["9fae","酙隁酜"],["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],["9fc1","𤤙盖鮝个𠳔莾衂"],["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],["9fe7","毺蠘罸"],["9feb","嘠𪙊蹷齓"],["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],["a055","𡠻𦸅"],["a058","詾𢔛"],["a05b","惽癧髗鵄鍮鮏蟵"],["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],["a0a1","嵗𨯂迚𨸹"],["a0a6","僙𡵆礆匲阸𠼻䁥"],["a0ae","矾"],["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],["a3c0","␀",31,"␡"],["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],["c740","す",58,"ァアィイ"],["c7a1","ゥ",81,"А",5,"ЁЖ",4],["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],["c8a1","龰冈龱𧘇"],["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],["c8f5","ʃɐɛɔɵœøŋʊɪ"],["f9fe","■"],["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]]');
 
 /***/ }),
@@ -148713,7 +279997,6 @@ module.exports = JSON.parse('[["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕
 /***/ 94904:
 /***/ ((module) => {
 
-"use strict";
 module.exports = JSON.parse('[["0","\\u0000",127,"€"],["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],["9980","檧檨檪檭",114,"欥欦欨",6],["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],["a2a1","ⅰ",9],["a2b1","⒈",19,"⑴",19,"①",9],["a2e5","㈠",9],["a2f1","Ⅰ",11],["a3a1","!"#¥%",88," ̄"],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],["a6ee","︻︼︷︸︱"],["a6f4","︳︴"],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],["a8bd","ńň"],["a8c0","ɡ"],["a8c5","ㄅ",36],["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],["a959","℡㈱"],["a95c","‐"],["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],["a980","﹢",4,"﹨﹩﹪﹫"],["a996","〇"],["a9a4","─",75],["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],["bb40","籃",9,"籎",36,"籵",5,"籾",9],["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],["bd40","紷",54,"絯",7],["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],["be40","継",12,"綧",6,"綯",42],["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],["bf40","緻",62],["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],["c040","繞",35,"纃",23,"纜纝纞"],["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],["d440","訞",31,"訿",8,"詉",21],["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],["d540","誁",7,"誋",7,"誔",46],["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],["d640","諤",34,"謈",27],["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],["d740","譆",31,"譧",4,"譭",25],["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],["d940","貮",62],["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],["dd40","軥",62],["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],["e240","釦",62],["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],["e340","鉆",45,"鉵",16],["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],["e440","銨",5,"銯",24,"鋉",31],["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],["e540","錊",51,"錿",10],["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],["e640","鍬",34,"鎐",27],["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],["e740","鏎",7,"鏗",54],["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],["ee40","頏",62],["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],["f040","餈",4,"餎餏餑",28,"餯",26],["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],["f140","馌馎馚",10,"馦馧馩",47],["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],["f240","駺",62],["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],["f540","魼",62],["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],["f640","鯜",62],["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],["f740","鰼",62],["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],["f840","鳣",62],["f880","鴢",32],["f940","鵃",62],["f980","鶂",32],["fa40","鶣",62],["fa80","鷢",32],["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]]');
 
 /***/ }),
@@ -148721,7 +280004,6 @@ module.exports = JSON.parse('[["0","\\u0000",127,"€"],["8140","丂丄丅丆丏
 /***/ 13940:
 /***/ ((module) => {
 
-"use strict";
 module.exports = JSON.parse('[["0","\\u0000",127],["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"],["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"],["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5],["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18],["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],["8361","긝",18,"긲긳긵긶긹긻긼"],["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8],["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18],["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"],["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4],["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"],["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"],["8741","놞",9,"놩",15],["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"],["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4],["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"],["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"],["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15],["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],["8a61","둧",4,"둭",18,"뒁뒂"],["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"],["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8],["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18],["8c41","똀",15,"똒똓똕똖똗똙",4],["8c61","똞",6,"똦",5,"똭",6,"똵",5],["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],["8d41","뛃",16,"뛕",8],["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"],["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],["8e61","럂",4,"럈럊",19],["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],["8f41","뢅",7,"뢎",17],["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5],["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"],["9061","륾",5,"릆릈릋릌릏",15],["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"],["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5],["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5],["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6],["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"],["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8],["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"],["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],["9461","봞",5,"봥",6,"봭",12],["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24],["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"],["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"],["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],["9641","뺸",23,"뻒뻓"],["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],["9741","뾃",16,"뾕",8],["9761","뾞",17,"뾱",7],["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"],["9841","쁀",16,"쁒",5,"쁙쁚쁛"],["9861","쁝쁞쁟쁡",6,"쁪",15],["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"],["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"],["9a41","숤숥숦숧숪숬숮숰숳숵",16],["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"],["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8],["9b61","쌳",17,"썆",7],["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"],["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5],["9c61","쏿",8,"쐉",6,"쐑",9],["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12],["9d41","쒪",13,"쒹쒺쒻쒽",8],["9d61","쓆",25],["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"],["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"],["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"],["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"],["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"],["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],["a141","좥좦좧좩",18,"좾좿죀죁"],["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"],["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"],["a241","줐줒",5,"줙",18],["a261","줭",6,"줵",18],["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"],["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"],["a361","즑",6,"즚즜즞",16],["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"],["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"],["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],["a481","쨦쨧쨨쨪",28,"ㄱ",93],["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"],["a561","쩫",17,"쩾",5,"쪅쪆"],["a581","쪇",16,"쪙",14,"ⅰ",9],["a5b0","Ⅰ",9],["a5c1","Α",16,"Σ",6],["a5e1","α",16,"σ",6],["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"],["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6],["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7],["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],["a761","쬪",22,"쭂쭃쭄"],["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"],["a841","쭭",10,"쭺",14],["a861","쮉",18,"쮝",6],["a881","쮤",19,"쮹",11,"ÆЪĦ"],["a8a6","IJ"],["a8a8","ĿŁØŒºÞŦŊ"],["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"],["a941","쯅",14,"쯕",10],["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"],["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"],["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],["aa81","챳챴챶",29,"ぁ",82],["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"],["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"],["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25],["acd1","а",5,"ёж",25],["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"],["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],["ae41","췆",5,"췍췎췏췑",16],["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],["af41","츬츭츮츯츲츴츶",19],["af61","칊",13,"칚칛칝칞칢",5,"칪칬"],["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],["b041","캚",5,"캢캦",5,"캮",12],["b061","캻",5,"컂",19],["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"],["b161","켥",6,"켮켲",5,"켹",11],["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"],["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"],["b261","쾎",18,"쾢",5,"쾩"],["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"],["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5],["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"],["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5],["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"],["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"],["b541","킕",14,"킦킧킩킪킫킭",5],["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],["b641","턅",7,"턎",17],["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"],["b741","텮",13,"텽",6,"톅톆톇톉톊"],["b761","톋",20,"톢톣톥톦톧"],["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"],["b841","퇐",7,"퇙",17],["b861","퇫",8,"퇵퇶퇷퇹",13],["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"],["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"],["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"],["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5],["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"],["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"],["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"],["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"],["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"],["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"],["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"],["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"],["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13],["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"],["be41","퐸",7,"푁푂푃푅",14],["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"],["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],["bf41","풞",10,"풪",14],["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"],["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"],["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5],["c061","픞",25],["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"],["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],["c161","햌햍햎햏햑",19,"햦햧"],["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"],["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"],["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4],["c361","홢",4,"홨홪",5,"홲홳홵",11],["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"],["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"],["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4],["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"],["c641","힍힎힏힑",6,"힚힜힞",5],["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"],["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"],["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"],["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"],["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"],["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"],["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"],["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"],["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"],["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"],["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"],["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"],["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"],["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"],["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"],["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"],["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"],["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"],["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"],["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"],["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"],["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"],["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"],["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"],["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"],["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"],["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"],["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"],["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"],["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"],["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"],["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"],["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"],["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"],["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"],["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"],["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"],["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"],["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"],["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"],["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"],["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"],["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"],["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"],["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"],["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"],["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"],["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"],["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"],["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"],["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"],["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"],["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"],["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"],["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]]');
 
 /***/ }),
@@ -148729,7 +280011,6 @@ module.exports = JSON.parse('[["0","\\u0000",127],["8141","갂갃갅갆갋",4,"
 /***/ 7507:
 /***/ ((module) => {
 
-"use strict";
 module.exports = JSON.parse('[["0","\\u0000",127],["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],["a3a1","ㄐ",25,"˙ˉˊˇˋ"],["a3e1","€"],["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]]');
 
 /***/ }),
@@ -148737,7 +280018,6 @@ module.exports = JSON.parse('[["0","\\u0000",127],["a140"," ,、。.‧;
 /***/ 9750:
 /***/ ((module) => {
 
-"use strict";
 module.exports = JSON.parse('[["0","\\u0000",127],["8ea1","。",62],["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],["a2ba","∈∋⊆⊇⊂⊃∪∩"],["a2ca","∧∨¬⇒⇔∀∃"],["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["a2f2","ʼn♯♭♪†‡¶"],["a2fe","◯"],["a3b0","0",9],["a3c1","A",25],["a3e1","a",25],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["ada1","①",19,"Ⅰ",9],["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],["f4a1","堯槇遙瑤凜熙"],["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["fcf1","ⅰ",9,"¬¦'""],["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],["8fa2c2","¡¦¿"],["8fa2eb","ºª©®™¤№"],["8fa6e1","ΆΈΉΊΪ"],["8fa6e7","Ό"],["8fa6e9","ΎΫ"],["8fa6ec","Ώ"],["8fa6f1","άέήίϊΐόςύϋΰώ"],["8fa7c2","Ђ",10,"ЎЏ"],["8fa7f2","ђ",10,"ўџ"],["8fa9a1","ÆĐ"],["8fa9a4","Ħ"],["8fa9a6","IJ"],["8fa9a8","ŁĿ"],["8fa9ab","ŊØŒ"],["8fa9af","ŦÞ"],["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],["8fabbd","ġĥíìïîǐ"],["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]]');
 
 /***/ }),
@@ -148745,7 +280025,6 @@ module.exports = JSON.parse('[["0","\\u0000",127],["8ea1","。",62],["a1a1"," 
 /***/ 25893:
 /***/ ((module) => {
 
-"use strict";
 module.exports = JSON.parse('{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}');
 
 /***/ }),
@@ -148753,7 +280032,6 @@ module.exports = JSON.parse('{"uChars":[128,165,169,178,184,216,226,235,238,244,
 /***/ 49429:
 /***/ ((module) => {
 
-"use strict";
 module.exports = JSON.parse('[["a140","",62],["a180","",32],["a240","",62],["a280","",32],["a2ab","",5],["a2e3","€"],["a2ef",""],["a2fd",""],["a340","",62],["a380","",31," "],["a440","",62],["a480","",32],["a4f4","",10],["a540","",62],["a580","",32],["a5f7","",7],["a640","",62],["a680","",32],["a6b9","",7],["a6d9","",6],["a6ec",""],["a6f3",""],["a6f6","",8],["a740","",62],["a780","",32],["a7c2","",14],["a7f2","",12],["a896","",10],["a8bc","ḿ"],["a8bf","ǹ"],["a8c1",""],["a8ea","",20],["a958",""],["a95b",""],["a95d",""],["a989","〾⿰",11],["a997","",12],["a9f0","",14],["aaa1","",93],["aba1","",93],["aca1","",93],["ada1","",93],["aea1","",93],["afa1","",93],["d7fa","",4],["f8a1","",93],["f9a1","",93],["faa1","",93],["fba1","",93],["fca1","",93],["fda1","",93],["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93],["8135f437",""]]');
 
 /***/ }),
@@ -148761,89 +280039,161 @@ module.exports = JSON.parse('[["a140","",62],["a180","",32],["a240","",
 /***/ 94965:
 /***/ ((module) => {
 
-"use strict";
 module.exports = JSON.parse('[["0","\\u0000",128],["a1","。",62],["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"],["81b8","∈∋⊆⊇⊂⊃∪∩"],["81c8","∧∨¬⇒⇔∀∃"],["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["81f0","ʼn♯♭♪†‡¶"],["81fc","◯"],["824f","0",9],["8260","A",25],["8281","a",25],["829f","ぁ",82],["8340","ァ",62],["8380","ム",22],["839f","Α",16,"Σ",6],["83bf","α",16,"σ",6],["8440","А",5,"ЁЖ",25],["8470","а",5,"ёж",7],["8480","о",17],["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["8740","①",19,"Ⅰ",9],["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["877e","㍻"],["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"],["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"],["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"],["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"],["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"],["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"],["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"],["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"],["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"],["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"],["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"],["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"],["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"],["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"],["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"],["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"],["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"],["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"],["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"],["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"],["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"],["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"],["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"],["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"],["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"],["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"],["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"],["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"],["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"],["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"],["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"],["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"],["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["eeef","ⅰ",9,"¬¦'""],["f040","",62],["f080","",124],["f140","",62],["f180","",124],["f240","",62],["f280","",124],["f340","",62],["f380","",124],["f440","",62],["f480","",124],["f540","",62],["f580","",124],["f640","",62],["f680","",124],["f740","",62],["f780","",124],["f840","",62],["f880","",124],["f940",""],["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"],["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"],["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"],["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]]');
 
 /***/ }),
 
-/***/ 33600:
-/***/ ((module) => {
-
-"use strict";
-module.exports = JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}');
-
-/***/ }),
-
-/***/ 59323:
-/***/ ((module) => {
-
-"use strict";
-module.exports = JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"⁡","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"⁡","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"⁣","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"⁣","InvisibleTimes":"⁢","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"⁠","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"­","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":"  ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"​","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"‍","zwnj":"‌"}');
-
-/***/ }),
-
-/***/ 29591:
-/***/ ((module) => {
-
-"use strict";
-module.exports = JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"­","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}');
-
-/***/ }),
-
-/***/ 2586:
+/***/ 53765:
 /***/ ((module) => {
 
-"use strict";
-module.exports = JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}');
-
-/***/ }),
-
-/***/ 1907:
-/***/ ((module) => {
-
-"use strict";
-module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mapped",[359]],[[359,359],"valid"],[[360,360],"mapped",[361]],[[361,361],"valid"],[[362,362],"mapped",[363]],[[363,363],"valid"],[[364,364],"mapped",[365]],[[365,365],"valid"],[[366,366],"mapped",[367]],[[367,367],"valid"],[[368,368],"mapped",[369]],[[369,369],"valid"],[[370,370],"mapped",[371]],[[371,371],"valid"],[[372,372],"mapped",[373]],[[373,373],"valid"],[[374,374],"mapped",[375]],[[375,375],"valid"],[[376,376],"mapped",[255]],[[377,377],"mapped",[378]],[[378,378],"valid"],[[379,379],"mapped",[380]],[[380,380],"valid"],[[381,381],"mapped",[382]],[[382,382],"valid"],[[383,383],"mapped",[115]],[[384,384],"valid"],[[385,385],"mapped",[595]],[[386,386],"mapped",[387]],[[387,387],"valid"],[[388,388],"mapped",[389]],[[389,389],"valid"],[[390,390],"mapped",[596]],[[391,391],"mapped",[392]],[[392,392],"valid"],[[393,393],"mapped",[598]],[[394,394],"mapped",[599]],[[395,395],"mapped",[396]],[[396,397],"valid"],[[398,398],"mapped",[477]],[[399,399],"mapped",[601]],[[400,400],"mapped",[603]],[[401,401],"mapped",[402]],[[402,402],"valid"],[[403,403],"mapped",[608]],[[404,404],"mapped",[611]],[[405,405],"valid"],[[406,406],"mapped",[617]],[[407,407],"mapped",[616]],[[408,408],"mapped",[409]],[[409,411],"valid"],[[412,412],"mapped",[623]],[[413,413],"mapped",[626]],[[414,414],"valid"],[[415,415],"mapped",[629]],[[416,416],"mapped",[417]],[[417,417],"valid"],[[418,418],"mapped",[419]],[[419,419],"valid"],[[420,420],"mapped",[421]],[[421,421],"valid"],[[422,422],"mapped",[640]],[[423,423],"mapped",[424]],[[424,424],"valid"],[[425,425],"mapped",[643]],[[426,427],"valid"],[[428,428],"mapped",[429]],[[429,429],"valid"],[[430,430],"mapped",[648]],[[431,431],"mapped",[432]],[[432,432],"valid"],[[433,433],"mapped",[650]],[[434,434],"mapped",[651]],[[435,435],"mapped",[436]],[[436,436],"valid"],[[437,437],"mapped",[438]],[[438,438],"valid"],[[439,439],"mapped",[658]],[[440,440],"mapped",[441]],[[441,443],"valid"],[[444,444],"mapped",[445]],[[445,451],"valid"],[[452,454],"mapped",[100,382]],[[455,457],"mapped",[108,106]],[[458,460],"mapped",[110,106]],[[461,461],"mapped",[462]],[[462,462],"valid"],[[463,463],"mapped",[464]],[[464,464],"valid"],[[465,465],"mapped",[466]],[[466,466],"valid"],[[467,467],"mapped",[468]],[[468,468],"valid"],[[469,469],"mapped",[470]],[[470,470],"valid"],[[471,471],"mapped",[472]],[[472,472],"valid"],[[473,473],"mapped",[474]],[[474,474],"valid"],[[475,475],"mapped",[476]],[[476,477],"valid"],[[478,478],"mapped",[479]],[[479,479],"valid"],[[480,480],"mapped",[481]],[[481,481],"valid"],[[482,482],"mapped",[483]],[[483,483],"valid"],[[484,484],"mapped",[485]],[[485,485],"valid"],[[486,486],"mapped",[487]],[[487,487],"valid"],[[488,488],"mapped",[489]],[[489,489],"valid"],[[490,490],"mapped",[491]],[[491,491],"valid"],[[492,492],"mapped",[493]],[[493,493],"valid"],[[494,494],"mapped",[495]],[[495,496],"valid"],[[497,499],"mapped",[100,122]],[[500,500],"mapped",[501]],[[501,501],"valid"],[[502,502],"mapped",[405]],[[503,503],"mapped",[447]],[[504,504],"mapped",[505]],[[505,505],"valid"],[[506,506],"mapped",[507]],[[507,507],"valid"],[[508,508],"mapped",[509]],[[509,509],"valid"],[[510,510],"mapped",[511]],[[511,511],"valid"],[[512,512],"mapped",[513]],[[513,513],"valid"],[[514,514],"mapped",[515]],[[515,515],"valid"],[[516,516],"mapped",[517]],[[517,517],"valid"],[[518,518],"mapped",[519]],[[519,519],"valid"],[[520,520],"mapped",[521]],[[521,521],"valid"],[[522,522],"mapped",[523]],[[523,523],"valid"],[[524,524],"mapped",[525]],[[525,525],"valid"],[[526,526],"mapped",[527]],[[527,527],"valid"],[[528,528],"mapped",[529]],[[529,529],"valid"],[[530,530],"mapped",[531]],[[531,531],"valid"],[[532,532],"mapped",[533]],[[533,533],"valid"],[[534,534],"mapped",[535]],[[535,535],"valid"],[[536,536],"mapped",[537]],[[537,537],"valid"],[[538,538],"mapped",[539]],[[539,539],"valid"],[[540,540],"mapped",[541]],[[541,541],"valid"],[[542,542],"mapped",[543]],[[543,543],"valid"],[[544,544],"mapped",[414]],[[545,545],"valid"],[[546,546],"mapped",[547]],[[547,547],"valid"],[[548,548],"mapped",[549]],[[549,549],"valid"],[[550,550],"mapped",[551]],[[551,551],"valid"],[[552,552],"mapped",[553]],[[553,553],"valid"],[[554,554],"mapped",[555]],[[555,555],"valid"],[[556,556],"mapped",[557]],[[557,557],"valid"],[[558,558],"mapped",[559]],[[559,559],"valid"],[[560,560],"mapped",[561]],[[561,561],"valid"],[[562,562],"mapped",[563]],[[563,563],"valid"],[[564,566],"valid"],[[567,569],"valid"],[[570,570],"mapped",[11365]],[[571,571],"mapped",[572]],[[572,572],"valid"],[[573,573],"mapped",[410]],[[574,574],"mapped",[11366]],[[575,576],"valid"],[[577,577],"mapped",[578]],[[578,578],"valid"],[[579,579],"mapped",[384]],[[580,580],"mapped",[649]],[[581,581],"mapped",[652]],[[582,582],"mapped",[583]],[[583,583],"valid"],[[584,584],"mapped",[585]],[[585,585],"valid"],[[586,586],"mapped",[587]],[[587,587],"valid"],[[588,588],"mapped",[589]],[[589,589],"valid"],[[590,590],"mapped",[591]],[[591,591],"valid"],[[592,680],"valid"],[[681,685],"valid"],[[686,687],"valid"],[[688,688],"mapped",[104]],[[689,689],"mapped",[614]],[[690,690],"mapped",[106]],[[691,691],"mapped",[114]],[[692,692],"mapped",[633]],[[693,693],"mapped",[635]],[[694,694],"mapped",[641]],[[695,695],"mapped",[119]],[[696,696],"mapped",[121]],[[697,705],"valid"],[[706,709],"valid",[],"NV8"],[[710,721],"valid"],[[722,727],"valid",[],"NV8"],[[728,728],"disallowed_STD3_mapped",[32,774]],[[729,729],"disallowed_STD3_mapped",[32,775]],[[730,730],"disallowed_STD3_mapped",[32,778]],[[731,731],"disallowed_STD3_mapped",[32,808]],[[732,732],"disallowed_STD3_mapped",[32,771]],[[733,733],"disallowed_STD3_mapped",[32,779]],[[734,734],"valid",[],"NV8"],[[735,735],"valid",[],"NV8"],[[736,736],"mapped",[611]],[[737,737],"mapped",[108]],[[738,738],"mapped",[115]],[[739,739],"mapped",[120]],[[740,740],"mapped",[661]],[[741,745],"valid",[],"NV8"],[[746,747],"valid",[],"NV8"],[[748,748],"valid"],[[749,749],"valid",[],"NV8"],[[750,750],"valid"],[[751,767],"valid",[],"NV8"],[[768,831],"valid"],[[832,832],"mapped",[768]],[[833,833],"mapped",[769]],[[834,834],"valid"],[[835,835],"mapped",[787]],[[836,836],"mapped",[776,769]],[[837,837],"mapped",[953]],[[838,846],"valid"],[[847,847],"ignored"],[[848,855],"valid"],[[856,860],"valid"],[[861,863],"valid"],[[864,865],"valid"],[[866,866],"valid"],[[867,879],"valid"],[[880,880],"mapped",[881]],[[881,881],"valid"],[[882,882],"mapped",[883]],[[883,883],"valid"],[[884,884],"mapped",[697]],[[885,885],"valid"],[[886,886],"mapped",[887]],[[887,887],"valid"],[[888,889],"disallowed"],[[890,890],"disallowed_STD3_mapped",[32,953]],[[891,893],"valid"],[[894,894],"disallowed_STD3_mapped",[59]],[[895,895],"mapped",[1011]],[[896,899],"disallowed"],[[900,900],"disallowed_STD3_mapped",[32,769]],[[901,901],"disallowed_STD3_mapped",[32,776,769]],[[902,902],"mapped",[940]],[[903,903],"mapped",[183]],[[904,904],"mapped",[941]],[[905,905],"mapped",[942]],[[906,906],"mapped",[943]],[[907,907],"disallowed"],[[908,908],"mapped",[972]],[[909,909],"disallowed"],[[910,910],"mapped",[973]],[[911,911],"mapped",[974]],[[912,912],"valid"],[[913,913],"mapped",[945]],[[914,914],"mapped",[946]],[[915,915],"mapped",[947]],[[916,916],"mapped",[948]],[[917,917],"mapped",[949]],[[918,918],"mapped",[950]],[[919,919],"mapped",[951]],[[920,920],"mapped",[952]],[[921,921],"mapped",[953]],[[922,922],"mapped",[954]],[[923,923],"mapped",[955]],[[924,924],"mapped",[956]],[[925,925],"mapped",[957]],[[926,926],"mapped",[958]],[[927,927],"mapped",[959]],[[928,928],"mapped",[960]],[[929,929],"mapped",[961]],[[930,930],"disallowed"],[[931,931],"mapped",[963]],[[932,932],"mapped",[964]],[[933,933],"mapped",[965]],[[934,934],"mapped",[966]],[[935,935],"mapped",[967]],[[936,936],"mapped",[968]],[[937,937],"mapped",[969]],[[938,938],"mapped",[970]],[[939,939],"mapped",[971]],[[940,961],"valid"],[[962,962],"deviation",[963]],[[963,974],"valid"],[[975,975],"mapped",[983]],[[976,976],"mapped",[946]],[[977,977],"mapped",[952]],[[978,978],"mapped",[965]],[[979,979],"mapped",[973]],[[980,980],"mapped",[971]],[[981,981],"mapped",[966]],[[982,982],"mapped",[960]],[[983,983],"valid"],[[984,984],"mapped",[985]],[[985,985],"valid"],[[986,986],"mapped",[987]],[[987,987],"valid"],[[988,988],"mapped",[989]],[[989,989],"valid"],[[990,990],"mapped",[991]],[[991,991],"valid"],[[992,992],"mapped",[993]],[[993,993],"valid"],[[994,994],"mapped",[995]],[[995,995],"valid"],[[996,996],"mapped",[997]],[[997,997],"valid"],[[998,998],"mapped",[999]],[[999,999],"valid"],[[1000,1000],"mapped",[1001]],[[1001,1001],"valid"],[[1002,1002],"mapped",[1003]],[[1003,1003],"valid"],[[1004,1004],"mapped",[1005]],[[1005,1005],"valid"],[[1006,1006],"mapped",[1007]],[[1007,1007],"valid"],[[1008,1008],"mapped",[954]],[[1009,1009],"mapped",[961]],[[1010,1010],"mapped",[963]],[[1011,1011],"valid"],[[1012,1012],"mapped",[952]],[[1013,1013],"mapped",[949]],[[1014,1014],"valid",[],"NV8"],[[1015,1015],"mapped",[1016]],[[1016,1016],"valid"],[[1017,1017],"mapped",[963]],[[1018,1018],"mapped",[1019]],[[1019,1019],"valid"],[[1020,1020],"valid"],[[1021,1021],"mapped",[891]],[[1022,1022],"mapped",[892]],[[1023,1023],"mapped",[893]],[[1024,1024],"mapped",[1104]],[[1025,1025],"mapped",[1105]],[[1026,1026],"mapped",[1106]],[[1027,1027],"mapped",[1107]],[[1028,1028],"mapped",[1108]],[[1029,1029],"mapped",[1109]],[[1030,1030],"mapped",[1110]],[[1031,1031],"mapped",[1111]],[[1032,1032],"mapped",[1112]],[[1033,1033],"mapped",[1113]],[[1034,1034],"mapped",[1114]],[[1035,1035],"mapped",[1115]],[[1036,1036],"mapped",[1116]],[[1037,1037],"mapped",[1117]],[[1038,1038],"mapped",[1118]],[[1039,1039],"mapped",[1119]],[[1040,1040],"mapped",[1072]],[[1041,1041],"mapped",[1073]],[[1042,1042],"mapped",[1074]],[[1043,1043],"mapped",[1075]],[[1044,1044],"mapped",[1076]],[[1045,1045],"mapped",[1077]],[[1046,1046],"mapped",[1078]],[[1047,1047],"mapped",[1079]],[[1048,1048],"mapped",[1080]],[[1049,1049],"mapped",[1081]],[[1050,1050],"mapped",[1082]],[[1051,1051],"mapped",[1083]],[[1052,1052],"mapped",[1084]],[[1053,1053],"mapped",[1085]],[[1054,1054],"mapped",[1086]],[[1055,1055],"mapped",[1087]],[[1056,1056],"mapped",[1088]],[[1057,1057],"mapped",[1089]],[[1058,1058],"mapped",[1090]],[[1059,1059],"mapped",[1091]],[[1060,1060],"mapped",[1092]],[[1061,1061],"mapped",[1093]],[[1062,1062],"mapped",[1094]],[[1063,1063],"mapped",[1095]],[[1064,1064],"mapped",[1096]],[[1065,1065],"mapped",[1097]],[[1066,1066],"mapped",[1098]],[[1067,1067],"mapped",[1099]],[[1068,1068],"mapped",[1100]],[[1069,1069],"mapped",[1101]],[[1070,1070],"mapped",[1102]],[[1071,1071],"mapped",[1103]],[[1072,1103],"valid"],[[1104,1104],"valid"],[[1105,1116],"valid"],[[1117,1117],"valid"],[[1118,1119],"valid"],[[1120,1120],"mapped",[1121]],[[1121,1121],"valid"],[[1122,1122],"mapped",[1123]],[[1123,1123],"valid"],[[1124,1124],"mapped",[1125]],[[1125,1125],"valid"],[[1126,1126],"mapped",[1127]],[[1127,1127],"valid"],[[1128,1128],"mapped",[1129]],[[1129,1129],"valid"],[[1130,1130],"mapped",[1131]],[[1131,1131],"valid"],[[1132,1132],"mapped",[1133]],[[1133,1133],"valid"],[[1134,1134],"mapped",[1135]],[[1135,1135],"valid"],[[1136,1136],"mapped",[1137]],[[1137,1137],"valid"],[[1138,1138],"mapped",[1139]],[[1139,1139],"valid"],[[1140,1140],"mapped",[1141]],[[1141,1141],"valid"],[[1142,1142],"mapped",[1143]],[[1143,1143],"valid"],[[1144,1144],"mapped",[1145]],[[1145,1145],"valid"],[[1146,1146],"mapped",[1147]],[[1147,1147],"valid"],[[1148,1148],"mapped",[1149]],[[1149,1149],"valid"],[[1150,1150],"mapped",[1151]],[[1151,1151],"valid"],[[1152,1152],"mapped",[1153]],[[1153,1153],"valid"],[[1154,1154],"valid",[],"NV8"],[[1155,1158],"valid"],[[1159,1159],"valid"],[[1160,1161],"valid",[],"NV8"],[[1162,1162],"mapped",[1163]],[[1163,1163],"valid"],[[1164,1164],"mapped",[1165]],[[1165,1165],"valid"],[[1166,1166],"mapped",[1167]],[[1167,1167],"valid"],[[1168,1168],"mapped",[1169]],[[1169,1169],"valid"],[[1170,1170],"mapped",[1171]],[[1171,1171],"valid"],[[1172,1172],"mapped",[1173]],[[1173,1173],"valid"],[[1174,1174],"mapped",[1175]],[[1175,1175],"valid"],[[1176,1176],"mapped",[1177]],[[1177,1177],"valid"],[[1178,1178],"mapped",[1179]],[[1179,1179],"valid"],[[1180,1180],"mapped",[1181]],[[1181,1181],"valid"],[[1182,1182],"mapped",[1183]],[[1183,1183],"valid"],[[1184,1184],"mapped",[1185]],[[1185,1185],"valid"],[[1186,1186],"mapped",[1187]],[[1187,1187],"valid"],[[1188,1188],"mapped",[1189]],[[1189,1189],"valid"],[[1190,1190],"mapped",[1191]],[[1191,1191],"valid"],[[1192,1192],"mapped",[1193]],[[1193,1193],"valid"],[[1194,1194],"mapped",[1195]],[[1195,1195],"valid"],[[1196,1196],"mapped",[1197]],[[1197,1197],"valid"],[[1198,1198],"mapped",[1199]],[[1199,1199],"valid"],[[1200,1200],"mapped",[1201]],[[1201,1201],"valid"],[[1202,1202],"mapped",[1203]],[[1203,1203],"valid"],[[1204,1204],"mapped",[1205]],[[1205,1205],"valid"],[[1206,1206],"mapped",[1207]],[[1207,1207],"valid"],[[1208,1208],"mapped",[1209]],[[1209,1209],"valid"],[[1210,1210],"mapped",[1211]],[[1211,1211],"valid"],[[1212,1212],"mapped",[1213]],[[1213,1213],"valid"],[[1214,1214],"mapped",[1215]],[[1215,1215],"valid"],[[1216,1216],"disallowed"],[[1217,1217],"mapped",[1218]],[[1218,1218],"valid"],[[1219,1219],"mapped",[1220]],[[1220,1220],"valid"],[[1221,1221],"mapped",[1222]],[[1222,1222],"valid"],[[1223,1223],"mapped",[1224]],[[1224,1224],"valid"],[[1225,1225],"mapped",[1226]],[[1226,1226],"valid"],[[1227,1227],"mapped",[1228]],[[1228,1228],"valid"],[[1229,1229],"mapped",[1230]],[[1230,1230],"valid"],[[1231,1231],"valid"],[[1232,1232],"mapped",[1233]],[[1233,1233],"valid"],[[1234,1234],"mapped",[1235]],[[1235,1235],"valid"],[[1236,1236],"mapped",[1237]],[[1237,1237],"valid"],[[1238,1238],"mapped",[1239]],[[1239,1239],"valid"],[[1240,1240],"mapped",[1241]],[[1241,1241],"valid"],[[1242,1242],"mapped",[1243]],[[1243,1243],"valid"],[[1244,1244],"mapped",[1245]],[[1245,1245],"valid"],[[1246,1246],"mapped",[1247]],[[1247,1247],"valid"],[[1248,1248],"mapped",[1249]],[[1249,1249],"valid"],[[1250,1250],"mapped",[1251]],[[1251,1251],"valid"],[[1252,1252],"mapped",[1253]],[[1253,1253],"valid"],[[1254,1254],"mapped",[1255]],[[1255,1255],"valid"],[[1256,1256],"mapped",[1257]],[[1257,1257],"valid"],[[1258,1258],"mapped",[1259]],[[1259,1259],"valid"],[[1260,1260],"mapped",[1261]],[[1261,1261],"valid"],[[1262,1262],"mapped",[1263]],[[1263,1263],"valid"],[[1264,1264],"mapped",[1265]],[[1265,1265],"valid"],[[1266,1266],"mapped",[1267]],[[1267,1267],"valid"],[[1268,1268],"mapped",[1269]],[[1269,1269],"valid"],[[1270,1270],"mapped",[1271]],[[1271,1271],"valid"],[[1272,1272],"mapped",[1273]],[[1273,1273],"valid"],[[1274,1274],"mapped",[1275]],[[1275,1275],"valid"],[[1276,1276],"mapped",[1277]],[[1277,1277],"valid"],[[1278,1278],"mapped",[1279]],[[1279,1279],"valid"],[[1280,1280],"mapped",[1281]],[[1281,1281],"valid"],[[1282,1282],"mapped",[1283]],[[1283,1283],"valid"],[[1284,1284],"mapped",[1285]],[[1285,1285],"valid"],[[1286,1286],"mapped",[1287]],[[1287,1287],"valid"],[[1288,1288],"mapped",[1289]],[[1289,1289],"valid"],[[1290,1290],"mapped",[1291]],[[1291,1291],"valid"],[[1292,1292],"mapped",[1293]],[[1293,1293],"valid"],[[1294,1294],"mapped",[1295]],[[1295,1295],"valid"],[[1296,1296],"mapped",[1297]],[[1297,1297],"valid"],[[1298,1298],"mapped",[1299]],[[1299,1299],"valid"],[[1300,1300],"mapped",[1301]],[[1301,1301],"valid"],[[1302,1302],"mapped",[1303]],[[1303,1303],"valid"],[[1304,1304],"mapped",[1305]],[[1305,1305],"valid"],[[1306,1306],"mapped",[1307]],[[1307,1307],"valid"],[[1308,1308],"mapped",[1309]],[[1309,1309],"valid"],[[1310,1310],"mapped",[1311]],[[1311,1311],"valid"],[[1312,1312],"mapped",[1313]],[[1313,1313],"valid"],[[1314,1314],"mapped",[1315]],[[1315,1315],"valid"],[[1316,1316],"mapped",[1317]],[[1317,1317],"valid"],[[1318,1318],"mapped",[1319]],[[1319,1319],"valid"],[[1320,1320],"mapped",[1321]],[[1321,1321],"valid"],[[1322,1322],"mapped",[1323]],[[1323,1323],"valid"],[[1324,1324],"mapped",[1325]],[[1325,1325],"valid"],[[1326,1326],"mapped",[1327]],[[1327,1327],"valid"],[[1328,1328],"disallowed"],[[1329,1329],"mapped",[1377]],[[1330,1330],"mapped",[1378]],[[1331,1331],"mapped",[1379]],[[1332,1332],"mapped",[1380]],[[1333,1333],"mapped",[1381]],[[1334,1334],"mapped",[1382]],[[1335,1335],"mapped",[1383]],[[1336,1336],"mapped",[1384]],[[1337,1337],"mapped",[1385]],[[1338,1338],"mapped",[1386]],[[1339,1339],"mapped",[1387]],[[1340,1340],"mapped",[1388]],[[1341,1341],"mapped",[1389]],[[1342,1342],"mapped",[1390]],[[1343,1343],"mapped",[1391]],[[1344,1344],"mapped",[1392]],[[1345,1345],"mapped",[1393]],[[1346,1346],"mapped",[1394]],[[1347,1347],"mapped",[1395]],[[1348,1348],"mapped",[1396]],[[1349,1349],"mapped",[1397]],[[1350,1350],"mapped",[1398]],[[1351,1351],"mapped",[1399]],[[1352,1352],"mapped",[1400]],[[1353,1353],"mapped",[1401]],[[1354,1354],"mapped",[1402]],[[1355,1355],"mapped",[1403]],[[1356,1356],"mapped",[1404]],[[1357,1357],"mapped",[1405]],[[1358,1358],"mapped",[1406]],[[1359,1359],"mapped",[1407]],[[1360,1360],"mapped",[1408]],[[1361,1361],"mapped",[1409]],[[1362,1362],"mapped",[1410]],[[1363,1363],"mapped",[1411]],[[1364,1364],"mapped",[1412]],[[1365,1365],"mapped",[1413]],[[1366,1366],"mapped",[1414]],[[1367,1368],"disallowed"],[[1369,1369],"valid"],[[1370,1375],"valid",[],"NV8"],[[1376,1376],"disallowed"],[[1377,1414],"valid"],[[1415,1415],"mapped",[1381,1410]],[[1416,1416],"disallowed"],[[1417,1417],"valid",[],"NV8"],[[1418,1418],"valid",[],"NV8"],[[1419,1420],"disallowed"],[[1421,1422],"valid",[],"NV8"],[[1423,1423],"valid",[],"NV8"],[[1424,1424],"disallowed"],[[1425,1441],"valid"],[[1442,1442],"valid"],[[1443,1455],"valid"],[[1456,1465],"valid"],[[1466,1466],"valid"],[[1467,1469],"valid"],[[1470,1470],"valid",[],"NV8"],[[1471,1471],"valid"],[[1472,1472],"valid",[],"NV8"],[[1473,1474],"valid"],[[1475,1475],"valid",[],"NV8"],[[1476,1476],"valid"],[[1477,1477],"valid"],[[1478,1478],"valid",[],"NV8"],[[1479,1479],"valid"],[[1480,1487],"disallowed"],[[1488,1514],"valid"],[[1515,1519],"disallowed"],[[1520,1524],"valid"],[[1525,1535],"disallowed"],[[1536,1539],"disallowed"],[[1540,1540],"disallowed"],[[1541,1541],"disallowed"],[[1542,1546],"valid",[],"NV8"],[[1547,1547],"valid",[],"NV8"],[[1548,1548],"valid",[],"NV8"],[[1549,1551],"valid",[],"NV8"],[[1552,1557],"valid"],[[1558,1562],"valid"],[[1563,1563],"valid",[],"NV8"],[[1564,1564],"disallowed"],[[1565,1565],"disallowed"],[[1566,1566],"valid",[],"NV8"],[[1567,1567],"valid",[],"NV8"],[[1568,1568],"valid"],[[1569,1594],"valid"],[[1595,1599],"valid"],[[1600,1600],"valid",[],"NV8"],[[1601,1618],"valid"],[[1619,1621],"valid"],[[1622,1624],"valid"],[[1625,1630],"valid"],[[1631,1631],"valid"],[[1632,1641],"valid"],[[1642,1645],"valid",[],"NV8"],[[1646,1647],"valid"],[[1648,1652],"valid"],[[1653,1653],"mapped",[1575,1652]],[[1654,1654],"mapped",[1608,1652]],[[1655,1655],"mapped",[1735,1652]],[[1656,1656],"mapped",[1610,1652]],[[1657,1719],"valid"],[[1720,1721],"valid"],[[1722,1726],"valid"],[[1727,1727],"valid"],[[1728,1742],"valid"],[[1743,1743],"valid"],[[1744,1747],"valid"],[[1748,1748],"valid",[],"NV8"],[[1749,1756],"valid"],[[1757,1757],"disallowed"],[[1758,1758],"valid",[],"NV8"],[[1759,1768],"valid"],[[1769,1769],"valid",[],"NV8"],[[1770,1773],"valid"],[[1774,1775],"valid"],[[1776,1785],"valid"],[[1786,1790],"valid"],[[1791,1791],"valid"],[[1792,1805],"valid",[],"NV8"],[[1806,1806],"disallowed"],[[1807,1807],"disallowed"],[[1808,1836],"valid"],[[1837,1839],"valid"],[[1840,1866],"valid"],[[1867,1868],"disallowed"],[[1869,1871],"valid"],[[1872,1901],"valid"],[[1902,1919],"valid"],[[1920,1968],"valid"],[[1969,1969],"valid"],[[1970,1983],"disallowed"],[[1984,2037],"valid"],[[2038,2042],"valid",[],"NV8"],[[2043,2047],"disallowed"],[[2048,2093],"valid"],[[2094,2095],"disallowed"],[[2096,2110],"valid",[],"NV8"],[[2111,2111],"disallowed"],[[2112,2139],"valid"],[[2140,2141],"disallowed"],[[2142,2142],"valid",[],"NV8"],[[2143,2207],"disallowed"],[[2208,2208],"valid"],[[2209,2209],"valid"],[[2210,2220],"valid"],[[2221,2226],"valid"],[[2227,2228],"valid"],[[2229,2274],"disallowed"],[[2275,2275],"valid"],[[2276,2302],"valid"],[[2303,2303],"valid"],[[2304,2304],"valid"],[[2305,2307],"valid"],[[2308,2308],"valid"],[[2309,2361],"valid"],[[2362,2363],"valid"],[[2364,2381],"valid"],[[2382,2382],"valid"],[[2383,2383],"valid"],[[2384,2388],"valid"],[[2389,2389],"valid"],[[2390,2391],"valid"],[[2392,2392],"mapped",[2325,2364]],[[2393,2393],"mapped",[2326,2364]],[[2394,2394],"mapped",[2327,2364]],[[2395,2395],"mapped",[2332,2364]],[[2396,2396],"mapped",[2337,2364]],[[2397,2397],"mapped",[2338,2364]],[[2398,2398],"mapped",[2347,2364]],[[2399,2399],"mapped",[2351,2364]],[[2400,2403],"valid"],[[2404,2405],"valid",[],"NV8"],[[2406,2415],"valid"],[[2416,2416],"valid",[],"NV8"],[[2417,2418],"valid"],[[2419,2423],"valid"],[[2424,2424],"valid"],[[2425,2426],"valid"],[[2427,2428],"valid"],[[2429,2429],"valid"],[[2430,2431],"valid"],[[2432,2432],"valid"],[[2433,2435],"valid"],[[2436,2436],"disallowed"],[[2437,2444],"valid"],[[2445,2446],"disallowed"],[[2447,2448],"valid"],[[2449,2450],"disallowed"],[[2451,2472],"valid"],[[2473,2473],"disallowed"],[[2474,2480],"valid"],[[2481,2481],"disallowed"],[[2482,2482],"valid"],[[2483,2485],"disallowed"],[[2486,2489],"valid"],[[2490,2491],"disallowed"],[[2492,2492],"valid"],[[2493,2493],"valid"],[[2494,2500],"valid"],[[2501,2502],"disallowed"],[[2503,2504],"valid"],[[2505,2506],"disallowed"],[[2507,2509],"valid"],[[2510,2510],"valid"],[[2511,2518],"disallowed"],[[2519,2519],"valid"],[[2520,2523],"disallowed"],[[2524,2524],"mapped",[2465,2492]],[[2525,2525],"mapped",[2466,2492]],[[2526,2526],"disallowed"],[[2527,2527],"mapped",[2479,2492]],[[2528,2531],"valid"],[[2532,2533],"disallowed"],[[2534,2545],"valid"],[[2546,2554],"valid",[],"NV8"],[[2555,2555],"valid",[],"NV8"],[[2556,2560],"disallowed"],[[2561,2561],"valid"],[[2562,2562],"valid"],[[2563,2563],"valid"],[[2564,2564],"disallowed"],[[2565,2570],"valid"],[[2571,2574],"disallowed"],[[2575,2576],"valid"],[[2577,2578],"disallowed"],[[2579,2600],"valid"],[[2601,2601],"disallowed"],[[2602,2608],"valid"],[[2609,2609],"disallowed"],[[2610,2610],"valid"],[[2611,2611],"mapped",[2610,2620]],[[2612,2612],"disallowed"],[[2613,2613],"valid"],[[2614,2614],"mapped",[2616,2620]],[[2615,2615],"disallowed"],[[2616,2617],"valid"],[[2618,2619],"disallowed"],[[2620,2620],"valid"],[[2621,2621],"disallowed"],[[2622,2626],"valid"],[[2627,2630],"disallowed"],[[2631,2632],"valid"],[[2633,2634],"disallowed"],[[2635,2637],"valid"],[[2638,2640],"disallowed"],[[2641,2641],"valid"],[[2642,2648],"disallowed"],[[2649,2649],"mapped",[2582,2620]],[[2650,2650],"mapped",[2583,2620]],[[2651,2651],"mapped",[2588,2620]],[[2652,2652],"valid"],[[2653,2653],"disallowed"],[[2654,2654],"mapped",[2603,2620]],[[2655,2661],"disallowed"],[[2662,2676],"valid"],[[2677,2677],"valid"],[[2678,2688],"disallowed"],[[2689,2691],"valid"],[[2692,2692],"disallowed"],[[2693,2699],"valid"],[[2700,2700],"valid"],[[2701,2701],"valid"],[[2702,2702],"disallowed"],[[2703,2705],"valid"],[[2706,2706],"disallowed"],[[2707,2728],"valid"],[[2729,2729],"disallowed"],[[2730,2736],"valid"],[[2737,2737],"disallowed"],[[2738,2739],"valid"],[[2740,2740],"disallowed"],[[2741,2745],"valid"],[[2746,2747],"disallowed"],[[2748,2757],"valid"],[[2758,2758],"disallowed"],[[2759,2761],"valid"],[[2762,2762],"disallowed"],[[2763,2765],"valid"],[[2766,2767],"disallowed"],[[2768,2768],"valid"],[[2769,2783],"disallowed"],[[2784,2784],"valid"],[[2785,2787],"valid"],[[2788,2789],"disallowed"],[[2790,2799],"valid"],[[2800,2800],"valid",[],"NV8"],[[2801,2801],"valid",[],"NV8"],[[2802,2808],"disallowed"],[[2809,2809],"valid"],[[2810,2816],"disallowed"],[[2817,2819],"valid"],[[2820,2820],"disallowed"],[[2821,2828],"valid"],[[2829,2830],"disallowed"],[[2831,2832],"valid"],[[2833,2834],"disallowed"],[[2835,2856],"valid"],[[2857,2857],"disallowed"],[[2858,2864],"valid"],[[2865,2865],"disallowed"],[[2866,2867],"valid"],[[2868,2868],"disallowed"],[[2869,2869],"valid"],[[2870,2873],"valid"],[[2874,2875],"disallowed"],[[2876,2883],"valid"],[[2884,2884],"valid"],[[2885,2886],"disallowed"],[[2887,2888],"valid"],[[2889,2890],"disallowed"],[[2891,2893],"valid"],[[2894,2901],"disallowed"],[[2902,2903],"valid"],[[2904,2907],"disallowed"],[[2908,2908],"mapped",[2849,2876]],[[2909,2909],"mapped",[2850,2876]],[[2910,2910],"disallowed"],[[2911,2913],"valid"],[[2914,2915],"valid"],[[2916,2917],"disallowed"],[[2918,2927],"valid"],[[2928,2928],"valid",[],"NV8"],[[2929,2929],"valid"],[[2930,2935],"valid",[],"NV8"],[[2936,2945],"disallowed"],[[2946,2947],"valid"],[[2948,2948],"disallowed"],[[2949,2954],"valid"],[[2955,2957],"disallowed"],[[2958,2960],"valid"],[[2961,2961],"disallowed"],[[2962,2965],"valid"],[[2966,2968],"disallowed"],[[2969,2970],"valid"],[[2971,2971],"disallowed"],[[2972,2972],"valid"],[[2973,2973],"disallowed"],[[2974,2975],"valid"],[[2976,2978],"disallowed"],[[2979,2980],"valid"],[[2981,2983],"disallowed"],[[2984,2986],"valid"],[[2987,2989],"disallowed"],[[2990,2997],"valid"],[[2998,2998],"valid"],[[2999,3001],"valid"],[[3002,3005],"disallowed"],[[3006,3010],"valid"],[[3011,3013],"disallowed"],[[3014,3016],"valid"],[[3017,3017],"disallowed"],[[3018,3021],"valid"],[[3022,3023],"disallowed"],[[3024,3024],"valid"],[[3025,3030],"disallowed"],[[3031,3031],"valid"],[[3032,3045],"disallowed"],[[3046,3046],"valid"],[[3047,3055],"valid"],[[3056,3058],"valid",[],"NV8"],[[3059,3066],"valid",[],"NV8"],[[3067,3071],"disallowed"],[[3072,3072],"valid"],[[3073,3075],"valid"],[[3076,3076],"disallowed"],[[3077,3084],"valid"],[[3085,3085],"disallowed"],[[3086,3088],"valid"],[[3089,3089],"disallowed"],[[3090,3112],"valid"],[[3113,3113],"disallowed"],[[3114,3123],"valid"],[[3124,3124],"valid"],[[3125,3129],"valid"],[[3130,3132],"disallowed"],[[3133,3133],"valid"],[[3134,3140],"valid"],[[3141,3141],"disallowed"],[[3142,3144],"valid"],[[3145,3145],"disallowed"],[[3146,3149],"valid"],[[3150,3156],"disallowed"],[[3157,3158],"valid"],[[3159,3159],"disallowed"],[[3160,3161],"valid"],[[3162,3162],"valid"],[[3163,3167],"disallowed"],[[3168,3169],"valid"],[[3170,3171],"valid"],[[3172,3173],"disallowed"],[[3174,3183],"valid"],[[3184,3191],"disallowed"],[[3192,3199],"valid",[],"NV8"],[[3200,3200],"disallowed"],[[3201,3201],"valid"],[[3202,3203],"valid"],[[3204,3204],"disallowed"],[[3205,3212],"valid"],[[3213,3213],"disallowed"],[[3214,3216],"valid"],[[3217,3217],"disallowed"],[[3218,3240],"valid"],[[3241,3241],"disallowed"],[[3242,3251],"valid"],[[3252,3252],"disallowed"],[[3253,3257],"valid"],[[3258,3259],"disallowed"],[[3260,3261],"valid"],[[3262,3268],"valid"],[[3269,3269],"disallowed"],[[3270,3272],"valid"],[[3273,3273],"disallowed"],[[3274,3277],"valid"],[[3278,3284],"disallowed"],[[3285,3286],"valid"],[[3287,3293],"disallowed"],[[3294,3294],"valid"],[[3295,3295],"disallowed"],[[3296,3297],"valid"],[[3298,3299],"valid"],[[3300,3301],"disallowed"],[[3302,3311],"valid"],[[3312,3312],"disallowed"],[[3313,3314],"valid"],[[3315,3328],"disallowed"],[[3329,3329],"valid"],[[3330,3331],"valid"],[[3332,3332],"disallowed"],[[3333,3340],"valid"],[[3341,3341],"disallowed"],[[3342,3344],"valid"],[[3345,3345],"disallowed"],[[3346,3368],"valid"],[[3369,3369],"valid"],[[3370,3385],"valid"],[[3386,3386],"valid"],[[3387,3388],"disallowed"],[[3389,3389],"valid"],[[3390,3395],"valid"],[[3396,3396],"valid"],[[3397,3397],"disallowed"],[[3398,3400],"valid"],[[3401,3401],"disallowed"],[[3402,3405],"valid"],[[3406,3406],"valid"],[[3407,3414],"disallowed"],[[3415,3415],"valid"],[[3416,3422],"disallowed"],[[3423,3423],"valid"],[[3424,3425],"valid"],[[3426,3427],"valid"],[[3428,3429],"disallowed"],[[3430,3439],"valid"],[[3440,3445],"valid",[],"NV8"],[[3446,3448],"disallowed"],[[3449,3449],"valid",[],"NV8"],[[3450,3455],"valid"],[[3456,3457],"disallowed"],[[3458,3459],"valid"],[[3460,3460],"disallowed"],[[3461,3478],"valid"],[[3479,3481],"disallowed"],[[3482,3505],"valid"],[[3506,3506],"disallowed"],[[3507,3515],"valid"],[[3516,3516],"disallowed"],[[3517,3517],"valid"],[[3518,3519],"disallowed"],[[3520,3526],"valid"],[[3527,3529],"disallowed"],[[3530,3530],"valid"],[[3531,3534],"disallowed"],[[3535,3540],"valid"],[[3541,3541],"disallowed"],[[3542,3542],"valid"],[[3543,3543],"disallowed"],[[3544,3551],"valid"],[[3552,3557],"disallowed"],[[3558,3567],"valid"],[[3568,3569],"disallowed"],[[3570,3571],"valid"],[[3572,3572],"valid",[],"NV8"],[[3573,3584],"disallowed"],[[3585,3634],"valid"],[[3635,3635],"mapped",[3661,3634]],[[3636,3642],"valid"],[[3643,3646],"disallowed"],[[3647,3647],"valid",[],"NV8"],[[3648,3662],"valid"],[[3663,3663],"valid",[],"NV8"],[[3664,3673],"valid"],[[3674,3675],"valid",[],"NV8"],[[3676,3712],"disallowed"],[[3713,3714],"valid"],[[3715,3715],"disallowed"],[[3716,3716],"valid"],[[3717,3718],"disallowed"],[[3719,3720],"valid"],[[3721,3721],"disallowed"],[[3722,3722],"valid"],[[3723,3724],"disallowed"],[[3725,3725],"valid"],[[3726,3731],"disallowed"],[[3732,3735],"valid"],[[3736,3736],"disallowed"],[[3737,3743],"valid"],[[3744,3744],"disallowed"],[[3745,3747],"valid"],[[3748,3748],"disallowed"],[[3749,3749],"valid"],[[3750,3750],"disallowed"],[[3751,3751],"valid"],[[3752,3753],"disallowed"],[[3754,3755],"valid"],[[3756,3756],"disallowed"],[[3757,3762],"valid"],[[3763,3763],"mapped",[3789,3762]],[[3764,3769],"valid"],[[3770,3770],"disallowed"],[[3771,3773],"valid"],[[3774,3775],"disallowed"],[[3776,3780],"valid"],[[3781,3781],"disallowed"],[[3782,3782],"valid"],[[3783,3783],"disallowed"],[[3784,3789],"valid"],[[3790,3791],"disallowed"],[[3792,3801],"valid"],[[3802,3803],"disallowed"],[[3804,3804],"mapped",[3755,3737]],[[3805,3805],"mapped",[3755,3745]],[[3806,3807],"valid"],[[3808,3839],"disallowed"],[[3840,3840],"valid"],[[3841,3850],"valid",[],"NV8"],[[3851,3851],"valid"],[[3852,3852],"mapped",[3851]],[[3853,3863],"valid",[],"NV8"],[[3864,3865],"valid"],[[3866,3871],"valid",[],"NV8"],[[3872,3881],"valid"],[[3882,3892],"valid",[],"NV8"],[[3893,3893],"valid"],[[3894,3894],"valid",[],"NV8"],[[3895,3895],"valid"],[[3896,3896],"valid",[],"NV8"],[[3897,3897],"valid"],[[3898,3901],"valid",[],"NV8"],[[3902,3906],"valid"],[[3907,3907],"mapped",[3906,4023]],[[3908,3911],"valid"],[[3912,3912],"disallowed"],[[3913,3916],"valid"],[[3917,3917],"mapped",[3916,4023]],[[3918,3921],"valid"],[[3922,3922],"mapped",[3921,4023]],[[3923,3926],"valid"],[[3927,3927],"mapped",[3926,4023]],[[3928,3931],"valid"],[[3932,3932],"mapped",[3931,4023]],[[3933,3944],"valid"],[[3945,3945],"mapped",[3904,4021]],[[3946,3946],"valid"],[[3947,3948],"valid"],[[3949,3952],"disallowed"],[[3953,3954],"valid"],[[3955,3955],"mapped",[3953,3954]],[[3956,3956],"valid"],[[3957,3957],"mapped",[3953,3956]],[[3958,3958],"mapped",[4018,3968]],[[3959,3959],"mapped",[4018,3953,3968]],[[3960,3960],"mapped",[4019,3968]],[[3961,3961],"mapped",[4019,3953,3968]],[[3962,3968],"valid"],[[3969,3969],"mapped",[3953,3968]],[[3970,3972],"valid"],[[3973,3973],"valid",[],"NV8"],[[3974,3979],"valid"],[[3980,3983],"valid"],[[3984,3986],"valid"],[[3987,3987],"mapped",[3986,4023]],[[3988,3989],"valid"],[[3990,3990],"valid"],[[3991,3991],"valid"],[[3992,3992],"disallowed"],[[3993,3996],"valid"],[[3997,3997],"mapped",[3996,4023]],[[3998,4001],"valid"],[[4002,4002],"mapped",[4001,4023]],[[4003,4006],"valid"],[[4007,4007],"mapped",[4006,4023]],[[4008,4011],"valid"],[[4012,4012],"mapped",[4011,4023]],[[4013,4013],"valid"],[[4014,4016],"valid"],[[4017,4023],"valid"],[[4024,4024],"valid"],[[4025,4025],"mapped",[3984,4021]],[[4026,4028],"valid"],[[4029,4029],"disallowed"],[[4030,4037],"valid",[],"NV8"],[[4038,4038],"valid"],[[4039,4044],"valid",[],"NV8"],[[4045,4045],"disallowed"],[[4046,4046],"valid",[],"NV8"],[[4047,4047],"valid",[],"NV8"],[[4048,4049],"valid",[],"NV8"],[[4050,4052],"valid",[],"NV8"],[[4053,4056],"valid",[],"NV8"],[[4057,4058],"valid",[],"NV8"],[[4059,4095],"disallowed"],[[4096,4129],"valid"],[[4130,4130],"valid"],[[4131,4135],"valid"],[[4136,4136],"valid"],[[4137,4138],"valid"],[[4139,4139],"valid"],[[4140,4146],"valid"],[[4147,4149],"valid"],[[4150,4153],"valid"],[[4154,4159],"valid"],[[4160,4169],"valid"],[[4170,4175],"valid",[],"NV8"],[[4176,4185],"valid"],[[4186,4249],"valid"],[[4250,4253],"valid"],[[4254,4255],"valid",[],"NV8"],[[4256,4293],"disallowed"],[[4294,4294],"disallowed"],[[4295,4295],"mapped",[11559]],[[4296,4300],"disallowed"],[[4301,4301],"mapped",[11565]],[[4302,4303],"disallowed"],[[4304,4342],"valid"],[[4343,4344],"valid"],[[4345,4346],"valid"],[[4347,4347],"valid",[],"NV8"],[[4348,4348],"mapped",[4316]],[[4349,4351],"valid"],[[4352,4441],"valid",[],"NV8"],[[4442,4446],"valid",[],"NV8"],[[4447,4448],"disallowed"],[[4449,4514],"valid",[],"NV8"],[[4515,4519],"valid",[],"NV8"],[[4520,4601],"valid",[],"NV8"],[[4602,4607],"valid",[],"NV8"],[[4608,4614],"valid"],[[4615,4615],"valid"],[[4616,4678],"valid"],[[4679,4679],"valid"],[[4680,4680],"valid"],[[4681,4681],"disallowed"],[[4682,4685],"valid"],[[4686,4687],"disallowed"],[[4688,4694],"valid"],[[4695,4695],"disallowed"],[[4696,4696],"valid"],[[4697,4697],"disallowed"],[[4698,4701],"valid"],[[4702,4703],"disallowed"],[[4704,4742],"valid"],[[4743,4743],"valid"],[[4744,4744],"valid"],[[4745,4745],"disallowed"],[[4746,4749],"valid"],[[4750,4751],"disallowed"],[[4752,4782],"valid"],[[4783,4783],"valid"],[[4784,4784],"valid"],[[4785,4785],"disallowed"],[[4786,4789],"valid"],[[4790,4791],"disallowed"],[[4792,4798],"valid"],[[4799,4799],"disallowed"],[[4800,4800],"valid"],[[4801,4801],"disallowed"],[[4802,4805],"valid"],[[4806,4807],"disallowed"],[[4808,4814],"valid"],[[4815,4815],"valid"],[[4816,4822],"valid"],[[4823,4823],"disallowed"],[[4824,4846],"valid"],[[4847,4847],"valid"],[[4848,4878],"valid"],[[4879,4879],"valid"],[[4880,4880],"valid"],[[4881,4881],"disallowed"],[[4882,4885],"valid"],[[4886,4887],"disallowed"],[[4888,4894],"valid"],[[4895,4895],"valid"],[[4896,4934],"valid"],[[4935,4935],"valid"],[[4936,4954],"valid"],[[4955,4956],"disallowed"],[[4957,4958],"valid"],[[4959,4959],"valid"],[[4960,4960],"valid",[],"NV8"],[[4961,4988],"valid",[],"NV8"],[[4989,4991],"disallowed"],[[4992,5007],"valid"],[[5008,5017],"valid",[],"NV8"],[[5018,5023],"disallowed"],[[5024,5108],"valid"],[[5109,5109],"valid"],[[5110,5111],"disallowed"],[[5112,5112],"mapped",[5104]],[[5113,5113],"mapped",[5105]],[[5114,5114],"mapped",[5106]],[[5115,5115],"mapped",[5107]],[[5116,5116],"mapped",[5108]],[[5117,5117],"mapped",[5109]],[[5118,5119],"disallowed"],[[5120,5120],"valid",[],"NV8"],[[5121,5740],"valid"],[[5741,5742],"valid",[],"NV8"],[[5743,5750],"valid"],[[5751,5759],"valid"],[[5760,5760],"disallowed"],[[5761,5786],"valid"],[[5787,5788],"valid",[],"NV8"],[[5789,5791],"disallowed"],[[5792,5866],"valid"],[[5867,5872],"valid",[],"NV8"],[[5873,5880],"valid"],[[5881,5887],"disallowed"],[[5888,5900],"valid"],[[5901,5901],"disallowed"],[[5902,5908],"valid"],[[5909,5919],"disallowed"],[[5920,5940],"valid"],[[5941,5942],"valid",[],"NV8"],[[5943,5951],"disallowed"],[[5952,5971],"valid"],[[5972,5983],"disallowed"],[[5984,5996],"valid"],[[5997,5997],"disallowed"],[[5998,6000],"valid"],[[6001,6001],"disallowed"],[[6002,6003],"valid"],[[6004,6015],"disallowed"],[[6016,6067],"valid"],[[6068,6069],"disallowed"],[[6070,6099],"valid"],[[6100,6102],"valid",[],"NV8"],[[6103,6103],"valid"],[[6104,6107],"valid",[],"NV8"],[[6108,6108],"valid"],[[6109,6109],"valid"],[[6110,6111],"disallowed"],[[6112,6121],"valid"],[[6122,6127],"disallowed"],[[6128,6137],"valid",[],"NV8"],[[6138,6143],"disallowed"],[[6144,6149],"valid",[],"NV8"],[[6150,6150],"disallowed"],[[6151,6154],"valid",[],"NV8"],[[6155,6157],"ignored"],[[6158,6158],"disallowed"],[[6159,6159],"disallowed"],[[6160,6169],"valid"],[[6170,6175],"disallowed"],[[6176,6263],"valid"],[[6264,6271],"disallowed"],[[6272,6313],"valid"],[[6314,6314],"valid"],[[6315,6319],"disallowed"],[[6320,6389],"valid"],[[6390,6399],"disallowed"],[[6400,6428],"valid"],[[6429,6430],"valid"],[[6431,6431],"disallowed"],[[6432,6443],"valid"],[[6444,6447],"disallowed"],[[6448,6459],"valid"],[[6460,6463],"disallowed"],[[6464,6464],"valid",[],"NV8"],[[6465,6467],"disallowed"],[[6468,6469],"valid",[],"NV8"],[[6470,6509],"valid"],[[6510,6511],"disallowed"],[[6512,6516],"valid"],[[6517,6527],"disallowed"],[[6528,6569],"valid"],[[6570,6571],"valid"],[[6572,6575],"disallowed"],[[6576,6601],"valid"],[[6602,6607],"disallowed"],[[6608,6617],"valid"],[[6618,6618],"valid",[],"XV8"],[[6619,6621],"disallowed"],[[6622,6623],"valid",[],"NV8"],[[6624,6655],"valid",[],"NV8"],[[6656,6683],"valid"],[[6684,6685],"disallowed"],[[6686,6687],"valid",[],"NV8"],[[6688,6750],"valid"],[[6751,6751],"disallowed"],[[6752,6780],"valid"],[[6781,6782],"disallowed"],[[6783,6793],"valid"],[[6794,6799],"disallowed"],[[6800,6809],"valid"],[[6810,6815],"disallowed"],[[6816,6822],"valid",[],"NV8"],[[6823,6823],"valid"],[[6824,6829],"valid",[],"NV8"],[[6830,6831],"disallowed"],[[6832,6845],"valid"],[[6846,6846],"valid",[],"NV8"],[[6847,6911],"disallowed"],[[6912,6987],"valid"],[[6988,6991],"disallowed"],[[6992,7001],"valid"],[[7002,7018],"valid",[],"NV8"],[[7019,7027],"valid"],[[7028,7036],"valid",[],"NV8"],[[7037,7039],"disallowed"],[[7040,7082],"valid"],[[7083,7085],"valid"],[[7086,7097],"valid"],[[7098,7103],"valid"],[[7104,7155],"valid"],[[7156,7163],"disallowed"],[[7164,7167],"valid",[],"NV8"],[[7168,7223],"valid"],[[7224,7226],"disallowed"],[[7227,7231],"valid",[],"NV8"],[[7232,7241],"valid"],[[7242,7244],"disallowed"],[[7245,7293],"valid"],[[7294,7295],"valid",[],"NV8"],[[7296,7359],"disallowed"],[[7360,7367],"valid",[],"NV8"],[[7368,7375],"disallowed"],[[7376,7378],"valid"],[[7379,7379],"valid",[],"NV8"],[[7380,7410],"valid"],[[7411,7414],"valid"],[[7415,7415],"disallowed"],[[7416,7417],"valid"],[[7418,7423],"disallowed"],[[7424,7467],"valid"],[[7468,7468],"mapped",[97]],[[7469,7469],"mapped",[230]],[[7470,7470],"mapped",[98]],[[7471,7471],"valid"],[[7472,7472],"mapped",[100]],[[7473,7473],"mapped",[101]],[[7474,7474],"mapped",[477]],[[7475,7475],"mapped",[103]],[[7476,7476],"mapped",[104]],[[7477,7477],"mapped",[105]],[[7478,7478],"mapped",[106]],[[7479,7479],"mapped",[107]],[[7480,7480],"mapped",[108]],[[7481,7481],"mapped",[109]],[[7482,7482],"mapped",[110]],[[7483,7483],"valid"],[[7484,7484],"mapped",[111]],[[7485,7485],"mapped",[547]],[[7486,7486],"mapped",[112]],[[7487,7487],"mapped",[114]],[[7488,7488],"mapped",[116]],[[7489,7489],"mapped",[117]],[[7490,7490],"mapped",[119]],[[7491,7491],"mapped",[97]],[[7492,7492],"mapped",[592]],[[7493,7493],"mapped",[593]],[[7494,7494],"mapped",[7426]],[[7495,7495],"mapped",[98]],[[7496,7496],"mapped",[100]],[[7497,7497],"mapped",[101]],[[7498,7498],"mapped",[601]],[[7499,7499],"mapped",[603]],[[7500,7500],"mapped",[604]],[[7501,7501],"mapped",[103]],[[7502,7502],"valid"],[[7503,7503],"mapped",[107]],[[7504,7504],"mapped",[109]],[[7505,7505],"mapped",[331]],[[7506,7506],"mapped",[111]],[[7507,7507],"mapped",[596]],[[7508,7508],"mapped",[7446]],[[7509,7509],"mapped",[7447]],[[7510,7510],"mapped",[112]],[[7511,7511],"mapped",[116]],[[7512,7512],"mapped",[117]],[[7513,7513],"mapped",[7453]],[[7514,7514],"mapped",[623]],[[7515,7515],"mapped",[118]],[[7516,7516],"mapped",[7461]],[[7517,7517],"mapped",[946]],[[7518,7518],"mapped",[947]],[[7519,7519],"mapped",[948]],[[7520,7520],"mapped",[966]],[[7521,7521],"mapped",[967]],[[7522,7522],"mapped",[105]],[[7523,7523],"mapped",[114]],[[7524,7524],"mapped",[117]],[[7525,7525],"mapped",[118]],[[7526,7526],"mapped",[946]],[[7527,7527],"mapped",[947]],[[7528,7528],"mapped",[961]],[[7529,7529],"mapped",[966]],[[7530,7530],"mapped",[967]],[[7531,7531],"valid"],[[7532,7543],"valid"],[[7544,7544],"mapped",[1085]],[[7545,7578],"valid"],[[7579,7579],"mapped",[594]],[[7580,7580],"mapped",[99]],[[7581,7581],"mapped",[597]],[[7582,7582],"mapped",[240]],[[7583,7583],"mapped",[604]],[[7584,7584],"mapped",[102]],[[7585,7585],"mapped",[607]],[[7586,7586],"mapped",[609]],[[7587,7587],"mapped",[613]],[[7588,7588],"mapped",[616]],[[7589,7589],"mapped",[617]],[[7590,7590],"mapped",[618]],[[7591,7591],"mapped",[7547]],[[7592,7592],"mapped",[669]],[[7593,7593],"mapped",[621]],[[7594,7594],"mapped",[7557]],[[7595,7595],"mapped",[671]],[[7596,7596],"mapped",[625]],[[7597,7597],"mapped",[624]],[[7598,7598],"mapped",[626]],[[7599,7599],"mapped",[627]],[[7600,7600],"mapped",[628]],[[7601,7601],"mapped",[629]],[[7602,7602],"mapped",[632]],[[7603,7603],"mapped",[642]],[[7604,7604],"mapped",[643]],[[7605,7605],"mapped",[427]],[[7606,7606],"mapped",[649]],[[7607,7607],"mapped",[650]],[[7608,7608],"mapped",[7452]],[[7609,7609],"mapped",[651]],[[7610,7610],"mapped",[652]],[[7611,7611],"mapped",[122]],[[7612,7612],"mapped",[656]],[[7613,7613],"mapped",[657]],[[7614,7614],"mapped",[658]],[[7615,7615],"mapped",[952]],[[7616,7619],"valid"],[[7620,7626],"valid"],[[7627,7654],"valid"],[[7655,7669],"valid"],[[7670,7675],"disallowed"],[[7676,7676],"valid"],[[7677,7677],"valid"],[[7678,7679],"valid"],[[7680,7680],"mapped",[7681]],[[7681,7681],"valid"],[[7682,7682],"mapped",[7683]],[[7683,7683],"valid"],[[7684,7684],"mapped",[7685]],[[7685,7685],"valid"],[[7686,7686],"mapped",[7687]],[[7687,7687],"valid"],[[7688,7688],"mapped",[7689]],[[7689,7689],"valid"],[[7690,7690],"mapped",[7691]],[[7691,7691],"valid"],[[7692,7692],"mapped",[7693]],[[7693,7693],"valid"],[[7694,7694],"mapped",[7695]],[[7695,7695],"valid"],[[7696,7696],"mapped",[7697]],[[7697,7697],"valid"],[[7698,7698],"mapped",[7699]],[[7699,7699],"valid"],[[7700,7700],"mapped",[7701]],[[7701,7701],"valid"],[[7702,7702],"mapped",[7703]],[[7703,7703],"valid"],[[7704,7704],"mapped",[7705]],[[7705,7705],"valid"],[[7706,7706],"mapped",[7707]],[[7707,7707],"valid"],[[7708,7708],"mapped",[7709]],[[7709,7709],"valid"],[[7710,7710],"mapped",[7711]],[[7711,7711],"valid"],[[7712,7712],"mapped",[7713]],[[7713,7713],"valid"],[[7714,7714],"mapped",[7715]],[[7715,7715],"valid"],[[7716,7716],"mapped",[7717]],[[7717,7717],"valid"],[[7718,7718],"mapped",[7719]],[[7719,7719],"valid"],[[7720,7720],"mapped",[7721]],[[7721,7721],"valid"],[[7722,7722],"mapped",[7723]],[[7723,7723],"valid"],[[7724,7724],"mapped",[7725]],[[7725,7725],"valid"],[[7726,7726],"mapped",[7727]],[[7727,7727],"valid"],[[7728,7728],"mapped",[7729]],[[7729,7729],"valid"],[[7730,7730],"mapped",[7731]],[[7731,7731],"valid"],[[7732,7732],"mapped",[7733]],[[7733,7733],"valid"],[[7734,7734],"mapped",[7735]],[[7735,7735],"valid"],[[7736,7736],"mapped",[7737]],[[7737,7737],"valid"],[[7738,7738],"mapped",[7739]],[[7739,7739],"valid"],[[7740,7740],"mapped",[7741]],[[7741,7741],"valid"],[[7742,7742],"mapped",[7743]],[[7743,7743],"valid"],[[7744,7744],"mapped",[7745]],[[7745,7745],"valid"],[[7746,7746],"mapped",[7747]],[[7747,7747],"valid"],[[7748,7748],"mapped",[7749]],[[7749,7749],"valid"],[[7750,7750],"mapped",[7751]],[[7751,7751],"valid"],[[7752,7752],"mapped",[7753]],[[7753,7753],"valid"],[[7754,7754],"mapped",[7755]],[[7755,7755],"valid"],[[7756,7756],"mapped",[7757]],[[7757,7757],"valid"],[[7758,7758],"mapped",[7759]],[[7759,7759],"valid"],[[7760,7760],"mapped",[7761]],[[7761,7761],"valid"],[[7762,7762],"mapped",[7763]],[[7763,7763],"valid"],[[7764,7764],"mapped",[7765]],[[7765,7765],"valid"],[[7766,7766],"mapped",[7767]],[[7767,7767],"valid"],[[7768,7768],"mapped",[7769]],[[7769,7769],"valid"],[[7770,7770],"mapped",[7771]],[[7771,7771],"valid"],[[7772,7772],"mapped",[7773]],[[7773,7773],"valid"],[[7774,7774],"mapped",[7775]],[[7775,7775],"valid"],[[7776,7776],"mapped",[7777]],[[7777,7777],"valid"],[[7778,7778],"mapped",[7779]],[[7779,7779],"valid"],[[7780,7780],"mapped",[7781]],[[7781,7781],"valid"],[[7782,7782],"mapped",[7783]],[[7783,7783],"valid"],[[7784,7784],"mapped",[7785]],[[7785,7785],"valid"],[[7786,7786],"mapped",[7787]],[[7787,7787],"valid"],[[7788,7788],"mapped",[7789]],[[7789,7789],"valid"],[[7790,7790],"mapped",[7791]],[[7791,7791],"valid"],[[7792,7792],"mapped",[7793]],[[7793,7793],"valid"],[[7794,7794],"mapped",[7795]],[[7795,7795],"valid"],[[7796,7796],"mapped",[7797]],[[7797,7797],"valid"],[[7798,7798],"mapped",[7799]],[[7799,7799],"valid"],[[7800,7800],"mapped",[7801]],[[7801,7801],"valid"],[[7802,7802],"mapped",[7803]],[[7803,7803],"valid"],[[7804,7804],"mapped",[7805]],[[7805,7805],"valid"],[[7806,7806],"mapped",[7807]],[[7807,7807],"valid"],[[7808,7808],"mapped",[7809]],[[7809,7809],"valid"],[[7810,7810],"mapped",[7811]],[[7811,7811],"valid"],[[7812,7812],"mapped",[7813]],[[7813,7813],"valid"],[[7814,7814],"mapped",[7815]],[[7815,7815],"valid"],[[7816,7816],"mapped",[7817]],[[7817,7817],"valid"],[[7818,7818],"mapped",[7819]],[[7819,7819],"valid"],[[7820,7820],"mapped",[7821]],[[7821,7821],"valid"],[[7822,7822],"mapped",[7823]],[[7823,7823],"valid"],[[7824,7824],"mapped",[7825]],[[7825,7825],"valid"],[[7826,7826],"mapped",[7827]],[[7827,7827],"valid"],[[7828,7828],"mapped",[7829]],[[7829,7833],"valid"],[[7834,7834],"mapped",[97,702]],[[7835,7835],"mapped",[7777]],[[7836,7837],"valid"],[[7838,7838],"mapped",[115,115]],[[7839,7839],"valid"],[[7840,7840],"mapped",[7841]],[[7841,7841],"valid"],[[7842,7842],"mapped",[7843]],[[7843,7843],"valid"],[[7844,7844],"mapped",[7845]],[[7845,7845],"valid"],[[7846,7846],"mapped",[7847]],[[7847,7847],"valid"],[[7848,7848],"mapped",[7849]],[[7849,7849],"valid"],[[7850,7850],"mapped",[7851]],[[7851,7851],"valid"],[[7852,7852],"mapped",[7853]],[[7853,7853],"valid"],[[7854,7854],"mapped",[7855]],[[7855,7855],"valid"],[[7856,7856],"mapped",[7857]],[[7857,7857],"valid"],[[7858,7858],"mapped",[7859]],[[7859,7859],"valid"],[[7860,7860],"mapped",[7861]],[[7861,7861],"valid"],[[7862,7862],"mapped",[7863]],[[7863,7863],"valid"],[[7864,7864],"mapped",[7865]],[[7865,7865],"valid"],[[7866,7866],"mapped",[7867]],[[7867,7867],"valid"],[[7868,7868],"mapped",[7869]],[[7869,7869],"valid"],[[7870,7870],"mapped",[7871]],[[7871,7871],"valid"],[[7872,7872],"mapped",[7873]],[[7873,7873],"valid"],[[7874,7874],"mapped",[7875]],[[7875,7875],"valid"],[[7876,7876],"mapped",[7877]],[[7877,7877],"valid"],[[7878,7878],"mapped",[7879]],[[7879,7879],"valid"],[[7880,7880],"mapped",[7881]],[[7881,7881],"valid"],[[7882,7882],"mapped",[7883]],[[7883,7883],"valid"],[[7884,7884],"mapped",[7885]],[[7885,7885],"valid"],[[7886,7886],"mapped",[7887]],[[7887,7887],"valid"],[[7888,7888],"mapped",[7889]],[[7889,7889],"valid"],[[7890,7890],"mapped",[7891]],[[7891,7891],"valid"],[[7892,7892],"mapped",[7893]],[[7893,7893],"valid"],[[7894,7894],"mapped",[7895]],[[7895,7895],"valid"],[[7896,7896],"mapped",[7897]],[[7897,7897],"valid"],[[7898,7898],"mapped",[7899]],[[7899,7899],"valid"],[[7900,7900],"mapped",[7901]],[[7901,7901],"valid"],[[7902,7902],"mapped",[7903]],[[7903,7903],"valid"],[[7904,7904],"mapped",[7905]],[[7905,7905],"valid"],[[7906,7906],"mapped",[7907]],[[7907,7907],"valid"],[[7908,7908],"mapped",[7909]],[[7909,7909],"valid"],[[7910,7910],"mapped",[7911]],[[7911,7911],"valid"],[[7912,7912],"mapped",[7913]],[[7913,7913],"valid"],[[7914,7914],"mapped",[7915]],[[7915,7915],"valid"],[[7916,7916],"mapped",[7917]],[[7917,7917],"valid"],[[7918,7918],"mapped",[7919]],[[7919,7919],"valid"],[[7920,7920],"mapped",[7921]],[[7921,7921],"valid"],[[7922,7922],"mapped",[7923]],[[7923,7923],"valid"],[[7924,7924],"mapped",[7925]],[[7925,7925],"valid"],[[7926,7926],"mapped",[7927]],[[7927,7927],"valid"],[[7928,7928],"mapped",[7929]],[[7929,7929],"valid"],[[7930,7930],"mapped",[7931]],[[7931,7931],"valid"],[[7932,7932],"mapped",[7933]],[[7933,7933],"valid"],[[7934,7934],"mapped",[7935]],[[7935,7935],"valid"],[[7936,7943],"valid"],[[7944,7944],"mapped",[7936]],[[7945,7945],"mapped",[7937]],[[7946,7946],"mapped",[7938]],[[7947,7947],"mapped",[7939]],[[7948,7948],"mapped",[7940]],[[7949,7949],"mapped",[7941]],[[7950,7950],"mapped",[7942]],[[7951,7951],"mapped",[7943]],[[7952,7957],"valid"],[[7958,7959],"disallowed"],[[7960,7960],"mapped",[7952]],[[7961,7961],"mapped",[7953]],[[7962,7962],"mapped",[7954]],[[7963,7963],"mapped",[7955]],[[7964,7964],"mapped",[7956]],[[7965,7965],"mapped",[7957]],[[7966,7967],"disallowed"],[[7968,7975],"valid"],[[7976,7976],"mapped",[7968]],[[7977,7977],"mapped",[7969]],[[7978,7978],"mapped",[7970]],[[7979,7979],"mapped",[7971]],[[7980,7980],"mapped",[7972]],[[7981,7981],"mapped",[7973]],[[7982,7982],"mapped",[7974]],[[7983,7983],"mapped",[7975]],[[7984,7991],"valid"],[[7992,7992],"mapped",[7984]],[[7993,7993],"mapped",[7985]],[[7994,7994],"mapped",[7986]],[[7995,7995],"mapped",[7987]],[[7996,7996],"mapped",[7988]],[[7997,7997],"mapped",[7989]],[[7998,7998],"mapped",[7990]],[[7999,7999],"mapped",[7991]],[[8000,8005],"valid"],[[8006,8007],"disallowed"],[[8008,8008],"mapped",[8000]],[[8009,8009],"mapped",[8001]],[[8010,8010],"mapped",[8002]],[[8011,8011],"mapped",[8003]],[[8012,8012],"mapped",[8004]],[[8013,8013],"mapped",[8005]],[[8014,8015],"disallowed"],[[8016,8023],"valid"],[[8024,8024],"disallowed"],[[8025,8025],"mapped",[8017]],[[8026,8026],"disallowed"],[[8027,8027],"mapped",[8019]],[[8028,8028],"disallowed"],[[8029,8029],"mapped",[8021]],[[8030,8030],"disallowed"],[[8031,8031],"mapped",[8023]],[[8032,8039],"valid"],[[8040,8040],"mapped",[8032]],[[8041,8041],"mapped",[8033]],[[8042,8042],"mapped",[8034]],[[8043,8043],"mapped",[8035]],[[8044,8044],"mapped",[8036]],[[8045,8045],"mapped",[8037]],[[8046,8046],"mapped",[8038]],[[8047,8047],"mapped",[8039]],[[8048,8048],"valid"],[[8049,8049],"mapped",[940]],[[8050,8050],"valid"],[[8051,8051],"mapped",[941]],[[8052,8052],"valid"],[[8053,8053],"mapped",[942]],[[8054,8054],"valid"],[[8055,8055],"mapped",[943]],[[8056,8056],"valid"],[[8057,8057],"mapped",[972]],[[8058,8058],"valid"],[[8059,8059],"mapped",[973]],[[8060,8060],"valid"],[[8061,8061],"mapped",[974]],[[8062,8063],"disallowed"],[[8064,8064],"mapped",[7936,953]],[[8065,8065],"mapped",[7937,953]],[[8066,8066],"mapped",[7938,953]],[[8067,8067],"mapped",[7939,953]],[[8068,8068],"mapped",[7940,953]],[[8069,8069],"mapped",[7941,953]],[[8070,8070],"mapped",[7942,953]],[[8071,8071],"mapped",[7943,953]],[[8072,8072],"mapped",[7936,953]],[[8073,8073],"mapped",[7937,953]],[[8074,8074],"mapped",[7938,953]],[[8075,8075],"mapped",[7939,953]],[[8076,8076],"mapped",[7940,953]],[[8077,8077],"mapped",[7941,953]],[[8078,8078],"mapped",[7942,953]],[[8079,8079],"mapped",[7943,953]],[[8080,8080],"mapped",[7968,953]],[[8081,8081],"mapped",[7969,953]],[[8082,8082],"mapped",[7970,953]],[[8083,8083],"mapped",[7971,953]],[[8084,8084],"mapped",[7972,953]],[[8085,8085],"mapped",[7973,953]],[[8086,8086],"mapped",[7974,953]],[[8087,8087],"mapped",[7975,953]],[[8088,8088],"mapped",[7968,953]],[[8089,8089],"mapped",[7969,953]],[[8090,8090],"mapped",[7970,953]],[[8091,8091],"mapped",[7971,953]],[[8092,8092],"mapped",[7972,953]],[[8093,8093],"mapped",[7973,953]],[[8094,8094],"mapped",[7974,953]],[[8095,8095],"mapped",[7975,953]],[[8096,8096],"mapped",[8032,953]],[[8097,8097],"mapped",[8033,953]],[[8098,8098],"mapped",[8034,953]],[[8099,8099],"mapped",[8035,953]],[[8100,8100],"mapped",[8036,953]],[[8101,8101],"mapped",[8037,953]],[[8102,8102],"mapped",[8038,953]],[[8103,8103],"mapped",[8039,953]],[[8104,8104],"mapped",[8032,953]],[[8105,8105],"mapped",[8033,953]],[[8106,8106],"mapped",[8034,953]],[[8107,8107],"mapped",[8035,953]],[[8108,8108],"mapped",[8036,953]],[[8109,8109],"mapped",[8037,953]],[[8110,8110],"mapped",[8038,953]],[[8111,8111],"mapped",[8039,953]],[[8112,8113],"valid"],[[8114,8114],"mapped",[8048,953]],[[8115,8115],"mapped",[945,953]],[[8116,8116],"mapped",[940,953]],[[8117,8117],"disallowed"],[[8118,8118],"valid"],[[8119,8119],"mapped",[8118,953]],[[8120,8120],"mapped",[8112]],[[8121,8121],"mapped",[8113]],[[8122,8122],"mapped",[8048]],[[8123,8123],"mapped",[940]],[[8124,8124],"mapped",[945,953]],[[8125,8125],"disallowed_STD3_mapped",[32,787]],[[8126,8126],"mapped",[953]],[[8127,8127],"disallowed_STD3_mapped",[32,787]],[[8128,8128],"disallowed_STD3_mapped",[32,834]],[[8129,8129],"disallowed_STD3_mapped",[32,776,834]],[[8130,8130],"mapped",[8052,953]],[[8131,8131],"mapped",[951,953]],[[8132,8132],"mapped",[942,953]],[[8133,8133],"disallowed"],[[8134,8134],"valid"],[[8135,8135],"mapped",[8134,953]],[[8136,8136],"mapped",[8050]],[[8137,8137],"mapped",[941]],[[8138,8138],"mapped",[8052]],[[8139,8139],"mapped",[942]],[[8140,8140],"mapped",[951,953]],[[8141,8141],"disallowed_STD3_mapped",[32,787,768]],[[8142,8142],"disallowed_STD3_mapped",[32,787,769]],[[8143,8143],"disallowed_STD3_mapped",[32,787,834]],[[8144,8146],"valid"],[[8147,8147],"mapped",[912]],[[8148,8149],"disallowed"],[[8150,8151],"valid"],[[8152,8152],"mapped",[8144]],[[8153,8153],"mapped",[8145]],[[8154,8154],"mapped",[8054]],[[8155,8155],"mapped",[943]],[[8156,8156],"disallowed"],[[8157,8157],"disallowed_STD3_mapped",[32,788,768]],[[8158,8158],"disallowed_STD3_mapped",[32,788,769]],[[8159,8159],"disallowed_STD3_mapped",[32,788,834]],[[8160,8162],"valid"],[[8163,8163],"mapped",[944]],[[8164,8167],"valid"],[[8168,8168],"mapped",[8160]],[[8169,8169],"mapped",[8161]],[[8170,8170],"mapped",[8058]],[[8171,8171],"mapped",[973]],[[8172,8172],"mapped",[8165]],[[8173,8173],"disallowed_STD3_mapped",[32,776,768]],[[8174,8174],"disallowed_STD3_mapped",[32,776,769]],[[8175,8175],"disallowed_STD3_mapped",[96]],[[8176,8177],"disallowed"],[[8178,8178],"mapped",[8060,953]],[[8179,8179],"mapped",[969,953]],[[8180,8180],"mapped",[974,953]],[[8181,8181],"disallowed"],[[8182,8182],"valid"],[[8183,8183],"mapped",[8182,953]],[[8184,8184],"mapped",[8056]],[[8185,8185],"mapped",[972]],[[8186,8186],"mapped",[8060]],[[8187,8187],"mapped",[974]],[[8188,8188],"mapped",[969,953]],[[8189,8189],"disallowed_STD3_mapped",[32,769]],[[8190,8190],"disallowed_STD3_mapped",[32,788]],[[8191,8191],"disallowed"],[[8192,8202],"disallowed_STD3_mapped",[32]],[[8203,8203],"ignored"],[[8204,8205],"deviation",[]],[[8206,8207],"disallowed"],[[8208,8208],"valid",[],"NV8"],[[8209,8209],"mapped",[8208]],[[8210,8214],"valid",[],"NV8"],[[8215,8215],"disallowed_STD3_mapped",[32,819]],[[8216,8227],"valid",[],"NV8"],[[8228,8230],"disallowed"],[[8231,8231],"valid",[],"NV8"],[[8232,8238],"disallowed"],[[8239,8239],"disallowed_STD3_mapped",[32]],[[8240,8242],"valid",[],"NV8"],[[8243,8243],"mapped",[8242,8242]],[[8244,8244],"mapped",[8242,8242,8242]],[[8245,8245],"valid",[],"NV8"],[[8246,8246],"mapped",[8245,8245]],[[8247,8247],"mapped",[8245,8245,8245]],[[8248,8251],"valid",[],"NV8"],[[8252,8252],"disallowed_STD3_mapped",[33,33]],[[8253,8253],"valid",[],"NV8"],[[8254,8254],"disallowed_STD3_mapped",[32,773]],[[8255,8262],"valid",[],"NV8"],[[8263,8263],"disallowed_STD3_mapped",[63,63]],[[8264,8264],"disallowed_STD3_mapped",[63,33]],[[8265,8265],"disallowed_STD3_mapped",[33,63]],[[8266,8269],"valid",[],"NV8"],[[8270,8274],"valid",[],"NV8"],[[8275,8276],"valid",[],"NV8"],[[8277,8278],"valid",[],"NV8"],[[8279,8279],"mapped",[8242,8242,8242,8242]],[[8280,8286],"valid",[],"NV8"],[[8287,8287],"disallowed_STD3_mapped",[32]],[[8288,8288],"ignored"],[[8289,8291],"disallowed"],[[8292,8292],"ignored"],[[8293,8293],"disallowed"],[[8294,8297],"disallowed"],[[8298,8303],"disallowed"],[[8304,8304],"mapped",[48]],[[8305,8305],"mapped",[105]],[[8306,8307],"disallowed"],[[8308,8308],"mapped",[52]],[[8309,8309],"mapped",[53]],[[8310,8310],"mapped",[54]],[[8311,8311],"mapped",[55]],[[8312,8312],"mapped",[56]],[[8313,8313],"mapped",[57]],[[8314,8314],"disallowed_STD3_mapped",[43]],[[8315,8315],"mapped",[8722]],[[8316,8316],"disallowed_STD3_mapped",[61]],[[8317,8317],"disallowed_STD3_mapped",[40]],[[8318,8318],"disallowed_STD3_mapped",[41]],[[8319,8319],"mapped",[110]],[[8320,8320],"mapped",[48]],[[8321,8321],"mapped",[49]],[[8322,8322],"mapped",[50]],[[8323,8323],"mapped",[51]],[[8324,8324],"mapped",[52]],[[8325,8325],"mapped",[53]],[[8326,8326],"mapped",[54]],[[8327,8327],"mapped",[55]],[[8328,8328],"mapped",[56]],[[8329,8329],"mapped",[57]],[[8330,8330],"disallowed_STD3_mapped",[43]],[[8331,8331],"mapped",[8722]],[[8332,8332],"disallowed_STD3_mapped",[61]],[[8333,8333],"disallowed_STD3_mapped",[40]],[[8334,8334],"disallowed_STD3_mapped",[41]],[[8335,8335],"disallowed"],[[8336,8336],"mapped",[97]],[[8337,8337],"mapped",[101]],[[8338,8338],"mapped",[111]],[[8339,8339],"mapped",[120]],[[8340,8340],"mapped",[601]],[[8341,8341],"mapped",[104]],[[8342,8342],"mapped",[107]],[[8343,8343],"mapped",[108]],[[8344,8344],"mapped",[109]],[[8345,8345],"mapped",[110]],[[8346,8346],"mapped",[112]],[[8347,8347],"mapped",[115]],[[8348,8348],"mapped",[116]],[[8349,8351],"disallowed"],[[8352,8359],"valid",[],"NV8"],[[8360,8360],"mapped",[114,115]],[[8361,8362],"valid",[],"NV8"],[[8363,8363],"valid",[],"NV8"],[[8364,8364],"valid",[],"NV8"],[[8365,8367],"valid",[],"NV8"],[[8368,8369],"valid",[],"NV8"],[[8370,8373],"valid",[],"NV8"],[[8374,8376],"valid",[],"NV8"],[[8377,8377],"valid",[],"NV8"],[[8378,8378],"valid",[],"NV8"],[[8379,8381],"valid",[],"NV8"],[[8382,8382],"valid",[],"NV8"],[[8383,8399],"disallowed"],[[8400,8417],"valid",[],"NV8"],[[8418,8419],"valid",[],"NV8"],[[8420,8426],"valid",[],"NV8"],[[8427,8427],"valid",[],"NV8"],[[8428,8431],"valid",[],"NV8"],[[8432,8432],"valid",[],"NV8"],[[8433,8447],"disallowed"],[[8448,8448],"disallowed_STD3_mapped",[97,47,99]],[[8449,8449],"disallowed_STD3_mapped",[97,47,115]],[[8450,8450],"mapped",[99]],[[8451,8451],"mapped",[176,99]],[[8452,8452],"valid",[],"NV8"],[[8453,8453],"disallowed_STD3_mapped",[99,47,111]],[[8454,8454],"disallowed_STD3_mapped",[99,47,117]],[[8455,8455],"mapped",[603]],[[8456,8456],"valid",[],"NV8"],[[8457,8457],"mapped",[176,102]],[[8458,8458],"mapped",[103]],[[8459,8462],"mapped",[104]],[[8463,8463],"mapped",[295]],[[8464,8465],"mapped",[105]],[[8466,8467],"mapped",[108]],[[8468,8468],"valid",[],"NV8"],[[8469,8469],"mapped",[110]],[[8470,8470],"mapped",[110,111]],[[8471,8472],"valid",[],"NV8"],[[8473,8473],"mapped",[112]],[[8474,8474],"mapped",[113]],[[8475,8477],"mapped",[114]],[[8478,8479],"valid",[],"NV8"],[[8480,8480],"mapped",[115,109]],[[8481,8481],"mapped",[116,101,108]],[[8482,8482],"mapped",[116,109]],[[8483,8483],"valid",[],"NV8"],[[8484,8484],"mapped",[122]],[[8485,8485],"valid",[],"NV8"],[[8486,8486],"mapped",[969]],[[8487,8487],"valid",[],"NV8"],[[8488,8488],"mapped",[122]],[[8489,8489],"valid",[],"NV8"],[[8490,8490],"mapped",[107]],[[8491,8491],"mapped",[229]],[[8492,8492],"mapped",[98]],[[8493,8493],"mapped",[99]],[[8494,8494],"valid",[],"NV8"],[[8495,8496],"mapped",[101]],[[8497,8497],"mapped",[102]],[[8498,8498],"disallowed"],[[8499,8499],"mapped",[109]],[[8500,8500],"mapped",[111]],[[8501,8501],"mapped",[1488]],[[8502,8502],"mapped",[1489]],[[8503,8503],"mapped",[1490]],[[8504,8504],"mapped",[1491]],[[8505,8505],"mapped",[105]],[[8506,8506],"valid",[],"NV8"],[[8507,8507],"mapped",[102,97,120]],[[8508,8508],"mapped",[960]],[[8509,8510],"mapped",[947]],[[8511,8511],"mapped",[960]],[[8512,8512],"mapped",[8721]],[[8513,8516],"valid",[],"NV8"],[[8517,8518],"mapped",[100]],[[8519,8519],"mapped",[101]],[[8520,8520],"mapped",[105]],[[8521,8521],"mapped",[106]],[[8522,8523],"valid",[],"NV8"],[[8524,8524],"valid",[],"NV8"],[[8525,8525],"valid",[],"NV8"],[[8526,8526],"valid"],[[8527,8527],"valid",[],"NV8"],[[8528,8528],"mapped",[49,8260,55]],[[8529,8529],"mapped",[49,8260,57]],[[8530,8530],"mapped",[49,8260,49,48]],[[8531,8531],"mapped",[49,8260,51]],[[8532,8532],"mapped",[50,8260,51]],[[8533,8533],"mapped",[49,8260,53]],[[8534,8534],"mapped",[50,8260,53]],[[8535,8535],"mapped",[51,8260,53]],[[8536,8536],"mapped",[52,8260,53]],[[8537,8537],"mapped",[49,8260,54]],[[8538,8538],"mapped",[53,8260,54]],[[8539,8539],"mapped",[49,8260,56]],[[8540,8540],"mapped",[51,8260,56]],[[8541,8541],"mapped",[53,8260,56]],[[8542,8542],"mapped",[55,8260,56]],[[8543,8543],"mapped",[49,8260]],[[8544,8544],"mapped",[105]],[[8545,8545],"mapped",[105,105]],[[8546,8546],"mapped",[105,105,105]],[[8547,8547],"mapped",[105,118]],[[8548,8548],"mapped",[118]],[[8549,8549],"mapped",[118,105]],[[8550,8550],"mapped",[118,105,105]],[[8551,8551],"mapped",[118,105,105,105]],[[8552,8552],"mapped",[105,120]],[[8553,8553],"mapped",[120]],[[8554,8554],"mapped",[120,105]],[[8555,8555],"mapped",[120,105,105]],[[8556,8556],"mapped",[108]],[[8557,8557],"mapped",[99]],[[8558,8558],"mapped",[100]],[[8559,8559],"mapped",[109]],[[8560,8560],"mapped",[105]],[[8561,8561],"mapped",[105,105]],[[8562,8562],"mapped",[105,105,105]],[[8563,8563],"mapped",[105,118]],[[8564,8564],"mapped",[118]],[[8565,8565],"mapped",[118,105]],[[8566,8566],"mapped",[118,105,105]],[[8567,8567],"mapped",[118,105,105,105]],[[8568,8568],"mapped",[105,120]],[[8569,8569],"mapped",[120]],[[8570,8570],"mapped",[120,105]],[[8571,8571],"mapped",[120,105,105]],[[8572,8572],"mapped",[108]],[[8573,8573],"mapped",[99]],[[8574,8574],"mapped",[100]],[[8575,8575],"mapped",[109]],[[8576,8578],"valid",[],"NV8"],[[8579,8579],"disallowed"],[[8580,8580],"valid"],[[8581,8584],"valid",[],"NV8"],[[8585,8585],"mapped",[48,8260,51]],[[8586,8587],"valid",[],"NV8"],[[8588,8591],"disallowed"],[[8592,8682],"valid",[],"NV8"],[[8683,8691],"valid",[],"NV8"],[[8692,8703],"valid",[],"NV8"],[[8704,8747],"valid",[],"NV8"],[[8748,8748],"mapped",[8747,8747]],[[8749,8749],"mapped",[8747,8747,8747]],[[8750,8750],"valid",[],"NV8"],[[8751,8751],"mapped",[8750,8750]],[[8752,8752],"mapped",[8750,8750,8750]],[[8753,8799],"valid",[],"NV8"],[[8800,8800],"disallowed_STD3_valid"],[[8801,8813],"valid",[],"NV8"],[[8814,8815],"disallowed_STD3_valid"],[[8816,8945],"valid",[],"NV8"],[[8946,8959],"valid",[],"NV8"],[[8960,8960],"valid",[],"NV8"],[[8961,8961],"valid",[],"NV8"],[[8962,9000],"valid",[],"NV8"],[[9001,9001],"mapped",[12296]],[[9002,9002],"mapped",[12297]],[[9003,9082],"valid",[],"NV8"],[[9083,9083],"valid",[],"NV8"],[[9084,9084],"valid",[],"NV8"],[[9085,9114],"valid",[],"NV8"],[[9115,9166],"valid",[],"NV8"],[[9167,9168],"valid",[],"NV8"],[[9169,9179],"valid",[],"NV8"],[[9180,9191],"valid",[],"NV8"],[[9192,9192],"valid",[],"NV8"],[[9193,9203],"valid",[],"NV8"],[[9204,9210],"valid",[],"NV8"],[[9211,9215],"disallowed"],[[9216,9252],"valid",[],"NV8"],[[9253,9254],"valid",[],"NV8"],[[9255,9279],"disallowed"],[[9280,9290],"valid",[],"NV8"],[[9291,9311],"disallowed"],[[9312,9312],"mapped",[49]],[[9313,9313],"mapped",[50]],[[9314,9314],"mapped",[51]],[[9315,9315],"mapped",[52]],[[9316,9316],"mapped",[53]],[[9317,9317],"mapped",[54]],[[9318,9318],"mapped",[55]],[[9319,9319],"mapped",[56]],[[9320,9320],"mapped",[57]],[[9321,9321],"mapped",[49,48]],[[9322,9322],"mapped",[49,49]],[[9323,9323],"mapped",[49,50]],[[9324,9324],"mapped",[49,51]],[[9325,9325],"mapped",[49,52]],[[9326,9326],"mapped",[49,53]],[[9327,9327],"mapped",[49,54]],[[9328,9328],"mapped",[49,55]],[[9329,9329],"mapped",[49,56]],[[9330,9330],"mapped",[49,57]],[[9331,9331],"mapped",[50,48]],[[9332,9332],"disallowed_STD3_mapped",[40,49,41]],[[9333,9333],"disallowed_STD3_mapped",[40,50,41]],[[9334,9334],"disallowed_STD3_mapped",[40,51,41]],[[9335,9335],"disallowed_STD3_mapped",[40,52,41]],[[9336,9336],"disallowed_STD3_mapped",[40,53,41]],[[9337,9337],"disallowed_STD3_mapped",[40,54,41]],[[9338,9338],"disallowed_STD3_mapped",[40,55,41]],[[9339,9339],"disallowed_STD3_mapped",[40,56,41]],[[9340,9340],"disallowed_STD3_mapped",[40,57,41]],[[9341,9341],"disallowed_STD3_mapped",[40,49,48,41]],[[9342,9342],"disallowed_STD3_mapped",[40,49,49,41]],[[9343,9343],"disallowed_STD3_mapped",[40,49,50,41]],[[9344,9344],"disallowed_STD3_mapped",[40,49,51,41]],[[9345,9345],"disallowed_STD3_mapped",[40,49,52,41]],[[9346,9346],"disallowed_STD3_mapped",[40,49,53,41]],[[9347,9347],"disallowed_STD3_mapped",[40,49,54,41]],[[9348,9348],"disallowed_STD3_mapped",[40,49,55,41]],[[9349,9349],"disallowed_STD3_mapped",[40,49,56,41]],[[9350,9350],"disallowed_STD3_mapped",[40,49,57,41]],[[9351,9351],"disallowed_STD3_mapped",[40,50,48,41]],[[9352,9371],"disallowed"],[[9372,9372],"disallowed_STD3_mapped",[40,97,41]],[[9373,9373],"disallowed_STD3_mapped",[40,98,41]],[[9374,9374],"disallowed_STD3_mapped",[40,99,41]],[[9375,9375],"disallowed_STD3_mapped",[40,100,41]],[[9376,9376],"disallowed_STD3_mapped",[40,101,41]],[[9377,9377],"disallowed_STD3_mapped",[40,102,41]],[[9378,9378],"disallowed_STD3_mapped",[40,103,41]],[[9379,9379],"disallowed_STD3_mapped",[40,104,41]],[[9380,9380],"disallowed_STD3_mapped",[40,105,41]],[[9381,9381],"disallowed_STD3_mapped",[40,106,41]],[[9382,9382],"disallowed_STD3_mapped",[40,107,41]],[[9383,9383],"disallowed_STD3_mapped",[40,108,41]],[[9384,9384],"disallowed_STD3_mapped",[40,109,41]],[[9385,9385],"disallowed_STD3_mapped",[40,110,41]],[[9386,9386],"disallowed_STD3_mapped",[40,111,41]],[[9387,9387],"disallowed_STD3_mapped",[40,112,41]],[[9388,9388],"disallowed_STD3_mapped",[40,113,41]],[[9389,9389],"disallowed_STD3_mapped",[40,114,41]],[[9390,9390],"disallowed_STD3_mapped",[40,115,41]],[[9391,9391],"disallowed_STD3_mapped",[40,116,41]],[[9392,9392],"disallowed_STD3_mapped",[40,117,41]],[[9393,9393],"disallowed_STD3_mapped",[40,118,41]],[[9394,9394],"disallowed_STD3_mapped",[40,119,41]],[[9395,9395],"disallowed_STD3_mapped",[40,120,41]],[[9396,9396],"disallowed_STD3_mapped",[40,121,41]],[[9397,9397],"disallowed_STD3_mapped",[40,122,41]],[[9398,9398],"mapped",[97]],[[9399,9399],"mapped",[98]],[[9400,9400],"mapped",[99]],[[9401,9401],"mapped",[100]],[[9402,9402],"mapped",[101]],[[9403,9403],"mapped",[102]],[[9404,9404],"mapped",[103]],[[9405,9405],"mapped",[104]],[[9406,9406],"mapped",[105]],[[9407,9407],"mapped",[106]],[[9408,9408],"mapped",[107]],[[9409,9409],"mapped",[108]],[[9410,9410],"mapped",[109]],[[9411,9411],"mapped",[110]],[[9412,9412],"mapped",[111]],[[9413,9413],"mapped",[112]],[[9414,9414],"mapped",[113]],[[9415,9415],"mapped",[114]],[[9416,9416],"mapped",[115]],[[9417,9417],"mapped",[116]],[[9418,9418],"mapped",[117]],[[9419,9419],"mapped",[118]],[[9420,9420],"mapped",[119]],[[9421,9421],"mapped",[120]],[[9422,9422],"mapped",[121]],[[9423,9423],"mapped",[122]],[[9424,9424],"mapped",[97]],[[9425,9425],"mapped",[98]],[[9426,9426],"mapped",[99]],[[9427,9427],"mapped",[100]],[[9428,9428],"mapped",[101]],[[9429,9429],"mapped",[102]],[[9430,9430],"mapped",[103]],[[9431,9431],"mapped",[104]],[[9432,9432],"mapped",[105]],[[9433,9433],"mapped",[106]],[[9434,9434],"mapped",[107]],[[9435,9435],"mapped",[108]],[[9436,9436],"mapped",[109]],[[9437,9437],"mapped",[110]],[[9438,9438],"mapped",[111]],[[9439,9439],"mapped",[112]],[[9440,9440],"mapped",[113]],[[9441,9441],"mapped",[114]],[[9442,9442],"mapped",[115]],[[9443,9443],"mapped",[116]],[[9444,9444],"mapped",[117]],[[9445,9445],"mapped",[118]],[[9446,9446],"mapped",[119]],[[9447,9447],"mapped",[120]],[[9448,9448],"mapped",[121]],[[9449,9449],"mapped",[122]],[[9450,9450],"mapped",[48]],[[9451,9470],"valid",[],"NV8"],[[9471,9471],"valid",[],"NV8"],[[9472,9621],"valid",[],"NV8"],[[9622,9631],"valid",[],"NV8"],[[9632,9711],"valid",[],"NV8"],[[9712,9719],"valid",[],"NV8"],[[9720,9727],"valid",[],"NV8"],[[9728,9747],"valid",[],"NV8"],[[9748,9749],"valid",[],"NV8"],[[9750,9751],"valid",[],"NV8"],[[9752,9752],"valid",[],"NV8"],[[9753,9753],"valid",[],"NV8"],[[9754,9839],"valid",[],"NV8"],[[9840,9841],"valid",[],"NV8"],[[9842,9853],"valid",[],"NV8"],[[9854,9855],"valid",[],"NV8"],[[9856,9865],"valid",[],"NV8"],[[9866,9873],"valid",[],"NV8"],[[9874,9884],"valid",[],"NV8"],[[9885,9885],"valid",[],"NV8"],[[9886,9887],"valid",[],"NV8"],[[9888,9889],"valid",[],"NV8"],[[9890,9905],"valid",[],"NV8"],[[9906,9906],"valid",[],"NV8"],[[9907,9916],"valid",[],"NV8"],[[9917,9919],"valid",[],"NV8"],[[9920,9923],"valid",[],"NV8"],[[9924,9933],"valid",[],"NV8"],[[9934,9934],"valid",[],"NV8"],[[9935,9953],"valid",[],"NV8"],[[9954,9954],"valid",[],"NV8"],[[9955,9955],"valid",[],"NV8"],[[9956,9959],"valid",[],"NV8"],[[9960,9983],"valid",[],"NV8"],[[9984,9984],"valid",[],"NV8"],[[9985,9988],"valid",[],"NV8"],[[9989,9989],"valid",[],"NV8"],[[9990,9993],"valid",[],"NV8"],[[9994,9995],"valid",[],"NV8"],[[9996,10023],"valid",[],"NV8"],[[10024,10024],"valid",[],"NV8"],[[10025,10059],"valid",[],"NV8"],[[10060,10060],"valid",[],"NV8"],[[10061,10061],"valid",[],"NV8"],[[10062,10062],"valid",[],"NV8"],[[10063,10066],"valid",[],"NV8"],[[10067,10069],"valid",[],"NV8"],[[10070,10070],"valid",[],"NV8"],[[10071,10071],"valid",[],"NV8"],[[10072,10078],"valid",[],"NV8"],[[10079,10080],"valid",[],"NV8"],[[10081,10087],"valid",[],"NV8"],[[10088,10101],"valid",[],"NV8"],[[10102,10132],"valid",[],"NV8"],[[10133,10135],"valid",[],"NV8"],[[10136,10159],"valid",[],"NV8"],[[10160,10160],"valid",[],"NV8"],[[10161,10174],"valid",[],"NV8"],[[10175,10175],"valid",[],"NV8"],[[10176,10182],"valid",[],"NV8"],[[10183,10186],"valid",[],"NV8"],[[10187,10187],"valid",[],"NV8"],[[10188,10188],"valid",[],"NV8"],[[10189,10189],"valid",[],"NV8"],[[10190,10191],"valid",[],"NV8"],[[10192,10219],"valid",[],"NV8"],[[10220,10223],"valid",[],"NV8"],[[10224,10239],"valid",[],"NV8"],[[10240,10495],"valid",[],"NV8"],[[10496,10763],"valid",[],"NV8"],[[10764,10764],"mapped",[8747,8747,8747,8747]],[[10765,10867],"valid",[],"NV8"],[[10868,10868],"disallowed_STD3_mapped",[58,58,61]],[[10869,10869],"disallowed_STD3_mapped",[61,61]],[[10870,10870],"disallowed_STD3_mapped",[61,61,61]],[[10871,10971],"valid",[],"NV8"],[[10972,10972],"mapped",[10973,824]],[[10973,11007],"valid",[],"NV8"],[[11008,11021],"valid",[],"NV8"],[[11022,11027],"valid",[],"NV8"],[[11028,11034],"valid",[],"NV8"],[[11035,11039],"valid",[],"NV8"],[[11040,11043],"valid",[],"NV8"],[[11044,11084],"valid",[],"NV8"],[[11085,11087],"valid",[],"NV8"],[[11088,11092],"valid",[],"NV8"],[[11093,11097],"valid",[],"NV8"],[[11098,11123],"valid",[],"NV8"],[[11124,11125],"disallowed"],[[11126,11157],"valid",[],"NV8"],[[11158,11159],"disallowed"],[[11160,11193],"valid",[],"NV8"],[[11194,11196],"disallowed"],[[11197,11208],"valid",[],"NV8"],[[11209,11209],"disallowed"],[[11210,11217],"valid",[],"NV8"],[[11218,11243],"disallowed"],[[11244,11247],"valid",[],"NV8"],[[11248,11263],"disallowed"],[[11264,11264],"mapped",[11312]],[[11265,11265],"mapped",[11313]],[[11266,11266],"mapped",[11314]],[[11267,11267],"mapped",[11315]],[[11268,11268],"mapped",[11316]],[[11269,11269],"mapped",[11317]],[[11270,11270],"mapped",[11318]],[[11271,11271],"mapped",[11319]],[[11272,11272],"mapped",[11320]],[[11273,11273],"mapped",[11321]],[[11274,11274],"mapped",[11322]],[[11275,11275],"mapped",[11323]],[[11276,11276],"mapped",[11324]],[[11277,11277],"mapped",[11325]],[[11278,11278],"mapped",[11326]],[[11279,11279],"mapped",[11327]],[[11280,11280],"mapped",[11328]],[[11281,11281],"mapped",[11329]],[[11282,11282],"mapped",[11330]],[[11283,11283],"mapped",[11331]],[[11284,11284],"mapped",[11332]],[[11285,11285],"mapped",[11333]],[[11286,11286],"mapped",[11334]],[[11287,11287],"mapped",[11335]],[[11288,11288],"mapped",[11336]],[[11289,11289],"mapped",[11337]],[[11290,11290],"mapped",[11338]],[[11291,11291],"mapped",[11339]],[[11292,11292],"mapped",[11340]],[[11293,11293],"mapped",[11341]],[[11294,11294],"mapped",[11342]],[[11295,11295],"mapped",[11343]],[[11296,11296],"mapped",[11344]],[[11297,11297],"mapped",[11345]],[[11298,11298],"mapped",[11346]],[[11299,11299],"mapped",[11347]],[[11300,11300],"mapped",[11348]],[[11301,11301],"mapped",[11349]],[[11302,11302],"mapped",[11350]],[[11303,11303],"mapped",[11351]],[[11304,11304],"mapped",[11352]],[[11305,11305],"mapped",[11353]],[[11306,11306],"mapped",[11354]],[[11307,11307],"mapped",[11355]],[[11308,11308],"mapped",[11356]],[[11309,11309],"mapped",[11357]],[[11310,11310],"mapped",[11358]],[[11311,11311],"disallowed"],[[11312,11358],"valid"],[[11359,11359],"disallowed"],[[11360,11360],"mapped",[11361]],[[11361,11361],"valid"],[[11362,11362],"mapped",[619]],[[11363,11363],"mapped",[7549]],[[11364,11364],"mapped",[637]],[[11365,11366],"valid"],[[11367,11367],"mapped",[11368]],[[11368,11368],"valid"],[[11369,11369],"mapped",[11370]],[[11370,11370],"valid"],[[11371,11371],"mapped",[11372]],[[11372,11372],"valid"],[[11373,11373],"mapped",[593]],[[11374,11374],"mapped",[625]],[[11375,11375],"mapped",[592]],[[11376,11376],"mapped",[594]],[[11377,11377],"valid"],[[11378,11378],"mapped",[11379]],[[11379,11379],"valid"],[[11380,11380],"valid"],[[11381,11381],"mapped",[11382]],[[11382,11383],"valid"],[[11384,11387],"valid"],[[11388,11388],"mapped",[106]],[[11389,11389],"mapped",[118]],[[11390,11390],"mapped",[575]],[[11391,11391],"mapped",[576]],[[11392,11392],"mapped",[11393]],[[11393,11393],"valid"],[[11394,11394],"mapped",[11395]],[[11395,11395],"valid"],[[11396,11396],"mapped",[11397]],[[11397,11397],"valid"],[[11398,11398],"mapped",[11399]],[[11399,11399],"valid"],[[11400,11400],"mapped",[11401]],[[11401,11401],"valid"],[[11402,11402],"mapped",[11403]],[[11403,11403],"valid"],[[11404,11404],"mapped",[11405]],[[11405,11405],"valid"],[[11406,11406],"mapped",[11407]],[[11407,11407],"valid"],[[11408,11408],"mapped",[11409]],[[11409,11409],"valid"],[[11410,11410],"mapped",[11411]],[[11411,11411],"valid"],[[11412,11412],"mapped",[11413]],[[11413,11413],"valid"],[[11414,11414],"mapped",[11415]],[[11415,11415],"valid"],[[11416,11416],"mapped",[11417]],[[11417,11417],"valid"],[[11418,11418],"mapped",[11419]],[[11419,11419],"valid"],[[11420,11420],"mapped",[11421]],[[11421,11421],"valid"],[[11422,11422],"mapped",[11423]],[[11423,11423],"valid"],[[11424,11424],"mapped",[11425]],[[11425,11425],"valid"],[[11426,11426],"mapped",[11427]],[[11427,11427],"valid"],[[11428,11428],"mapped",[11429]],[[11429,11429],"valid"],[[11430,11430],"mapped",[11431]],[[11431,11431],"valid"],[[11432,11432],"mapped",[11433]],[[11433,11433],"valid"],[[11434,11434],"mapped",[11435]],[[11435,11435],"valid"],[[11436,11436],"mapped",[11437]],[[11437,11437],"valid"],[[11438,11438],"mapped",[11439]],[[11439,11439],"valid"],[[11440,11440],"mapped",[11441]],[[11441,11441],"valid"],[[11442,11442],"mapped",[11443]],[[11443,11443],"valid"],[[11444,11444],"mapped",[11445]],[[11445,11445],"valid"],[[11446,11446],"mapped",[11447]],[[11447,11447],"valid"],[[11448,11448],"mapped",[11449]],[[11449,11449],"valid"],[[11450,11450],"mapped",[11451]],[[11451,11451],"valid"],[[11452,11452],"mapped",[11453]],[[11453,11453],"valid"],[[11454,11454],"mapped",[11455]],[[11455,11455],"valid"],[[11456,11456],"mapped",[11457]],[[11457,11457],"valid"],[[11458,11458],"mapped",[11459]],[[11459,11459],"valid"],[[11460,11460],"mapped",[11461]],[[11461,11461],"valid"],[[11462,11462],"mapped",[11463]],[[11463,11463],"valid"],[[11464,11464],"mapped",[11465]],[[11465,11465],"valid"],[[11466,11466],"mapped",[11467]],[[11467,11467],"valid"],[[11468,11468],"mapped",[11469]],[[11469,11469],"valid"],[[11470,11470],"mapped",[11471]],[[11471,11471],"valid"],[[11472,11472],"mapped",[11473]],[[11473,11473],"valid"],[[11474,11474],"mapped",[11475]],[[11475,11475],"valid"],[[11476,11476],"mapped",[11477]],[[11477,11477],"valid"],[[11478,11478],"mapped",[11479]],[[11479,11479],"valid"],[[11480,11480],"mapped",[11481]],[[11481,11481],"valid"],[[11482,11482],"mapped",[11483]],[[11483,11483],"valid"],[[11484,11484],"mapped",[11485]],[[11485,11485],"valid"],[[11486,11486],"mapped",[11487]],[[11487,11487],"valid"],[[11488,11488],"mapped",[11489]],[[11489,11489],"valid"],[[11490,11490],"mapped",[11491]],[[11491,11492],"valid"],[[11493,11498],"valid",[],"NV8"],[[11499,11499],"mapped",[11500]],[[11500,11500],"valid"],[[11501,11501],"mapped",[11502]],[[11502,11505],"valid"],[[11506,11506],"mapped",[11507]],[[11507,11507],"valid"],[[11508,11512],"disallowed"],[[11513,11519],"valid",[],"NV8"],[[11520,11557],"valid"],[[11558,11558],"disallowed"],[[11559,11559],"valid"],[[11560,11564],"disallowed"],[[11565,11565],"valid"],[[11566,11567],"disallowed"],[[11568,11621],"valid"],[[11622,11623],"valid"],[[11624,11630],"disallowed"],[[11631,11631],"mapped",[11617]],[[11632,11632],"valid",[],"NV8"],[[11633,11646],"disallowed"],[[11647,11647],"valid"],[[11648,11670],"valid"],[[11671,11679],"disallowed"],[[11680,11686],"valid"],[[11687,11687],"disallowed"],[[11688,11694],"valid"],[[11695,11695],"disallowed"],[[11696,11702],"valid"],[[11703,11703],"disallowed"],[[11704,11710],"valid"],[[11711,11711],"disallowed"],[[11712,11718],"valid"],[[11719,11719],"disallowed"],[[11720,11726],"valid"],[[11727,11727],"disallowed"],[[11728,11734],"valid"],[[11735,11735],"disallowed"],[[11736,11742],"valid"],[[11743,11743],"disallowed"],[[11744,11775],"valid"],[[11776,11799],"valid",[],"NV8"],[[11800,11803],"valid",[],"NV8"],[[11804,11805],"valid",[],"NV8"],[[11806,11822],"valid",[],"NV8"],[[11823,11823],"valid"],[[11824,11824],"valid",[],"NV8"],[[11825,11825],"valid",[],"NV8"],[[11826,11835],"valid",[],"NV8"],[[11836,11842],"valid",[],"NV8"],[[11843,11903],"disallowed"],[[11904,11929],"valid",[],"NV8"],[[11930,11930],"disallowed"],[[11931,11934],"valid",[],"NV8"],[[11935,11935],"mapped",[27597]],[[11936,12018],"valid",[],"NV8"],[[12019,12019],"mapped",[40863]],[[12020,12031],"disallowed"],[[12032,12032],"mapped",[19968]],[[12033,12033],"mapped",[20008]],[[12034,12034],"mapped",[20022]],[[12035,12035],"mapped",[20031]],[[12036,12036],"mapped",[20057]],[[12037,12037],"mapped",[20101]],[[12038,12038],"mapped",[20108]],[[12039,12039],"mapped",[20128]],[[12040,12040],"mapped",[20154]],[[12041,12041],"mapped",[20799]],[[12042,12042],"mapped",[20837]],[[12043,12043],"mapped",[20843]],[[12044,12044],"mapped",[20866]],[[12045,12045],"mapped",[20886]],[[12046,12046],"mapped",[20907]],[[12047,12047],"mapped",[20960]],[[12048,12048],"mapped",[20981]],[[12049,12049],"mapped",[20992]],[[12050,12050],"mapped",[21147]],[[12051,12051],"mapped",[21241]],[[12052,12052],"mapped",[21269]],[[12053,12053],"mapped",[21274]],[[12054,12054],"mapped",[21304]],[[12055,12055],"mapped",[21313]],[[12056,12056],"mapped",[21340]],[[12057,12057],"mapped",[21353]],[[12058,12058],"mapped",[21378]],[[12059,12059],"mapped",[21430]],[[12060,12060],"mapped",[21448]],[[12061,12061],"mapped",[21475]],[[12062,12062],"mapped",[22231]],[[12063,12063],"mapped",[22303]],[[12064,12064],"mapped",[22763]],[[12065,12065],"mapped",[22786]],[[12066,12066],"mapped",[22794]],[[12067,12067],"mapped",[22805]],[[12068,12068],"mapped",[22823]],[[12069,12069],"mapped",[22899]],[[12070,12070],"mapped",[23376]],[[12071,12071],"mapped",[23424]],[[12072,12072],"mapped",[23544]],[[12073,12073],"mapped",[23567]],[[12074,12074],"mapped",[23586]],[[12075,12075],"mapped",[23608]],[[12076,12076],"mapped",[23662]],[[12077,12077],"mapped",[23665]],[[12078,12078],"mapped",[24027]],[[12079,12079],"mapped",[24037]],[[12080,12080],"mapped",[24049]],[[12081,12081],"mapped",[24062]],[[12082,12082],"mapped",[24178]],[[12083,12083],"mapped",[24186]],[[12084,12084],"mapped",[24191]],[[12085,12085],"mapped",[24308]],[[12086,12086],"mapped",[24318]],[[12087,12087],"mapped",[24331]],[[12088,12088],"mapped",[24339]],[[12089,12089],"mapped",[24400]],[[12090,12090],"mapped",[24417]],[[12091,12091],"mapped",[24435]],[[12092,12092],"mapped",[24515]],[[12093,12093],"mapped",[25096]],[[12094,12094],"mapped",[25142]],[[12095,12095],"mapped",[25163]],[[12096,12096],"mapped",[25903]],[[12097,12097],"mapped",[25908]],[[12098,12098],"mapped",[25991]],[[12099,12099],"mapped",[26007]],[[12100,12100],"mapped",[26020]],[[12101,12101],"mapped",[26041]],[[12102,12102],"mapped",[26080]],[[12103,12103],"mapped",[26085]],[[12104,12104],"mapped",[26352]],[[12105,12105],"mapped",[26376]],[[12106,12106],"mapped",[26408]],[[12107,12107],"mapped",[27424]],[[12108,12108],"mapped",[27490]],[[12109,12109],"mapped",[27513]],[[12110,12110],"mapped",[27571]],[[12111,12111],"mapped",[27595]],[[12112,12112],"mapped",[27604]],[[12113,12113],"mapped",[27611]],[[12114,12114],"mapped",[27663]],[[12115,12115],"mapped",[27668]],[[12116,12116],"mapped",[27700]],[[12117,12117],"mapped",[28779]],[[12118,12118],"mapped",[29226]],[[12119,12119],"mapped",[29238]],[[12120,12120],"mapped",[29243]],[[12121,12121],"mapped",[29247]],[[12122,12122],"mapped",[29255]],[[12123,12123],"mapped",[29273]],[[12124,12124],"mapped",[29275]],[[12125,12125],"mapped",[29356]],[[12126,12126],"mapped",[29572]],[[12127,12127],"mapped",[29577]],[[12128,12128],"mapped",[29916]],[[12129,12129],"mapped",[29926]],[[12130,12130],"mapped",[29976]],[[12131,12131],"mapped",[29983]],[[12132,12132],"mapped",[29992]],[[12133,12133],"mapped",[30000]],[[12134,12134],"mapped",[30091]],[[12135,12135],"mapped",[30098]],[[12136,12136],"mapped",[30326]],[[12137,12137],"mapped",[30333]],[[12138,12138],"mapped",[30382]],[[12139,12139],"mapped",[30399]],[[12140,12140],"mapped",[30446]],[[12141,12141],"mapped",[30683]],[[12142,12142],"mapped",[30690]],[[12143,12143],"mapped",[30707]],[[12144,12144],"mapped",[31034]],[[12145,12145],"mapped",[31160]],[[12146,12146],"mapped",[31166]],[[12147,12147],"mapped",[31348]],[[12148,12148],"mapped",[31435]],[[12149,12149],"mapped",[31481]],[[12150,12150],"mapped",[31859]],[[12151,12151],"mapped",[31992]],[[12152,12152],"mapped",[32566]],[[12153,12153],"mapped",[32593]],[[12154,12154],"mapped",[32650]],[[12155,12155],"mapped",[32701]],[[12156,12156],"mapped",[32769]],[[12157,12157],"mapped",[32780]],[[12158,12158],"mapped",[32786]],[[12159,12159],"mapped",[32819]],[[12160,12160],"mapped",[32895]],[[12161,12161],"mapped",[32905]],[[12162,12162],"mapped",[33251]],[[12163,12163],"mapped",[33258]],[[12164,12164],"mapped",[33267]],[[12165,12165],"mapped",[33276]],[[12166,12166],"mapped",[33292]],[[12167,12167],"mapped",[33307]],[[12168,12168],"mapped",[33311]],[[12169,12169],"mapped",[33390]],[[12170,12170],"mapped",[33394]],[[12171,12171],"mapped",[33400]],[[12172,12172],"mapped",[34381]],[[12173,12173],"mapped",[34411]],[[12174,12174],"mapped",[34880]],[[12175,12175],"mapped",[34892]],[[12176,12176],"mapped",[34915]],[[12177,12177],"mapped",[35198]],[[12178,12178],"mapped",[35211]],[[12179,12179],"mapped",[35282]],[[12180,12180],"mapped",[35328]],[[12181,12181],"mapped",[35895]],[[12182,12182],"mapped",[35910]],[[12183,12183],"mapped",[35925]],[[12184,12184],"mapped",[35960]],[[12185,12185],"mapped",[35997]],[[12186,12186],"mapped",[36196]],[[12187,12187],"mapped",[36208]],[[12188,12188],"mapped",[36275]],[[12189,12189],"mapped",[36523]],[[12190,12190],"mapped",[36554]],[[12191,12191],"mapped",[36763]],[[12192,12192],"mapped",[36784]],[[12193,12193],"mapped",[36789]],[[12194,12194],"mapped",[37009]],[[12195,12195],"mapped",[37193]],[[12196,12196],"mapped",[37318]],[[12197,12197],"mapped",[37324]],[[12198,12198],"mapped",[37329]],[[12199,12199],"mapped",[38263]],[[12200,12200],"mapped",[38272]],[[12201,12201],"mapped",[38428]],[[12202,12202],"mapped",[38582]],[[12203,12203],"mapped",[38585]],[[12204,12204],"mapped",[38632]],[[12205,12205],"mapped",[38737]],[[12206,12206],"mapped",[38750]],[[12207,12207],"mapped",[38754]],[[12208,12208],"mapped",[38761]],[[12209,12209],"mapped",[38859]],[[12210,12210],"mapped",[38893]],[[12211,12211],"mapped",[38899]],[[12212,12212],"mapped",[38913]],[[12213,12213],"mapped",[39080]],[[12214,12214],"mapped",[39131]],[[12215,12215],"mapped",[39135]],[[12216,12216],"mapped",[39318]],[[12217,12217],"mapped",[39321]],[[12218,12218],"mapped",[39340]],[[12219,12219],"mapped",[39592]],[[12220,12220],"mapped",[39640]],[[12221,12221],"mapped",[39647]],[[12222,12222],"mapped",[39717]],[[12223,12223],"mapped",[39727]],[[12224,12224],"mapped",[39730]],[[12225,12225],"mapped",[39740]],[[12226,12226],"mapped",[39770]],[[12227,12227],"mapped",[40165]],[[12228,12228],"mapped",[40565]],[[12229,12229],"mapped",[40575]],[[12230,12230],"mapped",[40613]],[[12231,12231],"mapped",[40635]],[[12232,12232],"mapped",[40643]],[[12233,12233],"mapped",[40653]],[[12234,12234],"mapped",[40657]],[[12235,12235],"mapped",[40697]],[[12236,12236],"mapped",[40701]],[[12237,12237],"mapped",[40718]],[[12238,12238],"mapped",[40723]],[[12239,12239],"mapped",[40736]],[[12240,12240],"mapped",[40763]],[[12241,12241],"mapped",[40778]],[[12242,12242],"mapped",[40786]],[[12243,12243],"mapped",[40845]],[[12244,12244],"mapped",[40860]],[[12245,12245],"mapped",[40864]],[[12246,12271],"disallowed"],[[12272,12283],"disallowed"],[[12284,12287],"disallowed"],[[12288,12288],"disallowed_STD3_mapped",[32]],[[12289,12289],"valid",[],"NV8"],[[12290,12290],"mapped",[46]],[[12291,12292],"valid",[],"NV8"],[[12293,12295],"valid"],[[12296,12329],"valid",[],"NV8"],[[12330,12333],"valid"],[[12334,12341],"valid",[],"NV8"],[[12342,12342],"mapped",[12306]],[[12343,12343],"valid",[],"NV8"],[[12344,12344],"mapped",[21313]],[[12345,12345],"mapped",[21316]],[[12346,12346],"mapped",[21317]],[[12347,12347],"valid",[],"NV8"],[[12348,12348],"valid"],[[12349,12349],"valid",[],"NV8"],[[12350,12350],"valid",[],"NV8"],[[12351,12351],"valid",[],"NV8"],[[12352,12352],"disallowed"],[[12353,12436],"valid"],[[12437,12438],"valid"],[[12439,12440],"disallowed"],[[12441,12442],"valid"],[[12443,12443],"disallowed_STD3_mapped",[32,12441]],[[12444,12444],"disallowed_STD3_mapped",[32,12442]],[[12445,12446],"valid"],[[12447,12447],"mapped",[12424,12426]],[[12448,12448],"valid",[],"NV8"],[[12449,12542],"valid"],[[12543,12543],"mapped",[12467,12488]],[[12544,12548],"disallowed"],[[12549,12588],"valid"],[[12589,12589],"valid"],[[12590,12592],"disallowed"],[[12593,12593],"mapped",[4352]],[[12594,12594],"mapped",[4353]],[[12595,12595],"mapped",[4522]],[[12596,12596],"mapped",[4354]],[[12597,12597],"mapped",[4524]],[[12598,12598],"mapped",[4525]],[[12599,12599],"mapped",[4355]],[[12600,12600],"mapped",[4356]],[[12601,12601],"mapped",[4357]],[[12602,12602],"mapped",[4528]],[[12603,12603],"mapped",[4529]],[[12604,12604],"mapped",[4530]],[[12605,12605],"mapped",[4531]],[[12606,12606],"mapped",[4532]],[[12607,12607],"mapped",[4533]],[[12608,12608],"mapped",[4378]],[[12609,12609],"mapped",[4358]],[[12610,12610],"mapped",[4359]],[[12611,12611],"mapped",[4360]],[[12612,12612],"mapped",[4385]],[[12613,12613],"mapped",[4361]],[[12614,12614],"mapped",[4362]],[[12615,12615],"mapped",[4363]],[[12616,12616],"mapped",[4364]],[[12617,12617],"mapped",[4365]],[[12618,12618],"mapped",[4366]],[[12619,12619],"mapped",[4367]],[[12620,12620],"mapped",[4368]],[[12621,12621],"mapped",[4369]],[[12622,12622],"mapped",[4370]],[[12623,12623],"mapped",[4449]],[[12624,12624],"mapped",[4450]],[[12625,12625],"mapped",[4451]],[[12626,12626],"mapped",[4452]],[[12627,12627],"mapped",[4453]],[[12628,12628],"mapped",[4454]],[[12629,12629],"mapped",[4455]],[[12630,12630],"mapped",[4456]],[[12631,12631],"mapped",[4457]],[[12632,12632],"mapped",[4458]],[[12633,12633],"mapped",[4459]],[[12634,12634],"mapped",[4460]],[[12635,12635],"mapped",[4461]],[[12636,12636],"mapped",[4462]],[[12637,12637],"mapped",[4463]],[[12638,12638],"mapped",[4464]],[[12639,12639],"mapped",[4465]],[[12640,12640],"mapped",[4466]],[[12641,12641],"mapped",[4467]],[[12642,12642],"mapped",[4468]],[[12643,12643],"mapped",[4469]],[[12644,12644],"disallowed"],[[12645,12645],"mapped",[4372]],[[12646,12646],"mapped",[4373]],[[12647,12647],"mapped",[4551]],[[12648,12648],"mapped",[4552]],[[12649,12649],"mapped",[4556]],[[12650,12650],"mapped",[4558]],[[12651,12651],"mapped",[4563]],[[12652,12652],"mapped",[4567]],[[12653,12653],"mapped",[4569]],[[12654,12654],"mapped",[4380]],[[12655,12655],"mapped",[4573]],[[12656,12656],"mapped",[4575]],[[12657,12657],"mapped",[4381]],[[12658,12658],"mapped",[4382]],[[12659,12659],"mapped",[4384]],[[12660,12660],"mapped",[4386]],[[12661,12661],"mapped",[4387]],[[12662,12662],"mapped",[4391]],[[12663,12663],"mapped",[4393]],[[12664,12664],"mapped",[4395]],[[12665,12665],"mapped",[4396]],[[12666,12666],"mapped",[4397]],[[12667,12667],"mapped",[4398]],[[12668,12668],"mapped",[4399]],[[12669,12669],"mapped",[4402]],[[12670,12670],"mapped",[4406]],[[12671,12671],"mapped",[4416]],[[12672,12672],"mapped",[4423]],[[12673,12673],"mapped",[4428]],[[12674,12674],"mapped",[4593]],[[12675,12675],"mapped",[4594]],[[12676,12676],"mapped",[4439]],[[12677,12677],"mapped",[4440]],[[12678,12678],"mapped",[4441]],[[12679,12679],"mapped",[4484]],[[12680,12680],"mapped",[4485]],[[12681,12681],"mapped",[4488]],[[12682,12682],"mapped",[4497]],[[12683,12683],"mapped",[4498]],[[12684,12684],"mapped",[4500]],[[12685,12685],"mapped",[4510]],[[12686,12686],"mapped",[4513]],[[12687,12687],"disallowed"],[[12688,12689],"valid",[],"NV8"],[[12690,12690],"mapped",[19968]],[[12691,12691],"mapped",[20108]],[[12692,12692],"mapped",[19977]],[[12693,12693],"mapped",[22235]],[[12694,12694],"mapped",[19978]],[[12695,12695],"mapped",[20013]],[[12696,12696],"mapped",[19979]],[[12697,12697],"mapped",[30002]],[[12698,12698],"mapped",[20057]],[[12699,12699],"mapped",[19993]],[[12700,12700],"mapped",[19969]],[[12701,12701],"mapped",[22825]],[[12702,12702],"mapped",[22320]],[[12703,12703],"mapped",[20154]],[[12704,12727],"valid"],[[12728,12730],"valid"],[[12731,12735],"disallowed"],[[12736,12751],"valid",[],"NV8"],[[12752,12771],"valid",[],"NV8"],[[12772,12783],"disallowed"],[[12784,12799],"valid"],[[12800,12800],"disallowed_STD3_mapped",[40,4352,41]],[[12801,12801],"disallowed_STD3_mapped",[40,4354,41]],[[12802,12802],"disallowed_STD3_mapped",[40,4355,41]],[[12803,12803],"disallowed_STD3_mapped",[40,4357,41]],[[12804,12804],"disallowed_STD3_mapped",[40,4358,41]],[[12805,12805],"disallowed_STD3_mapped",[40,4359,41]],[[12806,12806],"disallowed_STD3_mapped",[40,4361,41]],[[12807,12807],"disallowed_STD3_mapped",[40,4363,41]],[[12808,12808],"disallowed_STD3_mapped",[40,4364,41]],[[12809,12809],"disallowed_STD3_mapped",[40,4366,41]],[[12810,12810],"disallowed_STD3_mapped",[40,4367,41]],[[12811,12811],"disallowed_STD3_mapped",[40,4368,41]],[[12812,12812],"disallowed_STD3_mapped",[40,4369,41]],[[12813,12813],"disallowed_STD3_mapped",[40,4370,41]],[[12814,12814],"disallowed_STD3_mapped",[40,44032,41]],[[12815,12815],"disallowed_STD3_mapped",[40,45208,41]],[[12816,12816],"disallowed_STD3_mapped",[40,45796,41]],[[12817,12817],"disallowed_STD3_mapped",[40,46972,41]],[[12818,12818],"disallowed_STD3_mapped",[40,47560,41]],[[12819,12819],"disallowed_STD3_mapped",[40,48148,41]],[[12820,12820],"disallowed_STD3_mapped",[40,49324,41]],[[12821,12821],"disallowed_STD3_mapped",[40,50500,41]],[[12822,12822],"disallowed_STD3_mapped",[40,51088,41]],[[12823,12823],"disallowed_STD3_mapped",[40,52264,41]],[[12824,12824],"disallowed_STD3_mapped",[40,52852,41]],[[12825,12825],"disallowed_STD3_mapped",[40,53440,41]],[[12826,12826],"disallowed_STD3_mapped",[40,54028,41]],[[12827,12827],"disallowed_STD3_mapped",[40,54616,41]],[[12828,12828],"disallowed_STD3_mapped",[40,51452,41]],[[12829,12829],"disallowed_STD3_mapped",[40,50724,51204,41]],[[12830,12830],"disallowed_STD3_mapped",[40,50724,54980,41]],[[12831,12831],"disallowed"],[[12832,12832],"disallowed_STD3_mapped",[40,19968,41]],[[12833,12833],"disallowed_STD3_mapped",[40,20108,41]],[[12834,12834],"disallowed_STD3_mapped",[40,19977,41]],[[12835,12835],"disallowed_STD3_mapped",[40,22235,41]],[[12836,12836],"disallowed_STD3_mapped",[40,20116,41]],[[12837,12837],"disallowed_STD3_mapped",[40,20845,41]],[[12838,12838],"disallowed_STD3_mapped",[40,19971,41]],[[12839,12839],"disallowed_STD3_mapped",[40,20843,41]],[[12840,12840],"disallowed_STD3_mapped",[40,20061,41]],[[12841,12841],"disallowed_STD3_mapped",[40,21313,41]],[[12842,12842],"disallowed_STD3_mapped",[40,26376,41]],[[12843,12843],"disallowed_STD3_mapped",[40,28779,41]],[[12844,12844],"disallowed_STD3_mapped",[40,27700,41]],[[12845,12845],"disallowed_STD3_mapped",[40,26408,41]],[[12846,12846],"disallowed_STD3_mapped",[40,37329,41]],[[12847,12847],"disallowed_STD3_mapped",[40,22303,41]],[[12848,12848],"disallowed_STD3_mapped",[40,26085,41]],[[12849,12849],"disallowed_STD3_mapped",[40,26666,41]],[[12850,12850],"disallowed_STD3_mapped",[40,26377,41]],[[12851,12851],"disallowed_STD3_mapped",[40,31038,41]],[[12852,12852],"disallowed_STD3_mapped",[40,21517,41]],[[12853,12853],"disallowed_STD3_mapped",[40,29305,41]],[[12854,12854],"disallowed_STD3_mapped",[40,36001,41]],[[12855,12855],"disallowed_STD3_mapped",[40,31069,41]],[[12856,12856],"disallowed_STD3_mapped",[40,21172,41]],[[12857,12857],"disallowed_STD3_mapped",[40,20195,41]],[[12858,12858],"disallowed_STD3_mapped",[40,21628,41]],[[12859,12859],"disallowed_STD3_mapped",[40,23398,41]],[[12860,12860],"disallowed_STD3_mapped",[40,30435,41]],[[12861,12861],"disallowed_STD3_mapped",[40,20225,41]],[[12862,12862],"disallowed_STD3_mapped",[40,36039,41]],[[12863,12863],"disallowed_STD3_mapped",[40,21332,41]],[[12864,12864],"disallowed_STD3_mapped",[40,31085,41]],[[12865,12865],"disallowed_STD3_mapped",[40,20241,41]],[[12866,12866],"disallowed_STD3_mapped",[40,33258,41]],[[12867,12867],"disallowed_STD3_mapped",[40,33267,41]],[[12868,12868],"mapped",[21839]],[[12869,12869],"mapped",[24188]],[[12870,12870],"mapped",[25991]],[[12871,12871],"mapped",[31631]],[[12872,12879],"valid",[],"NV8"],[[12880,12880],"mapped",[112,116,101]],[[12881,12881],"mapped",[50,49]],[[12882,12882],"mapped",[50,50]],[[12883,12883],"mapped",[50,51]],[[12884,12884],"mapped",[50,52]],[[12885,12885],"mapped",[50,53]],[[12886,12886],"mapped",[50,54]],[[12887,12887],"mapped",[50,55]],[[12888,12888],"mapped",[50,56]],[[12889,12889],"mapped",[50,57]],[[12890,12890],"mapped",[51,48]],[[12891,12891],"mapped",[51,49]],[[12892,12892],"mapped",[51,50]],[[12893,12893],"mapped",[51,51]],[[12894,12894],"mapped",[51,52]],[[12895,12895],"mapped",[51,53]],[[12896,12896],"mapped",[4352]],[[12897,12897],"mapped",[4354]],[[12898,12898],"mapped",[4355]],[[12899,12899],"mapped",[4357]],[[12900,12900],"mapped",[4358]],[[12901,12901],"mapped",[4359]],[[12902,12902],"mapped",[4361]],[[12903,12903],"mapped",[4363]],[[12904,12904],"mapped",[4364]],[[12905,12905],"mapped",[4366]],[[12906,12906],"mapped",[4367]],[[12907,12907],"mapped",[4368]],[[12908,12908],"mapped",[4369]],[[12909,12909],"mapped",[4370]],[[12910,12910],"mapped",[44032]],[[12911,12911],"mapped",[45208]],[[12912,12912],"mapped",[45796]],[[12913,12913],"mapped",[46972]],[[12914,12914],"mapped",[47560]],[[12915,12915],"mapped",[48148]],[[12916,12916],"mapped",[49324]],[[12917,12917],"mapped",[50500]],[[12918,12918],"mapped",[51088]],[[12919,12919],"mapped",[52264]],[[12920,12920],"mapped",[52852]],[[12921,12921],"mapped",[53440]],[[12922,12922],"mapped",[54028]],[[12923,12923],"mapped",[54616]],[[12924,12924],"mapped",[52280,44256]],[[12925,12925],"mapped",[51452,51032]],[[12926,12926],"mapped",[50864]],[[12927,12927],"valid",[],"NV8"],[[12928,12928],"mapped",[19968]],[[12929,12929],"mapped",[20108]],[[12930,12930],"mapped",[19977]],[[12931,12931],"mapped",[22235]],[[12932,12932],"mapped",[20116]],[[12933,12933],"mapped",[20845]],[[12934,12934],"mapped",[19971]],[[12935,12935],"mapped",[20843]],[[12936,12936],"mapped",[20061]],[[12937,12937],"mapped",[21313]],[[12938,12938],"mapped",[26376]],[[12939,12939],"mapped",[28779]],[[12940,12940],"mapped",[27700]],[[12941,12941],"mapped",[26408]],[[12942,12942],"mapped",[37329]],[[12943,12943],"mapped",[22303]],[[12944,12944],"mapped",[26085]],[[12945,12945],"mapped",[26666]],[[12946,12946],"mapped",[26377]],[[12947,12947],"mapped",[31038]],[[12948,12948],"mapped",[21517]],[[12949,12949],"mapped",[29305]],[[12950,12950],"mapped",[36001]],[[12951,12951],"mapped",[31069]],[[12952,12952],"mapped",[21172]],[[12953,12953],"mapped",[31192]],[[12954,12954],"mapped",[30007]],[[12955,12955],"mapped",[22899]],[[12956,12956],"mapped",[36969]],[[12957,12957],"mapped",[20778]],[[12958,12958],"mapped",[21360]],[[12959,12959],"mapped",[27880]],[[12960,12960],"mapped",[38917]],[[12961,12961],"mapped",[20241]],[[12962,12962],"mapped",[20889]],[[12963,12963],"mapped",[27491]],[[12964,12964],"mapped",[19978]],[[12965,12965],"mapped",[20013]],[[12966,12966],"mapped",[19979]],[[12967,12967],"mapped",[24038]],[[12968,12968],"mapped",[21491]],[[12969,12969],"mapped",[21307]],[[12970,12970],"mapped",[23447]],[[12971,12971],"mapped",[23398]],[[12972,12972],"mapped",[30435]],[[12973,12973],"mapped",[20225]],[[12974,12974],"mapped",[36039]],[[12975,12975],"mapped",[21332]],[[12976,12976],"mapped",[22812]],[[12977,12977],"mapped",[51,54]],[[12978,12978],"mapped",[51,55]],[[12979,12979],"mapped",[51,56]],[[12980,12980],"mapped",[51,57]],[[12981,12981],"mapped",[52,48]],[[12982,12982],"mapped",[52,49]],[[12983,12983],"mapped",[52,50]],[[12984,12984],"mapped",[52,51]],[[12985,12985],"mapped",[52,52]],[[12986,12986],"mapped",[52,53]],[[12987,12987],"mapped",[52,54]],[[12988,12988],"mapped",[52,55]],[[12989,12989],"mapped",[52,56]],[[12990,12990],"mapped",[52,57]],[[12991,12991],"mapped",[53,48]],[[12992,12992],"mapped",[49,26376]],[[12993,12993],"mapped",[50,26376]],[[12994,12994],"mapped",[51,26376]],[[12995,12995],"mapped",[52,26376]],[[12996,12996],"mapped",[53,26376]],[[12997,12997],"mapped",[54,26376]],[[12998,12998],"mapped",[55,26376]],[[12999,12999],"mapped",[56,26376]],[[13000,13000],"mapped",[57,26376]],[[13001,13001],"mapped",[49,48,26376]],[[13002,13002],"mapped",[49,49,26376]],[[13003,13003],"mapped",[49,50,26376]],[[13004,13004],"mapped",[104,103]],[[13005,13005],"mapped",[101,114,103]],[[13006,13006],"mapped",[101,118]],[[13007,13007],"mapped",[108,116,100]],[[13008,13008],"mapped",[12450]],[[13009,13009],"mapped",[12452]],[[13010,13010],"mapped",[12454]],[[13011,13011],"mapped",[12456]],[[13012,13012],"mapped",[12458]],[[13013,13013],"mapped",[12459]],[[13014,13014],"mapped",[12461]],[[13015,13015],"mapped",[12463]],[[13016,13016],"mapped",[12465]],[[13017,13017],"mapped",[12467]],[[13018,13018],"mapped",[12469]],[[13019,13019],"mapped",[12471]],[[13020,13020],"mapped",[12473]],[[13021,13021],"mapped",[12475]],[[13022,13022],"mapped",[12477]],[[13023,13023],"mapped",[12479]],[[13024,13024],"mapped",[12481]],[[13025,13025],"mapped",[12484]],[[13026,13026],"mapped",[12486]],[[13027,13027],"mapped",[12488]],[[13028,13028],"mapped",[12490]],[[13029,13029],"mapped",[12491]],[[13030,13030],"mapped",[12492]],[[13031,13031],"mapped",[12493]],[[13032,13032],"mapped",[12494]],[[13033,13033],"mapped",[12495]],[[13034,13034],"mapped",[12498]],[[13035,13035],"mapped",[12501]],[[13036,13036],"mapped",[12504]],[[13037,13037],"mapped",[12507]],[[13038,13038],"mapped",[12510]],[[13039,13039],"mapped",[12511]],[[13040,13040],"mapped",[12512]],[[13041,13041],"mapped",[12513]],[[13042,13042],"mapped",[12514]],[[13043,13043],"mapped",[12516]],[[13044,13044],"mapped",[12518]],[[13045,13045],"mapped",[12520]],[[13046,13046],"mapped",[12521]],[[13047,13047],"mapped",[12522]],[[13048,13048],"mapped",[12523]],[[13049,13049],"mapped",[12524]],[[13050,13050],"mapped",[12525]],[[13051,13051],"mapped",[12527]],[[13052,13052],"mapped",[12528]],[[13053,13053],"mapped",[12529]],[[13054,13054],"mapped",[12530]],[[13055,13055],"disallowed"],[[13056,13056],"mapped",[12450,12497,12540,12488]],[[13057,13057],"mapped",[12450,12523,12501,12449]],[[13058,13058],"mapped",[12450,12531,12506,12450]],[[13059,13059],"mapped",[12450,12540,12523]],[[13060,13060],"mapped",[12452,12491,12531,12464]],[[13061,13061],"mapped",[12452,12531,12481]],[[13062,13062],"mapped",[12454,12457,12531]],[[13063,13063],"mapped",[12456,12473,12463,12540,12489]],[[13064,13064],"mapped",[12456,12540,12459,12540]],[[13065,13065],"mapped",[12458,12531,12473]],[[13066,13066],"mapped",[12458,12540,12512]],[[13067,13067],"mapped",[12459,12452,12522]],[[13068,13068],"mapped",[12459,12521,12483,12488]],[[13069,13069],"mapped",[12459,12525,12522,12540]],[[13070,13070],"mapped",[12460,12525,12531]],[[13071,13071],"mapped",[12460,12531,12510]],[[13072,13072],"mapped",[12462,12460]],[[13073,13073],"mapped",[12462,12491,12540]],[[13074,13074],"mapped",[12461,12517,12522,12540]],[[13075,13075],"mapped",[12462,12523,12480,12540]],[[13076,13076],"mapped",[12461,12525]],[[13077,13077],"mapped",[12461,12525,12464,12521,12512]],[[13078,13078],"mapped",[12461,12525,12513,12540,12488,12523]],[[13079,13079],"mapped",[12461,12525,12527,12483,12488]],[[13080,13080],"mapped",[12464,12521,12512]],[[13081,13081],"mapped",[12464,12521,12512,12488,12531]],[[13082,13082],"mapped",[12463,12523,12476,12452,12525]],[[13083,13083],"mapped",[12463,12525,12540,12493]],[[13084,13084],"mapped",[12465,12540,12473]],[[13085,13085],"mapped",[12467,12523,12490]],[[13086,13086],"mapped",[12467,12540,12509]],[[13087,13087],"mapped",[12469,12452,12463,12523]],[[13088,13088],"mapped",[12469,12531,12481,12540,12512]],[[13089,13089],"mapped",[12471,12522,12531,12464]],[[13090,13090],"mapped",[12475,12531,12481]],[[13091,13091],"mapped",[12475,12531,12488]],[[13092,13092],"mapped",[12480,12540,12473]],[[13093,13093],"mapped",[12487,12471]],[[13094,13094],"mapped",[12489,12523]],[[13095,13095],"mapped",[12488,12531]],[[13096,13096],"mapped",[12490,12494]],[[13097,13097],"mapped",[12494,12483,12488]],[[13098,13098],"mapped",[12495,12452,12484]],[[13099,13099],"mapped",[12497,12540,12475,12531,12488]],[[13100,13100],"mapped",[12497,12540,12484]],[[13101,13101],"mapped",[12496,12540,12524,12523]],[[13102,13102],"mapped",[12500,12450,12473,12488,12523]],[[13103,13103],"mapped",[12500,12463,12523]],[[13104,13104],"mapped",[12500,12467]],[[13105,13105],"mapped",[12499,12523]],[[13106,13106],"mapped",[12501,12449,12521,12483,12489]],[[13107,13107],"mapped",[12501,12451,12540,12488]],[[13108,13108],"mapped",[12502,12483,12471,12455,12523]],[[13109,13109],"mapped",[12501,12521,12531]],[[13110,13110],"mapped",[12504,12463,12479,12540,12523]],[[13111,13111],"mapped",[12506,12477]],[[13112,13112],"mapped",[12506,12491,12498]],[[13113,13113],"mapped",[12504,12523,12484]],[[13114,13114],"mapped",[12506,12531,12473]],[[13115,13115],"mapped",[12506,12540,12472]],[[13116,13116],"mapped",[12505,12540,12479]],[[13117,13117],"mapped",[12509,12452,12531,12488]],[[13118,13118],"mapped",[12508,12523,12488]],[[13119,13119],"mapped",[12507,12531]],[[13120,13120],"mapped",[12509,12531,12489]],[[13121,13121],"mapped",[12507,12540,12523]],[[13122,13122],"mapped",[12507,12540,12531]],[[13123,13123],"mapped",[12510,12452,12463,12525]],[[13124,13124],"mapped",[12510,12452,12523]],[[13125,13125],"mapped",[12510,12483,12495]],[[13126,13126],"mapped",[12510,12523,12463]],[[13127,13127],"mapped",[12510,12531,12471,12519,12531]],[[13128,13128],"mapped",[12511,12463,12525,12531]],[[13129,13129],"mapped",[12511,12522]],[[13130,13130],"mapped",[12511,12522,12496,12540,12523]],[[13131,13131],"mapped",[12513,12460]],[[13132,13132],"mapped",[12513,12460,12488,12531]],[[13133,13133],"mapped",[12513,12540,12488,12523]],[[13134,13134],"mapped",[12516,12540,12489]],[[13135,13135],"mapped",[12516,12540,12523]],[[13136,13136],"mapped",[12518,12450,12531]],[[13137,13137],"mapped",[12522,12483,12488,12523]],[[13138,13138],"mapped",[12522,12521]],[[13139,13139],"mapped",[12523,12500,12540]],[[13140,13140],"mapped",[12523,12540,12502,12523]],[[13141,13141],"mapped",[12524,12512]],[[13142,13142],"mapped",[12524,12531,12488,12466,12531]],[[13143,13143],"mapped",[12527,12483,12488]],[[13144,13144],"mapped",[48,28857]],[[13145,13145],"mapped",[49,28857]],[[13146,13146],"mapped",[50,28857]],[[13147,13147],"mapped",[51,28857]],[[13148,13148],"mapped",[52,28857]],[[13149,13149],"mapped",[53,28857]],[[13150,13150],"mapped",[54,28857]],[[13151,13151],"mapped",[55,28857]],[[13152,13152],"mapped",[56,28857]],[[13153,13153],"mapped",[57,28857]],[[13154,13154],"mapped",[49,48,28857]],[[13155,13155],"mapped",[49,49,28857]],[[13156,13156],"mapped",[49,50,28857]],[[13157,13157],"mapped",[49,51,28857]],[[13158,13158],"mapped",[49,52,28857]],[[13159,13159],"mapped",[49,53,28857]],[[13160,13160],"mapped",[49,54,28857]],[[13161,13161],"mapped",[49,55,28857]],[[13162,13162],"mapped",[49,56,28857]],[[13163,13163],"mapped",[49,57,28857]],[[13164,13164],"mapped",[50,48,28857]],[[13165,13165],"mapped",[50,49,28857]],[[13166,13166],"mapped",[50,50,28857]],[[13167,13167],"mapped",[50,51,28857]],[[13168,13168],"mapped",[50,52,28857]],[[13169,13169],"mapped",[104,112,97]],[[13170,13170],"mapped",[100,97]],[[13171,13171],"mapped",[97,117]],[[13172,13172],"mapped",[98,97,114]],[[13173,13173],"mapped",[111,118]],[[13174,13174],"mapped",[112,99]],[[13175,13175],"mapped",[100,109]],[[13176,13176],"mapped",[100,109,50]],[[13177,13177],"mapped",[100,109,51]],[[13178,13178],"mapped",[105,117]],[[13179,13179],"mapped",[24179,25104]],[[13180,13180],"mapped",[26157,21644]],[[13181,13181],"mapped",[22823,27491]],[[13182,13182],"mapped",[26126,27835]],[[13183,13183],"mapped",[26666,24335,20250,31038]],[[13184,13184],"mapped",[112,97]],[[13185,13185],"mapped",[110,97]],[[13186,13186],"mapped",[956,97]],[[13187,13187],"mapped",[109,97]],[[13188,13188],"mapped",[107,97]],[[13189,13189],"mapped",[107,98]],[[13190,13190],"mapped",[109,98]],[[13191,13191],"mapped",[103,98]],[[13192,13192],"mapped",[99,97,108]],[[13193,13193],"mapped",[107,99,97,108]],[[13194,13194],"mapped",[112,102]],[[13195,13195],"mapped",[110,102]],[[13196,13196],"mapped",[956,102]],[[13197,13197],"mapped",[956,103]],[[13198,13198],"mapped",[109,103]],[[13199,13199],"mapped",[107,103]],[[13200,13200],"mapped",[104,122]],[[13201,13201],"mapped",[107,104,122]],[[13202,13202],"mapped",[109,104,122]],[[13203,13203],"mapped",[103,104,122]],[[13204,13204],"mapped",[116,104,122]],[[13205,13205],"mapped",[956,108]],[[13206,13206],"mapped",[109,108]],[[13207,13207],"mapped",[100,108]],[[13208,13208],"mapped",[107,108]],[[13209,13209],"mapped",[102,109]],[[13210,13210],"mapped",[110,109]],[[13211,13211],"mapped",[956,109]],[[13212,13212],"mapped",[109,109]],[[13213,13213],"mapped",[99,109]],[[13214,13214],"mapped",[107,109]],[[13215,13215],"mapped",[109,109,50]],[[13216,13216],"mapped",[99,109,50]],[[13217,13217],"mapped",[109,50]],[[13218,13218],"mapped",[107,109,50]],[[13219,13219],"mapped",[109,109,51]],[[13220,13220],"mapped",[99,109,51]],[[13221,13221],"mapped",[109,51]],[[13222,13222],"mapped",[107,109,51]],[[13223,13223],"mapped",[109,8725,115]],[[13224,13224],"mapped",[109,8725,115,50]],[[13225,13225],"mapped",[112,97]],[[13226,13226],"mapped",[107,112,97]],[[13227,13227],"mapped",[109,112,97]],[[13228,13228],"mapped",[103,112,97]],[[13229,13229],"mapped",[114,97,100]],[[13230,13230],"mapped",[114,97,100,8725,115]],[[13231,13231],"mapped",[114,97,100,8725,115,50]],[[13232,13232],"mapped",[112,115]],[[13233,13233],"mapped",[110,115]],[[13234,13234],"mapped",[956,115]],[[13235,13235],"mapped",[109,115]],[[13236,13236],"mapped",[112,118]],[[13237,13237],"mapped",[110,118]],[[13238,13238],"mapped",[956,118]],[[13239,13239],"mapped",[109,118]],[[13240,13240],"mapped",[107,118]],[[13241,13241],"mapped",[109,118]],[[13242,13242],"mapped",[112,119]],[[13243,13243],"mapped",[110,119]],[[13244,13244],"mapped",[956,119]],[[13245,13245],"mapped",[109,119]],[[13246,13246],"mapped",[107,119]],[[13247,13247],"mapped",[109,119]],[[13248,13248],"mapped",[107,969]],[[13249,13249],"mapped",[109,969]],[[13250,13250],"disallowed"],[[13251,13251],"mapped",[98,113]],[[13252,13252],"mapped",[99,99]],[[13253,13253],"mapped",[99,100]],[[13254,13254],"mapped",[99,8725,107,103]],[[13255,13255],"disallowed"],[[13256,13256],"mapped",[100,98]],[[13257,13257],"mapped",[103,121]],[[13258,13258],"mapped",[104,97]],[[13259,13259],"mapped",[104,112]],[[13260,13260],"mapped",[105,110]],[[13261,13261],"mapped",[107,107]],[[13262,13262],"mapped",[107,109]],[[13263,13263],"mapped",[107,116]],[[13264,13264],"mapped",[108,109]],[[13265,13265],"mapped",[108,110]],[[13266,13266],"mapped",[108,111,103]],[[13267,13267],"mapped",[108,120]],[[13268,13268],"mapped",[109,98]],[[13269,13269],"mapped",[109,105,108]],[[13270,13270],"mapped",[109,111,108]],[[13271,13271],"mapped",[112,104]],[[13272,13272],"disallowed"],[[13273,13273],"mapped",[112,112,109]],[[13274,13274],"mapped",[112,114]],[[13275,13275],"mapped",[115,114]],[[13276,13276],"mapped",[115,118]],[[13277,13277],"mapped",[119,98]],[[13278,13278],"mapped",[118,8725,109]],[[13279,13279],"mapped",[97,8725,109]],[[13280,13280],"mapped",[49,26085]],[[13281,13281],"mapped",[50,26085]],[[13282,13282],"mapped",[51,26085]],[[13283,13283],"mapped",[52,26085]],[[13284,13284],"mapped",[53,26085]],[[13285,13285],"mapped",[54,26085]],[[13286,13286],"mapped",[55,26085]],[[13287,13287],"mapped",[56,26085]],[[13288,13288],"mapped",[57,26085]],[[13289,13289],"mapped",[49,48,26085]],[[13290,13290],"mapped",[49,49,26085]],[[13291,13291],"mapped",[49,50,26085]],[[13292,13292],"mapped",[49,51,26085]],[[13293,13293],"mapped",[49,52,26085]],[[13294,13294],"mapped",[49,53,26085]],[[13295,13295],"mapped",[49,54,26085]],[[13296,13296],"mapped",[49,55,26085]],[[13297,13297],"mapped",[49,56,26085]],[[13298,13298],"mapped",[49,57,26085]],[[13299,13299],"mapped",[50,48,26085]],[[13300,13300],"mapped",[50,49,26085]],[[13301,13301],"mapped",[50,50,26085]],[[13302,13302],"mapped",[50,51,26085]],[[13303,13303],"mapped",[50,52,26085]],[[13304,13304],"mapped",[50,53,26085]],[[13305,13305],"mapped",[50,54,26085]],[[13306,13306],"mapped",[50,55,26085]],[[13307,13307],"mapped",[50,56,26085]],[[13308,13308],"mapped",[50,57,26085]],[[13309,13309],"mapped",[51,48,26085]],[[13310,13310],"mapped",[51,49,26085]],[[13311,13311],"mapped",[103,97,108]],[[13312,19893],"valid"],[[19894,19903],"disallowed"],[[19904,19967],"valid",[],"NV8"],[[19968,40869],"valid"],[[40870,40891],"valid"],[[40892,40899],"valid"],[[40900,40907],"valid"],[[40908,40908],"valid"],[[40909,40917],"valid"],[[40918,40959],"disallowed"],[[40960,42124],"valid"],[[42125,42127],"disallowed"],[[42128,42145],"valid",[],"NV8"],[[42146,42147],"valid",[],"NV8"],[[42148,42163],"valid",[],"NV8"],[[42164,42164],"valid",[],"NV8"],[[42165,42176],"valid",[],"NV8"],[[42177,42177],"valid",[],"NV8"],[[42178,42180],"valid",[],"NV8"],[[42181,42181],"valid",[],"NV8"],[[42182,42182],"valid",[],"NV8"],[[42183,42191],"disallowed"],[[42192,42237],"valid"],[[42238,42239],"valid",[],"NV8"],[[42240,42508],"valid"],[[42509,42511],"valid",[],"NV8"],[[42512,42539],"valid"],[[42540,42559],"disallowed"],[[42560,42560],"mapped",[42561]],[[42561,42561],"valid"],[[42562,42562],"mapped",[42563]],[[42563,42563],"valid"],[[42564,42564],"mapped",[42565]],[[42565,42565],"valid"],[[42566,42566],"mapped",[42567]],[[42567,42567],"valid"],[[42568,42568],"mapped",[42569]],[[42569,42569],"valid"],[[42570,42570],"mapped",[42571]],[[42571,42571],"valid"],[[42572,42572],"mapped",[42573]],[[42573,42573],"valid"],[[42574,42574],"mapped",[42575]],[[42575,42575],"valid"],[[42576,42576],"mapped",[42577]],[[42577,42577],"valid"],[[42578,42578],"mapped",[42579]],[[42579,42579],"valid"],[[42580,42580],"mapped",[42581]],[[42581,42581],"valid"],[[42582,42582],"mapped",[42583]],[[42583,42583],"valid"],[[42584,42584],"mapped",[42585]],[[42585,42585],"valid"],[[42586,42586],"mapped",[42587]],[[42587,42587],"valid"],[[42588,42588],"mapped",[42589]],[[42589,42589],"valid"],[[42590,42590],"mapped",[42591]],[[42591,42591],"valid"],[[42592,42592],"mapped",[42593]],[[42593,42593],"valid"],[[42594,42594],"mapped",[42595]],[[42595,42595],"valid"],[[42596,42596],"mapped",[42597]],[[42597,42597],"valid"],[[42598,42598],"mapped",[42599]],[[42599,42599],"valid"],[[42600,42600],"mapped",[42601]],[[42601,42601],"valid"],[[42602,42602],"mapped",[42603]],[[42603,42603],"valid"],[[42604,42604],"mapped",[42605]],[[42605,42607],"valid"],[[42608,42611],"valid",[],"NV8"],[[42612,42619],"valid"],[[42620,42621],"valid"],[[42622,42622],"valid",[],"NV8"],[[42623,42623],"valid"],[[42624,42624],"mapped",[42625]],[[42625,42625],"valid"],[[42626,42626],"mapped",[42627]],[[42627,42627],"valid"],[[42628,42628],"mapped",[42629]],[[42629,42629],"valid"],[[42630,42630],"mapped",[42631]],[[42631,42631],"valid"],[[42632,42632],"mapped",[42633]],[[42633,42633],"valid"],[[42634,42634],"mapped",[42635]],[[42635,42635],"valid"],[[42636,42636],"mapped",[42637]],[[42637,42637],"valid"],[[42638,42638],"mapped",[42639]],[[42639,42639],"valid"],[[42640,42640],"mapped",[42641]],[[42641,42641],"valid"],[[42642,42642],"mapped",[42643]],[[42643,42643],"valid"],[[42644,42644],"mapped",[42645]],[[42645,42645],"valid"],[[42646,42646],"mapped",[42647]],[[42647,42647],"valid"],[[42648,42648],"mapped",[42649]],[[42649,42649],"valid"],[[42650,42650],"mapped",[42651]],[[42651,42651],"valid"],[[42652,42652],"mapped",[1098]],[[42653,42653],"mapped",[1100]],[[42654,42654],"valid"],[[42655,42655],"valid"],[[42656,42725],"valid"],[[42726,42735],"valid",[],"NV8"],[[42736,42737],"valid"],[[42738,42743],"valid",[],"NV8"],[[42744,42751],"disallowed"],[[42752,42774],"valid",[],"NV8"],[[42775,42778],"valid"],[[42779,42783],"valid"],[[42784,42785],"valid",[],"NV8"],[[42786,42786],"mapped",[42787]],[[42787,42787],"valid"],[[42788,42788],"mapped",[42789]],[[42789,42789],"valid"],[[42790,42790],"mapped",[42791]],[[42791,42791],"valid"],[[42792,42792],"mapped",[42793]],[[42793,42793],"valid"],[[42794,42794],"mapped",[42795]],[[42795,42795],"valid"],[[42796,42796],"mapped",[42797]],[[42797,42797],"valid"],[[42798,42798],"mapped",[42799]],[[42799,42801],"valid"],[[42802,42802],"mapped",[42803]],[[42803,42803],"valid"],[[42804,42804],"mapped",[42805]],[[42805,42805],"valid"],[[42806,42806],"mapped",[42807]],[[42807,42807],"valid"],[[42808,42808],"mapped",[42809]],[[42809,42809],"valid"],[[42810,42810],"mapped",[42811]],[[42811,42811],"valid"],[[42812,42812],"mapped",[42813]],[[42813,42813],"valid"],[[42814,42814],"mapped",[42815]],[[42815,42815],"valid"],[[42816,42816],"mapped",[42817]],[[42817,42817],"valid"],[[42818,42818],"mapped",[42819]],[[42819,42819],"valid"],[[42820,42820],"mapped",[42821]],[[42821,42821],"valid"],[[42822,42822],"mapped",[42823]],[[42823,42823],"valid"],[[42824,42824],"mapped",[42825]],[[42825,42825],"valid"],[[42826,42826],"mapped",[42827]],[[42827,42827],"valid"],[[42828,42828],"mapped",[42829]],[[42829,42829],"valid"],[[42830,42830],"mapped",[42831]],[[42831,42831],"valid"],[[42832,42832],"mapped",[42833]],[[42833,42833],"valid"],[[42834,42834],"mapped",[42835]],[[42835,42835],"valid"],[[42836,42836],"mapped",[42837]],[[42837,42837],"valid"],[[42838,42838],"mapped",[42839]],[[42839,42839],"valid"],[[42840,42840],"mapped",[42841]],[[42841,42841],"valid"],[[42842,42842],"mapped",[42843]],[[42843,42843],"valid"],[[42844,42844],"mapped",[42845]],[[42845,42845],"valid"],[[42846,42846],"mapped",[42847]],[[42847,42847],"valid"],[[42848,42848],"mapped",[42849]],[[42849,42849],"valid"],[[42850,42850],"mapped",[42851]],[[42851,42851],"valid"],[[42852,42852],"mapped",[42853]],[[42853,42853],"valid"],[[42854,42854],"mapped",[42855]],[[42855,42855],"valid"],[[42856,42856],"mapped",[42857]],[[42857,42857],"valid"],[[42858,42858],"mapped",[42859]],[[42859,42859],"valid"],[[42860,42860],"mapped",[42861]],[[42861,42861],"valid"],[[42862,42862],"mapped",[42863]],[[42863,42863],"valid"],[[42864,42864],"mapped",[42863]],[[42865,42872],"valid"],[[42873,42873],"mapped",[42874]],[[42874,42874],"valid"],[[42875,42875],"mapped",[42876]],[[42876,42876],"valid"],[[42877,42877],"mapped",[7545]],[[42878,42878],"mapped",[42879]],[[42879,42879],"valid"],[[42880,42880],"mapped",[42881]],[[42881,42881],"valid"],[[42882,42882],"mapped",[42883]],[[42883,42883],"valid"],[[42884,42884],"mapped",[42885]],[[42885,42885],"valid"],[[42886,42886],"mapped",[42887]],[[42887,42888],"valid"],[[42889,42890],"valid",[],"NV8"],[[42891,42891],"mapped",[42892]],[[42892,42892],"valid"],[[42893,42893],"mapped",[613]],[[42894,42894],"valid"],[[42895,42895],"valid"],[[42896,42896],"mapped",[42897]],[[42897,42897],"valid"],[[42898,42898],"mapped",[42899]],[[42899,42899],"valid"],[[42900,42901],"valid"],[[42902,42902],"mapped",[42903]],[[42903,42903],"valid"],[[42904,42904],"mapped",[42905]],[[42905,42905],"valid"],[[42906,42906],"mapped",[42907]],[[42907,42907],"valid"],[[42908,42908],"mapped",[42909]],[[42909,42909],"valid"],[[42910,42910],"mapped",[42911]],[[42911,42911],"valid"],[[42912,42912],"mapped",[42913]],[[42913,42913],"valid"],[[42914,42914],"mapped",[42915]],[[42915,42915],"valid"],[[42916,42916],"mapped",[42917]],[[42917,42917],"valid"],[[42918,42918],"mapped",[42919]],[[42919,42919],"valid"],[[42920,42920],"mapped",[42921]],[[42921,42921],"valid"],[[42922,42922],"mapped",[614]],[[42923,42923],"mapped",[604]],[[42924,42924],"mapped",[609]],[[42925,42925],"mapped",[620]],[[42926,42927],"disallowed"],[[42928,42928],"mapped",[670]],[[42929,42929],"mapped",[647]],[[42930,42930],"mapped",[669]],[[42931,42931],"mapped",[43859]],[[42932,42932],"mapped",[42933]],[[42933,42933],"valid"],[[42934,42934],"mapped",[42935]],[[42935,42935],"valid"],[[42936,42998],"disallowed"],[[42999,42999],"valid"],[[43000,43000],"mapped",[295]],[[43001,43001],"mapped",[339]],[[43002,43002],"valid"],[[43003,43007],"valid"],[[43008,43047],"valid"],[[43048,43051],"valid",[],"NV8"],[[43052,43055],"disallowed"],[[43056,43065],"valid",[],"NV8"],[[43066,43071],"disallowed"],[[43072,43123],"valid"],[[43124,43127],"valid",[],"NV8"],[[43128,43135],"disallowed"],[[43136,43204],"valid"],[[43205,43213],"disallowed"],[[43214,43215],"valid",[],"NV8"],[[43216,43225],"valid"],[[43226,43231],"disallowed"],[[43232,43255],"valid"],[[43256,43258],"valid",[],"NV8"],[[43259,43259],"valid"],[[43260,43260],"valid",[],"NV8"],[[43261,43261],"valid"],[[43262,43263],"disallowed"],[[43264,43309],"valid"],[[43310,43311],"valid",[],"NV8"],[[43312,43347],"valid"],[[43348,43358],"disallowed"],[[43359,43359],"valid",[],"NV8"],[[43360,43388],"valid",[],"NV8"],[[43389,43391],"disallowed"],[[43392,43456],"valid"],[[43457,43469],"valid",[],"NV8"],[[43470,43470],"disallowed"],[[43471,43481],"valid"],[[43482,43485],"disallowed"],[[43486,43487],"valid",[],"NV8"],[[43488,43518],"valid"],[[43519,43519],"disallowed"],[[43520,43574],"valid"],[[43575,43583],"disallowed"],[[43584,43597],"valid"],[[43598,43599],"disallowed"],[[43600,43609],"valid"],[[43610,43611],"disallowed"],[[43612,43615],"valid",[],"NV8"],[[43616,43638],"valid"],[[43639,43641],"valid",[],"NV8"],[[43642,43643],"valid"],[[43644,43647],"valid"],[[43648,43714],"valid"],[[43715,43738],"disallowed"],[[43739,43741],"valid"],[[43742,43743],"valid",[],"NV8"],[[43744,43759],"valid"],[[43760,43761],"valid",[],"NV8"],[[43762,43766],"valid"],[[43767,43776],"disallowed"],[[43777,43782],"valid"],[[43783,43784],"disallowed"],[[43785,43790],"valid"],[[43791,43792],"disallowed"],[[43793,43798],"valid"],[[43799,43807],"disallowed"],[[43808,43814],"valid"],[[43815,43815],"disallowed"],[[43816,43822],"valid"],[[43823,43823],"disallowed"],[[43824,43866],"valid"],[[43867,43867],"valid",[],"NV8"],[[43868,43868],"mapped",[42791]],[[43869,43869],"mapped",[43831]],[[43870,43870],"mapped",[619]],[[43871,43871],"mapped",[43858]],[[43872,43875],"valid"],[[43876,43877],"valid"],[[43878,43887],"disallowed"],[[43888,43888],"mapped",[5024]],[[43889,43889],"mapped",[5025]],[[43890,43890],"mapped",[5026]],[[43891,43891],"mapped",[5027]],[[43892,43892],"mapped",[5028]],[[43893,43893],"mapped",[5029]],[[43894,43894],"mapped",[5030]],[[43895,43895],"mapped",[5031]],[[43896,43896],"mapped",[5032]],[[43897,43897],"mapped",[5033]],[[43898,43898],"mapped",[5034]],[[43899,43899],"mapped",[5035]],[[43900,43900],"mapped",[5036]],[[43901,43901],"mapped",[5037]],[[43902,43902],"mapped",[5038]],[[43903,43903],"mapped",[5039]],[[43904,43904],"mapped",[5040]],[[43905,43905],"mapped",[5041]],[[43906,43906],"mapped",[5042]],[[43907,43907],"mapped",[5043]],[[43908,43908],"mapped",[5044]],[[43909,43909],"mapped",[5045]],[[43910,43910],"mapped",[5046]],[[43911,43911],"mapped",[5047]],[[43912,43912],"mapped",[5048]],[[43913,43913],"mapped",[5049]],[[43914,43914],"mapped",[5050]],[[43915,43915],"mapped",[5051]],[[43916,43916],"mapped",[5052]],[[43917,43917],"mapped",[5053]],[[43918,43918],"mapped",[5054]],[[43919,43919],"mapped",[5055]],[[43920,43920],"mapped",[5056]],[[43921,43921],"mapped",[5057]],[[43922,43922],"mapped",[5058]],[[43923,43923],"mapped",[5059]],[[43924,43924],"mapped",[5060]],[[43925,43925],"mapped",[5061]],[[43926,43926],"mapped",[5062]],[[43927,43927],"mapped",[5063]],[[43928,43928],"mapped",[5064]],[[43929,43929],"mapped",[5065]],[[43930,43930],"mapped",[5066]],[[43931,43931],"mapped",[5067]],[[43932,43932],"mapped",[5068]],[[43933,43933],"mapped",[5069]],[[43934,43934],"mapped",[5070]],[[43935,43935],"mapped",[5071]],[[43936,43936],"mapped",[5072]],[[43937,43937],"mapped",[5073]],[[43938,43938],"mapped",[5074]],[[43939,43939],"mapped",[5075]],[[43940,43940],"mapped",[5076]],[[43941,43941],"mapped",[5077]],[[43942,43942],"mapped",[5078]],[[43943,43943],"mapped",[5079]],[[43944,43944],"mapped",[5080]],[[43945,43945],"mapped",[5081]],[[43946,43946],"mapped",[5082]],[[43947,43947],"mapped",[5083]],[[43948,43948],"mapped",[5084]],[[43949,43949],"mapped",[5085]],[[43950,43950],"mapped",[5086]],[[43951,43951],"mapped",[5087]],[[43952,43952],"mapped",[5088]],[[43953,43953],"mapped",[5089]],[[43954,43954],"mapped",[5090]],[[43955,43955],"mapped",[5091]],[[43956,43956],"mapped",[5092]],[[43957,43957],"mapped",[5093]],[[43958,43958],"mapped",[5094]],[[43959,43959],"mapped",[5095]],[[43960,43960],"mapped",[5096]],[[43961,43961],"mapped",[5097]],[[43962,43962],"mapped",[5098]],[[43963,43963],"mapped",[5099]],[[43964,43964],"mapped",[5100]],[[43965,43965],"mapped",[5101]],[[43966,43966],"mapped",[5102]],[[43967,43967],"mapped",[5103]],[[43968,44010],"valid"],[[44011,44011],"valid",[],"NV8"],[[44012,44013],"valid"],[[44014,44015],"disallowed"],[[44016,44025],"valid"],[[44026,44031],"disallowed"],[[44032,55203],"valid"],[[55204,55215],"disallowed"],[[55216,55238],"valid",[],"NV8"],[[55239,55242],"disallowed"],[[55243,55291],"valid",[],"NV8"],[[55292,55295],"disallowed"],[[55296,57343],"disallowed"],[[57344,63743],"disallowed"],[[63744,63744],"mapped",[35912]],[[63745,63745],"mapped",[26356]],[[63746,63746],"mapped",[36554]],[[63747,63747],"mapped",[36040]],[[63748,63748],"mapped",[28369]],[[63749,63749],"mapped",[20018]],[[63750,63750],"mapped",[21477]],[[63751,63752],"mapped",[40860]],[[63753,63753],"mapped",[22865]],[[63754,63754],"mapped",[37329]],[[63755,63755],"mapped",[21895]],[[63756,63756],"mapped",[22856]],[[63757,63757],"mapped",[25078]],[[63758,63758],"mapped",[30313]],[[63759,63759],"mapped",[32645]],[[63760,63760],"mapped",[34367]],[[63761,63761],"mapped",[34746]],[[63762,63762],"mapped",[35064]],[[63763,63763],"mapped",[37007]],[[63764,63764],"mapped",[27138]],[[63765,63765],"mapped",[27931]],[[63766,63766],"mapped",[28889]],[[63767,63767],"mapped",[29662]],[[63768,63768],"mapped",[33853]],[[63769,63769],"mapped",[37226]],[[63770,63770],"mapped",[39409]],[[63771,63771],"mapped",[20098]],[[63772,63772],"mapped",[21365]],[[63773,63773],"mapped",[27396]],[[63774,63774],"mapped",[29211]],[[63775,63775],"mapped",[34349]],[[63776,63776],"mapped",[40478]],[[63777,63777],"mapped",[23888]],[[63778,63778],"mapped",[28651]],[[63779,63779],"mapped",[34253]],[[63780,63780],"mapped",[35172]],[[63781,63781],"mapped",[25289]],[[63782,63782],"mapped",[33240]],[[63783,63783],"mapped",[34847]],[[63784,63784],"mapped",[24266]],[[63785,63785],"mapped",[26391]],[[63786,63786],"mapped",[28010]],[[63787,63787],"mapped",[29436]],[[63788,63788],"mapped",[37070]],[[63789,63789],"mapped",[20358]],[[63790,63790],"mapped",[20919]],[[63791,63791],"mapped",[21214]],[[63792,63792],"mapped",[25796]],[[63793,63793],"mapped",[27347]],[[63794,63794],"mapped",[29200]],[[63795,63795],"mapped",[30439]],[[63796,63796],"mapped",[32769]],[[63797,63797],"mapped",[34310]],[[63798,63798],"mapped",[34396]],[[63799,63799],"mapped",[36335]],[[63800,63800],"mapped",[38706]],[[63801,63801],"mapped",[39791]],[[63802,63802],"mapped",[40442]],[[63803,63803],"mapped",[30860]],[[63804,63804],"mapped",[31103]],[[63805,63805],"mapped",[32160]],[[63806,63806],"mapped",[33737]],[[63807,63807],"mapped",[37636]],[[63808,63808],"mapped",[40575]],[[63809,63809],"mapped",[35542]],[[63810,63810],"mapped",[22751]],[[63811,63811],"mapped",[24324]],[[63812,63812],"mapped",[31840]],[[63813,63813],"mapped",[32894]],[[63814,63814],"mapped",[29282]],[[63815,63815],"mapped",[30922]],[[63816,63816],"mapped",[36034]],[[63817,63817],"mapped",[38647]],[[63818,63818],"mapped",[22744]],[[63819,63819],"mapped",[23650]],[[63820,63820],"mapped",[27155]],[[63821,63821],"mapped",[28122]],[[63822,63822],"mapped",[28431]],[[63823,63823],"mapped",[32047]],[[63824,63824],"mapped",[32311]],[[63825,63825],"mapped",[38475]],[[63826,63826],"mapped",[21202]],[[63827,63827],"mapped",[32907]],[[63828,63828],"mapped",[20956]],[[63829,63829],"mapped",[20940]],[[63830,63830],"mapped",[31260]],[[63831,63831],"mapped",[32190]],[[63832,63832],"mapped",[33777]],[[63833,63833],"mapped",[38517]],[[63834,63834],"mapped",[35712]],[[63835,63835],"mapped",[25295]],[[63836,63836],"mapped",[27138]],[[63837,63837],"mapped",[35582]],[[63838,63838],"mapped",[20025]],[[63839,63839],"mapped",[23527]],[[63840,63840],"mapped",[24594]],[[63841,63841],"mapped",[29575]],[[63842,63842],"mapped",[30064]],[[63843,63843],"mapped",[21271]],[[63844,63844],"mapped",[30971]],[[63845,63845],"mapped",[20415]],[[63846,63846],"mapped",[24489]],[[63847,63847],"mapped",[19981]],[[63848,63848],"mapped",[27852]],[[63849,63849],"mapped",[25976]],[[63850,63850],"mapped",[32034]],[[63851,63851],"mapped",[21443]],[[63852,63852],"mapped",[22622]],[[63853,63853],"mapped",[30465]],[[63854,63854],"mapped",[33865]],[[63855,63855],"mapped",[35498]],[[63856,63856],"mapped",[27578]],[[63857,63857],"mapped",[36784]],[[63858,63858],"mapped",[27784]],[[63859,63859],"mapped",[25342]],[[63860,63860],"mapped",[33509]],[[63861,63861],"mapped",[25504]],[[63862,63862],"mapped",[30053]],[[63863,63863],"mapped",[20142]],[[63864,63864],"mapped",[20841]],[[63865,63865],"mapped",[20937]],[[63866,63866],"mapped",[26753]],[[63867,63867],"mapped",[31975]],[[63868,63868],"mapped",[33391]],[[63869,63869],"mapped",[35538]],[[63870,63870],"mapped",[37327]],[[63871,63871],"mapped",[21237]],[[63872,63872],"mapped",[21570]],[[63873,63873],"mapped",[22899]],[[63874,63874],"mapped",[24300]],[[63875,63875],"mapped",[26053]],[[63876,63876],"mapped",[28670]],[[63877,63877],"mapped",[31018]],[[63878,63878],"mapped",[38317]],[[63879,63879],"mapped",[39530]],[[63880,63880],"mapped",[40599]],[[63881,63881],"mapped",[40654]],[[63882,63882],"mapped",[21147]],[[63883,63883],"mapped",[26310]],[[63884,63884],"mapped",[27511]],[[63885,63885],"mapped",[36706]],[[63886,63886],"mapped",[24180]],[[63887,63887],"mapped",[24976]],[[63888,63888],"mapped",[25088]],[[63889,63889],"mapped",[25754]],[[63890,63890],"mapped",[28451]],[[63891,63891],"mapped",[29001]],[[63892,63892],"mapped",[29833]],[[63893,63893],"mapped",[31178]],[[63894,63894],"mapped",[32244]],[[63895,63895],"mapped",[32879]],[[63896,63896],"mapped",[36646]],[[63897,63897],"mapped",[34030]],[[63898,63898],"mapped",[36899]],[[63899,63899],"mapped",[37706]],[[63900,63900],"mapped",[21015]],[[63901,63901],"mapped",[21155]],[[63902,63902],"mapped",[21693]],[[63903,63903],"mapped",[28872]],[[63904,63904],"mapped",[35010]],[[63905,63905],"mapped",[35498]],[[63906,63906],"mapped",[24265]],[[63907,63907],"mapped",[24565]],[[63908,63908],"mapped",[25467]],[[63909,63909],"mapped",[27566]],[[63910,63910],"mapped",[31806]],[[63911,63911],"mapped",[29557]],[[63912,63912],"mapped",[20196]],[[63913,63913],"mapped",[22265]],[[63914,63914],"mapped",[23527]],[[63915,63915],"mapped",[23994]],[[63916,63916],"mapped",[24604]],[[63917,63917],"mapped",[29618]],[[63918,63918],"mapped",[29801]],[[63919,63919],"mapped",[32666]],[[63920,63920],"mapped",[32838]],[[63921,63921],"mapped",[37428]],[[63922,63922],"mapped",[38646]],[[63923,63923],"mapped",[38728]],[[63924,63924],"mapped",[38936]],[[63925,63925],"mapped",[20363]],[[63926,63926],"mapped",[31150]],[[63927,63927],"mapped",[37300]],[[63928,63928],"mapped",[38584]],[[63929,63929],"mapped",[24801]],[[63930,63930],"mapped",[20102]],[[63931,63931],"mapped",[20698]],[[63932,63932],"mapped",[23534]],[[63933,63933],"mapped",[23615]],[[63934,63934],"mapped",[26009]],[[63935,63935],"mapped",[27138]],[[63936,63936],"mapped",[29134]],[[63937,63937],"mapped",[30274]],[[63938,63938],"mapped",[34044]],[[63939,63939],"mapped",[36988]],[[63940,63940],"mapped",[40845]],[[63941,63941],"mapped",[26248]],[[63942,63942],"mapped",[38446]],[[63943,63943],"mapped",[21129]],[[63944,63944],"mapped",[26491]],[[63945,63945],"mapped",[26611]],[[63946,63946],"mapped",[27969]],[[63947,63947],"mapped",[28316]],[[63948,63948],"mapped",[29705]],[[63949,63949],"mapped",[30041]],[[63950,63950],"mapped",[30827]],[[63951,63951],"mapped",[32016]],[[63952,63952],"mapped",[39006]],[[63953,63953],"mapped",[20845]],[[63954,63954],"mapped",[25134]],[[63955,63955],"mapped",[38520]],[[63956,63956],"mapped",[20523]],[[63957,63957],"mapped",[23833]],[[63958,63958],"mapped",[28138]],[[63959,63959],"mapped",[36650]],[[63960,63960],"mapped",[24459]],[[63961,63961],"mapped",[24900]],[[63962,63962],"mapped",[26647]],[[63963,63963],"mapped",[29575]],[[63964,63964],"mapped",[38534]],[[63965,63965],"mapped",[21033]],[[63966,63966],"mapped",[21519]],[[63967,63967],"mapped",[23653]],[[63968,63968],"mapped",[26131]],[[63969,63969],"mapped",[26446]],[[63970,63970],"mapped",[26792]],[[63971,63971],"mapped",[27877]],[[63972,63972],"mapped",[29702]],[[63973,63973],"mapped",[30178]],[[63974,63974],"mapped",[32633]],[[63975,63975],"mapped",[35023]],[[63976,63976],"mapped",[35041]],[[63977,63977],"mapped",[37324]],[[63978,63978],"mapped",[38626]],[[63979,63979],"mapped",[21311]],[[63980,63980],"mapped",[28346]],[[63981,63981],"mapped",[21533]],[[63982,63982],"mapped",[29136]],[[63983,63983],"mapped",[29848]],[[63984,63984],"mapped",[34298]],[[63985,63985],"mapped",[38563]],[[63986,63986],"mapped",[40023]],[[63987,63987],"mapped",[40607]],[[63988,63988],"mapped",[26519]],[[63989,63989],"mapped",[28107]],[[63990,63990],"mapped",[33256]],[[63991,63991],"mapped",[31435]],[[63992,63992],"mapped",[31520]],[[63993,63993],"mapped",[31890]],[[63994,63994],"mapped",[29376]],[[63995,63995],"mapped",[28825]],[[63996,63996],"mapped",[35672]],[[63997,63997],"mapped",[20160]],[[63998,63998],"mapped",[33590]],[[63999,63999],"mapped",[21050]],[[64000,64000],"mapped",[20999]],[[64001,64001],"mapped",[24230]],[[64002,64002],"mapped",[25299]],[[64003,64003],"mapped",[31958]],[[64004,64004],"mapped",[23429]],[[64005,64005],"mapped",[27934]],[[64006,64006],"mapped",[26292]],[[64007,64007],"mapped",[36667]],[[64008,64008],"mapped",[34892]],[[64009,64009],"mapped",[38477]],[[64010,64010],"mapped",[35211]],[[64011,64011],"mapped",[24275]],[[64012,64012],"mapped",[20800]],[[64013,64013],"mapped",[21952]],[[64014,64015],"valid"],[[64016,64016],"mapped",[22618]],[[64017,64017],"valid"],[[64018,64018],"mapped",[26228]],[[64019,64020],"valid"],[[64021,64021],"mapped",[20958]],[[64022,64022],"mapped",[29482]],[[64023,64023],"mapped",[30410]],[[64024,64024],"mapped",[31036]],[[64025,64025],"mapped",[31070]],[[64026,64026],"mapped",[31077]],[[64027,64027],"mapped",[31119]],[[64028,64028],"mapped",[38742]],[[64029,64029],"mapped",[31934]],[[64030,64030],"mapped",[32701]],[[64031,64031],"valid"],[[64032,64032],"mapped",[34322]],[[64033,64033],"valid"],[[64034,64034],"mapped",[35576]],[[64035,64036],"valid"],[[64037,64037],"mapped",[36920]],[[64038,64038],"mapped",[37117]],[[64039,64041],"valid"],[[64042,64042],"mapped",[39151]],[[64043,64043],"mapped",[39164]],[[64044,64044],"mapped",[39208]],[[64045,64045],"mapped",[40372]],[[64046,64046],"mapped",[37086]],[[64047,64047],"mapped",[38583]],[[64048,64048],"mapped",[20398]],[[64049,64049],"mapped",[20711]],[[64050,64050],"mapped",[20813]],[[64051,64051],"mapped",[21193]],[[64052,64052],"mapped",[21220]],[[64053,64053],"mapped",[21329]],[[64054,64054],"mapped",[21917]],[[64055,64055],"mapped",[22022]],[[64056,64056],"mapped",[22120]],[[64057,64057],"mapped",[22592]],[[64058,64058],"mapped",[22696]],[[64059,64059],"mapped",[23652]],[[64060,64060],"mapped",[23662]],[[64061,64061],"mapped",[24724]],[[64062,64062],"mapped",[24936]],[[64063,64063],"mapped",[24974]],[[64064,64064],"mapped",[25074]],[[64065,64065],"mapped",[25935]],[[64066,64066],"mapped",[26082]],[[64067,64067],"mapped",[26257]],[[64068,64068],"mapped",[26757]],[[64069,64069],"mapped",[28023]],[[64070,64070],"mapped",[28186]],[[64071,64071],"mapped",[28450]],[[64072,64072],"mapped",[29038]],[[64073,64073],"mapped",[29227]],[[64074,64074],"mapped",[29730]],[[64075,64075],"mapped",[30865]],[[64076,64076],"mapped",[31038]],[[64077,64077],"mapped",[31049]],[[64078,64078],"mapped",[31048]],[[64079,64079],"mapped",[31056]],[[64080,64080],"mapped",[31062]],[[64081,64081],"mapped",[31069]],[[64082,64082],"mapped",[31117]],[[64083,64083],"mapped",[31118]],[[64084,64084],"mapped",[31296]],[[64085,64085],"mapped",[31361]],[[64086,64086],"mapped",[31680]],[[64087,64087],"mapped",[32244]],[[64088,64088],"mapped",[32265]],[[64089,64089],"mapped",[32321]],[[64090,64090],"mapped",[32626]],[[64091,64091],"mapped",[32773]],[[64092,64092],"mapped",[33261]],[[64093,64094],"mapped",[33401]],[[64095,64095],"mapped",[33879]],[[64096,64096],"mapped",[35088]],[[64097,64097],"mapped",[35222]],[[64098,64098],"mapped",[35585]],[[64099,64099],"mapped",[35641]],[[64100,64100],"mapped",[36051]],[[64101,64101],"mapped",[36104]],[[64102,64102],"mapped",[36790]],[[64103,64103],"mapped",[36920]],[[64104,64104],"mapped",[38627]],[[64105,64105],"mapped",[38911]],[[64106,64106],"mapped",[38971]],[[64107,64107],"mapped",[24693]],[[64108,64108],"mapped",[148206]],[[64109,64109],"mapped",[33304]],[[64110,64111],"disallowed"],[[64112,64112],"mapped",[20006]],[[64113,64113],"mapped",[20917]],[[64114,64114],"mapped",[20840]],[[64115,64115],"mapped",[20352]],[[64116,64116],"mapped",[20805]],[[64117,64117],"mapped",[20864]],[[64118,64118],"mapped",[21191]],[[64119,64119],"mapped",[21242]],[[64120,64120],"mapped",[21917]],[[64121,64121],"mapped",[21845]],[[64122,64122],"mapped",[21913]],[[64123,64123],"mapped",[21986]],[[64124,64124],"mapped",[22618]],[[64125,64125],"mapped",[22707]],[[64126,64126],"mapped",[22852]],[[64127,64127],"mapped",[22868]],[[64128,64128],"mapped",[23138]],[[64129,64129],"mapped",[23336]],[[64130,64130],"mapped",[24274]],[[64131,64131],"mapped",[24281]],[[64132,64132],"mapped",[24425]],[[64133,64133],"mapped",[24493]],[[64134,64134],"mapped",[24792]],[[64135,64135],"mapped",[24910]],[[64136,64136],"mapped",[24840]],[[64137,64137],"mapped",[24974]],[[64138,64138],"mapped",[24928]],[[64139,64139],"mapped",[25074]],[[64140,64140],"mapped",[25140]],[[64141,64141],"mapped",[25540]],[[64142,64142],"mapped",[25628]],[[64143,64143],"mapped",[25682]],[[64144,64144],"mapped",[25942]],[[64145,64145],"mapped",[26228]],[[64146,64146],"mapped",[26391]],[[64147,64147],"mapped",[26395]],[[64148,64148],"mapped",[26454]],[[64149,64149],"mapped",[27513]],[[64150,64150],"mapped",[27578]],[[64151,64151],"mapped",[27969]],[[64152,64152],"mapped",[28379]],[[64153,64153],"mapped",[28363]],[[64154,64154],"mapped",[28450]],[[64155,64155],"mapped",[28702]],[[64156,64156],"mapped",[29038]],[[64157,64157],"mapped",[30631]],[[64158,64158],"mapped",[29237]],[[64159,64159],"mapped",[29359]],[[64160,64160],"mapped",[29482]],[[64161,64161],"mapped",[29809]],[[64162,64162],"mapped",[29958]],[[64163,64163],"mapped",[30011]],[[64164,64164],"mapped",[30237]],[[64165,64165],"mapped",[30239]],[[64166,64166],"mapped",[30410]],[[64167,64167],"mapped",[30427]],[[64168,64168],"mapped",[30452]],[[64169,64169],"mapped",[30538]],[[64170,64170],"mapped",[30528]],[[64171,64171],"mapped",[30924]],[[64172,64172],"mapped",[31409]],[[64173,64173],"mapped",[31680]],[[64174,64174],"mapped",[31867]],[[64175,64175],"mapped",[32091]],[[64176,64176],"mapped",[32244]],[[64177,64177],"mapped",[32574]],[[64178,64178],"mapped",[32773]],[[64179,64179],"mapped",[33618]],[[64180,64180],"mapped",[33775]],[[64181,64181],"mapped",[34681]],[[64182,64182],"mapped",[35137]],[[64183,64183],"mapped",[35206]],[[64184,64184],"mapped",[35222]],[[64185,64185],"mapped",[35519]],[[64186,64186],"mapped",[35576]],[[64187,64187],"mapped",[35531]],[[64188,64188],"mapped",[35585]],[[64189,64189],"mapped",[35582]],[[64190,64190],"mapped",[35565]],[[64191,64191],"mapped",[35641]],[[64192,64192],"mapped",[35722]],[[64193,64193],"mapped",[36104]],[[64194,64194],"mapped",[36664]],[[64195,64195],"mapped",[36978]],[[64196,64196],"mapped",[37273]],[[64197,64197],"mapped",[37494]],[[64198,64198],"mapped",[38524]],[[64199,64199],"mapped",[38627]],[[64200,64200],"mapped",[38742]],[[64201,64201],"mapped",[38875]],[[64202,64202],"mapped",[38911]],[[64203,64203],"mapped",[38923]],[[64204,64204],"mapped",[38971]],[[64205,64205],"mapped",[39698]],[[64206,64206],"mapped",[40860]],[[64207,64207],"mapped",[141386]],[[64208,64208],"mapped",[141380]],[[64209,64209],"mapped",[144341]],[[64210,64210],"mapped",[15261]],[[64211,64211],"mapped",[16408]],[[64212,64212],"mapped",[16441]],[[64213,64213],"mapped",[152137]],[[64214,64214],"mapped",[154832]],[[64215,64215],"mapped",[163539]],[[64216,64216],"mapped",[40771]],[[64217,64217],"mapped",[40846]],[[64218,64255],"disallowed"],[[64256,64256],"mapped",[102,102]],[[64257,64257],"mapped",[102,105]],[[64258,64258],"mapped",[102,108]],[[64259,64259],"mapped",[102,102,105]],[[64260,64260],"mapped",[102,102,108]],[[64261,64262],"mapped",[115,116]],[[64263,64274],"disallowed"],[[64275,64275],"mapped",[1396,1398]],[[64276,64276],"mapped",[1396,1381]],[[64277,64277],"mapped",[1396,1387]],[[64278,64278],"mapped",[1406,1398]],[[64279,64279],"mapped",[1396,1389]],[[64280,64284],"disallowed"],[[64285,64285],"mapped",[1497,1460]],[[64286,64286],"valid"],[[64287,64287],"mapped",[1522,1463]],[[64288,64288],"mapped",[1506]],[[64289,64289],"mapped",[1488]],[[64290,64290],"mapped",[1491]],[[64291,64291],"mapped",[1492]],[[64292,64292],"mapped",[1499]],[[64293,64293],"mapped",[1500]],[[64294,64294],"mapped",[1501]],[[64295,64295],"mapped",[1512]],[[64296,64296],"mapped",[1514]],[[64297,64297],"disallowed_STD3_mapped",[43]],[[64298,64298],"mapped",[1513,1473]],[[64299,64299],"mapped",[1513,1474]],[[64300,64300],"mapped",[1513,1468,1473]],[[64301,64301],"mapped",[1513,1468,1474]],[[64302,64302],"mapped",[1488,1463]],[[64303,64303],"mapped",[1488,1464]],[[64304,64304],"mapped",[1488,1468]],[[64305,64305],"mapped",[1489,1468]],[[64306,64306],"mapped",[1490,1468]],[[64307,64307],"mapped",[1491,1468]],[[64308,64308],"mapped",[1492,1468]],[[64309,64309],"mapped",[1493,1468]],[[64310,64310],"mapped",[1494,1468]],[[64311,64311],"disallowed"],[[64312,64312],"mapped",[1496,1468]],[[64313,64313],"mapped",[1497,1468]],[[64314,64314],"mapped",[1498,1468]],[[64315,64315],"mapped",[1499,1468]],[[64316,64316],"mapped",[1500,1468]],[[64317,64317],"disallowed"],[[64318,64318],"mapped",[1502,1468]],[[64319,64319],"disallowed"],[[64320,64320],"mapped",[1504,1468]],[[64321,64321],"mapped",[1505,1468]],[[64322,64322],"disallowed"],[[64323,64323],"mapped",[1507,1468]],[[64324,64324],"mapped",[1508,1468]],[[64325,64325],"disallowed"],[[64326,64326],"mapped",[1510,1468]],[[64327,64327],"mapped",[1511,1468]],[[64328,64328],"mapped",[1512,1468]],[[64329,64329],"mapped",[1513,1468]],[[64330,64330],"mapped",[1514,1468]],[[64331,64331],"mapped",[1493,1465]],[[64332,64332],"mapped",[1489,1471]],[[64333,64333],"mapped",[1499,1471]],[[64334,64334],"mapped",[1508,1471]],[[64335,64335],"mapped",[1488,1500]],[[64336,64337],"mapped",[1649]],[[64338,64341],"mapped",[1659]],[[64342,64345],"mapped",[1662]],[[64346,64349],"mapped",[1664]],[[64350,64353],"mapped",[1658]],[[64354,64357],"mapped",[1663]],[[64358,64361],"mapped",[1657]],[[64362,64365],"mapped",[1700]],[[64366,64369],"mapped",[1702]],[[64370,64373],"mapped",[1668]],[[64374,64377],"mapped",[1667]],[[64378,64381],"mapped",[1670]],[[64382,64385],"mapped",[1671]],[[64386,64387],"mapped",[1677]],[[64388,64389],"mapped",[1676]],[[64390,64391],"mapped",[1678]],[[64392,64393],"mapped",[1672]],[[64394,64395],"mapped",[1688]],[[64396,64397],"mapped",[1681]],[[64398,64401],"mapped",[1705]],[[64402,64405],"mapped",[1711]],[[64406,64409],"mapped",[1715]],[[64410,64413],"mapped",[1713]],[[64414,64415],"mapped",[1722]],[[64416,64419],"mapped",[1723]],[[64420,64421],"mapped",[1728]],[[64422,64425],"mapped",[1729]],[[64426,64429],"mapped",[1726]],[[64430,64431],"mapped",[1746]],[[64432,64433],"mapped",[1747]],[[64434,64449],"valid",[],"NV8"],[[64450,64466],"disallowed"],[[64467,64470],"mapped",[1709]],[[64471,64472],"mapped",[1735]],[[64473,64474],"mapped",[1734]],[[64475,64476],"mapped",[1736]],[[64477,64477],"mapped",[1735,1652]],[[64478,64479],"mapped",[1739]],[[64480,64481],"mapped",[1733]],[[64482,64483],"mapped",[1737]],[[64484,64487],"mapped",[1744]],[[64488,64489],"mapped",[1609]],[[64490,64491],"mapped",[1574,1575]],[[64492,64493],"mapped",[1574,1749]],[[64494,64495],"mapped",[1574,1608]],[[64496,64497],"mapped",[1574,1735]],[[64498,64499],"mapped",[1574,1734]],[[64500,64501],"mapped",[1574,1736]],[[64502,64504],"mapped",[1574,1744]],[[64505,64507],"mapped",[1574,1609]],[[64508,64511],"mapped",[1740]],[[64512,64512],"mapped",[1574,1580]],[[64513,64513],"mapped",[1574,1581]],[[64514,64514],"mapped",[1574,1605]],[[64515,64515],"mapped",[1574,1609]],[[64516,64516],"mapped",[1574,1610]],[[64517,64517],"mapped",[1576,1580]],[[64518,64518],"mapped",[1576,1581]],[[64519,64519],"mapped",[1576,1582]],[[64520,64520],"mapped",[1576,1605]],[[64521,64521],"mapped",[1576,1609]],[[64522,64522],"mapped",[1576,1610]],[[64523,64523],"mapped",[1578,1580]],[[64524,64524],"mapped",[1578,1581]],[[64525,64525],"mapped",[1578,1582]],[[64526,64526],"mapped",[1578,1605]],[[64527,64527],"mapped",[1578,1609]],[[64528,64528],"mapped",[1578,1610]],[[64529,64529],"mapped",[1579,1580]],[[64530,64530],"mapped",[1579,1605]],[[64531,64531],"mapped",[1579,1609]],[[64532,64532],"mapped",[1579,1610]],[[64533,64533],"mapped",[1580,1581]],[[64534,64534],"mapped",[1580,1605]],[[64535,64535],"mapped",[1581,1580]],[[64536,64536],"mapped",[1581,1605]],[[64537,64537],"mapped",[1582,1580]],[[64538,64538],"mapped",[1582,1581]],[[64539,64539],"mapped",[1582,1605]],[[64540,64540],"mapped",[1587,1580]],[[64541,64541],"mapped",[1587,1581]],[[64542,64542],"mapped",[1587,1582]],[[64543,64543],"mapped",[1587,1605]],[[64544,64544],"mapped",[1589,1581]],[[64545,64545],"mapped",[1589,1605]],[[64546,64546],"mapped",[1590,1580]],[[64547,64547],"mapped",[1590,1581]],[[64548,64548],"mapped",[1590,1582]],[[64549,64549],"mapped",[1590,1605]],[[64550,64550],"mapped",[1591,1581]],[[64551,64551],"mapped",[1591,1605]],[[64552,64552],"mapped",[1592,1605]],[[64553,64553],"mapped",[1593,1580]],[[64554,64554],"mapped",[1593,1605]],[[64555,64555],"mapped",[1594,1580]],[[64556,64556],"mapped",[1594,1605]],[[64557,64557],"mapped",[1601,1580]],[[64558,64558],"mapped",[1601,1581]],[[64559,64559],"mapped",[1601,1582]],[[64560,64560],"mapped",[1601,1605]],[[64561,64561],"mapped",[1601,1609]],[[64562,64562],"mapped",[1601,1610]],[[64563,64563],"mapped",[1602,1581]],[[64564,64564],"mapped",[1602,1605]],[[64565,64565],"mapped",[1602,1609]],[[64566,64566],"mapped",[1602,1610]],[[64567,64567],"mapped",[1603,1575]],[[64568,64568],"mapped",[1603,1580]],[[64569,64569],"mapped",[1603,1581]],[[64570,64570],"mapped",[1603,1582]],[[64571,64571],"mapped",[1603,1604]],[[64572,64572],"mapped",[1603,1605]],[[64573,64573],"mapped",[1603,1609]],[[64574,64574],"mapped",[1603,1610]],[[64575,64575],"mapped",[1604,1580]],[[64576,64576],"mapped",[1604,1581]],[[64577,64577],"mapped",[1604,1582]],[[64578,64578],"mapped",[1604,1605]],[[64579,64579],"mapped",[1604,1609]],[[64580,64580],"mapped",[1604,1610]],[[64581,64581],"mapped",[1605,1580]],[[64582,64582],"mapped",[1605,1581]],[[64583,64583],"mapped",[1605,1582]],[[64584,64584],"mapped",[1605,1605]],[[64585,64585],"mapped",[1605,1609]],[[64586,64586],"mapped",[1605,1610]],[[64587,64587],"mapped",[1606,1580]],[[64588,64588],"mapped",[1606,1581]],[[64589,64589],"mapped",[1606,1582]],[[64590,64590],"mapped",[1606,1605]],[[64591,64591],"mapped",[1606,1609]],[[64592,64592],"mapped",[1606,1610]],[[64593,64593],"mapped",[1607,1580]],[[64594,64594],"mapped",[1607,1605]],[[64595,64595],"mapped",[1607,1609]],[[64596,64596],"mapped",[1607,1610]],[[64597,64597],"mapped",[1610,1580]],[[64598,64598],"mapped",[1610,1581]],[[64599,64599],"mapped",[1610,1582]],[[64600,64600],"mapped",[1610,1605]],[[64601,64601],"mapped",[1610,1609]],[[64602,64602],"mapped",[1610,1610]],[[64603,64603],"mapped",[1584,1648]],[[64604,64604],"mapped",[1585,1648]],[[64605,64605],"mapped",[1609,1648]],[[64606,64606],"disallowed_STD3_mapped",[32,1612,1617]],[[64607,64607],"disallowed_STD3_mapped",[32,1613,1617]],[[64608,64608],"disallowed_STD3_mapped",[32,1614,1617]],[[64609,64609],"disallowed_STD3_mapped",[32,1615,1617]],[[64610,64610],"disallowed_STD3_mapped",[32,1616,1617]],[[64611,64611],"disallowed_STD3_mapped",[32,1617,1648]],[[64612,64612],"mapped",[1574,1585]],[[64613,64613],"mapped",[1574,1586]],[[64614,64614],"mapped",[1574,1605]],[[64615,64615],"mapped",[1574,1606]],[[64616,64616],"mapped",[1574,1609]],[[64617,64617],"mapped",[1574,1610]],[[64618,64618],"mapped",[1576,1585]],[[64619,64619],"mapped",[1576,1586]],[[64620,64620],"mapped",[1576,1605]],[[64621,64621],"mapped",[1576,1606]],[[64622,64622],"mapped",[1576,1609]],[[64623,64623],"mapped",[1576,1610]],[[64624,64624],"mapped",[1578,1585]],[[64625,64625],"mapped",[1578,1586]],[[64626,64626],"mapped",[1578,1605]],[[64627,64627],"mapped",[1578,1606]],[[64628,64628],"mapped",[1578,1609]],[[64629,64629],"mapped",[1578,1610]],[[64630,64630],"mapped",[1579,1585]],[[64631,64631],"mapped",[1579,1586]],[[64632,64632],"mapped",[1579,1605]],[[64633,64633],"mapped",[1579,1606]],[[64634,64634],"mapped",[1579,1609]],[[64635,64635],"mapped",[1579,1610]],[[64636,64636],"mapped",[1601,1609]],[[64637,64637],"mapped",[1601,1610]],[[64638,64638],"mapped",[1602,1609]],[[64639,64639],"mapped",[1602,1610]],[[64640,64640],"mapped",[1603,1575]],[[64641,64641],"mapped",[1603,1604]],[[64642,64642],"mapped",[1603,1605]],[[64643,64643],"mapped",[1603,1609]],[[64644,64644],"mapped",[1603,1610]],[[64645,64645],"mapped",[1604,1605]],[[64646,64646],"mapped",[1604,1609]],[[64647,64647],"mapped",[1604,1610]],[[64648,64648],"mapped",[1605,1575]],[[64649,64649],"mapped",[1605,1605]],[[64650,64650],"mapped",[1606,1585]],[[64651,64651],"mapped",[1606,1586]],[[64652,64652],"mapped",[1606,1605]],[[64653,64653],"mapped",[1606,1606]],[[64654,64654],"mapped",[1606,1609]],[[64655,64655],"mapped",[1606,1610]],[[64656,64656],"mapped",[1609,1648]],[[64657,64657],"mapped",[1610,1585]],[[64658,64658],"mapped",[1610,1586]],[[64659,64659],"mapped",[1610,1605]],[[64660,64660],"mapped",[1610,1606]],[[64661,64661],"mapped",[1610,1609]],[[64662,64662],"mapped",[1610,1610]],[[64663,64663],"mapped",[1574,1580]],[[64664,64664],"mapped",[1574,1581]],[[64665,64665],"mapped",[1574,1582]],[[64666,64666],"mapped",[1574,1605]],[[64667,64667],"mapped",[1574,1607]],[[64668,64668],"mapped",[1576,1580]],[[64669,64669],"mapped",[1576,1581]],[[64670,64670],"mapped",[1576,1582]],[[64671,64671],"mapped",[1576,1605]],[[64672,64672],"mapped",[1576,1607]],[[64673,64673],"mapped",[1578,1580]],[[64674,64674],"mapped",[1578,1581]],[[64675,64675],"mapped",[1578,1582]],[[64676,64676],"mapped",[1578,1605]],[[64677,64677],"mapped",[1578,1607]],[[64678,64678],"mapped",[1579,1605]],[[64679,64679],"mapped",[1580,1581]],[[64680,64680],"mapped",[1580,1605]],[[64681,64681],"mapped",[1581,1580]],[[64682,64682],"mapped",[1581,1605]],[[64683,64683],"mapped",[1582,1580]],[[64684,64684],"mapped",[1582,1605]],[[64685,64685],"mapped",[1587,1580]],[[64686,64686],"mapped",[1587,1581]],[[64687,64687],"mapped",[1587,1582]],[[64688,64688],"mapped",[1587,1605]],[[64689,64689],"mapped",[1589,1581]],[[64690,64690],"mapped",[1589,1582]],[[64691,64691],"mapped",[1589,1605]],[[64692,64692],"mapped",[1590,1580]],[[64693,64693],"mapped",[1590,1581]],[[64694,64694],"mapped",[1590,1582]],[[64695,64695],"mapped",[1590,1605]],[[64696,64696],"mapped",[1591,1581]],[[64697,64697],"mapped",[1592,1605]],[[64698,64698],"mapped",[1593,1580]],[[64699,64699],"mapped",[1593,1605]],[[64700,64700],"mapped",[1594,1580]],[[64701,64701],"mapped",[1594,1605]],[[64702,64702],"mapped",[1601,1580]],[[64703,64703],"mapped",[1601,1581]],[[64704,64704],"mapped",[1601,1582]],[[64705,64705],"mapped",[1601,1605]],[[64706,64706],"mapped",[1602,1581]],[[64707,64707],"mapped",[1602,1605]],[[64708,64708],"mapped",[1603,1580]],[[64709,64709],"mapped",[1603,1581]],[[64710,64710],"mapped",[1603,1582]],[[64711,64711],"mapped",[1603,1604]],[[64712,64712],"mapped",[1603,1605]],[[64713,64713],"mapped",[1604,1580]],[[64714,64714],"mapped",[1604,1581]],[[64715,64715],"mapped",[1604,1582]],[[64716,64716],"mapped",[1604,1605]],[[64717,64717],"mapped",[1604,1607]],[[64718,64718],"mapped",[1605,1580]],[[64719,64719],"mapped",[1605,1581]],[[64720,64720],"mapped",[1605,1582]],[[64721,64721],"mapped",[1605,1605]],[[64722,64722],"mapped",[1606,1580]],[[64723,64723],"mapped",[1606,1581]],[[64724,64724],"mapped",[1606,1582]],[[64725,64725],"mapped",[1606,1605]],[[64726,64726],"mapped",[1606,1607]],[[64727,64727],"mapped",[1607,1580]],[[64728,64728],"mapped",[1607,1605]],[[64729,64729],"mapped",[1607,1648]],[[64730,64730],"mapped",[1610,1580]],[[64731,64731],"mapped",[1610,1581]],[[64732,64732],"mapped",[1610,1582]],[[64733,64733],"mapped",[1610,1605]],[[64734,64734],"mapped",[1610,1607]],[[64735,64735],"mapped",[1574,1605]],[[64736,64736],"mapped",[1574,1607]],[[64737,64737],"mapped",[1576,1605]],[[64738,64738],"mapped",[1576,1607]],[[64739,64739],"mapped",[1578,1605]],[[64740,64740],"mapped",[1578,1607]],[[64741,64741],"mapped",[1579,1605]],[[64742,64742],"mapped",[1579,1607]],[[64743,64743],"mapped",[1587,1605]],[[64744,64744],"mapped",[1587,1607]],[[64745,64745],"mapped",[1588,1605]],[[64746,64746],"mapped",[1588,1607]],[[64747,64747],"mapped",[1603,1604]],[[64748,64748],"mapped",[1603,1605]],[[64749,64749],"mapped",[1604,1605]],[[64750,64750],"mapped",[1606,1605]],[[64751,64751],"mapped",[1606,1607]],[[64752,64752],"mapped",[1610,1605]],[[64753,64753],"mapped",[1610,1607]],[[64754,64754],"mapped",[1600,1614,1617]],[[64755,64755],"mapped",[1600,1615,1617]],[[64756,64756],"mapped",[1600,1616,1617]],[[64757,64757],"mapped",[1591,1609]],[[64758,64758],"mapped",[1591,1610]],[[64759,64759],"mapped",[1593,1609]],[[64760,64760],"mapped",[1593,1610]],[[64761,64761],"mapped",[1594,1609]],[[64762,64762],"mapped",[1594,1610]],[[64763,64763],"mapped",[1587,1609]],[[64764,64764],"mapped",[1587,1610]],[[64765,64765],"mapped",[1588,1609]],[[64766,64766],"mapped",[1588,1610]],[[64767,64767],"mapped",[1581,1609]],[[64768,64768],"mapped",[1581,1610]],[[64769,64769],"mapped",[1580,1609]],[[64770,64770],"mapped",[1580,1610]],[[64771,64771],"mapped",[1582,1609]],[[64772,64772],"mapped",[1582,1610]],[[64773,64773],"mapped",[1589,1609]],[[64774,64774],"mapped",[1589,1610]],[[64775,64775],"mapped",[1590,1609]],[[64776,64776],"mapped",[1590,1610]],[[64777,64777],"mapped",[1588,1580]],[[64778,64778],"mapped",[1588,1581]],[[64779,64779],"mapped",[1588,1582]],[[64780,64780],"mapped",[1588,1605]],[[64781,64781],"mapped",[1588,1585]],[[64782,64782],"mapped",[1587,1585]],[[64783,64783],"mapped",[1589,1585]],[[64784,64784],"mapped",[1590,1585]],[[64785,64785],"mapped",[1591,1609]],[[64786,64786],"mapped",[1591,1610]],[[64787,64787],"mapped",[1593,1609]],[[64788,64788],"mapped",[1593,1610]],[[64789,64789],"mapped",[1594,1609]],[[64790,64790],"mapped",[1594,1610]],[[64791,64791],"mapped",[1587,1609]],[[64792,64792],"mapped",[1587,1610]],[[64793,64793],"mapped",[1588,1609]],[[64794,64794],"mapped",[1588,1610]],[[64795,64795],"mapped",[1581,1609]],[[64796,64796],"mapped",[1581,1610]],[[64797,64797],"mapped",[1580,1609]],[[64798,64798],"mapped",[1580,1610]],[[64799,64799],"mapped",[1582,1609]],[[64800,64800],"mapped",[1582,1610]],[[64801,64801],"mapped",[1589,1609]],[[64802,64802],"mapped",[1589,1610]],[[64803,64803],"mapped",[1590,1609]],[[64804,64804],"mapped",[1590,1610]],[[64805,64805],"mapped",[1588,1580]],[[64806,64806],"mapped",[1588,1581]],[[64807,64807],"mapped",[1588,1582]],[[64808,64808],"mapped",[1588,1605]],[[64809,64809],"mapped",[1588,1585]],[[64810,64810],"mapped",[1587,1585]],[[64811,64811],"mapped",[1589,1585]],[[64812,64812],"mapped",[1590,1585]],[[64813,64813],"mapped",[1588,1580]],[[64814,64814],"mapped",[1588,1581]],[[64815,64815],"mapped",[1588,1582]],[[64816,64816],"mapped",[1588,1605]],[[64817,64817],"mapped",[1587,1607]],[[64818,64818],"mapped",[1588,1607]],[[64819,64819],"mapped",[1591,1605]],[[64820,64820],"mapped",[1587,1580]],[[64821,64821],"mapped",[1587,1581]],[[64822,64822],"mapped",[1587,1582]],[[64823,64823],"mapped",[1588,1580]],[[64824,64824],"mapped",[1588,1581]],[[64825,64825],"mapped",[1588,1582]],[[64826,64826],"mapped",[1591,1605]],[[64827,64827],"mapped",[1592,1605]],[[64828,64829],"mapped",[1575,1611]],[[64830,64831],"valid",[],"NV8"],[[64832,64847],"disallowed"],[[64848,64848],"mapped",[1578,1580,1605]],[[64849,64850],"mapped",[1578,1581,1580]],[[64851,64851],"mapped",[1578,1581,1605]],[[64852,64852],"mapped",[1578,1582,1605]],[[64853,64853],"mapped",[1578,1605,1580]],[[64854,64854],"mapped",[1578,1605,1581]],[[64855,64855],"mapped",[1578,1605,1582]],[[64856,64857],"mapped",[1580,1605,1581]],[[64858,64858],"mapped",[1581,1605,1610]],[[64859,64859],"mapped",[1581,1605,1609]],[[64860,64860],"mapped",[1587,1581,1580]],[[64861,64861],"mapped",[1587,1580,1581]],[[64862,64862],"mapped",[1587,1580,1609]],[[64863,64864],"mapped",[1587,1605,1581]],[[64865,64865],"mapped",[1587,1605,1580]],[[64866,64867],"mapped",[1587,1605,1605]],[[64868,64869],"mapped",[1589,1581,1581]],[[64870,64870],"mapped",[1589,1605,1605]],[[64871,64872],"mapped",[1588,1581,1605]],[[64873,64873],"mapped",[1588,1580,1610]],[[64874,64875],"mapped",[1588,1605,1582]],[[64876,64877],"mapped",[1588,1605,1605]],[[64878,64878],"mapped",[1590,1581,1609]],[[64879,64880],"mapped",[1590,1582,1605]],[[64881,64882],"mapped",[1591,1605,1581]],[[64883,64883],"mapped",[1591,1605,1605]],[[64884,64884],"mapped",[1591,1605,1610]],[[64885,64885],"mapped",[1593,1580,1605]],[[64886,64887],"mapped",[1593,1605,1605]],[[64888,64888],"mapped",[1593,1605,1609]],[[64889,64889],"mapped",[1594,1605,1605]],[[64890,64890],"mapped",[1594,1605,1610]],[[64891,64891],"mapped",[1594,1605,1609]],[[64892,64893],"mapped",[1601,1582,1605]],[[64894,64894],"mapped",[1602,1605,1581]],[[64895,64895],"mapped",[1602,1605,1605]],[[64896,64896],"mapped",[1604,1581,1605]],[[64897,64897],"mapped",[1604,1581,1610]],[[64898,64898],"mapped",[1604,1581,1609]],[[64899,64900],"mapped",[1604,1580,1580]],[[64901,64902],"mapped",[1604,1582,1605]],[[64903,64904],"mapped",[1604,1605,1581]],[[64905,64905],"mapped",[1605,1581,1580]],[[64906,64906],"mapped",[1605,1581,1605]],[[64907,64907],"mapped",[1605,1581,1610]],[[64908,64908],"mapped",[1605,1580,1581]],[[64909,64909],"mapped",[1605,1580,1605]],[[64910,64910],"mapped",[1605,1582,1580]],[[64911,64911],"mapped",[1605,1582,1605]],[[64912,64913],"disallowed"],[[64914,64914],"mapped",[1605,1580,1582]],[[64915,64915],"mapped",[1607,1605,1580]],[[64916,64916],"mapped",[1607,1605,1605]],[[64917,64917],"mapped",[1606,1581,1605]],[[64918,64918],"mapped",[1606,1581,1609]],[[64919,64920],"mapped",[1606,1580,1605]],[[64921,64921],"mapped",[1606,1580,1609]],[[64922,64922],"mapped",[1606,1605,1610]],[[64923,64923],"mapped",[1606,1605,1609]],[[64924,64925],"mapped",[1610,1605,1605]],[[64926,64926],"mapped",[1576,1582,1610]],[[64927,64927],"mapped",[1578,1580,1610]],[[64928,64928],"mapped",[1578,1580,1609]],[[64929,64929],"mapped",[1578,1582,1610]],[[64930,64930],"mapped",[1578,1582,1609]],[[64931,64931],"mapped",[1578,1605,1610]],[[64932,64932],"mapped",[1578,1605,1609]],[[64933,64933],"mapped",[1580,1605,1610]],[[64934,64934],"mapped",[1580,1581,1609]],[[64935,64935],"mapped",[1580,1605,1609]],[[64936,64936],"mapped",[1587,1582,1609]],[[64937,64937],"mapped",[1589,1581,1610]],[[64938,64938],"mapped",[1588,1581,1610]],[[64939,64939],"mapped",[1590,1581,1610]],[[64940,64940],"mapped",[1604,1580,1610]],[[64941,64941],"mapped",[1604,1605,1610]],[[64942,64942],"mapped",[1610,1581,1610]],[[64943,64943],"mapped",[1610,1580,1610]],[[64944,64944],"mapped",[1610,1605,1610]],[[64945,64945],"mapped",[1605,1605,1610]],[[64946,64946],"mapped",[1602,1605,1610]],[[64947,64947],"mapped",[1606,1581,1610]],[[64948,64948],"mapped",[1602,1605,1581]],[[64949,64949],"mapped",[1604,1581,1605]],[[64950,64950],"mapped",[1593,1605,1610]],[[64951,64951],"mapped",[1603,1605,1610]],[[64952,64952],"mapped",[1606,1580,1581]],[[64953,64953],"mapped",[1605,1582,1610]],[[64954,64954],"mapped",[1604,1580,1605]],[[64955,64955],"mapped",[1603,1605,1605]],[[64956,64956],"mapped",[1604,1580,1605]],[[64957,64957],"mapped",[1606,1580,1581]],[[64958,64958],"mapped",[1580,1581,1610]],[[64959,64959],"mapped",[1581,1580,1610]],[[64960,64960],"mapped",[1605,1580,1610]],[[64961,64961],"mapped",[1601,1605,1610]],[[64962,64962],"mapped",[1576,1581,1610]],[[64963,64963],"mapped",[1603,1605,1605]],[[64964,64964],"mapped",[1593,1580,1605]],[[64965,64965],"mapped",[1589,1605,1605]],[[64966,64966],"mapped",[1587,1582,1610]],[[64967,64967],"mapped",[1606,1580,1610]],[[64968,64975],"disallowed"],[[64976,65007],"disallowed"],[[65008,65008],"mapped",[1589,1604,1746]],[[65009,65009],"mapped",[1602,1604,1746]],[[65010,65010],"mapped",[1575,1604,1604,1607]],[[65011,65011],"mapped",[1575,1603,1576,1585]],[[65012,65012],"mapped",[1605,1581,1605,1583]],[[65013,65013],"mapped",[1589,1604,1593,1605]],[[65014,65014],"mapped",[1585,1587,1608,1604]],[[65015,65015],"mapped",[1593,1604,1610,1607]],[[65016,65016],"mapped",[1608,1587,1604,1605]],[[65017,65017],"mapped",[1589,1604,1609]],[[65018,65018],"disallowed_STD3_mapped",[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605]],[[65019,65019],"disallowed_STD3_mapped",[1580,1604,32,1580,1604,1575,1604,1607]],[[65020,65020],"mapped",[1585,1740,1575,1604]],[[65021,65021],"valid",[],"NV8"],[[65022,65023],"disallowed"],[[65024,65039],"ignored"],[[65040,65040],"disallowed_STD3_mapped",[44]],[[65041,65041],"mapped",[12289]],[[65042,65042],"disallowed"],[[65043,65043],"disallowed_STD3_mapped",[58]],[[65044,65044],"disallowed_STD3_mapped",[59]],[[65045,65045],"disallowed_STD3_mapped",[33]],[[65046,65046],"disallowed_STD3_mapped",[63]],[[65047,65047],"mapped",[12310]],[[65048,65048],"mapped",[12311]],[[65049,65049],"disallowed"],[[65050,65055],"disallowed"],[[65056,65059],"valid"],[[65060,65062],"valid"],[[65063,65069],"valid"],[[65070,65071],"valid"],[[65072,65072],"disallowed"],[[65073,65073],"mapped",[8212]],[[65074,65074],"mapped",[8211]],[[65075,65076],"disallowed_STD3_mapped",[95]],[[65077,65077],"disallowed_STD3_mapped",[40]],[[65078,65078],"disallowed_STD3_mapped",[41]],[[65079,65079],"disallowed_STD3_mapped",[123]],[[65080,65080],"disallowed_STD3_mapped",[125]],[[65081,65081],"mapped",[12308]],[[65082,65082],"mapped",[12309]],[[65083,65083],"mapped",[12304]],[[65084,65084],"mapped",[12305]],[[65085,65085],"mapped",[12298]],[[65086,65086],"mapped",[12299]],[[65087,65087],"mapped",[12296]],[[65088,65088],"mapped",[12297]],[[65089,65089],"mapped",[12300]],[[65090,65090],"mapped",[12301]],[[65091,65091],"mapped",[12302]],[[65092,65092],"mapped",[12303]],[[65093,65094],"valid",[],"NV8"],[[65095,65095],"disallowed_STD3_mapped",[91]],[[65096,65096],"disallowed_STD3_mapped",[93]],[[65097,65100],"disallowed_STD3_mapped",[32,773]],[[65101,65103],"disallowed_STD3_mapped",[95]],[[65104,65104],"disallowed_STD3_mapped",[44]],[[65105,65105],"mapped",[12289]],[[65106,65106],"disallowed"],[[65107,65107],"disallowed"],[[65108,65108],"disallowed_STD3_mapped",[59]],[[65109,65109],"disallowed_STD3_mapped",[58]],[[65110,65110],"disallowed_STD3_mapped",[63]],[[65111,65111],"disallowed_STD3_mapped",[33]],[[65112,65112],"mapped",[8212]],[[65113,65113],"disallowed_STD3_mapped",[40]],[[65114,65114],"disallowed_STD3_mapped",[41]],[[65115,65115],"disallowed_STD3_mapped",[123]],[[65116,65116],"disallowed_STD3_mapped",[125]],[[65117,65117],"mapped",[12308]],[[65118,65118],"mapped",[12309]],[[65119,65119],"disallowed_STD3_mapped",[35]],[[65120,65120],"disallowed_STD3_mapped",[38]],[[65121,65121],"disallowed_STD3_mapped",[42]],[[65122,65122],"disallowed_STD3_mapped",[43]],[[65123,65123],"mapped",[45]],[[65124,65124],"disallowed_STD3_mapped",[60]],[[65125,65125],"disallowed_STD3_mapped",[62]],[[65126,65126],"disallowed_STD3_mapped",[61]],[[65127,65127],"disallowed"],[[65128,65128],"disallowed_STD3_mapped",[92]],[[65129,65129],"disallowed_STD3_mapped",[36]],[[65130,65130],"disallowed_STD3_mapped",[37]],[[65131,65131],"disallowed_STD3_mapped",[64]],[[65132,65135],"disallowed"],[[65136,65136],"disallowed_STD3_mapped",[32,1611]],[[65137,65137],"mapped",[1600,1611]],[[65138,65138],"disallowed_STD3_mapped",[32,1612]],[[65139,65139],"valid"],[[65140,65140],"disallowed_STD3_mapped",[32,1613]],[[65141,65141],"disallowed"],[[65142,65142],"disallowed_STD3_mapped",[32,1614]],[[65143,65143],"mapped",[1600,1614]],[[65144,65144],"disallowed_STD3_mapped",[32,1615]],[[65145,65145],"mapped",[1600,1615]],[[65146,65146],"disallowed_STD3_mapped",[32,1616]],[[65147,65147],"mapped",[1600,1616]],[[65148,65148],"disallowed_STD3_mapped",[32,1617]],[[65149,65149],"mapped",[1600,1617]],[[65150,65150],"disallowed_STD3_mapped",[32,1618]],[[65151,65151],"mapped",[1600,1618]],[[65152,65152],"mapped",[1569]],[[65153,65154],"mapped",[1570]],[[65155,65156],"mapped",[1571]],[[65157,65158],"mapped",[1572]],[[65159,65160],"mapped",[1573]],[[65161,65164],"mapped",[1574]],[[65165,65166],"mapped",[1575]],[[65167,65170],"mapped",[1576]],[[65171,65172],"mapped",[1577]],[[65173,65176],"mapped",[1578]],[[65177,65180],"mapped",[1579]],[[65181,65184],"mapped",[1580]],[[65185,65188],"mapped",[1581]],[[65189,65192],"mapped",[1582]],[[65193,65194],"mapped",[1583]],[[65195,65196],"mapped",[1584]],[[65197,65198],"mapped",[1585]],[[65199,65200],"mapped",[1586]],[[65201,65204],"mapped",[1587]],[[65205,65208],"mapped",[1588]],[[65209,65212],"mapped",[1589]],[[65213,65216],"mapped",[1590]],[[65217,65220],"mapped",[1591]],[[65221,65224],"mapped",[1592]],[[65225,65228],"mapped",[1593]],[[65229,65232],"mapped",[1594]],[[65233,65236],"mapped",[1601]],[[65237,65240],"mapped",[1602]],[[65241,65244],"mapped",[1603]],[[65245,65248],"mapped",[1604]],[[65249,65252],"mapped",[1605]],[[65253,65256],"mapped",[1606]],[[65257,65260],"mapped",[1607]],[[65261,65262],"mapped",[1608]],[[65263,65264],"mapped",[1609]],[[65265,65268],"mapped",[1610]],[[65269,65270],"mapped",[1604,1570]],[[65271,65272],"mapped",[1604,1571]],[[65273,65274],"mapped",[1604,1573]],[[65275,65276],"mapped",[1604,1575]],[[65277,65278],"disallowed"],[[65279,65279],"ignored"],[[65280,65280],"disallowed"],[[65281,65281],"disallowed_STD3_mapped",[33]],[[65282,65282],"disallowed_STD3_mapped",[34]],[[65283,65283],"disallowed_STD3_mapped",[35]],[[65284,65284],"disallowed_STD3_mapped",[36]],[[65285,65285],"disallowed_STD3_mapped",[37]],[[65286,65286],"disallowed_STD3_mapped",[38]],[[65287,65287],"disallowed_STD3_mapped",[39]],[[65288,65288],"disallowed_STD3_mapped",[40]],[[65289,65289],"disallowed_STD3_mapped",[41]],[[65290,65290],"disallowed_STD3_mapped",[42]],[[65291,65291],"disallowed_STD3_mapped",[43]],[[65292,65292],"disallowed_STD3_mapped",[44]],[[65293,65293],"mapped",[45]],[[65294,65294],"mapped",[46]],[[65295,65295],"disallowed_STD3_mapped",[47]],[[65296,65296],"mapped",[48]],[[65297,65297],"mapped",[49]],[[65298,65298],"mapped",[50]],[[65299,65299],"mapped",[51]],[[65300,65300],"mapped",[52]],[[65301,65301],"mapped",[53]],[[65302,65302],"mapped",[54]],[[65303,65303],"mapped",[55]],[[65304,65304],"mapped",[56]],[[65305,65305],"mapped",[57]],[[65306,65306],"disallowed_STD3_mapped",[58]],[[65307,65307],"disallowed_STD3_mapped",[59]],[[65308,65308],"disallowed_STD3_mapped",[60]],[[65309,65309],"disallowed_STD3_mapped",[61]],[[65310,65310],"disallowed_STD3_mapped",[62]],[[65311,65311],"disallowed_STD3_mapped",[63]],[[65312,65312],"disallowed_STD3_mapped",[64]],[[65313,65313],"mapped",[97]],[[65314,65314],"mapped",[98]],[[65315,65315],"mapped",[99]],[[65316,65316],"mapped",[100]],[[65317,65317],"mapped",[101]],[[65318,65318],"mapped",[102]],[[65319,65319],"mapped",[103]],[[65320,65320],"mapped",[104]],[[65321,65321],"mapped",[105]],[[65322,65322],"mapped",[106]],[[65323,65323],"mapped",[107]],[[65324,65324],"mapped",[108]],[[65325,65325],"mapped",[109]],[[65326,65326],"mapped",[110]],[[65327,65327],"mapped",[111]],[[65328,65328],"mapped",[112]],[[65329,65329],"mapped",[113]],[[65330,65330],"mapped",[114]],[[65331,65331],"mapped",[115]],[[65332,65332],"mapped",[116]],[[65333,65333],"mapped",[117]],[[65334,65334],"mapped",[118]],[[65335,65335],"mapped",[119]],[[65336,65336],"mapped",[120]],[[65337,65337],"mapped",[121]],[[65338,65338],"mapped",[122]],[[65339,65339],"disallowed_STD3_mapped",[91]],[[65340,65340],"disallowed_STD3_mapped",[92]],[[65341,65341],"disallowed_STD3_mapped",[93]],[[65342,65342],"disallowed_STD3_mapped",[94]],[[65343,65343],"disallowed_STD3_mapped",[95]],[[65344,65344],"disallowed_STD3_mapped",[96]],[[65345,65345],"mapped",[97]],[[65346,65346],"mapped",[98]],[[65347,65347],"mapped",[99]],[[65348,65348],"mapped",[100]],[[65349,65349],"mapped",[101]],[[65350,65350],"mapped",[102]],[[65351,65351],"mapped",[103]],[[65352,65352],"mapped",[104]],[[65353,65353],"mapped",[105]],[[65354,65354],"mapped",[106]],[[65355,65355],"mapped",[107]],[[65356,65356],"mapped",[108]],[[65357,65357],"mapped",[109]],[[65358,65358],"mapped",[110]],[[65359,65359],"mapped",[111]],[[65360,65360],"mapped",[112]],[[65361,65361],"mapped",[113]],[[65362,65362],"mapped",[114]],[[65363,65363],"mapped",[115]],[[65364,65364],"mapped",[116]],[[65365,65365],"mapped",[117]],[[65366,65366],"mapped",[118]],[[65367,65367],"mapped",[119]],[[65368,65368],"mapped",[120]],[[65369,65369],"mapped",[121]],[[65370,65370],"mapped",[122]],[[65371,65371],"disallowed_STD3_mapped",[123]],[[65372,65372],"disallowed_STD3_mapped",[124]],[[65373,65373],"disallowed_STD3_mapped",[125]],[[65374,65374],"disallowed_STD3_mapped",[126]],[[65375,65375],"mapped",[10629]],[[65376,65376],"mapped",[10630]],[[65377,65377],"mapped",[46]],[[65378,65378],"mapped",[12300]],[[65379,65379],"mapped",[12301]],[[65380,65380],"mapped",[12289]],[[65381,65381],"mapped",[12539]],[[65382,65382],"mapped",[12530]],[[65383,65383],"mapped",[12449]],[[65384,65384],"mapped",[12451]],[[65385,65385],"mapped",[12453]],[[65386,65386],"mapped",[12455]],[[65387,65387],"mapped",[12457]],[[65388,65388],"mapped",[12515]],[[65389,65389],"mapped",[12517]],[[65390,65390],"mapped",[12519]],[[65391,65391],"mapped",[12483]],[[65392,65392],"mapped",[12540]],[[65393,65393],"mapped",[12450]],[[65394,65394],"mapped",[12452]],[[65395,65395],"mapped",[12454]],[[65396,65396],"mapped",[12456]],[[65397,65397],"mapped",[12458]],[[65398,65398],"mapped",[12459]],[[65399,65399],"mapped",[12461]],[[65400,65400],"mapped",[12463]],[[65401,65401],"mapped",[12465]],[[65402,65402],"mapped",[12467]],[[65403,65403],"mapped",[12469]],[[65404,65404],"mapped",[12471]],[[65405,65405],"mapped",[12473]],[[65406,65406],"mapped",[12475]],[[65407,65407],"mapped",[12477]],[[65408,65408],"mapped",[12479]],[[65409,65409],"mapped",[12481]],[[65410,65410],"mapped",[12484]],[[65411,65411],"mapped",[12486]],[[65412,65412],"mapped",[12488]],[[65413,65413],"mapped",[12490]],[[65414,65414],"mapped",[12491]],[[65415,65415],"mapped",[12492]],[[65416,65416],"mapped",[12493]],[[65417,65417],"mapped",[12494]],[[65418,65418],"mapped",[12495]],[[65419,65419],"mapped",[12498]],[[65420,65420],"mapped",[12501]],[[65421,65421],"mapped",[12504]],[[65422,65422],"mapped",[12507]],[[65423,65423],"mapped",[12510]],[[65424,65424],"mapped",[12511]],[[65425,65425],"mapped",[12512]],[[65426,65426],"mapped",[12513]],[[65427,65427],"mapped",[12514]],[[65428,65428],"mapped",[12516]],[[65429,65429],"mapped",[12518]],[[65430,65430],"mapped",[12520]],[[65431,65431],"mapped",[12521]],[[65432,65432],"mapped",[12522]],[[65433,65433],"mapped",[12523]],[[65434,65434],"mapped",[12524]],[[65435,65435],"mapped",[12525]],[[65436,65436],"mapped",[12527]],[[65437,65437],"mapped",[12531]],[[65438,65438],"mapped",[12441]],[[65439,65439],"mapped",[12442]],[[65440,65440],"disallowed"],[[65441,65441],"mapped",[4352]],[[65442,65442],"mapped",[4353]],[[65443,65443],"mapped",[4522]],[[65444,65444],"mapped",[4354]],[[65445,65445],"mapped",[4524]],[[65446,65446],"mapped",[4525]],[[65447,65447],"mapped",[4355]],[[65448,65448],"mapped",[4356]],[[65449,65449],"mapped",[4357]],[[65450,65450],"mapped",[4528]],[[65451,65451],"mapped",[4529]],[[65452,65452],"mapped",[4530]],[[65453,65453],"mapped",[4531]],[[65454,65454],"mapped",[4532]],[[65455,65455],"mapped",[4533]],[[65456,65456],"mapped",[4378]],[[65457,65457],"mapped",[4358]],[[65458,65458],"mapped",[4359]],[[65459,65459],"mapped",[4360]],[[65460,65460],"mapped",[4385]],[[65461,65461],"mapped",[4361]],[[65462,65462],"mapped",[4362]],[[65463,65463],"mapped",[4363]],[[65464,65464],"mapped",[4364]],[[65465,65465],"mapped",[4365]],[[65466,65466],"mapped",[4366]],[[65467,65467],"mapped",[4367]],[[65468,65468],"mapped",[4368]],[[65469,65469],"mapped",[4369]],[[65470,65470],"mapped",[4370]],[[65471,65473],"disallowed"],[[65474,65474],"mapped",[4449]],[[65475,65475],"mapped",[4450]],[[65476,65476],"mapped",[4451]],[[65477,65477],"mapped",[4452]],[[65478,65478],"mapped",[4453]],[[65479,65479],"mapped",[4454]],[[65480,65481],"disallowed"],[[65482,65482],"mapped",[4455]],[[65483,65483],"mapped",[4456]],[[65484,65484],"mapped",[4457]],[[65485,65485],"mapped",[4458]],[[65486,65486],"mapped",[4459]],[[65487,65487],"mapped",[4460]],[[65488,65489],"disallowed"],[[65490,65490],"mapped",[4461]],[[65491,65491],"mapped",[4462]],[[65492,65492],"mapped",[4463]],[[65493,65493],"mapped",[4464]],[[65494,65494],"mapped",[4465]],[[65495,65495],"mapped",[4466]],[[65496,65497],"disallowed"],[[65498,65498],"mapped",[4467]],[[65499,65499],"mapped",[4468]],[[65500,65500],"mapped",[4469]],[[65501,65503],"disallowed"],[[65504,65504],"mapped",[162]],[[65505,65505],"mapped",[163]],[[65506,65506],"mapped",[172]],[[65507,65507],"disallowed_STD3_mapped",[32,772]],[[65508,65508],"mapped",[166]],[[65509,65509],"mapped",[165]],[[65510,65510],"mapped",[8361]],[[65511,65511],"disallowed"],[[65512,65512],"mapped",[9474]],[[65513,65513],"mapped",[8592]],[[65514,65514],"mapped",[8593]],[[65515,65515],"mapped",[8594]],[[65516,65516],"mapped",[8595]],[[65517,65517],"mapped",[9632]],[[65518,65518],"mapped",[9675]],[[65519,65528],"disallowed"],[[65529,65531],"disallowed"],[[65532,65532],"disallowed"],[[65533,65533],"disallowed"],[[65534,65535],"disallowed"],[[65536,65547],"valid"],[[65548,65548],"disallowed"],[[65549,65574],"valid"],[[65575,65575],"disallowed"],[[65576,65594],"valid"],[[65595,65595],"disallowed"],[[65596,65597],"valid"],[[65598,65598],"disallowed"],[[65599,65613],"valid"],[[65614,65615],"disallowed"],[[65616,65629],"valid"],[[65630,65663],"disallowed"],[[65664,65786],"valid"],[[65787,65791],"disallowed"],[[65792,65794],"valid",[],"NV8"],[[65795,65798],"disallowed"],[[65799,65843],"valid",[],"NV8"],[[65844,65846],"disallowed"],[[65847,65855],"valid",[],"NV8"],[[65856,65930],"valid",[],"NV8"],[[65931,65932],"valid",[],"NV8"],[[65933,65935],"disallowed"],[[65936,65947],"valid",[],"NV8"],[[65948,65951],"disallowed"],[[65952,65952],"valid",[],"NV8"],[[65953,65999],"disallowed"],[[66000,66044],"valid",[],"NV8"],[[66045,66045],"valid"],[[66046,66175],"disallowed"],[[66176,66204],"valid"],[[66205,66207],"disallowed"],[[66208,66256],"valid"],[[66257,66271],"disallowed"],[[66272,66272],"valid"],[[66273,66299],"valid",[],"NV8"],[[66300,66303],"disallowed"],[[66304,66334],"valid"],[[66335,66335],"valid"],[[66336,66339],"valid",[],"NV8"],[[66340,66351],"disallowed"],[[66352,66368],"valid"],[[66369,66369],"valid",[],"NV8"],[[66370,66377],"valid"],[[66378,66378],"valid",[],"NV8"],[[66379,66383],"disallowed"],[[66384,66426],"valid"],[[66427,66431],"disallowed"],[[66432,66461],"valid"],[[66462,66462],"disallowed"],[[66463,66463],"valid",[],"NV8"],[[66464,66499],"valid"],[[66500,66503],"disallowed"],[[66504,66511],"valid"],[[66512,66517],"valid",[],"NV8"],[[66518,66559],"disallowed"],[[66560,66560],"mapped",[66600]],[[66561,66561],"mapped",[66601]],[[66562,66562],"mapped",[66602]],[[66563,66563],"mapped",[66603]],[[66564,66564],"mapped",[66604]],[[66565,66565],"mapped",[66605]],[[66566,66566],"mapped",[66606]],[[66567,66567],"mapped",[66607]],[[66568,66568],"mapped",[66608]],[[66569,66569],"mapped",[66609]],[[66570,66570],"mapped",[66610]],[[66571,66571],"mapped",[66611]],[[66572,66572],"mapped",[66612]],[[66573,66573],"mapped",[66613]],[[66574,66574],"mapped",[66614]],[[66575,66575],"mapped",[66615]],[[66576,66576],"mapped",[66616]],[[66577,66577],"mapped",[66617]],[[66578,66578],"mapped",[66618]],[[66579,66579],"mapped",[66619]],[[66580,66580],"mapped",[66620]],[[66581,66581],"mapped",[66621]],[[66582,66582],"mapped",[66622]],[[66583,66583],"mapped",[66623]],[[66584,66584],"mapped",[66624]],[[66585,66585],"mapped",[66625]],[[66586,66586],"mapped",[66626]],[[66587,66587],"mapped",[66627]],[[66588,66588],"mapped",[66628]],[[66589,66589],"mapped",[66629]],[[66590,66590],"mapped",[66630]],[[66591,66591],"mapped",[66631]],[[66592,66592],"mapped",[66632]],[[66593,66593],"mapped",[66633]],[[66594,66594],"mapped",[66634]],[[66595,66595],"mapped",[66635]],[[66596,66596],"mapped",[66636]],[[66597,66597],"mapped",[66637]],[[66598,66598],"mapped",[66638]],[[66599,66599],"mapped",[66639]],[[66600,66637],"valid"],[[66638,66717],"valid"],[[66718,66719],"disallowed"],[[66720,66729],"valid"],[[66730,66815],"disallowed"],[[66816,66855],"valid"],[[66856,66863],"disallowed"],[[66864,66915],"valid"],[[66916,66926],"disallowed"],[[66927,66927],"valid",[],"NV8"],[[66928,67071],"disallowed"],[[67072,67382],"valid"],[[67383,67391],"disallowed"],[[67392,67413],"valid"],[[67414,67423],"disallowed"],[[67424,67431],"valid"],[[67432,67583],"disallowed"],[[67584,67589],"valid"],[[67590,67591],"disallowed"],[[67592,67592],"valid"],[[67593,67593],"disallowed"],[[67594,67637],"valid"],[[67638,67638],"disallowed"],[[67639,67640],"valid"],[[67641,67643],"disallowed"],[[67644,67644],"valid"],[[67645,67646],"disallowed"],[[67647,67647],"valid"],[[67648,67669],"valid"],[[67670,67670],"disallowed"],[[67671,67679],"valid",[],"NV8"],[[67680,67702],"valid"],[[67703,67711],"valid",[],"NV8"],[[67712,67742],"valid"],[[67743,67750],"disallowed"],[[67751,67759],"valid",[],"NV8"],[[67760,67807],"disallowed"],[[67808,67826],"valid"],[[67827,67827],"disallowed"],[[67828,67829],"valid"],[[67830,67834],"disallowed"],[[67835,67839],"valid",[],"NV8"],[[67840,67861],"valid"],[[67862,67865],"valid",[],"NV8"],[[67866,67867],"valid",[],"NV8"],[[67868,67870],"disallowed"],[[67871,67871],"valid",[],"NV8"],[[67872,67897],"valid"],[[67898,67902],"disallowed"],[[67903,67903],"valid",[],"NV8"],[[67904,67967],"disallowed"],[[67968,68023],"valid"],[[68024,68027],"disallowed"],[[68028,68029],"valid",[],"NV8"],[[68030,68031],"valid"],[[68032,68047],"valid",[],"NV8"],[[68048,68049],"disallowed"],[[68050,68095],"valid",[],"NV8"],[[68096,68099],"valid"],[[68100,68100],"disallowed"],[[68101,68102],"valid"],[[68103,68107],"disallowed"],[[68108,68115],"valid"],[[68116,68116],"disallowed"],[[68117,68119],"valid"],[[68120,68120],"disallowed"],[[68121,68147],"valid"],[[68148,68151],"disallowed"],[[68152,68154],"valid"],[[68155,68158],"disallowed"],[[68159,68159],"valid"],[[68160,68167],"valid",[],"NV8"],[[68168,68175],"disallowed"],[[68176,68184],"valid",[],"NV8"],[[68185,68191],"disallowed"],[[68192,68220],"valid"],[[68221,68223],"valid",[],"NV8"],[[68224,68252],"valid"],[[68253,68255],"valid",[],"NV8"],[[68256,68287],"disallowed"],[[68288,68295],"valid"],[[68296,68296],"valid",[],"NV8"],[[68297,68326],"valid"],[[68327,68330],"disallowed"],[[68331,68342],"valid",[],"NV8"],[[68343,68351],"disallowed"],[[68352,68405],"valid"],[[68406,68408],"disallowed"],[[68409,68415],"valid",[],"NV8"],[[68416,68437],"valid"],[[68438,68439],"disallowed"],[[68440,68447],"valid",[],"NV8"],[[68448,68466],"valid"],[[68467,68471],"disallowed"],[[68472,68479],"valid",[],"NV8"],[[68480,68497],"valid"],[[68498,68504],"disallowed"],[[68505,68508],"valid",[],"NV8"],[[68509,68520],"disallowed"],[[68521,68527],"valid",[],"NV8"],[[68528,68607],"disallowed"],[[68608,68680],"valid"],[[68681,68735],"disallowed"],[[68736,68736],"mapped",[68800]],[[68737,68737],"mapped",[68801]],[[68738,68738],"mapped",[68802]],[[68739,68739],"mapped",[68803]],[[68740,68740],"mapped",[68804]],[[68741,68741],"mapped",[68805]],[[68742,68742],"mapped",[68806]],[[68743,68743],"mapped",[68807]],[[68744,68744],"mapped",[68808]],[[68745,68745],"mapped",[68809]],[[68746,68746],"mapped",[68810]],[[68747,68747],"mapped",[68811]],[[68748,68748],"mapped",[68812]],[[68749,68749],"mapped",[68813]],[[68750,68750],"mapped",[68814]],[[68751,68751],"mapped",[68815]],[[68752,68752],"mapped",[68816]],[[68753,68753],"mapped",[68817]],[[68754,68754],"mapped",[68818]],[[68755,68755],"mapped",[68819]],[[68756,68756],"mapped",[68820]],[[68757,68757],"mapped",[68821]],[[68758,68758],"mapped",[68822]],[[68759,68759],"mapped",[68823]],[[68760,68760],"mapped",[68824]],[[68761,68761],"mapped",[68825]],[[68762,68762],"mapped",[68826]],[[68763,68763],"mapped",[68827]],[[68764,68764],"mapped",[68828]],[[68765,68765],"mapped",[68829]],[[68766,68766],"mapped",[68830]],[[68767,68767],"mapped",[68831]],[[68768,68768],"mapped",[68832]],[[68769,68769],"mapped",[68833]],[[68770,68770],"mapped",[68834]],[[68771,68771],"mapped",[68835]],[[68772,68772],"mapped",[68836]],[[68773,68773],"mapped",[68837]],[[68774,68774],"mapped",[68838]],[[68775,68775],"mapped",[68839]],[[68776,68776],"mapped",[68840]],[[68777,68777],"mapped",[68841]],[[68778,68778],"mapped",[68842]],[[68779,68779],"mapped",[68843]],[[68780,68780],"mapped",[68844]],[[68781,68781],"mapped",[68845]],[[68782,68782],"mapped",[68846]],[[68783,68783],"mapped",[68847]],[[68784,68784],"mapped",[68848]],[[68785,68785],"mapped",[68849]],[[68786,68786],"mapped",[68850]],[[68787,68799],"disallowed"],[[68800,68850],"valid"],[[68851,68857],"disallowed"],[[68858,68863],"valid",[],"NV8"],[[68864,69215],"disallowed"],[[69216,69246],"valid",[],"NV8"],[[69247,69631],"disallowed"],[[69632,69702],"valid"],[[69703,69709],"valid",[],"NV8"],[[69710,69713],"disallowed"],[[69714,69733],"valid",[],"NV8"],[[69734,69743],"valid"],[[69744,69758],"disallowed"],[[69759,69759],"valid"],[[69760,69818],"valid"],[[69819,69820],"valid",[],"NV8"],[[69821,69821],"disallowed"],[[69822,69825],"valid",[],"NV8"],[[69826,69839],"disallowed"],[[69840,69864],"valid"],[[69865,69871],"disallowed"],[[69872,69881],"valid"],[[69882,69887],"disallowed"],[[69888,69940],"valid"],[[69941,69941],"disallowed"],[[69942,69951],"valid"],[[69952,69955],"valid",[],"NV8"],[[69956,69967],"disallowed"],[[69968,70003],"valid"],[[70004,70005],"valid",[],"NV8"],[[70006,70006],"valid"],[[70007,70015],"disallowed"],[[70016,70084],"valid"],[[70085,70088],"valid",[],"NV8"],[[70089,70089],"valid",[],"NV8"],[[70090,70092],"valid"],[[70093,70093],"valid",[],"NV8"],[[70094,70095],"disallowed"],[[70096,70105],"valid"],[[70106,70106],"valid"],[[70107,70107],"valid",[],"NV8"],[[70108,70108],"valid"],[[70109,70111],"valid",[],"NV8"],[[70112,70112],"disallowed"],[[70113,70132],"valid",[],"NV8"],[[70133,70143],"disallowed"],[[70144,70161],"valid"],[[70162,70162],"disallowed"],[[70163,70199],"valid"],[[70200,70205],"valid",[],"NV8"],[[70206,70271],"disallowed"],[[70272,70278],"valid"],[[70279,70279],"disallowed"],[[70280,70280],"valid"],[[70281,70281],"disallowed"],[[70282,70285],"valid"],[[70286,70286],"disallowed"],[[70287,70301],"valid"],[[70302,70302],"disallowed"],[[70303,70312],"valid"],[[70313,70313],"valid",[],"NV8"],[[70314,70319],"disallowed"],[[70320,70378],"valid"],[[70379,70383],"disallowed"],[[70384,70393],"valid"],[[70394,70399],"disallowed"],[[70400,70400],"valid"],[[70401,70403],"valid"],[[70404,70404],"disallowed"],[[70405,70412],"valid"],[[70413,70414],"disallowed"],[[70415,70416],"valid"],[[70417,70418],"disallowed"],[[70419,70440],"valid"],[[70441,70441],"disallowed"],[[70442,70448],"valid"],[[70449,70449],"disallowed"],[[70450,70451],"valid"],[[70452,70452],"disallowed"],[[70453,70457],"valid"],[[70458,70459],"disallowed"],[[70460,70468],"valid"],[[70469,70470],"disallowed"],[[70471,70472],"valid"],[[70473,70474],"disallowed"],[[70475,70477],"valid"],[[70478,70479],"disallowed"],[[70480,70480],"valid"],[[70481,70486],"disallowed"],[[70487,70487],"valid"],[[70488,70492],"disallowed"],[[70493,70499],"valid"],[[70500,70501],"disallowed"],[[70502,70508],"valid"],[[70509,70511],"disallowed"],[[70512,70516],"valid"],[[70517,70783],"disallowed"],[[70784,70853],"valid"],[[70854,70854],"valid",[],"NV8"],[[70855,70855],"valid"],[[70856,70863],"disallowed"],[[70864,70873],"valid"],[[70874,71039],"disallowed"],[[71040,71093],"valid"],[[71094,71095],"disallowed"],[[71096,71104],"valid"],[[71105,71113],"valid",[],"NV8"],[[71114,71127],"valid",[],"NV8"],[[71128,71133],"valid"],[[71134,71167],"disallowed"],[[71168,71232],"valid"],[[71233,71235],"valid",[],"NV8"],[[71236,71236],"valid"],[[71237,71247],"disallowed"],[[71248,71257],"valid"],[[71258,71295],"disallowed"],[[71296,71351],"valid"],[[71352,71359],"disallowed"],[[71360,71369],"valid"],[[71370,71423],"disallowed"],[[71424,71449],"valid"],[[71450,71452],"disallowed"],[[71453,71467],"valid"],[[71468,71471],"disallowed"],[[71472,71481],"valid"],[[71482,71487],"valid",[],"NV8"],[[71488,71839],"disallowed"],[[71840,71840],"mapped",[71872]],[[71841,71841],"mapped",[71873]],[[71842,71842],"mapped",[71874]],[[71843,71843],"mapped",[71875]],[[71844,71844],"mapped",[71876]],[[71845,71845],"mapped",[71877]],[[71846,71846],"mapped",[71878]],[[71847,71847],"mapped",[71879]],[[71848,71848],"mapped",[71880]],[[71849,71849],"mapped",[71881]],[[71850,71850],"mapped",[71882]],[[71851,71851],"mapped",[71883]],[[71852,71852],"mapped",[71884]],[[71853,71853],"mapped",[71885]],[[71854,71854],"mapped",[71886]],[[71855,71855],"mapped",[71887]],[[71856,71856],"mapped",[71888]],[[71857,71857],"mapped",[71889]],[[71858,71858],"mapped",[71890]],[[71859,71859],"mapped",[71891]],[[71860,71860],"mapped",[71892]],[[71861,71861],"mapped",[71893]],[[71862,71862],"mapped",[71894]],[[71863,71863],"mapped",[71895]],[[71864,71864],"mapped",[71896]],[[71865,71865],"mapped",[71897]],[[71866,71866],"mapped",[71898]],[[71867,71867],"mapped",[71899]],[[71868,71868],"mapped",[71900]],[[71869,71869],"mapped",[71901]],[[71870,71870],"mapped",[71902]],[[71871,71871],"mapped",[71903]],[[71872,71913],"valid"],[[71914,71922],"valid",[],"NV8"],[[71923,71934],"disallowed"],[[71935,71935],"valid"],[[71936,72383],"disallowed"],[[72384,72440],"valid"],[[72441,73727],"disallowed"],[[73728,74606],"valid"],[[74607,74648],"valid"],[[74649,74649],"valid"],[[74650,74751],"disallowed"],[[74752,74850],"valid",[],"NV8"],[[74851,74862],"valid",[],"NV8"],[[74863,74863],"disallowed"],[[74864,74867],"valid",[],"NV8"],[[74868,74868],"valid",[],"NV8"],[[74869,74879],"disallowed"],[[74880,75075],"valid"],[[75076,77823],"disallowed"],[[77824,78894],"valid"],[[78895,82943],"disallowed"],[[82944,83526],"valid"],[[83527,92159],"disallowed"],[[92160,92728],"valid"],[[92729,92735],"disallowed"],[[92736,92766],"valid"],[[92767,92767],"disallowed"],[[92768,92777],"valid"],[[92778,92781],"disallowed"],[[92782,92783],"valid",[],"NV8"],[[92784,92879],"disallowed"],[[92880,92909],"valid"],[[92910,92911],"disallowed"],[[92912,92916],"valid"],[[92917,92917],"valid",[],"NV8"],[[92918,92927],"disallowed"],[[92928,92982],"valid"],[[92983,92991],"valid",[],"NV8"],[[92992,92995],"valid"],[[92996,92997],"valid",[],"NV8"],[[92998,93007],"disallowed"],[[93008,93017],"valid"],[[93018,93018],"disallowed"],[[93019,93025],"valid",[],"NV8"],[[93026,93026],"disallowed"],[[93027,93047],"valid"],[[93048,93052],"disallowed"],[[93053,93071],"valid"],[[93072,93951],"disallowed"],[[93952,94020],"valid"],[[94021,94031],"disallowed"],[[94032,94078],"valid"],[[94079,94094],"disallowed"],[[94095,94111],"valid"],[[94112,110591],"disallowed"],[[110592,110593],"valid"],[[110594,113663],"disallowed"],[[113664,113770],"valid"],[[113771,113775],"disallowed"],[[113776,113788],"valid"],[[113789,113791],"disallowed"],[[113792,113800],"valid"],[[113801,113807],"disallowed"],[[113808,113817],"valid"],[[113818,113819],"disallowed"],[[113820,113820],"valid",[],"NV8"],[[113821,113822],"valid"],[[113823,113823],"valid",[],"NV8"],[[113824,113827],"ignored"],[[113828,118783],"disallowed"],[[118784,119029],"valid",[],"NV8"],[[119030,119039],"disallowed"],[[119040,119078],"valid",[],"NV8"],[[119079,119080],"disallowed"],[[119081,119081],"valid",[],"NV8"],[[119082,119133],"valid",[],"NV8"],[[119134,119134],"mapped",[119127,119141]],[[119135,119135],"mapped",[119128,119141]],[[119136,119136],"mapped",[119128,119141,119150]],[[119137,119137],"mapped",[119128,119141,119151]],[[119138,119138],"mapped",[119128,119141,119152]],[[119139,119139],"mapped",[119128,119141,119153]],[[119140,119140],"mapped",[119128,119141,119154]],[[119141,119154],"valid",[],"NV8"],[[119155,119162],"disallowed"],[[119163,119226],"valid",[],"NV8"],[[119227,119227],"mapped",[119225,119141]],[[119228,119228],"mapped",[119226,119141]],[[119229,119229],"mapped",[119225,119141,119150]],[[119230,119230],"mapped",[119226,119141,119150]],[[119231,119231],"mapped",[119225,119141,119151]],[[119232,119232],"mapped",[119226,119141,119151]],[[119233,119261],"valid",[],"NV8"],[[119262,119272],"valid",[],"NV8"],[[119273,119295],"disallowed"],[[119296,119365],"valid",[],"NV8"],[[119366,119551],"disallowed"],[[119552,119638],"valid",[],"NV8"],[[119639,119647],"disallowed"],[[119648,119665],"valid",[],"NV8"],[[119666,119807],"disallowed"],[[119808,119808],"mapped",[97]],[[119809,119809],"mapped",[98]],[[119810,119810],"mapped",[99]],[[119811,119811],"mapped",[100]],[[119812,119812],"mapped",[101]],[[119813,119813],"mapped",[102]],[[119814,119814],"mapped",[103]],[[119815,119815],"mapped",[104]],[[119816,119816],"mapped",[105]],[[119817,119817],"mapped",[106]],[[119818,119818],"mapped",[107]],[[119819,119819],"mapped",[108]],[[119820,119820],"mapped",[109]],[[119821,119821],"mapped",[110]],[[119822,119822],"mapped",[111]],[[119823,119823],"mapped",[112]],[[119824,119824],"mapped",[113]],[[119825,119825],"mapped",[114]],[[119826,119826],"mapped",[115]],[[119827,119827],"mapped",[116]],[[119828,119828],"mapped",[117]],[[119829,119829],"mapped",[118]],[[119830,119830],"mapped",[119]],[[119831,119831],"mapped",[120]],[[119832,119832],"mapped",[121]],[[119833,119833],"mapped",[122]],[[119834,119834],"mapped",[97]],[[119835,119835],"mapped",[98]],[[119836,119836],"mapped",[99]],[[119837,119837],"mapped",[100]],[[119838,119838],"mapped",[101]],[[119839,119839],"mapped",[102]],[[119840,119840],"mapped",[103]],[[119841,119841],"mapped",[104]],[[119842,119842],"mapped",[105]],[[119843,119843],"mapped",[106]],[[119844,119844],"mapped",[107]],[[119845,119845],"mapped",[108]],[[119846,119846],"mapped",[109]],[[119847,119847],"mapped",[110]],[[119848,119848],"mapped",[111]],[[119849,119849],"mapped",[112]],[[119850,119850],"mapped",[113]],[[119851,119851],"mapped",[114]],[[119852,119852],"mapped",[115]],[[119853,119853],"mapped",[116]],[[119854,119854],"mapped",[117]],[[119855,119855],"mapped",[118]],[[119856,119856],"mapped",[119]],[[119857,119857],"mapped",[120]],[[119858,119858],"mapped",[121]],[[119859,119859],"mapped",[122]],[[119860,119860],"mapped",[97]],[[119861,119861],"mapped",[98]],[[119862,119862],"mapped",[99]],[[119863,119863],"mapped",[100]],[[119864,119864],"mapped",[101]],[[119865,119865],"mapped",[102]],[[119866,119866],"mapped",[103]],[[119867,119867],"mapped",[104]],[[119868,119868],"mapped",[105]],[[119869,119869],"mapped",[106]],[[119870,119870],"mapped",[107]],[[119871,119871],"mapped",[108]],[[119872,119872],"mapped",[109]],[[119873,119873],"mapped",[110]],[[119874,119874],"mapped",[111]],[[119875,119875],"mapped",[112]],[[119876,119876],"mapped",[113]],[[119877,119877],"mapped",[114]],[[119878,119878],"mapped",[115]],[[119879,119879],"mapped",[116]],[[119880,119880],"mapped",[117]],[[119881,119881],"mapped",[118]],[[119882,119882],"mapped",[119]],[[119883,119883],"mapped",[120]],[[119884,119884],"mapped",[121]],[[119885,119885],"mapped",[122]],[[119886,119886],"mapped",[97]],[[119887,119887],"mapped",[98]],[[119888,119888],"mapped",[99]],[[119889,119889],"mapped",[100]],[[119890,119890],"mapped",[101]],[[119891,119891],"mapped",[102]],[[119892,119892],"mapped",[103]],[[119893,119893],"disallowed"],[[119894,119894],"mapped",[105]],[[119895,119895],"mapped",[106]],[[119896,119896],"mapped",[107]],[[119897,119897],"mapped",[108]],[[119898,119898],"mapped",[109]],[[119899,119899],"mapped",[110]],[[119900,119900],"mapped",[111]],[[119901,119901],"mapped",[112]],[[119902,119902],"mapped",[113]],[[119903,119903],"mapped",[114]],[[119904,119904],"mapped",[115]],[[119905,119905],"mapped",[116]],[[119906,119906],"mapped",[117]],[[119907,119907],"mapped",[118]],[[119908,119908],"mapped",[119]],[[119909,119909],"mapped",[120]],[[119910,119910],"mapped",[121]],[[119911,119911],"mapped",[122]],[[119912,119912],"mapped",[97]],[[119913,119913],"mapped",[98]],[[119914,119914],"mapped",[99]],[[119915,119915],"mapped",[100]],[[119916,119916],"mapped",[101]],[[119917,119917],"mapped",[102]],[[119918,119918],"mapped",[103]],[[119919,119919],"mapped",[104]],[[119920,119920],"mapped",[105]],[[119921,119921],"mapped",[106]],[[119922,119922],"mapped",[107]],[[119923,119923],"mapped",[108]],[[119924,119924],"mapped",[109]],[[119925,119925],"mapped",[110]],[[119926,119926],"mapped",[111]],[[119927,119927],"mapped",[112]],[[119928,119928],"mapped",[113]],[[119929,119929],"mapped",[114]],[[119930,119930],"mapped",[115]],[[119931,119931],"mapped",[116]],[[119932,119932],"mapped",[117]],[[119933,119933],"mapped",[118]],[[119934,119934],"mapped",[119]],[[119935,119935],"mapped",[120]],[[119936,119936],"mapped",[121]],[[119937,119937],"mapped",[122]],[[119938,119938],"mapped",[97]],[[119939,119939],"mapped",[98]],[[119940,119940],"mapped",[99]],[[119941,119941],"mapped",[100]],[[119942,119942],"mapped",[101]],[[119943,119943],"mapped",[102]],[[119944,119944],"mapped",[103]],[[119945,119945],"mapped",[104]],[[119946,119946],"mapped",[105]],[[119947,119947],"mapped",[106]],[[119948,119948],"mapped",[107]],[[119949,119949],"mapped",[108]],[[119950,119950],"mapped",[109]],[[119951,119951],"mapped",[110]],[[119952,119952],"mapped",[111]],[[119953,119953],"mapped",[112]],[[119954,119954],"mapped",[113]],[[119955,119955],"mapped",[114]],[[119956,119956],"mapped",[115]],[[119957,119957],"mapped",[116]],[[119958,119958],"mapped",[117]],[[119959,119959],"mapped",[118]],[[119960,119960],"mapped",[119]],[[119961,119961],"mapped",[120]],[[119962,119962],"mapped",[121]],[[119963,119963],"mapped",[122]],[[119964,119964],"mapped",[97]],[[119965,119965],"disallowed"],[[119966,119966],"mapped",[99]],[[119967,119967],"mapped",[100]],[[119968,119969],"disallowed"],[[119970,119970],"mapped",[103]],[[119971,119972],"disallowed"],[[119973,119973],"mapped",[106]],[[119974,119974],"mapped",[107]],[[119975,119976],"disallowed"],[[119977,119977],"mapped",[110]],[[119978,119978],"mapped",[111]],[[119979,119979],"mapped",[112]],[[119980,119980],"mapped",[113]],[[119981,119981],"disallowed"],[[119982,119982],"mapped",[115]],[[119983,119983],"mapped",[116]],[[119984,119984],"mapped",[117]],[[119985,119985],"mapped",[118]],[[119986,119986],"mapped",[119]],[[119987,119987],"mapped",[120]],[[119988,119988],"mapped",[121]],[[119989,119989],"mapped",[122]],[[119990,119990],"mapped",[97]],[[119991,119991],"mapped",[98]],[[119992,119992],"mapped",[99]],[[119993,119993],"mapped",[100]],[[119994,119994],"disallowed"],[[119995,119995],"mapped",[102]],[[119996,119996],"disallowed"],[[119997,119997],"mapped",[104]],[[119998,119998],"mapped",[105]],[[119999,119999],"mapped",[106]],[[120000,120000],"mapped",[107]],[[120001,120001],"mapped",[108]],[[120002,120002],"mapped",[109]],[[120003,120003],"mapped",[110]],[[120004,120004],"disallowed"],[[120005,120005],"mapped",[112]],[[120006,120006],"mapped",[113]],[[120007,120007],"mapped",[114]],[[120008,120008],"mapped",[115]],[[120009,120009],"mapped",[116]],[[120010,120010],"mapped",[117]],[[120011,120011],"mapped",[118]],[[120012,120012],"mapped",[119]],[[120013,120013],"mapped",[120]],[[120014,120014],"mapped",[121]],[[120015,120015],"mapped",[122]],[[120016,120016],"mapped",[97]],[[120017,120017],"mapped",[98]],[[120018,120018],"mapped",[99]],[[120019,120019],"mapped",[100]],[[120020,120020],"mapped",[101]],[[120021,120021],"mapped",[102]],[[120022,120022],"mapped",[103]],[[120023,120023],"mapped",[104]],[[120024,120024],"mapped",[105]],[[120025,120025],"mapped",[106]],[[120026,120026],"mapped",[107]],[[120027,120027],"mapped",[108]],[[120028,120028],"mapped",[109]],[[120029,120029],"mapped",[110]],[[120030,120030],"mapped",[111]],[[120031,120031],"mapped",[112]],[[120032,120032],"mapped",[113]],[[120033,120033],"mapped",[114]],[[120034,120034],"mapped",[115]],[[120035,120035],"mapped",[116]],[[120036,120036],"mapped",[117]],[[120037,120037],"mapped",[118]],[[120038,120038],"mapped",[119]],[[120039,120039],"mapped",[120]],[[120040,120040],"mapped",[121]],[[120041,120041],"mapped",[122]],[[120042,120042],"mapped",[97]],[[120043,120043],"mapped",[98]],[[120044,120044],"mapped",[99]],[[120045,120045],"mapped",[100]],[[120046,120046],"mapped",[101]],[[120047,120047],"mapped",[102]],[[120048,120048],"mapped",[103]],[[120049,120049],"mapped",[104]],[[120050,120050],"mapped",[105]],[[120051,120051],"mapped",[106]],[[120052,120052],"mapped",[107]],[[120053,120053],"mapped",[108]],[[120054,120054],"mapped",[109]],[[120055,120055],"mapped",[110]],[[120056,120056],"mapped",[111]],[[120057,120057],"mapped",[112]],[[120058,120058],"mapped",[113]],[[120059,120059],"mapped",[114]],[[120060,120060],"mapped",[115]],[[120061,120061],"mapped",[116]],[[120062,120062],"mapped",[117]],[[120063,120063],"mapped",[118]],[[120064,120064],"mapped",[119]],[[120065,120065],"mapped",[120]],[[120066,120066],"mapped",[121]],[[120067,120067],"mapped",[122]],[[120068,120068],"mapped",[97]],[[120069,120069],"mapped",[98]],[[120070,120070],"disallowed"],[[120071,120071],"mapped",[100]],[[120072,120072],"mapped",[101]],[[120073,120073],"mapped",[102]],[[120074,120074],"mapped",[103]],[[120075,120076],"disallowed"],[[120077,120077],"mapped",[106]],[[120078,120078],"mapped",[107]],[[120079,120079],"mapped",[108]],[[120080,120080],"mapped",[109]],[[120081,120081],"mapped",[110]],[[120082,120082],"mapped",[111]],[[120083,120083],"mapped",[112]],[[120084,120084],"mapped",[113]],[[120085,120085],"disallowed"],[[120086,120086],"mapped",[115]],[[120087,120087],"mapped",[116]],[[120088,120088],"mapped",[117]],[[120089,120089],"mapped",[118]],[[120090,120090],"mapped",[119]],[[120091,120091],"mapped",[120]],[[120092,120092],"mapped",[121]],[[120093,120093],"disallowed"],[[120094,120094],"mapped",[97]],[[120095,120095],"mapped",[98]],[[120096,120096],"mapped",[99]],[[120097,120097],"mapped",[100]],[[120098,120098],"mapped",[101]],[[120099,120099],"mapped",[102]],[[120100,120100],"mapped",[103]],[[120101,120101],"mapped",[104]],[[120102,120102],"mapped",[105]],[[120103,120103],"mapped",[106]],[[120104,120104],"mapped",[107]],[[120105,120105],"mapped",[108]],[[120106,120106],"mapped",[109]],[[120107,120107],"mapped",[110]],[[120108,120108],"mapped",[111]],[[120109,120109],"mapped",[112]],[[120110,120110],"mapped",[113]],[[120111,120111],"mapped",[114]],[[120112,120112],"mapped",[115]],[[120113,120113],"mapped",[116]],[[120114,120114],"mapped",[117]],[[120115,120115],"mapped",[118]],[[120116,120116],"mapped",[119]],[[120117,120117],"mapped",[120]],[[120118,120118],"mapped",[121]],[[120119,120119],"mapped",[122]],[[120120,120120],"mapped",[97]],[[120121,120121],"mapped",[98]],[[120122,120122],"disallowed"],[[120123,120123],"mapped",[100]],[[120124,120124],"mapped",[101]],[[120125,120125],"mapped",[102]],[[120126,120126],"mapped",[103]],[[120127,120127],"disallowed"],[[120128,120128],"mapped",[105]],[[120129,120129],"mapped",[106]],[[120130,120130],"mapped",[107]],[[120131,120131],"mapped",[108]],[[120132,120132],"mapped",[109]],[[120133,120133],"disallowed"],[[120134,120134],"mapped",[111]],[[120135,120137],"disallowed"],[[120138,120138],"mapped",[115]],[[120139,120139],"mapped",[116]],[[120140,120140],"mapped",[117]],[[120141,120141],"mapped",[118]],[[120142,120142],"mapped",[119]],[[120143,120143],"mapped",[120]],[[120144,120144],"mapped",[121]],[[120145,120145],"disallowed"],[[120146,120146],"mapped",[97]],[[120147,120147],"mapped",[98]],[[120148,120148],"mapped",[99]],[[120149,120149],"mapped",[100]],[[120150,120150],"mapped",[101]],[[120151,120151],"mapped",[102]],[[120152,120152],"mapped",[103]],[[120153,120153],"mapped",[104]],[[120154,120154],"mapped",[105]],[[120155,120155],"mapped",[106]],[[120156,120156],"mapped",[107]],[[120157,120157],"mapped",[108]],[[120158,120158],"mapped",[109]],[[120159,120159],"mapped",[110]],[[120160,120160],"mapped",[111]],[[120161,120161],"mapped",[112]],[[120162,120162],"mapped",[113]],[[120163,120163],"mapped",[114]],[[120164,120164],"mapped",[115]],[[120165,120165],"mapped",[116]],[[120166,120166],"mapped",[117]],[[120167,120167],"mapped",[118]],[[120168,120168],"mapped",[119]],[[120169,120169],"mapped",[120]],[[120170,120170],"mapped",[121]],[[120171,120171],"mapped",[122]],[[120172,120172],"mapped",[97]],[[120173,120173],"mapped",[98]],[[120174,120174],"mapped",[99]],[[120175,120175],"mapped",[100]],[[120176,120176],"mapped",[101]],[[120177,120177],"mapped",[102]],[[120178,120178],"mapped",[103]],[[120179,120179],"mapped",[104]],[[120180,120180],"mapped",[105]],[[120181,120181],"mapped",[106]],[[120182,120182],"mapped",[107]],[[120183,120183],"mapped",[108]],[[120184,120184],"mapped",[109]],[[120185,120185],"mapped",[110]],[[120186,120186],"mapped",[111]],[[120187,120187],"mapped",[112]],[[120188,120188],"mapped",[113]],[[120189,120189],"mapped",[114]],[[120190,120190],"mapped",[115]],[[120191,120191],"mapped",[116]],[[120192,120192],"mapped",[117]],[[120193,120193],"mapped",[118]],[[120194,120194],"mapped",[119]],[[120195,120195],"mapped",[120]],[[120196,120196],"mapped",[121]],[[120197,120197],"mapped",[122]],[[120198,120198],"mapped",[97]],[[120199,120199],"mapped",[98]],[[120200,120200],"mapped",[99]],[[120201,120201],"mapped",[100]],[[120202,120202],"mapped",[101]],[[120203,120203],"mapped",[102]],[[120204,120204],"mapped",[103]],[[120205,120205],"mapped",[104]],[[120206,120206],"mapped",[105]],[[120207,120207],"mapped",[106]],[[120208,120208],"mapped",[107]],[[120209,120209],"mapped",[108]],[[120210,120210],"mapped",[109]],[[120211,120211],"mapped",[110]],[[120212,120212],"mapped",[111]],[[120213,120213],"mapped",[112]],[[120214,120214],"mapped",[113]],[[120215,120215],"mapped",[114]],[[120216,120216],"mapped",[115]],[[120217,120217],"mapped",[116]],[[120218,120218],"mapped",[117]],[[120219,120219],"mapped",[118]],[[120220,120220],"mapped",[119]],[[120221,120221],"mapped",[120]],[[120222,120222],"mapped",[121]],[[120223,120223],"mapped",[122]],[[120224,120224],"mapped",[97]],[[120225,120225],"mapped",[98]],[[120226,120226],"mapped",[99]],[[120227,120227],"mapped",[100]],[[120228,120228],"mapped",[101]],[[120229,120229],"mapped",[102]],[[120230,120230],"mapped",[103]],[[120231,120231],"mapped",[104]],[[120232,120232],"mapped",[105]],[[120233,120233],"mapped",[106]],[[120234,120234],"mapped",[107]],[[120235,120235],"mapped",[108]],[[120236,120236],"mapped",[109]],[[120237,120237],"mapped",[110]],[[120238,120238],"mapped",[111]],[[120239,120239],"mapped",[112]],[[120240,120240],"mapped",[113]],[[120241,120241],"mapped",[114]],[[120242,120242],"mapped",[115]],[[120243,120243],"mapped",[116]],[[120244,120244],"mapped",[117]],[[120245,120245],"mapped",[118]],[[120246,120246],"mapped",[119]],[[120247,120247],"mapped",[120]],[[120248,120248],"mapped",[121]],[[120249,120249],"mapped",[122]],[[120250,120250],"mapped",[97]],[[120251,120251],"mapped",[98]],[[120252,120252],"mapped",[99]],[[120253,120253],"mapped",[100]],[[120254,120254],"mapped",[101]],[[120255,120255],"mapped",[102]],[[120256,120256],"mapped",[103]],[[120257,120257],"mapped",[104]],[[120258,120258],"mapped",[105]],[[120259,120259],"mapped",[106]],[[120260,120260],"mapped",[107]],[[120261,120261],"mapped",[108]],[[120262,120262],"mapped",[109]],[[120263,120263],"mapped",[110]],[[120264,120264],"mapped",[111]],[[120265,120265],"mapped",[112]],[[120266,120266],"mapped",[113]],[[120267,120267],"mapped",[114]],[[120268,120268],"mapped",[115]],[[120269,120269],"mapped",[116]],[[120270,120270],"mapped",[117]],[[120271,120271],"mapped",[118]],[[120272,120272],"mapped",[119]],[[120273,120273],"mapped",[120]],[[120274,120274],"mapped",[121]],[[120275,120275],"mapped",[122]],[[120276,120276],"mapped",[97]],[[120277,120277],"mapped",[98]],[[120278,120278],"mapped",[99]],[[120279,120279],"mapped",[100]],[[120280,120280],"mapped",[101]],[[120281,120281],"mapped",[102]],[[120282,120282],"mapped",[103]],[[120283,120283],"mapped",[104]],[[120284,120284],"mapped",[105]],[[120285,120285],"mapped",[106]],[[120286,120286],"mapped",[107]],[[120287,120287],"mapped",[108]],[[120288,120288],"mapped",[109]],[[120289,120289],"mapped",[110]],[[120290,120290],"mapped",[111]],[[120291,120291],"mapped",[112]],[[120292,120292],"mapped",[113]],[[120293,120293],"mapped",[114]],[[120294,120294],"mapped",[115]],[[120295,120295],"mapped",[116]],[[120296,120296],"mapped",[117]],[[120297,120297],"mapped",[118]],[[120298,120298],"mapped",[119]],[[120299,120299],"mapped",[120]],[[120300,120300],"mapped",[121]],[[120301,120301],"mapped",[122]],[[120302,120302],"mapped",[97]],[[120303,120303],"mapped",[98]],[[120304,120304],"mapped",[99]],[[120305,120305],"mapped",[100]],[[120306,120306],"mapped",[101]],[[120307,120307],"mapped",[102]],[[120308,120308],"mapped",[103]],[[120309,120309],"mapped",[104]],[[120310,120310],"mapped",[105]],[[120311,120311],"mapped",[106]],[[120312,120312],"mapped",[107]],[[120313,120313],"mapped",[108]],[[120314,120314],"mapped",[109]],[[120315,120315],"mapped",[110]],[[120316,120316],"mapped",[111]],[[120317,120317],"mapped",[112]],[[120318,120318],"mapped",[113]],[[120319,120319],"mapped",[114]],[[120320,120320],"mapped",[115]],[[120321,120321],"mapped",[116]],[[120322,120322],"mapped",[117]],[[120323,120323],"mapped",[118]],[[120324,120324],"mapped",[119]],[[120325,120325],"mapped",[120]],[[120326,120326],"mapped",[121]],[[120327,120327],"mapped",[122]],[[120328,120328],"mapped",[97]],[[120329,120329],"mapped",[98]],[[120330,120330],"mapped",[99]],[[120331,120331],"mapped",[100]],[[120332,120332],"mapped",[101]],[[120333,120333],"mapped",[102]],[[120334,120334],"mapped",[103]],[[120335,120335],"mapped",[104]],[[120336,120336],"mapped",[105]],[[120337,120337],"mapped",[106]],[[120338,120338],"mapped",[107]],[[120339,120339],"mapped",[108]],[[120340,120340],"mapped",[109]],[[120341,120341],"mapped",[110]],[[120342,120342],"mapped",[111]],[[120343,120343],"mapped",[112]],[[120344,120344],"mapped",[113]],[[120345,120345],"mapped",[114]],[[120346,120346],"mapped",[115]],[[120347,120347],"mapped",[116]],[[120348,120348],"mapped",[117]],[[120349,120349],"mapped",[118]],[[120350,120350],"mapped",[119]],[[120351,120351],"mapped",[120]],[[120352,120352],"mapped",[121]],[[120353,120353],"mapped",[122]],[[120354,120354],"mapped",[97]],[[120355,120355],"mapped",[98]],[[120356,120356],"mapped",[99]],[[120357,120357],"mapped",[100]],[[120358,120358],"mapped",[101]],[[120359,120359],"mapped",[102]],[[120360,120360],"mapped",[103]],[[120361,120361],"mapped",[104]],[[120362,120362],"mapped",[105]],[[120363,120363],"mapped",[106]],[[120364,120364],"mapped",[107]],[[120365,120365],"mapped",[108]],[[120366,120366],"mapped",[109]],[[120367,120367],"mapped",[110]],[[120368,120368],"mapped",[111]],[[120369,120369],"mapped",[112]],[[120370,120370],"mapped",[113]],[[120371,120371],"mapped",[114]],[[120372,120372],"mapped",[115]],[[120373,120373],"mapped",[116]],[[120374,120374],"mapped",[117]],[[120375,120375],"mapped",[118]],[[120376,120376],"mapped",[119]],[[120377,120377],"mapped",[120]],[[120378,120378],"mapped",[121]],[[120379,120379],"mapped",[122]],[[120380,120380],"mapped",[97]],[[120381,120381],"mapped",[98]],[[120382,120382],"mapped",[99]],[[120383,120383],"mapped",[100]],[[120384,120384],"mapped",[101]],[[120385,120385],"mapped",[102]],[[120386,120386],"mapped",[103]],[[120387,120387],"mapped",[104]],[[120388,120388],"mapped",[105]],[[120389,120389],"mapped",[106]],[[120390,120390],"mapped",[107]],[[120391,120391],"mapped",[108]],[[120392,120392],"mapped",[109]],[[120393,120393],"mapped",[110]],[[120394,120394],"mapped",[111]],[[120395,120395],"mapped",[112]],[[120396,120396],"mapped",[113]],[[120397,120397],"mapped",[114]],[[120398,120398],"mapped",[115]],[[120399,120399],"mapped",[116]],[[120400,120400],"mapped",[117]],[[120401,120401],"mapped",[118]],[[120402,120402],"mapped",[119]],[[120403,120403],"mapped",[120]],[[120404,120404],"mapped",[121]],[[120405,120405],"mapped",[122]],[[120406,120406],"mapped",[97]],[[120407,120407],"mapped",[98]],[[120408,120408],"mapped",[99]],[[120409,120409],"mapped",[100]],[[120410,120410],"mapped",[101]],[[120411,120411],"mapped",[102]],[[120412,120412],"mapped",[103]],[[120413,120413],"mapped",[104]],[[120414,120414],"mapped",[105]],[[120415,120415],"mapped",[106]],[[120416,120416],"mapped",[107]],[[120417,120417],"mapped",[108]],[[120418,120418],"mapped",[109]],[[120419,120419],"mapped",[110]],[[120420,120420],"mapped",[111]],[[120421,120421],"mapped",[112]],[[120422,120422],"mapped",[113]],[[120423,120423],"mapped",[114]],[[120424,120424],"mapped",[115]],[[120425,120425],"mapped",[116]],[[120426,120426],"mapped",[117]],[[120427,120427],"mapped",[118]],[[120428,120428],"mapped",[119]],[[120429,120429],"mapped",[120]],[[120430,120430],"mapped",[121]],[[120431,120431],"mapped",[122]],[[120432,120432],"mapped",[97]],[[120433,120433],"mapped",[98]],[[120434,120434],"mapped",[99]],[[120435,120435],"mapped",[100]],[[120436,120436],"mapped",[101]],[[120437,120437],"mapped",[102]],[[120438,120438],"mapped",[103]],[[120439,120439],"mapped",[104]],[[120440,120440],"mapped",[105]],[[120441,120441],"mapped",[106]],[[120442,120442],"mapped",[107]],[[120443,120443],"mapped",[108]],[[120444,120444],"mapped",[109]],[[120445,120445],"mapped",[110]],[[120446,120446],"mapped",[111]],[[120447,120447],"mapped",[112]],[[120448,120448],"mapped",[113]],[[120449,120449],"mapped",[114]],[[120450,120450],"mapped",[115]],[[120451,120451],"mapped",[116]],[[120452,120452],"mapped",[117]],[[120453,120453],"mapped",[118]],[[120454,120454],"mapped",[119]],[[120455,120455],"mapped",[120]],[[120456,120456],"mapped",[121]],[[120457,120457],"mapped",[122]],[[120458,120458],"mapped",[97]],[[120459,120459],"mapped",[98]],[[120460,120460],"mapped",[99]],[[120461,120461],"mapped",[100]],[[120462,120462],"mapped",[101]],[[120463,120463],"mapped",[102]],[[120464,120464],"mapped",[103]],[[120465,120465],"mapped",[104]],[[120466,120466],"mapped",[105]],[[120467,120467],"mapped",[106]],[[120468,120468],"mapped",[107]],[[120469,120469],"mapped",[108]],[[120470,120470],"mapped",[109]],[[120471,120471],"mapped",[110]],[[120472,120472],"mapped",[111]],[[120473,120473],"mapped",[112]],[[120474,120474],"mapped",[113]],[[120475,120475],"mapped",[114]],[[120476,120476],"mapped",[115]],[[120477,120477],"mapped",[116]],[[120478,120478],"mapped",[117]],[[120479,120479],"mapped",[118]],[[120480,120480],"mapped",[119]],[[120481,120481],"mapped",[120]],[[120482,120482],"mapped",[121]],[[120483,120483],"mapped",[122]],[[120484,120484],"mapped",[305]],[[120485,120485],"mapped",[567]],[[120486,120487],"disallowed"],[[120488,120488],"mapped",[945]],[[120489,120489],"mapped",[946]],[[120490,120490],"mapped",[947]],[[120491,120491],"mapped",[948]],[[120492,120492],"mapped",[949]],[[120493,120493],"mapped",[950]],[[120494,120494],"mapped",[951]],[[120495,120495],"mapped",[952]],[[120496,120496],"mapped",[953]],[[120497,120497],"mapped",[954]],[[120498,120498],"mapped",[955]],[[120499,120499],"mapped",[956]],[[120500,120500],"mapped",[957]],[[120501,120501],"mapped",[958]],[[120502,120502],"mapped",[959]],[[120503,120503],"mapped",[960]],[[120504,120504],"mapped",[961]],[[120505,120505],"mapped",[952]],[[120506,120506],"mapped",[963]],[[120507,120507],"mapped",[964]],[[120508,120508],"mapped",[965]],[[120509,120509],"mapped",[966]],[[120510,120510],"mapped",[967]],[[120511,120511],"mapped",[968]],[[120512,120512],"mapped",[969]],[[120513,120513],"mapped",[8711]],[[120514,120514],"mapped",[945]],[[120515,120515],"mapped",[946]],[[120516,120516],"mapped",[947]],[[120517,120517],"mapped",[948]],[[120518,120518],"mapped",[949]],[[120519,120519],"mapped",[950]],[[120520,120520],"mapped",[951]],[[120521,120521],"mapped",[952]],[[120522,120522],"mapped",[953]],[[120523,120523],"mapped",[954]],[[120524,120524],"mapped",[955]],[[120525,120525],"mapped",[956]],[[120526,120526],"mapped",[957]],[[120527,120527],"mapped",[958]],[[120528,120528],"mapped",[959]],[[120529,120529],"mapped",[960]],[[120530,120530],"mapped",[961]],[[120531,120532],"mapped",[963]],[[120533,120533],"mapped",[964]],[[120534,120534],"mapped",[965]],[[120535,120535],"mapped",[966]],[[120536,120536],"mapped",[967]],[[120537,120537],"mapped",[968]],[[120538,120538],"mapped",[969]],[[120539,120539],"mapped",[8706]],[[120540,120540],"mapped",[949]],[[120541,120541],"mapped",[952]],[[120542,120542],"mapped",[954]],[[120543,120543],"mapped",[966]],[[120544,120544],"mapped",[961]],[[120545,120545],"mapped",[960]],[[120546,120546],"mapped",[945]],[[120547,120547],"mapped",[946]],[[120548,120548],"mapped",[947]],[[120549,120549],"mapped",[948]],[[120550,120550],"mapped",[949]],[[120551,120551],"mapped",[950]],[[120552,120552],"mapped",[951]],[[120553,120553],"mapped",[952]],[[120554,120554],"mapped",[953]],[[120555,120555],"mapped",[954]],[[120556,120556],"mapped",[955]],[[120557,120557],"mapped",[956]],[[120558,120558],"mapped",[957]],[[120559,120559],"mapped",[958]],[[120560,120560],"mapped",[959]],[[120561,120561],"mapped",[960]],[[120562,120562],"mapped",[961]],[[120563,120563],"mapped",[952]],[[120564,120564],"mapped",[963]],[[120565,120565],"mapped",[964]],[[120566,120566],"mapped",[965]],[[120567,120567],"mapped",[966]],[[120568,120568],"mapped",[967]],[[120569,120569],"mapped",[968]],[[120570,120570],"mapped",[969]],[[120571,120571],"mapped",[8711]],[[120572,120572],"mapped",[945]],[[120573,120573],"mapped",[946]],[[120574,120574],"mapped",[947]],[[120575,120575],"mapped",[948]],[[120576,120576],"mapped",[949]],[[120577,120577],"mapped",[950]],[[120578,120578],"mapped",[951]],[[120579,120579],"mapped",[952]],[[120580,120580],"mapped",[953]],[[120581,120581],"mapped",[954]],[[120582,120582],"mapped",[955]],[[120583,120583],"mapped",[956]],[[120584,120584],"mapped",[957]],[[120585,120585],"mapped",[958]],[[120586,120586],"mapped",[959]],[[120587,120587],"mapped",[960]],[[120588,120588],"mapped",[961]],[[120589,120590],"mapped",[963]],[[120591,120591],"mapped",[964]],[[120592,120592],"mapped",[965]],[[120593,120593],"mapped",[966]],[[120594,120594],"mapped",[967]],[[120595,120595],"mapped",[968]],[[120596,120596],"mapped",[969]],[[120597,120597],"mapped",[8706]],[[120598,120598],"mapped",[949]],[[120599,120599],"mapped",[952]],[[120600,120600],"mapped",[954]],[[120601,120601],"mapped",[966]],[[120602,120602],"mapped",[961]],[[120603,120603],"mapped",[960]],[[120604,120604],"mapped",[945]],[[120605,120605],"mapped",[946]],[[120606,120606],"mapped",[947]],[[120607,120607],"mapped",[948]],[[120608,120608],"mapped",[949]],[[120609,120609],"mapped",[950]],[[120610,120610],"mapped",[951]],[[120611,120611],"mapped",[952]],[[120612,120612],"mapped",[953]],[[120613,120613],"mapped",[954]],[[120614,120614],"mapped",[955]],[[120615,120615],"mapped",[956]],[[120616,120616],"mapped",[957]],[[120617,120617],"mapped",[958]],[[120618,120618],"mapped",[959]],[[120619,120619],"mapped",[960]],[[120620,120620],"mapped",[961]],[[120621,120621],"mapped",[952]],[[120622,120622],"mapped",[963]],[[120623,120623],"mapped",[964]],[[120624,120624],"mapped",[965]],[[120625,120625],"mapped",[966]],[[120626,120626],"mapped",[967]],[[120627,120627],"mapped",[968]],[[120628,120628],"mapped",[969]],[[120629,120629],"mapped",[8711]],[[120630,120630],"mapped",[945]],[[120631,120631],"mapped",[946]],[[120632,120632],"mapped",[947]],[[120633,120633],"mapped",[948]],[[120634,120634],"mapped",[949]],[[120635,120635],"mapped",[950]],[[120636,120636],"mapped",[951]],[[120637,120637],"mapped",[952]],[[120638,120638],"mapped",[953]],[[120639,120639],"mapped",[954]],[[120640,120640],"mapped",[955]],[[120641,120641],"mapped",[956]],[[120642,120642],"mapped",[957]],[[120643,120643],"mapped",[958]],[[120644,120644],"mapped",[959]],[[120645,120645],"mapped",[960]],[[120646,120646],"mapped",[961]],[[120647,120648],"mapped",[963]],[[120649,120649],"mapped",[964]],[[120650,120650],"mapped",[965]],[[120651,120651],"mapped",[966]],[[120652,120652],"mapped",[967]],[[120653,120653],"mapped",[968]],[[120654,120654],"mapped",[969]],[[120655,120655],"mapped",[8706]],[[120656,120656],"mapped",[949]],[[120657,120657],"mapped",[952]],[[120658,120658],"mapped",[954]],[[120659,120659],"mapped",[966]],[[120660,120660],"mapped",[961]],[[120661,120661],"mapped",[960]],[[120662,120662],"mapped",[945]],[[120663,120663],"mapped",[946]],[[120664,120664],"mapped",[947]],[[120665,120665],"mapped",[948]],[[120666,120666],"mapped",[949]],[[120667,120667],"mapped",[950]],[[120668,120668],"mapped",[951]],[[120669,120669],"mapped",[952]],[[120670,120670],"mapped",[953]],[[120671,120671],"mapped",[954]],[[120672,120672],"mapped",[955]],[[120673,120673],"mapped",[956]],[[120674,120674],"mapped",[957]],[[120675,120675],"mapped",[958]],[[120676,120676],"mapped",[959]],[[120677,120677],"mapped",[960]],[[120678,120678],"mapped",[961]],[[120679,120679],"mapped",[952]],[[120680,120680],"mapped",[963]],[[120681,120681],"mapped",[964]],[[120682,120682],"mapped",[965]],[[120683,120683],"mapped",[966]],[[120684,120684],"mapped",[967]],[[120685,120685],"mapped",[968]],[[120686,120686],"mapped",[969]],[[120687,120687],"mapped",[8711]],[[120688,120688],"mapped",[945]],[[120689,120689],"mapped",[946]],[[120690,120690],"mapped",[947]],[[120691,120691],"mapped",[948]],[[120692,120692],"mapped",[949]],[[120693,120693],"mapped",[950]],[[120694,120694],"mapped",[951]],[[120695,120695],"mapped",[952]],[[120696,120696],"mapped",[953]],[[120697,120697],"mapped",[954]],[[120698,120698],"mapped",[955]],[[120699,120699],"mapped",[956]],[[120700,120700],"mapped",[957]],[[120701,120701],"mapped",[958]],[[120702,120702],"mapped",[959]],[[120703,120703],"mapped",[960]],[[120704,120704],"mapped",[961]],[[120705,120706],"mapped",[963]],[[120707,120707],"mapped",[964]],[[120708,120708],"mapped",[965]],[[120709,120709],"mapped",[966]],[[120710,120710],"mapped",[967]],[[120711,120711],"mapped",[968]],[[120712,120712],"mapped",[969]],[[120713,120713],"mapped",[8706]],[[120714,120714],"mapped",[949]],[[120715,120715],"mapped",[952]],[[120716,120716],"mapped",[954]],[[120717,120717],"mapped",[966]],[[120718,120718],"mapped",[961]],[[120719,120719],"mapped",[960]],[[120720,120720],"mapped",[945]],[[120721,120721],"mapped",[946]],[[120722,120722],"mapped",[947]],[[120723,120723],"mapped",[948]],[[120724,120724],"mapped",[949]],[[120725,120725],"mapped",[950]],[[120726,120726],"mapped",[951]],[[120727,120727],"mapped",[952]],[[120728,120728],"mapped",[953]],[[120729,120729],"mapped",[954]],[[120730,120730],"mapped",[955]],[[120731,120731],"mapped",[956]],[[120732,120732],"mapped",[957]],[[120733,120733],"mapped",[958]],[[120734,120734],"mapped",[959]],[[120735,120735],"mapped",[960]],[[120736,120736],"mapped",[961]],[[120737,120737],"mapped",[952]],[[120738,120738],"mapped",[963]],[[120739,120739],"mapped",[964]],[[120740,120740],"mapped",[965]],[[120741,120741],"mapped",[966]],[[120742,120742],"mapped",[967]],[[120743,120743],"mapped",[968]],[[120744,120744],"mapped",[969]],[[120745,120745],"mapped",[8711]],[[120746,120746],"mapped",[945]],[[120747,120747],"mapped",[946]],[[120748,120748],"mapped",[947]],[[120749,120749],"mapped",[948]],[[120750,120750],"mapped",[949]],[[120751,120751],"mapped",[950]],[[120752,120752],"mapped",[951]],[[120753,120753],"mapped",[952]],[[120754,120754],"mapped",[953]],[[120755,120755],"mapped",[954]],[[120756,120756],"mapped",[955]],[[120757,120757],"mapped",[956]],[[120758,120758],"mapped",[957]],[[120759,120759],"mapped",[958]],[[120760,120760],"mapped",[959]],[[120761,120761],"mapped",[960]],[[120762,120762],"mapped",[961]],[[120763,120764],"mapped",[963]],[[120765,120765],"mapped",[964]],[[120766,120766],"mapped",[965]],[[120767,120767],"mapped",[966]],[[120768,120768],"mapped",[967]],[[120769,120769],"mapped",[968]],[[120770,120770],"mapped",[969]],[[120771,120771],"mapped",[8706]],[[120772,120772],"mapped",[949]],[[120773,120773],"mapped",[952]],[[120774,120774],"mapped",[954]],[[120775,120775],"mapped",[966]],[[120776,120776],"mapped",[961]],[[120777,120777],"mapped",[960]],[[120778,120779],"mapped",[989]],[[120780,120781],"disallowed"],[[120782,120782],"mapped",[48]],[[120783,120783],"mapped",[49]],[[120784,120784],"mapped",[50]],[[120785,120785],"mapped",[51]],[[120786,120786],"mapped",[52]],[[120787,120787],"mapped",[53]],[[120788,120788],"mapped",[54]],[[120789,120789],"mapped",[55]],[[120790,120790],"mapped",[56]],[[120791,120791],"mapped",[57]],[[120792,120792],"mapped",[48]],[[120793,120793],"mapped",[49]],[[120794,120794],"mapped",[50]],[[120795,120795],"mapped",[51]],[[120796,120796],"mapped",[52]],[[120797,120797],"mapped",[53]],[[120798,120798],"mapped",[54]],[[120799,120799],"mapped",[55]],[[120800,120800],"mapped",[56]],[[120801,120801],"mapped",[57]],[[120802,120802],"mapped",[48]],[[120803,120803],"mapped",[49]],[[120804,120804],"mapped",[50]],[[120805,120805],"mapped",[51]],[[120806,120806],"mapped",[52]],[[120807,120807],"mapped",[53]],[[120808,120808],"mapped",[54]],[[120809,120809],"mapped",[55]],[[120810,120810],"mapped",[56]],[[120811,120811],"mapped",[57]],[[120812,120812],"mapped",[48]],[[120813,120813],"mapped",[49]],[[120814,120814],"mapped",[50]],[[120815,120815],"mapped",[51]],[[120816,120816],"mapped",[52]],[[120817,120817],"mapped",[53]],[[120818,120818],"mapped",[54]],[[120819,120819],"mapped",[55]],[[120820,120820],"mapped",[56]],[[120821,120821],"mapped",[57]],[[120822,120822],"mapped",[48]],[[120823,120823],"mapped",[49]],[[120824,120824],"mapped",[50]],[[120825,120825],"mapped",[51]],[[120826,120826],"mapped",[52]],[[120827,120827],"mapped",[53]],[[120828,120828],"mapped",[54]],[[120829,120829],"mapped",[55]],[[120830,120830],"mapped",[56]],[[120831,120831],"mapped",[57]],[[120832,121343],"valid",[],"NV8"],[[121344,121398],"valid"],[[121399,121402],"valid",[],"NV8"],[[121403,121452],"valid"],[[121453,121460],"valid",[],"NV8"],[[121461,121461],"valid"],[[121462,121475],"valid",[],"NV8"],[[121476,121476],"valid"],[[121477,121483],"valid",[],"NV8"],[[121484,121498],"disallowed"],[[121499,121503],"valid"],[[121504,121504],"disallowed"],[[121505,121519],"valid"],[[121520,124927],"disallowed"],[[124928,125124],"valid"],[[125125,125126],"disallowed"],[[125127,125135],"valid",[],"NV8"],[[125136,125142],"valid"],[[125143,126463],"disallowed"],[[126464,126464],"mapped",[1575]],[[126465,126465],"mapped",[1576]],[[126466,126466],"mapped",[1580]],[[126467,126467],"mapped",[1583]],[[126468,126468],"disallowed"],[[126469,126469],"mapped",[1608]],[[126470,126470],"mapped",[1586]],[[126471,126471],"mapped",[1581]],[[126472,126472],"mapped",[1591]],[[126473,126473],"mapped",[1610]],[[126474,126474],"mapped",[1603]],[[126475,126475],"mapped",[1604]],[[126476,126476],"mapped",[1605]],[[126477,126477],"mapped",[1606]],[[126478,126478],"mapped",[1587]],[[126479,126479],"mapped",[1593]],[[126480,126480],"mapped",[1601]],[[126481,126481],"mapped",[1589]],[[126482,126482],"mapped",[1602]],[[126483,126483],"mapped",[1585]],[[126484,126484],"mapped",[1588]],[[126485,126485],"mapped",[1578]],[[126486,126486],"mapped",[1579]],[[126487,126487],"mapped",[1582]],[[126488,126488],"mapped",[1584]],[[126489,126489],"mapped",[1590]],[[126490,126490],"mapped",[1592]],[[126491,126491],"mapped",[1594]],[[126492,126492],"mapped",[1646]],[[126493,126493],"mapped",[1722]],[[126494,126494],"mapped",[1697]],[[126495,126495],"mapped",[1647]],[[126496,126496],"disallowed"],[[126497,126497],"mapped",[1576]],[[126498,126498],"mapped",[1580]],[[126499,126499],"disallowed"],[[126500,126500],"mapped",[1607]],[[126501,126502],"disallowed"],[[126503,126503],"mapped",[1581]],[[126504,126504],"disallowed"],[[126505,126505],"mapped",[1610]],[[126506,126506],"mapped",[1603]],[[126507,126507],"mapped",[1604]],[[126508,126508],"mapped",[1605]],[[126509,126509],"mapped",[1606]],[[126510,126510],"mapped",[1587]],[[126511,126511],"mapped",[1593]],[[126512,126512],"mapped",[1601]],[[126513,126513],"mapped",[1589]],[[126514,126514],"mapped",[1602]],[[126515,126515],"disallowed"],[[126516,126516],"mapped",[1588]],[[126517,126517],"mapped",[1578]],[[126518,126518],"mapped",[1579]],[[126519,126519],"mapped",[1582]],[[126520,126520],"disallowed"],[[126521,126521],"mapped",[1590]],[[126522,126522],"disallowed"],[[126523,126523],"mapped",[1594]],[[126524,126529],"disallowed"],[[126530,126530],"mapped",[1580]],[[126531,126534],"disallowed"],[[126535,126535],"mapped",[1581]],[[126536,126536],"disallowed"],[[126537,126537],"mapped",[1610]],[[126538,126538],"disallowed"],[[126539,126539],"mapped",[1604]],[[126540,126540],"disallowed"],[[126541,126541],"mapped",[1606]],[[126542,126542],"mapped",[1587]],[[126543,126543],"mapped",[1593]],[[126544,126544],"disallowed"],[[126545,126545],"mapped",[1589]],[[126546,126546],"mapped",[1602]],[[126547,126547],"disallowed"],[[126548,126548],"mapped",[1588]],[[126549,126550],"disallowed"],[[126551,126551],"mapped",[1582]],[[126552,126552],"disallowed"],[[126553,126553],"mapped",[1590]],[[126554,126554],"disallowed"],[[126555,126555],"mapped",[1594]],[[126556,126556],"disallowed"],[[126557,126557],"mapped",[1722]],[[126558,126558],"disallowed"],[[126559,126559],"mapped",[1647]],[[126560,126560],"disallowed"],[[126561,126561],"mapped",[1576]],[[126562,126562],"mapped",[1580]],[[126563,126563],"disallowed"],[[126564,126564],"mapped",[1607]],[[126565,126566],"disallowed"],[[126567,126567],"mapped",[1581]],[[126568,126568],"mapped",[1591]],[[126569,126569],"mapped",[1610]],[[126570,126570],"mapped",[1603]],[[126571,126571],"disallowed"],[[126572,126572],"mapped",[1605]],[[126573,126573],"mapped",[1606]],[[126574,126574],"mapped",[1587]],[[126575,126575],"mapped",[1593]],[[126576,126576],"mapped",[1601]],[[126577,126577],"mapped",[1589]],[[126578,126578],"mapped",[1602]],[[126579,126579],"disallowed"],[[126580,126580],"mapped",[1588]],[[126581,126581],"mapped",[1578]],[[126582,126582],"mapped",[1579]],[[126583,126583],"mapped",[1582]],[[126584,126584],"disallowed"],[[126585,126585],"mapped",[1590]],[[126586,126586],"mapped",[1592]],[[126587,126587],"mapped",[1594]],[[126588,126588],"mapped",[1646]],[[126589,126589],"disallowed"],[[126590,126590],"mapped",[1697]],[[126591,126591],"disallowed"],[[126592,126592],"mapped",[1575]],[[126593,126593],"mapped",[1576]],[[126594,126594],"mapped",[1580]],[[126595,126595],"mapped",[1583]],[[126596,126596],"mapped",[1607]],[[126597,126597],"mapped",[1608]],[[126598,126598],"mapped",[1586]],[[126599,126599],"mapped",[1581]],[[126600,126600],"mapped",[1591]],[[126601,126601],"mapped",[1610]],[[126602,126602],"disallowed"],[[126603,126603],"mapped",[1604]],[[126604,126604],"mapped",[1605]],[[126605,126605],"mapped",[1606]],[[126606,126606],"mapped",[1587]],[[126607,126607],"mapped",[1593]],[[126608,126608],"mapped",[1601]],[[126609,126609],"mapped",[1589]],[[126610,126610],"mapped",[1602]],[[126611,126611],"mapped",[1585]],[[126612,126612],"mapped",[1588]],[[126613,126613],"mapped",[1578]],[[126614,126614],"mapped",[1579]],[[126615,126615],"mapped",[1582]],[[126616,126616],"mapped",[1584]],[[126617,126617],"mapped",[1590]],[[126618,126618],"mapped",[1592]],[[126619,126619],"mapped",[1594]],[[126620,126624],"disallowed"],[[126625,126625],"mapped",[1576]],[[126626,126626],"mapped",[1580]],[[126627,126627],"mapped",[1583]],[[126628,126628],"disallowed"],[[126629,126629],"mapped",[1608]],[[126630,126630],"mapped",[1586]],[[126631,126631],"mapped",[1581]],[[126632,126632],"mapped",[1591]],[[126633,126633],"mapped",[1610]],[[126634,126634],"disallowed"],[[126635,126635],"mapped",[1604]],[[126636,126636],"mapped",[1605]],[[126637,126637],"mapped",[1606]],[[126638,126638],"mapped",[1587]],[[126639,126639],"mapped",[1593]],[[126640,126640],"mapped",[1601]],[[126641,126641],"mapped",[1589]],[[126642,126642],"mapped",[1602]],[[126643,126643],"mapped",[1585]],[[126644,126644],"mapped",[1588]],[[126645,126645],"mapped",[1578]],[[126646,126646],"mapped",[1579]],[[126647,126647],"mapped",[1582]],[[126648,126648],"mapped",[1584]],[[126649,126649],"mapped",[1590]],[[126650,126650],"mapped",[1592]],[[126651,126651],"mapped",[1594]],[[126652,126703],"disallowed"],[[126704,126705],"valid",[],"NV8"],[[126706,126975],"disallowed"],[[126976,127019],"valid",[],"NV8"],[[127020,127023],"disallowed"],[[127024,127123],"valid",[],"NV8"],[[127124,127135],"disallowed"],[[127136,127150],"valid",[],"NV8"],[[127151,127152],"disallowed"],[[127153,127166],"valid",[],"NV8"],[[127167,127167],"valid",[],"NV8"],[[127168,127168],"disallowed"],[[127169,127183],"valid",[],"NV8"],[[127184,127184],"disallowed"],[[127185,127199],"valid",[],"NV8"],[[127200,127221],"valid",[],"NV8"],[[127222,127231],"disallowed"],[[127232,127232],"disallowed"],[[127233,127233],"disallowed_STD3_mapped",[48,44]],[[127234,127234],"disallowed_STD3_mapped",[49,44]],[[127235,127235],"disallowed_STD3_mapped",[50,44]],[[127236,127236],"disallowed_STD3_mapped",[51,44]],[[127237,127237],"disallowed_STD3_mapped",[52,44]],[[127238,127238],"disallowed_STD3_mapped",[53,44]],[[127239,127239],"disallowed_STD3_mapped",[54,44]],[[127240,127240],"disallowed_STD3_mapped",[55,44]],[[127241,127241],"disallowed_STD3_mapped",[56,44]],[[127242,127242],"disallowed_STD3_mapped",[57,44]],[[127243,127244],"valid",[],"NV8"],[[127245,127247],"disallowed"],[[127248,127248],"disallowed_STD3_mapped",[40,97,41]],[[127249,127249],"disallowed_STD3_mapped",[40,98,41]],[[127250,127250],"disallowed_STD3_mapped",[40,99,41]],[[127251,127251],"disallowed_STD3_mapped",[40,100,41]],[[127252,127252],"disallowed_STD3_mapped",[40,101,41]],[[127253,127253],"disallowed_STD3_mapped",[40,102,41]],[[127254,127254],"disallowed_STD3_mapped",[40,103,41]],[[127255,127255],"disallowed_STD3_mapped",[40,104,41]],[[127256,127256],"disallowed_STD3_mapped",[40,105,41]],[[127257,127257],"disallowed_STD3_mapped",[40,106,41]],[[127258,127258],"disallowed_STD3_mapped",[40,107,41]],[[127259,127259],"disallowed_STD3_mapped",[40,108,41]],[[127260,127260],"disallowed_STD3_mapped",[40,109,41]],[[127261,127261],"disallowed_STD3_mapped",[40,110,41]],[[127262,127262],"disallowed_STD3_mapped",[40,111,41]],[[127263,127263],"disallowed_STD3_mapped",[40,112,41]],[[127264,127264],"disallowed_STD3_mapped",[40,113,41]],[[127265,127265],"disallowed_STD3_mapped",[40,114,41]],[[127266,127266],"disallowed_STD3_mapped",[40,115,41]],[[127267,127267],"disallowed_STD3_mapped",[40,116,41]],[[127268,127268],"disallowed_STD3_mapped",[40,117,41]],[[127269,127269],"disallowed_STD3_mapped",[40,118,41]],[[127270,127270],"disallowed_STD3_mapped",[40,119,41]],[[127271,127271],"disallowed_STD3_mapped",[40,120,41]],[[127272,127272],"disallowed_STD3_mapped",[40,121,41]],[[127273,127273],"disallowed_STD3_mapped",[40,122,41]],[[127274,127274],"mapped",[12308,115,12309]],[[127275,127275],"mapped",[99]],[[127276,127276],"mapped",[114]],[[127277,127277],"mapped",[99,100]],[[127278,127278],"mapped",[119,122]],[[127279,127279],"disallowed"],[[127280,127280],"mapped",[97]],[[127281,127281],"mapped",[98]],[[127282,127282],"mapped",[99]],[[127283,127283],"mapped",[100]],[[127284,127284],"mapped",[101]],[[127285,127285],"mapped",[102]],[[127286,127286],"mapped",[103]],[[127287,127287],"mapped",[104]],[[127288,127288],"mapped",[105]],[[127289,127289],"mapped",[106]],[[127290,127290],"mapped",[107]],[[127291,127291],"mapped",[108]],[[127292,127292],"mapped",[109]],[[127293,127293],"mapped",[110]],[[127294,127294],"mapped",[111]],[[127295,127295],"mapped",[112]],[[127296,127296],"mapped",[113]],[[127297,127297],"mapped",[114]],[[127298,127298],"mapped",[115]],[[127299,127299],"mapped",[116]],[[127300,127300],"mapped",[117]],[[127301,127301],"mapped",[118]],[[127302,127302],"mapped",[119]],[[127303,127303],"mapped",[120]],[[127304,127304],"mapped",[121]],[[127305,127305],"mapped",[122]],[[127306,127306],"mapped",[104,118]],[[127307,127307],"mapped",[109,118]],[[127308,127308],"mapped",[115,100]],[[127309,127309],"mapped",[115,115]],[[127310,127310],"mapped",[112,112,118]],[[127311,127311],"mapped",[119,99]],[[127312,127318],"valid",[],"NV8"],[[127319,127319],"valid",[],"NV8"],[[127320,127326],"valid",[],"NV8"],[[127327,127327],"valid",[],"NV8"],[[127328,127337],"valid",[],"NV8"],[[127338,127338],"mapped",[109,99]],[[127339,127339],"mapped",[109,100]],[[127340,127343],"disallowed"],[[127344,127352],"valid",[],"NV8"],[[127353,127353],"valid",[],"NV8"],[[127354,127354],"valid",[],"NV8"],[[127355,127356],"valid",[],"NV8"],[[127357,127358],"valid",[],"NV8"],[[127359,127359],"valid",[],"NV8"],[[127360,127369],"valid",[],"NV8"],[[127370,127373],"valid",[],"NV8"],[[127374,127375],"valid",[],"NV8"],[[127376,127376],"mapped",[100,106]],[[127377,127386],"valid",[],"NV8"],[[127387,127461],"disallowed"],[[127462,127487],"valid",[],"NV8"],[[127488,127488],"mapped",[12411,12363]],[[127489,127489],"mapped",[12467,12467]],[[127490,127490],"mapped",[12469]],[[127491,127503],"disallowed"],[[127504,127504],"mapped",[25163]],[[127505,127505],"mapped",[23383]],[[127506,127506],"mapped",[21452]],[[127507,127507],"mapped",[12487]],[[127508,127508],"mapped",[20108]],[[127509,127509],"mapped",[22810]],[[127510,127510],"mapped",[35299]],[[127511,127511],"mapped",[22825]],[[127512,127512],"mapped",[20132]],[[127513,127513],"mapped",[26144]],[[127514,127514],"mapped",[28961]],[[127515,127515],"mapped",[26009]],[[127516,127516],"mapped",[21069]],[[127517,127517],"mapped",[24460]],[[127518,127518],"mapped",[20877]],[[127519,127519],"mapped",[26032]],[[127520,127520],"mapped",[21021]],[[127521,127521],"mapped",[32066]],[[127522,127522],"mapped",[29983]],[[127523,127523],"mapped",[36009]],[[127524,127524],"mapped",[22768]],[[127525,127525],"mapped",[21561]],[[127526,127526],"mapped",[28436]],[[127527,127527],"mapped",[25237]],[[127528,127528],"mapped",[25429]],[[127529,127529],"mapped",[19968]],[[127530,127530],"mapped",[19977]],[[127531,127531],"mapped",[36938]],[[127532,127532],"mapped",[24038]],[[127533,127533],"mapped",[20013]],[[127534,127534],"mapped",[21491]],[[127535,127535],"mapped",[25351]],[[127536,127536],"mapped",[36208]],[[127537,127537],"mapped",[25171]],[[127538,127538],"mapped",[31105]],[[127539,127539],"mapped",[31354]],[[127540,127540],"mapped",[21512]],[[127541,127541],"mapped",[28288]],[[127542,127542],"mapped",[26377]],[[127543,127543],"mapped",[26376]],[[127544,127544],"mapped",[30003]],[[127545,127545],"mapped",[21106]],[[127546,127546],"mapped",[21942]],[[127547,127551],"disallowed"],[[127552,127552],"mapped",[12308,26412,12309]],[[127553,127553],"mapped",[12308,19977,12309]],[[127554,127554],"mapped",[12308,20108,12309]],[[127555,127555],"mapped",[12308,23433,12309]],[[127556,127556],"mapped",[12308,28857,12309]],[[127557,127557],"mapped",[12308,25171,12309]],[[127558,127558],"mapped",[12308,30423,12309]],[[127559,127559],"mapped",[12308,21213,12309]],[[127560,127560],"mapped",[12308,25943,12309]],[[127561,127567],"disallowed"],[[127568,127568],"mapped",[24471]],[[127569,127569],"mapped",[21487]],[[127570,127743],"disallowed"],[[127744,127776],"valid",[],"NV8"],[[127777,127788],"valid",[],"NV8"],[[127789,127791],"valid",[],"NV8"],[[127792,127797],"valid",[],"NV8"],[[127798,127798],"valid",[],"NV8"],[[127799,127868],"valid",[],"NV8"],[[127869,127869],"valid",[],"NV8"],[[127870,127871],"valid",[],"NV8"],[[127872,127891],"valid",[],"NV8"],[[127892,127903],"valid",[],"NV8"],[[127904,127940],"valid",[],"NV8"],[[127941,127941],"valid",[],"NV8"],[[127942,127946],"valid",[],"NV8"],[[127947,127950],"valid",[],"NV8"],[[127951,127955],"valid",[],"NV8"],[[127956,127967],"valid",[],"NV8"],[[127968,127984],"valid",[],"NV8"],[[127985,127991],"valid",[],"NV8"],[[127992,127999],"valid",[],"NV8"],[[128000,128062],"valid",[],"NV8"],[[128063,128063],"valid",[],"NV8"],[[128064,128064],"valid",[],"NV8"],[[128065,128065],"valid",[],"NV8"],[[128066,128247],"valid",[],"NV8"],[[128248,128248],"valid",[],"NV8"],[[128249,128252],"valid",[],"NV8"],[[128253,128254],"valid",[],"NV8"],[[128255,128255],"valid",[],"NV8"],[[128256,128317],"valid",[],"NV8"],[[128318,128319],"valid",[],"NV8"],[[128320,128323],"valid",[],"NV8"],[[128324,128330],"valid",[],"NV8"],[[128331,128335],"valid",[],"NV8"],[[128336,128359],"valid",[],"NV8"],[[128360,128377],"valid",[],"NV8"],[[128378,128378],"disallowed"],[[128379,128419],"valid",[],"NV8"],[[128420,128420],"disallowed"],[[128421,128506],"valid",[],"NV8"],[[128507,128511],"valid",[],"NV8"],[[128512,128512],"valid",[],"NV8"],[[128513,128528],"valid",[],"NV8"],[[128529,128529],"valid",[],"NV8"],[[128530,128532],"valid",[],"NV8"],[[128533,128533],"valid",[],"NV8"],[[128534,128534],"valid",[],"NV8"],[[128535,128535],"valid",[],"NV8"],[[128536,128536],"valid",[],"NV8"],[[128537,128537],"valid",[],"NV8"],[[128538,128538],"valid",[],"NV8"],[[128539,128539],"valid",[],"NV8"],[[128540,128542],"valid",[],"NV8"],[[128543,128543],"valid",[],"NV8"],[[128544,128549],"valid",[],"NV8"],[[128550,128551],"valid",[],"NV8"],[[128552,128555],"valid",[],"NV8"],[[128556,128556],"valid",[],"NV8"],[[128557,128557],"valid",[],"NV8"],[[128558,128559],"valid",[],"NV8"],[[128560,128563],"valid",[],"NV8"],[[128564,128564],"valid",[],"NV8"],[[128565,128576],"valid",[],"NV8"],[[128577,128578],"valid",[],"NV8"],[[128579,128580],"valid",[],"NV8"],[[128581,128591],"valid",[],"NV8"],[[128592,128639],"valid",[],"NV8"],[[128640,128709],"valid",[],"NV8"],[[128710,128719],"valid",[],"NV8"],[[128720,128720],"valid",[],"NV8"],[[128721,128735],"disallowed"],[[128736,128748],"valid",[],"NV8"],[[128749,128751],"disallowed"],[[128752,128755],"valid",[],"NV8"],[[128756,128767],"disallowed"],[[128768,128883],"valid",[],"NV8"],[[128884,128895],"disallowed"],[[128896,128980],"valid",[],"NV8"],[[128981,129023],"disallowed"],[[129024,129035],"valid",[],"NV8"],[[129036,129039],"disallowed"],[[129040,129095],"valid",[],"NV8"],[[129096,129103],"disallowed"],[[129104,129113],"valid",[],"NV8"],[[129114,129119],"disallowed"],[[129120,129159],"valid",[],"NV8"],[[129160,129167],"disallowed"],[[129168,129197],"valid",[],"NV8"],[[129198,129295],"disallowed"],[[129296,129304],"valid",[],"NV8"],[[129305,129407],"disallowed"],[[129408,129412],"valid",[],"NV8"],[[129413,129471],"disallowed"],[[129472,129472],"valid",[],"NV8"],[[129473,131069],"disallowed"],[[131070,131071],"disallowed"],[[131072,173782],"valid"],[[173783,173823],"disallowed"],[[173824,177972],"valid"],[[177973,177983],"disallowed"],[[177984,178205],"valid"],[[178206,178207],"disallowed"],[[178208,183969],"valid"],[[183970,194559],"disallowed"],[[194560,194560],"mapped",[20029]],[[194561,194561],"mapped",[20024]],[[194562,194562],"mapped",[20033]],[[194563,194563],"mapped",[131362]],[[194564,194564],"mapped",[20320]],[[194565,194565],"mapped",[20398]],[[194566,194566],"mapped",[20411]],[[194567,194567],"mapped",[20482]],[[194568,194568],"mapped",[20602]],[[194569,194569],"mapped",[20633]],[[194570,194570],"mapped",[20711]],[[194571,194571],"mapped",[20687]],[[194572,194572],"mapped",[13470]],[[194573,194573],"mapped",[132666]],[[194574,194574],"mapped",[20813]],[[194575,194575],"mapped",[20820]],[[194576,194576],"mapped",[20836]],[[194577,194577],"mapped",[20855]],[[194578,194578],"mapped",[132380]],[[194579,194579],"mapped",[13497]],[[194580,194580],"mapped",[20839]],[[194581,194581],"mapped",[20877]],[[194582,194582],"mapped",[132427]],[[194583,194583],"mapped",[20887]],[[194584,194584],"mapped",[20900]],[[194585,194585],"mapped",[20172]],[[194586,194586],"mapped",[20908]],[[194587,194587],"mapped",[20917]],[[194588,194588],"mapped",[168415]],[[194589,194589],"mapped",[20981]],[[194590,194590],"mapped",[20995]],[[194591,194591],"mapped",[13535]],[[194592,194592],"mapped",[21051]],[[194593,194593],"mapped",[21062]],[[194594,194594],"mapped",[21106]],[[194595,194595],"mapped",[21111]],[[194596,194596],"mapped",[13589]],[[194597,194597],"mapped",[21191]],[[194598,194598],"mapped",[21193]],[[194599,194599],"mapped",[21220]],[[194600,194600],"mapped",[21242]],[[194601,194601],"mapped",[21253]],[[194602,194602],"mapped",[21254]],[[194603,194603],"mapped",[21271]],[[194604,194604],"mapped",[21321]],[[194605,194605],"mapped",[21329]],[[194606,194606],"mapped",[21338]],[[194607,194607],"mapped",[21363]],[[194608,194608],"mapped",[21373]],[[194609,194611],"mapped",[21375]],[[194612,194612],"mapped",[133676]],[[194613,194613],"mapped",[28784]],[[194614,194614],"mapped",[21450]],[[194615,194615],"mapped",[21471]],[[194616,194616],"mapped",[133987]],[[194617,194617],"mapped",[21483]],[[194618,194618],"mapped",[21489]],[[194619,194619],"mapped",[21510]],[[194620,194620],"mapped",[21662]],[[194621,194621],"mapped",[21560]],[[194622,194622],"mapped",[21576]],[[194623,194623],"mapped",[21608]],[[194624,194624],"mapped",[21666]],[[194625,194625],"mapped",[21750]],[[194626,194626],"mapped",[21776]],[[194627,194627],"mapped",[21843]],[[194628,194628],"mapped",[21859]],[[194629,194630],"mapped",[21892]],[[194631,194631],"mapped",[21913]],[[194632,194632],"mapped",[21931]],[[194633,194633],"mapped",[21939]],[[194634,194634],"mapped",[21954]],[[194635,194635],"mapped",[22294]],[[194636,194636],"mapped",[22022]],[[194637,194637],"mapped",[22295]],[[194638,194638],"mapped",[22097]],[[194639,194639],"mapped",[22132]],[[194640,194640],"mapped",[20999]],[[194641,194641],"mapped",[22766]],[[194642,194642],"mapped",[22478]],[[194643,194643],"mapped",[22516]],[[194644,194644],"mapped",[22541]],[[194645,194645],"mapped",[22411]],[[194646,194646],"mapped",[22578]],[[194647,194647],"mapped",[22577]],[[194648,194648],"mapped",[22700]],[[194649,194649],"mapped",[136420]],[[194650,194650],"mapped",[22770]],[[194651,194651],"mapped",[22775]],[[194652,194652],"mapped",[22790]],[[194653,194653],"mapped",[22810]],[[194654,194654],"mapped",[22818]],[[194655,194655],"mapped",[22882]],[[194656,194656],"mapped",[136872]],[[194657,194657],"mapped",[136938]],[[194658,194658],"mapped",[23020]],[[194659,194659],"mapped",[23067]],[[194660,194660],"mapped",[23079]],[[194661,194661],"mapped",[23000]],[[194662,194662],"mapped",[23142]],[[194663,194663],"mapped",[14062]],[[194664,194664],"disallowed"],[[194665,194665],"mapped",[23304]],[[194666,194667],"mapped",[23358]],[[194668,194668],"mapped",[137672]],[[194669,194669],"mapped",[23491]],[[194670,194670],"mapped",[23512]],[[194671,194671],"mapped",[23527]],[[194672,194672],"mapped",[23539]],[[194673,194673],"mapped",[138008]],[[194674,194674],"mapped",[23551]],[[194675,194675],"mapped",[23558]],[[194676,194676],"disallowed"],[[194677,194677],"mapped",[23586]],[[194678,194678],"mapped",[14209]],[[194679,194679],"mapped",[23648]],[[194680,194680],"mapped",[23662]],[[194681,194681],"mapped",[23744]],[[194682,194682],"mapped",[23693]],[[194683,194683],"mapped",[138724]],[[194684,194684],"mapped",[23875]],[[194685,194685],"mapped",[138726]],[[194686,194686],"mapped",[23918]],[[194687,194687],"mapped",[23915]],[[194688,194688],"mapped",[23932]],[[194689,194689],"mapped",[24033]],[[194690,194690],"mapped",[24034]],[[194691,194691],"mapped",[14383]],[[194692,194692],"mapped",[24061]],[[194693,194693],"mapped",[24104]],[[194694,194694],"mapped",[24125]],[[194695,194695],"mapped",[24169]],[[194696,194696],"mapped",[14434]],[[194697,194697],"mapped",[139651]],[[194698,194698],"mapped",[14460]],[[194699,194699],"mapped",[24240]],[[194700,194700],"mapped",[24243]],[[194701,194701],"mapped",[24246]],[[194702,194702],"mapped",[24266]],[[194703,194703],"mapped",[172946]],[[194704,194704],"mapped",[24318]],[[194705,194706],"mapped",[140081]],[[194707,194707],"mapped",[33281]],[[194708,194709],"mapped",[24354]],[[194710,194710],"mapped",[14535]],[[194711,194711],"mapped",[144056]],[[194712,194712],"mapped",[156122]],[[194713,194713],"mapped",[24418]],[[194714,194714],"mapped",[24427]],[[194715,194715],"mapped",[14563]],[[194716,194716],"mapped",[24474]],[[194717,194717],"mapped",[24525]],[[194718,194718],"mapped",[24535]],[[194719,194719],"mapped",[24569]],[[194720,194720],"mapped",[24705]],[[194721,194721],"mapped",[14650]],[[194722,194722],"mapped",[14620]],[[194723,194723],"mapped",[24724]],[[194724,194724],"mapped",[141012]],[[194725,194725],"mapped",[24775]],[[194726,194726],"mapped",[24904]],[[194727,194727],"mapped",[24908]],[[194728,194728],"mapped",[24910]],[[194729,194729],"mapped",[24908]],[[194730,194730],"mapped",[24954]],[[194731,194731],"mapped",[24974]],[[194732,194732],"mapped",[25010]],[[194733,194733],"mapped",[24996]],[[194734,194734],"mapped",[25007]],[[194735,194735],"mapped",[25054]],[[194736,194736],"mapped",[25074]],[[194737,194737],"mapped",[25078]],[[194738,194738],"mapped",[25104]],[[194739,194739],"mapped",[25115]],[[194740,194740],"mapped",[25181]],[[194741,194741],"mapped",[25265]],[[194742,194742],"mapped",[25300]],[[194743,194743],"mapped",[25424]],[[194744,194744],"mapped",[142092]],[[194745,194745],"mapped",[25405]],[[194746,194746],"mapped",[25340]],[[194747,194747],"mapped",[25448]],[[194748,194748],"mapped",[25475]],[[194749,194749],"mapped",[25572]],[[194750,194750],"mapped",[142321]],[[194751,194751],"mapped",[25634]],[[194752,194752],"mapped",[25541]],[[194753,194753],"mapped",[25513]],[[194754,194754],"mapped",[14894]],[[194755,194755],"mapped",[25705]],[[194756,194756],"mapped",[25726]],[[194757,194757],"mapped",[25757]],[[194758,194758],"mapped",[25719]],[[194759,194759],"mapped",[14956]],[[194760,194760],"mapped",[25935]],[[194761,194761],"mapped",[25964]],[[194762,194762],"mapped",[143370]],[[194763,194763],"mapped",[26083]],[[194764,194764],"mapped",[26360]],[[194765,194765],"mapped",[26185]],[[194766,194766],"mapped",[15129]],[[194767,194767],"mapped",[26257]],[[194768,194768],"mapped",[15112]],[[194769,194769],"mapped",[15076]],[[194770,194770],"mapped",[20882]],[[194771,194771],"mapped",[20885]],[[194772,194772],"mapped",[26368]],[[194773,194773],"mapped",[26268]],[[194774,194774],"mapped",[32941]],[[194775,194775],"mapped",[17369]],[[194776,194776],"mapped",[26391]],[[194777,194777],"mapped",[26395]],[[194778,194778],"mapped",[26401]],[[194779,194779],"mapped",[26462]],[[194780,194780],"mapped",[26451]],[[194781,194781],"mapped",[144323]],[[194782,194782],"mapped",[15177]],[[194783,194783],"mapped",[26618]],[[194784,194784],"mapped",[26501]],[[194785,194785],"mapped",[26706]],[[194786,194786],"mapped",[26757]],[[194787,194787],"mapped",[144493]],[[194788,194788],"mapped",[26766]],[[194789,194789],"mapped",[26655]],[[194790,194790],"mapped",[26900]],[[194791,194791],"mapped",[15261]],[[194792,194792],"mapped",[26946]],[[194793,194793],"mapped",[27043]],[[194794,194794],"mapped",[27114]],[[194795,194795],"mapped",[27304]],[[194796,194796],"mapped",[145059]],[[194797,194797],"mapped",[27355]],[[194798,194798],"mapped",[15384]],[[194799,194799],"mapped",[27425]],[[194800,194800],"mapped",[145575]],[[194801,194801],"mapped",[27476]],[[194802,194802],"mapped",[15438]],[[194803,194803],"mapped",[27506]],[[194804,194804],"mapped",[27551]],[[194805,194805],"mapped",[27578]],[[194806,194806],"mapped",[27579]],[[194807,194807],"mapped",[146061]],[[194808,194808],"mapped",[138507]],[[194809,194809],"mapped",[146170]],[[194810,194810],"mapped",[27726]],[[194811,194811],"mapped",[146620]],[[194812,194812],"mapped",[27839]],[[194813,194813],"mapped",[27853]],[[194814,194814],"mapped",[27751]],[[194815,194815],"mapped",[27926]],[[194816,194816],"mapped",[27966]],[[194817,194817],"mapped",[28023]],[[194818,194818],"mapped",[27969]],[[194819,194819],"mapped",[28009]],[[194820,194820],"mapped",[28024]],[[194821,194821],"mapped",[28037]],[[194822,194822],"mapped",[146718]],[[194823,194823],"mapped",[27956]],[[194824,194824],"mapped",[28207]],[[194825,194825],"mapped",[28270]],[[194826,194826],"mapped",[15667]],[[194827,194827],"mapped",[28363]],[[194828,194828],"mapped",[28359]],[[194829,194829],"mapped",[147153]],[[194830,194830],"mapped",[28153]],[[194831,194831],"mapped",[28526]],[[194832,194832],"mapped",[147294]],[[194833,194833],"mapped",[147342]],[[194834,194834],"mapped",[28614]],[[194835,194835],"mapped",[28729]],[[194836,194836],"mapped",[28702]],[[194837,194837],"mapped",[28699]],[[194838,194838],"mapped",[15766]],[[194839,194839],"mapped",[28746]],[[194840,194840],"mapped",[28797]],[[194841,194841],"mapped",[28791]],[[194842,194842],"mapped",[28845]],[[194843,194843],"mapped",[132389]],[[194844,194844],"mapped",[28997]],[[194845,194845],"mapped",[148067]],[[194846,194846],"mapped",[29084]],[[194847,194847],"disallowed"],[[194848,194848],"mapped",[29224]],[[194849,194849],"mapped",[29237]],[[194850,194850],"mapped",[29264]],[[194851,194851],"mapped",[149000]],[[194852,194852],"mapped",[29312]],[[194853,194853],"mapped",[29333]],[[194854,194854],"mapped",[149301]],[[194855,194855],"mapped",[149524]],[[194856,194856],"mapped",[29562]],[[194857,194857],"mapped",[29579]],[[194858,194858],"mapped",[16044]],[[194859,194859],"mapped",[29605]],[[194860,194861],"mapped",[16056]],[[194862,194862],"mapped",[29767]],[[194863,194863],"mapped",[29788]],[[194864,194864],"mapped",[29809]],[[194865,194865],"mapped",[29829]],[[194866,194866],"mapped",[29898]],[[194867,194867],"mapped",[16155]],[[194868,194868],"mapped",[29988]],[[194869,194869],"mapped",[150582]],[[194870,194870],"mapped",[30014]],[[194871,194871],"mapped",[150674]],[[194872,194872],"mapped",[30064]],[[194873,194873],"mapped",[139679]],[[194874,194874],"mapped",[30224]],[[194875,194875],"mapped",[151457]],[[194876,194876],"mapped",[151480]],[[194877,194877],"mapped",[151620]],[[194878,194878],"mapped",[16380]],[[194879,194879],"mapped",[16392]],[[194880,194880],"mapped",[30452]],[[194881,194881],"mapped",[151795]],[[194882,194882],"mapped",[151794]],[[194883,194883],"mapped",[151833]],[[194884,194884],"mapped",[151859]],[[194885,194885],"mapped",[30494]],[[194886,194887],"mapped",[30495]],[[194888,194888],"mapped",[30538]],[[194889,194889],"mapped",[16441]],[[194890,194890],"mapped",[30603]],[[194891,194891],"mapped",[16454]],[[194892,194892],"mapped",[16534]],[[194893,194893],"mapped",[152605]],[[194894,194894],"mapped",[30798]],[[194895,194895],"mapped",[30860]],[[194896,194896],"mapped",[30924]],[[194897,194897],"mapped",[16611]],[[194898,194898],"mapped",[153126]],[[194899,194899],"mapped",[31062]],[[194900,194900],"mapped",[153242]],[[194901,194901],"mapped",[153285]],[[194902,194902],"mapped",[31119]],[[194903,194903],"mapped",[31211]],[[194904,194904],"mapped",[16687]],[[194905,194905],"mapped",[31296]],[[194906,194906],"mapped",[31306]],[[194907,194907],"mapped",[31311]],[[194908,194908],"mapped",[153980]],[[194909,194910],"mapped",[154279]],[[194911,194911],"disallowed"],[[194912,194912],"mapped",[16898]],[[194913,194913],"mapped",[154539]],[[194914,194914],"mapped",[31686]],[[194915,194915],"mapped",[31689]],[[194916,194916],"mapped",[16935]],[[194917,194917],"mapped",[154752]],[[194918,194918],"mapped",[31954]],[[194919,194919],"mapped",[17056]],[[194920,194920],"mapped",[31976]],[[194921,194921],"mapped",[31971]],[[194922,194922],"mapped",[32000]],[[194923,194923],"mapped",[155526]],[[194924,194924],"mapped",[32099]],[[194925,194925],"mapped",[17153]],[[194926,194926],"mapped",[32199]],[[194927,194927],"mapped",[32258]],[[194928,194928],"mapped",[32325]],[[194929,194929],"mapped",[17204]],[[194930,194930],"mapped",[156200]],[[194931,194931],"mapped",[156231]],[[194932,194932],"mapped",[17241]],[[194933,194933],"mapped",[156377]],[[194934,194934],"mapped",[32634]],[[194935,194935],"mapped",[156478]],[[194936,194936],"mapped",[32661]],[[194937,194937],"mapped",[32762]],[[194938,194938],"mapped",[32773]],[[194939,194939],"mapped",[156890]],[[194940,194940],"mapped",[156963]],[[194941,194941],"mapped",[32864]],[[194942,194942],"mapped",[157096]],[[194943,194943],"mapped",[32880]],[[194944,194944],"mapped",[144223]],[[194945,194945],"mapped",[17365]],[[194946,194946],"mapped",[32946]],[[194947,194947],"mapped",[33027]],[[194948,194948],"mapped",[17419]],[[194949,194949],"mapped",[33086]],[[194950,194950],"mapped",[23221]],[[194951,194951],"mapped",[157607]],[[194952,194952],"mapped",[157621]],[[194953,194953],"mapped",[144275]],[[194954,194954],"mapped",[144284]],[[194955,194955],"mapped",[33281]],[[194956,194956],"mapped",[33284]],[[194957,194957],"mapped",[36766]],[[194958,194958],"mapped",[17515]],[[194959,194959],"mapped",[33425]],[[194960,194960],"mapped",[33419]],[[194961,194961],"mapped",[33437]],[[194962,194962],"mapped",[21171]],[[194963,194963],"mapped",[33457]],[[194964,194964],"mapped",[33459]],[[194965,194965],"mapped",[33469]],[[194966,194966],"mapped",[33510]],[[194967,194967],"mapped",[158524]],[[194968,194968],"mapped",[33509]],[[194969,194969],"mapped",[33565]],[[194970,194970],"mapped",[33635]],[[194971,194971],"mapped",[33709]],[[194972,194972],"mapped",[33571]],[[194973,194973],"mapped",[33725]],[[194974,194974],"mapped",[33767]],[[194975,194975],"mapped",[33879]],[[194976,194976],"mapped",[33619]],[[194977,194977],"mapped",[33738]],[[194978,194978],"mapped",[33740]],[[194979,194979],"mapped",[33756]],[[194980,194980],"mapped",[158774]],[[194981,194981],"mapped",[159083]],[[194982,194982],"mapped",[158933]],[[194983,194983],"mapped",[17707]],[[194984,194984],"mapped",[34033]],[[194985,194985],"mapped",[34035]],[[194986,194986],"mapped",[34070]],[[194987,194987],"mapped",[160714]],[[194988,194988],"mapped",[34148]],[[194989,194989],"mapped",[159532]],[[194990,194990],"mapped",[17757]],[[194991,194991],"mapped",[17761]],[[194992,194992],"mapped",[159665]],[[194993,194993],"mapped",[159954]],[[194994,194994],"mapped",[17771]],[[194995,194995],"mapped",[34384]],[[194996,194996],"mapped",[34396]],[[194997,194997],"mapped",[34407]],[[194998,194998],"mapped",[34409]],[[194999,194999],"mapped",[34473]],[[195000,195000],"mapped",[34440]],[[195001,195001],"mapped",[34574]],[[195002,195002],"mapped",[34530]],[[195003,195003],"mapped",[34681]],[[195004,195004],"mapped",[34600]],[[195005,195005],"mapped",[34667]],[[195006,195006],"mapped",[34694]],[[195007,195007],"disallowed"],[[195008,195008],"mapped",[34785]],[[195009,195009],"mapped",[34817]],[[195010,195010],"mapped",[17913]],[[195011,195011],"mapped",[34912]],[[195012,195012],"mapped",[34915]],[[195013,195013],"mapped",[161383]],[[195014,195014],"mapped",[35031]],[[195015,195015],"mapped",[35038]],[[195016,195016],"mapped",[17973]],[[195017,195017],"mapped",[35066]],[[195018,195018],"mapped",[13499]],[[195019,195019],"mapped",[161966]],[[195020,195020],"mapped",[162150]],[[195021,195021],"mapped",[18110]],[[195022,195022],"mapped",[18119]],[[195023,195023],"mapped",[35488]],[[195024,195024],"mapped",[35565]],[[195025,195025],"mapped",[35722]],[[195026,195026],"mapped",[35925]],[[195027,195027],"mapped",[162984]],[[195028,195028],"mapped",[36011]],[[195029,195029],"mapped",[36033]],[[195030,195030],"mapped",[36123]],[[195031,195031],"mapped",[36215]],[[195032,195032],"mapped",[163631]],[[195033,195033],"mapped",[133124]],[[195034,195034],"mapped",[36299]],[[195035,195035],"mapped",[36284]],[[195036,195036],"mapped",[36336]],[[195037,195037],"mapped",[133342]],[[195038,195038],"mapped",[36564]],[[195039,195039],"mapped",[36664]],[[195040,195040],"mapped",[165330]],[[195041,195041],"mapped",[165357]],[[195042,195042],"mapped",[37012]],[[195043,195043],"mapped",[37105]],[[195044,195044],"mapped",[37137]],[[195045,195045],"mapped",[165678]],[[195046,195046],"mapped",[37147]],[[195047,195047],"mapped",[37432]],[[195048,195048],"mapped",[37591]],[[195049,195049],"mapped",[37592]],[[195050,195050],"mapped",[37500]],[[195051,195051],"mapped",[37881]],[[195052,195052],"mapped",[37909]],[[195053,195053],"mapped",[166906]],[[195054,195054],"mapped",[38283]],[[195055,195055],"mapped",[18837]],[[195056,195056],"mapped",[38327]],[[195057,195057],"mapped",[167287]],[[195058,195058],"mapped",[18918]],[[195059,195059],"mapped",[38595]],[[195060,195060],"mapped",[23986]],[[195061,195061],"mapped",[38691]],[[195062,195062],"mapped",[168261]],[[195063,195063],"mapped",[168474]],[[195064,195064],"mapped",[19054]],[[195065,195065],"mapped",[19062]],[[195066,195066],"mapped",[38880]],[[195067,195067],"mapped",[168970]],[[195068,195068],"mapped",[19122]],[[195069,195069],"mapped",[169110]],[[195070,195071],"mapped",[38923]],[[195072,195072],"mapped",[38953]],[[195073,195073],"mapped",[169398]],[[195074,195074],"mapped",[39138]],[[195075,195075],"mapped",[19251]],[[195076,195076],"mapped",[39209]],[[195077,195077],"mapped",[39335]],[[195078,195078],"mapped",[39362]],[[195079,195079],"mapped",[39422]],[[195080,195080],"mapped",[19406]],[[195081,195081],"mapped",[170800]],[[195082,195082],"mapped",[39698]],[[195083,195083],"mapped",[40000]],[[195084,195084],"mapped",[40189]],[[195085,195085],"mapped",[19662]],[[195086,195086],"mapped",[19693]],[[195087,195087],"mapped",[40295]],[[195088,195088],"mapped",[172238]],[[195089,195089],"mapped",[19704]],[[195090,195090],"mapped",[172293]],[[195091,195091],"mapped",[172558]],[[195092,195092],"mapped",[172689]],[[195093,195093],"mapped",[40635]],[[195094,195094],"mapped",[19798]],[[195095,195095],"mapped",[40697]],[[195096,195096],"mapped",[40702]],[[195097,195097],"mapped",[40709]],[[195098,195098],"mapped",[40719]],[[195099,195099],"mapped",[40726]],[[195100,195100],"mapped",[40763]],[[195101,195101],"mapped",[173568]],[[195102,196605],"disallowed"],[[196606,196607],"disallowed"],[[196608,262141],"disallowed"],[[262142,262143],"disallowed"],[[262144,327677],"disallowed"],[[327678,327679],"disallowed"],[[327680,393213],"disallowed"],[[393214,393215],"disallowed"],[[393216,458749],"disallowed"],[[458750,458751],"disallowed"],[[458752,524285],"disallowed"],[[524286,524287],"disallowed"],[[524288,589821],"disallowed"],[[589822,589823],"disallowed"],[[589824,655357],"disallowed"],[[655358,655359],"disallowed"],[[655360,720893],"disallowed"],[[720894,720895],"disallowed"],[[720896,786429],"disallowed"],[[786430,786431],"disallowed"],[[786432,851965],"disallowed"],[[851966,851967],"disallowed"],[[851968,917501],"disallowed"],[[917502,917503],"disallowed"],[[917504,917504],"disallowed"],[[917505,917505],"disallowed"],[[917506,917535],"disallowed"],[[917536,917631],"disallowed"],[[917632,917759],"disallowed"],[[917760,917999],"ignored"],[[918000,983037],"disallowed"],[[983038,983039],"disallowed"],[[983040,1048573],"disallowed"],[[1048574,1048575],"disallowed"],[[1048576,1114109],"disallowed"],[[1114110,1114111],"disallowed"]]');
+module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["ecma","es"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","compressible":true},"application/fhir+xml":{"source":"iana","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/mrb-publish+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/msc-ivr+xml":{"source":"iana","compressible":true},"application/msc-mixer+xml":{"source":"iana","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana"},"application/news-groupinfo":{"source":"iana"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana"},"application/nss":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana"},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","compressible":true},"application/pidf-diff+xml":{"source":"iana","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana"},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["keynote"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana"},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana"},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"apache","extensions":["der","crt","pem"]},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana"},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana"},"image/avcs":{"source":"iana"},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shex":{"extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana"},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana"},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}');
 
 /***/ })
 
-/******/ 	});
+/******/ });
 /************************************************************************/
-/******/ 	// The module cache
-/******/ 	var __webpack_module_cache__ = {};
-/******/ 	
-/******/ 	// The require function
-/******/ 	function __nccwpck_require__(moduleId) {
-/******/ 		// Check if module is in cache
-/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
-/******/ 		if (cachedModule !== undefined) {
-/******/ 			return cachedModule.exports;
-/******/ 		}
-/******/ 		// Create a new module (and put it into the cache)
-/******/ 		var module = __webpack_module_cache__[moduleId] = {
-/******/ 			// no module.id needed
-/******/ 			// no module.loaded needed
-/******/ 			exports: {}
-/******/ 		};
-/******/ 	
-/******/ 		// Execute the module function
-/******/ 		var threw = true;
-/******/ 		try {
-/******/ 			__webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__);
-/******/ 			threw = false;
-/******/ 		} finally {
-/******/ 			if(threw) delete __webpack_module_cache__[moduleId];
-/******/ 		}
-/******/ 	
-/******/ 		// Return the exports of the module
-/******/ 		return module.exports;
+/******/ // The module cache
+/******/ var __webpack_module_cache__ = {};
+/******/ 
+/******/ // The require function
+/******/ function __nccwpck_require__(moduleId) {
+/******/ 	// Check if module is in cache
+/******/ 	var cachedModule = __webpack_module_cache__[moduleId];
+/******/ 	if (cachedModule !== undefined) {
+/******/ 		return cachedModule.exports;
 /******/ 	}
-/******/ 	
+/******/ 	// Create a new module (and put it into the cache)
+/******/ 	var module = __webpack_module_cache__[moduleId] = {
+/******/ 		// no module.id needed
+/******/ 		// no module.loaded needed
+/******/ 		exports: {}
+/******/ 	};
+/******/ 
+/******/ 	// Execute the module function
+/******/ 	var threw = true;
+/******/ 	try {
+/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__);
+/******/ 		threw = false;
+/******/ 	} finally {
+/******/ 		if(threw) delete __webpack_module_cache__[moduleId];
+/******/ 	}
+/******/ 
+/******/ 	// Return the exports of the module
+/******/ 	return module.exports;
+/******/ }
+/******/ 
 /************************************************************************/
-/******/ 	/* webpack/runtime/compat */
-/******/ 	
-/******/ 	if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
-/******/ 	
+/******/ /* webpack/runtime/async module */
+/******/ (() => {
+/******/ 	var webpackQueues = typeof Symbol === "function" ? Symbol("webpack queues") : "__webpack_queues__";
+/******/ 	var webpackExports = typeof Symbol === "function" ? Symbol("webpack exports") : "__webpack_exports__";
+/******/ 	var webpackError = typeof Symbol === "function" ? Symbol("webpack error") : "__webpack_error__";
+/******/ 	var resolveQueue = (queue) => {
+/******/ 		if(queue && !queue.d) {
+/******/ 			queue.d = 1;
+/******/ 			queue.forEach((fn) => (fn.r--));
+/******/ 			queue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));
+/******/ 		}
+/******/ 	}
+/******/ 	var wrapDeps = (deps) => (deps.map((dep) => {
+/******/ 		if(dep !== null && typeof dep === "object") {
+/******/ 			if(dep[webpackQueues]) return dep;
+/******/ 			if(dep.then) {
+/******/ 				var queue = [];
+/******/ 				queue.d = 0;
+/******/ 				dep.then((r) => {
+/******/ 					obj[webpackExports] = r;
+/******/ 					resolveQueue(queue);
+/******/ 				}, (e) => {
+/******/ 					obj[webpackError] = e;
+/******/ 					resolveQueue(queue);
+/******/ 				});
+/******/ 				var obj = {};
+/******/ 				obj[webpackQueues] = (fn) => (fn(queue));
+/******/ 				return obj;
+/******/ 			}
+/******/ 		}
+/******/ 		var ret = {};
+/******/ 		ret[webpackQueues] = x => {};
+/******/ 		ret[webpackExports] = dep;
+/******/ 		return ret;
+/******/ 	}));
+/******/ 	__nccwpck_require__.a = (module, body, hasAwait) => {
+/******/ 		var queue;
+/******/ 		hasAwait && ((queue = []).d = 1);
+/******/ 		var depQueues = new Set();
+/******/ 		var exports = module.exports;
+/******/ 		var currentDeps;
+/******/ 		var outerResolve;
+/******/ 		var reject;
+/******/ 		var promise = new Promise((resolve, rej) => {
+/******/ 			reject = rej;
+/******/ 			outerResolve = resolve;
+/******/ 		});
+/******/ 		promise[webpackExports] = exports;
+/******/ 		promise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise["catch"](x => {}));
+/******/ 		module.exports = promise;
+/******/ 		body((deps) => {
+/******/ 			currentDeps = wrapDeps(deps);
+/******/ 			var fn;
+/******/ 			var getResult = () => (currentDeps.map((d) => {
+/******/ 				if(d[webpackError]) throw d[webpackError];
+/******/ 				return d[webpackExports];
+/******/ 			}))
+/******/ 			var promise = new Promise((resolve) => {
+/******/ 				fn = () => (resolve(getResult));
+/******/ 				fn.r = 0;
+/******/ 				var fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));
+/******/ 				currentDeps.map((dep) => (dep[webpackQueues](fnQueue)));
+/******/ 			});
+/******/ 			return fn.r ? promise : getResult();
+/******/ 		}, (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue)));
+/******/ 		queue && (queue.d = 0);
+/******/ 	};
+/******/ })();
+/******/ 
+/******/ /* webpack/runtime/define property getters */
+/******/ (() => {
+/******/ 	// define getter functions for harmony exports
+/******/ 	__nccwpck_require__.d = (exports, definition) => {
+/******/ 		for(var key in definition) {
+/******/ 			if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) {
+/******/ 				Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
+/******/ 			}
+/******/ 		}
+/******/ 	};
+/******/ })();
+/******/ 
+/******/ /* webpack/runtime/hasOwnProperty shorthand */
+/******/ (() => {
+/******/ 	__nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
+/******/ })();
+/******/ 
+/******/ /* webpack/runtime/make namespace object */
+/******/ (() => {
+/******/ 	// define __esModule on exports
+/******/ 	__nccwpck_require__.r = (exports) => {
+/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
+/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
+/******/ 		}
+/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
+/******/ 	};
+/******/ })();
+/******/ 
+/******/ /* webpack/runtime/compat */
+/******/ 
+/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = new URL('.', import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/) ? 1 : 0, -1) + "/";
+/******/ 
 /************************************************************************/
+<<<<<<< HEAD
+/******/ 
+/******/ // startup
+/******/ // Load entry module and return exports
+/******/ // This entry module used 'module' so it can't be inlined
+/******/ var __webpack_exports__ = __nccwpck_require__(58686);
+/******/ __webpack_exports__ = await __webpack_exports__;
+/******/ 
+=======
 var __webpack_exports__ = {};
 // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
 (() => {
@@ -148854,4 +280204,5 @@ run();
 
 module.exports = __webpack_exports__;
 /******/ })()
-;
\ No newline at end of file
+;
+>>>>>>> 1ef4ad5f220f2d3170a3249c7c9fa12bf9fefa05
diff --git a/dist/package.json b/dist/package.json
new file mode 100644
index 000000000..3dbc1ca59
--- /dev/null
+++ b/dist/package.json
@@ -0,0 +1,3 @@
+{
+  "type": "module"
+}
diff --git a/index.js b/index.js
index 2c16cd456..1752a874f 100644
--- a/index.js
+++ b/index.js
@@ -1,3 +1,3 @@
-const run = require('./runner');
+import run from "./runner.js"
 
-run();
\ No newline at end of file
+await run();
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index c3621898d..c3356ad9e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,64 +1,174 @@
 {
   "name": "ipfs-action",
-  "version": "0.3.1",
-  "lockfileVersion": 2,
+  "version": "1.0.0",
+  "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "ipfs-action",
-      "version": "0.3.1",
+      "version": "1.0.0",
       "license": "MIT",
       "dependencies": {
-        "@actions/core": "^1.10.0",
-        "@actions/github": "^5.1.1",
-        "@filebase/client": "0.0.2",
+        "@actions/core": "1.10.1",
+        "@actions/github": "6.0.0",
+        "@filebase/sdk": "1.0.2",
         "@pinata/sdk": "1.1.23",
-        "files-from-path": "0.2.6",
-        "ipfs-http-client": "55.0.0",
-        "it-last": "1.0.5",
+        "files-from-path": "1.0.4",
+        "ipfs-http-client": "60.0.1",
+        "it-drain": "3.0.5",
+        "it-last": "3.0.4",
+        "kubo-rpc-client": "3.0.2",
         "peer-id": "0.16.0"
       },
       "devDependencies": {
+        "@jest/globals": "^29.7.0",
         "eslint": "8.6.0",
         "husky": "^8.0.1",
-        "jest": "27.0.4",
+        "jest": "29.7.0",
         "release-it": "15.10.1"
       }
     },
     "node_modules/@actions/core": {
-      "version": "1.10.0",
-      "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
-      "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
+      "version": "1.10.1",
+      "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz",
+      "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==",
       "dependencies": {
         "@actions/http-client": "^2.0.1",
         "uuid": "^8.3.2"
       }
     },
     "node_modules/@actions/github": {
-      "version": "5.1.1",
-      "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
-      "integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
+      "integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
       "dependencies": {
-        "@actions/http-client": "^2.0.1",
-        "@octokit/core": "^3.6.0",
-        "@octokit/plugin-paginate-rest": "^2.17.0",
-        "@octokit/plugin-rest-endpoint-methods": "^5.13.0"
+        "@actions/http-client": "^2.2.0",
+        "@octokit/core": "^5.0.1",
+        "@octokit/plugin-paginate-rest": "^9.0.0",
+        "@octokit/plugin-rest-endpoint-methods": "^10.0.0"
+      }
+    },
+    "node_modules/@actions/github/node_modules/@octokit/auth-token": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
+      "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
+      "engines": {
+        "node": ">= 18"
+      }
+    },
+    "node_modules/@actions/github/node_modules/@octokit/core": {
+      "version": "5.0.2",
+      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.2.tgz",
+      "integrity": "sha512-cZUy1gUvd4vttMic7C0lwPed8IYXWYp8kHIMatyhY8t8n3Cpw2ILczkV5pGMPqef7v0bLo0pOHrEHarsau2Ydg==",
+      "dependencies": {
+        "@octokit/auth-token": "^4.0.0",
+        "@octokit/graphql": "^7.0.0",
+        "@octokit/request": "^8.0.2",
+        "@octokit/request-error": "^5.0.0",
+        "@octokit/types": "^12.0.0",
+        "before-after-hook": "^2.2.0",
+        "universal-user-agent": "^6.0.0"
+      },
+      "engines": {
+        "node": ">= 18"
+      }
+    },
+    "node_modules/@actions/github/node_modules/@octokit/endpoint": {
+      "version": "9.0.4",
+      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz",
+      "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==",
+      "dependencies": {
+        "@octokit/types": "^12.0.0",
+        "universal-user-agent": "^6.0.0"
+      },
+      "engines": {
+        "node": ">= 18"
+      }
+    },
+    "node_modules/@actions/github/node_modules/@octokit/openapi-types": {
+      "version": "19.1.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.1.0.tgz",
+      "integrity": "sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw=="
+    },
+    "node_modules/@actions/github/node_modules/@octokit/plugin-paginate-rest": {
+      "version": "9.1.5",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.1.5.tgz",
+      "integrity": "sha512-WKTQXxK+bu49qzwv4qKbMMRXej1DU2gq017euWyKVudA6MldaSSQuxtz+vGbhxV4CjxpUxjZu6rM2wfc1FiWVg==",
+      "dependencies": {
+        "@octokit/types": "^12.4.0"
+      },
+      "engines": {
+        "node": ">= 18"
+      },
+      "peerDependencies": {
+        "@octokit/core": ">=5"
+      }
+    },
+    "node_modules/@actions/github/node_modules/@octokit/plugin-rest-endpoint-methods": {
+      "version": "10.2.0",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.2.0.tgz",
+      "integrity": "sha512-ePbgBMYtGoRNXDyKGvr9cyHjQ163PbwD0y1MkDJCpkO2YH4OeXX40c4wYHKikHGZcpGPbcRLuy0unPUuafco8Q==",
+      "dependencies": {
+        "@octokit/types": "^12.3.0"
+      },
+      "engines": {
+        "node": ">= 18"
+      },
+      "peerDependencies": {
+        "@octokit/core": ">=5"
+      }
+    },
+    "node_modules/@actions/github/node_modules/@octokit/request": {
+      "version": "8.1.6",
+      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz",
+      "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==",
+      "dependencies": {
+        "@octokit/endpoint": "^9.0.0",
+        "@octokit/request-error": "^5.0.0",
+        "@octokit/types": "^12.0.0",
+        "universal-user-agent": "^6.0.0"
+      },
+      "engines": {
+        "node": ">= 18"
+      }
+    },
+    "node_modules/@actions/github/node_modules/@octokit/request-error": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz",
+      "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==",
+      "dependencies": {
+        "@octokit/types": "^12.0.0",
+        "deprecation": "^2.0.0",
+        "once": "^1.4.0"
+      },
+      "engines": {
+        "node": ">= 18"
+      }
+    },
+    "node_modules/@actions/github/node_modules/@octokit/types": {
+      "version": "12.4.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.4.0.tgz",
+      "integrity": "sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==",
+      "dependencies": {
+        "@octokit/openapi-types": "^19.1.0"
       }
     },
     "node_modules/@actions/http-client": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
-      "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz",
+      "integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==",
       "dependencies": {
-        "tunnel": "^0.0.6"
+        "tunnel": "^0.0.6",
+        "undici": "^5.25.4"
       }
     },
     "node_modules/@ampproject/remapping": {
-      "version": "2.2.0",
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
+      "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
       "dev": true,
-      "license": "Apache-2.0",
       "dependencies": {
-        "@jridgewell/gen-mapping": "^0.1.0",
+        "@jridgewell/gen-mapping": "^0.3.0",
         "@jridgewell/trace-mapping": "^0.3.9"
       },
       "engines": {
@@ -67,52 +177,62 @@
     },
     "node_modules/@assemblyscript/loader": {
       "version": "0.9.4",
+      "resolved": "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.9.4.tgz",
+      "integrity": "sha512-HazVq9zwTVwGmqdwYzu7WyQ6FQVZ7SwET0KKQuKm55jD0IfUpZgN0OPIiZG3zV1iSrVYcN0bdwLRXI/VNCYsUA==",
       "license": "Apache-2.0"
     },
     "node_modules/@aws-crypto/crc32": {
-      "version": "2.0.0",
-      "license": "Apache-2.0",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz",
+      "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==",
       "dependencies": {
-        "@aws-crypto/util": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
+        "@aws-crypto/util": "^3.0.0",
+        "@aws-sdk/types": "^3.222.0",
         "tslib": "^1.11.1"
       }
     },
     "node_modules/@aws-crypto/crc32/node_modules/tslib": {
       "version": "1.14.1",
-      "license": "0BSD"
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
     },
     "node_modules/@aws-crypto/crc32c": {
-      "version": "2.0.0",
-      "license": "Apache-2.0",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@aws-crypto/crc32c/-/crc32c-3.0.0.tgz",
+      "integrity": "sha512-ENNPPManmnVJ4BTXlOjAgD7URidbAznURqD0KvfREyc4o20DPYdEldU1f5cQ7Jbj0CJJSPaMIk/9ZshdB3210w==",
       "dependencies": {
-        "@aws-crypto/util": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
+        "@aws-crypto/util": "^3.0.0",
+        "@aws-sdk/types": "^3.222.0",
         "tslib": "^1.11.1"
       }
     },
     "node_modules/@aws-crypto/crc32c/node_modules/tslib": {
       "version": "1.14.1",
-      "license": "0BSD"
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
     },
     "node_modules/@aws-crypto/ie11-detection": {
-      "version": "2.0.0",
-      "license": "Apache-2.0",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@aws-crypto/ie11-detection/-/ie11-detection-3.0.0.tgz",
+      "integrity": "sha512-341lBBkiY1DfDNKai/wXM3aujNBkXR7tq1URPQDL9wi3AUbI80NR74uF1TXHMm7po1AcnFk8iu2S2IeU/+/A+Q==",
       "dependencies": {
         "tslib": "^1.11.1"
       }
     },
     "node_modules/@aws-crypto/ie11-detection/node_modules/tslib": {
       "version": "1.14.1",
-      "license": "0BSD"
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
     },
     "node_modules/@aws-crypto/sha1-browser": {
-      "version": "2.0.0",
-      "license": "Apache-2.0",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@aws-crypto/sha1-browser/-/sha1-browser-3.0.0.tgz",
+      "integrity": "sha512-NJth5c997GLHs6nOYTzFKTbYdMNA6/1XlKVgnZoaZcQ7z7UJlOgj2JdbHE8tiYLS3fzXNCguct77SPGat2raSw==",
       "dependencies": {
-        "@aws-crypto/ie11-detection": "^2.0.0",
-        "@aws-crypto/supports-web-crypto": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
+        "@aws-crypto/ie11-detection": "^3.0.0",
+        "@aws-crypto/supports-web-crypto": "^3.0.0",
+        "@aws-crypto/util": "^3.0.0",
+        "@aws-sdk/types": "^3.222.0",
         "@aws-sdk/util-locate-window": "^3.0.0",
         "@aws-sdk/util-utf8-browser": "^3.0.0",
         "tslib": "^1.11.1"
@@ -120,17 +240,19 @@
     },
     "node_modules/@aws-crypto/sha1-browser/node_modules/tslib": {
       "version": "1.14.1",
-      "license": "0BSD"
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
     },
     "node_modules/@aws-crypto/sha256-browser": {
-      "version": "2.0.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-crypto/ie11-detection": "^2.0.0",
-        "@aws-crypto/sha256-js": "^2.0.0",
-        "@aws-crypto/supports-web-crypto": "^2.0.0",
-        "@aws-crypto/util": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-browser/-/sha256-browser-3.0.0.tgz",
+      "integrity": "sha512-8VLmW2B+gjFbU5uMeqtQM6Nj0/F1bro80xQXCW6CQBWgosFWXTx77aeOF5CAIAmbOK64SdMBJdNr6J41yP5mvQ==",
+      "dependencies": {
+        "@aws-crypto/ie11-detection": "^3.0.0",
+        "@aws-crypto/sha256-js": "^3.0.0",
+        "@aws-crypto/supports-web-crypto": "^3.0.0",
+        "@aws-crypto/util": "^3.0.0",
+        "@aws-sdk/types": "^3.222.0",
         "@aws-sdk/util-locate-window": "^3.0.0",
         "@aws-sdk/util-utf8-browser": "^3.0.0",
         "tslib": "^1.11.1"
@@ -138,1662 +260,1895 @@
     },
     "node_modules/@aws-crypto/sha256-browser/node_modules/tslib": {
       "version": "1.14.1",
-      "license": "0BSD"
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
     },
     "node_modules/@aws-crypto/sha256-js": {
-      "version": "2.0.0",
-      "license": "Apache-2.0",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-3.0.0.tgz",
+      "integrity": "sha512-PnNN7os0+yd1XvXAy23CFOmTbMaDxgxXtTKHybrJ39Y8kGzBATgBFibWJKH6BhytLI/Zyszs87xCOBNyBig6vQ==",
       "dependencies": {
-        "@aws-crypto/util": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
+        "@aws-crypto/util": "^3.0.0",
+        "@aws-sdk/types": "^3.222.0",
         "tslib": "^1.11.1"
       }
     },
     "node_modules/@aws-crypto/sha256-js/node_modules/tslib": {
       "version": "1.14.1",
-      "license": "0BSD"
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
     },
     "node_modules/@aws-crypto/supports-web-crypto": {
-      "version": "2.0.0",
-      "license": "Apache-2.0",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-3.0.0.tgz",
+      "integrity": "sha512-06hBdMwUAb2WFTuGG73LSC0wfPu93xWwo5vL2et9eymgmu3Id5vFAHBbajVWiGhPO37qcsdCap/FqXvJGJWPIg==",
       "dependencies": {
         "tslib": "^1.11.1"
       }
     },
     "node_modules/@aws-crypto/supports-web-crypto/node_modules/tslib": {
       "version": "1.14.1",
-      "license": "0BSD"
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
     },
     "node_modules/@aws-crypto/util": {
-      "version": "2.0.1",
-      "license": "Apache-2.0",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz",
+      "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==",
       "dependencies": {
-        "@aws-sdk/types": "^3.1.0",
+        "@aws-sdk/types": "^3.222.0",
         "@aws-sdk/util-utf8-browser": "^3.0.0",
         "tslib": "^1.11.1"
       }
     },
     "node_modules/@aws-crypto/util/node_modules/tslib": {
       "version": "1.14.1",
-      "license": "0BSD"
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
     },
-    "node_modules/@aws-sdk/abort-controller": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">= 12.0.0"
+    "node_modules/@aws-sdk/client-s3": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.478.0.tgz",
+      "integrity": "sha512-OUpbCCnK71lQQ07BohJOx9ZER0rPqRAGOVIIVhNEkeN0uYFLzB7/o5a7+FEPUQXEd5rZRZgbxN5xEmnNW/0Waw==",
+      "dependencies": {
+        "@aws-crypto/sha1-browser": "3.0.0",
+        "@aws-crypto/sha256-browser": "3.0.0",
+        "@aws-crypto/sha256-js": "3.0.0",
+        "@aws-sdk/client-sts": "3.478.0",
+        "@aws-sdk/core": "3.477.0",
+        "@aws-sdk/credential-provider-node": "3.478.0",
+        "@aws-sdk/middleware-bucket-endpoint": "3.470.0",
+        "@aws-sdk/middleware-expect-continue": "3.468.0",
+        "@aws-sdk/middleware-flexible-checksums": "3.468.0",
+        "@aws-sdk/middleware-host-header": "3.468.0",
+        "@aws-sdk/middleware-location-constraint": "3.468.0",
+        "@aws-sdk/middleware-logger": "3.468.0",
+        "@aws-sdk/middleware-recursion-detection": "3.468.0",
+        "@aws-sdk/middleware-sdk-s3": "3.474.0",
+        "@aws-sdk/middleware-signing": "3.468.0",
+        "@aws-sdk/middleware-ssec": "3.468.0",
+        "@aws-sdk/middleware-user-agent": "3.478.0",
+        "@aws-sdk/region-config-resolver": "3.470.0",
+        "@aws-sdk/signature-v4-multi-region": "3.474.0",
+        "@aws-sdk/types": "3.468.0",
+        "@aws-sdk/util-endpoints": "3.478.0",
+        "@aws-sdk/util-user-agent-browser": "3.468.0",
+        "@aws-sdk/util-user-agent-node": "3.470.0",
+        "@aws-sdk/xml-builder": "3.472.0",
+        "@smithy/config-resolver": "^2.0.21",
+        "@smithy/core": "^1.2.0",
+        "@smithy/eventstream-serde-browser": "^2.0.15",
+        "@smithy/eventstream-serde-config-resolver": "^2.0.15",
+        "@smithy/eventstream-serde-node": "^2.0.15",
+        "@smithy/fetch-http-handler": "^2.3.1",
+        "@smithy/hash-blob-browser": "^2.0.16",
+        "@smithy/hash-node": "^2.0.17",
+        "@smithy/hash-stream-node": "^2.0.17",
+        "@smithy/invalid-dependency": "^2.0.15",
+        "@smithy/md5-js": "^2.0.17",
+        "@smithy/middleware-content-length": "^2.0.17",
+        "@smithy/middleware-endpoint": "^2.2.3",
+        "@smithy/middleware-retry": "^2.0.24",
+        "@smithy/middleware-serde": "^2.0.15",
+        "@smithy/middleware-stack": "^2.0.9",
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/node-http-handler": "^2.2.1",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/smithy-client": "^2.1.18",
+        "@smithy/types": "^2.7.0",
+        "@smithy/url-parser": "^2.0.15",
+        "@smithy/util-base64": "^2.0.1",
+        "@smithy/util-body-length-browser": "^2.0.1",
+        "@smithy/util-body-length-node": "^2.1.0",
+        "@smithy/util-defaults-mode-browser": "^2.0.22",
+        "@smithy/util-defaults-mode-node": "^2.0.29",
+        "@smithy/util-endpoints": "^1.0.7",
+        "@smithy/util-retry": "^2.0.8",
+        "@smithy/util-stream": "^2.0.23",
+        "@smithy/util-utf8": "^2.0.2",
+        "@smithy/util-waiter": "^2.0.15",
+        "fast-xml-parser": "4.2.5",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/chunked-blob-reader": {
-      "version": "3.55.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "tslib": "^2.3.1"
+    "node_modules/@aws-sdk/client-sso": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.478.0.tgz",
+      "integrity": "sha512-Jxy9cE1JMkPR0PklCpq3cORHnZq/Z4klhSTNGgZNeBWovMa+plor52kyh8iUNHKl3XEJvTbHM7V+dvrr/x0P1g==",
+      "dependencies": {
+        "@aws-crypto/sha256-browser": "3.0.0",
+        "@aws-crypto/sha256-js": "3.0.0",
+        "@aws-sdk/core": "3.477.0",
+        "@aws-sdk/middleware-host-header": "3.468.0",
+        "@aws-sdk/middleware-logger": "3.468.0",
+        "@aws-sdk/middleware-recursion-detection": "3.468.0",
+        "@aws-sdk/middleware-user-agent": "3.478.0",
+        "@aws-sdk/region-config-resolver": "3.470.0",
+        "@aws-sdk/types": "3.468.0",
+        "@aws-sdk/util-endpoints": "3.478.0",
+        "@aws-sdk/util-user-agent-browser": "3.468.0",
+        "@aws-sdk/util-user-agent-node": "3.470.0",
+        "@smithy/config-resolver": "^2.0.21",
+        "@smithy/core": "^1.2.0",
+        "@smithy/fetch-http-handler": "^2.3.1",
+        "@smithy/hash-node": "^2.0.17",
+        "@smithy/invalid-dependency": "^2.0.15",
+        "@smithy/middleware-content-length": "^2.0.17",
+        "@smithy/middleware-endpoint": "^2.2.3",
+        "@smithy/middleware-retry": "^2.0.24",
+        "@smithy/middleware-serde": "^2.0.15",
+        "@smithy/middleware-stack": "^2.0.9",
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/node-http-handler": "^2.2.1",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/smithy-client": "^2.1.18",
+        "@smithy/types": "^2.7.0",
+        "@smithy/url-parser": "^2.0.15",
+        "@smithy/util-base64": "^2.0.1",
+        "@smithy/util-body-length-browser": "^2.0.1",
+        "@smithy/util-body-length-node": "^2.1.0",
+        "@smithy/util-defaults-mode-browser": "^2.0.22",
+        "@smithy/util-defaults-mode-node": "^2.0.29",
+        "@smithy/util-endpoints": "^1.0.7",
+        "@smithy/util-retry": "^2.0.8",
+        "@smithy/util-utf8": "^2.0.2",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/chunked-blob-reader-native": {
-      "version": "3.109.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "tslib": "^2.3.1"
+    "node_modules/@aws-sdk/client-sts": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.478.0.tgz",
+      "integrity": "sha512-D+QID0dYzmn9dcxgKP3/nMndUqiQbDLsqI0Zf2pG4MW5gPhVNKlDGIV3Ztz8SkMjzGJExNOLW2L569o8jshJVw==",
+      "dependencies": {
+        "@aws-crypto/sha256-browser": "3.0.0",
+        "@aws-crypto/sha256-js": "3.0.0",
+        "@aws-sdk/core": "3.477.0",
+        "@aws-sdk/credential-provider-node": "3.478.0",
+        "@aws-sdk/middleware-host-header": "3.468.0",
+        "@aws-sdk/middleware-logger": "3.468.0",
+        "@aws-sdk/middleware-recursion-detection": "3.468.0",
+        "@aws-sdk/middleware-user-agent": "3.478.0",
+        "@aws-sdk/region-config-resolver": "3.470.0",
+        "@aws-sdk/types": "3.468.0",
+        "@aws-sdk/util-endpoints": "3.478.0",
+        "@aws-sdk/util-user-agent-browser": "3.468.0",
+        "@aws-sdk/util-user-agent-node": "3.470.0",
+        "@smithy/config-resolver": "^2.0.21",
+        "@smithy/core": "^1.2.0",
+        "@smithy/fetch-http-handler": "^2.3.1",
+        "@smithy/hash-node": "^2.0.17",
+        "@smithy/invalid-dependency": "^2.0.15",
+        "@smithy/middleware-content-length": "^2.0.17",
+        "@smithy/middleware-endpoint": "^2.2.3",
+        "@smithy/middleware-retry": "^2.0.24",
+        "@smithy/middleware-serde": "^2.0.15",
+        "@smithy/middleware-stack": "^2.0.9",
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/node-http-handler": "^2.2.1",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/smithy-client": "^2.1.18",
+        "@smithy/types": "^2.7.0",
+        "@smithy/url-parser": "^2.0.15",
+        "@smithy/util-base64": "^2.0.1",
+        "@smithy/util-body-length-browser": "^2.0.1",
+        "@smithy/util-body-length-node": "^2.1.0",
+        "@smithy/util-defaults-mode-browser": "^2.0.22",
+        "@smithy/util-defaults-mode-node": "^2.0.29",
+        "@smithy/util-endpoints": "^1.0.7",
+        "@smithy/util-middleware": "^2.0.8",
+        "@smithy/util-retry": "^2.0.8",
+        "@smithy/util-utf8": "^2.0.2",
+        "fast-xml-parser": "4.2.5",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      }
+    },
+    "node_modules/@aws-sdk/core": {
+      "version": "3.477.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.477.0.tgz",
+      "integrity": "sha512-o0434EH+d1BxHZvgG7z8vph2SYefciQ5RnJw2MgvETGnthgqsnI4nnNJLSw0FVeqCeS18n6vRtzqlGYR2YPCNg==",
+      "dependencies": {
+        "@smithy/core": "^1.2.0",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/signature-v4": "^2.0.0",
+        "@smithy/smithy-client": "^2.1.18",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/client-s3": {
-      "version": "3.154.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/credential-provider-env": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.468.0.tgz",
+      "integrity": "sha512-k/1WHd3KZn0EQYjadooj53FC0z24/e4dUZhbSKTULgmxyO62pwh9v3Brvw4WRa/8o2wTffU/jo54tf4vGuP/ZA==",
       "dependencies": {
-        "@aws-crypto/sha1-browser": "2.0.0",
-        "@aws-crypto/sha256-browser": "2.0.0",
-        "@aws-crypto/sha256-js": "2.0.0",
-        "@aws-sdk/client-sts": "3.154.0",
-        "@aws-sdk/config-resolver": "3.130.0",
-        "@aws-sdk/credential-provider-node": "3.154.0",
-        "@aws-sdk/eventstream-serde-browser": "3.127.0",
-        "@aws-sdk/eventstream-serde-config-resolver": "3.127.0",
-        "@aws-sdk/eventstream-serde-node": "3.127.0",
-        "@aws-sdk/fetch-http-handler": "3.131.0",
-        "@aws-sdk/hash-blob-browser": "3.127.0",
-        "@aws-sdk/hash-node": "3.127.0",
-        "@aws-sdk/hash-stream-node": "3.127.0",
-        "@aws-sdk/invalid-dependency": "3.127.0",
-        "@aws-sdk/md5-js": "3.127.0",
-        "@aws-sdk/middleware-bucket-endpoint": "3.127.0",
-        "@aws-sdk/middleware-content-length": "3.127.0",
-        "@aws-sdk/middleware-expect-continue": "3.127.0",
-        "@aws-sdk/middleware-flexible-checksums": "3.127.0",
-        "@aws-sdk/middleware-host-header": "3.127.0",
-        "@aws-sdk/middleware-location-constraint": "3.127.0",
-        "@aws-sdk/middleware-logger": "3.127.0",
-        "@aws-sdk/middleware-recursion-detection": "3.127.0",
-        "@aws-sdk/middleware-retry": "3.127.0",
-        "@aws-sdk/middleware-sdk-s3": "3.127.0",
-        "@aws-sdk/middleware-serde": "3.127.0",
-        "@aws-sdk/middleware-signing": "3.130.0",
-        "@aws-sdk/middleware-ssec": "3.127.0",
-        "@aws-sdk/middleware-stack": "3.127.0",
-        "@aws-sdk/middleware-user-agent": "3.127.0",
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/node-http-handler": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/signature-v4-multi-region": "3.130.0",
-        "@aws-sdk/smithy-client": "3.142.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/url-parser": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "@aws-sdk/util-base64-node": "3.55.0",
-        "@aws-sdk/util-body-length-browser": "3.154.0",
-        "@aws-sdk/util-body-length-node": "3.55.0",
-        "@aws-sdk/util-defaults-mode-browser": "3.142.0",
-        "@aws-sdk/util-defaults-mode-node": "3.142.0",
-        "@aws-sdk/util-stream-browser": "3.131.0",
-        "@aws-sdk/util-stream-node": "3.129.0",
-        "@aws-sdk/util-user-agent-browser": "3.127.0",
-        "@aws-sdk/util-user-agent-node": "3.127.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "@aws-sdk/util-utf8-node": "3.109.0",
-        "@aws-sdk/util-waiter": "3.127.0",
-        "@aws-sdk/xml-builder": "3.142.0",
-        "entities": "2.2.0",
-        "fast-xml-parser": "3.19.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/property-provider": "^2.0.0",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/client-sso": {
-      "version": "3.154.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/credential-provider-ini": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.478.0.tgz",
+      "integrity": "sha512-SsrYEYUvTG9ZoPC+zB19AnVoOKID+QIEHJDIi1GCZXW5kTVyr1saTVm4orG2TjYvbHQMddsWtHOvGYXZWAYMbw==",
       "dependencies": {
-        "@aws-crypto/sha256-browser": "2.0.0",
-        "@aws-crypto/sha256-js": "2.0.0",
-        "@aws-sdk/config-resolver": "3.130.0",
-        "@aws-sdk/fetch-http-handler": "3.131.0",
-        "@aws-sdk/hash-node": "3.127.0",
-        "@aws-sdk/invalid-dependency": "3.127.0",
-        "@aws-sdk/middleware-content-length": "3.127.0",
-        "@aws-sdk/middleware-host-header": "3.127.0",
-        "@aws-sdk/middleware-logger": "3.127.0",
-        "@aws-sdk/middleware-recursion-detection": "3.127.0",
-        "@aws-sdk/middleware-retry": "3.127.0",
-        "@aws-sdk/middleware-serde": "3.127.0",
-        "@aws-sdk/middleware-stack": "3.127.0",
-        "@aws-sdk/middleware-user-agent": "3.127.0",
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/node-http-handler": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/smithy-client": "3.142.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/url-parser": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "@aws-sdk/util-base64-node": "3.55.0",
-        "@aws-sdk/util-body-length-browser": "3.154.0",
-        "@aws-sdk/util-body-length-node": "3.55.0",
-        "@aws-sdk/util-defaults-mode-browser": "3.142.0",
-        "@aws-sdk/util-defaults-mode-node": "3.142.0",
-        "@aws-sdk/util-user-agent-browser": "3.127.0",
-        "@aws-sdk/util-user-agent-node": "3.127.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "@aws-sdk/util-utf8-node": "3.109.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/credential-provider-env": "3.468.0",
+        "@aws-sdk/credential-provider-process": "3.468.0",
+        "@aws-sdk/credential-provider-sso": "3.478.0",
+        "@aws-sdk/credential-provider-web-identity": "3.468.0",
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/credential-provider-imds": "^2.0.0",
+        "@smithy/property-provider": "^2.0.0",
+        "@smithy/shared-ini-file-loader": "^2.0.6",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/client-sts": {
-      "version": "3.154.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/credential-provider-node": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.478.0.tgz",
+      "integrity": "sha512-nwDutJYeHiIZCQDgKIUrsgwAWTil0mNe+cbd+j8fi+wwxkWUzip+F0+z02molJ8WrUUKNRhqB1V5aVx7IranuA==",
       "dependencies": {
-        "@aws-crypto/sha256-browser": "2.0.0",
-        "@aws-crypto/sha256-js": "2.0.0",
-        "@aws-sdk/config-resolver": "3.130.0",
-        "@aws-sdk/credential-provider-node": "3.154.0",
-        "@aws-sdk/fetch-http-handler": "3.131.0",
-        "@aws-sdk/hash-node": "3.127.0",
-        "@aws-sdk/invalid-dependency": "3.127.0",
-        "@aws-sdk/middleware-content-length": "3.127.0",
-        "@aws-sdk/middleware-host-header": "3.127.0",
-        "@aws-sdk/middleware-logger": "3.127.0",
-        "@aws-sdk/middleware-recursion-detection": "3.127.0",
-        "@aws-sdk/middleware-retry": "3.127.0",
-        "@aws-sdk/middleware-sdk-sts": "3.130.0",
-        "@aws-sdk/middleware-serde": "3.127.0",
-        "@aws-sdk/middleware-signing": "3.130.0",
-        "@aws-sdk/middleware-stack": "3.127.0",
-        "@aws-sdk/middleware-user-agent": "3.127.0",
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/node-http-handler": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/smithy-client": "3.142.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/url-parser": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "@aws-sdk/util-base64-node": "3.55.0",
-        "@aws-sdk/util-body-length-browser": "3.154.0",
-        "@aws-sdk/util-body-length-node": "3.55.0",
-        "@aws-sdk/util-defaults-mode-browser": "3.142.0",
-        "@aws-sdk/util-defaults-mode-node": "3.142.0",
-        "@aws-sdk/util-user-agent-browser": "3.127.0",
-        "@aws-sdk/util-user-agent-node": "3.127.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "@aws-sdk/util-utf8-node": "3.109.0",
-        "entities": "2.2.0",
-        "fast-xml-parser": "3.19.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/credential-provider-env": "3.468.0",
+        "@aws-sdk/credential-provider-ini": "3.478.0",
+        "@aws-sdk/credential-provider-process": "3.468.0",
+        "@aws-sdk/credential-provider-sso": "3.478.0",
+        "@aws-sdk/credential-provider-web-identity": "3.468.0",
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/credential-provider-imds": "^2.0.0",
+        "@smithy/property-provider": "^2.0.0",
+        "@smithy/shared-ini-file-loader": "^2.0.6",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/config-resolver": {
-      "version": "3.130.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/credential-provider-process": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.468.0.tgz",
+      "integrity": "sha512-OYSn1A/UsyPJ7Z8Q2cNhTf55O36shPmSsvOfND04nSfu1nPaR+VUvvsP7v+brhGpwC/GAKTIdGAo4blH31BS6A==",
       "dependencies": {
-        "@aws-sdk/signature-v4": "3.130.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-config-provider": "3.109.0",
-        "@aws-sdk/util-middleware": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/property-provider": "^2.0.0",
+        "@smithy/shared-ini-file-loader": "^2.0.6",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/credential-provider-env": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/credential-provider-sso": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.478.0.tgz",
+      "integrity": "sha512-LsDShG51X/q+s5ZFN7kHVqrd8ZHdyEyHqdhoocmRvvw2Dif50M0AqQfvCrW1ndj5CNzXO4x/eH8EK5ZOVlS6Sg==",
       "dependencies": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/client-sso": "3.478.0",
+        "@aws-sdk/token-providers": "3.478.0",
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/property-provider": "^2.0.0",
+        "@smithy/shared-ini-file-loader": "^2.0.6",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/credential-provider-imds": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/credential-provider-web-identity": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.468.0.tgz",
+      "integrity": "sha512-rexymPmXjtkwCPfhnUq3EjO1rSkf39R4Jz9CqiM7OsqK2qlT5Y/V3gnMKn0ZMXsYaQOMfM3cT5xly5R+OKDHlw==",
       "dependencies": {
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/url-parser": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/property-provider": "^2.0.0",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/credential-provider-ini": {
-      "version": "3.154.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/lib-storage": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/lib-storage/-/lib-storage-3.478.0.tgz",
+      "integrity": "sha512-R1D+hX8Lea9mBZqj2A4hWkSNGCTv5pCsX/+fmfnFtmKL4gPn2MZ1GtnI6Rnk0zyTrQL94SpVc6CcEvhWsm5oiQ==",
       "dependencies": {
-        "@aws-sdk/credential-provider-env": "3.127.0",
-        "@aws-sdk/credential-provider-imds": "3.127.0",
-        "@aws-sdk/credential-provider-sso": "3.154.0",
-        "@aws-sdk/credential-provider-web-identity": "3.127.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@smithy/abort-controller": "^2.0.1",
+        "@smithy/middleware-endpoint": "^2.2.3",
+        "@smithy/smithy-client": "^2.1.18",
+        "buffer": "5.6.0",
+        "events": "3.3.0",
+        "stream-browserify": "3.0.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
+      },
+      "peerDependencies": {
+        "@aws-sdk/client-s3": "^3.0.0"
       }
     },
-    "node_modules/@aws-sdk/credential-provider-node": {
-      "version": "3.154.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/lib-storage/node_modules/buffer": {
+      "version": "5.6.0",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz",
+      "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==",
+      "license": "MIT",
       "dependencies": {
-        "@aws-sdk/credential-provider-env": "3.127.0",
-        "@aws-sdk/credential-provider-imds": "3.127.0",
-        "@aws-sdk/credential-provider-ini": "3.154.0",
-        "@aws-sdk/credential-provider-process": "3.127.0",
-        "@aws-sdk/credential-provider-sso": "3.154.0",
-        "@aws-sdk/credential-provider-web-identity": "3.127.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">=12.0.0"
+        "base64-js": "^1.0.2",
+        "ieee754": "^1.1.4"
       }
     },
-    "node_modules/@aws-sdk/credential-provider-process": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-bucket-endpoint": {
+      "version": "3.470.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.470.0.tgz",
+      "integrity": "sha512-vLXXNWtsRmEIwzJ9HUQfIuTNAsEzvCv0Icsnkvt2BiBZXnmHdp2vIC3e3+kfy1D7dVQloXqMmnfcLu/BUMu2Jw==",
       "dependencies": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@aws-sdk/util-arn-parser": "3.465.0",
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-config-provider": "^2.0.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/credential-provider-sso": {
-      "version": "3.154.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-expect-continue": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.468.0.tgz",
+      "integrity": "sha512-/wmLjmfgeulxhhmnxX3X3N933TvGsYckVIFjAtDSpLjqkbwzEcNiLq7AdmNJ4BfxG0MCMgcht561DCCD19x8Bg==",
       "dependencies": {
-        "@aws-sdk/client-sso": "3.154.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/credential-provider-web-identity": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-flexible-checksums": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.468.0.tgz",
+      "integrity": "sha512-LQwL/N5MCj3Y5keLLewHTqeAXUIMsHFZyxDXRm/uxrOon9ufLKDvGvzAmfwn1/CuSUo66ZfT8VPSA4BsC90RtA==",
       "dependencies": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-crypto/crc32": "3.0.0",
+        "@aws-crypto/crc32c": "3.0.0",
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/is-array-buffer": "^2.0.0",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-utf8": "^2.0.2",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/eventstream-codec": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-host-header": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.468.0.tgz",
+      "integrity": "sha512-gwQ+/QhX+lhof304r6zbZ/V5l5cjhGRxLL3CjH1uJPMcOAbw9wUlMdl+ibr8UwBZ5elfKFGiB1cdW/0uMchw0w==",
       "dependencies": {
-        "@aws-crypto/crc32": "2.0.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-hex-encoding": "3.109.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/eventstream-serde-browser": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-location-constraint": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.468.0.tgz",
+      "integrity": "sha512-0gBX/lDynQr4YIhM9h1dVnkVWqrg+34iOCVIUq8jHxzUzgZWglGkG9lHGGg0r1xkLTmegeoo1OKH8wrQ6n33Cg==",
       "dependencies": {
-        "@aws-sdk/eventstream-serde-universal": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/eventstream-serde-config-resolver": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-logger": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.468.0.tgz",
+      "integrity": "sha512-X5XHKV7DHRXI3f29SAhJPe/OxWRFgDWDMMCALfzhmJfCi6Jfh0M14cJKoC+nl+dk9lB+36+jKjhjETZaL2bPlA==",
       "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/eventstream-serde-node": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-recursion-detection": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.468.0.tgz",
+      "integrity": "sha512-vch9IQib2Ng9ucSyRW2eKNQXHUPb5jUPCLA5otTW/8nGjcOU37LxQG4WrxO7uaJ9Oe8hjHO+hViE3P0KISUhtA==",
       "dependencies": {
-        "@aws-sdk/eventstream-serde-universal": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/eventstream-serde-universal": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-sdk-s3": {
+      "version": "3.474.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.474.0.tgz",
+      "integrity": "sha512-62aAo/8u5daIabeJ+gseYeHeShe9eYH6mH+kfWmLsHybXCCv1EaD/ZkdXWNhL0HZ3bUI1z1SF1p8jjTAWALnwA==",
       "dependencies": {
-        "@aws-sdk/eventstream-codec": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@aws-sdk/util-arn-parser": "3.465.0",
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/signature-v4": "^2.0.0",
+        "@smithy/smithy-client": "^2.1.18",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-config-provider": "^2.0.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/fetch-http-handler": {
-      "version": "3.131.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-signing": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.468.0.tgz",
+      "integrity": "sha512-s+7fSB1gdnnTj5O0aCCarX3z5Vppop8kazbNSZADdkfHIDWCN80IH4ZNjY3OWqaAz0HmR4LNNrovdR304ojb4Q==",
       "dependencies": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/querystring-builder": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/property-provider": "^2.0.0",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/signature-v4": "^2.0.0",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-middleware": "^2.0.8",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/hash-blob-browser": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-ssec": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.468.0.tgz",
+      "integrity": "sha512-y1qLW24wRkOGBTK5d6eJXf6d8HYo4rzT4a1mNDN1rd18NSffwQ6Yke5qeUiIaxa0y/l+FvvNYErbhYtij2rJoQ==",
       "dependencies": {
-        "@aws-sdk/chunked-blob-reader": "3.55.0",
-        "@aws-sdk/chunked-blob-reader-native": "3.109.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/hash-node": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/middleware-user-agent": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.478.0.tgz",
+      "integrity": "sha512-Rec+nAPIzzwxgHPW+xqY6tooJGFOytpYg/xSRv8/IXl3xKGhmpMGs6gDWzmMBv/qy5nKTvLph/csNWJ98GWXCw==",
       "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-buffer-from": "3.55.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@aws-sdk/util-endpoints": "3.478.0",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/hash-stream-node": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/region-config-resolver": {
+      "version": "3.470.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.470.0.tgz",
+      "integrity": "sha512-C1o1J06iIw8cyAAOvHqT4Bbqf+PgQ/RDlSyjt2gFfP2OovDpc2o2S90dE8f8iZdSGpg70N5MikT1DBhW9NbhtQ==",
       "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-config-provider": "^2.0.0",
+        "@smithy/util-middleware": "^2.0.8",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/invalid-dependency": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+    "node_modules/@aws-sdk/signature-v4-multi-region": {
+      "version": "3.474.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.474.0.tgz",
+      "integrity": "sha512-93OWRQgTJZASXLrlUNX7mmXknNkYxFYldRLARmYQccONmnIqgYQW0lQj8BFwqkHJTzSMik3/UsU0SHKwZ9ynYA==",
+      "dependencies": {
+        "@aws-sdk/middleware-sdk-s3": "3.474.0",
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/signature-v4": "^2.0.0",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      }
+    },
+    "node_modules/@aws-sdk/token-providers": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.478.0.tgz",
+      "integrity": "sha512-7b5tj1y/wGHZIZ+ckjOUKgKrMuCJMF/G1UKZKIqqdekeEsjcThbvoxAMeY0FEowu2ODVk/ggOmpBFxcu0iYd6A==",
+      "dependencies": {
+        "@aws-crypto/sha256-browser": "3.0.0",
+        "@aws-crypto/sha256-js": "3.0.0",
+        "@aws-sdk/middleware-host-header": "3.468.0",
+        "@aws-sdk/middleware-logger": "3.468.0",
+        "@aws-sdk/middleware-recursion-detection": "3.468.0",
+        "@aws-sdk/middleware-user-agent": "3.478.0",
+        "@aws-sdk/region-config-resolver": "3.470.0",
+        "@aws-sdk/types": "3.468.0",
+        "@aws-sdk/util-endpoints": "3.478.0",
+        "@aws-sdk/util-user-agent-browser": "3.468.0",
+        "@aws-sdk/util-user-agent-node": "3.470.0",
+        "@smithy/config-resolver": "^2.0.21",
+        "@smithy/fetch-http-handler": "^2.3.1",
+        "@smithy/hash-node": "^2.0.17",
+        "@smithy/invalid-dependency": "^2.0.15",
+        "@smithy/middleware-content-length": "^2.0.17",
+        "@smithy/middleware-endpoint": "^2.2.3",
+        "@smithy/middleware-retry": "^2.0.24",
+        "@smithy/middleware-serde": "^2.0.15",
+        "@smithy/middleware-stack": "^2.0.9",
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/node-http-handler": "^2.2.1",
+        "@smithy/property-provider": "^2.0.0",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/shared-ini-file-loader": "^2.0.6",
+        "@smithy/smithy-client": "^2.1.18",
+        "@smithy/types": "^2.7.0",
+        "@smithy/url-parser": "^2.0.15",
+        "@smithy/util-base64": "^2.0.1",
+        "@smithy/util-body-length-browser": "^2.0.1",
+        "@smithy/util-body-length-node": "^2.1.0",
+        "@smithy/util-defaults-mode-browser": "^2.0.22",
+        "@smithy/util-defaults-mode-node": "^2.0.29",
+        "@smithy/util-endpoints": "^1.0.7",
+        "@smithy/util-retry": "^2.0.8",
+        "@smithy/util-utf8": "^2.0.2",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/is-array-buffer": {
-      "version": "3.55.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/types": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.468.0.tgz",
+      "integrity": "sha512-rx/9uHI4inRbp2tw3Y4Ih4PNZkVj32h7WneSg3MVgVjAoVD5Zti9KhS5hkvsBxfgmQmg0AQbE+b1sy5WGAgntA==",
       "dependencies": {
-        "tslib": "^2.3.1"
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/lib-storage": {
-      "version": "3.154.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/util-arn-parser": {
+      "version": "3.465.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.465.0.tgz",
+      "integrity": "sha512-zOJ82vzDJFqBX9yZBlNeHHrul/kpx/DCoxzW5UBbZeb26kfV53QhMSoEmY8/lEbBqlqargJ/sgRC845GFhHNQw==",
       "dependencies": {
-        "@aws-sdk/smithy-client": "3.142.0",
-        "buffer": "5.6.0",
-        "events": "3.3.0",
-        "stream-browserify": "3.0.0",
-        "tslib": "^2.3.1"
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
-      },
-      "peerDependencies": {
-        "@aws-sdk/abort-controller": "^3.0.0",
-        "@aws-sdk/client-s3": "^3.0.0"
-      }
-    },
-    "node_modules/@aws-sdk/lib-storage/node_modules/buffer": {
-      "version": "5.6.0",
-      "license": "MIT",
-      "dependencies": {
-        "base64-js": "^1.0.2",
-        "ieee754": "^1.1.4"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/md5-js": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/util-endpoints": {
+      "version": "3.478.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.478.0.tgz",
+      "integrity": "sha512-u9Mcg3euGJGs5clPt9mBuhBjHiEKiD0PnfvArhfq9i+dcY5mbCq/i1Dezp3iv1fZH9xxQt7hPXDfSpt1yUSM6g==",
       "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "@aws-sdk/util-utf8-node": "3.109.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/util-endpoints": "^1.0.7",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-bucket-endpoint": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/util-locate-window": {
+      "version": "3.465.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.465.0.tgz",
+      "integrity": "sha512-f+QNcWGswredzC1ExNAB/QzODlxwaTdXkNT5cvke2RLX8SFU5pYk6h4uCtWC0vWPELzOfMfloBrJefBzlarhsw==",
       "dependencies": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-arn-parser": "3.55.0",
-        "@aws-sdk/util-config-provider": "3.109.0",
-        "tslib": "^2.3.1"
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-content-length": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/util-user-agent-browser": {
+      "version": "3.468.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.468.0.tgz",
+      "integrity": "sha512-OJyhWWsDEizR3L+dCgMXSUmaCywkiZ7HSbnQytbeKGwokIhD69HTiJcibF/sgcM5gk4k3Mq3puUhGnEZ46GIig==",
       "dependencies": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">= 12.0.0"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/types": "^2.7.0",
+        "bowser": "^2.11.0",
+        "tslib": "^2.5.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-expect-continue": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/util-user-agent-node": {
+      "version": "3.470.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.470.0.tgz",
+      "integrity": "sha512-QxsZ9iVHcBB/XRdYvwfM5AMvNp58HfqkIrH88mY0cmxuvtlIGDfWjczdDrZMJk9y0vIq+cuoCHsGXHu7PyiEAQ==",
       "dependencies": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@aws-sdk/types": "3.468.0",
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
+      },
+      "peerDependencies": {
+        "aws-crt": ">=1.0.0"
+      },
+      "peerDependenciesMeta": {
+        "aws-crt": {
+          "optional": true
+        }
       }
     },
-    "node_modules/@aws-sdk/middleware-flexible-checksums": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/util-utf8-browser": {
+      "version": "3.259.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz",
+      "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==",
       "dependencies": {
-        "@aws-crypto/crc32": "2.0.0",
-        "@aws-crypto/crc32c": "2.0.0",
-        "@aws-sdk/is-array-buffer": "3.55.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
         "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">= 12.0.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-host-header": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@aws-sdk/xml-builder": {
+      "version": "3.472.0",
+      "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.472.0.tgz",
+      "integrity": "sha512-PwjVxz1hr9up8QkddabuScPZ/d5aDHgvHYgK4acHYzltXL4wngfvimi5ZqXTzVWF2QANxHmWnHUr45QJX71oJQ==",
       "dependencies": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-location-constraint": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/code-frame": {
+      "version": "7.23.5",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
+      "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/highlight": "^7.23.4",
+        "chalk": "^2.4.2"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-logger": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      },
+    "node_modules/@babel/compat-data": {
+      "version": "7.23.5",
+      "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz",
+      "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==",
+      "dev": true,
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-recursion-detection": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+    "node_modules/@babel/core": {
+      "version": "7.23.7",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz",
+      "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==",
+      "dev": true,
+      "dependencies": {
+        "@ampproject/remapping": "^2.2.0",
+        "@babel/code-frame": "^7.23.5",
+        "@babel/generator": "^7.23.6",
+        "@babel/helper-compilation-targets": "^7.23.6",
+        "@babel/helper-module-transforms": "^7.23.3",
+        "@babel/helpers": "^7.23.7",
+        "@babel/parser": "^7.23.6",
+        "@babel/template": "^7.22.15",
+        "@babel/traverse": "^7.23.7",
+        "@babel/types": "^7.23.6",
+        "convert-source-map": "^2.0.0",
+        "debug": "^4.1.0",
+        "gensync": "^1.0.0-beta.2",
+        "json5": "^2.2.3",
+        "semver": "^6.3.1"
       },
       "engines": {
-        "node": ">= 12.0.0"
-      }
-    },
-    "node_modules/@aws-sdk/middleware-retry": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/service-error-classification": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-middleware": "3.127.0",
-        "tslib": "^2.3.1",
-        "uuid": "^8.3.2"
+        "node": ">=6.9.0"
       },
-      "engines": {
-        "node": ">= 12.0.0"
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/babel"
       }
     },
-    "node_modules/@aws-sdk/middleware-sdk-s3": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/middleware-bucket-endpoint": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-arn-parser": "3.55.0",
-        "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">= 12.0.0"
+    "node_modules/@babel/core/node_modules/semver": {
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+      "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+      "dev": true,
+      "bin": {
+        "semver": "bin/semver.js"
       }
     },
-    "node_modules/@aws-sdk/middleware-sdk-sts": {
-      "version": "3.130.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/generator": {
+      "version": "7.23.6",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz",
+      "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/middleware-signing": "3.130.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/signature-v4": "3.130.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/types": "^7.23.6",
+        "@jridgewell/gen-mapping": "^0.3.2",
+        "@jridgewell/trace-mapping": "^0.3.17",
+        "jsesc": "^2.5.1"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-serde": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helper-compilation-targets": {
+      "version": "7.23.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz",
+      "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/compat-data": "^7.23.5",
+        "@babel/helper-validator-option": "^7.23.5",
+        "browserslist": "^4.22.2",
+        "lru-cache": "^5.1.1",
+        "semver": "^6.3.1"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-signing": {
-      "version": "3.130.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+      "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/signature-v4": "3.130.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">= 12.0.0"
+        "yallist": "^3.0.2"
       }
     },
-    "node_modules/@aws-sdk/middleware-ssec": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">= 12.0.0"
+    "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+      "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+      "dev": true,
+      "bin": {
+        "semver": "bin/semver.js"
       }
     },
-    "node_modules/@aws-sdk/middleware-stack": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "tslib": "^2.3.1"
-      },
+    "node_modules/@babel/helper-compilation-targets/node_modules/yallist": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+      "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+      "dev": true
+    },
+    "node_modules/@babel/helper-environment-visitor": {
+      "version": "7.22.20",
+      "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
+      "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
+      "dev": true,
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/middleware-user-agent": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helper-function-name": {
+      "version": "7.23.0",
+      "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
+      "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/template": "^7.22.15",
+        "@babel/types": "^7.23.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/node-config-provider": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helper-hoist-variables": {
+      "version": "7.22.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
+      "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/types": "^7.22.5"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/node-http-handler": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helper-module-imports": {
+      "version": "7.22.15",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz",
+      "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/abort-controller": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/querystring-builder": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/types": "^7.22.15"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/property-provider": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helper-module-transforms": {
+      "version": "7.23.3",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz",
+      "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-environment-visitor": "^7.22.20",
+        "@babel/helper-module-imports": "^7.22.15",
+        "@babel/helper-simple-access": "^7.22.5",
+        "@babel/helper-split-export-declaration": "^7.22.6",
+        "@babel/helper-validator-identifier": "^7.22.20"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0"
       }
     },
-    "node_modules/@aws-sdk/protocol-http": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      },
+    "node_modules/@babel/helper-plugin-utils": {
+      "version": "7.22.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz",
+      "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==",
+      "dev": true,
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/querystring-builder": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helper-simple-access": {
+      "version": "7.22.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",
+      "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-uri-escape": "3.55.0",
-        "tslib": "^2.3.1"
+        "@babel/types": "^7.22.5"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/querystring-parser": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helper-split-export-declaration": {
+      "version": "7.22.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
+      "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/types": "^7.22.5"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/service-error-classification": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helper-string-parser": {
+      "version": "7.23.4",
+      "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz",
+      "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==",
+      "dev": true,
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/shared-ini-file-loader": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "tslib": "^2.3.1"
-      },
+    "node_modules/@babel/helper-validator-identifier": {
+      "version": "7.22.20",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
+      "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
+      "dev": true,
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/signature-v4": {
-      "version": "3.130.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/is-array-buffer": "3.55.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-hex-encoding": "3.109.0",
-        "@aws-sdk/util-middleware": "3.127.0",
-        "@aws-sdk/util-uri-escape": "3.55.0",
-        "tslib": "^2.3.1"
-      },
+    "node_modules/@babel/helper-validator-option": {
+      "version": "7.23.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz",
+      "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==",
+      "dev": true,
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/signature-v4-multi-region": {
-      "version": "3.130.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/helpers": {
+      "version": "7.23.7",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.7.tgz",
+      "integrity": "sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/signature-v4": "3.130.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-arn-parser": "3.55.0",
-        "tslib": "^2.3.1"
+        "@babel/template": "^7.22.15",
+        "@babel/traverse": "^7.23.7",
+        "@babel/types": "^7.23.6"
       },
       "engines": {
-        "node": ">= 12.0.0"
-      },
-      "peerDependencies": {
-        "@aws-sdk/signature-v4-crt": "^3.118.0"
-      },
-      "peerDependenciesMeta": {
-        "@aws-sdk/signature-v4-crt": {
-          "optional": true
-        }
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/smithy-client": {
-      "version": "3.142.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/highlight": {
+      "version": "7.23.4",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz",
+      "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/middleware-stack": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-validator-identifier": "^7.22.20",
+        "chalk": "^2.4.2",
+        "js-tokens": "^4.0.0"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@aws-sdk/types": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/parser": {
+      "version": "7.23.6",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz",
+      "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==",
+      "dev": true,
+      "bin": {
+        "parser": "bin/babel-parser.js"
+      },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.0.0"
       }
     },
-    "node_modules/@aws-sdk/url-parser": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-async-generators": {
+      "version": "7.8.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
+      "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/querystring-parser": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.8.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-arn-parser": {
-      "version": "3.55.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-bigint": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz",
+      "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==",
+      "dev": true,
       "dependencies": {
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.8.0"
       },
-      "engines": {
-        "node": ">= 12.0.0"
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-base64-browser": {
-      "version": "3.109.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-class-properties": {
+      "version": "7.12.13",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
+      "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
+      "dev": true,
       "dependencies": {
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.12.13"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-base64-node": {
-      "version": "3.55.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-import-meta": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz",
+      "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/util-buffer-from": "3.55.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.10.4"
       },
-      "engines": {
-        "node": ">= 12.0.0"
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-body-length-browser": {
-      "version": "3.154.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-json-strings": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
+      "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
+      "dev": true,
       "dependencies": {
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.8.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-body-length-node": {
-      "version": "3.55.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-jsx": {
+      "version": "7.23.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz",
+      "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==",
+      "dev": true,
       "dependencies": {
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.22.5"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-buffer-from": {
-      "version": "3.55.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-logical-assignment-operators": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
+      "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/is-array-buffer": "3.55.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.10.4"
       },
-      "engines": {
-        "node": ">= 12.0.0"
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-config-provider": {
-      "version": "3.109.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
+      "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
+      "dev": true,
       "dependencies": {
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.8.0"
       },
-      "engines": {
-        "node": ">= 12.0.0"
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-defaults-mode-browser": {
-      "version": "3.142.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-numeric-separator": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
+      "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "bowser": "^2.11.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.10.4"
       },
-      "engines": {
-        "node": ">= 10.0.0"
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-defaults-mode-node": {
-      "version": "3.142.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-object-rest-spread": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
+      "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/config-resolver": "3.130.0",
-        "@aws-sdk/credential-provider-imds": "3.127.0",
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.8.0"
       },
-      "engines": {
-        "node": ">= 10.0.0"
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-hex-encoding": {
-      "version": "3.109.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">= 12.0.0"
-      }
-    },
-    "node_modules/@aws-sdk/util-locate-window": {
-      "version": "3.55.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">= 12.0.0"
-      }
-    },
-    "node_modules/@aws-sdk/util-middleware": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "tslib": "^2.3.1"
-      },
-      "engines": {
-        "node": ">= 12.0.0"
-      }
-    },
-    "node_modules/@aws-sdk/util-stream-browser": {
-      "version": "3.131.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/fetch-http-handler": "3.131.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "@aws-sdk/util-hex-encoding": "3.109.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "node_modules/@aws-sdk/util-stream-node": {
-      "version": "3.129.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-optional-catch-binding": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
+      "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/node-http-handler": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-buffer-from": "3.55.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.8.0"
       },
-      "engines": {
-        "node": ">= 12.0.0"
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-uri-escape": {
-      "version": "3.55.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-optional-chaining": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
+      "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
+      "dev": true,
       "dependencies": {
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.8.0"
       },
-      "engines": {
-        "node": ">= 12.0.0"
-      }
-    },
-    "node_modules/@aws-sdk/util-user-agent-browser": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/types": "3.127.0",
-        "bowser": "^2.11.0",
-        "tslib": "^2.3.1"
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-user-agent-node": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-top-level-await": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz",
+      "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.14.5"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       },
       "peerDependencies": {
-        "aws-crt": ">=1.0.0"
-      },
-      "peerDependenciesMeta": {
-        "aws-crt": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@aws-sdk/util-utf8-browser": {
-      "version": "3.109.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "tslib": "^2.3.1"
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/util-utf8-node": {
-      "version": "3.109.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/plugin-syntax-typescript": {
+      "version": "7.23.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz",
+      "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==",
+      "dev": true,
       "dependencies": {
-        "@aws-sdk/util-buffer-from": "3.55.0",
-        "tslib": "^2.3.1"
+        "@babel/helper-plugin-utils": "^7.22.5"
       },
       "engines": {
-        "node": ">= 12.0.0"
-      }
-    },
-    "node_modules/@aws-sdk/util-waiter": {
-      "version": "3.127.0",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@aws-sdk/abort-controller": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
+        "node": ">=6.9.0"
       },
-      "engines": {
-        "node": ">= 12.0.0"
+      "peerDependencies": {
+        "@babel/core": "^7.0.0-0"
       }
     },
-    "node_modules/@aws-sdk/xml-builder": {
-      "version": "3.142.0",
-      "license": "Apache-2.0",
+    "node_modules/@babel/template": {
+      "version": "7.22.15",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
+      "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
+      "dev": true,
       "dependencies": {
-        "tslib": "^2.3.1"
+        "@babel/code-frame": "^7.22.13",
+        "@babel/parser": "^7.22.15",
+        "@babel/types": "^7.22.15"
       },
       "engines": {
-        "node": ">= 12.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@babel/code-frame": {
-      "version": "7.18.6",
-      "license": "MIT",
-      "dependencies": {
-        "@babel/highlight": "^7.18.6"
+    "node_modules/@babel/traverse": {
+      "version": "7.23.7",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz",
+      "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==",
+      "dev": true,
+      "dependencies": {
+        "@babel/code-frame": "^7.23.5",
+        "@babel/generator": "^7.23.6",
+        "@babel/helper-environment-visitor": "^7.22.20",
+        "@babel/helper-function-name": "^7.23.0",
+        "@babel/helper-hoist-variables": "^7.22.5",
+        "@babel/helper-split-export-declaration": "^7.22.6",
+        "@babel/parser": "^7.23.6",
+        "@babel/types": "^7.23.6",
+        "debug": "^4.3.1",
+        "globals": "^11.1.0"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
-    "node_modules/@babel/compat-data": {
-      "version": "7.18.13",
+    "node_modules/@babel/traverse/node_modules/globals": {
+      "version": "11.12.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+      "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
       "dev": true,
-      "license": "MIT",
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=4"
       }
     },
-    "node_modules/@babel/core": {
-      "version": "7.18.13",
+    "node_modules/@babel/types": {
+      "version": "7.23.6",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz",
+      "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@ampproject/remapping": "^2.1.0",
-        "@babel/code-frame": "^7.18.6",
-        "@babel/generator": "^7.18.13",
-        "@babel/helper-compilation-targets": "^7.18.9",
-        "@babel/helper-module-transforms": "^7.18.9",
-        "@babel/helpers": "^7.18.9",
-        "@babel/parser": "^7.18.13",
-        "@babel/template": "^7.18.10",
-        "@babel/traverse": "^7.18.13",
-        "@babel/types": "^7.18.13",
-        "convert-source-map": "^1.7.0",
-        "debug": "^4.1.0",
-        "gensync": "^1.0.0-beta.2",
-        "json5": "^2.2.1",
-        "semver": "^6.3.0"
+        "@babel/helper-string-parser": "^7.23.4",
+        "@babel/helper-validator-identifier": "^7.22.20",
+        "to-fast-properties": "^2.0.0"
       },
       "engines": {
         "node": ">=6.9.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/babel"
       }
     },
-    "node_modules/@babel/core/node_modules/semver": {
-      "version": "6.3.0",
-      "dev": true,
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver.js"
-      }
+    "node_modules/@bcoe/v8-coverage": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
+      "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
+      "dev": true
     },
-    "node_modules/@babel/generator": {
-      "version": "7.18.13",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@chainsafe/is-ip": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/@chainsafe/is-ip/-/is-ip-2.0.2.tgz",
+      "integrity": "sha512-ndGqEMG1W5WkGagaqOZHpPU172AGdxr+LD15sv3WIUvT5oCFUrG1Y0CW/v2Egwj4JXEvSibaIIIqImsm98y1nA=="
+    },
+    "node_modules/@chainsafe/netmask": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@chainsafe/netmask/-/netmask-2.0.0.tgz",
+      "integrity": "sha512-I3Z+6SWUoaljh3TBzCnCxjlUyN8tA+NAk5L6m9IxvCf1BENQTePzPMis97CoN/iMW1St3WN+AWCCRp+TTBRiDg==",
       "dependencies": {
-        "@babel/types": "^7.18.13",
-        "@jridgewell/gen-mapping": "^0.3.2",
-        "jsesc": "^2.5.1"
-      },
-      "engines": {
-        "node": ">=6.9.0"
+        "@chainsafe/is-ip": "^2.0.1"
       }
     },
-    "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": {
-      "version": "0.3.2",
+    "node_modules/@eslint/eslintrc": {
+      "version": "1.0.5",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@jridgewell/set-array": "^1.0.1",
-        "@jridgewell/sourcemap-codec": "^1.4.10",
-        "@jridgewell/trace-mapping": "^0.3.9"
+        "ajv": "^6.12.4",
+        "debug": "^4.3.2",
+        "espree": "^9.2.0",
+        "globals": "^13.9.0",
+        "ignore": "^4.0.6",
+        "import-fresh": "^3.2.1",
+        "js-yaml": "^4.1.0",
+        "minimatch": "^3.0.4",
+        "strip-json-comments": "^3.1.1"
       },
       "engines": {
-        "node": ">=6.0.0"
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
       }
     },
-    "node_modules/@babel/helper-compilation-targets": {
-      "version": "7.18.9",
+    "node_modules/@eslint/eslintrc/node_modules/argparse": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+      "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+      "dev": true,
+      "license": "Python-2.0"
+    },
+    "node_modules/@eslint/eslintrc/node_modules/js-yaml": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+      "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/compat-data": "^7.18.8",
-        "@babel/helper-validator-option": "^7.18.6",
-        "browserslist": "^4.20.2",
-        "semver": "^6.3.0"
-      },
-      "engines": {
-        "node": ">=6.9.0"
+        "argparse": "^2.0.1"
       },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0"
-      }
-    },
-    "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
-      "version": "6.3.0",
-      "dev": true,
-      "license": "ISC",
       "bin": {
-        "semver": "bin/semver.js"
+        "js-yaml": "bin/js-yaml.js"
       }
     },
-    "node_modules/@babel/helper-environment-visitor": {
-      "version": "7.18.9",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@fastify/busboy": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz",
+      "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==",
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=14"
       }
     },
-    "node_modules/@babel/helper-function-name": {
-      "version": "7.18.9",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@filebase/sdk": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/@filebase/sdk/-/sdk-1.0.2.tgz",
+      "integrity": "sha512-ZtDXAE89QHKV8qLq33qG5pGz1yNqMcNAKywNGucy8LBbUQZoiqQgEnQ9bQhgfE3yj4JYw2zqJ9A1yYhuKXGBfQ==",
       "dependencies": {
-        "@babel/template": "^7.18.6",
-        "@babel/types": "^7.18.9"
+        "@aws-sdk/client-s3": "3.478.0",
+        "@aws-sdk/lib-storage": "3.478.0",
+        "@helia/car": "1.0.4",
+        "@helia/unixfs": "1.4.3",
+        "@ipld/car": "5.2.4",
+        "axios": "1.6.2",
+        "blockstore-fs": "1.1.8",
+        "uuid": "9.0.1"
       },
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=16.0.0",
+        "npm": ">=8.0.0"
       }
     },
-    "node_modules/@babel/helper-hoist-variables": {
-      "version": "7.18.6",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@filebase/sdk/node_modules/@ipld/car": {
+      "version": "5.2.4",
+      "resolved": "https://registry.npmjs.org/@ipld/car/-/car-5.2.4.tgz",
+      "integrity": "sha512-YoVXE/o5HLXKi/Oqh9Nhcn423sdn9brRFKnbUid68/1D332/XINcoyCTvBluFcCw/9IeiTx+sEAV+onXZ/A4eA==",
       "dependencies": {
-        "@babel/types": "^7.18.6"
+        "@ipld/dag-cbor": "^9.0.0",
+        "cborg": "^4.0.0",
+        "multiformats": "^12.1.0",
+        "varint": "^6.0.0"
       },
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/helper-module-imports": {
-      "version": "7.18.6",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@filebase/sdk/node_modules/axios": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz",
+      "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==",
       "dependencies": {
-        "@babel/types": "^7.18.6"
-      },
-      "engines": {
-        "node": ">=6.9.0"
+        "follow-redirects": "^1.15.0",
+        "form-data": "^4.0.0",
+        "proxy-from-env": "^1.1.0"
       }
     },
-    "node_modules/@babel/helper-module-transforms": {
-      "version": "7.18.9",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@babel/helper-environment-visitor": "^7.18.9",
-        "@babel/helper-module-imports": "^7.18.6",
-        "@babel/helper-simple-access": "^7.18.6",
-        "@babel/helper-split-export-declaration": "^7.18.6",
-        "@babel/helper-validator-identifier": "^7.18.6",
-        "@babel/template": "^7.18.6",
-        "@babel/traverse": "^7.18.9",
-        "@babel/types": "^7.18.9"
-      },
+    "node_modules/@filebase/sdk/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/helper-plugin-utils": {
-      "version": "7.18.9",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=6.9.0"
+    "node_modules/@filebase/sdk/node_modules/uuid": {
+      "version": "9.0.1",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
+      "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
+      "funding": [
+        "https://github.com/sponsors/broofa",
+        "https://github.com/sponsors/ctavan"
+      ],
+      "bin": {
+        "uuid": "dist/bin/uuid"
       }
     },
-    "node_modules/@babel/helper-simple-access": {
-      "version": "7.18.6",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@filebase/sdk/node_modules/varint": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz",
+      "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg=="
+    },
+    "node_modules/@helia/car": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/@helia/car/-/car-1.0.4.tgz",
+      "integrity": "sha512-HcHMC/eTRCFt3jrLkMvqKD7Og92PpNoBZTMQ9R+dOvtyIlZ2iG4zYRm2DipPdDi+OvXCqaPNg0oJxDx5fBnjRw==",
+      "dependencies": {
+        "@helia/interface": "^2.0.0",
+        "@ipld/car": "^5.1.1",
+        "@ipld/dag-pb": "^4.0.0",
+        "@libp2p/interfaces": "^3.3.1",
+        "cborg": "^4.0.3",
+        "interface-blockstore": "^5.0.0",
+        "it-map": "^3.0.3",
+        "multiformats": "^12.0.1",
+        "p-defer": "^4.0.0",
+        "p-queue": "^7.3.4",
+        "progress-events": "^1.0.0"
+      }
+    },
+    "node_modules/@helia/car/node_modules/@ipld/car": {
+      "version": "5.2.4",
+      "resolved": "https://registry.npmjs.org/@ipld/car/-/car-5.2.4.tgz",
+      "integrity": "sha512-YoVXE/o5HLXKi/Oqh9Nhcn423sdn9brRFKnbUid68/1D332/XINcoyCTvBluFcCw/9IeiTx+sEAV+onXZ/A4eA==",
       "dependencies": {
-        "@babel/types": "^7.18.6"
+        "@ipld/dag-cbor": "^9.0.0",
+        "cborg": "^4.0.0",
+        "multiformats": "^12.1.0",
+        "varint": "^6.0.0"
       },
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/helper-split-export-declaration": {
-      "version": "7.18.6",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/car/node_modules/interface-blockstore": {
+      "version": "5.2.8",
+      "resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.2.8.tgz",
+      "integrity": "sha512-C889pHW6hlVzJ0xjguXp6OK8ZeRMu/U8S2QjC/VnQQZXEGDXQDOn0fiYIJngOtb0q82UgxxQCjfTsRhpLfEE8g==",
       "dependencies": {
-        "@babel/types": "^7.18.6"
-      },
-      "engines": {
-        "node": ">=6.9.0"
+        "interface-store": "^5.0.0",
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/@babel/helper-string-parser": {
-      "version": "7.18.10",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=6.9.0"
+    "node_modules/@helia/car/node_modules/interface-blockstore/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/@helia/car/node_modules/interface-store": {
+      "version": "5.1.5",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.5.tgz",
+      "integrity": "sha512-X0KnJBk3o+YL13MxZBMwa88/b3Mdrpm0yPzkSTKDDVn9BSPH7UK6W+ZtIPO2bxKOQVmq7zqOwAnYnpfqWjb6/g=="
+    },
+    "node_modules/@helia/car/node_modules/it-map": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/it-map/-/it-map-3.0.5.tgz",
+      "integrity": "sha512-hB0TDXo/h4KSJJDSRLgAPmDroiXP6Fx1ck4Bzl3US9hHfZweTKsuiP0y4gXuTMcJlS6vj0bb+f70rhkD47ZA3w==",
+      "dependencies": {
+        "it-peekable": "^3.0.0"
       }
     },
-    "node_modules/@babel/helper-validator-identifier": {
-      "version": "7.18.6",
-      "license": "MIT",
+    "node_modules/@helia/car/node_modules/it-peekable": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.3.tgz",
+      "integrity": "sha512-Wx21JX/rMzTEl9flx3DGHuPV1KQFGOl8uoKfQtmZHgPQtGb89eQ6RyVd82h3HuP9Ghpt0WgBDlmmdWeHXqyx7w=="
+    },
+    "node_modules/@helia/car/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/helper-validator-option": {
-      "version": "7.18.6",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/car/node_modules/p-defer": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-4.0.0.tgz",
+      "integrity": "sha512-Vb3QRvQ0Y5XnF40ZUWW7JfLogicVh/EnA5gBIvKDJoYpeI82+1E3AlB9yOcKFS0AhHrWVnAQO39fbR0G99IVEQ==",
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/@babel/helpers": {
-      "version": "7.18.9",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/car/node_modules/varint": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz",
+      "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg=="
+    },
+    "node_modules/@helia/interface": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/@helia/interface/-/interface-2.1.0.tgz",
+      "integrity": "sha512-Z7PwuDIR0BODfSMzYcdzgdTYLsshCawAoPvGuuazvBddWSD9y82/QBmsWp6CTkyM/ziEaWbz5wERmRS+wejDLg==",
       "dependencies": {
-        "@babel/template": "^7.18.6",
-        "@babel/traverse": "^7.18.9",
-        "@babel/types": "^7.18.9"
-      },
-      "engines": {
-        "node": ">=6.9.0"
+        "@libp2p/interface": "^0.1.1",
+        "interface-blockstore": "^5.0.0",
+        "interface-datastore": "^8.0.0",
+        "interface-store": "^5.0.1",
+        "ipfs-bitswap": "^19.0.0",
+        "multiformats": "^12.0.1",
+        "progress-events": "^1.0.0"
       }
     },
-    "node_modules/@babel/highlight": {
-      "version": "7.18.6",
-      "license": "MIT",
+    "node_modules/@helia/interface/node_modules/interface-blockstore": {
+      "version": "5.2.8",
+      "resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.2.8.tgz",
+      "integrity": "sha512-C889pHW6hlVzJ0xjguXp6OK8ZeRMu/U8S2QjC/VnQQZXEGDXQDOn0fiYIJngOtb0q82UgxxQCjfTsRhpLfEE8g==",
       "dependencies": {
-        "@babel/helper-validator-identifier": "^7.18.6",
-        "chalk": "^2.0.0",
-        "js-tokens": "^4.0.0"
-      },
+        "interface-store": "^5.0.0",
+        "multiformats": "^13.0.0"
+      }
+    },
+    "node_modules/@helia/interface/node_modules/interface-blockstore/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/@helia/interface/node_modules/interface-datastore": {
+      "version": "8.2.9",
+      "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.9.tgz",
+      "integrity": "sha512-J/8PN8TnB5xxCRtgu9Vx3zExdOzcTU5/DBF2dlU41deX1GW6/SPpbJo5DRNSnvzfjmwJ7YhUOIFXyccUp8nuAA==",
+      "dependencies": {
+        "interface-store": "^5.0.0",
+        "uint8arrays": "^5.0.0"
+      }
+    },
+    "node_modules/@helia/interface/node_modules/interface-store": {
+      "version": "5.1.5",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.5.tgz",
+      "integrity": "sha512-X0KnJBk3o+YL13MxZBMwa88/b3Mdrpm0yPzkSTKDDVn9BSPH7UK6W+ZtIPO2bxKOQVmq7zqOwAnYnpfqWjb6/g=="
+    },
+    "node_modules/@helia/interface/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/parser": {
-      "version": "7.18.13",
-      "dev": true,
-      "license": "MIT",
-      "bin": {
-        "parser": "bin/babel-parser.js"
+    "node_modules/@helia/interface/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
+      "dependencies": {
+        "multiformats": "^13.0.0"
+      }
+    },
+    "node_modules/@helia/interface/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/@helia/unixfs": {
+      "version": "1.4.3",
+      "resolved": "https://registry.npmjs.org/@helia/unixfs/-/unixfs-1.4.3.tgz",
+      "integrity": "sha512-jS0En8fGhb01XH+nnxo3kQsmc1lwBEdlttAZFvTo7HCjBGPNFuaYdwTqF9S1wMVWV2fWqj7eS2zBZZa0MDsi1Q==",
+      "dependencies": {
+        "@helia/interface": "^2.0.0",
+        "@ipld/dag-pb": "^4.0.0",
+        "@libp2p/interface": "^0.1.2",
+        "@libp2p/logger": "^3.0.2",
+        "@multiformats/murmur3": "^2.1.2",
+        "hamt-sharding": "^3.0.2",
+        "interface-blockstore": "^5.0.0",
+        "ipfs-unixfs": "^11.0.0",
+        "ipfs-unixfs-exporter": "^13.1.0",
+        "ipfs-unixfs-importer": "^15.1.0",
+        "it-glob": "^2.0.4",
+        "it-last": "^3.0.1",
+        "it-pipe": "^3.0.1",
+        "merge-options": "^3.0.4",
+        "multiformats": "^12.1.1",
+        "progress-events": "^1.0.0",
+        "sparse-array": "^1.3.2"
+      }
+    },
+    "node_modules/@helia/unixfs/node_modules/@multiformats/murmur3": {
+      "version": "2.1.7",
+      "resolved": "https://registry.npmjs.org/@multiformats/murmur3/-/murmur3-2.1.7.tgz",
+      "integrity": "sha512-Yf0UpAaONjed+8PTt5NM/GG4Z4Ai4m1qfT7bqevjnkwRQ12K+0jxtRomirz+VJx4PokpA2St1ZSD1iMkZTqPRQ==",
+      "dependencies": {
+        "multiformats": "^12.0.1",
+        "murmurhash3js-revisited": "^3.0.0"
       },
       "engines": {
-        "node": ">=6.0.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-async-generators": {
-      "version": "7.8.4",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/brace-expansion": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+      "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+        "balanced-match": "^1.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-bigint": {
-      "version": "7.8.3",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/hamt-sharding": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/hamt-sharding/-/hamt-sharding-3.0.2.tgz",
+      "integrity": "sha512-f0DzBD2tSmLFdFsLAvOflIBqFPjerbA7BfmwO8mVho/5hXwgyyYhv+ijIzidQf/DpDX3bRjAQvhGoBFj+DBvPw==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.8.0"
+        "sparse-array": "^1.3.1",
+        "uint8arrays": "^4.0.2"
       },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-class-properties": {
-      "version": "7.12.13",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/interface-blockstore": {
+      "version": "5.2.8",
+      "resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.2.8.tgz",
+      "integrity": "sha512-C889pHW6hlVzJ0xjguXp6OK8ZeRMu/U8S2QjC/VnQQZXEGDXQDOn0fiYIJngOtb0q82UgxxQCjfTsRhpLfEE8g==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.12.13"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+        "interface-store": "^5.0.0",
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-import-meta": {
-      "version": "7.10.4",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/interface-blockstore/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/@helia/unixfs/node_modules/interface-store": {
+      "version": "5.1.5",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.5.tgz",
+      "integrity": "sha512-X0KnJBk3o+YL13MxZBMwa88/b3Mdrpm0yPzkSTKDDVn9BSPH7UK6W+ZtIPO2bxKOQVmq7zqOwAnYnpfqWjb6/g=="
+    },
+    "node_modules/@helia/unixfs/node_modules/ipfs-unixfs": {
+      "version": "11.1.2",
+      "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-11.1.2.tgz",
+      "integrity": "sha512-HVjrACOhU8RgMskcrfydk+FDAE9pFKr8tneKLaVYQ2f81HUKXoiSdgsAJY/jt7Ieyj4tE12TZGduIeWtNpScOw==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.10.4"
+        "err-code": "^3.0.1",
+        "protons-runtime": "^5.0.0",
+        "uint8arraylist": "^2.4.3"
       },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-json-strings": {
-      "version": "7.8.3",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter": {
+      "version": "13.2.5",
+      "resolved": "https://registry.npmjs.org/ipfs-unixfs-exporter/-/ipfs-unixfs-exporter-13.2.5.tgz",
+      "integrity": "sha512-NkrLCE8qOrM7InhUWzgZ6ZtJGVFrb2oEqmd0PWNiT8QhD8Aw2dS2wBuiG2yoJ34qPm4MgMfQa3FOxmteg3JjsQ==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.8.0"
+        "@ipld/dag-cbor": "^9.0.0",
+        "@ipld/dag-pb": "^4.0.0",
+        "@multiformats/murmur3": "^2.0.0",
+        "err-code": "^3.0.1",
+        "hamt-sharding": "^3.0.0",
+        "interface-blockstore": "^5.0.0",
+        "ipfs-unixfs": "^11.0.0",
+        "it-filter": "^3.0.2",
+        "it-last": "^3.0.2",
+        "it-map": "^3.0.3",
+        "it-parallel": "^3.0.0",
+        "it-pipe": "^3.0.1",
+        "it-pushable": "^3.1.0",
+        "multiformats": "^13.0.0",
+        "p-queue": "^8.0.1",
+        "progress-events": "^1.0.0",
+        "uint8arrays": "^5.0.0"
       },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-logical-assignment-operators": {
-      "version": "7.10.4",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/@helia/unixfs/node_modules/ipfs-unixfs-exporter/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.10.4"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": {
-      "version": "7.8.3",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer": {
+      "version": "15.2.3",
+      "resolved": "https://registry.npmjs.org/ipfs-unixfs-importer/-/ipfs-unixfs-importer-15.2.3.tgz",
+      "integrity": "sha512-Vk6q6ubqb/v9uCYgXtTw9ejutXZxPMyT7wlSov3xAf5GHbbYsfL44nOYWQs6eX17eD7M9siyAjQ69+XL+hFXew==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.8.0"
+        "@ipld/dag-pb": "^4.0.0",
+        "@multiformats/murmur3": "^2.0.0",
+        "err-code": "^3.0.1",
+        "hamt-sharding": "^3.0.0",
+        "interface-blockstore": "^5.0.0",
+        "interface-store": "^5.0.1",
+        "ipfs-unixfs": "^11.0.0",
+        "it-all": "^3.0.2",
+        "it-batch": "^3.0.2",
+        "it-first": "^3.0.2",
+        "it-parallel-batch": "^3.0.1",
+        "multiformats": "^13.0.0",
+        "progress-events": "^1.0.0",
+        "rabin-wasm": "^0.1.4",
+        "uint8arraylist": "^2.4.3",
+        "uint8arrays": "^5.0.0"
       },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-numeric-separator": {
-      "version": "7.10.4",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/@helia/unixfs/node_modules/ipfs-unixfs-importer/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.10.4"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-object-rest-spread": {
-      "version": "7.8.3",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/it-all": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-all/-/it-all-3.0.4.tgz",
+      "integrity": "sha512-UMiy0i9DqCHBdWvMbzdYvVGa5/w4t1cc4nchpbnjdLhklglv8mQeEYnii0gvKESJuL1zV32Cqdb33R6/GPfxpQ=="
+    },
+    "node_modules/@helia/unixfs/node_modules/it-batch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-batch/-/it-batch-3.0.4.tgz",
+      "integrity": "sha512-WRu2mqOYIs+T9k7+yxSK9VJdk0UE4R0jKQsWQcti5c6vhb1FhjC2+yCB5XBrctQ9edNfCMU/wVzdDj8qSwimbA=="
+    },
+    "node_modules/@helia/unixfs/node_modules/it-filter": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-filter/-/it-filter-3.0.4.tgz",
+      "integrity": "sha512-e0sz+st4sudK/zH6GZ/gRTRP8A/ADuJFCYDmRgMbZvR79y5+v4ZXav850bBZk5wL9zXaYZFxS1v/6Qi+Vjwh5g==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+        "it-peekable": "^3.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-optional-catch-binding": {
-      "version": "7.8.3",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/it-first": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-first/-/it-first-3.0.4.tgz",
+      "integrity": "sha512-FtQl84iTNxN5EItP/JgL28V2rzNMkCzTUlNoj41eVdfix2z1DBuLnBqZ0hzYhGGa1rMpbQf0M7CQSA2adlrLJg=="
+    },
+    "node_modules/@helia/unixfs/node_modules/it-glob": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/it-glob/-/it-glob-2.0.6.tgz",
+      "integrity": "sha512-4C6ccz4nhqrq7yZMzBr3MsKhyL+rlnLXIPceyGG6ogl3Lx3eeWMv1RtlySJwFi6q+jVcPyTpeYt/xftwI2JEQQ==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+        "minimatch": "^9.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-optional-chaining": {
-      "version": "7.8.3",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/it-map": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/it-map/-/it-map-3.0.5.tgz",
+      "integrity": "sha512-hB0TDXo/h4KSJJDSRLgAPmDroiXP6Fx1ck4Bzl3US9hHfZweTKsuiP0y4gXuTMcJlS6vj0bb+f70rhkD47ZA3w==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+        "it-peekable": "^3.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-top-level-await": {
-      "version": "7.14.5",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/it-parallel-batch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-parallel-batch/-/it-parallel-batch-3.0.4.tgz",
+      "integrity": "sha512-O1omh8ss8+UtXiMjE+8kM5C20DT0Ma4VtKVfrSHOJU0UHZ+iWBXarabzPYEp+WiuQmrv+klDPPlTZ9KaLN9xOA==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.14.5"
+        "it-batch": "^3.0.0"
+      }
+    },
+    "node_modules/@helia/unixfs/node_modules/it-peekable": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.3.tgz",
+      "integrity": "sha512-Wx21JX/rMzTEl9flx3DGHuPV1KQFGOl8uoKfQtmZHgPQtGb89eQ6RyVd82h3HuP9Ghpt0WgBDlmmdWeHXqyx7w=="
+    },
+    "node_modules/@helia/unixfs/node_modules/it-pipe": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz",
+      "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==",
+      "dependencies": {
+        "it-merge": "^3.0.0",
+        "it-pushable": "^3.1.2",
+        "it-stream-types": "^2.0.1"
       },
       "engines": {
-        "node": ">=6.9.0"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/plugin-syntax-typescript": {
-      "version": "7.18.6",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/minimatch": {
+      "version": "9.0.3",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
+      "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.18.6"
+        "brace-expansion": "^2.0.1"
       },
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=16 || 14 >=14.17"
       },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0-0"
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
       }
     },
-    "node_modules/@babel/template": {
-      "version": "7.18.10",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@babel/code-frame": "^7.18.6",
-        "@babel/parser": "^7.18.10",
-        "@babel/types": "^7.18.10"
-      },
+    "node_modules/@helia/unixfs/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@babel/traverse": {
-      "version": "7.18.13",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/p-queue": {
+      "version": "8.0.1",
+      "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.0.1.tgz",
+      "integrity": "sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA==",
       "dependencies": {
-        "@babel/code-frame": "^7.18.6",
-        "@babel/generator": "^7.18.13",
-        "@babel/helper-environment-visitor": "^7.18.9",
-        "@babel/helper-function-name": "^7.18.9",
-        "@babel/helper-hoist-variables": "^7.18.6",
-        "@babel/helper-split-export-declaration": "^7.18.6",
-        "@babel/parser": "^7.18.13",
-        "@babel/types": "^7.18.13",
-        "debug": "^4.1.0",
-        "globals": "^11.1.0"
+        "eventemitter3": "^5.0.1",
+        "p-timeout": "^6.1.2"
       },
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=18"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/@babel/traverse/node_modules/globals": {
-      "version": "11.12.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@helia/unixfs/node_modules/p-timeout": {
+      "version": "6.1.2",
+      "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.2.tgz",
+      "integrity": "sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ==",
       "engines": {
-        "node": ">=4"
+        "node": ">=14.16"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/@babel/types": {
-      "version": "7.18.13",
+    "node_modules/@helia/unixfs/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
+      "dependencies": {
+        "multiformats": "^12.0.1"
+      }
+    },
+    "node_modules/@humanwhocodes/config-array": {
+      "version": "0.9.2",
       "dev": true,
-      "license": "MIT",
+      "license": "Apache-2.0",
       "dependencies": {
-        "@babel/helper-string-parser": "^7.18.10",
-        "@babel/helper-validator-identifier": "^7.18.6",
-        "to-fast-properties": "^2.0.0"
+        "@humanwhocodes/object-schema": "^1.2.1",
+        "debug": "^4.1.1",
+        "minimatch": "^3.0.4"
       },
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=10.10.0"
       }
     },
-    "node_modules/@bcoe/v8-coverage": {
-      "version": "0.2.3",
+    "node_modules/@humanwhocodes/object-schema": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
+      "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==",
       "dev": true,
-      "license": "MIT"
+      "license": "BSD-3-Clause"
     },
-    "node_modules/@eslint/eslintrc": {
-      "version": "1.0.5",
+    "node_modules/@iarna/toml": {
+      "version": "2.2.5",
+      "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
+      "integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==",
       "dev": true,
-      "license": "MIT",
+      "license": "ISC"
+    },
+    "node_modules/@ipld/dag-cbor": {
+      "version": "9.0.7",
+      "resolved": "https://registry.npmjs.org/@ipld/dag-cbor/-/dag-cbor-9.0.7.tgz",
+      "integrity": "sha512-bZMZWTtrJnIm2YjWijIB2EIGdba8kZRO55i+7RMnCHkazQ5hCqif3RrywIjDmnACSBvkhIPuQkefvxlxzogIEQ==",
       "dependencies": {
-        "ajv": "^6.12.4",
-        "debug": "^4.3.2",
-        "espree": "^9.2.0",
-        "globals": "^13.9.0",
-        "ignore": "^4.0.6",
-        "import-fresh": "^3.2.1",
-        "js-yaml": "^4.1.0",
-        "minimatch": "^3.0.4",
-        "strip-json-comments": "^3.1.1"
+        "cborg": "^4.0.0",
+        "multiformats": "^13.0.0"
       },
       "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@eslint/eslintrc/node_modules/argparse": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "Python-2.0"
+    "node_modules/@ipld/dag-cbor/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
-    "node_modules/@eslint/eslintrc/node_modules/js-yaml": {
-      "version": "4.1.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@ipld/dag-json": {
+      "version": "10.1.6",
+      "resolved": "https://registry.npmjs.org/@ipld/dag-json/-/dag-json-10.1.6.tgz",
+      "integrity": "sha512-y3KHYEzUUMPduJEZiy9fe89dG8Or1fYiYM8fPPlec1BE7gUWcZVtJmVQKodluT5N4O8S8xi5iTF83pcN9GXZTA==",
       "dependencies": {
-        "argparse": "^2.0.1"
+        "cborg": "^4.0.0",
+        "multiformats": "^13.0.0"
       },
-      "bin": {
-        "js-yaml": "bin/js-yaml.js"
-      }
-    },
-    "node_modules/@filebase/client": {
-      "version": "0.0.2",
-      "license": "(Apache-2.0 OR MIT)",
-      "dependencies": {
-        "@aws-sdk/client-s3": "^3.121.0",
-        "@aws-sdk/lib-storage": "^3.121.0",
-        "@ipld/car": "^3.2.3",
-        "@ipld/dag-cbor": "^6.0.13",
-        "@web-std/blob": "^3.0.1",
-        "@web-std/fetch": "^3.0.3",
-        "@web-std/file": "^3.0.0",
-        "@web-std/form-data": "^3.0.0",
-        "carbites": "^1.0.6",
-        "ipfs-car": "github:filebase/ipfs-car#cid-version-support-dist",
-        "it-pipe": "^1.1.0",
-        "multiformats": "^9.6.4",
-        "p-retry": "^4.6.1",
-        "streaming-iterables": "^6.0.0",
-        "throttled-queue": "^2.1.2"
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@filebase/client/node_modules/@ipld/dag-cbor": {
-      "version": "6.0.15",
-      "license": "(Apache-2.0 AND MIT)",
-      "dependencies": {
-        "cborg": "^1.5.4",
-        "multiformats": "^9.5.4"
-      }
+    "node_modules/@ipld/dag-json/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
-    "node_modules/@humanwhocodes/config-array": {
-      "version": "0.9.2",
-      "dev": true,
-      "license": "Apache-2.0",
+    "node_modules/@ipld/dag-pb": {
+      "version": "4.0.7",
+      "resolved": "https://registry.npmjs.org/@ipld/dag-pb/-/dag-pb-4.0.7.tgz",
+      "integrity": "sha512-EqJtSAcELiYbp9K0Y5ckbg+W0pD5cSy5PnE/QsCrpKvoq+u0E8Vi07chNGDLaShd5AjDq0AMtnuudKUUuEuSjg==",
       "dependencies": {
-        "@humanwhocodes/object-schema": "^1.2.1",
-        "debug": "^4.1.1",
-        "minimatch": "^3.0.4"
+        "multiformats": "^13.0.0"
       },
       "engines": {
-        "node": ">=10.10.0"
-      }
-    },
-    "node_modules/@humanwhocodes/object-schema": {
-      "version": "1.2.1",
-      "dev": true,
-      "license": "BSD-3-Clause"
-    },
-    "node_modules/@iarna/toml": {
-      "version": "2.2.5",
-      "dev": true,
-      "license": "ISC"
-    },
-    "node_modules/@ipld/car": {
-      "version": "3.2.4",
-      "license": "(Apache-2.0 AND MIT)",
-      "dependencies": {
-        "@ipld/dag-cbor": "^7.0.0",
-        "multiformats": "^9.5.4",
-        "varint": "^6.0.0"
-      }
-    },
-    "node_modules/@ipld/car/node_modules/varint": {
-      "version": "6.0.0",
-      "license": "MIT"
-    },
-    "node_modules/@ipld/dag-cbor": {
-      "version": "7.0.2",
-      "license": "(Apache-2.0 AND MIT)",
-      "dependencies": {
-        "cborg": "^1.6.0",
-        "multiformats": "^9.5.4"
-      }
-    },
-    "node_modules/@ipld/dag-json": {
-      "version": "8.0.7",
-      "license": "(Apache-2.0 AND MIT)",
-      "dependencies": {
-        "cborg": "^1.5.4",
-        "multiformats": "^9.5.4"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@ipld/dag-pb": {
-      "version": "2.1.15",
-      "license": "(Apache-2.0 AND MIT)",
-      "dependencies": {
-        "multiformats": "^9.5.4"
-      }
+    "node_modules/@ipld/dag-pb/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
     "node_modules/@istanbuljs/load-nyc-config": {
       "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
+      "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",
       "dev": true,
-      "license": "ISC",
       "dependencies": {
         "camelcase": "^5.3.1",
         "find-up": "^4.1.0",
@@ -1807,40 +2162,44 @@
     },
     "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": {
       "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+      "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/@istanbuljs/schema": {
       "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
+      "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/@jest/console": {
-      "version": "27.5.1",
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz",
+      "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/types": "^27.5.1",
+        "@jest/types": "^29.6.3",
         "@types/node": "*",
         "chalk": "^4.0.0",
-        "jest-message-util": "^27.5.1",
-        "jest-util": "^27.5.1",
+        "jest-message-util": "^29.7.0",
+        "jest-util": "^29.7.0",
         "slash": "^3.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
     "node_modules/@jest/console/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -1853,8 +2212,9 @@
     },
     "node_modules/@jest/console/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -1868,8 +2228,9 @@
     },
     "node_modules/@jest/console/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -1879,21 +2240,24 @@
     },
     "node_modules/@jest/console/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
     "node_modules/@jest/console/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/@jest/console/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -1902,41 +2266,42 @@
       }
     },
     "node_modules/@jest/core": {
-      "version": "27.5.1",
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz",
+      "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/console": "^27.5.1",
-        "@jest/reporters": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
+        "@jest/console": "^29.7.0",
+        "@jest/reporters": "^29.7.0",
+        "@jest/test-result": "^29.7.0",
+        "@jest/transform": "^29.7.0",
+        "@jest/types": "^29.6.3",
         "@types/node": "*",
         "ansi-escapes": "^4.2.1",
         "chalk": "^4.0.0",
-        "emittery": "^0.8.1",
+        "ci-info": "^3.2.0",
         "exit": "^0.1.2",
         "graceful-fs": "^4.2.9",
-        "jest-changed-files": "^27.5.1",
-        "jest-config": "^27.5.1",
-        "jest-haste-map": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-resolve-dependencies": "^27.5.1",
-        "jest-runner": "^27.5.1",
-        "jest-runtime": "^27.5.1",
-        "jest-snapshot": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-validate": "^27.5.1",
-        "jest-watcher": "^27.5.1",
+        "jest-changed-files": "^29.7.0",
+        "jest-config": "^29.7.0",
+        "jest-haste-map": "^29.7.0",
+        "jest-message-util": "^29.7.0",
+        "jest-regex-util": "^29.6.3",
+        "jest-resolve": "^29.7.0",
+        "jest-resolve-dependencies": "^29.7.0",
+        "jest-runner": "^29.7.0",
+        "jest-runtime": "^29.7.0",
+        "jest-snapshot": "^29.7.0",
+        "jest-util": "^29.7.0",
+        "jest-validate": "^29.7.0",
+        "jest-watcher": "^29.7.0",
         "micromatch": "^4.0.4",
-        "rimraf": "^3.0.0",
+        "pretty-format": "^29.7.0",
         "slash": "^3.0.0",
         "strip-ansi": "^6.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       },
       "peerDependencies": {
         "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
@@ -1949,8 +2314,9 @@
     },
     "node_modules/@jest/core/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -1963,8 +2329,9 @@
     },
     "node_modules/@jest/core/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -1978,8 +2345,9 @@
     },
     "node_modules/@jest/core/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -1989,21 +2357,24 @@
     },
     "node_modules/@jest/core/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
     "node_modules/@jest/core/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/@jest/core/node_modules/strip-ansi": {
       "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-regex": "^5.0.1"
       },
@@ -2013,8 +2384,9 @@
     },
     "node_modules/@jest/core/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -2023,81 +2395,110 @@
       }
     },
     "node_modules/@jest/environment": {
-      "version": "27.5.1",
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz",
+      "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/fake-timers": "^27.5.1",
-        "@jest/types": "^27.5.1",
+        "@jest/fake-timers": "^29.7.0",
+        "@jest/types": "^29.6.3",
         "@types/node": "*",
-        "jest-mock": "^27.5.1"
+        "jest-mock": "^29.7.0"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
+    "node_modules/@jest/expect": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz",
+      "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==",
+      "dev": true,
+      "dependencies": {
+        "expect": "^29.7.0",
+        "jest-snapshot": "^29.7.0"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
+    "node_modules/@jest/expect-utils": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz",
+      "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==",
+      "dev": true,
+      "dependencies": {
+        "jest-get-type": "^29.6.3"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
     "node_modules/@jest/fake-timers": {
-      "version": "27.5.1",
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz",
+      "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/types": "^27.5.1",
-        "@sinonjs/fake-timers": "^8.0.1",
+        "@jest/types": "^29.6.3",
+        "@sinonjs/fake-timers": "^10.0.2",
         "@types/node": "*",
-        "jest-message-util": "^27.5.1",
-        "jest-mock": "^27.5.1",
-        "jest-util": "^27.5.1"
+        "jest-message-util": "^29.7.0",
+        "jest-mock": "^29.7.0",
+        "jest-util": "^29.7.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
     "node_modules/@jest/globals": {
-      "version": "27.5.1",
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz",
+      "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/environment": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "expect": "^27.5.1"
+        "@jest/environment": "^29.7.0",
+        "@jest/expect": "^29.7.0",
+        "@jest/types": "^29.6.3",
+        "jest-mock": "^29.7.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
     "node_modules/@jest/reporters": {
-      "version": "27.5.1",
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz",
+      "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "@bcoe/v8-coverage": "^0.2.3",
-        "@jest/console": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
+        "@jest/console": "^29.7.0",
+        "@jest/test-result": "^29.7.0",
+        "@jest/transform": "^29.7.0",
+        "@jest/types": "^29.6.3",
+        "@jridgewell/trace-mapping": "^0.3.18",
         "@types/node": "*",
         "chalk": "^4.0.0",
         "collect-v8-coverage": "^1.0.0",
         "exit": "^0.1.2",
-        "glob": "^7.1.2",
+        "glob": "^7.1.3",
         "graceful-fs": "^4.2.9",
         "istanbul-lib-coverage": "^3.0.0",
-        "istanbul-lib-instrument": "^5.1.0",
+        "istanbul-lib-instrument": "^6.0.0",
         "istanbul-lib-report": "^3.0.0",
         "istanbul-lib-source-maps": "^4.0.0",
         "istanbul-reports": "^3.1.3",
-        "jest-haste-map": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-worker": "^27.5.1",
+        "jest-message-util": "^29.7.0",
+        "jest-util": "^29.7.0",
+        "jest-worker": "^29.7.0",
         "slash": "^3.0.0",
-        "source-map": "^0.6.0",
         "string-length": "^4.0.1",
-        "terminal-link": "^2.0.0",
-        "v8-to-istanbul": "^8.1.0"
+        "strip-ansi": "^6.0.0",
+        "v8-to-istanbul": "^9.0.1"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       },
       "peerDependencies": {
         "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
@@ -2110,8 +2511,9 @@
     },
     "node_modules/@jest/reporters/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -2124,8 +2526,9 @@
     },
     "node_modules/@jest/reporters/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -2139,8 +2542,9 @@
     },
     "node_modules/@jest/reporters/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -2150,21 +2554,36 @@
     },
     "node_modules/@jest/reporters/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
     "node_modules/@jest/reporters/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/@jest/reporters/node_modules/strip-ansi": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+      "dev": true,
+      "dependencies": {
+        "ansi-regex": "^5.0.1"
+      },
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/@jest/reporters/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -2172,76 +2591,93 @@
         "node": ">=8"
       }
     },
+    "node_modules/@jest/schemas": {
+      "version": "29.6.3",
+      "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz",
+      "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==",
+      "dev": true,
+      "dependencies": {
+        "@sinclair/typebox": "^0.27.8"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
     "node_modules/@jest/source-map": {
-      "version": "27.5.1",
+      "version": "29.6.3",
+      "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz",
+      "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
+        "@jridgewell/trace-mapping": "^0.3.18",
         "callsites": "^3.0.0",
-        "graceful-fs": "^4.2.9",
-        "source-map": "^0.6.0"
+        "graceful-fs": "^4.2.9"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
     "node_modules/@jest/test-result": {
-      "version": "27.5.1",
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz",
+      "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/console": "^27.5.1",
-        "@jest/types": "^27.5.1",
+        "@jest/console": "^29.7.0",
+        "@jest/types": "^29.6.3",
         "@types/istanbul-lib-coverage": "^2.0.0",
         "collect-v8-coverage": "^1.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
     "node_modules/@jest/test-sequencer": {
-      "version": "27.5.1",
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz",
+      "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/test-result": "^27.5.1",
+        "@jest/test-result": "^29.7.0",
         "graceful-fs": "^4.2.9",
-        "jest-haste-map": "^27.5.1",
-        "jest-runtime": "^27.5.1"
+        "jest-haste-map": "^29.7.0",
+        "slash": "^3.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
     "node_modules/@jest/transform": {
-      "version": "27.5.1",
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz",
+      "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@babel/core": "^7.1.0",
-        "@jest/types": "^27.5.1",
+        "@babel/core": "^7.11.6",
+        "@jest/types": "^29.6.3",
+        "@jridgewell/trace-mapping": "^0.3.18",
         "babel-plugin-istanbul": "^6.1.1",
         "chalk": "^4.0.0",
-        "convert-source-map": "^1.4.0",
-        "fast-json-stable-stringify": "^2.0.0",
+        "convert-source-map": "^2.0.0",
+        "fast-json-stable-stringify": "^2.1.0",
         "graceful-fs": "^4.2.9",
-        "jest-haste-map": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-util": "^27.5.1",
+        "jest-haste-map": "^29.7.0",
+        "jest-regex-util": "^29.6.3",
+        "jest-util": "^29.7.0",
         "micromatch": "^4.0.4",
         "pirates": "^4.0.4",
         "slash": "^3.0.0",
-        "source-map": "^0.6.1",
-        "write-file-atomic": "^3.0.0"
+        "write-file-atomic": "^4.0.2"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
     "node_modules/@jest/transform/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -2254,8 +2690,9 @@
     },
     "node_modules/@jest/transform/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -2269,8 +2706,9 @@
     },
     "node_modules/@jest/transform/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -2280,21 +2718,24 @@
     },
     "node_modules/@jest/transform/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
     "node_modules/@jest/transform/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/@jest/transform/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -2302,25 +2743,41 @@
         "node": ">=8"
       }
     },
+    "node_modules/@jest/transform/node_modules/write-file-atomic": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz",
+      "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==",
+      "dev": true,
+      "dependencies": {
+        "imurmurhash": "^0.1.4",
+        "signal-exit": "^3.0.7"
+      },
+      "engines": {
+        "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
+      }
+    },
     "node_modules/@jest/types": {
-      "version": "27.5.1",
+      "version": "29.6.3",
+      "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz",
+      "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
+        "@jest/schemas": "^29.6.3",
         "@types/istanbul-lib-coverage": "^2.0.0",
         "@types/istanbul-reports": "^3.0.0",
         "@types/node": "*",
-        "@types/yargs": "^16.0.0",
+        "@types/yargs": "^17.0.8",
         "chalk": "^4.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
     "node_modules/@jest/types/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -2333,8 +2790,9 @@
     },
     "node_modules/@jest/types/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -2348,8 +2806,9 @@
     },
     "node_modules/@jest/types/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -2359,21 +2818,24 @@
     },
     "node_modules/@jest/types/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
     "node_modules/@jest/types/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
     "node_modules/@jest/types/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -2382,310 +2844,485 @@
       }
     },
     "node_modules/@jridgewell/gen-mapping": {
-      "version": "0.1.1",
+      "version": "0.3.3",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
+      "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jridgewell/set-array": "^1.0.0",
-        "@jridgewell/sourcemap-codec": "^1.4.10"
+        "@jridgewell/set-array": "^1.0.1",
+        "@jridgewell/sourcemap-codec": "^1.4.10",
+        "@jridgewell/trace-mapping": "^0.3.9"
       },
       "engines": {
         "node": ">=6.0.0"
       }
     },
     "node_modules/@jridgewell/resolve-uri": {
-      "version": "3.1.0",
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
+      "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=6.0.0"
       }
     },
     "node_modules/@jridgewell/set-array": {
       "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+      "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=6.0.0"
       }
     },
     "node_modules/@jridgewell/sourcemap-codec": {
-      "version": "1.4.14",
-      "dev": true,
-      "license": "MIT"
+      "version": "1.4.15",
+      "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
+      "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
+      "dev": true
     },
     "node_modules/@jridgewell/trace-mapping": {
-      "version": "0.3.15",
+      "version": "0.3.20",
+      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
+      "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@jridgewell/resolve-uri": "^3.0.3",
-        "@jridgewell/sourcemap-codec": "^1.4.10"
-      }
-    },
-    "node_modules/@multiformats/murmur3": {
-      "version": "1.1.3",
-      "license": "(Apache-2.0 AND MIT)",
       "dependencies": {
-        "multiformats": "^9.5.4",
-        "murmurhash3js-revisited": "^3.0.0"
+        "@jridgewell/resolve-uri": "^3.1.0",
+        "@jridgewell/sourcemap-codec": "^1.4.14"
       }
     },
-    "node_modules/@noble/ed25519": {
-      "version": "1.7.1",
-      "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.1.tgz",
-      "integrity": "sha512-Rk4SkJFaXZiznFyC/t77Q0NKS4FL7TLJJsVG2V2oiEq3kJVeTdxysEe/yRWSpnWMe808XRDJ+VFh5pt/FN5plw==",
-      "funding": [
-        {
-          "type": "individual",
-          "url": "https://paulmillr.com/funding/"
-        }
-      ]
-    },
-    "node_modules/@noble/secp256k1": {
-      "version": "1.4.0",
-      "license": "MIT"
-    },
-    "node_modules/@nodelib/fs.scandir": {
-      "version": "2.1.5",
-      "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
-      "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
-      "dev": true,
+    "node_modules/@libp2p/crypto": {
+      "version": "1.0.17",
+      "resolved": "https://registry.npmjs.org/@libp2p/crypto/-/crypto-1.0.17.tgz",
+      "integrity": "sha512-Oeg0Eb/EvAho0gVkOgemXEgrVxWaT3x/DpFgkBdZ9qGxwq75w/E/oPc7souqBz+l1swfz37GWnwV7bIb4Xv5Ag==",
       "dependencies": {
-        "@nodelib/fs.stat": "2.0.5",
-        "run-parallel": "^1.1.9"
+        "@libp2p/interface-keys": "^1.0.2",
+        "@libp2p/interfaces": "^3.2.0",
+        "@noble/ed25519": "^1.6.0",
+        "@noble/secp256k1": "^1.5.4",
+        "multiformats": "^11.0.0",
+        "node-forge": "^1.1.0",
+        "protons-runtime": "^5.0.0",
+        "uint8arraylist": "^2.4.3",
+        "uint8arrays": "^4.0.2"
       },
       "engines": {
-        "node": ">= 8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@nodelib/fs.stat": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
-      "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
-      "dev": true,
+    "node_modules/@libp2p/crypto/node_modules/multiformats": {
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz",
+      "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==",
       "engines": {
-        "node": ">= 8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@nodelib/fs.walk": {
-      "version": "1.2.8",
-      "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
-      "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
-      "dev": true,
-      "dependencies": {
-        "@nodelib/fs.scandir": "2.1.5",
-        "fastq": "^1.6.0"
-      },
+    "node_modules/@libp2p/crypto/node_modules/node-forge": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
+      "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
       "engines": {
-        "node": ">= 8"
+        "node": ">= 6.13.0"
       }
     },
-    "node_modules/@octokit/auth-token": {
-      "version": "2.4.5",
-      "license": "MIT",
+    "node_modules/@libp2p/crypto/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
       "dependencies": {
-        "@octokit/types": "^6.0.3"
+        "multiformats": "^12.0.1"
       }
     },
-    "node_modules/@octokit/core": {
-      "version": "3.6.0",
-      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
-      "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
-      "dependencies": {
-        "@octokit/auth-token": "^2.4.4",
-        "@octokit/graphql": "^4.5.8",
-        "@octokit/request": "^5.6.3",
-        "@octokit/request-error": "^2.0.5",
-        "@octokit/types": "^6.0.3",
-        "before-after-hook": "^2.2.0",
-        "universal-user-agent": "^6.0.0"
-      }
-    },
-    "node_modules/@octokit/core/node_modules/@octokit/graphql": {
-      "version": "4.6.4",
-      "license": "MIT",
-      "dependencies": {
-        "@octokit/request": "^5.6.0",
-        "@octokit/types": "^6.0.3",
-        "universal-user-agent": "^6.0.0"
+    "node_modules/@libp2p/crypto/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@octokit/endpoint": {
-      "version": "6.0.12",
-      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
-      "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
+    "node_modules/@libp2p/interface": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-0.1.6.tgz",
+      "integrity": "sha512-Lzc5cS/hXuoXhuAbVIxJIHLCYmfPcbU0vVgrpMoiP1Qb2Q3ETU4A46GB8s8mWXgSU6tr9RcqerUqzFYD6+OAag==",
       "dependencies": {
-        "@octokit/types": "^6.0.3",
-        "is-plain-object": "^5.0.0",
-        "universal-user-agent": "^6.0.0"
+        "@multiformats/multiaddr": "^12.1.5",
+        "abortable-iterator": "^5.0.1",
+        "it-pushable": "^3.2.0",
+        "it-stream-types": "^2.0.1",
+        "multiformats": "^12.0.1",
+        "p-defer": "^4.0.0",
+        "race-signal": "^1.0.0",
+        "uint8arraylist": "^2.4.3"
       }
     },
-    "node_modules/@octokit/graphql": {
-      "version": "5.0.5",
-      "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.5.tgz",
-      "integrity": "sha512-Qwfvh3xdqKtIznjX9lz2D458r7dJPP8l6r4GQkIdWQouZwHQK0mVT88uwiU2bdTU2OtT1uOlKpRciUWldpG0yQ==",
-      "dev": true,
+    "node_modules/@libp2p/interface-connection": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface-connection/-/interface-connection-4.0.0.tgz",
+      "integrity": "sha512-6xx/NmEc84HX7QmsjSC3hHredQYjHv4Dkf4G27adAPf+qN+vnPxmQ7gaTnk243a0++DOFTbZ2gKX/15G2B6SRg==",
       "dependencies": {
-        "@octokit/request": "^6.0.0",
-        "@octokit/types": "^9.0.0",
-        "universal-user-agent": "^6.0.0"
+        "@libp2p/interface-peer-id": "^2.0.0",
+        "@libp2p/interfaces": "^3.0.0",
+        "@multiformats/multiaddr": "^12.0.0",
+        "it-stream-types": "^1.0.4",
+        "uint8arraylist": "^2.1.2"
       },
       "engines": {
-        "node": ">= 14"
-      }
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
     },
-    "node_modules/@octokit/graphql/node_modules/@octokit/endpoint": {
-      "version": "7.0.5",
-      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
-      "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
-      "dev": true,
+    "node_modules/@libp2p/interface-connection/node_modules/it-stream-types": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-1.0.5.tgz",
+      "integrity": "sha512-I88Ka1nHgfX62e5mi5LLL+oueqz7Ltg0bUdtsUKDe9SoUqbQPf2Mp5kxDTe9pNhHQGs4pvYPAINwuZ1HAt42TA==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/@libp2p/interface-keychain": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface-keychain/-/interface-keychain-2.0.5.tgz",
+      "integrity": "sha512-mb7QNgn9fIvC7CaJCi06GJ+a6DN6RVT9TmEi0NmedZGATeCArPeWWG7r7IfxNVXb9cVOOE1RzV1swK0ZxEJF9Q==",
       "dependencies": {
-        "@octokit/types": "^9.0.0",
-        "is-plain-object": "^5.0.0",
-        "universal-user-agent": "^6.0.0"
+        "@libp2p/interface-peer-id": "^2.0.0",
+        "multiformats": "^11.0.0"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
-      "version": "16.0.0",
-      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz",
-      "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==",
-      "dev": true
+    "node_modules/@libp2p/interface-keychain/node_modules/multiformats": {
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz",
+      "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
     },
-    "node_modules/@octokit/graphql/node_modules/@octokit/request": {
-      "version": "6.2.3",
-      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz",
-      "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==",
-      "dev": true,
+    "node_modules/@libp2p/interface-keys": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface-keys/-/interface-keys-1.0.8.tgz",
+      "integrity": "sha512-CJ1SlrwuoHMquhEEWS77E+4vv7hwB7XORkqzGQrPQmA9MRdIEZRS64bA4JqCLUDa4ltH0l+U1vp0oZHLT67NEA==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/@libp2p/interface-peer-id": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface-peer-id/-/interface-peer-id-2.0.2.tgz",
+      "integrity": "sha512-9pZp9zhTDoVwzRmp0Wtxw0Yfa//Yc0GqBCJi3EznBDE6HGIAVvppR91wSh2knt/0eYg0AQj7Y35VSesUTzMCUg==",
       "dependencies": {
-        "@octokit/endpoint": "^7.0.0",
-        "@octokit/request-error": "^3.0.0",
-        "@octokit/types": "^9.0.0",
-        "is-plain-object": "^5.0.0",
-        "node-fetch": "^2.6.7",
-        "universal-user-agent": "^6.0.0"
+        "multiformats": "^11.0.0"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@octokit/graphql/node_modules/@octokit/request-error": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz",
-      "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==",
-      "dev": true,
+    "node_modules/@libp2p/interface-peer-id/node_modules/multiformats": {
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz",
+      "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/@libp2p/interface-peer-info": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface-peer-info/-/interface-peer-info-1.0.10.tgz",
+      "integrity": "sha512-HQlo8NwQjMyamCHJrnILEZz+YwEOXCB2sIIw3slIrhVUYeYlTaia1R6d9umaAeLHa255Zmdm4qGH8rJLRqhCcg==",
       "dependencies": {
-        "@octokit/types": "^9.0.0",
-        "deprecation": "^2.0.0",
-        "once": "^1.4.0"
+        "@libp2p/interface-peer-id": "^2.0.0",
+        "@multiformats/multiaddr": "^12.0.0"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@octokit/graphql/node_modules/@octokit/types": {
-      "version": "9.0.0",
-      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz",
-      "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==",
-      "dev": true,
+    "node_modules/@libp2p/interface-pubsub": {
+      "version": "3.0.7",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface-pubsub/-/interface-pubsub-3.0.7.tgz",
+      "integrity": "sha512-+c74EVUBTfw2sx1GE/z/IjsYO6dhur+ukF0knAppeZsRQ1Kgg6K5R3eECtT28fC6dBWLjFpAvW/7QGfiDAL4RA==",
+      "dependencies": {
+        "@libp2p/interface-connection": "^4.0.0",
+        "@libp2p/interface-peer-id": "^2.0.0",
+        "@libp2p/interfaces": "^3.0.0",
+        "it-pushable": "^3.0.0",
+        "uint8arraylist": "^2.1.2"
+      },
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/@libp2p/interface/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/@libp2p/interface/node_modules/p-defer": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-4.0.0.tgz",
+      "integrity": "sha512-Vb3QRvQ0Y5XnF40ZUWW7JfLogicVh/EnA5gBIvKDJoYpeI82+1E3AlB9yOcKFS0AhHrWVnAQO39fbR0G99IVEQ==",
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/@libp2p/interfaces": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/@libp2p/interfaces/-/interfaces-3.3.2.tgz",
+      "integrity": "sha512-p/M7plbrxLzuQchvNwww1Was7ZeGE2NaOFulMaZBYIihU8z3fhaV+a033OqnC/0NTX/yhfdNOG7znhYq3XoR/g==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/@libp2p/logger": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-3.1.0.tgz",
+      "integrity": "sha512-qJbJBAhxHVsRBtQSOIkSLi0lskUSFjzE+zm0QvoyxzZKSz+mX41mZLbnofPIVOVauoDQ40dXpe7WDUOq8AbiQQ==",
       "dependencies": {
-        "@octokit/openapi-types": "^16.0.0"
+        "@libp2p/interface": "^0.1.6",
+        "@multiformats/multiaddr": "^12.1.5",
+        "debug": "^4.3.4",
+        "interface-datastore": "^8.2.0",
+        "multiformats": "^12.0.1"
       }
     },
-    "node_modules/@octokit/openapi-types": {
-      "version": "12.11.0",
-      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
-      "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
+    "node_modules/@libp2p/logger/node_modules/interface-datastore": {
+      "version": "8.2.9",
+      "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.9.tgz",
+      "integrity": "sha512-J/8PN8TnB5xxCRtgu9Vx3zExdOzcTU5/DBF2dlU41deX1GW6/SPpbJo5DRNSnvzfjmwJ7YhUOIFXyccUp8nuAA==",
+      "dependencies": {
+        "interface-store": "^5.0.0",
+        "uint8arrays": "^5.0.0"
+      }
     },
-    "node_modules/@octokit/plugin-paginate-rest": {
-      "version": "2.21.3",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
-      "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
+    "node_modules/@libp2p/logger/node_modules/interface-store": {
+      "version": "5.1.5",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.5.tgz",
+      "integrity": "sha512-X0KnJBk3o+YL13MxZBMwa88/b3Mdrpm0yPzkSTKDDVn9BSPH7UK6W+ZtIPO2bxKOQVmq7zqOwAnYnpfqWjb6/g=="
+    },
+    "node_modules/@libp2p/logger/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/@libp2p/logger/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
+      "dependencies": {
+        "multiformats": "^13.0.0"
+      }
+    },
+    "node_modules/@libp2p/logger/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/@libp2p/peer-id": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/@libp2p/peer-id/-/peer-id-2.0.4.tgz",
+      "integrity": "sha512-gcOsN8Fbhj6izIK+ejiWsqiqKeJ2yWPapi/m55VjOvDa52/ptQzZszxQP8jUk93u36de92ATFXDfZR/Bi6eeUQ==",
       "dependencies": {
-        "@octokit/types": "^6.40.0"
+        "@libp2p/interface-peer-id": "^2.0.0",
+        "@libp2p/interfaces": "^3.2.0",
+        "multiformats": "^11.0.0",
+        "uint8arrays": "^4.0.2"
       },
-      "peerDependencies": {
-        "@octokit/core": ">=2"
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@octokit/plugin-request-log": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
-      "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
-      "dev": true,
-      "peerDependencies": {
-        "@octokit/core": ">=3"
+    "node_modules/@libp2p/peer-id/node_modules/multiformats": {
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz",
+      "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@octokit/plugin-rest-endpoint-methods": {
-      "version": "5.16.2",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
-      "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
+    "node_modules/@libp2p/peer-id/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
+      "dependencies": {
+        "multiformats": "^12.0.1"
+      }
+    },
+    "node_modules/@libp2p/peer-id/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/@multiformats/multiaddr": {
+      "version": "12.1.12",
+      "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.1.12.tgz",
+      "integrity": "sha512-hrY4uN/oeYhn410jBSpVXn37eenn4djKOj6Dh20Yh4xzGgqmS6u+/X08zQfHgWNjk7NJejPUcRfHEfs8e/MOcw==",
+      "dependencies": {
+        "@chainsafe/is-ip": "^2.0.1",
+        "@chainsafe/netmask": "^2.0.0",
+        "@libp2p/interface": "^1.0.0",
+        "dns-over-http-resolver": "3.0.0",
+        "multiformats": "^13.0.0",
+        "uint8-varint": "^2.0.1",
+        "uint8arrays": "^5.0.0"
+      }
+    },
+    "node_modules/@multiformats/multiaddr-to-uri": {
+      "version": "9.0.7",
+      "resolved": "https://registry.npmjs.org/@multiformats/multiaddr-to-uri/-/multiaddr-to-uri-9.0.7.tgz",
+      "integrity": "sha512-i3ldtPMN6XJt+MCi34hOl0wGuGEHfWWMw6lmNag5BpckPwPTf9XGOOFMmh7ed/uO3Vjah/g173iOe61HTQVoBA==",
       "dependencies": {
-        "@octokit/types": "^6.39.0",
-        "deprecation": "^2.3.1"
+        "@multiformats/multiaddr": "^12.0.0"
       },
-      "peerDependencies": {
-        "@octokit/core": ">=3"
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/@octokit/request": {
-      "version": "5.6.3",
-      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
-      "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
+    "node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.0.2.tgz",
+      "integrity": "sha512-z/3Yyg+7cVyzRXwzdrDkJd7YmNaLE9iZjQaixo5luI/n9uk5OFFjb9ulAsNqpq8V1xylCo2DXIC7f94KClwzVw==",
       "dependencies": {
-        "@octokit/endpoint": "^6.0.1",
-        "@octokit/request-error": "^2.1.0",
-        "@octokit/types": "^6.16.1",
-        "is-plain-object": "^5.0.0",
-        "node-fetch": "^2.6.7",
-        "universal-user-agent": "^6.0.0"
+        "@multiformats/multiaddr": "^12.1.10",
+        "it-pushable": "^3.2.1",
+        "it-stream-types": "^2.0.1",
+        "multiformats": "^12.1.3",
+        "uint8arraylist": "^2.4.3"
       }
     },
-    "node_modules/@octokit/request-error": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
-      "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
+    "node_modules/@multiformats/multiaddr/node_modules/@libp2p/interface/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/@multiformats/multiaddr/node_modules/dns-over-http-resolver": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-3.0.0.tgz",
+      "integrity": "sha512-5+BI+B7n8LKhNaEZBYErr+CBd9t5nYtjunByLhrLGtZ+i3TRgiU8yE87pCjEBu2KOwNsD9ljpSXEbZ4S8xih5g==",
       "dependencies": {
-        "@octokit/types": "^6.0.3",
-        "deprecation": "^2.0.0",
-        "once": "^1.4.0"
+        "debug": "^4.3.4",
+        "receptacle": "^1.3.2"
       }
     },
-    "node_modules/@octokit/rest": {
-      "version": "19.0.7",
-      "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.7.tgz",
-      "integrity": "sha512-HRtSfjrWmWVNp2uAkEpQnuGMJsu/+dBr47dRc5QVgsCbnIc1+GFEaoKBWkYG+zjrsHpSqcAElMio+n10c0b5JA==",
+    "node_modules/@multiformats/multiaddr/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/@multiformats/multiaddr/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
+      "dependencies": {
+        "multiformats": "^13.0.0"
+      }
+    },
+    "node_modules/@noble/ed25519": {
+      "version": "1.7.3",
+      "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.3.tgz",
+      "integrity": "sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==",
+      "funding": [
+        {
+          "type": "individual",
+          "url": "https://paulmillr.com/funding/"
+        }
+      ]
+    },
+    "node_modules/@noble/secp256k1": {
+      "version": "1.7.1",
+      "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz",
+      "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==",
+      "funding": [
+        {
+          "type": "individual",
+          "url": "https://paulmillr.com/funding/"
+        }
+      ]
+    },
+    "node_modules/@nodelib/fs.scandir": {
+      "version": "2.1.5",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+      "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
       "dev": true,
       "dependencies": {
-        "@octokit/core": "^4.1.0",
-        "@octokit/plugin-paginate-rest": "^6.0.0",
-        "@octokit/plugin-request-log": "^1.0.4",
-        "@octokit/plugin-rest-endpoint-methods": "^7.0.0"
+        "@nodelib/fs.stat": "2.0.5",
+        "run-parallel": "^1.1.9"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">= 8"
       }
     },
-    "node_modules/@octokit/rest/node_modules/@octokit/auth-token": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz",
-      "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==",
+    "node_modules/@nodelib/fs.stat": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+      "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+      "dev": true,
+      "engines": {
+        "node": ">= 8"
+      }
+    },
+    "node_modules/@nodelib/fs.walk": {
+      "version": "1.2.8",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+      "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
       "dev": true,
       "dependencies": {
-        "@octokit/types": "^9.0.0"
+        "@nodelib/fs.scandir": "2.1.5",
+        "fastq": "^1.6.0"
       },
+      "engines": {
+        "node": ">= 8"
+      }
+    },
+    "node_modules/@octokit/auth-token": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz",
+      "integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==",
+      "dev": true,
       "engines": {
         "node": ">= 14"
       }
     },
-    "node_modules/@octokit/rest/node_modules/@octokit/core": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.0.tgz",
-      "integrity": "sha512-AgvDRUg3COpR82P7PBdGZF/NNqGmtMq2NiPqeSsDIeCfYFOZ9gddqWNQHnFdEUf+YwOj4aZYmJnlPp7OXmDIDg==",
+    "node_modules/@octokit/core": {
+      "version": "4.2.4",
+      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz",
+      "integrity": "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==",
       "dev": true,
       "dependencies": {
         "@octokit/auth-token": "^3.0.0",
@@ -2700,81 +3337,178 @@
         "node": ">= 14"
       }
     },
-    "node_modules/@octokit/rest/node_modules/@octokit/endpoint": {
-      "version": "7.0.5",
-      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
-      "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
+    "node_modules/@octokit/core/node_modules/@octokit/graphql": {
+      "version": "5.0.6",
+      "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz",
+      "integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==",
       "dev": true,
       "dependencies": {
+        "@octokit/request": "^6.0.0",
         "@octokit/types": "^9.0.0",
-        "is-plain-object": "^5.0.0",
         "universal-user-agent": "^6.0.0"
       },
       "engines": {
         "node": ">= 14"
       }
     },
-    "node_modules/@octokit/rest/node_modules/@octokit/openapi-types": {
-      "version": "16.0.0",
-      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz",
-      "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==",
-      "dev": true
-    },
-    "node_modules/@octokit/rest/node_modules/@octokit/plugin-paginate-rest": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.0.0.tgz",
-      "integrity": "sha512-Sq5VU1PfT6/JyuXPyt04KZNVsFOSBaYOAq2QRZUwzVlI10KFvcbUo8lR258AAQL1Et60b0WuVik+zOWKLuDZxw==",
+    "node_modules/@octokit/endpoint": {
+      "version": "7.0.6",
+      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz",
+      "integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==",
       "dev": true,
       "dependencies": {
-        "@octokit/types": "^9.0.0"
+        "@octokit/types": "^9.0.0",
+        "is-plain-object": "^5.0.0",
+        "universal-user-agent": "^6.0.0"
       },
       "engines": {
         "node": ">= 14"
-      },
-      "peerDependencies": {
-        "@octokit/core": ">=4"
       }
     },
-    "node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods": {
-      "version": "7.0.1",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.0.1.tgz",
-      "integrity": "sha512-pnCaLwZBudK5xCdrR823xHGNgqOzRnJ/mpC/76YPpNP7DybdsJtP7mdOwh+wYZxK5jqeQuhu59ogMI4NRlBUvA==",
-      "dev": true,
+    "node_modules/@octokit/graphql": {
+      "version": "7.0.2",
+      "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz",
+      "integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==",
       "dependencies": {
-        "@octokit/types": "^9.0.0",
-        "deprecation": "^2.3.1"
+        "@octokit/request": "^8.0.1",
+        "@octokit/types": "^12.0.0",
+        "universal-user-agent": "^6.0.0"
       },
       "engines": {
-        "node": ">= 14"
-      },
-      "peerDependencies": {
-        "@octokit/core": ">=3"
+        "node": ">= 18"
       }
     },
-    "node_modules/@octokit/rest/node_modules/@octokit/request": {
-      "version": "6.2.3",
-      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz",
-      "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==",
-      "dev": true,
+    "node_modules/@octokit/graphql/node_modules/@octokit/endpoint": {
+      "version": "9.0.4",
+      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz",
+      "integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==",
       "dependencies": {
-        "@octokit/endpoint": "^7.0.0",
-        "@octokit/request-error": "^3.0.0",
-        "@octokit/types": "^9.0.0",
-        "is-plain-object": "^5.0.0",
-        "node-fetch": "^2.6.7",
+        "@octokit/types": "^12.0.0",
         "universal-user-agent": "^6.0.0"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">= 18"
       }
     },
-    "node_modules/@octokit/rest/node_modules/@octokit/request-error": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz",
-      "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==",
-      "dev": true,
+    "node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
+      "version": "19.1.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-19.1.0.tgz",
+      "integrity": "sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw=="
+    },
+    "node_modules/@octokit/graphql/node_modules/@octokit/request": {
+      "version": "8.1.6",
+      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz",
+      "integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==",
       "dependencies": {
-        "@octokit/types": "^9.0.0",
+        "@octokit/endpoint": "^9.0.0",
+        "@octokit/request-error": "^5.0.0",
+        "@octokit/types": "^12.0.0",
+        "universal-user-agent": "^6.0.0"
+      },
+      "engines": {
+        "node": ">= 18"
+      }
+    },
+    "node_modules/@octokit/graphql/node_modules/@octokit/request-error": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz",
+      "integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==",
+      "dependencies": {
+        "@octokit/types": "^12.0.0",
+        "deprecation": "^2.0.0",
+        "once": "^1.4.0"
+      },
+      "engines": {
+        "node": ">= 18"
+      }
+    },
+    "node_modules/@octokit/graphql/node_modules/@octokit/types": {
+      "version": "12.4.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.4.0.tgz",
+      "integrity": "sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==",
+      "dependencies": {
+        "@octokit/openapi-types": "^19.1.0"
+      }
+    },
+    "node_modules/@octokit/openapi-types": {
+      "version": "18.1.1",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz",
+      "integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw==",
+      "dev": true
+    },
+    "node_modules/@octokit/plugin-paginate-rest": {
+      "version": "6.1.2",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz",
+      "integrity": "sha512-qhrmtQeHU/IivxucOV1bbI/xZyC/iOBhclokv7Sut5vnejAIAEXVcGQeRpQlU39E0WwK9lNvJHphHri/DB6lbQ==",
+      "dev": true,
+      "dependencies": {
+        "@octokit/tsconfig": "^1.0.2",
+        "@octokit/types": "^9.2.3"
+      },
+      "engines": {
+        "node": ">= 14"
+      },
+      "peerDependencies": {
+        "@octokit/core": ">=4"
+      }
+    },
+    "node_modules/@octokit/plugin-request-log": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
+      "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
+      "dev": true,
+      "peerDependencies": {
+        "@octokit/core": ">=3"
+      }
+    },
+    "node_modules/@octokit/plugin-rest-endpoint-methods": {
+      "version": "7.2.3",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.2.3.tgz",
+      "integrity": "sha512-I5Gml6kTAkzVlN7KCtjOM+Ruwe/rQppp0QU372K1GP7kNOYEKe8Xn5BW4sE62JAHdwpq95OQK/qGNyKQMUzVgA==",
+      "dev": true,
+      "dependencies": {
+        "@octokit/types": "^10.0.0"
+      },
+      "engines": {
+        "node": ">= 14"
+      },
+      "peerDependencies": {
+        "@octokit/core": ">=3"
+      }
+    },
+    "node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
+      "version": "10.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-10.0.0.tgz",
+      "integrity": "sha512-Vm8IddVmhCgU1fxC1eyinpwqzXPEYu0NrYzD3YZjlGjyftdLBTeqNblRC0jmJmgxbJIsQlyogVeGnrNaaMVzIg==",
+      "dev": true,
+      "dependencies": {
+        "@octokit/openapi-types": "^18.0.0"
+      }
+    },
+    "node_modules/@octokit/request": {
+      "version": "6.2.8",
+      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.8.tgz",
+      "integrity": "sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==",
+      "dev": true,
+      "dependencies": {
+        "@octokit/endpoint": "^7.0.0",
+        "@octokit/request-error": "^3.0.0",
+        "@octokit/types": "^9.0.0",
+        "is-plain-object": "^5.0.0",
+        "node-fetch": "^2.6.7",
+        "universal-user-agent": "^6.0.0"
+      },
+      "engines": {
+        "node": ">= 14"
+      }
+    },
+    "node_modules/@octokit/request-error": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz",
+      "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==",
+      "dev": true,
+      "dependencies": {
+        "@octokit/types": "^9.0.0",
         "deprecation": "^2.0.0",
         "once": "^1.4.0"
       },
@@ -2782,26 +3516,40 @@
         "node": ">= 14"
       }
     },
-    "node_modules/@octokit/rest/node_modules/@octokit/types": {
-      "version": "9.0.0",
-      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz",
-      "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==",
+    "node_modules/@octokit/rest": {
+      "version": "19.0.7",
+      "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.7.tgz",
+      "integrity": "sha512-HRtSfjrWmWVNp2uAkEpQnuGMJsu/+dBr47dRc5QVgsCbnIc1+GFEaoKBWkYG+zjrsHpSqcAElMio+n10c0b5JA==",
       "dev": true,
       "dependencies": {
-        "@octokit/openapi-types": "^16.0.0"
+        "@octokit/core": "^4.1.0",
+        "@octokit/plugin-paginate-rest": "^6.0.0",
+        "@octokit/plugin-request-log": "^1.0.4",
+        "@octokit/plugin-rest-endpoint-methods": "^7.0.0"
+      },
+      "engines": {
+        "node": ">= 14"
       }
     },
+    "node_modules/@octokit/tsconfig": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/@octokit/tsconfig/-/tsconfig-1.0.2.tgz",
+      "integrity": "sha512-I0vDR0rdtP8p2lGMzvsJzbhdOWy405HcGovrspJ8RRibHnyRgggUSNO5AIox5LmqiwmatHKYsvj6VGFHkqS7lA==",
+      "dev": true
+    },
     "node_modules/@octokit/types": {
-      "version": "6.41.0",
-      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
-      "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
+      "version": "9.3.2",
+      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz",
+      "integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==",
+      "dev": true,
       "dependencies": {
-        "@octokit/openapi-types": "^12.11.0"
+        "@octokit/openapi-types": "^18.0.0"
       }
     },
     "node_modules/@pinata/sdk": {
       "version": "1.1.23",
-      "license": "MIT",
+      "resolved": "https://registry.npmjs.org/@pinata/sdk/-/sdk-1.1.23.tgz",
+      "integrity": "sha512-ZIQI6acEu2m3tuLW9UCUNVgqbHc5U+t657ukunamV0E8XcW639vgtGa5rd5C/9mVIxoWpp5CJ9q7FA1OT88huQ==",
       "dependencies": {
         "axios": "^0.21.1",
         "base-path-converter": "^1.0.2",
@@ -2812,6 +3560,8 @@
     },
     "node_modules/@pinata/sdk/node_modules/form-data": {
       "version": "2.5.1",
+      "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz",
+      "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==",
       "license": "MIT",
       "dependencies": {
         "asynckit": "^0.4.0",
@@ -2844,9 +3594,9 @@
       }
     },
     "node_modules/@pnpm/npm-conf": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.1.1.tgz",
-      "integrity": "sha512-yfRcuupmxxeDOSxvw4g+wFCrGiPD0L32f5WMzqMXp7Rl93EOCdFiDcaSNnZ10Up9GdNqkj70UTa8hfhPFphaZA==",
+      "version": "2.2.2",
+      "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.2.2.tgz",
+      "integrity": "sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==",
       "dev": true,
       "dependencies": {
         "@pnpm/config.env-replace": "^1.1.0",
@@ -2859,22 +3609,32 @@
     },
     "node_modules/@protobufjs/aspromise": {
       "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
+      "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/base64": {
       "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz",
+      "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/codegen": {
       "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz",
+      "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/eventemitter": {
       "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz",
+      "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/fetch": {
       "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz",
+      "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==",
       "license": "BSD-3-Clause",
       "dependencies": {
         "@protobufjs/aspromise": "^1.1.1",
@@ -2883,28 +3643,44 @@
     },
     "node_modules/@protobufjs/float": {
       "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz",
+      "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/inquire": {
       "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz",
+      "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/path": {
       "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz",
+      "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/pool": {
       "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz",
+      "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==",
       "license": "BSD-3-Clause"
     },
     "node_modules/@protobufjs/utf8": {
       "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz",
+      "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==",
       "license": "BSD-3-Clause"
     },
+    "node_modules/@sinclair/typebox": {
+      "version": "0.27.8",
+      "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
+      "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",
+      "dev": true
+    },
     "node_modules/@sindresorhus/is": {
-      "version": "5.3.0",
-      "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.3.0.tgz",
-      "integrity": "sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==",
+      "version": "5.6.0",
+      "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.6.0.tgz",
+      "integrity": "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==",
       "dev": true,
       "engines": {
         "node": ">=14.16"
@@ -2914,1089 +3690,1261 @@
       }
     },
     "node_modules/@sinonjs/commons": {
-      "version": "1.8.3",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz",
+      "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==",
       "dev": true,
-      "license": "BSD-3-Clause",
       "dependencies": {
         "type-detect": "4.0.8"
       }
     },
     "node_modules/@sinonjs/fake-timers": {
-      "version": "8.1.0",
+      "version": "10.3.0",
+      "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz",
+      "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==",
       "dev": true,
-      "license": "BSD-3-Clause",
       "dependencies": {
-        "@sinonjs/commons": "^1.7.0"
+        "@sinonjs/commons": "^3.0.0"
       }
     },
-    "node_modules/@szmarczak/http-timer": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz",
-      "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==",
-      "dev": true,
+    "node_modules/@smithy/abort-controller": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.15.tgz",
+      "integrity": "sha512-JkS36PIS3/UCbq/MaozzV7jECeL+BTt4R75bwY8i+4RASys4xOyUS1HsRyUNSqUXFP4QyCz5aNnh3ltuaxv+pw==",
       "dependencies": {
-        "defer-to-connect": "^2.0.1"
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=14.16"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@tootallnate/once": {
-      "version": "1.1.2",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 6"
+    "node_modules/@smithy/chunked-blob-reader": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-2.0.0.tgz",
+      "integrity": "sha512-k+J4GHJsMSAIQPChGBrjEmGS+WbPonCXesoqP9fynIqjn7rdOThdH8FAeCmokP9mxTYKQAKoHCLPzNlm6gh7Wg==",
+      "dependencies": {
+        "tslib": "^2.5.0"
       }
     },
-    "node_modules/@types/babel__core": {
-      "version": "7.1.19",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/chunked-blob-reader-native": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-2.0.1.tgz",
+      "integrity": "sha512-N2oCZRglhWKm7iMBu7S6wDzXirjAofi7tAd26cxmgibRYOBS4D3hGfmkwCpHdASZzwZDD8rluh0Rcqw1JeZDRw==",
       "dependencies": {
-        "@babel/parser": "^7.1.0",
-        "@babel/types": "^7.0.0",
-        "@types/babel__generator": "*",
-        "@types/babel__template": "*",
-        "@types/babel__traverse": "*"
+        "@smithy/util-base64": "^2.0.1",
+        "tslib": "^2.5.0"
       }
     },
-    "node_modules/@types/babel__generator": {
-      "version": "7.6.4",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/config-resolver": {
+      "version": "2.0.22",
+      "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.22.tgz",
+      "integrity": "sha512-YuPjsLnq6I5ZQBTx6BL5NsCLtcLel5YIMf3gDeEa+GSCXn5mgRXm+8XO8HtjR3Xf69b88aY4c7bwKQQS2i8vtA==",
       "dependencies": {
-        "@babel/types": "^7.0.0"
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-config-provider": "^2.1.0",
+        "@smithy/util-middleware": "^2.0.8",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@types/babel__template": {
-      "version": "7.4.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/core": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.2.1.tgz",
+      "integrity": "sha512-f6cwmMuHo7RIw/c184NBd2rGeGvGIX6p55HSrG5jfR3qkNYo80PHRfhzkJMq1+mv1ZjI5p8NhenWMMkIRJR4tw==",
       "dependencies": {
-        "@babel/parser": "^7.1.0",
-        "@babel/types": "^7.0.0"
+        "@smithy/middleware-endpoint": "^2.2.3",
+        "@smithy/middleware-retry": "^2.0.25",
+        "@smithy/middleware-serde": "^2.0.15",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/smithy-client": "^2.2.0",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-middleware": "^2.0.8",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@types/babel__traverse": {
-      "version": "7.18.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/credential-provider-imds": {
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.4.tgz",
+      "integrity": "sha512-cwPJN1fa1YOQzhBlTXRavABEYRRchci1X79QRwzaNLySnIMJfztyv1Zkst0iZPLMnpn8+CnHu3wOHS11J5Dr3A==",
       "dependencies": {
-        "@babel/types": "^7.3.0"
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/property-provider": "^2.0.16",
+        "@smithy/types": "^2.7.0",
+        "@smithy/url-parser": "^2.0.15",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@types/graceful-fs": {
-      "version": "4.1.5",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/eventstream-codec": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.15.tgz",
+      "integrity": "sha512-crjvz3j1gGPwA0us6cwS7+5gAn35CTmqu/oIxVbYJo2Qm/sGAye6zGJnMDk3BKhWZw5kcU1G4MxciTkuBpOZPg==",
       "dependencies": {
-        "@types/node": "*"
+        "@aws-crypto/crc32": "3.0.0",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-hex-encoding": "^2.0.0",
+        "tslib": "^2.5.0"
       }
     },
-    "node_modules/@types/http-cache-semantics": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",
-      "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==",
-      "dev": true
-    },
-    "node_modules/@types/istanbul-lib-coverage": {
-      "version": "2.0.4",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/@types/istanbul-lib-report": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/eventstream-serde-browser": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.0.15.tgz",
+      "integrity": "sha512-WiFG5N9j3jmS5P0z5Xev6dO0c3lf7EJYC2Ncb0xDnWFvShwXNn741AF71ABr5EcZw8F4rQma0362MMjAwJeZog==",
       "dependencies": {
-        "@types/istanbul-lib-coverage": "*"
+        "@smithy/eventstream-serde-universal": "^2.0.15",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@types/istanbul-reports": {
-      "version": "3.0.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/eventstream-serde-config-resolver": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.0.15.tgz",
+      "integrity": "sha512-o65d2LRjgCbWYH+VVNlWXtmsI231SO99ZTOL4UuIPa6WTjbSHWtlXvUcJG9libhEKWmEV9DIUiH2IqyPWi7ubA==",
       "dependencies": {
-        "@types/istanbul-lib-report": "*"
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@types/long": {
-      "version": "4.0.1",
-      "license": "MIT"
-    },
-    "node_modules/@types/minimatch": {
-      "version": "3.0.5",
-      "license": "MIT"
-    },
-    "node_modules/@types/minimist": {
-      "version": "1.2.2",
-      "license": "MIT"
-    },
-    "node_modules/@types/node": {
-      "version": "13.7.6",
-      "license": "MIT"
-    },
-    "node_modules/@types/normalize-package-data": {
-      "version": "2.4.1",
-      "license": "MIT"
-    },
-    "node_modules/@types/prettier": {
-      "version": "2.7.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/@types/retry": {
-      "version": "0.12.0",
-      "license": "MIT"
-    },
-    "node_modules/@types/stack-utils": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/@smithy/eventstream-serde-node": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.0.15.tgz",
+      "integrity": "sha512-9OOXiIhHq1VeOG6xdHkn2ZayfMYM3vzdUTV3zhcCnt+tMqA3BJK3XXTJFRR2BV28rtRM778DzqbBTf+hqwQPTg==",
+      "dependencies": {
+        "@smithy/eventstream-serde-universal": "^2.0.15",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      }
     },
-    "node_modules/@types/yargs": {
-      "version": "16.0.4",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/eventstream-serde-universal": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.0.15.tgz",
+      "integrity": "sha512-dP8AQp/pXlWBjvL0TaPBJC3rM0GoYv7O0Uim8d/7UKZ2Wo13bFI3/BhQfY/1DeiP1m23iCHFNFtOQxfQNBB8rQ==",
       "dependencies": {
-        "@types/yargs-parser": "*"
+        "@smithy/eventstream-codec": "^2.0.15",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@types/yargs-parser": {
-      "version": "21.0.0",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/@smithy/fetch-http-handler": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.1.tgz",
+      "integrity": "sha512-6MNk16fqb8EwcYY8O8WxB3ArFkLZ2XppsSNo1h7SQcFdDDwIumiJeO6wRzm7iB68xvsOQzsdQKbdtTieS3hfSQ==",
+      "dependencies": {
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/querystring-builder": "^2.0.15",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-base64": "^2.0.1",
+        "tslib": "^2.5.0"
+      }
     },
-    "node_modules/@web-std/blob": {
-      "version": "3.0.4",
-      "license": "MIT",
+    "node_modules/@smithy/hash-blob-browser": {
+      "version": "2.0.16",
+      "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-2.0.16.tgz",
+      "integrity": "sha512-cSYRi05LA7DZDwjB1HL0BP8B56eUNNeLglVH147QTXFyuXJq/7erAIiLRfsyXB8+GfFHkSS5BHbc76a7k/AYPA==",
       "dependencies": {
-        "@web-std/stream": "1.0.0",
-        "web-encoding": "1.1.5"
+        "@smithy/chunked-blob-reader": "^2.0.0",
+        "@smithy/chunked-blob-reader-native": "^2.0.1",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       }
     },
-    "node_modules/@web-std/fetch": {
-      "version": "3.0.3",
-      "license": "MIT",
+    "node_modules/@smithy/hash-node": {
+      "version": "2.0.17",
+      "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.17.tgz",
+      "integrity": "sha512-Il6WuBcI1nD+e2DM7tTADMf01wEPGK8PAhz4D+YmDUVaoBqlA+CaH2uDJhiySifmuKBZj748IfygXty81znKhw==",
       "dependencies": {
-        "@web-std/blob": "^3.0.3",
-        "@web-std/form-data": "^3.0.2",
-        "@web3-storage/multipart-parser": "^1.0.0",
-        "data-uri-to-buffer": "^3.0.1"
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-buffer-from": "^2.0.0",
+        "@smithy/util-utf8": "^2.0.2",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": "^10.17 || >=12.3"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@web-std/file": {
-      "version": "3.0.2",
-      "license": "MIT",
+    "node_modules/@smithy/hash-stream-node": {
+      "version": "2.0.17",
+      "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-2.0.17.tgz",
+      "integrity": "sha512-ey8DtnATzp1mOXgS7rqMwSmAki6iJA+jgNucKcxRkhMB1rrICfHg+rhmIF50iLPDHUhTcS5pBMOrLzzpZftvNQ==",
       "dependencies": {
-        "@web-std/blob": "^3.0.3"
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-utf8": "^2.0.2",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@web-std/form-data": {
-      "version": "3.0.2",
-      "license": "MIT",
+    "node_modules/@smithy/invalid-dependency": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.15.tgz",
+      "integrity": "sha512-dlEKBFFwVfzA5QroHlBS94NpgYjXhwN/bFfun+7w3rgxNvVy79SK0w05iGc7UAeC5t+D7gBxrzdnD6hreZnDVQ==",
       "dependencies": {
-        "web-encoding": "1.1.5"
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       }
     },
-    "node_modules/@web-std/stream": {
-      "version": "1.0.0",
-      "license": "MIT",
+    "node_modules/@smithy/is-array-buffer": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz",
+      "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==",
       "dependencies": {
-        "web-streams-polyfill": "^3.1.1"
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/@web3-storage/multipart-parser": {
-      "version": "1.0.0",
-      "license": "(Apache-2.0 AND MIT)"
-    },
-    "node_modules/@zxing/text-encoding": {
-      "version": "0.9.0",
-      "license": "(Unlicense OR Apache-2.0)",
-      "optional": true
-    },
-    "node_modules/abab": {
-      "version": "2.0.6",
-      "dev": true,
-      "license": "BSD-3-Clause"
+    "node_modules/@smithy/md5-js": {
+      "version": "2.0.17",
+      "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-2.0.17.tgz",
+      "integrity": "sha512-jmISTCnEkOnm2oCNx/rMkvBT/eQh3aA6nktevkzbmn/VYqYEuc5Z2n5sTTqsciMSO01Lvf56wG1A4twDqovYeQ==",
+      "dependencies": {
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-utf8": "^2.0.2",
+        "tslib": "^2.5.0"
+      }
     },
-    "node_modules/abort-controller": {
-      "version": "3.0.0",
-      "license": "MIT",
+    "node_modules/@smithy/middleware-content-length": {
+      "version": "2.0.17",
+      "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.17.tgz",
+      "integrity": "sha512-OyadvMcKC7lFXTNBa8/foEv7jOaqshQZkjWS9coEXPRZnNnihU/Ls+8ZuJwGNCOrN2WxXZFmDWhegbnM4vak8w==",
       "dependencies": {
-        "event-target-shim": "^5.0.0"
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=6.5"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/acorn": {
-      "version": "8.8.0",
-      "dev": true,
-      "license": "MIT",
-      "bin": {
-        "acorn": "bin/acorn"
+    "node_modules/@smithy/middleware-endpoint": {
+      "version": "2.2.3",
+      "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.2.3.tgz",
+      "integrity": "sha512-nYfxuq0S/xoAjdLbyn1ixeVB6cyH9wYCMtbbOCpcCRYR5u2mMtqUtVjjPAZ/DIdlK3qe0tpB0Q76szFGNuz+kQ==",
+      "dependencies": {
+        "@smithy/middleware-serde": "^2.0.15",
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/shared-ini-file-loader": "^2.2.7",
+        "@smithy/types": "^2.7.0",
+        "@smithy/url-parser": "^2.0.15",
+        "@smithy/util-middleware": "^2.0.8",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      }
+    },
+    "node_modules/@smithy/middleware-retry": {
+      "version": "2.0.25",
+      "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.25.tgz",
+      "integrity": "sha512-FXhafCPvx/9L9OgHJ3cdo/pD1f7ngC7DKsjDV2J7k6LO/Yl69POoBLk4sI1OZPUGc4dfxriENlTma9Nj1hI+IQ==",
+      "dependencies": {
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/service-error-classification": "^2.0.8",
+        "@smithy/smithy-client": "^2.2.0",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-middleware": "^2.0.8",
+        "@smithy/util-retry": "^2.0.8",
+        "tslib": "^2.5.0",
+        "uuid": "^8.3.2"
       },
       "engines": {
-        "node": ">=0.4.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/acorn-globals": {
-      "version": "6.0.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/middleware-serde": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.15.tgz",
+      "integrity": "sha512-FOZRFk/zN4AT4wzGuBY+39XWe+ZnCFd0gZtyw3f9Okn2CJPixl9GyWe98TIaljeZdqWkgrzGyPre20AcW2UMHQ==",
       "dependencies": {
-        "acorn": "^7.1.1",
-        "acorn-walk": "^7.1.1"
-      }
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      }
     },
-    "node_modules/acorn-globals/node_modules/acorn": {
-      "version": "7.4.1",
-      "dev": true,
-      "license": "MIT",
-      "bin": {
-        "acorn": "bin/acorn"
+    "node_modules/@smithy/middleware-stack": {
+      "version": "2.0.9",
+      "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.9.tgz",
+      "integrity": "sha512-bCB5dUtGQ5wh7QNL2ELxmDc6g7ih7jWU3Kx6MYH1h4mZbv9xL3WyhKHojRltThCB1arLPyTUFDi+x6fB/oabtA==",
+      "dependencies": {
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=0.4.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/acorn-jsx": {
-      "version": "5.3.2",
-      "dev": true,
-      "license": "MIT",
-      "peerDependencies": {
-        "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+    "node_modules/@smithy/node-config-provider": {
+      "version": "2.1.8",
+      "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.8.tgz",
+      "integrity": "sha512-+w26OKakaBUGp+UG+dxYZtFb5fs3tgHg3/QrRrmUZj+rl3cIuw840vFUXX35cVPTUCQIiTqmz7CpVF7+hdINdQ==",
+      "dependencies": {
+        "@smithy/property-provider": "^2.0.16",
+        "@smithy/shared-ini-file-loader": "^2.2.7",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/acorn-walk": {
-      "version": "7.2.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/node-http-handler": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.1.tgz",
+      "integrity": "sha512-8iAKQrC8+VFHPAT8pg4/j6hlsTQh+NKOWlctJBrYtQa4ExcxX7aSg3vdQ2XLoYwJotFUurg/NLqFCmZaPRrogw==",
+      "dependencies": {
+        "@smithy/abort-controller": "^2.0.15",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/querystring-builder": "^2.0.15",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
       "engines": {
-        "node": ">=0.4.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/agent-base": {
-      "version": "6.0.2",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/property-provider": {
+      "version": "2.0.16",
+      "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.16.tgz",
+      "integrity": "sha512-28Ky0LlOqtEjwg5CdHmwwaDRHcTWfPRzkT6HrhwOSRS2RryAvuDfJrZpM+BMcrdeCyEg1mbcgIMoqTla+rdL8Q==",
       "dependencies": {
-        "debug": "4"
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 6.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/ajv": {
-      "version": "6.12.6",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/protocol-http": {
+      "version": "3.0.11",
+      "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.11.tgz",
+      "integrity": "sha512-3ziB8fHuXIRamV/akp/sqiWmNPR6X+9SB8Xxnozzj+Nq7hSpyKdFHd1FLpBkgfGFUTzzcBJQlDZPSyxzmdcx5A==",
       "dependencies": {
-        "fast-deep-equal": "^3.1.1",
-        "fast-json-stable-stringify": "^2.0.0",
-        "json-schema-traverse": "^0.4.1",
-        "uri-js": "^4.2.2"
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
-      "funding": {
-        "type": "github",
-        "url": "https://github.com/sponsors/epoberezkin"
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/ansi-align": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
-      "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==",
-      "dev": true,
+    "node_modules/@smithy/querystring-builder": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.15.tgz",
+      "integrity": "sha512-e1q85aT6HutvouOdN+dMsN0jcdshp50PSCvxDvo6aIM57LqeXimjfONUEgfqQ4IFpYWAtVixptyIRE5frMp/2A==",
       "dependencies": {
-        "string-width": "^4.1.0"
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-uri-escape": "^2.0.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/ansi-colors": {
-      "version": "4.1.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/querystring-parser": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.15.tgz",
+      "integrity": "sha512-jbBvoK3cc81Cj1c1TH1qMYxNQKHrYQ2DoTntN9FBbtUWcGhc+T4FP6kCKYwRLXyU4AajwGIZstvNAmIEgUUNTQ==",
+      "dependencies": {
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
       "engines": {
-        "node": ">=6"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/ansi-escapes": {
-      "version": "4.3.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/service-error-classification": {
+      "version": "2.0.8",
+      "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.8.tgz",
+      "integrity": "sha512-jCw9+005im8tsfYvwwSc4TTvd29kXRFkH9peQBg5R/4DD03ieGm6v6Hpv9nIAh98GwgYg1KrztcINC1s4o7/hg==",
       "dependencies": {
-        "type-fest": "^0.8.1"
+        "@smithy/types": "^2.7.0"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/ansi-regex": {
-      "version": "5.0.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/shared-ini-file-loader": {
+      "version": "2.2.7",
+      "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.7.tgz",
+      "integrity": "sha512-0Qt5CuiogIuvQIfK+be7oVHcPsayLgfLJGkPlbgdbl0lD28nUKu4p11L+UG3SAEsqc9UsazO+nErPXw7+IgDpQ==",
+      "dependencies": {
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
       "engines": {
-        "node": ">=8"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/ansi-styles": {
-      "version": "3.2.1",
-      "license": "MIT",
+    "node_modules/@smithy/signature-v4": {
+      "version": "2.0.18",
+      "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.18.tgz",
+      "integrity": "sha512-SJRAj9jT/l9ocm8D0GojMbnA1sp7I4JeStOQ4lEXI8A5eHE73vbjlzlqIFB7cLvIgau0oUl4cGVpF9IGCrvjlw==",
       "dependencies": {
-        "color-convert": "^1.9.0"
+        "@smithy/eventstream-codec": "^2.0.15",
+        "@smithy/is-array-buffer": "^2.0.0",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-hex-encoding": "^2.0.0",
+        "@smithy/util-middleware": "^2.0.8",
+        "@smithy/util-uri-escape": "^2.0.0",
+        "@smithy/util-utf8": "^2.0.2",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=4"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/any-signal": {
-      "version": "2.1.2",
-      "license": "MIT",
+    "node_modules/@smithy/smithy-client": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.2.0.tgz",
+      "integrity": "sha512-C/bkNue5H5Obgl83SnlBt4v6VM68CqIjIELh3vAabud87xFYznLNKtj6Qb69Z+QOnLp9T+We++sEem/f2AHE+Q==",
       "dependencies": {
-        "abort-controller": "^3.0.0",
-        "native-abort-controller": "^1.0.3"
+        "@smithy/middleware-endpoint": "^2.2.3",
+        "@smithy/middleware-stack": "^2.0.9",
+        "@smithy/protocol-http": "^3.0.11",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-stream": "^2.0.23",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/anymatch": {
-      "version": "3.1.2",
-      "dev": true,
-      "license": "ISC",
+    "node_modules/@smithy/types": {
+      "version": "2.7.0",
+      "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.7.0.tgz",
+      "integrity": "sha512-1OIFyhK+vOkMbu4aN2HZz/MomREkrAC/HqY5mlJMUJfGrPRwijJDTeiN8Rnj9zUaB8ogXAfIOtZrrgqZ4w7Wnw==",
       "dependencies": {
-        "normalize-path": "^3.0.0",
-        "picomatch": "^2.0.4"
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 8"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/argparse": {
-      "version": "1.0.10",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/url-parser": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.15.tgz",
+      "integrity": "sha512-sADUncUj9rNbOTrdDGm4EXlUs0eQ9dyEo+V74PJoULY4jSQxS+9gwEgsPYyiu8PUOv16JC/MpHonOgqP/IEDZA==",
       "dependencies": {
-        "sprintf-js": "~1.0.2"
+        "@smithy/querystring-parser": "^2.0.15",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       }
     },
-    "node_modules/array.prototype.map": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.5.tgz",
-      "integrity": "sha512-gfaKntvwqYIuC7mLLyv2wzZIJqrRhn5PZ9EfFejSx6a78sV7iDsGpG9P+3oUPtm1Rerqm6nrKS4FYuTIvWfo3g==",
-      "dev": true,
+    "node_modules/@smithy/util-base64": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.1.tgz",
+      "integrity": "sha512-DlI6XFYDMsIVN+GH9JtcRp3j02JEVuWIn/QOZisVzpIAprdsxGveFed0bjbMRCqmIFe8uetn5rxzNrBtIGrPIQ==",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.4",
-        "es-abstract": "^1.20.4",
-        "es-array-method-boxes-properly": "^1.0.0",
-        "is-string": "^1.0.7"
+        "@smithy/util-buffer-from": "^2.0.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/arrify": {
-      "version": "1.0.1",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
+    "node_modules/@smithy/util-body-length-browser": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.1.tgz",
+      "integrity": "sha512-NXYp3ttgUlwkaug4bjBzJ5+yIbUbUx8VsSLuHZROQpoik+gRkIBeEG9MPVYfvPNpuXb/puqodeeUXcKFe7BLOQ==",
+      "dependencies": {
+        "tslib": "^2.5.0"
       }
     },
-    "node_modules/ast-types": {
-      "version": "0.13.4",
-      "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
-      "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
-      "dev": true,
+    "node_modules/@smithy/util-body-length-node": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz",
+      "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==",
       "dependencies": {
-        "tslib": "^2.0.1"
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=4"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/async-retry": {
-      "version": "1.3.3",
-      "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz",
-      "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==",
-      "dev": true,
+    "node_modules/@smithy/util-buffer-from": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz",
+      "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==",
       "dependencies": {
-        "retry": "0.13.1"
+        "@smithy/is-array-buffer": "^2.0.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/asynckit": {
-      "version": "0.4.0",
-      "license": "MIT"
-    },
-    "node_modules/available-typed-arrays": {
-      "version": "1.0.5",
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
+    "node_modules/@smithy/util-config-provider": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.1.0.tgz",
+      "integrity": "sha512-S6V0JvvhQgFSGLcJeT1CBsaTR03MM8qTuxMH9WPCCddlSo2W0V5jIHimHtIQALMLEDPGQ0ROSRr/dU0O+mxiQg==",
+      "dependencies": {
+        "tslib": "^2.5.0"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/axios": {
-      "version": "0.21.4",
-      "license": "MIT",
+    "node_modules/@smithy/util-defaults-mode-browser": {
+      "version": "2.0.23",
+      "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.23.tgz",
+      "integrity": "sha512-2u+7t7Wgz1jlfsf6il3pz6DIzyJHS3qrnNnmATICm00pQeqp2D4kUOYauOgKGIeKgVpwzzq8+hFQe749r3xR5w==",
       "dependencies": {
-        "follow-redirects": "^1.14.0"
+        "@smithy/property-provider": "^2.0.16",
+        "@smithy/smithy-client": "^2.2.0",
+        "@smithy/types": "^2.7.0",
+        "bowser": "^2.11.0",
+        "tslib": "^2.5.0"
+      },
+      "engines": {
+        "node": ">= 10.0.0"
       }
     },
-    "node_modules/babel-jest": {
-      "version": "27.5.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/util-defaults-mode-node": {
+      "version": "2.0.31",
+      "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.31.tgz",
+      "integrity": "sha512-ZwdjAJAFkkQQ4hdE8HOcxFAWC3GPFXQ3yQ8IBwHH5nQBlr9q+p5eRQ7Y8iRRORJe4vksR+NASRXZ+E81Us1aXQ==",
       "dependencies": {
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/babel__core": "^7.1.14",
-        "babel-plugin-istanbul": "^6.1.1",
-        "babel-preset-jest": "^27.5.1",
-        "chalk": "^4.0.0",
-        "graceful-fs": "^4.2.9",
-        "slash": "^3.0.0"
+        "@smithy/config-resolver": "^2.0.22",
+        "@smithy/credential-provider-imds": "^2.1.4",
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/property-provider": "^2.0.16",
+        "@smithy/smithy-client": "^2.2.0",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.8.0"
+        "node": ">= 10.0.0"
       }
     },
-    "node_modules/babel-jest/node_modules/ansi-styles": {
-      "version": "4.3.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/util-endpoints": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.7.tgz",
+      "integrity": "sha512-Q2gEind3jxoLk6hdKWyESMU7LnXz8aamVwM+VeVjOYzYT1PalGlY/ETa48hv2YpV4+YV604y93YngyzzzQ4IIA==",
       "dependencies": {
-        "color-convert": "^2.0.1"
+        "@smithy/node-config-provider": "^2.1.8",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "node": ">= 14.0.0"
       }
     },
-    "node_modules/babel-jest/node_modules/chalk": {
-      "version": "4.1.2",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/util-hex-encoding": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz",
+      "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/babel-jest/node_modules/color-convert": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/util-middleware": {
+      "version": "2.0.8",
+      "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.8.tgz",
+      "integrity": "sha512-qkvqQjM8fRGGA8P2ydWylMhenCDP8VlkPn8kiNuFEaFz9xnUKC2irfqsBSJrfrOB9Qt6pQsI58r3zvvumhFMkw==",
       "dependencies": {
-        "color-name": "~1.1.4"
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=7.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/babel-jest/node_modules/color-name": {
-      "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/babel-jest/node_modules/has-flag": {
-      "version": "4.0.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/util-retry": {
+      "version": "2.0.8",
+      "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.8.tgz",
+      "integrity": "sha512-cQTPnVaVFMjjS6cb44WV2yXtHVyXDC5icKyIbejMarJEApYeJWpBU3LINTxHqp/tyLI+MZOUdosr2mZ3sdziNg==",
+      "dependencies": {
+        "@smithy/service-error-classification": "^2.0.8",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
+      },
       "engines": {
-        "node": ">=8"
+        "node": ">= 14.0.0"
       }
     },
-    "node_modules/babel-jest/node_modules/supports-color": {
-      "version": "7.2.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/util-stream": {
+      "version": "2.0.23",
+      "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.23.tgz",
+      "integrity": "sha512-OJMWq99LAZJUzUwTk+00plyxX3ESktBaGPhqNIEVab+53gLULiWN9B/8bRABLg0K6R6Xg4t80uRdhk3B/LZqMQ==",
       "dependencies": {
-        "has-flag": "^4.0.0"
+        "@smithy/fetch-http-handler": "^2.3.1",
+        "@smithy/node-http-handler": "^2.2.1",
+        "@smithy/types": "^2.7.0",
+        "@smithy/util-base64": "^2.0.1",
+        "@smithy/util-buffer-from": "^2.0.0",
+        "@smithy/util-hex-encoding": "^2.0.0",
+        "@smithy/util-utf8": "^2.0.2",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/babel-plugin-istanbul": {
-      "version": "6.1.1",
-      "dev": true,
-      "license": "BSD-3-Clause",
+    "node_modules/@smithy/util-uri-escape": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz",
+      "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^7.0.0",
-        "@istanbuljs/load-nyc-config": "^1.0.0",
-        "@istanbuljs/schema": "^0.1.2",
-        "istanbul-lib-instrument": "^5.0.4",
-        "test-exclude": "^6.0.0"
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/babel-plugin-jest-hoist": {
-      "version": "27.5.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/util-utf8": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz",
+      "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==",
       "dependencies": {
-        "@babel/template": "^7.3.3",
-        "@babel/types": "^7.3.3",
-        "@types/babel__core": "^7.0.0",
-        "@types/babel__traverse": "^7.0.6"
+        "@smithy/util-buffer-from": "^2.0.0",
+        "tslib": "^2.5.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/babel-preset-current-node-syntax": {
-      "version": "1.0.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/@smithy/util-waiter": {
+      "version": "2.0.15",
+      "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-2.0.15.tgz",
+      "integrity": "sha512-9Y+btzzB7MhLADW7xgD6SjvmoYaRkrb/9SCbNGmNdfO47v38rxb90IGXyDtAK0Shl9bMthTmLgjlfYc+vtz2Qw==",
       "dependencies": {
-        "@babel/plugin-syntax-async-generators": "^7.8.4",
-        "@babel/plugin-syntax-bigint": "^7.8.3",
-        "@babel/plugin-syntax-class-properties": "^7.8.3",
-        "@babel/plugin-syntax-import-meta": "^7.8.3",
-        "@babel/plugin-syntax-json-strings": "^7.8.3",
-        "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3",
-        "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
-        "@babel/plugin-syntax-numeric-separator": "^7.8.3",
-        "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
-        "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
-        "@babel/plugin-syntax-optional-chaining": "^7.8.3",
-        "@babel/plugin-syntax-top-level-await": "^7.8.3"
+        "@smithy/abort-controller": "^2.0.15",
+        "@smithy/types": "^2.7.0",
+        "tslib": "^2.5.0"
       },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0"
+      "engines": {
+        "node": ">=14.0.0"
       }
     },
-    "node_modules/babel-preset-jest": {
-      "version": "27.5.1",
+    "node_modules/@szmarczak/http-timer": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz",
+      "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "babel-plugin-jest-hoist": "^27.5.1",
-        "babel-preset-current-node-syntax": "^1.0.0"
+        "defer-to-connect": "^2.0.1"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0"
+        "node": ">=14.16"
       }
     },
-    "node_modules/balanced-match": {
-      "version": "1.0.0",
-      "license": "MIT"
-    },
-    "node_modules/base-path-converter": {
-      "version": "1.0.2",
-      "license": "MIT"
-    },
-    "node_modules/base-x": {
-      "version": "3.0.8",
+    "node_modules/@tootallnate/once": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
+      "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==",
+      "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "safe-buffer": "^5.0.1"
+      "engines": {
+        "node": ">= 6"
       }
     },
-    "node_modules/base64-js": {
-      "version": "1.5.1",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "MIT"
-    },
-    "node_modules/before-after-hook": {
-      "version": "2.2.3",
-      "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
-      "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
+    "node_modules/@types/babel__core": {
+      "version": "7.20.5",
+      "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
+      "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",
+      "dev": true,
+      "dependencies": {
+        "@babel/parser": "^7.20.7",
+        "@babel/types": "^7.20.7",
+        "@types/babel__generator": "*",
+        "@types/babel__template": "*",
+        "@types/babel__traverse": "*"
+      }
     },
-    "node_modules/big-integer": {
-      "version": "1.6.51",
-      "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
-      "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==",
+    "node_modules/@types/babel__generator": {
+      "version": "7.6.8",
+      "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",
+      "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==",
       "dev": true,
-      "engines": {
-        "node": ">=0.6"
+      "dependencies": {
+        "@babel/types": "^7.0.0"
       }
     },
-    "node_modules/bl": {
-      "version": "5.0.0",
-      "license": "MIT",
+    "node_modules/@types/babel__template": {
+      "version": "7.4.4",
+      "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",
+      "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",
+      "dev": true,
       "dependencies": {
-        "buffer": "^6.0.3",
-        "inherits": "^2.0.4",
-        "readable-stream": "^3.4.0"
+        "@babel/parser": "^7.1.0",
+        "@babel/types": "^7.0.0"
       }
     },
-    "node_modules/blob-to-it": {
-      "version": "1.0.4",
-      "license": "ISC",
+    "node_modules/@types/babel__traverse": {
+      "version": "7.20.5",
+      "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz",
+      "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==",
+      "dev": true,
       "dependencies": {
-        "browser-readablestream-to-it": "^1.0.3"
+        "@babel/types": "^7.20.7"
       }
     },
-    "node_modules/blockstore-core": {
-      "version": "1.0.5",
-      "license": "(Apache-2.0 OR MIT)",
+    "node_modules/@types/graceful-fs": {
+      "version": "4.1.9",
+      "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
+      "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==",
+      "dev": true,
       "dependencies": {
-        "err-code": "^3.0.1",
-        "interface-blockstore": "^2.0.2",
-        "interface-store": "^2.0.1",
-        "it-all": "^1.0.4",
-        "it-drain": "^1.0.4",
-        "it-filter": "^1.0.2",
-        "it-take": "^1.0.1",
-        "multiformats": "^9.4.7"
+        "@types/node": "*"
       }
     },
-    "node_modules/bowser": {
-      "version": "2.11.0",
-      "license": "MIT"
+    "node_modules/@types/http-cache-semantics": {
+      "version": "4.0.4",
+      "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz",
+      "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==",
+      "dev": true
     },
-    "node_modules/boxen": {
-      "version": "7.0.2",
-      "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.2.tgz",
-      "integrity": "sha512-1Z4UJabXUP1/R9rLpoU3O2lEMnG3pPLAs/ZD2lF3t2q7qD5lM8rqbtnvtvm4N0wEyNlE+9yZVTVAGmd1V5jabg==",
+    "node_modules/@types/istanbul-lib-coverage": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
+      "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==",
+      "dev": true
+    },
+    "node_modules/@types/istanbul-lib-report": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz",
+      "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==",
       "dev": true,
       "dependencies": {
-        "ansi-align": "^3.0.1",
-        "camelcase": "^7.0.0",
-        "chalk": "^5.0.1",
-        "cli-boxes": "^3.0.0",
-        "string-width": "^5.1.2",
-        "type-fest": "^2.13.0",
-        "widest-line": "^4.0.1",
-        "wrap-ansi": "^8.0.1"
-      },
-      "engines": {
-        "node": ">=14.16"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "@types/istanbul-lib-coverage": "*"
       }
     },
-    "node_modules/boxen/node_modules/ansi-styles": {
-      "version": "6.2.1",
-      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
-      "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+    "node_modules/@types/istanbul-reports": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz",
+      "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==",
       "dev": true,
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+      "dependencies": {
+        "@types/istanbul-lib-report": "*"
       }
     },
-    "node_modules/boxen/node_modules/camelcase": {
-      "version": "7.0.1",
-      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
-      "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
-      "dev": true,
-      "engines": {
-        "node": ">=14.16"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+    "node_modules/@types/long": {
+      "version": "4.0.1",
+      "license": "MIT"
+    },
+    "node_modules/@types/minimatch": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",
+      "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
+    },
+    "node_modules/@types/node": {
+      "version": "18.19.4",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.4.tgz",
+      "integrity": "sha512-xNzlUhzoHotIsnFoXmJB+yWmBvFZgKCI9TtPIEdYIMM1KWfwuY8zh7wvc1u1OAXlC7dlf6mZVx/s+Y5KfFz19A==",
+      "dependencies": {
+        "undici-types": "~5.26.4"
       }
     },
-    "node_modules/boxen/node_modules/chalk": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-      "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
+    "node_modules/@types/stack-utils": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",
+      "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",
+      "dev": true
+    },
+    "node_modules/@types/yargs": {
+      "version": "17.0.32",
+      "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz",
+      "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==",
       "dev": true,
-      "engines": {
-        "node": "^12.17.0 || ^14.13 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+      "dependencies": {
+        "@types/yargs-parser": "*"
       }
     },
-    "node_modules/boxen/node_modules/emoji-regex": {
-      "version": "9.2.2",
-      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
-      "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+    "node_modules/@types/yargs-parser": {
+      "version": "21.0.3",
+      "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz",
+      "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==",
       "dev": true
     },
-    "node_modules/boxen/node_modules/string-width": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
-      "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
-      "dev": true,
+    "node_modules/@vascosantos/moving-average": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@vascosantos/moving-average/-/moving-average-1.1.0.tgz",
+      "integrity": "sha512-MVEJ4vWAPNbrGLjz7ITnHYg+YXZ6ijAqtH5/cHwSoCpbvuJ98aLXwFfPKAUfZpJMQR5uXB58UJajbY130IRF/w=="
+    },
+    "node_modules/abortable-iterator": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/abortable-iterator/-/abortable-iterator-5.0.1.tgz",
+      "integrity": "sha512-hlZ5Z8UwqrKsJcelVPEqDduZowJPBQJ9ZhBC2FXpja3lXy8X6MoI5uMzIgmrA8+3jcVnp8TF/tx+IBBqYJNUrg==",
       "dependencies": {
-        "eastasianwidth": "^0.2.0",
-        "emoji-regex": "^9.2.2",
-        "strip-ansi": "^7.0.1"
+        "get-iterator": "^2.0.0",
+        "it-stream-types": "^2.0.1"
       },
       "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/boxen/node_modules/type-fest": {
-      "version": "2.19.0",
-      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
-      "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
+    "node_modules/abortable-iterator/node_modules/get-iterator": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/get-iterator/-/get-iterator-2.0.1.tgz",
+      "integrity": "sha512-7HuY/hebu4gryTDT7O/XY/fvY9wRByEGdK6QOa4of8npTcv0+NS6frFKABcf6S9EBAsveTuKTsZQQBFMMNILIg=="
+    },
+    "node_modules/acorn": {
+      "version": "8.8.0",
       "dev": true,
-      "engines": {
-        "node": ">=12.20"
+      "license": "MIT",
+      "bin": {
+        "acorn": "bin/acorn"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "engines": {
+        "node": ">=0.4.0"
       }
     },
-    "node_modules/boxen/node_modules/wrap-ansi": {
-      "version": "8.1.0",
-      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
-      "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
+    "node_modules/acorn-jsx": {
+      "version": "5.3.2",
+      "dev": true,
+      "license": "MIT",
+      "peerDependencies": {
+        "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+      }
+    },
+    "node_modules/agent-base": {
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+      "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "ansi-styles": "^6.1.0",
-        "string-width": "^5.0.1",
-        "strip-ansi": "^7.0.1"
+        "debug": "4"
       },
       "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+        "node": ">= 6.0.0"
       }
     },
-    "node_modules/bplist-parser": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz",
-      "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==",
+    "node_modules/ajv": {
+      "version": "6.12.6",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+      "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "big-integer": "^1.6.44"
+        "fast-deep-equal": "^3.1.1",
+        "fast-json-stable-stringify": "^2.0.0",
+        "json-schema-traverse": "^0.4.1",
+        "uri-js": "^4.2.2"
       },
-      "engines": {
-        "node": ">= 5.10.0"
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/epoberezkin"
       }
     },
-    "node_modules/brace-expansion": {
-      "version": "1.1.11",
-      "license": "MIT",
+    "node_modules/ansi-align": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
+      "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==",
+      "dev": true,
       "dependencies": {
-        "balanced-match": "^1.0.0",
-        "concat-map": "0.0.1"
+        "string-width": "^4.1.0"
       }
     },
-    "node_modules/braces": {
-      "version": "3.0.2",
+    "node_modules/ansi-colors": {
+      "version": "4.1.1",
       "dev": true,
       "license": "MIT",
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/ansi-escapes": {
+      "version": "4.3.2",
+      "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
+      "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
+      "dev": true,
       "dependencies": {
-        "fill-range": "^7.0.1"
+        "type-fest": "^0.21.3"
       },
       "engines": {
         "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/browser-process-hrtime": {
-      "version": "1.0.0",
+    "node_modules/ansi-regex": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+      "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
       "dev": true,
-      "license": "BSD-2-Clause"
-    },
-    "node_modules/browser-readablestream-to-it": {
-      "version": "1.0.3",
-      "license": "ISC"
+      "license": "MIT",
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "node_modules/browserslist": {
-      "version": "4.21.3",
+    "node_modules/ansi-styles": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
       "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/browserslist"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/browserslist"
-        }
-      ],
-      "license": "MIT",
       "dependencies": {
-        "caniuse-lite": "^1.0.30001370",
-        "electron-to-chromium": "^1.4.202",
-        "node-releases": "^2.0.6",
-        "update-browserslist-db": "^1.0.5"
-      },
-      "bin": {
-        "browserslist": "cli.js"
+        "color-convert": "^1.9.0"
       },
       "engines": {
-        "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+        "node": ">=4"
       }
     },
-    "node_modules/bs58": {
-      "version": "4.0.1",
-      "license": "MIT",
-      "dependencies": {
-        "base-x": "^3.0.2"
-      }
+    "node_modules/any-signal": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-3.0.1.tgz",
+      "integrity": "sha512-xgZgJtKEa9YmDqXodIgl7Fl1C8yNXr8w6gXjqK3LW4GcEiYT+6AQfJSE/8SPsEpLLmcvbv8YU+qet94UewHxqg=="
     },
-    "node_modules/bser": {
-      "version": "2.1.1",
+    "node_modules/anymatch": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+      "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
       "dev": true,
-      "license": "Apache-2.0",
       "dependencies": {
-        "node-int64": "^0.4.0"
+        "normalize-path": "^3.0.0",
+        "picomatch": "^2.0.4"
+      },
+      "engines": {
+        "node": ">= 8"
       }
     },
-    "node_modules/buffer": {
-      "version": "6.0.3",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "MIT",
+    "node_modules/argparse": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+      "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+      "dev": true,
       "dependencies": {
-        "base64-js": "^1.3.1",
-        "ieee754": "^1.2.1"
+        "sprintf-js": "~1.0.2"
       }
     },
-    "node_modules/buffer-from": {
-      "version": "1.1.2",
+    "node_modules/array-buffer-byte-length": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz",
+      "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==",
       "dev": true,
-      "license": "MIT"
+      "dependencies": {
+        "call-bind": "^1.0.2",
+        "is-array-buffer": "^3.0.1"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
     },
-    "node_modules/bundle-name": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz",
-      "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==",
+    "node_modules/array.prototype.map": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.6.tgz",
+      "integrity": "sha512-nK1psgF2cXqP3wSyCSq0Hc7zwNq3sfljQqaG27r/7a7ooNUnn5nGq6yYWyks9jMO5EoFQ0ax80hSg6oXSRNXaw==",
       "dev": true,
       "dependencies": {
-        "run-applescript": "^5.0.0"
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.2.0",
+        "es-abstract": "^1.22.1",
+        "es-array-method-boxes-properly": "^1.0.0",
+        "is-string": "^1.0.7"
       },
       "engines": {
-        "node": ">=12"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/bytes": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
-      "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+    "node_modules/arraybuffer.prototype.slice": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz",
+      "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==",
       "dev": true,
+      "dependencies": {
+        "array-buffer-byte-length": "^1.0.0",
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.2.0",
+        "es-abstract": "^1.22.1",
+        "get-intrinsic": "^1.2.1",
+        "is-array-buffer": "^3.0.2",
+        "is-shared-array-buffer": "^1.0.2"
+      },
       "engines": {
-        "node": ">= 0.8"
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/cacheable-lookup": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
-      "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==",
+    "node_modules/ast-types": {
+      "version": "0.13.4",
+      "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
+      "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
       "dev": true,
+      "dependencies": {
+        "tslib": "^2.0.1"
+      },
       "engines": {
-        "node": ">=14.16"
+        "node": ">=4"
       }
     },
-    "node_modules/cacheable-request": {
-      "version": "10.2.9",
-      "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.9.tgz",
-      "integrity": "sha512-CaAMr53AS1Tb9evO1BIWFnZjSr8A4pbXofpsNVWPMDZZj3ZQKHwsQG9BrTqQ4x5ZYJXz1T2b8LLtTZODxSpzbg==",
+    "node_modules/async-retry": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz",
+      "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==",
       "dev": true,
       "dependencies": {
-        "@types/http-cache-semantics": "^4.0.1",
-        "get-stream": "^6.0.1",
-        "http-cache-semantics": "^4.1.1",
-        "keyv": "^4.5.2",
-        "mimic-response": "^4.0.0",
-        "normalize-url": "^8.0.0",
-        "responselike": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=14.16"
+        "retry": "0.13.1"
       }
     },
-    "node_modules/call-bind": {
-      "version": "1.0.2",
-      "license": "MIT",
-      "dependencies": {
-        "function-bind": "^1.1.1",
-        "get-intrinsic": "^1.0.2"
+    "node_modules/asynckit": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
+      "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+      "license": "MIT"
+    },
+    "node_modules/available-typed-arrays": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
+      "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",
+      "dev": true,
+      "engines": {
+        "node": ">= 0.4"
       },
       "funding": {
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/callsites": {
-      "version": "3.1.0",
-      "dev": true,
+    "node_modules/axios": {
+      "version": "0.21.4",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
+      "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
       "license": "MIT",
-      "engines": {
-        "node": ">=6"
+      "dependencies": {
+        "follow-redirects": "^1.14.0"
       }
     },
-    "node_modules/camelcase": {
-      "version": "5.3.1",
-      "license": "MIT",
+    "node_modules/babel-jest": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz",
+      "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==",
+      "dev": true,
+      "dependencies": {
+        "@jest/transform": "^29.7.0",
+        "@types/babel__core": "^7.1.14",
+        "babel-plugin-istanbul": "^6.1.1",
+        "babel-preset-jest": "^29.6.3",
+        "chalk": "^4.0.0",
+        "graceful-fs": "^4.2.9",
+        "slash": "^3.0.0"
+      },
       "engines": {
-        "node": ">=6"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.8.0"
       }
     },
-    "node_modules/camelcase-keys": {
-      "version": "6.2.2",
-      "license": "MIT",
+    "node_modules/babel-jest/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+      "dev": true,
       "dependencies": {
-        "camelcase": "^5.3.1",
-        "map-obj": "^4.0.0",
-        "quick-lru": "^4.0.1"
+        "color-convert": "^2.0.1"
       },
       "engines": {
         "node": ">=8"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/camelcase-keys/node_modules/quick-lru": {
-      "version": "4.0.1",
-      "license": "MIT",
+    "node_modules/babel-jest/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+      "dev": true,
+      "dependencies": {
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
+      },
       "engines": {
-        "node": ">=8"
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/caniuse-lite": {
-      "version": "1.0.30001382",
+    "node_modules/babel-jest/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/browserslist"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
-        }
-      ],
-      "license": "CC-BY-4.0"
-    },
-    "node_modules/carbites": {
-      "version": "1.0.6",
-      "license": "(Apache-2.0 AND MIT)",
       "dependencies": {
-        "@ipld/car": "^3.0.1",
-        "@ipld/dag-cbor": "^6.0.3",
-        "@ipld/dag-pb": "^2.0.2",
-        "multiformats": "^9.0.4"
+        "color-name": "~1.1.4"
+      },
+      "engines": {
+        "node": ">=7.0.0"
       }
     },
-    "node_modules/carbites/node_modules/@ipld/dag-cbor": {
-      "version": "6.0.15",
-      "license": "(Apache-2.0 AND MIT)",
-      "dependencies": {
-        "cborg": "^1.5.4",
-        "multiformats": "^9.5.4"
-      }
+    "node_modules/babel-jest/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
-    "node_modules/cborg": {
-      "version": "1.6.1",
-      "license": "Apache-2.0",
-      "bin": {
-        "cborg": "cli.js"
+    "node_modules/babel-jest/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+      "dev": true,
+      "engines": {
+        "node": ">=8"
       }
     },
-    "node_modules/chalk": {
-      "version": "2.4.2",
-      "license": "MIT",
+    "node_modules/babel-jest/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+      "dev": true,
       "dependencies": {
-        "ansi-styles": "^3.2.1",
-        "escape-string-regexp": "^1.0.5",
-        "supports-color": "^5.3.0"
+        "has-flag": "^4.0.0"
       },
       "engines": {
-        "node": ">=4"
+        "node": ">=8"
       }
     },
-    "node_modules/char-regex": {
-      "version": "1.0.2",
+    "node_modules/babel-plugin-istanbul": {
+      "version": "6.1.1",
+      "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz",
+      "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==",
       "dev": true,
-      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-plugin-utils": "^7.0.0",
+        "@istanbuljs/load-nyc-config": "^1.0.0",
+        "@istanbuljs/schema": "^0.1.2",
+        "istanbul-lib-instrument": "^5.0.4",
+        "test-exclude": "^6.0.0"
+      },
       "engines": {
-        "node": ">=10"
+        "node": ">=8"
       }
     },
-    "node_modules/chardet": {
-      "version": "0.7.0",
-      "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
-      "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
-      "dev": true
-    },
-    "node_modules/ci-info": {
-      "version": "3.8.0",
-      "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",
-      "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==",
+    "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz",
+      "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==",
       "dev": true,
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/sibiraj-s"
-        }
-      ],
+      "dependencies": {
+        "@babel/core": "^7.12.3",
+        "@babel/parser": "^7.14.7",
+        "@istanbuljs/schema": "^0.1.2",
+        "istanbul-lib-coverage": "^3.2.0",
+        "semver": "^6.3.0"
+      },
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/cids": {
-      "version": "0.7.5",
-      "license": "MIT",
+    "node_modules/babel-plugin-istanbul/node_modules/semver": {
+      "version": "6.3.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+      "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+      "dev": true,
+      "bin": {
+        "semver": "bin/semver.js"
+      }
+    },
+    "node_modules/babel-plugin-jest-hoist": {
+      "version": "29.6.3",
+      "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz",
+      "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==",
+      "dev": true,
       "dependencies": {
-        "buffer": "^5.5.0",
-        "class-is": "^1.1.0",
-        "multibase": "~0.6.0",
-        "multicodec": "^1.0.0",
-        "multihashes": "~0.4.15"
+        "@babel/template": "^7.3.3",
+        "@babel/types": "^7.3.3",
+        "@types/babel__core": "^7.1.14",
+        "@types/babel__traverse": "^7.0.6"
       },
       "engines": {
-        "node": ">=4.0.0",
-        "npm": ">=3.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/cids/node_modules/buffer": {
-      "version": "5.7.1",
+    "node_modules/babel-preset-current-node-syntax": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz",
+      "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==",
+      "dev": true,
+      "dependencies": {
+        "@babel/plugin-syntax-async-generators": "^7.8.4",
+        "@babel/plugin-syntax-bigint": "^7.8.3",
+        "@babel/plugin-syntax-class-properties": "^7.8.3",
+        "@babel/plugin-syntax-import-meta": "^7.8.3",
+        "@babel/plugin-syntax-json-strings": "^7.8.3",
+        "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3",
+        "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
+        "@babel/plugin-syntax-numeric-separator": "^7.8.3",
+        "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+        "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
+        "@babel/plugin-syntax-optional-chaining": "^7.8.3",
+        "@babel/plugin-syntax-top-level-await": "^7.8.3"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0"
+      }
+    },
+    "node_modules/babel-preset-jest": {
+      "version": "29.6.3",
+      "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz",
+      "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==",
+      "dev": true,
+      "dependencies": {
+        "babel-plugin-jest-hoist": "^29.6.3",
+        "babel-preset-current-node-syntax": "^1.0.0"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      },
+      "peerDependencies": {
+        "@babel/core": "^7.0.0"
+      }
+    },
+    "node_modules/balanced-match": {
+      "version": "1.0.0",
+      "license": "MIT"
+    },
+    "node_modules/base-path-converter": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/base-path-converter/-/base-path-converter-1.0.2.tgz",
+      "integrity": "sha512-51R8JiuXadknn6ouVUteOhDpmI3G5u5GqjruL7bPJpfxUHVgosaO5uPAvRP4FeR4VyyH4sSvsN78Ci6ouoRYqQ==",
+      "license": "MIT"
+    },
+    "node_modules/base-x": {
+      "version": "3.0.8",
+      "license": "MIT",
+      "dependencies": {
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "node_modules/base64-js": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+      "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
       "funding": [
         {
           "type": "github",
@@ -4011,248 +4959,292 @@
           "url": "https://feross.org/support"
         }
       ],
-      "license": "MIT",
-      "dependencies": {
-        "base64-js": "^1.3.1",
-        "ieee754": "^1.1.13"
-      }
-    },
-    "node_modules/cjs-module-lexer": {
-      "version": "1.2.2",
-      "dev": true,
       "license": "MIT"
     },
-    "node_modules/class-is": {
-      "version": "1.1.0",
-      "license": "MIT"
+    "node_modules/before-after-hook": {
+      "version": "2.2.3",
+      "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
+      "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
     },
-    "node_modules/cli-boxes": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",
-      "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==",
+    "node_modules/big-integer": {
+      "version": "1.6.52",
+      "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.52.tgz",
+      "integrity": "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg==",
       "dev": true,
       "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=0.6"
       }
     },
-    "node_modules/cli-cursor": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",
-      "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",
-      "dev": true,
+    "node_modules/bl": {
+      "version": "5.0.0",
+      "license": "MIT",
       "dependencies": {
-        "restore-cursor": "^4.0.0"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "buffer": "^6.0.3",
+        "inherits": "^2.0.4",
+        "readable-stream": "^3.4.0"
       }
     },
-    "node_modules/cli-spinners": {
-      "version": "2.8.0",
-      "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.8.0.tgz",
-      "integrity": "sha512-/eG5sJcvEIwxcdYM86k5tPwn0MUzkX5YY3eImTGpJOZgVe4SdTMY14vQpcxgBzJ0wXwAYrS8E+c3uHeK4JNyzQ==",
-      "dev": true,
-      "engines": {
-        "node": ">=6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+    "node_modules/blob-to-it": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/blob-to-it/-/blob-to-it-2.0.5.tgz",
+      "integrity": "sha512-3VIFla8L4JuB+0WCdf+0POI7E1tTl8mhdGiwwwmnZEu6QjRJciS9fIvz8NgWY9URb0iagXYModGEYTcYeq9BMg==",
+      "dependencies": {
+        "browser-readablestream-to-it": "^2.0.0"
       }
     },
-    "node_modules/cli-width": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.0.0.tgz",
-      "integrity": "sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw==",
-      "dev": true,
-      "engines": {
-        "node": ">= 12"
+    "node_modules/blockstore-fs": {
+      "version": "1.1.8",
+      "resolved": "https://registry.npmjs.org/blockstore-fs/-/blockstore-fs-1.1.8.tgz",
+      "integrity": "sha512-1KD1+yEkxszZ3GWQdJbGgXAOs12LJC/Pit7JCPueJT/Pjt9GWtGZ4+8mgoaR3bjXVBgBIdhNlUxxw2NS787noA==",
+      "dependencies": {
+        "blockstore-core": "^4.0.0",
+        "fast-write-atomic": "^0.2.0",
+        "interface-blockstore": "^5.0.0",
+        "interface-store": "^5.0.0",
+        "it-glob": "^2.0.1",
+        "it-map": "^3.0.1",
+        "it-parallel-batch": "^3.0.0",
+        "multiformats": "^12.0.1"
       }
     },
-    "node_modules/cliui": {
-      "version": "7.0.4",
-      "dev": true,
-      "license": "ISC",
+    "node_modules/blockstore-fs/node_modules/@libp2p/interface": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.0.2.tgz",
+      "integrity": "sha512-z/3Yyg+7cVyzRXwzdrDkJd7YmNaLE9iZjQaixo5luI/n9uk5OFFjb9ulAsNqpq8V1xylCo2DXIC7f94KClwzVw==",
       "dependencies": {
-        "string-width": "^4.2.0",
-        "strip-ansi": "^6.0.0",
-        "wrap-ansi": "^7.0.0"
+        "@multiformats/multiaddr": "^12.1.10",
+        "it-pushable": "^3.2.1",
+        "it-stream-types": "^2.0.1",
+        "multiformats": "^12.1.3",
+        "uint8arraylist": "^2.4.3"
       }
     },
-    "node_modules/cliui/node_modules/strip-ansi": {
-      "version": "6.0.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/blockstore-fs/node_modules/@libp2p/logger": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.2.tgz",
+      "integrity": "sha512-J9UMtMU9BKXNp+3c5kcI7HyWOPYg2B2E6sn1gEQckiSexTaz0wKJSlgTZ89f9F8bkC3AaC8ybXYuHbFQhwpTIg==",
       "dependencies": {
-        "ansi-regex": "^5.0.1"
-      },
-      "engines": {
-        "node": ">=8"
+        "@libp2p/interface": "^1.0.2",
+        "@multiformats/multiaddr": "^12.1.10",
+        "debug": "^4.3.4",
+        "interface-datastore": "^8.2.0",
+        "multiformats": "^12.1.3"
       }
     },
-    "node_modules/clone": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
-      "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.8"
+    "node_modules/blockstore-fs/node_modules/blockstore-core": {
+      "version": "4.3.9",
+      "resolved": "https://registry.npmjs.org/blockstore-core/-/blockstore-core-4.3.9.tgz",
+      "integrity": "sha512-n09dbTkWUdFfPDl8asqEivXhY5gDG52NhO7TDHzFKN+vmnCchO+ckcYtyO4Gy2mBCt28orErEzrIeamdFmbeTA==",
+      "dependencies": {
+        "@libp2p/logger": "^4.0.1",
+        "err-code": "^3.0.1",
+        "interface-blockstore": "^5.0.0",
+        "interface-store": "^5.0.0",
+        "it-drain": "^3.0.1",
+        "it-filter": "^3.0.0",
+        "it-merge": "^3.0.1",
+        "it-pushable": "^3.0.0",
+        "multiformats": "^13.0.0",
+        "uint8arrays": "^5.0.0"
+      }
+    },
+    "node_modules/blockstore-fs/node_modules/blockstore-core/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/blockstore-fs/node_modules/brace-expansion": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+      "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+      "dependencies": {
+        "balanced-match": "^1.0.0"
       }
     },
-    "node_modules/co": {
-      "version": "4.6.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "iojs": ">= 1.0.0",
-        "node": ">= 0.12.0"
+    "node_modules/blockstore-fs/node_modules/interface-blockstore": {
+      "version": "5.2.8",
+      "resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.2.8.tgz",
+      "integrity": "sha512-C889pHW6hlVzJ0xjguXp6OK8ZeRMu/U8S2QjC/VnQQZXEGDXQDOn0fiYIJngOtb0q82UgxxQCjfTsRhpLfEE8g==",
+      "dependencies": {
+        "interface-store": "^5.0.0",
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/collect-v8-coverage": {
-      "version": "1.0.1",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/blockstore-fs/node_modules/interface-blockstore/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
-    "node_modules/color-convert": {
-      "version": "1.9.3",
-      "license": "MIT",
+    "node_modules/blockstore-fs/node_modules/interface-datastore": {
+      "version": "8.2.9",
+      "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.9.tgz",
+      "integrity": "sha512-J/8PN8TnB5xxCRtgu9Vx3zExdOzcTU5/DBF2dlU41deX1GW6/SPpbJo5DRNSnvzfjmwJ7YhUOIFXyccUp8nuAA==",
       "dependencies": {
-        "color-name": "1.1.3"
+        "interface-store": "^5.0.0",
+        "uint8arrays": "^5.0.0"
       }
     },
-    "node_modules/color-name": {
-      "version": "1.1.3",
-      "license": "MIT"
+    "node_modules/blockstore-fs/node_modules/interface-store": {
+      "version": "5.1.5",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.5.tgz",
+      "integrity": "sha512-X0KnJBk3o+YL13MxZBMwa88/b3Mdrpm0yPzkSTKDDVn9BSPH7UK6W+ZtIPO2bxKOQVmq7zqOwAnYnpfqWjb6/g=="
     },
-    "node_modules/combined-stream": {
-      "version": "1.0.8",
-      "license": "MIT",
+    "node_modules/blockstore-fs/node_modules/it-batch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-batch/-/it-batch-3.0.4.tgz",
+      "integrity": "sha512-WRu2mqOYIs+T9k7+yxSK9VJdk0UE4R0jKQsWQcti5c6vhb1FhjC2+yCB5XBrctQ9edNfCMU/wVzdDj8qSwimbA=="
+    },
+    "node_modules/blockstore-fs/node_modules/it-filter": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-filter/-/it-filter-3.0.4.tgz",
+      "integrity": "sha512-e0sz+st4sudK/zH6GZ/gRTRP8A/ADuJFCYDmRgMbZvR79y5+v4ZXav850bBZk5wL9zXaYZFxS1v/6Qi+Vjwh5g==",
       "dependencies": {
-        "delayed-stream": "~1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.8"
+        "it-peekable": "^3.0.0"
       }
     },
-    "node_modules/concat-map": {
-      "version": "0.0.1",
-      "license": "MIT"
+    "node_modules/blockstore-fs/node_modules/it-glob": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/it-glob/-/it-glob-2.0.6.tgz",
+      "integrity": "sha512-4C6ccz4nhqrq7yZMzBr3MsKhyL+rlnLXIPceyGG6ogl3Lx3eeWMv1RtlySJwFi6q+jVcPyTpeYt/xftwI2JEQQ==",
+      "dependencies": {
+        "minimatch": "^9.0.0"
+      }
     },
-    "node_modules/config-chain": {
-      "version": "1.1.13",
-      "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
-      "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
-      "dev": true,
+    "node_modules/blockstore-fs/node_modules/it-map": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/it-map/-/it-map-3.0.5.tgz",
+      "integrity": "sha512-hB0TDXo/h4KSJJDSRLgAPmDroiXP6Fx1ck4Bzl3US9hHfZweTKsuiP0y4gXuTMcJlS6vj0bb+f70rhkD47ZA3w==",
       "dependencies": {
-        "ini": "^1.3.4",
-        "proto-list": "~1.2.1"
+        "it-peekable": "^3.0.0"
       }
     },
-    "node_modules/config-chain/node_modules/ini": {
-      "version": "1.3.8",
-      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
-      "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
-      "dev": true
+    "node_modules/blockstore-fs/node_modules/it-parallel-batch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-parallel-batch/-/it-parallel-batch-3.0.4.tgz",
+      "integrity": "sha512-O1omh8ss8+UtXiMjE+8kM5C20DT0Ma4VtKVfrSHOJU0UHZ+iWBXarabzPYEp+WiuQmrv+klDPPlTZ9KaLN9xOA==",
+      "dependencies": {
+        "it-batch": "^3.0.0"
+      }
     },
-    "node_modules/configstore": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz",
-      "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==",
-      "dev": true,
+    "node_modules/blockstore-fs/node_modules/it-peekable": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.3.tgz",
+      "integrity": "sha512-Wx21JX/rMzTEl9flx3DGHuPV1KQFGOl8uoKfQtmZHgPQtGb89eQ6RyVd82h3HuP9Ghpt0WgBDlmmdWeHXqyx7w=="
+    },
+    "node_modules/blockstore-fs/node_modules/minimatch": {
+      "version": "9.0.3",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
+      "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
       "dependencies": {
-        "dot-prop": "^6.0.1",
-        "graceful-fs": "^4.2.6",
-        "unique-string": "^3.0.0",
-        "write-file-atomic": "^3.0.3",
-        "xdg-basedir": "^5.0.1"
+        "brace-expansion": "^2.0.1"
       },
       "engines": {
-        "node": ">=12"
+        "node": ">=16 || 14 >=14.17"
       },
       "funding": {
-        "url": "https://github.com/yeoman/configstore?sponsor=1"
+        "url": "https://github.com/sponsors/isaacs"
       }
     },
-    "node_modules/convert-source-map": {
-      "version": "1.8.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/blockstore-fs/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/blockstore-fs/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
       "dependencies": {
-        "safe-buffer": "~5.1.1"
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/convert-source-map/node_modules/safe-buffer": {
-      "version": "5.1.2",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/blockstore-fs/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
-    "node_modules/core-util-is": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
-      "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
-      "dev": true
+    "node_modules/bowser": {
+      "version": "2.11.0",
+      "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz",
+      "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA=="
     },
-    "node_modules/cosmiconfig": {
-      "version": "8.1.3",
-      "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz",
-      "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==",
+    "node_modules/boxen": {
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.1.1.tgz",
+      "integrity": "sha512-2hCgjEmP8YLWQ130n2FerGv7rYpfBmnmp9Uy2Le1vge6X3gZIfSmEzP5QTDElFxcvVcXlEn8Aq6MU/PZygIOog==",
       "dev": true,
       "dependencies": {
-        "import-fresh": "^3.2.1",
-        "js-yaml": "^4.1.0",
-        "parse-json": "^5.0.0",
-        "path-type": "^4.0.0"
+        "ansi-align": "^3.0.1",
+        "camelcase": "^7.0.1",
+        "chalk": "^5.2.0",
+        "cli-boxes": "^3.0.0",
+        "string-width": "^5.1.2",
+        "type-fest": "^2.13.0",
+        "widest-line": "^4.0.1",
+        "wrap-ansi": "^8.1.0"
       },
       "engines": {
-        "node": ">=14"
+        "node": ">=14.16"
       },
       "funding": {
-        "url": "https://github.com/sponsors/d-fischer"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/cosmiconfig/node_modules/argparse": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
-      "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
-      "dev": true
-    },
-    "node_modules/cosmiconfig/node_modules/js-yaml": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
-      "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
+    "node_modules/boxen/node_modules/ansi-styles": {
+      "version": "6.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+      "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
       "dev": true,
-      "dependencies": {
-        "argparse": "^2.0.1"
+      "engines": {
+        "node": ">=12"
       },
-      "bin": {
-        "js-yaml": "bin/js-yaml.js"
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/cross-spawn": {
-      "version": "7.0.3",
+    "node_modules/boxen/node_modules/camelcase": {
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
+      "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "path-key": "^3.1.0",
-        "shebang-command": "^2.0.0",
-        "which": "^2.0.1"
+      "engines": {
+        "node": ">=14.16"
       },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/boxen/node_modules/chalk": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+      "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+      "dev": true,
       "engines": {
-        "node": ">= 8"
+        "node": "^12.17.0 || ^14.13 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/crypto-random-string": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz",
-      "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==",
+    "node_modules/boxen/node_modules/emoji-regex": {
+      "version": "9.2.2",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+      "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+      "dev": true
+    },
+    "node_modules/boxen/node_modules/string-width": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+      "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
       "dev": true,
       "dependencies": {
-        "type-fest": "^1.0.1"
+        "eastasianwidth": "^0.2.0",
+        "emoji-regex": "^9.2.2",
+        "strip-ansi": "^7.0.1"
       },
       "engines": {
         "node": ">=12"
@@ -4261,256 +5253,383 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/crypto-random-string/node_modules/type-fest": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
-      "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
+    "node_modules/boxen/node_modules/type-fest": {
+      "version": "2.19.0",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
+      "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
       "dev": true,
       "engines": {
-        "node": ">=10"
+        "node": ">=12.20"
       },
       "funding": {
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/cssom": {
-      "version": "0.4.4",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/cssstyle": {
-      "version": "2.3.0",
+    "node_modules/boxen/node_modules/wrap-ansi": {
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
+      "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "cssom": "~0.3.6"
+        "ansi-styles": "^6.1.0",
+        "string-width": "^5.0.1",
+        "strip-ansi": "^7.0.1"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
       }
     },
-    "node_modules/cssstyle/node_modules/cssom": {
-      "version": "0.3.8",
+    "node_modules/bplist-parser": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz",
+      "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==",
       "dev": true,
-      "license": "MIT"
+      "dependencies": {
+        "big-integer": "^1.6.44"
+      },
+      "engines": {
+        "node": ">= 5.10.0"
+      }
     },
-    "node_modules/data-uri-to-buffer": {
-      "version": "3.0.1",
+    "node_modules/brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
       "license": "MIT",
-      "engines": {
-        "node": ">= 6"
+      "dependencies": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
       }
     },
-    "node_modules/data-urls": {
-      "version": "2.0.0",
+    "node_modules/braces": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+      "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "abab": "^2.0.3",
-        "whatwg-mimetype": "^2.3.0",
-        "whatwg-url": "^8.0.0"
+        "fill-range": "^7.0.1"
       },
       "engines": {
-        "node": ">=10"
+        "node": ">=8"
       }
     },
-    "node_modules/debug": {
-      "version": "4.3.4",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
-      "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+    "node_modules/browser-readablestream-to-it": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/browser-readablestream-to-it/-/browser-readablestream-to-it-2.0.5.tgz",
+      "integrity": "sha512-obLCT9jnxAeZlbaRWluUiZrcSJEoi2JkM0eoiJqlIP7MFwZwZjcB6giZvD343PXfr96ilD91M/wFqFvyAZq+Gg=="
+    },
+    "node_modules/browserslist": {
+      "version": "4.22.2",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",
+      "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==",
+      "dev": true,
+      "funding": [
+        {
+          "type": "opencollective",
+          "url": "https://opencollective.com/browserslist"
+        },
+        {
+          "type": "tidelift",
+          "url": "https://tidelift.com/funding/github/npm/browserslist"
+        },
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/ai"
+        }
+      ],
       "dependencies": {
-        "ms": "2.1.2"
+        "caniuse-lite": "^1.0.30001565",
+        "electron-to-chromium": "^1.4.601",
+        "node-releases": "^2.0.14",
+        "update-browserslist-db": "^1.0.13"
       },
-      "engines": {
-        "node": ">=6.0"
+      "bin": {
+        "browserslist": "cli.js"
       },
-      "peerDependenciesMeta": {
-        "supports-color": {
-          "optional": true
-        }
+      "engines": {
+        "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
       }
     },
-    "node_modules/decamelize": {
-      "version": "1.2.0",
+    "node_modules/bs58": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz",
+      "integrity": "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==",
       "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
+      "dependencies": {
+        "base-x": "^3.0.2"
       }
     },
-    "node_modules/decamelize-keys": {
-      "version": "1.1.0",
-      "license": "MIT",
+    "node_modules/bser": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz",
+      "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==",
+      "dev": true,
       "dependencies": {
-        "decamelize": "^1.1.0",
-        "map-obj": "^1.0.0"
-      },
-      "engines": {
-        "node": ">=0.10.0"
+        "node-int64": "^0.4.0"
       }
     },
-    "node_modules/decamelize-keys/node_modules/map-obj": {
-      "version": "1.0.1",
+    "node_modules/buffer": {
+      "version": "6.0.3",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+      "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
       "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
+      "dependencies": {
+        "base64-js": "^1.3.1",
+        "ieee754": "^1.2.1"
       }
     },
-    "node_modules/decimal.js": {
-      "version": "10.4.0",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/buffer-from": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+      "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+      "dev": true
     },
-    "node_modules/decompress-response": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
-      "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
+    "node_modules/bundle-name": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz",
+      "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==",
       "dev": true,
       "dependencies": {
-        "mimic-response": "^3.1.0"
+        "run-applescript": "^5.0.0"
       },
       "engines": {
-        "node": ">=10"
+        "node": ">=12"
       },
       "funding": {
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/decompress-response/node_modules/mimic-response": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
-      "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+    "node_modules/bytes": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+      "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
       "dev": true,
       "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">= 0.8"
       }
     },
-    "node_modules/dedent": {
-      "version": "0.7.0",
+    "node_modules/cacheable-lookup": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
+      "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==",
       "dev": true,
-      "license": "MIT"
+      "engines": {
+        "node": ">=14.16"
+      }
     },
-    "node_modules/deep-extend": {
-      "version": "0.6.0",
-      "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
-      "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+    "node_modules/cacheable-request": {
+      "version": "10.2.14",
+      "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.14.tgz",
+      "integrity": "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ==",
       "dev": true,
+      "dependencies": {
+        "@types/http-cache-semantics": "^4.0.2",
+        "get-stream": "^6.0.1",
+        "http-cache-semantics": "^4.1.1",
+        "keyv": "^4.5.3",
+        "mimic-response": "^4.0.0",
+        "normalize-url": "^8.0.0",
+        "responselike": "^3.0.0"
+      },
       "engines": {
-        "node": ">=4.0.0"
+        "node": ">=14.16"
       }
     },
-    "node_modules/deep-is": {
-      "version": "0.1.3",
+    "node_modules/call-bind": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz",
+      "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",
       "dev": true,
-      "license": "MIT"
+      "dependencies": {
+        "function-bind": "^1.1.2",
+        "get-intrinsic": "^1.2.1",
+        "set-function-length": "^1.1.1"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
     },
-    "node_modules/deepmerge": {
-      "version": "4.2.2",
+    "node_modules/callsites": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+      "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
-        "node": ">=0.10.0"
+        "node": ">=6"
       }
     },
-    "node_modules/default-browser": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz",
-      "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==",
+    "node_modules/camelcase": {
+      "version": "5.3.1",
+      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+      "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
       "dev": true,
-      "dependencies": {
-        "bundle-name": "^3.0.0",
-        "default-browser-id": "^3.0.0",
-        "execa": "^7.1.1",
-        "titleize": "^3.0.0"
-      },
       "engines": {
-        "node": ">=14.16"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=6"
       }
     },
-    "node_modules/default-browser-id": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz",
-      "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==",
+    "node_modules/caniuse-lite": {
+      "version": "1.0.30001574",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz",
+      "integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==",
       "dev": true,
-      "dependencies": {
-        "bplist-parser": "^0.2.0",
-        "untildify": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "funding": [
+        {
+          "type": "opencollective",
+          "url": "https://opencollective.com/browserslist"
+        },
+        {
+          "type": "tidelift",
+          "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+        },
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/ai"
+        }
+      ]
+    },
+    "node_modules/cborg": {
+      "version": "4.0.5",
+      "resolved": "https://registry.npmjs.org/cborg/-/cborg-4.0.5.tgz",
+      "integrity": "sha512-q8TAjprr8pn9Fp53rOIGp/UFDdFY6os2Nq62YogPSIzczJD9M6g2b6igxMkpCiZZKJ0kn/KzDLDvG+EqBIEeCg==",
+      "bin": {
+        "cborg": "lib/bin.js"
       }
     },
-    "node_modules/default-browser/node_modules/execa": {
-      "version": "7.1.1",
-      "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz",
-      "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==",
+    "node_modules/chalk": {
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+      "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
       "dev": true,
       "dependencies": {
-        "cross-spawn": "^7.0.3",
-        "get-stream": "^6.0.1",
-        "human-signals": "^4.3.0",
-        "is-stream": "^3.0.0",
-        "merge-stream": "^2.0.0",
-        "npm-run-path": "^5.1.0",
-        "onetime": "^6.0.0",
-        "signal-exit": "^3.0.7",
-        "strip-final-newline": "^3.0.0"
+        "ansi-styles": "^3.2.1",
+        "escape-string-regexp": "^1.0.5",
+        "supports-color": "^5.3.0"
       },
       "engines": {
-        "node": "^14.18.0 || ^16.14.0 || >=18.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sindresorhus/execa?sponsor=1"
+        "node": ">=4"
       }
     },
-    "node_modules/default-browser/node_modules/human-signals": {
-      "version": "4.3.1",
-      "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",
-      "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==",
+    "node_modules/char-regex": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz",
+      "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==",
       "dev": true,
       "engines": {
-        "node": ">=14.18.0"
+        "node": ">=10"
       }
     },
-    "node_modules/default-browser/node_modules/is-stream": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
-      "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
+    "node_modules/chardet": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
+      "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
+      "dev": true
+    },
+    "node_modules/ci-info": {
+      "version": "3.9.0",
+      "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz",
+      "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==",
       "dev": true,
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/sibiraj-s"
+        }
+      ],
       "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+        "node": ">=8"
+      }
+    },
+    "node_modules/cids": {
+      "version": "0.7.5",
+      "resolved": "https://registry.npmjs.org/cids/-/cids-0.7.5.tgz",
+      "integrity": "sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA==",
+      "license": "MIT",
+      "dependencies": {
+        "buffer": "^5.5.0",
+        "class-is": "^1.1.0",
+        "multibase": "~0.6.0",
+        "multicodec": "^1.0.0",
+        "multihashes": "~0.4.15"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "engines": {
+        "node": ">=4.0.0",
+        "npm": ">=3.0.0"
       }
     },
-    "node_modules/default-browser/node_modules/mimic-fn": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
-      "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+    "node_modules/cids/node_modules/buffer": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+      "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "base64-js": "^1.3.1",
+        "ieee754": "^1.1.13"
+      }
+    },
+    "node_modules/cjs-module-lexer": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz",
+      "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==",
+      "dev": true
+    },
+    "node_modules/class-is": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/class-is/-/class-is-1.1.0.tgz",
+      "integrity": "sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw==",
+      "license": "MIT"
+    },
+    "node_modules/cli-boxes": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",
+      "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==",
       "dev": true,
       "engines": {
-        "node": ">=12"
+        "node": ">=10"
       },
       "funding": {
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/default-browser/node_modules/npm-run-path": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",
-      "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",
+    "node_modules/cli-cursor": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",
+      "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",
       "dev": true,
       "dependencies": {
-        "path-key": "^4.0.0"
+        "restore-cursor": "^4.0.0"
       },
       "engines": {
         "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
@@ -4519,414 +5638,516 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/default-browser/node_modules/onetime": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
-      "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
+    "node_modules/cli-spinners": {
+      "version": "2.9.2",
+      "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz",
+      "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==",
       "dev": true,
-      "dependencies": {
-        "mimic-fn": "^4.0.0"
-      },
       "engines": {
-        "node": ">=12"
+        "node": ">=6"
       },
       "funding": {
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/default-browser/node_modules/path-key": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
-      "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+    "node_modules/cli-width": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz",
+      "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==",
       "dev": true,
       "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">= 12"
       }
     },
-    "node_modules/default-browser/node_modules/strip-final-newline": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
-      "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
+    "node_modules/cliui": {
+      "version": "8.0.1",
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+      "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
       "dev": true,
+      "dependencies": {
+        "string-width": "^4.2.0",
+        "strip-ansi": "^6.0.1",
+        "wrap-ansi": "^7.0.0"
+      },
       "engines": {
         "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/defaults": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
-      "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
+    "node_modules/cliui/node_modules/strip-ansi": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
       "dev": true,
       "dependencies": {
-        "clone": "^1.0.2"
+        "ansi-regex": "^5.0.1"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "engines": {
+        "node": ">=8"
       }
     },
-    "node_modules/defer-to-connect": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
-      "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
+    "node_modules/clone": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
+      "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
       "dev": true,
       "engines": {
-        "node": ">=10"
+        "node": ">=0.8"
       }
     },
-    "node_modules/define-lazy-prop": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
-      "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
-      "dev": true,
+    "node_modules/co": {
+      "version": "4.6.0",
+      "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+      "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==",
+      "dev": true,
       "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "iojs": ">= 1.0.0",
+        "node": ">= 0.12.0"
       }
     },
-    "node_modules/define-properties": {
-      "version": "1.1.4",
+    "node_modules/collect-v8-coverage": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz",
+      "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==",
+      "dev": true
+    },
+    "node_modules/color-convert": {
+      "version": "1.9.3",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+      "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+      "dev": true,
+      "dependencies": {
+        "color-name": "1.1.3"
+      }
+    },
+    "node_modules/color-name": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+      "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+      "dev": true
+    },
+    "node_modules/combined-stream": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
       "license": "MIT",
       "dependencies": {
-        "has-property-descriptors": "^1.0.0",
-        "object-keys": "^1.1.1"
+        "delayed-stream": "~1.0.0"
       },
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">= 0.8"
       }
     },
-    "node_modules/degenerator": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-3.0.2.tgz",
-      "integrity": "sha512-c0mef3SNQo56t6urUU6tdQAs+ThoD0o9B9MJ8HEt7NQcGEILCRFqQb7ZbP9JAv+QF1Ky5plydhMR/IrqWDm+TQ==",
+    "node_modules/concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+      "license": "MIT"
+    },
+    "node_modules/config-chain": {
+      "version": "1.1.13",
+      "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
+      "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
       "dev": true,
       "dependencies": {
-        "ast-types": "^0.13.2",
-        "escodegen": "^1.8.1",
-        "esprima": "^4.0.0",
-        "vm2": "^3.9.8"
-      },
-      "engines": {
-        "node": ">= 6"
+        "ini": "^1.3.4",
+        "proto-list": "~1.2.1"
       }
     },
-    "node_modules/degenerator/node_modules/escodegen": {
-      "version": "1.14.3",
-      "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
-      "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
+    "node_modules/config-chain/node_modules/ini": {
+      "version": "1.3.8",
+      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+      "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
+      "dev": true
+    },
+    "node_modules/configstore": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz",
+      "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==",
       "dev": true,
       "dependencies": {
-        "esprima": "^4.0.1",
-        "estraverse": "^4.2.0",
-        "esutils": "^2.0.2",
-        "optionator": "^0.8.1"
-      },
-      "bin": {
-        "escodegen": "bin/escodegen.js",
-        "esgenerate": "bin/esgenerate.js"
+        "dot-prop": "^6.0.1",
+        "graceful-fs": "^4.2.6",
+        "unique-string": "^3.0.0",
+        "write-file-atomic": "^3.0.3",
+        "xdg-basedir": "^5.0.1"
       },
       "engines": {
-        "node": ">=4.0"
+        "node": ">=12"
       },
-      "optionalDependencies": {
-        "source-map": "~0.6.1"
+      "funding": {
+        "url": "https://github.com/yeoman/configstore?sponsor=1"
       }
     },
-    "node_modules/degenerator/node_modules/estraverse": {
-      "version": "4.3.0",
-      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
-      "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
-      "dev": true,
-      "engines": {
-        "node": ">=4.0"
-      }
+    "node_modules/convert-source-map": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+      "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+      "dev": true
     },
-    "node_modules/delayed-stream": {
-      "version": "1.0.0",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.4.0"
-      }
+    "node_modules/core-util-is": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
+      "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
+      "dev": true
     },
-    "node_modules/depd": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
-      "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+    "node_modules/cosmiconfig": {
+      "version": "8.1.3",
+      "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz",
+      "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==",
       "dev": true,
+      "dependencies": {
+        "import-fresh": "^3.2.1",
+        "js-yaml": "^4.1.0",
+        "parse-json": "^5.0.0",
+        "path-type": "^4.0.0"
+      },
       "engines": {
-        "node": ">= 0.8"
+        "node": ">=14"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/d-fischer"
       }
     },
-    "node_modules/deprecation": {
-      "version": "2.3.1",
-      "license": "ISC"
+    "node_modules/cosmiconfig/node_modules/argparse": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+      "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+      "dev": true
     },
-    "node_modules/detect-newline": {
-      "version": "3.1.0",
+    "node_modules/cosmiconfig/node_modules/js-yaml": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+      "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
       "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
+      "dependencies": {
+        "argparse": "^2.0.1"
+      },
+      "bin": {
+        "js-yaml": "bin/js-yaml.js"
       }
     },
-    "node_modules/diff-sequences": {
-      "version": "27.5.1",
+    "node_modules/create-jest": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz",
+      "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==",
       "dev": true,
-      "license": "MIT",
+      "dependencies": {
+        "@jest/types": "^29.6.3",
+        "chalk": "^4.0.0",
+        "exit": "^0.1.2",
+        "graceful-fs": "^4.2.9",
+        "jest-config": "^29.7.0",
+        "jest-util": "^29.7.0",
+        "prompts": "^2.0.1"
+      },
+      "bin": {
+        "create-jest": "bin/create-jest.js"
+      },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/dir-glob": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
-      "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+    "node_modules/create-jest/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
       "dependencies": {
-        "path-type": "^4.0.0"
+        "color-convert": "^2.0.1"
       },
       "engines": {
         "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/dns-over-http-resolver": {
-      "version": "1.2.3",
-      "license": "MIT",
-      "dependencies": {
-        "debug": "^4.3.1",
-        "native-fetch": "^3.0.0",
-        "receptacle": "^1.3.2"
-      }
-    },
-    "node_modules/doctrine": {
-      "version": "3.0.0",
+    "node_modules/create-jest/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "Apache-2.0",
       "dependencies": {
-        "esutils": "^2.0.2"
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
       },
       "engines": {
-        "node": ">=6.0.0"
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/domexception": {
+    "node_modules/create-jest/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "webidl-conversions": "^5.0.0"
+        "color-name": "~1.1.4"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=7.0.0"
       }
     },
-    "node_modules/domexception/node_modules/webidl-conversions": {
-      "version": "5.0.0",
+    "node_modules/create-jest/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
+    },
+    "node_modules/create-jest/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "BSD-2-Clause",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/dot-prop": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
-      "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
+    "node_modules/create-jest/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
       "dependencies": {
-        "is-obj": "^2.0.0"
+        "has-flag": "^4.0.0"
       },
       "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=8"
       }
     },
-    "node_modules/eastasianwidth": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
-      "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
-      "dev": true
-    },
-    "node_modules/electron-fetch": {
-      "version": "1.7.4",
+    "node_modules/cross-spawn": {
+      "version": "7.0.3",
+      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+      "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "encoding": "^0.1.13"
+        "path-key": "^3.1.0",
+        "shebang-command": "^2.0.0",
+        "which": "^2.0.1"
       },
       "engines": {
-        "node": ">=6"
+        "node": ">= 8"
       }
     },
-    "node_modules/electron-to-chromium": {
-      "version": "1.4.228",
+    "node_modules/crypto-random-string": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz",
+      "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==",
       "dev": true,
-      "license": "ISC"
+      "dependencies": {
+        "type-fest": "^1.0.1"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "node_modules/emittery": {
-      "version": "0.8.1",
+    "node_modules/crypto-random-string/node_modules/type-fest": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
+      "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=10"
       },
       "funding": {
-        "url": "https://github.com/sindresorhus/emittery?sponsor=1"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/emoji-regex": {
-      "version": "8.0.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/encoding": {
-      "version": "0.1.13",
-      "license": "MIT",
+    "node_modules/dag-jose": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/dag-jose/-/dag-jose-4.0.0.tgz",
+      "integrity": "sha512-tw595L3UYoOUT9dSJPbBEG/qpRpw24kRZxa5SLRnlnr+g5L7O8oEs1d3W5TiVA1oJZbthVsf0Vi3zFN66qcEBA==",
       "dependencies": {
-        "iconv-lite": "^0.6.2"
+        "@ipld/dag-cbor": "^9.0.0",
+        "multiformats": "^11.0.0"
       }
     },
-    "node_modules/encoding/node_modules/iconv-lite": {
-      "version": "0.6.3",
-      "license": "MIT",
+    "node_modules/dag-jose/node_modules/multiformats": {
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz",
+      "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/data-uri-to-buffer": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz",
+      "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==",
+      "dev": true,
+      "engines": {
+        "node": ">= 6"
+      }
+    },
+    "node_modules/debug": {
+      "version": "4.3.4",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+      "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
       "dependencies": {
-        "safer-buffer": ">= 2.1.2 < 3.0.0"
+        "ms": "2.1.2"
       },
       "engines": {
-        "node": ">=0.10.0"
+        "node": ">=6.0"
+      },
+      "peerDependenciesMeta": {
+        "supports-color": {
+          "optional": true
+        }
       }
     },
-    "node_modules/enquirer": {
-      "version": "2.3.6",
+    "node_modules/decompress-response": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
+      "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "ansi-colors": "^4.1.1"
+        "mimic-response": "^3.1.0"
       },
       "engines": {
-        "node": ">=8.6"
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/entities": {
-      "version": "2.2.0",
-      "license": "BSD-2-Clause",
+    "node_modules/decompress-response/node_modules/mimic-response": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
+      "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
+      "dev": true,
+      "engines": {
+        "node": ">=10"
+      },
       "funding": {
-        "url": "https://github.com/fb55/entities?sponsor=1"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/err-code": {
-      "version": "3.0.1",
+    "node_modules/dedent": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz",
+      "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==",
+      "dev": true,
+      "peerDependencies": {
+        "babel-plugin-macros": "^3.1.0"
+      },
+      "peerDependenciesMeta": {
+        "babel-plugin-macros": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/deep-extend": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
+      "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
+      "dev": true,
+      "engines": {
+        "node": ">=4.0.0"
+      }
+    },
+    "node_modules/deep-is": {
+      "version": "0.1.3",
+      "dev": true,
       "license": "MIT"
     },
-    "node_modules/error-ex": {
-      "version": "1.3.2",
-      "license": "MIT",
-      "dependencies": {
-        "is-arrayish": "^0.2.1"
+    "node_modules/deepmerge": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
+      "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
+      "dev": true,
+      "engines": {
+        "node": ">=0.10.0"
       }
     },
-    "node_modules/es-abstract": {
-      "version": "1.20.5",
-      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.5.tgz",
-      "integrity": "sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ==",
+    "node_modules/default-browser": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz",
+      "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==",
+      "dev": true,
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "es-to-primitive": "^1.2.1",
-        "function-bind": "^1.1.1",
-        "function.prototype.name": "^1.1.5",
-        "get-intrinsic": "^1.1.3",
-        "get-symbol-description": "^1.0.0",
-        "gopd": "^1.0.1",
-        "has": "^1.0.3",
-        "has-property-descriptors": "^1.0.0",
-        "has-symbols": "^1.0.3",
-        "internal-slot": "^1.0.3",
-        "is-callable": "^1.2.7",
-        "is-negative-zero": "^2.0.2",
-        "is-regex": "^1.1.4",
-        "is-shared-array-buffer": "^1.0.2",
-        "is-string": "^1.0.7",
-        "is-weakref": "^1.0.2",
-        "object-inspect": "^1.12.2",
-        "object-keys": "^1.1.1",
-        "object.assign": "^4.1.4",
-        "regexp.prototype.flags": "^1.4.3",
-        "safe-regex-test": "^1.0.0",
-        "string.prototype.trimend": "^1.0.6",
-        "string.prototype.trimstart": "^1.0.6",
-        "unbox-primitive": "^1.0.2"
+        "bundle-name": "^3.0.0",
+        "default-browser-id": "^3.0.0",
+        "execa": "^7.1.1",
+        "titleize": "^3.0.0"
       },
       "engines": {
-        "node": ">= 0.4"
+        "node": ">=14.16"
       },
       "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/es-array-method-boxes-properly": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",
-      "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==",
-      "dev": true
-    },
-    "node_modules/es-get-iterator": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz",
-      "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==",
+    "node_modules/default-browser-id": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz",
+      "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==",
       "dev": true,
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "get-intrinsic": "^1.1.3",
-        "has-symbols": "^1.0.3",
-        "is-arguments": "^1.1.1",
-        "is-map": "^2.0.2",
-        "is-set": "^2.0.2",
-        "is-string": "^1.0.7",
-        "isarray": "^2.0.5",
-        "stop-iteration-iterator": "^1.0.0"
+        "bplist-parser": "^0.2.0",
+        "untildify": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=12"
       },
       "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/es-to-primitive": {
-      "version": "1.2.1",
-      "license": "MIT",
+    "node_modules/default-browser/node_modules/execa": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz",
+      "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==",
+      "dev": true,
       "dependencies": {
-        "is-callable": "^1.1.4",
-        "is-date-object": "^1.0.1",
-        "is-symbol": "^1.0.2"
+        "cross-spawn": "^7.0.3",
+        "get-stream": "^6.0.1",
+        "human-signals": "^4.3.0",
+        "is-stream": "^3.0.0",
+        "merge-stream": "^2.0.0",
+        "npm-run-path": "^5.1.0",
+        "onetime": "^6.0.0",
+        "signal-exit": "^3.0.7",
+        "strip-final-newline": "^3.0.0"
       },
       "engines": {
-        "node": ">= 0.4"
+        "node": "^14.18.0 || ^16.14.0 || >=18.0.0"
       },
       "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "url": "https://github.com/sindresorhus/execa?sponsor=1"
       }
     },
-    "node_modules/escalade": {
-      "version": "3.1.1",
+    "node_modules/default-browser/node_modules/human-signals": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",
+      "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
-        "node": ">=6"
+        "node": ">=14.18.0"
       }
     },
-    "node_modules/escape-goat": {
+    "node_modules/default-browser/node_modules/is-stream": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+      "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
+      "dev": true,
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/default-browser/node_modules/mimic-fn": {
       "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz",
-      "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==",
+      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+      "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
       "dev": true,
       "engines": {
         "node": ">=12"
@@ -4935,3497 +6156,3933 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/escape-string-regexp": {
-      "version": "1.0.5",
-      "license": "MIT",
+    "node_modules/default-browser/node_modules/npm-run-path": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz",
+      "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==",
+      "dev": true,
+      "dependencies": {
+        "path-key": "^4.0.0"
+      },
       "engines": {
-        "node": ">=0.8.0"
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/escodegen": {
-      "version": "2.0.0",
+    "node_modules/default-browser/node_modules/onetime": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+      "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
       "dev": true,
-      "license": "BSD-2-Clause",
       "dependencies": {
-        "esprima": "^4.0.1",
-        "estraverse": "^5.2.0",
-        "esutils": "^2.0.2",
-        "optionator": "^0.8.1"
+        "mimic-fn": "^4.0.0"
       },
-      "bin": {
-        "escodegen": "bin/escodegen.js",
-        "esgenerate": "bin/esgenerate.js"
+      "engines": {
+        "node": ">=12"
       },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/default-browser/node_modules/path-key": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+      "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
+      "dev": true,
       "engines": {
-        "node": ">=6.0"
+        "node": ">=12"
       },
-      "optionalDependencies": {
-        "source-map": "~0.6.1"
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/eslint": {
-      "version": "8.6.0",
+    "node_modules/default-browser/node_modules/strip-final-newline": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+      "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@eslint/eslintrc": "^1.0.5",
-        "@humanwhocodes/config-array": "^0.9.2",
-        "ajv": "^6.10.0",
-        "chalk": "^4.0.0",
-        "cross-spawn": "^7.0.2",
-        "debug": "^4.3.2",
-        "doctrine": "^3.0.0",
-        "enquirer": "^2.3.5",
-        "escape-string-regexp": "^4.0.0",
-        "eslint-scope": "^7.1.0",
-        "eslint-utils": "^3.0.0",
-        "eslint-visitor-keys": "^3.1.0",
-        "espree": "^9.3.0",
-        "esquery": "^1.4.0",
-        "esutils": "^2.0.2",
-        "fast-deep-equal": "^3.1.3",
-        "file-entry-cache": "^6.0.1",
-        "functional-red-black-tree": "^1.0.1",
-        "glob-parent": "^6.0.1",
-        "globals": "^13.6.0",
-        "ignore": "^4.0.6",
-        "import-fresh": "^3.0.0",
-        "imurmurhash": "^0.1.4",
-        "is-glob": "^4.0.0",
-        "js-yaml": "^4.1.0",
-        "json-stable-stringify-without-jsonify": "^1.0.1",
-        "levn": "^0.4.1",
-        "lodash.merge": "^4.6.2",
-        "minimatch": "^3.0.4",
-        "natural-compare": "^1.4.0",
-        "optionator": "^0.9.1",
-        "progress": "^2.0.0",
-        "regexpp": "^3.2.0",
-        "semver": "^7.2.1",
-        "strip-ansi": "^6.0.1",
-        "strip-json-comments": "^3.1.0",
-        "text-table": "^0.2.0",
-        "v8-compile-cache": "^2.0.3"
-      },
-      "bin": {
-        "eslint": "bin/eslint.js"
-      },
       "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+        "node": ">=12"
       },
       "funding": {
-        "url": "https://opencollective.com/eslint"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/eslint-scope": {
-      "version": "7.1.0",
+    "node_modules/defaults": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
+      "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
       "dev": true,
-      "license": "BSD-2-Clause",
       "dependencies": {
-        "esrecurse": "^4.3.0",
-        "estraverse": "^5.2.0"
+        "clone": "^1.0.2"
       },
-      "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/eslint-utils": {
-      "version": "3.0.0",
+    "node_modules/defer-to-connect": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
+      "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "eslint-visitor-keys": "^2.0.0"
-      },
       "engines": {
-        "node": "^10.0.0 || ^12.0.0 || >= 14.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/mysticatea"
-      },
-      "peerDependencies": {
-        "eslint": ">=5"
+        "node": ">=10"
       }
     },
-    "node_modules/eslint-utils/node_modules/eslint-visitor-keys": {
-      "version": "2.1.0",
+    "node_modules/define-data-property": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",
+      "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
       "dev": true,
-      "license": "Apache-2.0",
+      "dependencies": {
+        "get-intrinsic": "^1.2.1",
+        "gopd": "^1.0.1",
+        "has-property-descriptors": "^1.0.0"
+      },
       "engines": {
-        "node": ">=10"
+        "node": ">= 0.4"
       }
     },
-    "node_modules/eslint-visitor-keys": {
-      "version": "3.1.0",
+    "node_modules/define-lazy-prop": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
+      "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
       "dev": true,
-      "license": "Apache-2.0",
       "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/eslint/node_modules/ansi-styles": {
-      "version": "4.3.0",
+    "node_modules/define-properties": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
+      "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "color-convert": "^2.0.1"
+        "define-data-property": "^1.0.1",
+        "has-property-descriptors": "^1.0.0",
+        "object-keys": "^1.1.1"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/eslint/node_modules/argparse": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "Python-2.0"
-    },
-    "node_modules/eslint/node_modules/chalk": {
-      "version": "4.1.2",
+    "node_modules/degenerator": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-3.0.4.tgz",
+      "integrity": "sha512-Z66uPeBfHZAHVmue3HPfyKu2Q0rC2cRxbTOsvmU/po5fvvcx27W4mIu9n0PUlQih4oUYvcG1BsbtVv8x7KDOSw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
+        "ast-types": "^0.13.2",
+        "escodegen": "^1.8.1",
+        "esprima": "^4.0.0",
+        "vm2": "^3.9.17"
       },
       "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "node": ">= 6"
       }
     },
-    "node_modules/eslint/node_modules/color-convert": {
-      "version": "2.0.1",
+    "node_modules/degenerator/node_modules/escodegen": {
+      "version": "1.14.3",
+      "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
+      "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "color-name": "~1.1.4"
+        "esprima": "^4.0.1",
+        "estraverse": "^4.2.0",
+        "esutils": "^2.0.2",
+        "optionator": "^0.8.1"
+      },
+      "bin": {
+        "escodegen": "bin/escodegen.js",
+        "esgenerate": "bin/esgenerate.js"
       },
       "engines": {
-        "node": ">=7.0.0"
+        "node": ">=4.0"
+      },
+      "optionalDependencies": {
+        "source-map": "~0.6.1"
       }
     },
-    "node_modules/eslint/node_modules/color-name": {
-      "version": "1.1.4",
+    "node_modules/degenerator/node_modules/estraverse": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+      "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
       "dev": true,
-      "license": "MIT"
+      "engines": {
+        "node": ">=4.0"
+      }
     },
-    "node_modules/eslint/node_modules/escape-string-regexp": {
-      "version": "4.0.0",
-      "dev": true,
+    "node_modules/delayed-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
+      "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
       "license": "MIT",
       "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=0.4.0"
       }
     },
-    "node_modules/eslint/node_modules/glob-parent": {
-      "version": "6.0.2",
+    "node_modules/depd": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+      "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
       "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "is-glob": "^4.0.3"
-      },
       "engines": {
-        "node": ">=10.13.0"
+        "node": ">= 0.8"
       }
     },
-    "node_modules/eslint/node_modules/has-flag": {
-      "version": "4.0.0",
+    "node_modules/deprecation": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
+      "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==",
+      "license": "ISC"
+    },
+    "node_modules/detect-newline": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
+      "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/eslint/node_modules/js-yaml": {
-      "version": "4.1.0",
+    "node_modules/diff-sequences": {
+      "version": "29.6.3",
+      "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz",
+      "integrity": "sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "argparse": "^2.0.1"
-      },
-      "bin": {
-        "js-yaml": "bin/js-yaml.js"
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/eslint/node_modules/levn": {
-      "version": "0.4.1",
+    "node_modules/dir-glob": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+      "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "prelude-ls": "^1.2.1",
-        "type-check": "~0.4.0"
+        "path-type": "^4.0.0"
       },
       "engines": {
-        "node": ">= 0.8.0"
+        "node": ">=8"
       }
     },
-    "node_modules/eslint/node_modules/optionator": {
-      "version": "0.9.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/dns-over-http-resolver": {
+      "version": "2.1.3",
+      "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-2.1.3.tgz",
+      "integrity": "sha512-zjRYFhq+CsxPAouQWzOsxNMvEN+SHisjzhX8EMxd2Y0EG3thvn6wXQgMJLnTDImkhe4jhLbOQpXtL10nALBOSA==",
       "dependencies": {
-        "deep-is": "^0.1.3",
-        "fast-levenshtein": "^2.0.6",
-        "levn": "^0.4.1",
-        "prelude-ls": "^1.2.1",
-        "type-check": "^0.4.0",
-        "word-wrap": "^1.2.3"
-      },
-      "engines": {
-        "node": ">= 0.8.0"
+        "debug": "^4.3.1",
+        "native-fetch": "^4.0.2",
+        "receptacle": "^1.3.2",
+        "undici": "^5.12.0"
       }
     },
-    "node_modules/eslint/node_modules/prelude-ls": {
-      "version": "1.2.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.8.0"
+    "node_modules/dns-over-http-resolver/node_modules/native-fetch": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-4.0.2.tgz",
+      "integrity": "sha512-4QcVlKFtv2EYVS5MBgsGX5+NWKtbDbIECdUXDBGDMAZXq3Jkv9zf+y8iS7Ub8fEdga3GpYeazp9gauNqXHJOCg==",
+      "peerDependencies": {
+        "undici": "*"
       }
     },
-    "node_modules/eslint/node_modules/strip-ansi": {
-      "version": "6.0.1",
+    "node_modules/doctrine": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+      "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
       "dev": true,
-      "license": "MIT",
+      "license": "Apache-2.0",
       "dependencies": {
-        "ansi-regex": "^5.0.1"
+        "esutils": "^2.0.2"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=6.0.0"
       }
     },
-    "node_modules/eslint/node_modules/supports-color": {
-      "version": "7.2.0",
+    "node_modules/dot-prop": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
+      "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "has-flag": "^4.0.0"
+        "is-obj": "^2.0.0"
       },
       "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/eslint/node_modules/type-check": {
-      "version": "0.4.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "prelude-ls": "^1.2.1"
+        "node": ">=10"
       },
-      "engines": {
-        "node": ">= 0.8.0"
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/espree": {
-      "version": "9.3.0",
-      "dev": true,
-      "license": "BSD-2-Clause",
+    "node_modules/eastasianwidth": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
+      "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
+      "dev": true
+    },
+    "node_modules/electron-fetch": {
+      "version": "1.9.1",
+      "resolved": "https://registry.npmjs.org/electron-fetch/-/electron-fetch-1.9.1.tgz",
+      "integrity": "sha512-M9qw6oUILGVrcENMSRRefE1MbHPIz0h79EKIeJWK9v563aT9Qkh8aEHPO1H5vi970wPirNY+jO9OpFoLiMsMGA==",
       "dependencies": {
-        "acorn": "^8.7.0",
-        "acorn-jsx": "^5.3.1",
-        "eslint-visitor-keys": "^3.1.0"
+        "encoding": "^0.1.13"
       },
       "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+        "node": ">=6"
       }
     },
-    "node_modules/esprima": {
-      "version": "4.0.1",
+    "node_modules/electron-to-chromium": {
+      "version": "1.4.621",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.621.tgz",
+      "integrity": "sha512-MGJM6S0MuF/wTzM9NoItWXN56J1kolrHS/vzl/KlhXAbVkogTy0wzKYliQDJgNypxSCFjxdRhHYS3bffyYUGEw==",
+      "dev": true
+    },
+    "node_modules/emittery": {
+      "version": "0.13.1",
+      "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz",
+      "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==",
       "dev": true,
-      "license": "BSD-2-Clause",
-      "bin": {
-        "esparse": "bin/esparse.js",
-        "esvalidate": "bin/esvalidate.js"
-      },
       "engines": {
-        "node": ">=4"
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sindresorhus/emittery?sponsor=1"
       }
     },
-    "node_modules/esquery": {
-      "version": "1.4.0",
+    "node_modules/emoji-regex": {
+      "version": "8.0.0",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
       "dev": true,
-      "license": "BSD-3-Clause",
+      "license": "MIT"
+    },
+    "node_modules/encoding": {
+      "version": "0.1.13",
+      "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz",
+      "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==",
+      "license": "MIT",
       "dependencies": {
-        "estraverse": "^5.1.0"
-      },
-      "engines": {
-        "node": ">=0.10"
+        "iconv-lite": "^0.6.2"
       }
     },
-    "node_modules/esrecurse": {
-      "version": "4.3.0",
-      "dev": true,
-      "license": "BSD-2-Clause",
+    "node_modules/encoding/node_modules/iconv-lite": {
+      "version": "0.6.3",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+      "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+      "license": "MIT",
       "dependencies": {
-        "estraverse": "^5.2.0"
+        "safer-buffer": ">= 2.1.2 < 3.0.0"
       },
-      "engines": {
-        "node": ">=4.0"
-      }
-    },
-    "node_modules/estraverse": {
-      "version": "5.3.0",
-      "dev": true,
-      "license": "BSD-2-Clause",
-      "engines": {
-        "node": ">=4.0"
-      }
-    },
-    "node_modules/esutils": {
-      "version": "2.0.3",
-      "dev": true,
-      "license": "BSD-2-Clause",
       "engines": {
         "node": ">=0.10.0"
       }
     },
-    "node_modules/event-target-shim": {
-      "version": "5.0.1",
+    "node_modules/enquirer": {
+      "version": "2.3.6",
+      "dev": true,
       "license": "MIT",
+      "dependencies": {
+        "ansi-colors": "^4.1.1"
+      },
       "engines": {
-        "node": ">=6"
+        "node": ">=8.6"
       }
     },
-    "node_modules/events": {
-      "version": "3.3.0",
+    "node_modules/err-code": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/err-code/-/err-code-3.0.1.tgz",
+      "integrity": "sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==",
+      "license": "MIT"
+    },
+    "node_modules/error-ex": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+      "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+      "dev": true,
       "license": "MIT",
-      "engines": {
-        "node": ">=0.8.x"
+      "dependencies": {
+        "is-arrayish": "^0.2.1"
       }
     },
-    "node_modules/execa": {
-      "version": "5.1.1",
+    "node_modules/es-abstract": {
+      "version": "1.22.3",
+      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz",
+      "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "cross-spawn": "^7.0.3",
-        "get-stream": "^6.0.0",
-        "human-signals": "^2.1.0",
-        "is-stream": "^2.0.0",
-        "merge-stream": "^2.0.0",
-        "npm-run-path": "^4.0.1",
-        "onetime": "^5.1.2",
-        "signal-exit": "^3.0.3",
-        "strip-final-newline": "^2.0.0"
+        "array-buffer-byte-length": "^1.0.0",
+        "arraybuffer.prototype.slice": "^1.0.2",
+        "available-typed-arrays": "^1.0.5",
+        "call-bind": "^1.0.5",
+        "es-set-tostringtag": "^2.0.1",
+        "es-to-primitive": "^1.2.1",
+        "function.prototype.name": "^1.1.6",
+        "get-intrinsic": "^1.2.2",
+        "get-symbol-description": "^1.0.0",
+        "globalthis": "^1.0.3",
+        "gopd": "^1.0.1",
+        "has-property-descriptors": "^1.0.0",
+        "has-proto": "^1.0.1",
+        "has-symbols": "^1.0.3",
+        "hasown": "^2.0.0",
+        "internal-slot": "^1.0.5",
+        "is-array-buffer": "^3.0.2",
+        "is-callable": "^1.2.7",
+        "is-negative-zero": "^2.0.2",
+        "is-regex": "^1.1.4",
+        "is-shared-array-buffer": "^1.0.2",
+        "is-string": "^1.0.7",
+        "is-typed-array": "^1.1.12",
+        "is-weakref": "^1.0.2",
+        "object-inspect": "^1.13.1",
+        "object-keys": "^1.1.1",
+        "object.assign": "^4.1.4",
+        "regexp.prototype.flags": "^1.5.1",
+        "safe-array-concat": "^1.0.1",
+        "safe-regex-test": "^1.0.0",
+        "string.prototype.trim": "^1.2.8",
+        "string.prototype.trimend": "^1.0.7",
+        "string.prototype.trimstart": "^1.0.7",
+        "typed-array-buffer": "^1.0.0",
+        "typed-array-byte-length": "^1.0.0",
+        "typed-array-byte-offset": "^1.0.0",
+        "typed-array-length": "^1.0.4",
+        "unbox-primitive": "^1.0.2",
+        "which-typed-array": "^1.1.13"
       },
       "engines": {
-        "node": ">=10"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/sindresorhus/execa?sponsor=1"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/exit": {
-      "version": "0.1.2",
-      "dev": true,
-      "engines": {
-        "node": ">= 0.8.0"
-      }
+    "node_modules/es-array-method-boxes-properly": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",
+      "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==",
+      "dev": true
     },
-    "node_modules/expect": {
-      "version": "27.5.1",
+    "node_modules/es-get-iterator": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz",
+      "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/types": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "jest-matcher-utils": "^27.5.1",
-        "jest-message-util": "^27.5.1"
+        "call-bind": "^1.0.2",
+        "get-intrinsic": "^1.1.3",
+        "has-symbols": "^1.0.3",
+        "is-arguments": "^1.1.1",
+        "is-map": "^2.0.2",
+        "is-set": "^2.0.2",
+        "is-string": "^1.0.7",
+        "isarray": "^2.0.5",
+        "stop-iteration-iterator": "^1.0.0"
       },
-      "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/external-editor": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
-      "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
+    "node_modules/es-set-tostringtag": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz",
+      "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==",
       "dev": true,
       "dependencies": {
-        "chardet": "^0.7.0",
-        "iconv-lite": "^0.4.24",
-        "tmp": "^0.0.33"
+        "get-intrinsic": "^1.2.2",
+        "has-tostringtag": "^1.0.0",
+        "hasown": "^2.0.0"
       },
       "engines": {
-        "node": ">=4"
+        "node": ">= 0.4"
       }
     },
-    "node_modules/fast-deep-equal": {
-      "version": "3.1.3",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/fast-fifo": {
-      "version": "1.0.0",
-      "license": "MIT"
-    },
-    "node_modules/fast-glob": {
-      "version": "3.2.12",
-      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
-      "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
+    "node_modules/es-to-primitive": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+      "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
       "dev": true,
       "dependencies": {
-        "@nodelib/fs.stat": "^2.0.2",
-        "@nodelib/fs.walk": "^1.2.3",
-        "glob-parent": "^5.1.2",
-        "merge2": "^1.3.0",
-        "micromatch": "^4.0.4"
+        "is-callable": "^1.1.4",
+        "is-date-object": "^1.0.1",
+        "is-symbol": "^1.0.2"
       },
       "engines": {
-        "node": ">=8.6.0"
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/fast-json-stable-stringify": {
-      "version": "2.1.0",
+    "node_modules/escalade": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+      "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
       "dev": true,
-      "license": "MIT"
+      "engines": {
+        "node": ">=6"
+      }
     },
-    "node_modules/fast-levenshtein": {
-      "version": "2.0.6",
+    "node_modules/escape-goat": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz",
+      "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==",
       "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/fast-xml-parser": {
-      "version": "3.19.0",
-      "license": "MIT",
-      "bin": {
-        "xml2js": "cli.js"
+      "engines": {
+        "node": ">=12"
       },
       "funding": {
-        "type": "paypal",
-        "url": "https://paypal.me/naturalintelligence"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/fastq": {
-      "version": "1.15.0",
-      "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
-      "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
+    "node_modules/escape-string-regexp": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+      "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
       "dev": true,
-      "dependencies": {
-        "reusify": "^1.0.4"
+      "engines": {
+        "node": ">=0.8.0"
       }
     },
-    "node_modules/fb-watchman": {
-      "version": "2.0.1",
+    "node_modules/eslint": {
+      "version": "8.6.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.6.0.tgz",
+      "integrity": "sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw==",
       "dev": true,
-      "license": "Apache-2.0",
+      "license": "MIT",
       "dependencies": {
-        "bser": "2.1.1"
-      }
-    },
-    "node_modules/fetch-blob": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
-      "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/jimmywarting"
-        },
-        {
-          "type": "paypal",
-          "url": "https://paypal.me/jimmywarting"
-        }
-      ],
-      "dependencies": {
-        "node-domexception": "^1.0.0",
-        "web-streams-polyfill": "^3.0.3"
+        "@eslint/eslintrc": "^1.0.5",
+        "@humanwhocodes/config-array": "^0.9.2",
+        "ajv": "^6.10.0",
+        "chalk": "^4.0.0",
+        "cross-spawn": "^7.0.2",
+        "debug": "^4.3.2",
+        "doctrine": "^3.0.0",
+        "enquirer": "^2.3.5",
+        "escape-string-regexp": "^4.0.0",
+        "eslint-scope": "^7.1.0",
+        "eslint-utils": "^3.0.0",
+        "eslint-visitor-keys": "^3.1.0",
+        "espree": "^9.3.0",
+        "esquery": "^1.4.0",
+        "esutils": "^2.0.2",
+        "fast-deep-equal": "^3.1.3",
+        "file-entry-cache": "^6.0.1",
+        "functional-red-black-tree": "^1.0.1",
+        "glob-parent": "^6.0.1",
+        "globals": "^13.6.0",
+        "ignore": "^4.0.6",
+        "import-fresh": "^3.0.0",
+        "imurmurhash": "^0.1.4",
+        "is-glob": "^4.0.0",
+        "js-yaml": "^4.1.0",
+        "json-stable-stringify-without-jsonify": "^1.0.1",
+        "levn": "^0.4.1",
+        "lodash.merge": "^4.6.2",
+        "minimatch": "^3.0.4",
+        "natural-compare": "^1.4.0",
+        "optionator": "^0.9.1",
+        "progress": "^2.0.0",
+        "regexpp": "^3.2.0",
+        "semver": "^7.2.1",
+        "strip-ansi": "^6.0.1",
+        "strip-json-comments": "^3.1.0",
+        "text-table": "^0.2.0",
+        "v8-compile-cache": "^2.0.3"
       },
-      "engines": {
-        "node": "^12.20 || >= 14.13"
-      }
-    },
-    "node_modules/figures": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
-      "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
-      "dev": true,
-      "dependencies": {
-        "escape-string-regexp": "^5.0.0",
-        "is-unicode-supported": "^1.2.0"
+      "bin": {
+        "eslint": "bin/eslint.js"
       },
       "engines": {
-        "node": ">=14"
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://opencollective.com/eslint"
       }
     },
-    "node_modules/figures/node_modules/escape-string-regexp": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
-      "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+    "node_modules/eslint-scope": {
+      "version": "7.1.0",
       "dev": true,
-      "engines": {
-        "node": ">=12"
+      "license": "BSD-2-Clause",
+      "dependencies": {
+        "esrecurse": "^4.3.0",
+        "estraverse": "^5.2.0"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "engines": {
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
       }
     },
-    "node_modules/file-entry-cache": {
-      "version": "6.0.1",
+    "node_modules/eslint-utils": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
+      "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "flat-cache": "^3.0.4"
+        "eslint-visitor-keys": "^2.0.0"
       },
       "engines": {
-        "node": "^10.12.0 || >=12.0.0"
+        "node": "^10.0.0 || ^12.0.0 || >= 14.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/mysticatea"
+      },
+      "peerDependencies": {
+        "eslint": ">=5"
       }
     },
-    "node_modules/file-uri-to-path": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz",
-      "integrity": "sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==",
+    "node_modules/eslint-utils/node_modules/eslint-visitor-keys": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
+      "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
       "dev": true,
+      "license": "Apache-2.0",
       "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/files-from-path": {
-      "version": "0.2.6",
-      "resolved": "https://registry.npmjs.org/files-from-path/-/files-from-path-0.2.6.tgz",
-      "integrity": "sha512-Mz4UNkv+WcRLxcCXAORbfpwYiXI60SN9C1ZfeyGFv0xQUmblgbOkSWwFwX+Ov/TaR3FEyzwDyPnCQjpPRGSxKA==",
-      "dependencies": {
-        "err-code": "^3.0.1",
-        "graceful-fs": "^4.2.9",
-        "ipfs-unixfs": "^6.0.5",
-        "it-glob": "^0.0.13"
+        "node": ">=10"
       }
     },
-    "node_modules/files-from-path/node_modules/it-glob": {
-      "version": "0.0.13",
-      "resolved": "https://registry.npmjs.org/it-glob/-/it-glob-0.0.13.tgz",
-      "integrity": "sha512-0Hcd5BraJUPzL28NWiFbdNrcdyNxNTKKdU3sjdFiYynNTQpwlG2UKW31X7bp+XhJwux/oPzIquo5ioztVmc2RQ==",
-      "dependencies": {
-        "@types/minimatch": "^3.0.4",
-        "minimatch": "^3.0.4"
+    "node_modules/eslint-visitor-keys": {
+      "version": "3.1.0",
+      "dev": true,
+      "license": "Apache-2.0",
+      "engines": {
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
       }
     },
-    "node_modules/fill-range": {
-      "version": "7.0.1",
+    "node_modules/eslint/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "to-regex-range": "^5.0.1"
+        "color-convert": "^2.0.1"
       },
       "engines": {
         "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/find-up": {
-      "version": "4.1.0",
+    "node_modules/eslint/node_modules/argparse": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
+      "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
+      "dev": true,
+      "license": "Python-2.0"
+    },
+    "node_modules/eslint/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "locate-path": "^5.0.0",
-        "path-exists": "^4.0.0"
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/flat-cache": {
-      "version": "3.0.4",
+    "node_modules/eslint/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "flatted": "^3.1.0",
-        "rimraf": "^3.0.2"
+        "color-name": "~1.1.4"
       },
       "engines": {
-        "node": "^10.12.0 || >=12.0.0"
+        "node": ">=7.0.0"
       }
     },
-    "node_modules/flatted": {
-      "version": "3.2.4",
+    "node_modules/eslint/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
       "dev": true,
-      "license": "ISC"
+      "license": "MIT"
     },
-    "node_modules/follow-redirects": {
-      "version": "1.14.8",
-      "funding": [
-        {
-          "type": "individual",
-          "url": "https://github.com/sponsors/RubenVerborgh"
-        }
-      ],
+    "node_modules/eslint/node_modules/escape-string-regexp": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+      "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+      "dev": true,
       "license": "MIT",
       "engines": {
-        "node": ">=4.0"
+        "node": ">=10"
       },
-      "peerDependenciesMeta": {
-        "debug": {
-          "optional": true
-        }
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/for-each": {
-      "version": "0.3.3",
-      "license": "MIT",
+    "node_modules/eslint/node_modules/glob-parent": {
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+      "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+      "dev": true,
+      "license": "ISC",
       "dependencies": {
-        "is-callable": "^1.1.3"
+        "is-glob": "^4.0.3"
+      },
+      "engines": {
+        "node": ">=10.13.0"
       }
     },
-    "node_modules/form-data-encoder": {
-      "version": "2.1.4",
-      "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz",
-      "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==",
+    "node_modules/eslint/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
+      "license": "MIT",
       "engines": {
-        "node": ">= 14.17"
+        "node": ">=8"
       }
     },
-    "node_modules/formdata-polyfill": {
-      "version": "4.0.10",
-      "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
-      "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+    "node_modules/eslint/node_modules/js-yaml": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
+      "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "fetch-blob": "^3.1.2"
+        "argparse": "^2.0.1"
       },
-      "engines": {
-        "node": ">=12.20.0"
+      "bin": {
+        "js-yaml": "bin/js-yaml.js"
       }
     },
-    "node_modules/fs-extra": {
-      "version": "8.1.0",
-      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
-      "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+    "node_modules/eslint/node_modules/levn": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+      "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "graceful-fs": "^4.2.0",
-        "jsonfile": "^4.0.0",
-        "universalify": "^0.1.0"
+        "prelude-ls": "^1.2.1",
+        "type-check": "~0.4.0"
       },
       "engines": {
-        "node": ">=6 <7 || >=8"
+        "node": ">= 0.8.0"
       }
     },
-    "node_modules/fs-extra/node_modules/universalify": {
-      "version": "0.1.2",
-      "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
-      "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+    "node_modules/eslint/node_modules/optionator": {
+      "version": "0.9.1",
       "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "deep-is": "^0.1.3",
+        "fast-levenshtein": "^2.0.6",
+        "levn": "^0.4.1",
+        "prelude-ls": "^1.2.1",
+        "type-check": "^0.4.0",
+        "word-wrap": "^1.2.3"
+      },
       "engines": {
-        "node": ">= 4.0.0"
+        "node": ">= 0.8.0"
       }
     },
-    "node_modules/fs.realpath": {
-      "version": "1.0.0",
+    "node_modules/eslint/node_modules/prelude-ls": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+      "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
       "dev": true,
-      "license": "ISC"
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.8.0"
+      }
     },
-    "node_modules/ftp": {
-      "version": "0.3.10",
-      "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz",
-      "integrity": "sha512-faFVML1aBx2UoDStmLwv2Wptt4vw5x03xxX172nhA5Y5HBshW5JweqQ2W4xL4dezQTG8inJsuYcpPHHU3X5OTQ==",
+    "node_modules/eslint/node_modules/strip-ansi": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "readable-stream": "1.1.x",
-        "xregexp": "2.0.0"
+        "ansi-regex": "^5.0.1"
       },
       "engines": {
-        "node": ">=0.8.0"
+        "node": ">=8"
       }
     },
-    "node_modules/ftp/node_modules/isarray": {
-      "version": "0.0.1",
-      "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
-      "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
-      "dev": true
-    },
-    "node_modules/ftp/node_modules/readable-stream": {
-      "version": "1.1.14",
-      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
-      "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
+    "node_modules/eslint/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "core-util-is": "~1.0.0",
-        "inherits": "~2.0.1",
-        "isarray": "0.0.1",
-        "string_decoder": "~0.10.x"
+        "has-flag": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "node_modules/ftp/node_modules/string_decoder": {
-      "version": "0.10.31",
-      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
-      "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
-      "dev": true
-    },
-    "node_modules/function-bind": {
-      "version": "1.1.1",
-      "license": "MIT"
-    },
-    "node_modules/function.prototype.name": {
-      "version": "1.1.5",
+    "node_modules/eslint/node_modules/type-check": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+      "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.3",
-        "es-abstract": "^1.19.0",
-        "functions-have-names": "^1.2.2"
+        "prelude-ls": "^1.2.1"
       },
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">= 0.8.0"
       }
     },
-    "node_modules/functional-red-black-tree": {
-      "version": "1.0.1",
+    "node_modules/espree": {
+      "version": "9.3.0",
       "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/functions-have-names": {
-      "version": "1.2.3",
-      "license": "MIT",
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+      "license": "BSD-2-Clause",
+      "dependencies": {
+        "acorn": "^8.7.0",
+        "acorn-jsx": "^5.3.1",
+        "eslint-visitor-keys": "^3.1.0"
+      },
+      "engines": {
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
       }
     },
-    "node_modules/gensync": {
-      "version": "1.0.0-beta.2",
+    "node_modules/esprima": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+      "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
       "dev": true,
-      "license": "MIT",
+      "license": "BSD-2-Clause",
+      "bin": {
+        "esparse": "bin/esparse.js",
+        "esvalidate": "bin/esvalidate.js"
+      },
       "engines": {
-        "node": ">=6.9.0"
+        "node": ">=4"
       }
     },
-    "node_modules/get-caller-file": {
-      "version": "2.0.5",
+    "node_modules/esquery": {
+      "version": "1.4.0",
       "dev": true,
-      "license": "ISC",
+      "license": "BSD-3-Clause",
+      "dependencies": {
+        "estraverse": "^5.1.0"
+      },
       "engines": {
-        "node": "6.* || 8.* || >= 10.*"
+        "node": ">=0.10"
       }
     },
-    "node_modules/get-intrinsic": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
-      "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
+    "node_modules/esrecurse": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+      "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+      "dev": true,
+      "license": "BSD-2-Clause",
       "dependencies": {
-        "function-bind": "^1.1.1",
-        "has": "^1.0.3",
-        "has-symbols": "^1.0.3"
+        "estraverse": "^5.2.0"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+      "engines": {
+        "node": ">=4.0"
       }
     },
-    "node_modules/get-iterator": {
-      "version": "1.0.2",
-      "license": "MIT"
-    },
-    "node_modules/get-package-type": {
-      "version": "0.1.0",
+    "node_modules/estraverse": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+      "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
       "dev": true,
-      "license": "MIT",
+      "license": "BSD-2-Clause",
       "engines": {
-        "node": ">=8.0.0"
+        "node": ">=4.0"
       }
     },
-    "node_modules/get-stream": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
-      "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+    "node_modules/esutils": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+      "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
       "dev": true,
+      "license": "BSD-2-Clause",
       "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=0.10.0"
       }
     },
-    "node_modules/get-symbol-description": {
-      "version": "1.0.0",
+    "node_modules/eventemitter3": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
+      "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA=="
+    },
+    "node_modules/events": {
+      "version": "3.3.0",
+      "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+      "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
       "license": "MIT",
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "get-intrinsic": "^1.1.1"
-      },
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">=0.8.x"
       }
     },
-    "node_modules/get-uri": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-3.0.2.tgz",
-      "integrity": "sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg==",
+    "node_modules/execa": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
+      "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@tootallnate/once": "1",
-        "data-uri-to-buffer": "3",
-        "debug": "4",
-        "file-uri-to-path": "2",
-        "fs-extra": "^8.1.0",
-        "ftp": "^0.3.10"
+        "cross-spawn": "^7.0.3",
+        "get-stream": "^6.0.0",
+        "human-signals": "^2.1.0",
+        "is-stream": "^2.0.0",
+        "merge-stream": "^2.0.0",
+        "npm-run-path": "^4.0.1",
+        "onetime": "^5.1.2",
+        "signal-exit": "^3.0.3",
+        "strip-final-newline": "^2.0.0"
       },
       "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/git-up": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/git-up/-/git-up-7.0.0.tgz",
-      "integrity": "sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==",
-      "dev": true,
-      "dependencies": {
-        "is-ssh": "^1.4.0",
-        "parse-url": "^8.1.0"
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sindresorhus/execa?sponsor=1"
       }
     },
-    "node_modules/git-url-parse": {
-      "version": "13.1.0",
-      "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-13.1.0.tgz",
-      "integrity": "sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA==",
+    "node_modules/exit": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
+      "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==",
       "dev": true,
-      "dependencies": {
-        "git-up": "^7.0.0"
+      "engines": {
+        "node": ">= 0.8.0"
       }
     },
-    "node_modules/glob": {
-      "version": "7.1.6",
+    "node_modules/expect": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz",
+      "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==",
       "dev": true,
-      "license": "ISC",
       "dependencies": {
-        "fs.realpath": "^1.0.0",
-        "inflight": "^1.0.4",
-        "inherits": "2",
-        "minimatch": "^3.0.4",
-        "once": "^1.3.0",
-        "path-is-absolute": "^1.0.0"
+        "@jest/expect-utils": "^29.7.0",
+        "jest-get-type": "^29.6.3",
+        "jest-matcher-utils": "^29.7.0",
+        "jest-message-util": "^29.7.0",
+        "jest-util": "^29.7.0"
       },
       "engines": {
-        "node": "*"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/glob-parent": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
-      "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+    "node_modules/external-editor": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
+      "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
       "dev": true,
       "dependencies": {
-        "is-glob": "^4.0.1"
+        "chardet": "^0.7.0",
+        "iconv-lite": "^0.4.24",
+        "tmp": "^0.0.33"
       },
       "engines": {
-        "node": ">= 6"
+        "node": ">=4"
       }
     },
-    "node_modules/global-dirs": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz",
-      "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==",
+    "node_modules/fast-deep-equal": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+      "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
       "dev": true,
-      "dependencies": {
-        "ini": "2.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
+      "license": "MIT"
     },
-    "node_modules/globals": {
-      "version": "13.12.0",
+    "node_modules/fast-fifo": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
+      "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ=="
+    },
+    "node_modules/fast-glob": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
+      "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "type-fest": "^0.20.2"
+        "@nodelib/fs.stat": "^2.0.2",
+        "@nodelib/fs.walk": "^1.2.3",
+        "glob-parent": "^5.1.2",
+        "merge2": "^1.3.0",
+        "micromatch": "^4.0.4"
       },
       "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=8.6.0"
       }
     },
-    "node_modules/globals/node_modules/type-fest": {
-      "version": "0.20.2",
+    "node_modules/fast-json-stable-stringify": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
       "dev": true,
-      "license": "(MIT OR CC0-1.0)",
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
+      "license": "MIT"
     },
-    "node_modules/globby": {
-      "version": "13.1.3",
-      "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz",
-      "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==",
+    "node_modules/fast-levenshtein": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+      "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
       "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/fast-write-atomic": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/fast-write-atomic/-/fast-write-atomic-0.2.1.tgz",
+      "integrity": "sha512-WvJe06IfNYlr+6cO3uQkdKdy3Cb1LlCJSF8zRs2eT8yuhdbSlR9nIt+TgQ92RUxiRrQm+/S7RARnMfCs5iuAjw=="
+    },
+    "node_modules/fast-xml-parser": {
+      "version": "4.2.5",
+      "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.2.5.tgz",
+      "integrity": "sha512-B9/wizE4WngqQftFPmdaMYlXoJlJOYxGQOanC77fq9k8+Z0v5dDSVh+3glErdIROP//s/jgb7ZuxKfB8nVyo0g==",
+      "funding": [
+        {
+          "type": "paypal",
+          "url": "https://paypal.me/naturalintelligence"
+        },
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/NaturalIntelligence"
+        }
+      ],
       "dependencies": {
-        "dir-glob": "^3.0.1",
-        "fast-glob": "^3.2.11",
-        "ignore": "^5.2.0",
-        "merge2": "^1.4.1",
-        "slash": "^4.0.0"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+        "strnum": "^1.0.5"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "bin": {
+        "fxparser": "src/cli/cli.js"
       }
     },
-    "node_modules/globby/node_modules/ignore": {
-      "version": "5.2.4",
-      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
-      "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
+    "node_modules/fastq": {
+      "version": "1.16.0",
+      "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz",
+      "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==",
       "dev": true,
-      "engines": {
-        "node": ">= 4"
+      "dependencies": {
+        "reusify": "^1.0.4"
       }
     },
-    "node_modules/globby/node_modules/slash": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
-      "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
+    "node_modules/fb-watchman": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz",
+      "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==",
       "dev": true,
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "dependencies": {
+        "bser": "2.1.1"
       }
     },
-    "node_modules/gopd": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
-      "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+    "node_modules/fetch-blob": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
+      "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+      "dev": true,
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/jimmywarting"
+        },
+        {
+          "type": "paypal",
+          "url": "https://paypal.me/jimmywarting"
+        }
+      ],
       "dependencies": {
-        "get-intrinsic": "^1.1.3"
+        "node-domexception": "^1.0.0",
+        "web-streams-polyfill": "^3.0.3"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+      "engines": {
+        "node": "^12.20 || >= 14.13"
       }
     },
-    "node_modules/got": {
-      "version": "12.6.0",
-      "resolved": "https://registry.npmjs.org/got/-/got-12.6.0.tgz",
-      "integrity": "sha512-WTcaQ963xV97MN3x0/CbAriXFZcXCfgxVp91I+Ze6pawQOa7SgzwSx2zIJJsX+kTajMnVs0xcFD1TxZKFqhdnQ==",
+    "node_modules/figures": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
+      "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
       "dev": true,
       "dependencies": {
-        "@sindresorhus/is": "^5.2.0",
-        "@szmarczak/http-timer": "^5.0.1",
-        "cacheable-lookup": "^7.0.0",
-        "cacheable-request": "^10.2.8",
-        "decompress-response": "^6.0.0",
-        "form-data-encoder": "^2.1.2",
-        "get-stream": "^6.0.1",
-        "http2-wrapper": "^2.1.10",
-        "lowercase-keys": "^3.0.0",
-        "p-cancelable": "^3.0.0",
-        "responselike": "^3.0.0"
+        "escape-string-regexp": "^5.0.0",
+        "is-unicode-supported": "^1.2.0"
       },
       "engines": {
-        "node": ">=14.16"
+        "node": ">=14"
       },
       "funding": {
-        "url": "https://github.com/sindresorhus/got?sponsor=1"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/graceful-fs": {
-      "version": "4.2.10",
-      "license": "ISC"
+    "node_modules/figures/node_modules/escape-string-regexp": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
+      "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
+      "dev": true,
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "node_modules/hamt-sharding": {
-      "version": "2.0.1",
+    "node_modules/file-entry-cache": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+      "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "sparse-array": "^1.3.1",
-        "uint8arrays": "^3.0.0"
+        "flat-cache": "^3.0.4"
       },
       "engines": {
-        "node": ">=10.0.0",
-        "npm": ">=6.0.0"
+        "node": "^10.12.0 || >=12.0.0"
       }
     },
-    "node_modules/hard-rejection": {
-      "version": "2.1.0",
-      "license": "MIT",
+    "node_modules/file-uri-to-path": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz",
+      "integrity": "sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==",
+      "dev": true,
       "engines": {
-        "node": ">=6"
+        "node": ">= 6"
       }
     },
-    "node_modules/has": {
-      "version": "1.0.3",
-      "license": "MIT",
+    "node_modules/files-from-path": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/files-from-path/-/files-from-path-1.0.4.tgz",
+      "integrity": "sha512-sMNIVdpRh1uCSIaat3qnM3E6aA1C5FVn5/B16z8sN3gIMjZPkxtVCorkEL07xTcCIxVwTXzjU1Ota7Wif6RfQQ==",
       "dependencies": {
-        "function-bind": "^1.1.1"
+        "graceful-fs": "^4.2.10"
       },
       "engines": {
-        "node": ">= 0.4.0"
-      }
-    },
-    "node_modules/has-bigints": {
-      "version": "1.0.2",
-      "license": "MIT",
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">=18"
       }
     },
-    "node_modules/has-flag": {
-      "version": "3.0.0",
+    "node_modules/fill-range": {
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+      "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+      "dev": true,
       "license": "MIT",
+      "dependencies": {
+        "to-regex-range": "^5.0.1"
+      },
       "engines": {
-        "node": ">=4"
+        "node": ">=8"
       }
     },
-    "node_modules/has-property-descriptors": {
-      "version": "1.0.0",
-      "license": "MIT",
+    "node_modules/find-up": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+      "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+      "dev": true,
       "dependencies": {
-        "get-intrinsic": "^1.1.1"
+        "locate-path": "^5.0.0",
+        "path-exists": "^4.0.0"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/has-symbols": {
-      "version": "1.0.3",
-      "license": "MIT",
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">=8"
       }
     },
-    "node_modules/has-tostringtag": {
-      "version": "1.0.0",
+    "node_modules/flat-cache": {
+      "version": "3.0.4",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "has-symbols": "^1.0.2"
+        "flatted": "^3.1.0",
+        "rimraf": "^3.0.2"
       },
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": "^10.12.0 || >=12.0.0"
       }
     },
-    "node_modules/has-yarn": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz",
-      "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==",
+    "node_modules/flatted": {
+      "version": "3.2.4",
       "dev": true,
+      "license": "ISC"
+    },
+    "node_modules/follow-redirects": {
+      "version": "1.15.3",
+      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz",
+      "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==",
+      "funding": [
+        {
+          "type": "individual",
+          "url": "https://github.com/sponsors/RubenVerborgh"
+        }
+      ],
       "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+        "node": ">=4.0"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "peerDependenciesMeta": {
+        "debug": {
+          "optional": true
+        }
       }
     },
-    "node_modules/hosted-git-info": {
-      "version": "4.1.0",
-      "license": "ISC",
+    "node_modules/for-each": {
+      "version": "0.3.3",
+      "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
+      "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
+      "dev": true,
       "dependencies": {
-        "lru-cache": "^6.0.0"
-      },
-      "engines": {
-        "node": ">=10"
+        "is-callable": "^1.1.3"
       }
     },
-    "node_modules/html-encoding-sniffer": {
-      "version": "2.0.1",
-      "dev": true,
+    "node_modules/form-data": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+      "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
       "license": "MIT",
       "dependencies": {
-        "whatwg-encoding": "^1.0.5"
+        "asynckit": "^0.4.0",
+        "combined-stream": "^1.0.8",
+        "mime-types": "^2.1.12"
       },
       "engines": {
-        "node": ">=10"
+        "node": ">= 6"
       }
     },
-    "node_modules/html-escaper": {
-      "version": "2.0.2",
+    "node_modules/form-data-encoder": {
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz",
+      "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==",
       "dev": true,
-      "license": "MIT"
+      "engines": {
+        "node": ">= 14.17"
+      }
     },
-    "node_modules/http-cache-semantics": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
-      "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
-      "dev": true
-    },
-    "node_modules/http-errors": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
-      "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
-      "dev": true,
-      "dependencies": {
-        "depd": "2.0.0",
-        "inherits": "2.0.4",
-        "setprototypeof": "1.2.0",
-        "statuses": "2.0.1",
-        "toidentifier": "1.0.1"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/http-proxy-agent": {
-      "version": "4.0.1",
+    "node_modules/formdata-polyfill": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+      "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@tootallnate/once": "1",
-        "agent-base": "6",
-        "debug": "4"
+        "fetch-blob": "^3.1.2"
       },
       "engines": {
-        "node": ">= 6"
+        "node": ">=12.20.0"
       }
     },
-    "node_modules/http2-wrapper": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz",
-      "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==",
+    "node_modules/fs-extra": {
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+      "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
       "dev": true,
       "dependencies": {
-        "quick-lru": "^5.1.1",
-        "resolve-alpn": "^1.2.0"
+        "graceful-fs": "^4.2.0",
+        "jsonfile": "^4.0.0",
+        "universalify": "^0.1.0"
       },
       "engines": {
-        "node": ">=10.19.0"
+        "node": ">=6 <7 || >=8"
       }
     },
-    "node_modules/https-proxy-agent": {
-      "version": "5.0.1",
+    "node_modules/fs-extra/node_modules/universalify": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+      "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "agent-base": "6",
-        "debug": "4"
-      },
       "engines": {
-        "node": ">= 6"
+        "node": ">= 4.0.0"
       }
     },
-    "node_modules/human-signals": {
-      "version": "2.1.0",
+    "node_modules/fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
       "dev": true,
-      "license": "Apache-2.0",
-      "engines": {
-        "node": ">=10.17.0"
-      }
+      "license": "ISC"
     },
-    "node_modules/husky": {
-      "version": "8.0.1",
+    "node_modules/fsevents": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+      "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
       "dev": true,
-      "license": "MIT",
-      "bin": {
-        "husky": "lib/bin.js"
-      },
+      "hasInstallScript": true,
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
       "engines": {
-        "node": ">=14"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/typicode"
+        "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
       }
     },
-    "node_modules/iconv-lite": {
-      "version": "0.4.24",
+    "node_modules/ftp": {
+      "version": "0.3.10",
+      "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz",
+      "integrity": "sha512-faFVML1aBx2UoDStmLwv2Wptt4vw5x03xxX172nhA5Y5HBshW5JweqQ2W4xL4dezQTG8inJsuYcpPHHU3X5OTQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "safer-buffer": ">= 2.1.2 < 3"
+        "readable-stream": "1.1.x",
+        "xregexp": "2.0.0"
       },
       "engines": {
-        "node": ">=0.10.0"
+        "node": ">=0.8.0"
       }
     },
-    "node_modules/idb-keyval": {
-      "version": "6.2.0",
-      "license": "Apache-2.0",
+    "node_modules/ftp/node_modules/isarray": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+      "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
+      "dev": true
+    },
+    "node_modules/ftp/node_modules/readable-stream": {
+      "version": "1.1.14",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
+      "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
+      "dev": true,
       "dependencies": {
-        "safari-14-idb-fix": "^3.0.0"
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.1",
+        "isarray": "0.0.1",
+        "string_decoder": "~0.10.x"
       }
     },
-    "node_modules/ieee754": {
-      "version": "1.2.1",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "BSD-3-Clause"
+    "node_modules/ftp/node_modules/string_decoder": {
+      "version": "0.10.31",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+      "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
+      "dev": true
     },
-    "node_modules/ignore": {
-      "version": "4.0.6",
+    "node_modules/function-bind": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+      "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
       "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 4"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/import-fresh": {
-      "version": "3.2.1",
+    "node_modules/function.prototype.name": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz",
+      "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "parent-module": "^1.0.0",
-        "resolve-from": "^4.0.0"
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.2.0",
+        "es-abstract": "^1.22.1",
+        "functions-have-names": "^1.2.3"
       },
       "engines": {
-        "node": ">=6"
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/import-lazy": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
-      "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
+    "node_modules/functional-red-black-tree": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+      "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==",
       "dev": true,
-      "engines": {
-        "node": ">=8"
-      }
+      "license": "MIT"
     },
-    "node_modules/import-local": {
-      "version": "3.1.0",
+    "node_modules/functions-have-names": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
+      "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "pkg-dir": "^4.2.0",
-        "resolve-cwd": "^3.0.0"
-      },
-      "bin": {
-        "import-local-fixture": "fixtures/cli.js"
-      },
-      "engines": {
-        "node": ">=8"
-      },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/imurmurhash": {
-      "version": "0.1.4",
+    "node_modules/gensync": {
+      "version": "1.0.0-beta.2",
+      "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+      "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
       "dev": true,
-      "license": "MIT",
       "engines": {
-        "node": ">=0.8.19"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/indent-string": {
-      "version": "4.0.0",
-      "license": "MIT",
+    "node_modules/get-caller-file": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+      "dev": true,
       "engines": {
-        "node": ">=8"
+        "node": "6.* || 8.* || >= 10.*"
       }
     },
-    "node_modules/inflight": {
-      "version": "1.0.6",
+    "node_modules/get-intrinsic": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
+      "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==",
       "dev": true,
-      "license": "ISC",
       "dependencies": {
-        "once": "^1.3.0",
-        "wrappy": "1"
+        "function-bind": "^1.1.2",
+        "has-proto": "^1.0.1",
+        "has-symbols": "^1.0.3",
+        "hasown": "^2.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/inherits": {
-      "version": "2.0.4",
-      "license": "ISC"
+    "node_modules/get-iterator": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/get-iterator/-/get-iterator-1.0.2.tgz",
+      "integrity": "sha512-v+dm9bNVfOYsY1OrhaCrmyOcYoSeVvbt+hHZ0Au+T+p1y+0Uyj9aMaGIeUTT6xdpRbWzDeYKvfOslPhggQMcsg=="
     },
-    "node_modules/ini": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz",
-      "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==",
+    "node_modules/get-package-type": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
+      "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
       "dev": true,
       "engines": {
-        "node": ">=10"
+        "node": ">=8.0.0"
       }
     },
-    "node_modules/inquirer": {
-      "version": "9.1.5",
-      "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.5.tgz",
-      "integrity": "sha512-3ygAIh8gcZavV9bj6MTdYddG2zPSYswP808fKS46NOwlF0zZljVpnLCHODDqItWJDbDpLb3aouAxGaJbkxoppA==",
+    "node_modules/get-stream": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+      "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
       "dev": true,
-      "dependencies": {
-        "ansi-escapes": "^6.0.0",
-        "chalk": "^5.2.0",
-        "cli-cursor": "^4.0.0",
-        "cli-width": "^4.0.0",
-        "external-editor": "^3.0.3",
-        "figures": "^5.0.0",
-        "lodash": "^4.17.21",
-        "mute-stream": "1.0.0",
-        "ora": "^6.1.2",
-        "run-async": "^2.4.0",
-        "rxjs": "^7.8.0",
-        "string-width": "^5.1.2",
-        "strip-ansi": "^7.0.1",
-        "through": "^2.3.6",
-        "wrap-ansi": "^8.1.0"
-      },
       "engines": {
-        "node": ">=14.18.0"
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/inquirer/node_modules/ansi-escapes": {
-      "version": "6.1.0",
-      "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.1.0.tgz",
-      "integrity": "sha512-bQyg9bzRntwR/8b89DOEhGwctcwCrbWW/TuqTQnpqpy5Fz3aovcOTj5i8NJV6AHc8OGNdMaqdxAWww8pz2kiKg==",
+    "node_modules/get-symbol-description": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
+      "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==",
       "dev": true,
       "dependencies": {
-        "type-fest": "^3.0.0"
+        "call-bind": "^1.0.2",
+        "get-intrinsic": "^1.1.1"
       },
       "engines": {
-        "node": ">=14.16"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/inquirer/node_modules/ansi-styles": {
-      "version": "6.2.1",
-      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
-      "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
+    "node_modules/get-uri": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-3.0.2.tgz",
+      "integrity": "sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg==",
       "dev": true,
-      "engines": {
-        "node": ">=12"
+      "dependencies": {
+        "@tootallnate/once": "1",
+        "data-uri-to-buffer": "3",
+        "debug": "4",
+        "file-uri-to-path": "2",
+        "fs-extra": "^8.1.0",
+        "ftp": "^0.3.10"
       },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+      "engines": {
+        "node": ">= 6"
       }
     },
-    "node_modules/inquirer/node_modules/chalk": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-      "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
+    "node_modules/git-up": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/git-up/-/git-up-7.0.0.tgz",
+      "integrity": "sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==",
+      "dev": true,
+      "dependencies": {
+        "is-ssh": "^1.4.0",
+        "parse-url": "^8.1.0"
+      }
+    },
+    "node_modules/git-url-parse": {
+      "version": "13.1.0",
+      "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-13.1.0.tgz",
+      "integrity": "sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA==",
       "dev": true,
+      "dependencies": {
+        "git-up": "^7.0.0"
+      }
+    },
+    "node_modules/glob": {
+      "version": "7.1.6",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.0.4",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      },
       "engines": {
-        "node": "^12.17.0 || ^14.13 || >=16.0.0"
+        "node": "*"
       },
       "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "url": "https://github.com/sponsors/isaacs"
       }
     },
-    "node_modules/inquirer/node_modules/emoji-regex": {
-      "version": "9.2.2",
-      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
-      "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
-      "dev": true
-    },
-    "node_modules/inquirer/node_modules/string-width": {
+    "node_modules/glob-parent": {
       "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
-      "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+      "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
       "dev": true,
       "dependencies": {
-        "eastasianwidth": "^0.2.0",
-        "emoji-regex": "^9.2.2",
-        "strip-ansi": "^7.0.1"
+        "is-glob": "^4.0.1"
       },
       "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">= 6"
       }
     },
-    "node_modules/inquirer/node_modules/type-fest": {
-      "version": "3.8.0",
-      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.8.0.tgz",
-      "integrity": "sha512-FVNSzGQz9Th+/9R6Lvv7WIAkstylfHN2/JYxkyhhmKFYh9At2DST8t6L6Lref9eYO8PXFTfG9Sg1Agg0K3vq3Q==",
+    "node_modules/global-dirs": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz",
+      "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==",
       "dev": true,
+      "dependencies": {
+        "ini": "2.0.0"
+      },
       "engines": {
-        "node": ">=14.16"
+        "node": ">=10"
       },
       "funding": {
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/inquirer/node_modules/wrap-ansi": {
-      "version": "8.1.0",
-      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
-      "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
+    "node_modules/globals": {
+      "version": "13.12.0",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "ansi-styles": "^6.1.0",
-        "string-width": "^5.0.1",
-        "strip-ansi": "^7.0.1"
+        "type-fest": "^0.20.2"
       },
       "engines": {
-        "node": ">=12"
+        "node": ">=8"
       },
       "funding": {
-        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/interface-blockstore": {
-      "version": "2.0.3",
-      "license": "(Apache-2.0 OR MIT)",
-      "dependencies": {
-        "interface-store": "^2.0.2",
-        "multiformats": "^9.0.4"
+    "node_modules/globals/node_modules/type-fest": {
+      "version": "0.20.2",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+      "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+      "dev": true,
+      "license": "(MIT OR CC0-1.0)",
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/interface-datastore": {
-      "version": "6.0.3",
-      "license": "MIT",
+    "node_modules/globalthis": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
+      "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==",
+      "dev": true,
       "dependencies": {
-        "interface-store": "^2.0.1",
-        "nanoid": "^3.0.2",
-        "uint8arrays": "^3.0.0"
+        "define-properties": "^1.1.3"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/interface-store": {
-      "version": "2.0.2",
-      "license": "(Apache-2.0 OR MIT)"
-    },
-    "node_modules/internal-slot": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz",
-      "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==",
+    "node_modules/globby": {
+      "version": "13.1.3",
+      "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz",
+      "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==",
+      "dev": true,
       "dependencies": {
-        "get-intrinsic": "^1.2.0",
-        "has": "^1.0.3",
-        "side-channel": "^1.0.4"
+        "dir-glob": "^3.0.1",
+        "fast-glob": "^3.2.11",
+        "ignore": "^5.2.0",
+        "merge2": "^1.4.1",
+        "slash": "^4.0.0"
       },
       "engines": {
-        "node": ">= 0.4"
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/interpret": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
-      "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
+    "node_modules/globby/node_modules/ignore": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",
+      "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==",
       "dev": true,
       "engines": {
-        "node": ">= 0.10"
+        "node": ">= 4"
       }
     },
-    "node_modules/ip": {
-      "version": "1.1.8",
-      "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
-      "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==",
-      "dev": true
-    },
-    "node_modules/ip-regex": {
-      "version": "4.1.0",
-      "license": "MIT",
+    "node_modules/globby/node_modules/slash": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
+      "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
+      "dev": true,
       "engines": {
-        "node": ">=8"
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/ipfs-car": {
-      "version": "0.7.0",
-      "resolved": "git+ssh://git@github.com/filebase/ipfs-car.git#0367a1eda3224ed3ebe52fcc83652005b1218cec",
-      "license": "(Apache-2.0 AND MIT)",
+    "node_modules/gopd": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
+      "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+      "dev": true,
       "dependencies": {
-        "@ipld/car": "^3.2.3",
-        "@web-std/blob": "^3.0.1",
-        "bl": "^5.0.0",
-        "blockstore-core": "^1.0.2",
-        "browser-readablestream-to-it": "^1.0.2",
-        "idb-keyval": "^6.0.3",
-        "interface-blockstore": "^2.0.2",
-        "ipfs-core-types": "^0.8.3",
-        "ipfs-core-utils": "^0.12.1",
-        "ipfs-unixfs-exporter": "^7.0.4",
-        "ipfs-unixfs-importer": "^9.0.4",
-        "ipfs-utils": "^9.0.2",
-        "it-all": "^1.0.5",
-        "it-last": "^1.0.5",
-        "it-pipe": "^1.1.0",
-        "meow": "^9.0.0",
-        "move-file": "^2.1.0",
-        "multiformats": "^9.6.3",
-        "stream-to-it": "^0.2.3",
-        "streaming-iterables": "^6.0.0",
-        "uint8arrays": "^3.0.0"
+        "get-intrinsic": "^1.1.3"
       },
-      "bin": {
-        "🚘": "dist/cjs/cli/cli.js",
-        "ipfs-car": "dist/cjs/cli/cli.js"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/ipfs-car/node_modules/ipfs-core-types": {
-      "version": "0.8.4",
-      "license": "(Apache-2.0 OR MIT)",
+    "node_modules/got": {
+      "version": "12.6.0",
+      "resolved": "https://registry.npmjs.org/got/-/got-12.6.0.tgz",
+      "integrity": "sha512-WTcaQ963xV97MN3x0/CbAriXFZcXCfgxVp91I+Ze6pawQOa7SgzwSx2zIJJsX+kTajMnVs0xcFD1TxZKFqhdnQ==",
+      "dev": true,
       "dependencies": {
-        "interface-datastore": "^6.0.2",
-        "multiaddr": "^10.0.0",
-        "multiformats": "^9.4.13"
+        "@sindresorhus/is": "^5.2.0",
+        "@szmarczak/http-timer": "^5.0.1",
+        "cacheable-lookup": "^7.0.0",
+        "cacheable-request": "^10.2.8",
+        "decompress-response": "^6.0.0",
+        "form-data-encoder": "^2.1.2",
+        "get-stream": "^6.0.1",
+        "http2-wrapper": "^2.1.10",
+        "lowercase-keys": "^3.0.0",
+        "p-cancelable": "^3.0.0",
+        "responselike": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=14.16"
+      },
+      "funding": {
+        "url": "https://github.com/sindresorhus/got?sponsor=1"
       }
     },
-    "node_modules/ipfs-car/node_modules/ipfs-core-utils": {
-      "version": "0.12.2",
-      "license": "MIT",
-      "dependencies": {
-        "any-signal": "^2.1.2",
-        "blob-to-it": "^1.0.1",
-        "browser-readablestream-to-it": "^1.0.1",
-        "debug": "^4.1.1",
-        "err-code": "^3.0.1",
-        "ipfs-core-types": "^0.8.4",
-        "ipfs-unixfs": "^6.0.3",
-        "ipfs-utils": "^9.0.2",
-        "it-all": "^1.0.4",
-        "it-map": "^1.0.4",
-        "it-peekable": "^1.0.2",
-        "it-to-stream": "^1.0.0",
-        "merge-options": "^3.0.4",
-        "multiaddr": "^10.0.0",
-        "multiaddr-to-uri": "^8.0.0",
-        "multiformats": "^9.4.13",
-        "nanoid": "^3.1.23",
-        "parse-duration": "^1.0.0",
-        "timeout-abort-controller": "^1.1.1",
-        "uint8arrays": "^3.0.0"
-      }
+    "node_modules/graceful-fs": {
+      "version": "4.2.10",
+      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
+      "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==",
+      "license": "ISC"
     },
-    "node_modules/ipfs-car/node_modules/multiaddr": {
-      "version": "10.0.1",
+    "node_modules/has": {
+      "version": "1.0.3",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "dns-over-http-resolver": "^1.2.3",
-        "err-code": "^3.0.1",
-        "is-ip": "^3.1.0",
-        "multiformats": "^9.4.5",
-        "uint8arrays": "^3.0.0",
-        "varint": "^6.0.0"
+        "function-bind": "^1.1.1"
+      },
+      "engines": {
+        "node": ">= 0.4.0"
       }
     },
-    "node_modules/ipfs-car/node_modules/retimer": {
-      "version": "2.0.0",
-      "license": "MIT"
-    },
-    "node_modules/ipfs-car/node_modules/timeout-abort-controller": {
-      "version": "1.1.1",
-      "license": "MIT",
-      "dependencies": {
-        "abort-controller": "^3.0.0",
-        "retimer": "^2.0.0"
+    "node_modules/has-bigints": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
+      "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",
+      "dev": true,
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/ipfs-car/node_modules/varint": {
-      "version": "6.0.0",
-      "license": "MIT"
+    "node_modules/has-flag": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+      "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+      "dev": true,
+      "engines": {
+        "node": ">=4"
+      }
     },
-    "node_modules/ipfs-core-types": {
-      "version": "0.9.0",
-      "license": "(Apache-2.0 OR MIT)",
+    "node_modules/has-property-descriptors": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
+      "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==",
+      "dev": true,
       "dependencies": {
-        "interface-datastore": "^6.0.2",
-        "multiaddr": "^10.0.0",
-        "multiformats": "^9.4.13"
+        "get-intrinsic": "^1.2.2"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/ipfs-core-types/node_modules/multiaddr": {
-      "version": "10.0.1",
-      "license": "MIT",
-      "dependencies": {
-        "dns-over-http-resolver": "^1.2.3",
-        "err-code": "^3.0.1",
-        "is-ip": "^3.1.0",
-        "multiformats": "^9.4.5",
-        "uint8arrays": "^3.0.0",
-        "varint": "^6.0.0"
+    "node_modules/has-proto": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
+      "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
+      "dev": true,
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/ipfs-core-types/node_modules/varint": {
-      "version": "6.0.0",
-      "license": "MIT"
-    },
-    "node_modules/ipfs-core-utils": {
-      "version": "0.13.0",
-      "license": "MIT",
-      "dependencies": {
-        "any-signal": "^2.1.2",
-        "blob-to-it": "^1.0.1",
-        "browser-readablestream-to-it": "^1.0.1",
-        "debug": "^4.1.1",
-        "err-code": "^3.0.1",
-        "ipfs-core-types": "^0.9.0",
-        "ipfs-unixfs": "^6.0.3",
-        "ipfs-utils": "^9.0.2",
-        "it-all": "^1.0.4",
-        "it-map": "^1.0.4",
-        "it-peekable": "^1.0.2",
-        "it-to-stream": "^1.0.0",
-        "merge-options": "^3.0.4",
-        "multiaddr": "^10.0.0",
-        "multiaddr-to-uri": "^8.0.0",
-        "multiformats": "^9.4.13",
-        "nanoid": "^3.1.23",
-        "parse-duration": "^1.0.0",
-        "timeout-abort-controller": "^2.0.0",
-        "uint8arrays": "^3.0.0"
+    "node_modules/has-symbols": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+      "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+      "dev": true,
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/ipfs-core-utils/node_modules/multiaddr": {
-      "version": "10.0.1",
-      "license": "MIT",
+    "node_modules/has-tostringtag": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
+      "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
+      "dev": true,
       "dependencies": {
-        "dns-over-http-resolver": "^1.2.3",
-        "err-code": "^3.0.1",
-        "is-ip": "^3.1.0",
-        "multiformats": "^9.4.5",
-        "uint8arrays": "^3.0.0",
-        "varint": "^6.0.0"
+        "has-symbols": "^1.0.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/ipfs-core-utils/node_modules/varint": {
-      "version": "6.0.0",
-      "license": "MIT"
-    },
-    "node_modules/ipfs-http-client": {
-      "version": "55.0.0",
-      "license": "(Apache-2.0 OR MIT)",
-      "dependencies": {
-        "@ipld/dag-cbor": "^7.0.0",
-        "@ipld/dag-json": "^8.0.1",
-        "@ipld/dag-pb": "^2.1.3",
-        "abort-controller": "^3.0.0",
-        "any-signal": "^2.1.2",
-        "debug": "^4.1.1",
-        "err-code": "^3.0.1",
-        "ipfs-core-types": "^0.9.0",
-        "ipfs-core-utils": "^0.13.0",
-        "ipfs-utils": "^9.0.2",
-        "it-first": "^1.0.6",
-        "it-last": "^1.0.4",
-        "merge-options": "^3.0.4",
-        "multiaddr": "^10.0.0",
-        "multiformats": "^9.4.13",
-        "native-abort-controller": "^1.0.3",
-        "parse-duration": "^1.0.0",
-        "stream-to-it": "^0.2.2",
-        "uint8arrays": "^3.0.0"
-      },
+    "node_modules/has-yarn": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz",
+      "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==",
+      "dev": true,
       "engines": {
-        "node": ">=14.0.0",
-        "npm": ">=3.0.0"
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/ipfs-http-client/node_modules/multiaddr": {
-      "version": "10.0.1",
-      "license": "MIT",
+    "node_modules/hasown": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
+      "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
+      "dev": true,
       "dependencies": {
-        "dns-over-http-resolver": "^1.2.3",
-        "err-code": "^3.0.1",
-        "is-ip": "^3.1.0",
-        "multiformats": "^9.4.5",
-        "uint8arrays": "^3.0.0",
-        "varint": "^6.0.0"
+        "function-bind": "^1.1.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
       }
     },
-    "node_modules/ipfs-http-client/node_modules/varint": {
-      "version": "6.0.0",
-      "license": "MIT"
+    "node_modules/html-escaper": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
+      "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
+      "dev": true
     },
-    "node_modules/ipfs-unixfs": {
-      "version": "6.0.6",
-      "license": "MIT",
+    "node_modules/http-cache-semantics": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
+      "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
+      "dev": true
+    },
+    "node_modules/http-errors": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
+      "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
+      "dev": true,
       "dependencies": {
-        "err-code": "^3.0.1",
-        "protobufjs": "^6.10.2"
+        "depd": "2.0.0",
+        "inherits": "2.0.4",
+        "setprototypeof": "1.2.0",
+        "statuses": "2.0.1",
+        "toidentifier": "1.0.1"
       },
       "engines": {
-        "node": ">=14.0.0",
-        "npm": ">=6.0.0"
+        "node": ">= 0.8"
       }
     },
-    "node_modules/ipfs-unixfs-exporter": {
-      "version": "7.0.11",
-      "license": "Apache-2.0 OR MIT",
+    "node_modules/http-proxy-agent": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz",
+      "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "@ipld/dag-cbor": "^7.0.2",
-        "@ipld/dag-pb": "^2.0.2",
-        "@multiformats/murmur3": "^1.0.3",
-        "err-code": "^3.0.1",
-        "hamt-sharding": "^2.0.0",
-        "interface-blockstore": "^2.0.3",
-        "ipfs-unixfs": "^6.0.0",
-        "it-last": "^1.0.5",
-        "multiformats": "^9.4.2",
-        "uint8arrays": "^3.0.0"
+        "@tootallnate/once": "1",
+        "agent-base": "6",
+        "debug": "4"
       },
       "engines": {
-        "node": ">=16.0.0",
-        "npm": ">=7.0.0"
+        "node": ">= 6"
       }
     },
-    "node_modules/ipfs-unixfs-importer": {
-      "version": "9.0.10",
-      "license": "Apache-2.0 OR MIT",
+    "node_modules/http2-wrapper": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz",
+      "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==",
+      "dev": true,
       "dependencies": {
-        "@ipld/dag-pb": "^2.0.2",
-        "@multiformats/murmur3": "^1.0.3",
-        "bl": "^5.0.0",
-        "err-code": "^3.0.1",
-        "hamt-sharding": "^2.0.0",
-        "interface-blockstore": "^2.0.3",
-        "ipfs-unixfs": "^6.0.0",
-        "it-all": "^1.0.5",
-        "it-batch": "^1.0.8",
-        "it-first": "^1.0.6",
-        "it-parallel-batch": "^1.0.9",
-        "merge-options": "^3.0.4",
-        "multiformats": "^9.4.2",
-        "rabin-wasm": "^0.1.4",
-        "uint8arrays": "^3.0.0"
+        "quick-lru": "^5.1.1",
+        "resolve-alpn": "^1.2.0"
       },
       "engines": {
-        "node": ">=16.0.0",
-        "npm": ">=7.0.0"
+        "node": ">=10.19.0"
       }
     },
-    "node_modules/ipfs-utils": {
-      "version": "9.0.4",
+    "node_modules/https-proxy-agent": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
+      "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "any-signal": "^3.0.0",
-        "buffer": "^6.0.1",
-        "electron-fetch": "^1.7.2",
-        "err-code": "^3.0.1",
-        "is-electron": "^2.2.0",
-        "iso-url": "^1.1.5",
-        "it-glob": "^1.0.1",
-        "it-to-stream": "^1.0.0",
-        "merge-options": "^3.0.4",
-        "nanoid": "^3.1.20",
-        "native-fetch": "^3.0.0",
-        "node-fetch": "https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz",
-        "react-native-fetch-api": "^2.0.0",
-        "stream-to-it": "^0.2.2"
+        "agent-base": "6",
+        "debug": "4"
+      },
+      "engines": {
+        "node": ">= 6"
       }
     },
-    "node_modules/ipfs-utils/node_modules/any-signal": {
-      "version": "3.0.0",
-      "license": "MIT"
-    },
-    "node_modules/ipfs-utils/node_modules/node-fetch": {
-      "name": "@achingbrain/node-fetch",
-      "version": "2.6.7",
-      "resolved": "https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz",
-      "integrity": "sha512-iTASGs+HTFK5E4ZqcMsHmeJ4zodyq8L38lZV33jwqcBJYoUt3HjN4+ot+O9/0b+ke8ddE7UgOtVuZN/OkV19/g==",
-      "license": "MIT",
+    "node_modules/human-signals": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
+      "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
+      "dev": true,
+      "license": "Apache-2.0",
       "engines": {
-        "node": "4.x || >=6.0.0"
+        "node": ">=10.17.0"
       }
     },
-    "node_modules/is-arguments": {
-      "version": "1.1.1",
+    "node_modules/husky": {
+      "version": "8.0.1",
+      "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "has-tostringtag": "^1.0.0"
+      "bin": {
+        "husky": "lib/bin.js"
       },
       "engines": {
-        "node": ">= 0.4"
+        "node": ">=14"
       },
       "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "url": "https://github.com/sponsors/typicode"
       }
     },
-    "node_modules/is-arrayish": {
-      "version": "0.2.1",
-      "license": "MIT"
-    },
-    "node_modules/is-bigint": {
-      "version": "1.0.4",
+    "node_modules/iconv-lite": {
+      "version": "0.4.24",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "has-bigints": "^1.0.1"
+        "safer-buffer": ">= 2.1.2 < 3"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+      "engines": {
+        "node": ">=0.10.0"
       }
     },
-    "node_modules/is-boolean-object": {
-      "version": "1.1.2",
+    "node_modules/ieee754": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+      "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "license": "BSD-3-Clause"
+    },
+    "node_modules/ignore": {
+      "version": "4.0.6",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+      "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">= 4"
+      }
+    },
+    "node_modules/import-fresh": {
+      "version": "3.2.1",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "has-tostringtag": "^1.0.0"
+        "parent-module": "^1.0.0",
+        "resolve-from": "^4.0.0"
       },
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">=6"
       }
     },
-    "node_modules/is-callable": {
-      "version": "1.2.7",
-      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
-      "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
+    "node_modules/import-lazy": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
+      "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
+      "dev": true,
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">=8"
       }
     },
-    "node_modules/is-ci": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
-      "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==",
+    "node_modules/import-local": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
+      "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
       "dev": true,
       "dependencies": {
-        "ci-info": "^3.2.0"
+        "pkg-dir": "^4.2.0",
+        "resolve-cwd": "^3.0.0"
       },
       "bin": {
-        "is-ci": "bin.js"
-      }
-    },
-    "node_modules/is-core-module": {
-      "version": "2.10.0",
-      "license": "MIT",
-      "dependencies": {
-        "has": "^1.0.3"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/is-date-object": {
-      "version": "1.0.5",
-      "license": "MIT",
-      "dependencies": {
-        "has-tostringtag": "^1.0.0"
+        "import-local-fixture": "fixtures/cli.js"
       },
       "engines": {
-        "node": ">= 0.4"
+        "node": ">=8"
       },
       "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/is-docker": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
-      "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
+    "node_modules/imurmurhash": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+      "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
       "dev": true,
-      "bin": {
-        "is-docker": "cli.js"
-      },
+      "license": "MIT",
       "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=0.8.19"
       }
     },
-    "node_modules/is-electron": {
-      "version": "2.2.1",
-      "license": "MIT"
-    },
-    "node_modules/is-extglob": {
-      "version": "2.1.1",
+    "node_modules/inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
       "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
+      "license": "ISC",
+      "dependencies": {
+        "once": "^1.3.0",
+        "wrappy": "1"
       }
     },
-    "node_modules/is-fullwidth-code-point": {
-      "version": "3.0.0",
+    "node_modules/inherits": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+      "license": "ISC"
+    },
+    "node_modules/ini": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz",
+      "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==",
       "dev": true,
-      "license": "MIT",
       "engines": {
-        "node": ">=8"
+        "node": ">=10"
       }
     },
-    "node_modules/is-generator-fn": {
-      "version": "2.1.0",
+    "node_modules/inquirer": {
+      "version": "9.1.5",
+      "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.5.tgz",
+      "integrity": "sha512-3ygAIh8gcZavV9bj6MTdYddG2zPSYswP808fKS46NOwlF0zZljVpnLCHODDqItWJDbDpLb3aouAxGaJbkxoppA==",
       "dev": true,
-      "license": "MIT",
+      "dependencies": {
+        "ansi-escapes": "^6.0.0",
+        "chalk": "^5.2.0",
+        "cli-cursor": "^4.0.0",
+        "cli-width": "^4.0.0",
+        "external-editor": "^3.0.3",
+        "figures": "^5.0.0",
+        "lodash": "^4.17.21",
+        "mute-stream": "1.0.0",
+        "ora": "^6.1.2",
+        "run-async": "^2.4.0",
+        "rxjs": "^7.8.0",
+        "string-width": "^5.1.2",
+        "strip-ansi": "^7.0.1",
+        "through": "^2.3.6",
+        "wrap-ansi": "^8.1.0"
+      },
       "engines": {
-        "node": ">=6"
+        "node": ">=14.18.0"
       }
     },
-    "node_modules/is-generator-function": {
-      "version": "1.0.10",
-      "license": "MIT",
+    "node_modules/inquirer/node_modules/ansi-escapes": {
+      "version": "6.2.0",
+      "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz",
+      "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==",
+      "dev": true,
       "dependencies": {
-        "has-tostringtag": "^1.0.0"
+        "type-fest": "^3.0.0"
       },
       "engines": {
-        "node": ">= 0.4"
+        "node": ">=14.16"
       },
       "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/is-glob": {
-      "version": "4.0.3",
+    "node_modules/inquirer/node_modules/ansi-styles": {
+      "version": "6.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
+      "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "is-extglob": "^2.1.1"
+      "engines": {
+        "node": ">=12"
       },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+      }
+    },
+    "node_modules/inquirer/node_modules/chalk": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+      "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+      "dev": true,
       "engines": {
-        "node": ">=0.10.0"
+        "node": "^12.17.0 || ^14.13 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/is-inside-container": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
-      "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
+    "node_modules/inquirer/node_modules/emoji-regex": {
+      "version": "9.2.2",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+      "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+      "dev": true
+    },
+    "node_modules/inquirer/node_modules/string-width": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+      "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
       "dev": true,
       "dependencies": {
-        "is-docker": "^3.0.0"
-      },
-      "bin": {
-        "is-inside-container": "cli.js"
+        "eastasianwidth": "^0.2.0",
+        "emoji-regex": "^9.2.2",
+        "strip-ansi": "^7.0.1"
       },
       "engines": {
-        "node": ">=14.16"
+        "node": ">=12"
       },
       "funding": {
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/is-installed-globally": {
-      "version": "0.4.0",
-      "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz",
-      "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==",
+    "node_modules/inquirer/node_modules/type-fest": {
+      "version": "3.13.1",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz",
+      "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==",
       "dev": true,
-      "dependencies": {
-        "global-dirs": "^3.0.0",
-        "is-path-inside": "^3.0.2"
-      },
       "engines": {
-        "node": ">=10"
+        "node": ">=14.16"
       },
       "funding": {
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/is-interactive": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
-      "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==",
+    "node_modules/inquirer/node_modules/wrap-ansi": {
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
+      "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
       "dev": true,
+      "dependencies": {
+        "ansi-styles": "^6.1.0",
+        "string-width": "^5.0.1",
+        "strip-ansi": "^7.0.1"
+      },
       "engines": {
         "node": ">=12"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
       }
     },
-    "node_modules/is-ip": {
-      "version": "3.1.0",
-      "license": "MIT",
+    "node_modules/interface-datastore": {
+      "version": "7.0.4",
+      "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-7.0.4.tgz",
+      "integrity": "sha512-Q8LZS/jfFFHz6XyZazLTAc078SSCoa27ZPBOfobWdpDiFO7FqPA2yskitUJIhaCgxNK8C+/lMBUTBNfVIDvLiw==",
       "dependencies": {
-        "ip-regex": "^4.0.0"
+        "interface-store": "^3.0.0",
+        "nanoid": "^4.0.0",
+        "uint8arrays": "^4.0.2"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/is-ipfs": {
-      "version": "0.6.3",
-      "license": "MIT",
+    "node_modules/interface-datastore/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/interface-datastore/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
       "dependencies": {
-        "bs58": "^4.0.1",
-        "cids": "~0.7.0",
-        "mafmt": "^7.0.0",
-        "multiaddr": "^7.2.1",
-        "multibase": "~0.6.0",
-        "multihashes": "~0.4.13"
+        "multiformats": "^12.0.1"
       }
     },
-    "node_modules/is-map": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz",
-      "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==",
-      "dev": true,
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+    "node_modules/interface-store": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-3.0.4.tgz",
+      "integrity": "sha512-OjHUuGXbH4eXSBx1TF1tTySvjLldPLzRSYYXJwrEQI+XfH5JWYZofr0gVMV4F8XTwC+4V7jomDYkvGRmDSRKqQ==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/is-negative-zero": {
-      "version": "2.0.2",
-      "license": "MIT",
+    "node_modules/internal-slot": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz",
+      "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==",
+      "dev": true,
+      "dependencies": {
+        "get-intrinsic": "^1.2.2",
+        "hasown": "^2.0.0",
+        "side-channel": "^1.0.4"
+      },
       "engines": {
         "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/is-npm": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz",
-      "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==",
+    "node_modules/interpret": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
+      "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
       "dev": true,
       "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">= 0.10"
       }
     },
-    "node_modules/is-number": {
-      "version": "7.0.0",
-      "dev": true,
+    "node_modules/ip": {
+      "version": "1.1.8",
+      "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
+      "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==",
+      "dev": true
+    },
+    "node_modules/ip-regex": {
+      "version": "4.1.0",
       "license": "MIT",
       "engines": {
-        "node": ">=0.12.0"
+        "node": ">=8"
       }
     },
-    "node_modules/is-number-object": {
-      "version": "1.0.7",
-      "license": "MIT",
+    "node_modules/ipfs-bitswap": {
+      "version": "19.0.2",
+      "resolved": "https://registry.npmjs.org/ipfs-bitswap/-/ipfs-bitswap-19.0.2.tgz",
+      "integrity": "sha512-pm0EcnTAwMMkCmdXHw/a7uPXzQ4I/pxVFiQZ6Ebg/R64XxAky/bCOJRzmqsgqH0+prH2bXAOgzS0mOZdL+zFSw==",
       "dependencies": {
-        "has-tostringtag": "^1.0.0"
-      },
+        "@libp2p/interface": "^0.1.1",
+        "@libp2p/logger": "^3.0.1",
+        "@multiformats/multiaddr": "^12.1.0",
+        "@vascosantos/moving-average": "^1.1.0",
+        "any-signal": "^4.1.1",
+        "blockstore-core": "^4.0.0",
+        "events": "^3.3.0",
+        "interface-blockstore": "^5.0.0",
+        "interface-store": "^5.1.0",
+        "it-foreach": "^2.0.2",
+        "it-length-prefixed": "^9.0.0",
+        "it-map": "^3.0.2",
+        "it-pipe": "^3.0.1",
+        "it-take": "^3.0.1",
+        "just-debounce-it": "^3.0.1",
+        "multiformats": "^12.0.1",
+        "progress-events": "^1.0.0",
+        "protons-runtime": "^5.0.0",
+        "timeout-abort-controller": "^3.0.0",
+        "uint8arraylist": "^2.4.3",
+        "uint8arrays": "^4.0.2",
+        "varint": "^6.0.0",
+        "varint-decoder": "^1.0.0"
+      }
+    },
+    "node_modules/ipfs-bitswap/node_modules/any-signal": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/any-signal/-/any-signal-4.1.1.tgz",
+      "integrity": "sha512-iADenERppdC+A2YKbOXXB2WUeABLaM6qnpZ70kZbPZ1cZMMJ7eF+3CaYm+/PhBizgkzlvssC7QuHS30oOiQYWA==",
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/is-obj": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
-      "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
-      "dev": true,
-      "engines": {
-        "node": ">=8"
+    "node_modules/ipfs-bitswap/node_modules/blockstore-core": {
+      "version": "4.3.9",
+      "resolved": "https://registry.npmjs.org/blockstore-core/-/blockstore-core-4.3.9.tgz",
+      "integrity": "sha512-n09dbTkWUdFfPDl8asqEivXhY5gDG52NhO7TDHzFKN+vmnCchO+ckcYtyO4Gy2mBCt28orErEzrIeamdFmbeTA==",
+      "dependencies": {
+        "@libp2p/logger": "^4.0.1",
+        "err-code": "^3.0.1",
+        "interface-blockstore": "^5.0.0",
+        "interface-store": "^5.0.0",
+        "it-drain": "^3.0.1",
+        "it-filter": "^3.0.0",
+        "it-merge": "^3.0.1",
+        "it-pushable": "^3.0.0",
+        "multiformats": "^13.0.0",
+        "uint8arrays": "^5.0.0"
       }
     },
-    "node_modules/is-path-inside": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
-      "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
-      "dev": true,
-      "engines": {
-        "node": ">=8"
+    "node_modules/ipfs-bitswap/node_modules/blockstore-core/node_modules/@libp2p/interface": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.0.2.tgz",
+      "integrity": "sha512-z/3Yyg+7cVyzRXwzdrDkJd7YmNaLE9iZjQaixo5luI/n9uk5OFFjb9ulAsNqpq8V1xylCo2DXIC7f94KClwzVw==",
+      "dependencies": {
+        "@multiformats/multiaddr": "^12.1.10",
+        "it-pushable": "^3.2.1",
+        "it-stream-types": "^2.0.1",
+        "multiformats": "^12.1.3",
+        "uint8arraylist": "^2.4.3"
       }
     },
-    "node_modules/is-plain-obj": {
-      "version": "2.1.0",
-      "license": "MIT",
+    "node_modules/ipfs-bitswap/node_modules/blockstore-core/node_modules/@libp2p/interface/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": ">=8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/is-plain-object": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
-      "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
+    "node_modules/ipfs-bitswap/node_modules/blockstore-core/node_modules/@libp2p/logger": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-4.0.2.tgz",
+      "integrity": "sha512-J9UMtMU9BKXNp+3c5kcI7HyWOPYg2B2E6sn1gEQckiSexTaz0wKJSlgTZ89f9F8bkC3AaC8ybXYuHbFQhwpTIg==",
+      "dependencies": {
+        "@libp2p/interface": "^1.0.2",
+        "@multiformats/multiaddr": "^12.1.10",
+        "debug": "^4.3.4",
+        "interface-datastore": "^8.2.0",
+        "multiformats": "^12.1.3"
+      }
+    },
+    "node_modules/ipfs-bitswap/node_modules/blockstore-core/node_modules/@libp2p/logger/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": ">=0.10.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/is-potential-custom-element-name": {
-      "version": "1.0.1",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/ipfs-bitswap/node_modules/blockstore-core/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
-    "node_modules/is-regex": {
-      "version": "1.1.4",
-      "license": "MIT",
+    "node_modules/ipfs-bitswap/node_modules/blockstore-core/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
       "dependencies": {
-        "call-bind": "^1.0.2",
-        "has-tostringtag": "^1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/is-set": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
-      "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==",
-      "dev": true,
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+    "node_modules/ipfs-bitswap/node_modules/interface-blockstore": {
+      "version": "5.2.8",
+      "resolved": "https://registry.npmjs.org/interface-blockstore/-/interface-blockstore-5.2.8.tgz",
+      "integrity": "sha512-C889pHW6hlVzJ0xjguXp6OK8ZeRMu/U8S2QjC/VnQQZXEGDXQDOn0fiYIJngOtb0q82UgxxQCjfTsRhpLfEE8g==",
+      "dependencies": {
+        "interface-store": "^5.0.0",
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/is-shared-array-buffer": {
-      "version": "1.0.2",
-      "license": "MIT",
+    "node_modules/ipfs-bitswap/node_modules/interface-blockstore/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/ipfs-bitswap/node_modules/interface-datastore": {
+      "version": "8.2.9",
+      "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.9.tgz",
+      "integrity": "sha512-J/8PN8TnB5xxCRtgu9Vx3zExdOzcTU5/DBF2dlU41deX1GW6/SPpbJo5DRNSnvzfjmwJ7YhUOIFXyccUp8nuAA==",
       "dependencies": {
-        "call-bind": "^1.0.2"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "interface-store": "^5.0.0",
+        "uint8arrays": "^5.0.0"
       }
     },
-    "node_modules/is-ssh": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz",
-      "integrity": "sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==",
-      "dev": true,
+    "node_modules/ipfs-bitswap/node_modules/interface-datastore/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/ipfs-bitswap/node_modules/interface-datastore/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
       "dependencies": {
-        "protocols": "^2.0.1"
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/is-stream": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
+    "node_modules/ipfs-bitswap/node_modules/interface-store": {
+      "version": "5.1.5",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.5.tgz",
+      "integrity": "sha512-X0KnJBk3o+YL13MxZBMwa88/b3Mdrpm0yPzkSTKDDVn9BSPH7UK6W+ZtIPO2bxKOQVmq7zqOwAnYnpfqWjb6/g=="
     },
-    "node_modules/is-string": {
-      "version": "1.0.7",
-      "license": "MIT",
+    "node_modules/ipfs-bitswap/node_modules/it-filter": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-filter/-/it-filter-3.0.4.tgz",
+      "integrity": "sha512-e0sz+st4sudK/zH6GZ/gRTRP8A/ADuJFCYDmRgMbZvR79y5+v4ZXav850bBZk5wL9zXaYZFxS1v/6Qi+Vjwh5g==",
       "dependencies": {
-        "has-tostringtag": "^1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "it-peekable": "^3.0.0"
       }
     },
-    "node_modules/is-symbol": {
-      "version": "1.0.4",
-      "license": "MIT",
+    "node_modules/ipfs-bitswap/node_modules/it-map": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/it-map/-/it-map-3.0.5.tgz",
+      "integrity": "sha512-hB0TDXo/h4KSJJDSRLgAPmDroiXP6Fx1ck4Bzl3US9hHfZweTKsuiP0y4gXuTMcJlS6vj0bb+f70rhkD47ZA3w==",
       "dependencies": {
-        "has-symbols": "^1.0.2"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "it-peekable": "^3.0.0"
       }
     },
-    "node_modules/is-typed-array": {
-      "version": "1.1.9",
-      "license": "MIT",
+    "node_modules/ipfs-bitswap/node_modules/it-peekable": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.3.tgz",
+      "integrity": "sha512-Wx21JX/rMzTEl9flx3DGHuPV1KQFGOl8uoKfQtmZHgPQtGb89eQ6RyVd82h3HuP9Ghpt0WgBDlmmdWeHXqyx7w=="
+    },
+    "node_modules/ipfs-bitswap/node_modules/it-pipe": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-3.0.1.tgz",
+      "integrity": "sha512-sIoNrQl1qSRg2seYSBH/3QxWhJFn9PKYvOf/bHdtCBF0bnghey44VyASsWzn5dAx0DCDDABq1hZIuzKmtBZmKA==",
       "dependencies": {
-        "available-typed-arrays": "^1.0.5",
-        "call-bind": "^1.0.2",
-        "es-abstract": "^1.20.0",
-        "for-each": "^0.3.3",
-        "has-tostringtag": "^1.0.0"
+        "it-merge": "^3.0.0",
+        "it-pushable": "^3.1.2",
+        "it-stream-types": "^2.0.1"
       },
       "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/is-typedarray": {
-      "version": "1.0.0",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/ipfs-bitswap/node_modules/it-take": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-take/-/it-take-3.0.4.tgz",
+      "integrity": "sha512-RG8HDjAZlvkzz5Nav4xq6gK5zNT+Ff1UTIf+CrSJW8nIl6N1FpBH5e7clUshiCn+MmmMoSdIEpw4UaTolszxhA=="
     },
-    "node_modules/is-unicode-supported": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
-      "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
-      "dev": true,
+    "node_modules/ipfs-bitswap/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/is-weakref": {
-      "version": "1.0.2",
-      "license": "MIT",
+    "node_modules/ipfs-bitswap/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
       "dependencies": {
-        "call-bind": "^1.0.2"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+        "multiformats": "^12.0.1"
       }
     },
-    "node_modules/is-wsl": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
-      "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
-      "dev": true,
-      "dependencies": {
-        "is-docker": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
+    "node_modules/ipfs-bitswap/node_modules/varint": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz",
+      "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg=="
     },
-    "node_modules/is-wsl/node_modules/is-docker": {
-      "version": "2.2.1",
-      "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
-      "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
-      "dev": true,
-      "bin": {
-        "is-docker": "cli.js"
+    "node_modules/ipfs-core-types": {
+      "version": "0.14.1",
+      "resolved": "https://registry.npmjs.org/ipfs-core-types/-/ipfs-core-types-0.14.1.tgz",
+      "integrity": "sha512-4ujF8NlM9bYi2I6AIqPP9wfGGX0x/gRCkMoFdOQfxxrFg6HcAdfS+0/irK8mp4e7znOHWReOHeWqCGw+dAPwsw==",
+      "deprecated": "js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details",
+      "dependencies": {
+        "@ipld/dag-pb": "^4.0.0",
+        "@libp2p/interface-keychain": "^2.0.0",
+        "@libp2p/interface-peer-id": "^2.0.0",
+        "@libp2p/interface-peer-info": "^1.0.2",
+        "@libp2p/interface-pubsub": "^3.0.0",
+        "@multiformats/multiaddr": "^11.1.5",
+        "@types/node": "^18.0.0",
+        "interface-datastore": "^7.0.0",
+        "ipfs-unixfs": "^9.0.0",
+        "multiformats": "^11.0.0"
       },
       "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/is-yarn-global": {
-      "version": "0.4.1",
-      "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.1.tgz",
-      "integrity": "sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==",
-      "dev": true,
+    "node_modules/ipfs-core-types/node_modules/@multiformats/multiaddr": {
+      "version": "11.6.1",
+      "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-11.6.1.tgz",
+      "integrity": "sha512-doST0+aB7/3dGK9+U5y3mtF3jq85KGbke1QiH0KE1F5mGQ9y56mFebTeu2D9FNOm+OT6UHb8Ss8vbSnpGjeLNw==",
+      "dependencies": {
+        "@chainsafe/is-ip": "^2.0.1",
+        "dns-over-http-resolver": "^2.1.0",
+        "err-code": "^3.0.1",
+        "multiformats": "^11.0.0",
+        "uint8arrays": "^4.0.2",
+        "varint": "^6.0.0"
+      },
       "engines": {
-        "node": ">=12"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/isarray": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
-      "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
-      "dev": true
-    },
-    "node_modules/isexe": {
-      "version": "2.0.0",
-      "dev": true,
-      "license": "ISC"
-    },
-    "node_modules/iso-random-stream": {
-      "version": "2.0.0",
-      "license": "MIT",
+    "node_modules/ipfs-core-types/node_modules/ipfs-unixfs": {
+      "version": "9.0.1",
+      "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-9.0.1.tgz",
+      "integrity": "sha512-jh2CbXyxID+v3jLml9CqMwjdSS9ZRnsGfQGGPOfem0/hT/L48xUeTPvh7qLFWkZcIMhZtG+fnS1teei8x5uGBg==",
       "dependencies": {
-        "events": "^3.3.0",
-        "readable-stream": "^3.4.0"
+        "err-code": "^3.0.1",
+        "protobufjs": "^7.0.0"
       },
       "engines": {
-        "node": ">=10"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/iso-url": {
-      "version": "1.2.1",
-      "license": "MIT",
+    "node_modules/ipfs-core-types/node_modules/long": {
+      "version": "5.2.3",
+      "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
+      "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
+    },
+    "node_modules/ipfs-core-types/node_modules/multiformats": {
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz",
+      "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==",
       "engines": {
-        "node": ">=12"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/issue-parser": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/issue-parser/-/issue-parser-6.0.0.tgz",
-      "integrity": "sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA==",
-      "dev": true,
+    "node_modules/ipfs-core-types/node_modules/protobufjs": {
+      "version": "7.2.5",
+      "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz",
+      "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==",
+      "hasInstallScript": true,
       "dependencies": {
-        "lodash.capitalize": "^4.2.1",
-        "lodash.escaperegexp": "^4.1.2",
-        "lodash.isplainobject": "^4.0.6",
-        "lodash.isstring": "^4.0.1",
-        "lodash.uniqby": "^4.7.0"
+        "@protobufjs/aspromise": "^1.1.2",
+        "@protobufjs/base64": "^1.1.2",
+        "@protobufjs/codegen": "^2.0.4",
+        "@protobufjs/eventemitter": "^1.1.0",
+        "@protobufjs/fetch": "^1.1.0",
+        "@protobufjs/float": "^1.0.2",
+        "@protobufjs/inquire": "^1.1.0",
+        "@protobufjs/path": "^1.1.2",
+        "@protobufjs/pool": "^1.1.0",
+        "@protobufjs/utf8": "^1.1.0",
+        "@types/node": ">=13.7.0",
+        "long": "^5.0.0"
       },
       "engines": {
-        "node": ">=10.13"
+        "node": ">=12.0.0"
       }
     },
-    "node_modules/istanbul-lib-coverage": {
-      "version": "3.2.0",
-      "dev": true,
-      "license": "BSD-3-Clause",
-      "engines": {
-        "node": ">=8"
+    "node_modules/ipfs-core-types/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
+      "dependencies": {
+        "multiformats": "^12.0.1"
       }
     },
-    "node_modules/istanbul-lib-instrument": {
-      "version": "5.2.0",
-      "dev": true,
-      "license": "BSD-3-Clause",
-      "dependencies": {
-        "@babel/core": "^7.12.3",
-        "@babel/parser": "^7.14.7",
-        "@istanbuljs/schema": "^0.1.2",
-        "istanbul-lib-coverage": "^3.2.0",
-        "semver": "^6.3.0"
-      },
+    "node_modules/ipfs-core-types/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": ">=8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/istanbul-lib-instrument/node_modules/semver": {
-      "version": "6.3.0",
-      "dev": true,
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver.js"
-      }
+    "node_modules/ipfs-core-types/node_modules/varint": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz",
+      "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg=="
     },
-    "node_modules/istanbul-lib-report": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "BSD-3-Clause",
+    "node_modules/ipfs-core-utils": {
+      "version": "0.18.1",
+      "resolved": "https://registry.npmjs.org/ipfs-core-utils/-/ipfs-core-utils-0.18.1.tgz",
+      "integrity": "sha512-P7jTpdfvlyBG3JR4o+Th3QJADlmXmwMxbkjszXry6VAjfSfLIIqXsdeYPoVRkV69GFEeQozuz2k/jR+U8cUH/Q==",
+      "deprecated": "js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details",
       "dependencies": {
-        "istanbul-lib-coverage": "^3.0.0",
-        "make-dir": "^3.0.0",
-        "supports-color": "^7.1.0"
+        "@libp2p/logger": "^2.0.5",
+        "@multiformats/multiaddr": "^11.1.5",
+        "@multiformats/multiaddr-to-uri": "^9.0.1",
+        "any-signal": "^3.0.0",
+        "blob-to-it": "^2.0.0",
+        "browser-readablestream-to-it": "^2.0.0",
+        "err-code": "^3.0.1",
+        "ipfs-core-types": "^0.14.1",
+        "ipfs-unixfs": "^9.0.0",
+        "ipfs-utils": "^9.0.13",
+        "it-all": "^2.0.0",
+        "it-map": "^2.0.0",
+        "it-peekable": "^2.0.0",
+        "it-to-stream": "^1.0.0",
+        "merge-options": "^3.0.4",
+        "multiformats": "^11.0.0",
+        "nanoid": "^4.0.0",
+        "parse-duration": "^1.0.0",
+        "timeout-abort-controller": "^3.0.0",
+        "uint8arrays": "^4.0.2"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/istanbul-lib-report/node_modules/has-flag": {
-      "version": "4.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/interface": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.1.0.tgz",
+      "integrity": "sha512-URIKSFtaliBGA8sIg/MGfyjIo5h4jAdfuZl6dXXXmtdfC3X0rry95YuLNYzXtGMuxG/X+pbVht3fykHvPiXUhg==",
+      "dependencies": {
+        "@multiformats/multiaddr": "^12.1.10",
+        "it-pushable": "^3.2.1",
+        "it-stream-types": "^2.0.1",
+        "multiformats": "^13.0.0",
+        "progress-events": "^1.0.0",
+        "uint8arraylist": "^2.4.3"
       }
     },
-    "node_modules/istanbul-lib-report/node_modules/supports-color": {
-      "version": "7.2.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/interface/node_modules/@multiformats/multiaddr": {
+      "version": "12.1.12",
+      "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.1.12.tgz",
+      "integrity": "sha512-hrY4uN/oeYhn410jBSpVXn37eenn4djKOj6Dh20Yh4xzGgqmS6u+/X08zQfHgWNjk7NJejPUcRfHEfs8e/MOcw==",
       "dependencies": {
-        "has-flag": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
+        "@chainsafe/is-ip": "^2.0.1",
+        "@chainsafe/netmask": "^2.0.0",
+        "@libp2p/interface": "^1.0.0",
+        "dns-over-http-resolver": "3.0.0",
+        "multiformats": "^13.0.0",
+        "uint8-varint": "^2.0.1",
+        "uint8arrays": "^5.0.0"
       }
     },
-    "node_modules/istanbul-lib-source-maps": {
-      "version": "4.0.1",
-      "dev": true,
-      "license": "BSD-3-Clause",
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/interface/node_modules/dns-over-http-resolver": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-3.0.0.tgz",
+      "integrity": "sha512-5+BI+B7n8LKhNaEZBYErr+CBd9t5nYtjunByLhrLGtZ+i3TRgiU8yE87pCjEBu2KOwNsD9ljpSXEbZ4S8xih5g==",
       "dependencies": {
-        "debug": "^4.1.1",
-        "istanbul-lib-coverage": "^3.0.0",
-        "source-map": "^0.6.1"
-      },
-      "engines": {
-        "node": ">=10"
+        "debug": "^4.3.4",
+        "receptacle": "^1.3.2"
       }
     },
-    "node_modules/istanbul-reports": {
-      "version": "3.1.5",
-      "dev": true,
-      "license": "BSD-3-Clause",
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/interface/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/interface/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
       "dependencies": {
-        "html-escaper": "^2.0.0",
-        "istanbul-lib-report": "^3.0.0"
+        "multiformats": "^13.0.0"
+      }
+    },
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/logger": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-2.1.1.tgz",
+      "integrity": "sha512-2UbzDPctg3cPupF6jrv6abQnAUTrbLybNOj0rmmrdGm1cN2HJ1o/hBu0sXuq4KF9P1h/eVRn1HIRbVIEKnEJrA==",
+      "dependencies": {
+        "@libp2p/interface-peer-id": "^2.0.2",
+        "@multiformats/multiaddr": "^12.1.3",
+        "debug": "^4.3.4",
+        "interface-datastore": "^8.2.0",
+        "multiformats": "^11.0.2"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/it-all": {
-      "version": "1.0.6",
-      "license": "ISC"
-    },
-    "node_modules/it-batch": {
-      "version": "1.0.9",
-      "license": "ISC"
-    },
-    "node_modules/it-drain": {
-      "version": "1.0.5",
-      "license": "ISC"
-    },
-    "node_modules/it-filter": {
-      "version": "1.0.3",
-      "license": "ISC"
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/logger/node_modules/@multiformats/multiaddr": {
+      "version": "12.1.12",
+      "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.1.12.tgz",
+      "integrity": "sha512-hrY4uN/oeYhn410jBSpVXn37eenn4djKOj6Dh20Yh4xzGgqmS6u+/X08zQfHgWNjk7NJejPUcRfHEfs8e/MOcw==",
+      "dependencies": {
+        "@chainsafe/is-ip": "^2.0.1",
+        "@chainsafe/netmask": "^2.0.0",
+        "@libp2p/interface": "^1.0.0",
+        "dns-over-http-resolver": "3.0.0",
+        "multiformats": "^13.0.0",
+        "uint8-varint": "^2.0.1",
+        "uint8arrays": "^5.0.0"
+      }
     },
-    "node_modules/it-first": {
-      "version": "1.0.7",
-      "license": "ISC"
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/logger/node_modules/@multiformats/multiaddr/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
-    "node_modules/it-glob": {
-      "version": "1.0.2",
-      "license": "ISC",
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/logger/node_modules/dns-over-http-resolver": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-3.0.0.tgz",
+      "integrity": "sha512-5+BI+B7n8LKhNaEZBYErr+CBd9t5nYtjunByLhrLGtZ+i3TRgiU8yE87pCjEBu2KOwNsD9ljpSXEbZ4S8xih5g==",
       "dependencies": {
-        "@types/minimatch": "^3.0.4",
-        "minimatch": "^3.0.4"
+        "debug": "^4.3.4",
+        "receptacle": "^1.3.2"
       }
     },
-    "node_modules/it-last": {
-      "version": "1.0.5",
-      "license": "ISC"
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/logger/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
+      "dependencies": {
+        "multiformats": "^13.0.0"
+      }
     },
-    "node_modules/it-map": {
-      "version": "1.0.6",
-      "license": "ISC"
+    "node_modules/ipfs-core-utils/node_modules/@libp2p/logger/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
-    "node_modules/it-parallel-batch": {
-      "version": "1.0.10",
-      "license": "ISC",
+    "node_modules/ipfs-core-utils/node_modules/@multiformats/multiaddr": {
+      "version": "11.6.1",
+      "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-11.6.1.tgz",
+      "integrity": "sha512-doST0+aB7/3dGK9+U5y3mtF3jq85KGbke1QiH0KE1F5mGQ9y56mFebTeu2D9FNOm+OT6UHb8Ss8vbSnpGjeLNw==",
       "dependencies": {
-        "it-batch": "^1.0.9"
+        "@chainsafe/is-ip": "^2.0.1",
+        "dns-over-http-resolver": "^2.1.0",
+        "err-code": "^3.0.1",
+        "multiformats": "^11.0.0",
+        "uint8arrays": "^4.0.2",
+        "varint": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/it-peekable": {
-      "version": "1.0.3",
-      "license": "ISC"
-    },
-    "node_modules/it-pipe": {
-      "version": "1.1.0",
-      "license": "MIT"
+    "node_modules/ipfs-core-utils/node_modules/interface-datastore": {
+      "version": "8.2.10",
+      "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.10.tgz",
+      "integrity": "sha512-D8RuxMdjOPB+j6WMDJ+I2aXTDzUT6DIVjgzo1E+ODL7w8WrSFl9FXD2SYmgj6vVzdb7Kb5qmAI9pEnDZJz7ifg==",
+      "dependencies": {
+        "interface-store": "^5.0.0",
+        "uint8arrays": "^5.0.0"
+      }
     },
-    "node_modules/it-take": {
-      "version": "1.0.2",
-      "license": "ISC"
+    "node_modules/ipfs-core-utils/node_modules/interface-datastore/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
-    "node_modules/it-to-stream": {
-      "version": "1.0.0",
-      "license": "MIT",
+    "node_modules/ipfs-core-utils/node_modules/interface-datastore/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
       "dependencies": {
-        "buffer": "^6.0.3",
-        "fast-fifo": "^1.0.0",
-        "get-iterator": "^1.0.2",
-        "p-defer": "^3.0.0",
-        "p-fifo": "^1.0.0",
-        "readable-stream": "^3.6.0"
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/iterate-iterator": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.2.tgz",
-      "integrity": "sha512-t91HubM4ZDQ70M9wqp+pcNpu8OyJ9UAtXntT/Bcsvp5tZMnz9vRa+IunKXeI8AnfZMTv0jNuVEmGeLSMjVvfPw==",
-      "dev": true,
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
+    "node_modules/ipfs-core-utils/node_modules/interface-store": {
+      "version": "5.1.7",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.7.tgz",
+      "integrity": "sha512-DVMTgZ43NAdDtXL3QsEq8N0vuUYVBxiGbxN0uI0lrNasuX/CGSrU7bjOO2DaGTMNut4Pt3ae+VQYFvNtH4Oyeg=="
     },
-    "node_modules/iterate-value": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz",
-      "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==",
-      "dev": true,
+    "node_modules/ipfs-core-utils/node_modules/ipfs-unixfs": {
+      "version": "9.0.1",
+      "resolved": "https://registry.npmjs.org/ipfs-unixfs/-/ipfs-unixfs-9.0.1.tgz",
+      "integrity": "sha512-jh2CbXyxID+v3jLml9CqMwjdSS9ZRnsGfQGGPOfem0/hT/L48xUeTPvh7qLFWkZcIMhZtG+fnS1teei8x5uGBg==",
       "dependencies": {
-        "es-get-iterator": "^1.0.2",
-        "iterate-iterator": "^1.0.1"
+        "err-code": "^3.0.1",
+        "protobufjs": "^7.0.0"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest": {
-      "version": "27.0.4",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@jest/core": "^27.0.4",
-        "import-local": "^3.0.2",
-        "jest-cli": "^27.0.4"
-      },
-      "bin": {
-        "jest": "bin/jest.js"
-      },
+    "node_modules/ipfs-core-utils/node_modules/long": {
+      "version": "5.2.3",
+      "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz",
+      "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q=="
+    },
+    "node_modules/ipfs-core-utils/node_modules/multiformats": {
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz",
+      "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==",
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
-      },
-      "peerDependencies": {
-        "node-notifier": "^8.0.1 || ^9.0.0"
-      },
-      "peerDependenciesMeta": {
-        "node-notifier": {
-          "optional": true
-        }
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest-changed-files": {
-      "version": "27.5.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-core-utils/node_modules/protobufjs": {
+      "version": "7.2.5",
+      "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz",
+      "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==",
+      "hasInstallScript": true,
       "dependencies": {
-        "@jest/types": "^27.5.1",
-        "execa": "^5.0.0",
-        "throat": "^6.0.1"
+        "@protobufjs/aspromise": "^1.1.2",
+        "@protobufjs/base64": "^1.1.2",
+        "@protobufjs/codegen": "^2.0.4",
+        "@protobufjs/eventemitter": "^1.1.0",
+        "@protobufjs/fetch": "^1.1.0",
+        "@protobufjs/float": "^1.0.2",
+        "@protobufjs/inquire": "^1.1.0",
+        "@protobufjs/path": "^1.1.2",
+        "@protobufjs/pool": "^1.1.0",
+        "@protobufjs/utf8": "^1.1.0",
+        "@types/node": ">=13.7.0",
+        "long": "^5.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=12.0.0"
       }
     },
-    "node_modules/jest-circus": {
-      "version": "27.5.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-core-utils/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
       "dependencies": {
-        "@jest/environment": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "chalk": "^4.0.0",
-        "co": "^4.6.0",
-        "dedent": "^0.7.0",
-        "expect": "^27.5.1",
-        "is-generator-fn": "^2.0.0",
-        "jest-each": "^27.5.1",
-        "jest-matcher-utils": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-runtime": "^27.5.1",
-        "jest-snapshot": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "pretty-format": "^27.5.1",
-        "slash": "^3.0.0",
-        "stack-utils": "^2.0.3",
-        "throat": "^6.0.1"
-      },
+        "multiformats": "^12.0.1"
+      }
+    },
+    "node_modules/ipfs-core-utils/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest-circus/node_modules/ansi-styles": {
-      "version": "4.3.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-convert": "^2.0.1"
+    "node_modules/ipfs-core-utils/node_modules/varint": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz",
+      "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg=="
+    },
+    "node_modules/ipfs-http-client": {
+      "version": "60.0.1",
+      "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-60.0.1.tgz",
+      "integrity": "sha512-amwM5TNuf077J+/q27jPHfatC05vJuIbX6ZnlYLjc2QsjOCKsORNBqV3brNw7l+fPrijV1yrwEDLG3JEnKsfMw==",
+      "deprecated": "js-IPFS has been deprecated in favour of Helia - please see https://github.com/ipfs/js-ipfs/issues/4336 for details",
+      "dependencies": {
+        "@ipld/dag-cbor": "^9.0.0",
+        "@ipld/dag-json": "^10.0.0",
+        "@ipld/dag-pb": "^4.0.0",
+        "@libp2p/logger": "^2.0.5",
+        "@libp2p/peer-id": "^2.0.0",
+        "@multiformats/multiaddr": "^11.1.5",
+        "any-signal": "^3.0.0",
+        "dag-jose": "^4.0.0",
+        "err-code": "^3.0.1",
+        "ipfs-core-types": "^0.14.1",
+        "ipfs-core-utils": "^0.18.1",
+        "ipfs-utils": "^9.0.13",
+        "it-first": "^2.0.0",
+        "it-last": "^2.0.0",
+        "merge-options": "^3.0.4",
+        "multiformats": "^11.0.0",
+        "parse-duration": "^1.0.0",
+        "stream-to-it": "^0.2.2",
+        "uint8arrays": "^4.0.2"
       },
       "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest-circus/node_modules/chalk": {
-      "version": "4.1.2",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/@libp2p/interface": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@libp2p/interface/-/interface-1.1.0.tgz",
+      "integrity": "sha512-URIKSFtaliBGA8sIg/MGfyjIo5h4jAdfuZl6dXXXmtdfC3X0rry95YuLNYzXtGMuxG/X+pbVht3fykHvPiXUhg==",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "@multiformats/multiaddr": "^12.1.10",
+        "it-pushable": "^3.2.1",
+        "it-stream-types": "^2.0.1",
+        "multiformats": "^13.0.0",
+        "progress-events": "^1.0.0",
+        "uint8arraylist": "^2.4.3"
       }
     },
-    "node_modules/jest-circus/node_modules/color-convert": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/@libp2p/interface/node_modules/@multiformats/multiaddr": {
+      "version": "12.1.12",
+      "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.1.12.tgz",
+      "integrity": "sha512-hrY4uN/oeYhn410jBSpVXn37eenn4djKOj6Dh20Yh4xzGgqmS6u+/X08zQfHgWNjk7NJejPUcRfHEfs8e/MOcw==",
       "dependencies": {
-        "color-name": "~1.1.4"
-      },
-      "engines": {
-        "node": ">=7.0.0"
+        "@chainsafe/is-ip": "^2.0.1",
+        "@chainsafe/netmask": "^2.0.0",
+        "@libp2p/interface": "^1.0.0",
+        "dns-over-http-resolver": "3.0.0",
+        "multiformats": "^13.0.0",
+        "uint8-varint": "^2.0.1",
+        "uint8arrays": "^5.0.0"
       }
     },
-    "node_modules/jest-circus/node_modules/color-name": {
-      "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/ipfs-http-client/node_modules/@libp2p/interface/node_modules/dns-over-http-resolver": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-3.0.0.tgz",
+      "integrity": "sha512-5+BI+B7n8LKhNaEZBYErr+CBd9t5nYtjunByLhrLGtZ+i3TRgiU8yE87pCjEBu2KOwNsD9ljpSXEbZ4S8xih5g==",
+      "dependencies": {
+        "debug": "^4.3.4",
+        "receptacle": "^1.3.2"
+      }
     },
-    "node_modules/jest-circus/node_modules/has-flag": {
-      "version": "4.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
+    "node_modules/ipfs-http-client/node_modules/@libp2p/interface/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/ipfs-http-client/node_modules/@libp2p/interface/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
+      "dependencies": {
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/jest-circus/node_modules/supports-color": {
-      "version": "7.2.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/@libp2p/logger": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-2.1.1.tgz",
+      "integrity": "sha512-2UbzDPctg3cPupF6jrv6abQnAUTrbLybNOj0rmmrdGm1cN2HJ1o/hBu0sXuq4KF9P1h/eVRn1HIRbVIEKnEJrA==",
       "dependencies": {
-        "has-flag": "^4.0.0"
+        "@libp2p/interface-peer-id": "^2.0.2",
+        "@multiformats/multiaddr": "^12.1.3",
+        "debug": "^4.3.4",
+        "interface-datastore": "^8.2.0",
+        "multiformats": "^11.0.2"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest-cli": {
-      "version": "27.5.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/@libp2p/logger/node_modules/@multiformats/multiaddr": {
+      "version": "12.1.12",
+      "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-12.1.12.tgz",
+      "integrity": "sha512-hrY4uN/oeYhn410jBSpVXn37eenn4djKOj6Dh20Yh4xzGgqmS6u+/X08zQfHgWNjk7NJejPUcRfHEfs8e/MOcw==",
       "dependencies": {
-        "@jest/core": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "chalk": "^4.0.0",
-        "exit": "^0.1.2",
-        "graceful-fs": "^4.2.9",
-        "import-local": "^3.0.2",
-        "jest-config": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-validate": "^27.5.1",
-        "prompts": "^2.0.1",
-        "yargs": "^16.2.0"
-      },
-      "bin": {
-        "jest": "bin/jest.js"
-      },
-      "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
-      },
-      "peerDependencies": {
-        "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
-      },
-      "peerDependenciesMeta": {
-        "node-notifier": {
-          "optional": true
-        }
+        "@chainsafe/is-ip": "^2.0.1",
+        "@chainsafe/netmask": "^2.0.0",
+        "@libp2p/interface": "^1.0.0",
+        "dns-over-http-resolver": "3.0.0",
+        "multiformats": "^13.0.0",
+        "uint8-varint": "^2.0.1",
+        "uint8arrays": "^5.0.0"
       }
     },
-    "node_modules/jest-cli/node_modules/ansi-styles": {
-      "version": "4.3.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/@libp2p/logger/node_modules/@multiformats/multiaddr/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/ipfs-http-client/node_modules/@libp2p/logger/node_modules/dns-over-http-resolver": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-3.0.0.tgz",
+      "integrity": "sha512-5+BI+B7n8LKhNaEZBYErr+CBd9t5nYtjunByLhrLGtZ+i3TRgiU8yE87pCjEBu2KOwNsD9ljpSXEbZ4S8xih5g==",
       "dependencies": {
-        "color-convert": "^2.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "debug": "^4.3.4",
+        "receptacle": "^1.3.2"
       }
     },
-    "node_modules/jest-cli/node_modules/chalk": {
-      "version": "4.1.2",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/@libp2p/logger/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "multiformats": "^13.0.0"
       }
     },
-    "node_modules/jest-cli/node_modules/color-convert": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/@libp2p/logger/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/ipfs-http-client/node_modules/@multiformats/multiaddr": {
+      "version": "11.6.1",
+      "resolved": "https://registry.npmjs.org/@multiformats/multiaddr/-/multiaddr-11.6.1.tgz",
+      "integrity": "sha512-doST0+aB7/3dGK9+U5y3mtF3jq85KGbke1QiH0KE1F5mGQ9y56mFebTeu2D9FNOm+OT6UHb8Ss8vbSnpGjeLNw==",
       "dependencies": {
-        "color-name": "~1.1.4"
+        "@chainsafe/is-ip": "^2.0.1",
+        "dns-over-http-resolver": "^2.1.0",
+        "err-code": "^3.0.1",
+        "multiformats": "^11.0.0",
+        "uint8arrays": "^4.0.2",
+        "varint": "^6.0.0"
       },
       "engines": {
-        "node": ">=7.0.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest-cli/node_modules/color-name": {
-      "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/ipfs-http-client/node_modules/interface-datastore": {
+      "version": "8.2.10",
+      "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.10.tgz",
+      "integrity": "sha512-D8RuxMdjOPB+j6WMDJ+I2aXTDzUT6DIVjgzo1E+ODL7w8WrSFl9FXD2SYmgj6vVzdb7Kb5qmAI9pEnDZJz7ifg==",
+      "dependencies": {
+        "interface-store": "^5.0.0",
+        "uint8arrays": "^5.0.0"
+      }
     },
-    "node_modules/jest-cli/node_modules/has-flag": {
-      "version": "4.0.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/interface-datastore/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/ipfs-http-client/node_modules/interface-datastore/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
+      "dependencies": {
+        "multiformats": "^13.0.0"
+      }
+    },
+    "node_modules/ipfs-http-client/node_modules/interface-store": {
+      "version": "5.1.7",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.7.tgz",
+      "integrity": "sha512-DVMTgZ43NAdDtXL3QsEq8N0vuUYVBxiGbxN0uI0lrNasuX/CGSrU7bjOO2DaGTMNut4Pt3ae+VQYFvNtH4Oyeg=="
+    },
+    "node_modules/ipfs-http-client/node_modules/it-last": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/it-last/-/it-last-2.0.1.tgz",
+      "integrity": "sha512-uVMedYW0wa2Cx0TAmcOCLbfuLLII7+vyURmhKa8Zovpd+aBTMsmINtsta2n364wJ5qsEDBH+akY1sUtAkaYBlg==",
       "engines": {
-        "node": ">=8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest-cli/node_modules/supports-color": {
-      "version": "7.2.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/multiformats": {
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz",
+      "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/ipfs-http-client/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
       "dependencies": {
-        "has-flag": "^4.0.0"
-      },
+        "multiformats": "^12.0.1"
+      }
+    },
+    "node_modules/ipfs-http-client/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
       "engines": {
-        "node": ">=8"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest-config": {
-      "version": "27.5.1",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-http-client/node_modules/varint": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/varint/-/varint-6.0.0.tgz",
+      "integrity": "sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg=="
+    },
+    "node_modules/ipfs-utils": {
+      "version": "9.0.14",
+      "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-9.0.14.tgz",
+      "integrity": "sha512-zIaiEGX18QATxgaS0/EOQNoo33W0islREABAcxXE8n7y2MGAlB+hdsxXn4J0hGZge8IqVQhW8sWIb+oJz2yEvg==",
       "dependencies": {
-        "@babel/core": "^7.8.0",
-        "@jest/test-sequencer": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "babel-jest": "^27.5.1",
-        "chalk": "^4.0.0",
-        "ci-info": "^3.2.0",
-        "deepmerge": "^4.2.2",
-        "glob": "^7.1.1",
-        "graceful-fs": "^4.2.9",
-        "jest-circus": "^27.5.1",
-        "jest-environment-jsdom": "^27.5.1",
-        "jest-environment-node": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "jest-jasmine2": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-runner": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-validate": "^27.5.1",
-        "micromatch": "^4.0.4",
-        "parse-json": "^5.2.0",
-        "pretty-format": "^27.5.1",
-        "slash": "^3.0.0",
-        "strip-json-comments": "^3.1.1"
+        "any-signal": "^3.0.0",
+        "browser-readablestream-to-it": "^1.0.0",
+        "buffer": "^6.0.1",
+        "electron-fetch": "^1.7.2",
+        "err-code": "^3.0.1",
+        "is-electron": "^2.2.0",
+        "iso-url": "^1.1.5",
+        "it-all": "^1.0.4",
+        "it-glob": "^1.0.1",
+        "it-to-stream": "^1.0.0",
+        "merge-options": "^3.0.4",
+        "nanoid": "^3.1.20",
+        "native-fetch": "^3.0.0",
+        "node-fetch": "^2.6.8",
+        "react-native-fetch-api": "^3.0.0",
+        "stream-to-it": "^0.2.2"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
-      },
-      "peerDependencies": {
-        "ts-node": ">=9.0.0"
-      },
-      "peerDependenciesMeta": {
-        "ts-node": {
-          "optional": true
-        }
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest-config/node_modules/ansi-styles": {
-      "version": "4.3.0",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/ipfs-utils/node_modules/browser-readablestream-to-it": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/browser-readablestream-to-it/-/browser-readablestream-to-it-1.0.3.tgz",
+      "integrity": "sha512-+12sHB+Br8HIh6VAMVEG5r3UXCyESIgDW7kzk3BjIXa43DVqVwL7GC5TW3jeh+72dtcH99pPVpw0X8i0jt+/kw=="
+    },
+    "node_modules/ipfs-utils/node_modules/it-all": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/it-all/-/it-all-1.0.6.tgz",
+      "integrity": "sha512-3cmCc6Heqe3uWi3CVM/k51fa/XbMFpQVzFoDsV0IZNHSQDyAXl3c4MjHkFX5kF3922OGj7Myv1nSEUgRtcuM1A=="
+    },
+    "node_modules/ipfs-utils/node_modules/it-glob": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/it-glob/-/it-glob-1.0.2.tgz",
+      "integrity": "sha512-Ch2Dzhw4URfB9L/0ZHyY+uqOnKvBNeS/SMcRiPmJfpHiM0TsUZn+GkpcZxAoF3dJVdPm/PuIk3A4wlV7SUo23Q==",
       "dependencies": {
-        "color-convert": "^2.0.1"
+        "@types/minimatch": "^3.0.4",
+        "minimatch": "^3.0.4"
+      }
+    },
+    "node_modules/ipfs-utils/node_modules/nanoid": {
+      "version": "3.3.7",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
+      "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/ai"
+        }
+      ],
+      "bin": {
+        "nanoid": "bin/nanoid.cjs"
       },
       "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
       }
     },
-    "node_modules/jest-config/node_modules/chalk": {
-      "version": "4.1.2",
+    "node_modules/is-arguments": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
+      "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
+        "call-bind": "^1.0.2",
+        "has-tostringtag": "^1.0.0"
       },
       "engines": {
-        "node": ">=10"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-config/node_modules/color-convert": {
-      "version": "2.0.1",
+    "node_modules/is-array-buffer": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
+      "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "color-name": "~1.1.4"
+        "call-bind": "^1.0.2",
+        "get-intrinsic": "^1.2.0",
+        "is-typed-array": "^1.1.10"
       },
-      "engines": {
-        "node": ">=7.0.0"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-config/node_modules/color-name": {
-      "version": "1.1.4",
+    "node_modules/is-arrayish": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+      "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/jest-config/node_modules/has-flag": {
-      "version": "4.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/jest-config/node_modules/supports-color": {
-      "version": "7.2.0",
+    "node_modules/is-bigint": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
+      "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "has-flag": "^4.0.0"
+        "has-bigints": "^1.0.1"
       },
-      "engines": {
-        "node": ">=8"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-diff": {
-      "version": "27.5.1",
+    "node_modules/is-boolean-object": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
+      "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "chalk": "^4.0.0",
-        "diff-sequences": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "pretty-format": "^27.5.1"
+        "call-bind": "^1.0.2",
+        "has-tostringtag": "^1.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-diff/node_modules/ansi-styles": {
-      "version": "4.3.0",
+    "node_modules/is-callable": {
+      "version": "1.2.7",
+      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
+      "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-convert": "^2.0.1"
-      },
       "engines": {
-        "node": ">=8"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-diff/node_modules/chalk": {
-      "version": "4.1.2",
+    "node_modules/is-ci": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
+      "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
+        "ci-info": "^3.2.0"
       },
-      "engines": {
-        "node": ">=10"
+      "bin": {
+        "is-ci": "bin.js"
+      }
+    },
+    "node_modules/is-core-module": {
+      "version": "2.10.0",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "has": "^1.0.3"
       },
       "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-diff/node_modules/color-convert": {
-      "version": "2.0.1",
+    "node_modules/is-date-object": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
+      "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "color-name": "~1.1.4"
+        "has-tostringtag": "^1.0.0"
       },
       "engines": {
-        "node": ">=7.0.0"
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-diff/node_modules/color-name": {
-      "version": "1.1.4",
+    "node_modules/is-docker": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
+      "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
       "dev": true,
-      "license": "MIT"
+      "bin": {
+        "is-docker": "cli.js"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "node_modules/jest-diff/node_modules/has-flag": {
-      "version": "4.0.0",
+    "node_modules/is-electron": {
+      "version": "2.2.2",
+      "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz",
+      "integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg=="
+    },
+    "node_modules/is-extglob": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+      "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
-        "node": ">=8"
+        "node": ">=0.10.0"
       }
     },
-    "node_modules/jest-diff/node_modules/supports-color": {
-      "version": "7.2.0",
+    "node_modules/is-fullwidth-code-point": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+      "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
       "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "has-flag": "^4.0.0"
-      },
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-docblock": {
-      "version": "27.5.1",
+    "node_modules/is-generator-fn": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz",
+      "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "detect-newline": "^3.0.0"
-      },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=6"
       }
     },
-    "node_modules/jest-each": {
-      "version": "27.5.1",
+    "node_modules/is-glob": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+      "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@jest/types": "^27.5.1",
-        "chalk": "^4.0.0",
-        "jest-get-type": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "pretty-format": "^27.5.1"
+        "is-extglob": "^2.1.1"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=0.10.0"
       }
     },
-    "node_modules/jest-each/node_modules/ansi-styles": {
-      "version": "4.3.0",
+    "node_modules/is-inside-container": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
+      "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "color-convert": "^2.0.1"
+        "is-docker": "^3.0.0"
+      },
+      "bin": {
+        "is-inside-container": "cli.js"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=14.16"
       },
       "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/jest-each/node_modules/chalk": {
-      "version": "4.1.2",
+    "node_modules/is-installed-globally": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz",
+      "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
+        "global-dirs": "^3.0.0",
+        "is-path-inside": "^3.0.2"
       },
       "engines": {
         "node": ">=10"
       },
       "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
-      }
-    },
-    "node_modules/jest-each/node_modules/color-convert": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-name": "~1.1.4"
-      },
-      "engines": {
-        "node": ">=7.0.0"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/jest-each/node_modules/color-name": {
-      "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/jest-each/node_modules/has-flag": {
-      "version": "4.0.0",
+    "node_modules/is-interactive": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
+      "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
-        "node": ">=8"
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/jest-each/node_modules/supports-color": {
-      "version": "7.2.0",
-      "dev": true,
+    "node_modules/is-ip": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-3.1.0.tgz",
+      "integrity": "sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q==",
       "license": "MIT",
       "dependencies": {
-        "has-flag": "^4.0.0"
+        "ip-regex": "^4.0.0"
       },
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-environment-jsdom": {
-      "version": "27.5.1",
-      "dev": true,
+    "node_modules/is-ipfs": {
+      "version": "0.6.3",
+      "resolved": "https://registry.npmjs.org/is-ipfs/-/is-ipfs-0.6.3.tgz",
+      "integrity": "sha512-HyRot1dvLcxImtDqPxAaY1miO6WsiP/z7Yxpg2qpaLWv5UdhAPtLvHJ4kMLM0w8GSl8AFsVF23PHe1LzuWrUlQ==",
       "license": "MIT",
       "dependencies": {
-        "@jest/environment": "^27.5.1",
-        "@jest/fake-timers": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "jest-mock": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jsdom": "^16.6.0"
-      },
-      "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "bs58": "^4.0.1",
+        "cids": "~0.7.0",
+        "mafmt": "^7.0.0",
+        "multiaddr": "^7.2.1",
+        "multibase": "~0.6.0",
+        "multihashes": "~0.4.13"
       }
     },
-    "node_modules/jest-environment-node": {
-      "version": "27.5.1",
+    "node_modules/is-map": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz",
+      "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@jest/environment": "^27.5.1",
-        "@jest/fake-timers": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "jest-mock": "^27.5.1",
-        "jest-util": "^27.5.1"
-      },
-      "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-get-type": {
-      "version": "27.5.1",
+    "node_modules/is-negative-zero": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",
+      "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==",
       "dev": true,
-      "license": "MIT",
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-haste-map": {
-      "version": "27.5.1",
+    "node_modules/is-npm": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz",
+      "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@jest/types": "^27.5.1",
-        "@types/graceful-fs": "^4.1.2",
-        "@types/node": "*",
-        "anymatch": "^3.0.3",
-        "fb-watchman": "^2.0.0",
-        "graceful-fs": "^4.2.9",
-        "jest-regex-util": "^27.5.1",
-        "jest-serializer": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-worker": "^27.5.1",
-        "micromatch": "^4.0.4",
-        "walker": "^1.0.7"
-      },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
       },
-      "optionalDependencies": {
-        "fsevents": "^2.3.2"
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/jest-jasmine2": {
-      "version": "27.5.1",
+    "node_modules/is-number": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+      "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
       "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "@jest/environment": "^27.5.1",
-        "@jest/source-map": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "chalk": "^4.0.0",
-        "co": "^4.6.0",
-        "expect": "^27.5.1",
-        "is-generator-fn": "^2.0.0",
-        "jest-each": "^27.5.1",
-        "jest-matcher-utils": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-runtime": "^27.5.1",
-        "jest-snapshot": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "pretty-format": "^27.5.1",
-        "throat": "^6.0.1"
-      },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=0.12.0"
       }
     },
-    "node_modules/jest-jasmine2/node_modules/ansi-styles": {
-      "version": "4.3.0",
+    "node_modules/is-number-object": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz",
+      "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "color-convert": "^2.0.1"
+        "has-tostringtag": "^1.0.0"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-jasmine2/node_modules/chalk": {
-      "version": "4.1.2",
+    "node_modules/is-obj": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
+      "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
-      },
       "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "node": ">=8"
       }
     },
-    "node_modules/jest-jasmine2/node_modules/color-convert": {
-      "version": "2.0.1",
+    "node_modules/is-path-inside": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
+      "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-name": "~1.1.4"
-      },
       "engines": {
-        "node": ">=7.0.0"
+        "node": ">=8"
       }
     },
-    "node_modules/jest-jasmine2/node_modules/color-name": {
-      "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/jest-jasmine2/node_modules/has-flag": {
-      "version": "4.0.0",
-      "dev": true,
+    "node_modules/is-plain-obj": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
+      "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==",
       "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-jasmine2/node_modules/supports-color": {
-      "version": "7.2.0",
+    "node_modules/is-plain-object": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
+      "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "has-flag": "^4.0.0"
-      },
       "engines": {
-        "node": ">=8"
+        "node": ">=0.10.0"
       }
     },
-    "node_modules/jest-leak-detector": {
-      "version": "27.5.1",
+    "node_modules/is-regex": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
+      "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "jest-get-type": "^27.5.1",
-        "pretty-format": "^27.5.1"
+        "call-bind": "^1.0.2",
+        "has-tostringtag": "^1.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-matcher-utils": {
-      "version": "27.5.1",
+    "node_modules/is-set": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
+      "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==",
+      "dev": true,
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/is-shared-array-buffer": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz",
+      "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "chalk": "^4.0.0",
-        "jest-diff": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "pretty-format": "^27.5.1"
+        "call-bind": "^1.0.2"
       },
-      "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-matcher-utils/node_modules/ansi-styles": {
-      "version": "4.3.0",
+    "node_modules/is-ssh": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz",
+      "integrity": "sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==",
+      "dev": true,
+      "dependencies": {
+        "protocols": "^2.0.1"
+      }
+    },
+    "node_modules/is-stream": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
+      "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
       "dev": true,
       "license": "MIT",
+      "engines": {
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/is-string": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
+      "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
+      "dev": true,
       "dependencies": {
-        "color-convert": "^2.0.1"
+        "has-tostringtag": "^1.0.0"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-matcher-utils/node_modules/chalk": {
-      "version": "4.1.2",
+    "node_modules/is-symbol": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
+      "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
+        "has-symbols": "^1.0.2"
       },
       "engines": {
-        "node": ">=10"
+        "node": ">= 0.4"
       },
       "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-matcher-utils/node_modules/color-convert": {
-      "version": "2.0.1",
+    "node_modules/is-typed-array": {
+      "version": "1.1.12",
+      "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz",
+      "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "color-name": "~1.1.4"
+        "which-typed-array": "^1.1.11"
       },
       "engines": {
-        "node": ">=7.0.0"
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-matcher-utils/node_modules/color-name": {
-      "version": "1.1.4",
+    "node_modules/is-typedarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
+      "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
       "dev": true,
       "license": "MIT"
     },
-    "node_modules/jest-matcher-utils/node_modules/has-flag": {
-      "version": "4.0.0",
+    "node_modules/is-unicode-supported": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
+      "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
-        "node": ">=8"
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/jest-matcher-utils/node_modules/supports-color": {
-      "version": "7.2.0",
+    "node_modules/is-weakref": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
+      "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "has-flag": "^4.0.0"
+        "call-bind": "^1.0.2"
       },
-      "engines": {
-        "node": ">=8"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/jest-message-util": {
-      "version": "27.5.1",
+    "node_modules/is-wsl": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
+      "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@babel/code-frame": "^7.12.13",
-        "@jest/types": "^27.5.1",
-        "@types/stack-utils": "^2.0.0",
-        "chalk": "^4.0.0",
-        "graceful-fs": "^4.2.9",
-        "micromatch": "^4.0.4",
-        "pretty-format": "^27.5.1",
-        "slash": "^3.0.0",
-        "stack-utils": "^2.0.3"
+        "is-docker": "^2.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=8"
       }
     },
-    "node_modules/jest-message-util/node_modules/ansi-styles": {
-      "version": "4.3.0",
+    "node_modules/is-wsl/node_modules/is-docker": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+      "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
       "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-convert": "^2.0.1"
+      "bin": {
+        "is-docker": "cli.js"
       },
       "engines": {
         "node": ">=8"
       },
       "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/jest-message-util/node_modules/chalk": {
-      "version": "4.1.2",
+    "node_modules/is-yarn-global": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.1.tgz",
+      "integrity": "sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==",
+      "dev": true,
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/isarray": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+      "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+      "dev": true
+    },
+    "node_modules/isexe": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+      "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
       "dev": true,
+      "license": "ISC"
+    },
+    "node_modules/iso-random-stream": {
+      "version": "2.0.0",
       "license": "MIT",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
+        "events": "^3.3.0",
+        "readable-stream": "^3.4.0"
       },
       "engines": {
         "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/jest-message-util/node_modules/color-convert": {
-      "version": "2.0.1",
+    "node_modules/iso-url": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/iso-url/-/iso-url-1.2.1.tgz",
+      "integrity": "sha512-9JPDgCN4B7QPkLtYAAOrEuAWvP9rWvR5offAr0/SeF046wIkglqH3VXgYYP6NcsKslH80UIVgmPqNe3j7tG2ng==",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/issue-parser": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/issue-parser/-/issue-parser-6.0.0.tgz",
+      "integrity": "sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "color-name": "~1.1.4"
+        "lodash.capitalize": "^4.2.1",
+        "lodash.escaperegexp": "^4.1.2",
+        "lodash.isplainobject": "^4.0.6",
+        "lodash.isstring": "^4.0.1",
+        "lodash.uniqby": "^4.7.0"
       },
       "engines": {
-        "node": ">=7.0.0"
+        "node": ">=10.13"
       }
     },
-    "node_modules/jest-message-util/node_modules/color-name": {
-      "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/jest-message-util/node_modules/has-flag": {
-      "version": "4.0.0",
+    "node_modules/istanbul-lib-coverage": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",
+      "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-message-util/node_modules/supports-color": {
-      "version": "7.2.0",
+    "node_modules/istanbul-lib-instrument": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz",
+      "integrity": "sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "has-flag": "^4.0.0"
+        "@babel/core": "^7.12.3",
+        "@babel/parser": "^7.14.7",
+        "@istanbuljs/schema": "^0.1.2",
+        "istanbul-lib-coverage": "^3.2.0",
+        "semver": "^7.5.4"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=10"
       }
     },
-    "node_modules/jest-mock": {
-      "version": "27.5.1",
+    "node_modules/istanbul-lib-instrument/node_modules/semver": {
+      "version": "7.5.4",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+      "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/types": "^27.5.1",
-        "@types/node": "*"
+        "lru-cache": "^6.0.0"
+      },
+      "bin": {
+        "semver": "bin/semver.js"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=10"
       }
     },
-    "node_modules/jest-pnp-resolver": {
-      "version": "1.2.2",
+    "node_modules/istanbul-lib-report": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz",
+      "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==",
       "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=6"
-      },
-      "peerDependencies": {
-        "jest-resolve": "*"
+      "dependencies": {
+        "istanbul-lib-coverage": "^3.0.0",
+        "make-dir": "^4.0.0",
+        "supports-color": "^7.1.0"
       },
-      "peerDependenciesMeta": {
-        "jest-resolve": {
-          "optional": true
-        }
+      "engines": {
+        "node": ">=10"
       }
     },
-    "node_modules/jest-regex-util": {
-      "version": "27.5.1",
+    "node_modules/istanbul-lib-report/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=8"
       }
     },
-    "node_modules/jest-resolve": {
-      "version": "27.5.1",
+    "node_modules/istanbul-lib-report/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/types": "^27.5.1",
-        "chalk": "^4.0.0",
-        "graceful-fs": "^4.2.9",
-        "jest-haste-map": "^27.5.1",
-        "jest-pnp-resolver": "^1.2.2",
-        "jest-util": "^27.5.1",
-        "jest-validate": "^27.5.1",
-        "resolve": "^1.20.0",
-        "resolve.exports": "^1.1.0",
-        "slash": "^3.0.0"
+        "has-flag": "^4.0.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=8"
       }
     },
-    "node_modules/jest-resolve-dependencies": {
-      "version": "27.5.1",
+    "node_modules/istanbul-lib-source-maps": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz",
+      "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/types": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-snapshot": "^27.5.1"
+        "debug": "^4.1.1",
+        "istanbul-lib-coverage": "^3.0.0",
+        "source-map": "^0.6.1"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": ">=10"
       }
     },
-    "node_modules/jest-resolve/node_modules/ansi-styles": {
-      "version": "4.3.0",
+    "node_modules/istanbul-reports": {
+      "version": "3.1.6",
+      "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz",
+      "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "color-convert": "^2.0.1"
+        "html-escaper": "^2.0.0",
+        "istanbul-lib-report": "^3.0.0"
       },
       "engines": {
         "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/jest-resolve/node_modules/chalk": {
-      "version": "4.1.2",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/it-all": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/it-all/-/it-all-2.0.1.tgz",
+      "integrity": "sha512-9UuJcCRZsboz+HBQTNOau80Dw+ryGaHYFP/cPYzFBJBFcfDathMYnhHk4t52en9+fcyDGPTdLB+lFc1wzQIroA==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/it-drain": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/it-drain/-/it-drain-3.0.5.tgz",
+      "integrity": "sha512-qYFe4SWdvs9oJGUY5bSjvmiLUMLzFEODNOQUdYdCIkuIgQF+AUB2INhM4yQ09buJ2rhHKDFxvTD/+yUq6qg0XA=="
+    },
+    "node_modules/it-first": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/it-first/-/it-first-2.0.1.tgz",
+      "integrity": "sha512-noC1oEQcWZZMUwq7VWxHNLML43dM+5bviZpfmkxkXlvBe60z7AFRqpZSga9uQBo792jKv9otnn1IjA4zwgNARw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/it-foreach": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/it-foreach/-/it-foreach-2.0.6.tgz",
+      "integrity": "sha512-OVosBHJsdXpAyeFlCbe3IGZia+65UykyAznakNsKXK+b99dbhuu/mOnXxTadDEo1GWhKx+WA8RNanKkMf07zQw==",
       "dependencies": {
-        "ansi-styles": "^4.1.0",
-        "supports-color": "^7.1.0"
+        "it-peekable": "^3.0.0"
+      }
+    },
+    "node_modules/it-foreach/node_modules/it-peekable": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-3.0.3.tgz",
+      "integrity": "sha512-Wx21JX/rMzTEl9flx3DGHuPV1KQFGOl8uoKfQtmZHgPQtGb89eQ6RyVd82h3HuP9Ghpt0WgBDlmmdWeHXqyx7w=="
+    },
+    "node_modules/it-last": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/it-last/-/it-last-3.0.4.tgz",
+      "integrity": "sha512-Ns+KTsQWhs0KCvfv5X3Ck3lpoYxHcp4zUp4d+AOdmC8cXXqDuoZqAjfWhgCbxJubXyIYWdfE2nRcfWqgvZHP8Q=="
+    },
+    "node_modules/it-length-prefixed": {
+      "version": "9.0.3",
+      "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-9.0.3.tgz",
+      "integrity": "sha512-YAu424ceYpXctxtjcLOqn7vJq082CaoP8J646ZusYISfQc3bpzQErgTUqMFj81V262KG2W9/YMBHsy6A/4yvmg==",
+      "dependencies": {
+        "err-code": "^3.0.1",
+        "it-reader": "^6.0.1",
+        "it-stream-types": "^2.0.1",
+        "uint8-varint": "^2.0.1",
+        "uint8arraylist": "^2.0.0",
+        "uint8arrays": "^4.0.2"
       },
       "engines": {
-        "node": ">=10"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/it-length-prefixed/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/it-length-prefixed/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
+      "dependencies": {
+        "multiformats": "^12.0.1"
+      }
+    },
+    "node_modules/it-map": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/it-map/-/it-map-2.0.1.tgz",
+      "integrity": "sha512-a2GcYDHiAh/eSU628xlvB56LA98luXZnniH2GlD0IdBzf15shEq9rBeb0Rg3o1SWtNILUAwqmQxEXcewGCdvmQ==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/it-merge": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/it-merge/-/it-merge-3.0.3.tgz",
+      "integrity": "sha512-FYVU15KC5pb/GQX1Ims+lee8d4pdqGVCpWr0lkNj8o4xuNo7jY71k6GuEiWdP+T7W1bJqewSxX5yoTy5yZpRVA==",
+      "dependencies": {
+        "it-pushable": "^3.2.0"
+      }
+    },
+    "node_modules/it-parallel": {
+      "version": "3.0.6",
+      "resolved": "https://registry.npmjs.org/it-parallel/-/it-parallel-3.0.6.tgz",
+      "integrity": "sha512-i7UM7I9LTkDJw3YIqXHFAPZX6CWYzGc+X3irdNrVExI4vPazrJdI7t5OqrSVN8CONXLAunCiqaSV/zZRbQR56A==",
+      "dependencies": {
+        "p-defer": "^4.0.0"
+      }
+    },
+    "node_modules/it-parallel/node_modules/p-defer": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-4.0.0.tgz",
+      "integrity": "sha512-Vb3QRvQ0Y5XnF40ZUWW7JfLogicVh/EnA5gBIvKDJoYpeI82+1E3AlB9yOcKFS0AhHrWVnAQO39fbR0G99IVEQ==",
+      "engines": {
+        "node": ">=12"
       },
       "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/jest-resolve/node_modules/color-convert": {
+    "node_modules/it-peekable": {
       "version": "2.0.1",
-      "dev": true,
-      "license": "MIT",
+      "resolved": "https://registry.npmjs.org/it-peekable/-/it-peekable-2.0.1.tgz",
+      "integrity": "sha512-fJ/YTU9rHRhGJOM2hhQKKEfRM6uKB9r4yGGFLBHqp72ACC8Yi6+7/FhuBAMG8cpN6mLoj9auVX7ZJ3ul6qFpTA==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/it-pushable": {
+      "version": "3.2.3",
+      "resolved": "https://registry.npmjs.org/it-pushable/-/it-pushable-3.2.3.tgz",
+      "integrity": "sha512-gzYnXYK8Y5t5b/BnJUr7glfQLO4U5vyb05gPx/TyTw+4Bv1zM9gFk4YsOrnulWefMewlphCjKkakFvj1y99Tcg==",
       "dependencies": {
-        "color-name": "~1.1.4"
+        "p-defer": "^4.0.0"
+      }
+    },
+    "node_modules/it-pushable/node_modules/p-defer": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-4.0.0.tgz",
+      "integrity": "sha512-Vb3QRvQ0Y5XnF40ZUWW7JfLogicVh/EnA5gBIvKDJoYpeI82+1E3AlB9yOcKFS0AhHrWVnAQO39fbR0G99IVEQ==",
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/it-reader": {
+      "version": "6.0.4",
+      "resolved": "https://registry.npmjs.org/it-reader/-/it-reader-6.0.4.tgz",
+      "integrity": "sha512-XCWifEcNFFjjBHtor4Sfaj8rcpt+FkY0L6WdhD578SCDhV4VUm7fCkF3dv5a+fTcfQqvN9BsxBTvWbYO6iCjTg==",
+      "dependencies": {
+        "it-stream-types": "^2.0.1",
+        "uint8arraylist": "^2.0.0"
       },
       "engines": {
-        "node": ">=7.0.0"
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
       }
     },
-    "node_modules/jest-resolve/node_modules/color-name": {
-      "version": "1.1.4",
+    "node_modules/it-stream-types": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.1.tgz",
+      "integrity": "sha512-6DmOs5r7ERDbvS4q8yLKENcj6Yecr7QQTqWApbZdfAUTEC947d+PEha7PCqhm//9oxaLYL7TWRekwhoXl2s6fg==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/it-to-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/it-to-stream/-/it-to-stream-1.0.0.tgz",
+      "integrity": "sha512-pLULMZMAB/+vbdvbZtebC0nWBTbG581lk6w8P7DfIIIKUfa8FbY7Oi0FxZcFPbxvISs7A9E+cMpLDBc1XhpAOA==",
+      "dependencies": {
+        "buffer": "^6.0.3",
+        "fast-fifo": "^1.0.0",
+        "get-iterator": "^1.0.2",
+        "p-defer": "^3.0.0",
+        "p-fifo": "^1.0.0",
+        "readable-stream": "^3.6.0"
+      }
+    },
+    "node_modules/iterate-iterator": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.2.tgz",
+      "integrity": "sha512-t91HubM4ZDQ70M9wqp+pcNpu8OyJ9UAtXntT/Bcsvp5tZMnz9vRa+IunKXeI8AnfZMTv0jNuVEmGeLSMjVvfPw==",
       "dev": true,
-      "license": "MIT"
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
     },
-    "node_modules/jest-resolve/node_modules/has-flag": {
-      "version": "4.0.0",
+    "node_modules/iterate-value": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz",
+      "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==",
       "dev": true,
-      "license": "MIT",
+      "dependencies": {
+        "es-get-iterator": "^1.0.2",
+        "iterate-iterator": "^1.0.1"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/jest": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz",
+      "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==",
+      "dev": true,
+      "dependencies": {
+        "@jest/core": "^29.7.0",
+        "@jest/types": "^29.6.3",
+        "import-local": "^3.0.2",
+        "jest-cli": "^29.7.0"
+      },
+      "bin": {
+        "jest": "bin/jest.js"
+      },
       "engines": {
-        "node": ">=8"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      },
+      "peerDependencies": {
+        "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
+      },
+      "peerDependenciesMeta": {
+        "node-notifier": {
+          "optional": true
+        }
       }
     },
-    "node_modules/jest-resolve/node_modules/supports-color": {
-      "version": "7.2.0",
+    "node_modules/jest-changed-files": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz",
+      "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "has-flag": "^4.0.0"
+        "execa": "^5.0.0",
+        "jest-util": "^29.7.0",
+        "p-limit": "^3.1.0"
       },
       "engines": {
-        "node": ">=8"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/jest-runner": {
-      "version": "27.5.1",
+    "node_modules/jest-circus": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz",
+      "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/console": "^27.5.1",
-        "@jest/environment": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
+        "@jest/environment": "^29.7.0",
+        "@jest/expect": "^29.7.0",
+        "@jest/test-result": "^29.7.0",
+        "@jest/types": "^29.6.3",
         "@types/node": "*",
         "chalk": "^4.0.0",
-        "emittery": "^0.8.1",
-        "graceful-fs": "^4.2.9",
-        "jest-docblock": "^27.5.1",
-        "jest-environment-jsdom": "^27.5.1",
-        "jest-environment-node": "^27.5.1",
-        "jest-haste-map": "^27.5.1",
-        "jest-leak-detector": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-runtime": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-worker": "^27.5.1",
-        "source-map-support": "^0.5.6",
-        "throat": "^6.0.1"
+        "co": "^4.6.0",
+        "dedent": "^1.0.0",
+        "is-generator-fn": "^2.0.0",
+        "jest-each": "^29.7.0",
+        "jest-matcher-utils": "^29.7.0",
+        "jest-message-util": "^29.7.0",
+        "jest-runtime": "^29.7.0",
+        "jest-snapshot": "^29.7.0",
+        "jest-util": "^29.7.0",
+        "p-limit": "^3.1.0",
+        "pretty-format": "^29.7.0",
+        "pure-rand": "^6.0.0",
+        "slash": "^3.0.0",
+        "stack-utils": "^2.0.3"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/jest-runner/node_modules/ansi-styles": {
+    "node_modules/jest-circus/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -8436,10 +10093,11 @@
         "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/jest-runner/node_modules/chalk": {
+    "node_modules/jest-circus/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -8451,10 +10109,11 @@
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/jest-runner/node_modules/color-convert": {
+    "node_modules/jest-circus/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -8462,23 +10121,26 @@
         "node": ">=7.0.0"
       }
     },
-    "node_modules/jest-runner/node_modules/color-name": {
+    "node_modules/jest-circus/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
-    "node_modules/jest-runner/node_modules/has-flag": {
+    "node_modules/jest-circus/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-runner/node_modules/supports-color": {
+    "node_modules/jest-circus/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -8486,42 +10148,44 @@
         "node": ">=8"
       }
     },
-    "node_modules/jest-runtime": {
-      "version": "27.5.1",
+    "node_modules/jest-cli": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz",
+      "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/environment": "^27.5.1",
-        "@jest/fake-timers": "^27.5.1",
-        "@jest/globals": "^27.5.1",
-        "@jest/source-map": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
+        "@jest/core": "^29.7.0",
+        "@jest/test-result": "^29.7.0",
+        "@jest/types": "^29.6.3",
         "chalk": "^4.0.0",
-        "cjs-module-lexer": "^1.0.0",
-        "collect-v8-coverage": "^1.0.0",
-        "execa": "^5.0.0",
-        "glob": "^7.1.3",
-        "graceful-fs": "^4.2.9",
-        "jest-haste-map": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-mock": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-snapshot": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "slash": "^3.0.0",
-        "strip-bom": "^4.0.0"
+        "create-jest": "^29.7.0",
+        "exit": "^0.1.2",
+        "import-local": "^3.0.2",
+        "jest-config": "^29.7.0",
+        "jest-util": "^29.7.0",
+        "jest-validate": "^29.7.0",
+        "yargs": "^17.3.1"
+      },
+      "bin": {
+        "jest": "bin/jest.js"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      },
+      "peerDependencies": {
+        "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
+      },
+      "peerDependenciesMeta": {
+        "node-notifier": {
+          "optional": true
+        }
       }
     },
-    "node_modules/jest-runtime/node_modules/ansi-styles": {
+    "node_modules/jest-cli/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -8532,10 +10196,11 @@
         "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/jest-runtime/node_modules/chalk": {
+    "node_modules/jest-cli/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -8547,10 +10212,11 @@
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/jest-runtime/node_modules/color-convert": {
+    "node_modules/jest-cli/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -8558,23 +10224,26 @@
         "node": ">=7.0.0"
       }
     },
-    "node_modules/jest-runtime/node_modules/color-name": {
+    "node_modules/jest-cli/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
-    "node_modules/jest-runtime/node_modules/has-flag": {
+    "node_modules/jest-cli/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-runtime/node_modules/supports-color": {
+    "node_modules/jest-cli/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -8582,54 +10251,56 @@
         "node": ">=8"
       }
     },
-    "node_modules/jest-serializer": {
-      "version": "27.5.1",
+    "node_modules/jest-config": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz",
+      "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@types/node": "*",
-        "graceful-fs": "^4.2.9"
+        "@babel/core": "^7.11.6",
+        "@jest/test-sequencer": "^29.7.0",
+        "@jest/types": "^29.6.3",
+        "babel-jest": "^29.7.0",
+        "chalk": "^4.0.0",
+        "ci-info": "^3.2.0",
+        "deepmerge": "^4.2.2",
+        "glob": "^7.1.3",
+        "graceful-fs": "^4.2.9",
+        "jest-circus": "^29.7.0",
+        "jest-environment-node": "^29.7.0",
+        "jest-get-type": "^29.6.3",
+        "jest-regex-util": "^29.6.3",
+        "jest-resolve": "^29.7.0",
+        "jest-runner": "^29.7.0",
+        "jest-util": "^29.7.0",
+        "jest-validate": "^29.7.0",
+        "micromatch": "^4.0.4",
+        "parse-json": "^5.2.0",
+        "pretty-format": "^29.7.0",
+        "slash": "^3.0.0",
+        "strip-json-comments": "^3.1.1"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
-      }
-    },
-    "node_modules/jest-snapshot": {
-      "version": "27.5.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@babel/core": "^7.7.2",
-        "@babel/generator": "^7.7.2",
-        "@babel/plugin-syntax-typescript": "^7.7.2",
-        "@babel/traverse": "^7.7.2",
-        "@babel/types": "^7.0.0",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/babel__traverse": "^7.0.4",
-        "@types/prettier": "^2.1.5",
-        "babel-preset-current-node-syntax": "^1.0.0",
-        "chalk": "^4.0.0",
-        "expect": "^27.5.1",
-        "graceful-fs": "^4.2.9",
-        "jest-diff": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "jest-haste-map": "^27.5.1",
-        "jest-matcher-utils": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "natural-compare": "^1.4.0",
-        "pretty-format": "^27.5.1",
-        "semver": "^7.3.2"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       },
-      "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+      "peerDependencies": {
+        "@types/node": "*",
+        "ts-node": ">=9.0.0"
+      },
+      "peerDependenciesMeta": {
+        "@types/node": {
+          "optional": true
+        },
+        "ts-node": {
+          "optional": true
+        }
       }
     },
-    "node_modules/jest-snapshot/node_modules/ansi-styles": {
+    "node_modules/jest-config/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -8640,10 +10311,11 @@
         "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/jest-snapshot/node_modules/chalk": {
+    "node_modules/jest-config/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -8655,10 +10327,11 @@
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/jest-snapshot/node_modules/color-convert": {
+    "node_modules/jest-config/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -8666,23 +10339,26 @@
         "node": ">=7.0.0"
       }
     },
-    "node_modules/jest-snapshot/node_modules/color-name": {
+    "node_modules/jest-config/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
-    "node_modules/jest-snapshot/node_modules/has-flag": {
+    "node_modules/jest-config/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-snapshot/node_modules/supports-color": {
+    "node_modules/jest-config/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -8690,26 +10366,26 @@
         "node": ">=8"
       }
     },
-    "node_modules/jest-util": {
-      "version": "27.5.1",
+    "node_modules/jest-diff": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz",
+      "integrity": "sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
         "chalk": "^4.0.0",
-        "ci-info": "^3.2.0",
-        "graceful-fs": "^4.2.9",
-        "picomatch": "^2.2.3"
+        "diff-sequences": "^29.6.3",
+        "jest-get-type": "^29.6.3",
+        "pretty-format": "^29.7.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/jest-util/node_modules/ansi-styles": {
+    "node_modules/jest-diff/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -8720,10 +10396,11 @@
         "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/jest-util/node_modules/chalk": {
+    "node_modules/jest-diff/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -8735,10 +10412,11 @@
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/jest-util/node_modules/color-convert": {
+    "node_modules/jest-diff/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -8746,23 +10424,26 @@
         "node": ">=7.0.0"
       }
     },
-    "node_modules/jest-util/node_modules/color-name": {
+    "node_modules/jest-diff/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
-    "node_modules/jest-util/node_modules/has-flag": {
+    "node_modules/jest-diff/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-util/node_modules/supports-color": {
+    "node_modules/jest-diff/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -8770,26 +10451,39 @@
         "node": ">=8"
       }
     },
-    "node_modules/jest-validate": {
-      "version": "27.5.1",
+    "node_modules/jest-docblock": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz",
+      "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/types": "^27.5.1",
-        "camelcase": "^6.2.0",
+        "detect-newline": "^3.0.0"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
+    "node_modules/jest-each": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz",
+      "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==",
+      "dev": true,
+      "dependencies": {
+        "@jest/types": "^29.6.3",
         "chalk": "^4.0.0",
-        "jest-get-type": "^27.5.1",
-        "leven": "^3.1.0",
-        "pretty-format": "^27.5.1"
+        "jest-get-type": "^29.6.3",
+        "jest-util": "^29.7.0",
+        "pretty-format": "^29.7.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/jest-validate/node_modules/ansi-styles": {
+    "node_modules/jest-each/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -8800,21 +10494,11 @@
         "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/jest-validate/node_modules/camelcase": {
-      "version": "6.3.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/jest-validate/node_modules/chalk": {
+    "node_modules/jest-each/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -8826,10 +10510,11 @@
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/jest-validate/node_modules/color-convert": {
+    "node_modules/jest-each/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -8837,23 +10522,26 @@
         "node": ">=7.0.0"
       }
     },
-    "node_modules/jest-validate/node_modules/color-name": {
+    "node_modules/jest-each/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
-    "node_modules/jest-validate/node_modules/has-flag": {
+    "node_modules/jest-each/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-validate/node_modules/supports-color": {
+    "node_modules/jest-each/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -8861,27 +10549,90 @@
         "node": ">=8"
       }
     },
-    "node_modules/jest-watcher": {
-      "version": "27.5.1",
+    "node_modules/jest-environment-node": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz",
+      "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@jest/test-result": "^27.5.1",
-        "@jest/types": "^27.5.1",
+        "@jest/environment": "^29.7.0",
+        "@jest/fake-timers": "^29.7.0",
+        "@jest/types": "^29.6.3",
         "@types/node": "*",
-        "ansi-escapes": "^4.2.1",
+        "jest-mock": "^29.7.0",
+        "jest-util": "^29.7.0"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
+    "node_modules/jest-get-type": {
+      "version": "29.6.3",
+      "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.6.3.tgz",
+      "integrity": "sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==",
+      "dev": true,
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
+    "node_modules/jest-haste-map": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz",
+      "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==",
+      "dev": true,
+      "dependencies": {
+        "@jest/types": "^29.6.3",
+        "@types/graceful-fs": "^4.1.3",
+        "@types/node": "*",
+        "anymatch": "^3.0.3",
+        "fb-watchman": "^2.0.0",
+        "graceful-fs": "^4.2.9",
+        "jest-regex-util": "^29.6.3",
+        "jest-util": "^29.7.0",
+        "jest-worker": "^29.7.0",
+        "micromatch": "^4.0.4",
+        "walker": "^1.0.8"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      },
+      "optionalDependencies": {
+        "fsevents": "^2.3.2"
+      }
+    },
+    "node_modules/jest-leak-detector": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz",
+      "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==",
+      "dev": true,
+      "dependencies": {
+        "jest-get-type": "^29.6.3",
+        "pretty-format": "^29.7.0"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
+    "node_modules/jest-matcher-utils": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz",
+      "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==",
+      "dev": true,
+      "dependencies": {
         "chalk": "^4.0.0",
-        "jest-util": "^27.5.1",
-        "string-length": "^4.0.1"
+        "jest-diff": "^29.7.0",
+        "jest-get-type": "^29.6.3",
+        "pretty-format": "^29.7.0"
       },
       "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/jest-watcher/node_modules/ansi-styles": {
+    "node_modules/jest-matcher-utils/node_modules/ansi-styles": {
       "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-convert": "^2.0.1"
       },
@@ -8892,10 +10643,11 @@
         "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/jest-watcher/node_modules/chalk": {
+    "node_modules/jest-matcher-utils/node_modules/chalk": {
       "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "ansi-styles": "^4.1.0",
         "supports-color": "^7.1.0"
@@ -8907,10 +10659,11 @@
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/jest-watcher/node_modules/color-convert": {
+    "node_modules/jest-matcher-utils/node_modules/color-convert": {
       "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "color-name": "~1.1.4"
       },
@@ -8918,23 +10671,26 @@
         "node": ">=7.0.0"
       }
     },
-    "node_modules/jest-watcher/node_modules/color-name": {
+    "node_modules/jest-matcher-utils/node_modules/color-name": {
       "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
-    "node_modules/jest-watcher/node_modules/has-flag": {
+    "node_modules/jest-matcher-utils/node_modules/has-flag": {
       "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "license": "MIT",
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/jest-watcher/node_modules/supports-color": {
+    "node_modules/jest-matcher-utils/node_modules/supports-color": {
       "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
         "has-flag": "^4.0.0"
       },
@@ -8942,10373 +10698,1949 @@
         "node": ">=8"
       }
     },
-    "node_modules/jest-worker": {
-      "version": "27.5.1",
+    "node_modules/jest-message-util": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz",
+      "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "@types/node": "*",
-        "merge-stream": "^2.0.0",
-        "supports-color": "^8.0.0"
+        "@babel/code-frame": "^7.12.13",
+        "@jest/types": "^29.6.3",
+        "@types/stack-utils": "^2.0.0",
+        "chalk": "^4.0.0",
+        "graceful-fs": "^4.2.9",
+        "micromatch": "^4.0.4",
+        "pretty-format": "^29.7.0",
+        "slash": "^3.0.0",
+        "stack-utils": "^2.0.3"
       },
       "engines": {
-        "node": ">= 10.13.0"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/jest-worker/node_modules/has-flag": {
-      "version": "4.0.0",
+    "node_modules/jest-message-util/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT",
+      "dependencies": {
+        "color-convert": "^2.0.1"
+      },
       "engines": {
         "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/jest-worker/node_modules/supports-color": {
-      "version": "8.1.1",
+    "node_modules/jest-message-util/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "has-flag": "^4.0.0"
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
       },
       "engines": {
         "node": ">=10"
       },
       "funding": {
-        "url": "https://github.com/chalk/supports-color?sponsor=1"
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/js-tokens": {
+    "node_modules/jest-message-util/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+      "dev": true,
+      "dependencies": {
+        "color-name": "~1.1.4"
+      },
+      "engines": {
+        "node": ">=7.0.0"
+      }
+    },
+    "node_modules/jest-message-util/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
+    },
+    "node_modules/jest-message-util/node_modules/has-flag": {
       "version": "4.0.0",
-      "license": "MIT"
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+      "dev": true,
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "node_modules/js-yaml": {
-      "version": "3.14.1",
+    "node_modules/jest-message-util/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "argparse": "^1.0.7",
-        "esprima": "^4.0.0"
+        "has-flag": "^4.0.0"
       },
-      "bin": {
-        "js-yaml": "bin/js-yaml.js"
+      "engines": {
+        "node": ">=8"
       }
     },
-    "node_modules/jsdom": {
-      "version": "16.7.0",
+    "node_modules/jest-mock": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz",
+      "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "abab": "^2.0.5",
-        "acorn": "^8.2.4",
-        "acorn-globals": "^6.0.0",
-        "cssom": "^0.4.4",
-        "cssstyle": "^2.3.0",
-        "data-urls": "^2.0.0",
-        "decimal.js": "^10.2.1",
-        "domexception": "^2.0.1",
-        "escodegen": "^2.0.0",
-        "form-data": "^3.0.0",
-        "html-encoding-sniffer": "^2.0.1",
-        "http-proxy-agent": "^4.0.1",
-        "https-proxy-agent": "^5.0.0",
-        "is-potential-custom-element-name": "^1.0.1",
-        "nwsapi": "^2.2.0",
-        "parse5": "6.0.1",
-        "saxes": "^5.0.1",
-        "symbol-tree": "^3.2.4",
-        "tough-cookie": "^4.0.0",
-        "w3c-hr-time": "^1.0.2",
-        "w3c-xmlserializer": "^2.0.0",
-        "webidl-conversions": "^6.1.0",
-        "whatwg-encoding": "^1.0.5",
-        "whatwg-mimetype": "^2.3.0",
-        "whatwg-url": "^8.5.0",
-        "ws": "^7.4.6",
-        "xml-name-validator": "^3.0.0"
+        "@jest/types": "^29.6.3",
+        "@types/node": "*",
+        "jest-util": "^29.7.0"
       },
       "engines": {
-        "node": ">=10"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
+    "node_modules/jest-pnp-resolver": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz",
+      "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==",
+      "dev": true,
+      "engines": {
+        "node": ">=6"
       },
       "peerDependencies": {
-        "canvas": "^2.5.0"
+        "jest-resolve": "*"
       },
       "peerDependenciesMeta": {
-        "canvas": {
+        "jest-resolve": {
           "optional": true
         }
       }
     },
-    "node_modules/jsdom/node_modules/form-data": {
-      "version": "3.0.1",
+    "node_modules/jest-regex-util": {
+      "version": "29.6.3",
+      "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz",
+      "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==",
+      "dev": true,
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
+    "node_modules/jest-resolve": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz",
+      "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "asynckit": "^0.4.0",
-        "combined-stream": "^1.0.8",
-        "mime-types": "^2.1.12"
+        "chalk": "^4.0.0",
+        "graceful-fs": "^4.2.9",
+        "jest-haste-map": "^29.7.0",
+        "jest-pnp-resolver": "^1.2.2",
+        "jest-util": "^29.7.0",
+        "jest-validate": "^29.7.0",
+        "resolve": "^1.20.0",
+        "resolve.exports": "^2.0.0",
+        "slash": "^3.0.0"
       },
       "engines": {
-        "node": ">= 6"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/jsesc": {
-      "version": "2.5.2",
+    "node_modules/jest-resolve-dependencies": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz",
+      "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==",
       "dev": true,
-      "license": "MIT",
-      "bin": {
-        "jsesc": "bin/jsesc"
+      "dependencies": {
+        "jest-regex-util": "^29.6.3",
+        "jest-snapshot": "^29.7.0"
       },
       "engines": {
-        "node": ">=4"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/json-buffer": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
-      "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
-      "dev": true
-    },
-    "node_modules/json-parse-even-better-errors": {
-      "version": "2.3.1",
-      "license": "MIT"
-    },
-    "node_modules/json-schema-traverse": {
-      "version": "0.4.1",
+    "node_modules/jest-resolve/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "license": "MIT"
+      "dependencies": {
+        "color-convert": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+      }
     },
-    "node_modules/json-stable-stringify-without-jsonify": {
-      "version": "1.0.1",
+    "node_modules/jest-resolve/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT"
+      "dependencies": {
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
+      }
     },
-    "node_modules/json5": {
-      "version": "2.2.3",
-      "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
-      "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+    "node_modules/jest-resolve/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "bin": {
-        "json5": "lib/cli.js"
+      "dependencies": {
+        "color-name": "~1.1.4"
       },
       "engines": {
-        "node": ">=6"
+        "node": ">=7.0.0"
       }
     },
-    "node_modules/jsonfile": {
+    "node_modules/jest-resolve/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
+    },
+    "node_modules/jest-resolve/node_modules/has-flag": {
       "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
-      "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "optionalDependencies": {
-        "graceful-fs": "^4.1.6"
+      "engines": {
+        "node": ">=8"
       }
     },
-    "node_modules/keyv": {
-      "version": "4.5.2",
-      "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz",
-      "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==",
+    "node_modules/jest-resolve/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
       "dependencies": {
-        "json-buffer": "3.0.1"
-      }
-    },
-    "node_modules/kind-of": {
-      "version": "6.0.3",
-      "license": "MIT",
+        "has-flag": "^4.0.0"
+      },
       "engines": {
-        "node": ">=0.10.0"
+        "node": ">=8"
       }
     },
-    "node_modules/kleur": {
-      "version": "3.0.3",
+    "node_modules/jest-runner": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz",
+      "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==",
       "dev": true,
-      "license": "MIT",
+      "dependencies": {
+        "@jest/console": "^29.7.0",
+        "@jest/environment": "^29.7.0",
+        "@jest/test-result": "^29.7.0",
+        "@jest/transform": "^29.7.0",
+        "@jest/types": "^29.6.3",
+        "@types/node": "*",
+        "chalk": "^4.0.0",
+        "emittery": "^0.13.1",
+        "graceful-fs": "^4.2.9",
+        "jest-docblock": "^29.7.0",
+        "jest-environment-node": "^29.7.0",
+        "jest-haste-map": "^29.7.0",
+        "jest-leak-detector": "^29.7.0",
+        "jest-message-util": "^29.7.0",
+        "jest-resolve": "^29.7.0",
+        "jest-runtime": "^29.7.0",
+        "jest-util": "^29.7.0",
+        "jest-watcher": "^29.7.0",
+        "jest-worker": "^29.7.0",
+        "p-limit": "^3.1.0",
+        "source-map-support": "0.5.13"
+      },
       "engines": {
-        "node": ">=6"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/latest-version": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz",
-      "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==",
+    "node_modules/jest-runner/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
       "dependencies": {
-        "package-json": "^8.1.0"
+        "color-convert": "^2.0.1"
       },
       "engines": {
-        "node": ">=14.16"
+        "node": ">=8"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/leven": {
-      "version": "3.1.0",
+    "node_modules/jest-runner/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "license": "MIT",
+      "dependencies": {
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
+      },
       "engines": {
-        "node": ">=6"
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/levn": {
-      "version": "0.3.0",
+    "node_modules/jest-runner/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "prelude-ls": "~1.1.2",
-        "type-check": "~0.3.2"
+        "color-name": "~1.1.4"
       },
       "engines": {
-        "node": ">= 0.8.0"
+        "node": ">=7.0.0"
       }
     },
-    "node_modules/libp2p-crypto": {
-      "version": "0.21.2",
-      "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.21.2.tgz",
-      "integrity": "sha512-EXFrhSpiHtJ+/L8xXDvQNK5VjUMG51u878jzZcaT5XhuN/zFg6PWJFnl/qB2Y2j7eMWnvCRP7Kp+ua2H36cG4g==",
-      "dependencies": {
-        "@noble/ed25519": "^1.5.1",
-        "@noble/secp256k1": "^1.3.0",
-        "err-code": "^3.0.1",
-        "iso-random-stream": "^2.0.0",
-        "multiformats": "^9.4.5",
-        "node-forge": "^1.2.1",
-        "protobufjs": "^6.11.2",
-        "uint8arrays": "^3.0.0"
-      },
+    "node_modules/jest-runner/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
+    },
+    "node_modules/jest-runner/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+      "dev": true,
       "engines": {
-        "node": ">=12.0.0"
+        "node": ">=8"
       }
     },
-    "node_modules/lines-and-columns": {
-      "version": "1.1.6",
-      "license": "MIT"
-    },
-    "node_modules/locate-path": {
-      "version": "5.0.0",
-      "license": "MIT",
+    "node_modules/jest-runner/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+      "dev": true,
       "dependencies": {
-        "p-locate": "^4.1.0"
+        "has-flag": "^4.0.0"
       },
       "engines": {
         "node": ">=8"
       }
     },
-    "node_modules/lodash": {
-      "version": "4.17.21",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/lodash.capitalize": {
-      "version": "4.2.1",
-      "resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz",
-      "integrity": "sha512-kZzYOKspf8XVX5AvmQF94gQW0lejFVgb80G85bU4ZWzoJ6C03PQg3coYAUpSTpQWelrZELd3XWgHzw4Ck5kaIw==",
-      "dev": true
-    },
-    "node_modules/lodash.escaperegexp": {
-      "version": "4.1.2",
-      "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz",
-      "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==",
-      "dev": true
-    },
-    "node_modules/lodash.isplainobject": {
-      "version": "4.0.6",
-      "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
-      "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
-      "dev": true
-    },
-    "node_modules/lodash.isstring": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
-      "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",
-      "dev": true
-    },
-    "node_modules/lodash.merge": {
-      "version": "4.6.2",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/lodash.uniqby": {
-      "version": "4.7.0",
-      "resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz",
-      "integrity": "sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==",
-      "dev": true
+    "node_modules/jest-runtime": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz",
+      "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==",
+      "dev": true,
+      "dependencies": {
+        "@jest/environment": "^29.7.0",
+        "@jest/fake-timers": "^29.7.0",
+        "@jest/globals": "^29.7.0",
+        "@jest/source-map": "^29.6.3",
+        "@jest/test-result": "^29.7.0",
+        "@jest/transform": "^29.7.0",
+        "@jest/types": "^29.6.3",
+        "@types/node": "*",
+        "chalk": "^4.0.0",
+        "cjs-module-lexer": "^1.0.0",
+        "collect-v8-coverage": "^1.0.0",
+        "glob": "^7.1.3",
+        "graceful-fs": "^4.2.9",
+        "jest-haste-map": "^29.7.0",
+        "jest-message-util": "^29.7.0",
+        "jest-mock": "^29.7.0",
+        "jest-regex-util": "^29.6.3",
+        "jest-resolve": "^29.7.0",
+        "jest-snapshot": "^29.7.0",
+        "jest-util": "^29.7.0",
+        "slash": "^3.0.0",
+        "strip-bom": "^4.0.0"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
     },
-    "node_modules/log-symbols": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz",
-      "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==",
+    "node_modules/jest-runtime/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
       "dependencies": {
-        "chalk": "^5.0.0",
-        "is-unicode-supported": "^1.1.0"
+        "color-convert": "^2.0.1"
       },
       "engines": {
-        "node": ">=12"
+        "node": ">=8"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/log-symbols/node_modules/chalk": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-      "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
+    "node_modules/jest-runtime/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
+      "dependencies": {
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
+      },
       "engines": {
-        "node": "^12.17.0 || ^14.13 || >=16.0.0"
+        "node": ">=10"
       },
       "funding": {
         "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/long": {
-      "version": "4.0.0",
-      "license": "Apache-2.0"
-    },
-    "node_modules/lowercase-keys": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
-      "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==",
+    "node_modules/jest-runtime/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/lru-cache": {
-      "version": "6.0.0",
-      "license": "ISC",
       "dependencies": {
-        "yallist": "^4.0.0"
+        "color-name": "~1.1.4"
       },
       "engines": {
-        "node": ">=10"
+        "node": ">=7.0.0"
       }
     },
-    "node_modules/macos-release": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-3.1.0.tgz",
-      "integrity": "sha512-/M/R0gCDgM+Cv1IuBG1XGdfTFnMEG6PZeT+KGWHO/OG+imqmaD9CH5vHBTycEM3+Kc4uG2Il+tFAuUWLqQOeUA==",
+    "node_modules/jest-runtime/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
+    },
+    "node_modules/jest-runtime/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
       "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/mafmt": {
-      "version": "7.1.0",
-      "license": "MIT",
-      "dependencies": {
-        "multiaddr": "^7.3.0"
+        "node": ">=8"
       }
     },
-    "node_modules/make-dir": {
-      "version": "3.0.2",
+    "node_modules/jest-runtime/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "semver": "^6.0.0"
+        "has-flag": "^4.0.0"
       },
       "engines": {
         "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/make-dir/node_modules/semver": {
-      "version": "6.3.0",
-      "dev": true,
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver.js"
       }
     },
-    "node_modules/makeerror": {
-      "version": "1.0.12",
+    "node_modules/jest-snapshot": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz",
+      "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==",
       "dev": true,
-      "license": "BSD-3-Clause",
       "dependencies": {
-        "tmpl": "1.0.5"
+        "@babel/core": "^7.11.6",
+        "@babel/generator": "^7.7.2",
+        "@babel/plugin-syntax-jsx": "^7.7.2",
+        "@babel/plugin-syntax-typescript": "^7.7.2",
+        "@babel/types": "^7.3.3",
+        "@jest/expect-utils": "^29.7.0",
+        "@jest/transform": "^29.7.0",
+        "@jest/types": "^29.6.3",
+        "babel-preset-current-node-syntax": "^1.0.0",
+        "chalk": "^4.0.0",
+        "expect": "^29.7.0",
+        "graceful-fs": "^4.2.9",
+        "jest-diff": "^29.7.0",
+        "jest-get-type": "^29.6.3",
+        "jest-matcher-utils": "^29.7.0",
+        "jest-message-util": "^29.7.0",
+        "jest-util": "^29.7.0",
+        "natural-compare": "^1.4.0",
+        "pretty-format": "^29.7.0",
+        "semver": "^7.5.3"
+      },
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/map-obj": {
+    "node_modules/jest-snapshot/node_modules/ansi-styles": {
       "version": "4.3.0",
-      "license": "MIT",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+      "dev": true,
+      "dependencies": {
+        "color-convert": "^2.0.1"
+      },
       "engines": {
         "node": ">=8"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/meow": {
-      "version": "9.0.0",
-      "license": "MIT",
+    "node_modules/jest-snapshot/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+      "dev": true,
       "dependencies": {
-        "@types/minimist": "^1.2.0",
-        "camelcase-keys": "^6.2.2",
-        "decamelize": "^1.2.0",
-        "decamelize-keys": "^1.1.0",
-        "hard-rejection": "^2.1.0",
-        "minimist-options": "4.1.0",
-        "normalize-package-data": "^3.0.0",
-        "read-pkg-up": "^7.0.1",
-        "redent": "^3.0.0",
-        "trim-newlines": "^3.0.0",
-        "type-fest": "^0.18.0",
-        "yargs-parser": "^20.2.3"
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
       },
       "engines": {
         "node": ">=10"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/meow/node_modules/type-fest": {
-      "version": "0.18.1",
-      "license": "(MIT OR CC0-1.0)",
-      "engines": {
-        "node": ">=10"
+    "node_modules/jest-snapshot/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+      "dev": true,
+      "dependencies": {
+        "color-name": "~1.1.4"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+      "engines": {
+        "node": ">=7.0.0"
       }
     },
-    "node_modules/merge-options": {
-      "version": "3.0.4",
-      "license": "MIT",
+    "node_modules/jest-snapshot/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
+    },
+    "node_modules/jest-snapshot/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+      "dev": true,
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/jest-snapshot/node_modules/semver": {
+      "version": "7.5.4",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+      "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+      "dev": true,
       "dependencies": {
-        "is-plain-obj": "^2.1.0"
+        "lru-cache": "^6.0.0"
+      },
+      "bin": {
+        "semver": "bin/semver.js"
       },
       "engines": {
         "node": ">=10"
       }
     },
-    "node_modules/merge-stream": {
-      "version": "2.0.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/merge2": {
-      "version": "1.4.1",
-      "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
-      "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+    "node_modules/jest-snapshot/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
+      "dependencies": {
+        "has-flag": "^4.0.0"
+      },
       "engines": {
-        "node": ">= 8"
+        "node": ">=8"
       }
     },
-    "node_modules/micromatch": {
-      "version": "4.0.5",
+    "node_modules/jest-util": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz",
+      "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==",
       "dev": true,
-      "license": "MIT",
       "dependencies": {
-        "braces": "^3.0.2",
-        "picomatch": "^2.3.1"
+        "@jest/types": "^29.6.3",
+        "@types/node": "*",
+        "chalk": "^4.0.0",
+        "ci-info": "^3.2.0",
+        "graceful-fs": "^4.2.9",
+        "picomatch": "^2.2.3"
       },
       "engines": {
-        "node": ">=8.6"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/mime-db": {
-      "version": "1.52.0",
-      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
-      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+    "node_modules/jest-util/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+      "dev": true,
+      "dependencies": {
+        "color-convert": "^2.0.1"
+      },
       "engines": {
-        "node": ">= 0.6"
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/mime-types": {
-      "version": "2.1.35",
-      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
-      "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
+    "node_modules/jest-util/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+      "dev": true,
       "dependencies": {
-        "mime-db": "1.52.0"
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
       },
       "engines": {
-        "node": ">= 0.6"
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/mimic-fn": {
-      "version": "2.1.0",
+    "node_modules/jest-util/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "license": "MIT",
+      "dependencies": {
+        "color-name": "~1.1.4"
+      },
       "engines": {
-        "node": ">=6"
+        "node": ">=7.0.0"
       }
     },
-    "node_modules/mimic-response": {
+    "node_modules/jest-util/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
+    },
+    "node_modules/jest-util/node_modules/has-flag": {
       "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz",
-      "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
       "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "node": ">=8"
       }
     },
-    "node_modules/min-indent": {
-      "version": "1.0.1",
-      "license": "MIT",
+    "node_modules/jest-util/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+      "dev": true,
+      "dependencies": {
+        "has-flag": "^4.0.0"
+      },
       "engines": {
-        "node": ">=4"
+        "node": ">=8"
       }
     },
-    "node_modules/minimatch": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
-      "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+    "node_modules/jest-validate": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz",
+      "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==",
+      "dev": true,
       "dependencies": {
-        "brace-expansion": "^1.1.7"
+        "@jest/types": "^29.6.3",
+        "camelcase": "^6.2.0",
+        "chalk": "^4.0.0",
+        "jest-get-type": "^29.6.3",
+        "leven": "^3.1.0",
+        "pretty-format": "^29.7.0"
       },
       "engines": {
-        "node": "*"
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "node_modules/minimist": {
-      "version": "1.2.6",
-      "license": "MIT"
-    },
-    "node_modules/minimist-options": {
-      "version": "4.1.0",
-      "license": "MIT",
+    "node_modules/jest-validate/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+      "dev": true,
       "dependencies": {
-        "arrify": "^1.0.1",
-        "is-plain-obj": "^1.1.0",
-        "kind-of": "^6.0.3"
+        "color-convert": "^2.0.1"
       },
       "engines": {
-        "node": ">= 6"
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "node_modules/minimist-options/node_modules/is-plain-obj": {
-      "version": "1.1.0",
-      "license": "MIT",
+    "node_modules/jest-validate/node_modules/camelcase": {
+      "version": "6.3.0",
+      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
+      "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
+      "dev": true,
       "engines": {
-        "node": ">=0.10.0"
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/move-file": {
-      "version": "2.1.0",
-      "license": "MIT",
+    "node_modules/jest-validate/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+      "dev": true,
       "dependencies": {
-        "path-exists": "^4.0.0"
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
       },
       "engines": {
-        "node": ">=10.17"
+        "node": ">=10"
       },
       "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "node_modules/ms": {
-      "version": "2.1.2",
-      "license": "MIT"
-    },
-    "node_modules/multiaddr": {
-      "version": "7.5.0",
-      "license": "MIT",
-      "dependencies": {
-        "buffer": "^5.5.0",
-        "cids": "~0.8.0",
-        "class-is": "^1.1.0",
-        "is-ip": "^3.1.0",
-        "multibase": "^0.7.0",
-        "varint": "^5.0.0"
-      }
-    },
-    "node_modules/multiaddr-to-uri": {
-      "version": "8.0.0",
-      "license": "MIT",
-      "dependencies": {
-        "multiaddr": "^10.0.0"
-      }
-    },
-    "node_modules/multiaddr-to-uri/node_modules/multiaddr": {
-      "version": "10.0.1",
-      "license": "MIT",
-      "dependencies": {
-        "dns-over-http-resolver": "^1.2.3",
-        "err-code": "^3.0.1",
-        "is-ip": "^3.1.0",
-        "multiformats": "^9.4.5",
-        "uint8arrays": "^3.0.0",
-        "varint": "^6.0.0"
-      }
-    },
-    "node_modules/multiaddr-to-uri/node_modules/varint": {
-      "version": "6.0.0",
-      "license": "MIT"
-    },
-    "node_modules/multiaddr/node_modules/buffer": {
-      "version": "5.7.1",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "base64-js": "^1.3.1",
-        "ieee754": "^1.1.13"
-      }
-    },
-    "node_modules/multiaddr/node_modules/cids": {
-      "version": "0.8.3",
-      "license": "MIT",
-      "dependencies": {
-        "buffer": "^5.6.0",
-        "class-is": "^1.1.0",
-        "multibase": "^1.0.0",
-        "multicodec": "^1.0.1",
-        "multihashes": "^1.0.1"
-      },
-      "engines": {
-        "node": ">=4.0.0",
-        "npm": ">=3.0.0"
-      }
-    },
-    "node_modules/multiaddr/node_modules/cids/node_modules/multibase": {
-      "version": "1.0.1",
-      "license": "MIT",
-      "dependencies": {
-        "base-x": "^3.0.8",
-        "buffer": "^5.5.0"
-      },
-      "engines": {
-        "node": ">=10.0.0",
-        "npm": ">=6.0.0"
-      }
-    },
-    "node_modules/multiaddr/node_modules/multibase": {
-      "version": "0.7.0",
-      "license": "MIT",
-      "dependencies": {
-        "base-x": "^3.0.8",
-        "buffer": "^5.5.0"
-      }
-    },
-    "node_modules/multiaddr/node_modules/multihashes": {
-      "version": "1.0.1",
-      "license": "MIT",
-      "dependencies": {
-        "buffer": "^5.6.0",
-        "multibase": "^1.0.1",
-        "varint": "^5.0.0"
-      },
-      "engines": {
-        "node": ">=10.0.0",
-        "npm": ">=6.0.0"
-      }
-    },
-    "node_modules/multiaddr/node_modules/multihashes/node_modules/multibase": {
-      "version": "1.0.1",
-      "license": "MIT",
-      "dependencies": {
-        "base-x": "^3.0.8",
-        "buffer": "^5.5.0"
-      },
-      "engines": {
-        "node": ">=10.0.0",
-        "npm": ">=6.0.0"
-      }
-    },
-    "node_modules/multibase": {
-      "version": "0.6.1",
-      "license": "MIT",
-      "dependencies": {
-        "base-x": "^3.0.8",
-        "buffer": "^5.5.0"
-      }
-    },
-    "node_modules/multibase/node_modules/buffer": {
-      "version": "5.7.1",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "base64-js": "^1.3.1",
-        "ieee754": "^1.1.13"
-      }
-    },
-    "node_modules/multicodec": {
-      "version": "1.0.4",
-      "license": "MIT",
-      "dependencies": {
-        "buffer": "^5.6.0",
-        "varint": "^5.0.0"
-      }
-    },
-    "node_modules/multicodec/node_modules/buffer": {
-      "version": "5.7.1",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "base64-js": "^1.3.1",
-        "ieee754": "^1.1.13"
-      }
-    },
-    "node_modules/multiformats": {
-      "version": "9.7.1",
-      "license": "(Apache-2.0 AND MIT)"
-    },
-    "node_modules/multihashes": {
-      "version": "0.4.21",
-      "license": "MIT",
-      "dependencies": {
-        "buffer": "^5.5.0",
-        "multibase": "^0.7.0",
-        "varint": "^5.0.0"
-      }
-    },
-    "node_modules/multihashes/node_modules/buffer": {
-      "version": "5.7.1",
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "base64-js": "^1.3.1",
-        "ieee754": "^1.1.13"
-      }
-    },
-    "node_modules/multihashes/node_modules/multibase": {
-      "version": "0.7.0",
-      "license": "MIT",
-      "dependencies": {
-        "base-x": "^3.0.8",
-        "buffer": "^5.5.0"
-      }
-    },
-    "node_modules/murmurhash3js-revisited": {
-      "version": "3.0.0",
-      "license": "MIT",
-      "engines": {
-        "node": ">=8.0.0"
-      }
-    },
-    "node_modules/mute-stream": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz",
-      "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==",
-      "dev": true,
-      "engines": {
-        "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
-      }
-    },
-    "node_modules/nanoid": {
-      "version": "3.3.2",
-      "license": "MIT",
-      "bin": {
-        "nanoid": "bin/nanoid.cjs"
-      },
-      "engines": {
-        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
-      }
-    },
-    "node_modules/native-abort-controller": {
-      "version": "1.0.4",
-      "license": "MIT",
-      "peerDependencies": {
-        "abort-controller": "*"
-      }
-    },
-    "node_modules/native-fetch": {
-      "version": "3.0.0",
-      "license": "MIT",
-      "peerDependencies": {
-        "node-fetch": "*"
-      }
-    },
-    "node_modules/natural-compare": {
-      "version": "1.4.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/netmask": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
-      "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==",
-      "dev": true,
-      "engines": {
-        "node": ">= 0.4.0"
-      }
-    },
-    "node_modules/new-github-release-url": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/new-github-release-url/-/new-github-release-url-2.0.0.tgz",
-      "integrity": "sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ==",
-      "dev": true,
-      "dependencies": {
-        "type-fest": "^2.5.1"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/new-github-release-url/node_modules/type-fest": {
-      "version": "2.19.0",
-      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
-      "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
-      "dev": true,
-      "engines": {
-        "node": ">=12.20"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/node-domexception": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
-      "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/jimmywarting"
-        },
-        {
-          "type": "github",
-          "url": "https://paypal.me/jimmywarting"
-        }
-      ],
-      "engines": {
-        "node": ">=10.5.0"
-      }
-    },
-    "node_modules/node-fetch": {
-      "version": "2.6.7",
-      "license": "MIT",
-      "dependencies": {
-        "whatwg-url": "^5.0.0"
-      },
-      "engines": {
-        "node": "4.x || >=6.0.0"
-      },
-      "peerDependencies": {
-        "encoding": "^0.1.0"
-      },
-      "peerDependenciesMeta": {
-        "encoding": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/node-fetch/node_modules/tr46": {
-      "version": "0.0.3",
-      "license": "MIT"
-    },
-    "node_modules/node-fetch/node_modules/webidl-conversions": {
-      "version": "3.0.1",
-      "license": "BSD-2-Clause"
-    },
-    "node_modules/node-fetch/node_modules/whatwg-url": {
-      "version": "5.0.0",
-      "license": "MIT",
-      "dependencies": {
-        "tr46": "~0.0.3",
-        "webidl-conversions": "^3.0.0"
-      }
-    },
-    "node_modules/node-forge": {
-      "version": "1.3.1",
-      "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
-      "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==",
-      "engines": {
-        "node": ">= 6.13.0"
-      }
-    },
-    "node_modules/node-int64": {
-      "version": "0.4.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/node-releases": {
-      "version": "2.0.6",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/normalize-package-data": {
-      "version": "3.0.3",
-      "license": "BSD-2-Clause",
-      "dependencies": {
-        "hosted-git-info": "^4.0.1",
-        "is-core-module": "^2.5.0",
-        "semver": "^7.3.4",
-        "validate-npm-package-license": "^3.0.1"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/normalize-path": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/normalize-url": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz",
-      "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==",
-      "dev": true,
-      "engines": {
-        "node": ">=14.16"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/npm-run-path": {
-      "version": "4.0.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "path-key": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/nwsapi": {
-      "version": "2.2.1",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/object-inspect": {
-      "version": "1.12.2",
-      "license": "MIT",
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/object-keys": {
-      "version": "1.1.1",
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
-    "node_modules/object.assign": {
-      "version": "4.1.4",
-      "license": "MIT",
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.4",
-        "has-symbols": "^1.0.3",
-        "object-keys": "^1.1.1"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/once": {
-      "version": "1.4.0",
-      "license": "ISC",
-      "dependencies": {
-        "wrappy": "1"
-      }
-    },
-    "node_modules/onetime": {
-      "version": "5.1.2",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "mimic-fn": "^2.1.0"
-      },
-      "engines": {
-        "node": ">=6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/open": {
-      "version": "9.1.0",
-      "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz",
-      "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==",
-      "dev": true,
-      "dependencies": {
-        "default-browser": "^4.0.0",
-        "define-lazy-prop": "^3.0.0",
-        "is-inside-container": "^1.0.0",
-        "is-wsl": "^2.2.0"
-      },
-      "engines": {
-        "node": ">=14.16"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/optionator": {
-      "version": "0.8.3",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "deep-is": "~0.1.3",
-        "fast-levenshtein": "~2.0.6",
-        "levn": "~0.3.0",
-        "prelude-ls": "~1.1.2",
-        "type-check": "~0.3.2",
-        "word-wrap": "~1.2.3"
-      },
-      "engines": {
-        "node": ">= 0.8.0"
-      }
-    },
-    "node_modules/ora": {
-      "version": "6.3.0",
-      "resolved": "https://registry.npmjs.org/ora/-/ora-6.3.0.tgz",
-      "integrity": "sha512-1/D8uRFY0ay2kgBpmAwmSA404w4OoPVhHMqRqtjvrcK/dnzcEZxMJ+V4DUbyICu8IIVRclHcOf5wlD1tMY4GUQ==",
-      "dev": true,
-      "dependencies": {
-        "chalk": "^5.0.0",
-        "cli-cursor": "^4.0.0",
-        "cli-spinners": "^2.6.1",
-        "is-interactive": "^2.0.0",
-        "is-unicode-supported": "^1.1.0",
-        "log-symbols": "^5.1.0",
-        "stdin-discarder": "^0.1.0",
-        "strip-ansi": "^7.0.1",
-        "wcwidth": "^1.0.1"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/ora/node_modules/chalk": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-      "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
-      "dev": true,
-      "engines": {
-        "node": "^12.17.0 || ^14.13 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
-      }
-    },
-    "node_modules/os-name": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/os-name/-/os-name-5.1.0.tgz",
-      "integrity": "sha512-YEIoAnM6zFmzw3PQ201gCVCIWbXNyKObGlVvpAVvraAeOHnlYVKFssbA/riRX5R40WA6kKrZ7Dr7dWzO3nKSeQ==",
-      "dev": true,
-      "dependencies": {
-        "macos-release": "^3.1.0",
-        "windows-release": "^5.0.1"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/os-tmpdir": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
-      "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/p-cancelable": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz",
-      "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==",
-      "dev": true,
-      "engines": {
-        "node": ">=12.20"
-      }
-    },
-    "node_modules/p-defer": {
-      "version": "3.0.0",
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/p-fifo": {
-      "version": "1.0.0",
-      "license": "MIT",
-      "dependencies": {
-        "fast-fifo": "^1.0.0",
-        "p-defer": "^3.0.0"
-      }
-    },
-    "node_modules/p-locate": {
-      "version": "4.1.0",
-      "license": "MIT",
-      "dependencies": {
-        "p-limit": "^2.2.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/p-locate/node_modules/p-limit": {
-      "version": "2.3.0",
-      "license": "MIT",
-      "dependencies": {
-        "p-try": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/p-retry": {
-      "version": "4.6.2",
-      "license": "MIT",
-      "dependencies": {
-        "@types/retry": "0.12.0",
-        "retry": "^0.13.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/p-try": {
-      "version": "2.2.0",
-      "license": "MIT",
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/pac-proxy-agent": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-5.0.0.tgz",
-      "integrity": "sha512-CcFG3ZtnxO8McDigozwE3AqAw15zDvGH+OjXO4kzf7IkEKkQ4gxQ+3sdF50WmhQ4P/bVusXcqNE2S3XrNURwzQ==",
-      "dev": true,
-      "dependencies": {
-        "@tootallnate/once": "1",
-        "agent-base": "6",
-        "debug": "4",
-        "get-uri": "3",
-        "http-proxy-agent": "^4.0.1",
-        "https-proxy-agent": "5",
-        "pac-resolver": "^5.0.0",
-        "raw-body": "^2.2.0",
-        "socks-proxy-agent": "5"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
-    "node_modules/pac-resolver": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-5.0.1.tgz",
-      "integrity": "sha512-cy7u00ko2KVgBAjuhevqpPeHIkCIqPe1v24cydhWjmeuzaBfmUWFCZJ1iAh5TuVzVZoUzXIW7K8sMYOZ84uZ9Q==",
-      "dev": true,
-      "dependencies": {
-        "degenerator": "^3.0.2",
-        "ip": "^1.1.5",
-        "netmask": "^2.0.2"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
-    "node_modules/package-json": {
-      "version": "8.1.0",
-      "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz",
-      "integrity": "sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==",
-      "dev": true,
-      "dependencies": {
-        "got": "^12.1.0",
-        "registry-auth-token": "^5.0.1",
-        "registry-url": "^6.0.0",
-        "semver": "^7.3.7"
-      },
-      "engines": {
-        "node": ">=14.16"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/parent-module": {
-      "version": "1.0.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "callsites": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/parse-duration": {
-      "version": "1.0.2",
-      "license": "MIT"
-    },
-    "node_modules/parse-json": {
-      "version": "5.2.0",
-      "license": "MIT",
-      "dependencies": {
-        "@babel/code-frame": "^7.0.0",
-        "error-ex": "^1.3.1",
-        "json-parse-even-better-errors": "^2.3.0",
-        "lines-and-columns": "^1.1.6"
-      },
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/parse-path": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.0.tgz",
-      "integrity": "sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog==",
-      "dev": true,
-      "dependencies": {
-        "protocols": "^2.0.0"
-      }
-    },
-    "node_modules/parse-url": {
-      "version": "8.1.0",
-      "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-8.1.0.tgz",
-      "integrity": "sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==",
-      "dev": true,
-      "dependencies": {
-        "parse-path": "^7.0.0"
-      }
-    },
-    "node_modules/parse5": {
-      "version": "6.0.1",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/path-exists": {
-      "version": "4.0.0",
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/path-is-absolute": {
-      "version": "1.0.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/path-key": {
-      "version": "3.1.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/path-parse": {
-      "version": "1.0.7",
-      "license": "MIT"
-    },
-    "node_modules/path-type": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
-      "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
-      "dev": true,
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/peer-id": {
-      "version": "0.16.0",
-      "license": "MIT",
-      "dependencies": {
-        "class-is": "^1.1.0",
-        "libp2p-crypto": "^0.21.0",
-        "multiformats": "^9.4.5",
-        "protobufjs": "^6.10.2",
-        "uint8arrays": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=15.0.0"
-      }
-    },
-    "node_modules/picocolors": {
-      "version": "1.0.0",
-      "dev": true,
-      "license": "ISC"
-    },
-    "node_modules/picomatch": {
-      "version": "2.3.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8.6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/jonschlinkert"
-      }
-    },
-    "node_modules/pirates": {
-      "version": "4.0.5",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/pkg-dir": {
-      "version": "4.2.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "find-up": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/prelude-ls": {
-      "version": "1.1.2",
-      "dev": true,
-      "engines": {
-        "node": ">= 0.8.0"
-      }
-    },
-    "node_modules/pretty-format": {
-      "version": "27.5.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^5.0.1",
-        "ansi-styles": "^5.0.0",
-        "react-is": "^17.0.1"
-      },
-      "engines": {
-        "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
-      }
-    },
-    "node_modules/pretty-format/node_modules/ansi-styles": {
-      "version": "5.2.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
-      }
-    },
-    "node_modules/progress": {
-      "version": "2.0.3",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.4.0"
-      }
-    },
-    "node_modules/promise.allsettled": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.6.tgz",
-      "integrity": "sha512-22wJUOD3zswWFqgwjNHa1965LvqTX87WPu/lreY2KSd7SVcERfuZ4GfUaOnJNnvtoIv2yXT/W00YIGMetXtFXg==",
-      "dev": true,
-      "dependencies": {
-        "array.prototype.map": "^1.0.5",
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.4",
-        "es-abstract": "^1.20.4",
-        "get-intrinsic": "^1.1.3",
-        "iterate-value": "^1.0.2"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/prompts": {
-      "version": "2.4.2",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "kleur": "^3.0.3",
-        "sisteransi": "^1.0.5"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/proto-list": {
-      "version": "1.2.4",
-      "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
-      "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",
-      "dev": true
-    },
-    "node_modules/protobufjs": {
-      "version": "6.11.3",
-      "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz",
-      "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==",
-      "hasInstallScript": true,
-      "dependencies": {
-        "@protobufjs/aspromise": "^1.1.2",
-        "@protobufjs/base64": "^1.1.2",
-        "@protobufjs/codegen": "^2.0.4",
-        "@protobufjs/eventemitter": "^1.1.0",
-        "@protobufjs/fetch": "^1.1.0",
-        "@protobufjs/float": "^1.0.2",
-        "@protobufjs/inquire": "^1.1.0",
-        "@protobufjs/path": "^1.1.2",
-        "@protobufjs/pool": "^1.1.0",
-        "@protobufjs/utf8": "^1.1.0",
-        "@types/long": "^4.0.1",
-        "@types/node": ">=13.7.0",
-        "long": "^4.0.0"
-      },
-      "bin": {
-        "pbjs": "bin/pbjs",
-        "pbts": "bin/pbts"
-      }
-    },
-    "node_modules/protocols": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz",
-      "integrity": "sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==",
-      "dev": true
-    },
-    "node_modules/proxy-agent": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-5.0.0.tgz",
-      "integrity": "sha512-gkH7BkvLVkSfX9Dk27W6TyNOWWZWRilRfk1XxGNWOYJ2TuedAv1yFpCaU9QSBmBe716XOTNpYNOzhysyw8xn7g==",
-      "dev": true,
-      "dependencies": {
-        "agent-base": "^6.0.0",
-        "debug": "4",
-        "http-proxy-agent": "^4.0.0",
-        "https-proxy-agent": "^5.0.0",
-        "lru-cache": "^5.1.1",
-        "pac-proxy-agent": "^5.0.0",
-        "proxy-from-env": "^1.0.0",
-        "socks-proxy-agent": "^5.0.0"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
-    "node_modules/proxy-agent/node_modules/lru-cache": {
-      "version": "5.1.1",
-      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
-      "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
-      "dev": true,
-      "dependencies": {
-        "yallist": "^3.0.2"
-      }
-    },
-    "node_modules/proxy-agent/node_modules/yallist": {
-      "version": "3.1.1",
-      "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
-      "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
-      "dev": true
-    },
-    "node_modules/proxy-from-env": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
-      "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
-      "dev": true
-    },
-    "node_modules/psl": {
-      "version": "1.9.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/punycode": {
-      "version": "2.1.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/pupa": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz",
-      "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==",
-      "dev": true,
-      "dependencies": {
-        "escape-goat": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=12.20"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/querystringify": {
-      "version": "2.2.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/queue-microtask": {
-      "version": "1.2.3",
-      "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
-      "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ]
-    },
-    "node_modules/quick-lru": {
-      "version": "5.1.1",
-      "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
-      "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
-      "dev": true,
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/rabin-wasm": {
-      "version": "0.1.5",
-      "license": "MIT",
-      "dependencies": {
-        "@assemblyscript/loader": "^0.9.4",
-        "bl": "^5.0.0",
-        "debug": "^4.3.1",
-        "minimist": "^1.2.5",
-        "node-fetch": "^2.6.1",
-        "readable-stream": "^3.6.0"
-      },
-      "bin": {
-        "rabin-wasm": "cli/bin.js"
-      }
-    },
-    "node_modules/raw-body": {
-      "version": "2.5.1",
-      "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
-      "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
-      "dev": true,
-      "dependencies": {
-        "bytes": "3.1.2",
-        "http-errors": "2.0.0",
-        "iconv-lite": "0.4.24",
-        "unpipe": "1.0.0"
-      },
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/rc": {
-      "version": "1.2.8",
-      "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
-      "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
-      "dev": true,
-      "dependencies": {
-        "deep-extend": "^0.6.0",
-        "ini": "~1.3.0",
-        "minimist": "^1.2.0",
-        "strip-json-comments": "~2.0.1"
-      },
-      "bin": {
-        "rc": "cli.js"
-      }
-    },
-    "node_modules/rc/node_modules/ini": {
-      "version": "1.3.8",
-      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
-      "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
-      "dev": true
-    },
-    "node_modules/rc/node_modules/strip-json-comments": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
-      "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/react-is": {
-      "version": "17.0.2",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/react-native-fetch-api": {
-      "version": "2.0.0",
-      "license": "MIT",
-      "dependencies": {
-        "p-defer": "^3.0.0"
-      }
-    },
-    "node_modules/read-pkg": {
-      "version": "5.2.0",
-      "license": "MIT",
-      "dependencies": {
-        "@types/normalize-package-data": "^2.4.0",
-        "normalize-package-data": "^2.5.0",
-        "parse-json": "^5.0.0",
-        "type-fest": "^0.6.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/read-pkg-up": {
-      "version": "7.0.1",
-      "license": "MIT",
-      "dependencies": {
-        "find-up": "^4.1.0",
-        "read-pkg": "^5.2.0",
-        "type-fest": "^0.8.1"
-      },
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/read-pkg/node_modules/hosted-git-info": {
-      "version": "2.8.9",
-      "license": "ISC"
-    },
-    "node_modules/read-pkg/node_modules/normalize-package-data": {
-      "version": "2.5.0",
-      "license": "BSD-2-Clause",
-      "dependencies": {
-        "hosted-git-info": "^2.1.4",
-        "resolve": "^1.10.0",
-        "semver": "2 || 3 || 4 || 5",
-        "validate-npm-package-license": "^3.0.1"
-      }
-    },
-    "node_modules/read-pkg/node_modules/semver": {
-      "version": "5.7.1",
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver"
-      }
-    },
-    "node_modules/read-pkg/node_modules/type-fest": {
-      "version": "0.6.0",
-      "license": "(MIT OR CC0-1.0)",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/readable-stream": {
-      "version": "3.6.0",
-      "license": "MIT",
-      "dependencies": {
-        "inherits": "^2.0.3",
-        "string_decoder": "^1.1.1",
-        "util-deprecate": "^1.0.1"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/receptacle": {
-      "version": "1.3.2",
-      "license": "MIT",
-      "dependencies": {
-        "ms": "^2.1.1"
-      }
-    },
-    "node_modules/rechoir": {
-      "version": "0.6.2",
-      "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
-      "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
-      "dev": true,
-      "dependencies": {
-        "resolve": "^1.1.6"
-      },
-      "engines": {
-        "node": ">= 0.10"
-      }
-    },
-    "node_modules/recursive-fs": {
-      "version": "1.1.2",
-      "license": "MIT",
-      "bin": {
-        "recursive-copy": "bin/recursive-copy",
-        "recursive-delete": "bin/recursive-delete"
-      },
-      "engines": {
-        "node": ">=4.0.0"
-      }
-    },
-    "node_modules/redent": {
-      "version": "3.0.0",
-      "license": "MIT",
-      "dependencies": {
-        "indent-string": "^4.0.0",
-        "strip-indent": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/regexp.prototype.flags": {
-      "version": "1.4.3",
-      "license": "MIT",
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.3",
-        "functions-have-names": "^1.2.2"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/regexpp": {
-      "version": "3.2.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/mysticatea"
-      }
-    },
-    "node_modules/registry-auth-token": {
-      "version": "5.0.2",
-      "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz",
-      "integrity": "sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==",
-      "dev": true,
-      "dependencies": {
-        "@pnpm/npm-conf": "^2.1.0"
-      },
-      "engines": {
-        "node": ">=14"
-      }
-    },
-    "node_modules/registry-url": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz",
-      "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==",
-      "dev": true,
-      "dependencies": {
-        "rc": "1.2.8"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/release-it": {
-      "version": "15.10.1",
-      "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.10.1.tgz",
-      "integrity": "sha512-Wkk4aFHSo27vQwHIlcEy77lJwnQlh4UDQckc53gh5tKo7F22mAUEAe8SYQZJcFh7icdkf0OV70onhB1dDmeClA==",
-      "dev": true,
-      "dependencies": {
-        "@iarna/toml": "2.2.5",
-        "@octokit/rest": "19.0.7",
-        "async-retry": "1.3.3",
-        "chalk": "5.2.0",
-        "cosmiconfig": "8.1.3",
-        "execa": "7.1.1",
-        "git-url-parse": "13.1.0",
-        "globby": "13.1.3",
-        "got": "12.6.0",
-        "inquirer": "9.1.5",
-        "is-ci": "3.0.1",
-        "issue-parser": "6.0.0",
-        "lodash": "4.17.21",
-        "mime-types": "2.1.35",
-        "new-github-release-url": "2.0.0",
-        "node-fetch": "3.3.1",
-        "open": "9.1.0",
-        "ora": "6.3.0",
-        "os-name": "5.1.0",
-        "promise.allsettled": "1.0.6",
-        "proxy-agent": "5.0.0",
-        "semver": "7.3.8",
-        "shelljs": "0.8.5",
-        "update-notifier": "6.0.2",
-        "url-join": "5.0.0",
-        "wildcard-match": "5.1.2",
-        "yargs-parser": "21.1.1"
-      },
-      "bin": {
-        "release-it": "bin/release-it.js"
-      },
-      "engines": {
-        "node": ">=14.9"
-      }
-    },
-    "node_modules/release-it/node_modules/chalk": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-      "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
-      "dev": true,
-      "engines": {
-        "node": "^12.17.0 || ^14.13 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
-      }
-    },
-    "node_modules/release-it/node_modules/data-uri-to-buffer": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
-      "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
-      "dev": true,
-      "engines": {
-        "node": ">= 12"
-      }
-    },
-    "node_modules/release-it/node_modules/execa": {
-      "version": "7.1.1",
-      "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz",
-      "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==",
-      "dev": true,
-      "dependencies": {
-        "cross-spawn": "^7.0.3",
-        "get-stream": "^6.0.1",
-        "human-signals": "^4.3.0",
-        "is-stream": "^3.0.0",
-        "merge-stream": "^2.0.0",
-        "npm-run-path": "^5.1.0",
-        "onetime": "^6.0.0",
-        "signal-exit": "^3.0.7",
-        "strip-final-newline": "^3.0.0"
-      },
-      "engines": {
-        "node": "^14.18.0 || ^16.14.0 || >=18.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sindresorhus/execa?sponsor=1"
-      }
-    },
-    "node_modules/release-it/node_modules/human-signals": {
-      "version": "4.3.1",
-      "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",
-      "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==",
-      "dev": true,
-      "engines": {
-        "node": ">=14.18.0"
-      }
-    },
-    "node_modules/release-it/node_modules/is-stream": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
-      "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
-      "dev": true,
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/release-it/node_modules/mimic-fn": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
-      "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
-      "dev": true,
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/release-it/node_modules/node-fetch": {
-      "version": "3.3.1",
-      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
-      "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
-      "dev": true,
-      "dependencies": {
-        "data-uri-to-buffer": "^4.0.0",
-        "fetch-blob": "^3.1.4",
-        "formdata-polyfill": "^4.0.10"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/node-fetch"
-      }
-    },
-    "node_modules/release-it/node_modules/npm-run-path": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",
-      "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",
-      "dev": true,
-      "dependencies": {
-        "path-key": "^4.0.0"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/release-it/node_modules/onetime": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
-      "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
-      "dev": true,
-      "dependencies": {
-        "mimic-fn": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/release-it/node_modules/path-key": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
-      "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
-      "dev": true,
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/release-it/node_modules/strip-final-newline": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
-      "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
-      "dev": true,
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/release-it/node_modules/yargs-parser": {
-      "version": "21.1.1",
-      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
-      "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
-      "dev": true,
-      "engines": {
-        "node": ">=12"
-      }
-    },
-    "node_modules/require-directory": {
-      "version": "2.1.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/requires-port": {
-      "version": "1.0.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/resolve": {
-      "version": "1.22.1",
-      "license": "MIT",
-      "dependencies": {
-        "is-core-module": "^2.9.0",
-        "path-parse": "^1.0.7",
-        "supports-preserve-symlinks-flag": "^1.0.0"
-      },
-      "bin": {
-        "resolve": "bin/resolve"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/resolve-alpn": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
-      "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
-      "dev": true
-    },
-    "node_modules/resolve-cwd": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "resolve-from": "^5.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/resolve-cwd/node_modules/resolve-from": {
-      "version": "5.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/resolve-from": {
-      "version": "4.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/resolve.exports": {
-      "version": "1.1.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/responselike": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz",
-      "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==",
-      "dev": true,
-      "dependencies": {
-        "lowercase-keys": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=14.16"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/restore-cursor": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",
-      "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",
-      "dev": true,
-      "dependencies": {
-        "onetime": "^5.1.0",
-        "signal-exit": "^3.0.2"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/retimer": {
-      "version": "3.0.0",
-      "license": "MIT"
-    },
-    "node_modules/retry": {
-      "version": "0.13.1",
-      "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
-      "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
-      "engines": {
-        "node": ">= 4"
-      }
-    },
-    "node_modules/reusify": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
-      "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
-      "dev": true,
-      "engines": {
-        "iojs": ">=1.0.0",
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/rimraf": {
-      "version": "3.0.2",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "glob": "^7.1.3"
-      },
-      "bin": {
-        "rimraf": "bin.js"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
-      }
-    },
-    "node_modules/run-applescript": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz",
-      "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==",
-      "dev": true,
-      "dependencies": {
-        "execa": "^5.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/run-async": {
-      "version": "2.4.1",
-      "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
-      "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.12.0"
-      }
-    },
-    "node_modules/run-parallel": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
-      "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/feross"
-        },
-        {
-          "type": "patreon",
-          "url": "https://www.patreon.com/feross"
-        },
-        {
-          "type": "consulting",
-          "url": "https://feross.org/support"
-        }
-      ],
-      "dependencies": {
-        "queue-microtask": "^1.2.2"
-      }
-    },
-    "node_modules/rxjs": {
-      "version": "7.8.0",
-      "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz",
-      "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==",
-      "dev": true,
-      "dependencies": {
-        "tslib": "^2.1.0"
-      }
-    },
-    "node_modules/safari-14-idb-fix": {
-      "version": "3.0.0",
-      "license": "Apache-2.0"
-    },
-    "node_modules/safe-buffer": {
-      "version": "5.2.0",
-      "license": "MIT"
-    },
-    "node_modules/safe-regex-test": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",
-      "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==",
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "get-intrinsic": "^1.1.3",
-        "is-regex": "^1.1.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/safer-buffer": {
-      "version": "2.1.2",
-      "license": "MIT"
-    },
-    "node_modules/saxes": {
-      "version": "5.0.1",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "xmlchars": "^2.2.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/semver": {
-      "version": "7.3.8",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
-      "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
-      "dependencies": {
-        "lru-cache": "^6.0.0"
-      },
-      "bin": {
-        "semver": "bin/semver.js"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/semver-diff": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz",
-      "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==",
-      "dev": true,
-      "dependencies": {
-        "semver": "^7.3.5"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/setprototypeof": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
-      "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
-      "dev": true
-    },
-    "node_modules/shebang-command": {
-      "version": "2.0.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "shebang-regex": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/shebang-regex": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/shelljs": {
-      "version": "0.8.5",
-      "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz",
-      "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
-      "dev": true,
-      "dependencies": {
-        "glob": "^7.0.0",
-        "interpret": "^1.0.0",
-        "rechoir": "^0.6.2"
-      },
-      "bin": {
-        "shjs": "bin/shjs"
-      },
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/side-channel": {
-      "version": "1.0.4",
-      "license": "MIT",
-      "dependencies": {
-        "call-bind": "^1.0.0",
-        "get-intrinsic": "^1.0.2",
-        "object-inspect": "^1.9.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/signal-exit": {
-      "version": "3.0.7",
-      "dev": true,
-      "license": "ISC"
-    },
-    "node_modules/sisteransi": {
-      "version": "1.0.5",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/slash": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/smart-buffer": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
-      "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
-      "dev": true,
-      "engines": {
-        "node": ">= 6.0.0",
-        "npm": ">= 3.0.0"
-      }
-    },
-    "node_modules/socks": {
-      "version": "2.7.1",
-      "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz",
-      "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==",
-      "dev": true,
-      "dependencies": {
-        "ip": "^2.0.0",
-        "smart-buffer": "^4.2.0"
-      },
-      "engines": {
-        "node": ">= 10.13.0",
-        "npm": ">= 3.0.0"
-      }
-    },
-    "node_modules/socks-proxy-agent": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz",
-      "integrity": "sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ==",
-      "dev": true,
-      "dependencies": {
-        "agent-base": "^6.0.2",
-        "debug": "4",
-        "socks": "^2.3.3"
-      },
-      "engines": {
-        "node": ">= 6"
-      }
-    },
-    "node_modules/socks/node_modules/ip": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
-      "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
-      "dev": true
-    },
-    "node_modules/source-map": {
-      "version": "0.6.1",
-      "dev": true,
-      "license": "BSD-3-Clause",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/source-map-support": {
-      "version": "0.5.21",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "buffer-from": "^1.0.0",
-        "source-map": "^0.6.0"
-      }
-    },
-    "node_modules/sparse-array": {
-      "version": "1.3.2",
-      "license": "ISC"
-    },
-    "node_modules/spdx-correct": {
-      "version": "3.1.1",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "spdx-expression-parse": "^3.0.0",
-        "spdx-license-ids": "^3.0.0"
-      }
-    },
-    "node_modules/spdx-exceptions": {
-      "version": "2.3.0",
-      "license": "CC-BY-3.0"
-    },
-    "node_modules/spdx-expression-parse": {
-      "version": "3.0.1",
-      "license": "MIT",
-      "dependencies": {
-        "spdx-exceptions": "^2.1.0",
-        "spdx-license-ids": "^3.0.0"
-      }
-    },
-    "node_modules/spdx-license-ids": {
-      "version": "3.0.12",
-      "license": "CC0-1.0"
-    },
-    "node_modules/sprintf-js": {
-      "version": "1.0.3",
-      "dev": true,
-      "license": "BSD-3-Clause"
-    },
-    "node_modules/stack-utils": {
-      "version": "2.0.5",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "escape-string-regexp": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/stack-utils/node_modules/escape-string-regexp": {
-      "version": "2.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/statuses": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
-      "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
-      "dev": true,
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/stdin-discarder": {
-      "version": "0.1.0",
-      "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz",
-      "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==",
-      "dev": true,
-      "dependencies": {
-        "bl": "^5.0.0"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/stop-iteration-iterator": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz",
-      "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==",
-      "dev": true,
-      "dependencies": {
-        "internal-slot": "^1.0.4"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      }
-    },
-    "node_modules/stream-browserify": {
-      "version": "3.0.0",
-      "license": "MIT",
-      "dependencies": {
-        "inherits": "~2.0.4",
-        "readable-stream": "^3.5.0"
-      }
-    },
-    "node_modules/stream-to-it": {
-      "version": "0.2.4",
-      "license": "MIT",
-      "dependencies": {
-        "get-iterator": "^1.0.2"
-      }
-    },
-    "node_modules/streaming-iterables": {
-      "version": "6.2.0",
-      "license": "MIT",
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/string_decoder": {
-      "version": "1.3.0",
-      "license": "MIT",
-      "dependencies": {
-        "safe-buffer": "~5.2.0"
-      }
-    },
-    "node_modules/string-length": {
-      "version": "4.0.2",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "char-regex": "^1.0.2",
-        "strip-ansi": "^6.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/string-length/node_modules/strip-ansi": {
-      "version": "6.0.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^5.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/string-width": {
-      "version": "4.2.3",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "emoji-regex": "^8.0.0",
-        "is-fullwidth-code-point": "^3.0.0",
-        "strip-ansi": "^6.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/string-width/node_modules/strip-ansi": {
-      "version": "6.0.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^5.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/string.prototype.trimend": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz",
-      "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==",
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.4",
-        "es-abstract": "^1.20.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/string.prototype.trimstart": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz",
-      "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==",
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.4",
-        "es-abstract": "^1.20.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/strip-ansi": {
-      "version": "7.0.1",
-      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
-      "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
-      "dev": true,
-      "dependencies": {
-        "ansi-regex": "^6.0.1"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/strip-ansi?sponsor=1"
-      }
-    },
-    "node_modules/strip-ansi/node_modules/ansi-regex": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
-      "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
-      "dev": true,
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-regex?sponsor=1"
-      }
-    },
-    "node_modules/strip-bom": {
-      "version": "4.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/strip-final-newline": {
-      "version": "2.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/strip-indent": {
-      "version": "3.0.0",
-      "license": "MIT",
-      "dependencies": {
-        "min-indent": "^1.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/strip-json-comments": {
-      "version": "3.1.1",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/supports-color": {
-      "version": "5.5.0",
-      "license": "MIT",
-      "dependencies": {
-        "has-flag": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/supports-hyperlinks": {
-      "version": "2.2.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "has-flag": "^4.0.0",
-        "supports-color": "^7.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/supports-hyperlinks/node_modules/has-flag": {
-      "version": "4.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/supports-hyperlinks/node_modules/supports-color": {
-      "version": "7.2.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "has-flag": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/supports-preserve-symlinks-flag": {
-      "version": "1.0.0",
-      "license": "MIT",
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/symbol-tree": {
-      "version": "3.2.4",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/terminal-link": {
-      "version": "2.1.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-escapes": "^4.2.1",
-        "supports-hyperlinks": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/test-exclude": {
-      "version": "6.0.0",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "@istanbuljs/schema": "^0.1.2",
-        "glob": "^7.1.4",
-        "minimatch": "^3.0.4"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/text-table": {
-      "version": "0.2.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/throat": {
-      "version": "6.0.1",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/throttled-queue": {
-      "version": "2.1.4",
-      "license": "MIT"
-    },
-    "node_modules/through": {
-      "version": "2.3.8",
-      "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
-      "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
-      "dev": true
-    },
-    "node_modules/timeout-abort-controller": {
-      "version": "2.0.0",
-      "license": "MIT",
-      "dependencies": {
-        "abort-controller": "^3.0.0",
-        "native-abort-controller": "^1.0.4",
-        "retimer": "^3.0.0"
-      }
-    },
-    "node_modules/titleize": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz",
-      "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==",
-      "dev": true,
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/tmp": {
-      "version": "0.0.33",
-      "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
-      "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
-      "dev": true,
-      "dependencies": {
-        "os-tmpdir": "~1.0.2"
-      },
-      "engines": {
-        "node": ">=0.6.0"
-      }
-    },
-    "node_modules/tmpl": {
-      "version": "1.0.5",
-      "dev": true,
-      "license": "BSD-3-Clause"
-    },
-    "node_modules/to-fast-properties": {
-      "version": "2.0.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/to-regex-range": {
-      "version": "5.0.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "is-number": "^7.0.0"
-      },
-      "engines": {
-        "node": ">=8.0"
-      }
-    },
-    "node_modules/toidentifier": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
-      "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.6"
-      }
-    },
-    "node_modules/tough-cookie": {
-      "version": "4.1.0",
-      "dev": true,
-      "license": "BSD-3-Clause",
-      "dependencies": {
-        "psl": "^1.1.33",
-        "punycode": "^2.1.1",
-        "universalify": "^0.2.0",
-        "url-parse": "^1.5.3"
-      },
-      "engines": {
-        "node": ">=6"
-      }
-    },
-    "node_modules/tr46": {
-      "version": "2.1.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "punycode": "^2.1.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/trim-newlines": {
-      "version": "3.0.1",
-      "license": "MIT",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/tslib": {
-      "version": "2.4.1",
-      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
-      "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
-    },
-    "node_modules/tunnel": {
-      "version": "0.0.6",
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
-      }
-    },
-    "node_modules/type-check": {
-      "version": "0.3.2",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "prelude-ls": "~1.1.2"
-      },
-      "engines": {
-        "node": ">= 0.8.0"
-      }
-    },
-    "node_modules/type-detect": {
-      "version": "4.0.8",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/type-fest": {
-      "version": "0.8.1",
-      "license": "(MIT OR CC0-1.0)",
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/typedarray-to-buffer": {
-      "version": "3.1.5",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "is-typedarray": "^1.0.0"
-      }
-    },
-    "node_modules/uint8arrays": {
-      "version": "3.0.0",
-      "license": "MIT",
-      "dependencies": {
-        "multiformats": "^9.4.2"
-      }
-    },
-    "node_modules/unbox-primitive": {
-      "version": "1.0.2",
-      "license": "MIT",
-      "dependencies": {
-        "call-bind": "^1.0.2",
-        "has-bigints": "^1.0.2",
-        "has-symbols": "^1.0.3",
-        "which-boxed-primitive": "^1.0.2"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/unique-string": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz",
-      "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==",
-      "dev": true,
-      "dependencies": {
-        "crypto-random-string": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/universal-user-agent": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
-      "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
-    },
-    "node_modules/universalify": {
-      "version": "0.2.0",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 4.0.0"
-      }
-    },
-    "node_modules/unpipe": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
-      "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
-      "dev": true,
-      "engines": {
-        "node": ">= 0.8"
-      }
-    },
-    "node_modules/untildify": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
-      "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
-      "dev": true,
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/update-browserslist-db": {
-      "version": "1.0.5",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/browserslist"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/browserslist"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "escalade": "^3.1.1",
-        "picocolors": "^1.0.0"
-      },
-      "bin": {
-        "browserslist-lint": "cli.js"
-      },
-      "peerDependencies": {
-        "browserslist": ">= 4.21.0"
-      }
-    },
-    "node_modules/update-notifier": {
-      "version": "6.0.2",
-      "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz",
-      "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==",
-      "dev": true,
-      "dependencies": {
-        "boxen": "^7.0.0",
-        "chalk": "^5.0.1",
-        "configstore": "^6.0.0",
-        "has-yarn": "^3.0.0",
-        "import-lazy": "^4.0.0",
-        "is-ci": "^3.0.1",
-        "is-installed-globally": "^0.4.0",
-        "is-npm": "^6.0.0",
-        "is-yarn-global": "^0.4.0",
-        "latest-version": "^7.0.0",
-        "pupa": "^3.1.0",
-        "semver": "^7.3.7",
-        "semver-diff": "^4.0.0",
-        "xdg-basedir": "^5.1.0"
-      },
-      "engines": {
-        "node": ">=14.16"
-      },
-      "funding": {
-        "url": "https://github.com/yeoman/update-notifier?sponsor=1"
-      }
-    },
-    "node_modules/update-notifier/node_modules/chalk": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-      "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
-      "dev": true,
-      "engines": {
-        "node": "^12.17.0 || ^14.13 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/chalk?sponsor=1"
-      }
-    },
-    "node_modules/uri-js": {
-      "version": "4.4.1",
-      "dev": true,
-      "license": "BSD-2-Clause",
-      "dependencies": {
-        "punycode": "^2.1.0"
-      }
-    },
-    "node_modules/url-join": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/url-join/-/url-join-5.0.0.tgz",
-      "integrity": "sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==",
-      "dev": true,
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      }
-    },
-    "node_modules/url-parse": {
-      "version": "1.5.10",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "querystringify": "^2.1.1",
-        "requires-port": "^1.0.0"
-      }
-    },
-    "node_modules/util": {
-      "version": "0.12.4",
-      "license": "MIT",
-      "dependencies": {
-        "inherits": "^2.0.3",
-        "is-arguments": "^1.0.4",
-        "is-generator-function": "^1.0.7",
-        "is-typed-array": "^1.1.3",
-        "safe-buffer": "^5.1.2",
-        "which-typed-array": "^1.1.2"
-      }
-    },
-    "node_modules/util-deprecate": {
-      "version": "1.0.2",
-      "license": "MIT"
-    },
-    "node_modules/uuid": {
-      "version": "8.3.2",
-      "license": "MIT",
-      "bin": {
-        "uuid": "dist/bin/uuid"
-      }
-    },
-    "node_modules/v8-compile-cache": {
-      "version": "2.1.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/v8-to-istanbul": {
-      "version": "8.1.1",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "@types/istanbul-lib-coverage": "^2.0.1",
-        "convert-source-map": "^1.6.0",
-        "source-map": "^0.7.3"
-      },
-      "engines": {
-        "node": ">=10.12.0"
-      }
-    },
-    "node_modules/v8-to-istanbul/node_modules/source-map": {
-      "version": "0.7.4",
-      "dev": true,
-      "license": "BSD-3-Clause",
-      "engines": {
-        "node": ">= 8"
-      }
-    },
-    "node_modules/validate-npm-package-license": {
-      "version": "3.0.4",
-      "license": "Apache-2.0",
-      "dependencies": {
-        "spdx-correct": "^3.0.0",
-        "spdx-expression-parse": "^3.0.0"
-      }
-    },
-    "node_modules/varint": {
-      "version": "5.0.2",
-      "license": "MIT"
-    },
-    "node_modules/vm2": {
-      "version": "3.9.16",
-      "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.16.tgz",
-      "integrity": "sha512-3T9LscojNTxdOyG+e8gFeyBXkMlOBYDoF6dqZbj+MPVHi9x10UfiTAJIobuchRCp3QvC+inybTbMJIUrLsig0w==",
-      "dev": true,
-      "dependencies": {
-        "acorn": "^8.7.0",
-        "acorn-walk": "^8.2.0"
-      },
-      "bin": {
-        "vm2": "bin/vm2"
-      },
-      "engines": {
-        "node": ">=6.0"
-      }
-    },
-    "node_modules/vm2/node_modules/acorn-walk": {
-      "version": "8.2.0",
-      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
-      "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.4.0"
-      }
-    },
-    "node_modules/w3c-hr-time": {
-      "version": "1.0.2",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "browser-process-hrtime": "^1.0.0"
-      }
-    },
-    "node_modules/w3c-xmlserializer": {
-      "version": "2.0.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "xml-name-validator": "^3.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/walker": {
-      "version": "1.0.8",
-      "dev": true,
-      "license": "Apache-2.0",
-      "dependencies": {
-        "makeerror": "1.0.12"
-      }
-    },
-    "node_modules/wcwidth": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
-      "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
-      "dev": true,
-      "dependencies": {
-        "defaults": "^1.0.3"
-      }
-    },
-    "node_modules/web-encoding": {
-      "version": "1.1.5",
-      "license": "MIT",
-      "dependencies": {
-        "util": "^0.12.3"
-      },
-      "optionalDependencies": {
-        "@zxing/text-encoding": "0.9.0"
-      }
-    },
-    "node_modules/web-streams-polyfill": {
-      "version": "3.2.1",
-      "license": "MIT",
-      "engines": {
-        "node": ">= 8"
-      }
-    },
-    "node_modules/webidl-conversions": {
-      "version": "6.1.0",
-      "dev": true,
-      "license": "BSD-2-Clause",
-      "engines": {
-        "node": ">=10.4"
-      }
-    },
-    "node_modules/whatwg-encoding": {
-      "version": "1.0.5",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "iconv-lite": "0.4.24"
-      }
-    },
-    "node_modules/whatwg-mimetype": {
-      "version": "2.3.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/whatwg-url": {
-      "version": "8.7.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "lodash": "^4.7.0",
-        "tr46": "^2.1.0",
-        "webidl-conversions": "^6.1.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/which": {
-      "version": "2.0.2",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "isexe": "^2.0.0"
-      },
-      "bin": {
-        "node-which": "bin/node-which"
-      },
-      "engines": {
-        "node": ">= 8"
-      }
-    },
-    "node_modules/which-boxed-primitive": {
-      "version": "1.0.2",
-      "license": "MIT",
-      "dependencies": {
-        "is-bigint": "^1.0.1",
-        "is-boolean-object": "^1.1.0",
-        "is-number-object": "^1.0.4",
-        "is-string": "^1.0.5",
-        "is-symbol": "^1.0.3"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/which-typed-array": {
-      "version": "1.1.8",
-      "license": "MIT",
-      "dependencies": {
-        "available-typed-arrays": "^1.0.5",
-        "call-bind": "^1.0.2",
-        "es-abstract": "^1.20.0",
-        "for-each": "^0.3.3",
-        "has-tostringtag": "^1.0.0",
-        "is-typed-array": "^1.1.9"
-      },
-      "engines": {
-        "node": ">= 0.4"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/ljharb"
-      }
-    },
-    "node_modules/widest-line": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz",
-      "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==",
-      "dev": true,
-      "dependencies": {
-        "string-width": "^5.0.1"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/widest-line/node_modules/emoji-regex": {
-      "version": "9.2.2",
-      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
-      "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
-      "dev": true
-    },
-    "node_modules/widest-line/node_modules/string-width": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
-      "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
-      "dev": true,
-      "dependencies": {
-        "eastasianwidth": "^0.2.0",
-        "emoji-regex": "^9.2.2",
-        "strip-ansi": "^7.0.1"
-      },
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/wildcard-match": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/wildcard-match/-/wildcard-match-5.1.2.tgz",
-      "integrity": "sha512-qNXwI591Z88c8bWxp+yjV60Ch4F8Riawe3iGxbzquhy8Xs9m+0+SLFBGb/0yCTIDElawtaImC37fYZ+dr32KqQ==",
-      "dev": true
-    },
-    "node_modules/windows-release": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-5.1.0.tgz",
-      "integrity": "sha512-CddHecz5dt0ngTjGPP1uYr9Tjl4qq5rEKNk8UGb8XCdngNXI+GRYvqelD055FdiUgqODZz3R/5oZWYldPtXQpA==",
-      "dev": true,
-      "dependencies": {
-        "execa": "^5.1.1"
-      },
-      "engines": {
-        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/word-wrap": {
-      "version": "1.2.3",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/wrap-ansi": {
-      "version": "7.0.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-styles": "^4.0.0",
-        "string-width": "^4.1.0",
-        "strip-ansi": "^6.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
-      }
-    },
-    "node_modules/wrap-ansi/node_modules/ansi-styles": {
-      "version": "4.3.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-convert": "^2.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      },
-      "funding": {
-        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
-      }
-    },
-    "node_modules/wrap-ansi/node_modules/color-convert": {
-      "version": "2.0.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "color-name": "~1.1.4"
-      },
-      "engines": {
-        "node": ">=7.0.0"
-      }
-    },
-    "node_modules/wrap-ansi/node_modules/color-name": {
-      "version": "1.1.4",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/wrap-ansi/node_modules/strip-ansi": {
-      "version": "6.0.1",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "ansi-regex": "^5.0.1"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/wrappy": {
-      "version": "1.0.2",
-      "license": "ISC"
-    },
-    "node_modules/write-file-atomic": {
-      "version": "3.0.3",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "imurmurhash": "^0.1.4",
-        "is-typedarray": "^1.0.0",
-        "signal-exit": "^3.0.2",
-        "typedarray-to-buffer": "^3.1.5"
-      }
-    },
-    "node_modules/ws": {
-      "version": "7.5.9",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=8.3.0"
-      },
-      "peerDependencies": {
-        "bufferutil": "^4.0.1",
-        "utf-8-validate": "^5.0.2"
-      },
-      "peerDependenciesMeta": {
-        "bufferutil": {
-          "optional": true
-        },
-        "utf-8-validate": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/xdg-basedir": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz",
-      "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==",
-      "dev": true,
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/xml-name-validator": {
-      "version": "3.0.0",
-      "dev": true,
-      "license": "Apache-2.0"
-    },
-    "node_modules/xmlchars": {
-      "version": "2.2.0",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/xregexp": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz",
-      "integrity": "sha512-xl/50/Cf32VsGq/1R8jJE5ajH1yMCQkpmoS10QbFZWl2Oor4H0Me64Pu2yxvsRWK3m6soJbmGfzSR7BYmDcWAA==",
-      "dev": true,
-      "engines": {
-        "node": "*"
-      }
-    },
-    "node_modules/y18n": {
-      "version": "5.0.8",
-      "dev": true,
-      "license": "ISC",
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/yallist": {
-      "version": "4.0.0",
-      "license": "ISC"
-    },
-    "node_modules/yargs": {
-      "version": "16.2.0",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "cliui": "^7.0.2",
-        "escalade": "^3.1.1",
-        "get-caller-file": "^2.0.5",
-        "require-directory": "^2.1.1",
-        "string-width": "^4.2.0",
-        "y18n": "^5.0.5",
-        "yargs-parser": "^20.2.2"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
-    "node_modules/yargs-parser": {
-      "version": "20.2.9",
-      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
-      "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
-      "engines": {
-        "node": ">=10"
-      }
-    }
-  },
-  "dependencies": {
-    "@actions/core": {
-      "version": "1.10.0",
-      "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
-      "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
-      "requires": {
-        "@actions/http-client": "^2.0.1",
-        "uuid": "^8.3.2"
-      }
-    },
-    "@actions/github": {
-      "version": "5.1.1",
-      "resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
-      "integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
-      "requires": {
-        "@actions/http-client": "^2.0.1",
-        "@octokit/core": "^3.6.0",
-        "@octokit/plugin-paginate-rest": "^2.17.0",
-        "@octokit/plugin-rest-endpoint-methods": "^5.13.0"
-      }
-    },
-    "@actions/http-client": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
-      "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
-      "requires": {
-        "tunnel": "^0.0.6"
-      }
-    },
-    "@ampproject/remapping": {
-      "version": "2.2.0",
-      "dev": true,
-      "requires": {
-        "@jridgewell/gen-mapping": "^0.1.0",
-        "@jridgewell/trace-mapping": "^0.3.9"
-      }
-    },
-    "@assemblyscript/loader": {
-      "version": "0.9.4"
-    },
-    "@aws-crypto/crc32": {
-      "version": "2.0.0",
-      "requires": {
-        "@aws-crypto/util": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
-        "tslib": "^1.11.1"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1"
-        }
-      }
-    },
-    "@aws-crypto/crc32c": {
-      "version": "2.0.0",
-      "requires": {
-        "@aws-crypto/util": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
-        "tslib": "^1.11.1"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1"
-        }
-      }
-    },
-    "@aws-crypto/ie11-detection": {
-      "version": "2.0.0",
-      "requires": {
-        "tslib": "^1.11.1"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1"
-        }
-      }
-    },
-    "@aws-crypto/sha1-browser": {
-      "version": "2.0.0",
-      "requires": {
-        "@aws-crypto/ie11-detection": "^2.0.0",
-        "@aws-crypto/supports-web-crypto": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
-        "@aws-sdk/util-locate-window": "^3.0.0",
-        "@aws-sdk/util-utf8-browser": "^3.0.0",
-        "tslib": "^1.11.1"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1"
-        }
-      }
-    },
-    "@aws-crypto/sha256-browser": {
-      "version": "2.0.0",
-      "requires": {
-        "@aws-crypto/ie11-detection": "^2.0.0",
-        "@aws-crypto/sha256-js": "^2.0.0",
-        "@aws-crypto/supports-web-crypto": "^2.0.0",
-        "@aws-crypto/util": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
-        "@aws-sdk/util-locate-window": "^3.0.0",
-        "@aws-sdk/util-utf8-browser": "^3.0.0",
-        "tslib": "^1.11.1"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1"
-        }
-      }
-    },
-    "@aws-crypto/sha256-js": {
-      "version": "2.0.0",
-      "requires": {
-        "@aws-crypto/util": "^2.0.0",
-        "@aws-sdk/types": "^3.1.0",
-        "tslib": "^1.11.1"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1"
-        }
-      }
-    },
-    "@aws-crypto/supports-web-crypto": {
-      "version": "2.0.0",
-      "requires": {
-        "tslib": "^1.11.1"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1"
-        }
-      }
-    },
-    "@aws-crypto/util": {
-      "version": "2.0.1",
-      "requires": {
-        "@aws-sdk/types": "^3.1.0",
-        "@aws-sdk/util-utf8-browser": "^3.0.0",
-        "tslib": "^1.11.1"
-      },
-      "dependencies": {
-        "tslib": {
-          "version": "1.14.1"
-        }
-      }
-    },
-    "@aws-sdk/abort-controller": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/chunked-blob-reader": {
-      "version": "3.55.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/chunked-blob-reader-native": {
-      "version": "3.109.0",
-      "requires": {
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/client-s3": {
-      "version": "3.154.0",
-      "requires": {
-        "@aws-crypto/sha1-browser": "2.0.0",
-        "@aws-crypto/sha256-browser": "2.0.0",
-        "@aws-crypto/sha256-js": "2.0.0",
-        "@aws-sdk/client-sts": "3.154.0",
-        "@aws-sdk/config-resolver": "3.130.0",
-        "@aws-sdk/credential-provider-node": "3.154.0",
-        "@aws-sdk/eventstream-serde-browser": "3.127.0",
-        "@aws-sdk/eventstream-serde-config-resolver": "3.127.0",
-        "@aws-sdk/eventstream-serde-node": "3.127.0",
-        "@aws-sdk/fetch-http-handler": "3.131.0",
-        "@aws-sdk/hash-blob-browser": "3.127.0",
-        "@aws-sdk/hash-node": "3.127.0",
-        "@aws-sdk/hash-stream-node": "3.127.0",
-        "@aws-sdk/invalid-dependency": "3.127.0",
-        "@aws-sdk/md5-js": "3.127.0",
-        "@aws-sdk/middleware-bucket-endpoint": "3.127.0",
-        "@aws-sdk/middleware-content-length": "3.127.0",
-        "@aws-sdk/middleware-expect-continue": "3.127.0",
-        "@aws-sdk/middleware-flexible-checksums": "3.127.0",
-        "@aws-sdk/middleware-host-header": "3.127.0",
-        "@aws-sdk/middleware-location-constraint": "3.127.0",
-        "@aws-sdk/middleware-logger": "3.127.0",
-        "@aws-sdk/middleware-recursion-detection": "3.127.0",
-        "@aws-sdk/middleware-retry": "3.127.0",
-        "@aws-sdk/middleware-sdk-s3": "3.127.0",
-        "@aws-sdk/middleware-serde": "3.127.0",
-        "@aws-sdk/middleware-signing": "3.130.0",
-        "@aws-sdk/middleware-ssec": "3.127.0",
-        "@aws-sdk/middleware-stack": "3.127.0",
-        "@aws-sdk/middleware-user-agent": "3.127.0",
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/node-http-handler": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/signature-v4-multi-region": "3.130.0",
-        "@aws-sdk/smithy-client": "3.142.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/url-parser": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "@aws-sdk/util-base64-node": "3.55.0",
-        "@aws-sdk/util-body-length-browser": "3.154.0",
-        "@aws-sdk/util-body-length-node": "3.55.0",
-        "@aws-sdk/util-defaults-mode-browser": "3.142.0",
-        "@aws-sdk/util-defaults-mode-node": "3.142.0",
-        "@aws-sdk/util-stream-browser": "3.131.0",
-        "@aws-sdk/util-stream-node": "3.129.0",
-        "@aws-sdk/util-user-agent-browser": "3.127.0",
-        "@aws-sdk/util-user-agent-node": "3.127.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "@aws-sdk/util-utf8-node": "3.109.0",
-        "@aws-sdk/util-waiter": "3.127.0",
-        "@aws-sdk/xml-builder": "3.142.0",
-        "entities": "2.2.0",
-        "fast-xml-parser": "3.19.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/client-sso": {
-      "version": "3.154.0",
-      "requires": {
-        "@aws-crypto/sha256-browser": "2.0.0",
-        "@aws-crypto/sha256-js": "2.0.0",
-        "@aws-sdk/config-resolver": "3.130.0",
-        "@aws-sdk/fetch-http-handler": "3.131.0",
-        "@aws-sdk/hash-node": "3.127.0",
-        "@aws-sdk/invalid-dependency": "3.127.0",
-        "@aws-sdk/middleware-content-length": "3.127.0",
-        "@aws-sdk/middleware-host-header": "3.127.0",
-        "@aws-sdk/middleware-logger": "3.127.0",
-        "@aws-sdk/middleware-recursion-detection": "3.127.0",
-        "@aws-sdk/middleware-retry": "3.127.0",
-        "@aws-sdk/middleware-serde": "3.127.0",
-        "@aws-sdk/middleware-stack": "3.127.0",
-        "@aws-sdk/middleware-user-agent": "3.127.0",
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/node-http-handler": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/smithy-client": "3.142.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/url-parser": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "@aws-sdk/util-base64-node": "3.55.0",
-        "@aws-sdk/util-body-length-browser": "3.154.0",
-        "@aws-sdk/util-body-length-node": "3.55.0",
-        "@aws-sdk/util-defaults-mode-browser": "3.142.0",
-        "@aws-sdk/util-defaults-mode-node": "3.142.0",
-        "@aws-sdk/util-user-agent-browser": "3.127.0",
-        "@aws-sdk/util-user-agent-node": "3.127.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "@aws-sdk/util-utf8-node": "3.109.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/client-sts": {
-      "version": "3.154.0",
-      "requires": {
-        "@aws-crypto/sha256-browser": "2.0.0",
-        "@aws-crypto/sha256-js": "2.0.0",
-        "@aws-sdk/config-resolver": "3.130.0",
-        "@aws-sdk/credential-provider-node": "3.154.0",
-        "@aws-sdk/fetch-http-handler": "3.131.0",
-        "@aws-sdk/hash-node": "3.127.0",
-        "@aws-sdk/invalid-dependency": "3.127.0",
-        "@aws-sdk/middleware-content-length": "3.127.0",
-        "@aws-sdk/middleware-host-header": "3.127.0",
-        "@aws-sdk/middleware-logger": "3.127.0",
-        "@aws-sdk/middleware-recursion-detection": "3.127.0",
-        "@aws-sdk/middleware-retry": "3.127.0",
-        "@aws-sdk/middleware-sdk-sts": "3.130.0",
-        "@aws-sdk/middleware-serde": "3.127.0",
-        "@aws-sdk/middleware-signing": "3.130.0",
-        "@aws-sdk/middleware-stack": "3.127.0",
-        "@aws-sdk/middleware-user-agent": "3.127.0",
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/node-http-handler": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/smithy-client": "3.142.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/url-parser": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "@aws-sdk/util-base64-node": "3.55.0",
-        "@aws-sdk/util-body-length-browser": "3.154.0",
-        "@aws-sdk/util-body-length-node": "3.55.0",
-        "@aws-sdk/util-defaults-mode-browser": "3.142.0",
-        "@aws-sdk/util-defaults-mode-node": "3.142.0",
-        "@aws-sdk/util-user-agent-browser": "3.127.0",
-        "@aws-sdk/util-user-agent-node": "3.127.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "@aws-sdk/util-utf8-node": "3.109.0",
-        "entities": "2.2.0",
-        "fast-xml-parser": "3.19.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/config-resolver": {
-      "version": "3.130.0",
-      "requires": {
-        "@aws-sdk/signature-v4": "3.130.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-config-provider": "3.109.0",
-        "@aws-sdk/util-middleware": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/credential-provider-env": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/credential-provider-imds": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/url-parser": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/credential-provider-ini": {
-      "version": "3.154.0",
-      "requires": {
-        "@aws-sdk/credential-provider-env": "3.127.0",
-        "@aws-sdk/credential-provider-imds": "3.127.0",
-        "@aws-sdk/credential-provider-sso": "3.154.0",
-        "@aws-sdk/credential-provider-web-identity": "3.127.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/credential-provider-node": {
-      "version": "3.154.0",
-      "requires": {
-        "@aws-sdk/credential-provider-env": "3.127.0",
-        "@aws-sdk/credential-provider-imds": "3.127.0",
-        "@aws-sdk/credential-provider-ini": "3.154.0",
-        "@aws-sdk/credential-provider-process": "3.127.0",
-        "@aws-sdk/credential-provider-sso": "3.154.0",
-        "@aws-sdk/credential-provider-web-identity": "3.127.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/credential-provider-process": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/credential-provider-sso": {
-      "version": "3.154.0",
-      "requires": {
-        "@aws-sdk/client-sso": "3.154.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/credential-provider-web-identity": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/eventstream-codec": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-crypto/crc32": "2.0.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-hex-encoding": "3.109.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/eventstream-serde-browser": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/eventstream-serde-universal": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/eventstream-serde-config-resolver": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/eventstream-serde-node": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/eventstream-serde-universal": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/eventstream-serde-universal": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/eventstream-codec": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/fetch-http-handler": {
-      "version": "3.131.0",
-      "requires": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/querystring-builder": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/hash-blob-browser": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/chunked-blob-reader": "3.55.0",
-        "@aws-sdk/chunked-blob-reader-native": "3.109.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/hash-node": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-buffer-from": "3.55.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/hash-stream-node": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/invalid-dependency": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/is-array-buffer": {
-      "version": "3.55.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/lib-storage": {
-      "version": "3.154.0",
-      "requires": {
-        "@aws-sdk/smithy-client": "3.142.0",
-        "buffer": "5.6.0",
-        "events": "3.3.0",
-        "stream-browserify": "3.0.0",
-        "tslib": "^2.3.1"
-      },
-      "dependencies": {
-        "buffer": {
-          "version": "5.6.0",
-          "requires": {
-            "base64-js": "^1.0.2",
-            "ieee754": "^1.1.4"
-          }
-        }
-      }
-    },
-    "@aws-sdk/md5-js": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "@aws-sdk/util-utf8-node": "3.109.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-bucket-endpoint": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-arn-parser": "3.55.0",
-        "@aws-sdk/util-config-provider": "3.109.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-content-length": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-expect-continue": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-flexible-checksums": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-crypto/crc32": "2.0.0",
-        "@aws-crypto/crc32c": "2.0.0",
-        "@aws-sdk/is-array-buffer": "3.55.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-host-header": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-location-constraint": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-logger": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-recursion-detection": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-retry": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/service-error-classification": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-middleware": "3.127.0",
-        "tslib": "^2.3.1",
-        "uuid": "^8.3.2"
-      }
-    },
-    "@aws-sdk/middleware-sdk-s3": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/middleware-bucket-endpoint": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-arn-parser": "3.55.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-sdk-sts": {
-      "version": "3.130.0",
-      "requires": {
-        "@aws-sdk/middleware-signing": "3.130.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/signature-v4": "3.130.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-serde": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-signing": {
-      "version": "3.130.0",
-      "requires": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/signature-v4": "3.130.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-ssec": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-stack": {
-      "version": "3.127.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/middleware-user-agent": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/node-config-provider": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/shared-ini-file-loader": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/node-http-handler": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/abort-controller": "3.127.0",
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/querystring-builder": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/property-provider": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/protocol-http": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/querystring-builder": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-uri-escape": "3.55.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/querystring-parser": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/service-error-classification": {
-      "version": "3.127.0"
-    },
-    "@aws-sdk/shared-ini-file-loader": {
-      "version": "3.127.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/signature-v4": {
-      "version": "3.130.0",
-      "requires": {
-        "@aws-sdk/is-array-buffer": "3.55.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-hex-encoding": "3.109.0",
-        "@aws-sdk/util-middleware": "3.127.0",
-        "@aws-sdk/util-uri-escape": "3.55.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/signature-v4-multi-region": {
-      "version": "3.130.0",
-      "requires": {
-        "@aws-sdk/protocol-http": "3.127.0",
-        "@aws-sdk/signature-v4": "3.130.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-arn-parser": "3.55.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/smithy-client": {
-      "version": "3.142.0",
-      "requires": {
-        "@aws-sdk/middleware-stack": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/types": {
-      "version": "3.127.0"
-    },
-    "@aws-sdk/url-parser": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/querystring-parser": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-arn-parser": {
-      "version": "3.55.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-base64-browser": {
-      "version": "3.109.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-base64-node": {
-      "version": "3.55.0",
-      "requires": {
-        "@aws-sdk/util-buffer-from": "3.55.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-body-length-browser": {
-      "version": "3.154.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-body-length-node": {
-      "version": "3.55.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-buffer-from": {
-      "version": "3.55.0",
-      "requires": {
-        "@aws-sdk/is-array-buffer": "3.55.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-config-provider": {
-      "version": "3.109.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-defaults-mode-browser": {
-      "version": "3.142.0",
-      "requires": {
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "bowser": "^2.11.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-defaults-mode-node": {
-      "version": "3.142.0",
-      "requires": {
-        "@aws-sdk/config-resolver": "3.130.0",
-        "@aws-sdk/credential-provider-imds": "3.127.0",
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/property-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-hex-encoding": {
-      "version": "3.109.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-locate-window": {
-      "version": "3.55.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-middleware": {
-      "version": "3.127.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-stream-browser": {
-      "version": "3.131.0",
-      "requires": {
-        "@aws-sdk/fetch-http-handler": "3.131.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-base64-browser": "3.109.0",
-        "@aws-sdk/util-hex-encoding": "3.109.0",
-        "@aws-sdk/util-utf8-browser": "3.109.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-stream-node": {
-      "version": "3.129.0",
-      "requires": {
-        "@aws-sdk/node-http-handler": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "@aws-sdk/util-buffer-from": "3.55.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-uri-escape": {
-      "version": "3.55.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-user-agent-browser": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/types": "3.127.0",
-        "bowser": "^2.11.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-user-agent-node": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/node-config-provider": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-utf8-browser": {
-      "version": "3.109.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-utf8-node": {
-      "version": "3.109.0",
-      "requires": {
-        "@aws-sdk/util-buffer-from": "3.55.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/util-waiter": {
-      "version": "3.127.0",
-      "requires": {
-        "@aws-sdk/abort-controller": "3.127.0",
-        "@aws-sdk/types": "3.127.0",
-        "tslib": "^2.3.1"
-      }
-    },
-    "@aws-sdk/xml-builder": {
-      "version": "3.142.0",
-      "requires": {
-        "tslib": "^2.3.1"
-      }
-    },
-    "@babel/code-frame": {
-      "version": "7.18.6",
-      "requires": {
-        "@babel/highlight": "^7.18.6"
-      }
-    },
-    "@babel/compat-data": {
-      "version": "7.18.13",
-      "dev": true
-    },
-    "@babel/core": {
-      "version": "7.18.13",
-      "dev": true,
-      "requires": {
-        "@ampproject/remapping": "^2.1.0",
-        "@babel/code-frame": "^7.18.6",
-        "@babel/generator": "^7.18.13",
-        "@babel/helper-compilation-targets": "^7.18.9",
-        "@babel/helper-module-transforms": "^7.18.9",
-        "@babel/helpers": "^7.18.9",
-        "@babel/parser": "^7.18.13",
-        "@babel/template": "^7.18.10",
-        "@babel/traverse": "^7.18.13",
-        "@babel/types": "^7.18.13",
-        "convert-source-map": "^1.7.0",
-        "debug": "^4.1.0",
-        "gensync": "^1.0.0-beta.2",
-        "json5": "^2.2.1",
-        "semver": "^6.3.0"
-      },
-      "dependencies": {
-        "semver": {
-          "version": "6.3.0",
-          "dev": true
-        }
-      }
-    },
-    "@babel/generator": {
-      "version": "7.18.13",
-      "dev": true,
-      "requires": {
-        "@babel/types": "^7.18.13",
-        "@jridgewell/gen-mapping": "^0.3.2",
-        "jsesc": "^2.5.1"
-      },
-      "dependencies": {
-        "@jridgewell/gen-mapping": {
-          "version": "0.3.2",
-          "dev": true,
-          "requires": {
-            "@jridgewell/set-array": "^1.0.1",
-            "@jridgewell/sourcemap-codec": "^1.4.10",
-            "@jridgewell/trace-mapping": "^0.3.9"
-          }
-        }
-      }
-    },
-    "@babel/helper-compilation-targets": {
-      "version": "7.18.9",
-      "dev": true,
-      "requires": {
-        "@babel/compat-data": "^7.18.8",
-        "@babel/helper-validator-option": "^7.18.6",
-        "browserslist": "^4.20.2",
-        "semver": "^6.3.0"
-      },
-      "dependencies": {
-        "semver": {
-          "version": "6.3.0",
-          "dev": true
-        }
-      }
-    },
-    "@babel/helper-environment-visitor": {
-      "version": "7.18.9",
-      "dev": true
-    },
-    "@babel/helper-function-name": {
-      "version": "7.18.9",
-      "dev": true,
-      "requires": {
-        "@babel/template": "^7.18.6",
-        "@babel/types": "^7.18.9"
-      }
-    },
-    "@babel/helper-hoist-variables": {
-      "version": "7.18.6",
-      "dev": true,
-      "requires": {
-        "@babel/types": "^7.18.6"
-      }
-    },
-    "@babel/helper-module-imports": {
-      "version": "7.18.6",
-      "dev": true,
-      "requires": {
-        "@babel/types": "^7.18.6"
-      }
-    },
-    "@babel/helper-module-transforms": {
-      "version": "7.18.9",
-      "dev": true,
-      "requires": {
-        "@babel/helper-environment-visitor": "^7.18.9",
-        "@babel/helper-module-imports": "^7.18.6",
-        "@babel/helper-simple-access": "^7.18.6",
-        "@babel/helper-split-export-declaration": "^7.18.6",
-        "@babel/helper-validator-identifier": "^7.18.6",
-        "@babel/template": "^7.18.6",
-        "@babel/traverse": "^7.18.9",
-        "@babel/types": "^7.18.9"
-      }
-    },
-    "@babel/helper-plugin-utils": {
-      "version": "7.18.9",
-      "dev": true
-    },
-    "@babel/helper-simple-access": {
-      "version": "7.18.6",
-      "dev": true,
-      "requires": {
-        "@babel/types": "^7.18.6"
-      }
-    },
-    "@babel/helper-split-export-declaration": {
-      "version": "7.18.6",
-      "dev": true,
-      "requires": {
-        "@babel/types": "^7.18.6"
-      }
-    },
-    "@babel/helper-string-parser": {
-      "version": "7.18.10",
-      "dev": true
-    },
-    "@babel/helper-validator-identifier": {
-      "version": "7.18.6"
-    },
-    "@babel/helper-validator-option": {
-      "version": "7.18.6",
-      "dev": true
-    },
-    "@babel/helpers": {
-      "version": "7.18.9",
-      "dev": true,
-      "requires": {
-        "@babel/template": "^7.18.6",
-        "@babel/traverse": "^7.18.9",
-        "@babel/types": "^7.18.9"
-      }
-    },
-    "@babel/highlight": {
-      "version": "7.18.6",
-      "requires": {
-        "@babel/helper-validator-identifier": "^7.18.6",
-        "chalk": "^2.0.0",
-        "js-tokens": "^4.0.0"
-      }
-    },
-    "@babel/parser": {
-      "version": "7.18.13",
-      "dev": true
-    },
-    "@babel/plugin-syntax-async-generators": {
-      "version": "7.8.4",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      }
-    },
-    "@babel/plugin-syntax-bigint": {
-      "version": "7.8.3",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      }
-    },
-    "@babel/plugin-syntax-class-properties": {
-      "version": "7.12.13",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.12.13"
-      }
-    },
-    "@babel/plugin-syntax-import-meta": {
-      "version": "7.10.4",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.10.4"
-      }
-    },
-    "@babel/plugin-syntax-json-strings": {
-      "version": "7.8.3",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      }
-    },
-    "@babel/plugin-syntax-logical-assignment-operators": {
-      "version": "7.10.4",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.10.4"
-      }
-    },
-    "@babel/plugin-syntax-nullish-coalescing-operator": {
-      "version": "7.8.3",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      }
-    },
-    "@babel/plugin-syntax-numeric-separator": {
-      "version": "7.10.4",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.10.4"
-      }
-    },
-    "@babel/plugin-syntax-object-rest-spread": {
-      "version": "7.8.3",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      }
-    },
-    "@babel/plugin-syntax-optional-catch-binding": {
-      "version": "7.8.3",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      }
-    },
-    "@babel/plugin-syntax-optional-chaining": {
-      "version": "7.8.3",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.8.0"
-      }
-    },
-    "@babel/plugin-syntax-top-level-await": {
-      "version": "7.14.5",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.14.5"
-      }
-    },
-    "@babel/plugin-syntax-typescript": {
-      "version": "7.18.6",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.18.6"
-      }
-    },
-    "@babel/template": {
-      "version": "7.18.10",
-      "dev": true,
-      "requires": {
-        "@babel/code-frame": "^7.18.6",
-        "@babel/parser": "^7.18.10",
-        "@babel/types": "^7.18.10"
-      }
-    },
-    "@babel/traverse": {
-      "version": "7.18.13",
-      "dev": true,
-      "requires": {
-        "@babel/code-frame": "^7.18.6",
-        "@babel/generator": "^7.18.13",
-        "@babel/helper-environment-visitor": "^7.18.9",
-        "@babel/helper-function-name": "^7.18.9",
-        "@babel/helper-hoist-variables": "^7.18.6",
-        "@babel/helper-split-export-declaration": "^7.18.6",
-        "@babel/parser": "^7.18.13",
-        "@babel/types": "^7.18.13",
-        "debug": "^4.1.0",
-        "globals": "^11.1.0"
-      },
-      "dependencies": {
-        "globals": {
-          "version": "11.12.0",
-          "dev": true
-        }
-      }
-    },
-    "@babel/types": {
-      "version": "7.18.13",
-      "dev": true,
-      "requires": {
-        "@babel/helper-string-parser": "^7.18.10",
-        "@babel/helper-validator-identifier": "^7.18.6",
-        "to-fast-properties": "^2.0.0"
-      }
-    },
-    "@bcoe/v8-coverage": {
-      "version": "0.2.3",
-      "dev": true
-    },
-    "@eslint/eslintrc": {
-      "version": "1.0.5",
-      "dev": true,
-      "requires": {
-        "ajv": "^6.12.4",
-        "debug": "^4.3.2",
-        "espree": "^9.2.0",
-        "globals": "^13.9.0",
-        "ignore": "^4.0.6",
-        "import-fresh": "^3.2.1",
-        "js-yaml": "^4.1.0",
-        "minimatch": "^3.0.4",
-        "strip-json-comments": "^3.1.1"
-      },
-      "dependencies": {
-        "argparse": {
-          "version": "2.0.1",
-          "dev": true
-        },
-        "js-yaml": {
-          "version": "4.1.0",
-          "dev": true,
-          "requires": {
-            "argparse": "^2.0.1"
-          }
-        }
-      }
-    },
-    "@filebase/client": {
-      "version": "0.0.2",
-      "requires": {
-        "@aws-sdk/client-s3": "^3.121.0",
-        "@aws-sdk/lib-storage": "^3.121.0",
-        "@ipld/car": "^3.2.3",
-        "@ipld/dag-cbor": "^6.0.13",
-        "@web-std/blob": "^3.0.1",
-        "@web-std/fetch": "^3.0.3",
-        "@web-std/file": "^3.0.0",
-        "@web-std/form-data": "^3.0.0",
-        "carbites": "^1.0.6",
-        "ipfs-car": "github:filebase/ipfs-car#cid-version-support-dist",
-        "it-pipe": "^1.1.0",
-        "multiformats": "^9.6.4",
-        "p-retry": "^4.6.1",
-        "streaming-iterables": "^6.0.0",
-        "throttled-queue": "^2.1.2"
-      },
-      "dependencies": {
-        "@ipld/dag-cbor": {
-          "version": "6.0.15",
-          "requires": {
-            "cborg": "^1.5.4",
-            "multiformats": "^9.5.4"
-          }
-        }
-      }
-    },
-    "@humanwhocodes/config-array": {
-      "version": "0.9.2",
-      "dev": true,
-      "requires": {
-        "@humanwhocodes/object-schema": "^1.2.1",
-        "debug": "^4.1.1",
-        "minimatch": "^3.0.4"
-      }
-    },
-    "@humanwhocodes/object-schema": {
-      "version": "1.2.1",
-      "dev": true
-    },
-    "@iarna/toml": {
-      "version": "2.2.5",
-      "dev": true
-    },
-    "@ipld/car": {
-      "version": "3.2.4",
-      "requires": {
-        "@ipld/dag-cbor": "^7.0.0",
-        "multiformats": "^9.5.4",
-        "varint": "^6.0.0"
-      },
-      "dependencies": {
-        "varint": {
-          "version": "6.0.0"
-        }
-      }
-    },
-    "@ipld/dag-cbor": {
-      "version": "7.0.2",
-      "requires": {
-        "cborg": "^1.6.0",
-        "multiformats": "^9.5.4"
-      }
-    },
-    "@ipld/dag-json": {
-      "version": "8.0.7",
-      "requires": {
-        "cborg": "^1.5.4",
-        "multiformats": "^9.5.4"
-      }
-    },
-    "@ipld/dag-pb": {
-      "version": "2.1.15",
-      "requires": {
-        "multiformats": "^9.5.4"
-      }
-    },
-    "@istanbuljs/load-nyc-config": {
-      "version": "1.1.0",
-      "dev": true,
-      "requires": {
-        "camelcase": "^5.3.1",
-        "find-up": "^4.1.0",
-        "get-package-type": "^0.1.0",
-        "js-yaml": "^3.13.1",
-        "resolve-from": "^5.0.0"
-      },
-      "dependencies": {
-        "resolve-from": {
-          "version": "5.0.0",
-          "dev": true
-        }
-      }
-    },
-    "@istanbuljs/schema": {
-      "version": "0.1.3",
-      "dev": true
-    },
-    "@jest/console": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "chalk": "^4.0.0",
-        "jest-message-util": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "slash": "^3.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "@jest/core": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/console": "^27.5.1",
-        "@jest/reporters": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "ansi-escapes": "^4.2.1",
-        "chalk": "^4.0.0",
-        "emittery": "^0.8.1",
-        "exit": "^0.1.2",
-        "graceful-fs": "^4.2.9",
-        "jest-changed-files": "^27.5.1",
-        "jest-config": "^27.5.1",
-        "jest-haste-map": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-resolve-dependencies": "^27.5.1",
-        "jest-runner": "^27.5.1",
-        "jest-runtime": "^27.5.1",
-        "jest-snapshot": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-validate": "^27.5.1",
-        "jest-watcher": "^27.5.1",
-        "micromatch": "^4.0.4",
-        "rimraf": "^3.0.0",
-        "slash": "^3.0.0",
-        "strip-ansi": "^6.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "strip-ansi": {
-          "version": "6.0.1",
-          "dev": true,
-          "requires": {
-            "ansi-regex": "^5.0.1"
-          }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "@jest/environment": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/fake-timers": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "jest-mock": "^27.5.1"
-      }
-    },
-    "@jest/fake-timers": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "@sinonjs/fake-timers": "^8.0.1",
-        "@types/node": "*",
-        "jest-message-util": "^27.5.1",
-        "jest-mock": "^27.5.1",
-        "jest-util": "^27.5.1"
-      }
-    },
-    "@jest/globals": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/environment": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "expect": "^27.5.1"
-      }
-    },
-    "@jest/reporters": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@bcoe/v8-coverage": "^0.2.3",
-        "@jest/console": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "chalk": "^4.0.0",
-        "collect-v8-coverage": "^1.0.0",
-        "exit": "^0.1.2",
-        "glob": "^7.1.2",
-        "graceful-fs": "^4.2.9",
-        "istanbul-lib-coverage": "^3.0.0",
-        "istanbul-lib-instrument": "^5.1.0",
-        "istanbul-lib-report": "^3.0.0",
-        "istanbul-lib-source-maps": "^4.0.0",
-        "istanbul-reports": "^3.1.3",
-        "jest-haste-map": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-worker": "^27.5.1",
-        "slash": "^3.0.0",
-        "source-map": "^0.6.0",
-        "string-length": "^4.0.1",
-        "terminal-link": "^2.0.0",
-        "v8-to-istanbul": "^8.1.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "@jest/source-map": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "callsites": "^3.0.0",
-        "graceful-fs": "^4.2.9",
-        "source-map": "^0.6.0"
-      }
-    },
-    "@jest/test-result": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/console": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/istanbul-lib-coverage": "^2.0.0",
-        "collect-v8-coverage": "^1.0.0"
-      }
-    },
-    "@jest/test-sequencer": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/test-result": "^27.5.1",
-        "graceful-fs": "^4.2.9",
-        "jest-haste-map": "^27.5.1",
-        "jest-runtime": "^27.5.1"
-      }
-    },
-    "@jest/transform": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@babel/core": "^7.1.0",
-        "@jest/types": "^27.5.1",
-        "babel-plugin-istanbul": "^6.1.1",
-        "chalk": "^4.0.0",
-        "convert-source-map": "^1.4.0",
-        "fast-json-stable-stringify": "^2.0.0",
-        "graceful-fs": "^4.2.9",
-        "jest-haste-map": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "micromatch": "^4.0.4",
-        "pirates": "^4.0.4",
-        "slash": "^3.0.0",
-        "source-map": "^0.6.1",
-        "write-file-atomic": "^3.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "@jest/types": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@types/istanbul-lib-coverage": "^2.0.0",
-        "@types/istanbul-reports": "^3.0.0",
-        "@types/node": "*",
-        "@types/yargs": "^16.0.0",
-        "chalk": "^4.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "@jridgewell/gen-mapping": {
-      "version": "0.1.1",
-      "dev": true,
-      "requires": {
-        "@jridgewell/set-array": "^1.0.0",
-        "@jridgewell/sourcemap-codec": "^1.4.10"
-      }
-    },
-    "@jridgewell/resolve-uri": {
-      "version": "3.1.0",
-      "dev": true
-    },
-    "@jridgewell/set-array": {
-      "version": "1.1.2",
-      "dev": true
-    },
-    "@jridgewell/sourcemap-codec": {
-      "version": "1.4.14",
-      "dev": true
-    },
-    "@jridgewell/trace-mapping": {
-      "version": "0.3.15",
-      "dev": true,
-      "requires": {
-        "@jridgewell/resolve-uri": "^3.0.3",
-        "@jridgewell/sourcemap-codec": "^1.4.10"
-      }
-    },
-    "@multiformats/murmur3": {
-      "version": "1.1.3",
-      "requires": {
-        "multiformats": "^9.5.4",
-        "murmurhash3js-revisited": "^3.0.0"
-      }
-    },
-    "@noble/ed25519": {
-      "version": "1.7.1",
-      "resolved": "https://registry.npmjs.org/@noble/ed25519/-/ed25519-1.7.1.tgz",
-      "integrity": "sha512-Rk4SkJFaXZiznFyC/t77Q0NKS4FL7TLJJsVG2V2oiEq3kJVeTdxysEe/yRWSpnWMe808XRDJ+VFh5pt/FN5plw=="
-    },
-    "@noble/secp256k1": {
-      "version": "1.4.0"
-    },
-    "@nodelib/fs.scandir": {
-      "version": "2.1.5",
-      "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
-      "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
-      "dev": true,
-      "requires": {
-        "@nodelib/fs.stat": "2.0.5",
-        "run-parallel": "^1.1.9"
-      }
-    },
-    "@nodelib/fs.stat": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
-      "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
-      "dev": true
-    },
-    "@nodelib/fs.walk": {
-      "version": "1.2.8",
-      "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
-      "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
-      "dev": true,
-      "requires": {
-        "@nodelib/fs.scandir": "2.1.5",
-        "fastq": "^1.6.0"
-      }
-    },
-    "@octokit/auth-token": {
-      "version": "2.4.5",
-      "requires": {
-        "@octokit/types": "^6.0.3"
-      }
-    },
-    "@octokit/core": {
-      "version": "3.6.0",
-      "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
-      "integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
-      "requires": {
-        "@octokit/auth-token": "^2.4.4",
-        "@octokit/graphql": "^4.5.8",
-        "@octokit/request": "^5.6.3",
-        "@octokit/request-error": "^2.0.5",
-        "@octokit/types": "^6.0.3",
-        "before-after-hook": "^2.2.0",
-        "universal-user-agent": "^6.0.0"
-      },
-      "dependencies": {
-        "@octokit/graphql": {
-          "version": "4.6.4",
-          "requires": {
-            "@octokit/request": "^5.6.0",
-            "@octokit/types": "^6.0.3",
-            "universal-user-agent": "^6.0.0"
-          }
-        }
-      }
-    },
-    "@octokit/endpoint": {
-      "version": "6.0.12",
-      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
-      "integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
-      "requires": {
-        "@octokit/types": "^6.0.3",
-        "is-plain-object": "^5.0.0",
-        "universal-user-agent": "^6.0.0"
-      }
-    },
-    "@octokit/graphql": {
-      "version": "5.0.5",
-      "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.5.tgz",
-      "integrity": "sha512-Qwfvh3xdqKtIznjX9lz2D458r7dJPP8l6r4GQkIdWQouZwHQK0mVT88uwiU2bdTU2OtT1uOlKpRciUWldpG0yQ==",
-      "dev": true,
-      "requires": {
-        "@octokit/request": "^6.0.0",
-        "@octokit/types": "^9.0.0",
-        "universal-user-agent": "^6.0.0"
-      },
-      "dependencies": {
-        "@octokit/endpoint": {
-          "version": "7.0.5",
-          "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
-          "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
-          "dev": true,
-          "requires": {
-            "@octokit/types": "^9.0.0",
-            "is-plain-object": "^5.0.0",
-            "universal-user-agent": "^6.0.0"
-          }
-        },
-        "@octokit/openapi-types": {
-          "version": "16.0.0",
-          "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz",
-          "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==",
-          "dev": true
-        },
-        "@octokit/request": {
-          "version": "6.2.3",
-          "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz",
-          "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==",
-          "dev": true,
-          "requires": {
-            "@octokit/endpoint": "^7.0.0",
-            "@octokit/request-error": "^3.0.0",
-            "@octokit/types": "^9.0.0",
-            "is-plain-object": "^5.0.0",
-            "node-fetch": "^2.6.7",
-            "universal-user-agent": "^6.0.0"
-          }
-        },
-        "@octokit/request-error": {
-          "version": "3.0.3",
-          "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz",
-          "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==",
-          "dev": true,
-          "requires": {
-            "@octokit/types": "^9.0.0",
-            "deprecation": "^2.0.0",
-            "once": "^1.4.0"
-          }
-        },
-        "@octokit/types": {
-          "version": "9.0.0",
-          "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz",
-          "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==",
-          "dev": true,
-          "requires": {
-            "@octokit/openapi-types": "^16.0.0"
-          }
-        }
-      }
-    },
-    "@octokit/openapi-types": {
-      "version": "12.11.0",
-      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
-      "integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
-    },
-    "@octokit/plugin-paginate-rest": {
-      "version": "2.21.3",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
-      "integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
-      "requires": {
-        "@octokit/types": "^6.40.0"
-      }
-    },
-    "@octokit/plugin-request-log": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz",
-      "integrity": "sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==",
-      "dev": true,
-      "requires": {}
-    },
-    "@octokit/plugin-rest-endpoint-methods": {
-      "version": "5.16.2",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
-      "integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
-      "requires": {
-        "@octokit/types": "^6.39.0",
-        "deprecation": "^2.3.1"
-      }
-    },
-    "@octokit/request": {
-      "version": "5.6.3",
-      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
-      "integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
-      "requires": {
-        "@octokit/endpoint": "^6.0.1",
-        "@octokit/request-error": "^2.1.0",
-        "@octokit/types": "^6.16.1",
-        "is-plain-object": "^5.0.0",
-        "node-fetch": "^2.6.7",
-        "universal-user-agent": "^6.0.0"
-      }
-    },
-    "@octokit/request-error": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
-      "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
-      "requires": {
-        "@octokit/types": "^6.0.3",
-        "deprecation": "^2.0.0",
-        "once": "^1.4.0"
-      }
-    },
-    "@octokit/rest": {
-      "version": "19.0.7",
-      "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-19.0.7.tgz",
-      "integrity": "sha512-HRtSfjrWmWVNp2uAkEpQnuGMJsu/+dBr47dRc5QVgsCbnIc1+GFEaoKBWkYG+zjrsHpSqcAElMio+n10c0b5JA==",
-      "dev": true,
-      "requires": {
-        "@octokit/core": "^4.1.0",
-        "@octokit/plugin-paginate-rest": "^6.0.0",
-        "@octokit/plugin-request-log": "^1.0.4",
-        "@octokit/plugin-rest-endpoint-methods": "^7.0.0"
-      },
-      "dependencies": {
-        "@octokit/auth-token": {
-          "version": "3.0.3",
-          "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.3.tgz",
-          "integrity": "sha512-/aFM2M4HVDBT/jjDBa84sJniv1t9Gm/rLkalaz9htOm+L+8JMj1k9w0CkUdcxNyNxZPlTxKPVko+m1VlM58ZVA==",
-          "dev": true,
-          "requires": {
-            "@octokit/types": "^9.0.0"
-          }
-        },
-        "@octokit/core": {
-          "version": "4.2.0",
-          "resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.0.tgz",
-          "integrity": "sha512-AgvDRUg3COpR82P7PBdGZF/NNqGmtMq2NiPqeSsDIeCfYFOZ9gddqWNQHnFdEUf+YwOj4aZYmJnlPp7OXmDIDg==",
-          "dev": true,
-          "requires": {
-            "@octokit/auth-token": "^3.0.0",
-            "@octokit/graphql": "^5.0.0",
-            "@octokit/request": "^6.0.0",
-            "@octokit/request-error": "^3.0.0",
-            "@octokit/types": "^9.0.0",
-            "before-after-hook": "^2.2.0",
-            "universal-user-agent": "^6.0.0"
-          }
-        },
-        "@octokit/endpoint": {
-          "version": "7.0.5",
-          "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.5.tgz",
-          "integrity": "sha512-LG4o4HMY1Xoaec87IqQ41TQ+glvIeTKqfjkCEmt5AIwDZJwQeVZFIEYXrYY6yLwK+pAScb9Gj4q+Nz2qSw1roA==",
-          "dev": true,
-          "requires": {
-            "@octokit/types": "^9.0.0",
-            "is-plain-object": "^5.0.0",
-            "universal-user-agent": "^6.0.0"
-          }
-        },
-        "@octokit/openapi-types": {
-          "version": "16.0.0",
-          "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-16.0.0.tgz",
-          "integrity": "sha512-JbFWOqTJVLHZSUUoF4FzAZKYtqdxWu9Z5m2QQnOyEa04fOFljvyh7D3GYKbfuaSWisqehImiVIMG4eyJeP5VEA==",
-          "dev": true
-        },
-        "@octokit/plugin-paginate-rest": {
-          "version": "6.0.0",
-          "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.0.0.tgz",
-          "integrity": "sha512-Sq5VU1PfT6/JyuXPyt04KZNVsFOSBaYOAq2QRZUwzVlI10KFvcbUo8lR258AAQL1Et60b0WuVik+zOWKLuDZxw==",
-          "dev": true,
-          "requires": {
-            "@octokit/types": "^9.0.0"
-          }
-        },
-        "@octokit/plugin-rest-endpoint-methods": {
-          "version": "7.0.1",
-          "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-7.0.1.tgz",
-          "integrity": "sha512-pnCaLwZBudK5xCdrR823xHGNgqOzRnJ/mpC/76YPpNP7DybdsJtP7mdOwh+wYZxK5jqeQuhu59ogMI4NRlBUvA==",
-          "dev": true,
-          "requires": {
-            "@octokit/types": "^9.0.0",
-            "deprecation": "^2.3.1"
-          }
-        },
-        "@octokit/request": {
-          "version": "6.2.3",
-          "resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.3.tgz",
-          "integrity": "sha512-TNAodj5yNzrrZ/VxP+H5HiYaZep0H3GU0O7PaF+fhDrt8FPrnkei9Aal/txsN/1P7V3CPiThG0tIvpPDYUsyAA==",
-          "dev": true,
-          "requires": {
-            "@octokit/endpoint": "^7.0.0",
-            "@octokit/request-error": "^3.0.0",
-            "@octokit/types": "^9.0.0",
-            "is-plain-object": "^5.0.0",
-            "node-fetch": "^2.6.7",
-            "universal-user-agent": "^6.0.0"
-          }
-        },
-        "@octokit/request-error": {
-          "version": "3.0.3",
-          "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz",
-          "integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==",
-          "dev": true,
-          "requires": {
-            "@octokit/types": "^9.0.0",
-            "deprecation": "^2.0.0",
-            "once": "^1.4.0"
-          }
-        },
-        "@octokit/types": {
-          "version": "9.0.0",
-          "resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.0.0.tgz",
-          "integrity": "sha512-LUewfj94xCMH2rbD5YJ+6AQ4AVjFYTgpp6rboWM5T7N3IsIF65SBEOVcYMGAEzO/kKNiNaW4LoWtoThOhH06gw==",
-          "dev": true,
-          "requires": {
-            "@octokit/openapi-types": "^16.0.0"
-          }
-        }
-      }
-    },
-    "@octokit/types": {
-      "version": "6.41.0",
-      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
-      "integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
-      "requires": {
-        "@octokit/openapi-types": "^12.11.0"
-      }
-    },
-    "@pinata/sdk": {
-      "version": "1.1.23",
-      "requires": {
-        "axios": "^0.21.1",
-        "base-path-converter": "^1.0.2",
-        "form-data": "^2.3.3",
-        "is-ipfs": "^0.6.0",
-        "recursive-fs": "^1.1.2"
-      },
-      "dependencies": {
-        "form-data": {
-          "version": "2.5.1",
-          "requires": {
-            "asynckit": "^0.4.0",
-            "combined-stream": "^1.0.6",
-            "mime-types": "^2.1.12"
-          }
-        }
-      }
-    },
-    "@pnpm/config.env-replace": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz",
-      "integrity": "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w==",
-      "dev": true
-    },
-    "@pnpm/network.ca-file": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/@pnpm/network.ca-file/-/network.ca-file-1.0.2.tgz",
-      "integrity": "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA==",
-      "dev": true,
-      "requires": {
-        "graceful-fs": "4.2.10"
-      }
-    },
-    "@pnpm/npm-conf": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/@pnpm/npm-conf/-/npm-conf-2.1.1.tgz",
-      "integrity": "sha512-yfRcuupmxxeDOSxvw4g+wFCrGiPD0L32f5WMzqMXp7Rl93EOCdFiDcaSNnZ10Up9GdNqkj70UTa8hfhPFphaZA==",
-      "dev": true,
-      "requires": {
-        "@pnpm/config.env-replace": "^1.1.0",
-        "@pnpm/network.ca-file": "^1.0.1",
-        "config-chain": "^1.1.11"
-      }
-    },
-    "@protobufjs/aspromise": {
-      "version": "1.1.2"
-    },
-    "@protobufjs/base64": {
-      "version": "1.1.2"
-    },
-    "@protobufjs/codegen": {
-      "version": "2.0.4"
-    },
-    "@protobufjs/eventemitter": {
-      "version": "1.1.0"
-    },
-    "@protobufjs/fetch": {
-      "version": "1.1.0",
-      "requires": {
-        "@protobufjs/aspromise": "^1.1.1",
-        "@protobufjs/inquire": "^1.1.0"
-      }
-    },
-    "@protobufjs/float": {
-      "version": "1.0.2"
-    },
-    "@protobufjs/inquire": {
-      "version": "1.1.0"
-    },
-    "@protobufjs/path": {
-      "version": "1.1.2"
-    },
-    "@protobufjs/pool": {
-      "version": "1.1.0"
-    },
-    "@protobufjs/utf8": {
-      "version": "1.1.0"
-    },
-    "@sindresorhus/is": {
-      "version": "5.3.0",
-      "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.3.0.tgz",
-      "integrity": "sha512-CX6t4SYQ37lzxicAqsBtxA3OseeoVrh9cSJ5PFYam0GksYlupRfy1A+Q4aYD3zvcfECLc0zO2u+ZnR2UYKvCrw==",
-      "dev": true
-    },
-    "@sinonjs/commons": {
-      "version": "1.8.3",
-      "dev": true,
-      "requires": {
-        "type-detect": "4.0.8"
-      }
-    },
-    "@sinonjs/fake-timers": {
-      "version": "8.1.0",
-      "dev": true,
-      "requires": {
-        "@sinonjs/commons": "^1.7.0"
-      }
-    },
-    "@szmarczak/http-timer": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-5.0.1.tgz",
-      "integrity": "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==",
-      "dev": true,
-      "requires": {
-        "defer-to-connect": "^2.0.1"
-      }
-    },
-    "@tootallnate/once": {
-      "version": "1.1.2",
-      "dev": true
-    },
-    "@types/babel__core": {
-      "version": "7.1.19",
-      "dev": true,
-      "requires": {
-        "@babel/parser": "^7.1.0",
-        "@babel/types": "^7.0.0",
-        "@types/babel__generator": "*",
-        "@types/babel__template": "*",
-        "@types/babel__traverse": "*"
-      }
-    },
-    "@types/babel__generator": {
-      "version": "7.6.4",
-      "dev": true,
-      "requires": {
-        "@babel/types": "^7.0.0"
-      }
-    },
-    "@types/babel__template": {
-      "version": "7.4.1",
-      "dev": true,
-      "requires": {
-        "@babel/parser": "^7.1.0",
-        "@babel/types": "^7.0.0"
-      }
-    },
-    "@types/babel__traverse": {
-      "version": "7.18.0",
-      "dev": true,
-      "requires": {
-        "@babel/types": "^7.3.0"
-      }
-    },
-    "@types/graceful-fs": {
-      "version": "4.1.5",
-      "dev": true,
-      "requires": {
-        "@types/node": "*"
-      }
-    },
-    "@types/http-cache-semantics": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz",
-      "integrity": "sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==",
-      "dev": true
-    },
-    "@types/istanbul-lib-coverage": {
-      "version": "2.0.4",
-      "dev": true
-    },
-    "@types/istanbul-lib-report": {
-      "version": "3.0.0",
-      "dev": true,
-      "requires": {
-        "@types/istanbul-lib-coverage": "*"
-      }
-    },
-    "@types/istanbul-reports": {
-      "version": "3.0.1",
-      "dev": true,
-      "requires": {
-        "@types/istanbul-lib-report": "*"
-      }
-    },
-    "@types/long": {
-      "version": "4.0.1"
-    },
-    "@types/minimatch": {
-      "version": "3.0.5"
-    },
-    "@types/minimist": {
-      "version": "1.2.2"
-    },
-    "@types/node": {
-      "version": "13.7.6"
-    },
-    "@types/normalize-package-data": {
-      "version": "2.4.1"
-    },
-    "@types/prettier": {
-      "version": "2.7.0",
-      "dev": true
-    },
-    "@types/retry": {
-      "version": "0.12.0"
-    },
-    "@types/stack-utils": {
-      "version": "2.0.1",
-      "dev": true
-    },
-    "@types/yargs": {
-      "version": "16.0.4",
-      "dev": true,
-      "requires": {
-        "@types/yargs-parser": "*"
-      }
-    },
-    "@types/yargs-parser": {
-      "version": "21.0.0",
-      "dev": true
-    },
-    "@web-std/blob": {
-      "version": "3.0.4",
-      "requires": {
-        "@web-std/stream": "1.0.0",
-        "web-encoding": "1.1.5"
-      }
-    },
-    "@web-std/fetch": {
-      "version": "3.0.3",
-      "requires": {
-        "@web-std/blob": "^3.0.3",
-        "@web-std/form-data": "^3.0.2",
-        "@web3-storage/multipart-parser": "^1.0.0",
-        "data-uri-to-buffer": "^3.0.1"
-      }
-    },
-    "@web-std/file": {
-      "version": "3.0.2",
-      "requires": {
-        "@web-std/blob": "^3.0.3"
-      }
-    },
-    "@web-std/form-data": {
-      "version": "3.0.2",
-      "requires": {
-        "web-encoding": "1.1.5"
-      }
-    },
-    "@web-std/stream": {
-      "version": "1.0.0",
-      "requires": {
-        "web-streams-polyfill": "^3.1.1"
-      }
-    },
-    "@web3-storage/multipart-parser": {
-      "version": "1.0.0"
-    },
-    "@zxing/text-encoding": {
-      "version": "0.9.0",
-      "optional": true
-    },
-    "abab": {
-      "version": "2.0.6",
-      "dev": true
-    },
-    "abort-controller": {
-      "version": "3.0.0",
-      "requires": {
-        "event-target-shim": "^5.0.0"
-      }
-    },
-    "acorn": {
-      "version": "8.8.0",
-      "dev": true
-    },
-    "acorn-globals": {
-      "version": "6.0.0",
-      "dev": true,
-      "requires": {
-        "acorn": "^7.1.1",
-        "acorn-walk": "^7.1.1"
-      },
-      "dependencies": {
-        "acorn": {
-          "version": "7.4.1",
-          "dev": true
-        }
-      }
-    },
-    "acorn-jsx": {
-      "version": "5.3.2",
-      "dev": true,
-      "requires": {}
-    },
-    "acorn-walk": {
-      "version": "7.2.0",
-      "dev": true
-    },
-    "agent-base": {
-      "version": "6.0.2",
-      "dev": true,
-      "requires": {
-        "debug": "4"
-      }
-    },
-    "ajv": {
-      "version": "6.12.6",
-      "dev": true,
-      "requires": {
-        "fast-deep-equal": "^3.1.1",
-        "fast-json-stable-stringify": "^2.0.0",
-        "json-schema-traverse": "^0.4.1",
-        "uri-js": "^4.2.2"
-      }
-    },
-    "ansi-align": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz",
-      "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==",
-      "dev": true,
-      "requires": {
-        "string-width": "^4.1.0"
-      }
-    },
-    "ansi-colors": {
-      "version": "4.1.1",
-      "dev": true
-    },
-    "ansi-escapes": {
-      "version": "4.3.0",
-      "dev": true,
-      "requires": {
-        "type-fest": "^0.8.1"
-      }
-    },
-    "ansi-regex": {
-      "version": "5.0.1",
-      "dev": true
-    },
-    "ansi-styles": {
-      "version": "3.2.1",
-      "requires": {
-        "color-convert": "^1.9.0"
-      }
-    },
-    "any-signal": {
-      "version": "2.1.2",
-      "requires": {
-        "abort-controller": "^3.0.0",
-        "native-abort-controller": "^1.0.3"
-      }
-    },
-    "anymatch": {
-      "version": "3.1.2",
-      "dev": true,
-      "requires": {
-        "normalize-path": "^3.0.0",
-        "picomatch": "^2.0.4"
-      }
-    },
-    "argparse": {
-      "version": "1.0.10",
-      "dev": true,
-      "requires": {
-        "sprintf-js": "~1.0.2"
-      }
-    },
-    "array.prototype.map": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.5.tgz",
-      "integrity": "sha512-gfaKntvwqYIuC7mLLyv2wzZIJqrRhn5PZ9EfFejSx6a78sV7iDsGpG9P+3oUPtm1Rerqm6nrKS4FYuTIvWfo3g==",
-      "dev": true,
-      "requires": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.4",
-        "es-abstract": "^1.20.4",
-        "es-array-method-boxes-properly": "^1.0.0",
-        "is-string": "^1.0.7"
-      }
-    },
-    "arrify": {
-      "version": "1.0.1"
-    },
-    "ast-types": {
-      "version": "0.13.4",
-      "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz",
-      "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==",
-      "dev": true,
-      "requires": {
-        "tslib": "^2.0.1"
-      }
-    },
-    "async-retry": {
-      "version": "1.3.3",
-      "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.3.3.tgz",
-      "integrity": "sha512-wfr/jstw9xNi/0teMHrRW7dsz3Lt5ARhYNZ2ewpadnhaIp5mbALhOAP+EAdsC7t4Z6wqsDVv9+W6gm1Dk9mEyw==",
-      "dev": true,
-      "requires": {
-        "retry": "0.13.1"
-      }
-    },
-    "asynckit": {
-      "version": "0.4.0"
-    },
-    "available-typed-arrays": {
-      "version": "1.0.5"
-    },
-    "axios": {
-      "version": "0.21.4",
-      "requires": {
-        "follow-redirects": "^1.14.0"
-      }
-    },
-    "babel-jest": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/babel__core": "^7.1.14",
-        "babel-plugin-istanbul": "^6.1.1",
-        "babel-preset-jest": "^27.5.1",
-        "chalk": "^4.0.0",
-        "graceful-fs": "^4.2.9",
-        "slash": "^3.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "babel-plugin-istanbul": {
-      "version": "6.1.1",
-      "dev": true,
-      "requires": {
-        "@babel/helper-plugin-utils": "^7.0.0",
-        "@istanbuljs/load-nyc-config": "^1.0.0",
-        "@istanbuljs/schema": "^0.1.2",
-        "istanbul-lib-instrument": "^5.0.4",
-        "test-exclude": "^6.0.0"
-      }
-    },
-    "babel-plugin-jest-hoist": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@babel/template": "^7.3.3",
-        "@babel/types": "^7.3.3",
-        "@types/babel__core": "^7.0.0",
-        "@types/babel__traverse": "^7.0.6"
-      }
-    },
-    "babel-preset-current-node-syntax": {
-      "version": "1.0.1",
-      "dev": true,
-      "requires": {
-        "@babel/plugin-syntax-async-generators": "^7.8.4",
-        "@babel/plugin-syntax-bigint": "^7.8.3",
-        "@babel/plugin-syntax-class-properties": "^7.8.3",
-        "@babel/plugin-syntax-import-meta": "^7.8.3",
-        "@babel/plugin-syntax-json-strings": "^7.8.3",
-        "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3",
-        "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
-        "@babel/plugin-syntax-numeric-separator": "^7.8.3",
-        "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
-        "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
-        "@babel/plugin-syntax-optional-chaining": "^7.8.3",
-        "@babel/plugin-syntax-top-level-await": "^7.8.3"
-      }
-    },
-    "babel-preset-jest": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "babel-plugin-jest-hoist": "^27.5.1",
-        "babel-preset-current-node-syntax": "^1.0.0"
-      }
-    },
-    "balanced-match": {
-      "version": "1.0.0"
-    },
-    "base-path-converter": {
-      "version": "1.0.2"
-    },
-    "base-x": {
-      "version": "3.0.8",
-      "requires": {
-        "safe-buffer": "^5.0.1"
-      }
-    },
-    "base64-js": {
-      "version": "1.5.1"
-    },
-    "before-after-hook": {
-      "version": "2.2.3",
-      "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
-      "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
-    },
-    "big-integer": {
-      "version": "1.6.51",
-      "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz",
-      "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==",
-      "dev": true
-    },
-    "bl": {
-      "version": "5.0.0",
-      "requires": {
-        "buffer": "^6.0.3",
-        "inherits": "^2.0.4",
-        "readable-stream": "^3.4.0"
-      }
-    },
-    "blob-to-it": {
-      "version": "1.0.4",
-      "requires": {
-        "browser-readablestream-to-it": "^1.0.3"
-      }
-    },
-    "blockstore-core": {
-      "version": "1.0.5",
-      "requires": {
-        "err-code": "^3.0.1",
-        "interface-blockstore": "^2.0.2",
-        "interface-store": "^2.0.1",
-        "it-all": "^1.0.4",
-        "it-drain": "^1.0.4",
-        "it-filter": "^1.0.2",
-        "it-take": "^1.0.1",
-        "multiformats": "^9.4.7"
-      }
-    },
-    "bowser": {
-      "version": "2.11.0"
-    },
-    "boxen": {
-      "version": "7.0.2",
-      "resolved": "https://registry.npmjs.org/boxen/-/boxen-7.0.2.tgz",
-      "integrity": "sha512-1Z4UJabXUP1/R9rLpoU3O2lEMnG3pPLAs/ZD2lF3t2q7qD5lM8rqbtnvtvm4N0wEyNlE+9yZVTVAGmd1V5jabg==",
-      "dev": true,
-      "requires": {
-        "ansi-align": "^3.0.1",
-        "camelcase": "^7.0.0",
-        "chalk": "^5.0.1",
-        "cli-boxes": "^3.0.0",
-        "string-width": "^5.1.2",
-        "type-fest": "^2.13.0",
-        "widest-line": "^4.0.1",
-        "wrap-ansi": "^8.0.1"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "6.2.1",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
-          "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
-          "dev": true
-        },
-        "camelcase": {
-          "version": "7.0.1",
-          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz",
-          "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==",
-          "dev": true
-        },
-        "chalk": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-          "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
-          "dev": true
-        },
-        "emoji-regex": {
-          "version": "9.2.2",
-          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
-          "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
-          "dev": true
-        },
-        "string-width": {
-          "version": "5.1.2",
-          "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
-          "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
-          "dev": true,
-          "requires": {
-            "eastasianwidth": "^0.2.0",
-            "emoji-regex": "^9.2.2",
-            "strip-ansi": "^7.0.1"
-          }
-        },
-        "type-fest": {
-          "version": "2.19.0",
-          "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
-          "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
-          "dev": true
-        },
-        "wrap-ansi": {
-          "version": "8.1.0",
-          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
-          "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^6.1.0",
-            "string-width": "^5.0.1",
-            "strip-ansi": "^7.0.1"
-          }
-        }
-      }
-    },
-    "bplist-parser": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz",
-      "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==",
-      "dev": true,
-      "requires": {
-        "big-integer": "^1.6.44"
-      }
-    },
-    "brace-expansion": {
-      "version": "1.1.11",
-      "requires": {
-        "balanced-match": "^1.0.0",
-        "concat-map": "0.0.1"
-      }
-    },
-    "braces": {
-      "version": "3.0.2",
-      "dev": true,
-      "requires": {
-        "fill-range": "^7.0.1"
-      }
-    },
-    "browser-process-hrtime": {
-      "version": "1.0.0",
-      "dev": true
-    },
-    "browser-readablestream-to-it": {
-      "version": "1.0.3"
-    },
-    "browserslist": {
-      "version": "4.21.3",
-      "dev": true,
-      "requires": {
-        "caniuse-lite": "^1.0.30001370",
-        "electron-to-chromium": "^1.4.202",
-        "node-releases": "^2.0.6",
-        "update-browserslist-db": "^1.0.5"
-      }
-    },
-    "bs58": {
-      "version": "4.0.1",
-      "requires": {
-        "base-x": "^3.0.2"
-      }
-    },
-    "bser": {
-      "version": "2.1.1",
-      "dev": true,
-      "requires": {
-        "node-int64": "^0.4.0"
-      }
-    },
-    "buffer": {
-      "version": "6.0.3",
-      "requires": {
-        "base64-js": "^1.3.1",
-        "ieee754": "^1.2.1"
-      }
-    },
-    "buffer-from": {
-      "version": "1.1.2",
-      "dev": true
-    },
-    "bundle-name": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz",
-      "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==",
-      "dev": true,
-      "requires": {
-        "run-applescript": "^5.0.0"
-      }
-    },
-    "bytes": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
-      "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
-      "dev": true
-    },
-    "cacheable-lookup": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz",
-      "integrity": "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==",
-      "dev": true
-    },
-    "cacheable-request": {
-      "version": "10.2.9",
-      "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-10.2.9.tgz",
-      "integrity": "sha512-CaAMr53AS1Tb9evO1BIWFnZjSr8A4pbXofpsNVWPMDZZj3ZQKHwsQG9BrTqQ4x5ZYJXz1T2b8LLtTZODxSpzbg==",
-      "dev": true,
-      "requires": {
-        "@types/http-cache-semantics": "^4.0.1",
-        "get-stream": "^6.0.1",
-        "http-cache-semantics": "^4.1.1",
-        "keyv": "^4.5.2",
-        "mimic-response": "^4.0.0",
-        "normalize-url": "^8.0.0",
-        "responselike": "^3.0.0"
-      }
-    },
-    "call-bind": {
-      "version": "1.0.2",
-      "requires": {
-        "function-bind": "^1.1.1",
-        "get-intrinsic": "^1.0.2"
-      }
-    },
-    "callsites": {
-      "version": "3.1.0",
-      "dev": true
-    },
-    "camelcase": {
-      "version": "5.3.1"
-    },
-    "camelcase-keys": {
-      "version": "6.2.2",
-      "requires": {
-        "camelcase": "^5.3.1",
-        "map-obj": "^4.0.0",
-        "quick-lru": "^4.0.1"
-      },
-      "dependencies": {
-        "quick-lru": {
-          "version": "4.0.1"
-        }
-      }
-    },
-    "caniuse-lite": {
-      "version": "1.0.30001382",
-      "dev": true
-    },
-    "carbites": {
-      "version": "1.0.6",
-      "requires": {
-        "@ipld/car": "^3.0.1",
-        "@ipld/dag-cbor": "^6.0.3",
-        "@ipld/dag-pb": "^2.0.2",
-        "multiformats": "^9.0.4"
-      },
-      "dependencies": {
-        "@ipld/dag-cbor": {
-          "version": "6.0.15",
-          "requires": {
-            "cborg": "^1.5.4",
-            "multiformats": "^9.5.4"
-          }
-        }
-      }
-    },
-    "cborg": {
-      "version": "1.6.1"
-    },
-    "chalk": {
-      "version": "2.4.2",
-      "requires": {
-        "ansi-styles": "^3.2.1",
-        "escape-string-regexp": "^1.0.5",
-        "supports-color": "^5.3.0"
-      }
-    },
-    "char-regex": {
-      "version": "1.0.2",
-      "dev": true
-    },
-    "chardet": {
-      "version": "0.7.0",
-      "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
-      "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
-      "dev": true
-    },
-    "ci-info": {
-      "version": "3.8.0",
-      "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",
-      "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==",
-      "dev": true
-    },
-    "cids": {
-      "version": "0.7.5",
-      "requires": {
-        "buffer": "^5.5.0",
-        "class-is": "^1.1.0",
-        "multibase": "~0.6.0",
-        "multicodec": "^1.0.0",
-        "multihashes": "~0.4.15"
-      },
-      "dependencies": {
-        "buffer": {
-          "version": "5.7.1",
-          "requires": {
-            "base64-js": "^1.3.1",
-            "ieee754": "^1.1.13"
-          }
-        }
-      }
-    },
-    "cjs-module-lexer": {
-      "version": "1.2.2",
-      "dev": true
-    },
-    "class-is": {
-      "version": "1.1.0"
-    },
-    "cli-boxes": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz",
-      "integrity": "sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==",
-      "dev": true
-    },
-    "cli-cursor": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz",
-      "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==",
-      "dev": true,
-      "requires": {
-        "restore-cursor": "^4.0.0"
-      }
-    },
-    "cli-spinners": {
-      "version": "2.8.0",
-      "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.8.0.tgz",
-      "integrity": "sha512-/eG5sJcvEIwxcdYM86k5tPwn0MUzkX5YY3eImTGpJOZgVe4SdTMY14vQpcxgBzJ0wXwAYrS8E+c3uHeK4JNyzQ==",
-      "dev": true
-    },
-    "cli-width": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.0.0.tgz",
-      "integrity": "sha512-ZksGS2xpa/bYkNzN3BAw1wEjsLV/ZKOf/CCrJ/QOBsxx6fOARIkwTutxp1XIOIohi6HKmOFjMoK/XaqDVUpEEw==",
-      "dev": true
-    },
-    "cliui": {
-      "version": "7.0.4",
-      "dev": true,
-      "requires": {
-        "string-width": "^4.2.0",
-        "strip-ansi": "^6.0.0",
-        "wrap-ansi": "^7.0.0"
-      },
-      "dependencies": {
-        "strip-ansi": {
-          "version": "6.0.1",
-          "dev": true,
-          "requires": {
-            "ansi-regex": "^5.0.1"
-          }
-        }
-      }
-    },
-    "clone": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
-      "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
-      "dev": true
-    },
-    "co": {
-      "version": "4.6.0",
-      "dev": true
-    },
-    "collect-v8-coverage": {
-      "version": "1.0.1",
-      "dev": true
-    },
-    "color-convert": {
-      "version": "1.9.3",
-      "requires": {
-        "color-name": "1.1.3"
-      }
-    },
-    "color-name": {
-      "version": "1.1.3"
-    },
-    "combined-stream": {
-      "version": "1.0.8",
-      "requires": {
-        "delayed-stream": "~1.0.0"
-      }
-    },
-    "concat-map": {
-      "version": "0.0.1"
-    },
-    "config-chain": {
-      "version": "1.1.13",
-      "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz",
-      "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==",
-      "dev": true,
-      "requires": {
-        "ini": "^1.3.4",
-        "proto-list": "~1.2.1"
-      },
-      "dependencies": {
-        "ini": {
-          "version": "1.3.8",
-          "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
-          "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
-          "dev": true
-        }
-      }
-    },
-    "configstore": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz",
-      "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==",
-      "dev": true,
-      "requires": {
-        "dot-prop": "^6.0.1",
-        "graceful-fs": "^4.2.6",
-        "unique-string": "^3.0.0",
-        "write-file-atomic": "^3.0.3",
-        "xdg-basedir": "^5.0.1"
-      }
-    },
-    "convert-source-map": {
-      "version": "1.8.0",
-      "dev": true,
-      "requires": {
-        "safe-buffer": "~5.1.1"
-      },
-      "dependencies": {
-        "safe-buffer": {
-          "version": "5.1.2",
-          "dev": true
-        }
-      }
-    },
-    "core-util-is": {
-      "version": "1.0.3",
-      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
-      "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
-      "dev": true
-    },
-    "cosmiconfig": {
-      "version": "8.1.3",
-      "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz",
-      "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==",
-      "dev": true,
-      "requires": {
-        "import-fresh": "^3.2.1",
-        "js-yaml": "^4.1.0",
-        "parse-json": "^5.0.0",
-        "path-type": "^4.0.0"
-      },
-      "dependencies": {
-        "argparse": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
-          "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
-          "dev": true
-        },
-        "js-yaml": {
-          "version": "4.1.0",
-          "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
-          "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
-          "dev": true,
-          "requires": {
-            "argparse": "^2.0.1"
-          }
-        }
-      }
-    },
-    "cross-spawn": {
-      "version": "7.0.3",
-      "dev": true,
-      "requires": {
-        "path-key": "^3.1.0",
-        "shebang-command": "^2.0.0",
-        "which": "^2.0.1"
-      }
-    },
-    "crypto-random-string": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz",
-      "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==",
-      "dev": true,
-      "requires": {
-        "type-fest": "^1.0.1"
-      },
-      "dependencies": {
-        "type-fest": {
-          "version": "1.4.0",
-          "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
-          "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
-          "dev": true
-        }
-      }
-    },
-    "cssom": {
-      "version": "0.4.4",
-      "dev": true
-    },
-    "cssstyle": {
-      "version": "2.3.0",
-      "dev": true,
-      "requires": {
-        "cssom": "~0.3.6"
-      },
-      "dependencies": {
-        "cssom": {
-          "version": "0.3.8",
-          "dev": true
-        }
-      }
-    },
-    "data-uri-to-buffer": {
-      "version": "3.0.1"
-    },
-    "data-urls": {
-      "version": "2.0.0",
-      "dev": true,
-      "requires": {
-        "abab": "^2.0.3",
-        "whatwg-mimetype": "^2.3.0",
-        "whatwg-url": "^8.0.0"
-      }
-    },
-    "debug": {
-      "version": "4.3.4",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
-      "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
-      "requires": {
-        "ms": "2.1.2"
-      }
-    },
-    "decamelize": {
-      "version": "1.2.0"
-    },
-    "decamelize-keys": {
-      "version": "1.1.0",
-      "requires": {
-        "decamelize": "^1.1.0",
-        "map-obj": "^1.0.0"
-      },
-      "dependencies": {
-        "map-obj": {
-          "version": "1.0.1"
-        }
-      }
-    },
-    "decimal.js": {
-      "version": "10.4.0",
-      "dev": true
-    },
-    "decompress-response": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
-      "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
-      "dev": true,
-      "requires": {
-        "mimic-response": "^3.1.0"
-      },
-      "dependencies": {
-        "mimic-response": {
-          "version": "3.1.0",
-          "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
-          "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
-          "dev": true
-        }
-      }
-    },
-    "dedent": {
-      "version": "0.7.0",
-      "dev": true
-    },
-    "deep-extend": {
-      "version": "0.6.0",
-      "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
-      "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
-      "dev": true
-    },
-    "deep-is": {
-      "version": "0.1.3",
-      "dev": true
-    },
-    "deepmerge": {
-      "version": "4.2.2",
-      "dev": true
-    },
-    "default-browser": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz",
-      "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==",
-      "dev": true,
-      "requires": {
-        "bundle-name": "^3.0.0",
-        "default-browser-id": "^3.0.0",
-        "execa": "^7.1.1",
-        "titleize": "^3.0.0"
-      },
-      "dependencies": {
-        "execa": {
-          "version": "7.1.1",
-          "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz",
-          "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==",
-          "dev": true,
-          "requires": {
-            "cross-spawn": "^7.0.3",
-            "get-stream": "^6.0.1",
-            "human-signals": "^4.3.0",
-            "is-stream": "^3.0.0",
-            "merge-stream": "^2.0.0",
-            "npm-run-path": "^5.1.0",
-            "onetime": "^6.0.0",
-            "signal-exit": "^3.0.7",
-            "strip-final-newline": "^3.0.0"
-          }
-        },
-        "human-signals": {
-          "version": "4.3.1",
-          "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",
-          "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==",
-          "dev": true
-        },
-        "is-stream": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
-          "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
-          "dev": true
-        },
-        "mimic-fn": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
-          "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
-          "dev": true
-        },
-        "npm-run-path": {
-          "version": "5.1.0",
-          "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",
-          "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",
-          "dev": true,
-          "requires": {
-            "path-key": "^4.0.0"
-          }
-        },
-        "onetime": {
-          "version": "6.0.0",
-          "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
-          "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
-          "dev": true,
-          "requires": {
-            "mimic-fn": "^4.0.0"
-          }
-        },
-        "path-key": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
-          "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
-          "dev": true
-        },
-        "strip-final-newline": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
-          "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
-          "dev": true
-        }
-      }
-    },
-    "default-browser-id": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz",
-      "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==",
-      "dev": true,
-      "requires": {
-        "bplist-parser": "^0.2.0",
-        "untildify": "^4.0.0"
-      }
-    },
-    "defaults": {
-      "version": "1.0.4",
-      "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
-      "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
-      "dev": true,
-      "requires": {
-        "clone": "^1.0.2"
-      }
-    },
-    "defer-to-connect": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz",
-      "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==",
-      "dev": true
-    },
-    "define-lazy-prop": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz",
-      "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==",
-      "dev": true
-    },
-    "define-properties": {
-      "version": "1.1.4",
-      "requires": {
-        "has-property-descriptors": "^1.0.0",
-        "object-keys": "^1.1.1"
-      }
-    },
-    "degenerator": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-3.0.2.tgz",
-      "integrity": "sha512-c0mef3SNQo56t6urUU6tdQAs+ThoD0o9B9MJ8HEt7NQcGEILCRFqQb7ZbP9JAv+QF1Ky5plydhMR/IrqWDm+TQ==",
-      "dev": true,
-      "requires": {
-        "ast-types": "^0.13.2",
-        "escodegen": "^1.8.1",
-        "esprima": "^4.0.0",
-        "vm2": "^3.9.8"
-      },
-      "dependencies": {
-        "escodegen": {
-          "version": "1.14.3",
-          "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz",
-          "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==",
-          "dev": true,
-          "requires": {
-            "esprima": "^4.0.1",
-            "estraverse": "^4.2.0",
-            "esutils": "^2.0.2",
-            "optionator": "^0.8.1",
-            "source-map": "~0.6.1"
-          }
-        },
-        "estraverse": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
-          "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
-          "dev": true
-        }
-      }
-    },
-    "delayed-stream": {
-      "version": "1.0.0"
-    },
-    "depd": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
-      "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
-      "dev": true
-    },
-    "deprecation": {
-      "version": "2.3.1"
-    },
-    "detect-newline": {
-      "version": "3.1.0",
-      "dev": true
-    },
-    "diff-sequences": {
-      "version": "27.5.1",
-      "dev": true
-    },
-    "dir-glob": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
-      "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
-      "dev": true,
-      "requires": {
-        "path-type": "^4.0.0"
-      }
-    },
-    "dns-over-http-resolver": {
-      "version": "1.2.3",
-      "requires": {
-        "debug": "^4.3.1",
-        "native-fetch": "^3.0.0",
-        "receptacle": "^1.3.2"
-      }
-    },
-    "doctrine": {
-      "version": "3.0.0",
-      "dev": true,
-      "requires": {
-        "esutils": "^2.0.2"
-      }
-    },
-    "domexception": {
-      "version": "2.0.1",
-      "dev": true,
-      "requires": {
-        "webidl-conversions": "^5.0.0"
-      },
-      "dependencies": {
-        "webidl-conversions": {
-          "version": "5.0.0",
-          "dev": true
-        }
-      }
-    },
-    "dot-prop": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
-      "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
-      "dev": true,
-      "requires": {
-        "is-obj": "^2.0.0"
-      }
-    },
-    "eastasianwidth": {
-      "version": "0.2.0",
-      "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
-      "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
-      "dev": true
-    },
-    "electron-fetch": {
-      "version": "1.7.4",
-      "requires": {
-        "encoding": "^0.1.13"
-      }
-    },
-    "electron-to-chromium": {
-      "version": "1.4.228",
-      "dev": true
-    },
-    "emittery": {
-      "version": "0.8.1",
-      "dev": true
-    },
-    "emoji-regex": {
-      "version": "8.0.0",
-      "dev": true
-    },
-    "encoding": {
-      "version": "0.1.13",
-      "requires": {
-        "iconv-lite": "^0.6.2"
-      },
-      "dependencies": {
-        "iconv-lite": {
-          "version": "0.6.3",
-          "requires": {
-            "safer-buffer": ">= 2.1.2 < 3.0.0"
-          }
-        }
-      }
-    },
-    "enquirer": {
-      "version": "2.3.6",
-      "dev": true,
-      "requires": {
-        "ansi-colors": "^4.1.1"
-      }
-    },
-    "entities": {
-      "version": "2.2.0"
-    },
-    "err-code": {
-      "version": "3.0.1"
-    },
-    "error-ex": {
-      "version": "1.3.2",
-      "requires": {
-        "is-arrayish": "^0.2.1"
-      }
-    },
-    "es-abstract": {
-      "version": "1.20.5",
-      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.20.5.tgz",
-      "integrity": "sha512-7h8MM2EQhsCA7pU/Nv78qOXFpD8Rhqd12gYiSJVkrH9+e8VuA8JlPJK/hQjjlLv6pJvx/z1iRFKzYb0XT/RuAQ==",
-      "requires": {
-        "call-bind": "^1.0.2",
-        "es-to-primitive": "^1.2.1",
-        "function-bind": "^1.1.1",
-        "function.prototype.name": "^1.1.5",
-        "get-intrinsic": "^1.1.3",
-        "get-symbol-description": "^1.0.0",
-        "gopd": "^1.0.1",
-        "has": "^1.0.3",
-        "has-property-descriptors": "^1.0.0",
-        "has-symbols": "^1.0.3",
-        "internal-slot": "^1.0.3",
-        "is-callable": "^1.2.7",
-        "is-negative-zero": "^2.0.2",
-        "is-regex": "^1.1.4",
-        "is-shared-array-buffer": "^1.0.2",
-        "is-string": "^1.0.7",
-        "is-weakref": "^1.0.2",
-        "object-inspect": "^1.12.2",
-        "object-keys": "^1.1.1",
-        "object.assign": "^4.1.4",
-        "regexp.prototype.flags": "^1.4.3",
-        "safe-regex-test": "^1.0.0",
-        "string.prototype.trimend": "^1.0.6",
-        "string.prototype.trimstart": "^1.0.6",
-        "unbox-primitive": "^1.0.2"
-      }
-    },
-    "es-array-method-boxes-properly": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",
-      "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==",
-      "dev": true
-    },
-    "es-get-iterator": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz",
-      "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==",
-      "dev": true,
-      "requires": {
-        "call-bind": "^1.0.2",
-        "get-intrinsic": "^1.1.3",
-        "has-symbols": "^1.0.3",
-        "is-arguments": "^1.1.1",
-        "is-map": "^2.0.2",
-        "is-set": "^2.0.2",
-        "is-string": "^1.0.7",
-        "isarray": "^2.0.5",
-        "stop-iteration-iterator": "^1.0.0"
-      }
-    },
-    "es-to-primitive": {
-      "version": "1.2.1",
-      "requires": {
-        "is-callable": "^1.1.4",
-        "is-date-object": "^1.0.1",
-        "is-symbol": "^1.0.2"
-      }
-    },
-    "escalade": {
-      "version": "3.1.1",
-      "dev": true
-    },
-    "escape-goat": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz",
-      "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==",
-      "dev": true
-    },
-    "escape-string-regexp": {
-      "version": "1.0.5"
-    },
-    "escodegen": {
-      "version": "2.0.0",
-      "dev": true,
-      "requires": {
-        "esprima": "^4.0.1",
-        "estraverse": "^5.2.0",
-        "esutils": "^2.0.2",
-        "optionator": "^0.8.1",
-        "source-map": "~0.6.1"
-      }
-    },
-    "eslint": {
-      "version": "8.6.0",
-      "dev": true,
-      "requires": {
-        "@eslint/eslintrc": "^1.0.5",
-        "@humanwhocodes/config-array": "^0.9.2",
-        "ajv": "^6.10.0",
-        "chalk": "^4.0.0",
-        "cross-spawn": "^7.0.2",
-        "debug": "^4.3.2",
-        "doctrine": "^3.0.0",
-        "enquirer": "^2.3.5",
-        "escape-string-regexp": "^4.0.0",
-        "eslint-scope": "^7.1.0",
-        "eslint-utils": "^3.0.0",
-        "eslint-visitor-keys": "^3.1.0",
-        "espree": "^9.3.0",
-        "esquery": "^1.4.0",
-        "esutils": "^2.0.2",
-        "fast-deep-equal": "^3.1.3",
-        "file-entry-cache": "^6.0.1",
-        "functional-red-black-tree": "^1.0.1",
-        "glob-parent": "^6.0.1",
-        "globals": "^13.6.0",
-        "ignore": "^4.0.6",
-        "import-fresh": "^3.0.0",
-        "imurmurhash": "^0.1.4",
-        "is-glob": "^4.0.0",
-        "js-yaml": "^4.1.0",
-        "json-stable-stringify-without-jsonify": "^1.0.1",
-        "levn": "^0.4.1",
-        "lodash.merge": "^4.6.2",
-        "minimatch": "^3.0.4",
-        "natural-compare": "^1.4.0",
-        "optionator": "^0.9.1",
-        "progress": "^2.0.0",
-        "regexpp": "^3.2.0",
-        "semver": "^7.2.1",
-        "strip-ansi": "^6.0.1",
-        "strip-json-comments": "^3.1.0",
-        "text-table": "^0.2.0",
-        "v8-compile-cache": "^2.0.3"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "argparse": {
-          "version": "2.0.1",
-          "dev": true
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "escape-string-regexp": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "glob-parent": {
-          "version": "6.0.2",
-          "dev": true,
-          "requires": {
-            "is-glob": "^4.0.3"
-          }
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "js-yaml": {
-          "version": "4.1.0",
-          "dev": true,
-          "requires": {
-            "argparse": "^2.0.1"
-          }
-        },
-        "levn": {
-          "version": "0.4.1",
-          "dev": true,
-          "requires": {
-            "prelude-ls": "^1.2.1",
-            "type-check": "~0.4.0"
-          }
-        },
-        "optionator": {
-          "version": "0.9.1",
-          "dev": true,
-          "requires": {
-            "deep-is": "^0.1.3",
-            "fast-levenshtein": "^2.0.6",
-            "levn": "^0.4.1",
-            "prelude-ls": "^1.2.1",
-            "type-check": "^0.4.0",
-            "word-wrap": "^1.2.3"
-          }
-        },
-        "prelude-ls": {
-          "version": "1.2.1",
-          "dev": true
-        },
-        "strip-ansi": {
-          "version": "6.0.1",
-          "dev": true,
-          "requires": {
-            "ansi-regex": "^5.0.1"
-          }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        },
-        "type-check": {
-          "version": "0.4.0",
-          "dev": true,
-          "requires": {
-            "prelude-ls": "^1.2.1"
-          }
-        }
-      }
-    },
-    "eslint-scope": {
-      "version": "7.1.0",
-      "dev": true,
-      "requires": {
-        "esrecurse": "^4.3.0",
-        "estraverse": "^5.2.0"
-      }
-    },
-    "eslint-utils": {
-      "version": "3.0.0",
-      "dev": true,
-      "requires": {
-        "eslint-visitor-keys": "^2.0.0"
-      },
-      "dependencies": {
-        "eslint-visitor-keys": {
-          "version": "2.1.0",
-          "dev": true
-        }
-      }
-    },
-    "eslint-visitor-keys": {
-      "version": "3.1.0",
-      "dev": true
-    },
-    "espree": {
-      "version": "9.3.0",
-      "dev": true,
-      "requires": {
-        "acorn": "^8.7.0",
-        "acorn-jsx": "^5.3.1",
-        "eslint-visitor-keys": "^3.1.0"
-      }
-    },
-    "esprima": {
-      "version": "4.0.1",
-      "dev": true
-    },
-    "esquery": {
-      "version": "1.4.0",
-      "dev": true,
-      "requires": {
-        "estraverse": "^5.1.0"
-      }
-    },
-    "esrecurse": {
-      "version": "4.3.0",
-      "dev": true,
-      "requires": {
-        "estraverse": "^5.2.0"
-      }
-    },
-    "estraverse": {
-      "version": "5.3.0",
-      "dev": true
-    },
-    "esutils": {
-      "version": "2.0.3",
-      "dev": true
-    },
-    "event-target-shim": {
-      "version": "5.0.1"
-    },
-    "events": {
-      "version": "3.3.0"
-    },
-    "execa": {
-      "version": "5.1.1",
-      "dev": true,
-      "requires": {
-        "cross-spawn": "^7.0.3",
-        "get-stream": "^6.0.0",
-        "human-signals": "^2.1.0",
-        "is-stream": "^2.0.0",
-        "merge-stream": "^2.0.0",
-        "npm-run-path": "^4.0.1",
-        "onetime": "^5.1.2",
-        "signal-exit": "^3.0.3",
-        "strip-final-newline": "^2.0.0"
-      }
-    },
-    "exit": {
-      "version": "0.1.2",
-      "dev": true
-    },
-    "expect": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "jest-matcher-utils": "^27.5.1",
-        "jest-message-util": "^27.5.1"
-      }
-    },
-    "external-editor": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
-      "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
-      "dev": true,
-      "requires": {
-        "chardet": "^0.7.0",
-        "iconv-lite": "^0.4.24",
-        "tmp": "^0.0.33"
-      }
-    },
-    "fast-deep-equal": {
-      "version": "3.1.3",
-      "dev": true
-    },
-    "fast-fifo": {
-      "version": "1.0.0"
-    },
-    "fast-glob": {
-      "version": "3.2.12",
-      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
-      "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
-      "dev": true,
-      "requires": {
-        "@nodelib/fs.stat": "^2.0.2",
-        "@nodelib/fs.walk": "^1.2.3",
-        "glob-parent": "^5.1.2",
-        "merge2": "^1.3.0",
-        "micromatch": "^4.0.4"
-      }
-    },
-    "fast-json-stable-stringify": {
-      "version": "2.1.0",
-      "dev": true
-    },
-    "fast-levenshtein": {
-      "version": "2.0.6",
-      "dev": true
-    },
-    "fast-xml-parser": {
-      "version": "3.19.0"
-    },
-    "fastq": {
-      "version": "1.15.0",
-      "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
-      "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
-      "dev": true,
-      "requires": {
-        "reusify": "^1.0.4"
-      }
-    },
-    "fb-watchman": {
-      "version": "2.0.1",
-      "dev": true,
-      "requires": {
-        "bser": "2.1.1"
-      }
-    },
-    "fetch-blob": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
-      "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
-      "dev": true,
-      "requires": {
-        "node-domexception": "^1.0.0",
-        "web-streams-polyfill": "^3.0.3"
-      }
-    },
-    "figures": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz",
-      "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==",
-      "dev": true,
-      "requires": {
-        "escape-string-regexp": "^5.0.0",
-        "is-unicode-supported": "^1.2.0"
-      },
-      "dependencies": {
-        "escape-string-regexp": {
-          "version": "5.0.0",
-          "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
-          "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
-          "dev": true
-        }
-      }
-    },
-    "file-entry-cache": {
-      "version": "6.0.1",
-      "dev": true,
-      "requires": {
-        "flat-cache": "^3.0.4"
-      }
-    },
-    "file-uri-to-path": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz",
-      "integrity": "sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==",
-      "dev": true
-    },
-    "files-from-path": {
-      "version": "0.2.6",
-      "resolved": "https://registry.npmjs.org/files-from-path/-/files-from-path-0.2.6.tgz",
-      "integrity": "sha512-Mz4UNkv+WcRLxcCXAORbfpwYiXI60SN9C1ZfeyGFv0xQUmblgbOkSWwFwX+Ov/TaR3FEyzwDyPnCQjpPRGSxKA==",
-      "requires": {
-        "err-code": "^3.0.1",
-        "graceful-fs": "^4.2.9",
-        "ipfs-unixfs": "^6.0.5",
-        "it-glob": "^0.0.13"
-      },
-      "dependencies": {
-        "it-glob": {
-          "version": "0.0.13",
-          "resolved": "https://registry.npmjs.org/it-glob/-/it-glob-0.0.13.tgz",
-          "integrity": "sha512-0Hcd5BraJUPzL28NWiFbdNrcdyNxNTKKdU3sjdFiYynNTQpwlG2UKW31X7bp+XhJwux/oPzIquo5ioztVmc2RQ==",
-          "requires": {
-            "@types/minimatch": "^3.0.4",
-            "minimatch": "^3.0.4"
-          }
-        }
-      }
-    },
-    "fill-range": {
-      "version": "7.0.1",
-      "dev": true,
-      "requires": {
-        "to-regex-range": "^5.0.1"
-      }
-    },
-    "find-up": {
-      "version": "4.1.0",
-      "requires": {
-        "locate-path": "^5.0.0",
-        "path-exists": "^4.0.0"
-      }
-    },
-    "flat-cache": {
-      "version": "3.0.4",
-      "dev": true,
-      "requires": {
-        "flatted": "^3.1.0",
-        "rimraf": "^3.0.2"
-      }
-    },
-    "flatted": {
-      "version": "3.2.4",
-      "dev": true
-    },
-    "follow-redirects": {
-      "version": "1.14.8"
-    },
-    "for-each": {
-      "version": "0.3.3",
-      "requires": {
-        "is-callable": "^1.1.3"
-      }
-    },
-    "form-data-encoder": {
-      "version": "2.1.4",
-      "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz",
-      "integrity": "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==",
-      "dev": true
-    },
-    "formdata-polyfill": {
-      "version": "4.0.10",
-      "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
-      "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
-      "dev": true,
-      "requires": {
-        "fetch-blob": "^3.1.2"
-      }
-    },
-    "fs-extra": {
-      "version": "8.1.0",
-      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
-      "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
-      "dev": true,
-      "requires": {
-        "graceful-fs": "^4.2.0",
-        "jsonfile": "^4.0.0",
-        "universalify": "^0.1.0"
-      },
-      "dependencies": {
-        "universalify": {
-          "version": "0.1.2",
-          "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
-          "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
-          "dev": true
-        }
-      }
-    },
-    "fs.realpath": {
-      "version": "1.0.0",
-      "dev": true
-    },
-    "ftp": {
-      "version": "0.3.10",
-      "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz",
-      "integrity": "sha512-faFVML1aBx2UoDStmLwv2Wptt4vw5x03xxX172nhA5Y5HBshW5JweqQ2W4xL4dezQTG8inJsuYcpPHHU3X5OTQ==",
-      "dev": true,
-      "requires": {
-        "readable-stream": "1.1.x",
-        "xregexp": "2.0.0"
-      },
-      "dependencies": {
-        "isarray": {
-          "version": "0.0.1",
-          "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
-          "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
-          "dev": true
-        },
-        "readable-stream": {
-          "version": "1.1.14",
-          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
-          "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
-          "dev": true,
-          "requires": {
-            "core-util-is": "~1.0.0",
-            "inherits": "~2.0.1",
-            "isarray": "0.0.1",
-            "string_decoder": "~0.10.x"
-          }
-        },
-        "string_decoder": {
-          "version": "0.10.31",
-          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
-          "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
-          "dev": true
-        }
-      }
-    },
-    "function-bind": {
-      "version": "1.1.1"
-    },
-    "function.prototype.name": {
-      "version": "1.1.5",
-      "requires": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.3",
-        "es-abstract": "^1.19.0",
-        "functions-have-names": "^1.2.2"
-      }
-    },
-    "functional-red-black-tree": {
-      "version": "1.0.1",
-      "dev": true
-    },
-    "functions-have-names": {
-      "version": "1.2.3"
-    },
-    "gensync": {
-      "version": "1.0.0-beta.2",
-      "dev": true
-    },
-    "get-caller-file": {
-      "version": "2.0.5",
-      "dev": true
-    },
-    "get-intrinsic": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.0.tgz",
-      "integrity": "sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==",
-      "requires": {
-        "function-bind": "^1.1.1",
-        "has": "^1.0.3",
-        "has-symbols": "^1.0.3"
-      }
-    },
-    "get-iterator": {
-      "version": "1.0.2"
-    },
-    "get-package-type": {
-      "version": "0.1.0",
-      "dev": true
-    },
-    "get-stream": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
-      "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
-      "dev": true
-    },
-    "get-symbol-description": {
-      "version": "1.0.0",
-      "requires": {
-        "call-bind": "^1.0.2",
-        "get-intrinsic": "^1.1.1"
-      }
-    },
-    "get-uri": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-3.0.2.tgz",
-      "integrity": "sha512-+5s0SJbGoyiJTZZ2JTpFPLMPSch72KEqGOTvQsBqg0RBWvwhWUSYZFAtz3TPW0GXJuLBJPts1E241iHg+VRfhg==",
-      "dev": true,
-      "requires": {
-        "@tootallnate/once": "1",
-        "data-uri-to-buffer": "3",
-        "debug": "4",
-        "file-uri-to-path": "2",
-        "fs-extra": "^8.1.0",
-        "ftp": "^0.3.10"
-      }
-    },
-    "git-up": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/git-up/-/git-up-7.0.0.tgz",
-      "integrity": "sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==",
-      "dev": true,
-      "requires": {
-        "is-ssh": "^1.4.0",
-        "parse-url": "^8.1.0"
-      }
-    },
-    "git-url-parse": {
-      "version": "13.1.0",
-      "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-13.1.0.tgz",
-      "integrity": "sha512-5FvPJP/70WkIprlUZ33bm4UAaFdjcLkJLpWft1BeZKqwR0uhhNGoKwlUaPtVb4LxCSQ++erHapRak9kWGj+FCA==",
-      "dev": true,
-      "requires": {
-        "git-up": "^7.0.0"
-      }
-    },
-    "glob": {
-      "version": "7.1.6",
-      "dev": true,
-      "requires": {
-        "fs.realpath": "^1.0.0",
-        "inflight": "^1.0.4",
-        "inherits": "2",
-        "minimatch": "^3.0.4",
-        "once": "^1.3.0",
-        "path-is-absolute": "^1.0.0"
-      }
-    },
-    "glob-parent": {
-      "version": "5.1.2",
-      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
-      "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
-      "dev": true,
-      "requires": {
-        "is-glob": "^4.0.1"
-      }
-    },
-    "global-dirs": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz",
-      "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==",
-      "dev": true,
-      "requires": {
-        "ini": "2.0.0"
-      }
-    },
-    "globals": {
-      "version": "13.12.0",
-      "dev": true,
-      "requires": {
-        "type-fest": "^0.20.2"
-      },
-      "dependencies": {
-        "type-fest": {
-          "version": "0.20.2",
-          "dev": true
-        }
-      }
-    },
-    "globby": {
-      "version": "13.1.3",
-      "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.3.tgz",
-      "integrity": "sha512-8krCNHXvlCgHDpegPzleMq07yMYTO2sXKASmZmquEYWEmCx6J5UTRbp5RwMJkTJGtcQ44YpiUYUiN0b9mzy8Bw==",
-      "dev": true,
-      "requires": {
-        "dir-glob": "^3.0.1",
-        "fast-glob": "^3.2.11",
-        "ignore": "^5.2.0",
-        "merge2": "^1.4.1",
-        "slash": "^4.0.0"
-      },
-      "dependencies": {
-        "ignore": {
-          "version": "5.2.4",
-          "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",
-          "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",
-          "dev": true
-        },
-        "slash": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
-          "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
-          "dev": true
-        }
-      }
-    },
-    "gopd": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
-      "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
-      "requires": {
-        "get-intrinsic": "^1.1.3"
-      }
-    },
-    "got": {
-      "version": "12.6.0",
-      "resolved": "https://registry.npmjs.org/got/-/got-12.6.0.tgz",
-      "integrity": "sha512-WTcaQ963xV97MN3x0/CbAriXFZcXCfgxVp91I+Ze6pawQOa7SgzwSx2zIJJsX+kTajMnVs0xcFD1TxZKFqhdnQ==",
-      "dev": true,
-      "requires": {
-        "@sindresorhus/is": "^5.2.0",
-        "@szmarczak/http-timer": "^5.0.1",
-        "cacheable-lookup": "^7.0.0",
-        "cacheable-request": "^10.2.8",
-        "decompress-response": "^6.0.0",
-        "form-data-encoder": "^2.1.2",
-        "get-stream": "^6.0.1",
-        "http2-wrapper": "^2.1.10",
-        "lowercase-keys": "^3.0.0",
-        "p-cancelable": "^3.0.0",
-        "responselike": "^3.0.0"
-      }
-    },
-    "graceful-fs": {
-      "version": "4.2.10"
-    },
-    "hamt-sharding": {
-      "version": "2.0.1",
-      "requires": {
-        "sparse-array": "^1.3.1",
-        "uint8arrays": "^3.0.0"
-      }
-    },
-    "hard-rejection": {
-      "version": "2.1.0"
-    },
-    "has": {
-      "version": "1.0.3",
-      "requires": {
-        "function-bind": "^1.1.1"
-      }
-    },
-    "has-bigints": {
-      "version": "1.0.2"
-    },
-    "has-flag": {
-      "version": "3.0.0"
-    },
-    "has-property-descriptors": {
-      "version": "1.0.0",
-      "requires": {
-        "get-intrinsic": "^1.1.1"
-      }
-    },
-    "has-symbols": {
-      "version": "1.0.3"
-    },
-    "has-tostringtag": {
-      "version": "1.0.0",
-      "requires": {
-        "has-symbols": "^1.0.2"
-      }
-    },
-    "has-yarn": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-3.0.0.tgz",
-      "integrity": "sha512-IrsVwUHhEULx3R8f/aA8AHuEzAorplsab/v8HBzEiIukwq5i/EC+xmOW+HfP1OaDP+2JkgT1yILHN2O3UFIbcA==",
-      "dev": true
-    },
-    "hosted-git-info": {
-      "version": "4.1.0",
-      "requires": {
-        "lru-cache": "^6.0.0"
-      }
-    },
-    "html-encoding-sniffer": {
-      "version": "2.0.1",
-      "dev": true,
-      "requires": {
-        "whatwg-encoding": "^1.0.5"
-      }
-    },
-    "html-escaper": {
-      "version": "2.0.2",
-      "dev": true
-    },
-    "http-cache-semantics": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
-      "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
-      "dev": true
-    },
-    "http-errors": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
-      "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
-      "dev": true,
-      "requires": {
-        "depd": "2.0.0",
-        "inherits": "2.0.4",
-        "setprototypeof": "1.2.0",
-        "statuses": "2.0.1",
-        "toidentifier": "1.0.1"
-      }
-    },
-    "http-proxy-agent": {
-      "version": "4.0.1",
-      "dev": true,
-      "requires": {
-        "@tootallnate/once": "1",
-        "agent-base": "6",
-        "debug": "4"
-      }
-    },
-    "http2-wrapper": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.0.tgz",
-      "integrity": "sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==",
-      "dev": true,
-      "requires": {
-        "quick-lru": "^5.1.1",
-        "resolve-alpn": "^1.2.0"
-      }
-    },
-    "https-proxy-agent": {
-      "version": "5.0.1",
-      "dev": true,
-      "requires": {
-        "agent-base": "6",
-        "debug": "4"
-      }
-    },
-    "human-signals": {
-      "version": "2.1.0",
-      "dev": true
-    },
-    "husky": {
-      "version": "8.0.1",
-      "dev": true
-    },
-    "iconv-lite": {
-      "version": "0.4.24",
-      "dev": true,
-      "requires": {
-        "safer-buffer": ">= 2.1.2 < 3"
-      }
-    },
-    "idb-keyval": {
-      "version": "6.2.0",
-      "requires": {
-        "safari-14-idb-fix": "^3.0.0"
-      }
-    },
-    "ieee754": {
-      "version": "1.2.1"
-    },
-    "ignore": {
-      "version": "4.0.6",
-      "dev": true
-    },
-    "import-fresh": {
-      "version": "3.2.1",
-      "dev": true,
-      "requires": {
-        "parent-module": "^1.0.0",
-        "resolve-from": "^4.0.0"
-      }
-    },
-    "import-lazy": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz",
-      "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==",
-      "dev": true
-    },
-    "import-local": {
-      "version": "3.1.0",
-      "dev": true,
-      "requires": {
-        "pkg-dir": "^4.2.0",
-        "resolve-cwd": "^3.0.0"
-      }
-    },
-    "imurmurhash": {
-      "version": "0.1.4",
-      "dev": true
-    },
-    "indent-string": {
-      "version": "4.0.0"
-    },
-    "inflight": {
-      "version": "1.0.6",
-      "dev": true,
-      "requires": {
-        "once": "^1.3.0",
-        "wrappy": "1"
-      }
-    },
-    "inherits": {
-      "version": "2.0.4"
-    },
-    "ini": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz",
-      "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==",
-      "dev": true
-    },
-    "inquirer": {
-      "version": "9.1.5",
-      "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.1.5.tgz",
-      "integrity": "sha512-3ygAIh8gcZavV9bj6MTdYddG2zPSYswP808fKS46NOwlF0zZljVpnLCHODDqItWJDbDpLb3aouAxGaJbkxoppA==",
-      "dev": true,
-      "requires": {
-        "ansi-escapes": "^6.0.0",
-        "chalk": "^5.2.0",
-        "cli-cursor": "^4.0.0",
-        "cli-width": "^4.0.0",
-        "external-editor": "^3.0.3",
-        "figures": "^5.0.0",
-        "lodash": "^4.17.21",
-        "mute-stream": "1.0.0",
-        "ora": "^6.1.2",
-        "run-async": "^2.4.0",
-        "rxjs": "^7.8.0",
-        "string-width": "^5.1.2",
-        "strip-ansi": "^7.0.1",
-        "through": "^2.3.6",
-        "wrap-ansi": "^8.1.0"
-      },
-      "dependencies": {
-        "ansi-escapes": {
-          "version": "6.1.0",
-          "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.1.0.tgz",
-          "integrity": "sha512-bQyg9bzRntwR/8b89DOEhGwctcwCrbWW/TuqTQnpqpy5Fz3aovcOTj5i8NJV6AHc8OGNdMaqdxAWww8pz2kiKg==",
-          "dev": true,
-          "requires": {
-            "type-fest": "^3.0.0"
-          }
-        },
-        "ansi-styles": {
-          "version": "6.2.1",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
-          "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
-          "dev": true
-        },
-        "chalk": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-          "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
-          "dev": true
-        },
-        "emoji-regex": {
-          "version": "9.2.2",
-          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
-          "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
-          "dev": true
-        },
-        "string-width": {
-          "version": "5.1.2",
-          "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
-          "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
-          "dev": true,
-          "requires": {
-            "eastasianwidth": "^0.2.0",
-            "emoji-regex": "^9.2.2",
-            "strip-ansi": "^7.0.1"
-          }
-        },
-        "type-fest": {
-          "version": "3.8.0",
-          "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.8.0.tgz",
-          "integrity": "sha512-FVNSzGQz9Th+/9R6Lvv7WIAkstylfHN2/JYxkyhhmKFYh9At2DST8t6L6Lref9eYO8PXFTfG9Sg1Agg0K3vq3Q==",
-          "dev": true
-        },
-        "wrap-ansi": {
-          "version": "8.1.0",
-          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
-          "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^6.1.0",
-            "string-width": "^5.0.1",
-            "strip-ansi": "^7.0.1"
-          }
-        }
-      }
-    },
-    "interface-blockstore": {
-      "version": "2.0.3",
-      "requires": {
-        "interface-store": "^2.0.2",
-        "multiformats": "^9.0.4"
-      }
-    },
-    "interface-datastore": {
-      "version": "6.0.3",
-      "requires": {
-        "interface-store": "^2.0.1",
-        "nanoid": "^3.0.2",
-        "uint8arrays": "^3.0.0"
-      }
-    },
-    "interface-store": {
-      "version": "2.0.2"
-    },
-    "internal-slot": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz",
-      "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==",
-      "requires": {
-        "get-intrinsic": "^1.2.0",
-        "has": "^1.0.3",
-        "side-channel": "^1.0.4"
-      }
-    },
-    "interpret": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz",
-      "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==",
-      "dev": true
-    },
-    "ip": {
-      "version": "1.1.8",
-      "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz",
-      "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==",
-      "dev": true
-    },
-    "ip-regex": {
-      "version": "4.1.0"
-    },
-    "ipfs-car": {
-      "version": "git+ssh://git@github.com/filebase/ipfs-car.git#0367a1eda3224ed3ebe52fcc83652005b1218cec",
-      "from": "ipfs-car@github:filebase/ipfs-car#cid-version-support-dist",
-      "requires": {
-        "@ipld/car": "^3.2.3",
-        "@web-std/blob": "^3.0.1",
-        "bl": "^5.0.0",
-        "blockstore-core": "^1.0.2",
-        "browser-readablestream-to-it": "^1.0.2",
-        "idb-keyval": "^6.0.3",
-        "interface-blockstore": "^2.0.2",
-        "ipfs-core-types": "^0.8.3",
-        "ipfs-core-utils": "^0.12.1",
-        "ipfs-unixfs-exporter": "^7.0.4",
-        "ipfs-unixfs-importer": "^9.0.4",
-        "ipfs-utils": "^9.0.2",
-        "it-all": "^1.0.5",
-        "it-last": "^1.0.5",
-        "it-pipe": "^1.1.0",
-        "meow": "^9.0.0",
-        "move-file": "^2.1.0",
-        "multiformats": "^9.6.3",
-        "stream-to-it": "^0.2.3",
-        "streaming-iterables": "^6.0.0",
-        "uint8arrays": "^3.0.0"
-      },
-      "dependencies": {
-        "ipfs-core-types": {
-          "version": "0.8.4",
-          "requires": {
-            "interface-datastore": "^6.0.2",
-            "multiaddr": "^10.0.0",
-            "multiformats": "^9.4.13"
-          }
-        },
-        "ipfs-core-utils": {
-          "version": "0.12.2",
-          "requires": {
-            "any-signal": "^2.1.2",
-            "blob-to-it": "^1.0.1",
-            "browser-readablestream-to-it": "^1.0.1",
-            "debug": "^4.1.1",
-            "err-code": "^3.0.1",
-            "ipfs-core-types": "^0.8.4",
-            "ipfs-unixfs": "^6.0.3",
-            "ipfs-utils": "^9.0.2",
-            "it-all": "^1.0.4",
-            "it-map": "^1.0.4",
-            "it-peekable": "^1.0.2",
-            "it-to-stream": "^1.0.0",
-            "merge-options": "^3.0.4",
-            "multiaddr": "^10.0.0",
-            "multiaddr-to-uri": "^8.0.0",
-            "multiformats": "^9.4.13",
-            "nanoid": "^3.1.23",
-            "parse-duration": "^1.0.0",
-            "timeout-abort-controller": "^1.1.1",
-            "uint8arrays": "^3.0.0"
-          }
-        },
-        "multiaddr": {
-          "version": "10.0.1",
-          "requires": {
-            "dns-over-http-resolver": "^1.2.3",
-            "err-code": "^3.0.1",
-            "is-ip": "^3.1.0",
-            "multiformats": "^9.4.5",
-            "uint8arrays": "^3.0.0",
-            "varint": "^6.0.0"
-          }
-        },
-        "retimer": {
-          "version": "2.0.0"
-        },
-        "timeout-abort-controller": {
-          "version": "1.1.1",
-          "requires": {
-            "abort-controller": "^3.0.0",
-            "retimer": "^2.0.0"
-          }
-        },
-        "varint": {
-          "version": "6.0.0"
-        }
-      }
-    },
-    "ipfs-core-types": {
-      "version": "0.9.0",
-      "requires": {
-        "interface-datastore": "^6.0.2",
-        "multiaddr": "^10.0.0",
-        "multiformats": "^9.4.13"
-      },
-      "dependencies": {
-        "multiaddr": {
-          "version": "10.0.1",
-          "requires": {
-            "dns-over-http-resolver": "^1.2.3",
-            "err-code": "^3.0.1",
-            "is-ip": "^3.1.0",
-            "multiformats": "^9.4.5",
-            "uint8arrays": "^3.0.0",
-            "varint": "^6.0.0"
-          }
-        },
-        "varint": {
-          "version": "6.0.0"
-        }
-      }
-    },
-    "ipfs-core-utils": {
-      "version": "0.13.0",
-      "requires": {
-        "any-signal": "^2.1.2",
-        "blob-to-it": "^1.0.1",
-        "browser-readablestream-to-it": "^1.0.1",
-        "debug": "^4.1.1",
-        "err-code": "^3.0.1",
-        "ipfs-core-types": "^0.9.0",
-        "ipfs-unixfs": "^6.0.3",
-        "ipfs-utils": "^9.0.2",
-        "it-all": "^1.0.4",
-        "it-map": "^1.0.4",
-        "it-peekable": "^1.0.2",
-        "it-to-stream": "^1.0.0",
-        "merge-options": "^3.0.4",
-        "multiaddr": "^10.0.0",
-        "multiaddr-to-uri": "^8.0.0",
-        "multiformats": "^9.4.13",
-        "nanoid": "^3.1.23",
-        "parse-duration": "^1.0.0",
-        "timeout-abort-controller": "^2.0.0",
-        "uint8arrays": "^3.0.0"
-      },
-      "dependencies": {
-        "multiaddr": {
-          "version": "10.0.1",
-          "requires": {
-            "dns-over-http-resolver": "^1.2.3",
-            "err-code": "^3.0.1",
-            "is-ip": "^3.1.0",
-            "multiformats": "^9.4.5",
-            "uint8arrays": "^3.0.0",
-            "varint": "^6.0.0"
-          }
-        },
-        "varint": {
-          "version": "6.0.0"
-        }
-      }
-    },
-    "ipfs-http-client": {
-      "version": "55.0.0",
-      "requires": {
-        "@ipld/dag-cbor": "^7.0.0",
-        "@ipld/dag-json": "^8.0.1",
-        "@ipld/dag-pb": "^2.1.3",
-        "abort-controller": "^3.0.0",
-        "any-signal": "^2.1.2",
-        "debug": "^4.1.1",
-        "err-code": "^3.0.1",
-        "ipfs-core-types": "^0.9.0",
-        "ipfs-core-utils": "^0.13.0",
-        "ipfs-utils": "^9.0.2",
-        "it-first": "^1.0.6",
-        "it-last": "^1.0.4",
-        "merge-options": "^3.0.4",
-        "multiaddr": "^10.0.0",
-        "multiformats": "^9.4.13",
-        "native-abort-controller": "^1.0.3",
-        "parse-duration": "^1.0.0",
-        "stream-to-it": "^0.2.2",
-        "uint8arrays": "^3.0.0"
-      },
-      "dependencies": {
-        "multiaddr": {
-          "version": "10.0.1",
-          "requires": {
-            "dns-over-http-resolver": "^1.2.3",
-            "err-code": "^3.0.1",
-            "is-ip": "^3.1.0",
-            "multiformats": "^9.4.5",
-            "uint8arrays": "^3.0.0",
-            "varint": "^6.0.0"
-          }
-        },
-        "varint": {
-          "version": "6.0.0"
-        }
-      }
-    },
-    "ipfs-unixfs": {
-      "version": "6.0.6",
-      "requires": {
-        "err-code": "^3.0.1",
-        "protobufjs": "^6.10.2"
-      }
-    },
-    "ipfs-unixfs-exporter": {
-      "version": "7.0.11",
-      "requires": {
-        "@ipld/dag-cbor": "^7.0.2",
-        "@ipld/dag-pb": "^2.0.2",
-        "@multiformats/murmur3": "^1.0.3",
-        "err-code": "^3.0.1",
-        "hamt-sharding": "^2.0.0",
-        "interface-blockstore": "^2.0.3",
-        "ipfs-unixfs": "^6.0.0",
-        "it-last": "^1.0.5",
-        "multiformats": "^9.4.2",
-        "uint8arrays": "^3.0.0"
-      }
-    },
-    "ipfs-unixfs-importer": {
-      "version": "9.0.10",
-      "requires": {
-        "@ipld/dag-pb": "^2.0.2",
-        "@multiformats/murmur3": "^1.0.3",
-        "bl": "^5.0.0",
-        "err-code": "^3.0.1",
-        "hamt-sharding": "^2.0.0",
-        "interface-blockstore": "^2.0.3",
-        "ipfs-unixfs": "^6.0.0",
-        "it-all": "^1.0.5",
-        "it-batch": "^1.0.8",
-        "it-first": "^1.0.6",
-        "it-parallel-batch": "^1.0.9",
-        "merge-options": "^3.0.4",
-        "multiformats": "^9.4.2",
-        "rabin-wasm": "^0.1.4",
-        "uint8arrays": "^3.0.0"
-      }
-    },
-    "ipfs-utils": {
-      "version": "9.0.4",
-      "requires": {
-        "any-signal": "^3.0.0",
-        "buffer": "^6.0.1",
-        "electron-fetch": "^1.7.2",
-        "err-code": "^3.0.1",
-        "is-electron": "^2.2.0",
-        "iso-url": "^1.1.5",
-        "it-glob": "^1.0.1",
-        "it-to-stream": "^1.0.0",
-        "merge-options": "^3.0.4",
-        "nanoid": "^3.1.20",
-        "native-fetch": "^3.0.0",
-        "node-fetch": "https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz",
-        "react-native-fetch-api": "^2.0.0",
-        "stream-to-it": "^0.2.2"
-      },
-      "dependencies": {
-        "any-signal": {
-          "version": "3.0.0"
-        },
-        "node-fetch": {
-          "version": "https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz",
-          "integrity": "sha512-iTASGs+HTFK5E4ZqcMsHmeJ4zodyq8L38lZV33jwqcBJYoUt3HjN4+ot+O9/0b+ke8ddE7UgOtVuZN/OkV19/g=="
-        }
-      }
-    },
-    "is-arguments": {
-      "version": "1.1.1",
-      "requires": {
-        "call-bind": "^1.0.2",
-        "has-tostringtag": "^1.0.0"
-      }
-    },
-    "is-arrayish": {
-      "version": "0.2.1"
-    },
-    "is-bigint": {
-      "version": "1.0.4",
-      "requires": {
-        "has-bigints": "^1.0.1"
-      }
-    },
-    "is-boolean-object": {
-      "version": "1.1.2",
-      "requires": {
-        "call-bind": "^1.0.2",
-        "has-tostringtag": "^1.0.0"
-      }
-    },
-    "is-callable": {
-      "version": "1.2.7",
-      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
-      "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA=="
-    },
-    "is-ci": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.1.tgz",
-      "integrity": "sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==",
-      "dev": true,
-      "requires": {
-        "ci-info": "^3.2.0"
-      }
-    },
-    "is-core-module": {
-      "version": "2.10.0",
-      "requires": {
-        "has": "^1.0.3"
-      }
-    },
-    "is-date-object": {
-      "version": "1.0.5",
-      "requires": {
-        "has-tostringtag": "^1.0.0"
-      }
-    },
-    "is-docker": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz",
-      "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==",
-      "dev": true
-    },
-    "is-electron": {
-      "version": "2.2.1"
-    },
-    "is-extglob": {
-      "version": "2.1.1",
-      "dev": true
-    },
-    "is-fullwidth-code-point": {
-      "version": "3.0.0",
-      "dev": true
-    },
-    "is-generator-fn": {
-      "version": "2.1.0",
-      "dev": true
-    },
-    "is-generator-function": {
-      "version": "1.0.10",
-      "requires": {
-        "has-tostringtag": "^1.0.0"
-      }
-    },
-    "is-glob": {
-      "version": "4.0.3",
-      "dev": true,
-      "requires": {
-        "is-extglob": "^2.1.1"
-      }
-    },
-    "is-inside-container": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz",
-      "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==",
-      "dev": true,
-      "requires": {
-        "is-docker": "^3.0.0"
-      }
-    },
-    "is-installed-globally": {
-      "version": "0.4.0",
-      "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz",
-      "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==",
-      "dev": true,
-      "requires": {
-        "global-dirs": "^3.0.0",
-        "is-path-inside": "^3.0.2"
-      }
-    },
-    "is-interactive": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz",
-      "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==",
-      "dev": true
-    },
-    "is-ip": {
-      "version": "3.1.0",
-      "requires": {
-        "ip-regex": "^4.0.0"
-      }
-    },
-    "is-ipfs": {
-      "version": "0.6.3",
-      "requires": {
-        "bs58": "^4.0.1",
-        "cids": "~0.7.0",
-        "mafmt": "^7.0.0",
-        "multiaddr": "^7.2.1",
-        "multibase": "~0.6.0",
-        "multihashes": "~0.4.13"
-      }
-    },
-    "is-map": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz",
-      "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==",
-      "dev": true
-    },
-    "is-negative-zero": {
-      "version": "2.0.2"
-    },
-    "is-npm": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-6.0.0.tgz",
-      "integrity": "sha512-JEjxbSmtPSt1c8XTkVrlujcXdKV1/tvuQ7GwKcAlyiVLeYFQ2VHat8xfrDJsIkhCdF/tZ7CiIR3sy141c6+gPQ==",
-      "dev": true
-    },
-    "is-number": {
-      "version": "7.0.0",
-      "dev": true
-    },
-    "is-number-object": {
-      "version": "1.0.7",
-      "requires": {
-        "has-tostringtag": "^1.0.0"
-      }
-    },
-    "is-obj": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
-      "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
-      "dev": true
-    },
-    "is-path-inside": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
-      "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
-      "dev": true
-    },
-    "is-plain-obj": {
-      "version": "2.1.0"
-    },
-    "is-plain-object": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
-      "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
-    },
-    "is-potential-custom-element-name": {
-      "version": "1.0.1",
-      "dev": true
-    },
-    "is-regex": {
-      "version": "1.1.4",
-      "requires": {
-        "call-bind": "^1.0.2",
-        "has-tostringtag": "^1.0.0"
-      }
-    },
-    "is-set": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
-      "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==",
-      "dev": true
-    },
-    "is-shared-array-buffer": {
-      "version": "1.0.2",
-      "requires": {
-        "call-bind": "^1.0.2"
-      }
-    },
-    "is-ssh": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.4.0.tgz",
-      "integrity": "sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ==",
-      "dev": true,
-      "requires": {
-        "protocols": "^2.0.1"
-      }
-    },
-    "is-stream": {
-      "version": "2.0.1",
-      "dev": true
-    },
-    "is-string": {
-      "version": "1.0.7",
-      "requires": {
-        "has-tostringtag": "^1.0.0"
-      }
-    },
-    "is-symbol": {
-      "version": "1.0.4",
-      "requires": {
-        "has-symbols": "^1.0.2"
-      }
-    },
-    "is-typed-array": {
-      "version": "1.1.9",
-      "requires": {
-        "available-typed-arrays": "^1.0.5",
-        "call-bind": "^1.0.2",
-        "es-abstract": "^1.20.0",
-        "for-each": "^0.3.3",
-        "has-tostringtag": "^1.0.0"
-      }
-    },
-    "is-typedarray": {
-      "version": "1.0.0",
-      "dev": true
-    },
-    "is-unicode-supported": {
-      "version": "1.3.0",
-      "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz",
-      "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==",
-      "dev": true
-    },
-    "is-weakref": {
-      "version": "1.0.2",
-      "requires": {
-        "call-bind": "^1.0.2"
-      }
-    },
-    "is-wsl": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
-      "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
-      "dev": true,
-      "requires": {
-        "is-docker": "^2.0.0"
-      },
-      "dependencies": {
-        "is-docker": {
-          "version": "2.2.1",
-          "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
-          "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
-          "dev": true
-        }
-      }
-    },
-    "is-yarn-global": {
-      "version": "0.4.1",
-      "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.4.1.tgz",
-      "integrity": "sha512-/kppl+R+LO5VmhYSEWARUFjodS25D68gvj8W7z0I7OWhUla5xWu8KL6CtB2V0R6yqhnRgbcaREMr4EEM6htLPQ==",
-      "dev": true
-    },
-    "isarray": {
-      "version": "2.0.5",
-      "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
-      "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
-      "dev": true
-    },
-    "isexe": {
-      "version": "2.0.0",
-      "dev": true
-    },
-    "iso-random-stream": {
-      "version": "2.0.0",
-      "requires": {
-        "events": "^3.3.0",
-        "readable-stream": "^3.4.0"
-      }
-    },
-    "iso-url": {
-      "version": "1.2.1"
-    },
-    "issue-parser": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/issue-parser/-/issue-parser-6.0.0.tgz",
-      "integrity": "sha512-zKa/Dxq2lGsBIXQ7CUZWTHfvxPC2ej0KfO7fIPqLlHB9J2hJ7rGhZ5rilhuufylr4RXYPzJUeFjKxz305OsNlA==",
-      "dev": true,
-      "requires": {
-        "lodash.capitalize": "^4.2.1",
-        "lodash.escaperegexp": "^4.1.2",
-        "lodash.isplainobject": "^4.0.6",
-        "lodash.isstring": "^4.0.1",
-        "lodash.uniqby": "^4.7.0"
-      }
-    },
-    "istanbul-lib-coverage": {
-      "version": "3.2.0",
-      "dev": true
-    },
-    "istanbul-lib-instrument": {
-      "version": "5.2.0",
-      "dev": true,
-      "requires": {
-        "@babel/core": "^7.12.3",
-        "@babel/parser": "^7.14.7",
-        "@istanbuljs/schema": "^0.1.2",
-        "istanbul-lib-coverage": "^3.2.0",
-        "semver": "^6.3.0"
-      },
-      "dependencies": {
-        "semver": {
-          "version": "6.3.0",
-          "dev": true
-        }
-      }
-    },
-    "istanbul-lib-report": {
-      "version": "3.0.0",
-      "dev": true,
-      "requires": {
-        "istanbul-lib-coverage": "^3.0.0",
-        "make-dir": "^3.0.0",
-        "supports-color": "^7.1.0"
-      },
-      "dependencies": {
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "istanbul-lib-source-maps": {
-      "version": "4.0.1",
-      "dev": true,
-      "requires": {
-        "debug": "^4.1.1",
-        "istanbul-lib-coverage": "^3.0.0",
-        "source-map": "^0.6.1"
-      }
-    },
-    "istanbul-reports": {
-      "version": "3.1.5",
-      "dev": true,
-      "requires": {
-        "html-escaper": "^2.0.0",
-        "istanbul-lib-report": "^3.0.0"
-      }
-    },
-    "it-all": {
-      "version": "1.0.6"
-    },
-    "it-batch": {
-      "version": "1.0.9"
-    },
-    "it-drain": {
-      "version": "1.0.5"
-    },
-    "it-filter": {
-      "version": "1.0.3"
-    },
-    "it-first": {
-      "version": "1.0.7"
-    },
-    "it-glob": {
-      "version": "1.0.2",
-      "requires": {
-        "@types/minimatch": "^3.0.4",
-        "minimatch": "^3.0.4"
-      }
-    },
-    "it-last": {
-      "version": "1.0.5"
-    },
-    "it-map": {
-      "version": "1.0.6"
-    },
-    "it-parallel-batch": {
-      "version": "1.0.10",
-      "requires": {
-        "it-batch": "^1.0.9"
-      }
-    },
-    "it-peekable": {
-      "version": "1.0.3"
-    },
-    "it-pipe": {
-      "version": "1.1.0"
-    },
-    "it-take": {
-      "version": "1.0.2"
-    },
-    "it-to-stream": {
-      "version": "1.0.0",
-      "requires": {
-        "buffer": "^6.0.3",
-        "fast-fifo": "^1.0.0",
-        "get-iterator": "^1.0.2",
-        "p-defer": "^3.0.0",
-        "p-fifo": "^1.0.0",
-        "readable-stream": "^3.6.0"
-      }
-    },
-    "iterate-iterator": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.2.tgz",
-      "integrity": "sha512-t91HubM4ZDQ70M9wqp+pcNpu8OyJ9UAtXntT/Bcsvp5tZMnz9vRa+IunKXeI8AnfZMTv0jNuVEmGeLSMjVvfPw==",
-      "dev": true
-    },
-    "iterate-value": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz",
-      "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==",
-      "dev": true,
-      "requires": {
-        "es-get-iterator": "^1.0.2",
-        "iterate-iterator": "^1.0.1"
-      }
-    },
-    "jest": {
-      "version": "27.0.4",
-      "dev": true,
-      "requires": {
-        "@jest/core": "^27.0.4",
-        "import-local": "^3.0.2",
-        "jest-cli": "^27.0.4"
-      }
-    },
-    "jest-changed-files": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "execa": "^5.0.0",
-        "throat": "^6.0.1"
-      }
-    },
-    "jest-circus": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/environment": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "chalk": "^4.0.0",
-        "co": "^4.6.0",
-        "dedent": "^0.7.0",
-        "expect": "^27.5.1",
-        "is-generator-fn": "^2.0.0",
-        "jest-each": "^27.5.1",
-        "jest-matcher-utils": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-runtime": "^27.5.1",
-        "jest-snapshot": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "pretty-format": "^27.5.1",
-        "slash": "^3.0.0",
-        "stack-utils": "^2.0.3",
-        "throat": "^6.0.1"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "jest-cli": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/core": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "chalk": "^4.0.0",
-        "exit": "^0.1.2",
-        "graceful-fs": "^4.2.9",
-        "import-local": "^3.0.2",
-        "jest-config": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-validate": "^27.5.1",
-        "prompts": "^2.0.1",
-        "yargs": "^16.2.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "jest-config": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@babel/core": "^7.8.0",
-        "@jest/test-sequencer": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "babel-jest": "^27.5.1",
-        "chalk": "^4.0.0",
-        "ci-info": "^3.2.0",
-        "deepmerge": "^4.2.2",
-        "glob": "^7.1.1",
-        "graceful-fs": "^4.2.9",
-        "jest-circus": "^27.5.1",
-        "jest-environment-jsdom": "^27.5.1",
-        "jest-environment-node": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "jest-jasmine2": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-runner": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-validate": "^27.5.1",
-        "micromatch": "^4.0.4",
-        "parse-json": "^5.2.0",
-        "pretty-format": "^27.5.1",
-        "slash": "^3.0.0",
-        "strip-json-comments": "^3.1.1"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "jest-diff": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "chalk": "^4.0.0",
-        "diff-sequences": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "pretty-format": "^27.5.1"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "jest-docblock": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "detect-newline": "^3.0.0"
-      }
-    },
-    "jest-each": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "chalk": "^4.0.0",
-        "jest-get-type": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "pretty-format": "^27.5.1"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "jest-environment-jsdom": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/environment": "^27.5.1",
-        "@jest/fake-timers": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "jest-mock": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jsdom": "^16.6.0"
-      }
-    },
-    "jest-environment-node": {
-      "version": "27.5.1",
+    "node_modules/jest-validate/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "requires": {
-        "@jest/environment": "^27.5.1",
-        "@jest/fake-timers": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "jest-mock": "^27.5.1",
-        "jest-util": "^27.5.1"
+      "dependencies": {
+        "color-name": "~1.1.4"
+      },
+      "engines": {
+        "node": ">=7.0.0"
       }
     },
-    "jest-get-type": {
-      "version": "27.5.1",
+    "node_modules/jest-validate/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
       "dev": true
     },
-    "jest-haste-map": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "@types/graceful-fs": "^4.1.2",
-        "@types/node": "*",
-        "anymatch": "^3.0.3",
-        "fb-watchman": "^2.0.0",
-        "fsevents": "^2.3.2",
-        "graceful-fs": "^4.2.9",
-        "jest-regex-util": "^27.5.1",
-        "jest-serializer": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-worker": "^27.5.1",
-        "micromatch": "^4.0.4",
-        "walker": "^1.0.7"
-      }
-    },
-    "jest-jasmine2": {
-      "version": "27.5.1",
+    "node_modules/jest-validate/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "requires": {
-        "@jest/environment": "^27.5.1",
-        "@jest/source-map": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "chalk": "^4.0.0",
-        "co": "^4.6.0",
-        "expect": "^27.5.1",
-        "is-generator-fn": "^2.0.0",
-        "jest-each": "^27.5.1",
-        "jest-matcher-utils": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-runtime": "^27.5.1",
-        "jest-snapshot": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "pretty-format": "^27.5.1",
-        "throat": "^6.0.1"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+      "engines": {
+        "node": ">=8"
       }
     },
-    "jest-leak-detector": {
-      "version": "27.5.1",
+    "node_modules/jest-validate/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "requires": {
-        "jest-get-type": "^27.5.1",
-        "pretty-format": "^27.5.1"
+      "dependencies": {
+        "has-flag": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "jest-matcher-utils": {
-      "version": "27.5.1",
+    "node_modules/jest-watcher": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz",
+      "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==",
       "dev": true,
-      "requires": {
+      "dependencies": {
+        "@jest/test-result": "^29.7.0",
+        "@jest/types": "^29.6.3",
+        "@types/node": "*",
+        "ansi-escapes": "^4.2.1",
         "chalk": "^4.0.0",
-        "jest-diff": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "pretty-format": "^27.5.1"
+        "emittery": "^0.13.1",
+        "jest-util": "^29.7.0",
+        "string-length": "^4.0.1"
       },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "jest-message-util": {
-      "version": "27.5.1",
+    "node_modules/jest-watcher/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
       "dev": true,
-      "requires": {
-        "@babel/code-frame": "^7.12.13",
-        "@jest/types": "^27.5.1",
-        "@types/stack-utils": "^2.0.0",
-        "chalk": "^4.0.0",
-        "graceful-fs": "^4.2.9",
-        "micromatch": "^4.0.4",
-        "pretty-format": "^27.5.1",
-        "slash": "^3.0.0",
-        "stack-utils": "^2.0.3"
-      },
       "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+        "color-convert": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "jest-mock": {
-      "version": "27.5.1",
+    "node_modules/jest-watcher/node_modules/chalk": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+      "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
       "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "@types/node": "*"
+      "dependencies": {
+        "ansi-styles": "^4.1.0",
+        "supports-color": "^7.1.0"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "jest-pnp-resolver": {
-      "version": "1.2.2",
-      "dev": true,
-      "requires": {}
-    },
-    "jest-regex-util": {
-      "version": "27.5.1",
-      "dev": true
-    },
-    "jest-resolve": {
-      "version": "27.5.1",
+    "node_modules/jest-watcher/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
       "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "chalk": "^4.0.0",
-        "graceful-fs": "^4.2.9",
-        "jest-haste-map": "^27.5.1",
-        "jest-pnp-resolver": "^1.2.2",
-        "jest-util": "^27.5.1",
-        "jest-validate": "^27.5.1",
-        "resolve": "^1.20.0",
-        "resolve.exports": "^1.1.0",
-        "slash": "^3.0.0"
-      },
       "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+        "color-name": "~1.1.4"
+      },
+      "engines": {
+        "node": ">=7.0.0"
       }
     },
-    "jest-resolve-dependencies": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-snapshot": "^27.5.1"
-      }
+    "node_modules/jest-watcher/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
     },
-    "jest-runner": {
-      "version": "27.5.1",
+    "node_modules/jest-watcher/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "requires": {
-        "@jest/console": "^27.5.1",
-        "@jest/environment": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "chalk": "^4.0.0",
-        "emittery": "^0.8.1",
-        "graceful-fs": "^4.2.9",
-        "jest-docblock": "^27.5.1",
-        "jest-environment-jsdom": "^27.5.1",
-        "jest-environment-node": "^27.5.1",
-        "jest-haste-map": "^27.5.1",
-        "jest-leak-detector": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-runtime": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "jest-worker": "^27.5.1",
-        "source-map-support": "^0.5.6",
-        "throat": "^6.0.1"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+      "engines": {
+        "node": ">=8"
       }
     },
-    "jest-runtime": {
-      "version": "27.5.1",
+    "node_modules/jest-watcher/node_modules/supports-color": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+      "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
       "dev": true,
-      "requires": {
-        "@jest/environment": "^27.5.1",
-        "@jest/fake-timers": "^27.5.1",
-        "@jest/globals": "^27.5.1",
-        "@jest/source-map": "^27.5.1",
-        "@jest/test-result": "^27.5.1",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "chalk": "^4.0.0",
-        "cjs-module-lexer": "^1.0.0",
-        "collect-v8-coverage": "^1.0.0",
-        "execa": "^5.0.0",
-        "glob": "^7.1.3",
-        "graceful-fs": "^4.2.9",
-        "jest-haste-map": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-mock": "^27.5.1",
-        "jest-regex-util": "^27.5.1",
-        "jest-resolve": "^27.5.1",
-        "jest-snapshot": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "slash": "^3.0.0",
-        "strip-bom": "^4.0.0"
-      },
       "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "jest-serializer": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@types/node": "*",
-        "graceful-fs": "^4.2.9"
-      }
-    },
-    "jest-snapshot": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@babel/core": "^7.7.2",
-        "@babel/generator": "^7.7.2",
-        "@babel/plugin-syntax-typescript": "^7.7.2",
-        "@babel/traverse": "^7.7.2",
-        "@babel/types": "^7.0.0",
-        "@jest/transform": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/babel__traverse": "^7.0.4",
-        "@types/prettier": "^2.1.5",
-        "babel-preset-current-node-syntax": "^1.0.0",
-        "chalk": "^4.0.0",
-        "expect": "^27.5.1",
-        "graceful-fs": "^4.2.9",
-        "jest-diff": "^27.5.1",
-        "jest-get-type": "^27.5.1",
-        "jest-haste-map": "^27.5.1",
-        "jest-matcher-utils": "^27.5.1",
-        "jest-message-util": "^27.5.1",
-        "jest-util": "^27.5.1",
-        "natural-compare": "^1.4.0",
-        "pretty-format": "^27.5.1",
-        "semver": "^7.3.2"
+        "has-flag": "^4.0.0"
       },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+      "engines": {
+        "node": ">=8"
       }
     },
-    "jest-util": {
-      "version": "27.5.1",
+    "node_modules/jest-worker": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz",
+      "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==",
       "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
+      "dependencies": {
         "@types/node": "*",
-        "chalk": "^4.0.0",
-        "ci-info": "^3.2.0",
-        "graceful-fs": "^4.2.9",
-        "picomatch": "^2.2.3"
+        "jest-util": "^29.7.0",
+        "merge-stream": "^2.0.0",
+        "supports-color": "^8.0.0"
       },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
       }
     },
-    "jest-validate": {
-      "version": "27.5.1",
+    "node_modules/jest-worker/node_modules/has-flag": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+      "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
       "dev": true,
-      "requires": {
-        "@jest/types": "^27.5.1",
-        "camelcase": "^6.2.0",
-        "chalk": "^4.0.0",
-        "jest-get-type": "^27.5.1",
-        "leven": "^3.1.0",
-        "pretty-format": "^27.5.1"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "camelcase": {
-          "version": "6.3.0",
-          "dev": true
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+      "engines": {
+        "node": ">=8"
       }
     },
-    "jest-watcher": {
-      "version": "27.5.1",
+    "node_modules/jest-worker/node_modules/supports-color": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
+      "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
       "dev": true,
-      "requires": {
-        "@jest/test-result": "^27.5.1",
-        "@jest/types": "^27.5.1",
-        "@types/node": "*",
-        "ansi-escapes": "^4.2.1",
-        "chalk": "^4.0.0",
-        "jest-util": "^27.5.1",
-        "string-length": "^4.0.1"
-      },
       "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "dev": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
-    "jest-worker": {
-      "version": "27.5.1",
-      "dev": true,
-      "requires": {
-        "@types/node": "*",
-        "merge-stream": "^2.0.0",
-        "supports-color": "^8.0.0"
+        "has-flag": "^4.0.0"
       },
-      "dependencies": {
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "8.1.1",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/supports-color?sponsor=1"
       }
     },
-    "js-tokens": {
-      "version": "4.0.0"
+    "node_modules/js-tokens": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+      "dev": true
     },
-    "js-yaml": {
+    "node_modules/js-yaml": {
       "version": "3.14.1",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+      "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "argparse": "^1.0.7",
         "esprima": "^4.0.0"
+      },
+      "bin": {
+        "js-yaml": "bin/js-yaml.js"
       }
     },
-    "jsdom": {
-      "version": "16.7.0",
-      "dev": true,
-      "requires": {
-        "abab": "^2.0.5",
-        "acorn": "^8.2.4",
-        "acorn-globals": "^6.0.0",
-        "cssom": "^0.4.4",
-        "cssstyle": "^2.3.0",
-        "data-urls": "^2.0.0",
-        "decimal.js": "^10.2.1",
-        "domexception": "^2.0.1",
-        "escodegen": "^2.0.0",
-        "form-data": "^3.0.0",
-        "html-encoding-sniffer": "^2.0.1",
-        "http-proxy-agent": "^4.0.1",
-        "https-proxy-agent": "^5.0.0",
-        "is-potential-custom-element-name": "^1.0.1",
-        "nwsapi": "^2.2.0",
-        "parse5": "6.0.1",
-        "saxes": "^5.0.1",
-        "symbol-tree": "^3.2.4",
-        "tough-cookie": "^4.0.0",
-        "w3c-hr-time": "^1.0.2",
-        "w3c-xmlserializer": "^2.0.0",
-        "webidl-conversions": "^6.1.0",
-        "whatwg-encoding": "^1.0.5",
-        "whatwg-mimetype": "^2.3.0",
-        "whatwg-url": "^8.5.0",
-        "ws": "^7.4.6",
-        "xml-name-validator": "^3.0.0"
-      },
-      "dependencies": {
-        "form-data": {
-          "version": "3.0.1",
-          "dev": true,
-          "requires": {
-            "asynckit": "^0.4.0",
-            "combined-stream": "^1.0.8",
-            "mime-types": "^2.1.12"
-          }
-        }
-      }
-    },
-    "jsesc": {
+    "node_modules/jsesc": {
       "version": "2.5.2",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+      "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+      "dev": true,
+      "bin": {
+        "jsesc": "bin/jsesc"
+      },
+      "engines": {
+        "node": ">=4"
+      }
     },
-    "json-buffer": {
+    "node_modules/json-buffer": {
       "version": "3.0.1",
       "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
       "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
       "dev": true
     },
-    "json-parse-even-better-errors": {
-      "version": "2.3.1"
+    "node_modules/json-parse-even-better-errors": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+      "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
+      "dev": true,
+      "license": "MIT"
     },
-    "json-schema-traverse": {
+    "node_modules/json-schema-traverse": {
       "version": "0.4.1",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+      "dev": true,
+      "license": "MIT"
     },
-    "json-stable-stringify-without-jsonify": {
+    "node_modules/json-stable-stringify-without-jsonify": {
       "version": "1.0.1",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+      "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+      "dev": true,
+      "license": "MIT"
     },
-    "json5": {
+    "node_modules/json5": {
       "version": "2.2.3",
       "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
       "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
-      "dev": true
+      "dev": true,
+      "bin": {
+        "json5": "lib/cli.js"
+      },
+      "engines": {
+        "node": ">=6"
+      }
     },
-    "jsonfile": {
+    "node_modules/jsonfile": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
       "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==",
       "dev": true,
-      "requires": {
+      "optionalDependencies": {
         "graceful-fs": "^4.1.6"
       }
     },
-    "keyv": {
-      "version": "4.5.2",
-      "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.2.tgz",
-      "integrity": "sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==",
+    "node_modules/just-debounce-it": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/just-debounce-it/-/just-debounce-it-3.2.0.tgz",
+      "integrity": "sha512-WXzwLL0745uNuedrCsCs3rpmfD6DBaf7uuVwaq98/8dafURfgQaBsSpjiPp5+CW6Vjltwy9cOGI6qE71b3T8iQ=="
+    },
+    "node_modules/keyv": {
+      "version": "4.5.4",
+      "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+      "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "json-buffer": "3.0.1"
       }
     },
-    "kind-of": {
-      "version": "6.0.3"
-    },
-    "kleur": {
+    "node_modules/kleur": {
       "version": "3.0.3",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
+      "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
+      "dev": true,
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/kubo-rpc-client": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/kubo-rpc-client/-/kubo-rpc-client-3.0.2.tgz",
+      "integrity": "sha512-VXCyQ8M5z922rUEqaTjtuXUepuIxAaijKVgxoPSiB9eU+B3rVEIkUhNsjKzK6QM3lnW/hQwwrKF5uJcGUitokw==",
+      "dependencies": {
+        "@ipld/dag-cbor": "^9.0.0",
+        "@ipld/dag-json": "^10.0.0",
+        "@ipld/dag-pb": "^4.0.0",
+        "@libp2p/crypto": "^1.0.11",
+        "@libp2p/logger": "^2.0.5",
+        "@libp2p/peer-id": "^2.0.0",
+        "@multiformats/multiaddr": "^12.1.10",
+        "any-signal": "^3.0.1",
+        "dag-jose": "^4.0.0",
+        "err-code": "^3.0.1",
+        "ipfs-core-utils": "^0.18.0",
+        "ipfs-utils": "^9.0.7",
+        "it-first": "^2.0.0",
+        "it-last": "^2.0.0",
+        "merge-options": "^3.0.4",
+        "multiformats": "^11.0.0",
+        "parse-duration": "^1.0.2",
+        "stream-to-it": "^0.2.4",
+        "uint8arrays": "^4.0.3"
+      },
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/kubo-rpc-client/node_modules/@libp2p/logger": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/@libp2p/logger/-/logger-2.1.1.tgz",
+      "integrity": "sha512-2UbzDPctg3cPupF6jrv6abQnAUTrbLybNOj0rmmrdGm1cN2HJ1o/hBu0sXuq4KF9P1h/eVRn1HIRbVIEKnEJrA==",
+      "dependencies": {
+        "@libp2p/interface-peer-id": "^2.0.2",
+        "@multiformats/multiaddr": "^12.1.3",
+        "debug": "^4.3.4",
+        "interface-datastore": "^8.2.0",
+        "multiformats": "^11.0.2"
+      },
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/kubo-rpc-client/node_modules/interface-datastore": {
+      "version": "8.2.10",
+      "resolved": "https://registry.npmjs.org/interface-datastore/-/interface-datastore-8.2.10.tgz",
+      "integrity": "sha512-D8RuxMdjOPB+j6WMDJ+I2aXTDzUT6DIVjgzo1E+ODL7w8WrSFl9FXD2SYmgj6vVzdb7Kb5qmAI9pEnDZJz7ifg==",
+      "dependencies": {
+        "interface-store": "^5.0.0",
+        "uint8arrays": "^5.0.0"
+      }
+    },
+    "node_modules/kubo-rpc-client/node_modules/interface-datastore/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
     },
-    "latest-version": {
+    "node_modules/kubo-rpc-client/node_modules/interface-datastore/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
+      "dependencies": {
+        "multiformats": "^13.0.0"
+      }
+    },
+    "node_modules/kubo-rpc-client/node_modules/interface-store": {
+      "version": "5.1.7",
+      "resolved": "https://registry.npmjs.org/interface-store/-/interface-store-5.1.7.tgz",
+      "integrity": "sha512-DVMTgZ43NAdDtXL3QsEq8N0vuUYVBxiGbxN0uI0lrNasuX/CGSrU7bjOO2DaGTMNut4Pt3ae+VQYFvNtH4Oyeg=="
+    },
+    "node_modules/kubo-rpc-client/node_modules/it-last": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/it-last/-/it-last-2.0.1.tgz",
+      "integrity": "sha512-uVMedYW0wa2Cx0TAmcOCLbfuLLII7+vyURmhKa8Zovpd+aBTMsmINtsta2n364wJ5qsEDBH+akY1sUtAkaYBlg==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/kubo-rpc-client/node_modules/multiformats": {
+      "version": "11.0.2",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-11.0.2.tgz",
+      "integrity": "sha512-b5mYMkOkARIuVZCpvijFj9a6m5wMVLC7cf/jIPd5D/ARDOfLC5+IFkbgDXQgcU2goIsTD/O9NY4DI/Mt4OGvlg==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/kubo-rpc-client/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
+      "dependencies": {
+        "multiformats": "^12.0.1"
+      }
+    },
+    "node_modules/kubo-rpc-client/node_modules/uint8arrays/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/latest-version": {
       "version": "7.0.0",
       "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-7.0.0.tgz",
       "integrity": "sha512-KvNT4XqAMzdcL6ka6Tl3i2lYeFDgXNCuIX+xNx6ZMVR1dFq+idXd9FLKNMOIx0t9mJ9/HudyX4oZWXZQ0UJHeg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "package-json": "^8.1.0"
+      },
+      "engines": {
+        "node": ">=14.16"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "leven": {
+    "node_modules/leven": {
       "version": "3.1.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
+      "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
+      "dev": true,
+      "engines": {
+        "node": ">=6"
+      }
     },
-    "levn": {
+    "node_modules/levn": {
       "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+      "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "prelude-ls": "~1.1.2",
         "type-check": "~0.3.2"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
       }
     },
-    "libp2p-crypto": {
-      "version": "0.21.2",
-      "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.21.2.tgz",
-      "integrity": "sha512-EXFrhSpiHtJ+/L8xXDvQNK5VjUMG51u878jzZcaT5XhuN/zFg6PWJFnl/qB2Y2j7eMWnvCRP7Kp+ua2H36cG4g==",
-      "requires": {
-        "@noble/ed25519": "^1.5.1",
+    "node_modules/libp2p-crypto": {
+      "version": "0.21.0",
+      "license": "MIT",
+      "dependencies": {
+        "@noble/ed25519": "^1.3.0",
         "@noble/secp256k1": "^1.3.0",
         "err-code": "^3.0.1",
         "iso-random-stream": "^2.0.0",
         "multiformats": "^9.4.5",
-        "node-forge": "^1.2.1",
+        "node-forge": "^0.10.0",
         "protobufjs": "^6.11.2",
         "uint8arrays": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=12.0.0"
       }
     },
-    "lines-and-columns": {
-      "version": "1.1.6"
+    "node_modules/lines-and-columns": {
+      "version": "1.1.6",
+      "dev": true,
+      "license": "MIT"
     },
-    "locate-path": {
+    "node_modules/locate-path": {
       "version": "5.0.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+      "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+      "dev": true,
+      "dependencies": {
         "p-locate": "^4.1.0"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "lodash": {
+    "node_modules/lodash": {
       "version": "4.17.21",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+      "dev": true,
+      "license": "MIT"
     },
-    "lodash.capitalize": {
+    "node_modules/lodash.capitalize": {
       "version": "4.2.1",
       "resolved": "https://registry.npmjs.org/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz",
       "integrity": "sha512-kZzYOKspf8XVX5AvmQF94gQW0lejFVgb80G85bU4ZWzoJ6C03PQg3coYAUpSTpQWelrZELd3XWgHzw4Ck5kaIw==",
       "dev": true
     },
-    "lodash.escaperegexp": {
+    "node_modules/lodash.escaperegexp": {
       "version": "4.1.2",
       "resolved": "https://registry.npmjs.org/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz",
       "integrity": "sha512-TM9YBvyC84ZxE3rgfefxUWiQKLilstD6k7PTGt6wfbtXF8ixIJLOL3VYyV/z+ZiPLsVxAsKAFVwWlWeb2Y8Yyw==",
       "dev": true
     },
-    "lodash.isplainobject": {
+    "node_modules/lodash.isplainobject": {
       "version": "4.0.6",
       "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
       "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==",
       "dev": true
     },
-    "lodash.isstring": {
+    "node_modules/lodash.isstring": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
       "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==",
       "dev": true
     },
-    "lodash.merge": {
+    "node_modules/lodash.merge": {
       "version": "4.6.2",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+      "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+      "dev": true,
+      "license": "MIT"
     },
-    "lodash.uniqby": {
+    "node_modules/lodash.uniqby": {
       "version": "4.7.0",
       "resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz",
       "integrity": "sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww==",
       "dev": true
     },
-    "log-symbols": {
+    "node_modules/log-symbols": {
       "version": "5.1.0",
       "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-5.1.0.tgz",
       "integrity": "sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "chalk": "^5.0.0",
         "is-unicode-supported": "^1.1.0"
       },
-      "dependencies": {
-        "chalk": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-          "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
-          "dev": true
-        }
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/log-symbols/node_modules/chalk": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+      "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+      "dev": true,
+      "engines": {
+        "node": "^12.17.0 || ^14.13 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "long": {
-      "version": "4.0.0"
+    "node_modules/long": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
+      "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==",
+      "license": "Apache-2.0"
     },
-    "lowercase-keys": {
+    "node_modules/lowercase-keys": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-3.0.0.tgz",
       "integrity": "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "lru-cache": {
+    "node_modules/lru-cache": {
       "version": "6.0.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+      "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
         "yallist": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=10"
       }
     },
-    "macos-release": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-3.1.0.tgz",
-      "integrity": "sha512-/M/R0gCDgM+Cv1IuBG1XGdfTFnMEG6PZeT+KGWHO/OG+imqmaD9CH5vHBTycEM3+Kc4uG2Il+tFAuUWLqQOeUA==",
-      "dev": true
+    "node_modules/macos-release": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-3.2.0.tgz",
+      "integrity": "sha512-fSErXALFNsnowREYZ49XCdOHF8wOPWuFOGQrAhP7x5J/BqQv+B02cNsTykGpDgRVx43EKg++6ANmTaGTtW+hUA==",
+      "dev": true,
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "mafmt": {
+    "node_modules/mafmt": {
       "version": "7.1.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/mafmt/-/mafmt-7.1.0.tgz",
+      "integrity": "sha512-vpeo9S+hepT3k2h5iFxzEHvvR0GPBx9uKaErmnRzYNcaKb03DgOArjEMlgG4a9LcuZZ89a3I8xbeto487n26eA==",
+      "license": "MIT",
+      "dependencies": {
         "multiaddr": "^7.3.0"
       }
     },
-    "make-dir": {
-      "version": "3.0.2",
+    "node_modules/make-dir": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz",
+      "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==",
       "dev": true,
-      "requires": {
-        "semver": "^6.0.0"
+      "dependencies": {
+        "semver": "^7.5.3"
+      },
+      "engines": {
+        "node": ">=10"
       },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/make-dir/node_modules/semver": {
+      "version": "7.5.4",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+      "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+      "dev": true,
       "dependencies": {
-        "semver": {
-          "version": "6.3.0",
-          "dev": true
-        }
+        "lru-cache": "^6.0.0"
+      },
+      "bin": {
+        "semver": "bin/semver.js"
+      },
+      "engines": {
+        "node": ">=10"
       }
     },
-    "makeerror": {
+    "node_modules/makeerror": {
       "version": "1.0.12",
+      "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
+      "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "tmpl": "1.0.5"
       }
     },
-    "map-obj": {
-      "version": "4.3.0"
-    },
-    "meow": {
-      "version": "9.0.0",
-      "requires": {
-        "@types/minimist": "^1.2.0",
-        "camelcase-keys": "^6.2.2",
-        "decamelize": "^1.2.0",
-        "decamelize-keys": "^1.1.0",
-        "hard-rejection": "^2.1.0",
-        "minimist-options": "4.1.0",
-        "normalize-package-data": "^3.0.0",
-        "read-pkg-up": "^7.0.1",
-        "redent": "^3.0.0",
-        "trim-newlines": "^3.0.0",
-        "type-fest": "^0.18.0",
-        "yargs-parser": "^20.2.3"
-      },
-      "dependencies": {
-        "type-fest": {
-          "version": "0.18.1"
-        }
-      }
-    },
-    "merge-options": {
+    "node_modules/merge-options": {
       "version": "3.0.4",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz",
+      "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==",
+      "license": "MIT",
+      "dependencies": {
         "is-plain-obj": "^2.1.0"
+      },
+      "engines": {
+        "node": ">=10"
       }
     },
-    "merge-stream": {
+    "node_modules/merge-stream": {
       "version": "2.0.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+      "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+      "dev": true,
+      "license": "MIT"
     },
-    "merge2": {
+    "node_modules/merge2": {
       "version": "1.4.1",
       "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
       "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">= 8"
+      }
     },
-    "micromatch": {
+    "node_modules/micromatch": {
       "version": "4.0.5",
+      "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
+      "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "braces": "^3.0.2",
         "picomatch": "^2.3.1"
+      },
+      "engines": {
+        "node": ">=8.6"
       }
     },
-    "mime-db": {
+    "node_modules/mime-db": {
       "version": "1.52.0",
       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
-      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
+      "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
+      "engines": {
+        "node": ">= 0.6"
+      }
     },
-    "mime-types": {
+    "node_modules/mime-types": {
       "version": "2.1.35",
       "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
       "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
-      "requires": {
+      "dependencies": {
         "mime-db": "1.52.0"
+      },
+      "engines": {
+        "node": ">= 0.6"
       }
     },
-    "mimic-fn": {
+    "node_modules/mimic-fn": {
       "version": "2.1.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+      "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=6"
+      }
     },
-    "mimic-response": {
+    "node_modules/mimic-response": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz",
       "integrity": "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==",
-      "dev": true
-    },
-    "min-indent": {
-      "version": "1.0.1"
-    },
-    "minimatch": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
-      "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
-      "requires": {
-        "brace-expansion": "^1.1.7"
+      "dev": true,
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "minimist": {
-      "version": "1.2.6"
-    },
-    "minimist-options": {
-      "version": "4.1.0",
-      "requires": {
-        "arrify": "^1.0.1",
-        "is-plain-obj": "^1.1.0",
-        "kind-of": "^6.0.3"
-      },
+    "node_modules/minimatch": {
+      "version": "3.0.4",
+      "license": "ISC",
       "dependencies": {
-        "is-plain-obj": {
-          "version": "1.1.0"
-        }
+        "brace-expansion": "^1.1.7"
+      },
+      "engines": {
+        "node": "*"
       }
     },
-    "move-file": {
-      "version": "2.1.0",
-      "requires": {
-        "path-exists": "^4.0.0"
-      }
+    "node_modules/minimist": {
+      "version": "1.2.6",
+      "license": "MIT"
     },
-    "ms": {
-      "version": "2.1.2"
+    "node_modules/ms": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+      "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+      "license": "MIT"
     },
-    "multiaddr": {
+    "node_modules/multiaddr": {
       "version": "7.5.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/multiaddr/-/multiaddr-7.5.0.tgz",
+      "integrity": "sha512-GvhHsIGDULh06jyb6ev+VfREH9evJCFIRnh3jUt9iEZ6XDbyoisZRFEI9bMvK/AiR6y66y6P+eoBw9mBYMhMvw==",
+      "license": "MIT",
+      "dependencies": {
         "buffer": "^5.5.0",
         "cids": "~0.8.0",
         "class-is": "^1.1.0",
         "is-ip": "^3.1.0",
         "multibase": "^0.7.0",
         "varint": "^5.0.0"
-      },
-      "dependencies": {
-        "buffer": {
-          "version": "5.7.1",
-          "requires": {
-            "base64-js": "^1.3.1",
-            "ieee754": "^1.1.13"
-          }
-        },
-        "cids": {
-          "version": "0.8.3",
-          "requires": {
-            "buffer": "^5.6.0",
-            "class-is": "^1.1.0",
-            "multibase": "^1.0.0",
-            "multicodec": "^1.0.1",
-            "multihashes": "^1.0.1"
-          },
-          "dependencies": {
-            "multibase": {
-              "version": "1.0.1",
-              "requires": {
-                "base-x": "^3.0.8",
-                "buffer": "^5.5.0"
-              }
-            }
-          }
+      }
+    },
+    "node_modules/multiaddr/node_modules/buffer": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+      "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
         },
-        "multibase": {
-          "version": "0.7.0",
-          "requires": {
-            "base-x": "^3.0.8",
-            "buffer": "^5.5.0"
-          }
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
         },
-        "multihashes": {
-          "version": "1.0.1",
-          "requires": {
-            "buffer": "^5.6.0",
-            "multibase": "^1.0.1",
-            "varint": "^5.0.0"
-          },
-          "dependencies": {
-            "multibase": {
-              "version": "1.0.1",
-              "requires": {
-                "base-x": "^3.0.8",
-                "buffer": "^5.5.0"
-              }
-            }
-          }
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
         }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "base64-js": "^1.3.1",
+        "ieee754": "^1.1.13"
       }
     },
-    "multiaddr-to-uri": {
-      "version": "8.0.0",
-      "requires": {
-        "multiaddr": "^10.0.0"
-      },
-      "dependencies": {
-        "multiaddr": {
-          "version": "10.0.1",
-          "requires": {
-            "dns-over-http-resolver": "^1.2.3",
-            "err-code": "^3.0.1",
-            "is-ip": "^3.1.0",
-            "multiformats": "^9.4.5",
-            "uint8arrays": "^3.0.0",
-            "varint": "^6.0.0"
-          }
-        },
-        "varint": {
-          "version": "6.0.0"
-        }
+    "node_modules/multiaddr/node_modules/cids": {
+      "version": "0.8.3",
+      "resolved": "https://registry.npmjs.org/cids/-/cids-0.8.3.tgz",
+      "integrity": "sha512-yoXTbV3llpm+EBGWKeL9xKtksPE/s6DPoDSY4fn8I8TEW1zehWXPSB0pwAXVDlLaOlrw+sNynj995uD9abmPhA==",
+      "license": "MIT",
+      "dependencies": {
+        "buffer": "^5.6.0",
+        "class-is": "^1.1.0",
+        "multibase": "^1.0.0",
+        "multicodec": "^1.0.1",
+        "multihashes": "^1.0.1"
+      },
+      "engines": {
+        "node": ">=4.0.0",
+        "npm": ">=3.0.0"
       }
     },
-    "multibase": {
-      "version": "0.6.1",
-      "requires": {
+    "node_modules/multiaddr/node_modules/cids/node_modules/multibase": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/multibase/-/multibase-1.0.1.tgz",
+      "integrity": "sha512-KcCxpBVY8fdVKu4dJMAahq4F/2Z/9xqEjIiR7PiMe7LRGeorFn2NLmicN6nLBCqQvft6MG2Lc9X5P0IdyvnxEw==",
+      "license": "MIT",
+      "dependencies": {
         "base-x": "^3.0.8",
         "buffer": "^5.5.0"
       },
+      "engines": {
+        "node": ">=10.0.0",
+        "npm": ">=6.0.0"
+      }
+    },
+    "node_modules/multiaddr/node_modules/multibase": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz",
+      "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==",
+      "license": "MIT",
       "dependencies": {
-        "buffer": {
-          "version": "5.7.1",
-          "requires": {
-            "base64-js": "^1.3.1",
-            "ieee754": "^1.1.13"
-          }
-        }
+        "base-x": "^3.0.8",
+        "buffer": "^5.5.0"
       }
     },
-    "multicodec": {
-      "version": "1.0.4",
-      "requires": {
+    "node_modules/multiaddr/node_modules/multihashes": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-1.0.1.tgz",
+      "integrity": "sha512-S27Tepg4i8atNiFaU5ZOm3+gl3KQlUanLs/jWcBxQHFttgq+5x1OgbQmf2d8axJ/48zYGBd/wT9d723USMFduw==",
+      "license": "MIT",
+      "dependencies": {
         "buffer": "^5.6.0",
+        "multibase": "^1.0.1",
         "varint": "^5.0.0"
       },
+      "engines": {
+        "node": ">=10.0.0",
+        "npm": ">=6.0.0"
+      }
+    },
+    "node_modules/multiaddr/node_modules/multihashes/node_modules/multibase": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/multibase/-/multibase-1.0.1.tgz",
+      "integrity": "sha512-KcCxpBVY8fdVKu4dJMAahq4F/2Z/9xqEjIiR7PiMe7LRGeorFn2NLmicN6nLBCqQvft6MG2Lc9X5P0IdyvnxEw==",
+      "license": "MIT",
+      "dependencies": {
+        "base-x": "^3.0.8",
+        "buffer": "^5.5.0"
+      },
+      "engines": {
+        "node": ">=10.0.0",
+        "npm": ">=6.0.0"
+      }
+    },
+    "node_modules/multibase": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.6.1.tgz",
+      "integrity": "sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw==",
+      "license": "MIT",
+      "dependencies": {
+        "base-x": "^3.0.8",
+        "buffer": "^5.5.0"
+      }
+    },
+    "node_modules/multibase/node_modules/buffer": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+      "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "base64-js": "^1.3.1",
+        "ieee754": "^1.1.13"
+      }
+    },
+    "node_modules/multicodec": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/multicodec/-/multicodec-1.0.4.tgz",
+      "integrity": "sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg==",
+      "license": "MIT",
       "dependencies": {
-        "buffer": {
-          "version": "5.7.1",
-          "requires": {
-            "base64-js": "^1.3.1",
-            "ieee754": "^1.1.13"
-          }
+        "buffer": "^5.6.0",
+        "varint": "^5.0.0"
+      }
+    },
+    "node_modules/multicodec/node_modules/buffer": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+      "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
         }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "base64-js": "^1.3.1",
+        "ieee754": "^1.1.13"
       }
     },
-    "multiformats": {
-      "version": "9.7.1"
+    "node_modules/multiformats": {
+      "version": "9.7.1",
+      "license": "(Apache-2.0 AND MIT)"
     },
-    "multihashes": {
+    "node_modules/multihashes": {
       "version": "0.4.21",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/multihashes/-/multihashes-0.4.21.tgz",
+      "integrity": "sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw==",
+      "license": "MIT",
+      "dependencies": {
         "buffer": "^5.5.0",
         "multibase": "^0.7.0",
         "varint": "^5.0.0"
-      },
-      "dependencies": {
-        "buffer": {
-          "version": "5.7.1",
-          "requires": {
-            "base64-js": "^1.3.1",
-            "ieee754": "^1.1.13"
-          }
+      }
+    },
+    "node_modules/multihashes/node_modules/buffer": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+      "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
         },
-        "multibase": {
-          "version": "0.7.0",
-          "requires": {
-            "base-x": "^3.0.8",
-            "buffer": "^5.5.0"
-          }
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
         }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "base64-js": "^1.3.1",
+        "ieee754": "^1.1.13"
+      }
+    },
+    "node_modules/multihashes/node_modules/multibase": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/multibase/-/multibase-0.7.0.tgz",
+      "integrity": "sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg==",
+      "license": "MIT",
+      "dependencies": {
+        "base-x": "^3.0.8",
+        "buffer": "^5.5.0"
       }
     },
-    "murmurhash3js-revisited": {
-      "version": "3.0.0"
+    "node_modules/murmurhash3js-revisited": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/murmurhash3js-revisited/-/murmurhash3js-revisited-3.0.0.tgz",
+      "integrity": "sha512-/sF3ee6zvScXMb1XFJ8gDsSnY+X8PbOyjIuBhtgis10W2Jx4ZjIhikUCIF9c4gpJxVnQIsPAFrSwTCuAjicP6g==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=8.0.0"
+      }
     },
-    "mute-stream": {
+    "node_modules/mute-stream": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz",
       "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==",
-      "dev": true
-    },
-    "nanoid": {
-      "version": "3.3.2"
+      "dev": true,
+      "engines": {
+        "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
+      }
     },
-    "native-abort-controller": {
-      "version": "1.0.4",
-      "requires": {}
+    "node_modules/nanoid": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-4.0.2.tgz",
+      "integrity": "sha512-7ZtY5KTCNheRGfEFxnedV5zFiORN1+Y1N6zvPTnHQd8ENUvfaDBeuJDZb2bN/oXwXxu3qkTXDzy57W5vAmDTBw==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/ai"
+        }
+      ],
+      "bin": {
+        "nanoid": "bin/nanoid.js"
+      },
+      "engines": {
+        "node": "^14 || ^16 || >=18"
+      }
     },
-    "native-fetch": {
+    "node_modules/native-fetch": {
       "version": "3.0.0",
-      "requires": {}
+      "resolved": "https://registry.npmjs.org/native-fetch/-/native-fetch-3.0.0.tgz",
+      "integrity": "sha512-G3Z7vx0IFb/FQ4JxvtqGABsOTIqRWvgQz6e+erkB+JJD6LrszQtMozEHI4EkmgZQvnGHrpLVzUWk7t4sJCIkVw==",
+      "peerDependencies": {
+        "node-fetch": "*"
+      }
     },
-    "natural-compare": {
+    "node_modules/natural-compare": {
       "version": "1.4.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+      "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+      "dev": true,
+      "license": "MIT"
     },
-    "netmask": {
+    "node_modules/netmask": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz",
       "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">= 0.4.0"
+      }
+    },
+    "node_modules/new-github-release-url": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/new-github-release-url/-/new-github-release-url-2.0.0.tgz",
+      "integrity": "sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ==",
+      "dev": true,
+      "dependencies": {
+        "type-fest": "^2.5.1"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "new-github-release-url": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/new-github-release-url/-/new-github-release-url-2.0.0.tgz",
-      "integrity": "sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ==",
+    "node_modules/new-github-release-url/node_modules/type-fest": {
+      "version": "2.19.0",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
+      "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
       "dev": true,
-      "requires": {
-        "type-fest": "^2.5.1"
+      "engines": {
+        "node": ">=12.20"
       },
-      "dependencies": {
-        "type-fest": {
-          "version": "2.19.0",
-          "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz",
-          "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==",
-          "dev": true
-        }
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node-domexception": {
+    "node_modules/node-domexception": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
       "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
-      "dev": true
+      "dev": true,
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/jimmywarting"
+        },
+        {
+          "type": "github",
+          "url": "https://paypal.me/jimmywarting"
+        }
+      ],
+      "engines": {
+        "node": ">=10.5.0"
+      }
     },
-    "node-fetch": {
-      "version": "2.6.7",
-      "requires": {
+    "node_modules/node-fetch": {
+      "version": "2.7.0",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+      "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+      "dependencies": {
         "whatwg-url": "^5.0.0"
       },
-      "dependencies": {
-        "tr46": {
-          "version": "0.0.3"
-        },
-        "webidl-conversions": {
-          "version": "3.0.1"
-        },
-        "whatwg-url": {
-          "version": "5.0.0",
-          "requires": {
-            "tr46": "~0.0.3",
-            "webidl-conversions": "^3.0.0"
-          }
+      "engines": {
+        "node": "4.x || >=6.0.0"
+      },
+      "peerDependencies": {
+        "encoding": "^0.1.0"
+      },
+      "peerDependenciesMeta": {
+        "encoding": {
+          "optional": true
         }
       }
     },
-    "node-forge": {
-      "version": "1.3.1",
-      "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz",
-      "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA=="
+    "node_modules/node-fetch/node_modules/tr46": {
+      "version": "0.0.3",
+      "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+      "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+      "license": "MIT"
+    },
+    "node_modules/node-fetch/node_modules/webidl-conversions": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+      "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+      "license": "BSD-2-Clause"
+    },
+    "node_modules/node-fetch/node_modules/whatwg-url": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+      "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+      "license": "MIT",
+      "dependencies": {
+        "tr46": "~0.0.3",
+        "webidl-conversions": "^3.0.0"
+      }
+    },
+    "node_modules/node-forge": {
+      "version": "0.10.0",
+      "license": "(BSD-3-Clause OR GPL-2.0)",
+      "engines": {
+        "node": ">= 6.0.0"
+      }
     },
-    "node-int64": {
+    "node_modules/node-int64": {
       "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
+      "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==",
       "dev": true
     },
-    "node-releases": {
-      "version": "2.0.6",
+    "node_modules/node-releases": {
+      "version": "2.0.14",
+      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
+      "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
       "dev": true
     },
-    "normalize-package-data": {
-      "version": "3.0.3",
-      "requires": {
-        "hosted-git-info": "^4.0.1",
-        "is-core-module": "^2.5.0",
-        "semver": "^7.3.4",
-        "validate-npm-package-license": "^3.0.1"
-      }
-    },
-    "normalize-path": {
+    "node_modules/normalize-path": {
       "version": "3.0.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+      "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+      "dev": true,
+      "engines": {
+        "node": ">=0.10.0"
+      }
     },
-    "normalize-url": {
+    "node_modules/normalize-url": {
       "version": "8.0.0",
       "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.0.tgz",
       "integrity": "sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">=14.16"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "npm-run-path": {
+    "node_modules/npm-run-path": {
       "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
+      "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "path-key": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "nwsapi": {
-      "version": "2.2.1",
-      "dev": true
-    },
-    "object-inspect": {
-      "version": "1.12.2"
+    "node_modules/object-inspect": {
+      "version": "1.13.1",
+      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
+      "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
+      "dev": true,
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
     },
-    "object-keys": {
-      "version": "1.1.1"
+    "node_modules/object-keys": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+      "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+      "dev": true,
+      "engines": {
+        "node": ">= 0.4"
+      }
     },
-    "object.assign": {
-      "version": "4.1.4",
-      "requires": {
-        "call-bind": "^1.0.2",
-        "define-properties": "^1.1.4",
+    "node_modules/object.assign": {
+      "version": "4.1.5",
+      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz",
+      "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==",
+      "dev": true,
+      "dependencies": {
+        "call-bind": "^1.0.5",
+        "define-properties": "^1.2.1",
         "has-symbols": "^1.0.3",
         "object-keys": "^1.1.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "once": {
+    "node_modules/once": {
       "version": "1.4.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+      "license": "ISC",
+      "dependencies": {
         "wrappy": "1"
       }
     },
-    "onetime": {
+    "node_modules/onetime": {
       "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+      "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "mimic-fn": "^2.1.0"
+      },
+      "engines": {
+        "node": ">=6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "open": {
+    "node_modules/open": {
       "version": "9.1.0",
       "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz",
       "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "default-browser": "^4.0.0",
         "define-lazy-prop": "^3.0.0",
         "is-inside-container": "^1.0.0",
         "is-wsl": "^2.2.0"
+      },
+      "engines": {
+        "node": ">=14.16"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "optionator": {
+    "node_modules/optionator": {
       "version": "0.8.3",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+      "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "deep-is": "~0.1.3",
         "fast-levenshtein": "~2.0.6",
         "levn": "~0.3.0",
         "prelude-ls": "~1.1.2",
         "type-check": "~0.3.2",
         "word-wrap": "~1.2.3"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
       }
     },
-    "ora": {
+    "node_modules/ora": {
       "version": "6.3.0",
       "resolved": "https://registry.npmjs.org/ora/-/ora-6.3.0.tgz",
       "integrity": "sha512-1/D8uRFY0ay2kgBpmAwmSA404w4OoPVhHMqRqtjvrcK/dnzcEZxMJ+V4DUbyICu8IIVRclHcOf5wlD1tMY4GUQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "chalk": "^5.0.0",
         "cli-cursor": "^4.0.0",
         "cli-spinners": "^2.6.1",
@@ -19319,77 +12651,159 @@
         "strip-ansi": "^7.0.1",
         "wcwidth": "^1.0.1"
       },
-      "dependencies": {
-        "chalk": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-          "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
-          "dev": true
-        }
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/ora/node_modules/chalk": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+      "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+      "dev": true,
+      "engines": {
+        "node": "^12.17.0 || ^14.13 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "os-name": {
+    "node_modules/os-name": {
       "version": "5.1.0",
       "resolved": "https://registry.npmjs.org/os-name/-/os-name-5.1.0.tgz",
       "integrity": "sha512-YEIoAnM6zFmzw3PQ201gCVCIWbXNyKObGlVvpAVvraAeOHnlYVKFssbA/riRX5R40WA6kKrZ7Dr7dWzO3nKSeQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "macos-release": "^3.1.0",
         "windows-release": "^5.0.1"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "os-tmpdir": {
+    "node_modules/os-tmpdir": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
       "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">=0.10.0"
+      }
     },
-    "p-cancelable": {
+    "node_modules/p-cancelable": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-3.0.0.tgz",
       "integrity": "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">=12.20"
+      }
     },
-    "p-defer": {
-      "version": "3.0.0"
+    "node_modules/p-defer": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-3.0.0.tgz",
+      "integrity": "sha512-ugZxsxmtTln604yeYd29EGrNhazN2lywetzpKhfmQjW/VJmhpDmWbiX+h0zL8V91R0UXkhb3KtPmyq9PZw3aYw==",
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "p-fifo": {
+    "node_modules/p-fifo": {
       "version": "1.0.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/p-fifo/-/p-fifo-1.0.0.tgz",
+      "integrity": "sha512-IjoCxXW48tqdtDFz6fqo5q1UfFVjjVZe8TC1QRflvNUJtNfCUhxOUw6MOVZhDPjqhSzc26xKdugsO17gmzd5+A==",
+      "dependencies": {
         "fast-fifo": "^1.0.0",
         "p-defer": "^3.0.0"
       }
     },
-    "p-locate": {
+    "node_modules/p-limit": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+      "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+      "dev": true,
+      "dependencies": {
+        "yocto-queue": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/p-locate": {
       "version": "4.1.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+      "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+      "dev": true,
+      "dependencies": {
         "p-limit": "^2.2.0"
       },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/p-locate/node_modules/p-limit": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+      "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+      "dev": true,
       "dependencies": {
-        "p-limit": {
-          "version": "2.3.0",
-          "requires": {
-            "p-try": "^2.0.0"
-          }
-        }
+        "p-try": "^2.0.0"
+      },
+      "engines": {
+        "node": ">=6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "p-retry": {
-      "version": "4.6.2",
-      "requires": {
-        "@types/retry": "0.12.0",
-        "retry": "^0.13.1"
+    "node_modules/p-queue": {
+      "version": "7.4.1",
+      "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-7.4.1.tgz",
+      "integrity": "sha512-vRpMXmIkYF2/1hLBKisKeVYJZ8S2tZ0zEAmIJgdVKP2nq0nh4qCdf8bgw+ZgKrkh71AOCaqzwbJJk1WtdcF3VA==",
+      "dependencies": {
+        "eventemitter3": "^5.0.1",
+        "p-timeout": "^5.0.2"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/p-timeout": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz",
+      "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==",
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "p-try": {
-      "version": "2.2.0"
+    "node_modules/p-try": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+      "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+      "dev": true,
+      "engines": {
+        "node": ">=6"
+      }
     },
-    "pac-proxy-agent": {
+    "node_modules/pac-proxy-agent": {
       "version": "5.0.0",
       "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-5.0.0.tgz",
       "integrity": "sha512-CcFG3ZtnxO8McDigozwE3AqAw15zDvGH+OjXO4kzf7IkEKkQ4gxQ+3sdF50WmhQ4P/bVusXcqNE2S3XrNURwzQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "@tootallnate/once": "1",
         "agent-base": "6",
         "debug": "4",
@@ -19399,177 +12813,297 @@
         "pac-resolver": "^5.0.0",
         "raw-body": "^2.2.0",
         "socks-proxy-agent": "5"
+      },
+      "engines": {
+        "node": ">= 8"
       }
     },
-    "pac-resolver": {
+    "node_modules/pac-resolver": {
       "version": "5.0.1",
       "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-5.0.1.tgz",
       "integrity": "sha512-cy7u00ko2KVgBAjuhevqpPeHIkCIqPe1v24cydhWjmeuzaBfmUWFCZJ1iAh5TuVzVZoUzXIW7K8sMYOZ84uZ9Q==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "degenerator": "^3.0.2",
         "ip": "^1.1.5",
         "netmask": "^2.0.2"
+      },
+      "engines": {
+        "node": ">= 8"
       }
     },
-    "package-json": {
-      "version": "8.1.0",
-      "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.0.tgz",
-      "integrity": "sha512-hySwcV8RAWeAfPsXb9/HGSPn8lwDnv6fabH+obUZKX169QknRkRhPxd1yMubpKDskLFATkl3jHpNtVtDPFA0Wg==",
+    "node_modules/package-json": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/package-json/-/package-json-8.1.1.tgz",
+      "integrity": "sha512-cbH9IAIJHNj9uXi196JVsRlt7cHKak6u/e6AkL/bkRelZ7rlL3X1YKxsZwa36xipOEKAsdtmaG6aAJoM1fx2zA==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "got": "^12.1.0",
         "registry-auth-token": "^5.0.1",
         "registry-url": "^6.0.0",
         "semver": "^7.3.7"
+      },
+      "engines": {
+        "node": ">=14.16"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "parent-module": {
+    "node_modules/parent-module": {
       "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+      "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "callsites": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=6"
       }
     },
-    "parse-duration": {
-      "version": "1.0.2"
+    "node_modules/parse-duration": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-1.1.0.tgz",
+      "integrity": "sha512-z6t9dvSJYaPoQq7quMzdEagSFtpGu+utzHqqxmpVWNNZRIXnvqyCvn9XsTdh7c/w0Bqmdz3RB3YnRaKtpRtEXQ=="
     },
-    "parse-json": {
+    "node_modules/parse-json": {
       "version": "5.2.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+      "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
         "@babel/code-frame": "^7.0.0",
         "error-ex": "^1.3.1",
         "json-parse-even-better-errors": "^2.3.0",
         "lines-and-columns": "^1.1.6"
+      },
+      "engines": {
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "parse-path": {
+    "node_modules/parse-path": {
       "version": "7.0.0",
       "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-7.0.0.tgz",
       "integrity": "sha512-Euf9GG8WT9CdqwuWJGdf3RkUcTBArppHABkO7Lm8IzRQp0e2r/kkFnmhu4TSK30Wcu5rVAZLmfPKSBBi9tWFog==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "protocols": "^2.0.0"
       }
     },
-    "parse-url": {
+    "node_modules/parse-url": {
       "version": "8.1.0",
       "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-8.1.0.tgz",
       "integrity": "sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "parse-path": "^7.0.0"
       }
     },
-    "parse5": {
-      "version": "6.0.1",
-      "dev": true
-    },
-    "path-exists": {
-      "version": "4.0.0"
+    "node_modules/path-exists": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+      "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+      "dev": true,
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "path-is-absolute": {
+    "node_modules/path-is-absolute": {
       "version": "1.0.1",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.10.0"
+      }
     },
-    "path-key": {
+    "node_modules/path-key": {
       "version": "3.1.1",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+      "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "path-parse": {
-      "version": "1.0.7"
+    "node_modules/path-parse": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
+      "dev": true,
+      "license": "MIT"
     },
-    "path-type": {
+    "node_modules/path-type": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
       "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "peer-id": {
+    "node_modules/peer-id": {
       "version": "0.16.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.16.0.tgz",
+      "integrity": "sha512-EmL7FurFUduU9m1PS9cfJ5TAuCvxKQ7DKpfx3Yj6IKWyBRtosriFuOag/l3ni/dtPgPLwiA4R9IvpL7hsDLJuQ==",
+      "license": "MIT",
+      "dependencies": {
         "class-is": "^1.1.0",
         "libp2p-crypto": "^0.21.0",
         "multiformats": "^9.4.5",
         "protobufjs": "^6.10.2",
         "uint8arrays": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=15.0.0"
       }
     },
-    "picocolors": {
+    "node_modules/picocolors": {
       "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+      "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
       "dev": true
     },
-    "picomatch": {
+    "node_modules/picomatch": {
       "version": "2.3.1",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+      "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8.6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/jonschlinkert"
+      }
     },
-    "pirates": {
-      "version": "4.0.5",
-      "dev": true
+    "node_modules/pirates": {
+      "version": "4.0.6",
+      "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
+      "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
+      "dev": true,
+      "engines": {
+        "node": ">= 6"
+      }
     },
-    "pkg-dir": {
+    "node_modules/pkg-dir": {
       "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+      "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "find-up": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "prelude-ls": {
+    "node_modules/prelude-ls": {
       "version": "1.1.2",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+      "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==",
+      "dev": true,
+      "engines": {
+        "node": ">= 0.8.0"
+      }
     },
-    "pretty-format": {
-      "version": "27.5.1",
+    "node_modules/pretty-format": {
+      "version": "29.7.0",
+      "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz",
+      "integrity": "sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==",
       "dev": true,
-      "requires": {
-        "ansi-regex": "^5.0.1",
+      "dependencies": {
+        "@jest/schemas": "^29.6.3",
         "ansi-styles": "^5.0.0",
-        "react-is": "^17.0.1"
+        "react-is": "^18.0.0"
       },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "5.2.0",
-          "dev": true
-        }
+      "engines": {
+        "node": "^14.15.0 || ^16.10.0 || >=18.0.0"
+      }
+    },
+    "node_modules/pretty-format/node_modules/ansi-styles": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+      "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+      "dev": true,
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
       }
     },
-    "progress": {
+    "node_modules/progress": {
       "version": "2.0.3",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+      "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.4.0"
+      }
+    },
+    "node_modules/progress-events": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/progress-events/-/progress-events-1.0.0.tgz",
+      "integrity": "sha512-zIB6QDrSbPfRg+33FZalluFIowkbV5Xh1xSuetjG+rlC5he6u2dc6VQJ0TbMdlN3R1RHdpOqxEFMKTnQ+itUwA==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
     },
-    "promise.allsettled": {
+    "node_modules/promise.allsettled": {
       "version": "1.0.6",
       "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.6.tgz",
       "integrity": "sha512-22wJUOD3zswWFqgwjNHa1965LvqTX87WPu/lreY2KSd7SVcERfuZ4GfUaOnJNnvtoIv2yXT/W00YIGMetXtFXg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "array.prototype.map": "^1.0.5",
         "call-bind": "^1.0.2",
         "define-properties": "^1.1.4",
         "es-abstract": "^1.20.4",
         "get-intrinsic": "^1.1.3",
         "iterate-value": "^1.0.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "prompts": {
+    "node_modules/prompts": {
       "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",
+      "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "kleur": "^3.0.3",
         "sisteransi": "^1.0.5"
+      },
+      "engines": {
+        "node": ">= 6"
       }
     },
-    "proto-list": {
+    "node_modules/proto-list": {
       "version": "1.2.4",
       "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz",
       "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==",
       "dev": true
     },
-    "protobufjs": {
-      "version": "6.11.3",
-      "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-6.11.3.tgz",
-      "integrity": "sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg==",
-      "requires": {
+    "node_modules/protobufjs": {
+      "version": "6.11.2",
+      "hasInstallScript": true,
+      "license": "BSD-3-Clause",
+      "dependencies": {
         "@protobufjs/aspromise": "^1.1.2",
         "@protobufjs/base64": "^1.1.2",
         "@protobufjs/codegen": "^2.0.4",
@@ -19583,20 +13117,50 @@
         "@types/long": "^4.0.1",
         "@types/node": ">=13.7.0",
         "long": "^4.0.0"
+      },
+      "bin": {
+        "pbjs": "bin/pbjs",
+        "pbts": "bin/pbts"
       }
     },
-    "protocols": {
+    "node_modules/protocols": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/protocols/-/protocols-2.0.1.tgz",
       "integrity": "sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q==",
       "dev": true
     },
-    "proxy-agent": {
+    "node_modules/protons-runtime": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-5.2.0.tgz",
+      "integrity": "sha512-jL3VSbXllgm17zurKQ/z+Ath0w+4BknJ+l/NLocfjAB8hbeASOZTNtb7zK3nDsKq2pHK9YFumNQvpkZ6gFfWhA==",
+      "dependencies": {
+        "uint8arraylist": "^2.4.3",
+        "uint8arrays": "^4.0.6"
+      }
+    },
+    "node_modules/protons-runtime/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/protons-runtime/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
+      "dependencies": {
+        "multiformats": "^12.0.1"
+      }
+    },
+    "node_modules/proxy-agent": {
       "version": "5.0.0",
       "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-5.0.0.tgz",
       "integrity": "sha512-gkH7BkvLVkSfX9Dk27W6TyNOWWZWRilRfk1XxGNWOYJ2TuedAv1yFpCaU9QSBmBe716XOTNpYNOzhysyw8xn7g==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "agent-base": "^6.0.0",
         "debug": "4",
         "http-proxy-agent": "^4.0.0",
@@ -19606,1003 +13170,1580 @@
         "proxy-from-env": "^1.0.0",
         "socks-proxy-agent": "^5.0.0"
       },
+      "engines": {
+        "node": ">= 8"
+      }
+    },
+    "node_modules/proxy-agent/node_modules/lru-cache": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+      "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+      "dev": true,
       "dependencies": {
-        "lru-cache": {
-          "version": "5.1.1",
-          "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
-          "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
-          "dev": true,
-          "requires": {
-            "yallist": "^3.0.2"
-          }
-        },
-        "yallist": {
-          "version": "3.1.1",
-          "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
-          "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
-          "dev": true
-        }
+        "yallist": "^3.0.2"
       }
     },
-    "proxy-from-env": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
-      "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
+    "node_modules/proxy-agent/node_modules/yallist": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+      "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
       "dev": true
     },
-    "psl": {
-      "version": "1.9.0",
-      "dev": true
+    "node_modules/proxy-from-env": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+      "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
     },
-    "punycode": {
+    "node_modules/punycode": {
       "version": "2.1.1",
-      "dev": true
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=6"
+      }
     },
-    "pupa": {
+    "node_modules/pupa": {
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/pupa/-/pupa-3.1.0.tgz",
       "integrity": "sha512-FLpr4flz5xZTSJxSeaheeMKN/EDzMdK7b8PTOC6a5PYFKTucWbdqjgqaEyH0shFiSJrVB1+Qqi4Tk19ccU6Aug==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "escape-goat": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=12.20"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "querystringify": {
-      "version": "2.2.0",
-      "dev": true
+    "node_modules/pure-rand": {
+      "version": "6.0.4",
+      "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.4.tgz",
+      "integrity": "sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==",
+      "dev": true,
+      "funding": [
+        {
+          "type": "individual",
+          "url": "https://github.com/sponsors/dubzzz"
+        },
+        {
+          "type": "opencollective",
+          "url": "https://opencollective.com/fast-check"
+        }
+      ]
     },
-    "queue-microtask": {
+    "node_modules/queue-microtask": {
       "version": "1.2.3",
       "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
       "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
-      "dev": true
+      "dev": true,
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ]
     },
-    "quick-lru": {
+    "node_modules/quick-lru": {
       "version": "5.1.1",
       "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
       "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "rabin-wasm": {
+    "node_modules/rabin-wasm": {
       "version": "0.1.5",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/rabin-wasm/-/rabin-wasm-0.1.5.tgz",
+      "integrity": "sha512-uWgQTo7pim1Rnj5TuWcCewRDTf0PEFTSlaUjWP4eY9EbLV9em08v89oCz/WO+wRxpYuO36XEHp4wgYQnAgOHzA==",
+      "license": "MIT",
+      "dependencies": {
         "@assemblyscript/loader": "^0.9.4",
         "bl": "^5.0.0",
         "debug": "^4.3.1",
         "minimist": "^1.2.5",
         "node-fetch": "^2.6.1",
         "readable-stream": "^3.6.0"
+      },
+      "bin": {
+        "rabin-wasm": "cli/bin.js"
       }
     },
-    "raw-body": {
-      "version": "2.5.1",
-      "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
-      "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
+    "node_modules/race-signal": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/race-signal/-/race-signal-1.0.2.tgz",
+      "integrity": "sha512-o3xNv0iTcIDQCXFlF6fPAMEBRjFxssgGoRqLbg06m+AdzEXXLUmoNOoUHTVz2NoBI8hHwKFKoC6IqyNtWr2bww=="
+    },
+    "node_modules/raw-body": {
+      "version": "2.5.2",
+      "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
+      "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "bytes": "3.1.2",
         "http-errors": "2.0.0",
         "iconv-lite": "0.4.24",
         "unpipe": "1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.8"
       }
     },
-    "rc": {
+    "node_modules/rc": {
       "version": "1.2.8",
       "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
       "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "deep-extend": "^0.6.0",
         "ini": "~1.3.0",
         "minimist": "^1.2.0",
         "strip-json-comments": "~2.0.1"
       },
-      "dependencies": {
-        "ini": {
-          "version": "1.3.8",
-          "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
-          "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
-          "dev": true
-        },
-        "strip-json-comments": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
-          "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
-          "dev": true
-        }
+      "bin": {
+        "rc": "cli.js"
       }
     },
-    "react-is": {
-      "version": "17.0.2",
+    "node_modules/rc/node_modules/ini": {
+      "version": "1.3.8",
+      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
+      "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
       "dev": true
     },
-    "react-native-fetch-api": {
-      "version": "2.0.0",
-      "requires": {
-        "p-defer": "^3.0.0"
+    "node_modules/rc/node_modules/strip-json-comments": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+      "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
+      "dev": true,
+      "engines": {
+        "node": ">=0.10.0"
       }
     },
-    "read-pkg": {
-      "version": "5.2.0",
-      "requires": {
-        "@types/normalize-package-data": "^2.4.0",
-        "normalize-package-data": "^2.5.0",
-        "parse-json": "^5.0.0",
-        "type-fest": "^0.6.0"
-      },
-      "dependencies": {
-        "hosted-git-info": {
-          "version": "2.8.9"
-        },
-        "normalize-package-data": {
-          "version": "2.5.0",
-          "requires": {
-            "hosted-git-info": "^2.1.4",
-            "resolve": "^1.10.0",
-            "semver": "2 || 3 || 4 || 5",
-            "validate-npm-package-license": "^3.0.1"
-          }
-        },
-        "semver": {
-          "version": "5.7.1"
-        },
-        "type-fest": {
-          "version": "0.6.0"
-        }
-      }
+    "node_modules/react-is": {
+      "version": "18.2.0",
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz",
+      "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==",
+      "dev": true
     },
-    "read-pkg-up": {
-      "version": "7.0.1",
-      "requires": {
-        "find-up": "^4.1.0",
-        "read-pkg": "^5.2.0",
-        "type-fest": "^0.8.1"
+    "node_modules/react-native-fetch-api": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/react-native-fetch-api/-/react-native-fetch-api-3.0.0.tgz",
+      "integrity": "sha512-g2rtqPjdroaboDKTsJCTlcmtw54E25OjyaunUP0anOZn4Fuo2IKs8BVfe02zVggA/UysbmfSnRJIqtNkAgggNA==",
+      "dependencies": {
+        "p-defer": "^3.0.0"
       }
     },
-    "readable-stream": {
+    "node_modules/readable-stream": {
       "version": "3.6.0",
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "inherits": "^2.0.3",
         "string_decoder": "^1.1.1",
         "util-deprecate": "^1.0.1"
+      },
+      "engines": {
+        "node": ">= 6"
       }
     },
-    "receptacle": {
+    "node_modules/receptacle": {
       "version": "1.3.2",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/receptacle/-/receptacle-1.3.2.tgz",
+      "integrity": "sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==",
+      "license": "MIT",
+      "dependencies": {
         "ms": "^2.1.1"
       }
     },
-    "rechoir": {
+    "node_modules/rechoir": {
       "version": "0.6.2",
       "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
       "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "resolve": "^1.1.6"
+      },
+      "engines": {
+        "node": ">= 0.10"
       }
     },
-    "recursive-fs": {
-      "version": "1.1.2"
-    },
-    "redent": {
-      "version": "3.0.0",
-      "requires": {
-        "indent-string": "^4.0.0",
-        "strip-indent": "^3.0.0"
+    "node_modules/recursive-fs": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/recursive-fs/-/recursive-fs-1.1.2.tgz",
+      "integrity": "sha512-QPFEt5EwzwlHoqYsZc+NkUSyDTQf1Hvq7c/kpQJHi77OSCAiDXI3wfB0J04ZG+ekGHmv37mdR8MDPEshD3/RlQ==",
+      "license": "MIT",
+      "bin": {
+        "recursive-copy": "bin/recursive-copy",
+        "recursive-delete": "bin/recursive-delete"
+      },
+      "engines": {
+        "node": ">=4.0.0"
       }
     },
-    "regexp.prototype.flags": {
-      "version": "1.4.3",
-      "requires": {
+    "node_modules/regexp.prototype.flags": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz",
+      "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==",
+      "dev": true,
+      "dependencies": {
         "call-bind": "^1.0.2",
-        "define-properties": "^1.1.3",
-        "functions-have-names": "^1.2.2"
+        "define-properties": "^1.2.0",
+        "set-function-name": "^2.0.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "regexpp": {
+    "node_modules/regexpp": {
       "version": "3.2.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
+      "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/mysticatea"
+      }
     },
-    "registry-auth-token": {
+    "node_modules/registry-auth-token": {
       "version": "5.0.2",
       "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz",
       "integrity": "sha512-o/3ikDxtXaA59BmZuZrJZDJv8NMDGSj+6j6XaeBmHw8eY1i1qd9+6H+LjVvQXx3HN6aRCGa1cUdJ9RaJZUugnQ==",
       "dev": true,
-      "requires": {
-        "@pnpm/npm-conf": "^2.1.0"
+      "dependencies": {
+        "@pnpm/npm-conf": "^2.1.0"
+      },
+      "engines": {
+        "node": ">=14"
+      }
+    },
+    "node_modules/registry-url": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz",
+      "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==",
+      "dev": true,
+      "dependencies": {
+        "rc": "1.2.8"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/release-it": {
+      "version": "15.10.1",
+      "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.10.1.tgz",
+      "integrity": "sha512-Wkk4aFHSo27vQwHIlcEy77lJwnQlh4UDQckc53gh5tKo7F22mAUEAe8SYQZJcFh7icdkf0OV70onhB1dDmeClA==",
+      "dev": true,
+      "dependencies": {
+        "@iarna/toml": "2.2.5",
+        "@octokit/rest": "19.0.7",
+        "async-retry": "1.3.3",
+        "chalk": "5.2.0",
+        "cosmiconfig": "8.1.3",
+        "execa": "7.1.1",
+        "git-url-parse": "13.1.0",
+        "globby": "13.1.3",
+        "got": "12.6.0",
+        "inquirer": "9.1.5",
+        "is-ci": "3.0.1",
+        "issue-parser": "6.0.0",
+        "lodash": "4.17.21",
+        "mime-types": "2.1.35",
+        "new-github-release-url": "2.0.0",
+        "node-fetch": "3.3.1",
+        "open": "9.1.0",
+        "ora": "6.3.0",
+        "os-name": "5.1.0",
+        "promise.allsettled": "1.0.6",
+        "proxy-agent": "5.0.0",
+        "semver": "7.3.8",
+        "shelljs": "0.8.5",
+        "update-notifier": "6.0.2",
+        "url-join": "5.0.0",
+        "wildcard-match": "5.1.2",
+        "yargs-parser": "21.1.1"
+      },
+      "bin": {
+        "release-it": "bin/release-it.js"
+      },
+      "engines": {
+        "node": ">=14.9"
+      }
+    },
+    "node_modules/release-it/node_modules/chalk": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
+      "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
+      "dev": true,
+      "engines": {
+        "node": "^12.17.0 || ^14.13 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
+      }
+    },
+    "node_modules/release-it/node_modules/data-uri-to-buffer": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+      "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
+      "dev": true,
+      "engines": {
+        "node": ">= 12"
+      }
+    },
+    "node_modules/release-it/node_modules/execa": {
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz",
+      "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==",
+      "dev": true,
+      "dependencies": {
+        "cross-spawn": "^7.0.3",
+        "get-stream": "^6.0.1",
+        "human-signals": "^4.3.0",
+        "is-stream": "^3.0.0",
+        "merge-stream": "^2.0.0",
+        "npm-run-path": "^5.1.0",
+        "onetime": "^6.0.0",
+        "signal-exit": "^3.0.7",
+        "strip-final-newline": "^3.0.0"
+      },
+      "engines": {
+        "node": "^14.18.0 || ^16.14.0 || >=18.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sindresorhus/execa?sponsor=1"
+      }
+    },
+    "node_modules/release-it/node_modules/human-signals": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",
+      "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==",
+      "dev": true,
+      "engines": {
+        "node": ">=14.18.0"
+      }
+    },
+    "node_modules/release-it/node_modules/is-stream": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
+      "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
+      "dev": true,
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/release-it/node_modules/mimic-fn": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
+      "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
+      "dev": true,
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/release-it/node_modules/node-fetch": {
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
+      "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
+      "dev": true,
+      "dependencies": {
+        "data-uri-to-buffer": "^4.0.0",
+        "fetch-blob": "^3.1.4",
+        "formdata-polyfill": "^4.0.10"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/node-fetch"
+      }
+    },
+    "node_modules/release-it/node_modules/npm-run-path": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz",
+      "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==",
+      "dev": true,
+      "dependencies": {
+        "path-key": "^4.0.0"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/release-it/node_modules/onetime": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
+      "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
+      "dev": true,
+      "dependencies": {
+        "mimic-fn": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "registry-url": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-6.0.1.tgz",
-      "integrity": "sha512-+crtS5QjFRqFCoQmvGduwYWEBng99ZvmFvF+cUJkGYF1L1BfU8C6Zp9T7f5vPAwyLkUExpvK+ANVZmGU49qi4Q==",
+    "node_modules/release-it/node_modules/path-key": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
+      "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
       "dev": true,
-      "requires": {
-        "rc": "1.2.8"
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "release-it": {
-      "version": "15.10.1",
-      "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.10.1.tgz",
-      "integrity": "sha512-Wkk4aFHSo27vQwHIlcEy77lJwnQlh4UDQckc53gh5tKo7F22mAUEAe8SYQZJcFh7icdkf0OV70onhB1dDmeClA==",
+    "node_modules/release-it/node_modules/strip-final-newline": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
+      "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
       "dev": true,
-      "requires": {
-        "@iarna/toml": "2.2.5",
-        "@octokit/rest": "19.0.7",
-        "async-retry": "1.3.3",
-        "chalk": "5.2.0",
-        "cosmiconfig": "8.1.3",
-        "execa": "7.1.1",
-        "git-url-parse": "13.1.0",
-        "globby": "13.1.3",
-        "got": "12.6.0",
-        "inquirer": "9.1.5",
-        "is-ci": "3.0.1",
-        "issue-parser": "6.0.0",
-        "lodash": "4.17.21",
-        "mime-types": "2.1.35",
-        "new-github-release-url": "2.0.0",
-        "node-fetch": "3.3.1",
-        "open": "9.1.0",
-        "ora": "6.3.0",
-        "os-name": "5.1.0",
-        "promise.allsettled": "1.0.6",
-        "proxy-agent": "5.0.0",
-        "semver": "7.3.8",
-        "shelljs": "0.8.5",
-        "update-notifier": "6.0.2",
-        "url-join": "5.0.0",
-        "wildcard-match": "5.1.2",
-        "yargs-parser": "21.1.1"
+      "engines": {
+        "node": ">=12"
       },
-      "dependencies": {
-        "chalk": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-          "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
-          "dev": true
-        },
-        "data-uri-to-buffer": {
-          "version": "4.0.1",
-          "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
-          "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
-          "dev": true
-        },
-        "execa": {
-          "version": "7.1.1",
-          "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz",
-          "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==",
-          "dev": true,
-          "requires": {
-            "cross-spawn": "^7.0.3",
-            "get-stream": "^6.0.1",
-            "human-signals": "^4.3.0",
-            "is-stream": "^3.0.0",
-            "merge-stream": "^2.0.0",
-            "npm-run-path": "^5.1.0",
-            "onetime": "^6.0.0",
-            "signal-exit": "^3.0.7",
-            "strip-final-newline": "^3.0.0"
-          }
-        },
-        "human-signals": {
-          "version": "4.3.1",
-          "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz",
-          "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==",
-          "dev": true
-        },
-        "is-stream": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz",
-          "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==",
-          "dev": true
-        },
-        "mimic-fn": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz",
-          "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==",
-          "dev": true
-        },
-        "node-fetch": {
-          "version": "3.3.1",
-          "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
-          "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
-          "dev": true,
-          "requires": {
-            "data-uri-to-buffer": "^4.0.0",
-            "fetch-blob": "^3.1.4",
-            "formdata-polyfill": "^4.0.10"
-          }
-        },
-        "npm-run-path": {
-          "version": "5.1.0",
-          "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz",
-          "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==",
-          "dev": true,
-          "requires": {
-            "path-key": "^4.0.0"
-          }
-        },
-        "onetime": {
-          "version": "6.0.0",
-          "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz",
-          "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==",
-          "dev": true,
-          "requires": {
-            "mimic-fn": "^4.0.0"
-          }
-        },
-        "path-key": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz",
-          "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==",
-          "dev": true
-        },
-        "strip-final-newline": {
-          "version": "3.0.0",
-          "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz",
-          "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==",
-          "dev": true
-        },
-        "yargs-parser": {
-          "version": "21.1.1",
-          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
-          "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
-          "dev": true
-        }
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "require-directory": {
+    "node_modules/require-directory": {
       "version": "2.1.1",
-      "dev": true
-    },
-    "requires-port": {
-      "version": "1.0.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+      "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+      "dev": true,
+      "engines": {
+        "node": ">=0.10.0"
+      }
     },
-    "resolve": {
+    "node_modules/resolve": {
       "version": "1.22.1",
-      "requires": {
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
         "is-core-module": "^2.9.0",
         "path-parse": "^1.0.7",
         "supports-preserve-symlinks-flag": "^1.0.0"
+      },
+      "bin": {
+        "resolve": "bin/resolve"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "resolve-alpn": {
+    "node_modules/resolve-alpn": {
       "version": "1.2.1",
       "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz",
       "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==",
       "dev": true
     },
-    "resolve-cwd": {
+    "node_modules/resolve-cwd": {
       "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+      "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "resolve-from": "^5.0.0"
       },
-      "dependencies": {
-        "resolve-from": {
-          "version": "5.0.0",
-          "dev": true
-        }
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/resolve-cwd/node_modules/resolve-from": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+      "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+      "dev": true,
+      "engines": {
+        "node": ">=8"
       }
     },
-    "resolve-from": {
+    "node_modules/resolve-from": {
       "version": "4.0.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+      "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=4"
+      }
     },
-    "resolve.exports": {
-      "version": "1.1.0",
-      "dev": true
+    "node_modules/resolve.exports": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz",
+      "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==",
+      "dev": true,
+      "engines": {
+        "node": ">=10"
+      }
     },
-    "responselike": {
+    "node_modules/responselike": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/responselike/-/responselike-3.0.0.tgz",
       "integrity": "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "lowercase-keys": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=14.16"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "restore-cursor": {
+    "node_modules/restore-cursor": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz",
       "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "onetime": "^5.1.0",
         "signal-exit": "^3.0.2"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "retimer": {
-      "version": "3.0.0"
+    "node_modules/retimer": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/retimer/-/retimer-3.0.0.tgz",
+      "integrity": "sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA=="
     },
-    "retry": {
+    "node_modules/retry": {
       "version": "0.13.1",
       "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
-      "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg=="
+      "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
+      "dev": true,
+      "engines": {
+        "node": ">= 4"
+      }
     },
-    "reusify": {
+    "node_modules/reusify": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
       "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "iojs": ">=1.0.0",
+        "node": ">=0.10.0"
+      }
     },
-    "rimraf": {
+    "node_modules/rimraf": {
       "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+      "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
       "dev": true,
-      "requires": {
+      "license": "ISC",
+      "dependencies": {
         "glob": "^7.1.3"
+      },
+      "bin": {
+        "rimraf": "bin.js"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
       }
     },
-    "run-applescript": {
+    "node_modules/run-applescript": {
       "version": "5.0.0",
       "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz",
       "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "execa": "^5.0.0"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "run-async": {
+    "node_modules/run-async": {
       "version": "2.4.1",
       "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
       "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">=0.12.0"
+      }
     },
-    "run-parallel": {
+    "node_modules/run-parallel": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
       "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
       "dev": true,
-      "requires": {
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/feross"
+        },
+        {
+          "type": "patreon",
+          "url": "https://www.patreon.com/feross"
+        },
+        {
+          "type": "consulting",
+          "url": "https://feross.org/support"
+        }
+      ],
+      "dependencies": {
         "queue-microtask": "^1.2.2"
       }
     },
-    "rxjs": {
-      "version": "7.8.0",
-      "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz",
-      "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==",
+    "node_modules/rxjs": {
+      "version": "7.8.1",
+      "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
+      "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "tslib": "^2.1.0"
       }
     },
-    "safari-14-idb-fix": {
-      "version": "3.0.0"
+    "node_modules/safe-array-concat": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz",
+      "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==",
+      "dev": true,
+      "dependencies": {
+        "call-bind": "^1.0.2",
+        "get-intrinsic": "^1.2.1",
+        "has-symbols": "^1.0.3",
+        "isarray": "^2.0.5"
+      },
+      "engines": {
+        "node": ">=0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
     },
-    "safe-buffer": {
-      "version": "5.2.0"
+    "node_modules/safe-buffer": {
+      "version": "5.2.0",
+      "license": "MIT"
     },
-    "safe-regex-test": {
+    "node_modules/safe-regex-test": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",
       "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==",
-      "requires": {
+      "dev": true,
+      "dependencies": {
         "call-bind": "^1.0.2",
         "get-intrinsic": "^1.1.3",
         "is-regex": "^1.1.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "safer-buffer": {
-      "version": "2.1.2"
-    },
-    "saxes": {
-      "version": "5.0.1",
-      "dev": true,
-      "requires": {
-        "xmlchars": "^2.2.0"
-      }
+    "node_modules/safer-buffer": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+      "license": "MIT"
     },
-    "semver": {
+    "node_modules/semver": {
       "version": "7.3.8",
       "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
       "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
-      "requires": {
+      "dev": true,
+      "dependencies": {
         "lru-cache": "^6.0.0"
+      },
+      "bin": {
+        "semver": "bin/semver.js"
+      },
+      "engines": {
+        "node": ">=10"
       }
     },
-    "semver-diff": {
+    "node_modules/semver-diff": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-4.0.0.tgz",
       "integrity": "sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "semver": "^7.3.5"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/set-function-length": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz",
+      "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==",
+      "dev": true,
+      "dependencies": {
+        "define-data-property": "^1.1.1",
+        "get-intrinsic": "^1.2.1",
+        "gopd": "^1.0.1",
+        "has-property-descriptors": "^1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/set-function-name": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz",
+      "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==",
+      "dev": true,
+      "dependencies": {
+        "define-data-property": "^1.0.1",
+        "functions-have-names": "^1.2.3",
+        "has-property-descriptors": "^1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
       }
     },
-    "setprototypeof": {
+    "node_modules/setprototypeof": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
       "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
       "dev": true
     },
-    "shebang-command": {
+    "node_modules/shebang-command": {
       "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+      "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "shebang-regex": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "shebang-regex": {
+    "node_modules/shebang-regex": {
       "version": "3.0.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+      "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "shelljs": {
+    "node_modules/shelljs": {
       "version": "0.8.5",
       "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz",
       "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "glob": "^7.0.0",
         "interpret": "^1.0.0",
         "rechoir": "^0.6.2"
+      },
+      "bin": {
+        "shjs": "bin/shjs"
+      },
+      "engines": {
+        "node": ">=4"
       }
     },
-    "side-channel": {
+    "node_modules/side-channel": {
       "version": "1.0.4",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+      "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+      "dev": true,
+      "dependencies": {
         "call-bind": "^1.0.0",
         "get-intrinsic": "^1.0.2",
         "object-inspect": "^1.9.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "signal-exit": {
+    "node_modules/signal-exit": {
       "version": "3.0.7",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+      "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+      "dev": true,
+      "license": "ISC"
     },
-    "sisteransi": {
+    "node_modules/sisteransi": {
       "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
+      "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==",
       "dev": true
     },
-    "slash": {
+    "node_modules/slash": {
       "version": "3.0.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+      "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+      "dev": true,
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "smart-buffer": {
+    "node_modules/smart-buffer": {
       "version": "4.2.0",
       "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz",
       "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">= 6.0.0",
+        "npm": ">= 3.0.0"
+      }
     },
-    "socks": {
+    "node_modules/socks": {
       "version": "2.7.1",
       "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz",
       "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "ip": "^2.0.0",
         "smart-buffer": "^4.2.0"
       },
-      "dependencies": {
-        "ip": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
-          "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
-          "dev": true
-        }
+      "engines": {
+        "node": ">= 10.13.0",
+        "npm": ">= 3.0.0"
       }
     },
-    "socks-proxy-agent": {
+    "node_modules/socks-proxy-agent": {
       "version": "5.0.1",
       "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz",
       "integrity": "sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "agent-base": "^6.0.2",
         "debug": "4",
         "socks": "^2.3.3"
+      },
+      "engines": {
+        "node": ">= 6"
       }
     },
-    "source-map": {
-      "version": "0.6.1",
+    "node_modules/socks/node_modules/ip": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz",
+      "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==",
       "dev": true
     },
-    "source-map-support": {
-      "version": "0.5.21",
+    "node_modules/source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
       "dev": true,
-      "requires": {
-        "buffer-from": "^1.0.0",
-        "source-map": "^0.6.0"
-      }
-    },
-    "sparse-array": {
-      "version": "1.3.2"
-    },
-    "spdx-correct": {
-      "version": "3.1.1",
-      "requires": {
-        "spdx-expression-parse": "^3.0.0",
-        "spdx-license-ids": "^3.0.0"
+      "license": "BSD-3-Clause",
+      "engines": {
+        "node": ">=0.10.0"
       }
     },
-    "spdx-exceptions": {
-      "version": "2.3.0"
-    },
-    "spdx-expression-parse": {
-      "version": "3.0.1",
-      "requires": {
-        "spdx-exceptions": "^2.1.0",
-        "spdx-license-ids": "^3.0.0"
+    "node_modules/source-map-support": {
+      "version": "0.5.13",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz",
+      "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==",
+      "dev": true,
+      "dependencies": {
+        "buffer-from": "^1.0.0",
+        "source-map": "^0.6.0"
       }
     },
-    "spdx-license-ids": {
-      "version": "3.0.12"
+    "node_modules/sparse-array": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/sparse-array/-/sparse-array-1.3.2.tgz",
+      "integrity": "sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==",
+      "license": "ISC"
     },
-    "sprintf-js": {
+    "node_modules/sprintf-js": {
       "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==",
       "dev": true
     },
-    "stack-utils": {
-      "version": "2.0.5",
+    "node_modules/stack-utils": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz",
+      "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "escape-string-regexp": "^2.0.0"
       },
-      "dependencies": {
-        "escape-string-regexp": {
-          "version": "2.0.0",
-          "dev": true
-        }
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/stack-utils/node_modules/escape-string-regexp": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+      "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+      "dev": true,
+      "engines": {
+        "node": ">=8"
       }
     },
-    "statuses": {
+    "node_modules/statuses": {
       "version": "2.0.1",
       "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
       "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">= 0.8"
+      }
     },
-    "stdin-discarder": {
+    "node_modules/stdin-discarder": {
       "version": "0.1.0",
       "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.1.0.tgz",
       "integrity": "sha512-xhV7w8S+bUwlPTb4bAOUQhv8/cSS5offJuX8GQGq32ONF0ZtDWKfkdomM3HMRA+LhX6um/FZ0COqlwsjD53LeQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "bl": "^5.0.0"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "stop-iteration-iterator": {
+    "node_modules/stop-iteration-iterator": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz",
       "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "internal-slot": "^1.0.4"
+      },
+      "engines": {
+        "node": ">= 0.4"
       }
     },
-    "stream-browserify": {
+    "node_modules/stream-browserify": {
       "version": "3.0.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz",
+      "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==",
+      "license": "MIT",
+      "dependencies": {
         "inherits": "~2.0.4",
         "readable-stream": "^3.5.0"
       }
     },
-    "stream-to-it": {
+    "node_modules/stream-to-it": {
       "version": "0.2.4",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/stream-to-it/-/stream-to-it-0.2.4.tgz",
+      "integrity": "sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ==",
+      "dependencies": {
         "get-iterator": "^1.0.2"
       }
     },
-    "streaming-iterables": {
-      "version": "6.2.0"
-    },
-    "string_decoder": {
+    "node_modules/string_decoder": {
       "version": "1.3.0",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+      "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+      "license": "MIT",
+      "dependencies": {
         "safe-buffer": "~5.2.0"
       }
     },
-    "string-length": {
+    "node_modules/string-length": {
       "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz",
+      "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "char-regex": "^1.0.2",
         "strip-ansi": "^6.0.0"
       },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/string-length/node_modules/strip-ansi": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+      "dev": true,
       "dependencies": {
-        "strip-ansi": {
-          "version": "6.0.1",
-          "dev": true,
-          "requires": {
-            "ansi-regex": "^5.0.1"
-          }
-        }
+        "ansi-regex": "^5.0.1"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "string-width": {
+    "node_modules/string-width": {
       "version": "4.2.3",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+      "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "emoji-regex": "^8.0.0",
         "is-fullwidth-code-point": "^3.0.0",
         "strip-ansi": "^6.0.1"
       },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/string-width/node_modules/strip-ansi": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+      "dev": true,
+      "license": "MIT",
       "dependencies": {
-        "strip-ansi": {
-          "version": "6.0.1",
-          "dev": true,
-          "requires": {
-            "ansi-regex": "^5.0.1"
-          }
-        }
+        "ansi-regex": "^5.0.1"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "string.prototype.trimend": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz",
-      "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==",
-      "requires": {
+    "node_modules/string.prototype.trim": {
+      "version": "1.2.8",
+      "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
+      "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==",
+      "dev": true,
+      "dependencies": {
         "call-bind": "^1.0.2",
-        "define-properties": "^1.1.4",
-        "es-abstract": "^1.20.4"
+        "define-properties": "^1.2.0",
+        "es-abstract": "^1.22.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "string.prototype.trimstart": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz",
-      "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==",
-      "requires": {
+    "node_modules/string.prototype.trimend": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz",
+      "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==",
+      "dev": true,
+      "dependencies": {
         "call-bind": "^1.0.2",
-        "define-properties": "^1.1.4",
-        "es-abstract": "^1.20.4"
+        "define-properties": "^1.2.0",
+        "es-abstract": "^1.22.1"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "strip-ansi": {
-      "version": "7.0.1",
-      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
-      "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
+    "node_modules/string.prototype.trimstart": {
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz",
+      "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==",
       "dev": true,
-      "requires": {
-        "ansi-regex": "^6.0.1"
+      "dependencies": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.2.0",
+        "es-abstract": "^1.22.1"
       },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/strip-ansi": {
+      "version": "7.1.0",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
+      "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
+      "dev": true,
       "dependencies": {
-        "ansi-regex": {
-          "version": "6.0.1",
-          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
-          "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
-          "dev": true
-        }
+        "ansi-regex": "^6.0.1"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/strip-ansi?sponsor=1"
+      }
+    },
+    "node_modules/strip-ansi/node_modules/ansi-regex": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
+      "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+      "dev": true,
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-regex?sponsor=1"
       }
     },
-    "strip-bom": {
+    "node_modules/strip-bom": {
       "version": "4.0.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
+      "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
+      "dev": true,
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "strip-final-newline": {
+    "node_modules/strip-final-newline": {
       "version": "2.0.0",
-      "dev": true
-    },
-    "strip-indent": {
-      "version": "3.0.0",
-      "requires": {
-        "min-indent": "^1.0.0"
+      "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
+      "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=6"
       }
     },
-    "strip-json-comments": {
+    "node_modules/strip-json-comments": {
       "version": "3.1.1",
-      "dev": true
-    },
-    "supports-color": {
-      "version": "5.5.0",
-      "requires": {
-        "has-flag": "^3.0.0"
-      }
-    },
-    "supports-hyperlinks": {
-      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+      "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
       "dev": true,
-      "requires": {
-        "has-flag": "^4.0.0",
-        "supports-color": "^7.0.0"
+      "license": "MIT",
+      "engines": {
+        "node": ">=8"
       },
-      "dependencies": {
-        "has-flag": {
-          "version": "4.0.0",
-          "dev": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "dev": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "supports-preserve-symlinks-flag": {
-      "version": "1.0.0"
+    "node_modules/strnum": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz",
+      "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA=="
     },
-    "symbol-tree": {
-      "version": "3.2.4",
-      "dev": true
+    "node_modules/supports-color": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+      "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+      "dev": true,
+      "dependencies": {
+        "has-flag": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
     },
-    "terminal-link": {
-      "version": "2.1.1",
+    "node_modules/supports-preserve-symlinks-flag": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+      "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
       "dev": true,
-      "requires": {
-        "ansi-escapes": "^4.2.1",
-        "supports-hyperlinks": "^2.0.0"
+      "license": "MIT",
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "test-exclude": {
+    "node_modules/test-exclude": {
       "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
+      "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "@istanbuljs/schema": "^0.1.2",
         "glob": "^7.1.4",
         "minimatch": "^3.0.4"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "text-table": {
+    "node_modules/text-table": {
       "version": "0.2.0",
-      "dev": true
-    },
-    "throat": {
-      "version": "6.0.1",
-      "dev": true
-    },
-    "throttled-queue": {
-      "version": "2.1.4"
+      "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+      "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
+      "dev": true,
+      "license": "MIT"
     },
-    "through": {
+    "node_modules/through": {
       "version": "2.3.8",
       "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
       "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==",
       "dev": true
     },
-    "timeout-abort-controller": {
-      "version": "2.0.0",
-      "requires": {
-        "abort-controller": "^3.0.0",
-        "native-abort-controller": "^1.0.4",
+    "node_modules/timeout-abort-controller": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/timeout-abort-controller/-/timeout-abort-controller-3.0.0.tgz",
+      "integrity": "sha512-O3e+2B8BKrQxU2YRyEjC/2yFdb33slI22WRdUaDx6rvysfi9anloNZyR2q0l6LnePo5qH7gSM7uZtvvwZbc2yA==",
+      "dependencies": {
         "retimer": "^3.0.0"
       }
     },
-    "titleize": {
+    "node_modules/titleize": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz",
       "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "tmp": {
+    "node_modules/tmp": {
       "version": "0.0.33",
       "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
       "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "os-tmpdir": "~1.0.2"
+      },
+      "engines": {
+        "node": ">=0.6.0"
       }
     },
-    "tmpl": {
+    "node_modules/tmpl": {
       "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
+      "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==",
       "dev": true
     },
-    "to-fast-properties": {
+    "node_modules/to-fast-properties": {
       "version": "2.0.0",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+      "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",
+      "dev": true,
+      "engines": {
+        "node": ">=4"
+      }
     },
-    "to-regex-range": {
+    "node_modules/to-regex-range": {
       "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+      "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "is-number": "^7.0.0"
+      },
+      "engines": {
+        "node": ">=8.0"
       }
     },
-    "toidentifier": {
+    "node_modules/toidentifier": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
       "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
-      "dev": true
-    },
-    "tough-cookie": {
-      "version": "4.1.0",
       "dev": true,
-      "requires": {
-        "psl": "^1.1.33",
-        "punycode": "^2.1.1",
-        "universalify": "^0.2.0",
-        "url-parse": "^1.5.3"
+      "engines": {
+        "node": ">=0.6"
       }
     },
-    "tr46": {
-      "version": "2.1.0",
+    "node_modules/tslib": {
+      "version": "2.6.2",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+      "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
+    },
+    "node_modules/tunnel": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
+      "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
+      "engines": {
+        "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
+      }
+    },
+    "node_modules/type-check": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+      "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==",
       "dev": true,
-      "requires": {
-        "punycode": "^2.1.1"
+      "license": "MIT",
+      "dependencies": {
+        "prelude-ls": "~1.1.2"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
       }
     },
-    "trim-newlines": {
-      "version": "3.0.1"
+    "node_modules/type-detect": {
+      "version": "4.0.8",
+      "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+      "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
+      "dev": true,
+      "engines": {
+        "node": ">=4"
+      }
     },
-    "tslib": {
-      "version": "2.4.1",
-      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
-      "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
+    "node_modules/type-fest": {
+      "version": "0.21.3",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
+      "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
+      "dev": true,
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "tunnel": {
-      "version": "0.0.6"
+    "node_modules/typed-array-buffer": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz",
+      "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==",
+      "dev": true,
+      "dependencies": {
+        "call-bind": "^1.0.2",
+        "get-intrinsic": "^1.2.1",
+        "is-typed-array": "^1.1.10"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
     },
-    "type-check": {
-      "version": "0.3.2",
+    "node_modules/typed-array-byte-length": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz",
+      "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==",
       "dev": true,
-      "requires": {
-        "prelude-ls": "~1.1.2"
+      "dependencies": {
+        "call-bind": "^1.0.2",
+        "for-each": "^0.3.3",
+        "has-proto": "^1.0.1",
+        "is-typed-array": "^1.1.10"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "type-detect": {
-      "version": "4.0.8",
-      "dev": true
+    "node_modules/typed-array-byte-offset": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz",
+      "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==",
+      "dev": true,
+      "dependencies": {
+        "available-typed-arrays": "^1.0.5",
+        "call-bind": "^1.0.2",
+        "for-each": "^0.3.3",
+        "has-proto": "^1.0.1",
+        "is-typed-array": "^1.1.10"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
     },
-    "type-fest": {
-      "version": "0.8.1"
+    "node_modules/typed-array-length": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz",
+      "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==",
+      "dev": true,
+      "dependencies": {
+        "call-bind": "^1.0.2",
+        "for-each": "^0.3.3",
+        "is-typed-array": "^1.1.9"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
     },
-    "typedarray-to-buffer": {
+    "node_modules/typedarray-to-buffer": {
       "version": "3.1.5",
+      "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
+      "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
       "dev": true,
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "is-typedarray": "^1.0.0"
       }
     },
-    "uint8arrays": {
+    "node_modules/uint8-varint": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/uint8-varint/-/uint8-varint-2.0.3.tgz",
+      "integrity": "sha512-seXTM8ba4uuAMDgi3UHXPdDxCBKjWWZigW+F+1ESPhOZv9ekT1qmbdzYHLSNA+u+wHj10P55dQ41y2Qh7NOqiA==",
+      "dependencies": {
+        "uint8arraylist": "^2.0.0",
+        "uint8arrays": "^5.0.0"
+      }
+    },
+    "node_modules/uint8-varint/node_modules/multiformats": {
+      "version": "13.0.0",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-13.0.0.tgz",
+      "integrity": "sha512-xiIB0p7EKmETm3wyKedOg/xuyQ18PoWwXCzzgpZAiDxL9ktl3XTh8AqoDT5kAqRg+DU48XAGPsUJL2Rn6Bx3Lw=="
+    },
+    "node_modules/uint8-varint/node_modules/uint8arrays": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-5.0.1.tgz",
+      "integrity": "sha512-ND5RpJAnPgHmZT7hWD/2T4BwRp04j8NLKvMKC/7bhiEwEjUMkQ4kvBKiH6hOqbljd6qJ2xS8reL3vl1e33grOQ==",
+      "dependencies": {
+        "multiformats": "^13.0.0"
+      }
+    },
+    "node_modules/uint8arraylist": {
+      "version": "2.4.7",
+      "resolved": "https://registry.npmjs.org/uint8arraylist/-/uint8arraylist-2.4.7.tgz",
+      "integrity": "sha512-ohRElqR6C5dd60vRFLq40MCiSnUe1AzkpHvbCEMCGGP6zMoFYECsjdhL6bR1kTK37ONNRDuHQ3RIpScRYcYYIg==",
+      "dependencies": {
+        "uint8arrays": "^4.0.2"
+      }
+    },
+    "node_modules/uint8arraylist/node_modules/multiformats": {
+      "version": "12.1.3",
+      "resolved": "https://registry.npmjs.org/multiformats/-/multiformats-12.1.3.tgz",
+      "integrity": "sha512-eajQ/ZH7qXZQR2AgtfpmSMizQzmyYVmCql7pdhldPuYQi4atACekbJaQplk6dWyIi10jCaFnd6pqvcEFXjbaJw==",
+      "engines": {
+        "node": ">=16.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/uint8arraylist/node_modules/uint8arrays": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-4.0.10.tgz",
+      "integrity": "sha512-AnJNUGGDJAgFw/eWu/Xb9zrVKEGlwJJCaeInlf3BkecE/zcTobk5YXYIPNQJO1q5Hh1QZrQQHf0JvcHqz2hqoA==",
+      "dependencies": {
+        "multiformats": "^12.0.1"
+      }
+    },
+    "node_modules/uint8arrays": {
       "version": "3.0.0",
-      "requires": {
+      "license": "MIT",
+      "dependencies": {
         "multiformats": "^9.4.2"
       }
     },
-    "unbox-primitive": {
+    "node_modules/unbox-primitive": {
       "version": "1.0.2",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
+      "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==",
+      "dev": true,
+      "dependencies": {
         "call-bind": "^1.0.2",
         "has-bigints": "^1.0.2",
         "has-symbols": "^1.0.3",
         "which-boxed-primitive": "^1.0.2"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/undici": {
+      "version": "5.28.2",
+      "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz",
+      "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==",
+      "dependencies": {
+        "@fastify/busboy": "^2.0.0"
+      },
+      "engines": {
+        "node": ">=14.0"
       }
     },
-    "unique-string": {
+    "node_modules/undici-types": {
+      "version": "5.26.5",
+      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+      "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
+    },
+    "node_modules/unique-string": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz",
       "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "crypto-random-string": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "universal-user-agent": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
-      "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
-    },
-    "universalify": {
-      "version": "0.2.0",
-      "dev": true
+    "node_modules/universal-user-agent": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
+      "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ=="
     },
-    "unpipe": {
+    "node_modules/unpipe": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
       "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">= 0.8"
+      }
     },
-    "untildify": {
+    "node_modules/untildify": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz",
       "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">=8"
+      }
     },
-    "update-browserslist-db": {
-      "version": "1.0.5",
+    "node_modules/update-browserslist-db": {
+      "version": "1.0.13",
+      "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
+      "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
       "dev": true,
-      "requires": {
+      "funding": [
+        {
+          "type": "opencollective",
+          "url": "https://opencollective.com/browserslist"
+        },
+        {
+          "type": "tidelift",
+          "url": "https://tidelift.com/funding/github/npm/browserslist"
+        },
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/ai"
+        }
+      ],
+      "dependencies": {
         "escalade": "^3.1.1",
         "picocolors": "^1.0.0"
+      },
+      "bin": {
+        "update-browserslist-db": "cli.js"
+      },
+      "peerDependencies": {
+        "browserslist": ">= 4.21.0"
       }
     },
-    "update-notifier": {
+    "node_modules/update-notifier": {
       "version": "6.0.2",
       "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-6.0.2.tgz",
       "integrity": "sha512-EDxhTEVPZZRLWYcJ4ZXjGFN0oP7qYvbXWzEgRm/Yql4dHX5wDbvh89YHP6PK1lzZJYrMtXUuZZz8XGK+U6U1og==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "boxen": "^7.0.0",
         "chalk": "^5.0.1",
         "configstore": "^6.0.0",
@@ -20618,337 +14759,423 @@
         "semver-diff": "^4.0.0",
         "xdg-basedir": "^5.1.0"
       },
-      "dependencies": {
-        "chalk": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",
-          "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",
-          "dev": true
-        }
+      "engines": {
+        "node": ">=14.16"
+      },
+      "funding": {
+        "url": "https://github.com/yeoman/update-notifier?sponsor=1"
+      }
+    },
+    "node_modules/update-notifier/node_modules/chalk": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+      "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+      "dev": true,
+      "engines": {
+        "node": "^12.17.0 || ^14.13 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/chalk?sponsor=1"
       }
     },
-    "uri-js": {
+    "node_modules/uri-js": {
       "version": "4.4.1",
+      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+      "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
       "dev": true,
-      "requires": {
+      "license": "BSD-2-Clause",
+      "dependencies": {
         "punycode": "^2.1.0"
       }
     },
-    "url-join": {
+    "node_modules/url-join": {
       "version": "5.0.0",
       "resolved": "https://registry.npmjs.org/url-join/-/url-join-5.0.0.tgz",
       "integrity": "sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==",
-      "dev": true
-    },
-    "url-parse": {
-      "version": "1.5.10",
       "dev": true,
-      "requires": {
-        "querystringify": "^2.1.1",
-        "requires-port": "^1.0.0"
-      }
-    },
-    "util": {
-      "version": "0.12.4",
-      "requires": {
-        "inherits": "^2.0.3",
-        "is-arguments": "^1.0.4",
-        "is-generator-function": "^1.0.7",
-        "is-typed-array": "^1.1.3",
-        "safe-buffer": "^5.1.2",
-        "which-typed-array": "^1.1.2"
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
       }
     },
-    "util-deprecate": {
-      "version": "1.0.2"
+    "node_modules/util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
+      "license": "MIT"
     },
-    "uuid": {
-      "version": "8.3.2"
+    "node_modules/uuid": {
+      "version": "8.3.2",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+      "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+      "license": "MIT",
+      "bin": {
+        "uuid": "dist/bin/uuid"
+      }
     },
-    "v8-compile-cache": {
+    "node_modules/v8-compile-cache": {
       "version": "2.1.0",
-      "dev": true
+      "dev": true,
+      "license": "MIT"
     },
-    "v8-to-istanbul": {
-      "version": "8.1.1",
+    "node_modules/v8-to-istanbul": {
+      "version": "9.2.0",
+      "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz",
+      "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==",
       "dev": true,
-      "requires": {
+      "dependencies": {
+        "@jridgewell/trace-mapping": "^0.3.12",
         "@types/istanbul-lib-coverage": "^2.0.1",
-        "convert-source-map": "^1.6.0",
-        "source-map": "^0.7.3"
+        "convert-source-map": "^2.0.0"
       },
-      "dependencies": {
-        "source-map": {
-          "version": "0.7.4",
-          "dev": true
-        }
+      "engines": {
+        "node": ">=10.12.0"
       }
     },
-    "validate-npm-package-license": {
-      "version": "3.0.4",
-      "requires": {
-        "spdx-correct": "^3.0.0",
-        "spdx-expression-parse": "^3.0.0"
-      }
+    "node_modules/varint": {
+      "version": "5.0.2",
+      "resolved": "https://registry.npmjs.org/varint/-/varint-5.0.2.tgz",
+      "integrity": "sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow==",
+      "license": "MIT"
     },
-    "varint": {
-      "version": "5.0.2"
+    "node_modules/varint-decoder": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/varint-decoder/-/varint-decoder-1.0.0.tgz",
+      "integrity": "sha512-JkOvdztASWGUAsXshCFHrB9f6AgR2Q8W08CEyJ+43b1qtFocmI8Sp1R/M0E/hDOY2FzVIqk63tOYLgDYWuJ7IQ==",
+      "dependencies": {
+        "varint": "^5.0.0"
+      },
+      "engines": {
+        "node": ">=4.0.0",
+        "npm": ">=3.0.0"
+      }
     },
-    "vm2": {
-      "version": "3.9.16",
-      "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.16.tgz",
-      "integrity": "sha512-3T9LscojNTxdOyG+e8gFeyBXkMlOBYDoF6dqZbj+MPVHi9x10UfiTAJIobuchRCp3QvC+inybTbMJIUrLsig0w==",
+    "node_modules/vm2": {
+      "version": "3.9.19",
+      "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.19.tgz",
+      "integrity": "sha512-J637XF0DHDMV57R6JyVsTak7nIL8gy5KH4r1HiwWLf/4GBbb5MKL5y7LpmF4A8E2nR6XmzpmMFQ7V7ppPTmUQg==",
+      "deprecated": "The library contains critical security issues and should not be used for production! The maintenance of the project has been discontinued. Consider migrating your code to isolated-vm.",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "acorn": "^8.7.0",
         "acorn-walk": "^8.2.0"
       },
-      "dependencies": {
-        "acorn-walk": {
-          "version": "8.2.0",
-          "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz",
-          "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==",
-          "dev": true
-        }
-      }
-    },
-    "w3c-hr-time": {
-      "version": "1.0.2",
-      "dev": true,
-      "requires": {
-        "browser-process-hrtime": "^1.0.0"
+      "bin": {
+        "vm2": "bin/vm2"
+      },
+      "engines": {
+        "node": ">=6.0"
       }
     },
-    "w3c-xmlserializer": {
-      "version": "2.0.0",
+    "node_modules/vm2/node_modules/acorn-walk": {
+      "version": "8.3.1",
+      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz",
+      "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==",
       "dev": true,
-      "requires": {
-        "xml-name-validator": "^3.0.0"
+      "engines": {
+        "node": ">=0.4.0"
       }
     },
-    "walker": {
+    "node_modules/walker": {
       "version": "1.0.8",
+      "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz",
+      "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "makeerror": "1.0.12"
       }
     },
-    "wcwidth": {
+    "node_modules/wcwidth": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
       "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "defaults": "^1.0.3"
       }
     },
-    "web-encoding": {
-      "version": "1.1.5",
-      "requires": {
-        "@zxing/text-encoding": "0.9.0",
-        "util": "^0.12.3"
-      }
-    },
-    "web-streams-polyfill": {
-      "version": "3.2.1"
-    },
-    "webidl-conversions": {
-      "version": "6.1.0",
-      "dev": true
-    },
-    "whatwg-encoding": {
-      "version": "1.0.5",
-      "dev": true,
-      "requires": {
-        "iconv-lite": "0.4.24"
-      }
-    },
-    "whatwg-mimetype": {
-      "version": "2.3.0",
-      "dev": true
-    },
-    "whatwg-url": {
-      "version": "8.7.0",
+    "node_modules/web-streams-polyfill": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.2.tgz",
+      "integrity": "sha512-3pRGuxRF5gpuZc0W+EpwQRmCD7gRqcDOMt688KmdlDAgAyaB1XlN0zq2njfDNm44XVdIouE7pZ6GzbdyH47uIQ==",
       "dev": true,
-      "requires": {
-        "lodash": "^4.7.0",
-        "tr46": "^2.1.0",
-        "webidl-conversions": "^6.1.0"
+      "engines": {
+        "node": ">= 8"
       }
     },
-    "which": {
+    "node_modules/which": {
       "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+      "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
       "dev": true,
-      "requires": {
+      "license": "ISC",
+      "dependencies": {
         "isexe": "^2.0.0"
+      },
+      "bin": {
+        "node-which": "bin/node-which"
+      },
+      "engines": {
+        "node": ">= 8"
       }
     },
-    "which-boxed-primitive": {
+    "node_modules/which-boxed-primitive": {
       "version": "1.0.2",
-      "requires": {
+      "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+      "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+      "dev": true,
+      "dependencies": {
         "is-bigint": "^1.0.1",
         "is-boolean-object": "^1.1.0",
         "is-number-object": "^1.0.4",
         "is-string": "^1.0.5",
         "is-symbol": "^1.0.3"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "which-typed-array": {
-      "version": "1.1.8",
-      "requires": {
+    "node_modules/which-typed-array": {
+      "version": "1.1.13",
+      "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz",
+      "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==",
+      "dev": true,
+      "dependencies": {
         "available-typed-arrays": "^1.0.5",
-        "call-bind": "^1.0.2",
-        "es-abstract": "^1.20.0",
+        "call-bind": "^1.0.4",
         "for-each": "^0.3.3",
-        "has-tostringtag": "^1.0.0",
-        "is-typed-array": "^1.1.9"
+        "gopd": "^1.0.1",
+        "has-tostringtag": "^1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "widest-line": {
+    "node_modules/widest-line": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz",
       "integrity": "sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "string-width": "^5.0.1"
       },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/widest-line/node_modules/emoji-regex": {
+      "version": "9.2.2",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
+      "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
+      "dev": true
+    },
+    "node_modules/widest-line/node_modules/string-width": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
+      "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
+      "dev": true,
       "dependencies": {
-        "emoji-regex": {
-          "version": "9.2.2",
-          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
-          "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
-          "dev": true
-        },
-        "string-width": {
-          "version": "5.1.2",
-          "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
-          "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==",
-          "dev": true,
-          "requires": {
-            "eastasianwidth": "^0.2.0",
-            "emoji-regex": "^9.2.2",
-            "strip-ansi": "^7.0.1"
-          }
-        }
+        "eastasianwidth": "^0.2.0",
+        "emoji-regex": "^9.2.2",
+        "strip-ansi": "^7.0.1"
+      },
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "wildcard-match": {
+    "node_modules/wildcard-match": {
       "version": "5.1.2",
       "resolved": "https://registry.npmjs.org/wildcard-match/-/wildcard-match-5.1.2.tgz",
       "integrity": "sha512-qNXwI591Z88c8bWxp+yjV60Ch4F8Riawe3iGxbzquhy8Xs9m+0+SLFBGb/0yCTIDElawtaImC37fYZ+dr32KqQ==",
       "dev": true
     },
-    "windows-release": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-5.1.0.tgz",
-      "integrity": "sha512-CddHecz5dt0ngTjGPP1uYr9Tjl4qq5rEKNk8UGb8XCdngNXI+GRYvqelD055FdiUgqODZz3R/5oZWYldPtXQpA==",
+    "node_modules/windows-release": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-5.1.1.tgz",
+      "integrity": "sha512-NMD00arvqcq2nwqc5Q6KtrSRHK+fVD31erE5FEMahAw5PmVCgD7MUXodq3pdZSUkqA9Cda2iWx6s1XYwiJWRmw==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "execa": "^5.1.1"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "word-wrap": {
+    "node_modules/word-wrap": {
       "version": "1.2.3",
-      "dev": true
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.10.0"
+      }
     },
-    "wrap-ansi": {
+    "node_modules/wrap-ansi": {
       "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+      "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
       "dev": true,
-      "requires": {
+      "dependencies": {
         "ansi-styles": "^4.0.0",
         "string-width": "^4.1.0",
         "strip-ansi": "^6.0.0"
       },
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+      }
+    },
+    "node_modules/wrap-ansi/node_modules/ansi-styles": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+      "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+      "dev": true,
       "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "dev": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "dev": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "dev": true
-        },
-        "strip-ansi": {
-          "version": "6.0.1",
-          "dev": true,
-          "requires": {
-            "ansi-regex": "^5.0.1"
-          }
-        }
+        "color-convert": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+      }
+    },
+    "node_modules/wrap-ansi/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+      "dev": true,
+      "dependencies": {
+        "color-name": "~1.1.4"
+      },
+      "engines": {
+        "node": ">=7.0.0"
+      }
+    },
+    "node_modules/wrap-ansi/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+      "dev": true
+    },
+    "node_modules/wrap-ansi/node_modules/strip-ansi": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+      "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+      "dev": true,
+      "dependencies": {
+        "ansi-regex": "^5.0.1"
+      },
+      "engines": {
+        "node": ">=8"
       }
     },
-    "wrappy": {
-      "version": "1.0.2"
+    "node_modules/wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+      "license": "ISC"
     },
-    "write-file-atomic": {
+    "node_modules/write-file-atomic": {
       "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
+      "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
       "dev": true,
-      "requires": {
+      "license": "ISC",
+      "dependencies": {
         "imurmurhash": "^0.1.4",
         "is-typedarray": "^1.0.0",
         "signal-exit": "^3.0.2",
         "typedarray-to-buffer": "^3.1.5"
       }
     },
-    "ws": {
-      "version": "7.5.9",
-      "dev": true,
-      "requires": {}
-    },
-    "xdg-basedir": {
+    "node_modules/xdg-basedir": {
       "version": "5.1.0",
       "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz",
       "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==",
-      "dev": true
-    },
-    "xml-name-validator": {
-      "version": "3.0.0",
-      "dev": true
-    },
-    "xmlchars": {
-      "version": "2.2.0",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": ">=12"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     },
-    "xregexp": {
+    "node_modules/xregexp": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz",
       "integrity": "sha512-xl/50/Cf32VsGq/1R8jJE5ajH1yMCQkpmoS10QbFZWl2Oor4H0Me64Pu2yxvsRWK3m6soJbmGfzSR7BYmDcWAA==",
-      "dev": true
+      "dev": true,
+      "engines": {
+        "node": "*"
+      }
     },
-    "y18n": {
+    "node_modules/y18n": {
       "version": "5.0.8",
-      "dev": true
+      "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+      "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+      "dev": true,
+      "engines": {
+        "node": ">=10"
+      }
     },
-    "yallist": {
-      "version": "4.0.0"
+    "node_modules/yallist": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+      "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+      "dev": true,
+      "license": "ISC"
     },
-    "yargs": {
-      "version": "16.2.0",
+    "node_modules/yargs": {
+      "version": "17.7.2",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+      "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
       "dev": true,
-      "requires": {
-        "cliui": "^7.0.2",
+      "dependencies": {
+        "cliui": "^8.0.1",
         "escalade": "^3.1.1",
         "get-caller-file": "^2.0.5",
         "require-directory": "^2.1.1",
-        "string-width": "^4.2.0",
+        "string-width": "^4.2.3",
         "y18n": "^5.0.5",
-        "yargs-parser": "^20.2.2"
+        "yargs-parser": "^21.1.1"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/yargs-parser": {
+      "version": "21.1.1",
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+      "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+      "dev": true,
+      "engines": {
+        "node": ">=12"
       }
     },
-    "yargs-parser": {
-      "version": "20.2.9",
-      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
-      "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w=="
+    "node_modules/yocto-queue": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+      "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+      "dev": true,
+      "engines": {
+        "node": ">=10"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
     }
   }
 }
diff --git a/package.json b/package.json
index 8d5c808bc..5cba18561 100644
--- a/package.json
+++ b/package.json
@@ -1,15 +1,17 @@
 {
   "name": "ipfs-action",
-  "version": "0.3.1",
+  "version": "1.0.0",
   "description": "IPFS upload action",
-  "main": "index.js",
+  "exports": "./index.js",
+  "type": "module",
   "scripts": {
     "build": "ncc build index.js --license LICENSE",
     "lint": "eslint --max-warnings 0 runner.js uploader.js pinners/*.js",
     "release": "npm i && release-it",
-    "test": "jest"
+    "test": "node --experimental-vm-modules ./node_modules/.bin/jest"
   },
   "jest": {
+    "transform": {},
     "moduleNameMapper": {
       "ipfs-car/pack": "/node_modules/ipfs-car/dist/cjs/pack/index.js",
       "ipfs-car/blockstore/fs": "/node_modules/ipfs-car/dist/cjs/blockstore/fs.js"
@@ -35,19 +37,22 @@
   },
   "homepage": "https://github.com/aquiladev/ipfs-action#readme",
   "dependencies": {
-    "@actions/core": "^1.10.0",
-    "@actions/github": "^5.1.1",
-    "@filebase/client": "0.0.2",
+    "@actions/core": "1.10.1",
+    "@actions/github": "6.0.0",
+    "@filebase/sdk": "1.0.2",
     "@pinata/sdk": "1.1.23",
-    "files-from-path": "0.2.6",
-    "ipfs-http-client": "55.0.0",
-    "it-last": "1.0.5",
+    "files-from-path": "1.0.4",
+    "ipfs-http-client": "60.0.1",
+    "kubo-rpc-client": "3.0.2",
+    "it-drain": "3.0.5",
+    "it-last": "3.0.4",
     "peer-id": "0.16.0"
   },
   "devDependencies": {
+    "@jest/globals": "^29.7.0",
     "eslint": "8.6.0",
     "husky": "^8.0.1",
-    "jest": "27.0.4",
+    "jest": "29.7.0",
     "release-it": "15.10.1"
   }
 }
diff --git a/pinners/filebase.js b/pinners/filebase.js
index 712827ed7..0dbf3b447 100644
--- a/pinners/filebase.js
+++ b/pinners/filebase.js
@@ -1,52 +1,90 @@
-const { FilebaseClient } = require("@filebase/client");
-const { filesFromPath } = require("files-from-path");
+import * as fsPath from "node:path";
+import { ObjectManager, NameManager } from "@filebase/sdk";
+import { filesFromPaths} from "files-from-path";
 
-module.exports = {
+export default {
   name: "Filebase",
   builder: async (options) => {
     const { filebaseKey, filebaseSecret, filebaseBucket } = options;
 
     if (!filebaseKey) {
-      throw new Error("[filebase] Key is empty. (input `filebaseKey`)");
+      throw new Error("filebaseKey is empty");
     }
 
     if (!filebaseSecret) {
-      throw new Error("[filebase] Secret is empty. (input `filebaseSecret`)");
+      throw new Error("filebaseSecret is empty");
     }
 
     if (!filebaseBucket) {
-      throw new Error("[filebase] Bucket is empty. (input `filebaseBucket`)");
+      throw new Error("filebaseBucket is empty");
     }
 
-    return { key: filebaseKey, secret: filebaseSecret, bucket: filebaseBucket };
+    return {
+      key: filebaseKey,
+      secret: filebaseSecret,
+      bucket: filebaseBucket,
+    };
   },
   upload: async (api, options) => {
     console.log(`Parsing options...`);
-    const { path, pinName, verbose } = options;
+    const { path, pinName, verbose, key } = options;
+    console.log(`Parsed Options: ${JSON.stringify(options)}`);
+
+    let source = path;
+    if (!fsPath.isAbsolute(source)) {
+      const dir = (process.env.GITHUB_WORKSPACE || process.cwd()).toString();
+      source = fsPath.join(dir, source);
+    }
 
     console.log(`Adding files...`);
+    const filesFromPath = await filesFromPaths(source);
     const files = [];
-    for await (const file of filesFromPath(path, { pathPrefix: path })) {
-      files.push(file);
+    for await (const file of filesFromPath) {
+      files.push({ path: file.name, content: file.stream() });
       if (verbose) {
         console.log(`Added File: ${JSON.stringify(file)}`);
       }
     }
 
+    console.log(`Starting filebase client`);
+    const objectManager = new ObjectManager(api.key, api.secret, {
+      bucket: api.bucket,
+    });
+    console.log(`Started filebase client`);
+
     console.log(`Storing files...`);
-    let tokenString = `${api.key}:${api.secret}:${api.bucket}`;
-    let cid = await FilebaseClient.storeDirectory(
-      {
-        endpoint: "https://s3.filebase.com",
-        token: Buffer.from(tokenString).toString("base64"),
-      },
-      files,
-      pinName
-    );
+    const uploadResult = await objectManager.upload(pinName, files),
+      cid = uploadResult.cid;
     console.log(`Stored files...`);
     console.log(`CID: ${cid}`);
+
+    // Set IPNS name
+    let ipnsKey = null;
+    if (key) {
+      const nameManager = new NameManager(api.key, api.secret),
+        existingName = await nameManager.get(key);
+      ipnsKey = existingName.network_key;
+
+      if (existingName === false) {
+        console.log(`Creating name...`);
+        await nameManager.create(key, cid);
+        console.log(`Created name...`);
+      } else {
+        console.log(`Updating name...`);
+        await nameManager.update(key, cid);
+        console.log(`Updated name...`);
+      }
+    }
+
     console.log(`Done`);
 
+    if (ipnsKey) {
+      return {
+        cid: cid,
+        ipfs: cid,
+        ipns: ipnsKey,
+      };
+    }
     return {
       cid: cid,
       ipfs: cid,
diff --git a/pinners/index.js b/pinners/index.js
index 186e124bc..3b61dc93d 100644
--- a/pinners/index.js
+++ b/pinners/index.js
@@ -1,8 +1,13 @@
-const make = require("./maker");
+import make from "./maker.js";
 
-module.exports = {
-  ipfs: make(require("./ipfs")),
-  pinata: make(require("./pinata")),
-  infura: make(require("./infura")),
-  filebase: make(require("./filebase"))
+import ipfs from "./ipfs.js";
+import pinata from "./pinata.js";
+import infura from "./infura.js";
+import filebase from "./filebase.js";
+
+export default {
+  ipfs: make(ipfs),
+  pinata: make(pinata),
+  infura: make(infura),
+  filebase: make(filebase)
 };
diff --git a/pinners/infura.js b/pinners/infura.js
index 32c010eec..79be8c46f 100644
--- a/pinners/infura.js
+++ b/pinners/infura.js
@@ -1,8 +1,8 @@
-const { create, globSource } = require("ipfs-http-client");
-const last = require("it-last");
-const fsPath = require("path");
+import { create, globSource } from "kubo-rpc-client";
+import last from "it-last";
+import * as fsPath from "node:path";
 
-module.exports = {
+export default {
   name: "Infura",
   builder: async (options) => {
     const { infuraProjectId, infuraProjectSecret, headers, timeout } = options;
diff --git a/pinners/ipfs.js b/pinners/ipfs.js
index 4349b9616..e884569ef 100644
--- a/pinners/ipfs.js
+++ b/pinners/ipfs.js
@@ -1,9 +1,9 @@
-const { create, globSource } = require("ipfs-http-client");
-const PeerId = require("peer-id");
-const last = require("it-last");
-const fsPath = require("path");
+import { create, globSource } from "kubo-rpc-client";
+import PeerId from "peer-id";
+import last from "it-last";
+import * as fsPath from "node:path";
 
-module.exports = {
+export default {
   name: "IPFS",
   builder: async (options) => {
     const { host, port, protocol, timeout, headers } = options;
diff --git a/pinners/maker.js b/pinners/maker.js
index f94bbdf88..ceb7948cc 100644
--- a/pinners/maker.js
+++ b/pinners/maker.js
@@ -1,7 +1,7 @@
-const fs = require("fs");
-const fsPath = require("path");
+import fs from "node:fs"
+import * as fsPath from "node:path"
 
-module.exports =
+export default
   ({ builder, upload }) =>
   async (options) => {
     const api = await builder(options);
diff --git a/pinners/pinata.js b/pinners/pinata.js
index b5720e703..223a97599 100644
--- a/pinners/pinata.js
+++ b/pinners/pinata.js
@@ -1,4 +1,4 @@
-const pinataSDK = require("@pinata/sdk");
+import pinataSDK from "@pinata/sdk";
 
 let pinataOptions = {
   pinataOptions: {
@@ -7,7 +7,7 @@ let pinataOptions = {
   },
 };
 
-module.exports = {
+export default {
   name: "Pinata",
   builder: async (options) => {
     const { pinataKey, pinataSecret } = options;
diff --git a/runner.js b/runner.js
index df9a9a46e..9ef2b2b15 100644
--- a/runner.js
+++ b/runner.js
@@ -1,19 +1,18 @@
-const core = require("@actions/core");
-const github = require("@actions/github");
+import core from "@actions/core";
+import github from "@actions/github";
 
-const uploader = require("./uploader");
+import uploader from "./uploader.js";
 
 async function run() {
   try {
     const path = core.getInput("path");
-    const pin = core.getInput("pin");
-    const pinName = core.getInput("pinName");
     const service = core.getInput("service");
     const host = core.getInput("host");
     const port = core.getInput("port");
     const protocol = core.getInput("protocol");
     const headers = core.getInput("headers");
     const key = core.getInput("key");
+    const pinName = core.getInput("pinName");
     const pinataKey = core.getInput("pinataKey");
     const pinataSecret = core.getInput("pinataSecret");
     const pinataPinName = core.getInput("pinataPinName");
@@ -27,14 +26,13 @@ async function run() {
 
     const options = {
       path,
-      pin,
-      pinName,
       service,
       host,
       port,
       protocol,
       headers: JSON.parse(headers || "{}"),
       key,
+      pinName,
       pinataKey,
       pinataSecret,
       pinataPinName,
@@ -67,4 +65,4 @@ async function run() {
   }
 }
 
-module.exports = run;
+export default run;
diff --git a/runner.test.js b/runner.test.js
index 4b44ae7bd..676c48785 100644
--- a/runner.test.js
+++ b/runner.test.js
@@ -1,5 +1,6 @@
-const run = require("./runner");
+import run from "./runner.js"
 
+import {jest} from '@jest/globals';
 jest.setTimeout(240000);
 
 describe.skip("index: Integration test", () => {
diff --git a/uploader.js b/uploader.js
index 9e8a1c540..bbfcd2c55 100644
--- a/uploader.js
+++ b/uploader.js
@@ -1,6 +1,6 @@
-const pinners = require("./pinners");
+import pinners from "./pinners/index.js";
 
-module.exports = {
+export default {
   upload: async (options) => {
     const { service } = options;
 
diff --git a/uploader.test.js b/uploader.test.js
index bb2300945..e5007c3da 100644
--- a/uploader.test.js
+++ b/uploader.test.js
@@ -1,5 +1,6 @@
-const uploader = require("./uploader");
+import uploader from "./uploader.js";
 
+import {jest} from '@jest/globals';
 jest.setTimeout(240000);
 
 const options = {